/* Cluecub site styles: direction D, bright and image-led */
:root {
  /* Layout: image-led. A big photo opens every page (headline card over it on the home page), image-topped guide cards, and a ~70ch reading column with a sticky margin rail on guides. */
  --bg: #FFFFFF; --surface: #FFFFFF; --sunk: #F3F6FA; --line: #E2E8F0; --line-2: #CBD5E1;
  --ink: #0F172A; --ink-2: #475569; --ink-3: #556378;
  --brand: #0B6FB8; --brand-hover: #095C99; --brand-ink: #FFFFFF; --brand-soft: #E8F4FC;
  --coral: #CF3F2B; --coral-ink: #FFFFFF; --sun: #FFC93C; --leaf: #1FA35B; --sky: #0A84D6;
  --mark: #FFC93C;
  --bio: #137A43; --bio-soft: #E6F6EC;
  --chemistry: #C2410C; --chemistry-soft: #FFEDD5;
  --physics: #0369A1; --physics-soft: #E0F2FE;
  --earth: #8A5A0B; --earth-soft: #FEF3C7;
  --energy: #E89A00; --energy-ink: #8F5300; --energy-soft: #FFF4D6;
  --ok: #137A43; --ok-soft: #E6F6EC; --bad: #C0362C; --bad-soft: #FDE8E6; --warn-soft: #FFF6DB;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 12px 30px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, .18);
  --f-head: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 18px;
  --head-h: 68px;
  color-scheme: light; /* one bright look in every theme: no dark mode */
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--head-h) + 20px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.125rem/1.65 var(--f-body); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-head); color: var(--ink); line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-weight: 800; }
h2, h3, h4 { font-weight: 700; }
p { margin: 0; }
a { color: var(--brand); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
mark { background: none; color: var(--brand); }
.chem sub { font-size: .68em; line-height: 0; vertical-align: -.3em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1240px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 700px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.skip { position: absolute; left: 12px; top: -80px; z-index: 40; padding: 10px 16px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font: 600 1rem var(--f-head); }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }
.eyebrow { font: 700 .8rem/1.2 var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.eyebrow-chip { display: inline-flex; padding: 6px 12px; border-radius: 8px; background: var(--bio-soft); color: var(--bio); font: 700 .85rem/1.2 var(--f-head); }

/* ---------- images and placeholders ---------- */
.media { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph { display: grid; place-items: center; color: #0F172A; }
.ph span { background: rgba(255, 255, 255, .92); border-radius: 8px; padding: 6px 11px; font: 700 .72rem/1.2 var(--f-head); letter-spacing: .06em; text-transform: uppercase; }
.ph.t0 { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .14) 0 14px, transparent 14px 28px), linear-gradient(120deg, #57B5EA, #2E9F6B); }
.ph.t1 { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .2) 0 12px, transparent 12px 24px), #7FD1A0; }
.ph.t2 { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .2) 0 12px, transparent 12px 24px), #FFB27A; }
.ph.t3 { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .2) 0 12px, transparent 12px 24px), #8EC9F2; }
.ph.t4 { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .22) 0 12px, transparent 12px 24px), #FFD56B; }

