
:root {
  --bg-0: oklch(0.16 0.006 70);
  --bg-1: oklch(0.19 0.006 70);
  --bg-2: oklch(0.22 0.007 70);
  --bg-3: oklch(0.26 0.008 70);
  --line: oklch(0.30 0.008 70);
  --line-soft: oklch(0.24 0.007 70);
  --ink-0: oklch(0.97 0.005 80);
  --ink-1: oklch(0.86 0.008 80);
  --ink-2: oklch(0.66 0.010 80);
  --ink-3: oklch(0.50 0.010 80);
  --ink-4: oklch(0.38 0.010 80);
  --good: oklch(0.82 0.14 155);
  --warn: oklch(0.82 0.14 80);
  --bad:  oklch(0.74 0.16 28);
  --info: oklch(0.78 0.12 240);
  --brand: oklch(0.78 0.14 200);
  --space-xs: 4px; --space-sm: 8px; --space-md: 12px; --space-lg: 16px; --space-xl: 24px;
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px;
  --bg-elev: var(--bg-1); --bg-elev-2: var(--bg-2); --accent: var(--brand);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg-0);
  color: var(--ink-1);
  font-family: 'Inter Tight', -apple-system, system-ui, sans-serif;
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.uikit-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.uikit-nav {
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow-y: auto;
  background: var(--bg-1); border-right: 1px solid var(--line);
  padding: var(--space-lg);
}
.uikit-nav .brand {
  display: flex; align-items: center; gap: var(--space-sm);
  font-size: 16px; font-weight: 700; color: var(--brand);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-md);
}
.uikit-nav .brand svg { width: 22px; height: 22px; }
.uikit-nav .nav-h {
  font-size: 10.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-4); font-weight: 600;
  padding: var(--space-md) 0 var(--space-xs);
}
.uikit-nav a {
  display: block; padding: 7px 10px; border-radius: var(--r-sm);
  font-size: 12.5px; color: var(--ink-2);
  text-decoration: none;
}
.uikit-nav a:hover { background: var(--bg-2); color: var(--ink-1); }
.uikit-nav a.active {
  background: color-mix(in oklch, var(--brand) 14%, var(--bg-1));
  color: var(--brand);
  border-left: 2px solid var(--brand); padding-left: 8px;
}

.mode-toggle {
  display: flex; gap: 0; border: 1px solid var(--line);
  border-radius: var(--r-sm); overflow: hidden; margin-top: var(--space-md);
}
.mode-toggle button {
  flex: 1; background: transparent; border: 0; color: var(--ink-2);
  padding: 6px; font: inherit; font-size: 11px; cursor: pointer;
  font-family: ui-monospace, monospace;
}
.mode-toggle button.active { background: var(--brand); color: var(--bg-0); }

.uikit-content {
  padding: var(--space-xl);
  display: flex; flex-direction: column;
  gap: var(--space-xl);
}

.uikit-content > header {
  border-bottom: 1px solid var(--line); padding-bottom: var(--space-md);
}
.uikit-content > header h1 {
  margin: 0; font-size: 24px; font-weight: 700;
  color: var(--ink-0); letter-spacing: -0.02em;
}
.uikit-content > header p {
  margin: 6px 0 0; font-size: 13px; color: var(--ink-2); max-width: 880px;
}

.batch-section {
  border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; background: var(--bg-1);
}
.batch-section > .head {
  background: var(--bg-2); border-bottom: 1px solid var(--line);
  padding: var(--space-md) var(--space-lg);
  display: flex; align-items: baseline; gap: var(--space-md);
}
.batch-section > .head h2 {
  margin: 0; font-size: 16px; font-weight: 700; color: var(--ink-0);
}
.batch-section > .head .lbl {
  font-family: ui-monospace, monospace; font-size: 10.5px;
  color: var(--ink-3);
}
.batch-section > .head a {
  margin-left: auto; font-size: 11.5px; color: var(--brand);
  text-decoration: none; font-family: ui-monospace, monospace;
}
.batch-section > .body {
  padding: var(--space-lg);
  /* Critical: each batch's content is fully self-styled — render as-is */
}
.batch-section > .body > main.page,
.batch-section > .body main.page {
  padding: 0; max-width: none;
}


/* ════════ Batch 1 · _DESIGN_BATCH_4_TONE_FIX.html ════════ */


* { box-sizing: border-box; }

.page { max-width: 1240px; margin: 0 auto; padding: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-xl); }
.page-head h1 { font-size: 24px; font-weight: 700; color: var(--ink-0); margin: 0 0 6px; }
.page-head p { font-size: 13.5px; color: var(--ink-2); margin: 0; max-width: 920px; }
.page-head code, p code, td code, li code {
  font-family: ui-monospace, monospace; font-size: 12.5px;
  background: var(--bg-2); padding: 1px 6px; border-radius: 3px; color: var(--ink-0);
}

.lock-banner {
  display: flex; align-items: center; gap: var(--space-md);
  background: color-mix(in oklch, var(--warn) 10%, var(--bg-1));
  border-left: 3px solid var(--warn);
  border-radius: var(--r-md);
  padding: var(--space-md) var(--space-lg);
  font-family: ui-monospace, monospace; font-size: 12.5px;
  color: var(--ink-1);
}
.lock-banner b { color: var(--ink-0); }
.lock-banner .pin {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--warn);
}

.group-head {
  display: flex; align-items: baseline; gap: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--line-soft);
}
.group-head h2 { font-size: 15px; font-weight: 700; color: var(--ink-0); margin: 0; letter-spacing: 0.02em; }
.group-head .count { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--ink-3); }

pre.css {
  margin: 0;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--space-lg);
  font-family: ui-monospace, monospace; font-size: 12px;
  color: var(--ink-1);
  overflow-x: auto;
  white-space: pre;
}
pre.css .k { color: var(--brand); }
pre.css .s { color: var(--good); }
pre.css .c { color: var(--ink-3); }

table.map {
  width: 100%; border-collapse: collapse;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
table.map th, table.map td {
  text-align: left; padding: 10px var(--space-md);
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
table.map th {
  background: var(--bg-2); color: var(--ink-0);
  font-weight: 600; font-size: 12px;
  letter-spacing: 0.02em;
}
table.map tr:last-child td { border-bottom: none; }
table.map td.tone-r { color: var(--good); font-family: ui-monospace, monospace; }
table.map td.tone-e { color: var(--bad);  font-family: ui-monospace, monospace; }
table.map td.tone-n { color: var(--ink-3); font-family: ui-monospace, monospace; }

/* ───────── live demo cards ───────── */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}
.demo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.demo-pair > .col {
  display: flex; flex-direction: column; gap: var(--space-sm);
}
.demo-pair .col-label {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* generic scorecard chrome (mirrors §5) */
.scorecard-compound, .scorecard-strip-card, .scorecard-spark-card,
.scorecard-plan-card, .scorecard-top-card, .scorecard-vmm {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--space-md) var(--space-lg);
  display: flex; flex-direction: column; gap: 6px;
  min-height: 92px;
}
.scorecard-compound .label, .scorecard-strip-card .label,
.scorecard-spark-card .label, .scorecard-plan-card .label,
.scorecard-top-card .label, .scorecard-vmm .label {
  font-size: 11.5px; color: var(--ink-3);
  letter-spacing: 0.02em; text-transform: uppercase;
}
.scorecard-compound .v, .scorecard-strip-card .v,
.scorecard-spark-card .v, .scorecard-plan-card .v,
.scorecard-top-card .v, .scorecard-vmm .v {
  font-family: ui-monospace, monospace;
  font-size: 22px; font-weight: 600;
  color: var(--ink-0);
  font-variant-numeric: tabular-nums;
}
.scorecard-compound .delta, .scorecard-strip-card .delta {
  font-size: 11.5px; color: var(--ink-2);
}

/* compound: stacked rows */
.scorecard-compound .metric-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 3px 0; font-size: 12.5px;
}
.scorecard-compound .metric-row .label-sm { color: var(--ink-2); font-size: 12px; }
.scorecard-compound .metric-row .metric-value {
  font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums;
  color: var(--ink-1);
}
.scorecard-compound .metric-row.total {
  padding-top: 6px; margin-top: 4px;
  border-top: 1px solid var(--line-soft);
}
.scorecard-compound .metric-row.total .label-sm { color: var(--ink-1); font-weight: 600; font-size: 12.5px; }
.scorecard-compound .metric-row.total .metric-value {
  color: var(--ink-0); font-size: 18px; font-weight: 600;
}

/* spark mini-curve */
.scorecard-spark-card .spark {
  height: 28px;
  background: linear-gradient(90deg, transparent, color-mix(in oklch, var(--brand) 25%, transparent), transparent);
  border-bottom: 1px solid var(--line-soft);
  border-radius: 2px;
  position: relative;
}
.scorecard-spark-card .spark::after {
  content: ""; position: absolute; left: 6px; right: 6px; bottom: 6px; height: 14px;
  border-bottom: 1.5px solid var(--ink-2);
  border-image: linear-gradient(90deg, var(--ink-3), var(--ink-1)) 1;
}

/* plan */
.scorecard-plan-card .attain { display: flex; justify-content: space-between; align-items: baseline; }
.scorecard-plan-card .attain .target { color: var(--ink-3); font-size: 12px; font-family: ui-monospace, monospace; }
.scorecard-plan-card .bar {
  height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden;
}
.scorecard-plan-card .bar > span {
  display: block; height: 100%; background: var(--ink-1);
  border-radius: 2px;
}

/* top */
.scorecard-top-card .top-row {
  display: grid; grid-template-columns: 1fr auto;
  align-items: baseline; gap: var(--space-sm);
  padding: 3px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 12px;
}
.scorecard-top-card .top-row:last-child { border-bottom: none; }
.scorecard-top-card .top-cell .l { color: var(--ink-2); font-size: 12px; }
.scorecard-top-card .top-cell .v { font-size: 13px; }

/* strip */
.scorecard-strip-card .row { display: flex; justify-content: space-between; align-items: baseline; }

/* vmm = mini bar */
.scorecard-vmm .bars {
  display: grid; grid-template-columns: repeat(8, 1fr);
  gap: 3px; height: 28px; align-items: end;
}
.scorecard-vmm .bars > i {
  background: var(--ink-3); border-radius: 1.5px;
}
.scorecard-vmm .bars > i:nth-child(1) { height: 30%; }
.scorecard-vmm .bars > i:nth-child(2) { height: 55%; }
.scorecard-vmm .bars > i:nth-child(3) { height: 40%; }
.scorecard-vmm .bars > i:nth-child(4) { height: 75%; }
.scorecard-vmm .bars > i:nth-child(5) { height: 60%; }
.scorecard-vmm .bars > i:nth-child(6) { height: 90%; }
.scorecard-vmm .bars > i:nth-child(7) { height: 70%; }
.scorecard-vmm .bars > i:nth-child(8) { height: 100%; }

/* ════════════════════════════════════════════════════════ */
/* GREEN/RED TONE RULE — locked 2026-05-10                   */
/* ════════════════════════════════════════════════════════ */
.scorecard-compound[data-tone="revenue"],
.scorecard-strip-card[data-tone="revenue"],
.scorecard-spark-card[data-tone="revenue"],
.scorecard-plan-card[data-tone="revenue"],
.scorecard-top-card[data-tone="revenue"],
.scorecard-vmm[data-tone="revenue"] {
  border-left: 3px solid color-mix(in oklch, var(--good) 35%, var(--line));
}
.scorecard-compound[data-tone="revenue"] .metric-row.total .metric-value,
.scorecard-compound[data-tone="revenue"] .v,
.scorecard-strip-card[data-tone="revenue"] .v,
.scorecard-spark-card[data-tone="revenue"] .v,
.scorecard-plan-card[data-tone="revenue"] .attain .v,
.scorecard-top-card[data-tone="revenue"] .top-cell .v,
.scorecard-vmm[data-tone="revenue"] .v {
  color: var(--good);
}

.scorecard-compound[data-tone="expense"],
.scorecard-strip-card[data-tone="expense"],
.scorecard-spark-card[data-tone="expense"],
.scorecard-plan-card[data-tone="expense"],
.scorecard-top-card[data-tone="expense"],
.scorecard-vmm[data-tone="expense"] {
  border-left: 3px solid color-mix(in oklch, var(--bad) 35%, var(--line));
}
.scorecard-compound[data-tone="expense"] .metric-row.total .metric-value,
.scorecard-compound[data-tone="expense"] .v,
.scorecard-strip-card[data-tone="expense"] .v,
.scorecard-spark-card[data-tone="expense"] .v,
.scorecard-plan-card[data-tone="expense"] .attain .v,
.scorecard-top-card[data-tone="expense"] .top-cell .v,
.scorecard-vmm[data-tone="expense"] .v {
  color: var(--bad);
}

