:root {
  color-scheme: light;
  --bg: #f6f8fc;
  --bg-elev: #ffffff;
  --bg-soft: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.86);
  --ink: #0f172a;
  --ink-sub: #475569;
  --ink-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --brand: #0284c7;
  --brand-dark: #0369a1;
  --brand-soft: #e0f2fe;
  --brand-mid: #bae6fd;
  --brand-glow: rgba(2, 132, 199, 0.14);

  --c1: #0284c7;
  --c1-solid: #0284c7;
  --c1-ink: #0369a1;
  --c1-soft: #e0f2fe;
  --c1-mid: #bae6fd;

  --c2: #4f46e5;
  --c2-ink: #4338ca;
  --c2-soft: #eef2ff;
  --c2-mid: #c7d2fe;

  --c3: #059669;
  --c3-solid: #059669;
  --c3-ink: #047857;
  --c3-soft: #d1fae5;
  --c3-mid: #a7f3d0;

  --c4: #d97706;
  --c4-ink: #b45309;
  --c4-soft: #fef3c7;
  --c4-mid: #fde68a;

  --warn: #b45309;
  --warn-dot: #f59e0b;
  --bad: #be123c;
  --bad-dot: #f43f5e;
  --ok: #047857;
  --ok-soft: #d1fae5;

  --reader-bg: #fffdf8;
  --reader-border: #e7e0d2;
  --reader-ink: #1e293b;
  --reader-rt: #0284c7;

  --svg-bg: rgba(255, 255, 255, 0.94);
  --svg-stroke: #cbd5e1;
  --svg-chip: #f8fafc;
  --svg-muted: #64748b;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 18px 42px rgba(15, 23, 42, 0.10);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --font-sans: "HarmonyOS Sans SC", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --font-mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, var(--font-sans);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1120;
  --bg-elev: #111827;
  --bg-soft: #1e293b;
  --bg-glass: rgba(11, 17, 32, 0.84);
  --ink: #f1f5f9;
  --ink-sub: #cbd5e1;
  --ink-muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(148, 163, 184, 0.3);

  --brand: #38bdf8;
  --brand-dark: #7dd3fc;
  --brand-soft: rgba(14, 165, 233, 0.16);
  --brand-mid: rgba(56, 189, 248, 0.36);
  --brand-glow: rgba(56, 189, 248, 0.16);

  --c1: #38bdf8;
  --c1-solid: #0284c7;
  --c1-ink: #7dd3fc;
  --c1-soft: rgba(14, 165, 233, 0.16);
  --c1-mid: rgba(56, 189, 248, 0.35);

  --c2: #818cf8;
  --c2-ink: #a5b4fc;
  --c2-soft: rgba(99, 102, 241, 0.18);
  --c2-mid: rgba(129, 140, 248, 0.35);

  --c3: #34d399;
  --c3-solid: #059669;
  --c3-ink: #6ee7b7;
  --c3-soft: rgba(16, 185, 129, 0.16);
  --c3-mid: rgba(52, 211, 153, 0.35);

  --c4: #fbbf24;
  --c4-ink: #fcd34d;
  --c4-soft: rgba(245, 158, 11, 0.16);
  --c4-mid: rgba(251, 191, 36, 0.34);

  --warn: #fbbf24;
  --warn-dot: #f59e0b;
  --bad: #fb7185;
  --bad-dot: #f43f5e;
  --ok: #34d399;
  --ok-soft: rgba(16, 185, 129, 0.18);

  --reader-bg: #151c2c;
  --reader-border: rgba(148, 163, 184, 0.22);
  --reader-ink: #e2e8f0;
  --reader-rt: #38bdf8;

  --svg-bg: rgba(15, 23, 42, 0.85);
  --svg-stroke: rgba(148, 163, 184, 0.32);
  --svg-chip: #1e293b;
  --svg-muted: #94a3b8;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 22px 48px rgba(0, 0, 0, 0.48);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input {
  font: inherit;
  color: inherit;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Top Navigation ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.2px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: block;
}

.brand-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  border-left: 1px solid var(--border-strong);
  padding-left: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-sub);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand-dark);
  background: var(--brand-soft);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--ink-sub);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.icon-btn {
  width: 36px;
  padding: 0;
}

.icon-btn:hover,
.ghost-btn:hover {
  border-color: var(--brand-mid);
  color: var(--brand-dark);
  background: var(--brand-soft);
  text-decoration: none;
}