/* ---------- buttons and chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; border: 2px solid var(--brand); background: var(--brand); color: var(--brand-ink); font: 700 1rem/1 var(--f-head); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--brand-ink); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: .92rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--brand); font: 600 .92rem var(--f-head); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 8px; font: 700 .8rem/1 var(--f-head); background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.chip.biology { background: var(--bio-soft); color: var(--bio); }
.chip.chemistry { background: var(--chemistry-soft); color: var(--chemistry); }
.chip.physics { background: var(--physics-soft); color: var(--physics); }
.chip.earth { background: var(--earth-soft); color: var(--earth); }

/* ---------- header and footer ---------- */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head::before { content: ""; display: block; height: 5px; background: linear-gradient(90deg, var(--coral) 0 25%, var(--sun) 0 50%, var(--leaf) 0 75%, var(--sky) 0); }
.head-row { display: flex; align-items: center; gap: 16px; min-height: calc(var(--head-h) - 5px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.2rem/1 var(--f-head); color: var(--ink); text-decoration: none; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.logo { width: 30px; height: 30px; flex: none; }
.logo-bg { fill: var(--leaf); }
.logo-lens { fill: rgba(255,255,255,.16); stroke: #FFFFFF; stroke-width: 3; }
.logo-handle { fill: none; stroke: var(--sun); stroke-width: 4; stroke-linecap: round; }
.logo-leaf { fill: var(--sun); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav a { padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font: 600 .98rem/1 var(--f-head); text-decoration: none; }
.nav a:hover { background: var(--sunk); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--brand); }
.nav-cta { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 12px; background: var(--coral); color: var(--coral-ink); font: 700 .95rem/1 var(--f-head); text-decoration: none; white-space: nowrap; }
.nav-cta:hover { color: var(--coral-ink); filter: brightness(1.08); }
@media (max-width: 760px) { .nav-cta { display: none; } }
@media (max-width: 560px) { .nav .hide-sm { display: none; } .nav a { padding: 9px 10px; } }
.site-foot { background: var(--sunk); border-top: 1px solid var(--line); padding-block: 48px 36px; font-size: .95rem; color: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: minmax(220px, 1.4fr); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 32px; }
.site-foot h2 a { color: inherit; text-decoration: none; }
.site-foot h2 a:hover { color: var(--brand); }
.foot-blurb { margin-top: 14px; max-width: 34ch; }
.site-foot h2 { font: 700 .78rem/1 var(--f-head); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 14px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-foot a:not(.brand) { color: var(--ink-2); text-decoration: none; }
.site-foot a:not(.brand):hover { color: var(--brand); text-decoration: underline; }
.foot-note { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--ink-3); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; grid-auto-flow: row; } .foot-brand { grid-column: 1 / -1; } }

/* ---------- home ---------- */
.hero { padding-block: 24px 56px; }
.hero-stage { position: relative; display: flex; align-items: center; min-height: 540px; border-radius: 32px; overflow: hidden; background: var(--sunk); }
.hero-stage .hero-media { position: absolute; inset: 0; }
.hero-stage .hero-media.ph { place-items: start end; padding: 20px; }
.hero-card { position: relative; z-index: 1; margin: 44px; max-width: 560px; background: var(--surface); border-radius: 26px; padding: 36px; box-shadow: var(--shadow-lg); display: grid; gap: 16px; justify-items: start; }
.hero-card h1 { font-size: clamp(2.3rem, 1.4rem + 3vw, 3.6rem); line-height: 1.02; letter-spacing: -.03em; }
.lead { font-size: 1.15rem; color: var(--ink-2); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-points { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--ink-2); font: 600 .98rem var(--f-head); }
.hero-points li { display: flex; gap: 10px; align-items: center; }
.hero-points li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--leaf); }
.hero-points li:nth-child(2)::before { background: var(--sky); }
.hero-points li:nth-child(3)::before { background: var(--sun); }
.hero-points li:nth-child(4)::before { background: var(--coral); }
@media (max-width: 760px) {
  .hero { padding-block: 16px 40px; }
  .hero-stage { display: block; min-height: 0; border-radius: 24px; background: none; }
  .hero-stage .hero-media { position: relative; height: 220px; border-radius: 24px; }
  .hero-card { margin: -56px 12px 0; padding: 24px 20px; border-radius: 22px; }
}
.section { padding-block: 64px; }
.section + .section { border-top: 1px solid var(--line); }
.sec-head { max-width: 720px; display: grid; gap: 12px; margin-bottom: 32px; }
.sec-head h2 { font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.6rem); }
.sec-head p:not(.eyebrow) { color: var(--ink-2); }
.subject-block { display: grid; gap: 36px; }
.topic-feature { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 28px; box-shadow: var(--shadow); }
.tf-copy { display: grid; gap: 14px; align-content: start; justify-items: start; }
.tf-media { width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; margin-bottom: 6px; }
.tf-copy h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.tf-copy h3 a { color: var(--ink); text-decoration: none; }
.tf-copy h3 a:hover { color: var(--brand); }
.tf-copy p { color: var(--ink-2); }
.tf-copy .tf-count { font: 700 .95rem var(--f-head); color: var(--bio); }
.tf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.tf-list a { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); transition: border-color .15s; }
.tf-list a:hover { border-color: var(--brand); color: var(--ink); }
.tf-n { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--leaf); color: #FFFFFF; font: 800 .95rem var(--f-head); }
.tf-list li:nth-child(2) .tf-n { background: var(--sky); }
.tf-list li:nth-child(3) .tf-n { background: var(--coral); }
.tf-more { border-style: dashed !important; }
.tf-more .tf-n { background: var(--sunk) !important; color: var(--ink-2); font-size: .8rem; }
.tf-txt { display: grid; gap: 2px; min-width: 0; }
.tf-t { font: 700 1.05rem/1.3 var(--f-head); }
.tf-d { font-size: .9rem; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tf-list li:nth-child(4) .tf-n { background: var(--energy); }
@media (max-width: 880px) { .topic-feature { grid-template-columns: 1fr; padding: 18px; gap: 22px; border-radius: 24px; } }
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.why-card { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-height: 196px; padding: 22px 22px 20px; border-radius: 22px; border: 2px solid transparent; text-decoration: none; color: var(--ink); background: var(--bio-soft); transition: transform .15s, border-color .15s, box-shadow .15s; }
.why-card::after { content: "?"; position: absolute; right: -6px; bottom: -34px; font: 800 9rem/1 var(--f-head); color: var(--bio); opacity: .1; pointer-events: none; }
.why-card:hover { color: var(--ink); border-color: var(--bio); transform: translateY(-3px); box-shadow: var(--shadow); }
.why-card-q { position: relative; font: 700 1.3rem/1.22 var(--f-head); letter-spacing: -.01em; text-wrap: balance; }
.why-card-go { position: relative; font: 600 .9rem/1.3 var(--f-head); color: var(--bio); }
.why-card-go b { font-weight: 700; }
.why-card.w1 { background: var(--energy-soft); } .why-card.w1::after, .why-card.w1 .why-card-go { color: var(--energy-ink); } .why-card.w1:hover { border-color: var(--energy); }
.why-card.w2 { background: var(--physics-soft); } .why-card.w2::after, .why-card.w2 .why-card-go { color: var(--physics); } .why-card.w2:hover { border-color: var(--physics); }
.why-card.w3 { background: var(--chemistry-soft); } .why-card.w3::after, .why-card.w3 .why-card-go { color: var(--chemistry); } .why-card.w3:hover { border-color: var(--chemistry); }
@media (max-width: 1000px) { .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .why-grid { grid-template-columns: 1fr; gap: 12px; } .why-card { min-height: 0; } .why-card:nth-child(n+7) { display: none; } .why-card-q { font-size: 1.2rem; } }
.soon-band { padding-bottom: 64px; }
.soon-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 18px 22px; border: 2px dashed var(--line-2); border-radius: 20px; }
.soon-k { font: 700 .82rem var(--f-head); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.soon-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.soon-list li { display: inline-flex; align-items: center; gap: 8px; }
.soon-list b { font: 600 .95rem var(--f-head); color: var(--ink-2); }
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.feature { display: grid; gap: 10px; align-content: start; }
.f-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.feature:nth-child(2) .f-ico { background: var(--bio-soft); color: var(--bio); }
.feature:nth-child(3) .f-ico { background: var(--energy-soft); color: var(--energy-ink); }
.feature:nth-child(4) .f-ico { background: var(--bad-soft); color: var(--coral); }
.f-ico svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 1.15rem; margin-top: 4px; }
.feature p { color: var(--ink-2); font-size: 1rem; }
@media (max-width: 920px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }
.guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.g-card { display: grid; grid-template-rows: auto 1fr; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.g-card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); }
.g-card > .media { aspect-ratio: 4 / 3; height: auto; }
.g-body { display: grid; gap: 10px; align-content: start; padding: 18px 20px 22px; }
.g-title { font: 700 1.3rem/1.2 var(--f-head); letter-spacing: -.02em; }
.g-card:hover .g-title { color: var(--brand); }
.g-dek { color: var(--ink-2); font-size: 1rem; }
.g-meta { font-size: .88rem; color: var(--ink-3); }
@media (max-width: 920px) { .guides { grid-template-columns: 1fr; } .g-card { grid-template-columns: minmax(0, 1fr); } }