/* Back-compat alias: deprecated .bad modifier == data-tone="expense" */
.scorecard-compound.bad { border-left: 3px solid color-mix(in oklch, var(--bad) 35%, var(--line)); }
.scorecard-compound.bad .metric-row.total .metric-value,
.scorecard-compound.bad .v { color: var(--bad); }

/* ─── docs chrome ─── */
.batch-foot {
  border-top: 1px solid var(--line-soft);
  padding-top: var(--space-md);
  font-family: ui-monospace, monospace; font-size: 11.5px;
  color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: var(--space-md);
}
.batch-foot b { color: var(--ink-1); font-weight: 600; }

ul.checklist { margin: 0; padding-left: 18px; }
ul.checklist li { font-size: 13px; color: var(--ink-1); padding: 4px 0; }
ul.checklist li code { font-size: 12px; }

.swatch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line);
  font-family: ui-monospace, monospace; font-size: 11px;
}
.swatch i { width: 8px; height: 8px; border-radius: 50%; }
.swatch.r i { background: var(--good); }
.swatch.e i { background: var(--bad); }
.swatch.n i { background: var(--ink-3); }

/* ════════ Batch 2 · _DESIGN_BATCH_4a_redesigns-empty-loading.html ════════ */
/* ════════ §2 TOKENS (copied from _APPROVED_BLOCKS, Normis only) ════════ */


* { box-sizing: border-box; }

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-feature-settings: "tnum", "zero"; }

.page { max-width: 1240px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 32px; }

.page-head h1 { font-size: 22px; font-weight: 700; color: var(--ink-0); letter-spacing: -0.02em; margin: 0 0 6px; }
.page-head p { font-size: 13px; color: var(--ink-2); margin: 0; max-width: 880px; }

.legend {
  display: flex; flex-wrap: wrap; gap: 12px;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; color: var(--ink-2);
}
.legend strong { color: var(--ink-0); font-weight: 600; }

.section { display: flex; flex-direction: column; gap: 16px; }
.section-h {
  display: flex; align-items: baseline; gap: 14px;
  border-bottom: 1px solid var(--line-soft); padding-bottom: 8px;
}
.section-h h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink-0); letter-spacing: -0.01em; }
.section-h .count { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--ink-3); }

/* redesign card frame */
.redesign {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}
.redesign-head {
  padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px;
}
.redesign-head h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink-0); }
.redesign-head .id-tag {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px;
  color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase;
}
.redesign-head .verdict {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px;
  padding: 2px 8px; border-radius: 4px; margin-left: auto;
}
.redesign-head .verdict.new { background: color-mix(in oklch, var(--brand) 14%, var(--bg-1)); color: var(--brand); }
.redesign-head .verdict.reuse { background: color-mix(in oklch, var(--good) 14%, var(--bg-1)); color: var(--good); }
.redesign-
.redesign-mock { padding: 18px; background: var(--bg-0); border-right: 1px solid var(--line); }
.redesign-meta { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.redesign-meta .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 600; }
.redesign-meta p { margin: 0; font-size: 12.5px; color: var(--ink-1); }
.redesign-meta p.problem { color: var(--ink-2); border-left: 2px solid var(--bad); padding-left: 10px; }
.redesign-meta p.composition { color: var(--ink-2); border-left: 2px solid var(--brand); padding-left: 10px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; }
.redesign-meta pre {
  margin: 0; padding: 10px;
  background: var(--bg-0); border: 1px solid var(--line-soft); border-radius: 6px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--ink-1);
  overflow-x: auto; white-space: pre;
}

/* ════════ §A.1 LEAK HEADLINE CARD ════════ */
.leak-headline-card {
  background:
    radial-gradient(120% 100% at 100% 0%, color-mix(in oklch, var(--bad) 14%, transparent) 0%, transparent 60%),
    var(--bg-1);
  border: 1px solid color-mix(in oklch, var(--bad) 30%, var(--line));
  border-radius: 10px;
  padding: 18px 20px;
  display: grid; grid-template-columns: 1fr auto; gap: 16px;
}
.leak-headline-card .lhc-l { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.leak-headline-card .lhc-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
  color: var(--bad);
}
.leak-headline-card .lhc-tag .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--bad);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--bad) 25%, transparent);
}
.leak-headline-card .lhc-big {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 44px; font-weight: 600; letter-spacing: -0.025em; color: var(--bad);
  line-height: 1;
}
.leak-headline-card .lhc-sub { font-size: 12.5px; color: var(--ink-2); }
.leak-headline-card .lhc-sub b { color: var(--ink-0); font-weight: 600; }
.leak-headline-card .lhc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.leak-headline-card .lhc-chip {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; padding: 3px 8px; border-radius: 4px;
  background: var(--bg-2); color: var(--ink-1);
  border: 1px solid var(--line-soft);
}
.leak-headline-card .lhc-chip b { color: var(--bad); font-weight: 600; margin-left: 4px; }
.leak-headline-card .lhc-r { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.leak-headline-card .lhc-spark { opacity: 0.85; }
.leak-headline-card .lhc-cta {
  background: var(--ink-0); color: var(--bg-0); border: 0;
  padding: 7px 14px; border-radius: 6px; font: inherit; font-weight: 600; font-size: 12px;
  cursor: pointer;
}

/* ════════ §A.2 AI RECOMMENDATIONS STACK ════════ */
.ai-rec-stack { display: flex; flex-direction: column; gap: 6px; }
.ai-rec-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px;
}
.ai-rec-head .h-l { display: flex; align-items: center; gap: 10px; }
.ai-rec-head .h-ico {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--info) 100%);
  color: var(--bg-0); display: grid; place-items: center; font-weight: 700; font-size: 13px;
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--brand) 18%, transparent);
}
.ai-rec-head h4 { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-0); }
.ai-rec-head .h-meta { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--ink-3); }
.ai-rec-row {
  display: grid; grid-template-columns: 24px 1fr auto auto; gap: 12px;
  padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 8px;
  align-items: center;
}
.ai-rec-row .pri {
  width: 22px; height: 22px; border-radius: 5px;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; font-weight: 600;
}
.ai-rec-row.p-hi .pri { background: color-mix(in oklch, var(--bad) 18%, var(--bg-2)); color: var(--bad); }
.ai-rec-row.p-md .pri { background: color-mix(in oklch, var(--warn) 18%, var(--bg-2)); color: var(--warn); }
.ai-rec-row.p-lo .pri { background: color-mix(in oklch, var(--brand) 18%, var(--bg-2)); color: var(--brand); }
.ai-rec-row .body { min-width: 0; }
.ai-rec-row .body .ttl { font-size: 12.5px; color: var(--ink-0); font-weight: 500; }
.ai-rec-row .body .why { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.ai-rec-row .impact { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; color: var(--good); }
.ai-rec-row .conf {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px;
  padding: 2px 7px; border-radius: 4px; background: var(--bg-3); color: var(--ink-2);
}
.ai-rec-row .apply {
  background: transparent; color: var(--brand); border: 1px solid color-mix(in oklch, var(--brand) 35%, var(--line));
  padding: 4px 9px; border-radius: 5px; font: inherit; font-size: 11px; cursor: pointer;
}

/* ════════ §A.3 ANOMALIES FEED ════════ */
.anom-feed { display: flex; flex-direction: column; gap: 6px; }
.anom-feed-row {
  display: grid; grid-template-columns: 16px 56px 1fr auto;
  gap: 12px; align-items: center;
  padding: 8px 12px;
  background: var(--bg-1); border: 1px solid var(--line-soft); border-radius: 6px;
}
.anom-feed-row .sev-dot { width: 8px; height: 8px; border-radius: 50%; }
.anom-feed-row.bad  .sev-dot { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in oklch, var(--bad) 22%, transparent); }
.anom-feed-row.warn .sev-dot { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in oklch, var(--warn) 22%, transparent); }
.anom-feed-row.good .sev-dot { background: var(--good); box-shadow: 0 0 0 3px color-mix(in oklch, var(--good) 22%, transparent); }
.anom-feed-row .ts { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--ink-3); }
.anom-feed-row .desc { font-size: 12.5px; color: var(--ink-1); }
.anom-feed-row .desc b { color: var(--ink-0); font-weight: 600; }
.anom-feed-row .delta {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px;
  padding: 2px 7px; border-radius: 4px;
}
.anom-feed-row.bad .delta { background: color-mix(in oklch, var(--bad) 14%, transparent); color: var(--bad); }
.anom-feed-row.warn .delta { background: color-mix(in oklch, var(--warn) 14%, transparent); color: var(--warn); }
.anom-feed-row.good .delta { background: color-mix(in oklch, var(--good) 14%, transparent); color: var(--good); }

/* ════════ §A.4 PROFIT-LEAK KPI STRIP ════════ */
.leak-kpi-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden;
}
.leak-kpi-cell {
  padding: 12px 14px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.leak-kpi-cell:nth-child(4n) { border-right: 0; }
.leak-kpi-cell:nth-last-child(-n+4) { border-bottom: 0; }
.leak-kpi-cell .lbl {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-3); font-weight: 600;
}
.leak-kpi-cell .val {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 18px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-0);
  margin-top: 4px;
}
.leak-kpi-cell .delta {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; margin-top: 2px;
}
.leak-kpi-cell .delta.up { color: var(--good); }
.leak-kpi-cell .delta.dn { color: var(--bad); }
.leak-kpi-cell .delta.flat { color: var(--ink-3); }

/* ════════ §A.5 ONBOARDING STEP CARD ════════ */
.onb-step-card {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden;
}
.onb-progress {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.onb-step {
  padding: 10px 14px; border-right: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 8px; min-width: 0;
}
.onb-step:last-child { border-right: 0; }
.onb-step .num {
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; font-weight: 600;
  background: var(--bg-3); color: var(--ink-3);
}
.onb-step.done .num { background: var(--good); color: var(--bg-0); }
.onb-step.cur  .num { background: var(--brand); color: var(--bg-0); box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand) 25%, transparent); }
.onb-step .lbl-wrap { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.onb-step .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 600; }
.onb-step.cur .lbl { color: var(--ink-0); }
.onb-step .sub { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onb-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.onb-body h4 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-0); letter-spacing: -0.01em; }
.onb-body p { margin: 0; font-size: 12.5px; color: var(--ink-2); max-width: 540px; }
.onb-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.onb-field { display: flex; flex-direction: column; gap: 5px; }
.onb-field label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 600; }
.onb-field input, .onb-field select {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-0);
  padding: 7px 10px; border-radius: 6px; font: inherit; font-size: 12.5px;
}
.onb-field input:focus, .onb-field select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand) 22%, transparent);
}
.onb-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.onb-foot .skip { background: transparent; border: 0; color: var(--ink-3); font: inherit; font-size: 12px; cursor: pointer; }
.onb-foot .actions { display: flex; gap: 8px; }
.onb-foot button { font: inherit; font-size: 12px; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.onb-foot .back { background: var(--bg-2); border: 1px solid var(--line-soft); color: var(--ink-1); }
.onb-foot .next { background: var(--ink-0); border: 0; color: var(--bg-0); font-weight: 600; }

/* ════════ §B EMPTY STATES ════════ */
.empty-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.empty-state {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px;
  padding: 32px 24px; min-height: 280px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 12px;
}
.empty-state .illus { color: var(--ink-3); }
.empty-state h4 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-0); letter-spacing: -0.01em; }
.empty-state p { margin: 0; font-size: 12.5px; color: var(--ink-2); max-width: 320px; }
.empty-state .actions { display: flex; gap: 8px; margin-top: 6px; }
.empty-state .btn-primary, .empty-state .btn-secondary, .empty-state .btn-ghost {
  font: inherit; font-size: 12px; padding: 7px 14px; border-radius: 6px; cursor: pointer;
}
.empty-state .btn-primary { background: var(--ink-0); color: var(--bg-0); border: 0; font-weight: 600; }
.empty-state .btn-secondary { background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-1); }
.empty-state .btn-ghost { background: transparent; border: 0; color: var(--brand); }

