/* Pompa Program — THE SUNLIT MAP (design system v1).
   Canonical spec: docs/design/DESIGN-SYSTEM.md (law, ratified D_DESIGN_v1).
   §11 CSS variables reproduced verbatim below as --sm-* tokens; every legacy
   token name used by the surface JS is aliased onto an --sm-* value so no
   markup had to change to pick up the reskin. Only Root Cause Map, Milestone
   stamp, and Path geometry needed new component classes (see roadmap.js,
   game.js, progress.js, shared.js). */

:root {
  /* ---- Palette (§1) ---- */
  --sm-paper:          #FBF9F6; /* app ground — Sunlit Paper */
  --sm-card:           #FFFFFF;
  --sm-ink:            #2B3540; /* primary reading text; also Root Cause Map card bg */
  --sm-slate:          #404B5A; /* secondary text + primary action color — the one color allowed to act */
  --sm-stone:          #7E8B99; /* micro-labels ONLY */
  --sm-steel-dark:     #3E4C5B; /* you-are-here, stamp ring, verified-ink accent */
  --sm-steel-mid:      #6E93AB; /* Path trail, waypoint rings, Quest/Lead species mark */
  --sm-steel-light:    #93BCD8; /* decorative/large display ONLY */
  --sm-sky:            #84B4CE; /* decorative/large display ONLY */
  --sm-hairline:       #E4E9EE;
  --sm-hairline-deep:  #3C4956; /* Root Cause Map card only */
  --sm-mist:           #F4F6F8; /* insets, chips, quiet fills — NOT ground */
  --sm-hold:           #F1EEE8; /* "on hold" tag ground — warm, never red/gray */
  --sm-deep-text:      #FFFFFF; /* Root Cause Map card only */
  --sm-deep-text-soft: #C9D6E2; /* Root Cause Map card only */
  --sm-deep-label:     #8FA3B5; /* Root Cause Map card only */
  /* coral (#D9534F) is retired — deliberately absent, never referenced */

  /* ---- Type (§2) — Montserrat only; Light/Regular/Medium only ---- */
  --sm-font: 'Montserrat', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --sm-type-display-quiet: 300 30px/40px var(--sm-font);
  --sm-type-display:       400 28px/36px var(--sm-font);
  --sm-type-title:         500 22px/28px var(--sm-font);
  --sm-type-her-hand:      italic 400 19px/28px var(--sm-font); /* member quotes ONLY — the only italic */
  --sm-type-body:          400 17px/26px var(--sm-font); /* floor — never smaller */
  --sm-type-body-em:       500 17px/26px var(--sm-font);
  --sm-type-secondary:     400 15px/22px var(--sm-font);
  --sm-type-micro-label:   500 13px/16px var(--sm-font); /* +0.12em, uppercase, structural only */
  --sm-type-button:        500 16px/20px var(--sm-font);

  /* ---- Space / shape (§3) ---- */
  --sm-space-1: 4px;  --sm-space-2: 8px;  --sm-space-3: 12px;
  --sm-space-4: 16px; --sm-space-5: 24px; --sm-space-6: 32px; --sm-space-7: 48px;
  --sm-gutter: 24px; --sm-card-padding: 18px; --sm-section-gap: 32px;
  --sm-radius-card: 14px; --sm-radius-control: 10px; --sm-radius-tag: 6px;
  --sm-shadow: 0 1px 2px rgba(43,53,64,.05);
  --sm-tap-target: 48px;

  /* ---- Motion (§9) ---- */
  --sm-motion-fade: 220ms ease-out;
  --sm-motion-settle: 220ms ease-out;
  --sm-motion-stamp: 200ms ease-out;

  /* ---- Safeguard (§4) — law, not preference ---- */
  --sm-safeguard-bg: var(--sm-paper);

  /* ---- Path (§7) ---- */
  --sm-path-trail-opacity: .75;
  --sm-path-node-size: 13px;
  --sm-path-node-here-size: 17px;
  --sm-path-node-here-ring: 0 0 0 5px rgba(62,76,91,.12);

  /* ================= legacy token aliases =================
     Every surface .js file was written against these names; aliasing keeps
     all markup/JS untouched while the values underneath are 100% Sunlit Map. */
  --bg: var(--sm-paper);
  --card: var(--sm-card);
  --ink: var(--sm-ink);
  --ink-soft: var(--sm-slate);
  --ink-faint: var(--sm-stone);
  --line: var(--sm-hairline);
  --line-soft: var(--sm-mist);
  --warm: var(--sm-slate);        /* primary action — slate is the one color that "acts" */
  --warm-soft: var(--sm-mist);
  --warm-deep: var(--sm-ink);
  --sage: var(--sm-steel-mid);    /* Quest species — green retired; ink/steel governs */
  --sage-soft: var(--sm-mist);
  --gold: var(--sm-steel-dark);   /* Milestone/closed — no success color, ever */
  --gold-soft: var(--sm-mist);
  --hold: var(--sm-ink);          /* Safeguard/hold text ink */
  --hold-soft: var(--sm-hold);
  --lead: var(--sm-steel-mid);    /* Lead species shares the steel family; dashed border differentiates */
  --lead-soft: var(--sm-mist);
  --s1: var(--sm-space-1); --s2: var(--sm-space-2); --s3: var(--sm-space-3);
  --s4: var(--sm-space-4); --s5: var(--sm-space-5); --s6: var(--sm-space-6); --s7: var(--sm-space-7);
  --radius: var(--sm-radius-card);
  --radius-sm: var(--sm-radius-control);
  font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
  :root { --sm-motion-fade: 0ms; --sm-motion-settle: 0ms; --sm-motion-stamp: 0ms; }
}

