/* Prep Yourself, home page v8 + Class 10 page v2 + chapter page v2 (with Formulas & simulator)
   Layout: one 1200px grid. White and pale-blue sections alternate, with one navy band for mock tests.
   Every section opens the same way (small label, heading, short line). Classes are periodic-table
   cells because each class number is an atomic number (6 Carbon ... 10 Neon). */
:root {
  /* Colour */
  --brand: #03345D;            /* logo navy */
  --sun: #FC9802;              /* logo sun */
  --sun-deep: #E8700A;
  --gold: #FFB00D;
  --bg: #FFFFFF;
  --bg-tint: #F3F7FC;
  --bg-sun: #FFF5E6;
  --surface: #FFFFFF;
  --ink: #0E1C2F;
  --ink-soft: #4A5A72;
  --heading: #03345D;
  --line: #E1E8F1;
  --field-border: #03345D;
  --grid-line: rgba(3, 52, 93, 0.055);
  --accent-text: #B35C00;
  --highlight: rgba(252, 152, 2, 0.32);
  --focus: #E8700A;
  --ok: #15803D;
  --ok-bg: #E8F6ED;
  --bad: #B42318;
  --bad-bg: #FDECEA;
  --on-brand: #FFFFFF;
  --on-brand-soft: #C9D7EA;
  --on-brand-line: rgba(255, 255, 255, 0.24);
  --neon: #FFD27A;
  --neon-glow: rgba(252, 152, 2, 0.75);
  --electron: #1D6FD8;
  --violet: #7C3AED;
  --copper: #D27A3F;
  --metal: #B7C2D0;
  --shadow-sm: 0 1px 2px rgba(3, 52, 93, 0.07);
  --shadow: 0 2px 4px rgba(3, 52, 93, 0.05), 0 14px 34px rgba(3, 52, 93, 0.12);
  --wm-light: block;
  --wm-dark: none;

  /* Type: Lexend (designed for easy reading) for headings, Mukta for body text */
  --font-display: "Lexend", "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Mukta", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --fs-base: 1.0625rem;
  --fs-lead: 1.18rem;
  --fs-h3: 1.2rem;
  --fs-h2: clamp(1.75rem, 1.2rem + 1.9vw, 2.55rem);
  --fs-h1: clamp(2.3rem, 1.35rem + 3.7vw, 3.9rem);

  /* Shape and spacing */
  --radius: 18px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(48px, 7vw, 96px);
  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #061629;
    --bg-tint: #0A1F38;
    --bg-sun: #13233A;
    --surface: #0C2340;
    --ink: #E8EFF8;
    --ink-soft: #A3B6D0;
    --heading: #F2F6FB;
    --line: #1C3B62;
    --field-border: #3B6EA5;
    --grid-line: rgba(255, 255, 255, 0.045);
    --accent-text: #FFB547;
    --highlight: rgba(252, 152, 2, 0.38);
    --focus: #FFB00D;
    --ok: #4ADE80;
    --ok-bg: rgba(74, 222, 128, 0.12);
    --bad: #F87171;
    --bad-bg: rgba(248, 113, 113, 0.12);
    --electron: #7DB9FF;
    --violet: #C4A5FF;
    --copper: #D9894F;
    --metal: #5E7392;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 14px 34px rgba(0, 0, 0, 0.4);
    --wm-light: none;
    --wm-dark: block;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #061629;
  --bg-tint: #0A1F38;
  --bg-sun: #13233A;
  --surface: #0C2340;
  --ink: #E8EFF8;
  --ink-soft: #A3B6D0;
  --heading: #F2F6FB;
  --line: #1C3B62;
  --field-border: #3B6EA5;
  --grid-line: rgba(255, 255, 255, 0.045);
  --accent-text: #FFB547;
  --highlight: rgba(252, 152, 2, 0.38);
  --focus: #FFB00D;
  --ok: #4ADE80;
  --ok-bg: rgba(74, 222, 128, 0.12);
  --bad: #F87171;
  --bad-bg: rgba(248, 113, 113, 0.12);
  --electron: #7DB9FF;
  --violet: #C4A5FF;
  --copper: #D9894F;
  --metal: #5E7392;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 14px 34px rgba(0, 0, 0, 0.4);
  --wm-light: none;
  --wm-dark: block;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: var(--fs-base); line-height: 1.65;
  overflow-x: clip; -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p, figure, blockquote { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); color: var(--heading); margin: 0; text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 700; line-height: 1.08; letter-spacing: -0.025em; }
h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.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; }
.nowrap { white-space: nowrap; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px;
  background: var(--sun); color: var(--brand); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section-tint { background: var(--bg-tint); }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-soft); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 44px); }
.sh-main { display: grid; gap: 10px; max-width: 34rem; }
.sh-side { display: grid; gap: 16px; max-width: 34rem; }
@media (min-width: 960px) {
  .section-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 16px 56px; }
  .sh-side { justify-self: end; }
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px; padding: 0.55em 1.35em; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn-sun { background: var(--sun); color: var(--brand); }
.btn-sun:hover { background: var(--gold); }
.btn-outline { border-color: var(--field-border); color: var(--heading); background: transparent; }
.btn-outline:hover { background: var(--bg-tint); }
.btn-ghost { border-color: var(--on-brand-line); color: var(--on-brand); background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link { display: inline; font-weight: 700; color: var(--heading); text-decoration: none; justify-self: start; }
.text-link svg { display: inline-block; width: 18px; height: 18px; margin-left: 6px; vertical-align: -3px; color: var(--accent-text); transition: transform 0.15s ease; }
.text-link:hover { text-decoration: underline; text-decoration-color: var(--sun); text-underline-offset: 4px; }
.text-link:hover svg { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60;
  background: var(--surface); border-bottom: 1px solid var(--line); transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow); }
.hdr { display: flex; align-items: center; gap: 14px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-emblem { width: 42px; height: 42px; flex: none; }
.brand-wm { height: 28px; width: auto; }
.wm-light { display: var(--wm-light); }
.wm-dark { display: var(--wm-dark); }
.main-nav { display: none; align-items: center; gap: 2px; }
.main-nav > a, .nav-dd > summary {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px;
  color: var(--ink); font-weight: 500; text-decoration: none; cursor: pointer; list-style: none;
}
.nav-dd > summary::-webkit-details-marker { display: none; }
.main-nav > a:hover, .nav-dd > summary:hover, .nav-dd[open] > summary { background: var(--bg-tint); color: var(--heading); }
.nav-dd { position: relative; }
.caret { width: 18px; height: 18px; flex: none; transition: transform 0.2s ease; }
.nav-dd[open] .caret, .picker[open] .caret { transform: rotate(180deg); }
.nav-dd .dd-panel { position: absolute; left: 0; top: calc(100% + 10px); width: 360px; }
.nav-dd.wide .dd-panel { width: 400px; }
.hdr-actions { display: none; align-items: center; gap: 6px; }
.hdr-actions .login { padding: 10px 16px; border-radius: 999px; font-weight: 700; color: var(--heading); text-decoration: none; }
.hdr-actions .login:hover { background: var(--bg-tint); }
.hdr-actions .btn { min-height: 44px; padding: 0.45em 1.3em; }
.menu-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; cursor: pointer;
  background: var(--surface); color: var(--heading); border: 1.5px solid var(--line);
}
.menu-btn svg { width: 24px; height: 24px; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }
.mobile-menu { border-top: 1px solid var(--line); padding-block: 18px 24px; background: var(--surface); }
.mobile-menu .wrap { display: grid; gap: 18px; }
.mm-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.mm-classes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mm-classes a {
  display: grid; justify-items: center; padding: 8px 4px 10px; border-radius: 12px; text-decoration: none;
  border: 2px solid var(--field-border); color: var(--heading);
}
.mm-classes .n { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; }
.mm-classes .c { font-size: 0.72rem; color: var(--ink-soft); }
.mm-material { display: grid; gap: 2px; margin-top: -8px; }
.mm-material a { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-radius: 10px; color: var(--heading); font-weight: 500; text-decoration: none; }
.mm-material a:hover { background: var(--bg-tint); }
.mm-material svg { width: 22px; height: 22px; flex: none; color: var(--accent-text); }
.mm-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.mm-links a { color: var(--heading); font-weight: 500; font-size: 1.08rem; }
@media (min-width: 1040px) {
  .main-nav, .hdr-actions { display: flex; }
  .menu-btn, .mobile-menu { display: none !important; }
  .brand-wm { height: 32px; }
}

/* ---------- Dropdown panels (class picker, Classes and Study material menus) ---------- */
.dd-panel {
  z-index: 40; list-style: none; margin: 0; padding: 8px; display: grid; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.dd-panel a {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none;
}
.dd-panel a:hover, .dd-panel a:focus-visible { background: var(--bg-tint); }
.dd-panel .go { width: 20px; height: 20px; color: var(--ink-soft); }
.dd-panel a:hover .go { color: var(--accent-text); }
.dd-main { display: grid; min-width: 0; line-height: 1.3; }
.dd-main b { font-family: var(--font-display); font-weight: 600; color: var(--heading); }
.dd-main span { font-size: 0.92rem; color: var(--ink-soft); }
.dd-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-sun); color: var(--accent-text); }
.dd-ic svg { width: 22px; height: 22px; }
.dd-ic.premium { background: var(--brand); color: var(--gold); }
.badge {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; vertical-align: 2px;
  background: var(--sun); color: var(--brand); font-family: var(--font-body); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.el-mini {
  position: relative; width: 46px; height: 46px; border-radius: 9px; border: 2px solid var(--field-border);
  display: grid; place-items: center; padding-top: 6px; background: var(--surface);
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--heading);
}
.el-mini i { position: absolute; left: 5px; top: 2px; font-style: normal; font-size: 0.62rem; font-weight: 600; line-height: 1.2; color: var(--ink-soft); }
.el-mini.neon { background: var(--brand); border-color: var(--brand); color: var(--neon); text-shadow: 0 0 6px var(--neon-glow); }
.el-mini.neon i { color: var(--on-brand-soft); }

