/* Data Shelf-Life Guard. Palette: sorting-floor grey, depot slate, route blue, bruise plum, lichen olive, tote yellow. */
:root {
  /* dark only */
  --floor: #14202A;
  --panel: #1B2935;
  --ink: #E3EAEE;
  --muted: #A3B2BE;
  --line: #33475A;
  --ref: #82AAEA;
  --stale: #B7C66C;
  --lq: #E48CB7;
  --comb: #B39BE6;
  --unseen: #6CCBBF;
  --tote: #F2BA00;
  --tote-ink: #F5C842;
  --pass: #7ACB8A;
  --fail: #F08A80;
  --band: rgba(227, 234, 238, .07);
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Overpass", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--floor); color: var(--ink);
  font: 400 18px/1.6 var(--body); font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; line-height: 1.05; margin: 0 0 .4em; letter-spacing: .005em; }
h1 { font-size: clamp(44px, 7vw, 92px); }
h2 { font-size: clamp(44px, 6vw, 76px); }
h3 { font-size: clamp(26px, 3vw, 34px); }
h4 { font-size: 22px; font-weight: 600; }
p { margin: 0 0 .9em; max-width: 68ch; }
a { color: var(--ref); text-underline-offset: 3px; }
code { font-size: .88em; background: var(--band); padding: 1px 5px; border-radius: 4px; }
em { font-style: italic; }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--tote); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--floor); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }

/* tracking bar */
.track {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px;
  padding: 10px 32px; background: color-mix(in srgb, var(--floor) 92%, transparent);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.route { position: relative; flex: 1; display: flex; justify-content: space-between; max-width: 640px; margin: 0 auto; }
.route-line { position: absolute; left: 8px; right: 8px; top: 9px; height: 3px; background: var(--line); border-radius: 2px; }
.route-fill { display: block; height: 100%; width: 0; background: var(--tote); border-radius: 2px; }
.stop { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; padding-top: 0; }
.stop:nth-child(3) { align-items: center; }
.stop:last-child { align-items: flex-end; }
.stop .dot { width: 21px; height: 21px; border-radius: 50%; background: var(--floor); border: 3px solid var(--line); }
.stop.passed .dot { border-color: var(--tote); background: var(--tote); }
.stop.active { color: var(--ink); }
.stop.active .dot { border-color: var(--tote); background: var(--floor); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tote) 30%, transparent); }
.stop-n { display: none; }
button { font: inherit; cursor: pointer; }
.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); border-radius: 999px; padding: 4px 14px; font-size: 14px; }
.ghost:hover { border-color: var(--ink); }

main { padding: 0 32px; max-width: 1240px; margin: 0 auto; }