* { box-sizing: border-box; margin: 0; }
body {
  background: var(--sm-paper); color: var(--sm-ink);
  font: var(--sm-type-body);
  min-height: 100vh; display: flex; flex-direction: column;
}
h1, h2, h3, h4 { font-family: var(--sm-font); font-weight: 500; } /* Medium ceiling — no Bold/SemiBold */

/* ============================== shell ============================== */
#topbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); background: var(--card);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: var(--s3); }
.brand-mark {
  background: var(--sm-slate); color: #fff; border-radius: var(--sm-radius-tag);
  padding: 4px 8px; font-weight: 500; letter-spacing: .5px;
}
.brand-name { font-weight: 500; font-size: 1.05rem; }
.brand-sub { color: var(--ink-faint); font-size: .78rem; margin-left: var(--s2); }
.topbar-right { display: flex; align-items: center; gap: var(--s2); }
#member-select {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px 10px;
  background: var(--bg); color: var(--ink); font: var(--sm-type-secondary);
}
#eng-toggle {
  border: 1px solid var(--line); background: transparent; color: var(--ink-faint);
  border-radius: var(--sm-radius-tag); padding: 6px 12px; font-size: .78rem; cursor: pointer;
}
#eng-toggle:hover { color: var(--ink-soft); }
body.eng #eng-toggle {
  background: var(--sm-ink); color: var(--bg); border-color: var(--sm-ink); font-weight: 500;
}

#nav {
  display: flex; gap: var(--s1); padding: var(--s2) var(--s5); background: var(--card);
  border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
#nav button {
  border: 1px solid transparent; background: transparent; color: var(--ink-soft);
  padding: var(--s2) var(--s4); border-radius: var(--sm-radius-tag); cursor: pointer; font-size: .92rem;
}
#nav button.active { background: var(--sm-mist); color: var(--sm-ink); font-weight: 500; }
#nav button:hover { border-color: var(--line); }

main#surface {
  flex: 1; max-width: 720px; width: 100%; margin: 0 auto;
  padding: var(--s5) var(--s4) var(--s7);
}

#foot {
  display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap;
  padding: var(--s3) var(--s5); color: var(--ink-faint); font-size: .78rem;
  border-top: 1px solid var(--line); background: var(--card);
}

/* ============================== engineering toggle ============================== */
.eng-only { display: none !important; }
body.eng .eng-only { display: revert !important; }
.decision-ref, .rm-ref, .rm-stamp, .rm-details-card { display: none; }
body.eng .decision-ref { display: block; }
body.eng .rm-ref { display: inline; }
body.eng .rm-stamp { display: block; }
body.eng .rm-details-card { display: block; }

/* ============================== type & text ============================== */
.surface-head { margin-bottom: var(--s4); }
.surface-head h1 { font: var(--sm-type-display); line-height: 1.25; }
.surface-sub { color: var(--ink-soft); font: var(--sm-type-secondary); margin-top: var(--s1); }
.muted { color: var(--ink-soft); font: var(--sm-type-secondary); }
.fine { color: var(--ink-faint); font: var(--sm-type-micro-label); text-transform: none; letter-spacing: normal; }
.section-label {
  text-transform: uppercase; letter-spacing: .12em; font: var(--sm-type-micro-label);
  color: var(--ink-soft);
}