/* ---------- Class picker ---------- */
.picker-wrap { display: grid; gap: 10px; max-width: 32rem; position: relative; z-index: 20; }
.picker-label { font-weight: 700; font-size: 1.05rem; color: var(--heading); }
.picker { position: relative; }
.picker > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 8px 18px 8px 10px; border-radius: 18px;
  background: var(--surface); border: 2px solid var(--field-border); box-shadow: var(--shadow);
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--heading);
}
.picker > summary::-webkit-details-marker { display: none; }
.picker > summary:hover { border-color: var(--sun); }
.picker-ico { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--sun); color: var(--brand); }
.picker-ico svg { width: 24px; height: 24px; }
.picker-txt { flex: 1; min-width: 0; }
.picker .dd-panel { position: absolute; left: 0; right: 0; top: calc(100% + 8px); }

/* ---------- Hero ---------- */
.hero {
  position: relative; background-color: var(--bg-tint);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 34px 34px;
  padding-block: clamp(36px, 6vw, 76px) clamp(40px, 6vw, 88px);
}
.hero-grid { display: grid; gap: 36px; align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; max-width: 44rem; position: relative; z-index: 10; }
.chip-eyebrow {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: 0.9rem; font-weight: 700; color: var(--heading);
}
.chip-eyebrow .dot { width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--sun); box-shadow: inset -3px -1px 0 var(--sun-deep); }
.hero h1 { max-width: 15ch; }
.hl { background: linear-gradient(transparent 60%, var(--highlight) 60%, var(--highlight) 92%, transparent 92%); padding-inline: 0.06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero .lead { max-width: 36rem; }

/* ---------- Periodic table of classes ---------- */
.el-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.el-tile {
  display: grid; align-content: start; padding: 14px 16px 18px; border-radius: 16px; min-width: 0;
  background: var(--surface); border: 2px solid var(--field-border); color: var(--ink); text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.el-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--sun); }
.el-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.el-z { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--heading); }
.el-ch { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); text-align: right; }
.el-sym { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.9rem, 2.2rem + 2.4vw, 3.8rem); line-height: 1.05; color: var(--heading); text-align: center; margin-top: 6px; }
.el-name { text-align: center; font-size: 0.9rem; color: var(--ink-soft); }
.el-class { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; color: var(--heading); }
.el-book { font-size: 0.93rem; color: var(--ink-soft); line-height: 1.4; }
.el-tile.is-board { grid-column: 1 / -1; background: var(--brand); border-color: var(--brand); }
.el-tile.is-board .el-z, .el-tile.is-board .el-class { color: var(--on-brand); }
.el-tile.is-board .el-ch, .el-tile.is-board .el-name, .el-tile.is-board .el-book { color: var(--on-brand-soft); }
.el-tile.is-board .el-sym { color: var(--neon); text-shadow: 0 0 6px var(--neon-glow), 0 0 22px var(--neon-glow); }
.el-tile.is-board .el-class { border-top-color: var(--on-brand-line); }
.board-tag { display: inline-block; margin-top: 10px; padding: 2px 10px; border-radius: 999px; background: var(--sun); color: var(--brand); font-size: 0.8rem; font-weight: 700; justify-self: start; }
.el-note { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); font-size: 0.98rem; }
.el-note svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--accent-text); }
@media (min-width: 680px) {
  .el-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .el-tile.is-board { grid-column: span 2; }
}
@media (min-width: 1040px) {
  .el-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
  .el-tile.is-board { grid-column: auto; }
}

/* ---------- Study material ---------- */
.reaction { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--font-display); }
.r-term { padding: 5px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--heading); font-weight: 600; }
.r-op { font-weight: 700; color: var(--ink-soft); }
.r-arrow { display: inline-flex; flex-direction: column; align-items: center; min-width: 8em; margin-inline: 2px; }
.r-cond { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); line-height: 1.2; margin-bottom: 4px; white-space: nowrap; }
.r-cond.ghost { visibility: hidden; margin: 4px 0 0; }
.r-line { position: relative; display: block; width: 100%; height: 2px; background: var(--heading); }
.r-line::after { content: ""; position: absolute; right: 0; top: 50%; width: 10px; height: 10px; border-top: 2px solid var(--heading); border-right: 2px solid var(--heading); transform: translateY(-50%) rotate(45deg); }
.r-prod { padding: 5px 16px; border-radius: 999px; background: var(--sun); color: var(--brand); font-weight: 700; }
@media (min-width: 960px) { .reaction { justify-content: flex-end; } }

.res-grid { display: grid; gap: 16px; }
.res-card {
  display: grid; gap: 10px; align-content: start; padding: 24px; border-radius: var(--radius); min-width: 0;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.res-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--sun); }
.res-ic { width: 52px; height: 52px; margin-bottom: 4px; border-radius: 16px; display: grid; place-items: center; background: var(--bg-sun); color: var(--accent-text); }
.res-ic svg { width: 26px; height: 26px; }
.res-card p { color: var(--ink-soft); }
.res-more { display: block; margin-top: 4px; font-weight: 700; color: var(--heading); }
.res-more svg { display: inline-block; width: 18px; height: 18px; margin-left: 6px; vertical-align: -3px; color: var(--accent-text); transition: transform 0.15s ease; }
.res-card:hover .res-more svg { transform: translateX(3px); }
.res-card.premium { background: var(--brand); border-color: var(--brand); }
.res-card.premium h3 { color: var(--on-brand); }
.res-card.premium p { color: var(--on-brand-soft); }
.res-card.premium .res-ic { background: rgba(255, 255, 255, 0.1); color: var(--gold); }
.res-card.premium .res-more, .res-card.premium .res-more svg { color: var(--gold); }
@media (max-width: 679px) {
  .res-card { grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; row-gap: 6px; padding: 18px; }
  .res-card .res-ic { grid-row: 1 / span 3; width: 46px; height: 46px; margin-bottom: 0; }
  .res-card .res-ic svg { width: 24px; height: 24px; }
  .reaction { gap: 6px; font-size: 0.94rem; }
  .r-arrow { min-width: 7em; }
}
@media (min-width: 680px) { .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .res-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }

/* ---------- Mock tests (premium) ---------- */
.mock {
  background-color: var(--brand); color: var(--on-brand); padding-block: var(--section);
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
}
.mock-grid { display: grid; gap: 18px; }
.mock-copy { display: grid; gap: 18px; min-width: 0; }
.mock h2 { color: var(--on-brand); }
.mock .lead { color: var(--on-brand-soft); }
.premium-tag {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); color: var(--gold); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.premium-tag svg { width: 16px; height: 16px; }
.mock-list { list-style: none; display: grid; gap: 10px; }
.mock-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; color: var(--on-brand); }
.mock-list svg { width: 22px; height: 22px; margin-top: 2px; color: var(--gold); }
.mock .btn-row { margin-top: 4px; }
@media (min-width: 960px) {
  /* The three points sit on the right, where the sample test screen used to be */
  .mock-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); grid-template-areas: "copy list" "btns list"; gap: 24px 56px; align-items: center; }
  .mock-copy { grid-area: copy; }
  .mock .btn-row { grid-area: btns; align-self: start; margin-top: 0; }
  .mock-list {
    grid-area: list; gap: 18px; padding: 32px; border-radius: 22px; font-size: 1.08rem;
    background: rgba(255, 255, 255, 0.06); border: 1px solid var(--on-brand-line);
  }
}

/* ---------- Who it's for ---------- */
.aud-grid { display: grid; gap: 16px; }
.aud {
  display: grid; gap: 12px; align-content: start; padding: clamp(22px, 3vw, 28px); border-radius: var(--radius); min-width: 0;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.aud-ic { width: 52px; height: 52px; margin-bottom: 4px; border-radius: 16px; display: grid; place-items: center; }
.aud-ic svg { width: 26px; height: 26px; }
.aud.students .aud-ic { background: var(--sun); color: var(--brand); }
.aud.parents .aud-ic { background: var(--brand); color: var(--on-brand); }
.aud.teachers .aud-ic { background: var(--bg-sun); color: var(--accent-text); }
.aud p { color: var(--ink-soft); }
@media (max-width: 899px) {
  .aud { grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; row-gap: 6px; }
  .aud .aud-ic { grid-row: 1 / span 3; width: 46px; height: 46px; margin-bottom: 0; }
  .aud .aud-ic svg { width: 24px; height: 24px; }
}
@media (min-width: 900px) { .aud-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }

/* ---------- Closing call to action ---------- */
.cta-band { background: var(--bg-tint); border-top: 1px solid var(--line); padding-block: var(--section); }
.cta-grid { display: grid; gap: 24px; align-items: center; }
.cta-copy { display: grid; gap: 12px; max-width: 34rem; }
.cta-action { display: grid; gap: 14px; }
.cta-action .picker-wrap { max-width: none; }
@media (min-width: 960px) { .cta-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: 56px; } }

