/* ══════════════════════════════════════════════════════════════
   คลิปไหนทำเงิน — TikTok Shop creative report
   Palette validated with dataviz/scripts/validate_palette.js
     light  poles #C1521C / #0E8A63  on surface #F7F8F4  (CVD ΔE 9.5)
     dark   poles #D9682F / #22A377  on surface #141C19  (CVD ΔE 9.7)
     funnel ordinal ramp, single hue, monotone L — both modes pass
   ══════════════════════════════════════════════════════════════ */

:root {
  color-scheme: light;
  --plane:    #EDEFE9;
  --surface:  #F7F8F4;
  --raised:   #FCFDFA;
  --ink:      #16211C;
  --ink-2:    #4E5A54;
  --muted:    #7E8781;
  --rule:     #D9DDD3;
  --hair:     rgba(22, 33, 28, .10);
  --shadow:   0 1px 2px rgba(22, 33, 28, .05), 0 8px 24px -16px rgba(22, 33, 28, .28);

  --rust:     #C1521C;
  --stone:    #A29D93;
  --jade:     #0E8A63;
  --rust-wash: rgba(193, 82, 28, .09);
  --jade-wash: rgba(14, 138, 99, .09);

  --f1: #66B79B;  --f2: #3F9F80;  --f3: #1A8865;  --f4: #0A7050;  --f5: #04573C;

  --display: 'Bai Jamjuree', system-ui, sans-serif;
  --body:    'Anuphan', system-ui, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, monospace;

  --w: 1180px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

/* Dark steps are re-stepped for the dark surface and validated as their own
   set, not flipped from light. Declared under both scopes: the media query
   follows the OS, the data-theme scope wins over it either way. */
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --plane:   #0C1310;
    --surface: #141C19;
    --raised:  #1B2420;
    --ink:     #F2F5F0;
    --ink-2:   #B7C0BA;
    --muted:   #8A948D;
    --rule:    #27322D;
    --hair:    rgba(242, 245, 240, .10);
    --shadow:  0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -16px rgba(0, 0, 0, .8);
    --rust:    #D9682F;
    --stone:   #8A867C;
    --jade:    #22A377;
    --rust-wash: rgba(217, 104, 47, .14);
    --jade-wash: rgba(34, 163, 119, .14);
    --f1: #7FD3B6; --f2: #5CC29F; --f3: #3AB088; --f4: #1F9B72; --f5: #0E8560;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --plane:   #0C1310;
  --surface: #141C19;
  --raised:  #1B2420;
  --ink:     #F2F5F0;
  --ink-2:   #B7C0BA;
  --muted:   #8A948D;
  --rule:    #27322D;
  --hair:    rgba(242, 245, 240, .10);
  --shadow:  0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -16px rgba(0, 0, 0, .8);
  --rust:    #D9682F;
  --stone:   #8A867C;
  --jade:    #22A377;
  --rust-wash: rgba(217, 104, 47, .14);
  --jade-wash: rgba(34, 163, 119, .14);
  --f1: #7FD3B6; --f2: #5CC29F; --f3: #3AB088; --f4: #1F9B72; --f5: #0E8560;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--plane);
  color: var(--ink);
  font: 400 clamp(1rem, .95rem + .25vw, 1.125rem)/1.72 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: min(100% - var(--pad) * 2, var(--w)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 50;
  background: var(--ink); color: var(--plane); padding: .7rem 1.2rem; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--jade); outline-offset: 3px; border-radius: 3px; }

b, strong { font-weight: 600; }
.fig { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ── scroll rail ─────────────────────────────────────────────── */
.railbar {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 40;
  background: var(--hair);
}
.railbar > span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--rust), var(--jade));
}

/* ── masthead ────────────────────────────────────────────────── */
.masthead { padding: clamp(4rem, 11vh, 8rem) 0 clamp(2.5rem, 6vh, 4rem); }

.eyebrow {
  margin: 0 0 clamp(1.75rem, 4vh, 3rem);
  font: 500 .72rem/1 var(--mono);
  letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
}