/* ============================== cards ============================== */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s4) var(--s5); margin-bottom: var(--s4); box-shadow: var(--sm-shadow);
}
.card h2 { font: var(--sm-type-title); margin-bottom: var(--s2); }
.card h3 {
  font: var(--sm-type-micro-label); margin: var(--s4) 0 var(--s2);
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft);
}
.card-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2);
}
.card-head h2 { margin-bottom: 0; }
.mean { color: var(--ink-soft); font: var(--sm-type-secondary); margin: var(--s1) 0 var(--s2); }

/* her-hand token — reserved exclusively for the member's verbatim quotes;
   the ONLY italic anywhere in this system. */
.quote {
  font: var(--sm-type-her-hand); border-left: 3px solid var(--sm-steel-mid);
  padding: var(--s2) var(--s4); margin: var(--s3) 0; color: var(--sm-ink);
  background: var(--sm-mist); border-radius: 0 var(--sm-radius-control) var(--sm-radius-control) 0;
}

/* ============================== buttons & inputs ============================== */
button.primary {
  background: var(--sm-slate); color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 10px 18px; font: var(--sm-type-button); cursor: pointer; min-height: var(--sm-tap-target);
}
button.primary:hover { background: var(--sm-ink); }
button.primary:disabled { opacity: .45; cursor: default; }
button.ghost {
  background: transparent; color: var(--sm-slate); border: 1px solid var(--sm-slate);
  border-radius: var(--radius-sm); padding: 8px 14px; cursor: pointer; font: var(--sm-type-button);
}
button.ghost:hover { background: var(--sm-mist); }
button.quiet {
  background: var(--bg); color: var(--ink-soft); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 14px; cursor: pointer; font: var(--sm-type-button);
}
button.quiet:hover { border-color: var(--ink-faint); }
textarea, input[type=text] {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; font: var(--sm-type-body); background: #fff; color: var(--ink); resize: vertical;
}
textarea:focus, input[type=text]:focus, select:focus {
  outline: 2px solid var(--sm-mist); border-color: var(--sm-slate);
}

/* ============================== pills ============================== */
/* Capsule chip shapes are retired (§3) — radius.tag (6px), never a pill-999 */
.pill, .badge {
  display: inline-block; font: var(--sm-type-micro-label); letter-spacing: .06em;
  padding: 2px 10px; border-radius: var(--sm-radius-tag); white-space: nowrap; border: 1px solid transparent;
  text-transform: none;
}
.pill-quest,     .badge.quest     { background: var(--sm-mist); color: var(--sm-steel-mid); }
.pill-lead,      .badge.lead      { background: var(--sm-mist); color: var(--sm-steel-mid);
                                    border: 1px dashed var(--sm-steel-mid); }