/* ---------- Inner placeholder pages ---------- */
.page-head { background: var(--bg-tint); border-bottom: 1px solid var(--line); padding-block: clamp(28px, 5vw, 56px); }
.page-head .wrap { display: grid; gap: 12px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.92rem; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.page-main { padding-block: clamp(28px, 5vw, 56px) clamp(56px, 8vw, 96px); display: grid; gap: 24px; justify-items: start; }
.wip { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 16px; background: var(--bg-sun); border: 1px solid var(--line); max-width: 46rem; }
.wip svg { width: 24px; height: 24px; flex: none; color: var(--accent-text); margin-top: 2px; }
.wip p { color: var(--ink); }
.ch-list { list-style: none; counter-reset: ch; display: grid; width: 100%; max-width: 46rem; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.ch-list li { counter-increment: ch; display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); font-weight: 500; color: var(--heading); }
.ch-list li:first-child { border-top: 0; }
.ch-list li::before { content: counter(ch); font-family: var(--font-display); font-weight: 700; color: var(--accent-text); }
.hub-classes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hub-classes .lbl { font-weight: 700; color: var(--heading); margin-right: 6px; }
.hub-classes .el-mini { width: 52px; height: 52px; font-size: 1.2rem; text-decoration: none; }
.hub-classes .el-mini:hover { border-color: var(--sun); }

/* ---------- Current page in menus ---------- */
.dd-panel a[aria-current="page"] { background: var(--bg-tint); }
.mm-classes a[aria-current="page"] { background: var(--sun); border-color: var(--sun); color: var(--brand); }
.mm-classes a[aria-current="page"] .c { color: var(--brand); }

/* ---------- Class page ---------- */
.class-head {
  background-color: var(--bg-tint);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 34px 34px; border-bottom: 1px solid var(--line);
  padding-block: clamp(24px, 4vw, 44px) clamp(32px, 5vw, 56px);
}
.class-head .wrap { display: grid; gap: 14px; justify-items: start; }
.ch-eyebrow { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.class-head h1 { font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.4rem); }
.class-head .lead { max-width: 40rem; }
.class-switch {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%; margin-top: 6px; padding: 5px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.cs-label { padding: 0 6px 0 12px; font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); }
.class-switch a {
  display: grid; place-items: center; min-width: 44px; height: 40px; padding: 0 10px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; color: var(--heading); text-decoration: none; font-variant-numeric: tabular-nums;
}
.class-switch a:hover { background: var(--bg-tint); }
.class-switch a[aria-current="page"] { background: var(--sun); color: var(--brand); }

.units { display: grid; gap: clamp(32px, 4vw, 44px); }
.unit { display: grid; gap: 14px; min-width: 0; }
.unit-head { display: grid; gap: 8px; align-content: start; }
.unit-head h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem); }
.unit-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; padding: 2px 12px; border-radius: 999px;
  background: var(--bg-tint); border: 1px solid var(--line); color: var(--heading); font-size: 0.85rem; font-weight: 700;
}
.tag.marks { background: var(--bg-sun); border-color: transparent; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.ch-rows { list-style: none; display: grid; gap: 10px; min-width: 0; }
.ch-row a {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 16px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  color: var(--ink); text-decoration: none; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.ch-row a:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--sun); }
.ch-num {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--bg-sun); color: var(--accent-text);
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums;
}
.ch-main { display: grid; gap: 2px; min-width: 0; }
.ch-main b { font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; line-height: 1.3; color: var(--heading); }
.inside {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: clamp(28px, 4vw, 40px);
  padding: 14px 18px; border-radius: 16px; background: var(--bg-tint); border: 1px solid var(--line);
}
.inside-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.inside-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.inside-list li { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--heading); }
.inside-list svg { width: 20px; height: 20px; flex: none; color: var(--accent-text); }
.ch-row .go { width: 22px; height: 22px; color: var(--ink-soft); transition: transform 0.15s ease; }
.ch-row a:hover .go { color: var(--accent-text); transform: translateX(3px); }
@media (max-width: 599px) {
  .ch-row a { gap: 12px; padding: 12px 14px; }
  .ch-num { width: 40px; height: 40px; font-size: 1.05rem; border-radius: 12px; }
}
@media (min-width: 960px) {
  .unit { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.5fr); gap: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
  .unit:first-child { padding-top: 0; border-top: 0; }
  .unit-head { position: sticky; top: calc(var(--header-h) + 24px); }
}

