/* UPSC Intel app: the Claude Design "UPSC Intel App" as a phone-first PWA. Tokens, layout, then components.
   The design's colours are the tokens below; dark mode keeps the same roles. */
:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f2f1ed;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #7a7873;
  --grid: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --accent: #2a78d6;
  --accent-strong: #1c5cab;
  --accent-soft: #e3eefc;
  --accent-soft-ink: #184f95;
  --accent-line: #b7d3f6;
  --btn: #1c5cab;
  --hover: #9dbde6;
  --good: #0ca30c;
  --good-text: #006300;
  --good-soft: #e0f0dc;
  --good-bd: #b9dcb2;
  --amber: #fab219;
  --critical: #d03b3b;
  --critical-soft: #fbe9e9;
  --g-note: #1c5cab; --g-note-ink: #ffffff;
  --g-skim: #b7d3f6; --g-skim-ink: #0d366b;
  --g-read: #eceae4; --g-read-ink: #52514e;
  --hero: #0b0b0b; --hero-bd: transparent; --hero-eyebrow: #9ec5f4; --hero-text: #c3c2b7; --hero-track: #2c2c2a; --hero-line: #383835; --hero-muted: #9a988f;
  --canvas: #e6e5df;
  --shadow-seg: 0 1px 2px rgba(11, 11, 11, .06), 0 4px 16px rgba(11, 11, 11, .04);
  --bar-bg: rgba(249, 249, 247, .94);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --col: 480px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321; --ink: #ffffff; --ink-2: #c3c2b7; --muted: #9a988f;
    --grid: #2c2c2a; --baseline: #383835; --border: rgba(255, 255, 255, .10);
    --accent: #3987e5; --accent-strong: #6da7ec; --btn: #2f6fc2; --accent-soft: #16233a; --accent-soft-ink: #9ec5f4; --accent-line: #24406b; --hover: #3b5f8f;
    --good-text: #3ec63e; --good-soft: #13280f; --good-bd: #24501e; --critical-soft: #3a1c1c;
    --g-note: #3987e5; --g-note-ink: #0b0b0b; --g-skim: #184f95; --g-skim-ink: #ffffff; --g-read: #2c2c2a; --g-read-ink: #c3c2b7;
    --hero: #1a1a19; --hero-bd: rgba(255, 255, 255, .08); --hero-track: #2c2c2a; --hero-line: #3a3a37;
    --canvas: #050505; --shadow-seg: 0 1px 2px rgba(0, 0, 0, .5); --bar-bg: rgba(13, 13, 13, .92);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321; --ink: #ffffff; --ink-2: #c3c2b7; --muted: #9a988f;
  --grid: #2c2c2a; --baseline: #383835; --border: rgba(255, 255, 255, .10);
  --accent: #3987e5; --accent-strong: #6da7ec; --btn: #2f6fc2; --accent-soft: #16233a; --accent-soft-ink: #9ec5f4; --accent-line: #24406b; --hover: #3b5f8f;
  --good-text: #3ec63e; --good-soft: #13280f; --good-bd: #24501e; --critical-soft: #3a1c1c;
  --g-note: #3987e5; --g-note-ink: #0b0b0b; --g-skim: #184f95; --g-skim-ink: #ffffff; --g-read: #2c2c2a; --g-read-ink: #c3c2b7;
  --hero: #1a1a19; --hero-bd: rgba(255, 255, 255, .08); --hero-track: #2c2c2a; --hero-line: #3a3a37;
  --canvas: #050505; --shadow-seg: 0 1px 2px rgba(0, 0, 0, .5); --bar-bg: rgba(13, 13, 13, .92);
}

/* ── base ── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
a { color: var(--accent-strong); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nosb { scrollbar-width: none; } .nosb::-webkit-scrollbar { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sp { flex: 1; }
[hidden] { display: none !important; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(12, 163, 12, .45); } 70% { box-shadow: 0 0 0 6px rgba(12, 163, 12, 0); } 100% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0); } }
@keyframes amberpulse { 0% { box-shadow: 0 0 0 0 rgba(250, 178, 25, .55); } 70% { box-shadow: 0 0 0 6px rgba(250, 178, 25, 0); } 100% { box-shadow: 0 0 0 0 rgba(250, 178, 25, 0); } }
@keyframes slidein { from { transform: translateX(100%); } to { transform: none; } }
@keyframes sheetup { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0s !important; transition: none !important; } }

/* ── the app column: full width on a phone, a centred column on a big screen ── */
.app { min-height: 100vh; min-height: 100dvh; background: var(--page); position: relative; }
.col { width: 100%; max-width: var(--col); margin: 0 auto; }
@media (min-width: 560px) {
  body { background: var(--canvas); }
  .app { max-width: var(--col); margin: 0 auto; box-shadow: 0 0 0 1px var(--border), 0 30px 80px rgba(11, 11, 11, .12); }
}
.fixed-col { position: fixed; left: 0; right: 0; margin: 0 auto; width: 100%; max-width: var(--col); }

