/* ZAINORA · Pakistan Studies · Source Lens
   Locked Zainora system: ink on white, one green for action, gold only for the
   exam-paper "[mark]" device. The source text is the hero; everything else is quiet. */

:root {
  --ink: #14161f;
  --ink-2: #4a4f5e;
  --ink-3: #6a6f7f;
  --line: #e5e7ec;
  --line-strong: #cdd0d8;
  --paper: #ffffff;
  --ground: #f5f6f8;
  --ground-2: #edeff3;
  --green: #0f5f4a;
  --green-deep: #0a4536;
  --green-soft: #e7f2ed;
  --green-line: #bfdccf;
  --gold: #c9a75e;
  --gold-deep: #9c7c36;
  --gold-soft: #f8f1e1;
  --danger: #b42318;
  --danger-soft: #fef0ee;
  --danger-line: #f3c6c0;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --r-sm: 8px; --r-md: 12px; --r-lg: 14px; --r-xl: 20px;
  --shadow-card: 0 1px 2px rgba(20,22,31,.04), 0 8px 24px -14px rgba(20,22,31,.14);
  --shadow-lift: 0 2px 4px rgba(20,22,31,.04), 0 18px 40px -18px rgba(20,22,31,.24);
  --ease: cubic-bezier(.16,1,.3,1);
  --measure: 46rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  font-feature-settings: "cv11", "ss01", "calt";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100dvh; display: flex; flex-direction: column;
}
::selection { background: var(--green-soft); color: var(--green-deep); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; color: inherit; }
a { color: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }

/* ---------- The mark device: "[1]" in mono with gold brackets ---------- */
.bracket { font-family: var(--mono); font-size: .8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bracket::before { content: "["; color: var(--gold-deep); }
.bracket::after { content: "]"; color: var(--gold-deep); }
.eyebrow { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- Header ---------- */
.top {
  display: flex; align-items: center; gap: 18px; padding: 14px 20px; overflow: hidden;
  border-bottom: 1px solid var(--line); background: var(--paper);
  position: sticky; top: 0; z-index: 20;
}
.wordmark { font-family: var(--display); font-variation-settings: "opsz" 72, "SOFT" 30; font-weight: 600; letter-spacing: .16em; font-size: 15px; text-decoration: none; }
.crumb { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.crumb-subj { color: var(--ink); font-weight: 500; }
.crumb-sep { margin: 0 8px; color: var(--line-strong); }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs a { text-decoration: none; font-size: 13.5px; font-weight: 500; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; }
.tabs a:hover { background: var(--ground); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.paper-id { font-size: 12.5px; color: var(--ink-3); min-width: 9ch; text-align: right; }

.main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 20px 64px; }
.foot { border-top: 1px solid var(--line); padding: 18px 20px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); }

/* ---------- Buttons ---------- */
.btn { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--paper); border-radius: 999px; padding: 10px 18px; font-weight: 500; font-size: 14.5px; cursor: pointer; transition: transform .25s var(--ease), background .2s, border-color .2s; }
.btn:hover { background: var(--ground); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-deep); }
.btn.ghost { border-color: transparent; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn .key { font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.35); border-radius: 4px; padding: 0 5px; }