.empty-state-tier-locked {
  background:
    radial-gradient(60% 80% at 100% 0%, color-mix(in oklch, var(--brand) 12%, transparent) 0%, transparent 60%),
    var(--bg-1);
  border-color: color-mix(in oklch, var(--brand) 22%, var(--line));
}
.empty-state-tier-locked h4 .badge {
  display: inline-block; margin-left: 6px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 9.5px;
  padding: 2px 6px; border-radius: 4px; vertical-align: middle;
  background: linear-gradient(135deg, var(--brand) 0%, var(--info) 100%); color: var(--bg-0);
}
.empty-state-tier-locked .btn-primary { background: linear-gradient(135deg, var(--brand) 0%, var(--info) 100%); color: var(--bg-0); }

.empty-state-error { border-color: color-mix(in oklch, var(--bad) 22%, var(--line)); }
.empty-state-error .illus { color: var(--bad); }

.illus-svg {
  width: 96px; height: 96px;
  stroke: currentColor; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.illus-svg .accent-fill { fill: currentColor; stroke: none; opacity: 0.18; }

/* ════════ §C LOADING / SKELETONS ════════ */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bar-sweep {
  0% { transform: translateX(-40%); }
  100% { transform: translateX(240%); }
}

.skel-bar {
  display: block;
  background: linear-gradient(
    90deg,
    var(--bg-2) 0%,
    color-mix(in oklch, var(--bg-3) 60%, var(--bg-2)) 50%,
    var(--bg-2) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: 4px;
}

.skel-table {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.skel-table .skel-row { display: grid; grid-template-columns: 28px 1fr 80px 60px 60px; gap: 10px; align-items: center; }
.skel-table .skel-row.head { padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); }

.skel-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.skel-card {
  background: var(--bg-1); border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
  animation: pulse 2s ease-in-out infinite;
}
.skel-card.compound .skel-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.skel-card .skel-foot { display: flex; gap: 8px; align-items: center; }

.skel-chart {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px; height: 200px; position: relative;
  display: flex; flex-direction: column; gap: 10px;
}
.skel-chart .skel-grid {
  flex: 1; position: relative;
  background-image: repeating-linear-gradient(0deg, var(--line-soft) 0 1px, transparent 1px 25%);
  animation: pulse 2s ease-in-out infinite;
}
.skel-chart .skel-curve {
  position: absolute; inset: 12px 0 12px 0;
  stroke: var(--ink-4); stroke-width: 1.5; fill: none; opacity: 0.5;
  animation: pulse 2s ease-in-out infinite;
}
.skel-chart .skel-axis { display: flex; justify-content: space-between; gap: 6px; }
.skel-chart .skel-axis .skel-bar { height: 7px; width: 36px; }

.spinner { display: inline-block; border-radius: 50%; vertical-align: middle; animation: spin 0.85s linear infinite; }
.spinner-sm { width: 16px; height: 16px; border: 2px solid color-mix(in oklch, var(--brand) 25%, transparent); border-top-color: var(--brand); }
.spinner-md { width: 24px; height: 24px; border: 2.5px solid color-mix(in oklch, var(--brand) 25%, transparent); border-top-color: var(--brand); }
.spinner-lg { width: 40px; height: 40px; border: 3px solid color-mix(in oklch, var(--brand) 25%, transparent); border-top-color: var(--brand); }

.progress-bar-indeterminate {
  height: 3px; background: var(--bg-2); border-radius: 2px; overflow: hidden; position: relative;
}
.progress-bar-indeterminate::after {
  content: ""; position: absolute; inset: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent 0%, var(--brand) 50%, transparent 100%);
  animation: bar-sweep 1.4s ease-in-out infinite;
}

.spinner-demo {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px;
  padding: 24px; display: flex; align-items: center; justify-content: center; gap: 32px;
}
.spinner-demo .lbl { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-3); font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* footer */
.batch-foot {
  border-top: 1px solid var(--line-soft); padding-top: 14px;
  display: flex; flex-wrap: wrap; gap: 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--ink-3);
}
.batch-foot b { color: var(--ink-1); font-weight: 600; }

/* spark for leak */
.lhc-spark svg { display: block; }

/* ════════ Batch 3 · _DESIGN_BATCH_4b_forms-badges-tooltips.html ════════ */


* { box-sizing: border-box; }


.page { max-width: 1240px; margin: 0 auto; padding: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-xl); }
.page-head h1 { font-size: 24px; font-weight: 700; color: var(--ink-0); margin: 0 0 6px; }
.page-head p { font-size: 13.5px; color: var(--ink-2); margin: 0; max-width: 920px; }
.page-head code, p code, .usage code {
  font-family: ui-monospace, monospace; font-size: 12.5px;
  background: var(--bg-2); padding: 1px 6px; border-radius: 3px; color: var(--ink-0);
}

.group-head {
  display: flex; align-items: baseline; gap: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--line-soft);
  scroll-margin-top: var(--space-md);
}
.group-head h2 { font-size: 15px; font-weight: 700; color: var(--ink-0); margin: 0; letter-spacing: 0.02em; }
.group-head .count { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--ink-3); }

/* ════════ INPUT CHROME (shared) ════════ */
.input-demo {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--space-md) var(--space-lg);
  display: flex; flex-direction: column; gap: var(--space-sm);
}
.input-demo h3 {
  margin: 0; font-size: 13px; font-weight: 600;
  font-family: ui-monospace, monospace;
  color: var(--ink-0);
}
.input-demo .id-tag {
  font-family: ui-monospace, monospace; font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.04em;
}
.input-demo .states-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
  align-items: start;
}
.state-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.state-cell .state-label {
  font-family: ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.06em;
  color: var(--ink-4); text-transform: uppercase;
}
.input-demo .usage {
  margin: 0;
  font-size: 12px; color: var(--ink-2);
  border-top: 1px dashed var(--line-soft);
  padding-top: var(--space-sm);
}
.input-demo .usage b { color: var(--ink-1); font-weight: 600; }

/* ════════ TEXT INPUT (.input-text) ════════ */
.input-text {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  height: 32px;
  color: var(--ink-1);
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  transition: border-color 100ms ease, background 100ms ease;
}
.input-text:hover { border-color: var(--ink-3); }
.input-text:focus, .input-text.is-focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--brand) 22%, transparent);
}
.input-text.is-disabled { background: var(--bg-1); color: var(--ink-3); border-color: var(--line-soft); cursor: not-allowed; }
.input-text.is-error  { border-color: var(--bad);  box-shadow: 0 0 0 2px color-mix(in oklch, var(--bad)  22%, transparent); }
.input-text.is-success{ border-color: var(--good); box-shadow: 0 0 0 2px color-mix(in oklch, var(--good) 22%, transparent); }
.input-text > svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; color: var(--ink-3); }
.input-text > input {
  background: transparent; border: none; outline: none;
  color: inherit; font: inherit;
  flex: 1; min-width: 0;
}
.input-text > input::placeholder { color: var(--ink-4); }
.input-text > .clear {
  border: none; background: transparent; color: var(--ink-3);
  width: 16px; height: 16px; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.input-text > .clear:hover { background: var(--bg-2); color: var(--ink-1); }
.input-msg { font-size: 11.5px; color: var(--ink-3); }
.input-msg.err { color: var(--bad); }
.input-msg.ok  { color: var(--good); }

/* ════════ NUMBER INPUT ════════ */
.input-number {
  display: inline-flex; align-items: stretch;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  height: 32px;
  width: 100%;
  overflow: hidden;
}
.input-number:hover { border-color: var(--ink-3); }
.input-number:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--brand) 22%, transparent);
}
.input-number.is-disabled { background: var(--bg-1); color: var(--ink-3); border-color: var(--line-soft); cursor: not-allowed; }
.input-number.is-error  { border-color: var(--bad);  box-shadow: 0 0 0 2px color-mix(in oklch, var(--bad) 22%, transparent); }
.input-number.is-success{ border-color: var(--good); box-shadow: 0 0 0 2px color-mix(in oklch, var(--good) 22%, transparent); }
.input-number > button {
  border: none; background: var(--bg-1); color: var(--ink-2);
  width: 28px; cursor: pointer;
  font-size: 14px;
  border-right: 1px solid var(--line-soft);
}
.input-number > button:last-child { border-right: none; border-left: 1px solid var(--line-soft); }
.input-number > button:hover { background: var(--bg-2); color: var(--ink-0); }
.input-number > input {
  background: transparent; border: none; outline: none;
  color: var(--ink-0); font: inherit;
  flex: 1; min-width: 0;
  text-align: right;
  padding: 0 6px;
  font-family: ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
.input-number > .suffix {
  display: flex; align-items: center; padding: 0 8px 0 0;
  color: var(--ink-3); font-size: 12.5px; font-family: ui-monospace, monospace;
}

/* ════════ DATE PICKERS ════════ */
.input-date-single, .input-date-range {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  height: 32px;
  cursor: pointer;
  color: var(--ink-1);
  font-size: 13px;
  width: 100%;
  font-family: ui-monospace, monospace;
}
.input-date-single:hover, .input-date-range:hover { border-color: var(--ink-3); }
.input-date-single.is-focus, .input-date-range.is-focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--brand) 22%, transparent);
}
.input-date-single.is-disabled, .input-date-range.is-disabled {
  background: var(--bg-1); color: var(--ink-3); border-color: var(--line-soft); cursor: not-allowed;
}
.input-date-single.is-error, .input-date-range.is-error { border-color: var(--bad); }
.input-date-single.is-success, .input-date-range.is-success { border-color: var(--good); }
.input-date-single svg, .input-date-range svg {
  width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; color: var(--ink-3); flex: none;
}
.input-date-range .sep { color: var(--ink-4); padding: 0 4px; }

/* date popover */
.date-popover {
  position: absolute;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  padding: var(--space-md);
  display: none;
  z-index: 100;
  min-width: 260px;
}
.date-popover.is-open { display: block; }
.date-popover .cal-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; color: var(--ink-1); margin-bottom: 8px;
  font-family: ui-monospace, monospace;
}
.date-popover .cal-head button {
  border: none; background: transparent; color: var(--ink-2); cursor: pointer;
  width: 22px; height: 22px; border-radius: 4px;
}
.date-popover .cal-head button:hover { background: var(--bg-2); color: var(--ink-0); }
.date-popover .cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.date-popover .cal-grid .dow {
  font-size: 10px; color: var(--ink-4); text-align: center;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 2px 0;
}
.date-popover .cal-grid .day {
  height: 28px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--ink-1); border-radius: 4px;
  cursor: pointer; font-family: ui-monospace, monospace;
}
.date-popover .cal-grid .day:hover { background: var(--bg-2); }
.date-popover .cal-grid .day.muted { color: var(--ink-4); }
.date-popover .cal-grid .day.sel { background: var(--brand); color: var(--bg-0); }
.date-popover .cal-grid .day.range { background: color-mix(in oklch, var(--brand) 25%, transparent); color: var(--ink-0); }
.date-popover .presets {
  display: flex; flex-wrap: wrap; gap: 6px;
  border-top: 1px solid var(--line-soft);
  padding-top: var(--space-sm);
  margin-top: var(--space-sm);
}
.date-popover .presets button {
  border: 1px solid var(--line);
  background: var(--bg-0);
  color: var(--ink-1);
  font: inherit; font-size: 11.5px;
  padding: 3px 8px; border-radius: 3px;
  cursor: pointer;
}
.date-popover .presets button:hover { background: var(--bg-2); color: var(--ink-0); }

/* ════════ SELECTS ════════ */
.select-single, .select-multi {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 4px 6px 4px 10px;
  min-height: 32px;
  cursor: pointer;
  color: var(--ink-1);
  font-size: 13px;
  width: 100%;
  flex-wrap: wrap;
}
.select-single:hover, .select-multi:hover { border-color: var(--ink-3); }
.select-single.is-focus, .select-multi.is-focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--brand) 22%, transparent);
}
.select-single.is-disabled, .select-multi.is-disabled {
  background: var(--bg-1); color: var(--ink-3); border-color: var(--line-soft); cursor: not-allowed;
}
.select-single.is-error, .select-multi.is-error { border-color: var(--bad); }
.select-single.is-success, .select-multi.is-success { border-color: var(--good); }
.select-single .sel-value { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: 12.5px; }
.select-single .sel-value.muted { color: var(--ink-4); font-family: inherit; font-size: 13px; }
.select-single .caret, .select-multi .caret {
  width: 12px; height: 12px; stroke: var(--ink-3); fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}

/* multi-select chips */
.select-multi .chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg-2); border: 1px solid var(--line-soft);
  color: var(--ink-1);
  border-radius: 3px;
  padding: 1px 4px 1px 7px;
  font-size: 11.5px;
  font-family: ui-monospace, monospace;
}
.select-multi .chip button {
  border: none; background: transparent; color: var(--ink-3); cursor: pointer;
  width: 14px; height: 14px; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 11px;
}
.select-multi .chip button:hover { background: var(--bg-3); color: var(--ink-0); }
.select-multi .placeholder { color: var(--ink-4); flex: 1; }

