/* Comparison Statement Creator — an audit ledger that shows its work.
 *
 * Design system: a warm "statement of record" identity. System serif for the two
 * identity moments (wordmark + verdict), system sans for UI, mono for every figure.
 * Status color is disciplined: heat-fills stay quiet; saturated color is spent only
 * on the L1 column, a true deviation, and the number that matters. Fully offline —
 * no network fonts. */

:root {
  /* ---- ink & surfaces ---- */
  --ink: #14181f;
  --ink-soft: #55606e;
  --ink-faint: #8b95a3;
  --paper: #fbfbf9;
  --paper-raised: #ffffff;
  --sunken: #f5f6f2;
  --rule: #e6e7e2;
  --rule-strong: #cdd0c9;

  /* ---- status: text (strong) + fill (quiet) ---- */
  --low: #1f7a4d;         --low-fill: rgba(31, 122, 77, .07);   --low-fill-strong: rgba(31, 122, 77, .13);
  --review: #96610f;      --review-fill: rgba(150, 97, 15, .08);
  --alert: #b23b3b;       --alert-fill: rgba(178, 59, 59, .10);
  /* Arvind SmartSpaces brand — primary orange (actions/interactive), secondary maroon (identity) */
  --trace: #f37021;       --trace-fill: rgba(243, 112, 33, .12);
  --trace-hover: #dd5f19;
  --secondary: #9f1c3e;   --secondary-fill: rgba(159, 28, 62, .10);

  /* ---- type ---- */
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px;
  --fs-16: 16px; --fs-20: 20px; --fs-28: 28px;

  /* ---- spacing ---- */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;

  /* ---- shape & elevation ---- */
  --r-sm: 6px; --r-md: 10px;
  --shadow: 0 1px 2px rgba(20, 24, 31, .05), 0 6px 20px rgba(20, 24, 31, .07);

  /* ---- layout plumbing ---- */
  --row-h: 34px;
  --col-sn: 48px;
  --col-desc: 300px;
  --col-uom: 56px;
  --col-qty: 92px;
}

* { box-sizing: border-box; }
/* the `hidden` attribute must win even over class-set display (flex/grid/table) */
[hidden] { display: none !important; }
html, body { height: 100%; }
/* App shell: a fixed-height column. Only the grid pane scrolls, so the header
 * and frozen columns freeze against one scroll container (Excel-style) and the
 * page body never scrolls. */
body {
  margin: 0;
  height: 100%;
  display: flex; flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-14);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- top bar -------------------------------------------------------------- */
.topbar {
  flex: none; z-index: 20;
  display: flex; align-items: center; gap: var(--s-6);
  padding: 10px var(--s-5);
  min-height: 56px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: var(--s-3); }
.brand-logo { height: 30px; width: auto; display: block; flex: none; }
.brand-div { width: 1px; height: 26px; background: var(--rule-strong); flex: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex: none;
  border: 1px solid color-mix(in srgb, var(--secondary) 25%, transparent); border-radius: var(--r-sm);
  background: var(--secondary-fill);
  font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--secondary);
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--secondary) 30%, transparent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-size: var(--fs-16); font-weight: 600; letter-spacing: -.01em; color: var(--secondary); }
.brand-sub {
  font-size: var(--fs-11); color: var(--ink-faint);
  letter-spacing: .07em; text-transform: uppercase;
}

/* segmented category control */
.cats {
  display: inline-flex; gap: 2px; margin-left: var(--s-2);
  padding: 3px; border: 1px solid var(--rule); border-radius: var(--r-sm);
  background: var(--sunken);
}
.cat {
  appearance: none; border: 1px solid transparent; background: none;
  font: inherit; font-size: var(--fs-13); color: var(--ink-soft); cursor: pointer;
  padding: 5px 13px; border-radius: 4px; white-space: nowrap;
  transition: background .14s, color .14s, box-shadow .14s;
}
.cat:hover { color: var(--ink); }
.cat[aria-current="true"] {
  background: var(--paper-raised); color: var(--ink); font-weight: 560;
  box-shadow: 0 1px 2px rgba(20, 24, 31, .10);
}
.cat:focus-visible { outline: 2px solid var(--trace); outline-offset: 2px; }

