/* Learning Adda: site styles.
   Colours are tokens on :root. Dark mode only redefines the tokens.
   "Sheet" tokens are for paper objects (worksheets, labels, cards) that stay paper-coloured in both themes. */

:root {
  --paper: #FBFCFF;
  --paper-2: #EEF3FB;
  --grid: #DFE8F5;
  --ink: #18213D;
  --ink-2: #4B5675;
  --line: #D3DCEA;
  --line-strong: #B4C2D9;
  --margin-red: rgba(207, 42, 63, 0.5);
  --red: #CF2A3F;
  --blue: #2551C9;
  --green: #1E7A55;
  --yellow: #FFC23D;
  --yellow-deep: #F5B21F;
  --btn-ink: #18213D;
  --btn-edge: #18213D;
  --hl: #FFE07A;
  --ph-bg: #FFF0B3;
  --ph-ink: #6B4E00;

  --sheet: #FFFFFF;
  --sheet-ink: #18213D;
  --sheet-ink-2: #4B5675;
  --sheet-line: #D9E3F2;
  --sheet-rule: #9FB2D3;
  --sheet-grid: #E5EDF8;
  --sheet-red: #CF2A3F;
  --sheet-red-soft: rgba(207, 42, 63, 0.45);
  --sheet-hl: #FFE07A;
  --sheet-ph-bg: #FFF0B3;
  --sheet-ph-ink: #6B4E00;
  --pen: #2551C9;

  --foot-bg: #18213D;
  --foot-ink: #E6ECF9;
  --foot-ink-2: #A4B0CC;
  --foot-line: rgba(230, 236, 249, 0.16);
  --foot-ph-bg: rgba(255, 194, 61, 0.2);
  --foot-ph-ink: #FFD978;

  --shadow: 0 1px 0 rgba(24, 33, 61, 0.05), 0 14px 34px -20px rgba(24, 33, 61, 0.45);
  --drop: drop-shadow(0 10px 14px rgba(24, 33, 61, 0.14));
  --scrim: rgba(8, 11, 22, 0.55);

  --maxw: 1080px;
  --gutter: 16px;
  --r: 14px;
  --font-display: "Baloo 2", "Mukta", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Mukta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-hand: "Kalam", "Comic Sans MS", "Chalkboard SE", cursive;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1426;
    --paper-2: #151C33;
    --grid: #1A2340;
    --ink: #EAF0FF;
    --ink-2: #A9B5D1;
    --line: #283353;
    --line-strong: #3A4770;
    --margin-red: rgba(255, 115, 130, 0.42);
    --red: #FF7382;
    --blue: #93B2FF;
    --green: #5ACB94;
    --yellow-deep: #EFA914;
    --btn-edge: #04060D;
    --hl: rgba(255, 194, 61, 0.32);
    --ph-bg: rgba(255, 194, 61, 0.2);
    --ph-ink: #FFD978;
    --sheet: #EEF2FA;
    --sheet-line: #CBD6EA;
    --sheet-grid: #DCE5F3;
    --foot-bg: #090D1A;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 16px 36px -18px rgba(0, 0, 0, 0.75);
    --drop: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45));
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0F1426;
  --paper-2: #151C33;
  --grid: #1A2340;
  --ink: #EAF0FF;
  --ink-2: #A9B5D1;
  --line: #283353;
  --line-strong: #3A4770;
  --margin-red: rgba(255, 115, 130, 0.42);
  --red: #FF7382;
  --blue: #93B2FF;
  --green: #5ACB94;
  --yellow-deep: #EFA914;
  --btn-edge: #04060D;
  --hl: rgba(255, 194, 61, 0.32);
  --ph-bg: rgba(255, 194, 61, 0.2);
  --ph-ink: #FFD978;
  --sheet: #EEF2FA;
  --sheet-line: #CBD6EA;
  --sheet-grid: #DCE5F3;
  --foot-bg: #090D1A;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 16px 36px -18px rgba(0, 0, 0, 0.75);
  --drop: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45));
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0; color: inherit; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.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; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 90; background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 10px; border: 2px solid var(--ink); font-weight: 700; }
.skip:focus { left: 16px; }
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
}
.narrow { max-width: 760px; }
.ph { background: var(--ph-bg); color: var(--ph-ink); border-radius: 4px; padding: 0 4px; }
.grid-paper {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
}

