/* ============================================================================
   Just in Time — the card's parts (390 px wide; one column; phone first)
   Reads tokens.css only. Three groups:
     1. generated by the tool   head · title · fresh · where we are · landed · decisions
     2. the story vocabulary    what a session may use in the picture's middle
     3. the old palette names   mapped onto the tokens so earlier stories keep rendering
   Rules the design holds to: no gradient, no left-border boxes, no emoji; small text
   is 4.5:1 or better; a state is never told by colour alone.
   ============================================================================ */
:root {
  --ink: var(--jit-ink); --mute: var(--jit-mute); --line: var(--jit-line);
  --bg: var(--jit-paper); --card: var(--jit-surface);
  --green: var(--jit-ink); --greenbg: var(--jit-tint);
  --blue: var(--jit-accent); --bluebg: var(--jit-tint);
  --amber: var(--jit-warn); --amberbg: var(--jit-tint);
  --red: var(--jit-warn); --redbg: var(--jit-tint);
  --grey: var(--jit-faint);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* The 390px is FIXED on purpose, never max-width or 100%. The renderer (headless Chrome via
   scripts/html-shot.sh) cannot open a window narrower than 500px: it lays out at 500 and crops.
   A fixed body is laid out at 390 regardless, so the crop is exact. A responsive body would be
   laid out at 500 and lose its right edge (memory: html-shot-below-500px-shows-a-false-overflow). */
body {
  width: 390px; background: var(--jit-paper); color: var(--jit-ink);
  font: 16px/1.45 var(--jit-body); padding: 22px 20px 26px;
  -webkit-font-smoothing: antialiased;
}

/* ── 1. generated ─────────────────────────────────────────────────────────── */
.head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.eyebrow { font: 12px var(--jit-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--jit-mute); }
.chip { font: 500 12px var(--jit-mono); padding: 5px 11px; border-radius: var(--jit-pill); white-space: nowrap; }
.chip.needs { color: var(--jit-on-accent); background: var(--jit-accent); }
.chip.working { color: var(--jit-ink); border: 1px solid var(--jit-ink); padding: 4px 11px; }
.chip.blocked { color: var(--jit-warn); border: 1px solid var(--jit-warn); padding: 4px 11px; }
.chip.parked { color: var(--jit-mute); border: 1px dashed var(--jit-faint); padding: 4px 11px; }
.chip.done { color: var(--jit-on-panel); background: var(--jit-ink); }
h1 { font: var(--jit-display-weight) 31px/1.12 var(--jit-display); letter-spacing: -.01em; margin-top: 12px; }
.sub { color: var(--jit-mute); font-size: 16px; line-height: 1.45; margin-top: 12px; }
.fresh { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font: 12px/1.5 var(--jit-mono); color: var(--jit-ink); }
.fresh svg { flex: none; margin-top: 1px; }
.fresh.moved { color: var(--jit-warn); }
.fresh.unknown { color: var(--jit-mute); }
.rule { height: 1px; background: var(--jit-ink); margin-top: 22px; }

.bars { display: grid; gap: 6px; margin-bottom: 14px; }
.bars i { display: block; height: 6px; border-radius: 3px; background: var(--jit-line); }
.bars i.d { background: var(--jit-ink); }
.bars i.h { background: var(--jit-accent); }
.steps { display: flex; flex-direction: column; gap: 12px; }
.st { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.4; color: var(--jit-mute); }
.st svg, .st .dot { flex: none; margin-top: 2px; }
.dot { width: 18px; height: 18px; display: grid; place-items: center; }
.dot b { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--jit-accent); }
.dot.next b { width: 9px; height: 9px; background: none; border: 1.5px solid var(--jit-faint); }
.st.here { color: var(--jit-ink); }
.st.here .l { display: block; margin-bottom: 3px; font: 500 11px var(--jit-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--jit-accent); }
.st.here .t { display: block; font-size: 16px; font-weight: 600; line-height: 1.35; }

.landed ul { list-style: none; }
.landed li { font-size: 14.5px; line-height: 1.4; color: var(--jit-mute); padding: 8px 0; border-top: 1px solid var(--jit-line); }
.landed li:first-child { border-top: 0; padding-top: 0; }
.landed li:last-child { padding-bottom: 0; }

.decide { background: var(--jit-panel); color: var(--jit-on-panel); border-radius: var(--jit-r-l); padding: 18px 16px 6px; margin-top: 24px; }
.decide h2 { margin: 0 0 12px; color: var(--jit-on-panel-mute); }
.decide ol { list-style: none; }
.decide li { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--jit-panel-line); font-size: 15.5px; line-height: 1.4; }
.decide li .n { flex: none; width: 16px; font: 13px/1.6 var(--jit-mono); color: var(--jit-on-panel-mute); }
.clear { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding: 18px 16px; background: var(--jit-surface); border: 1px solid var(--jit-ink); border-radius: var(--jit-r-l); font-weight: 600; }
.clear svg { flex: none; }
.foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; font: 12px var(--jit-mono); color: var(--jit-mute); }