.toolbar { display: flex; gap: var(--s-2); margin-left: auto; }
.btn {
  font: inherit; font-size: var(--fs-13); font-weight: 560; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--r-sm); border: 1px solid var(--rule-strong);
  background: var(--paper-raised); color: var(--ink); text-decoration: none;
  transition: transform .08s, box-shadow .14s, opacity .14s;
}
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--trace); outline-offset: 2px; }
.btn-primary { background: var(--trace); color: #fff; border-color: var(--trace); }
.btn-primary:hover { background: var(--trace-hover); border-color: var(--trace-hover); }
.btn-ghost { background: none; border-color: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--sunken); color: var(--ink); box-shadow: none; }
.btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.btn .btn-ic { font-size: 14px; line-height: 1; }

/* sheet-view nav (back + package title), shown only on the sheet */
.sheetnav { display: flex; align-items: center; gap: var(--s-3); }
.sheet-title { font-family: var(--serif); font-size: var(--fs-16); font-weight: 600; letter-spacing: -.01em; }

/* ---- landing (category cards) + sheet view -------------------------------- */
.landing { flex: 1; min-height: 0; overflow: auto; padding: var(--s-6) var(--s-5) var(--s-6); }
.sheetview { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.landing-head { max-width: 980px; margin: 12px auto var(--s-6); text-align: center; }
.landing-title { font-family: var(--serif); font-size: var(--fs-28); font-weight: 600; letter-spacing: -.01em; margin: 0 0 6px; }
.landing-sub { color: var(--ink-soft); margin: 0 auto; max-width: 56ch; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); align-content: start; max-width: 980px; margin: 0 auto; padding-bottom: var(--s-6); }
.card { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5); background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--r-md); box-shadow: var(--shadow); transition: border-color .14s, box-shadow .14s; }
.card:hover { border-color: var(--rule-strong); }

.card-head { display: flex; align-items: center; gap: var(--s-3); }
.card-mono {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: var(--r-sm);
  font-family: var(--serif); font-size: var(--fs-16); font-weight: 600;
  color: var(--secondary); background: var(--secondary-fill);
  border: 1px solid color-mix(in srgb, var(--secondary) 20%, transparent);
}
.card-heading { min-width: 0; }
.card-name { font-size: var(--fs-16); font-weight: 640; letter-spacing: -.01em; margin: 0; line-height: 1.2; }
.card-meta { color: var(--ink-faint); font-size: var(--fs-12); margin: 3px 0 0; }

.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: var(--s-5) var(--s-4); border: 1.5px dashed var(--rule-strong); border-radius: var(--r-sm); background: var(--sunken); color: var(--ink-soft); cursor: pointer; transition: border-color .14s, background .14s; }
.dropzone:hover { border-color: var(--trace); background: color-mix(in srgb, var(--trace-fill) 55%, var(--sunken)); }
.dropzone.over { border-color: var(--trace); background: var(--trace-fill); }
.dz-icon { font-size: 22px; color: var(--trace); opacity: .75; }
.dz-lead { font-weight: 560; color: var(--ink); font-size: var(--fs-13); }
.dz-sub { font-size: var(--fs-12); color: var(--ink-faint); }

.filelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.filelist:empty { display: none; }
.filechip { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-12); padding: 5px 7px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--paper); }
.fc-ext { font-family: var(--mono); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--trace); background: var(--trace-fill); padding: 2px 5px; border-radius: 4px; flex: none; }
.fc-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.fc-x { border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: 12px; padding: 2px 4px; border-radius: 4px; flex: none; }
.fc-x:hover { background: var(--sunken); color: var(--alert); }

.card-note { font-size: var(--fs-13); color: var(--ink-soft); line-height: 1.5; padding: var(--s-4) var(--s-4); border: 1px dashed var(--rule-strong); border-radius: var(--r-sm); background: var(--sunken); }
.card-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-top: auto; }
.card-actions .btn-generate { width: 100%; justify-content: center; padding-block: 9px; }
.card-actions .btn-sample { align-self: center; font-size: var(--fs-12); padding: 5px 10px; }

@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; }
}