.menu-toggle {
  display: none;
}

.mobile-drawer {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 12px 24px 18px;
}

.mobile-drawer.is-open {
  display: grid;
  gap: 6px;
}

.mobile-drawer .nav-link {
  display: block;
  padding: 9px 12px;
}

/* ── Hero ── */
.hero {
  position: relative;
  padding: 52px 0 44px;
  background-image:
    radial-gradient(circle at 15% 18%, var(--brand-glow), transparent 44%),
    radial-gradient(circle at 86% 24%, rgba(79, 70, 229, 0.09), transparent 42%),
    radial-gradient(var(--border) 1px, transparent 1px);
  background-size: auto, auto, 26px 26px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: center;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

[data-theme="dark"] .brand-pill {
  background: rgba(14, 165, 233, 0.18);
  color: #e0f2fe;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.release-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--ink-sub);
}

.hero-title {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.6px;
}

.hero-title .accent {
  color: var(--brand);
}

.hero-slogan {
  margin: 12px 0 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.hero-desc {
  margin: 10px 0 0;
  font-size: 15.5px;
  color: var(--ink-sub);
  max-width: 590px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.28);
}

[data-theme="dark"] .btn-primary {
  color: #082f49;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-secondary {
  background: var(--bg-elev);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.btn-subtle {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--ink-sub);
  padding: 10px 14px;
  font-size: 13.5px;
}

.btn-subtle:hover {
  border-color: var(--brand-mid);
  color: var(--brand-dark);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.metric-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  box-shadow: var(--shadow-sm);
}

.metric-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.2;
}

.metric-label {
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.35;
}

/* ── Hero Reader Mockup ── */
.reader-frame {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.reader-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--ink-muted);
}

.window-dots {
  display: inline-flex;
  gap: 6px;
}

.window-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.reader-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand-dark);
  background: var(--brand-soft);
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.reader-page {
  background: var(--reader-bg);
  border-bottom: 1px solid var(--reader-border);
  padding: 22px 24px 20px;
  font-family: var(--font-serif);
  color: var(--reader-ink);
}

.reader-chapter {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.reader-page p {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.95;
}

.reader-page p:last-child {
  margin-bottom: 0;
}

ruby {
  ruby-position: over;
  font-weight: 700;
}

rt {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  color: var(--reader-rt);
  letter-spacing: 0.15px;
}

.note-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 5px;
  margin-left: 2px;
  vertical-align: super;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.12s ease;
}

.note-trigger:hover,
.note-trigger[aria-expanded="true"] {
  background: var(--brand);
  color: #ffffff;
  transform: translateY(-1px);
}

[data-theme="dark"] .note-trigger:hover,
[data-theme="dark"] .note-trigger[aria-expanded="true"] {
  color: #082f49;
}

.reader-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 18px;
  background: var(--bg-elev);
  font-size: 12.5px;
  color: var(--ink-sub);
}

.reader-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-chip {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--ink-sub);
  border: 1px solid var(--border);
}

/* ── Sections ── */
.section {
  padding: 56px 0;
}

.section-alt {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px 28px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--border);
}

.section-head > div:first-child {
  flex: 1 1 460px;
  min-width: 0;
}

.section-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--brand-dark);
  margin-bottom: 6px;
}

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.25;
}

.section-sub {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--ink-sub);
  max-width: none;
}

.head-tip-box {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  box-shadow: var(--shadow-sm);
  flex: 0 1 auto;
  max-width: 400px;
}

.section-alt .head-tip-box {
  background: var(--bg);
}

.head-tip-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 3px;
}

.head-tip-desc {
  font-size: 12.8px;
  color: var(--ink-sub);
  line-height: 1.58;
}

/* ── Version Comparison ── */
.comp-heads {
  display: grid;
  grid-template-columns: 144px 220px 220px 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.comp-head {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.comp-head.dim {
  background: var(--bg-soft);
  justify-content: center;
}

.comp-head.x {
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--bg-elev) 100%);
  border-color: var(--brand-mid);
}

.comp-col-title {
  font-size: 15px;
  font-weight: 800;
}

.comp-head.x .comp-col-title {
  color: var(--brand-dark);
}

.comp-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-sub);
}

.comp-head.x .comp-badge {
  background: var(--brand);
  color: #ffffff;
}

[data-theme="dark"] .comp-head.x .comp-badge {
  color: #082f49;
}