/* select dropdown panel */
.select-panel {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  padding: 4px;
  display: none; z-index: 100;
  max-height: 200px; overflow-y: auto;
}
.select-panel.is-open { display: block; }
.select-panel .filter {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 4px;
}
.select-panel .filter input {
  background: transparent; border: none; outline: none;
  color: var(--ink-0); font: inherit; font-size: 12px;
  flex: 1; min-width: 0;
}
.select-panel .opt {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; font-size: 12.5px;
  font-family: ui-monospace, monospace;
  color: var(--ink-1); border-radius: 3px;
  cursor: pointer;
}
.select-panel .opt:hover { background: var(--bg-2); color: var(--ink-0); }
.select-panel .opt.sel { background: color-mix(in oklch, var(--brand) 18%, var(--bg-1)); color: var(--ink-0); }
.select-panel .opt.sel::before { content: "✓"; color: var(--brand); width: 12px; }
.select-panel .opt:not(.sel)::before { content: ""; width: 12px; }

/* ════════ TOGGLE SWITCH ════════ */
.toggle-switch {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-1);
}
.toggle-switch .track {
  position: relative;
  width: 32px; height: 18px;
  background: var(--bg-3);
  border-radius: 999px;
  transition: background 120ms ease;
  flex: none;
}
.toggle-switch.md .track { width: 40px; height: 22px; }
.toggle-switch .track::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: var(--ink-1);
  border-radius: 50%;
  transition: transform 120ms ease, background 120ms ease;
}
.toggle-switch.md .track::after { width: 18px; height: 18px; }
.toggle-switch.is-on .track { background: var(--brand); }
.toggle-switch.is-on .track::after { transform: translateX(14px); background: var(--bg-0); }
.toggle-switch.md.is-on .track::after { transform: translateX(18px); }
.toggle-switch.is-disabled { color: var(--ink-3); cursor: not-allowed; }
.toggle-switch.is-disabled .track { opacity: 0.5; }
.toggle-switch.is-error .track { background: var(--bad); }
.toggle-switch.is-success .track { background: var(--good); }

/* ════════ RADIO GROUP ════════ */
.radio-group { display: inline-flex; flex-direction: column; gap: 6px; }
.radio-group .opt {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-1); cursor: pointer;
}
.radio-group .opt .dot {
  width: 14px; height: 14px;
  border: 1.5px solid var(--ink-3);
  border-radius: 50%;
  position: relative;
  flex: none;
}
.radio-group .opt.sel .dot { border-color: var(--brand); }
.radio-group .opt.sel .dot::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 7px; height: 7px; background: var(--brand); border-radius: 50%;
}
.radio-group .opt.is-disabled { color: var(--ink-3); cursor: not-allowed; }
.radio-group .opt.is-disabled .dot { border-color: var(--ink-4); opacity: 0.5; }

/* segmented variant (.seg-toggle) */
.seg-toggle {
  display: inline-flex;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 2px;
  gap: 0;
}
.seg-toggle button {
  border: none; background: transparent; color: var(--ink-2);
  font: inherit; font-size: 12px;
  padding: 4px 12px; cursor: pointer;
  border-radius: 3px;
}
.seg-toggle button:hover { color: var(--ink-0); }
.seg-toggle button.sel {
  background: var(--bg-3); color: var(--ink-0);
  box-shadow: inset 0 0 0 1px var(--line);
}
.seg-toggle.is-disabled { opacity: 0.5; pointer-events: none; }
.seg-toggle.is-error { border-color: var(--bad); }
.seg-toggle.is-success { border-color: var(--good); }

/* ════════ CHECKBOX ════════ */
.checkbox {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-1); cursor: pointer;
}
.checkbox .box {
  width: 14px; height: 14px;
  border: 1.5px solid var(--ink-3);
  border-radius: 3px;
  position: relative;
  flex: none;
  transition: background 120ms ease, border-color 120ms ease;
}
.checkbox.sel .box { background: var(--brand); border-color: var(--brand); }
.checkbox.sel .box::after {
  content: ""; position: absolute;
  left: 3px; top: 0px;
  width: 5px; height: 9px;
  border: solid var(--bg-0);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.checkbox.tri .box { background: var(--brand); border-color: var(--brand); }
.checkbox.tri .box::after {
  content: ""; position: absolute;
  left: 2px; top: 5px; right: 2px; height: 2px;
  background: var(--bg-0);
}
.checkbox.is-disabled { color: var(--ink-3); cursor: not-allowed; }
.checkbox.is-disabled .box { border-color: var(--ink-4); opacity: 0.5; }
.checkbox.is-error .box { border-color: var(--bad); }
.checkbox.is-success .box { border-color: var(--good); }

/* ════════ SLIDER ════════ */
.slider {
  display: flex; flex-direction: column; gap: 6px;
  width: 100%;
}
.slider .track {
  position: relative;
  height: 4px;
  background: var(--bg-3);
  border-radius: 2px;
}
.slider .fill {
  position: absolute;
  top: 0; bottom: 0;
  background: var(--brand);
  border-radius: 2px;
}
.slider .handle {
  position: absolute; top: 50%;
  width: 14px; height: 14px;
  background: var(--ink-0);
  border: 2px solid var(--brand);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: grab;
}
.slider .handle:hover { box-shadow: 0 0 0 4px color-mix(in oklch, var(--brand) 22%, transparent); }
.slider .scale {
  display: flex; justify-content: space-between;
  font-family: ui-monospace, monospace; font-size: 11px;
  color: var(--ink-3);
}
.slider.is-disabled .fill, .slider.is-disabled .handle { background: var(--ink-3); border-color: var(--ink-3); }
.slider.is-disabled { opacity: 0.5; pointer-events: none; }
.slider.is-error .fill { background: var(--bad); }
.slider.is-error .handle { border-color: var(--bad); }
.slider.is-success .fill { background: var(--good); }
.slider.is-success .handle { border-color: var(--good); }

/* ════════ TEXTAREA ════════ */
.textarea-wrap {
  display: flex; flex-direction: column; gap: 4px;
  width: 100%;
}
.textarea {
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  color: var(--ink-1);
  font: inherit; font-size: 13px;
  resize: vertical;
  min-height: 64px;
  font-family: inherit;
}
.textarea:hover { border-color: var(--ink-3); }
.textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in oklch, var(--brand) 22%, transparent); }
.textarea.is-disabled { background: var(--bg-1); color: var(--ink-3); border-color: var(--line-soft); }
.textarea.is-error  { border-color: var(--bad); }
.textarea.is-success{ border-color: var(--good); }
.textarea-foot {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--ink-3);
  font-family: ui-monospace, monospace;
}
.textarea-foot .count.warn { color: var(--warn); }
.textarea-foot .count.bad  { color: var(--bad); }

/* ════════ BADGES ════════ */
.badge-grid {
  display: grid;
  grid-template-columns: 96px repeat(6, 1fr);
  gap: var(--space-sm);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--space-md);
}
.badge-grid .col-h, .badge-grid .row-h {
  font-family: ui-monospace, monospace; font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.04em;
  display: flex; align-items: center;
}
.badge-grid .col-h { justify-content: center; padding-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
.badge-grid .row-h { padding-right: var(--space-sm); border-right: 1px solid var(--line-soft); }
.badge-grid .cell { display: flex; align-items: center; justify-content: center; padding: 6px 0; }

.badge-sm {
  display: inline-flex; align-items: center; justify-content: center;
  height: 16px; min-width: 16px; padding: 0 5px;
  font-family: ui-monospace, monospace; font-size: 10px;
  font-weight: 700; letter-spacing: 0.04em;
  border-radius: 3px;
}
.pill-tag {
  display: inline-flex; align-items: center;
  height: 20px; padding: 0 8px;
  font-size: 11.5px; font-weight: 500;
  border-radius: 999px;
  border: 1px solid;
}
.badge-num {
  display: inline-flex; align-items: center; justify-content: center;
  height: 16px; min-width: 16px; padding: 0 4px;
  font-family: ui-monospace, monospace; font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  color: var(--bg-0);
}
.dot-swatch {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
}

/* tones */
.t-good    { background: color-mix(in oklch, var(--good) 18%, var(--bg-2)); color: var(--good);    border-color: color-mix(in oklch, var(--good) 35%, var(--line)); }
.t-warn    { background: color-mix(in oklch, var(--warn) 18%, var(--bg-2)); color: var(--warn);    border-color: color-mix(in oklch, var(--warn) 35%, var(--line)); }
.t-bad     { background: color-mix(in oklch, var(--bad)  18%, var(--bg-2)); color: var(--bad);     border-color: color-mix(in oklch, var(--bad)  35%, var(--line)); }
.t-info    { background: color-mix(in oklch, var(--info) 18%, var(--bg-2)); color: var(--info);    border-color: color-mix(in oklch, var(--info) 35%, var(--line)); }
.t-neutral { background: var(--bg-3);                                       color: var(--ink-2);   border-color: var(--line); }
.t-brand   { background: color-mix(in oklch, var(--brand) 18%, var(--bg-2)); color: var(--brand);  border-color: color-mix(in oklch, var(--brand) 35%, var(--line)); }

.badge-num.t-good    { background: var(--good); }
.badge-num.t-warn    { background: var(--warn); }
.badge-num.t-bad     { background: var(--bad); }
.badge-num.t-info    { background: var(--info); }
.badge-num.t-neutral { background: var(--ink-2); }
.badge-num.t-brand   { background: var(--brand); }

.dot-swatch.t-good    { background: var(--good); }
.dot-swatch.t-warn    { background: var(--warn); }
.dot-swatch.t-bad     { background: var(--bad); }
.dot-swatch.t-info    { background: var(--info); }
.dot-swatch.t-neutral { background: var(--ink-3); }
.dot-swatch.t-brand   { background: var(--brand); }

/* ════════ TOOLTIPS ════════ */
.tip-stage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--space-xl);
  min-height: 240px;
}
.tip-cell {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-md);
  position: relative;
}
.tip-cell .label {
  font-family: ui-monospace, monospace; font-size: 11.5px;
  color: var(--ink-3); letter-spacing: 0.02em;
}
.tip-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  height: 32px;
  color: var(--ink-1);
  font-size: 13px;
  cursor: pointer;
  font: inherit;
  font-family: 'Inter Tight', sans-serif;
}
.tip-trigger:hover { background: var(--bg-3); border-color: var(--ink-3); }
.tip-trigger svg { width: 14px; height: 14px; stroke: var(--ink-2); fill: none; stroke-width: 1.5; }

.tooltip-hover {
  position: absolute;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--ink-0);
  font-size: 12px;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  max-width: 220px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
  z-index: 100;
  white-space: normal;
}
.tip-trigger:hover + .tooltip-hover,
.tooltip-hover.is-visible {
  opacity: 1;
}
.tooltip-hover.pos-top    { bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-6px); }
.tooltip-hover.pos-bottom { top: 100%;    left: 50%; transform: translateX(-50%) translateY(6px); }
.tooltip-hover.pos-left   { right: 100%; top: 50%; transform: translateY(-50%) translateX(-6px); }
.tooltip-hover .tail {
  position: absolute;
  width: 8px; height: 8px;
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.tooltip-hover.pos-top .tail    { bottom: -5px; left: 50%; transform: translateX(-50%) rotate(45deg); border-top: none; border-left: none; }
.tooltip-hover.pos-bottom .tail { top: -5px;    left: 50%; transform: translateX(-50%) rotate(45deg); border-bottom: none; border-right: none; }
.tooltip-hover.pos-left .tail   { right: -5px;  top: 50%;  transform: translateY(-50%) rotate(45deg); border-bottom: none; border-left: none; }

.tip-sticky {
  position: absolute;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  padding: var(--space-md) var(--space-lg);
  max-width: 280px;
  display: none;
  z-index: 200;
  top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
}
.tip-sticky.is-open { display: block; }
.tip-sticky .close {
  position: absolute; top: 6px; right: 6px;
  border: none; background: transparent;
  color: var(--ink-3); cursor: pointer;
  width: 18px; height: 18px; padding: 0;
  border-radius: 3px;
  font-family: ui-monospace, monospace;
  font-size: 14px; line-height: 1;
}
.tip-sticky .close:hover { background: var(--bg-2); color: var(--ink-0); }
.tip-sticky .formula {
  font-family: ui-monospace, monospace; font-size: 12.5px;
  color: var(--ink-0);
  background: var(--bg-2);
  padding: 6px 8px; border-radius: 3px;
  margin: 6px 0;
}
.tip-sticky p { margin: 4px 0; font-size: 12.5px; color: var(--ink-1); }
.tip-sticky .heading {
  font-size: 12px; font-weight: 600; color: var(--ink-0);
  margin: 0 0 4px;
  font-family: ui-monospace, monospace;
}

.popover-rich {
  position: absolute;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  width: 320px;
  display: none;
  z-index: 200;
  top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
  overflow: hidden;
}
.popover-rich.is-open { display: block; }
.popover-rich .popover-h {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px; font-weight: 600; color: var(--ink-0);
}
.popover-rich .popover-h .close {
  border: none; background: transparent;
  color: var(--ink-3); cursor: pointer;
  width: 22px; height: 22px; padding: 0; border-radius: 3px;
  font-family: ui-monospace, monospace; font-size: 16px;
}
.popover-rich .popover-h .close:hover { background: var(--bg-2); color: var(--ink-0); }
.popover-rich .popover-
.popover-rich .popover-body p { margin: 0 0 6px; }
.popover-rich .popover-body code {
  background: var(--bg-2); color: var(--ink-0);
  padding: 1px 5px; border-radius: 3px;
  font-family: ui-monospace, monospace; font-size: 11.5px;
}
.popover-rich .popover-foot {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-2);
  border-top: 1px solid var(--line-soft);
}
.popover-rich .popover-foot a {
  color: var(--brand); font-size: 12px; text-decoration: none;
}
.popover-rich .popover-foot a:hover { text-decoration: underline; }
.popover-rich .popover-foot .got-it {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: var(--bg-0);
  font: inherit; font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: var(--r-sm);
  cursor: pointer;
}
.popover-rich .popover-foot .got-it:hover { background: color-mix(in oklch, var(--brand) 80%, var(--ink-0)); }