/* ---- stage / verdict ------------------------------------------------------ */
.stage {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  padding: var(--s-5); overflow: hidden;
}
.verdict {
  flex: none;
  display: grid; grid-template-columns: auto 1fr; gap: 2px var(--s-5);
  align-items: baseline;
  margin-bottom: var(--s-5); padding: var(--s-4) var(--s-5);
  background: var(--paper-raised); border: 1px solid var(--rule);
  border-left: 3px solid var(--low); border-radius: var(--r-md);
  box-shadow: var(--shadow);
}
.verdict.none { border-left-color: var(--ink-faint); }
.verdict.provisional { border-left-color: var(--review); }
.verdict.provisional .verdict-total { color: var(--review); }
.verdict-l1 {
  grid-column: 1; align-self: center;
  font-size: var(--fs-11); font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint);
}
.verdict.provisional .verdict-l1 { color: var(--review); }
.verdict-name {
  grid-column: 2; grid-row: 1;
  font-family: var(--serif); font-size: var(--fs-28); font-weight: 600; letter-spacing: -.01em;
  display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap;
}
.verdict-total { font-family: var(--mono); font-size: var(--fs-16); color: var(--low); font-weight: 600; }
.verdict-basis { grid-column: 2; color: var(--ink-soft); font-size: var(--fs-13); margin-top: 2px; }
.verdict-notes { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.vnote {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-size: var(--fs-12); color: var(--ink-soft);
  padding: 3px 9px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--rule);
}
.vnote b { font-weight: 600; color: var(--ink); }
.vnote.review { color: var(--review); background: var(--review-fill); border-color: transparent; }

/* ---- grid ----------------------------------------------------------------- */
.gridwrap { flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--paper-raised); }
.empty { padding: 72px var(--s-6); text-align: center; }
.empty-lead { font-family: var(--serif); font-size: var(--fs-20); font-weight: 600; margin: 0 0 var(--s-2); }
.empty-sub { color: var(--ink-soft); margin: 0 auto; max-width: 48ch; }

/* size to content so a 1- or 2-vendor sheet stays compact + left-aligned
 * instead of stretching a lone column across the whole width */
.grid { border-collapse: separate; border-spacing: 0; width: auto; min-width: min(100%, max-content); }
.vhead, .vcell { max-width: 240px; }
.grid th, .grid td { border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.grid thead th { position: sticky; top: 0; z-index: 6; background: var(--paper-raised); vertical-align: bottom; }

/* frozen left columns — offsets derived from width tokens, no magic numbers */
.col-sn, .col-desc, .col-uom, .col-qty { position: sticky; z-index: 5; background: var(--paper-raised); }
.col-sn   { left: 0; width: var(--col-sn); }
.col-desc { left: var(--col-sn); min-width: var(--col-desc); max-width: 420px; }
.col-uom  { left: calc(var(--col-sn) + var(--col-desc)); width: var(--col-uom); }
.col-qty  { left: calc(var(--col-sn) + var(--col-desc) + var(--col-uom)); width: var(--col-qty); box-shadow: 1px 0 0 var(--rule-strong); }
thead .col-sn, thead .col-desc, thead .col-uom, thead .col-qty { z-index: 8; }

.lefthead { text-align: left; padding: var(--s-3); font-size: var(--fs-11); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }

/* vendor header card */
.vhead { padding: var(--s-3); min-width: 172px; text-align: left; vertical-align: bottom; }
.vhead-top { display: flex; align-items: center; gap: var(--s-2); margin-bottom: 3px; }
.vrank {
  font-family: var(--mono); font-size: var(--fs-11); font-weight: 700;
  padding: 1px 7px; border-radius: 999px; letter-spacing: .02em; flex: none;
  background: var(--low-fill-strong); color: var(--low);
}
.vrank.out { background: var(--sunken); color: var(--ink-faint); }
.vrank.rev { background: var(--review-fill); color: var(--review); }
.vname { font-weight: 620; letter-spacing: -.01em; line-height: 1.2; }
.vtotal { font-family: var(--mono); font-size: var(--fs-16); font-weight: 600; margin-top: 2px; }
.vtotal.na { color: var(--ink-faint); font-weight: 400; }

/* compact risk summary — one calm line, color only where it means something */
.vrisk { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 7px; font-size: var(--fs-11); }
.rchip { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; white-space: nowrap; }
.rchip.ok  { color: var(--low); }
.rchip.rev { color: var(--review); }
.rchip.dev { color: var(--alert); }
.rchip.mis { color: var(--ink-faint); font-weight: 500; }
.rchip .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; opacity: .8; }
.rsep { color: var(--rule-strong); }
.vflag { margin-top: 6px; font-size: var(--fs-11); color: var(--alert); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* body cells */
.grid tbody td { padding: 0; height: var(--row-h); }
.cell-sn { font-family: var(--mono); font-size: var(--fs-12); color: var(--ink-faint); text-align: center; }
.cell-desc { padding: 6px var(--s-3); }
.desc-text { display: block; }
.cell-desc.clamp .desc-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cell-desc.clamp.expanded .desc-text { -webkit-line-clamp: unset; }
.cell-desc.clamp { cursor: pointer; }
.cell-desc.clamp:focus-visible { outline: 2px solid var(--trace); outline-offset: -2px; }
.cell-desc .spec { color: var(--ink-soft); padding-left: var(--s-4); font-size: var(--fs-13); }
.cell-uom { font-size: var(--fs-12); color: var(--ink-soft); text-align: center; }
.cell-qty { font-family: var(--mono); font-size: var(--fs-12); text-align: right; padding-right: var(--s-3); color: var(--ink-soft); }

.vcell { position: relative; text-align: right; }
.vcell .val { font-family: var(--mono); font-size: var(--fs-13); padding: 6px var(--s-3) 1px 6px; }
.vcell .amt { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); padding: 0 var(--s-3) 6px 6px; }
.vcell.low { background: var(--low-fill); }
.vcell.low .val { color: var(--low); font-weight: 600; }
.vcell.review { background: var(--review-fill); }
.vcell.deviation { background: var(--alert-fill); }
.vcell.deviation .val { color: var(--alert); font-weight: 600; }
.vcell.missing .val { color: var(--ink-faint); }
.vcell.spec .val { font-family: var(--sans); font-size: var(--fs-12); text-align: left; display: block; padding-left: var(--s-3);
  white-space: normal; word-break: break-word; line-height: 1.35;
  max-height: 5.4em; overflow-y: auto; }   /* long warranty/payment clauses wrap + scroll, never break the row */