.promo {
  display: grid; gap: 20px; align-items: center; padding: clamp(24px, 4vw, 40px); border-radius: 24px;
  background-color: var(--brand); color: var(--on-brand);
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
}
.promo-copy { display: grid; gap: 12px; max-width: 40rem; min-width: 0; }
.promo h2 { color: var(--on-brand); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.promo-text { color: var(--on-brand-soft); }
@media (min-width: 900px) { .promo { grid-template-columns: minmax(0, 1fr) auto; gap: 40px; } }

/* ---------- Chapter page ---------- */
.chap-head {
  background-color: var(--bg-tint); border-bottom: 1px solid var(--line);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 34px 34px; padding-top: clamp(24px, 4vw, 44px);
}
.chap-head > .wrap { display: grid; gap: 12px; justify-items: start; padding-bottom: clamp(20px, 3vw, 28px); }
.chap-meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.chap-head h1 { font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.4rem); }
.chap-head .lead { max-width: 44rem; }
.tabs-wrap { background: var(--surface); border-top: 1px solid var(--line); }
.tabs { position: relative; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 14px 14px 12px; border-bottom: 3px solid transparent;
  color: var(--ink-soft); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.tabs a svg { width: 20px; height: 20px; flex: none; }
.tabs a:hover { color: var(--heading); }
.tabs a[aria-current="page"] { color: var(--heading); border-bottom-color: var(--sun); }
.tabs a[aria-current="page"] svg { color: var(--accent-text); }

/* Notes layout: contents on the left, notes on the right */
.notes-layout { display: grid; gap: 32px; padding-block: clamp(24px, 4vw, 44px) clamp(56px, 8vw, 96px); }
.toc-side { display: none; }
.toc-title { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.toc-list { list-style: none; display: grid; gap: 2px; }
.toc-list a, .toc-list .soon { display: grid; grid-template-columns: 1.9em minmax(0, 1fr); gap: 6px; padding: 8px 10px; border-radius: 10px; line-height: 1.35; }
.toc-list a { color: var(--heading); font-weight: 500; text-decoration: none; }
.toc-list a:hover { background: var(--bg-tint); }
.toc-list .soon { color: var(--ink-soft); }
.toc-list .soon em { grid-column: 2; font-style: normal; font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); opacity: 0.8; }
.tn { font-family: var(--font-display); font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.toc-top { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.toc-top summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  font-family: var(--font-display); font-weight: 600; color: var(--heading);
}
.toc-top summary::-webkit-details-marker { display: none; }
.toc-top summary span { margin-left: auto; font-family: var(--font-body); font-weight: 500; font-size: 0.92rem; color: var(--ink-soft); }
.toc-top[open] .caret { transform: rotate(180deg); }
.toc-top .toc-list { padding: 0 8px 10px; }
@media (min-width: 1040px) {
  .notes-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 56px; }
  .toc-side { display: block; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
  .toc-top { display: none; }
}

.notes { display: grid; gap: 28px; min-width: 0; max-width: 46rem; }
.topic { display: grid; gap: 16px; min-width: 0; scroll-margin-top: calc(var(--header-h) + 16px); }
.topic + .topic { padding-top: 28px; border-top: 1px solid var(--line); }
.topic h2 { display: flex; align-items: baseline; gap: 12px; font-size: clamp(1.45rem, 1.15rem + 1.2vw, 1.9rem); }
.topic h3 { font-size: 1.15rem; margin-top: 6px; }
.topic p, .topic li { line-height: 1.7; }
.topic ol, .topic ul { padding-left: 1.3em; display: grid; gap: 6px; }
.mv { font-style: italic; font-family: "Times New Roman", "Noto Serif", Georgia, serif; font-size: 1.08em; }
sup { font-size: 0.68em; line-height: 0; vertical-align: 0.6em; }
sub { font-size: 0.68em; line-height: 0; vertical-align: -0.25em; }

/* Stacked fraction: numerator over a bar over denominator */
.frac { display: inline-flex; flex-direction: column; align-items: stretch; vertical-align: middle; margin: 0 0.15em; line-height: 1.2; text-align: center; }
.frac > span { display: block; padding: 0 0.25em; }
.frac .fn { border-bottom: 1.5px solid currentColor; padding-bottom: 0.08em; }
.frac .fd { padding-top: 0.08em; }

/* Working aligned on the = sign */
.work {
  display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); column-gap: 0.55em; row-gap: 0.55em;
  align-items: center; font-size: 1.06rem; color: var(--heading); overflow-x: auto; max-width: 100%;
}
.w-l { text-align: right; }
.w-eq { text-align: center; }
.w-r { min-width: 0; }

.keybox { padding: 16px 20px; border-radius: 16px; background: var(--bg-sun); border-left: 5px solid var(--sun); display: grid; gap: 6px; }
.kb-label, .f-label, .rm-label, .ex-label, .qc-label {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text);
}
.keybox p:last-child { color: var(--ink); }
.formula { padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--field-border); display: grid; gap: 10px; }
.f-expr { font-size: 1.5rem; color: var(--heading); }
.f-where-label { font-size: 0.9rem; color: var(--ink-soft); margin-top: -2px; }
.f-where { list-style: none; padding: 0 !important; display: grid; gap: 6px !important; }
.f-where li { display: grid; grid-template-columns: var(--sym-w, 2em) minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding-top: 6px; border-top: 1px solid var(--line); }
.f-sym { color: var(--heading); font-size: 1.1rem; }
.f-what { color: var(--ink); }
.f-unit { color: var(--ink-soft); font-size: 0.92rem; text-align: right; }
.example { padding: 18px 20px; border-radius: 16px; background: var(--bg-tint); border: 1px solid var(--line); display: grid; gap: 12px; }
.ex-q { font-weight: 500; color: var(--heading); }
.ex-gf { margin: 0; display: grid; gap: 6px; }
.ex-gf div { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); gap: 8px; }
.ex-gf dt { font-weight: 700; color: var(--ink-soft); }
.ex-gf dd { margin: 0; min-width: 0; }
.gv { display: block; }
.ex-step { font-weight: 700; color: var(--ink-soft); }
.ex-ans { padding-top: 10px; border-top: 1px solid var(--line); font-weight: 700; color: var(--heading); }
.remember { padding: 16px 20px; border-radius: 16px; background: var(--surface); border: 1px dashed var(--sun); display: grid; gap: 8px; }
.remember ul { margin: 0; }
.qcheck { border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.qcheck summary { list-style: none; cursor: pointer; display: grid; gap: 4px; padding: 16px 20px; }
.qcheck summary::-webkit-details-marker { display: none; }
.qc-q { font-weight: 500; color: var(--heading); }
.qc-show { font-weight: 700; color: var(--accent-text); font-size: 0.95rem; }
.qcheck[open] .qc-show { display: none; }
.qc-a { padding: 0 20px 18px; display: grid; gap: 10px; }

/* Figures and circuit symbols */
.fig { margin: 0; display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.fig > svg { width: 100%; max-width: 560px; height: auto; justify-self: center; }
.fig figcaption { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.45; }
.fig .w { fill: none; stroke: var(--heading); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fig .w.thick { stroke-width: 5.5; stroke-linecap: butt; }
.fig .comp { fill: var(--surface); stroke: var(--heading); stroke-width: 2.4; }
.fig .term { fill: var(--surface); stroke: var(--heading); stroke-width: 2.2; }
.fig .dot { fill: var(--heading); }
.fig .t { fill: var(--heading); font-family: var(--font-body); font-size: 16px; font-weight: 500; }
.fig .t.sm { font-size: 13.5px; fill: var(--ink-soft); }
.fig .t.sym { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.fig .cur-h { fill: var(--sun-deep); }
.fig .cur-t { fill: var(--accent-text); font-weight: 700; }
.fig .el { fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-dasharray: 6 5; }
.fig .el-h { fill: var(--accent-text); }
.fig .el-t { fill: var(--accent-text); font-size: 14.5px; }
.fig .grid { stroke: var(--line); stroke-width: 1; }
.fig .line { fill: none; stroke: var(--sun-deep); stroke-width: 3; stroke-linecap: round; }
.fig .pt { fill: var(--sun); stroke: var(--heading); stroke-width: 1.5; }
.fig .mv-t { font-family: "Times New Roman", "Noto Serif", Georgia, serif; font-style: italic; font-weight: 400; font-size: 1.12em; }
.fig .sb { font-size: 0.72em; }
.fig .test { fill: none; stroke: var(--copper); stroke-width: 5; stroke-linecap: round; }
.fig .test-t { fill: var(--accent-text); font-weight: 700; }
.fig .brk { fill: none; stroke: var(--ink-soft); stroke-width: 1.4; }
.fig .case { fill: var(--bg-tint); stroke: var(--heading); stroke-width: 2; }
.fig .cap { fill: var(--metal); stroke: var(--heading); stroke-width: 2; }
.fig .fuse-w { fill: none; stroke: var(--sun-deep); stroke-width: 2.4; }
.fig .lead { fill: none; stroke: var(--ink-soft); stroke-width: 1.3; }
.fig .plate { fill: var(--surface); }
.fig .plate-hd { fill: var(--brand); }
.fig .plate-line { fill: none; stroke: var(--heading); stroke-width: 2; }
.fig .t.plate-title { fill: #FFFFFF; font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.fig .t.pw { fill: var(--accent-text); font-size: 20px; }
.fig > svg.narrow { max-width: 380px; }
.fig .water { fill: var(--electron); fill-opacity: 0.14; }
.fig .mk { fill: var(--sun); stroke: var(--heading); stroke-width: 1.5; }
.fig .t.mk-t { fill: var(--brand); font-family: var(--font-display); font-weight: 700; font-size: 13px; }
.fig .wline { fill: none; stroke: var(--electron); stroke-width: 1.5; }
.fig .beaker { fill: none; stroke: var(--heading); stroke-width: 2.4; stroke-linejoin: round; }
.fig .thermo { fill: var(--surface); stroke: var(--heading); stroke-width: 1.6; }
.fig .thermo-b { fill: var(--bad); stroke: var(--heading); stroke-width: 1.6; }
.fig .merc { fill: none; stroke: var(--bad); stroke-width: 3; }
.sym-grid { list-style: none; padding: 0 !important; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px !important; }
.sym-card { display: grid; gap: 4px; align-content: start; padding: 12px; border-radius: 12px; background: var(--bg-tint); }
.sym-card svg { width: 100%; max-width: 150px; height: auto; justify-self: center; }
.sym-card b { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; color: var(--heading); line-height: 1.3; }
.sym-card span { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.4; }
@media (min-width: 640px) { .sym-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.later { padding: 18px 20px; border-radius: 16px; background: var(--bg-tint); border: 1px dashed var(--line) !important; }
.later-title { font-weight: 700; color: var(--heading); }
.later-list { list-style: none; padding: 0 !important; display: grid; gap: 4px !important; }
.later-list li { display: grid; grid-template-columns: 1.9em minmax(0, 1fr); color: var(--ink-soft); }

.cta-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 18px;
  background: var(--brand); color: var(--on-brand); text-decoration: none; transition: transform 0.15s ease;
}
.cta-card:hover { transform: translateY(-2px); }
.cta-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--sun); color: var(--brand); }
.cta-ic svg { width: 24px; height: 24px; }
.cta-txt { display: grid; gap: 2px; min-width: 0; }
.cta-txt b { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.cta-txt span { color: var(--on-brand-soft); font-size: 0.95rem; line-height: 1.4; }
.cta-card .go { width: 22px; height: 22px; color: var(--gold); }

.pager { display: grid; gap: 10px; }
.pager a { display: grid; gap: 2px; padding: 14px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.pager a:hover { border-color: var(--sun); }
.pager .k { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.pager .v { font-weight: 600; color: var(--heading); line-height: 1.35; }
@media (min-width: 700px) { .pager { grid-template-columns: 1fr 1fr; } .pager .next { text-align: right; grid-column: 2; } }

/* Tab pages (solutions, exemplar, quiz, important questions) */
.tab-main { display: grid; gap: 28px; padding-block: clamp(24px, 4vw, 44px) clamp(56px, 8vw, 96px); max-width: calc(52rem + 2 * var(--gutter)); }
.tab-intro { max-width: 44rem; }
.qset { display: grid; gap: 14px; }
.qset-head { display: grid; gap: 4px; }
.qset-head h2 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem); }
.qset-head p { color: var(--ink-soft); }
.qa-list, .iq-list { list-style: none; display: grid; gap: 12px; }
.qa, .iq { display: grid; gap: 12px; padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.qa-q, .iq-q { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; font-weight: 600; color: var(--heading); line-height: 1.45; }
.qa-n {
  display: inline-grid; place-items: center; min-width: 38px; height: 30px; padding: 0 8px; border-radius: 9px;
  background: var(--bg-sun); color: var(--accent-text); font-family: var(--font-display); font-weight: 700; font-size: 0.92rem;
}
.qa-a { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); min-width: 0; }
.qa-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ok); }
.qa-text { min-width: 0; }
.qa-text .qp { display: block; margin-top: 6px; }
.qa-text .mcq { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); align-items: center; gap: 6px 28px; margin-top: 10px; font-weight: 500; }
@media (min-width: 640px) { .qa-text .mcq { grid-template-columns: repeat(4, max-content); gap: 6px 36px; } }
.qa-text .mcq.col { grid-template-columns: minmax(0, 1fr); }
.qa-text .table-wrap { margin: 10px 0 4px; font-weight: 500; }
.utable.dt th, .utable.dt td { padding: 8px 12px; text-align: center; white-space: nowrap; }
.utable.dt tbody th { text-align: left; background: var(--bg-tint); }
.qa-pick { font-weight: 700; color: var(--ok); }
.qa-a ol, .qa-a ul { padding-left: 1.3em; display: grid; gap: 6px; }
.dt-cols { display: none; max-width: 260px; }
@media (max-width: 479px) { .dt-rows { display: none; } .dt-cols { display: block; } }
.fig > svg.cct { max-width: 440px; }
@media (max-width: 559px) { .fig svg.graph .t.sm { font-size: 18px; } }
@media (max-width: 559px) { .fig svg.cct .t { font-size: 19px; } .fig svg.cct .t.sm { font-size: 16px; } }
.qa-a .fig { margin: 2px 0; }
.fig > svg.net { max-width: 400px; }
.iq-a summary { cursor: pointer; font-weight: 700; color: var(--accent-text); list-style: none; }
.iq-a summary::-webkit-details-marker { display: none; }
.iq-a summary::before { content: "+ "; }
.iq-a[open] summary::before { content: "− "; }
.iq-a > div { display: grid; gap: 10px; padding-top: 12px; margin-top: 10px; border-top: 1px solid var(--line); }
.iq-a ol { padding-left: 1.3em; display: grid; gap: 6px; }

.empty-card { display: grid; gap: 12px; justify-items: start; padding: clamp(24px, 4vw, 40px); border-radius: 20px; background: var(--surface); border: 1px dashed var(--line); }
.empty-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--bg-sun); color: var(--accent-text); }
.empty-ic svg { width: 28px; height: 28px; }
.empty-card p { color: var(--ink-soft); max-width: 40rem; }

