/* ==========================================================
   teachMe Online - Orion-aligned homepage redesign
   Warm paper, quiet clarity, free topical past paper SEO
   ========================================================== */

:root {
  --paper: #FAF7F0;
  --paper-warm: #FFF8EC;
  --paper-soft: #F7F4EC;
  --card: rgba(255, 255, 255, .78);
  --card-solid: #FFFFFF;
  --ink: #242421;
  --ink-soft: #67645E;
  --ink-faint: #8F8A80;
  --green: #0F6E56;
  --green-deep: #075744;
  --green-soft: #E4F3EB;
  --green-line: #BBDCCF;
  --amber: #F4C46C;
  --amber-soft: #FFF0D4;
  --coral: #C16038;
  --coral-soft: #FAE8DC;
  --purple: #7B67C7;
  --purple-soft: #EEEAFB;
  --sage: #A7B58A;
  --line: #E6DED0;
  --line-strong: #D8CCBA;
  --shadow: 0 18px 44px rgba(57, 43, 22, .08);
  --shadow-soft: 0 10px 28px rgba(57, 43, 22, .055);
  --radius: 16px;
  --radius-sm: 12px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --font-hand: 'Caveat', cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 4%, rgba(255,255,255,.9), transparent 28rem),
    linear-gradient(180deg, #FFFDF8 0%, var(--paper) 48%, #FBF5EA 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; }

.container {
  width: min(100% - 48px, 1120px);
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  border: 0;
  border-radius: 999px;
  padding: .82rem 1.35rem;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}
.btn:active { transform: scale(.975); }
.btn--green { background: var(--green); color: #fff; box-shadow: 0 10px 20px rgba(15,110,86,.16); }
.btn--green:hover { background: var(--green-deep); }
.btn--purple { background: var(--purple); color: #fff; box-shadow: 0 10px 20px rgba(123,103,199,.16); }
.btn--small { padding: .68rem 1rem; font-size: .82rem; }
.btn--tiny { padding: .48rem .8rem; font-size: .76rem; }
.btn--wide { width: 100%; }
.btn--cream { background: #FFF8EC; color: var(--green-deep); }
.btn--outline-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.55); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--line { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }

.quiet-link {
  color: var(--green-deep);
  font-size: .88rem;
  font-weight: 650;
  text-decoration: none;
}
.quiet-link:hover { text-decoration: underline; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,253,248,.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__logo {
  font-size: 1.42rem;
  font-weight: 700;
  text-decoration: none;
}
.nav__logo span { color: var(--green); }
.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__links a {
  color: #222;
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
}
.nav__links a:hover { color: var(--green); }
.nav__cta {
  display: inline-flex;
  align-items: center;
  background: var(--green);
  color: #fff;
  padding: .82rem 1.35rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15,110,86,.16);
}
.nav__cta:hover { background: var(--green-deep); }
.nav__toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 1.35rem;
  cursor: pointer;
}

.section-soft {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 72% 20%, rgba(244,196,108,.12), transparent 24rem),
    radial-gradient(circle at 18% 46%, rgba(228,243,235,.55), transparent 22rem);
}
.hero__inner {
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(350px, .97fr);
  align-items: center;
  gap: 4.5rem;
  padding: 4.25rem 0 3.1rem;
}
.hand-note {
  font-family: var(--font-hand);
  color: var(--green-deep);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-1.2deg);
  margin-bottom: 1.2rem;
}
.hand-note--small {
  font-size: 1.25rem;
  margin-bottom: .55rem;
}
.hand-note--coral { color: var(--coral); }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 7vw, 5.6rem);
  font-weight: 600;
  line-height: .96;
  margin-bottom: 1.45rem;
}
.text-mark {
  position: relative;
  color: var(--green);
  font-style: italic;
  white-space: nowrap;
}
.text-mark::after {
  content: '';
  position: absolute;
  left: .04em;
  right: -.04em;
  bottom: -.08em;
  height: .12em;
  border-radius: 999px;
  background: var(--amber);
  transform: rotate(-2deg);
}
.hero__sub {
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.07rem;
  line-height: 1.75;
  margin-bottom: .92rem;
}
.coverage-pills {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .2rem;
  margin-bottom: 1.22rem;
  padding: .36rem .6rem;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  color: var(--green-deep);
  font-size: .86rem;
  font-weight: 650;
}
.coverage-pills span:not(:last-child)::after {
  content: '\2022';
  display: inline-block;
  margin: 0 .7rem;
  color: var(--green);
}
.hero-search {
  width: min(100%, 575px);
  min-height: 64px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: .5rem .55rem .5rem 1.1rem;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  box-shadow: var(--shadow-soft);
}
.hero-search__icon { color: var(--ink); opacity: .8; }
.hero-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: .96rem;
}
.hero-search input::placeholder { color: #7A766E; }
.quick-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.35rem;
  font-size: .84rem;
  color: var(--ink-soft);
}
.quick-row a {
  padding: .32rem .72rem;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  background: rgba(228,243,235,.72);
  color: var(--green-deep);
  font-weight: 600;
  text-decoration: none;
}
.quick-row a:hover { background: var(--green-soft); }

