/* THEME: editorial — 杂志/文学感。衬线标题 + 大量留白（低密度）+ 细发丝线 +
   首字下沉 + 行内细下划线高亮。气质冷静、考究、克制；构图靠栏宽与留白，不靠色块。
   与 brutalist 的高密度块状相反：这里是疏朗、纸感、排版优先。 */
:root {
  --bg:          oklch(97.5% 0.004 92);
  --surface-1:   oklch(99% 0.003 92);
  --surface-2:   oklch(95% 0.006 92);
  --line:        oklch(84% 0.008 80);
  --line-strong: oklch(60% 0.01 70);
  --ink-1: oklch(22% 0.012 50); --ink-2: oklch(38% 0.012 50); --ink-3: oklch(55% 0.012 50);
  --accent:      oklch(50% 0.15 28);        /* restrained rust-red, used sparingly */
  --accent-ink:  oklch(98% 0.01 80);
  --accent-2:    oklch(48% 0.055 145);   /* 禁蓝:改沙绿做次色(原 hue 250 是蓝),安静不抢 rust accent */
  --accent-soft: oklch(92% 0.04 40);
  /* serif everywhere — the magazine register */
  --ppt-display: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", Georgia, "Times New Roman", serif;
  --ppt-body:    "Source Han Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
  --r-1: 2px; --r-2: 3px; --r-3: 4px;
  --track-tight: -0.01em; --leading-body: 1.7;
  --pad: clamp(2.8rem, 1.2rem + 5cqw, 5.6rem);           /* airy but not overflow-prone on dense pages */
  --shadow-1: none; --shadow-2: 0 8px 30px -16px oklch(40% 0.02 50 / 0.2); --shadow-3: 0 16px 44px -22px oklch(40% 0.02 50 / 0.25);
}
.deck[data-grain] .deck__stage::after { opacity: 0.28; }   /* faint paper tooth */

/* eyebrow = small-caps tracked label, NOT a loud accent kicker */
.eyebrow { color: var(--ink-3); font-weight: var(--w-med); letter-spacing: 0.24em; font-family: var(--ppt-body); }
.h1, .h2, .display, .zh-mega { font-weight: var(--w-semi); letter-spacing: -0.005em; line-height: 1.12; }
.h3 { font-family: var(--ppt-display); font-weight: var(--w-semi); }
.lead { font-style: italic; color: var(--ink-2); max-width: 40ch; }
.quote { font-style: italic; }

/* highlight = thin elegant underline that HUGS the text (real text-decoration,
   not an absolutely-positioned bar — the bar floated to the line-box bottom,
   far below CJK glyphs). Scales with font size, wraps cleanly. */
.hl { color: var(--ink-1); padding: 0; white-space: nowrap;
  text-decoration: underline; text-decoration-color: var(--accent);
  -webkit-text-decoration-color: var(--accent);
  text-decoration-thickness: 0.07em; text-underline-offset: 0.14em; }
.hl::before { display: none; }

/* NO drop-cap: a CJK 首字下沉 splits a word in half — a giant rust「标」next to a
   small「题」(标题), or「便」/「当」— which reads as broken, not editorial. Chinese
   has no "first letter" concept the way Latin does. Editorial character here comes
   from serif + whitespace + hairlines + the underline-hl, NOT a drop-cap gimmick. */

/* ════ ONE card rule, every card layout follows it (numbered-cards / bento /
   comparison / any grid) — NOT a special rule per page. ═══════════════════════
   A card is a subtle FILLED BLOCK: surface fill + hairline + small radius +
   even padding, content TOP-ALIGNED & tight (no big eyebrow→body gap). This is
   restrained enough for editorial (paper-toned fills, thin lines) yet gives the
   block definition that bento (cell sizes) and comparison (A|B zones) need.
   The single 落点 per page = .card--accent = solid --accent-block + reversed ink
   (works light AND dark). Weak side = .card--soft (lighter fill). One mechanism,
   so the same page reads consistently and new pages inherit it for free. */