/* Practice quiz */
.quiz { display: grid; gap: 16px; }
.quiz-list { list-style: none; display: grid; gap: 14px; }
.q { display: grid; gap: 12px; padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.q-text { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; font-weight: 600; color: var(--heading); line-height: 1.45; }
.q-n {
  display: inline-grid; place-items: center; min-width: 32px; height: 30px; border-radius: 9px;
  background: var(--bg-sun); color: var(--accent-text); font-family: var(--font-display); font-weight: 700; font-size: 0.92rem;
}
.q-options { display: grid; gap: 8px; }
@media (min-width: 760px) { .q-options { grid-template-columns: 1fr 1fr; } }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 8px 14px; border-radius: 12px; cursor: pointer;
  background: var(--bg); color: var(--ink); border: 1.5px solid var(--line); font: inherit; font-size: 1rem; line-height: 1.35; text-align: left;
}
.opt:hover:not(:disabled) { border-color: var(--sun); }
.opt:disabled { cursor: default; }
.opt-key { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-tint); color: var(--heading); font-weight: 700; font-size: 0.9rem; }
.opt.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.opt.is-correct .opt-key { background: var(--ok); color: var(--surface); }
.opt.is-wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt.is-wrong .opt-key { background: var(--bad); color: var(--surface); }
.q-feedback { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; }
.q-feedback.ok { background: var(--ok-bg); }
.q-feedback.bad { background: var(--bad-bg); }
.q-feedback .fb-title { font-weight: 700; color: var(--heading); }
.quiz-score {
  position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  padding: 14px 18px; border-radius: 18px; background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow);
}
.quiz-score p { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.quiz-score b { color: var(--gold); font-family: var(--font-display); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.quiz-done { flex-basis: 100%; order: 3; color: var(--on-brand-soft); }
.quiz-score .btn { min-height: 42px; padding: 0.4em 1.1em; }

/* Notes: link to the formula sheet, and the simulator call to action */
.jump-link {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  color: var(--heading); font-weight: 600; line-height: 1.4; text-decoration: none; transition: border-color 0.15s ease;
}
.jump-link:hover { border-color: var(--sun); }
.jump-link svg { width: 22px; height: 22px; color: var(--accent-text); }
.jump-link .go { width: 20px; height: 20px; transition: transform 0.15s ease; }
.jump-link:hover .go { transform: translateX(3px); }
.cta-card.sim-cta { background: var(--bg-sun); color: var(--heading); border: 1px solid var(--line); }
.cta-card.sim-cta .cta-txt span { color: var(--ink-soft); }
.cta-card.sim-cta .go { color: var(--accent-text); }

/* Formulas & simulator tab */
.tab-main.wide { max-width: var(--wrap); }
.onpage { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.onpage-label { margin-right: 4px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.onpage a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--heading); font-weight: 700; text-decoration: none;
}
.onpage a:hover { border-color: var(--sun); background: var(--bg-tint); }
.units-sec, .sim { padding-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--line); min-width: 0; }
.fsheet { min-width: 0; }

/* Formula cards: stacked on phones; formula beside its symbols on wider screens; two per row on large screens */
.fs-cards { display: grid; gap: 16px; }
@media (min-width: 1160px) { .fs-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
.fcard {
  display: grid; gap: 12px; align-content: start; padding: 20px; border-radius: var(--radius); min-width: 0;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.fc-topic { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); line-height: 1.45; }
.fc-topic a { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.fc-topic a:hover { text-decoration-style: solid; }
.fcard h3 { font-size: 1.15rem; }
.fc-expr {
  display: grid; place-items: center; min-height: 88px; padding: 12px 14px; border-radius: 14px; overflow-x: auto;
  background: var(--bg-tint); color: var(--heading); font-size: clamp(1.35rem, 1.2rem + 0.8vw, 1.55rem); line-height: 1.3; text-align: center;
}
.fc-expr > span { white-space: nowrap; }
.fc-syms { list-style: none; display: grid; gap: 6px; }
.fc-syms li { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding-top: 6px; border-top: 1px solid var(--line); }
.fc-note { font-size: 0.95rem; line-height: 1.55; color: var(--ink-soft); }
@media (min-width: 600px) {
  .fcard {
    grid-template-columns: minmax(min-content, 0.85fr) minmax(0, 1fr); column-gap: 22px;
    grid-template-areas: "topic topic" "name name" "expr syms" "note note";
  }
  .fc-topic { grid-area: topic; }
  .fcard h3 { grid-area: name; margin-top: -4px; }
  .fc-expr { grid-area: expr; }
  .fc-syms { grid-area: syms; align-self: center; }
  .fc-syms li:first-child { padding-top: 0; border-top: 0; }
  .fc-note { grid-area: note; }
}

/* Units table and prefixes */
.units-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 960px) { .units-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; } }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.utable { width: 100%; border-collapse: collapse; }
.utable th, .utable td { padding: 11px 16px; text-align: left; vertical-align: middle; border-top: 1px solid var(--line); }
.utable thead th { border-top: 0; background: var(--bg-tint); color: var(--heading); font-size: 0.9rem; font-weight: 700; }
.utable td { color: var(--ink); }
.utable .c { text-align: center; }
.utable tbody th { text-align: left; font-weight: 700; color: var(--heading); }
.tnote { font-size: 0.92rem; color: var(--ink-soft); margin-top: -6px; }
@media (max-width: 599px) {
  .utable th, .utable td { padding: 10px 7px; }
  .utable th:first-child, .utable td:first-child { padding-left: 14px; }
  .utable th:last-child, .utable td:last-child { padding-right: 14px; }
}
.prefix-box { display: grid; gap: 14px; padding: 20px; border-radius: 16px; background: var(--bg-tint); border: 1px solid var(--line); }
.prefix-box h3 { font-size: 1.1rem; }
.prefixes { list-style: none; display: grid; gap: 10px; }
@media (min-width: 480px) { .prefixes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prefixes li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); min-width: 0;
}
.prefixes b { font-family: var(--font-display); font-weight: 600; color: var(--heading); }
.pf-sym { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; line-height: 1; color: var(--accent-text); }
.pf-val { color: var(--heading); font-weight: 600; }
.pf-eg { grid-column: 1 / -1; font-size: 0.9rem; color: var(--ink-soft); }

/* Ohm's law lab */
.sim-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .sim-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 20px; } }
.sim-panel {
  display: grid; gap: 14px; align-content: start; min-width: 0; padding: clamp(12px, 2.4vw, 22px); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.sim-panel h3 { font-size: 1.1rem; }
.sim-circuit {
  background-color: var(--bg-tint);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
}
.sim-circuit > svg { width: 100%; max-width: 480px; height: auto; justify-self: center; }
@media (min-width: 900px) { .sim-circuit { align-content: center; } }
.sim svg .w { fill: none; stroke: var(--heading); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sim svg .w.thick { stroke-width: 5.5; stroke-linecap: butt; }
.sim svg .comp, .sim svg .term { fill: var(--surface); stroke: var(--heading); stroke-width: 2.4; }
.sim svg .dot { fill: var(--heading); }
.sim svg .t { fill: var(--heading); font-family: var(--font-body); font-size: 16px; font-weight: 500; }
.sim svg .t.sym { font-family: var(--font-display); font-weight: 700; }
.sim svg .t.read { fill: var(--accent-text); font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.sim svg .cur-h { fill: var(--sun-deep); }
.sim svg .mv-t { font-family: "Times New Roman", "Noto Serif", Georgia, serif; font-style: italic; font-weight: 400; font-size: 1.12em; }
.sim .glow { fill: var(--sun); opacity: 0; transition: opacity 0.25s ease; }
.sim .e-dot { fill: var(--electron); }
.sim #sim-electrons { pointer-events: none; }
.sim .hit { fill: transparent; cursor: pointer; }
@media (max-width: 559px) {
  .sim-circuit svg .t { font-size: 19px; }
  .sim-circuit svg .t.read { font-size: 20px; }
}
.sim-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.92rem; line-height: 1.4; color: var(--ink-soft); }
.sim-legend span { display: inline-flex; align-items: center; gap: 8px; }
.sim-legend i { display: inline-block; flex: none; }
.lg-e { width: 10px; height: 10px; border-radius: 50%; background: var(--electron); }
.lg-c { width: 0; height: 0; border-left: 11px solid var(--sun-deep); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.sim-readings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.sim-readings div { display: grid; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.sim-readings dt { font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); }
.sim-readings dd {
  margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 1rem + 0.6vw, 1.35rem);
  color: var(--heading); font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* Controls */
.ctl { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ctl-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ctl label, .ctl legend { font-weight: 700; color: var(--heading); }
.ctl legend { padding: 0; margin-bottom: 8px; }
.ctl output { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.ctl-scale { display: flex; justify-content: space-between; margin-top: -4px; font-size: 0.85rem; color: var(--ink-soft); }
.sim input[type="range"] {
  --fill: 50%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 34px; margin: 0; background: transparent; cursor: pointer;
}
.sim input[type="range"]:focus { outline: none; }
.sim input[type="range"]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--sun) 0 var(--fill), var(--line) var(--fill) 100%);
}
.sim input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--sun-deep); box-shadow: var(--shadow-sm);
}
.sim input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: var(--line); }
.sim input[type="range"]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--sun); }
.sim input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 3px solid var(--sun-deep); box-shadow: var(--shadow-sm);
}
.sim input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--focus); }
.sim input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--focus); }
.chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.chip { position: relative; display: grid; min-width: 0; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: grid; place-items: center; min-height: 46px; padding: 6px 4px; border-radius: 12px; white-space: nowrap;
  border: 1.5px solid var(--field-border); background: var(--surface); color: var(--heading);
  font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums;
}
.chip:hover span { border-color: var(--sun); }
.chip input:checked + span { background: var(--sun); border-color: var(--sun); color: var(--brand); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.sim-switch {
  justify-self: start; display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 18px 6px 8px;
  border-radius: 999px; border: 1.5px solid var(--field-border); background: var(--surface); color: var(--heading);
  font: inherit; font-weight: 700; cursor: pointer;
}
.sim-switch:hover { border-color: var(--sun); }
.sw-track { position: relative; flex: none; width: 52px; height: 30px; border-radius: 999px; background: var(--line); transition: background-color 0.2s ease; }
.sw-knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s ease; }
.sim-switch[aria-pressed="true"] .sw-track { background: var(--ok); }
.sim-switch[aria-pressed="true"] .sw-knob { transform: translateX(22px); }
.sim-switch[aria-pressed="true"] b { color: var(--ok); }
.sim-switch[aria-pressed="false"] b { color: var(--bad); }
.sim-work-box { display: grid; gap: 8px; align-content: start; min-height: 160px; padding: 14px 16px; border-radius: 14px; background: var(--bg-sun); }
#sim-work { display: grid; gap: 8px; min-width: 0; }
#sim-work .work { font-size: 1.12rem; }
#sim-work p { line-height: 1.5; color: var(--ink); }
.sim-actions { display: grid; gap: 10px; }
.sim-msg { min-height: 3em; font-size: 0.95rem; line-height: 1.5; color: var(--ink-soft); }