.hero__side {
  position: relative;
  min-height: 450px;
  display: grid;
  grid-template-columns: minmax(290px, 1fr) 190px;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 1rem 1.1rem;
}
.hero-sprig {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  opacity: .95;
  z-index: 0;
}
.study-card {
  position: relative;
  z-index: 1;
  width: min(100%, 290px);
  background: rgba(255,252,246,.86);
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem .9rem;
}
.study-card--hero {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
}
.card-kicker {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
}
.leaf-icon {
  color: var(--green);
  font-family: var(--font-hand);
  font-size: 1.6rem;
}
.study-card > p {
  color: var(--ink-soft);
  font-size: .86rem;
  margin: .2rem 0 .85rem;
}
.timer-display {
  font-family: var(--font-display);
  font-size: 3.85rem;
  line-height: 1;
  margin-bottom: .85rem;
}
.study-controls {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--ink-soft);
  font-size: .78rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--line);
}
.toggle {
  width: 39px;
  height: 23px;
  border-radius: 999px;
  background: #D8D1C6;
  position: relative;
}
.toggle::before {
  content: '';
  position: absolute;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  right: 3px;
  top: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.study-meta {
  display: grid;
  gap: .55rem;
  padding: .72rem 0;
  border-bottom: 1px solid var(--line);
}
.study-meta dt,
.mini-label {
  color: var(--ink-faint);
  font-size: .72rem;
  font-weight: 600;
  margin-bottom: .05rem;
}
.study-meta dd {
  color: var(--ink);
  font-size: .84rem;
  font-weight: 500;
}
.study-meta div:first-child dd { font-weight: 700; }
.presence {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink-soft);
  font-size: .78rem;
  padding-top: .65rem;
}
.presence__people {
  color: var(--amber);
  letter-spacing: -.25em;
  font-size: 1.2rem;
}
.reassurance-card {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: end;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(318px, 100%);
  background: rgba(255,248,236,.86);
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  box-shadow: var(--shadow-soft);
  padding: 1rem 1.2rem;
}
.heart-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--amber-soft);
  border: 1px solid #F2D6A4;
  color: #513D1C;
}
.heart-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reassurance-card p {
  color: var(--green-deep);
  font-size: .92rem;
  line-height: 1.55;
}
.reassurance-card strong { color: var(--ink); }