/* ---------- Bank (home) ---------- */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; margin-bottom: 36px; }
.hero h1 { font-family: var(--display); font-variation-settings: "opsz" 144, "SOFT" 30; font-weight: 500; letter-spacing: -.02em; line-height: 1.02; font-size: clamp(38px, 5.4vw, 60px); margin: 10px 0 14px; }
.hero h1 em { font-style: italic; color: var(--green); }
.hero p { color: var(--ink-2); max-width: 34rem; margin: 0; font-size: 16.5px; }
.hero-side { border-left: 1px solid var(--line); padding-left: 28px; }
.stat { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.stat b { font-family: var(--display); font-variation-settings: "opsz" 72, "SOFT" 30; font-weight: 500; font-size: 34px; line-height: 1; }
.stat span { color: var(--ink-3); font-size: 13.5px; }
.rungs-legend { display: grid; gap: 6px; margin-top: 18px; font-size: 13.5px; color: var(--ink-2); }
.rungs-legend b { font-family: var(--mono); font-weight: 500; color: var(--ink); margin-right: 6px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 14px; }
.chip { border: 1px solid var(--line-strong); background: var(--paper); border-radius: 999px; padding: 6px 13px; font-size: 13.5px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .bracket { margin-left: 6px; }
.chip[aria-pressed="true"] .bracket { color: rgba(255,255,255,.75); }
.filters .spacer { flex: 1; }

.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 11ch 1fr auto auto; gap: 18px; align-items: center; padding: 15px 6px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .15s; }
.row:hover { background: var(--ground); }
.row .hdr { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.row .t { font-weight: 500; }
.row .q { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.row .shape { font-size: 12.5px; color: var(--ink-2); background: var(--ground-2); border-radius: 999px; padding: 3px 10px; }
.ticks { display: inline-flex; gap: 5px; }
.tick { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-strong); display: inline-grid; place-items: center; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.tick.done { background: var(--green); border-color: var(--green); color: #fff; }
.tick.part { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-deep); }
.empty { padding: 40px 0; color: var(--ink-3); }

/* ---------- Question page ---------- */
.qpage { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 44px; }
.rail { position: sticky; top: 84px; align-self: start; }
.rail .back { display: inline-block; font-size: 13.5px; color: var(--ink-3); text-decoration: none; margin-bottom: 18px; }
.rail .back:hover { color: var(--ink); }
.rail .hdr { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.rail .topic { font-family: var(--display); font-variation-settings: "opsz" 48, "SOFT" 30; font-size: 22px; line-height: 1.15; margin: 4px 0 22px; }
.steps { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.step { position: relative; padding: 8px 0 8px 18px; color: var(--ink-3); font-size: 14px; }
.step::before { content: ""; position: absolute; left: -5px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line-strong); }
.step.now { color: var(--ink); font-weight: 500; }
.step.now::before { background: var(--ink); border-color: var(--ink); }
.step.done { color: var(--ink-2); }
.step.done::before { background: var(--green); border-color: var(--green); }
.step small { display: block; font-family: var(--mono); font-size: 11.5px; font-weight: 400; color: var(--ink-3); margin-top: 1px; }
.step[data-go] { cursor: pointer; }
.rail .nav { display: flex; gap: 6px; margin-top: 22px; }
.rail .nav a { font-size: 13px; color: var(--ink-3); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.rail .nav a:hover { color: var(--ink); border-color: var(--line-strong); }

.stage { max-width: var(--measure); }
.stage h2 { font-family: var(--display); font-variation-settings: "opsz" 72, "SOFT" 30; font-weight: 500; letter-spacing: -.015em; line-height: 1.1; font-size: 30px; margin: 4px 0 8px; }
.stage .lead { color: var(--ink-2); margin: 0 0 22px; }
.sheet { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: 26px 28px; }
.sheet + .sheet { margin-top: 18px; }
.sheet .eyebrow { display: block; margin-bottom: 10px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 20px; }
.actions .hint { color: var(--ink-3); font-size: 13.5px; }
.actions .right { margin-left: auto; }

/* The question, as tappable words */
.qtext { font-size: 20px; line-height: 1.6; font-weight: 500; }
.qtext .w { display: inline; border-radius: 4px; padding: 1px 2px; margin: 0 -2px; cursor: pointer; transition: background .15s; }
.qtext .w:hover { background: var(--ground-2); }
.qtext .w.on { background: var(--gold-soft); box-shadow: inset 0 -2px 0 var(--gold); }
.qtext .w.hit { background: var(--green-soft); box-shadow: inset 0 -2px 0 var(--green); }
.qtext .w.miss { background: transparent; box-shadow: inset 0 -2px 0 var(--danger); text-decoration: none; }
.qtext .w.wrong { background: var(--danger-soft); box-shadow: none; color: var(--ink-3); }
.qtext.locked .w { cursor: default; }
.qtext.locked .w:hover { background: inherit; }
.qtext .marks { font-family: var(--mono); font-size: 15px; color: var(--ink-3); margin-left: 8px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.shape-card { background: var(--ground); border-radius: var(--r-md); padding: 14px 18px; margin-top: 18px; font-size: 14.5px; }
.shape-card b { font-family: var(--display); font-variation-settings: "opsz" 24, "SOFT" 30; font-weight: 500; font-size: 17px; }

/* The Source — the hero. Serif, document-like, tappable clauses. */
.source { font-family: var(--display); font-variation-settings: "opsz" 18, "SOFT" 30, "wght" 400; font-size: 19px; line-height: 1.75; color: var(--ink); }
.source .title { font-variation-settings: "opsz" 48, "SOFT" 30; font-weight: 500; font-size: 20px; margin-bottom: 8px; }
.source .attrib { font-family: var(--sans); font-size: 13px; color: var(--ink-3); margin-top: 14px; }
.source.locked { filter: blur(6px); user-select: none; pointer-events: none; opacity: .5; }
.c { display: inline; cursor: pointer; border-radius: 3px; padding: 2px 1px; margin: 0 -1px; transition: background .15s, box-shadow .2s; -webkit-tap-highlight-color: transparent; }
.c:hover { background: var(--ground-2); }
.c:focus-visible, .qtext .w:focus-visible { outline-offset: 1px; }
.c.on { background: var(--gold-soft); box-shadow: inset 0 -2px 0 var(--gold); }
.c.on .pick { display: inline-grid; }
.pick { display: none; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--gold-deep); color: #fff; font-family: var(--mono); font-size: 11px; vertical-align: 3px; margin-left: 4px; transform: translateY(-2px); }
.source.marked .c { cursor: default; }
.source.plain .c { cursor: text; }
.source.marked .c:hover { background: inherit; }
.c.mark { box-shadow: inset 0 -2px 0 var(--green); background: var(--green-soft); }
.c.dev  { box-shadow: inset 0 -2px 0 var(--gold); background: var(--gold-soft); }
.c.dup  { box-shadow: inset 0 -2px 0 var(--gold); background: var(--gold-soft); }
.c.decoy { background: var(--danger-soft); text-decoration: line-through; text-decoration-color: var(--danger); text-decoration-thickness: 1.5px; color: var(--ink-2); }
.c.ctx  { color: var(--ink-3); }
.c.quiet { color: var(--ink-3); }
.c.missed { box-shadow: inset 0 -2px 0 var(--green-line); }
.mk { font-family: var(--mono); font-size: 13px; color: var(--green-deep); margin-left: 3px; white-space: nowrap; vertical-align: 1px; }
.mk::before { content: "["; color: var(--gold-deep); } .mk::after { content: "]"; color: var(--gold-deep); }
.mk.zero { color: var(--danger); }
.c.decoy .mk, .trap .mk { display: inline-block; text-decoration: none; }
.mk.gold { color: var(--gold-deep); }
.source .c.mark .mk, .source .c.decoy .mk, .source .c.dup .mk, .source .c.dev .mk { animation: pop .45s var(--ease) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.tally { display: flex; align-items: baseline; gap: 14px; margin: 18px 0 6px; }
.tally b { font-family: var(--display); font-variation-settings: "opsz" 72, "SOFT" 30; font-weight: 500; font-size: 40px; line-height: 1; }
.tally b small { font-size: 20px; color: var(--ink-3); font-weight: 400; }
.tally span { color: var(--ink-2); }
.notes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.notes li { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: start; font-size: 14.5px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--ground); }
.notes li .v { font-family: var(--mono); font-size: 12px; font-weight: 500; padding-top: 2px; }
.notes li.ok { background: var(--green-soft); } .notes li.ok .v { color: var(--green-deep); }
.notes li.bad { background: var(--danger-soft); } .notes li.bad .v { color: var(--danger); }
.notes li.dup { background: var(--gold-soft); } .notes li.dup .v { color: var(--gold-deep); }
.notes li q { font-style: italic; color: var(--ink-2); quotes: "‘" "’"; }
.left-table { margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.left-table ul { margin: 6px 0 0; padding-left: 18px; }

/* Write rung */
.pace { height: 3px; background: var(--ground-2); border-radius: 2px; overflow: hidden; margin: 0 0 18px; }
.pace i { display: block; height: 100%; width: 0; background: var(--green); transition: width 1s linear; }
.pace.over i { background: var(--danger); }
.pace-lab { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.lines { display: grid; gap: 12px; }
.line { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.line .n { font-family: var(--mono); color: var(--ink-3); padding-top: 12px; }
.line textarea { width: 100%; resize: none; border: 0; border-bottom: 1px solid var(--line-strong); background: transparent; padding: 10px 2px; font: inherit; font-size: 16px; line-height: 1.5; min-height: 46px; }
.line textarea:focus { outline: none; border-bottom-color: var(--green); }
.line .fb { grid-column: 2; font-size: 13.5px; margin-top: 4px; display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.line .fb .v { font-family: var(--mono); font-size: 12px; font-weight: 500; white-space: nowrap; }
.line.ok .fb .v { color: var(--green-deep); } .line.bad .fb .v { color: var(--danger); } .line.dup .fb .v { color: var(--gold-deep); }
.line .fb .why { color: var(--ink-2); }
.line .fb .flag { background: var(--danger-soft); color: var(--danger); border-radius: 4px; padding: 1px 6px; font-size: 12.5px; }
.line .fb .toggle { margin-left: auto; border: 1px solid var(--line-strong); background: var(--paper); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; cursor: pointer; }
.line .fb .toggle[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.rulebox { margin-top: 18px; padding: 12px 16px; border-left: 3px solid var(--gold); background: var(--gold-soft); font-size: 14px; }
.rulebox b { font-family: var(--mono); font-weight: 500; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold-deep); display: block; margin-bottom: 4px; }

/* Examiner's copy */
.scheme { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.scheme li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; font-size: 15px; }
.scheme .b { font-family: var(--mono); font-size: 12.5px; color: var(--green-deep); padding-top: 3px; }
.scheme .b::before { content: "["; color: var(--gold-deep); } .scheme .b::after { content: "]"; color: var(--gold-deep); }
.exam-note { font-family: var(--display); font-variation-settings: "opsz" 24, "SOFT" 30; font-style: italic; font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.result-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.result-strip div { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.result-strip .eyebrow { margin-bottom: 4px; }
.result-strip b { font-family: var(--display); font-variation-settings: "opsz" 72, "SOFT" 30; font-weight: 500; font-size: 26px; }
.result-strip b small { color: var(--ink-3); font-weight: 400; font-size: 15px; }

/* Traps */
.traps h1, .teach h1 { font-family: var(--display); font-variation-settings: "opsz" 144, "SOFT" 30; font-weight: 500; letter-spacing: -.02em; line-height: 1.05; font-size: clamp(32px, 4.4vw, 46px); margin: 4px 0 10px; }
.traps .lead, .teach .lead { color: var(--ink-2); max-width: 40rem; margin: 0 0 26px; }
.trap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.trap { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: grid; gap: 10px; align-content: start; }
.trap .hdr { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.trap .quote { font-family: var(--display); font-variation-settings: "opsz" 18, "SOFT" 30; font-size: 17px; line-height: 1.55; text-decoration: line-through; text-decoration-color: var(--danger); text-decoration-thickness: 1.5px; color: var(--ink-2); }
.trap .q { font-size: 13px; color: var(--ink-3); }
.trap .why { font-size: 14px; }
.trap a { font-size: 13px; color: var(--green); }
.trap-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 26px; }
.trap-kinds div { background: var(--ground); border-radius: var(--r-md); padding: 14px 16px; font-size: 14px; }
.trap-kinds b { display: block; font-family: var(--display); font-variation-settings: "opsz" 24, "SOFT" 30; font-weight: 500; font-size: 17px; margin-bottom: 2px; }

/* Teach */
.teach-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.teach-bar select { font: inherit; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--paper); }
.proj { border: 1px solid var(--line); border-radius: var(--r-xl); padding: 40px 48px; }
.proj .qtext { font-size: 26px; }
.proj .source { font-size: 26px; line-height: 1.7; }
.proj .hdr { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 13px; color: var(--ink-3); margin-bottom: 18px; }
.proj .c { cursor: pointer; }
.proj .reveal { margin-top: 26px; display: grid; gap: 8px; font-size: 16px; }

/* Print worksheet (styled on screen too, so the preview is the print) */
.ws .hdr { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); border-bottom: 1px solid var(--line-strong); padding-bottom: 6px; margin-bottom: 14px; }
.ws .source { font-size: 15px; line-height: 1.6; }
.ws .q { font-size: 14px; font-weight: 600; margin: 16px 0 12px; }
.ws .ans { border-bottom: 1px solid var(--line-strong); height: 30px; margin: 0 0 8px 24px; position: relative; }
.ws .ans::before { content: attr(data-n); position: absolute; left: -24px; top: 6px; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.ws .credit { font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); margin-top: 14px; text-align: right; }
@media print {
  .top, .foot, .rail, .teach-bar, .actions, .tabs, .filters, .hero, .no-print { display: none !important; }
  .main { max-width: none; padding: 0; }
  .ws { page-break-after: always; border: 0; box-shadow: none; padding: 0 0 20px; margin: 0; }
  .ws:last-child { page-break-after: auto; }
  .ws .hdr, .ws .ans, .ws .credit { color: #555; border-color: #999; }
  .ws .source { font-size: 13px; }
  .qtext .w, .c { background: none !important; box-shadow: none !important; }
}

/* ---------- Source B · Examiner's Eye ---------- */
.sel { font: inherit; font-size: 13.5px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.bcard { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; background: var(--paper); transition: transform .3s var(--ease), box-shadow .3s; }
.bcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.bcard .thumb { display: block; aspect-ratio: 4 / 3; background: var(--ground-2); overflow: hidden; }
.bcard .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.9); }
.bcard .meta { display: grid; gap: 4px; padding: 12px 14px 14px; align-content: start; }
.bcard .hdr { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.bcard .t { font-weight: 500; }
.bcard .q { color: var(--ink-3); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard .ticks { margin-top: 6px; }

.stage-wide { max-width: 56rem; }
.pic { margin: 0; }
.pic-box { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--ground-2); box-shadow: 0 0 0 1px var(--line); }
.pic-box img { display: block; width: 100%; height: auto; }
.pic-layer { position: absolute; inset: 0; }
.pic.live .pic-box { cursor: crosshair; }
.pic.live .pic-box::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px var(--gold); border-radius: var(--r-md); pointer-events: none; opacity: .6; }
.pic figcaption { font-size: 13.5px; color: var(--ink-2); margin-top: 10px; line-height: 1.5; }
.pic figcaption .eyebrow { margin-right: 6px; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 500; pointer-events: none; animation: pop .4s var(--ease) both; }
.pin.hit { background: var(--green); color: #fff; box-shadow: 0 0 0 3px #fff, 0 4px 12px rgba(0,0,0,.3); }
.pin.miss { background: rgba(255,255,255,.85); color: var(--danger); box-shadow: 0 0 0 2px var(--danger); animation: fade 1.6s ease-out forwards; }
@keyframes fade { 0% { opacity: 1; } 100% { opacity: 0; } }
.spot { position: absolute; border: 2px solid var(--green); border-radius: 6px; box-shadow: 0 0 0 1px rgba(255,255,255,.7), inset 0 0 0 1px rgba(255,255,255,.5); cursor: pointer; transition: background .15s; }
.spot b { position: absolute; left: -1px; top: -1px; background: var(--green); color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 500; padding: 1px 6px; border-radius: 5px 0 6px 0; }
.spot:hover, .spot.on { background: rgba(201,167,94,.28); border-color: var(--gold-deep); }
.spot.on b { background: var(--gold-deep); }
.spot.missed { border: 2px dashed var(--green-line); cursor: default; box-shadow: none; }
.feat { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.feat li { padding: 8px 12px; background: var(--green-soft); border-radius: var(--r-sm); }
.spot-read { margin-top: 12px; font-family: var(--display); font-variation-settings: "opsz" 24, "SOFT" 30; font-size: 18px; min-height: 28px; }

.ladder-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; margin-bottom: 18px; }
.meter { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; position: sticky; top: 84px; }
.meter-marks { display: flex; align-items: baseline; gap: 4px; margin: 6px 0 12px; }
.meter-marks b { font-family: var(--display); font-variation-settings: "opsz" 72, "SOFT" 30; font-weight: 500; font-size: 44px; line-height: 1; }
.meter-marks small { color: var(--ink-3); font-size: 18px; }
.lv { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 10px; border-radius: var(--r-sm); margin-bottom: 4px; color: var(--ink-3); font-size: 13px; }
.lv .lv-n { grid-column: 1; grid-row: 1; font-family: var(--mono); font-size: 12px; font-weight: 500; }
.lv .lv-t { grid-column: 1; grid-row: 2; }
.lv .bracket { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.prose s { color: var(--ink-3); text-decoration-color: var(--danger); }
.lv.on { background: var(--green-soft); color: var(--green-deep); }
.lv.on .lv-n { color: var(--green-deep); }
.lv.under { color: var(--ink-2); }
.meter-foot { font-size: 12px; color: var(--ink-3); margin-top: 10px; line-height: 1.45; }
.chain { padding: 18px 0; border-top: 1px solid var(--line); }
.chain:first-child { border-top: 0; padding-top: 0; }
.chain-h { margin-bottom: 8px; }
.slot { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: start; margin-bottom: 12px; }
.slot-l { font-family: var(--display); font-variation-settings: "opsz" 24, "SOFT" 30; font-style: italic; font-size: 17px; padding-top: 6px; color: var(--ink-2); }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { border: 1px solid var(--line-strong); background: var(--paper); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; text-align: left; cursor: pointer; line-height: 1.35; transition: background .15s, border-color .15s; }
.opt:hover { background: var(--ground); }
.opt.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.opt.dim { color: var(--ink-3); border-style: dashed; }
.opt.locked { cursor: default; }
.opt .pinno { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #fff; font-family: var(--mono); font-size: 11px; margin-right: 6px; vertical-align: -3px; }
.opt.on .pinno { background: #fff; color: var(--green-deep); }
.prose { margin-top: 16px; padding: 14px 18px; background: var(--ground); border-radius: var(--r-md); }
.prose p { margin: 6px 0 0; font-family: var(--display); font-variation-settings: "opsz" 18, "SOFT" 30; font-size: 17px; line-height: 1.6; }
.wtext { width: 100%; font: inherit; font-size: 16px; line-height: 1.6; border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 12px 14px; resize: vertical; }
.wtext:focus { outline: none; border-color: var(--green); }
.tagrows { display: grid; gap: 8px; margin-top: 18px; }
.tagrow { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--ground); border-radius: var(--r-sm); font-size: 14.5px; }
.tbtns { display: flex; gap: 4px; }
.tb { border: 1px solid var(--line-strong); background: var(--paper); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; }
.tb[aria-pressed="true"].see { background: var(--green); border-color: var(--green); color: #fff; }
.tb[aria-pressed="true"].sug { background: var(--gold-deep); border-color: var(--gold-deep); color: #fff; }
.tb[aria-pressed="true"].know { background: var(--ink); border-color: var(--ink); color: #fff; }
.tips { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.exam-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sl { margin: 8px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.5; display: grid; gap: 6px; }


/* ---------- Question 1 home: both modules ---------- */
.modules { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.module { display: grid; grid-template-rows: 190px auto; border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; text-decoration: none; background: var(--paper); transition: transform .3s var(--ease), box-shadow .3s; }
.module:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.module-art { position: relative; background: var(--ground); overflow: hidden; display: block; }
.module-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.module-art .spot { pointer-events: none; }
.mock-source { position: absolute; inset: 0; padding: 26px 30px; font-family: var(--display); font-variation-settings: "opsz" 18, "SOFT" 30; font-size: 19px; line-height: 1.75; color: var(--ink); }
.mock-source mark { background: var(--green-soft); box-shadow: inset 0 -2px 0 var(--green); color: inherit; padding: 2px 1px; }
.mock-source s { background: var(--danger-soft); text-decoration-color: var(--danger); color: var(--ink-2); padding: 2px 1px; }
.module-body { display: grid; gap: 6px; padding: 18px 22px 22px; align-content: start; }
.module-t { font-family: var(--display); font-variation-settings: "opsz" 48, "SOFT" 30; font-weight: 500; font-size: 26px; letter-spacing: -.01em; }
.module-p { color: var(--ink-2); font-size: 14.5px; }
.module-stat { font-size: 13.5px; color: var(--ink-3); margin-top: 4px; }
.module-stat b { color: var(--ink); font-weight: 500; }
.pair { display: grid; grid-template-columns: 11ch 1fr 1fr; gap: 18px; align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.pair .hdr { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.pair-a, .pair-b { display: grid; gap: 4px 12px; align-items: center; text-decoration: none; padding: 8px 10px; border-radius: var(--r-md); transition: background .15s; min-width: 0; }
.pair-a { grid-template-columns: 1fr auto; }
.pair-b { grid-template-columns: 56px 1fr auto; }
.pair-a:hover, .pair-b:hover { background: var(--ground); }
.pair img { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; display: block; }
.pl { font-family: var(--mono); font-size: 12px; color: var(--ink-3); display: block; }
.pq { font-size: 13.5px; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pair-a .pq { grid-column: 1; }
.pair .none { color: var(--ink-3); font-size: 13px; }
@media (max-width: 900px) {
  .modules { grid-template-columns: 1fr; }
  .pair { grid-template-columns: 1fr; gap: 6px; }
  .pq { white-space: normal; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .crumb { display: none; }
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .hero-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; }
  .qpage { grid-template-columns: 1fr; gap: 20px; }
  .rail { position: static; }
  .rail .steps { display: flex; border-left: 0; border-top: 1px solid var(--line); gap: 4px; overflow-x: auto; }
  .rail .step { padding: 10px 10px 0 0; white-space: nowrap; }
  .rail .step::before { left: 0; top: -5px; }
  .rail .step small { display: none; }
  .row { grid-template-columns: 1fr auto; }
  .ladder-grid { grid-template-columns: 1fr; }
  .meter { position: static; }
  .exam-cols { grid-template-columns: 1fr; }
  .slot { grid-template-columns: 1fr; gap: 4px; }
  .slot-l { padding-top: 0; }
  .row .hdr { grid-column: 1 / -1; }
  .row .shape { display: none; }
}
@media (max-width: 600px) {
  .top { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
  .crumb { display: none; }
  .paper-id { display: none; }
  .main { padding: 20px 16px 48px; }
  .sheet { padding: 20px 18px; }
  .source { font-size: 17.5px; }
  .qtext { font-size: 18px; }
  .result-strip { grid-template-columns: 1fr; }
  .tagrow { grid-template-columns: 1fr; }
  .bgrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .proj { padding: 22px 18px; }
  .proj .source, .proj .qtext { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
