/* ═════════ THEME TOKENS ═════════ */
:root {
  /* RED / WHITE — default */
  --bg: #FFFFFF;
  --bg-panel: #FBF3F2;
  --ink: #1A1A1A;
  --ink-soft: #4A4A4A;
  --ink-muted: #8A8A8A;
  --accent: #C8202F;
  --accent-dk: #8A1621;
  --accent-soft: rgba(200, 32, 47, 0.08);
  --rule: #1A1A1A;
  --rule-soft: rgba(26, 26, 26, 0.14);
  --paper: #FDFAF7;

  --display: 'Roboto Slab', Georgia, serif;
  --sans: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'Roboto Mono', ui-monospace, monospace;
}

[data-theme="cream"] {
  --bg: #F3EFE7; --bg-panel: #EAE3D4; --ink: #1F3A3D; --ink-soft: #4A5E60;
  --ink-muted: #7B8A8B; --accent: #1F3A3D; --accent-dk: #122326;
  --accent-soft: rgba(31, 58, 61, 0.08);
  --rule: #1F3A3D; --rule-soft: rgba(31, 58, 61, 0.18); --paper: #FBF8F1;
}
[data-theme="ink"] {
  --bg: #0E0E0E; --bg-panel: #1A1A1A; --ink: #F5F1EA; --ink-soft: #C8C4BD;
  --ink-muted: #808080; --accent: #E8432F; --accent-dk: #B5321F;
  --accent-soft: rgba(232, 67, 47, 0.12);
  --rule: #F5F1EA; --rule-soft: rgba(245, 241, 234, 0.18); --paper: #1A1A1A;
}
[data-fonts="inter"] {
  --display: 'Source Serif 4', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
}

html, body { margin:0; padding:0; background:#000; }
body { font-family: var(--sans); color: var(--ink); }

/* ═════════ SLIDE BASE ═════════ */
.slide {
  background: var(--bg); color: var(--ink); font-family: var(--sans);
  display: flex; flex-direction: column; padding: 100px;
  box-sizing: border-box; position: relative;
}
.slide--paper { background: var(--paper); }
.slide--panel { background: var(--bg-panel); }
.slide--ink { background: var(--ink); color: var(--bg); }
.slide--accent { background: var(--accent); color: #fff; }

/* ═════════ HEADER / FOOTER ═════════ */
.run-header {
  position: absolute; top: 48px; left: 100px; right: 100px;
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--sans); font-size: 24px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-muted); font-weight: 500;
}
.run-header .rule { flex: 1; height: 1px; background: var(--rule-soft); margin: 0 24px; transform: translateY(-6px); }
.run-footer {
  position: absolute; bottom: 48px; left: 100px; right: 100px;
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 24px; color: var(--ink-muted); letter-spacing: 0.08em;
}
.run-footer .footer-topic { font-family: var(--sans); letter-spacing: 0.14em; text-transform: uppercase; font-size: 24px; font-weight: 500; }