.vcell.spec { text-align: left; vertical-align: top; }
/* spec-deviation badge — a separate lane from the price status (doesn't recolor the cell) */
.spec-badge { display: inline-block; margin: 0 8px 5px auto; width: fit-content; font-size: 9.5px; font-weight: 700;
  letter-spacing: .02em; color: var(--review); background: var(--review-fill); padding: 1px 6px; border-radius: 4px; cursor: help; }
.vcell.spec-dev { box-shadow: inset 2px 0 0 var(--review); }
/* area-allocated estimate — dashed outline + "est." tag so it reads as an estimate, not a bid */
.vcell.estimated { outline: 1px dashed var(--ink-faint); outline-offset: -3px; }
.vcell.estimated .val { color: var(--ink-soft); font-style: italic; }
.est-tag { display: inline-block; margin: 0 8px 5px auto; width: fit-content; font-size: 9.5px; font-weight: 700;
  letter-spacing: .03em; color: var(--ink-faint); background: #eef0ee; padding: 1px 6px; border-radius: 4px; cursor: help; }
.vcell.spec.sourced .val { display: block; }   /* keep wrapping even when the value is a sourced/clickable claim */

/* the whole L1 column reads as the answer — header card included */
.vcell.l1col { background: var(--low-fill); }
.vcell.l1col.low { background: var(--low-fill-strong); }
.vhead.l1col { background: var(--low-fill); }

/* a sourced cell is a clickable claim */
.vcell.sourced { cursor: pointer; }
.vcell.sourced .val { border-bottom: 1px dotted color-mix(in srgb, var(--trace) 55%, transparent); display: inline-block; }
.vcell.sourced:hover { box-shadow: inset 0 0 0 2px var(--trace-fill); }
.vcell.sel { box-shadow: inset 0 0 0 2px var(--trace); }
.vcell:focus-visible { outline: 2px solid var(--trace); outline-offset: -2px; }

/* total / section rows */
tr.total td { background: var(--sunken); border-top: 1.5px solid var(--rule-strong); }
tr.total .cell-desc { font-weight: 680; letter-spacing: -.01em; }
tr.total.grand td { background: color-mix(in srgb, var(--sunken) 60%, var(--paper-raised)); }
tr.total.grand .cell-desc { font-size: var(--fs-14); }
tr.total .val { font-family: var(--mono); }
tr.section td { background: var(--sunken); }
tr.section .cell-desc { font-size: var(--fs-11); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; padding-top: var(--s-3); }

/* ---- loading skeleton ----------------------------------------------------- */
.skeleton { padding: var(--s-5); }
.skrow { display: flex; gap: var(--s-3); margin-bottom: var(--s-3); }
.skcell { height: 16px; border-radius: 4px; background: linear-gradient(90deg, var(--sunken) 25%, #eeefe9 37%, var(--sunken) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
.skcell.w-sn { width: var(--col-sn); } .skcell.w-desc { width: 40%; } .skcell.w-v { flex: 1; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---- evidence panel ------------------------------------------------------- */
.scrim { position: fixed; inset: 0; background: rgba(20, 24, 31, .18); z-index: 30; }
.evidence {
  position: fixed; top: 0; right: 0; z-index: 31; height: 100%; width: min(380px, 92vw);
  background: var(--paper-raised); border-left: 1px solid var(--rule);
  box-shadow: -12px 0 40px rgba(20, 24, 31, .14);
  padding: var(--s-5) var(--s-5) var(--s-6); overflow-y: auto;
  animation: slidein .18s ease;
}
@keyframes slidein { from { transform: translateX(16px); opacity: .4; } to { transform: none; opacity: 1; } }
.evidence-close { position: absolute; top: 14px; right: 14px; border: none; background: none; font-size: 15px; color: var(--ink-faint); cursor: pointer; padding: 6px; border-radius: var(--r-sm); }
.evidence-close:hover { background: var(--paper); color: var(--ink); }
.evidence-close:focus-visible { outline: 2px solid var(--trace); outline-offset: 2px; }
.ev-eyebrow { font-size: var(--fs-11); letter-spacing: .1em; text-transform: uppercase; color: var(--trace); font-weight: 700; }
.ev-title { font-family: var(--serif); font-size: var(--fs-20); font-weight: 600; margin: 4px 0 2px; letter-spacing: -.01em; }
.ev-sub { color: var(--ink-soft); font-size: var(--fs-13); margin-bottom: var(--s-4); }
.ev-status { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: var(--fs-12); padding: 4px 10px; border-radius: 999px; margin-bottom: var(--s-4); }
.ev-status::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.ev-status.matched { background: var(--low-fill-strong); color: var(--low); }
.ev-status.review, .ev-status.ambiguous { background: var(--review-fill); color: var(--review); }
.ev-status.deviation, .ev-status.extra { background: var(--alert-fill); color: var(--alert); }
.ev-status.missing { background: var(--sunken); color: var(--ink-faint); }
.ev-row { display: grid; grid-template-columns: 92px 1fr; gap: 4px var(--s-3); padding: 9px 0; border-top: 1px solid var(--rule); font-size: var(--fs-13); }
.ev-row dt { color: var(--ink-faint); font-size: var(--fs-11); letter-spacing: .04em; text-transform: uppercase; padding-top: 2px; }
.ev-row dd { margin: 0; font-family: var(--mono); font-size: var(--fs-12); word-break: break-word; }
.ev-row dd.prose { font-family: var(--sans); font-size: var(--fs-13); }

/* ---- toast ---------------------------------------------------------------- */
.toast {
  position: fixed; bottom: var(--s-5); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-sm);
  font-size: var(--fs-13); box-shadow: var(--shadow); z-index: 40;
}

/* ---- responsive ----------------------------------------------------------- */
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: var(--s-3); }
  .cats { margin-left: 0; order: 3; width: 100%; overflow-x: auto; }
  .toolbar { margin-left: auto; }
  .stage { padding: var(--s-3); }
  .verdict { grid-template-columns: 1fr; }
  .verdict-l1, .verdict-name, .verdict-basis, .verdict-notes { grid-column: 1; }
  .verdict-name { grid-row: auto; font-size: var(--fs-20); }
}

@media (prefers-reduced-motion: reduce) {
  .evidence, .skcell { animation: none; }
  .btn:active { transform: none; }
  .cat { transition: none; }
}