.return-section {
  padding: 2.75rem 0 2.25rem;
  border-bottom: 1px solid var(--line);
}
.return-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.4rem;
}
.return-head h2,
.section-intro h2,
.seo-hub h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.08;
}
.return-head p,
.section-intro p,
.seo-hub p {
  color: var(--ink-soft);
  font-size: .95rem;
}
.return-head p { margin-top: .35rem; }
.return-head__link {
  color: var(--green);
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.return-head__link:hover { text-decoration: underline; }

.return-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.return-card,
.subject-card,
.help-card {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}
.return-card {
  --accent: var(--green);
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.2rem 1.15rem;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.return-card:hover {
  transform: translateY(-3px);
  border-color: rgba(44,44,42,.34);
  box-shadow: 0 16px 36px rgba(44,44,42,.08);
}
.return-card__topline {
  position: absolute;
  top: 0;
  left: 1.1rem;
  right: 1.1rem;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: var(--accent);
  opacity: .75;
}
.return-card__header {
  margin-top: .4rem;
  margin-bottom: 1.25rem;
}
.return-card__header h3 {
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1.2;
  font-weight: 600;
  margin-bottom: 4px;
}
.return-card__header span {
  display: inline-block;
  color: var(--ink-soft);
  font-size: .78rem;
}
.return-card__focus {
  margin-bottom: 1.1rem;
}
.return-card__focus span {
  display: block;
  color: var(--ink-faint);
  font-size: .72rem;
  margin-bottom: 2px;
}
.return-card__focus strong {
  display: block;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 700;
}
.return-progress {
  margin-top: auto;
  padding-top: .8rem;
}
.return-progress__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 8px;
}
.return-progress__meta span {
  color: var(--ink-soft);
  font-size: .75rem;
}
.return-progress__meta strong {
  color: var(--ink);
  font-size: .75rem;
  font-weight: 700;
}
.return-progress__bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(44,44,42,.11);
}
.return-progress__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.return-card__cta {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  color: var(--green);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
}
.return-card__cta:hover { text-decoration: underline; }
.return-card__body {
  color: var(--ink-soft);
  font-size: .82rem;
  line-height: 1.6;
  margin-top: .15rem;
  margin-bottom: auto;
}
.return-card--business { --accent: #5A9B80; }
.return-card--economics { --accent: #DF815B; }
.return-card--accounting { --accent: #8372D5; }
.return-card--new { --accent: #76A88D; }

.coverage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 14px;
  padding: 1rem 1.15rem;
  background: linear-gradient(90deg, rgba(228,243,235,.58), rgba(255,253,248,.82));
  border: 1px solid rgba(44,44,42,.14);
  border-radius: var(--radius-sm);
}
.coverage-bar p {
  color: var(--green);
  font-size: .86rem;
  font-weight: 700;
}
.coverage-bar a {
  color: var(--green);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.coverage-bar a:hover { text-decoration: underline; }

.section-warm {
  background:
    radial-gradient(circle at 20% 20%, rgba(244,196,108,.13), transparent 25rem),
    linear-gradient(180deg, rgba(255,248,236,.72), rgba(250,247,240,.92));
  border-bottom: 1px solid var(--line);
}
.explore-section { padding: 2.35rem 0; }
.explore-layout {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  gap: 2.25rem;
  align-items: center;
}
.section-intro p { margin: .75rem 0 1.25rem; }
.subject-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
}
.subject-card {
  min-height: 300px;
  padding: 1.2rem 1rem;
  text-align: center;
  display: grid;
  grid-template-rows: 118px 3.35rem 5.3rem 1.4rem;
  row-gap: .75rem;
  align-items: center;
  overflow: hidden;
}
.subject-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 550;
  margin-bottom: 0;
  width: 100%;
  align-self: center;
}
.subject-card p {
  color: var(--ink-soft);
  font-size: .84rem;
  line-height: 1.55;
  margin-bottom: 0;
  width: 100%;
  align-self: start;
}
.subject-card a {
  color: var(--green);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  min-height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: end;
}
.subject-card a:hover { text-decoration: underline; }
.subject-card .link-coral { color: var(--coral); }
.subject-card .link-purple { color: var(--purple); }
.subject-illustration {
  position: relative;
  width: 118px;
  height: 118px;
  max-width: 118px;
  min-width: 118px;
  max-height: 118px;
  min-height: 118px;
  margin: 0 auto .9rem;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,.45);
  box-shadow: inset 0 0 0 1px rgba(216,204,186,.55);
}
.subject-illustration img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.seo-hub {
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.34);
}
.seo-hub__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: center;
  gap: 2rem;
}
.seo-hub p { margin-top: .7rem; max-width: 620px; }
.seo-link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.seo-link-grid a {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: .75rem .9rem;
  border: 1px solid var(--green-line);
  border-radius: var(--radius-sm);
  background: rgba(228,243,235,.55);
  color: var(--green-deep);
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
}
.seo-link-grid a:hover { background: var(--green-soft); }

.guided-section { padding: 2.4rem 0; }
.guided-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 2.1rem;
  align-items: stretch;
}
.section-intro--guided { padding-top: .45rem; }
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.55fr;
  gap: .95rem;
}
.help-card {
  padding: 1.15rem;
  min-height: 214px;
}
.help-card h3 {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
  margin: .95rem 0 .55rem;
}
.help-card p {
  color: var(--ink-soft);
  font-size: .82rem;
  line-height: 1.62;
  margin-bottom: 1rem;
}
.guidance-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
}
.guidance-mark svg {
  width: 30px;
  height: 30px;
}
.guidance-mark--green {
  background: var(--green-soft);
  color: var(--green);
}
.guidance-mark--purple {
  background: var(--purple-soft);
  color: #6F63C7;
}
.help-card--study { padding: 1rem; }
.study-mini__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
}
.study-mini__head h3 { margin: 0; }
.study-mini__head span {
  color: var(--green);
  font-size: .76rem;
  font-weight: 700;
}
.study-mini {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: .85rem;
  padding-bottom: .85rem;
}
.study-mini strong {
  display: block;
  font-size: .88rem;
  margin-bottom: .6rem;
}
.study-mini span {
  display: block;
  color: var(--ink-soft);
  font-size: .76rem;
  line-height: 1.45;
}
.mini-timer {
  min-width: 100px;
  text-align: center;
  border-left: 1px solid var(--line);
  padding-left: .9rem;
}
.mini-timer strong {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
}