/* ═════════ TYPOGRAPHY ═════════ */
.eyebrow { font-family: var(--sans); font-size: 26px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin: 0 0 36px; }
.h-title { font-family: var(--display); font-weight: 700; font-size: 88px; line-height: 1.05; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
.h-section { font-family: var(--display); font-weight: 600; font-size: 64px; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 48px; text-wrap: balance; }
.h-sub { font-family: var(--display); font-weight: 400; font-size: 42px; line-height: 1.2; margin: 0 0 32px; color: var(--ink-soft); }
.body { font-size: 30px; line-height: 1.5; font-weight: 400; color: var(--ink); }
.body--soft { color: var(--ink-soft); }
.small { font-size: 26px; line-height: 1.55; color: var(--ink-soft); }
.mono-label { font-family: var(--mono); font-size: 24px; letter-spacing: 0.06em; color: var(--accent); text-transform: uppercase; font-weight: 500; }
em.hi { font-style: normal; color: var(--accent); font-weight: 600; }
.en { font-family: var(--display); font-style: italic; font-weight: 500; color: var(--accent); }

/* ═════════ TITLE SLIDE ═════════ */
.title-slide { padding: 0; display: grid; grid-template-columns: 1.1fr 1fr; }
.title-slide .left { padding: 110px 100px; background: var(--accent); color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.title-slide .right { padding: 110px 100px; background: var(--bg); display: flex; flex-direction: column; justify-content: space-between; }
.title-slide .mark { font-family: var(--mono); font-size: 24px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; }
.title-slide .left .mark { color: rgba(255,255,255,0.75); }
.title-slide .right .mark { color: var(--accent); }
.title-slide .main { font-family: var(--display); font-size: 136px; line-height: 0.96; font-weight: 800; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
.title-slide .main em { font-style: italic; font-weight: 400; color: rgba(255,255,255,0.88); }
.title-slide .meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 60px; }
.title-slide .meta-grid dt { font-family: var(--mono); font-size: 24px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; font-weight: 500; }
.title-slide .meta-grid dd { margin: 0; font-family: var(--display); font-size: 32px; color: var(--ink); font-weight: 600; }

/* ═════════ SECTION BREAK ═════════ */
.section-break { padding: 0; display: grid; grid-template-columns: 380px 1fr; }
.section-break .band { background: var(--accent); color: #fff; padding: 80px 60px; display: flex; flex-direction: column; justify-content: space-between; }
.section-break .band .n { font-family: var(--display); font-size: 260px; line-height: 0.85; font-weight: 800; letter-spacing: -0.04em; color: rgba(255,255,255,0.95); }
.section-break .band .lbl { font-family: var(--mono); font-size: 24px; letter-spacing: 0.18em; text-transform: uppercase; }
.section-break .content { padding: 120px 100px; display: flex; flex-direction: column; justify-content: center; background: var(--bg); }
.section-break .content .eyebrow { color: var(--accent); }
.section-break .content h2 { font-family: var(--display); font-size: 120px; line-height: 0.98; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 48px; color: var(--ink); }
.section-break .content h2 em { font-style: italic; font-weight: 400; color: var(--accent); }
.section-break .content .toc { font-family: var(--mono); font-size: 22px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.1em; line-height: 2; }
.section-break .content .toc .active { color: var(--accent); font-weight: 600; }

/* ═════════ NUM LIST ═════════ */
.num-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.num-list li { counter-increment: step; display: grid; grid-template-columns: 92px 1fr; gap: 32px; padding: 26px 0; border-top: 1px solid var(--rule-soft); align-items: baseline; }
.num-list li:last-child { border-bottom: 1px solid var(--rule-soft); }
.num-list li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: 30px; color: var(--accent); font-weight: 500; }
.num-list .step-title { display: block; font-family: var(--display); font-size: 34px; line-height: 1.2; margin-bottom: 6px; font-weight: 600; color: var(--ink); }
.num-list .step-body { font-size: 24px; line-height: 1.45; color: var(--ink-soft); }

/* ═════════ TWO-COL ═════════ */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.col-card { border-top: 3px solid var(--accent); padding-top: 32px; }
.col-card .mono-label { margin-bottom: 14px; }
.col-card h3 { font-family: var(--display); font-weight: 700; font-size: 56px; margin: 0 0 28px; line-height: 1.1; }
.col-card ul { list-style: none; padding: 0; margin: 0; }
.col-card ul li { font-size: 26px; line-height: 1.5; padding: 16px 0 16px 36px; border-top: 1px solid var(--rule-soft); color: var(--ink-soft); position: relative; }
.col-card ul li:first-child { border-top: 0; }
.col-card ul li::before { content: "→"; color: var(--accent); font-family: var(--mono); position: absolute; left: 0; top: 16px; font-weight: 500; }

/* ═════════ PASSAGE ═════════ */
.passage { background: var(--paper); border: 1px solid var(--rule-soft); padding: 44px 52px; font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.65; color: var(--ink); position: relative; }
.passage h4 { font-family: var(--display); font-size: 32px; margin: 0 0 6px; font-weight: 700; }
.passage .meta { font-family: var(--mono); font-size: 22px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 22px; font-weight: 500; }
.passage p { margin: 0 0 14px; }
.passage .para-num { display: inline-block; font-family: var(--mono); font-size: 20px; color: var(--accent); margin-right: 12px; vertical-align: 3px; font-weight: 700; }
.hl-skim { background: rgba(200, 32, 47, 0.10); padding: 1px 3px; }
.hl-scan { background: rgba(200, 32, 47, 0.32); padding: 1px 3px; font-weight: 700; color: var(--ink); }

/* ═════════ Q-LIST ═════════ */
.q-list { list-style: none; padding: 0; margin: 0; }
.q-list li { display: grid; grid-template-columns: 72px 1fr auto; gap: 20px; padding: 18px 0; border-top: 1px solid var(--rule-soft); font-size: 25px; line-height: 1.45; align-items: baseline; }
.q-list li:last-child { border-bottom: 1px solid var(--rule-soft); }
.q-list .q-num { font-family: var(--mono); color: var(--accent); font-size: 24px; font-weight: 600; }
.q-list .q-ans { font-family: var(--mono); font-size: 24px; color: var(--accent); letter-spacing: 0.04em; font-weight: 600; }

/* ═════════ BIG FIGURE ═════════ */
.big-fig { display: flex; align-items: flex-end; gap: 36px; }
.big-fig .num { font-family: var(--display); font-weight: 800; font-size: 300px; line-height: 0.85; letter-spacing: -0.05em; color: var(--accent); }
.big-fig .lbl { font-family: var(--display); font-size: 36px; line-height: 1.2; padding-bottom: 40px; max-width: 560px; color: var(--ink-soft); font-weight: 400; }

/* Three-stat row */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; border-top: 3px solid var(--accent); padding-top: 36px; }
.stat-row .stat .k { font-family: var(--mono); font-size: 24px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; margin-bottom: 18px; }
.stat-row .stat .v { font-family: var(--display); font-size: 96px; font-weight: 800; line-height: 0.95; color: var(--ink); letter-spacing: -0.02em; margin-bottom: 16px; }
.stat-row .stat .d { font-size: 24px; color: var(--ink-soft); line-height: 1.4; max-width: 420px; }

/* ═════════ TIMING / PLAN TABLE ═════════ */
.timing { display: grid; grid-template-columns: 90px 1fr 200px 280px; }
.timing > div { padding: 26px 20px 26px 0; border-top: 1px solid var(--rule-soft); font-size: 28px; }
.timing .hdr { font-family: var(--mono); font-size: 24px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); border-top: 3px solid var(--accent); padding-top: 18px; padding-bottom: 14px; font-weight: 500; }
.timing .passage-title { font-family: var(--display); font-size: 30px; font-weight: 600; }
.timing .minutes { font-family: var(--mono); color: var(--accent); font-weight: 600; }