.popover-backdrop {
  position: fixed; inset: 0;
  background: color-mix(in oklch, var(--bg-0) 40%, transparent);
  backdrop-filter: blur(2px);
  display: none;
  z-index: 150;
}
.popover-backdrop.is-open { display: block; }

.batch-foot {
  border-top: 1px solid var(--line-soft);
  padding-top: var(--space-md);
  font-family: ui-monospace, monospace; font-size: 11.5px;
  color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: var(--space-md);
}
.batch-foot b { color: var(--ink-1); font-weight: 600; }

/* ════════ Batch 4 · _DESIGN_BATCH_5a_modals-drawers-toasts.html ════════ */

* { box-sizing: border-box; }

.page { max-width: 1240px; margin: 0 auto; padding: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-xl); }
.page-head h1 { font-size: 24px; font-weight: 700; color: var(--ink-0); margin: 0 0 6px; }
.page-head p { font-size: 13.5px; color: var(--ink-2); margin: 0; max-width: 920px; }
code, .id-tag {
  font-family: ui-monospace, monospace; font-size: 12.5px;
  background: var(--bg-2); padding: 1px 6px; border-radius: 3px; color: var(--ink-0);
}
.id-tag { font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; background: transparent; padding: 0; }
.group-head {
  display: flex; align-items: baseline; gap: var(--space-md);
  padding-bottom: var(--space-sm); border-bottom: 1px solid var(--line-soft);
}
.group-head h2 { font-size: 15px; font-weight: 700; color: var(--ink-0); margin: 0; letter-spacing: 0.02em; }
.group-head .count { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--ink-3); }
.demo-card {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--space-md) var(--space-lg);
  display: flex; flex-direction: column; gap: var(--space-sm);
}
.demo-card h3 { margin: 0; font-size: 13px; font-weight: 600; font-family: ui-monospace, monospace; color: var(--ink-0); }
.demo-card .stage {
  position: relative;
  background: var(--bg-0); border: 1px solid var(--line-soft);
  border-radius: var(--r-sm); padding: var(--space-md);
  min-height: 320px; overflow: hidden;
}
.demo-card .usage {
  margin: 0; font-size: 12px; color: var(--ink-2);
  border-top: 1px dashed var(--line-soft); padding-top: var(--space-sm);
}
.demo-card .usage b { color: var(--ink-1); font-weight: 600; }

/* ═════ buttons (for modal/banner CTAs) ═════ */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; font: inherit; font-size: 13px; font-family: inherit; border-radius: var(--r-sm); cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--brand); color: var(--bg-0); border-color: var(--brand); font-weight: 600; }
.btn-primary:hover { background: color-mix(in oklch, var(--brand) 80%, var(--ink-0)); }
.btn-danger { background: var(--bad); color: var(--bg-0); border-color: var(--bad); font-weight: 600; }
.btn-danger:hover { background: color-mix(in oklch, var(--bad) 80%, var(--ink-0)); }
.btn-secondary { background: transparent; color: var(--ink-1); border-color: var(--line); }
.btn-secondary:hover { background: var(--bg-2); border-color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-2); color: var(--ink-0); }
.kbd { font-family: ui-monospace, monospace; font-size: 11px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; color: var(--ink-2); }

/* ═════ A.1 modal-dialog ═════ */
.modal-backdrop { position: absolute; inset: 0; background: color-mix(in oklch, var(--bg-0) 60%, transparent); backdrop-filter: blur(8px); z-index: 1; }
.modal-dialog {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-md); width: min(560px, calc(100% - 32px));
  max-height: 70%; display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6); z-index: 300;
}
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--line-soft); }
.modal-h .title { font-size: 14px; font-weight: 600; color: var(--ink-0); }
.modal-h .close { border: none; background: transparent; color: var(--ink-3); cursor: pointer; width: 24px; height: 24px; padding: 0; border-radius: 4px; font-size: 16px; font-family: ui-monospace, monospace; }
.modal-h .close:hover { background: var(--bg-2); color: var(--ink-0); }
.modal-
.modal-body p { margin: 0 0 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--space-sm); padding: var(--space-md) var(--space-lg); border-top: 1px solid var(--line-soft); background: var(--bg-2); border-bottom-left-radius: var(--r-md); border-bottom-right-radius: var(--r-md); }

/* ═════ A.2 drawer-side ═════ */
.drawer-backdrop { position: absolute; inset: 0; background: color-mix(in oklch, var(--bg-0) 50%, transparent); z-index: 1; }
.drawer-side {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(480px, 80%);
  background: var(--bg-1); border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  box-shadow: -16px 0 48px rgba(0,0,0,0.5); z-index: 300;
  animation: drawer-in 200ms ease-out;
}
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-h { display: flex; justify-content: space-between; align-items: center; padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--line-soft); }
.drawer-h .title { font-size: 14px; font-weight: 600; color: var(--ink-0); }
.drawer-h .close { border: none; background: transparent; color: var(--ink-3); cursor: pointer; width: 24px; height: 24px; padding: 0; border-radius: 4px; font-family: ui-monospace, monospace; font-size: 16px; }
.drawer-h .close:hover { background: var(--bg-2); color: var(--ink-0); }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--space-md) var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md); }
.drawer-foot { padding: var(--space-md) var(--space-lg); border-top: 1px solid var(--line-soft); background: var(--bg-2); display: flex; justify-content: space-between; gap: var(--space-sm); }
.drawer-section h4 { margin: 0 0 6px; font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }
.drawer-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line-soft); font-size: 12.5px; }
.drawer-row .l { color: var(--ink-2); }
.drawer-row .v { color: var(--ink-0); font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* ═════ A.3 drill-modal ═════ */
.drill-modal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-md); width: min(720px, calc(100% - 32px));
  max-height: 80%; display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6); z-index: 300;
}
.drill-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line-soft); padding: 0 var(--space-lg); background: var(--bg-2); border-top-left-radius: var(--r-md); border-top-right-radius: var(--r-md); }
.drill-tabs button { border: none; background: transparent; padding: 10px 14px; font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.drill-tabs button:hover { color: var(--ink-0); }
.drill-tabs button.sel { color: var(--ink-0); border-bottom-color: var(--brand); font-weight: 600; }
.drill-h { display: flex; justify-content: space-between; align-items: center; padding: var(--space-md) var(--space-lg) 6px; }
.drill-h .title { font-size: 14px; font-weight: 600; color: var(--ink-0); }
.drill-h .sub { font-size: 11.5px; color: var(--ink-3); font-family: ui-monospace, monospace; }
.drill-h .close { border: none; background: transparent; color: var(--ink-3); cursor: pointer; width: 24px; height: 24px; padding: 0; border-radius: 4px; font-family: ui-monospace, monospace; font-size: 16px; }
.drill-h .close:hover { background: var(--bg-2); color: var(--ink-0); }
.drill-body { padding: var(--space-md) var(--space-lg) var(--space-lg); overflow-y: auto; font-size: 13px; }
.drill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); margin-top: var(--space-sm); }
.drill-mini-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--space-sm) var(--space-md); }
.drill-mini-card .l { font-size: 11px; color: var(--ink-3); letter-spacing: 0.02em; text-transform: uppercase; }
.drill-mini-card .v { font-family: ui-monospace, monospace; font-size: 18px; font-weight: 600; color: var(--ink-0); font-variant-numeric: tabular-nums; }
.drill-mini-card[data-tone="revenue"] { border-left: 3px solid color-mix(in oklch, var(--good) 35%, var(--line)); }
.drill-mini-card[data-tone="revenue"] .v { color: var(--good); }
.drill-mini-card[data-tone="expense"] { border-left: 3px solid color-mix(in oklch, var(--bad) 35%, var(--line)); }
.drill-mini-card[data-tone="expense"] .v { color: var(--bad); }

/* ═════ B.1 banner-page-top ═════ */
.banner-page-top {
  display: flex; align-items: center; gap: var(--space-md);
  padding: 10px var(--space-lg);
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.banner-page-top svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; flex: none; }
.banner-page-top .body { flex: 1; }
.banner-page-top .body b { font-weight: 600; }
.banner-page-top .dismiss { border: none; background: transparent; color: inherit; opacity: 0.6; cursor: pointer; width: 22px; height: 22px; padding: 0; border-radius: 3px; font-family: ui-monospace, monospace; font-size: 14px; }
.banner-page-top .dismiss:hover { opacity: 1; background: rgba(255,255,255,0.06); }
.banner-page-top.t-info { background: color-mix(in oklch, var(--info) 14%, var(--bg-1)); color: var(--info); border-bottom-color: color-mix(in oklch, var(--info) 30%, var(--line)); }
.banner-page-top.t-warn { background: color-mix(in oklch, var(--warn) 14%, var(--bg-1)); color: var(--warn); border-bottom-color: color-mix(in oklch, var(--warn) 30%, var(--line)); }
.banner-page-top.t-bad  { background: color-mix(in oklch, var(--bad)  14%, var(--bg-1)); color: var(--bad);  border-bottom-color: color-mix(in oklch, var(--bad)  30%, var(--line)); }
.banner-page-top.t-good { background: color-mix(in oklch, var(--good) 14%, var(--bg-1)); color: var(--good); border-bottom-color: color-mix(in oklch, var(--good) 30%, var(--line)); }

/* ═════ B.2 alert-inline ═════ */
.alert-inline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; font-size: 12.5px;
  border-radius: var(--r-sm); border: 1px solid;
}
.alert-inline svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; flex: none; }
.alert-inline.t-info { background: color-mix(in oklch, var(--info) 12%, var(--bg-1)); color: var(--info); border-color: color-mix(in oklch, var(--info) 30%, var(--line)); }
.alert-inline.t-warn { background: color-mix(in oklch, var(--warn) 12%, var(--bg-1)); color: var(--warn); border-color: color-mix(in oklch, var(--warn) 30%, var(--line)); }
.alert-inline.t-bad  { background: color-mix(in oklch, var(--bad)  12%, var(--bg-1)); color: var(--bad);  border-color: color-mix(in oklch, var(--bad)  30%, var(--line)); }
.alert-inline.t-good { background: color-mix(in oklch, var(--good) 12%, var(--bg-1)); color: var(--good); border-color: color-mix(in oklch, var(--good) 30%, var(--line)); }