/* ---------- Top bar ---------- */
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--font-display); font-weight: 800; font-size: 1.28rem; letter-spacing: -0.01em;
  line-height: 1;
}
.brand-mark { width: 34px; height: 34px; flex: none; }
.topbar-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem;
  padding: 7px 14px; border: 1.5px solid var(--line-strong); border-radius: 10px;
}
.topbar-link:hover { border-color: var(--ink); }
.topbar-link svg { width: 18px; height: 18px; flex: none; }

/* ---------- Buttons ---------- */
.btn-buy {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 10px 26px;
  background: var(--yellow); color: var(--btn-ink);
  font-family: var(--font-display); font-weight: 800; font-size: 1.22rem; line-height: 1.1;
  text-align: center; text-decoration: none; cursor: pointer;
  border: 2px solid var(--btn-edge); border-radius: 14px;
  box-shadow: 0 4px 0 var(--btn-edge);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.15s ease;
}
.btn-buy:hover { background: var(--yellow-deep); }
.btn-buy:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--btn-edge); }
.btn-buy svg { width: 22px; height: 22px; flex: none; }
.btn-sm { min-height: 46px; padding: 8px 18px; font-size: 1.05rem; box-shadow: 0 3px 0 var(--btn-edge); }
.btn-block { width: 100%; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 8px 18px;
  background: transparent; color: var(--ink);
  font: 700 1rem/1.2 var(--font-body); text-align: center; text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--line-strong); border-radius: 12px;
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost svg { width: 20px; height: 20px; flex: none; }

/* ---------- Hero ---------- */
.hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: 2px;
  left: max(22px, calc((100% - var(--maxw)) / 2 + 22px));
  background: var(--margin-red);
}
.hero-grid { display: grid; gap: 30px; padding-block: 28px 44px; }
.hero-copy { position: relative; display: grid; gap: 18px; justify-items: start; padding-left: 22px; min-width: 0; }
.hero h1 { font-size: clamp(2.05rem, 1.3rem + 3.4vw, 3.45rem); font-weight: 800; letter-spacing: -0.015em; max-width: 18ch; }
.hl {
  background-image: linear-gradient(transparent 56%, var(--hl) 56%, var(--hl) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding-inline: 0.05em;
}
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 34rem; }

.slip {
  position: relative; margin: 0;
  display: grid; gap: 2px;
  min-width: min(250px, 100%);
  padding: 10px 16px 12px;
  background: var(--sheet); color: var(--sheet-ink);
  border: 1.5px solid var(--pen); border-radius: 12px;
  box-shadow: inset 0 0 0 4px var(--sheet), inset 0 0 0 5px var(--sheet-rule), var(--shadow);
  transform: rotate(-1.2deg);
}
.slip-row { display: grid; grid-template-columns: 5.4em 1fr; align-items: baseline; gap: 8px; }
.slip dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sheet-ink-2); }
.slip dd {
  margin: 0; padding-left: 4px;
  font-family: var(--font-hand); font-weight: 700; font-size: 1.2rem; line-height: 1.55; color: var(--pen);
  border-bottom: 1.5px dotted var(--sheet-rule);
}