.comp-rows {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.comp-row {
  display: grid;
  grid-template-columns: 144px 220px 220px 1fr;
  gap: 12px;
  align-items: stretch;
}

.comp-cell {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.comp-dim {
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 14px 10px;
}

.dim-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.dim-name {
  font-size: 15px;
  font-weight: 800;
}

.dim-en {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.4px;
}

.comp-other {
  gap: 7px;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cell-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--ink-muted);
  background: var(--bg-soft);
  border: 1px solid transparent;
  opacity: 0.78;
  flex-shrink: 0;
  transition: opacity 0.16s ease, background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.cell-chevron {
  display: block;
  transition: transform 0.18s ease;
}

.comp-other:hover,
.comp-other:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.comp-other[data-example-focus="wf"]:hover,
.comp-other[data-example-focus="wf"]:focus-visible {
  border-color: rgba(244, 63, 94, 0.45);
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.05) 0%, var(--bg-elev) 75%);
}

.comp-other[data-example-focus="wf"]:hover .cell-hint,
.comp-other[data-example-focus="wf"]:focus-visible .cell-hint,
.comp-other[data-example-focus="wf"][aria-expanded="true"] .cell-hint {
  opacity: 1;
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.28);
  color: var(--bad);
}

.comp-other[data-example-focus="tw"]:hover,
.comp-other[data-example-focus="tw"]:focus-visible {
  border-color: var(--c2-mid);
  background: linear-gradient(145deg, var(--c2-soft) 0%, var(--bg-elev) 75%);
}

.comp-other[data-example-focus="tw"]:hover .cell-hint,
.comp-other[data-example-focus="tw"]:focus-visible .cell-hint,
.comp-other[data-example-focus="tw"][aria-expanded="true"] .cell-hint {
  opacity: 1;
  background: var(--c2-soft);
  border-color: var(--c2-mid);
  color: var(--c2-ink);
}

.comp-other:hover .cell-chevron {
  transform: translateY(1px);
}

.comp-other[data-example-focus="wf"][aria-expanded="true"] {
  border-color: var(--bad-dot);
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.08) 0%, var(--bg-elev) 82%);
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.14), var(--shadow-sm);
}

.comp-other[data-example-focus="tw"][aria-expanded="true"] {
  border-color: var(--c2);
  background: linear-gradient(145deg, var(--c2-soft) 0%, var(--bg-elev) 82%);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.14), var(--shadow-sm);
}

.comp-other[aria-expanded="true"] .cell-chevron,
.comp-other[aria-expanded="true"]:hover .cell-chevron {
  transform: rotate(180deg);
}

.mobile-label {
  display: none;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
}

.status-line.warn { color: var(--warn); }
.status-line.mid  { color: var(--ink-sub); }
.status-line.bad  { color: var(--bad); }

.dot-sm {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.warn .dot-sm { background: var(--warn-dot); }
.mid  .dot-sm { background: var(--ink-muted); }
.bad  .dot-sm { background: var(--bad-dot); }

.cell-text {
  font-size: 13.5px;
  color: var(--ink-sub);
  line-height: 1.55;
}

.comp-x {
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--bg-elev) 62%);
  border: 1.5px solid var(--brand-mid);
  border-left: 5px solid var(--brand);
  gap: 9px;
}

.x-head {
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.45;
}

.x-head strong {
  color: var(--brand-dark);
}

.x-example-box {
  background: var(--bg-elev);
  border: 1px solid var(--brand-mid);
  border-radius: 10px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-sub);
  line-height: 1.55;
}

.ex-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-dark);
  background: var(--brand-soft);
  padding: 2px 7px;
  border-radius: 5px;
}

.quote-chip {
  display: inline-block;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 0 5px;
  font-weight: 700;
  color: var(--ink);
}

.example-drawer {
  grid-column: 1 / -1;
  background: var(--bg-elev);
  border: 1.5px solid var(--border-strong);
  border-left: 5px solid var(--border-strong);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 11px;
}

.example-drawer[data-active-side="wf"] {
  border-color: rgba(244, 63, 94, 0.36);
  border-left-color: var(--bad-dot);
}

.example-drawer[data-active-side="tw"] {
  border-color: var(--c2-mid);
  border-left-color: var(--c2);
}

.example-drawer[hidden] {
  display: none;
}

.example-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}

.example-drawer-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.example-drawer-title {
  font-size: 13.8px;
  font-weight: 800;
  color: var(--ink);
}