/* ---------- article header and layout ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 0; margin: 24px 0 0; font-size: .92rem; color: var(--ink-3); }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.art-head { padding-block: 22px 28px; display: grid; gap: 16px; max-width: 860px; }
.art-head h1 { font-size: clamp(2.2rem, 1.4rem + 2.8vw, 3.5rem); line-height: 1.04; letter-spacing: -.03em; }
.dek { font-size: 1.22rem; color: var(--ink-2); max-width: 40em; }
.art-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: .92rem; color: var(--ink-3); }
.includes { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: .95rem; color: var(--ink-2); }
.includes b { font: 700 .78rem var(--f-head); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.includes span { display: inline-flex; gap: 6px; align-items: center; }
.tick { width: 16px; height: 16px; fill: none; stroke: var(--leaf); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.art-hero { aspect-ratio: 21 / 8; border-radius: 28px; overflow: hidden; margin-bottom: 44px; background: var(--sunk); }
@media (max-width: 760px) { .art-hero { aspect-ratio: 16 / 10; border-radius: 20px; margin-bottom: 32px; } }
.art-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 64px; align-items: start; padding-bottom: 40px; }
.rail { position: sticky; top: calc(var(--head-h) + env(safe-area-inset-top, 0px) + 24px); display: grid; gap: 22px; max-height: calc(100vh - var(--head-h) - 48px); overflow-y: auto; padding-bottom: 8px; scrollbar-width: thin; }
.rail-k { font: 700 .76rem/1 var(--f-head); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; font-size: .94rem; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { color: var(--brand); border-left-color: var(--brand); font-weight: 700; }
.path-card { background: var(--sunk); border-radius: var(--r); padding: 18px; }
.path-title { font: 700 1rem/1.3 var(--f-head); margin-bottom: 10px; }
.path-title a { color: var(--ink); text-decoration: none; }
.path-title a:hover { color: var(--brand); }
.path-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; counter-reset: pm; }
.path-mini li { counter-increment: pm; display: flex; gap: 10px; align-items: baseline; font-size: .9rem; line-height: 1.35; padding: 5px 0; }
.path-mini li::before { content: counter(pm); flex: none; width: 22px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center; font: 800 .72rem var(--f-head); background: var(--leaf); color: #FFFFFF; transform: translateY(5px); }
.path-mini a { color: var(--ink); text-decoration: none; }
.path-mini a:hover { color: var(--brand); text-decoration: underline; }
.path-mini .is-current { font-weight: 700; color: var(--brand); }
.path-mini .is-current::before { background: var(--brand); color: var(--brand-ink); }
.path-mini .is-soon { color: var(--ink-3); }
.path-mini .is-soon::before { background: var(--line); color: var(--ink-3); }
.path-mini small { margin-left: auto; padding-left: 6px; font-size: .74rem; flex: none; }
.toc-mobile { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 0 18px; }
.toc-mobile summary { cursor: pointer; padding: 14px 0; font: 700 1rem var(--f-head); }
.toc-mobile ol { margin: 0 0 16px; padding-left: 1.3em; display: grid; gap: 6px; font-size: 1rem; }
.toc-mobile a { color: var(--ink-2); }
@media (min-width: 1081px) { .toc-mobile { display: none; } }
@media (max-width: 1080px) { .art-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; } .rail { position: static; max-height: none; overflow: visible; } .rail .toc { display: none; } }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-block: 8px 72px; }
.pager a { display: grid; gap: 6px; padding: 20px 22px; border: 2px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; color: var(--ink); }
.pager a:hover { border-color: var(--brand); color: var(--ink); }
.pager .k { font: 700 .78rem var(--f-head); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.pager b { font: 700 1.15rem/1.3 var(--f-head); }
.pager .next { text-align: right; grid-column: 2; }
@media (max-width: 620px) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: auto; text-align: left; } }

/* ---------- prose ---------- */
.prose { min-width: 0; max-width: 760px; }
.prose > * + * { margin-top: 1.15em; }
.prose > h2 { font-size: clamp(1.6rem, 1.25rem + 1.1vw, 2.1rem); margin-top: 2em; }
.prose > h3 { font-size: 1.3rem; margin-top: 1.8em; }
.prose > h2 + *, .prose > h3 + * { margin-top: .7em; }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 0; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--ink-3); }
.prose strong { font-weight: 700; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.table-scroll table { border-collapse: collapse; width: 100%; font-size: 1rem; line-height: 1.5; min-width: 560px; }
.table-scroll th, .table-scroll td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-scroll thead th { background: var(--sunk); font: 700 .9rem var(--f-head); color: var(--ink-2); }
.table-scroll tbody tr:last-child > * { border-bottom: 0; }
.table-scroll td:first-child { font-weight: 700; }

.why-open { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: var(--r); background: var(--energy-soft); }
.why-mark { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--sun); color: var(--ink); font: 800 1.6rem/1 var(--f-head); }
.why-open > div { display: grid; gap: 6px; min-width: 0; }
.why-k { font: 700 .78rem/1 var(--f-head); text-transform: uppercase; letter-spacing: .08em; color: var(--energy-ink); }
.prose .why-q { font: 700 1.4rem/1.22 var(--f-head); letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.prose .why-h { font-size: 1.04rem; color: var(--ink-2); }
@media (max-width: 560px) { .why-open { padding: 18px 16px; gap: 12px; } .why-mark { width: 38px; height: 38px; font-size: 1.3rem; border-radius: 12px; } .prose .why-q { font-size: 1.22rem; } }
.answer { background: var(--brand-soft); border-radius: var(--r); padding: 22px 24px; display: grid; gap: 10px; }
.answer-k { font: 700 .78rem/1 var(--f-head); text-transform: uppercase; letter-spacing: .08em; color: var(--brand); }
.answer p { font-size: 1.12rem; }

.eq { margin-inline: 0; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 20px 20px 22px; text-align: center; display: grid; gap: 10px; }
.eq-k { font: 700 .78rem/1 var(--f-head); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.eq-scroll { overflow-x: auto; overflow-y: hidden; padding-block: 4px; }
.eq-main { display: inline-block; font: 600 clamp(1.2rem, .95rem + 1.2vw, 1.8rem)/1.5 var(--f-head); white-space: nowrap; padding: 4px 4px 2px; }
.eq-arrow { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin-inline: .3em; line-height: 1; }
.eq-arrow small { font: 700 .48em/1.2 var(--f-body); color: var(--bio); white-space: nowrap; margin-bottom: 2px; }
.eq-word { color: var(--ink-2); font-size: 1rem; }

.diagram { margin-inline: 0; display: grid; gap: 12px; }
.dg-scroll { overflow-x: auto; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 16px; }
.diagram figcaption { font-size: .95rem; color: var(--ink-2); max-width: 64ch; }
.dg { display: block; width: 100%; height: auto; min-width: 520px; }
.dg-label { font: 700 17px var(--f-head); fill: var(--ink); }
.dg-label.e { fill: var(--energy-ink); }
.dg-sub { font: 400 14px var(--f-body); fill: var(--ink-2); }
.dg-arrow { fill: none; stroke: var(--ink-2); stroke-width: 2.5; stroke-linecap: round; }
.dg-arrow.e { stroke: var(--energy); }
.dg-head { fill: var(--ink-2); }
.dg-head.e { fill: var(--energy); }
.dg-sun { fill: var(--energy-soft); stroke: var(--energy); stroke-width: 3; }
.dg-ray { stroke: var(--energy); stroke-width: 3; stroke-linecap: round; }
.dg-leaf { fill: var(--bio-soft); stroke: var(--bio); stroke-width: 3; stroke-linejoin: round; }
.dg-stem { fill: none; stroke: var(--bio); stroke-width: 4; stroke-linecap: round; }
.dg-vein { fill: none; stroke: var(--bio); stroke-width: 2; stroke-linecap: round; opacity: .5; }
.dg-grana { fill: var(--bio); opacity: .75; }
.dg-chloro { fill: var(--bio-soft); stroke: var(--bio); stroke-width: 3; }
.dg-inner { fill: none; stroke: var(--bio); stroke-width: 1.5; opacity: .45; }
.dg-lam { stroke: var(--bio); stroke-width: 2; opacity: .6; }
.dg-mito { fill: var(--chemistry-soft); stroke: var(--chemistry); stroke-width: 3; }
.dg-crista { fill: none; stroke: var(--chemistry); stroke-width: 2.5; stroke-linejoin: round; }
.dg-small { font: 700 15px var(--f-head); fill: var(--ink); }
.dg-small.h, .dg-label.b { fill: var(--brand); }
.dg-arrow.b, .dg-arrow.h { stroke: var(--brand); }
.dg-head.b { fill: var(--brand); }
.dg-dash { fill: none; stroke: var(--ink-2); stroke-width: 2.5; stroke-dasharray: 6 5; stroke-linecap: round; }
.dg-node { stroke-width: 2.5; }
.dg-node.n1 { fill: var(--bio-soft); stroke: var(--bio); }
.dg-node.n2 { fill: var(--brand-soft); stroke: var(--brand); }
.dg-node.n3 { fill: var(--energy-soft); stroke: var(--energy); }
.dg-guard { fill: var(--bio-soft); stroke: var(--bio); stroke-width: 3; stroke-linejoin: round; }
.dg-pore { fill: var(--ink-3); opacity: .3; }
.dg-slit { stroke: var(--ink-2); stroke-width: 2; }
.dg-lead { fill: none; stroke: var(--ink-3); stroke-width: 1.5; }
.dg-mem { stroke-width: 2; }
.dg-mem.bio { fill: var(--bio-soft); stroke: var(--bio); }
.dg-mem.mito { fill: var(--chemistry-soft); stroke: var(--chemistry); }
.dg-protein { fill: var(--surface); stroke-width: 3; }
.dg-protein.bio { stroke: var(--bio); }
.dg-protein.mito { stroke: var(--chemistry); }
.dg-num { font: 800 26px var(--f-head); fill: var(--ink); }
.dg-carrier { fill: var(--energy-soft); stroke: var(--energy); stroke-width: 2.5; }
.dg-cell { fill: #FFFFFF; stroke: var(--bio); stroke-width: 2; }
.dg-cuticle { fill: var(--energy-soft); stroke: var(--energy); stroke-width: 1.5; }
.dg-cp { fill: var(--bio); opacity: .8; }
.dg-bundle { fill: var(--earth-soft); stroke: var(--earth); stroke-width: 2.5; }
.dg-xylem { fill: #FFFFFF; stroke: var(--physics); stroke-width: 2.5; }
.dg-phloem { fill: var(--chemistry-soft); stroke: var(--chemistry); stroke-width: 2; }
.dg-inner2 { fill: none; stroke: var(--bio); stroke-width: 2; }
.dg-starch { fill: #FFFFFF; stroke: var(--ink-3); stroke-width: 2; }
.dg-dna { fill: none; stroke: var(--chemistry); stroke-width: 2.5; stroke-linecap: round; }
.dg-ribo { fill: var(--ink-2); }
.dg-cyto { fill: var(--sunk); stroke: var(--line-2); stroke-width: 2; }

.callout { border-radius: var(--r); padding: 18px 22px; display: grid; gap: 8px; background: var(--energy-soft); }
.callout > * + * { margin-top: .5em; }
.callout-k { font: 700 .78rem/1 var(--f-head); text-transform: uppercase; letter-spacing: .08em; color: var(--energy-ink); }
.callout.mistake { background: var(--bad-soft); }
.callout.mistake .callout-k { color: var(--bad); }
.callout.note { background: var(--sunk); }
.callout.note .callout-k { color: var(--ink-2); }

/* ---------- quiz ---------- */
.quiz { background: var(--surface); border: 2px solid var(--line); border-radius: 24px; padding: 26px; margin-top: 2.4em !important; }
.quiz-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px 20px; margin-bottom: 22px; }
.quiz-head h2 { margin-top: 6px; font-size: clamp(1.45rem, 1.2rem + .8vw, 1.85rem); }
.quiz-score { font: 700 .92rem var(--f-head); color: var(--ink-2); background: var(--sunk); padding: 7px 14px; border-radius: 10px; }
.quiz-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.q { display: grid; gap: 12px; }
.q-text { font: 700 1.1rem/1.45 var(--f-head); }
.q-n { color: var(--ink-3); margin-right: 2px; }
.q-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .q-opts { grid-template-columns: 1fr; } .quiz, .balancer { padding: 20px 16px; } }
.opt { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; min-height: 54px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: 500 1rem/1.35 var(--f-body); cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); }
.opt-l { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--sunk); font: 800 .85rem var(--f-head); color: var(--ink-2); }
.opt:disabled { cursor: default; }
.opt:disabled:not(.is-right):not(.is-wrong) { opacity: .55; }
.opt.is-right { border-color: var(--leaf); background: var(--ok-soft); }
.opt.is-right .opt-l { background: var(--leaf); color: #FFFFFF; }
.opt.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.is-wrong .opt-l { background: var(--bad); color: var(--surface); }
.q-why { background: var(--sunk); border-radius: 12px; padding: 12px 16px; font-size: 1rem; }
.q[data-done="right"] .q-res { color: var(--ok); }
.q[data-done="wrong"] .q-res { color: var(--bad); }
.quiz-reset { margin-top: 24px; }

/* ---------- equation balancer ---------- */
.balancer { background: var(--surface); border: 2px solid var(--line); border-radius: 24px; padding: 26px; display: grid; gap: 14px; }
.balancer h3 { font-size: 1.4rem; }
.bal-help { color: var(--ink-2); font-size: 1rem; }
.bal-eq { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 14px 12px; padding: 20px 10px; border-radius: 16px; background: var(--sunk); border: 2px dashed var(--line-2); }
.balancer.is-done .bal-eq { border-color: var(--leaf); border-style: solid; background: var(--ok-soft); }
.bal-term { display: grid; justify-items: center; gap: 8px; }
.bal-step { display: inline-flex; align-items: center; border: 2px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--surface); }
.bal-btn { width: 40px; height: 40px; border: 0; background: none; color: var(--brand); font: 700 1.25rem/1 var(--f-head); cursor: pointer; }
.bal-btn:hover { background: var(--brand-soft); }
.bal-n { min-width: 30px; text-align: center; font: 800 1.15rem var(--f-head); font-variant-numeric: tabular-nums; }
.bal-f { font: 600 1.4rem var(--f-head); }
.bal-sep { font: 600 1.4rem var(--f-head); color: var(--ink-3); padding-bottom: 1px; }
.bal-sep.arrow { color: var(--ink); }
.table-scroll .bal-tally { min-width: 0; font-variant-numeric: tabular-nums; }
.bal-tally td, .bal-tally th { text-align: center !important; font-weight: 400 !important; }
.bal-tally tbody th { text-align: left !important; font-weight: 700 !important; }
.bal-tally thead th:first-child { text-align: left !important; }
.bal-tally tr.ok td:last-child { color: var(--ok); font-weight: 700 !important; }
.bal-tally tr.no td:last-child { color: var(--bad); font-weight: 700 !important; }
.bal-status { font: 700 1rem/1.4 var(--f-head); padding: 12px 16px; border-radius: 12px; background: var(--sunk); color: var(--ink-2); }
.bal-status.ok { background: var(--ok-soft); color: var(--ok); }
.bal-status.warn { background: var(--warn-soft); color: var(--energy-ink); }
.bal-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- step-through ---------- */
.stepper { display: grid; gap: 14px; }
.steps { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 12px; }
.steps > li { margin: 0 !important; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 20px 22px; display: grid; gap: 8px; }
.step-n { font: 800 .76rem/1 var(--f-head); text-transform: uppercase; letter-spacing: .08em; color: var(--bio); }
.steps h3 { font-size: 1.25rem; }
.steps p { color: var(--ink-2); }
.step-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; }
.step-facts div { background: var(--sunk); border-radius: 10px; padding: 6px 11px; font-size: .9rem; display: flex; gap: 6px; }
.step-facts dt { font-weight: 700; }
.step-facts dt::after { content: ":"; }
.step-facts dd { margin: 0; color: var(--ink-2); }
.step-nav { display: grid; gap: 6px; justify-items: start; }
.step-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.step-count { font: 700 .95rem var(--f-head); color: var(--ink-2); min-width: 7.5em; text-align: center; }