.pill-held,      .badge.held      { background: var(--sm-hold); color: var(--sm-ink); }
.pill-milestone, .badge.milestone { background: var(--sm-mist); color: var(--sm-steel-dark); }
.pill-warm    { background: var(--sm-slate); color: #fff; }
.pill-neutral { background: var(--sm-mist); color: var(--sm-slate); }

/* ============================== safeguard — the one system-law mechanism (§4) ============================== */
/* Gravity by subtraction: ink between two rules, paper ground, no icon, no card
   chrome, no shadow, no radius. Full-bleed to the screen edge. Zero motion. */
.safeguard {
  background: var(--sm-safeguard-bg); border: none;
  border-top: 2px solid var(--sm-ink); border-bottom: 1px solid var(--sm-ink);
  border-radius: 0; box-shadow: none;
  margin: var(--s2) calc(-1 * var(--s4)) var(--s5); padding: var(--s4);
}
.safeguard h2 { font: var(--sm-type-title); margin-bottom: var(--s2); }
.safeguard p { margin: var(--s1) 0; font: var(--sm-type-body); }

/* ============================== quest / lead cards (§6) ============================== */
/* Quest = solid card, Quest species mark; Lead = dashed border, Lead species mark.
   Both live in the steel family — no green, no success color. */
.lane-card {
  border: 1.5px solid var(--sm-hairline); border-radius: var(--radius); padding: var(--s4);
  margin: var(--s3) 0; background: var(--sm-card); box-shadow: var(--sm-shadow);
}
.lane-card.quest { border-left: 1.5px solid var(--sm-hairline); }
.lane-card.lead { border: 1.5px dashed var(--sm-steel-mid); }
.lane-card.held { border-color: var(--sm-hairline); background: var(--sm-card); }
.lane-card.closed { border-color: var(--sm-hairline); }
.lane-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.lane-title { font: var(--sm-type-body-em); }
.lane-card .why { font: var(--sm-type-secondary); color: var(--ink-soft); margin-top: var(--s2); }
.lane-card .close-line { font: var(--sm-type-secondary); margin-top: var(--s2); color: var(--sm-steel-dark); }

/* ============================== phase bands (legacy) ============================== */
.phase-band { margin: var(--s5) 0 var(--s2); }
.phase-band h3 {
  text-transform: uppercase; letter-spacing: .12em; font: var(--sm-type-micro-label); color: var(--ink-soft);
  border-bottom: 1px solid var(--line); padding-bottom: var(--s2);
}
/* Baseline line: upright, never italic — italics are the her-hand token exclusively (§0.3) */
.baseline-line { font: var(--sm-type-secondary); color: var(--ink-soft); margin: var(--s2) 0; }

/* ============================== expander ============================== */
details.expander { margin-top: var(--s3); }
details.expander > summary {
  cursor: pointer; color: var(--sm-slate); font: var(--sm-type-secondary); list-style: none;
  display: inline-flex; align-items: center; gap: var(--s1); user-select: none;
}
details.expander > summary::-webkit-details-marker { display: none; }
details.expander > summary::before { content: "›"; transition: transform .15s; font-size: 1rem; }
details.expander[open] > summary::before { transform: rotate(90deg); }
details.expander > summary:hover { text-decoration: underline; }
.expander-body {
  border-top: 1px dashed var(--line); margin-top: var(--s2); padding-top: var(--s3);
  font: var(--sm-type-secondary);
}

/* ============================== path spine (§7 — drawn Path geometry) ============================== */
.spine { margin: var(--s4) 0; padding-left: var(--s1); }
.spine-node {
  position: relative; padding: 0 0 var(--s4) var(--s5); min-height: var(--s6);
}
.spine-node::before {          /* the drawn trail — dashed steel, opacity .75 */
  content: ""; position: absolute; left: 6px; top: 18px; bottom: -2px;
  width: 0; border-left: 2.5px dashed var(--sm-steel-mid); opacity: var(--sm-path-trail-opacity);
}
.spine-node:last-child::before { display: none; }
.spine-node::after {           /* waypoint ring — 13px, 2.5px solid steel-mid, filled when done */
  content: ""; position: absolute; left: 0; top: 3px;
  width: var(--sm-path-node-size); height: var(--sm-path-node-size);
  border-radius: 50%; background: var(--sm-card); border: 2.5px solid var(--sm-steel-mid);
}
.spine-node.done::after { background: var(--sm-steel-mid); }
.spine-node.here::after {      /* "you are here" node — 17px, 3px solid steel-dark, soft outer ring */
  width: var(--sm-path-node-here-size); height: var(--sm-path-node-here-size);
  left: -2px; top: 0;
  background: var(--sm-paper); border: 3px solid var(--sm-steel-dark);
  box-shadow: var(--sm-path-node-here-ring);
}
.spine-node.ahead .spine-label { color: var(--sm-stone); }
.spine-node.done .spine-label { color: var(--sm-slate); }
.spine-node.here .spine-label { color: var(--sm-steel-dark); font-weight: 500; }
/* Band name: title-adjacent caps, Medium 15, +0.1em, uppercase */
.spine-label { font: 500 15px/1.4 var(--sm-font); letter-spacing: .1em; text-transform: uppercase; }
.spine-label .pill, .spine-label .fine { text-transform: none; letter-spacing: normal; }

/* ============================== root cause map — the one deep object (§5) ============================== */
/* Quarantined to this single card: --sm-ink background, white text, deep-text-soft
   secondary, deep-label micro-labels, hairline-deep internal dividers. Flat — no shadow.
   Counts only (Found / Removed) — no bars, no percentages, no denominators, ever. */
.rcm-card { background: var(--sm-ink); border: none; box-shadow: none; color: var(--sm-deep-text); }
.rcm-card h2 { color: var(--sm-deep-text); }
.rcm-card .mean { color: var(--sm-deep-text-soft); }
.rcm-affordance {
  font: var(--sm-type-micro-label); text-transform: uppercase; letter-spacing: .12em;
  color: var(--sm-deep-label);
}
.rcm-counts { display: flex; gap: var(--s6); margin: var(--s3) 0 var(--s4); }
.rcm-count { text-align: left; }
.rcm-count-num { font: 500 30px/1.2 var(--sm-font); color: var(--sm-deep-text); }
.rcm-count-label {
  font: var(--sm-type-micro-label); text-transform: uppercase; letter-spacing: .12em;
  color: var(--sm-deep-label); margin-top: 2px;
}
.rcm-rows { margin-top: var(--s2); }
.rcm-row {
  display: flex; justify-content: space-between; gap: var(--s3);
  padding: var(--s2) 0; border-bottom: 1px solid var(--sm-hairline-deep);
  font: var(--sm-type-secondary); color: var(--sm-deep-text-soft);
}
.rcm-row:last-child { border-bottom: none; }
.rcm-row .rcm-status {
  font: var(--sm-type-micro-label); text-transform: uppercase; letter-spacing: .1em;
  color: var(--sm-deep-label);
}
.rcm-card details.expander > summary { color: var(--sm-deep-label); }
.rcm-card .expander-body { border-top-color: var(--sm-hairline-deep); color: var(--sm-deep-text-soft); }

/* ============================== milestone stamp — DOCUMENT celebration register (§8) ============================== */
/* Flat, upright — no rotation anywhere (§0.4). Monochrome ink only. The single
   200ms press-in scale is the entire animation; nothing loops. */
.sm-stamp-wrap { display: flex; justify-content: center; margin: var(--s5) 0; }
.sm-stamp {
  width: 120px; height: 120px; border-radius: 50%;
  border: 2.5px solid var(--sm-steel-dark);
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4.5px var(--sm-steel-dark);
  background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: var(--s2); gap: 2px;
  animation: sm-stamp-press var(--sm-motion-stamp) both;
}
.sm-stamp-label { font: var(--sm-type-micro-label); text-transform: uppercase; letter-spacing: .12em; color: var(--sm-stone); }
.sm-stamp-name { font: var(--sm-type-title); font-size: 17px; line-height: 1.15; color: var(--sm-ink); max-width: 96px; }
.sm-stamp-date { font: var(--sm-type-secondary); font-size: 13px; color: var(--sm-slate); }
@keyframes sm-stamp-press { from { transform: scale(1.06); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .sm-stamp { animation: none; } }

/* ============================== chat ============================== */
#thread, .thread {
  display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s4);
}
.msg {
  max-width: 82%; padding: var(--s3) var(--s4); border-radius: 16px; font: var(--sm-type-body);
  white-space: pre-wrap;
}
.msg.member { align-self: flex-end; background: var(--sm-mist); border-bottom-right-radius: 6px; }
.msg.coach { align-self: flex-start; background: #fff; border: 1px solid var(--line);
  border-bottom-left-radius: 6px; }