.masthead h1 {
  margin: 0;
  /* Thai needs headroom for tone marks — 1.02 collides the upper vowels */
  font: 700 clamp(2.75rem, 1.4rem + 6.4vw, 6rem)/1.14 var(--display);
  letter-spacing: -.035em;
  color: var(--muted);
}
.masthead h1 em {
  display: block; font-style: normal; color: var(--ink);
  text-wrap: balance;
}

.lede {
  max-width: 40ch;
  margin: clamp(1.75rem, 4vh, 2.75rem) 0 0;
  font-size: clamp(1.06rem, 1rem + .4vw, 1.3rem);
  color: var(--ink-2);
}
.lede b { color: var(--ink); }

.factbar {
  display: flex; flex-wrap: wrap; gap: 0 clamp(1.5rem, 4vw, 3.5rem);
  margin: clamp(2.5rem, 6vh, 4rem) 0 0; padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.factbar div { padding: .35rem 0; }
.factbar dt { font: 500 .7rem/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.factbar dd { margin: .15rem 0 0; font: 600 1rem/1.4 var(--display); }

/* ── bands ───────────────────────────────────────────────────── */
.band { padding: clamp(3.5rem, 9vh, 6.5rem) 0; }
.band--alt { background: var(--surface); border-block: 1px solid var(--rule); }
.band--strip { padding-top: 0; padding-bottom: clamp(2rem, 5vh, 3.25rem); }

.sechead {
  margin: 0 0 .85rem;
  max-width: 24ch;
  font: 600 clamp(1.6rem, 1.15rem + 1.9vw, 2.6rem)/1.32 var(--display);
  letter-spacing: -.025em;
  text-wrap: balance;
}
.sechead__kick {
  display: block; margin-bottom: .8rem;
  font: 500 .72rem/1 var(--mono); letter-spacing: .13em; text-transform: uppercase;
  color: var(--jade);
}

.secnote { max-width: 62ch; margin: 0 0 clamp(1.75rem, 4vh, 2.5rem); color: var(--ink-2); font-size: .96rem; }
.secnote--after { margin: clamp(1.5rem, 3vh, 2rem) 0 0; }
.secnote b { color: var(--ink); }

/* ── SIGNATURE: creative strip ───────────────────────────────── */
.strip-fig { margin: 0; }

.strip-anno { position: relative; height: 2.4rem; }
.strip-anno__b {
  position: absolute; left: 0; bottom: 0; height: 9px;
  border: 1px solid var(--muted); border-bottom: 0; border-radius: 4px 4px 0 0;
}
.strip-anno__t {
  position: absolute; left: 0; bottom: 15px; white-space: nowrap;
  font: 500 .72rem/1.3 var(--mono); letter-spacing: .02em; color: var(--ink-2);
}

.strip {
  display: flex; align-items: flex-end; gap: 1px;
  height: clamp(150px, 24vh, 230px);
  padding-top: 6px;
  border-bottom: 2px solid var(--rule);
}
.strip .bar {
  flex: 1 1 0; min-width: 0; cursor: crosshair;
  background: var(--stone);
  border-radius: 3px 3px 0 0;
  transform-origin: bottom;
  transition: filter .12s ease;
}
.strip .bar[data-band="jade"] { background: var(--jade); }
.strip .bar[data-band="rust"] { background: var(--rust); }
.strip .bar:hover { filter: brightness(1.25) saturate(1.2); }

@media (prefers-reduced-motion: no-preference) {
  .strip .bar { animation: rise .5s cubic-bezier(.2, .8, .3, 1) backwards; }
  @keyframes rise { from { transform: scaleY(0); } }
}

.strip-axis {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: .6rem;
  font: 400 .7rem/1.4 var(--mono); color: var(--muted);
}
.strip-axis__mid { display: none; }
@media (min-width: 700px) { .strip-axis__mid { display: block; } }

.strip-fig figcaption {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--rule);
  font-size: .87rem; color: var(--ink-2);
}
.key { display: inline-flex; align-items: center; gap: .5rem; }
.key i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.key--link { margin-left: auto; color: var(--jade); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.key--link:hover { color: var(--ink); }

.conc {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: clamp(2rem, 5vh, 3rem);
  background: var(--rule); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden;
}
.conc div { background: var(--surface); padding: 1.1rem 1.2rem; }
.conc dt { font: 500 .72rem/1.5 var(--mono); color: var(--muted); letter-spacing: .04em; }
.conc dd { margin: .3rem 0 0; font: 600 1.6rem/1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.conc p { margin: .3rem 0 0; font-size: .82rem; color: var(--ink-2); line-height: 1.5; }

/* ── stat tiles ──────────────────────────────────────────────── */
.tiles {
  display: grid; gap: clamp(.8rem, 2vw, 1.1rem);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.tile {
  background: var(--raised); border: 1px solid var(--rule); border-radius: 12px;
  padding: 1.35rem 1.4rem 1.45rem; box-shadow: var(--shadow);
}
.tile__l { margin: 0; font: 500 .74rem/1.4 var(--mono); letter-spacing: .06em; color: var(--muted); }
.tile__v {
  margin: .55rem 0 0;
  font: 600 clamp(1.9rem, 1.5rem + 1.1vw, 2.5rem)/1 var(--display);
  letter-spacing: -.035em; font-variant-numeric: tabular-nums;
}
.tile__s { margin: .5rem 0 0; font-size: .84rem; line-height: 1.5; color: var(--ink-2); }

/* ── panels & bar charts ─────────────────────────────────────── */
.duo { display: grid; gap: clamp(1rem, 2.5vw, 1.5rem); grid-template-columns: 1fr; }
@media (min-width: 860px) { .duo { grid-template-columns: 1fr 1fr; } }

.panel {
  margin: 0; min-width: 0; padding: clamp(1.25rem, 3vw, 1.9rem);
  background: var(--raised); border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: var(--shadow);
}
.panel__head { margin: 0 0 1.4rem; }
.panel__head h3 { margin: 0; font: 600 1.02rem/1.4 var(--display); letter-spacing: -.01em; }
.panel__head p { margin: .2rem 0 0; font-size: .84rem; color: var(--muted); }

.hbars { display: grid; gap: .85rem; }
.row { display: grid; grid-template-columns: minmax(84px, auto) 1fr; gap: .9rem; align-items: center; }
.row__l { font: 500 .8rem/1.35 var(--body); color: var(--ink-2); }
.row__l small { display: block; font: 400 .68rem/1.4 var(--mono); color: var(--muted); }
/* grid, not flex: column 2 reserves the value label so a full-length bar
   can never push its own number off the panel */
.row__track { display: grid; grid-template-columns: 1fr max-content; gap: .6rem; align-items: center; min-width: 0; }
.row__bar {
  height: 20px; border-radius: 0 4px 4px 0; background: var(--stone);
  min-width: 3px; justify-self: start;
}
.hbars--big .row__bar { height: 28px; }
.row__bar[data-band="jade"] { background: var(--jade); }
.row__bar[data-band="rust"] { background: var(--rust); }
.row__v { font: 600 .88rem/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row__v small { font: 400 .72rem/1 var(--mono); color: var(--muted); margin-left: .35rem; }
.row.is-peak .row__l { color: var(--ink); font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  .row__bar { animation: grow .6s cubic-bezier(.2, .8, .3, 1) backwards; transform-origin: left; }
  @keyframes grow { from { transform: scaleX(0); } }
}

/* ── callouts ────────────────────────────────────────────────── */
.callout {
  margin: clamp(1.75rem, 4vh, 2.5rem) 0 0; padding: clamp(1.3rem, 3vw, 1.9rem);
  border-radius: 12px; border: 1px solid var(--hair);
}
.callout--rust { background: var(--rust-wash); border-left: 3px solid var(--rust); }
.callout--jade { background: var(--jade-wash); border-left: 3px solid var(--jade); }
.callout__kick { margin: 0; font: 500 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.callout__big {
  margin: .5rem 0 .6rem;
  font: 700 clamp(2.2rem, 1.6rem + 2.6vw, 3.4rem)/1 var(--display);
  letter-spacing: -.04em; font-variant-numeric: tabular-nums;
}
.callout--rust .callout__big { color: var(--rust); }
.callout--jade .callout__big { color: var(--jade); }
.callout p:last-child { margin: 0; max-width: 58ch; color: var(--ink-2); font-size: .95rem; }
.callout p:last-child b { color: var(--ink); }

.split { display: grid; gap: clamp(1rem, 2.5vw, 1.5rem); grid-template-columns: 1fr; }
@media (min-width: 800px) { .split { grid-template-columns: 1fr 1fr; } }
.split .callout { margin-top: clamp(1.75rem, 4vh, 2.5rem); }

/* ── why block ───────────────────────────────────────────────── */
.why { margin-top: clamp(1.75rem, 4vh, 2.5rem); max-width: 66ch; }
.why h3 { margin: 0 0 .6rem; font: 600 1.05rem/1.4 var(--display); }
.why p { margin: 0 0 .9rem; color: var(--ink-2); font-size: .96rem; }
.why__rule {
  padding: .9rem 1.1rem; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--rule);
  color: var(--ink) !important;
}

/* ── GMV Max levers ──────────────────────────────────────────── */
.levers { display: grid; gap: clamp(.8rem, 2vw, 1.1rem); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.lever {
  padding: 1.4rem; border-radius: 12px; background: var(--raised);
  border: 1px solid var(--rule); border-top: 3px solid var(--jade);
}
.lever__n { margin: 0 0 .55rem; font: 600 1.1rem/1.3 var(--display); letter-spacing: -.015em; }
.lever__d { margin: 0; font-size: .89rem; line-height: 1.62; color: var(--ink-2); }
.lever__d b { color: var(--ink); }

/* ── margin → ROI target calculator ──────────────────────────── */
.calc {
  margin-top: clamp(2rem, 5vh, 3rem); padding: clamp(1.3rem, 3vw, 2rem);
  border-radius: 14px; background: var(--raised);
  border: 1px solid var(--rule); box-shadow: var(--shadow);
}
.calc__head h3 { margin: 0 0 .5rem; font: 600 clamp(1.15rem, 1rem + .7vw, 1.5rem)/1.35 var(--display); letter-spacing: -.02em; }
.calc__head p { margin: 0; max-width: 62ch; font-size: .92rem; color: var(--ink-2); }

.calc__ctl {
  display: grid; grid-template-columns: auto 1fr auto; gap: .5rem 1.1rem; align-items: center;
  margin: clamp(1.5rem, 3.5vh, 2.2rem) 0; padding: 1.1rem 1.2rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
}
.calc__label { font: 500 .74rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.calc__out {
  font: 700 1.8rem/1 var(--display); letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; color: var(--jade); min-width: 3.4ch; text-align: right;
}
@media (max-width: 560px) {
  .calc__ctl { grid-template-columns: 1fr auto; }
  .calc__ctl input[type="range"] { grid-column: 1 / -1; order: 3; }
}

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 22px; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px; background: var(--rule);
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--rule); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
  background: var(--jade); border: 3px solid var(--raised); box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--jade); border: 3px solid var(--raised); box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.calc__res {
  display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  background: var(--rule); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden;
  margin-bottom: clamp(1.5rem, 3.5vh, 2.2rem);
}
.calc__stat { background: var(--raised); padding: 1.1rem 1.2rem; }
.calc__k { margin: 0; font: 500 .72rem/1.5 var(--mono); letter-spacing: .04em; color: var(--muted); }
.calc__v {
  margin: .35rem 0 .35rem; font: 700 1.65rem/1.1 var(--display);
  letter-spacing: -.035em; font-variant-numeric: tabular-nums;
}
.calc__v--jade { color: var(--jade); }
.calc__v--rust { color: var(--rust); }
.calc__s { margin: 0; font-size: .79rem; line-height: 1.5; color: var(--ink-2); }

.panel--flat { box-shadow: none; background: var(--surface); }
.calc__foot {
  margin: clamp(1.25rem, 3vh, 1.75rem) 0 0; padding: .95rem 1.1rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
  font-size: .92rem; line-height: 1.65; color: var(--ink-2); max-width: 74ch;
}
.calc__foot b { color: var(--ink); }

/* ── plan ────────────────────────────────────────────────────── */
.plan__head { margin: clamp(2.25rem, 5vh, 3rem) 0 .6rem; font: 600 1.3rem/1.4 var(--display); letter-spacing: -.02em; }
.plan { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; max-width: 76ch; counter-reset: plan; }
.plan li {
  counter-increment: plan;
  display: grid; grid-template-columns: auto 1fr; gap: .3rem 1.1rem; align-items: baseline;
  padding: 1.15rem 1.3rem; border-radius: 11px;
  background: var(--raised); border: 1px solid var(--rule);
}
.plan li::before {
  content: counter(plan); grid-row: 1 / span 2;
  font: 700 1.5rem/1 var(--display); color: var(--jade);
  font-variant-numeric: tabular-nums; min-width: 1.4ch;
}
.plan__when { margin: 0; font: 500 .72rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.plan__what { margin: .3rem 0 0; font-size: .95rem; line-height: 1.68; color: var(--ink-2); }
.plan__what b { color: var(--ink); }

/* ── tables ──────────────────────────────────────────────────── */
.tbl-toggle { margin-top: clamp(1.75rem, 4vh, 2.5rem); }
.tbl-toggle summary {
  cursor: pointer; font: 500 .88rem/1 var(--body); color: var(--ink-2);
  padding: .7rem 0; list-style-position: inside;
}
.tbl-toggle summary:hover { color: var(--ink); }

.tbl-scroll { min-width: 0; overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--raised); }
.tbl-scroll--tall { max-height: 32rem; overflow-y: auto; }

.tbl { width: 100%; border-collapse: collapse; font-size: .87rem; }
.tbl th, .tbl td { padding: .68rem .9rem; text-align: right; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface);
  font: 500 .7rem/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--rule);
}
.tbl tbody tr + tr td { border-top: 1px solid var(--hair); }
.tbl tbody tr:hover td { background: var(--surface); }
.tbl .num { font-variant-numeric: tabular-nums; font-family: var(--display); font-weight: 500; }
.tbl .cap { max-width: 30rem; white-space: normal; color: var(--ink-2); line-height: 1.5; font-size: .82rem; }
.tbl .dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: .5rem; vertical-align: baseline; }

.tbl--creators .who { display: block; font-weight: 600; margin-bottom: .35rem; }
.tbl--creators .share { display: block; height: 4px; min-width: 6px; border-radius: 2px; background: var(--stone); }
.tbl--creators td:first-child { min-width: 210px; }

.tbl-tools { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: end; margin-bottom: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field span { font: 500 .7rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input, .field select {
  font: 400 .92rem/1 var(--body); color: var(--ink);
  background: var(--raised); border: 1px solid var(--rule); border-radius: 8px;
  padding: .6rem .8rem; min-width: 15rem;
}
.tbl-count { margin: 0 0 .55rem auto; font: 400 .8rem/1 var(--mono); color: var(--muted); }

/* ── funnel ──────────────────────────────────────────────────── */
.funnel { display: grid; gap: .55rem; }
.fstep { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: .9rem; align-items: center; }
.fstep__l { font: 500 .85rem/1.3 var(--body); color: var(--ink-2); }
.fstep__t { display: grid; grid-template-columns: 1fr max-content max-content; gap: .7rem; align-items: center; min-width: 0; }
.fstep__b { height: 30px; border-radius: 0 4px 4px 0; min-width: 3px; justify-self: start; }
.fstep__v { font: 600 .92rem/1 var(--display); font-variant-numeric: tabular-nums; }
.fstep__d { font: 400 .74rem/1 var(--mono); color: var(--muted); }

.stat-inline {
  display: flex; align-items: baseline; gap: .8rem;
  padding: 1.1rem 1.3rem; background: var(--raised);
  border: 1px solid var(--rule); border-radius: 12px; margin-top: 1.25rem;
}
.stat-inline__v { font: 600 1.7rem/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-inline__l { font-size: .88rem; color: var(--ink-2); }

/* ── idle ────────────────────────────────────────────────────── */
.idle { display: grid; gap: clamp(.8rem, 2vw, 1.1rem); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.idle-card {
  padding: 1.4rem; border-radius: 12px; border: 1px solid var(--rule); background: var(--raised);
}
.idle-card--hot { background: var(--jade-wash); border-color: var(--jade); }
.idle-card b { display: block; font: 700 2.6rem/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.idle-card--hot b { color: var(--jade); }
.idle-card span { display: block; margin-top: .5rem; font-size: .89rem; color: var(--ink-2); }

/* ── action lists ────────────────────────────────────────────── */
.acts { display: grid; gap: clamp(1rem, 2.5vw, 1.6rem); grid-template-columns: 1fr; }
@media (min-width: 900px) { .acts { grid-template-columns: 1fr 1fr; align-items: start; } }

/* min-width:0 — a grid item defaults to min-width:auto, so a wide table inside
   would stretch the whole card past the viewport instead of scrolling in place */
.act { min-width: 0; padding: clamp(1.25rem, 3vw, 1.8rem); border-radius: 12px; background: var(--raised); border: 1px solid var(--rule); }
.act--jade { border-top: 3px solid var(--jade); }
.act--rust { border-top: 3px solid var(--rust); }
.act__head { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin: 0 0 .4rem; font: 600 1.08rem/1.4 var(--display); }
.act__mark {
  font: 500 .7rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  padding: .38rem .6rem; border-radius: 5px;
}
.act--jade .act__mark { background: var(--jade); color: #fff; }
.act--rust .act__mark { background: var(--rust); color: #fff; }
.act__sub { margin: 0 0 1.2rem; font-size: .85rem; color: var(--muted); }
.act__note { margin: 1rem 0 0; font-size: .86rem; line-height: 1.6; color: var(--ink-2); }
.act__note b { color: var(--ink); }
.tbl--acc { font-size: .84rem; }
.tbl--acc td:first-child { min-width: 160px; font-weight: 600; }

.clips { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.clip { padding: .85rem .95rem; border-radius: 9px; background: var(--surface); border: 1px solid var(--hair); }
.clip__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem .9rem; }
.clip__acc { font: 600 .87rem/1.3 var(--display); }
.clip__roas { font: 600 .87rem/1 var(--display); font-variant-numeric: tabular-nums; margin-left: auto; }
.act--jade .clip__roas { color: var(--jade); }
.act--rust .clip__roas { color: var(--rust); }
.clip__nums { font: 400 .74rem/1.5 var(--mono); color: var(--muted); }
.clip__cap { margin: .4rem 0 0; font-size: .82rem; line-height: 1.55; color: var(--ink-2); }

.steps { margin: clamp(2rem, 5vh, 3rem) 0 0; padding: 0 0 0 1.4rem; max-width: 68ch; display: grid; gap: .8rem; }
.steps li { color: var(--ink-2); font-size: .96rem; padding-left: .3rem; }
.steps li::marker { font-family: var(--display); font-weight: 600; color: var(--jade); }
.steps b { color: var(--ink); }

/* ── footer ──────────────────────────────────────────────────── */
.foot { padding: clamp(2.5rem, 6vh, 4rem) 0 clamp(3rem, 8vh, 5rem); border-top: 1px solid var(--rule); }
.foot p { margin: 0; max-width: 70ch; font-size: .84rem; line-height: 1.65; color: var(--muted); }
.foot__sub { margin-top: .8rem !important; font-family: var(--mono); font-size: .74rem; }
.foot code { font-family: var(--mono); font-size: .95em; color: var(--ink-2); }

/* ── tooltip ─────────────────────────────────────────────────── */
.tip {
  position: fixed; z-index: 60; pointer-events: none; opacity: 0;
  max-width: 20rem; padding: .7rem .85rem;
  background: var(--ink); color: var(--plane);
  border-radius: 9px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5);
  font-size: .82rem; line-height: 1.5;
  transition: opacity .1s ease;
}
.tip.is-on { opacity: 1; }
.tip b { display: block; font: 600 .88rem/1.35 var(--display); margin-bottom: .3rem; }
.tip .tip__n { font-family: var(--mono); font-size: .75rem; opacity: .8; display: block; margin-top: .3rem; }
.tip .tip__c { display: block; margin-top: .45rem; opacity: .75; font-size: .78rem; }