.price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; }
.price-now { font-family: var(--font-display); font-weight: 800; font-size: 3rem; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price-mrp { font-size: 1.3rem; color: var(--ink-2); }
.price-mrp s, s.strike, .buybar-price s { text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.off-mark {
  position: relative; display: inline-block;
  padding: 2px 12px;
  font-family: var(--font-hand); font-weight: 700; font-size: 1.3rem; line-height: 1.3; color: var(--red);
  transform: rotate(-4deg);
}
.off-mark::after {
  content: ""; position: absolute; inset: -5px -3px;
  border: 2px solid var(--red); border-radius: 50%;
  transform: rotate(3deg);
}
.countdown {
  font-size: 0.98rem; color: var(--ink);
  background: var(--paper); border: 1.5px dashed var(--red); border-radius: 10px; padding: 6px 12px;
}
.countdown strong { color: var(--red); font-variant-numeric: tabular-nums; }
.hero .btn-buy { width: 100%; max-width: 420px; }
.micro { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.96rem; color: var(--ink-2); }
.micro li { display: inline-flex; align-items: center; gap: 6px; }
.micro svg, .micro-note svg { width: 18px; height: 18px; flex: none; color: var(--green); }

.hero-art { width: 100%; max-width: 440px; justify-self: center; }
.hero-art svg { width: 100%; height: auto; display: block; overflow: visible; }
.hero-photo { width: 100%; height: auto; }

@media (min-width: 880px) {
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: center; gap: 48px; padding-block: 56px 72px; }
  .hero-copy { gap: 20px; }
}

/* Worksheet illustration (inline SVG) */
.a-sheet { fill: var(--sheet); }
.a-drop { filter: var(--drop); }
.a-grid { stroke: var(--sheet-grid); }
.a-margin { stroke: var(--sheet-red-soft); stroke-width: 2; }
.a-rule { stroke: var(--sheet-rule); stroke-width: 1.4; }
.a-label { font: 700 11px var(--font-body); letter-spacing: 0.12em; fill: var(--sheet-ink-2); }
.a-no { font: 700 13px var(--font-display); fill: var(--sheet-ink-2); }
.a-title { font: 800 27px var(--font-display); fill: var(--sheet-ink); }
.a-hl { fill: var(--sheet-hl); }
.a-math { font: 700 26px var(--font-display); fill: var(--sheet-ink); }
.a-hand { font: 700 25px var(--font-hand); fill: var(--pen); }
.a-box { fill: none; stroke: var(--sheet-rule); stroke-width: 1.8; }
.a-tick { fill: none; stroke: var(--sheet-red); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.a-apple { fill: #E0474C; }
.a-leaf { fill: #2F9E5B; }
.a-shape { fill: none; stroke: var(--sheet-ink); stroke-width: 2.4; stroke-linejoin: round; }
.a-crayon { fill: var(--sheet-hl); }
.a-dash { stroke: var(--sheet-rule); stroke-width: 1.4; stroke-dasharray: 5 6; }
.a-stamp { fill: none; stroke: var(--sheet-red); stroke-width: 2.6; }
.a-stamp-t { font: 700 19px var(--font-hand); fill: var(--sheet-red); }

/* ---------- PDF note ---------- */
.note-band { padding-block: 22px 0; }
.pdf-note {
  display: flex; align-items: flex-start; gap: 12px;
  max-width: 760px; padding: 14px 16px;
  background: var(--paper-2); border: 1.5px dashed var(--line-strong); border-radius: var(--r);
}
.pdf-note svg { width: 26px; height: 26px; flex: none; margin-top: 1px; color: var(--red); }
.note-tag { font-family: var(--font-hand); font-weight: 700; color: var(--red); margin-right: 4px; }

/* ---------- Sections ---------- */
.section { padding-block: 56px; }
.section-alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 8px; margin-bottom: 26px; }
.section h2 { font-size: clamp(1.7rem, 1.25rem + 1.6vw, 2.3rem); font-weight: 800; letter-spacing: -0.01em; }
.section-sub { color: var(--ink-2); font-size: 1.08rem; }

/* Index (contents) sheet */
.index-sheet {
  background: var(--sheet); color: var(--sheet-ink);
  border: 1px solid var(--sheet-line); border-radius: var(--r); box-shadow: var(--shadow);
  padding-top: 16px; overflow: hidden;
}
.index-title { text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: 0.32em; padding-bottom: 10px; }
.index { width: 100%; border-collapse: collapse; }
.index th {
  padding: 8px 16px; text-align: left;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sheet-ink-2);
  border-top: 2px solid var(--sheet-red-soft); border-bottom: 2px solid var(--sheet-red-soft);
}
.index td { padding: 14px 16px; border-bottom: 1px solid var(--sheet-line); vertical-align: top; line-height: 1.55; }
.index tr:last-child td { border-bottom: 0; }
.index th:first-child, .index td:first-child { width: 5.6rem; text-align: center; border-right: 2px solid var(--sheet-red-soft); }
.ix-class { display: block; font-family: var(--font-hand); font-weight: 700; font-size: 1.9rem; line-height: 1.1; color: var(--pen); }
.ix-sheets { display: block; font-size: 0.78rem; font-weight: 700; color: var(--sheet-ink-2); white-space: nowrap; }

/* Benefits */
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px 36px; }
.benefits li { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; }
.b-icon {
  width: 48px; height: 48px; display: grid; place-items: center;
  background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: 14px;
}
.b-icon svg { width: 26px; height: 26px; }
.benefits h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 4px; }
.benefits p { color: var(--ink-2); }
@media (min-width: 700px) { .benefits { grid-template-columns: 1fr 1fr; } }