/* ═════ B.3 toast ═════ */
.toast-host {
  position: absolute; bottom: var(--space-lg); right: var(--space-lg);
  display: flex; flex-direction: column; gap: 8px;
  z-index: 400; max-width: 320px;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--r-sm); padding: var(--space-sm) var(--space-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  font-size: 12.5px;
  animation: toast-in 200ms ease-out;
}
@keyframes toast-in { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; flex: none; margin-top: 2px; }
.toast .body { flex: 1; min-width: 0; }
.toast .body .title { font-weight: 600; color: var(--ink-0); font-size: 12.5px; }
.toast .body .desc  { color: var(--ink-2); font-size: 11.5px; margin-top: 1px; }
.toast .body .action { margin-top: 4px; }
.toast .body .action button { border: none; background: transparent; color: var(--brand); font: inherit; font-size: 11.5px; padding: 0; cursor: pointer; }
.toast .body .action button:hover { text-decoration: underline; }
.toast .dismiss { border: none; background: transparent; color: var(--ink-3); cursor: pointer; width: 18px; height: 18px; padding: 0; border-radius: 3px; font-family: ui-monospace, monospace; font-size: 12px; }
.toast .dismiss:hover { background: var(--bg-3); color: var(--ink-0); }
.toast.t-good { border-left-color: var(--good); color: var(--good); }
.toast.t-warn { border-left-color: var(--warn); color: var(--warn); }
.toast.t-bad  { border-left-color: var(--bad);  color: var(--bad); }
.toast.t-info { border-left-color: var(--info); color: var(--info); }

/* ═════ B.4 nudge-bar ═════ */
.nudge-bar {
  display: flex; align-items: center; gap: var(--space-md);
  padding: 8px var(--space-lg);
  background: linear-gradient(90deg, color-mix(in oklch, var(--brand) 22%, var(--bg-1)), color-mix(in oklch, var(--info) 22%, var(--bg-1)));
  border-bottom: 1px solid color-mix(in oklch, var(--brand) 30%, var(--line));
  font-size: 12.5px; color: var(--ink-0);
}
.nudge-bar .icon-spark { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 50%; background: color-mix(in oklch, var(--brand) 60%, transparent); color: var(--bg-0); font-family: ui-monospace, monospace; font-weight: 700; font-size: 11px; flex: none; }
.nudge-bar .body { flex: 1; }
.nudge-bar .body b { color: var(--brand); }
.nudge-bar .upgrade-cta {
  border: 1px solid color-mix(in oklch, var(--brand) 50%, var(--line));
  background: rgba(0,0,0,0.2); color: var(--ink-0);
  font: inherit; font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--r-sm); cursor: pointer;
}
.nudge-bar .upgrade-cta:hover { background: rgba(0,0,0,0.35); border-color: var(--brand); }
.nudge-bar .dismiss { border: none; background: transparent; color: var(--ink-2); cursor: pointer; width: 22px; height: 22px; padding: 0; font-family: ui-monospace, monospace; font-size: 14px; border-radius: 3px; }
.nudge-bar .dismiss:hover { background: rgba(0,0,0,0.2); color: var(--ink-0); }

/* ═════ C.1 sortable table ═════ */
.traffic-tbl {
  width: 100%; border-collapse: collapse;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
  font-size: 12.5px;
}
.traffic-tbl thead th {
  background: var(--bg-2); color: var(--ink-1);
  text-align: left; padding: 8px var(--space-md);
  font-weight: 600; font-size: 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
  white-space: nowrap;
  user-select: none;
}
.traffic-tbl thead th .head-row { display: inline-flex; align-items: center; gap: 6px; }
.traffic-tbl thead th .sort-ind {
  display: inline-block; width: 9px; height: 9px;
  position: relative; opacity: 0.4;
}
.traffic-tbl thead th .sort-ind::before, .traffic-tbl thead th .sort-ind::after {
  content: ""; position: absolute; left: 1px; width: 0; height: 0;
  border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
}
.traffic-tbl thead th .sort-ind::before { top: 0; border-bottom: 4px solid currentColor; }
.traffic-tbl thead th .sort-ind::after  { bottom: 0; border-top: 4px solid currentColor; }
.traffic-tbl thead th.sort-asc .sort-ind { opacity: 1; }
.traffic-tbl thead th.sort-asc .sort-ind::after { display: none; }
.traffic-tbl thead th.sort-desc .sort-ind { opacity: 1; }
.traffic-tbl thead th.sort-desc .sort-ind::before { display: none; }
.traffic-tbl thead th .filter-icon, .traffic-tbl thead th .kebab {
  border: none; background: transparent; color: var(--ink-3);
  cursor: pointer; width: 18px; height: 18px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 3px;
}
.traffic-tbl thead th .filter-icon:hover, .traffic-tbl thead th .kebab:hover { background: var(--bg-3); color: var(--ink-0); }
.traffic-tbl thead th .filter-icon.active { color: var(--brand); }
.traffic-tbl thead th .filter-icon svg, .traffic-tbl thead th .kebab svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.traffic-tbl thead th .resize {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 4px; cursor: col-resize;
}
.traffic-tbl thead th .resize:hover { background: var(--brand); }
.traffic-tbl tbody td {
  padding: 8px var(--space-md);
  border-bottom: 1px solid var(--line-soft);
  font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums;
  color: var(--ink-1);
}
.traffic-tbl tbody td:first-child { font-family: inherit; color: var(--ink-0); }
.traffic-tbl tbody tr:last-child td { border-bottom: none; }
.traffic-tbl tbody tr:hover td { background: var(--bg-2); }

/* column popovers */
.col-popover, .kebab-menu {
  position: absolute; top: calc(100% + 4px); right: 0;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-sm); box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  padding: var(--space-sm); z-index: 50; min-width: 200px;
  display: none;
}
.col-popover.is-open, .kebab-menu.is-open { display: block; }
.col-popover .head { font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; padding-bottom: 4px; }
.col-popover input {
  width: 100%; background: var(--bg-0); border: 1px solid var(--line);
  border-radius: 3px; padding: 5px 8px; color: var(--ink-0); font: inherit; font-size: 12px;
  font-family: ui-monospace, monospace;
}
.col-popover input:focus { outline: none; border-color: var(--brand); }
.col-popover .acts { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.col-popover .acts button { border: none; background: transparent; color: var(--ink-2); font: inherit; font-size: 11.5px; padding: 4px 8px; border-radius: 3px; cursor: pointer; }
.col-popover .acts button:hover { background: var(--bg-2); color: var(--ink-0); }
.col-popover .acts button.primary { background: var(--brand); color: var(--bg-0); font-weight: 600; }
.col-popover .acts button.primary:hover { background: color-mix(in oklch, var(--brand) 80%, var(--ink-0)); }
.kebab-menu .item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 12.5px; color: var(--ink-1); border-radius: 3px; cursor: pointer; }
.kebab-menu .item:hover { background: var(--bg-2); color: var(--ink-0); }
.kebab-menu .item.warn { color: var(--bad); }
.kebab-menu .sep { border-top: 1px solid var(--line-soft); margin: 4px 0; }

/* ═════ C.2 search-palette ═════ */
.search-palette {
  position: absolute; left: 50%; top: 12%; transform: translateX(-50%);
  width: min(640px, calc(100% - 32px));
  max-height: 70%;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  display: flex; flex-direction: column;
  z-index: 300;
}
.sp-h {
  display: flex; align-items: center; gap: 10px;
  padding: 10px var(--space-md);
  border-bottom: 1px solid var(--line-soft);
}
.sp-h svg { width: 16px; height: 16px; stroke: var(--ink-3); fill: none; stroke-width: 1.5; flex: none; }
.sp-h input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  color: var(--ink-0); font: inherit; font-size: 14px;
}
.sp-h input::placeholder { color: var(--ink-4); }
.sp-h .esc-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-3); font-family: ui-monospace, monospace; }
.sp-body { flex: 1; overflow-y: auto; padding: 6px; }
.sp-group { margin-bottom: 4px; }
.sp-group .group-label { padding: 6px 12px 4px; font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }
.sp-result {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px; border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 12.5px; color: var(--ink-1);
}
.sp-result:hover, .sp-result.active { background: var(--bg-2); color: var(--ink-0); }
.sp-result svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; flex: none; color: var(--ink-3); }
.sp-result .label { flex: 1; }
.sp-result mark { background: color-mix(in oklch, var(--brand) 30%, transparent); color: var(--ink-0); padding: 0 2px; border-radius: 2px; }
.sp-result .hint { font-family: ui-monospace, monospace; font-size: 10.5px; color: var(--ink-3); }

/* ═════ C.3 tbl-search ═════ */
.tbl-search {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 4px 8px;
  height: 30px; min-width: 280px;
}
.tbl-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in oklch, var(--brand) 22%, transparent); }
.tbl-search svg { width: 12px; height: 12px; stroke: var(--ink-3); fill: none; stroke-width: 1.5; flex: none; }
.tbl-search input { flex: 1; background: transparent; border: none; outline: none; color: var(--ink-0); font: inherit; font-size: 12.5px; min-width: 0; }
.tbl-search input::placeholder { color: var(--ink-4); }
.tbl-search .clear { border: none; background: transparent; color: var(--ink-3); cursor: pointer; width: 16px; height: 16px; padding: 0; border-radius: 50%; font-family: ui-monospace, monospace; }
.tbl-search .clear:hover { background: var(--bg-2); color: var(--ink-0); }
.tbl-search .count-chip {
  font-family: ui-monospace, monospace; font-size: 10.5px;
  color: var(--ink-3); background: var(--bg-2);
  padding: 1px 6px; border-radius: 3px;
}

.batch-foot {
  border-top: 1px solid var(--line-soft); padding-top: var(--space-md);
  font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: var(--space-md);
}
.batch-foot b { color: var(--ink-1); font-weight: 600; }

/* ════════ Batch 5 · _DESIGN_BATCH_5b_avatars-numbers-mobile.html ════════ */

* { box-sizing: border-box; }

.page { max-width: 1240px; margin: 0 auto; padding: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-xl); }
.page-head h1 { font-size: 24px; font-weight: 700; color: var(--ink-0); margin: 0 0 6px; }
.page-head p { font-size: 13.5px; color: var(--ink-2); margin: 0; max-width: 920px; }
code, .id-tag {
  font-family: ui-monospace, monospace; font-size: 12.5px;
  background: var(--bg-2); padding: 1px 6px; border-radius: 3px; color: var(--ink-0);
}
.id-tag { font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; background: transparent; padding: 0; }
.group-head { display: flex; align-items: baseline; gap: var(--space-md); padding-bottom: var(--space-sm); border-bottom: 1px solid var(--line-soft); }
.group-head h2 { font-size: 15px; font-weight: 700; color: var(--ink-0); margin: 0; letter-spacing: 0.02em; }
.group-head .count { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--ink-3); }
.demo-card {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--space-md) var(--space-lg);
  display: flex; flex-direction: column; gap: var(--space-sm);
}
.demo-card h3 { margin: 0; font-size: 13px; font-weight: 600; font-family: ui-monospace, monospace; color: var(--ink-0); }
.demo-card .usage { margin: 0; font-size: 12px; color: var(--ink-2); border-top: 1px dashed var(--line-soft); padding-top: var(--space-sm); }
.demo-card .usage b { color: var(--ink-1); font-weight: 600; }

/* ═════ D.1 Avatars ═════ */
.avatar-img, .avatar-initials {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-weight: 600; letter-spacing: 0.02em;
  position: relative;
  flex: none;
  background: var(--bg-3);
  color: var(--ink-0);
  overflow: hidden;
}
.avatar-img.sm, .avatar-initials.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-img.md, .avatar-initials.md { width: 32px; height: 32px; font-size: 12px; }
.avatar-img.lg, .avatar-initials.lg { width: 40px; height: 40px; font-size: 14px; }
.avatar-img > span { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, color-mix(in oklch, var(--av-1) 40%, var(--bg-2)), color-mix(in oklch, var(--av-1) 70%, var(--bg-3))); color: var(--bg-0); font-weight: 700; }

.avatar-initials.h-1 { background: color-mix(in oklch, var(--av-1) 40%, var(--bg-2)); color: var(--av-1); }
.avatar-initials.h-2 { background: color-mix(in oklch, var(--av-2) 40%, var(--bg-2)); color: var(--av-2); }
.avatar-initials.h-3 { background: color-mix(in oklch, var(--av-3) 40%, var(--bg-2)); color: var(--av-3); }
.avatar-initials.h-4 { background: color-mix(in oklch, var(--av-4) 40%, var(--bg-2)); color: var(--av-4); }
.avatar-initials.h-5 { background: color-mix(in oklch, var(--av-5) 40%, var(--bg-2)); color: var(--av-5); }
.avatar-initials.h-6 { background: color-mix(in oklch, var(--av-6) 40%, var(--bg-2)); color: var(--av-6); }
.avatar-initials.h-7 { background: color-mix(in oklch, var(--av-7) 40%, var(--bg-2)); color: var(--av-7); }
.avatar-initials.h-8 { background: color-mix(in oklch, var(--av-8) 40%, var(--bg-2)); color: var(--av-8); }