/* Graph and table */
.sim-graph svg { width: 100%; max-width: 520px; height: auto; justify-self: center; }
#sim-plot .grid { stroke: var(--line); stroke-width: 1; }
#sim-plot .axis { fill: none; stroke: var(--heading); stroke-width: 1.8; }
#sim-plot .tick { fill: var(--ink-soft); font-family: var(--font-body); font-size: var(--fs-tick, 13px); }
#sim-plot .ax-t { fill: var(--heading); font-family: var(--font-body); font-size: var(--fs-title, 13.5px); font-weight: 700; }
#sim-plot .fit { fill: none; stroke: var(--c); stroke-width: 2.6; stroke-linecap: round; }
#sim-plot .pt { fill: var(--c); stroke: var(--surface); stroke-width: 2; }
#sim-plot .live { fill: none; stroke: var(--heading); stroke-width: 2; stroke-dasharray: 4 3; }
.s0 { --c: var(--sun-deep); }
.s1 { --c: var(--electron); }
.s2 { --c: var(--ok); }
.s3 { --c: var(--violet); }
.sw { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--heading)); }
.sw.live { background: transparent; border: 2px dashed var(--heading); }
.sg-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.92rem; color: var(--ink-soft); }
.sg-legend li { display: inline-flex; align-items: center; gap: 8px; }
.sim-table th, .sim-table td { padding: 9px 10px; text-align: center; font-variant-numeric: tabular-nums; }
.sim-table .rn { display: inline-flex; align-items: center; gap: 8px; }
.sim-table .empty td { padding: 18px 12px; color: var(--ink-soft); }
.sg-note { font-size: 0.95rem; line-height: 1.6; color: var(--ink-soft); }
.sim-try { display: grid; gap: 8px; max-width: 52rem; margin-top: 20px; padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px dashed var(--sun); }
.sim-try ol { display: grid; gap: 6px; padding-left: 1.3em; }

/* ---------- Follow links (YouTube, Instagram) ---------- */
.social { display: flex; flex-wrap: wrap; gap: 10px; }
.social a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); color: var(--heading); font-weight: 700; text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.social a:hover { background: var(--bg-tint); border-color: var(--sun); }
.social svg { width: 20px; height: 20px; flex: none; }
.social-label { margin-top: 6px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand); color: var(--on-brand-soft); padding-block: 56px 28px; }
.ft-grid { display: grid; gap: 32px; }
.ft-brand { display: grid; gap: 14px; max-width: 24rem; align-content: start; }
.ft-brand .brand { margin-right: 0; justify-self: start; }
.ft-brand .brand-wm { height: 30px; }
.ft-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
.site-footer h2 { font-family: var(--font-body); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { color: var(--on-brand); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.site-footer .social a { border-color: var(--on-brand-line); color: var(--on-brand); }
.site-footer .social a:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--gold); text-decoration: none; }
.site-footer .social svg { color: var(--gold); }
.ft-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--on-brand-line); display: grid; gap: 6px; font-size: 0.92rem; }
@media (min-width: 720px) { .ft-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .ft-grid { grid-template-columns: 1.1fr 2fr; gap: 48px; } }

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

/* Figures that belong to a question (shown full width under the question), and figures made of several small circuits */
.qa-fig .fig { margin: 0; }
.fig > svg.mid { max-width: 360px; }
.fig-parts { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 22px; }
.fig-parts.p4 { max-width: 560px; justify-self: center; }
.fig-part { flex: 1 1 210px; max-width: 250px; display: grid; justify-items: center; gap: 4px; min-width: 0; }
.fig-part > svg { width: 100%; height: auto; }
.fig-part > span { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--heading); }
.fig .dotted { fill: none; stroke: var(--heading); stroke-width: 2.4; stroke-dasharray: 2.5 4; }

/* Important questions: skill tag, assertion-reason options, case-based questions */
.iq-text { min-width: 0; }
.iq-tag { display: block; width: max-content; max-width: 100%; margin-bottom: 8px; padding: 2px 10px; border-radius: 999px; background: var(--bg-tint); border: 1px solid var(--line); color: var(--ink-soft); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.iq-text .qp { display: block; margin-top: 6px; }
.iq-text .mcq { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); align-items: center; gap: 6px 28px; margin-top: 10px; font-weight: 500; }
@media (min-width: 640px) { .iq-text .mcq { grid-template-columns: repeat(4, max-content); gap: 6px 36px; } }
.iq-text .mcq.col { grid-template-columns: minmax(0, 1fr); }
.iq-text .table-wrap, .iq-body .table-wrap { margin: 10px 0 4px; font-weight: 500; }
.iq-note { padding: 14px 16px; border-radius: 14px; background: var(--bg-tint); border: 1px solid var(--line); display: grid; gap: 8px; }
.ar-opts { list-style: none; display: grid; gap: 4px; padding: 0; }
.ar-opts li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); }
.ar-opts li span { font-weight: 700; color: var(--heading); }
.iq-body { display: grid; gap: 12px; min-width: 0; }
.iq-body .fig { margin: 0; }
.iq-sub { list-style: none; display: grid; gap: 10px; padding: 0; }
.iq-sub li { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-weight: 600; color: var(--heading); line-height: 1.45; }
.iq-sub .iq-mk { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.iq-sub li.iq-or { display: block; text-align: center; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.12em; color: var(--accent-text); }
.dt-cols.wide { max-width: none; }

/* Important questions: what the board asks most */
.iq-focus { display: grid; gap: 14px; padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.iq-focus h2 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem); }
.iq-focus-grid { display: grid; gap: 18px; min-width: 0; }
@media (min-width: 760px) { .iq-focus-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 28px; } }
.iq-focus-k { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 8px; }
.iq-facts { padding-left: 1.2em; display: grid; gap: 8px; color: var(--ink); line-height: 1.5; }
.iq-top { list-style: none; counter-reset: top; display: grid; gap: 8px; padding: 0; }
.iq-top li { counter-increment: top; display: grid; grid-template-columns: 2.1em minmax(0, 1fr); column-gap: 4px; row-gap: 4px; line-height: 1.45; }
.iq-top li::before { content: counter(top); grid-row: span 2; align-self: start; margin-top: 1px; display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--bg-sun); color: var(--accent-text); font-family: var(--font-display); font-weight: 700; font-size: 0.78rem; }
.iq-top li > span:first-of-type { font-weight: 600; color: var(--heading); }
.iq-go { display: flex; flex-wrap: wrap; gap: 6px; }
.iq-go a { font-size: 0.8rem; font-weight: 700; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-tint); color: var(--accent-text); text-decoration: none; }
.iq-go a:hover { border-color: var(--sun); }