.plan-grid { display: grid; grid-template-columns: 160px 1fr 1fr 180px; }
.plan-grid > div { padding: 22px 20px 22px 0; border-top: 1px solid var(--rule-soft); font-size: 25px; line-height: 1.4; }
.plan-grid .hdr { font-family: var(--mono); font-size: 24px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); border-top: 3px solid var(--accent); padding-top: 18px; font-weight: 500; }
.plan-grid .day { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--ink); }
.plan-grid .time { font-family: var(--mono); color: var(--accent); font-weight: 600; }

/* Question-types grid */
.qtype-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 60px; }
.qtype-item { padding: 20px 0; border-top: 1px solid var(--rule-soft); display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: baseline; }
.qtype-item .n { font-family: var(--mono); color: var(--accent); font-weight: 600; font-size: 22px; }
.qtype-item .t { font-family: var(--display); font-size: 26px; font-weight: 600; margin-bottom: 4px; color: var(--ink); line-height: 1.2; }
.qtype-item .s { font-family: var(--mono); color: var(--ink-muted); font-size: 18px; text-transform: uppercase; letter-spacing: 0.06em; }
.qtype-item .skim-tag { color: var(--accent); font-weight: 700; }

/* Mistake grid */
.mistake-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 72px; }
.mistake { display: grid; grid-template-columns: 64px 1fr; gap: 20px; padding-top: 28px; border-top: 1px solid var(--rule-soft); }
.mistake .x { font-family: var(--display); font-size: 54px; color: var(--accent); line-height: 1; font-weight: 700; }
.mistake h4 { font-family: var(--display); font-size: 30px; margin: 0 0 6px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.mistake p { font-size: 24px; line-height: 1.45; margin: 0; color: var(--ink-soft); }

/* Eye demo */
.eye-demo { display: flex; gap: 72px; margin-top: 8px; }
.eye-col { flex: 1; }
.eye-col .mono-label { margin-bottom: 16px; }
.eye-viz { background: var(--paper); border: 1px solid var(--rule-soft); padding: 36px 42px; font-family: var(--display); font-size: 26px; line-height: 1.7; min-height: 260px; color: var(--ink); }
.eye-viz .dim { color: var(--ink-muted); opacity: 0.5; }
.eye-viz .hl { background: rgba(200, 32, 47, 0.14); padding: 2px 4px; }
.eye-viz .hl-strong { background: rgba(200, 32, 47, 0.34); padding: 2px 4px; font-weight: 700; }

/* Vocab */
.vocab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 72px; }
.vocab-item { padding: 18px 0; border-top: 1px solid var(--rule-soft); display: grid; gap: 4px; }
.vocab-word { font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--ink); }
.vocab-word .pos { font-family: var(--sans); font-style: italic; font-size: 20px; color: var(--accent); margin-left: 10px; font-weight: 400; }
.vocab-word .ipa { font-family: var(--mono); font-size: 20px; color: var(--ink-muted); margin-left: 10px; font-weight: 400; }
.vocab-meaning { font-size: 24px; color: var(--ink-soft); line-height: 1.4; }