/* ── header ── */
.top { position: sticky; top: 0; z-index: 30; background: var(--page); padding: calc(var(--safe-t) + 10px) 16px 10px; display: flex; align-items: center; gap: 8px; }
.top.scrolled { box-shadow: 0 1px 0 var(--border); }
.logo { flex: none; display: block; }
.top-t { flex: 1; min-width: 0; margin-left: 2px; }
.top-title { font-weight: 750; font-size: 17px; letter-spacing: -.01em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); animation: pulse 2s infinite; flex: none; }
.live-dot.off { background: var(--baseline); animation: none; }
.ib { width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; color: var(--ink-2); flex: none; padding: 0; }
.ib svg { width: 17px; height: 17px; }
.ib.primary { background: var(--btn); border-color: var(--btn); color: #fff; }
.ib.busy svg { animation: spin .9s linear infinite; }
.ib:disabled { cursor: default; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ib.busy svg { animation: none; opacity: .5; } }

.screen { padding-bottom: calc(96px + var(--safe-b)); }
.loading { padding: 60px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.empty { margin: 0 16px 16px; text-align: center; color: var(--ink-2); padding: 36px 16px; background: var(--surface); border: 1px dashed var(--baseline); border-radius: 14px; font-size: 14px; line-height: 1.5; }
.empty .btn-s { margin-top: 12px; }

/* ── Brief: month row, week strip, hero ── */
.monthrow { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 6px; }
.monthbtn { border: 0; background: transparent; padding: 4px 0; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.monthbtn svg { width: 15px; height: 15px; }
.monthbtn .chev { width: 14px; height: 14px; color: var(--muted); }
.btn-s { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; height: 28px; padding: 0 10px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 2px 12px 14px; }
.wd { border: 0; background: transparent; color: var(--ink); border-radius: 12px; padding: 7px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wd .l { font-size: 10.5px; font-weight: 650; letter-spacing: .04em; opacity: .75; }
.wd .n { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wd .d { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.wd.has .d { background: var(--accent); }
.wd:disabled { opacity: .3; }
.wd.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.wd.sel { background: var(--accent); color: #fff; box-shadow: none; }
.wd.sel .d { background: #fff; }

.hero { margin: 0 16px 14px; background: var(--hero); border: 1px solid var(--hero-bd); color: #fff; border-radius: 18px; padding: 16px 16px 14px; }
.hero .eyebrow { color: var(--hero-eyebrow); }
.hero-n { font-size: 25px; font-weight: 750; letter-spacing: -.02em; line-height: 1.12; margin: 6px 0 4px; text-wrap: balance; }
.hero-sub { font-size: 13px; color: var(--hero-text); line-height: 1.45; }
.hero-prog { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.track { flex: 1; height: 8px; border-radius: 999px; background: var(--hero-track); overflow: hidden; }
.track > div { height: 100%; background: var(--good); border-radius: 999px; transition: width .3s ease; }
.hero-prog span { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-btns { display: flex; gap: 8px; margin-top: 14px; }
.hbtn { flex: 1; height: 38px; border-radius: 10px; border: 0; background: #fff; color: #0b0b0b; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.hbtn svg { width: 15px; height: 15px; }
.hbtn.ghost { border: 1px solid var(--hero-line); background: transparent; color: #fff; }
.adot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: none; display: inline-block; }

.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-soft-ink); }
.eyebrow.green { color: var(--good-text); }
.intro { padding: 4px 16px 12px; }
.intro-t { font-size: 24px; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; margin: 4px 0 2px; }
.intro-s { font-size: 13px; color: var(--ink-2); }

.chips { display: flex; gap: 6px; padding: 0 16px 14px; overflow-x: auto; }
.chip { flex: none; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 650; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-soft-ink); }
.chip .c { font-weight: 500; opacity: .75; margin-left: 3px; font-variant-numeric: tabular-nums; }

.sechead { display: flex; align-items: baseline; gap: 8px; padding: 0 16px 10px; }
.sechead h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.sechead span { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.list { display: grid; gap: 10px; padding: 0 16px 20px; }
.list.tight { gap: 8px; }

/* ── a story card ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 13px 14px 10px; cursor: pointer; min-width: 0; overflow: hidden; }
.card:hover { border-color: var(--hover); }
.card-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.card-meta .subj { min-width: 0; flex: 0 1 auto; }
.rank { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 6px; background: var(--ink); color: var(--page); font-size: 12px; font-weight: 800; }
.grade { font-size: 11px; font-weight: 700; border-radius: 5px; padding: 2px 6px; letter-spacing: .02em; }
.g-NOTE { background: var(--g-note); color: var(--g-note-ink); }
.g-SKIM { background: var(--g-skim); color: var(--g-skim-ink); }
.g-READ, .g-LOW { background: var(--g-read); color: var(--g-read-ink); }
.gsp { font-size: 11px; font-weight: 700; border-radius: 5px; padding: 1px 6px; border: 1px solid var(--border); color: var(--ink-2); }
.min { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.subj { font-size: 11px; font-weight: 600; border-radius: 5px; padding: 2px 6px; background: var(--surface-2); color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 11px; font-weight: 600; border-radius: 5px; padding: 2px 6px; background: var(--accent-soft); color: var(--accent-soft-ink); white-space: nowrap; }
.card-title { font-size: 16px; font-weight: 700; line-height: 1.32; letter-spacing: -.01em; margin: 8px 0 4px; text-wrap: pretty; overflow-wrap: anywhere; }
.card.done .card-title { color: var(--muted); }
.card-why { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card-why b { color: var(--ink); font-weight: 650; }
.card-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; min-width: 0; }
.vpill { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: 8px; background: var(--critical-soft); color: var(--ink); font-size: 12px; font-weight: 650; white-space: nowrap; flex: none; }
.vpill svg { width: 13px; height: 13px; fill: var(--critical); }
.vpill.find { background: var(--surface-2); color: var(--ink-2); }
.vpill.find svg { fill: var(--muted); }
.src { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.star { border: 0; background: transparent; width: 32px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); flex: none; padding: 0; }
.star svg { width: 18px; height: 18px; }
.star.on { color: var(--accent); }
.done-btn { width: 34px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; flex: none; padding: 0; }
.done-btn svg { width: 15px; height: 15px; }
.done-btn.on { background: var(--good); border-color: var(--good); color: #fff; }

/* one-line rows: the one-liners under the cards, and Low */
.more { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin: 0 16px 20px; overflow: hidden; }
.mrow { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-top: 1px solid var(--grid); cursor: pointer; min-width: 0; }
.mrow:first-child { border-top: 0; }
.mrow .grade { flex: none; margin-top: 1px; }
.mrow-t { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.mrow-t small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.mrow.done .mrow-t { color: var(--muted); }
.mrow .star { margin: -4px -6px -4px 0; }
.showmore { display: block; width: 100%; border: 0; border-top: 1px solid var(--grid); background: transparent; padding: 11px; font-size: 13px; font-weight: 700; color: var(--accent-strong); }
.lowbox { border-style: dashed; }
.lowbox .showmore { border-top: 0; color: var(--ink-2); }
.lowbox .mrow:first-of-type { border-top: 1px solid var(--grid); }
.mrow.low .mrow-t { font-weight: 500; color: var(--ink-2); }

/* ── Read ── */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 2px; }
.seg.inline { display: inline-grid; grid-template-columns: auto auto; }
.seg button { border: 0; background: transparent; padding: 7px 16px; border-radius: 8px; font-weight: 650; font-size: 13px; color: var(--ink-2); }
.seg button.on { background: var(--surface); box-shadow: var(--shadow-seg); color: var(--ink); }
.grouphead { padding: 8px 16px 6px; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.grouphead h2 { margin: 0; font-size: 16px; flex: none; }
.grouphead span { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; cursor: pointer; min-width: 0; overflow: hidden; }
.pcard:hover { border-color: var(--hover); }
.pcard-top { display: flex; gap: 5px; align-items: center; min-width: 0; }
.kind { font-size: 11px; font-weight: 700; border-radius: 5px; padding: 2px 6px; background: var(--surface-2); color: var(--ink); flex: none; letter-spacing: .02em; }
.kind.ex { background: var(--good-soft); color: var(--good-text); }
.pcard-src { font-size: 11.5px; font-weight: 650; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.pcard-t { font-size: 15.5px; font-weight: 700; line-height: 1.32; margin: 7px 0 4px; text-wrap: pretty; overflow-wrap: anywhere; }
.pcard.done .pcard-t { color: var(--muted); }
.pcard-w { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-w b { color: var(--ink); font-weight: 650; }
.xcard { padding: 0; }
.xcard .pbody { padding: 12px 14px; }
.xband { aspect-ratio: 16 / 7; position: relative; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); }
.xband img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.xband .term { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--accent-soft-ink); padding: 0 16px; text-align: center; line-height: 1.15; text-wrap: balance; overflow-wrap: anywhere; }
.xband .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, .65); display: grid; place-items: center; }
.xband .play svg { width: 18px; height: 18px; fill: #fff; margin-left: 2px; }

/* ── panels (Insights, Review) ── */
.panel { margin: 0 16px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; min-width: 0; }
.ph { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 700; margin-bottom: 10px; }
.ph span { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); }
.ps { font-size: 12px; color: var(--muted); margin: -6px 0 12px; }
.streak { margin: 0 16px 12px; background: var(--hero); border: 1px solid var(--hero-bd); color: #fff; border-radius: 18px; padding: 16px; }
.streak-top { display: flex; align-items: baseline; gap: 8px; }
.streak-n { font-size: 34px; font-weight: 750; letter-spacing: -.03em; }
.streak-l { font-size: 14px; font-weight: 650; }
.streak-best { font-size: 12px; color: var(--hero-text); }
.streak-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.streak-days > div { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.streak-days .b { width: 100%; height: 30px; border-radius: 8px; background: var(--hero-track); display: grid; place-items: center; color: #0b0b0b; font-size: 11px; font-weight: 800; }
.streak-days .b.ok { background: var(--good); }
.streak-days .b.now { background: var(--amber); }
.streak-days span { font-size: 10.5px; color: var(--hero-muted); font-weight: 650; }
.streak-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hero-track); }
.streak-kpis b { display: block; font-size: 18px; font-weight: 700; }
.streak-kpis span { font-size: 11.5px; color: var(--hero-muted); }
.intel { margin: 0 16px 12px; background: var(--accent-soft); border-radius: 14px; padding: 14px; display: flex; gap: 12px; align-items: flex-start; }
.intel-h { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-soft-ink); }
.intel-t { font-size: 14px; line-height: 1.5; margin: 4px 0 10px; color: var(--ink); }
.btn-p { height: 32px; border-radius: 9px; border: 0; background: var(--btn); color: #fff; padding: 0 12px; font-weight: 700; font-size: 12.5px; }
.mastery { display: grid; gap: 10px; }
.mrowg { display: grid; grid-template-columns: 58px minmax(0, 1fr) 42px; gap: 10px; align-items: center; }
.mrowg b { font-size: 13px; }
.bar { height: 10px; border-radius: 999px; background: var(--grid); overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); border-radius: 999px; }
.bar.low > div { background: var(--critical); }
.mrowg span { font-size: 12.5px; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; color: var(--accent); }
.mrowg span.low { color: var(--critical); }
.blind { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--grid); }
.blind:first-of-type { border-top: 0; }
.bang { width: 20px; height: 20px; border-radius: 50%; background: var(--critical); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.blind-t { flex: 1; min-width: 0; }
.blind-t b { display: block; font-size: 14px; font-weight: 650; }
.blind-t span { font-size: 12px; color: var(--muted); }
.btn-o { height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); padding: 0 10px; font-size: 12.5px; font-weight: 650; color: var(--accent-strong); flex: none; }
.thread { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.thread + .thread { margin-top: 12px; }
.thread-t { flex: 1; min-width: 0; }
.thread-t b { display: block; font-size: 14px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.thread-t span { font-size: 12px; color: var(--muted); }
.spark { display: flex; gap: 2px; align-items: flex-end; height: 26px; flex: none; }
.spark i { width: 5px; background: var(--accent-line); border-radius: 2px; display: block; }
.spark i.last { background: var(--accent-strong); }
.radar { display: flex; gap: 10px; align-items: center; cursor: pointer; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.radar + .radar { margin-top: 8px; }
.radar .k { font-size: 11px; font-weight: 700; border-radius: 5px; padding: 2px 6px; background: var(--btn); color: #fff; flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radar-t { flex: 1; min-width: 0; }
.radar-t b { display: block; font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radar-t span { font-size: 12px; color: var(--ink-2); }
.radar svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.kpi b { display: block; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.kpi b.bad { color: var(--critical); }
.kpi span { font-size: 11.5px; color: var(--ink-2); }
.bars { display: grid; gap: 8px; align-items: end; height: 110px; border-bottom: 1px solid var(--baseline); }
.bars > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.bars span { font-size: 10.5px; color: var(--ink-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.bars i { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; display: block; min-height: 2px; }
.bars i.part { background: var(--baseline); }
.barlabels { display: grid; gap: 8px; margin-top: 5px; }
.barlabels span { text-align: center; font-size: 10.5px; color: var(--muted); }
.cov { display: grid; gap: 8px; }
.cov > div { display: grid; grid-template-columns: 124px minmax(0, 1fr) 28px; gap: 8px; align-items: center; font-size: 12.5px; }
.cov .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cov .gap { color: var(--critical); font-weight: 650; }
.cov .bx { height: 10px; position: relative; }
.cov .bx i { position: absolute; left: 0; top: 0; bottom: 0; min-width: 2px; background: var(--accent); border-radius: 0 4px 4px 0; }
.cov .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.top5 { display: grid; gap: 10px; }
.top5 > div { display: flex; gap: 10px; cursor: pointer; }
.top5 .r { font-size: 13px; font-weight: 800; color: var(--muted); width: 14px; flex: none; }
.top5 b { display: block; font-size: 13.5px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.top5 small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ── Saved ── */
.savedhead { padding: 4px 16px 12px; display: flex; align-items: flex-end; gap: 10px; }
.savedhead > div { flex: 1; min-width: 0; }
.btn-pdf { height: 34px; border-radius: 9px; border: 0; background: var(--btn); color: #fff; padding: 0 12px; font-weight: 700; font-size: 12.5px; display: flex; align-items: center; gap: 6px; flex: none; }
.btn-pdf svg { width: 14px; height: 14px; }
.scard { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; cursor: pointer; min-width: 0; }
.scard-top { display: flex; gap: 5px; align-items: center; }
.scard-t { font-size: 15px; font-weight: 700; line-height: 1.32; margin: 6px 0 0; overflow-wrap: anywhere; }
.scard-m { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.note { margin-top: 8px; border-left: 3px solid var(--accent); padding: 6px 10px; background: var(--accent-soft); border-radius: 0 8px 8px 0; font-size: 13px; color: var(--accent-soft-ink); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── tab bar ── */
.tabbar { bottom: 0; z-index: 25; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 8px 6px calc(10px + var(--safe-b)); border-top: 1px solid var(--border); background: var(--bar-bg); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
.tabbar button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; color: var(--muted); position: relative; }
.tabbar svg { width: 23px; height: 23px; }
.tabbar span { font-size: 10.5px; font-weight: 650; }
.tabbar button.on { color: var(--accent-strong); }
.badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--critical); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }

/* ── story view ── */
.story { top: 0; bottom: 0; z-index: 40; background: var(--page); display: flex; flex-direction: column; animation: slidein .24s cubic-bezier(.2, .8, .2, 1); }
.story-bar { display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 8px) 10px 8px; border-bottom: 1px solid var(--border); flex: none; }
.back { border: 0; background: transparent; display: flex; align-items: center; gap: 2px; color: var(--accent); font-size: 15px; font-weight: 600; padding: 6px; }
.back svg { width: 22px; height: 22px; }
.story-bar .ib { border-radius: 10px; }
.story-bar .ib.on { color: var(--accent); }
.story-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 14px 16px 24px; }
.story h1 { font-size: 22px; line-height: 1.25; letter-spacing: -.02em; margin: 10px 0 6px; text-wrap: pretty; overflow-wrap: anywhere; }
.story-meta { font-size: 12.5px; color: var(--muted); }
.sumbox { margin-top: 14px; border: 1px solid var(--accent-line); background: var(--surface); border-radius: 14px; padding: 12px 14px; }
.sumh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-soft-ink); }
.pts { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pts li { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.pts li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 8px; }
.sumsrc { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.sumstep { color: var(--accent-soft-ink); font-weight: 600; }
.sumstep::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--amber); animation: amberpulse 1.2s infinite; }
.grade { white-space: nowrap; }
.qchips { display: flex; gap: 6px; margin-top: 12px; overflow-x: auto; }
.qchip { flex: none; border: 1px solid var(--border); background: var(--accent-soft); color: var(--accent-soft-ink); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 650; }
.qchip.claude { background: var(--surface); border-color: var(--accent); }
.vcard { margin: 12px 0 4px; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 8px; background: var(--surface); color: var(--ink); }
.vthumb { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: repeating-linear-gradient(135deg, var(--grid) 0 7px, var(--surface-2) 7px 14px); }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vthumb .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .65); display: grid; place-items: center; }
.vthumb .play svg { width: 16px; height: 16px; fill: #fff; margin-left: 2px; }
.vcard b { font-size: 13.5px; font-weight: 650; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vcard small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.rows { display: grid; gap: 16px; margin-top: 16px; }
.rl { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-soft-ink); margin-bottom: 4px; }
.rt { font-size: 15px; line-height: 1.55; text-wrap: pretty; overflow-wrap: anywhere; }
.facts { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.facts li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 8px; }
.mains { background: var(--hero); border: 1px solid var(--hero-bd); color: #fff; border-radius: 14px; padding: 14px; }
.mains .rl { color: var(--hero-eyebrow); margin-bottom: 6px; }
.mains p { margin: 0; font-size: 15px; line-height: 1.5; font-style: italic; overflow-wrap: anywhere; }
.mains small { display: block; font-size: 12px; color: var(--hero-muted); margin-top: 8px; }
.kws { display: flex; flex-wrap: wrap; gap: 6px; }
.kws span { background: var(--surface-2); border-radius: 6px; padding: 3px 9px; font-size: 13px; }
.links { display: grid; gap: 2px; }
.links a { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--grid); font-size: 14px; font-weight: 650; color: var(--ink); min-width: 0; }
.links a span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.links a small { font-weight: 500; color: var(--muted); font-size: 12px; }
.links a svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.links .pw { font-size: 10.5px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; flex: none; }
.notebox { width: 100%; min-height: 76px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 10px; font: inherit; font-size: 14px; resize: vertical; outline: none; color: var(--ink); }
.notebox:focus { border-color: var(--accent); }
.story-foot { flex: none; display: flex; gap: 8px; padding: 10px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--border); background: var(--page); }
.askbtn { height: 46px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--accent-soft); color: var(--accent-soft-ink); font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 7px; flex: none; }
.bigdone { flex: 1; height: 46px; border-radius: 12px; border: 1px solid var(--good); background: var(--good); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.bigdone svg { width: 17px; height: 17px; }
.bigdone.on { background: var(--good-soft); color: var(--good-text); border-color: var(--good-bd); }

/* ── sheets ── */
.scrim { position: fixed; inset: 0; z-index: 45; background: rgba(0, 0, 0, .35); animation: fadein .2s; }
.sheet { bottom: 0; z-index: 50; background: var(--surface); border-radius: 24px 24px 0 0; padding: 10px 16px calc(24px + var(--safe-b)); animation: sheetup .26s cubic-bezier(.2, .8, .2, 1); max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; }
.grab { width: 38px; height: 5px; border-radius: 3px; background: var(--baseline); margin: 0 auto 12px; }
.sheet-h { display: flex; align-items: center; gap: 8px; }
.sheet-h > div { flex: 1; min-width: 0; }
.sheet-title { font-size: 18px; font-weight: 750; letter-spacing: -.01em; }
.sheet-sub { font-size: 12.5px; color: var(--muted); }
.x { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); flex: none; padding: 0; }
.x svg { width: 14px; height: 14px; }
.calhead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.calhead .ib { width: 34px; height: 34px; border-radius: 9px; }
.calhead .ib:disabled { opacity: .35; }
.calhead div { flex: 1; text-align: center; font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.calgrid .w { font-size: 11px; font-weight: 650; color: var(--muted); text-align: center; padding: 4px 0; }
.cd { height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; padding: 0; }
.cd i { width: 4px; height: 4px; border-radius: 50%; background: transparent; display: block; }
.cd.has i { background: var(--accent); }
.cd:disabled { opacity: .35; }
.cd.today { box-shadow: inset 0 0 0 1.5px var(--accent); font-weight: 750; }
.cd.sel { background: var(--accent); color: #fff; font-weight: 750; box-shadow: none; }
.cd.sel i { background: #fff; }
.calfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.calfoot span { display: flex; align-items: center; gap: 6px; }
.calfoot span i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: block; flex: none; }
.linkb { border: 0; background: none; color: var(--accent-strong); font-weight: 700; font-size: 13px; padding: 0; flex: none; }
.scopes { display: flex; gap: 6px; margin: 14px 0 12px; }
.scopes button { flex: 1; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); border-radius: 10px; padding: 7px 4px; font-size: 12.5px; font-weight: 650; }
.scopes button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-soft-ink); }
.expbody { display: flex; gap: 12px; align-items: stretch; }
.a4 { width: 132px; flex: none; aspect-ratio: 210 / 297; background: #fff; color: #0b0b0b; border-radius: 4px; box-shadow: 0 1px 2px rgba(11, 11, 11, .08), 0 8px 24px rgba(11, 11, 11, .12); padding: 10px 9px; overflow: hidden; display: flex; flex-direction: column; gap: 5px; }
.a4-h { display: flex; align-items: center; gap: 4px; font-size: 5.5px; font-weight: 800; }
.a4-h small { margin-left: auto; font-size: 4.5px; color: #7a7873; font-weight: 400; }
.a4-rule { height: 1px; background: #0b0b0b; }
.a4-t { font-family: Georgia, "Times New Roman", serif; font-size: 11px; font-weight: 700; line-height: 1.1; }
.a4-i { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; border-top: .5px solid #e1e0d9; }
.a4-i .m { display: flex; gap: 2px; font-size: 4px; color: #52514e; }
.a4-i .m b { font-weight: 800; background: #1c5cab; color: #fff; padding: 0 2px; border-radius: 1px; }
.a4-i .tt { font-family: Georgia, serif; font-size: 6px; font-weight: 700; line-height: 1.15; }
.a4-i i { display: block; height: 2px; background: #e1e0d9; border-radius: 1px; }
.a4-i .v { font-size: 4px; color: #d03b3b; font-weight: 700; }
.toggles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.toggles .ph { margin-bottom: 4px; font-size: 11px; font-weight: 800; }
.tg { border: 0; background: transparent; display: flex; align-items: center; gap: 8px; padding: 5px 0; text-align: left; }
.tg span { flex: 1; font-size: 13px; font-weight: 600; line-height: 1.25; }
.sw { width: 34px; height: 20px; border-radius: 999px; background: var(--baseline); position: relative; flex: none; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.tg.on .sw { background: var(--good); }
.tg.on .sw::after { transform: translateX(14px); }
.expmeta { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.bigbtn { margin-top: 12px; width: 100%; height: 48px; border-radius: 12px; border: 0; background: var(--btn); color: #fff; font-weight: 750; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.bigbtn svg { width: 17px; height: 17px; }
.bigbtn:disabled { background: var(--ink-2); }
.fine { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.searchin { display: flex; gap: 8px; margin: 12px 0; }
.searchin input { flex: 1; min-width: 0; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--page); padding: 0 14px; font: inherit; font-size: 16px; outline: none; color: var(--ink); }
.searchin input:focus { border-color: var(--accent); }
.results { display: grid; gap: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.results:empty { display: none; }

/* ── Ask Intel ── */
.bot { bottom: 0; z-index: 50; height: 86vh; height: 86dvh; background: var(--page); border-radius: 24px 24px 0 0; display: flex; flex-direction: column; animation: sheetup .26s cubic-bezier(.2, .8, .2, 1); overflow: hidden; }
.bot .grab { margin: 10px auto 8px; flex: none; }
.bot-h { display: flex; align-items: center; gap: 10px; padding: 0 16px 12px; border-bottom: 1px solid var(--border); flex: none; }
.bot-h > div { flex: 1; min-width: 0; }
.bot-h b { display: block; font-size: 16px; font-weight: 750; }
.bot-h small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bot-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; border-radius: 16px 16px 16px 4px; padding: 10px 12px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; background: var(--surface); color: var(--ink); border: 1px solid var(--border); align-self: flex-start; }
.msg.me { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--btn); border-color: var(--btn); color: #fff; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin-bottom: 0; }
.msg ul, .msg ol { margin: 4px 0 6px; padding-left: 18px; } .msg li { margin: 3px 0; }
.msg a { color: var(--accent-strong); font-weight: 600; }
.msg .bot-lead { font-weight: 700; }
.msg .bot-sub { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-soft-ink); margin-top: 6px; }
.msg .bot-sub .bot-src { text-transform: none; letter-spacing: 0; font-weight: 500; }
.msg .bot-src { font-size: 12px; color: var(--muted); }
.msg .bot-dl { margin: 0; display: grid; gap: 6px; }
.msg .bot-dl div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; }
.msg .bot-dl dt { font-weight: 700; font-size: 12.5px; color: var(--ink-2); }
.msg .bot-dl dd { margin: 0; }
.msg .mq { font-style: italic; }
.msg .linkbtn { border: 0; background: none; color: var(--accent-strong); font-weight: 700; font-size: 13px; padding: 0; text-align: left; }
.msg .free { font-size: 10.5px; font-weight: 700; color: var(--good-text); border: 1px solid currentColor; border-radius: 5px; padding: 0 4px; }
.msg .pill { font-size: 10.5px; font-weight: 700; border-radius: 4px; padding: 1px 5px; }
.msg .pill.g-NOTE { background: var(--g-note); color: var(--g-note-ink); } .msg .pill.g-SKIM { background: var(--g-skim); color: var(--g-skim-ink); } .msg .pill.g-READ { background: var(--g-read); color: var(--g-read-ink); }
.msg .bot-hits li { margin: 6px 0; }
.msg .mcq { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin: 6px 0; background: var(--page); }
.msg .mcq-q { font-weight: 600; }
.msg .mcq details summary { cursor: pointer; color: var(--accent-strong); font-weight: 650; font-size: 13px; }
.msg .plan li { margin: 6px 0; }
.busy { align-self: flex-start; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 4px 2px; }
.busy i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: amberpulse 1.2s infinite; flex: none; }
.bot-chips { display: flex; gap: 6px; padding: 8px 16px; overflow-x: auto; flex: none; border-top: 1px solid var(--border); }
.bot-chips button { flex: none; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 11px; font-size: 12.5px; font-weight: 650; color: var(--accent-soft-ink); }
.bot-chips button.claude { border-color: var(--accent); }
.bot-in { display: flex; gap: 8px; padding: 6px 16px calc(12px + var(--safe-b)); flex: none; }
.bot-in input { flex: 1; min-width: 0; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); padding: 0 14px; font: inherit; font-size: 16px; outline: none; color: var(--ink); }
.bot-in input:focus { border-color: var(--accent); }
.send { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--btn); color: #fff; display: grid; place-items: center; flex: none; padding: 0; }
.send svg { width: 18px; height: 18px; }
.bot-foot { font-size: 11px; color: var(--muted); padding: 0 16px 6px; line-height: 1.4; flex: none; }

.toast { bottom: calc(88px + var(--safe-b)); z-index: 60; padding: 0 16px; pointer-events: none; }
.toast > div { background: #0b0b0b; color: #f9f9f7; border-radius: 12px; padding: 11px 14px; font-size: 13.5px; line-height: 1.45; border-left: 4px solid var(--good); box-shadow: 0 8px 28px rgba(0, 0, 0, .25); animation: fadein .2s; pointer-events: auto; }
.toast button { border: 0; background: none; color: #9ec5f4; font-weight: 700; padding: 0 0 0 8px; }
:root[data-theme="dark"] .toast > div { background: #2c2c2a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast > div { background: #2c2c2a; } }

@media print { .tabbar, .top, .toast { display: none !important; } }

/* ── Practice (the shared widget in intel-core.js) ── */
.px { max-width: 760px; margin: 0 auto; padding: 4px 0 28px; color: var(--ink); }
.px-head h2 { font-size: 22px; line-height: 1.25; margin: 4px 0 6px; }
.px-head p, .px-res p { color: var(--ink-2); margin: 0 0 14px; font-size: 14px; }
.px-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-strong); }
.px-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0; }
.px-lab { width: 86px; font-size: 13px; font-weight: 700; color: var(--muted); }
.px-chip { border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.px-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-soft-ink); }
.px-day { border: 1px solid var(--border); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13.5px; }
.px-go { display: block; width: 100%; margin: 16px 0 8px; padding: 13px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font: inherit; font-size: 15.5px; font-weight: 700; cursor: pointer; }
.px-go:disabled { opacity: .5; cursor: default; }
.px-fine { font-size: 12.5px; color: var(--muted); margin: 8px 0; }
.px-link { border: 0; background: none; padding: 0; font: inherit; color: var(--accent-strong); font-weight: 700; cursor: pointer; text-decoration: underline; }
.px-hist { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 10px; }
.px-hist h3, .px-rh { font-size: 14px; margin: 8px 0 6px; }
.px-hist ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.px-toast { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.px-top { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.px-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.px-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.px-q { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.px-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.px-tags span { font-size: 11.5px; font-weight: 700; color: var(--ink-2); background: var(--surface-2); border-radius: 6px; padding: 2px 7px; }
.px-tags .px-type { background: var(--accent-soft); color: var(--accent-soft-ink); }
.px-stem { font-size: 15.5px; font-weight: 650; line-height: 1.45; margin: 4px 0 8px; }
.px-items { margin: 0 0 8px; padding-left: 22px; font-size: 14.5px; line-height: 1.5; }
.px-items li { margin: 4px 0; }
.px-sent { margin: 0 0 8px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; font-size: 14.5px; line-height: 1.5; }
.px-ask { font-weight: 650; font-size: 14.5px; margin: 6px 0 10px; }
.px-opts { display: grid; gap: 8px; }
.px-opt { text-align: left; border: 1.5px solid var(--border); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14.5px; line-height: 1.4; cursor: pointer; }
.px-opt b { color: var(--muted); margin-right: 4px; }
.px-opt:hover:not(:disabled) { border-color: var(--accent); }
.px-opt.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-soft-ink); }
.px-opt.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 14%, var(--surface)); }
.px-opt.wrong { border-color: var(--critical); background: var(--critical-soft); }
.px-opt:disabled { cursor: default; opacity: 1; }
.px-why { margin-top: 12px; border-radius: 10px; padding: 10px 12px; background: var(--surface-2); font-size: 13.5px; line-height: 1.5; }
.px-why.ok { background: color-mix(in srgb, var(--good) 12%, var(--surface)); }
.px-why.bad { background: var(--critical-soft); }
.px-why p { margin: 4px 0; }
.px-src, .px-src a { color: var(--accent-strong); font-size: 12.5px; }
.px-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.px-sp { flex: 1; }
.px-btn { border: 1px solid var(--border); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 9px 14px; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
.px-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.px-btn:disabled { opacity: .45; cursor: default; }
.px-score { font-size: 44px; font-weight: 800; line-height: 1.1; margin: 6px 0; }
.px-score small { font-size: 18px; color: var(--muted); font-weight: 700; }
.px-sbars { display: grid; gap: 6px; margin: 8px 0 4px; }
.px-sbar { display: grid; grid-template-columns: minmax(90px, 180px) 1fr 44px; align-items: center; gap: 8px; font-size: 13px; }
.px-sbar div { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.px-sbar i { display: block; height: 100%; background: var(--good); }
.px-sbar b { text-align: right; }
.px-rev { margin: 10px 0; }
.px-rev .px-q { padding: 12px 14px; }
@media (max-width: 560px) {
  .px-lab { width: 100%; }
  .px-head h2 { font-size: 19px; }
  .px-q { padding: 12px; }
}

/* Practice tab and the full PDF in the export sheet */
.pxwrap { padding: 8px 16px 24px; }
.pdfdl { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin: 4px 0 2px; border-radius: 14px; background: var(--accent); color: #fff; text-decoration: none; }
.pdfdl svg { width: 26px; height: 26px; flex: none; }
.pdfdl span { display: grid; gap: 2px; }
.pdfdl b { font-size: 15px; }
.pdfdl small { font-size: 12px; opacity: .9; line-height: 1.35; }

/* ✦ Gemini: the chip that opens the key form, and the form itself (in the bot's log) */
:root { --gem: #6a4fd8; --gem-soft: rgba(106, 79, 216, 0.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --gem: #a896ff; --gem-soft: rgba(168, 150, 255, 0.16); } }
:root[data-theme="dark"] { --gem: #a896ff; --gem-soft: rgba(168, 150, 255, 0.16); }
.bot-chips button.gem { border-color: var(--gem); color: var(--gem); }
.bot-chips button.gem.on { background: var(--gem-soft); }
.gem-form { display: flex; gap: 8px; margin: 8px 0; }
.gem-form input { flex: 1; min-width: 0; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); padding: 0 12px; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.gem-form input:focus { border-color: var(--gem); }
.gem-form button { flex: none; height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--gem); color: #fff; font-weight: 700; }
.gem-form button:disabled { opacity: 0.6; }

/* Practice hub: modes, flashcards, Mains answer writing, the mock's clock */
.px-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding-bottom: 2px; }
.px-tabs::-webkit-scrollbar { display: none; }
.px-tab { flex: none; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.px-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.px-tab i { font-style: normal; font-size: 11.5px; background: var(--critical-soft); color: var(--ink); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.px-tab.on i { background: rgba(255, 255, 255, 0.25); color: #fff; }
.px-timer { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--accent-strong); background: var(--accent-soft); border-radius: 8px; padding: 2px 8px; }
.px-card { min-height: 180px; }
.px-cq { font-size: 18px; font-weight: 700; line-height: 1.45; margin: 10px 0 14px; }
.px-ca { font-size: 17px; line-height: 1.5; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--good) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--good) 40%, var(--border)); margin: 0 0 8px; }
.px-grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.px-grade { border: 1.5px solid var(--border); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 10px 4px; font: inherit; cursor: pointer; display: grid; gap: 2px; text-align: center; }
.px-grade b { font-size: 14.5px; }
.px-grade small { font-size: 11.5px; color: var(--muted); }
.px-grade.g1 { border-color: var(--critical); }
.px-grade.g3 { border-color: var(--good); }
.px-grade.g4 { border-color: var(--accent); }
.mn-item { display: grid; gap: 6px; width: 100%; text-align: left; border: 1px solid var(--border); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 12px 14px; margin: 8px 0; font: inherit; cursor: pointer; }
.mn-item:hover { border-color: var(--accent); }
.mn-item b { font-size: 14.5px; line-height: 1.45; }
.mn-item small { font-size: 12.5px; color: var(--muted); }
.mn-item .px-tags { margin: 0; }
.mn-text { display: block; width: 100%; box-sizing: border-box; min-height: 240px; margin-top: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); padding: 12px; font: inherit; font-size: 16px; line-height: 1.55; resize: vertical; }
.mn-text:focus { outline: none; border-color: var(--accent); }
.mn-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.mn-wc { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.mn-wc.over { color: var(--critical); }
.mn-photo { cursor: pointer; }
.mn-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mn-thumbs figure { position: relative; margin: 0; }
.mn-thumbs img { width: 84px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }
.mn-thumbs button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 12px; cursor: pointer; }
.mn-block { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.mn-block h3 { font-size: 14px; margin: 0 0 6px; }
.mn-block ul, .mn-block ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.mn-block li { margin: 3px 0; }
.mn-block p { margin: 0; font-size: 14px; line-height: 1.55; }
.mn-block.ok { border-color: color-mix(in srgb, var(--good) 45%, var(--border)); }
.mn-block.bad { border-color: color-mix(in srgb, var(--critical) 45%, var(--border)); }
.mn-block summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.mn-mine { white-space: pre-wrap; margin-top: 8px !important; color: var(--ink-2); }
.mn-kw { display: flex; flex-wrap: wrap; gap: 6px; }
.mn-kw span { font-size: 12.5px; font-weight: 700; background: var(--accent-soft); color: var(--accent-soft-ink); border-radius: 6px; padding: 3px 8px; }
.mn-list { margin: 8px 0; padding-left: 20px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.mn-key { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--gem, var(--accent)); border-radius: 12px; background: var(--surface); }
.mn-key p { margin: 0 0 6px; font-size: 14px; }

/* 🎧 Listen: the mini-player */
.lsn { position: fixed; z-index: 60; display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--border); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18); }
.lsn[hidden] { display: none; }
.lsn-t { flex: 1; min-width: 0; display: grid; }
.lsn-t small { font-size: 11.5px; font-weight: 700; color: var(--accent-strong); }
.lsn-t b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lsn button { flex: none; min-width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.lsn button:hover { background: var(--surface-2); }
.lsn .lsn-main { background: var(--accent); color: #fff; }
.lsn { left: 10px; right: 10px; bottom: calc(78px + var(--safe-b)); }
/* the player: the bar, and (open) the stories and the lines of the one being read */
.lsn { flex-direction: column; align-items: stretch; gap: 0; padding: 6px; }
.lsn-bar { display: flex; align-items: center; gap: 2px; min-width: 0; }
.lsn .lsn-t { flex: 1; min-width: 0; height: auto; display: grid; text-align: left; padding: 2px 6px; background: transparent; }
.lsn .lsn-t small { font-size: 11.5px; font-weight: 700; color: var(--accent-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lsn .lsn-t b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lsn.open { max-height: min(78vh, 640px); }
.lsn-panel { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); margin-top: 6px; padding: 8px 4px 2px; min-height: 0; flex: 1; }
.lsn-opts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.lsn-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 2px; }
.lsn .lsn-seg button { height: 30px; min-width: 0; padding: 0 12px; font-size: 13px; font-weight: 650; border-radius: 8px; color: var(--ink-2); }
.lsn .lsn-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.lsn-voice { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--muted); min-width: 0; flex: 1 1 200px; justify-content: flex-end; }
.lsn-voice select { min-width: 0; max-width: 100%; flex: 1; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; padding: 0 6px; }
.lsn-fine { margin: 0; font-size: 12px; color: var(--muted); }
.lsn-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 10px; min-height: 0; flex: 1; }
.lsn-list, .lsn-lines { overflow-y: auto; max-height: 46vh; min-height: 0; }
.lsn-list { list-style: none; margin: 0; padding: 0; border-right: 1px solid var(--border); padding-right: 6px; }
.lsn .lsn-list button { display: flex; gap: 8px; width: 100%; height: auto; min-width: 0; padding: 7px 8px; text-align: left; font-size: 13px; font-weight: 600; line-height: 1.35; border-radius: 8px; }
.lsn .lsn-list button span { flex: none; min-width: 22px; font-size: 11.5px; font-weight: 800; color: var(--muted); padding-top: 1px; }
.lsn .lsn-list button.on { background: var(--surface-2); color: var(--accent-strong); }
.lsn .lsn-lines button { display: block; width: 100%; height: auto; min-width: 0; padding: 7px 10px; margin: 0 0 2px; text-align: left; font-size: 14px; font-weight: 500; line-height: 1.5; border-radius: 8px; color: var(--ink-2); }
.lsn .lsn-lines button.head { font-weight: 700; color: var(--ink); }
.lsn .lsn-lines button.on { background: var(--accent); color: #fff; }
.lsn-wait { margin: 8px; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) {
  .lsn-cols { grid-template-columns: minmax(0, 1fr); }
  .lsn-list { border-right: 0; border-bottom: 1px solid var(--border); padding: 0 0 6px; max-height: 20vh; }
  .lsn-lines { max-height: 30vh; }
  .lsn-voice { justify-content: flex-start; }
}

/* glossary: a marked term (tap for its meaning) and its card */
button.gl { display: inline; padding: 0; margin: 0; border: 0; background: none; font: inherit; color: inherit; text-align: inherit; cursor: help;
  text-decoration: underline dotted var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
button.gl:hover, button.gl[aria-expanded="true"] { color: var(--accent-strong); text-decoration-style: solid; }
.glpop { position: fixed; z-index: 80; width: min(320px, calc(100vw - 16px)); padding: 12px 14px; border-radius: 12px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); }
.glpop-h { display: flex; align-items: flex-start; gap: 8px; }
.glpop-h b { flex: 1; font-size: 14.5px; line-height: 1.35; }
.glpop-x { flex: none; width: 28px; height: 28px; margin: -4px -6px 0 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
.glpop-x:hover { background: var(--surface-2); color: var(--ink); }
.glpop p { margin: 6px 0 6px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.glpop small { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.glpop.sheet { left: 10px; right: 10px; bottom: calc(78px + var(--safe-b)); width: auto; }

/* India's Ranks: India in global indices */
.rk-root { max-width: 980px; }
.rks { padding: 4px 0 24px; }
.rk-top { margin: 0 0 12px; }
.rk-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-strong); }
.rk-top h2 { margin: 4px 0 6px; font-size: 22px; line-height: 1.25; }
.rk-top p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.rk-latest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; font-size: 13px; }
.rk-latest b { margin-right: 4px; color: var(--ink-2); }
.rk-latest button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; color: var(--ink); }
.rk-latest strong { color: var(--accent-strong); }
.rk-areas { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.rk-areas button { flex: none; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 650; cursor: pointer; color: var(--ink-2); }
.rk-areas button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.rk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.rk { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; transition: box-shadow .3s; }
.rk.flash { box-shadow: 0 0 0 3px var(--accent); }
.rk.empty { opacity: .72; }
.rk-h { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.rk-h b { display: block; font-size: 15px; line-height: 1.3; }
.rk-h small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.rk-rank { flex: none; text-align: right; }
.rk-n { display: block; font-size: 30px; font-weight: 800; line-height: 1; color: var(--ink); }
.rk-n sup { font-size: 13px; font-weight: 700; margin-left: 1px; }
.rk-rank small { font-size: 12px; color: var(--muted); }
.rk-move { align-self: flex-start; font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.rk-move.good { background: rgba(22, 163, 74, .12); color: #15803d; }
.rk-move.bad { background: rgba(220, 38, 38, .12); color: #b91c1c; }
.rk-score, .rk-about { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.rk-why b { font-size: 12.5px; }
.rk-why ul { margin: 4px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.45; }
.rk-src { margin: auto 0 0; padding-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.rk-src a { color: var(--accent-strong); }
@media (max-width: 640px) { .rk-list { grid-template-columns: minmax(0, 1fr); } .rk-top h2 { font-size: 19px; } }
#screen .rk-root { padding: 0 16px 24px; }

/* Dossiers: running stories with their timeline and story so far */
.ds-root, .mp-root { max-width: 980px; }
.ds { padding: 4px 0 24px; }
.ds-top { margin: 0 0 12px; }
.ds-eyebrow, .mp-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-strong); }
.ds-top h2, .mp-top h2 { margin: 4px 0 6px; font-size: 22px; line-height: 1.25; }
.ds-top p, .mp-top p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.ds-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.ds-q { flex: 1 1 220px; min-width: 0; height: 36px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); padding: 0 12px; font: inherit; font-size: 14px; }
.ds-seg, .mp-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ds-seg button, .mp-seg button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 650; cursor: pointer; color: var(--ink-2); }
.ds-seg button[aria-selected="true"], .mp-seg button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.ds-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ds-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ds-card.followed { border-color: var(--accent); }
.ds-go { border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ds-name { font-size: 15.5px; font-weight: 750; line-height: 1.3; color: var(--ink); }
.ds-go small { font-size: 12px; color: var(--muted); }
.ds-lead { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ds-new { display: inline-block; vertical-align: 2px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--accent); color: #fff; border-radius: 5px; padding: 1px 6px; }
.ds-follow { align-self: flex-start; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; font-weight: 650; cursor: pointer; color: var(--ink-2); }
.ds-follow[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.ds-one .ds-top .ds-follow { margin-top: 8px; }
.ds-back { border: 0; background: none; color: var(--accent-strong); font-weight: 700; font-size: 13.5px; padding: 4px 0; margin: 0 0 8px; cursor: pointer; }
.ds-sum { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; margin: 0 0 16px; }
.ds-sum h3, .ds-h { margin: 12px 0 4px; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.ds-sum h3:first-child { margin-top: 2px; }
.ds-sum ol, .ds-sum ul { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.55; }
.ds-sum li + li { margin-top: 3px; }
.ds-by { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.ds-note { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.ds-h { margin: 0 0 10px; }
.ds-tl { list-style: none; margin: 0 0 0 6px; padding: 0; border-left: 2px solid var(--border); }
.ds-tl li { position: relative; padding: 0 0 16px 16px; display: grid; gap: 2px; min-width: 0; }
.ds-tl li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-sizing: border-box; }
.ds-tl time { font-size: 12px; font-weight: 750; color: var(--accent-strong); }
.ds-tl a { font-size: 14.5px; font-weight: 650; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.ds-tl p { margin: 3px 0 2px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); overflow-wrap: anywhere; }
.ds-tl small { font-size: 12px; color: var(--muted); }
.ds-tl .pill { font-size: 10.5px; font-weight: 700; border-radius: 4px; padding: 1px 5px; vertical-align: 1px; white-space: nowrap; }
.ds-tl .linkbtn, .mp-pop .linkbtn { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; font-weight: 700; color: var(--accent-strong); cursor: pointer; }
.ds-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 2px; font-size: 12.5px; color: var(--muted); }
.ds-chip { border: 1px solid var(--accent-soft); background: var(--accent-soft); color: var(--accent-soft-ink); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 650; cursor: pointer; text-align: left; }

/* Places in the news: the map (Leaflet, OpenStreetMap tiles) */
.mp { padding: 4px 0 24px; }
.mp-top { margin: 0 0 10px; }
.mp-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; }
.mp-key { white-space: nowrap; }
.mp-key i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 4px 0 8px; vertical-align: -1px; }
.mp-key i.in { background: #2a78d6; }
.mp-key i.out { background: #e8793a; }
.mp-map { position: relative; z-index: 0; isolation: isolate; height: min(62vh, 520px); min-height: 300px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.mp-map.off { display: grid; place-items: center; height: auto; min-height: 0; padding: 18px; }
.mp-map .leaflet-container, .mp-map.leaflet-container { font: inherit; }
.mp-lists { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 14px; }
.mp-group h3 { margin: 0 0 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.mp-area { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 7px 0; border-top: 1px solid var(--border); }
.mp-area b { font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.mp-place { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 3px 10px; font-size: 13px; cursor: pointer; color: var(--ink); }
.mp-place span { font-size: 11px; font-weight: 800; color: var(--accent-strong); margin-left: 2px; }
.mp-note { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin: 0; }
.mp-pop { color: #1b1b1a; }
.mp-pop b { display: block; font-size: 14px; }
.mp-pop > small { display: block; font-size: 11.5px; color: #6b6a66; text-transform: capitalize; margin: 1px 0 6px; }
.mp-pop ul { margin: 0; padding-left: 16px; font-size: 13px; line-height: 1.4; }
.mp-pop li + li { margin-top: 6px; }
.mp-pop li span { display: block; font-size: 11.5px; color: #6b6a66; }
.mp-pop .linkbtn { color: #1c5cab; font-size: 11.5px; }
@media (max-width: 640px) { .ds-list, .mp-lists { grid-template-columns: minmax(0, 1fr); } .ds-top h2, .mp-top h2 { font-size: 19px; } .mp-map { height: 54vh; } }
#screen .ds-root, #screen .mp-root { padding: 0 16px 24px; }
/* Ask Intel on a dossier or an index */
.ask-intel { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-soft-ink); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.ds-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.ds-one .ds-top .ds-acts .ds-follow { margin-top: 0; }
/* a summary's two parts: what's happening, then the static background */
.sumsub { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 2px 0 6px; }
.sum-static { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.sumnote { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
/* backup your progress (Progress → My 30 days) */
.backup { margin: 0 16px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; min-width: 0; }
.backup.stale { border-color: var(--amber); }
.bk-h { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 700; }
.bk-t { margin: 8px 0 12px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.bk-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-when { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.bk-when.warn { color: var(--critical); font-weight: 650; }

/* The syllabus map: the GS papers' topics, coloured by how much they were in the news */
.sy-root { max-width: 1080px; }
.sy { padding: 4px 0 24px; }
.sy-top { margin: 0 0 12px; }
.sy-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-strong); }
.sy-top h2, .sy-one h2 { margin: 4px 0 6px; font-size: 22px; line-height: 1.25; }
.sy-top p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; max-width: 820px; }
.sy-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.sy-kpis div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.sy-kpis b { display: block; font-size: 20px; line-height: 1.1; }
.sy-kpis span { font-size: 12px; color: var(--muted); }
.sy-blind { border: 1px solid color-mix(in srgb, var(--critical) 35%, var(--border)); background: color-mix(in srgb, var(--critical) 5%, var(--surface)); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }
.sy-blind > b { font-size: 13px; }
.sy-blind div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sy-blind button { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 6px 10px; font: inherit; font-size: 13px; font-weight: 650; color: var(--ink); cursor: pointer; text-align: left; }
.sy-blind small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.sy-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; }
.sy-tabs button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 650; cursor: pointer; color: var(--ink-2); }
.sy-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.sy-pre { font-size: 13px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; margin-left: 4px; }
.sy-legend { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 11.5px; color: var(--muted); margin: 0 0 12px; }
.sy-legend i { width: 18px; height: 12px; border-radius: 3px; border: 1px solid var(--border); }
.sy-legend span { margin: 0 4px; }
.sy-paper h3 { font-size: 16px; margin: 18px 0 8px; }
.sy-paper h3 span { font-size: 13px; font-weight: 500; color: var(--muted); }
.sy-line { margin: 0 0 12px; }
.sy-lt { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.sy-tile { position: relative; text-align: left; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 14px; font: inherit; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow: hidden; }
.sy-tile b { font-size: 13.5px; line-height: 1.3; }
.sy-tile span { font-size: 12px; color: var(--ink-2); }
.sy-tile.h0, .sy-legend .h0 { background: var(--surface); }
.sy-tile.h1, .sy-legend .h1 { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.sy-tile.h2, .sy-legend .h2 { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.sy-tile.h3, .sy-legend .h3 { background: color-mix(in srgb, var(--accent) 38%, var(--surface)); }
.sy-tile.h4, .sy-legend .h4 { background: color-mix(in srgb, var(--accent) 56%, var(--surface)); }
.sy-tile.h0 span { color: var(--muted); }
.sy-bar { position: absolute; left: 12px; right: 12px; bottom: 6px; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.sy-bar i { display: block; height: 100%; border-radius: 2px; background: var(--good); }
.sy-note, .sy-src { font-size: 12px; color: var(--muted); margin: 12px 0 0; line-height: 1.5; }
.sy-src a { color: var(--accent-strong); }
.sy-one h3 { font-size: 14px; margin: 18px 0 8px; }
.sy-q { margin: 8px 0 10px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.sy-q b { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sy-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); margin: 0 0 10px; }
.sy-study { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); margin: 0 0 10px; }
.sy-study button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; font-weight: 650; cursor: pointer; color: var(--ink-2); }
.sy-study button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-soft-ink); }
.sy-ncert { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.6; }
.sy-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sy-items li { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.sy-items li.done { opacity: .7; }
.sy-items li > div { flex: 1; min-width: 0; }
.sy-items b { display: block; font-size: 13.5px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.sy-items small { font-size: 12px; color: var(--muted); }
.sy-items .pill { flex: none; font-size: 10.5px; font-weight: 700; border-radius: 4px; padding: 1px 5px; margin-top: 2px; white-space: nowrap; }
.sy-items .linkbtn { flex: none; border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--accent-strong); cursor: pointer; text-decoration: none; }
.sy-cards { display: flex; flex-direction: column; gap: 6px; }
.sy-cards details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.sy-cards summary { cursor: pointer; font-size: 13.5px; font-weight: 650; }
.sy-cards p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 640px) { .sy-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .sy-top h2, .sy-one h2 { font-size: 19px; } .sy-kpis b { font-size: 17px; } }
@media (max-width: 380px) { .sy-grid { grid-template-columns: minmax(0, 1fr); } }
#screen .sy-root { padding: 0 16px 24px; }
.sy-items .pill.g-NOTE { background: var(--g-note); color: var(--g-note-ink); } .sy-items .pill.g-SKIM { background: var(--g-skim); color: var(--g-skim-ink); } .sy-items .pill.g-READ { background: var(--g-read); color: var(--g-read-ink); } .sy-items .pill.g-LOW { border: 1px solid var(--border); color: var(--muted); }

/* Today's plan (the study planner) */
.pl { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; }
.pl-top h2 { margin: 2px 0 4px; font-size: 20px; line-height: 1.25; }
.pl-top p { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.pl-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-strong); }
.pl-count { font-size: 13.5px; color: var(--ink-2); }
.pl-count b { font-size: 17px; color: var(--ink); }
.pl-count span { font-weight: 700; color: var(--accent-strong); }
.pl-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 12px 0 4px; padding: 12px; border: 1px dashed var(--border); border-radius: 12px; }
.pl-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 650; color: var(--ink-2); }
.pl-form input, .pl-form select { height: 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--page); color: var(--ink); padding: 0 8px; font: inherit; font-size: 14px; }
.pl-fine { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--muted); }
.pl-tasks { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pl-tasks li { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; min-width: 0; background: var(--page); }
.pl-tasks li.pl-done { opacity: .72; }
.pl-tasks li.pl-done .pl-t b { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.pl-tasks li.pl-opt { border-style: dashed; }
.pl-tick { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); color: transparent; font-weight: 800; cursor: pointer; display: grid; place-items: center; padding: 0; }
.pl-tick[aria-pressed="true"] { background: var(--good); border-color: var(--good); color: #fff; }
.pl-tick:disabled { cursor: default; }
.pl-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-t b { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.pl-t span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.pl-tasks .btn-o { flex: none; }
.pl-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.pl-foot .linkbtn { border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--accent-strong); cursor: pointer; }
#screen .pl-root { padding: 8px 16px 24px; }
.plan-nudge { display: flex; align-items: center; gap: 8px; width: calc(100% - 32px); margin: 0 16px 10px; padding: 9px 12px; border: 1px solid var(--accent-soft); background: var(--accent-soft); color: var(--accent-soft-ink); border-radius: 12px; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.plan-nudge span { flex: 1; }
.plan-nudge svg { width: 16px; height: 16px; flex: none; }

/* Mains toolkit: the week's writing set, scores by paper, model answers; the syllabus topic's Mains bank */
.mn-week { margin: 14px 0 6px; }
.mn-week h3 { font-size: 14px; margin: 0 0 8px; }
.mn-week h3 small { font-weight: 500; color: var(--muted); font-size: 12px; }
.mn-trend li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mn-trend .up { color: var(--good-text); font-weight: 700; }
.mn-trend .down { color: var(--critical); font-weight: 700; }
.mn-spark { color: var(--accent); margin-left: auto; flex: none; }
.mn-angles { margin: 8px 0; font-size: 13px; }
.mn-angles summary { cursor: pointer; font-weight: 650; color: var(--accent-strong); }
.mn-angles ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.5; }
.mn-case p { margin: 0 0 8px; }
.mn-model p { margin: 0 0 8px; line-height: 1.55; }
.sy-bank { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.sy-bank > div { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.sy-bank b { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sy-bank ul { margin: 6px 0 0; padding-left: 16px; font-size: 13.5px; line-height: 1.5; }
.sy-bank li { margin: 0 0 6px; overflow-wrap: anywhere; }
.sy-bank small { color: var(--muted); font-size: 11.5px; }
.sy-bank .linkbtn { border: 0; background: none; padding: 0; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--accent-strong); cursor: pointer; }