/* Ray diagrams (mirrors and lenses) */
.fig > svg.rfig { max-width: 520px; }
.fig .axis { fill: none; stroke: var(--ink-soft); stroke-width: 1.3; }
.fig .mir { fill: none; stroke: var(--heading); stroke-width: 3.2; stroke-linecap: round; }
.fig .hatch { fill: none; stroke: var(--ink-soft); stroke-width: 1.2; }
.fig .lens { fill: var(--electron); fill-opacity: 0.16; stroke: var(--heading); stroke-width: 2; stroke-linejoin: round; }
.fig .ray { fill: none; stroke: var(--sun-deep); stroke-width: 2; stroke-linecap: round; }
.fig .ray.v { stroke-dasharray: 5 4; stroke-width: 1.6; }
.fig .rayhead { fill: var(--sun-deep); }
.fig .obj { fill: none; stroke: var(--heading); stroke-width: 3; }
.fig .obj-h { fill: var(--heading); }
.fig .img { fill: none; stroke: var(--violet); stroke-width: 3; }
.fig .img.v { stroke-dasharray: 6 4; }
.fig .img-h { fill: var(--violet); }
.fig .imgpt { fill: var(--violet); }
.fig .imgpt.v { fill: var(--surface); stroke: var(--violet); stroke-width: 2; }
.fig .t.obj-t { fill: var(--heading); font-weight: 700; }
.fig .t.img-t { fill: var(--violet); font-weight: 700; }
@media (max-width: 559px) { .fig svg.rfig .t { font-size: 21px; } }
.fig .normal { fill: none; stroke: var(--ink-soft); stroke-width: 1.3; stroke-dasharray: 6 5; }
.fig .ang { fill: none; stroke: var(--ink-soft); stroke-width: 1.4; }
.fig .sphere { fill: none; stroke: var(--ink-soft); stroke-width: 1.2; stroke-dasharray: 3 5; }
.fig .slab { fill: none; stroke: var(--heading); stroke-width: 2; }
.fig-parts.p2 { max-width: 560px; justify-self: center; }
.fig-parts.p6, .fig-parts.pw { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 20px 22px; width: 100%; }
.fig-parts.p6 > .fig-part, .fig-parts.pw > .fig-part { max-width: 380px; width: 100%; justify-self: center; }
.fig-part > span .sb, .fig-part > span sub { font-size: 0.75em; }
@media (max-width: 559px) {
  .fig svg.rfig .t.sm { font-size: 17px; }
  .fig-part svg.rfig .t { font-size: 18px; }
  .fig-part svg.rfig .t.sm { font-size: 14px; }
}
.utable .tsub { display: block; margin-top: 2px; font-size: 0.86rem; color: var(--ink-soft); }
.keybox ol { margin: 0; }
.tbl-cap { font-family: var(--font-display); font-weight: 600; color: var(--heading); margin-bottom: -6px; }
.it-phone { display: none; }
@media (max-width: 639px) { .it-wide { display: none; } .it-phone { display: block; } }
.it-wide .img-tbl th:nth-child(1), .it-wide .img-tbl td:nth-child(1) { width: 26%; }
.it-wide .img-tbl th:nth-child(2), .it-wide .img-tbl td:nth-child(2) { width: 28%; }
.it-wide .img-tbl th:nth-child(3), .it-wide .img-tbl td:nth-child(3) { width: 24%; }
.it-wide .img-tbl th:nth-child(4), .it-wide .img-tbl td:nth-child(4) { width: 22%; }
.it-phone .img-tbl th:nth-child(1), .it-phone .img-tbl td:nth-child(1) { width: 38%; }