.msg.safety-msg {
  background: var(--sm-paper); border: 1px solid var(--sm-ink); color: var(--sm-ink);
  border-bottom-left-radius: 6px;
}
.msg-time { display: block; margin-top: var(--s1); font: var(--sm-type-micro-label); text-transform: none; letter-spacing: normal; color: var(--ink-faint); }
.msg .decision-ref { margin-top: var(--s2); font: var(--sm-type-micro-label); text-transform: none; color: var(--ink-faint); }
.chip-row { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; margin-top: var(--s2); }

/* ============================== pulse ============================== */
.pulse-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: var(--s3) 0; border-bottom: 1px solid var(--line-soft);
}
.pulse-row .chip { font: var(--sm-type-secondary); color: var(--sm-steel-mid); }
.scale { display: flex; gap: var(--s2); }
.scale button {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font: var(--sm-type-secondary); color: var(--ink-soft);
}
.scale button:hover { border-color: var(--sm-slate); }
.scale button.sel { background: var(--sm-slate); color: #fff; border-color: var(--sm-slate); font-weight: 500; }

.ring-row { display: flex; gap: var(--s4); flex-wrap: wrap; margin: var(--s3) 0; }
.ring { text-align: center; font: var(--sm-type-secondary); color: var(--ink-soft); }
.ring .segs { display: flex; gap: 3px; justify-content: center; margin-bottom: var(--s1); }
.ring .seg { width: 18px; height: 8px; border-radius: var(--sm-radius-tag); background: var(--line); }
.ring .seg.on { background: var(--sm-steel-mid); }
.ring.paused .seg.on { background: var(--sm-ink); }

/* ============================== big-number tiles ============================== */
.tile-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--s3); margin: var(--s3) 0;
}
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s4); text-align: center;
}
.tile-num { font: 500 30px/1.2 var(--sm-font); color: var(--sm-ink); }
.tile-label { font: var(--sm-type-secondary); color: var(--ink-soft); margin-top: var(--s1); }
.tile-sub { font: var(--sm-type-micro-label); text-transform: none; color: var(--ink-faint); margin-top: 2px; }