.avatar-online::after {
  content: ""; position: absolute; right: -1px; bottom: -1px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--good);
  border: 2px solid var(--bg-1);
}
.avatar-online.lg::after { width: 10px; height: 10px; }

.avatar-group { display: inline-flex; align-items: center; }
.avatar-group .avatar-img, .avatar-group .avatar-initials { border: 2px solid var(--bg-1); margin-left: -8px; }
.avatar-group .avatar-img:first-child, .avatar-group .avatar-initials:first-child { margin-left: 0; }
.avatar-group .overflow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-3); color: var(--ink-1);
  border: 2px solid var(--bg-1);
  margin-left: -8px;
  font-family: ui-monospace, monospace; font-size: 11px; font-weight: 600;
}

.avatar-row {
  display: flex; align-items: center; gap: var(--space-md);
  padding: var(--space-sm) 0;
}
.avatar-row .meta {
  display: flex; flex-direction: column;
}
.avatar-row .meta .name { color: var(--ink-0); font-size: 13px; font-weight: 500; }
.avatar-row .meta .role { color: var(--ink-3); font-size: 11.5px; font-family: ui-monospace, monospace; }

/* ═════ D.2 Number formatting reference ═════ */
.num-grid {
  display: grid;
  grid-template-columns: 140px 1fr 1fr 1fr 1fr;
  gap: 0;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
}
.num-grid > div {
  padding: 8px var(--space-md);
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  font-family: ui-monospace, monospace; font-size: 12.5px;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.num-grid > div:nth-child(5n) { border-right: none; }
.num-grid > div.h {
  background: var(--bg-2); color: var(--ink-3);
  font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
  font-weight: 600;
}
.num-grid > div.k { color: var(--ink-2); font-family: 'Inter Tight', sans-serif; font-size: 12px; }
.num-grid > div .pos { color: var(--good); }
.num-grid > div .neg { color: var(--bad); }
.num-grid > div .muted { color: var(--ink-3); }

/* ═════ E · Mobile shell ═════ */
.mobile-stage {
  display: grid;
  grid-template-columns: 320px 320px;
  gap: var(--space-xl);
  justify-content: start;
}
.phone-frame {
  width: 320px; height: 640px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
  display: flex; flex-direction: column;
}
.phone-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px 4px;
  font-family: ui-monospace, monospace; font-size: 11px;
  color: var(--ink-1);
  background: var(--bg-1);
  height: 26px;
  flex: none;
}
.phone-status .signal { display: inline-flex; gap: 2px; align-items: end; }
.phone-status .signal i { width: 2px; background: var(--ink-1); border-radius: 1px; }
.phone-status .signal i:nth-child(1) { height: 4px; }
.phone-status .signal i:nth-child(2) { height: 6px; }
.phone-status .signal i:nth-child(3) { height: 8px; }
.phone-status .signal i:nth-child(4) { height: 10px; opacity: 0.4; }
.phone-status .battery { width: 18px; height: 9px; border: 1px solid var(--ink-1); border-radius: 2px; position: relative; padding: 1px; }
.phone-status .battery::after { content: ""; position: absolute; right: -3px; top: 2px; width: 2px; height: 4px; background: var(--ink-1); border-radius: 0 1px 1px 0; }
.phone-status .battery i { display: block; height: 100%; width: 70%; background: var(--ink-1); }

.phone-topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line-soft);
  flex: none;
}
.phone-topbar .ham {
  border: none; background: transparent;
  width: 28px; height: 28px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.phone-topbar .ham svg { width: 16px; height: 16px; stroke: var(--ink-1); fill: none; stroke-width: 1.5; }
.phone-topbar .title { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink-0); }
.phone-topbar .icon-btn { border: none; background: transparent; color: var(--ink-2); width: 28px; height: 28px; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.phone-topbar .icon-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; }

.phone-

/* mobile-sidebar */
.mobile-sidebar {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 80%;
  background: var(--bg-1); border-right: 1px solid var(--line);
  z-index: 50;
  display: flex; flex-direction: column;
  animation: slide-l 200ms ease-out;
}
.mobile-sidebar-bd { position: absolute; inset: 0; background: rgba(0,0,0,0.5); z-index: 40; }
@keyframes slide-l { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.mobile-sidebar .nav-h {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--line-soft);
}
.mobile-sidebar .nav-h .logo {
  width: 24px; height: 24px;
  border-radius: 5px;
  background: var(--brand); color: var(--bg-0);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
  font-family: ui-monospace, monospace;
}
.mobile-sidebar .nav-h .name { font-size: 13px; font-weight: 600; color: var(--ink-0); }
.mobile-sidebar .nav-list { flex: 1; overflow-y: auto; padding: 8px 6px; }
.mobile-sidebar .nav-grp { font-size: 10px; color: var(--ink-4); letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 8px 4px; }
.mobile-sidebar .nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px; border-radius: var(--r-sm);
  font-size: 13px; color: var(--ink-1); cursor: pointer;
}
.mobile-sidebar .nav-item:hover { background: var(--bg-2); color: var(--ink-0); }
.mobile-sidebar .nav-item.active {
  background: color-mix(in oklch, var(--brand) 18%, var(--bg-2));
  color: var(--ink-0);
  font-weight: 600;
  border-left: 2px solid var(--brand);
  padding-left: 6px;
}
.mobile-sidebar .nav-item svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; flex: none; }

/* mobile bottom-nav */
.mobile-bottom-nav {
  display: flex; align-items: stretch; justify-content: space-around;
  background: var(--bg-1); border-top: 1px solid var(--line-soft);
  height: 56px;
  flex: none;
  padding-bottom: 4px;
}
.mobile-bottom-nav .nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  border: none; background: transparent;
  border-top: 2px solid transparent;
  font: inherit; font-size: 10px;
  color: var(--ink-3);
  cursor: pointer;
}
.mobile-bottom-nav .nav-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.mobile-bottom-nav .nav-item.active {
  color: var(--brand);
  border-top-color: var(--brand);
  background: color-mix(in oklch, var(--brand) 8%, transparent);
}

/* mobile bottom-sheet */
.mobile-bottom-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--bg-1);
  border-top-left-radius: var(--r-lg); border-top-right-radius: var(--r-lg);
  box-shadow: 0 -16px 48px rgba(0,0,0,0.4);
  z-index: 60;
  max-height: 80%;
  display: flex; flex-direction: column;
  animation: slide-up 200ms ease-out;
}
@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.mobile-bottom-sheet .grabber {
  width: 36px; height: 4px;
  background: var(--ink-3); opacity: 0.5;
  border-radius: 2px;
  margin: 8px auto;
}
.mobile-bottom-sheet .sheet-h {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 16px 8px;
  border-bottom: 1px solid var(--line-soft);
}
.mobile-bottom-sheet .sheet-h .title { font-size: 14px; font-weight: 600; color: var(--ink-0); }
.mobile-bottom-sheet .sheet-h .close { border: none; background: transparent; color: var(--ink-3); cursor: pointer; width: 22px; height: 22px; padding: 0; }
.mobile-bottom-sheet .sheet-body { padding: 12px 16px; overflow-y: auto; flex: 1; }
.mobile-bottom-sheet-bd { position: absolute; inset: 0; background: rgba(0,0,0,0.5); z-index: 50; }