.principles-section {
  padding: 2.75rem 0 3rem;
}
.principles-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 15%, rgba(244,196,108,.16), transparent 34%),
    radial-gradient(circle at 86% 10%, rgba(228,243,235,.45), transparent 30%),
    linear-gradient(180deg, #FFFDF8 0%, #FBF4E8 100%);
  border: 1px solid rgba(36,36,33,.10);
  border-radius: 18px;
  padding: 3rem 2.6rem 2.7rem;
  box-shadow:
    0 20px 45px rgba(44,44,42,.06),
    0 1px 0 rgba(255,255,255,.75) inset;
}
.principles-panel::after {
  content: '';
  position: absolute;
  left: 2rem;
  right: 2rem;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(44,44,42,.12), transparent);
}
.principles-head {
  margin-bottom: 2.2rem;
}
.principles-kicker {
  display: inline-block;
  position: relative;
  font-family: var(--font-hand);
  font-size: 1.55rem;
  line-height: 1;
  color: var(--coral);
  transform: rotate(-.7deg);
  margin-bottom: 14px;
}
.principles-kicker::after {
  content: '';
  position: absolute;
  left: 68%;
  right: -18px;
  bottom: -5px;
  height: 3px;
  background: var(--coral);
  opacity: .75;
  border-radius: 999px;
  transform: rotate(-1.5deg);
}
.principles-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  font-weight: 600;
  max-width: 760px;
}
.principles-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.principle {
  --accent: var(--green);
  padding: .55rem 1.7rem .25rem;
  border-right: 1px solid rgba(44,44,42,.14);
}
.principle:first-child {
  padding-left: 0;
}
.principle:last-child {
  border-right: 0;
  padding-right: 0;
}
.principle h3 {
  position: relative;
  max-width: 220px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.18;
  font-weight: 600;
  margin-bottom: 1.55rem;
}
.principle h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -12px;
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
  opacity: .78;
  transform: rotate(-1.4deg);
}
.principle p {
  color: var(--ink-soft);
  font-size: .9rem;
  line-height: 1.65;
  max-width: 230px;
}
.principle--green { --accent: var(--green); }
.principle--coral { --accent: var(--coral); }
.principle--amber { --accent: #D99A28; }
.principle--purple { --accent: var(--purple); }
.principle--sage { --accent: #6F8F73; }

.teacher-section { padding: 1.55rem 0; }
.teacher-banner {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) minmax(250px, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, #0D5D4A, #0B7658);
  color: #fff;
  border-radius: 16px;
  padding: 1.2rem 1.35rem;
  box-shadow: 0 16px 35px rgba(15,110,86,.18);
}
.teacher-plant {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,.12);
  color: var(--amber);
  font-family: var(--font-hand);
  font-size: 3.2rem;
}
.teacher-banner h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 550;
  line-height: 1;
}
.hand-accent {
  font-family: var(--font-hand);
  font-size: 1.32rem;
  color: #FFF0D4;
  margin-top: .25rem;
}
.teacher-list {
  list-style: none;
  display: grid;
  gap: .35rem;
  color: rgba(255,255,255,.92);
  font-size: .84rem;
}
.teacher-list li::before {
  content: '\2713';
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.55);
  margin-right: .5rem;
  font-size: .7rem;
}
.teacher-actions {
  display: grid;
  gap: .75rem;
  min-width: 195px;
}

.stats-strip {
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.42);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stats-grid article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: .9rem;
  align-items: center;
  padding: 1.25rem 1.45rem;
  border-right: 1px dashed var(--line-strong);
}
.stats-grid article:last-child { border-right: 0; }
.stats-grid span {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--green);
  background: rgba(255,248,236,.85);
}
.stats-grid strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
}
.stats-grid p { color: var(--ink-soft); font-size: .82rem; }

.ad-slot {
  margin: 2rem 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.45);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}