.example-close {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink-sub);
  border-radius: 7px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.example-close:hover {
  border-color: var(--brand-mid);
  color: var(--brand-dark);
}

.example-body {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.example-panel {
  padding: 2px 4px 2px 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.example-panel[hidden] {
  display: none;
}

.ex-col-badge {
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
}

.ex-col-badge.wf {
  background: rgba(244, 63, 94, 0.12);
  color: var(--bad);
}

.ex-col-badge.tw {
  background: var(--c2-soft);
  color: var(--c2-ink);
}

.example-list {
  margin: 0;
  padding-left: 17px;
  display: grid;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-sub);
  line-height: 1.58;
}

.example-x-card {
  background: var(--brand-soft);
  border: 1px solid var(--brand-mid);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
}

.example-x-card .ex-tag {
  background: var(--bg-elev);
  border: 1px solid var(--brand-mid);
}

.example-x-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.58;
  color: var(--ink);
}

.summary-box {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}

.summary-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.summary-title {
  font-size: 16px;
  font-weight: 800;
}

.summary-sub {
  font-size: 12.8px;
  line-height: 1.58;
  color: var(--ink-muted);
}

.summary-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sum-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 14px;
}

.sum-k {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 4px;
}

.sum-v {
  font-size: 13px;
  color: var(--ink-sub);
  line-height: 1.48;
}

/* ── Showcase / Typography Lab ── */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.lab-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.lab-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lab-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.lab-tag {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.lab-desc {
  margin: 0;
  font-size: 13.8px;
  color: var(--ink-sub);
}

.sample-box {
  background: var(--reader-bg);
  border: 1px solid var(--reader-border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  font-family: var(--font-serif);
  color: var(--reader-ink);
  font-size: 15.5px;
  line-height: 1.9;
}

.quote-toggle {
  display: inline-flex;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 3px;
  gap: 4px;
  align-self: flex-start;
}

.toggle-btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 12.8px;
  font-weight: 700;
  color: var(--ink-sub);
  cursor: pointer;
}

.toggle-btn.is-active {
  background: var(--bg-elev);
  color: var(--brand-dark);
  box-shadow: var(--shadow-sm);
}

.lab-note {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12.8px;
  line-height: 1.58;
  color: var(--ink-muted);
}

.size-bars {
  display: grid;
  gap: 11px;
}

.size-row-head {
  display: flex;
  justify-content: space-between;
  font-size: 12.8px;
  font-weight: 700;
  margin-bottom: 5px;
}

.size-track {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
  border: 1px solid var(--border);
}

.size-fill {
  height: 100%;
  border-radius: 999px;
}

.size-fill.raw {
  width: 92%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.size-fill.opt {
  width: 28%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.lab-links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}

/* ── Catalog ── */
.series-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.series-card {
  text-align: left;
  background: var(--bg-elev);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 15px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.14s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.series-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-mid);
  box-shadow: var(--shadow-md);
}

.series-card.is-selected {
  background: linear-gradient(150deg, var(--brand-soft) 0%, var(--bg-elev) 72%);
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-glow), var(--shadow-sm);
}

.series-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.series-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--ink-sub);
  border: 1px solid var(--border);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.series-card.is-selected .series-code {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

[data-theme="dark"] .series-card.is-selected .series-code {
  color: #082f49;
}

.series-count {
  font-size: 12.2px;
  font-weight: 800;
  color: var(--brand-dark);
  white-space: nowrap;
}

.series-name {
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.38;
  color: var(--ink);
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
}

.series-desc {
  font-size: 12.2px;
  color: var(--ink-muted);
  line-height: 1.48;
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 13px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.active-series-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.active-series-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}

.reset-series-btn {
  border: 1px solid var(--brand-mid);
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.reset-series-btn:hover {
  border-color: var(--brand);
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--ink-sub);
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 12.8px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.seg-btn:hover {
  color: var(--brand-dark);
}

.seg-btn.is-active {
  background: var(--bg-elev);
  color: var(--brand-dark);
  box-shadow: var(--shadow-sm);
}

.toolbar-right {
  display: flex;
  flex: 1 1 280px;
  justify-content: flex-end;
  max-width: 380px;
}

.search-input {
  height: 38px;
  width: 100%;
  min-width: 240px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-size: 13.5px;
}

.search-input::placeholder {
  color: var(--ink-muted);
}

.catalog-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--ink-sub);
}

.catalog-meta-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.book-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: var(--shadow-sm);
}

.book-card.is-pending {
  border-style: dashed;
}