/* Mirror and lens lab */
.lab-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .lab-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .lab-stage { grid-column: 1 / -1; } }
.lab-stage {
  background-color: var(--bg-tint);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
}
#lab-svg { width: 100%; max-width: 820px; height: auto; justify-self: center; overflow: hidden; }
#lab-svg .axis { fill: none; stroke: var(--ink-soft); stroke-width: 1.3; }
#lab-svg .mir { fill: none; stroke: var(--heading); stroke-width: 3.2; stroke-linecap: round; }
#lab-svg .hatch { fill: none; stroke: var(--ink-soft); stroke-width: 1.2; }
#lab-svg .lens { fill: var(--electron); fill-opacity: 0.16; stroke: var(--heading); stroke-width: 2; stroke-linejoin: round; }
#lab-svg .ray { fill: none; stroke: var(--sun-deep); stroke-width: 2; stroke-linecap: round; }
#lab-svg .ray.v { stroke-dasharray: 5 4; stroke-width: 1.6; }
#lab-svg .rayhead { fill: var(--sun-deep); }
#lab-svg .obj { fill: none; stroke: var(--heading); stroke-width: 3.2; }
#lab-svg .obj-h { fill: var(--heading); }
#lab-svg .img { fill: none; stroke: var(--violet); stroke-width: 3.2; }
#lab-svg .img.v { stroke-dasharray: 6 4; }
#lab-svg .img-h { fill: var(--violet); }
#lab-svg .pt { fill: var(--sun); stroke: var(--heading); stroke-width: 1.5; }
#lab-svg .t { fill: var(--heading); font-family: var(--font-body); font-size: 16px; font-weight: 600; }
#lab-svg .t.note { fill: var(--ink-soft); font-size: 14px; font-weight: 500; }
#lab-svg .sb { font-size: 0.72em; }
#lab-svg.compact .t { font-size: 22px; }
#lab-svg.compact .t.note { font-size: 19px; }
.lg-obj, .lg-img { width: 4px; height: 16px; border-radius: 2px; background: var(--heading); }
.lg-img { background: var(--violet); }
.lg-img.v { background: repeating-linear-gradient(var(--violet) 0 4px, transparent 4px 7px); }
.lg-ray { width: 22px; height: 0; border-top: 2.5px solid var(--sun-deep); }
.lg-ray.v { border-top-style: dashed; }
.lab-readings dd.dd-wrap { white-space: normal; line-height: 1.25; }
@media (max-width: 559px) { .lab-readings { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lab-readings > div:last-child { grid-column: 1 / -1; } }
.lab-summary { min-height: 3em; font-size: 1rem; line-height: 1.55; color: var(--ink); }
.chips.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ctl-note { font-size: 0.92rem; line-height: 1.5; color: var(--ink-soft); }
.lab-work-panel .sim-work-box { min-height: 0; }
.lab-work-panel #lab-work { display: grid; gap: 8px; min-width: 0; }
.lab-work-panel #lab-work .work { font-size: 1.1rem; }
.lab-work-panel #lab-work p { line-height: 1.5; color: var(--ink); }
.sign-tbl th, .sign-tbl td { padding: 9px 12px; vertical-align: top; line-height: 1.45; }
.sign-tbl th { width: 38%; font-weight: 700; }
.sign-note { font-size: 0.92rem; line-height: 1.5; color: var(--ink-soft); }
.fig .paper { fill: #10151F; stroke: var(--heading); stroke-width: 1.5; }
.fig .img.dim, .fig .img-h.dim { opacity: 0.6; }
.iq-text .mcq.two, .qa-text .mcq.two { grid-template-columns: repeat(2, minmax(0, max-content)); }

/* Class 6: scientific method figure, chapter summary and the Be a scientist activity */
.fig .step-box { fill: var(--surface); stroke: var(--heading); stroke-width: 2; }
.fig .step-num { fill: var(--sun); stroke: var(--heading); stroke-width: 1.5; }
.fig .t.step-n { font-family: var(--font-display); font-weight: 700; font-size: 15px; fill: var(--brand); }
.fig .loop { fill: none; stroke: var(--sun-deep); stroke-width: 2; stroke-dasharray: 6 5; }
.sum-list { display: grid; gap: 8px; padding-left: 1.2em; line-height: 1.55; color: var(--ink); }
.sum-card { display: grid; gap: 10px; align-content: start; }
.act-box { display: grid; gap: 14px; max-width: 46rem; padding: clamp(16px, 2.6vw, 24px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.act-count { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.act-top h3 { font-size: 1.2rem; margin-top: 4px; }
.act-cards { list-style: none; display: grid; gap: 10px; padding: 0; margin: 0; }
.act-card { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--field-border); background: var(--surface); color: var(--ink); font: inherit; line-height: 1.45; cursor: pointer; }
.act-card:hover:not(:disabled) { border-color: var(--sun); }
.act-card[aria-pressed="true"] { border-color: var(--sun); background: var(--bg-sun); }
.act-card:disabled { cursor: default; }
.act-card.is-right { border-color: var(--ok); background: var(--ok-bg); }
.act-card.is-wrong { border-color: var(--bad); background: var(--bad-bg); }
.act-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); color: var(--brand); font-family: var(--font-display); font-weight: 700; }
.act-n.empty { background: transparent; border: 2px dashed var(--field-border); }
.act-txt { display: grid; gap: 4px; }
.act-step { font-size: 0.85rem; font-weight: 700; color: var(--heading); }
.act-result { min-height: 1.5em; font-weight: 700; color: var(--heading); }
.mf-steps { list-style: none; display: grid; gap: 10px; padding: 0; margin: 0; }
@media (min-width: 640px) { .mf-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.mf-steps li { position: relative; display: grid; gap: 4px; align-content: start; padding: 12px; border-radius: 14px; background: var(--bg-tint); border: 1px solid var(--line); line-height: 1.4; }
.mf-steps b { font-family: var(--font-display); font-weight: 600; color: var(--heading); }
.mf-steps li > span:last-child { font-size: 0.9rem; color: var(--ink-soft); }
.mf-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sun); color: var(--brand); font-family: var(--font-display); font-weight: 700; }
.mf-loop { padding: 10px 14px; border-radius: 12px; border: 1.5px dashed var(--sun-deep); color: var(--heading); font-weight: 600; line-height: 1.45; }
.fcard.sum-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; }
.fcard.sum-card > * { grid-area: auto; }
.sort-items { list-style: none; display: grid; gap: 10px; padding: 0; margin: 0; }
.sort-item { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); }
.sort-item.ok { border-color: var(--ok); }
.sort-item.no { border-color: var(--bad); }
.sort-name { font-weight: 700; color: var(--heading); }
.sort-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.sort-btn { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--field-border); background: var(--surface); color: var(--heading); font: inherit; font-weight: 600; cursor: pointer; }
.sort-btn:hover:not(:disabled) { border-color: var(--sun); }
.sort-btn:disabled { cursor: default; opacity: 0.75; }
.sort-btn.is-right { opacity: 1; border-color: var(--ok); background: var(--ok-bg); }
.sort-btn.is-wrong { opacity: 1; border-color: var(--bad); background: var(--bad-bg); }
.sort-fb { font-size: 0.95rem; line-height: 1.5; color: var(--ink); }
.sort-fb:empty { display: none; }
/* Class 6 plant and animal figures */
.fig .soil { fill: var(--copper); fill-opacity: 0.12; }
.fig .stem { fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round; }
.fig .stem.woody { stroke: var(--copper); stroke-width: 5; }
.fig .stem.trunk { stroke: var(--copper); stroke-width: 12; }
.fig .leafy, .fig .crown { fill: var(--ok); fill-opacity: 0.35; stroke: var(--ok); stroke-width: 1.5; }
.fig .root { fill: none; stroke: var(--copper); stroke-width: 2; stroke-linecap: round; }
.fig .root.main { stroke-width: 5; }
.fig .leaf { fill: var(--ok); fill-opacity: 0.18; stroke: var(--ok); stroke-width: 2; }
.fig .vein { fill: none; stroke: var(--ok); stroke-width: 1.8; stroke-linecap: round; }
.fig .vein.thin { stroke-width: 1; }
.fig .seed { fill: var(--sun); fill-opacity: 0.3; stroke: var(--copper); stroke-width: 2; }
.fig .embryo { fill: var(--ok); fill-opacity: 0.5; stroke: var(--ok); stroke-width: 1.2; }
.fig .set { fill-opacity: 0.12; stroke-width: 2; }
.fig .set.a { fill: var(--electron); stroke: var(--electron); }
.fig .set.b { fill: var(--copper); stroke: var(--copper); }
.fig .fbox { fill: var(--surface); stroke: var(--heading); stroke-width: 2; }
.fig .fbox.ans { fill: var(--bg-sun); }
.fig .web { fill: var(--sun); fill-opacity: 0.45; stroke: var(--sun-deep); stroke-width: 1.5; }
.fig .toe { fill: none; stroke: var(--sun-deep); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.qa-note { font-size: 0.92rem; color: var(--ink-soft); font-style: italic; }
/* Class 6 Ch 3 figures */
.fig .rim { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.fig .part { stroke: var(--surface); stroke-width: 2; }
.fig .part.pl1 { fill: var(--ok); fill-opacity: 0.55; }
.fig .part.pl2 { fill: var(--sun); fill-opacity: 0.6; }
.fig .part.pl3 { fill: var(--copper); fill-opacity: 0.7; }
.fig .part.pl4 { fill: var(--electron); fill-opacity: 0.35; }
.fig .glass { fill: none; stroke: var(--heading); stroke-width: 2; }
.fig .water { fill: var(--electron); fill-opacity: 0.2; stroke: var(--electron); stroke-width: 1.5; }
.fig .potato { fill: var(--sun); fill-opacity: 0.25; stroke: var(--copper); stroke-width: 2; }
.fig .bb { fill: #26285e; }
.fig .drop { fill: #8a4b12; }
.fig .paper { fill: var(--surface); stroke: var(--heading); stroke-width: 1.5; }
.fig .oil { fill: var(--sun); fill-opacity: 0.18; stroke: var(--sun); stroke-dasharray: 4 3; stroke-width: 1.5; }
.fig .tube { fill: none; stroke: var(--heading); stroke-width: 2; }
.fig .violet { fill: #8b5cf6; fill-opacity: 0.75; }
.tab-main > .sim:first-child { padding-top: 0; border-top: 0; }
/* Circuit lab (Class 7) */
.sim .cl-glass { fill: var(--surface); stroke: var(--heading); stroke-width: 2.4; transition: fill 0.25s ease; }
.sim .cl-glass.dim { fill: var(--bg-sun); }
.sim .cl-glass.lit { fill: var(--sun); fill-opacity: 0.55; }
.sim .cl-fil { stroke-width: 2; }
.sim .cl-dot { fill: var(--sun-deep); }
.sim #cl-dots { pointer-events: none; }
.sim #cl-arrows { transition: opacity 0.25s ease; }
.sim .cl-mat { stroke-width: 1.5; stroke: var(--heading); fill: none; }
.sim .cl-mat.metal-cu { fill: var(--copper); }
.sim .cl-mat.metal-fe { fill: var(--ink-soft); }
.sim .cl-mat.metal-al { fill: var(--line); }
.sim .cl-mat.graphite { fill: var(--heading); }
.sim .cl-mat.ins-plastic { fill: var(--electron); fill-opacity: 0.35; }
.sim .cl-mat.ins-rubber { fill: var(--bad); fill-opacity: 0.35; }
.sim .cl-mat.ins-wood { fill: var(--sun); fill-opacity: 0.45; }
.sim .cl-mat.ins-glass { fill: var(--electron); fill-opacity: 0.12; }
.sim .cl-mat.ins-paper { fill: var(--surface); }
.sim .cl-mat.air { stroke: none; }
.sim .t.cl-matname { font-weight: 700; }
.sim-legend .lg-cl { width: 10px; height: 10px; border-radius: 50%; background: var(--sun-deep); }
.chips.mat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .chips.mat { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.chips.mat .chip span, .chips.c2 .chip span { white-space: normal; text-align: center; line-height: 1.25; }
.cl-line { display: block; }
.cl-line + .cl-line { margin-top: 6px; }

/* Chemical equations stay on one line; main.js shrinks a long one slightly to fit (scrolls only as a last resort).
   'html body' outranks the chapter styles that load after this sheet. */
html body .c10r-eqrow, html body .c10ab-eqrow, html body .c10mn-eqrow, html body .c10cc-eqrow, html body .c10lp-eqrow, html body .c10ev-eqrow { flex-wrap: nowrap; }
html body .c10r-eqi, html body .c10ab-eqi, html body .c10mn-eqi, html body .c10cc-eqi, html body .c10lp-eqi, html body .c10ev-eqi { white-space: nowrap; display: inline-block; max-width: 100%; overflow-x: auto; overflow-y: hidden; vertical-align: bottom; }
html body .c7e-eq, html body .c7i-eq, html body .c8m-eq { white-space: nowrap; overflow-x: auto; }
html body .c7j-eq { flex-wrap: nowrap; overflow-x: auto; }
html body .eq-more { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
html body .eq-more.eq-end { -webkit-mask-image: none; mask-image: none; }
@media (max-width: 1100px) {
  html body table.eq-table, html body table.eq-table tbody, html body table.eq-table tr, html body table.eq-table td, html body table.eq-table th { display: block; width: auto; }
  html body table.eq-table thead { display: none; }
  html body table.eq-table tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  html body table.eq-table td { padding: 2px 0; border: 0; }
  html body table.eq-table td[data-label]:not(:first-child)::before { content: attr(data-label) ': '; font-weight: 700; color: var(--ink-soft); }
}

/* --- join form, copy protection, print --- */
.join { display: grid; gap: 28px; max-width: 40rem; }
.join-why { margin: 0; padding: 18px 20px 18px 40px; border-radius: 16px; background: var(--bg-sun); border: 1px solid var(--line); display: grid; gap: 6px; color: var(--ink); }
.join-form { display: grid; gap: 18px; padding: 24px 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.join-form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.join-form legend { width: 100%; font-weight: 700; color: var(--heading); margin-bottom: 8px; padding: 0; }
.jf { display: grid; gap: 6px; font-weight: 700; color: var(--heading); }
.jf input, .jf select { font: inherit; font-weight: 400; color: var(--ink); background: var(--bg); border: 1.5px solid var(--field-border); border-radius: 12px; min-height: 48px; padding: 10px 14px; width: 100%; box-sizing: border-box; }
.jf input:focus, .jf select:focus, .join-form input[type=radio]:focus-visible, .join-form input[type=checkbox]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.jf-hint, .jf-opt { font-weight: 400; font-size: 0.9rem; color: var(--ink-soft); }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--field-border); border-radius: 999px; cursor: pointer; color: var(--ink); }
.pill:has(input:checked) { background: var(--sun); border-color: var(--sun); color: #0E1C2F; font-weight: 700; }
.jf-want { flex-direction: column; flex-wrap: nowrap !important; gap: 8px !important; }
.jf-want label, .jf-agree { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); }
.jf-want input, .jf-agree input, .pill input { width: 20px; height: 20px; flex: none; margin: 2px 0 0; accent-color: var(--sun-deep); }
.pill input { margin: 0; }
.pill input:checked { accent-color: var(--brand); }
.jf-agree { font-size: 0.92rem; color: var(--ink-soft); }
.join-form .btn { justify-self: start; min-height: 48px; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Discourage casual copying of study material (inputs stay usable) */
main { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
main input, main textarea, main select, main [contenteditable] { -webkit-user-select: text; user-select: text; }
main img { -webkit-user-drag: none; }

/* Printed pages carry the website name */
@media print {
  body::before { content: "Prep Yourself  ·  Free NCERT Science notes at prepyourself.in"; display: block; text-align: center; font: 700 11pt/1.4 sans-serif; color: #03345D; padding: 0 0 8px; margin-bottom: 14px; border-bottom: 1.5px solid #FC9802; }
  .site-header, .mobile-menu, .menu-btn { display: none !important; }
}