/* hero */
.hero { display: grid; grid-template-columns: 1.25fr .9fr; gap: 56px; align-items: center; padding: 72px 0 88px; }
.lede { font-size: 19px; }
.slip {
  margin: 0; background: var(--panel); border-radius: 4px 4px 14px 14px; padding: 22px 24px 18px;
  border-top: 10px solid var(--ink); position: relative;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(20, 32, 42, .45);
}
.slip::after { /* tear-off edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px;
  background: radial-gradient(circle at 6px 0, transparent 5px, var(--panel) 5.5px) 0 0 / 12px 8px repeat-x;
}
.slip-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-weight: 800; font-size: 24px; }
.slip-id { font-family: var(--body); font-weight: 400; font-size: 13px; color: var(--muted); }
.slip-pkg { font-size: 15px; color: var(--muted); margin: 6px 0 14px; }
.slip-rows { display: grid; gap: 10px; }
.slip-row { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-top: 1.5px dashed var(--line); }
.slip-k { font-weight: 600; }
.slip-row.on .slip-k::before { content: ""; display: inline-block; width: 11px; height: 11px; background: var(--tote); border-radius: 2px; margin-right: 8px; }
.slip-row.off .slip-k::before { content: ""; display: inline-block; width: 11px; height: 11px; background: var(--lq); border-radius: 2px; margin-right: 8px; }
.slip-v { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 4vw, 48px); line-height: 1; }
.slip-v small { font-family: var(--body); font-size: 14px; font-weight: 400; color: var(--muted); display: block; text-align: right; margin-top: 4px; }
.slip-cap { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* parts */
.part { padding: 72px 0 40px; border-top: 3px solid var(--ink); }
.part-head { max-width: 760px; margin-bottom: 36px; }
.part-n { font-weight: 600; color: var(--tote-ink); margin: 0 0 6px; }
.takeaway { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.12; border-left: 8px solid var(--tote); padding-left: 18px; margin: 8px 0 22px; max-width: 26ch; }
.keys { font-size: 13px; color: var(--muted); white-space: nowrap; }
details.tech { margin-top: 22px; border-top: 2px dotted var(--line); padding-top: 10px; }
details.tech summary { cursor: pointer; font-weight: 700; color: var(--muted); font-size: 16px; padding: 4px 0; width: fit-content; }
details.tech summary:hover { color: var(--ink); }
details.tech[open] summary { color: var(--ink); }
.tech-body { padding: 10px 0 4px; font-size: 16px; }
.tech-body li { margin-bottom: 8px; max-width: 90ch; }
.cl-plain { font-size: 20px; font-weight: 600; }
.goals { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 90ch; }
.goals li { display: flex; gap: 14px; align-items: baseline; font-size: 18px; }
.goals .mark { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; color: var(--floor); background: var(--pass); transform: translateY(6px); }
.goals li.no .mark { background: var(--fail); }
.goals .muted { font-size: 14px; }
.rates i { font-style: normal; font-size: 12px; }

.stages { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.stage { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1.5px solid currentColor; line-height: 1.5; }
.s-train { color: var(--ref); }
.s-label { color: var(--lq); }
.s-serve { color: var(--stale); }

/* poison labels */
.labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.label { background: var(--panel); border-radius: 6px; padding: 0 22px 18px; border-left: 6px solid var(--c); }
.label.held { background: transparent; border: 2px dashed var(--c); border-left-width: 6px; border-left-style: solid; }
.label-stub { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 14px 0 12px; margin-bottom: 14px; border-bottom: 2px dotted var(--line); }
.label-stub .cond { margin-left: auto; font-size: 13px; color: var(--c); font-weight: 700; }
.label h3 { color: var(--ink); }
.label > p { font-size: 16px; }
.mini { height: 120px; margin: 6px 0 14px; position: relative; }
.mini svg { width: 100%; height: 100%; display: block; overflow: visible; }
.mini .replay { position: absolute; right: 0; top: -6px; font-size: 12px; padding: 1px 10px; }
.facts { display: grid; grid-template-columns: 7.5em 1fr; gap: 6px 12px; margin: 0; font-size: 15px; line-height: 1.5; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
.facts.tight { grid-template-columns: 8.5em 1fr; }

.finding { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; margin-top: 56px; padding: 32px; background: var(--panel); border-radius: 18px 4px 18px 4px; }

/* charts */
.chart { width: 100%; position: relative; }
.chart svg { display: block; overflow: visible; }
.chart-fig, .tracks figure, .chain figure { margin: 0; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.axis text { fill: var(--muted); font: 12px var(--body); }
.axis path, .axis line { stroke: var(--line); }
.grid line { stroke: var(--line); stroke-opacity: .6; }
.grid path { display: none; }
.axis-label { fill: var(--muted); font: 600 12px var(--body); }
.direct { font: 600 12px var(--body); }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--floor); font-size: 13px; padding: 6px 9px; border-radius: 4px; white-space: nowrap; transform: translate(-50%, -110%); z-index: 3; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend svg { flex: none; }

/* sorting line (signature) */
.line-fig { margin: 0 0 48px; position: relative; }
.sortline { width: 100%; background: var(--panel); border-radius: 10px; padding: 8px 0; }
.sortline svg { width: 100%; height: auto; display: block; }
.line-tools { position: absolute; right: 12px; top: 12px; z-index: 2; }
.sl-belt { fill: none; stroke: var(--line); stroke-width: 18; stroke-linecap: round; }
.sl-belt-dash { fill: none; stroke: var(--panel); stroke-width: 2; stroke-dasharray: 2 14; }
.sl-st rect { fill: var(--floor); stroke: var(--ink); stroke-width: 1.5; }
.sl-st.guard rect { fill: var(--tote); stroke: var(--tote); }
.sl-st.guard text { fill: #1B2B3A; }
.sl-st text { fill: var(--ink); font: 700 15px var(--body); }
.sl-st text.s { font-weight: 400; font-size: 12px; }
.sl-lane { fill: var(--muted); font: 600 13px var(--body); }
.sl-note { fill: var(--muted); font: 12px var(--body); }
.sl-fb { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 5; }
.tok { stroke: var(--panel); stroke-width: 1; }

/* layers */
.layers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 64px; }
.layer { border-top: 6px solid var(--tote); padding-top: 14px; }
.layer p { font-size: 16px; }
.layer-n { display: inline-block; background: var(--ink); color: var(--floor); font-size: .7em; padding: 2px 8px; border-radius: 4px; vertical-align: 4px; margin-right: 4px; }

/* walkthrough */
.walk { background: var(--panel); border-radius: 20px; padding: 32px; }
.walk-head { max-width: 760px; }
.pick { font-weight: 600; display: inline-flex; gap: 10px; align-items: center; }
select, input[type=number], input[type=text] {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--floor); border: 1.5px solid var(--line); border-radius: 6px; padding: 5px 8px;
}
select:hover, input:hover { border-color: var(--muted); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 28px 0 0; display: grid; gap: 0; }
.step { counter-increment: s; position: relative; padding: 0 0 28px 56px; border-left: 3px solid var(--line); margin-left: 16px; }
.step:last-child { border-left-color: transparent; }
.step::before {
  content: counter(s); position: absolute; left: -18px; top: -4px; width: 33px; height: 33px; border-radius: 50%;
  background: var(--ink); color: var(--floor); font: 800 18px/33px var(--display); text-align: center;
}
.step h4 { margin-top: -2px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.side { border-radius: 8px; padding: 14px 16px; background: var(--floor); border-top: 5px solid var(--lq); }
.side.on { border-top-color: var(--tote); }
.side h5 { margin: 0 0 6px; font-size: 15px; }
.side .p { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1.05; }
.side .s { font-size: 14px; color: var(--muted); }
.verdict { margin-top: 14px; padding: 10px 14px; border-radius: 6px; font-weight: 600; }
.verdict.defer { background: color-mix(in srgb, var(--tote) 28%, transparent); border-left: 5px solid var(--tote); }
.verdict.ok { background: color-mix(in srgb, var(--pass) 14%, transparent); border-left: 5px solid var(--pass); }
.gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.gauge { background: var(--floor); border-radius: 8px; padding: 10px 14px; }
.gauge .k { font-size: 14px; color: var(--muted); display: block; }
.gauge .v { font-weight: 700; font-size: 20px; }
.gauge .bar { height: 6px; background: var(--line); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.gauge .bar i { display: block; height: 100%; background: var(--pass); }
.gauge.bad .bar i { background: var(--fail); }
.gauge .g-note { font-size: 13px; color: var(--muted); display: block; margin-top: 6px; }
.gauge.bad .v { color: var(--fail); }
.explain p { margin-bottom: .6em; }
.act { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline { display: inline-flex; gap: 6px; align-items: center; font-size: 15px; }
.inline.grow { flex: 1; min-width: 220px; }
.inline.grow input { flex: 1; min-width: 0; }
#act-min { width: 90px; }
.btn { background: var(--ink); color: var(--floor); border: 0; border-radius: 6px; padding: 7px 14px; font-weight: 600; font-size: 15px; }
.btn:hover { background: color-mix(in srgb, var(--ink) 85%, var(--tote)); }
.btn.warn { background: var(--tote); color: #1B2B3A; }
.effort { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 8px; }
.effort div { background: var(--floor); border-radius: 8px; padding: 10px 14px; }
.effort .k { display: block; font-size: 14px; color: var(--muted); }
.effort .v { font-weight: 700; font-size: 20px; }
.log { font-size: 14px; background: var(--floor); border-radius: 8px; padding: 10px 14px; min-height: 2.6em; }
.log div + div { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 4px; }
.roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 20px; padding-top: 24px; border-top: 2px dotted var(--line); }
.roles p { font-size: 15px; }
.scale { font-size: 15px; color: var(--muted); }

/* tables */
.tablewrap { overflow-x: auto; }
.t { border-collapse: collapse; width: 100%; font-size: 15px; }
.t th, .t td { padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--line); vertical-align: top; }
.t th { font-weight: 700; font-size: 14px; color: var(--muted); }
.t .l { text-align: left; }
.t td.pass { color: var(--pass); font-weight: 700; }
.t td.fail { color: var(--fail); font-weight: 700; }
.matrix td { vertical-align: middle; }
.matrix .m { font-family: var(--display); font-weight: 800; font-size: 28px; }
.matrix .sp { font-size: 13px; color: var(--muted); }
.matrix .gap { display: block; font-size: 13px; color: var(--muted); }
.matrix .cname { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.matrix .cname i { width: 12px; height: 12px; border-radius: 2px; background: var(--c); }
.matrix .rec { font-family: var(--display); font-weight: 800; font-size: 28px; }
.matrix tr.extra td { border-top: 2px dashed var(--line); }

/* analysis */
.counters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-bottom: 56px; }
.counter { border-left: 4px solid var(--tote); padding-left: 14px; }
.counter .num { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(40px, 4.6vw, 62px); line-height: 1; }
.counter .cap { display: block; font-size: 15px; color: var(--muted); margin-top: 6px; }
.block { margin-bottom: 72px; }
.block-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: baseline; justify-content: space-between; }
.chart-fig.wide { margin-top: 18px; }
.controls { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin: 12px 0; font-size: 15px; }
.controls label { display: inline-flex; gap: 8px; align-items: center; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 2px; }
.seg button { background: transparent; border: 0; border-radius: 999px; padding: 4px 12px; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--floor); }
.checks { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; }
.checks i { width: 12px; height: 12px; border-radius: 2px; background: var(--c); display: inline-block; }
.sub { font-size: 15px; margin-top: 26px; }
.tracks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.chain { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.chain li { position: relative; }
.chain li + li::before { content: "→"; position: absolute; left: -22px; top: 60px; color: var(--muted); font-size: 18px; }
.chain-text { margin-top: 16px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 28px; }

.cl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.confusion { display: grid; grid-template-columns: auto 1fr 1fr; gap: 4px; font-size: 14px; margin-top: 8px; }
.confusion .h { color: var(--muted); font-weight: 700; padding: 4px 8px; align-self: end; }
.confusion .rh { color: var(--muted); font-weight: 700; padding: 8px; align-self: center; text-align: right; }
.confusion .c { border-radius: 6px; padding: 12px; min-height: 82px; background: var(--floor); position: relative; overflow: hidden; }
.confusion .c b { display: block; font-family: var(--display); font-size: 26px; font-weight: 800; position: relative; }
.confusion .c span { position: relative; }
.confusion .c .fill { position: absolute; inset: auto 0 0 0; background: var(--cc); opacity: .28; }
.rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.rates div { border-top: 3px solid var(--ink); padding-top: 6px; }
.rates b { display: block; font-family: var(--display); font-weight: 800; font-size: 32px; }
.rates span { font-size: 14px; color: var(--muted); }

.fails { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.failcase { border-top: 6px solid var(--fail); padding-top: 12px; }
.failcase p, .failcase li { font-size: 16px; }
.failcase ul { padding-left: 18px; margin: 0; }
.failcase .big-fail { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; color: var(--fail); margin-bottom: 10px; }
.score td.wrap { max-width: 420px; }
.pilot { padding-left: 22px; max-width: 76ch; }
.pilot li { margin-bottom: 8px; }
.dont { margin-top: 24px; max-width: 76ch; }

.foot { border-top: 3px solid var(--ink); margin-top: 40px; padding: 36px 32px 28px; background: var(--panel); }
.foot-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; font-size: 15px; }
.foot h3 { font-size: 24px; }
.foot ul { padding-left: 18px; }
.foot-line { max-width: 1240px; margin: 20px auto 0; font-size: 14px; color: var(--muted); }
.err { background: color-mix(in srgb, var(--fail) 15%, transparent); border-left: 5px solid var(--fail); padding: 12px 16px; margin: 16px 0; }

/* draw-in for charts (only when motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
  .reveal-line { transition: stroke-dashoffset 1.4s cubic-bezier(.3, .6, .2, 1); }
  .reveal-fade { transition: opacity .9s ease .5s; }
}

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 48px 0 64px; }
  .finding, .cl-grid, .pair { grid-template-columns: 1fr; }
  .layers, .fails { grid-template-columns: 1fr; gap: 28px; }
  .counters { grid-template-columns: repeat(2, 1fr); }
  .tracks, .chain, .roles { grid-template-columns: repeat(2, 1fr); }
  .chain li + li::before { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  main { padding: 0 16px; }
  .track { padding: 8px 16px; gap: 12px; }
  .brand, .keys { display: none; }
  .stop { font-size: 12px; }
  .stop .dot { width: 17px; height: 17px; }
  .route-line { top: 7px; }
  .walk { padding: 20px 16px; border-radius: 12px; }
  .finding { padding: 20px 16px; }
  .step { padding-left: 32px; margin-left: 14px; }
  .compare, .effort, .tracks, .chain, .roles, .rates { grid-template-columns: 1fr; }
  .labels { grid-template-columns: 1fr; }
  .label { padding: 0 16px 16px; }
  .facts, .facts.tight { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .foot { padding: 28px 16px; }
  .sortline { overflow-x: auto; }
  .sortline svg { min-width: 760px; }
  .line-tools { position: static; margin-bottom: 8px; text-align: right; }
  .matrix .m, .matrix .rec { font-size: 22px; }
}

/* ---- business-demo layout (planning doc revisions) ---- */
.hero h1 { font-size: clamp(56px, 9vw, 120px); line-height: .95; }
.hero-sub { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 2.8vw, 36px); line-height: 1.15; max-width: 24ch; margin-bottom: 18px; }
.backing { border-left: 6px solid var(--tote); background: var(--panel); border-radius: 0 10px 10px 0; padding: 12px 18px; margin-top: 10px; }
.backing p { margin: 0 0 .4em; font-size: 16px; }
.backing p:last-child { margin: 0; }
.labels.three { grid-template-columns: repeat(3, 1fr); }
.mini.tall { height: 150px; }
.finding.wide-finding { display: block; padding: 32px 32px 24px; }
.finding.wide-finding > p { font-size: 20px; max-width: 60ch; }

.demo { background: var(--panel); border-radius: 20px; padding: 22px 26px 24px; scroll-margin-top: 72px; }
.demo-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 22px; margin-bottom: 16px; }
.demo-head h3 { margin: 0; }
.demo-desc { font-size: 15px; flex-basis: 100%; }
.demo-grid { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 18px; align-items: start; }
.panel { background: var(--floor); border-radius: 12px; padding: 16px 18px; }
.panel h4 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pn { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--floor); display: inline-grid; place-items: center; font-size: 16px; flex: none; }
.pr { display: block; padding: 10px 0; border-top: 1.5px dashed var(--line); }
.pr:first-child { border-top: 0; padding-top: 0; }
.pr .k { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.pr .k::before { content: ""; width: 11px; height: 11px; border-radius: 2px; background: var(--tote); }
.pr.off .k::before { background: var(--lq); }
.pr .big { display: block; font-family: var(--display); font-weight: 800; font-size: 54px; line-height: 1; margin-top: 4px; }
.pr .mid { display: block; font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1.05; margin-top: 2px; color: var(--muted); }
.pr .s { display: block; font-size: 14px; color: var(--muted); }
.reasons { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 10px; }
.reasons li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.35; }
.reasons .mark { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--floor); background: var(--pass); margin-top: 1px; }
.reasons li.no .mark { background: var(--fail); }
.reasons li.warn .mark { background: var(--tote); color: #1B2B3A; }
.reasons li.neutral .mark { background: var(--muted); }
.reasons .v { font-size: 14px; color: var(--muted); }
.explain p { font-size: 16px; margin: 0; }
.panel-intro { font-size: 15px; margin-bottom: 10px; }
.choices { display: grid; gap: 8px; }
.choices .btn { text-align: left; }
.choice-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.demo .effort { grid-template-columns: 1fr 1fr; margin: 12px 0 8px; gap: 8px; }
.demo .effort div { background: var(--panel); padding: 8px 10px; }
.demo .effort .v { font-size: 18px; }
.demo .log { background: var(--panel); max-height: 92px; overflow-y: auto; font-size: 13px; }
section#built > .roles { margin-top: 22px; }
.counter.lead .num { color: var(--tote-ink); white-space: nowrap; }
.counters { grid-template-columns: 1.35fr repeat(4, 1fr); }
.wk-pair { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 12px; }
.wk-head { font-size: 17px; margin: 0 0 6px; }
.stack { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 12px; }
.trade { font-size: 18px; max-width: 80ch; padding-left: 22px; }
.trade li { margin-bottom: 8px; }
@media (max-width: 1000px) {
  .counters { grid-template-columns: repeat(2, 1fr); }
  .labels.three { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: 1fr 1fr; }
  .demo-grid .panel:nth-child(2) { grid-row: span 2; }
}
@media (max-width: 640px) {
  .demo { padding: 16px; }
  .demo-grid { grid-template-columns: 1fr; }
  .pr .big { font-size: 44px; }
}
.label-stub .stage { color: var(--c); }

/* ---- delivery visuals ---- */
.hero-road { grid-column: 1 / -1; margin-top: 4px; }
.hero-road svg, .lane svg { display: block; width: 100%; height: auto; overflow: visible; }
.lane { max-width: 560px; margin: 0 0 14px; }
.route-van { position: absolute; left: 0; top: -18px; width: 30px; height: 16px; color: var(--ink); pointer-events: none; }
.pop { transform: scale(0); transition: transform .45s cubic-bezier(.2, 1.5, .4, 1); }
.pop.in { transform: scale(1); }
.mini.street { height: 168px; }
.tok .tape { fill: none; stroke: var(--panel); stroke-width: 1.4; opacity: .7; }
.ptl { display: block; width: 100%; height: auto; margin: 4px 0 6px; overflow: visible; }
.ptl-t { font: 10px var(--body); fill: var(--muted); }
.ptl-ax { stroke: var(--line); stroke-width: 1.5; }
.ptl-l { font: 600 11px var(--body); fill: var(--ink); }
.ptl-van { color: var(--ink); }
.ptl-road { opacity: .45; transform-box: view-box; transform-origin: 16px 0; }
@media (prefers-reduced-motion: no-preference) {
  .route-van { transition: transform .3s ease-out; }
  .ptl-van.go, .ptl-road.go { transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
  .btn, .ghost, .seg button { transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
}
.btn, .ghost, .seg button, details.tech summary, select { cursor: pointer; }
.btn:active { transform: translateY(1px); }
@media (max-width: 640px) {
  .route-van { width: 24px; height: 13px; top: -15px; }
}
.replay.in-stub { position: static; margin-left: auto; font-size: 12px; padding: 1px 10px; }
.route-van { width: 28px; height: 14px; top: -16px; }

/* ---- decorations ---- */
.part { position: relative; }
.deco { position: absolute; right: 0; top: 104px; width: 300px; pointer-events: none; }
.deco svg { width: 100%; height: auto; display: block; overflow: visible; }
.d-floor { fill: var(--line); }
.d-box rect:first-child { fill: var(--tote); }
.d-tape { stroke: #1B2B3A; stroke-opacity: .16; stroke-width: 8; }
.d-lbl { fill: #F4F7F8; }
.d-lblln, .d-bar { stroke: #1B2B3A; stroke-width: 1.8; stroke-linecap: round; }
.d-stamp { fill: none; stroke: var(--lq); stroke-width: 3; }
.d-stamp-t { fill: var(--lq); font: 800 17px var(--display); letter-spacing: .08em; }
.d-speed { stroke: var(--muted); stroke-width: 4; stroke-linecap: round; fill: none; opacity: .6; }
.d-check-m { fill: none; stroke: var(--floor); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.m-bg { fill: var(--panel); }
.m-st { fill: none; stroke: var(--line); stroke-width: 12; stroke-linecap: round; }
.m-thin { stroke-width: 6; }
.m-route { fill: none; stroke: var(--ink); stroke-width: 3; stroke-dasharray: 1 9; stroke-linecap: round; }
.m-pin-in { fill: var(--panel); }
.layer-ic { width: 42px; height: 42px; display: block; margin-bottom: 8px; color: var(--ink); fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.layer-ic .beam { stroke: var(--lq); }
.street-end { max-width: 1240px; margin: 48px auto 0; padding: 0 32px; color: var(--ink); }
.street-end svg { display: block; width: 100%; height: auto; }
.s-bld { fill: var(--line); opacity: .7; }
.s-tree { fill: var(--stale); opacity: .55; }
.s-trunk { fill: var(--muted); }
.s-road { fill: var(--line); }
.s-dash { stroke: var(--floor); stroke-width: 2; stroke-dasharray: 16 14; }
.foot { margin-top: 0; }
.trade { list-style: none; padding-left: 0; }
.trade li { position: relative; padding-left: 30px; }
.trade li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 14px; border-radius: 2px;
  background: linear-gradient(90deg, transparent 7px, rgba(27,43,58,.18) 7px 11px, transparent 11px), var(--tote); }
.d-stampg { transform-box: view-box; transform-origin: 108px 86px; transform: rotate(-9deg); }
.d-check { transform-box: view-box; transform-origin: 0 0; transform: translate(196px, 78px); }
@media (prefers-reduced-motion: no-preference) {
  .d-stampg, .d-check { transition: transform .45s cubic-bezier(.2, 1.4, .4, 1), opacity .3s ease; }
  .deco.wait .d-stampg { transform: rotate(-9deg) scale(1.6); transform-origin: 108px 86px; opacity: 0; }
  .deco.wait .d-check { transform: translate(196px, 78px) scale(0); }
}
@media (max-width: 1100px) { .deco { display: none; } }
@media (max-width: 640px) { .street-end { padding: 0 16px; } }
/* Part 2 decoration: city map, van follows the streets */
.rm-land { fill: color-mix(in srgb, var(--stale) 12%, var(--panel)); }
.rm-water { fill: color-mix(in srgb, var(--ref) 38%, var(--panel)); }
.rm-b1 { fill: color-mix(in srgb, var(--tote) 55%, var(--panel)); }
.rm-b2 { fill: color-mix(in srgb, var(--lq) 40%, var(--panel)); }
.rm-b3 { fill: color-mix(in srgb, var(--ref) 40%, var(--panel)); }
.rm-road-o { fill: none; stroke: color-mix(in srgb, var(--ink) 25%, var(--panel)); stroke-width: 15; stroke-linecap: round; }
.rm-road { fill: none; stroke: var(--panel); stroke-width: 12; stroke-linecap: round; }
.rm-lane { fill: none; stroke: var(--line); stroke-width: 1.2; stroke-dasharray: 5 6; }
.rm-route-base { fill: none; stroke: var(--tote); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 7; }
.rm-trail { fill: none; stroke: var(--tote); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.rm-start { fill: var(--ref); stroke: var(--panel); stroke-width: 3; }
.rm-start-i { fill: var(--panel); }
.rm-pin { fill: var(--lq); stroke: var(--panel); stroke-width: 2; }
.rm-pin-in { fill: var(--panel); }
.rm-shadow { fill: #000; opacity: .18; }
.rm-van { fill: var(--tote); stroke: #1B2B3A; stroke-width: 1.6; }
.rm-glass { fill: #1B2B3A; }
.rm-roof { fill: #fff; opacity: .45; }
.rm-tag { fill: var(--pass); }
.rm-tag-t { font: 700 11px var(--body); fill: var(--floor); }

/* "Try it" link to the lab page (added in phase 2) */
.tryit { text-decoration: none; font-weight: 700; white-space: nowrap; border-color: var(--tote); }

/* hero stickers */
.stickers { display: flex; gap: 18px; margin: 0 0 18px; flex-wrap: wrap; justify-content: center; }
.hero-side { min-width: 0; }
.sticker { position: relative; width: 200px; height: 200px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .35)); }
.sticker svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-a { transform: rotate(-7deg); }
.st-b { transform: rotate(6deg); }
.st-a .st-burst { fill: var(--tote); }
.st-b .st-burst { fill: var(--lq); }
.st-ring { fill: none; stroke: #1B2B3A; stroke-opacity: .35; stroke-width: 2.5; stroke-dasharray: 5 5; }
.st-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #1B2B3A; padding: 0 36px; }
.st-text b { font-family: var(--display); font-weight: 800; font-size: 54px; line-height: .95; }
.st-text span { font-weight: 800; font-size: 15px; line-height: 1.15; margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .sticker { animation: st-in .6s cubic-bezier(.2, 1.5, .4, 1) both; }
  .stickers > div:nth-child(2) .sticker { animation-delay: .15s; }
}
@keyframes st-in { from { opacity: 0; scale: .4; } to { opacity: 1; scale: 1; } }
.old-list { font-size: 19px; max-width: 72ch; padding-left: 22px; margin: 6px 0 0; }
.old-list li { margin-bottom: 8px; }
.sec-h { margin-top: 26px; }
@media (max-width: 640px) { .sticker { width: 150px; height: 150px; } .st-text b { font-size: 40px; } .st-text span { font-size: 12px; } .st-text { padding: 0 26px; } }