.book-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.book-id {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-dark);
  background: var(--brand-soft);
  padding: 2px 7px;
  border-radius: 6px;
}

.book-status {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.book-status.done {
  background: var(--ok-soft);
  color: var(--ok);
}

.book-status.pending {
  background: var(--c4-soft);
  color: var(--c4-ink);
}

.book-title {
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.38;
}

.book-foot {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-muted);
}

.source-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--bg-soft);
  color: var(--ink-sub);
}

.catalog-more {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.catalog-empty {
  background: var(--bg-elev);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  color: var(--ink-sub);
}

/* ── Channels & Granularity ── */
.spectrum-bar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.spectrum-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-sub);
}

.spectrum-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.track-pill {
  background: var(--bg-soft);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-sub);
}

.flow-grid {
  display: grid;
  grid-template-columns: 1fr 20px 1fr 20px 1fr 20px 1fr;
  align-items: center;
  gap: 6px;
}

.flow-chip {
  display: block;
  border-radius: var(--radius-md);
  padding: 10px 13px;
  border: 1.5px solid transparent;
  text-decoration: none;
  color: inherit;
  transition: transform 0.14s ease;
}

.flow-chip:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.flow-chip.s1 { background: var(--c1-soft); border-color: var(--c1-mid); }
.flow-chip.s2 { background: var(--c2-soft); border-color: var(--c2-mid); }
.flow-chip.s3 { background: var(--c3-soft); border-color: var(--c3-mid); }
.flow-chip.s4 { background: var(--c4-soft); border-color: var(--c4-mid); }

.chip-tag {
  font-size: 11.5px;
  font-weight: 800;
  margin-bottom: 3px;
}

.s1 .chip-tag { color: var(--c1-ink); }
.s2 .chip-tag { color: var(--c2-ink); }
.s3 .chip-tag { color: var(--c3-ink); }
.s4 .chip-tag { color: var(--c4-ink); }

.chip-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
}

.chip-sub {
  font-size: 12.2px;
  color: var(--ink-sub);
  margin-top: 2px;
}

.flow-sep {
  text-align: center;
  color: var(--ink-muted);
  font-size: 18px;
  font-weight: 700;
}

.tiers {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.tier-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 268px 1fr 245px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.tier-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
}

.t1::before { background: var(--c1); }
.t2::before { background: var(--c2); }
.t3::before { background: var(--c3); }
.t4::before { background: var(--c4); }

.tier-left {
  padding: 18px 18px 18px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  border-right: 1px solid var(--border);
}

.t1 .tier-left { background: linear-gradient(135deg, var(--c1-soft) 0%, var(--bg) 100%); }
.t2 .tier-left { background: linear-gradient(135deg, var(--c2-soft) 0%, var(--bg) 100%); }
.t3 .tier-left { background: linear-gradient(135deg, var(--c3-soft) 0%, var(--bg) 100%); }
.t4 .tier-left { background: linear-gradient(135deg, var(--c4-soft) 0%, var(--bg) 100%); }

.tier-badge {
  display: inline-block;
  font-size: 11.8px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.t1 .tier-badge { background: var(--c1-soft); color: var(--c1-ink); }
.t2 .tier-badge { background: var(--c2-soft); color: var(--c2-ink); }
.t3 .tier-badge { background: var(--c3-soft); color: var(--c3-ink); }
.t4 .tier-badge { background: var(--c4-soft); color: var(--c4-ink); }

.tier-name {
  font-size: 19px;
  font-weight: 800;
  margin-top: 7px;
  line-height: 1.25;
}

.svg-box {
  background: var(--svg-bg);
  border: 1px solid var(--svg-stroke);
  border-radius: 10px;
  padding: 7px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tier-mid {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
}

.tier-headline {
  font-size: 16px;
  font-weight: 800;
}

.tier-points {
  display: grid;
  gap: 8px;
}

.point-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13.8px;
  color: var(--ink-sub);
  line-height: 1.5;
}

.point-pill {
  flex-shrink: 0;
  font-size: 11.8px;
  font-weight: 700;
  color: var(--ink-sub);
  background: var(--bg-soft);
  padding: 2px 8px;
  border-radius: 6px;
}

.tier-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.tier-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.tier-link-btn:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: var(--brand-soft);
  text-decoration: none;
}

.tier-release-pill {
  font-size: 12px;
  padding: 5px 11px;
  background: var(--c3-soft);
  border-color: var(--c3-mid);
  color: var(--c3-ink);
}

