/* TriageDesk: "triage desk" aesthetic, warm paper + ink, ticket stubs and rubber stamps. */

:root {
  --paper: #f3eee3;
  --paper-2: #ebe4d5;
  --card: #fbf8f1;
  --ink: #17161c;
  --ink-2: #45424d;
  --ink-3: #6f6a78;
  --rule: #d7cfbd;
  --rule-strong: #b9ae97;
  --accent: #c2410c;          /* vermilion: escalations, stamps, emphasis */
  --accent-soft: #f5dccd;
  --ok: #1f6b45;              /* replied */
  --ok-soft: #d8eadc;
  --warn: #9a5b00;            /* flags */
  --warn-soft: #f4e3c1;
  --block: #a61b1b;           /* blocked */
  --block-soft: #f4d4d0;
  --muted-soft: #e6e0d3;

  --c-hackerrank: #2c6e5a;
  --c-claude: #9c4a2c;
  --c-visa: #2f4a8a;
  --c-unknown: #6f6a78;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --radius: 6px;
  --shadow: 0 1px 0 rgba(23, 22, 28, .06), 0 10px 30px -18px rgba(23, 22, 28, .35);
  --maxw: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16151a;
    --paper-2: #1d1c22;
    --card: #222128;
    --ink: #efe9dc;
    --ink-2: #c9c2b4;
    --ink-3: #9a9384;
    --rule: #34323b;
    --rule-strong: #4a4752;
    --accent: #f0703a;
    --accent-soft: #3a2418;
    --ok: #5cc28c;
    --ok-soft: #173326;
    --warn: #e0a64a;
    --warn-soft: #3a2c12;
    --block: #f07067;
    --block-soft: #3d1a19;
    --muted-soft: #2b2a31;
    --c-hackerrank: #6cc2a6;
    --c-claude: #e59a77;
    --c-visa: #8fa8e6;
    --c-unknown: #a39d90;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 34px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  /* faint paper grain */
  background-image: radial-gradient(rgba(23, 22, 28, .035) 1px, transparent 1px);
  background-size: 3px 3px;
}
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
kbd { font: 500 .72rem var(--font-mono); padding: 1px 5px; border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--card); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px max(16px, calc((100vw - var(--maxw)) / 2));
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 650 1.15rem var(--font-display); letter-spacing: -.01em; }
.brand em { font-style: normal; color: var(--accent); }
.brand__mark { width: 28px; height: 28px; color: var(--ink); }
.topnav { display: flex; gap: 20px; margin-left: auto; font-size: .92rem; }
.topnav a { text-decoration: none; color: var(--ink-2); }
.topnav a:hover { color: var(--accent); }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 .74rem var(--font-mono); letter-spacing: .02em;
  padding: 5px 10px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--card);
  white-space: nowrap;
}
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.status-pill[data-state="online"] i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.status-pill[data-state="offline"] i { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.status-pill[data-state="checking"] i { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

main, .footer { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 20px 56px; }
.hero > :not(.hero__facts) { grid-column: 1; }
.eyebrow, .kicker { font: 500 .78rem var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 0; }
.hero h1 {
  font: 650 clamp(2.4rem, 5.4vw, 4.3rem)/1.02 var(--font-display);
  letter-spacing: -.035em; margin: 6px 0 4px; text-wrap: balance;
  font-variation-settings: "opsz" 144;
}
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 62ch; margin: 0; }
.lede strong { color: var(--ink); font-weight: 600; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.hero__facts {
  grid-column: 2; grid-row: 1 / span 4; align-self: end;
  margin: 0; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule-strong); background: var(--card); box-shadow: var(--shadow);
}
.hero__facts div { padding: 18px 18px 16px; border-right: 1px dashed var(--rule-strong); border-bottom: 1px dashed var(--rule-strong); }
.hero__facts div:nth-child(2n) { border-right: 0; }
.hero__facts div:nth-child(n+3) { border-bottom: 0; }
.hero__facts dt { font: 650 2.1rem/1 var(--font-display); letter-spacing: -.02em; }
.hero__facts dd { margin: 6px 0 0; font: 500 .78rem/1.35 var(--font-mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .95rem var(--font-body); padding: 11px 18px; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; border: 1.5px solid var(--ink); transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { color: var(--paper); background: var(--accent); border-color: var(--accent); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--stamp {
  background: var(--accent); border-color: var(--accent); color: #fff; text-transform: uppercase;
  font: 600 .85rem var(--font-mono); letter-spacing: .14em; padding: 12px 22px;
}
.btn--stamp:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--accent) 85%, black); }
.btn--stamp:active { transform: translateY(1px); }
.btn--stamp[disabled] { opacity: .65; cursor: progress; transform: none; }

/* ---------- sections ---------- */
section { padding: 56px 0; }
.section-head { max-width: 760px; margin-bottom: 28px; }
.section-head h2 { font: 650 clamp(1.8rem, 3.4vw, 2.6rem)/1.08 var(--font-display); letter-spacing: -.025em; margin: 8px 0 10px; text-wrap: balance; }
.section-head p:last-child { color: var(--ink-2); margin: 0; }
.playground, .batch, .how { border-top: 1px solid var(--rule-strong); }

/* ---------- examples ---------- */
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.example {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 500 .86rem var(--font-body); color: var(--ink); background: var(--card);
  border: 1px solid var(--rule-strong); border-radius: 999px; padding: 6px 12px 6px 8px;
  transition: border-color .15s, transform .15s;
}
.example:hover { border-color: var(--ink); transform: translateY(-1px); }
.example[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.co-dot { width: 9px; height: 9px; border-radius: 2px; background: var(--c-unknown); flex: none; }
.co-dot[data-co="HackerRank"] { background: var(--c-hackerrank); }
.co-dot[data-co="Claude"] { background: var(--c-claude); }
.co-dot[data-co="Visa"] { background: var(--c-visa); }

/* ---------- desk: ticket + verdict ---------- */
.desk { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }

.ticket {
  position: relative; background: var(--card); border: 1px solid var(--rule-strong); box-shadow: var(--shadow);
  padding: 22px 22px 20px; border-radius: var(--radius) var(--radius) 0 0;
  /* perforated bottom edge */
  margin-bottom: 10px;
}
.ticket::after {
  content: ""; position: absolute; left: -1px; right: -1px; bottom: -10px; height: 10px;
  background: radial-gradient(circle at 7px 0, transparent 5px, var(--card) 5.5px) 0 0 / 14px 10px repeat-x;
  filter: drop-shadow(0 1px 0 var(--rule-strong));
}
.ticket__head { display: flex; justify-content: space-between; font: 500 .74rem var(--font-mono); letter-spacing: .1em; color: var(--ink-3); padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px dashed var(--rule-strong); }
.ticket__head b { color: var(--ink); font-weight: 600; }
.field { display: block; border: 0; margin: 0 0 16px; padding: 0; }
.field__label, .field legend { display: flex; justify-content: space-between; font: 600 .78rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 7px; padding: 0; width: 100%; }
.field__label small { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.field input[type="text"], .field textarea {
  width: 100%; font: 400 .98rem/1.55 var(--font-body); color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 4px; padding: 10px 12px; resize: vertical;
}
.field input[type="text"]:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule-strong); border-radius: 4px; overflow: hidden; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: block; text-align: center; padding: 8px 4px; font: 500 .84rem var(--font-body); color: var(--ink-2); border-right: 1px solid var(--rule); background: var(--paper); cursor: pointer; }
.segmented label:last-child span { border-right: 0; }
.segmented input:checked + span { background: var(--ink); color: var(--paper); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.form-error { color: var(--block); font-size: .9rem; margin: -4px 0 12px; }
.ticket__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.hint { font-size: .8rem; color: var(--ink-3); }

.verdict { min-height: 420px; }
.verdict__empty {
  height: 100%; min-height: 420px; display: grid; place-content: center; justify-items: center; text-align: center; gap: 18px;
  border: 1.5px dashed var(--rule-strong); border-radius: var(--radius); padding: 32px; color: var(--ink-3);
}
.verdict__empty strong { color: var(--ink); }
.slip-art { display: grid; gap: 7px; width: 150px; }
.slip-art span { height: 9px; border-radius: 2px; background: var(--muted-soft); }
.slip-art span:nth-child(1) { width: 60%; background: var(--accent-soft); }
.slip-art span:nth-child(3) { width: 85%; }
.slip-art span:nth-child(4) { width: 45%; }

/* verdict card */
.vcard { background: var(--card); border: 1px solid var(--rule-strong); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.vcard__head { position: relative; padding: 20px 22px 18px; border-bottom: 1px dashed var(--rule-strong); min-height: 128px; }
.vcard__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-right: 150px; }
.vcard__title { font: 500 .74rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
.vcard__headline { font: 650 1.45rem/1.2 var(--font-display); letter-spacing: -.015em; margin: 4px 0 0; padding-right: 150px; }

.chip { display: inline-flex; align-items: center; gap: 6px; font: 500 .76rem var(--font-mono); padding: 3px 9px; border-radius: 4px; background: var(--muted-soft); color: var(--ink-2); }
.chip b { font-weight: 600; color: var(--ink); }

/* The stamp: the one big moment. */
.stamp {
  position: absolute; top: 22px; right: 20px;
  font: 600 1.05rem/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase;
  padding: 10px 14px; border: 3px solid currentColor; border-radius: 6px; outline: 1.5px solid currentColor; outline-offset: 3px;
  transform: rotate(-7deg); mix-blend-mode: multiply; opacity: .92;
  /* uneven ink, like a real rubber stamp */
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 55%, rgba(0, 0, 0, .7) 78%);
  mask-image: radial-gradient(circle at 30% 40%, #000 55%, rgba(0, 0, 0, .7) 78%);
  animation: stamp .42s cubic-bezier(.2, 1.6, .4, 1) both;
}
.stamp small { display: block; font-size: .56rem; letter-spacing: .12em; margin-top: 5px; text-align: center; opacity: .85; }
.stamp--replied { color: var(--ok); }
.stamp--escalated { color: var(--accent); }
.stamp--blocked { color: var(--block); }
@media (prefers-color-scheme: dark) { .stamp { mix-blend-mode: normal; } }
@keyframes stamp {
  0% { opacity: 0; transform: rotate(-16deg) scale(1.9); }
  70% { opacity: 1; transform: rotate(-6deg) scale(.96); }
  100% { opacity: .92; transform: rotate(-7deg) scale(1); }
}

.notice { margin: 0; padding: 11px 22px; font-size: .88rem; background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid var(--rule); }
.notice b { font-weight: 600; }

.reply { padding: 18px 22px 6px; }
.reply h4, .slip h4 { font: 600 .74rem var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin: 0 0 8px; }
.reply__text { white-space: pre-wrap; margin: 0 0 14px; font-size: 1rem; border-left: 3px solid var(--ink); padding: 2px 0 2px 14px; }
.reply__why { margin: 0 0 16px; font-size: .92rem; color: var(--ink-2); }
.reply__why b { color: var(--ink); font-weight: 600; }

/* routing slip (trace) */
.slip { padding: 16px 22px 8px; background: var(--paper-2); border-top: 1px dashed var(--rule-strong); }
.slip__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.slip__total { font: 500 .74rem var(--font-mono); color: var(--ink-3); }
.stages { list-style: none; margin: 6px 0 0; padding: 0; }
.stage { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; padding: 9px 0 10px; opacity: 0; animation: rise .35s ease forwards; }
.stage:not(:last-child)::before { content: ""; position: absolute; left: 8px; top: 24px; bottom: -6px; width: 1.5px; background: var(--rule-strong); }
.stage__dot { width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--ink-3); background: var(--card); position: relative; z-index: 1; }
.stage[data-outcome="pass"] .stage__dot { border-color: var(--ok); background: var(--ok-soft); }
.stage[data-outcome="flag"] .stage__dot { border-color: var(--warn); background: var(--warn-soft); }
.stage[data-outcome="block"] .stage__dot, .stage[data-outcome="error"] .stage__dot { border-color: var(--block); background: var(--block-soft); }
.stage[data-outcome="skip"] .stage__dot { border-style: dashed; }
.stage[data-outcome="skip"] .stage__summary, .stage[data-outcome="skip"] .stage__label { color: var(--ink-3); }
.stage__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stage__label { font: 600 .9rem var(--font-body); }
.stage__badge { font: 600 .64rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; background: var(--muted-soft); color: var(--ink-2); }
.stage[data-outcome="pass"] .stage__badge { background: var(--ok-soft); color: var(--ok); }
.stage[data-outcome="flag"] .stage__badge { background: var(--warn-soft); color: var(--warn); }
.stage[data-outcome="block"] .stage__badge, .stage[data-outcome="error"] .stage__badge { background: var(--block-soft); color: var(--block); }
.stage__time { margin-left: auto; font: 400 .72rem var(--font-mono); color: var(--ink-3); }
.stage__summary { margin: 2px 0 0; font-size: .9rem; color: var(--ink-2); }
.stage__extra { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.stage__extra:empty { display: none; }
.mono-tag { font: 500 .72rem var(--font-mono); padding: 2px 7px; border-radius: 3px; border: 1px solid var(--rule-strong); color: var(--ink-2); background: var(--card); }
.mono-tag--hit { border-color: var(--warn); color: var(--warn); }
.mono-tag--block { border-color: var(--block); color: var(--block); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.raw { padding: 4px 22px 18px; background: var(--paper-2); }
.raw summary { cursor: pointer; font: 500 .8rem var(--font-mono); color: var(--ink-2); }
.raw pre { margin: 10px 0 0; max-height: 320px; overflow: auto; font: 400 .76rem/1.5 var(--font-mono); background: var(--card); border: 1px solid var(--rule); padding: 12px; border-radius: 4px; }

/* loading state */
.working { background: var(--card); border: 1px solid var(--rule-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.working p { margin: 0 0 14px; font: 500 .8rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.working ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.working li { display: flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--ink-3); }
.working li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rule-strong); flex: none; }
.working li.is-active { color: var(--ink); }
.working li.is-active::before { border-color: var(--accent); border-top-color: transparent; animation: spin .7s linear infinite; }
.working li.is-done { color: var(--ink-2); }
.working li.is-done::before { background: var(--ink-3); border-color: var(--ink-3); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- batch ---------- */
.batch__summary { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 22px; }
.tile { background: var(--card); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 16px 18px; }
.tile h3 { font: 600 .74rem var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin: 0 0 10px; }
.split { display: flex; height: 14px; border-radius: 3px; overflow: hidden; margin: 6px 0 10px; background: var(--muted-soft); }
.split i { display: block; height: 100%; }
.split .is-replied { background: var(--ok); }
.split .is-escalated { background: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; color: var(--ink-2); }
.legend b { font: 650 1.6rem/1 var(--font-display); color: var(--ink); margin-right: 4px; }
.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 26px; align-items: center; gap: 10px; font-size: .84rem; color: var(--ink-2); }
.bar span:first-child { font-family: var(--font-mono); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar__track { height: 8px; background: var(--muted-soft); border-radius: 2px; overflow: hidden; }
.bar__track i { display: block; height: 100%; background: var(--ink-2); }
.bar b { font: 600 .8rem var(--font-mono); text-align: right; color: var(--ink); }

.batch__filters { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: 500 .8rem var(--font-mono); padding: 5px 11px; border-radius: 999px; border: 1px solid var(--rule-strong); background: transparent; color: var(--ink-2); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.ledger { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.entry { border-bottom: 1px solid var(--rule-strong); }
.entry summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 42px 104px minmax(0, 1fr) 100px 120px; gap: 14px; align-items: center;
  padding: 12px 6px; font-size: .94rem;
}
.entry summary::-webkit-details-marker { display: none; }
.entry summary:hover { background: var(--paper-2); }
.entry__no { font: 500 .76rem var(--font-mono); color: var(--ink-3); }
.entry__co { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; color: var(--ink-2); }
.entry__subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry__subject small { color: var(--ink-3); margin-left: 8px; font-size: .8rem; }
.entry__type { font: 500 .74rem var(--font-mono); color: var(--ink-3); }
.mini-stamp { justify-self: end; font: 600 .66rem var(--font-mono); letter-spacing: .12em; text-transform: uppercase; padding: 3px 7px; border: 1.5px solid currentColor; border-radius: 3px; transform: rotate(-3deg); }
.mini-stamp--replied { color: var(--ok); }
.mini-stamp--escalated { color: var(--accent); }
.entry__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 28px; padding: 6px 6px 20px 62px; }
.entry__body h4 { font: 600 .72rem var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin: 0 0 6px; }
.entry__body p { margin: 0; white-space: pre-wrap; font-size: .92rem; color: var(--ink-2); }
.entry__body .wide { grid-column: 1 / -1; }
.entry__actions { grid-column: 1 / -1; }
.linkish { background: none; border: 0; padding: 0; font: 600 .84rem var(--font-body); color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.empty-row { padding: 18px 6px; color: var(--ink-3); }

/* ---------- how ---------- */
.pipeline { list-style: none; margin: 0 0 36px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--rule-strong); background: var(--card); box-shadow: var(--shadow); counter-reset: s; }
.pipeline li { position: relative; padding: 18px 16px 44px; border-right: 1px dashed var(--rule-strong); }
.pipeline li:last-child { border-right: 0; }
.pipeline li:not(:last-child)::after { content: "→"; position: absolute; right: -9px; top: 16px; font: 600 .9rem var(--font-mono); color: var(--accent); background: var(--card); line-height: 1; padding: 2px 0; z-index: 1; }
.pipeline b { font: 500 .74rem var(--font-mono); color: var(--accent); }
.pipeline h3 { font: 650 1.05rem/1.2 var(--font-display); margin: 6px 0 6px; }
.pipeline p { margin: 0; font-size: .86rem; color: var(--ink-2); }
.tag { position: absolute; left: 16px; bottom: 14px; font: 600 .62rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--rule-strong); padding: 2px 6px; border-radius: 3px; }
.tag--llm { color: #fff; background: var(--accent); border-color: var(--accent); }

.decisions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1.5px solid var(--ink); }
.decisions article { padding: 22px 24px 22px 0; border-bottom: 1px solid var(--rule-strong); }
.decisions article:nth-child(2n) { padding-left: 24px; border-left: 1px solid var(--rule-strong); }
.decisions h3 { font: 650 1.2rem/1.25 var(--font-display); margin: 0 0 8px; letter-spacing: -.01em; }
.decisions p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.stack { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stack li { font: 500 .8rem var(--font-mono); padding: 5px 11px; border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--card); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--rule-strong); padding-top: 26px; padding-bottom: 44px; font-size: .92rem; color: var(--ink-2); }
.footer p { margin: 0 0 8px; }
.footer__fine { font-size: .8rem; color: var(--ink-3); max-width: 80ch; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pipeline li:nth-child(3) { border-right: 0; }
  .pipeline li:nth-child(-n+3) { border-bottom: 1px dashed var(--rule-strong); }
  .pipeline li:nth-child(3)::after { display: none; }
}
@media (max-width: 900px) {
  .topnav a:not(:last-child) { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 44px; }
  .hero__facts { grid-column: 1; grid-row: auto; }
  .desk { grid-template-columns: 1fr; }
  .verdict, .verdict__empty { min-height: 0; }
  .batch__summary { grid-template-columns: 1fr; }
  .decisions { grid-template-columns: 1fr; }
  .decisions article, .decisions article:nth-child(2n) { padding: 20px 0; border-left: 0; }
}
@media (max-width: 640px) {
  .topbar { gap: 10px; }
  .topnav { display: none; }
  .status-pill { margin-left: auto; }
  .pipeline { grid-template-columns: 1fr; }
  .pipeline li { border-right: 0; border-bottom: 1px dashed var(--rule-strong); }
  .pipeline li::after { display: none; }
  .segmented { grid-template-columns: 1fr 1fr; }
  .segmented label:nth-child(2) span { border-right: 0; }
  .segmented label:nth-child(-n+2) span { border-bottom: 1px solid var(--rule); }
  .vcard__headline, .vcard__meta { padding-right: 0; }
  .vcard__head { padding-top: 84px; }
  .stamp { top: 18px; right: auto; left: 18px; }
  .entry summary { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; }
  .entry__co, .entry__type { display: none; }
  .entry__body { grid-template-columns: 1fr; padding-left: 6px; }
  .bar { grid-template-columns: 88px minmax(0, 1fr) 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
  .stage { opacity: 1; }
}