.ad-slot__label {
  font-size: .68rem;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.page-head { padding: 3rem 0 1rem; }
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.08;
  margin-bottom: 12px;
}
.page-head p {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 620px;
  margin-bottom: 1.25rem;
}
.page-head--split {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
.zlabel {
  font-family: var(--font-hand);
  font-size: 1.45rem;
  color: var(--green);
  transform: rotate(-1deg);
  display: inline-block;
  margin-bottom: 1.25rem;
}
.finder {
  margin: 2.5rem 0;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.finder h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.finder > p { font-size: .9rem; color: var(--ink-soft); margin-bottom: 1.25rem; }
.finder__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
.finder select,
.finder input[type="search"],
.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: .9rem;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.75);
  color: var(--ink);
}
.finder select:focus,
.finder input:focus,
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
}
.finder__search { display: flex; gap: 10px; margin-bottom: 1rem; }
.finder__search input { flex: 1; }
.quick-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.quick-tags a {
  font-size: .8rem;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  padding: 5px 12px;
  border-radius: 999px;
  text-decoration: none;
}
.quick-tags a:hover { border-color: var(--green); color: var(--green); }
.result-grid,
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 3rem;
}
.result-card,
.empty-state,
.tool-panel,
.fcard {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}
.result-card,
.fcard,
.tool-panel,
.empty-state { padding: 1.35rem; }
.result-card h3,
.fcard h3,
.tool-panel h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: .55rem;
}
.result-card p,
.fcard p,
.tool-panel p,
.empty-state p {
  color: var(--ink-soft);
  font-size: .88rem;
}
.result-card__meta {
  font-size: .78rem;
  color: var(--ink-faint);
  margin: 14px 0 8px;
}
.ai-card__cta {
  display: inline-flex;
  margin-top: .8rem;
  color: var(--green);
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
}
.ai-card__cta:hover { text-decoration: underline; }
.ai-badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .7rem;
  border-radius: 999px;
  margin-bottom: .8rem;
}
.ai-badge--green { background: var(--green-soft); color: var(--green-deep); }
.ai-badge--purple { background: var(--purple-soft); color: var(--purple); }
.tool-shell {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 1rem;
  padding-bottom: 3rem;
}
.field {
  display: block;
  margin-bottom: 1rem;
}
.field span {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.field textarea { resize: vertical; }
.tool-panel--response {
  background: var(--green-soft);
  border-color: var(--green-line);
}
.topic-stat {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  min-width: 190px;
  padding: 1.25rem;
  text-align: center;
}
.topic-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--green);
}
.topic-stat span {
  display: block;
  margin-top: 8px;
  font-size: .8rem;
  color: var(--ink-faint);
}

/* ---------- Study Room ---------- */

.study-room-page {
  background:
    linear-gradient(180deg, rgba(255,253,248,.7) 0%, rgba(250,247,240,.92) 100%);
}

.study-room-hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,253,248,.92), rgba(247,244,236,.88));
}

.study-room-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr);
  gap: 2.2rem;
  align-items: center;
  padding: 3.3rem 0 2.7rem;
}

.study-room-hero__grid > *,
.study-desk > *,
.study-picker > * {
  min-width: 0;
}

.study-room-hero__copy h1 {
  max-width: 680px;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.4vw, 5.2rem);
  line-height: .98;
  font-weight: 600;
  margin-bottom: 1rem;
}

.study-room-hero__copy > p:not(.hand-note) {
  max-width: 650px;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.75;
  margin-bottom: 1.35rem;
}

.study-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin-bottom: 1rem;
}

.study-picker label,
.leave-note label,
.sound-volume {
  display: grid;
  gap: 6px;
}

.study-picker span,
.leave-note label span,
.sound-volume span,
.intention-card label {
  font-size: .74rem;
  color: var(--ink-faint);
  font-weight: 700;
}

.study-picker select,
.leave-note select,
.questions-tried input,
.intention-card textarea,
.practice-card textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255,255,255,.8);
  color: var(--ink);
  padding: .72rem .78rem;
}

.study-picker select:focus,
.leave-note select:focus,
.questions-tried input:focus,
.intention-card textarea:focus,
.practice-card textarea:focus {
  outline: none;
  border-color: var(--green);
}

.study-picker__topic {
  grid-column: span 2;
}

.study-room-hero__actions {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
}

.room-card,
.desk-panel,
.desk-main {
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

.room-card {
  padding: 1.1rem;
}

.room-card__head,
.desk-panel__head,
.note-stream__head,
.desk-topic-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.room-card__head {
  margin-bottom: .9rem;
}

.room-card .zlabel,
.desk-panel .zlabel {
  margin-bottom: .15rem;
  font-size: 1.12rem;
}

.room-card h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.1;
}

.sound-toggle,
.note-stream__head button {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: var(--green-deep);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 700;
  padding: .48rem .72rem;
}