.tier-right {
  padding: 18px 20px;
  background: var(--bg-soft);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.fit-label {
  font-size: 11.8px;
  font-weight: 800;
  color: var(--ink-muted);
  margin-bottom: 5px;
}

.fit-text {
  font-size: 13.8px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}

.meter {
  padding-top: 10px;
  border-top: 1px dashed var(--border-strong);
}

.meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 5px;
}

.bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.bar {
  height: 7px;
  border-radius: 999px;
  background: var(--border-strong);
}

.t1 .bar.on { background: var(--c1); }
.t2 .bar.on { background: var(--c2); }
.t3 .bar.on { background: var(--c3); }
.t4 .bar.on { background: var(--c4); }

.pick-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 13px;
}

.pick-need {
  font-size: 12.5px;
  color: var(--ink-sub);
  margin-bottom: 4px;
}

.pick-go {
  font-size: 14px;
  font-weight: 800;
}

.pick-go.c1 { color: var(--c1-ink); }
.pick-go.c2 { color: var(--c2-ink); }
.pick-go.c3 { color: var(--c3-ink); }
.pick-go.c4 { color: var(--c4-ink); }

.footnote-center {
  margin-top: 12px;
  font-size: 12.8px;
  line-height: 1.58;
  color: var(--ink-muted);
  text-align: center;
}

/* ── Readers Guide ── */
.alert-banner {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.10), rgba(245, 158, 11, 0.08));
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-left: 5px solid var(--bad-dot);
  border-radius: var(--radius-md);
  padding: 15px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.alert-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--bad);
}

.alert-desc {
  font-size: 13.5px;
  color: var(--ink-sub);
  margin-top: 2px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.step-num {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-card h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
}

.step-card p {
  margin: 0;
  font-size: 13.8px;
  color: var(--ink-sub);
}

/* ── FAQ ── */
.faq-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item[open] {
  border-color: var(--brand-mid);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 18px;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--ink-sub);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: transform 0.18s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.faq-body {
  padding: 0 18px 16px;
  font-size: 14.2px;
  color: var(--ink-sub);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ── Support & Ecosystem ── */
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.support-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: var(--shadow-sm);
}

.support-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.clean-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  font-size: 13.8px;
  color: var(--ink-sub);
}

.card-actions {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 26px 0 34px;
  font-size: 13.5px;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ── Popover & Toast ── */
.note-popover {
  position: fixed;
  z-index: 80;
  width: min(330px, calc(100vw - 24px));
  background: var(--bg-elev);
  border: 1px solid var(--brand-mid);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.58;
  color: var(--ink);
}

.note-popover[hidden] {
  display: none;
}

.note-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-dark);
}

.note-close {
  border: none;
  background: var(--bg-soft);
  color: var(--ink-sub);
  border-radius: 6px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(12px);
  z-index: 90;
  background: #0f172a;
  color: #f8fafc;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive Breakpoints ── */
@media (max-width: 1024px) {
  .brand-sub {
    display: none;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .comp-heads {
    display: none;
  }
  .comp-row {
    grid-template-columns: 1fr 1fr;
  }
  .comp-dim {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 12px 16px;
    gap: 10px;
  }
  .comp-x {
    grid-column: 1 / -1;
  }
  .mobile-label {
    display: block;
  }
  .tier-card {
    grid-template-columns: 230px 1fr;
  }
  .tier-right {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid var(--border);
    flex-direction: row;
    align-items: center;
  }
  .meter {
    border-top: none;
    padding-top: 0;
    min-width: 185px;
  }
  .series-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .toolbar-right {
    max-width: none;
    flex-basis: 100%;
  }
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .summary-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flow-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .flow-sep {
    display: none;
  }
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .section-head > div:first-child,
  .head-tip-box {
    flex-basis: 100%;
    max-width: none;
  }
  .lab-grid,
  .example-body,
  .steps-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
  .window-dots {
    display: none;
  }
  .hero {
    padding: 36px 0 34px;
  }
  .section {
    padding: 40px 0;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .comp-row,
  .summary-grid-4,
  .flow-grid,
  .series-overview,
  .book-grid,
  .tier-card {
    grid-template-columns: 1fr;
  }
  .tier-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .tier-right {
    flex-direction: column;
    align-items: stretch;
  }
  .search-input {
    width: 100%;
    min-width: 0;
  }
  .toolbar-right {
    width: 100%;
  }
}