/* ── 2. the story vocabulary ──────────────────────────────────────────────── */
h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 24px 0 12px; font: 500 12px var(--jit-mono); letter-spacing: .08em; text-transform: uppercase; }
h2 .tag, h2 .meta { font: 12px var(--jit-mono); letter-spacing: 0; text-transform: none; color: var(--jit-mute); background: none; padding: 0; }
h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.card { background: var(--jit-surface); border: 1px solid var(--jit-line); border-radius: var(--jit-r-m); padding: 14px 16px; }
.k { font-weight: 600; }
.m { color: var(--jit-mute); font-size: 14.5px; line-height: 1.45; }
code { font: 13px var(--jit-mono); background: var(--jit-tint); border-radius: 4px; padding: 1px 5px; }

.big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.big .card { padding: 12px; }
.big .n { font: var(--jit-display-weight) 34px/1.05 var(--jit-display); }
.big .m { font-size: 13px; line-height: 1.35; margin-top: 4px; }

.scale { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 8px 0 12px; }
.scale div { height: 100%; }
.legend { display: grid; gap: 8px; font-size: 14.5px; line-height: 1.4; }
.legend span { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.bar { display: grid; grid-template-columns: 96px 1fr 44px; align-items: center; gap: 10px; font-size: 14px; margin: 6px 0; }
.track { height: 8px; background: var(--jit-line); border-radius: 4px; overflow: hidden; }
.fill { height: 100%; border-radius: 4px; }

.item { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--jit-line); font-size: 15px; line-height: 1.4; }
.item:first-child { border-top: 0; padding-top: 0; }
.item:last-child { padding-bottom: 0; }
.ico { width: 24px; height: 24px; flex: none; display: grid; place-items: center; margin-top: 1px; border: 1px solid var(--jit-ink); border-radius: var(--jit-r-s); font: 500 12px var(--jit-mono); }
.ico.have { background: var(--jit-ink); color: var(--jit-on-panel); }
.ico.add { color: var(--jit-accent); border-color: var(--jit-accent); }

.ba { display: grid; grid-template-columns: 76px 1fr; gap: 2px 12px; padding: 11px 0; border-top: 1px solid var(--jit-line); font-size: 15px; line-height: 1.4; }
.ba:first-child { border-top: 0; padding-top: 0; }
.ba:last-child { padding-bottom: 0; }
.who { font-weight: 600; }
.was { color: var(--jit-mute); text-decoration: line-through; }
.now { font-weight: 600; }
.why { grid-column: 2; color: var(--jit-mute); font-size: 14px; }

.card.flag, .flag { background: transparent; border: 1px solid var(--jit-ink); border-radius: var(--jit-r-s); }
.flow { display: flex; flex-direction: column; }
.step { background: var(--jit-surface); border: 1px solid var(--jit-line); border-radius: var(--jit-r-m); padding: 11px 14px; font-size: 15px; line-height: 1.4; }
.step.g { border-color: var(--jit-ink); }
.step.a { border-color: var(--jit-warn); }
.step.b { border-color: var(--jit-accent); }
.arrow { text-align: center; color: var(--jit-mute); font-size: 15px; line-height: 1; padding: 4px 0; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.col ul { list-style: none; }
.col li { font-size: 14px; line-height: 1.4; padding: 5px 0; border-top: 1px solid var(--jit-line); }
.col li:first-child { border-top: 0; }
.mock { background: var(--jit-surface); border: 1.5px solid var(--jit-ink); border-radius: var(--jit-r-l); padding: 14px 16px; }
.cap { font-size: 12.5px; color: var(--jit-mute); margin-top: 8px; }

/* ledger — a statement of account: one entry per line (its date in mono above it), the amount
   and the running total in mono on the right. Added 2026-10-05 for the Roberto statement; tokens only. */
.ledger { display: grid; grid-template-columns: minmax(0, 1fr) 70px 76px; column-gap: 8px; align-items: stretch; font-size: 13.5px; line-height: 1.3; }
.ledger > * { padding: 7px 0; border-top: 1px solid var(--jit-line); min-width: 0; }
.ledger > .lh { padding-top: 0; border-top: 0; font: 500 11px/1.3 var(--jit-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--jit-mute); }
.ledger .d { display: block; font: 400 11.5px/1.3 var(--jit-mono); color: var(--jit-mute); margin-bottom: 2px; }
.ledger .amt, .ledger .run { font: 400 13px/1.3 var(--jit-mono); text-align: right; white-space: nowrap; display: flex; align-items: flex-end; justify-content: flex-end; }
.ledger .run { color: var(--jit-mute); }
.ledger .neg { color: var(--jit-accent); }
.ledger .sub { font-weight: 600; }
.ledger .tot { border-top: 2px solid var(--jit-ink); font-weight: 600; }
.ledger .tot.amt, .ledger .tot.run { color: var(--jit-ink); font-weight: 600; }
.ledger .note { grid-column: 1 / -1; border-top: 0; padding-top: 2px; font-size: 13px; color: var(--jit-mute); }