/* ---------- FAQ and sources ---------- */
.faq { margin-top: 2.4em !important; }
.faq h2 { font-size: clamp(1.6rem, 1.25rem + 1.1vw, 2.1rem); margin-bottom: .6em; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 40px 16px 0; font: 700 1.08rem/1.4 var(--f-head); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 8px; top: 12px; font: 500 1.5rem/1 var(--f-head); color: var(--brand); }
.faq details[open] summary::after { content: "−"; }
.faq-a { padding: 0 0 18px; color: var(--ink-2); display: grid; gap: .8em; }
.sources { font-size: .95rem; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 24px; margin-top: 3em !important; }
.sources h2 { font-size: 1.05rem; margin-bottom: 10px; }
.sources ul { padding-left: 1.2em; margin: 0; }

/* ---------- topic hub learning path ---------- */
.hub-body { max-width: 880px; padding-bottom: 72px; }
.lp { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 10px; }
.lp li { position: relative; margin: 0 !important; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 20px; border: 2px solid var(--line); border-radius: var(--r); background: var(--surface); }
.lp li.is-live:hover { border-color: var(--brand); }
.lp-n { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font: 800 1rem var(--f-head); background: var(--leaf); color: #FFFFFF; }
.lp h3 { font-size: 1.15rem; }
.lp h3 a { color: var(--ink); text-decoration: none; }
.lp h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.lp h3 a:hover { color: var(--brand); }
.lp .lp-why { font: 600 .98rem/1.35 var(--f-head); color: var(--energy-ink); margin-top: 4px; }
.lp p { font-size: .95rem; color: var(--ink-2); margin-top: 3px; }
.lp-meta { font-size: .86rem; color: var(--ink-3); white-space: nowrap; }
.lp li.is-soon { background: transparent; border-style: dashed; border-color: var(--line-2); padding-block: 12px; }
.lp li.is-soon .lp-n { background: var(--sunk); color: var(--ink-3); width: 34px; height: 34px; font-size: .9rem; justify-self: center; }
.lp li.is-soon h3 { color: var(--ink-2); font-weight: 600; font-size: 1.02rem; }
@media (max-width: 560px) { .lp li { grid-template-columns: 36px minmax(0, 1fr); gap: 4px 14px; } .lp-n { width: 36px; height: 36px; } .lp-meta { grid-column: 2; } }
.page-body { padding-bottom: 72px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* ---------- quick check ---------- */
.check { display: grid; gap: 12px; padding: 20px 22px; border: 2px solid var(--physics-soft); border-radius: var(--r); background: linear-gradient(var(--physics-soft), var(--physics-soft)) top / 100% 6px no-repeat, var(--surface); }
.check-k { font: 700 .78rem/1 var(--f-head); text-transform: uppercase; letter-spacing: .08em; color: var(--physics); }
.prose .check-q { font: 700 1.15rem/1.35 var(--f-head); color: var(--ink); }
.check-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.check-why { background: var(--sunk); border-radius: 12px; padding: 12px 16px; font-size: 1rem; }

/* ---------- tap-to-define words ---------- */
.term { display: inline; padding: 0; margin: 0; border: 0; background: none; font: inherit; color: inherit; cursor: help; text-decoration: underline dotted var(--brand); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.term:hover, .term[aria-expanded="true"] { color: var(--brand); background: var(--brand-soft); border-radius: 4px; }
.term-pop { position: absolute; z-index: 25; display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 2px solid var(--brand); box-shadow: var(--shadow-lg); font-size: .98rem; line-height: 1.45; color: var(--ink-2); }
.term-pop b { display: block; font: 700 1rem var(--f-head); color: var(--ink); }
.term-pop b::first-letter { text-transform: uppercase; }
.term-pop[hidden] { display: none; }

/* ---------- diagram self-test ---------- */
.dg-test { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.dg-test-status { font-size: .95rem; color: var(--ink-2); }
.diagram.is-testing .dg-scroll { border-color: var(--sun); }
text.dg-hidden { opacity: 0; }
.dg-chip { cursor: pointer; outline: none; }
.dg-chip rect { fill: var(--energy-soft); stroke: var(--energy); stroke-width: 2; stroke-dasharray: 5 3; }
.dg-chip text { font: 800 16px var(--f-head); fill: var(--energy-ink); }
.dg-chip:hover rect, .dg-chip:focus-visible rect { fill: var(--sun); stroke-dasharray: none; }
text.dg-right { fill: var(--ok) !important; }
text.dg-wrong { fill: var(--bad) !important; }
.dg-pick { position: absolute; z-index: 25; display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface); border: 2px solid var(--energy); box-shadow: var(--shadow-lg); }
.dg-pick[hidden] { display: none; }
.dg-pick-k { font: 700 .85rem var(--f-head); color: var(--energy-ink); }
.dg-pick-opt { min-height: 42px; padding: 8px 12px; text-align: left; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 600 .98rem var(--f-head); cursor: pointer; }
.dg-pick-opt:hover, .dg-pick-opt:focus-visible { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- key facts cheat sheet ---------- */
.sheet { display: grid; gap: 14px; padding: 24px; border-radius: var(--r); background: var(--bio-soft); border: 2px solid #C9EBD5; }
.sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet .sheet-head h2 { font-size: 1.5rem; margin-top: 6px; }
.sheet-title, .sheet-src { display: none; }
.sheet .sheet-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.sheet .sheet-list li { position: relative; margin: 0; padding-left: 30px; }
.sheet-list li::before { content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border-radius: 6px; background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
#print-root { display: none; }
@media print {
  html.print-sheet body > *:not(#print-root) { display: none !important; }
  html.print-sheet #print-root { display: block; }
  html.print-sheet .sheet { display: flex; flex-direction: column; gap: 14px; background: none; border: 2px solid #1FA35B; font: 400 1.1rem/1.55 var(--f-body); color: var(--ink); }
  html.print-sheet .sheet-head { order: 1; }
  html.print-sheet .sheet .sheet-head h2 { font-size: 1.1rem; margin: 0; color: var(--bio); text-transform: uppercase; letter-spacing: .06em; }
  html.print-sheet .sheet-list { order: 2; }
  html.print-sheet .sheet-src { order: 3; }
  html.print-sheet .sheet-print, html.print-sheet .eyebrow { display: none; }
  html.print-sheet .sheet-title { display: block; order: 0; font: 800 2rem/1.1 var(--f-head); letter-spacing: -.02em; }
  html.print-sheet .sheet-src { display: block; font-size: .85rem; color: #333; }
  html.print-sheet .sheet-list li::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .term { text-decoration: none; }
}

/* ---------- practice cards (quizzes, worksheets, lab) ---------- */
.practice-grid { list-style: none; margin: 0; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.practice-grid li { margin: 0 !important; padding: 0 !important; }
.practice-grid li::before { display: none; }
.practice-grid a { height: 100%; display: grid; align-content: start; gap: 8px; padding: 18px 20px; border: 2px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.practice-grid a:hover { border-color: var(--brand); transform: translateY(-2px); color: var(--ink); }
.practice-grid b { font: 700 1.12rem/1.25 var(--f-head); }
.pr-desc { font-size: .95rem; color: var(--ink-2); line-height: 1.45; }
.pr-type { justify-self: start; padding: 4px 10px; border-radius: 8px; font: 700 .76rem/1.2 var(--f-head); letter-spacing: .04em; text-transform: uppercase; background: var(--physics-soft); color: var(--physics); }
.pr-type.worksheet { background: var(--bio-soft); color: var(--bio); }
.pr-type.virtual { background: var(--energy-soft); color: var(--energy-ink); }
.practice-box { display: grid; gap: 12px; padding: 22px; border-radius: var(--r); background: var(--sunk); }
.prose .practice-box h2 { font-size: 1.4rem; margin: 0; }
.hub-practice { display: grid; gap: 14px; margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.hub-practice h2 { font-size: clamp(1.6rem, 1.25rem + 1.1vw, 2.1rem); }
.hub-practice > p:not(.eyebrow) { color: var(--ink-2); }
.rail-k2 { margin-top: 18px; }
.path-practice { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: .95rem; }
.path-practice a { color: var(--ink-2); text-decoration: none; }
.path-practice a:hover { color: var(--brand); }
.path-practice .is-current span { font-weight: 700; color: var(--ink); }

/* ---------- worksheets ---------- */
.ws { display: grid; gap: 18px; }
.ws-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ws-sheet { display: grid; gap: 14px; padding: 28px; border: 2px solid var(--line); border-radius: var(--r); background: var(--surface); }
.ws-head { display: grid; gap: 6px; padding-bottom: 14px; border-bottom: 2px solid var(--line); }
.ws-brand { font: 700 .8rem var(--f-head); letter-spacing: .06em; text-transform: uppercase; color: var(--bio); }
.prose .ws-head h2 { margin: 0; font-size: 1.7rem; }
.ws-name { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: .95rem; color: var(--ink-2); }
.ws-name span::after { content: ""; display: inline-block; width: 120px; margin-left: 8px; border-bottom: 1.5px solid var(--line-2); }
.prose .ws-sheet h3 { font-size: 1.2rem; margin-top: 14px; }
.prose .ws-bank { list-style: none; padding: 10px 12px !important; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; border: 2px dashed var(--line-2); border-radius: 12px; }
.prose .ws-bank li { margin: 0; padding: 4px 10px; border-radius: 8px; background: var(--sunk); font: 600 .92rem var(--f-head); }
.prose .ws-bank li::before { display: none; }
.ws-dg { margin: 0; overflow-x: auto; }
.ws-dg svg { display: block; width: 100%; height: auto; min-width: 520px; }
.prose .ws-list { display: grid; gap: 12px; }
.ws-gap.s { width: 44px; }
.ws-gap { display: inline-block; width: 130px; border-bottom: 1.5px solid var(--ink-3); vertical-align: -2px; }
.prose .ws-line { height: 28px; border-bottom: 1.5px solid var(--line-2); margin: 0; }
.ws-foot { font-size: .82rem; color: var(--ink-3); }
.ws-answers { border: 2px solid var(--line); border-radius: var(--r); padding: 14px 20px; }
.ws-answers summary { cursor: pointer; font: 700 1.02rem var(--f-head); color: var(--brand); }
.ws-key { display: grid; gap: 8px; margin-top: 14px; }
.prose .ws-key h3 { font-size: 1.2rem; margin: 0; }
.prose .ws-key h4 { font: 700 1rem var(--f-head); margin-top: 8px; }
@media print {
  @page { margin: 14mm; }
  html.print-sheet #print-root .ws-sheet { border: 0; padding: 0; gap: 10px; }
  html.print-sheet #print-root .ws-dg svg { min-width: 0; max-height: 105mm; }
  html.print-sheet #print-root h3 { break-after: avoid; }
  html.print-sheet #print-root .ws-list li, html.print-sheet #print-root .ws-dg { break-inside: avoid; }
  html.print-sheet #print-root .ws-key { margin: 0; }
  html.print-sheet #print-root { font-size: 11.5pt; }
  .term { text-decoration: none; }
}
}

/* ---------- virtual lab ---------- */
.lab { display: grid; gap: 14px; padding: 22px; border-radius: var(--r); border: 2px solid var(--energy-soft); background: linear-gradient(var(--energy-soft), var(--energy-soft)) top / 100% 6px no-repeat, var(--surface); }
.prose .lab h2 { margin: 0; font-size: 1.6rem; }
.lab-help { color: var(--ink-2); }
.lab-stage { position: relative; overflow: hidden; border-radius: 16px; aspect-ratio: 3 / 2; background: #F6F2EC; }
.prose .lab-stage img, .prose .lab-stage p { margin: 0; }
.lab-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lab-lamp { position: absolute; height: auto; transition: left .25s ease; z-index: 2; }
.lab-glow { position: absolute; width: 46%; aspect-ratio: 1.6; transform: translate(-12%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 236, 140, .75), rgba(255, 236, 140, .25) 55%, rgba(255, 236, 140, 0)); pointer-events: none; z-index: 1; mix-blend-mode: multiply; transition: left .25s ease, opacity .25s; }
.lab-bubbles { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.lab-bubbles span { position: absolute; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .95); background: radial-gradient(circle at 35% 35%, #fff, rgba(190, 225, 245, .55)); box-shadow: 0 0 0 1px rgba(60, 120, 160, .25); animation: lab-rise linear forwards; }
@keyframes lab-rise { from { transform: translate(0, 0); opacity: 1; } 90% { opacity: 1; } to { transform: translate(3px, var(--rise)); opacity: 0; } }
.lab-rate { position: absolute; left: 3%; top: 5%; z-index: 4; display: grid; gap: 2px; padding: 10px 16px; border-radius: 14px; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow); }
.lab-rate b { font: 800 2rem/1 var(--f-head); color: var(--bio); }
.lab-rate span { font: 600 .82rem var(--f-head); color: var(--ink-2); }
.lab-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lab-ctl { display: grid; gap: 8px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; font: 600 .92rem var(--f-head); color: var(--ink-2); }
.lab-ctl span { display: flex; justify-content: space-between; gap: 8px; }
.lab-ctl output { font-weight: 800; color: var(--ink); white-space: nowrap; }
.lab-ctl input[type="range"] { width: 100%; accent-color: var(--energy); min-height: 28px; }
.lab-ctl select { min-height: 40px; padding: 0 10px; border: 2px solid var(--line); border-radius: 10px; font: 600 .95rem var(--f-body); background: var(--surface); color: var(--ink); }
.prose .lab-limit { padding: 10px 14px; border-radius: 12px; background: var(--sunk); font-weight: 600; color: var(--ink); }
.lab-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lab-results { display: grid; gap: 16px; }
.lab-graph svg { max-width: 640px; }
.lab-table td, .lab-table th { text-align: center; }
.lab-empty td { color: var(--ink-3); font-size: .92rem; }
.lab-graph { margin: 0; display: grid; gap: 6px; }
.lab-graph svg { width: 100%; height: auto; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); }
.lab-graph figcaption { font-size: .85rem; color: var(--ink-3); }
.lg-axis { stroke: var(--ink-3); stroke-width: 1.5; }
.lg-grid { stroke: var(--line); stroke-width: 1; }
.lg-tick { font: 600 12px var(--f-head); fill: var(--ink-3); }
.lg-line { fill: none; stroke-width: 2.5; }
.lg-line.s0 { stroke: var(--leaf); } .lg-dot.s0 { fill: var(--leaf); }
.lg-line.s1 { stroke: var(--sky); } .lg-dot.s1 { fill: var(--sky); }
.lg-line.s2 { stroke: var(--energy); } .lg-dot.s2 { fill: var(--energy); }
.lg-line.s3 { stroke: var(--coral); } .lg-dot.s3 { fill: var(--coral); }
@media (max-width: 760px) { .lab-controls, .lab-results { grid-template-columns: 1fr; } .lab { padding: 16px; } .lab-rate b { font-size: 1.5rem; } .lab-rate { padding: 6px 10px; } }
.prose .lab-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font: 600 .88rem var(--f-head); color: var(--ink-2); }
.prose .lab-legend li { margin: 0; display: flex; align-items: center; gap: 6px; }
.prose .lab-legend li::before { display: none; }
.lab-legend i { width: 14px; height: 14px; border-radius: 50%; }
.lab-legend i.s0 { background: var(--leaf); } .lab-legend i.s1 { background: var(--sky); } .lab-legend i.s2 { background: var(--energy); } .lab-legend i.s3 { background: var(--coral); }

/* chlorophyll absorption spectrum */
.dg-axis { stroke: var(--ink-2); stroke-width: 2; }
.dg-curve { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.dg-curve.a { stroke: var(--bio); }
.dg-curve.b { stroke: var(--energy); stroke-dasharray: 9 6; }
.dg-green-band { fill: var(--bio-soft); opacity: .6; }

/* real photos with credits */
.photo { margin-inline: 0; display: grid; gap: 10px; }
.photo img { display: block; width: 100%; height: auto; border-radius: var(--r); border: 2px solid var(--line); background: var(--sunk); }
.photo.narrow { max-width: 460px; }
.photo figcaption { font-size: .95rem; color: var(--ink-2); max-width: 64ch; }
.photo-credit { display: block; margin-top: 4px; font-size: .82rem; color: var(--ink-3); }
.photo-credit a { color: inherit; }

/* plant and animal cell diagrams */
.dg-wall { fill: var(--earth-soft); stroke: var(--earth); stroke-width: 2.5; }
.dg-memb { fill: #F6FBF3; stroke: var(--bio); stroke-width: 2.5; }
.dg-memb.an { fill: #FFF8F0; stroke: var(--chemistry); }
.dg-vac { fill: var(--physics-soft); stroke: var(--physics); stroke-width: 2; }
.dg-nuc { fill: var(--brand-soft); stroke: var(--brand); stroke-width: 2.5; }
.dg-nucleolus { fill: var(--brand); opacity: .55; }
.dg-er { fill: none; stroke: var(--coral); stroke-width: 2.5; stroke-linecap: round; opacity: .85; }
.dg-golgi { fill: none; stroke: var(--energy); stroke-width: 5; stroke-linecap: round; }
.dg-lyso { fill: var(--bad-soft); stroke: var(--coral); stroke-width: 2; }
.dg-centriole { fill: var(--sunk); stroke: var(--ink-3); stroke-width: 2; }

/* 3D cell explorer placeholder (the explorer's own styles live in assets/cell3d/cell3d.css) */
.cell3d-slot { margin: 28px 0; min-height: 260px; border-radius: 18px; border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 40%, #fff 0%, #f3f9ff 55%, #e4f1fb 100%); display: grid; place-items: center; padding: 28px 20px; }
.cell3d-slot.cell3d { display: block; min-height: 0; padding: 16px; background: #fff; place-items: initial; }
.c3-ph { display: grid; justify-items: center; gap: 12px; text-align: center; max-width: 46ch; }
.c3-ph-k { font: 800 .78rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.c3-ph-t { margin: 0; color: var(--ink-2); }

/* ---------- revision notes (one-page sheets) ---------- */
.pr-type.notes { background: var(--brand-soft); color: var(--brand); }
.rev-eqs { display: grid; gap: 8px; }
.rev-eq { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 4px 12px; align-items: baseline; padding: 8px 12px; border-radius: 12px; background: var(--sunk); }
.rev-eq-k { font: 700 .78rem var(--f-head); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.rev-eq-v { font: 700 1.02rem var(--f-head); }
.rev-dgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.rev-dg { margin: 0; }
.rev-dg svg { display: block; width: 100%; height: auto; }
.rev-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rev-box { border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; break-inside: avoid; }
.prose .rev-box h3 { margin: 0 0 6px; font-size: 1.02rem; color: var(--bio); }
.prose .rev-box ul, .prose .rev-box ol { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; font-size: .95rem; }
.prose .rev-box li { margin: 0; }
.rev-box.warn { border-color: #F5C2B8; background: #FFF6F3; }
.prose .rev-box.warn h3 { color: #B4321F; }
.rev-check { grid-column: 1 / -1; }
.prose .rev-ans { margin: 8px 0 0; font-size: .85rem; color: var(--ink-2); }
@media (max-width: 640px) { .rev-grid { grid-template-columns: 1fr; } .rev-eq { grid-template-columns: 1fr; } }
@media print {
  html.print-sheet #print-root .rev-sheet { font-size: 9.6pt; line-height: 1.35; gap: 7px; }
  html.print-sheet #print-root .rev-sheet .ws-head { padding-bottom: 6px; gap: 2px; }
  html.print-sheet #print-root .rev-sheet .ws-head h2 { font-size: 1.45rem; }
  html.print-sheet #print-root .rev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  html.print-sheet #print-root .rev-box { padding: 6px 9px; border-radius: 9px; }
  html.print-sheet #print-root .rev-box h3 { font-size: 10.5pt; margin: 0 0 3px; }
  html.print-sheet #print-root .rev-box ul, html.print-sheet #print-root .rev-box ol { gap: 1px; font-size: 9.4pt; }
  html.print-sheet #print-root .rev-eq { padding: 4px 9px; }
  html.print-sheet #print-root .rev-eq-v { font-size: 10.5pt; }
  html.print-sheet #print-root .rev-dg svg { max-height: 52mm; }
  html.print-sheet #print-root .rev-box.warn { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Test me ---------- */
.prose .quiz-note { margin: 14px 0 0; font-size: .9rem; color: var(--ink-3); }
.testme { margin: 8px 0 36px; }
.testme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.testme-card { display: grid; gap: 10px; align-content: start; justify-items: start; padding: 22px; border: 2px solid var(--line); border-radius: 22px; background: var(--surface); }
.prose .testme-card p { margin: 0; }
.prose .testme-big { font: 800 1.3rem/1.25 var(--f-head); color: var(--ink); }
.tm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-chip { border: 2px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font: 700 .9rem var(--f-head); color: var(--ink-2); cursor: pointer; min-height: 40px; }
.tm-chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.testme-done { margin-top: 18px; }
.prose .testme-clear { margin-top: 14px; font-size: .9rem; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--ink-3); text-decoration: underline; cursor: pointer; }
.testme-loading { color: var(--ink-3); }
@media (max-width: 720px) { .testme-grid { grid-template-columns: 1fr; } }

/* revision notes: fit the printed sheet on one page */
@page rev { margin: 9mm 10mm; }
@media print {
  html.print-sheet #print-root .rev-sheet { page: rev; font-size: 9pt; gap: 5px; }
  html.print-sheet #print-root .rev-eqs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }
  html.print-sheet #print-root .rev-eq { grid-template-columns: 1fr; gap: 0; padding: 3px 8px; }
  html.print-sheet #print-root .rev-eq-k { font-size: 7pt; }
  html.print-sheet #print-root .rev-eq-v { font-size: 9.6pt; }
  html.print-sheet #print-root .rev-dg svg { max-height: 40mm; }
  html.print-sheet #print-root .rev-grid { gap: 5px; }
  html.print-sheet #print-root .rev-box { padding: 4px 8px; }
  html.print-sheet #print-root .rev-box h3 { font-size: 9.8pt; margin: 0 0 2px; }
  html.print-sheet #print-root .rev-box ul, html.print-sheet #print-root .rev-box ol { font-size: 8.8pt; line-height: 1.3; }
  html.print-sheet #print-root .rev-check ol { display: block; columns: 2; column-gap: 18px; }
  html.print-sheet #print-root .rev-check li { break-inside: avoid; margin-bottom: 1px; }
  html.print-sheet #print-root .rev-ans { margin-top: 3px; font-size: 8.4pt; }
  html.print-sheet #print-root .rev-sheet .ws-foot { font-size: 7.5pt; margin: 0; }
}

.nav a { white-space: nowrap; }
.rev-dg svg.dg, .rev-dg .dg { min-width: 0; width: 100%; }