.sound-toggle[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.room-view {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 10;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid rgba(44,44,42,.12);
  border-radius: 10px;
  background: #EAF2E3;
}

.room-view__sky,
.room-view__mountain,
.room-view__water,
.room-view__fall,
.room-view__desk {
  position: absolute;
}

.room-view__sky {
  inset: 0 0 32%;
  background:
    linear-gradient(180deg, rgba(255,253,248,.95), rgba(222,239,232,.7));
  z-index: 1;
}

.room-view__mountain {
  left: 0;
  right: 0;
  bottom: 28%;
  height: 46%;
  z-index: 2;
  clip-path: polygon(0 100%, 16% 48%, 31% 72%, 48% 28%, 68% 78%, 83% 45%, 100% 100%);
  background: rgba(119,139,112,.72);
}

.room-view__mountain--back {
  bottom: 35%;
  height: 40%;
  opacity: .35;
  transform: translateX(-5%);
}

.room-view__mountain--front {
  background: rgba(78,108,96,.62);
}

.room-view__water {
  left: 0;
  right: 0;
  bottom: 0;
  height: 36%;
  z-index: 3;
  background:
    repeating-linear-gradient(168deg, rgba(255,255,255,.28) 0 2px, transparent 2px 22px),
    linear-gradient(180deg, rgba(138,190,183,.78), rgba(74,137,145,.9));
  background-size: 120px 100%, 100% 100%;
}

.room-view__fall {
  display: none;
  top: 20%;
  left: 49%;
  width: 54px;
  height: 57%;
  z-index: 4;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.76) 0 4px, rgba(179,221,219,.62) 4px 10px);
  opacity: .86;
}

.room-view__desk {
  left: 50%;
  bottom: 24px;
  width: min(82%, 390px);
  transform: translateX(-50%);
  z-index: 5;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: .75rem;
  padding: .82rem .92rem;
  border: 1px solid rgba(44,44,42,.18);
  border-radius: 8px;
  background: rgba(255,253,248,.9);
  box-shadow: 0 18px 35px rgba(44,44,42,.12);
}

.room-view__desk span {
  width: 42px;
  height: 30px;
  border: 2px solid var(--green);
  border-radius: 5px 5px 12px 12px;
  border-top: 0;
  position: relative;
}

.room-view__desk span::before {
  content: '';
  position: absolute;
  right: -12px;
  top: 6px;
  width: 14px;
  height: 12px;
  border: 2px solid var(--green);
  border-left: 0;
  border-radius: 0 10px 10px 0;
}

.room-view__desk strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.15;
}

.room-view[data-room="garden"] {
  background: #E9F2E4;
}

.room-view[data-room="garden"] .room-view__water {
  height: 38%;
  background:
    repeating-linear-gradient(168deg, rgba(255,255,255,.18) 0 1px, transparent 1px 20px),
    linear-gradient(180deg, #CADAB5, #9DB887);
}

.room-view[data-room="ocean"] .room-view__mountain {
  display: none;
}

.room-view[data-room="ocean"] .room-view__sky {
  background: linear-gradient(180deg, #FDF7EC, #D9EEF0 74%, #A8CED1);
}

.room-view[data-room="ocean"] .room-view__water {
  height: 58%;
  background:
    repeating-linear-gradient(175deg, rgba(255,255,255,.35) 0 2px, transparent 2px 28px),
    linear-gradient(180deg, #8FC4C8, #3F8894);
}

.room-view[data-room="mountain"] .room-view__water {
  height: 28%;
  background: linear-gradient(180deg, #B8C9A7, #899C72);
}

.room-view[data-room="mountain"] .room-view__mountain--front {
  background: rgba(82,102,91,.82);
}

.room-view[data-room="waterfall"] .room-view__fall {
  display: block;
}

.room-view[data-room="waterfall"] .room-view__water {
  background:
    repeating-linear-gradient(168deg, rgba(255,255,255,.35) 0 2px, transparent 2px 19px),
    linear-gradient(180deg, #A4CFCA, #5C9B99);
}

.room-theme-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: .9rem 0 .8rem;
}

.room-theme,
.timer-lengths button,
.clarity-buttons button,
.desk-tabs button,
.mcq-options button,
.shelf-options button {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: .8rem;
  font-weight: 700;
  min-height: 38px;
  padding: .55rem .75rem;
}

.room-theme.is-active,
.timer-lengths button.is-active,
.clarity-buttons button.is-active,
.desk-tabs button.is-active,
.shelf-options button.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.sound-volume input {
  width: 100%;
  accent-color: var(--green);
}

.study-desk {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr) minmax(280px, 330px);
  gap: 14px;
  align-items: start;
  padding: 1.6rem 0 3.2rem;
}

.desk-panel,
.desk-main {
  padding: 1.2rem;
}

.desk-panel__head {
  margin-bottom: 1rem;
}

.desk-panel__head > span {
  color: var(--ink-faint);
  font-size: .76rem;
  font-weight: 700;
}

.study-timer {
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 7vw, 5.8rem);
  line-height: .9;
  letter-spacing: 0;
  margin-bottom: 1rem;
}

.timer-controls,
.resource-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.timer-lengths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 1rem 0;
}

.break-mode {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink-soft);
  font-size: .84rem;
  margin-bottom: 1rem;
}