.card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-2);
  box-shadow: none; padding: var(--s-4); gap: var(--s-2); justify-content: flex-start; }
.card--soft { background: var(--surface-1); border-color: var(--line); }
.card--accent { background: var(--accent-block); border-color: var(--accent-block); }
.card--accent :where(.h2, .h3, .lead, .body, .eyebrow, .num, p, h2, h3, li) { color: var(--accent-block-ink); }
.card--accent :where(.body, .muted, .eyebrow, .num) { opacity: .9; }
/* tags: editorial underline pill; reversed inside an accent block */
.tag { background: transparent; border: 0; border-bottom: 1px solid var(--line-strong);
  border-radius: 0; padding: 0 0 0.15em; color: var(--ink-2); font-family: var(--ppt-body); }
.card--accent .tag { background: transparent; color: var(--accent-block-ink); border-bottom-color: color-mix(in oklab, var(--accent-block-ink) 50%, transparent); }
.card--num .num { color: var(--ink-2); }   /* corner index readable on the card surface (ink-3 was 4.2:1) */
.rule { background: var(--line-strong); }
/* (funnel bars are surface-2 in base now — no editorial override needed) */

/* code/terminal: soften to a paper code block (editorial doesn't do dark terminals) */
.terminal { background: var(--surface-2); color: var(--ink-1); border: 1px solid var(--line);
  box-shadow: none; border-radius: 2px; }
.terminal::before { color: var(--line-strong); }
.terminal .cmd::before { color: var(--accent); }
.terminal .comment { color: var(--ink-3); }

/* thin, restrained bars */
.bar__track { height: 6px; background: var(--surface-2); }

/* chrome = elegant serif line with a hairline rule */
.chrome-top { font-family: var(--ppt-display); text-transform: none; letter-spacing: 0.02em;
  border-bottom: 1px solid var(--line); color: var(--ink-3); }
.chrome-top__sec { color: var(--ink-2); }
.chrome-foot { font-family: var(--ppt-display); border-top: 1px solid var(--line); }

/* DARK = "night edition": ink paper, warm cream type */
.deck[data-theme="dark"] {
  --bg: oklch(19% 0.012 60); --surface-1: oklch(23% 0.012 60); --surface-2: oklch(22% 0.012 60);
  --line: oklch(34% 0.012 60); --line-strong: oklch(58% 0.012 60);
  --ink-1: oklch(94% 0.012 86); --ink-2: oklch(78% 0.012 84); --ink-3: oklch(60% 0.012 78);
  --accent: oklch(68% 0.15 32); --accent-ink: oklch(16% 0.02 40);
}

/* unified solid-block color (deepened accent, white ink ≥4.5 vs white) — blocks
   stay ONE color across the deck; per-section accents only recolor chrome/hl */
.deck { --accent-block: oklch(50% 0.15 28); --accent-block-ink: oklch(98% 0.01 30); }

/* ── 分段色策略 A（editorial 专属）：锁死朱砂红 ──────────────────────────────
   杂志正典是「一个克制的强调色贯穿全场」，节奏靠留白与栏宽、不靠每页换色相。
   所以 editorial 里 data-accent 只保留分段标签的语义，不再把 --accent 重绑成
   绿/青/橙（base.css 的 per-accent 覆盖在这里被中和）。editorial 后于 base 加载，
   同特异度即胜。--accent-ink 锁成白：深朱砂底（分节页/色块）上文字翻白，对比达标。*/
.slide[data-accent], .deck[data-accent] {
  --accent:       oklch(50% 0.15 28);
  --accent-ink:   oklch(98% 0.01 80);   /* 白字：深朱砂底（分节页/hl--full）上达标 */
  --accent-2:     oklch(48% 0.055 145);
  --accent-soft:  oklch(92% 0.04 40);
  --accent-block: oklch(50% 0.15 28);
  --accent-block-ink: oklch(98% 0.01 30);
}
.deck[data-theme="dark"][data-accent], .deck[data-theme="dark"] .slide[data-accent] {
  --accent: oklch(68% 0.15 32); --accent-ink: oklch(16% 0.02 40);
}