/* Samples */
.samples-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(72%, 260px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px;
}
.samples-track figure { margin: 0; scroll-snap-align: start; display: grid; gap: 8px; align-content: start; }
.samples-track a { display: block; border-radius: 12px; }
.samples-track img {
  width: 100%; height: auto; aspect-ratio: 900 / 1272; object-fit: cover;
  background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.samples-track figcaption { font-size: 0.9rem; font-weight: 700; color: var(--ink-2); }
.section-flush { padding-top: 0; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 2px 14px; align-content: start; }
.step-n {
  grid-row: span 2; width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--yellow); color: var(--btn-ink);
  border: 2px solid var(--btn-edge); border-radius: 50%;
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem;
}
.steps h3 { font-size: 1.2rem; font-weight: 800; align-self: center; }
.steps p { color: var(--ink-2); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

/* Reviews */
.reviews { display: grid; gap: 16px; }
.review { margin: 0; display: grid; gap: 10px; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.review blockquote { margin: 0; font-size: 1.05rem; }
.review figcaption { font-weight: 700; font-size: 0.95rem; color: var(--ink-2); }
@media (min-width: 760px) { .reviews { grid-template-columns: repeat(2, 1fr); } }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 2px; cursor: pointer; list-style: none;
  font-weight: 700; font-size: 1.1rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1; color: var(--red);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { display: grid; gap: 12px; justify-items: start; padding: 0 2px 20px; color: var(--ink-2); }

/* Final call to action */
.final { border-top: 1px solid var(--line); padding-block: 52px; }
.final-in { display: grid; gap: 22px; align-items: center; }
.final h2 { font-size: clamp(1.9rem, 1.35rem + 2.2vw, 2.7rem); font-weight: 800; letter-spacing: -0.015em; }
.final-sub { color: var(--ink-2); margin-top: 8px; font-size: 1.1rem; }
.final-cta { display: grid; gap: 12px; justify-items: start; }
.final .btn-buy { width: 100%; max-width: 420px; }
.micro-note { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 0.95rem; }
@media (min-width: 820px) { .final-in { grid-template-columns: 1.2fr 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--foot-bg); color: var(--foot-ink); padding-block: 40px; }
body[data-page="home"] .site-footer { padding-bottom: calc(40px + 84px + env(safe-area-inset-bottom, 0px)); }
.footer-in { display: grid; gap: 22px; }
.footer-name { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; line-height: 1.2; }
.footer-tag { color: var(--foot-ink-2); }
.footer-contact { display: grid; gap: 4px; align-content: start; }
.footer-contact .k { display: inline-block; min-width: 6.8em; color: var(--foot-ink-2); font-size: 0.9rem; }
.site-footer a { color: var(--foot-ink); }
.site-footer .ph { background: var(--foot-ph-bg); color: var(--foot-ph-ink); }
.footer-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 18px; border-top: 1px solid var(--foot-line); }
.footer-links a { text-decoration: none; font-weight: 700; font-size: 0.98rem; }
.footer-links a:hover { text-decoration: underline; }
.footer-legal { grid-column: 1 / -1; color: var(--foot-ink-2); font-size: 0.9rem; }
@media (min-width: 820px) { .footer-in { grid-template-columns: 1.2fr 1fr; } }

/* ---------- Sticky buy bar ---------- */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--paper); border-top: 1px solid var(--line-strong);
  box-shadow: 0 -12px 30px -20px rgba(24, 33, 61, 0.5);
  padding-block: 10px calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateY(110%); visibility: hidden;
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
}
.buybar.is-on { transform: none; visibility: visible; transition: transform 0.25s ease, visibility 0s; }
.buybar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.buybar-price { display: grid; line-height: 1.15; }
.buybar-price strong { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.buybar-price s { margin-left: 6px; color: var(--ink-2); font-size: 1rem; }
.buybar-sub { font-size: 0.84rem; color: var(--ink-2); }

/* ---------- Sheet (dialog) and toast ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 60;
  display: grid; align-items: end; justify-items: center;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--scrim);
}
.sheet-card {
  width: 100%; max-width: 440px; display: grid; gap: 12px;
  padding: 22px; background: var(--paper); color: var(--ink);
  border-radius: 18px; box-shadow: var(--shadow);
}
.sheet-card h2 { font-size: 1.4rem; font-weight: 800; }
.sheet-card p { color: var(--ink-2); }
.sheet-actions { display: grid; gap: 10px; margin-top: 6px; }
@media (min-width: 640px) { .sheet { align-items: center; } }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: var(--paper); font-weight: 700; box-shadow: var(--shadow);
}

/* ---------- Policy / info pages ---------- */
.doc { padding-block: 40px 64px; }
.doc h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.7rem); font-weight: 800; letter-spacing: -0.015em; }
.doc-meta { margin-top: 8px; color: var(--ink-2); font-size: 0.95rem; }
.doc-body { display: grid; gap: 14px; margin-top: 26px; max-width: 68ch; }
.doc-body h2 { margin-top: 18px; font-size: 1.35rem; font-weight: 800; }
.doc-body ul { margin: 0; padding-left: 1.25em; display: grid; gap: 6px; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.kv {
  margin: 0; display: grid;
  background: var(--sheet); color: var(--sheet-ink);
  border: 1px solid var(--sheet-line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden;
}
.kv > div { display: grid; grid-template-columns: minmax(7.5em, 32%) 1fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--sheet-line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { padding-top: 3px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sheet-ink-2); }
.kv dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.kv a { color: var(--pen); }
.kv .ph, .dl-card .ph, .index-sheet .ph { background: var(--sheet-ph-bg); color: var(--sheet-ph-ink); }
.kv s { color: var(--sheet-ink-2); font-weight: 400; margin-left: 6px; text-decoration-color: var(--sheet-red); text-decoration-thickness: 2px; }

/* ---------- Download page ---------- */
.dl-hero { border-bottom: 1px solid var(--line); padding-block: 28px 40px; }
.dl-card {
  position: relative; display: grid; gap: 14px; justify-items: start;
  padding: 24px 20px;
  background: var(--sheet); color: var(--sheet-ink);
  border: 1px solid var(--sheet-line); border-radius: 18px; box-shadow: var(--shadow);
}
.dl-top { display: flex; align-items: center; gap: 12px; }
.stamp { width: 64px; height: 64px; flex: none; color: var(--sheet-red); transform: rotate(-8deg); }
.dl-kicker { font-family: var(--font-hand); font-weight: 700; font-size: 1.35rem; color: var(--sheet-red); line-height: 1.2; }
.dl-card h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.45rem); font-weight: 800; letter-spacing: -0.01em; }
.dl-lede { color: var(--sheet-ink-2); font-size: 1.1rem; }
.dl-actions { display: grid; gap: 10px; width: 100%; margin-top: 4px; }
.dl-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .dl-row { grid-template-columns: 1fr 1fr; } }
.dl-card .btn-ghost { color: var(--sheet-ink); border-color: var(--sheet-rule); }
.dl-card .btn-ghost:hover { border-color: var(--sheet-ink); }
.dl-missing { width: 100%; padding: 12px 14px; border: 1.5px dashed var(--sheet-red-soft); border-radius: 12px; color: var(--sheet-ink); }
.link-field {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 0.95rem;
  color: var(--sheet-ink); background: var(--sheet);
  border: 1.5px solid var(--sheet-rule); border-radius: 10px;
}
.iab-tip {
  display: grid; gap: 10px; justify-items: start; margin-top: 16px; padding: 14px 16px;
  background: var(--paper-2); border: 1.5px dashed var(--red); border-radius: var(--r);
}
.dl-grid { display: grid; gap: 32px; }
.tips h2, .help h2 { font-size: 1.45rem; font-weight: 800; }
.tips ul { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--ink-2); }
.help { display: grid; gap: 12px; align-content: start; }
.help p { color: var(--ink-2); }
.help-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 760px) { .dl-grid { grid-template-columns: 1fr 1fr; } .dl-card { padding: 32px; } }

/* ---------- Setup check panel (?setup) ---------- */
.setup-panel {
  position: fixed; z-index: 80; top: calc(12px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px;
  max-width: 360px; margin-inline: auto; padding: 14px 16px;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow);
  font-size: 0.95rem;
}
.setup-title { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; margin-bottom: 6px; }
.setup-panel ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 3px; }
.setup-panel .ok { color: var(--green); }
.setup-panel .todo { color: var(--red); font-weight: 700; }
.setup-panel .opt { color: var(--ink-2); }
.setup-close { font: 700 0.95rem var(--font-body); color: var(--ink); background: transparent; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 6px 14px; cursor: pointer; }

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