.break-mode input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.intention-card {
  display: grid;
  gap: .45rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.intention-card textarea,
.practice-card textarea {
  resize: vertical;
  min-height: 96px;
}

.desk-main {
  min-height: 610px;
}

.desk-topic-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.desk-topic-head .zlabel {
  margin-bottom: .25rem;
  font-size: 1.1rem;
}

.desk-topic-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.1vw, 2.65rem);
  line-height: 1.05;
  font-weight: 600;
  margin-bottom: .45rem;
}

.desk-topic-head p {
  color: var(--ink-soft);
  max-width: 620px;
}

.question-count {
  flex: 0 0 auto;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: .78rem;
  font-weight: 700;
  padding: .45rem .75rem;
  white-space: nowrap;
}

.clarity-path {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.clarity-path h3,
.note-stream h3,
.leave-note h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.2;
  font-weight: 600;
}

.clarity-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: .8rem 0;
}

#clarityPrompt {
  color: var(--ink-soft);
  font-size: .9rem;
}

.desk-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
}

.desk-resource-panel {
  min-height: 310px;
}

.resource-kicker {
  display: inline-flex;
  color: var(--coral);
  font-size: .75rem;
  font-weight: 800;
  margin-bottom: .45rem;
}

.resource-notes h3,
.practice-card h3,
.check-card h3,
.return-shelf-card h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: .65rem;
}

.resource-lead,
.practice-card p,
.mcq-feedback,
.save-feedback {
  color: var(--ink-soft);
}

.formula-box {
  border-left: 4px solid var(--amber);
  background: rgba(255,240,212,.65);
  border-radius: 6px;
  font-weight: 700;
  margin: 1rem 0;
  padding: .78rem .9rem;
}

.resource-notes ol {
  display: grid;
  gap: .55rem;
  color: var(--ink-soft);
  margin: 0 0 1.15rem 1.2rem;
}

.exam-checklist {
  display: grid;
  gap: .55rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 1rem 0;
  padding: 1rem 0;
}

.exam-checklist label {
  color: var(--ink-soft);
  font-size: .9rem;
}

.exam-checklist input {
  accent-color: var(--green);
  margin-right: .35rem;
}

.mcq-options,
.shelf-options {
  display: grid;
  gap: 8px;
  margin: 1rem 0;
}

.mcq-options {
  grid-template-columns: repeat(2, 1fr);
}

.mcq-options button {
  border-radius: 8px;
  text-align: left;
  min-height: 48px;
}

.mcq-options button.is-correct {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green-deep);
}

.mcq-options button.is-wrong {
  background: var(--coral-soft);
  border-color: var(--coral);
  color: var(--coral);
}

.questions-tried {
  display: grid;
  gap: .45rem;
  color: var(--ink-soft);
  font-size: .86rem;
  margin-bottom: 1rem;
  max-width: 210px;
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.progress-stats article {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: .7rem;
  text-align: center;
}

.progress-stats strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1;
  color: var(--green);
}

.progress-stats span {
  color: var(--ink-faint);
  font-size: .7rem;
  font-weight: 700;
}