/* Exercise card */
.ex-card { background: var(--paper); border-left: 6px solid var(--accent); padding: 28px 36px; font-size: 26px; line-height: 1.55; }
.ex-card .tag { display: inline-block; font-family: var(--mono); font-size: 20px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 10px; }

/* TFNG */
.tfng { list-style: none; padding: 0; margin: 0; }
.tfng li { display: grid; grid-template-columns: 64px 1fr 200px; gap: 18px; padding: 16px 0; border-top: 1px solid var(--rule-soft); font-size: 24px; line-height: 1.45; align-items: baseline; }
.tfng li:last-child { border-bottom: 1px solid var(--rule-soft); }
.tfng .n { font-family: var(--mono); color: var(--accent); font-weight: 700; font-size: 22px; }
.tfng .a { font-family: var(--mono); color: var(--accent); font-weight: 700; font-size: 22px; text-align: right; letter-spacing: 0.08em; }

/* Takeaways */
.take { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 80px; }
.take .item { border-top: 3px solid var(--accent); padding-top: 22px; }
.take .item .k { font-family: var(--mono); font-size: 24px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; font-weight: 600; }
.take .item .v { font-family: var(--display); font-size: 30px; line-height: 1.3; font-weight: 500; color: var(--ink); }

/* End slide */
.end-slide { padding: 0; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; text-align: center; }
.end-slide h1 { font-family: var(--display); font-weight: 800; font-size: 200px; margin: 0; letter-spacing: -0.03em; }
.end-slide .hint { margin-top: 48px; font-family: var(--mono); font-size: 24px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.78); font-weight: 500; }

/* Keyword-family grid */
.kw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; }
.kw-tile { background: var(--paper); border-top: 4px solid var(--accent); padding: 28px 30px 32px; display: flex; flex-direction: column; }
.kw-tile .k { font-family: var(--mono); font-size: 22px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; margin-bottom: 18px; }
.kw-tile .ex { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.3; color: var(--ink); margin-bottom: 14px; }
.kw-tile .d { font-size: 22px; line-height: 1.4; color: var(--ink-soft); }

/* Decision tree */
.dtree { display: grid; grid-template-columns: 420px 1fr 1fr; gap: 56px; align-items: start; }
.dtree .q { background: var(--accent); color: #fff; padding: 40px 36px; font-family: var(--display); font-size: 34px; font-weight: 700; line-height: 1.2; border-radius: 4px; }
.dtree .branch { padding-top: 12px; }
.dtree .branch .a { font-family: var(--mono); font-size: 22px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; margin-bottom: 12px; }
.dtree .branch .label { font-family: var(--display); font-size: 36px; font-weight: 700; margin-bottom: 14px; color: var(--ink); }
.dtree .branch .desc { font-size: 22px; line-height: 1.45; color: var(--ink-soft); }

/* Flow steps */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.flow-step { border-top: 3px solid var(--accent); padding-top: 22px; position: relative; }
.flow-step .n { font-family: var(--mono); font-size: 22px; color: var(--accent); font-weight: 600; letter-spacing: 0.1em; margin-bottom: 10px; }
.flow-step .t { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.2; margin-bottom: 10px; color: var(--ink); }
.flow-step .d { font-size: 22px; line-height: 1.4; color: var(--ink-soft); }
.flow-step .time { position: absolute; top: 22px; right: 0; font-family: var(--mono); font-size: 20px; color: var(--accent); font-weight: 600; }

/* Tweaks */
#tweaks-panel { position: fixed; bottom: 24px; right: 24px; background: #111; color: #fff; padding: 16px 18px; border-radius: 12px; font-family: 'Inter', sans-serif; font-size: 13px; z-index: 2147483500; display: none; box-shadow: 0 12px 40px rgba(0,0,0,0.45); min-width: 260px; }
#tweaks-panel h3 { margin: 0 0 12px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #888; font-weight: 500; }
#tweaks-panel .row { margin-bottom: 12px; }
#tweaks-panel .row:last-child { margin-bottom: 0; }
#tweaks-panel label { display: block; font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
#tweaks-panel .options { display: flex; gap: 6px; }
#tweaks-panel button { flex: 1; background: #222; color: #ddd; border: 1px solid #333; padding: 8px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; font-family: inherit; }
#tweaks-panel button.active { background: #fff; color: #000; border-color: #fff; }
#tweaks-panel button:hover:not(.active) { background: #333; }