/* ============================== ledger / journal / source map ============================== */
.ledger-row {
  display: flex; justify-content: space-between; gap: var(--s3); font: var(--sm-type-secondary);
  padding: var(--s2) 0; border-bottom: 1px dashed var(--line-soft);
}
.big-number { font: 500 30px/1.2 var(--sm-font); color: var(--sm-ink); }
.source-cork { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s2); }
.source-pin {
  border: 1px solid var(--line); border-radius: var(--sm-radius-tag); padding: 6px 12px;
  font: var(--sm-type-secondary); background: #fff;
}
.source-pin.removed { border-color: var(--sm-steel-dark); background: var(--sm-mist); color: var(--sm-steel-dark); }
.source-pin.following { border-style: dashed; border-color: var(--sm-steel-mid); color: var(--sm-steel-mid); }
.journal-entry { font: var(--sm-type-secondary); padding: var(--s2) 0; border-bottom: 1px dashed var(--line-soft); }
.journal-entry .when { color: var(--ink-faint); font: var(--sm-type-micro-label); text-transform: none; }

/* ============================== progress dots (Day 0) ============================== */
.dots { display: flex; gap: var(--s2); justify-content: center; margin: var(--s3) 0 var(--s4); }
.dots .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dots .dot.on { background: var(--sm-slate); }

/* ============================== empty state ============================== */
.empty-state {
  color: var(--ink-soft); font: var(--sm-type-body); text-align: center;
  padding: var(--s5) var(--s4); background: var(--card); border: 1px dashed var(--line);
  border-radius: var(--radius); margin-bottom: var(--s4);
}

/* ── Supply + Learn surfaces (added with the commerce/learn build) ───────────
   Reuses the existing card/line/pill vocabulary; only genuinely new shapes
   live here: the order line with its always-visible reason, and the clip box. */
.line { padding: 12px 0; border-bottom: 1px solid var(--rule, #e8e3da); }
.line:last-child { border-bottom: 0; }
.line-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.line-title { font-weight: 500; }
.line-price { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted, #6b6257); }
/* the reason is never optional — every proposed line explains itself */
.line-why { margin-top: 3px; font-size: .92rem; color: var(--muted, #6b6257); line-height: 1.45; }
.line-off { opacity: .62; }
.q-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.q-row label { flex: 1 1 260px; }
.q-input { flex: 0 1 140px; padding: 7px 9px; border: 1px solid var(--rule, #e8e3da);
  border-radius: 8px; font: inherit; }
.btn-link { background: none; border: 0; padding: 0; margin-top: 6px; font: inherit;
  color: var(--accent, #b4653a); cursor: pointer; text-decoration: underline; }
.btn-link:hover { opacity: .8; }
.clip { margin: 10px 0 2px; }
.clip video { width: 100%; max-width: 620px; border-radius: 10px; background: #000; display: block; }
.order-detail:empty { display: none; }
.order-detail { margin-top: 6px; }

/* ---- Requests (human-routing inbox — support.js) ---- */
.nav-badge { background: #b3382c; color: #fff; border-radius: 999px;
  padding: 0 6px; font-size: .7rem; margin-left: 4px; display: inline-block;
  min-width: 16px; text-align: center; }
.unread-dot { color: #b3382c; margin-right: 4px; font-size: .7rem; }
.queue-card.active { outline: 2px solid currentColor; }