.note-stream {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.student-note {
  border-left: 4px solid var(--green-line);
  margin-top: .85rem;
  padding-left: .85rem;
}

.student-note span {
  color: var(--green-deep);
  font-size: .75rem;
  font-weight: 800;
}

.student-note p {
  color: var(--ink);
  font-size: .9rem;
  line-height: 1.55;
  margin: .35rem 0;
}

.student-note small {
  color: var(--ink-faint);
  font-size: .75rem;
}

.leave-note {
  display: grid;
  gap: .72rem;
  padding-top: 1rem;
}

.note-preview {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: .83rem;
  line-height: 1.55;
  padding: .8rem;
}

@media (prefers-reduced-motion: no-preference) {
  .room-view__water {
    animation: room-water 18s linear infinite;
  }
  .room-view__fall {
    animation: room-fall 1.6s linear infinite;
  }
}

@keyframes room-water {
  from { background-position: 0 0, 0 0; }
  to { background-position: 120px 0, 0 0; }
}

@keyframes room-fall {
  from { background-position: 0 0; }
  to { background-position: 42px 0; }
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.site-footer span { font-size: .8rem; color: var(--ink-faint); }

@media (max-width: 1080px) {
  .return-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-banner { grid-template-columns: auto 1fr; }
  .teacher-list, .teacher-actions { grid-column: 2; }
  .study-desk {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .desk-main {
    grid-column: 1 / -1;
    order: -1;
  }
}

@media (max-width: 980px) {
  .principles-panel {
    padding: 2.5rem 2rem;
  }
  .principles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem 0;
  }
  .principle {
    padding: 0 1.4rem;
  }
  .principle:nth-child(2n) {
    border-right: 0;
  }
  .principle:nth-child(2n + 1) {
    padding-left: 0;
  }
  .principle:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(44,44,42,.12);
    padding-top: 1.7rem;
  }
}

@media (max-width: 920px) {
  .container { width: min(100% - 36px, 1120px); }
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__links.is-open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 36px;
    background: rgba(255,253,248,.98);
    border-bottom: 1px solid var(--line);
  }
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    min-height: 0;
    padding: 3rem 0 2.7rem;
  }
  .hero__side { min-height: 390px; justify-content: flex-start; }
  .study-card--hero { margin-right: 0; margin-left: 2rem; }
  .hero-sprig { right: .5rem; }
  .reassurance-card { right: 1rem; }
  .explore-layout,
  .guided-layout,
  .seo-hub__inner { grid-template-columns: 1fr; }
  .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-grid { grid-template-columns: 1fr; }
  .section-intro { max-width: 560px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .result-grid,
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-shell,
  .page-head--split { grid-template-columns: 1fr; }
  .study-room-hero__grid {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding: 2.6rem 0 2.2rem;
  }
  .study-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .study-desk {
    grid-template-columns: 1fr;
  }
  .desk-main {
    grid-column: auto;
    order: 0;
  }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1120px); }
  .nav { min-height: 66px; }
  .nav__cta { display: none; }
  .hero h1 { font-size: 3.3rem; }
  .hero-search {
    grid-template-columns: auto 1fr;
    padding: .85rem .9rem;
  }
  .hero-search .btn { grid-column: 1 / -1; width: 100%; }
  .coverage-pills { border-radius: 16px; }
  .coverage-pills span:not(:last-child)::after { margin: 0 .45rem; }
  .hero__side { min-height: auto; display: block; }
  .study-card, .study-card--hero { width: 100%; margin: 0; }
  .hero-sprig { display: none; }
  .reassurance-card { position: static; width: 100%; margin-top: 1rem; }
  .section-head { display: block; }
  .quiet-link { display: inline-block; margin-top: .65rem; }
  .return-grid,
  .subject-grid,
  .stats-grid,
  .result-grid,
  .feat-grid,
  .seo-link-grid { grid-template-columns: 1fr; }
  .return-section { padding-top: 2.1rem; }
  .return-head { display: block; }
  .return-head__link {
    display: inline-flex;
    margin-top: .8rem;
  }
  .return-card { min-height: auto; }
  .coverage-bar { display: block; }
  .coverage-bar a {
    display: inline-flex;
    margin-top: .75rem;
  }
  .principles-section { padding: 2rem 0; }
  .principles-panel {
    padding: 2rem 1.35rem;
    border-radius: 16px;
  }
  .principles-head { margin-bottom: 1.8rem; }
  .principles-kicker { font-size: 1.4rem; }
  .principles-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .principle,
  .principle:first-child,
  .principle:last-child {
    border-right: 0;
    border-top: 1px solid rgba(44,44,42,.12);
    padding: 1.45rem 0;
  }
  .principle:first-child {
    border-top: 0;
    padding-top: 0;
  }
  .principle h3 {
    font-size: 1.2rem;
    margin-bottom: 1.35rem;
  }
  .principle p {
    max-width: none;
  }
  .teacher-banner { grid-template-columns: 1fr; text-align: left; }
  .teacher-list, .teacher-actions { grid-column: auto; }
  .teacher-plant { display: none; }
  .stats-grid article { border-right: 0; border-bottom: 1px dashed var(--line-strong); }
  .stats-grid article:last-child { border-bottom: 0; }
  .finder__row { grid-template-columns: 1fr; }
  .finder__search { flex-direction: column; }
  .study-room-hero__copy h1 { font-size: 3.15rem; }
  .study-picker,
  .room-theme-row,
  .clarity-buttons,
  .desk-tabs,
  .mcq-options {
    grid-template-columns: 1fr;
  }
  .study-picker__topic {
    grid-column: auto;
  }
  .study-room-hero__actions,
  .timer-controls,
  .resource-actions {
    flex-direction: column;
  }
  .study-room-hero__actions .btn,
  .timer-controls .btn,
  .resource-actions .btn {
    width: 100%;
  }
  .room-card__head,
  .desk-topic-head,
  .desk-panel__head,
  .note-stream__head {
    display: block;
  }
  .sound-toggle,
  .note-stream__head button,
  .question-count {
    display: inline-flex;
    margin-top: .7rem;
  }
  .room-view {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }
  .progress-stats {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