/* mobile touch filters */
.mobile-touch-filter { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.mobile-touch-filter .seg-touch {
  display: flex; gap: 0;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 3px;
}
.mobile-touch-filter .seg-touch button {
  flex: 1; min-height: 44px;
  border: none; background: transparent; color: var(--ink-2);
  font: inherit; font-size: 13px;
  cursor: pointer; border-radius: 4px;
}
.mobile-touch-filter .seg-touch button.sel { background: var(--bg-3); color: var(--ink-0); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.mobile-touch-filter .field-row {
  display: flex; flex-direction: column; gap: 6px;
}
.mobile-touch-filter .field-row .label { font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.mobile-touch-filter .field-row .field {
  min-height: 44px; padding: 10px 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 14px; color: var(--ink-0);
  font-family: ui-monospace, monospace;
  display: flex; align-items: center; justify-content: space-between;
}
.mobile-touch-filter .full-cta {
  width: 100%; min-height: 44px;
  background: var(--brand); color: var(--bg-0);
  border: none; border-radius: var(--r-sm);
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
}

/* PWA install prompt */
.pwa-install-prompt {
  margin: 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, color-mix(in oklch, var(--brand) 22%, var(--bg-1)), color-mix(in oklch, var(--info) 22%, var(--bg-1)));
  border: 1px solid color-mix(in oklch, var(--brand) 30%, var(--line));
  border-radius: var(--r-md);
  display: flex; align-items: center; gap: 10px;
}
.pwa-install-prompt .logo {
  width: 36px; height: 36px;
  background: var(--brand); color: var(--bg-0);
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  font-family: ui-monospace, monospace;
}
.pwa-install-prompt .body { flex: 1; }
.pwa-install-prompt .body .t { font-size: 12.5px; font-weight: 600; color: var(--ink-0); }
.pwa-install-prompt .body .d { font-size: 11px; color: var(--ink-2); margin-top: 1px; }
.pwa-install-prompt .add-btn {
  border: none; background: var(--brand); color: var(--bg-0);
  font: inherit; font-size: 11.5px; font-weight: 600;
  padding: 6px 10px; border-radius: var(--r-sm); cursor: pointer;
}
.pwa-install-prompt .dismiss { border: none; background: transparent; color: var(--ink-2); width: 22px; height: 22px; padding: 0; cursor: pointer; font-family: ui-monospace, monospace; }

/* mobile scorecard stack */
.mobile-scorecard-stack { display: flex; flex-direction: column; gap: 8px; padding: 12px; overflow-y: auto; flex: 1; }
.m-scorecard {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.m-scorecard .l { font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.m-scorecard .v { font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 600; color: var(--ink-0); }
.m-scorecard .delta { font-size: 11px; color: var(--ink-2); }
.m-scorecard[data-tone="revenue"] { border-left: 3px solid color-mix(in oklch, var(--good) 35%, var(--line)); }
.m-scorecard[data-tone="revenue"] .v { color: var(--good); }
.m-scorecard[data-tone="expense"] { border-left: 3px solid color-mix(in oklch, var(--bad) 35%, var(--line)); }
.m-scorecard[data-tone="expense"] .v { color: var(--bad); }

.batch-foot {
  border-top: 1px solid var(--line-soft); padding-top: var(--space-md);
  font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: var(--space-md);
}
.batch-foot b { color: var(--ink-1); font-weight: 600; }

/* ════════ Batch 6 · _DESIGN_BLOCKS_funnel-scatter.html ════════ */

* { box-sizing: border-box; }

.page { max-width: 1240px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.page-head h1 { font-size: 24px; font-weight: 700; color: var(--ink-0); margin: 0 0 6px; }
.page-head p { font-size: 13.5px; color: var(--ink-2); margin: 0; max-width: 920px; }
.id-tag { font-family: ui-monospace, monospace; font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; }
code { font-family: ui-monospace, monospace; font-size: 12.5px; background: var(--bg-2); padding: 1px 6px; border-radius: 3px; color: var(--ink-0); }
.group-head { display: flex; align-items: baseline; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.group-head h2 { font-size: 15px; font-weight: 700; color: var(--ink-0); margin: 0; }
.group-head .count { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--ink-3); }
.demo-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.demo-card h3 { margin: 0; font-size: 13px; font-weight: 600; font-family: ui-monospace, monospace; color: var(--ink-0); }
.demo-card .usage { margin: 0; font-size: 12px; color: var(--ink-2); border-top: 1px dashed var(--line-soft); padding-top: 8px; }
.demo-card .usage b { color: var(--ink-1); font-weight: 600; }

/* ═════ .funnel-block ═════ */
.funnel-block {
  display: grid;
  grid-template-columns: 180px 1fr 200px;
  gap: 16px;
  align-items: stretch;
  padding: 8px 0;
}
.funnel-block .lbl-col { display: flex; flex-direction: column; }
.funnel-block .lbl-col.left { align-items: flex-end; }
.funnel-block .lbl-col.right { align-items: flex-start; }
.funnel-block .tier-lbl {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 6px 4px;
  border-bottom: 1px dashed var(--line-soft);
}
.funnel-block .tier-lbl:last-child { border-bottom: none; }
.funnel-block .lbl-col.left .tier-lbl { text-align: right; }
.funnel-block .tier-lbl .name { font-size: 13px; font-weight: 600; color: var(--ink-0); }
.funnel-block .tier-lbl .meta { font-size: 11px; color: var(--ink-3); font-family: ui-monospace, monospace; margin-top: 2px; }
.funnel-block .tier-lbl .count { font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 600; color: var(--ink-0); }
.funnel-block .tier-lbl .drop {
  font-family: ui-monospace, monospace; font-size: 11.5px;
  color: var(--bad);
  margin-top: 1px;
}
.funnel-block .tier-lbl .drop.first { color: var(--ink-3); }
.funnel-block .tier-lbl .conv {
  font-family: ui-monospace, monospace; font-size: 11px;
  color: var(--ink-3);
  margin-top: 1px;
}

.funnel-svg { width: 100%; height: 380px; display: block; }
.funnel-svg .tier-shape {
  cursor: pointer;
  transition: filter 120ms ease, opacity 120ms ease;
}
.funnel-svg .tier-shape:hover { filter: brightness(1.18); }
.funnel-svg .tier-text {
  font-family: ui-monospace, monospace;
  font-size: 12px; font-weight: 600;
  fill: var(--ink-0);
  pointer-events: none;
  text-anchor: middle;
}
.funnel-svg .tier-text.dim { fill: var(--bg-0); }

.funnel-tip {
  position: absolute;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  font-size: 11.5px; color: var(--ink-1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  pointer-events: none;
  max-width: 220px;
  z-index: 100;
}
.funnel-tip .tip-h { font-weight: 600; color: var(--ink-0); margin-bottom: 4px; font-family: ui-monospace, monospace; font-size: 11px; }
.funnel-tip .tip-r { color: var(--ink-2); line-height: 1.4; }
.funnel-tip .tip-r b { color: var(--bad); font-weight: 500; }
.funnel-stage { position: relative; }

/* ═════ .bubble-scatter-block ═════ */
.scatter-block { display: grid; grid-template-columns: 1fr 200px; gap: 20px; align-items: start; }
.scatter-svg { width: 100%; height: 480px; display: block; }
.scatter-svg .axis-line { stroke: var(--line); stroke-width: 1; fill: none; }
.scatter-svg .axis-tick { stroke: var(--line-soft); stroke-width: 1; }
.scatter-svg .axis-label { fill: var(--ink-3); font-family: ui-monospace, monospace; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.scatter-svg .axis-title { fill: var(--ink-2); font-size: 11.5px; font-family: ui-monospace, monospace; letter-spacing: 0.04em; }
.scatter-svg .grid-line { stroke: var(--line-soft); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.5; }
.scatter-svg .threshold-line { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 4; opacity: 0.7; }
.scatter-svg .threshold-label { fill: var(--ink-3); font-family: ui-monospace, monospace; font-size: 10px; font-style: italic; }
.scatter-svg .zone-bg { opacity: 0.06; }
.scatter-svg .zone-label {
  font-family: ui-monospace, monospace; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.scatter-svg .bubble {
  cursor: pointer;
  transition: filter 120ms ease, stroke-width 120ms ease;
  stroke-width: 1;
}
.scatter-svg .bubble:hover { filter: brightness(1.3); stroke-width: 2; }

.scatter-legend {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.scatter-legend .legend-h { font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.scatter-legend .row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-1); }
.scatter-legend .row .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.scatter-legend .row .name { flex: 1; }
.scatter-legend .row .count { font-family: ui-monospace, monospace; font-size: 11px; color: var(--ink-3); }
.scatter-legend .divider { height: 1px; background: var(--line-soft); margin: 2px 0; }
.scatter-legend .size-key { display: flex; flex-direction: column; gap: 6px; }
.scatter-legend .size-key .ring-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-2); }
.scatter-legend .size-key svg { flex: none; }

.scatter-tip {
  position: absolute;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px 10px;
  font-size: 11.5px; color: var(--ink-1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  pointer-events: none; z-index: 100;
  font-family: ui-monospace, monospace;
}
.scatter-tip .tip-h { font-weight: 600; color: var(--ink-0); margin-bottom: 4px; font-size: 11px; }
.scatter-tip .row { display: flex; justify-content: space-between; gap: 12px; padding: 1px 0; }
.scatter-tip .row span:first-child { color: var(--ink-3); }
.scatter-stage { position: relative; }

.batch-foot {
  border-top: 1px solid var(--line-soft); padding-top: 12px;
  font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: 12px;
}
.batch-foot b { color: var(--ink-1); font-weight: 600; }

/* ════════ Batch 7 · _DESIGN_BATCH_3_all-icons.html ════════ */


* { box-sizing: border-box; }


.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--space-xl);
  display: flex; flex-direction: column;
  gap: var(--space-xl);
}
.page-head h1 { font-size: 24px; font-weight: 700; color: var(--ink-0); margin: 0 0 6px; }
.page-head p { font-size: 13.5px; color: var(--ink-2); margin: 0; max-width: 880px; }

.legend {
  display: flex; flex-wrap: wrap; gap: var(--space-md);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--space-md) var(--space-lg);
  font-family: ui-monospace, monospace; font-size: 12px;
  color: var(--ink-2);
}
.legend strong { color: var(--ink-0); font-weight: 600; }
.legend .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); margin-right: 6px; vertical-align: middle;
}

.toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-sm);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--space-md) var(--space-lg);
}
.toc a {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-2);
  text-decoration: none;
  display: flex; justify-content: space-between; gap: var(--space-sm);
  padding: 4px 6px;
  border-radius: 3px;
}
.toc a:hover { background: var(--bg-2); color: var(--ink-0); }
.toc a span.n { color: var(--ink-4); }

.group-head {
  display: flex; align-items: baseline; gap: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--line-soft);
  scroll-margin-top: var(--space-md);
}
.group-head h2 { font-size: 15px; font-weight: 700; color: var(--ink-0); margin: 0; letter-spacing: 0.02em; }
.group-head .count { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--ink-3); }

.icon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.icon-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.icon-preview {
  background: var(--bg-0);
  border-right: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-0);
  position: relative;
}
.icon-preview::after {
  content: "24";
  position: absolute;
  bottom: 6px; right: 8px;
  font-family: ui-monospace, monospace;
  font-size: 9.5px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
}
.icon-preview svg {
  width: 24px; height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-meta {
  padding: var(--space-md) var(--space-lg);
  display: flex; flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}
.icon-meta .head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-sm);
}
.icon-meta code.cls {
  font-family: ui-monospace, monospace;
  font-size: 12.5px;
  color: var(--ink-0);
  background: var(--bg-2);
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 600;
}
.icon-meta .id-tag {
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.icon-meta p.uses { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.icon-meta p.uses b { color: var(--ink-1); font-weight: 600; }

details.markup {
  margin-top: var(--space-xs);
  border-top: 1px dashed var(--line-soft);
  padding-top: var(--space-sm);
}
details.markup > summary {
  cursor: pointer;
  list-style: none;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
details.markup > summary::-webkit-details-marker { display: none; }
details.markup > summary::before { content: "▸ "; }
details.markup[open] > summary::before { content: "▾ "; }
details.markup pre {
  margin: var(--space-sm) 0 0;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: var(--space-md);
  font-family: ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--ink-1);
  overflow-x: auto;
  white-space: pre;
}

.note {
  background: color-mix(in oklch, var(--info) 8%, var(--bg-1));
  border-left: 3px solid var(--info);
  border-radius: var(--r-md);
  padding: var(--space-md) var(--space-lg);
  font-size: 12.5px;
  color: var(--ink-1);
}
.note b { color: var(--ink-0); }
.note code {
  font-family: ui-monospace, monospace;
  background: var(--bg-2);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11.5px;
  color: var(--ink-0);
}

.batch-foot {
  border-top: 1px solid var(--line-soft);
  padding-top: var(--space-md);
  font-family: ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: var(--space-md);
}
.batch-foot b { color: var(--ink-1); font-weight: 600; }

/* ════════ PlusUltra mode override ════════ */
/* ═══════════════════════════════════════════════════════════════
   Yolt v11 — PlusUltra mode tokens
   Locked: 2026-05-10
   ═══════════════════════════════════════════════════════════════
   Activated by adding `data-mode="plusultra"` to <html> or <body>.
   Saturated neon palette — premium tier visual signal.
   Same hue ladder structure as Normis tokens; only chroma + lightness differ.

   Use case: PlusUltra section pages (CFO Cockpit, LTV/CAC, Cohort Cube,
   Scenario Planner, Markup, Real LTV, CAC Payback). Accent у sidebar
   group-plusultra, brand-tinted nudges, premium-tier locked badges.

   Usage у HTML:
     <html data-mode="plusultra">  ← all descendants pick PU tokens

   Toggle:
     document.documentElement.dataset.mode = 'plusultra';  // ON
     delete document.documentElement.dataset.mode;          // OFF
*/

:root[data-mode="plusultra"] {
  /* ── Surfaces (deeper warm — magenta-tinted blacks) ── */
  --bg-0:       oklch(0.13 0.018 320);   /* deep magenta-black base */
  --bg-1:       oklch(0.16 0.020 320);   /* card */
  --bg-2:       oklch(0.20 0.022 320);   /* elevated */
  --bg-3:       oklch(0.24 0.024 320);   /* hover */
  --line:       oklch(0.32 0.030 320);
  --line-soft:  oklch(0.26 0.022 320);

  /* ── Ink ladder (hue shifted slightly toward cyan) ── */
  --ink-0:      oklch(0.98 0.008 215);
  --ink-1:      oklch(0.88 0.015 215);
  --ink-2:      oklch(0.68 0.020 215);
  --ink-3:      oklch(0.52 0.020 215);
  --ink-4:      oklch(0.40 0.020 215);

  /* ── Brand → cyan (saturated neon) ── */
  --brand:      oklch(0.82 0.16 215);    /* PU cyan — primary accent */
  --brand-d:    oklch(0.32 0.08 215);

  /* ── Semantic — vivid neon variants ── */
  --good:       oklch(0.88 0.27 155);    /* PU vivid green */
  --good-d:     oklch(0.34 0.10 155);
  --warn:       oklch(0.82 0.18 80);     /* PU amber bright */
  --warn-d:     oklch(0.32 0.08 80);
  --bad:        oklch(0.68 0.26 15);     /* PU red bright */
  --bad-d:      oklch(0.30 0.10 15);
  --info:       oklch(0.80 0.16 240);    /* PU periwinkle saturated */
  --info-d:     oklch(0.30 0.08 240);

  /* ── PlusUltra-only accents (use ONLY у data-mode="plusultra" sections) ── */
  --pu-cyan:    oklch(0.82 0.16 215);    /* same as --brand у PU mode */
  --pu-magenta: oklch(0.66 0.31 320);    /* PMax ad campaigns / hero accent */
  --pu-violet:  oklch(0.55 0.22 290);    /* tier-locked badges */
  --pu-glow:    oklch(0.95 0.10 215);    /* highlight haloes (use sparingly) */

  /* ── Aliases (legacy compat — old class names still resolve у PU mode) ── */
  --bg:           var(--bg-0);
  --bg-elev:      var(--bg-1);
  --bg-elev-2:    var(--bg-2);
  --border:       var(--line);
  --accent:       var(--brand);
  --accent-2:     var(--info);
  --green:        var(--good);
  --amber:        var(--warn);
  --red:          var(--bad);
}

/* ═══════════════════════════════════════════════════════════════
   PlusUltra-only visual treatments
   Use these classes ONLY всередині data-mode="plusultra" sections.
   ═══════════════════════════════════════════════════════════════ */

[data-mode="plusultra"] .pu-glow-text {
  color: var(--pu-cyan);
  text-shadow: 0 0 8px color-mix(in oklch, var(--pu-cyan) 35%, transparent);
}

[data-mode="plusultra"] .pu-gradient-card {
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in oklch, var(--pu-magenta) 12%, transparent) 0%, transparent 60%),
    radial-gradient(80% 100% at 0% 100%, color-mix(in oklch, var(--pu-cyan) 10%, transparent) 0%, transparent 50%),
    var(--bg-1);
  border: 1px solid color-mix(in oklch, var(--pu-cyan) 25%, var(--line));
}

[data-mode="plusultra"] .pu-tier-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  font-weight: 600;
  background: linear-gradient(135deg, var(--pu-cyan) 0%, var(--pu-magenta) 100%);
  color: var(--bg-0);
}

[data-mode="plusultra"] .pu-locked-overlay {
  position: relative;
}
[data-mode="plusultra"] .pu-locked-overlay::after {
  content: "PlusUltra";
  position: absolute;
  top: 8px; right: 8px;
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pu-cyan) 0%, var(--pu-magenta) 100%);
  color: var(--bg-0);
  padding: 2px 8px;
  border-radius: 4px;
}

