/* EveryRole, the signed-in app: a housekeeping inspection of web apps (DESIGN.md).
   Every page of an app is a room, every kind of user an inspector, every room carries a door tag: checked, needs
   attention, or not yet looked at. A cool linen ground, a bottle-green shell (the rail and the app header), and tag
   colors that each do one job. One family (Onest) for everything; JetBrains Mono only for code.
   Rules (tests/test_design.py): every color, spacing, radius, text size and weight is a token from tokens.css; the
   semantic tokens of this world live in tokens.css under `.app` (the class on <html> of every page that loads this
   sheet; the fonts are declared there too). Components are built by the macros at the end of templates/ui.html. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: var(--weight-regular) var(--text-md)/1.5 var(--app-sans);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--mint); color: var(--shell); }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* plain text links darken on hover; links styled as components (buttons, rows, chips) keep their own colours */
a:not([class]):hover { color: var(--shell); }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: var(--weight-semibold); letter-spacing: -0.015em; line-height: 1.25; text-wrap: balance; }
p { margin: 0; }
.num, time, td.num, .tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
:focus { outline: none; }
main:focus, main:focus-visible { outline: none; }
:focus-visible { outline: 2px solid var(--leg); outline-offset: 2px; border-radius: var(--radius-xs); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--surface); padding: var(--space-2) var(--space-3); z-index: 100; border-radius: var(--radius-sm); }
.skip:focus { top: 8px; }

/* scrollbars from the palette */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: var(--radius-lg); border: 3px solid transparent; background-clip: content-box; }
.rail ::-webkit-scrollbar-thumb { background: var(--shell-3); background-clip: content-box; }

svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
svg.i.sm { width: 14px; height: 14px; vertical-align: -2px; }
svg.i.lg { width: 20px; height: 20px; }

/* ---------- demo bar: deliberately not part of the product ---------- */

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
.rail {
  background: var(--shell); color: var(--shell-ink);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; overflow-y: auto;
  border-right: 1px solid var(--bottle-950);
}
.rail-top { display: flex; align-items: center; gap: var(--space-2-5); padding: var(--space-4) var(--space-4) var(--space-2-5); }
.brand { display: flex; align-items: center; gap: var(--space-2-25); color: var(--shell-ink); text-decoration: none; font-weight: var(--weight-semibold); font-size: var(--text-base); letter-spacing: -0.01em; }
.brand svg { width: 26px; height: 26px; }
.ws-switch {
  margin: var(--space-1) var(--space-2-5) var(--space-3); display: flex; align-items: center; gap: var(--space-2-5); width: calc(100% - 20px);
  padding: var(--space-2) var(--space-2-5); border-radius: var(--radius-md); border: 1px solid var(--shell-line);
  background: var(--white-a3); color: var(--shell-ink); cursor: pointer; text-align: left;
}
.ws-switch:hover { background: var(--white-a7); }
.ws-avatar { width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--mint); color: var(--shell); display: grid; place-items: center; font-weight: var(--weight-bold); font-size: var(--text-ui); flex: none; }
.ws-name { display: block; font-weight: var(--weight-semibold); font-size: var(--text-sm); line-height: 1.2; }
.ws-plan { display: block; font-size: var(--text-meta); color: var(--shell-ink-2); margin-top: var(--space-0-5); }
.ws-switch .i { margin-left: auto; color: var(--shell-ink-2); }
.nav { display: flex; flex-direction: column; gap: var(--space-0-5); padding: var(--space-1) var(--space-2-5); }
.nav a, .nav .nav-label {
  display: flex; align-items: center; gap: var(--space-2-5); min-height: 36px; padding: 0 var(--space-2-5);
  border-radius: var(--radius-sm); color: var(--shell-ink-2); text-decoration: none; font-weight: var(--weight-medium);
}
.nav a:hover { background: var(--white-a6); color: var(--shell-ink); }
.nav a[aria-current="page"] { background: var(--white-a10); color: var(--white); }
.nav a[aria-current="page"] .i { color: var(--leg-on-dark); }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 var(--space-1-5); border-radius: var(--radius-lg); background: var(--fail); color: var(--white); font-size: var(--text-tag); font-weight: var(--weight-semibold); display: grid; place-items: center; }
.nav .sub { margin: var(--space-0-5) 0 var(--space-1-5) var(--space-5); padding-left: var(--space-2-5); border-left: 1px solid var(--shell-line); display: flex; flex-direction: column; gap: var(--space-0-5); }
.nav .sub a { min-height: 32px; font-size: var(--text-sm); font-weight: var(--weight-book); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--none); }
.dot.pass { background: var(--leaf-400); }
.dot.broken { background: var(--coral-400); }
.dot.run { background: var(--ochre-400); }
.dot.pending { background: transparent; box-shadow: inset 0 0 0 1.5px var(--shell-ink-2); }
.rail-foot { margin-top: auto; padding: var(--space-3) var(--space-2-5) var(--space-3-5); border-top: 1px solid var(--shell-line); display: flex; flex-direction: column; gap: var(--space-2-5); }
.credits-mini { padding: var(--space-1) var(--space-2-5); color: var(--shell-ink-2); font-size: var(--text-xs); text-decoration: none; display: block; border-radius: var(--radius-sm); }
.credits-mini:hover { background: var(--white-a6); }
.credits-mini b { color: var(--shell-ink); font-weight: var(--weight-semibold); }
.meter { height: 4px; border-radius: var(--radius-3xs); background: var(--white-a12); overflow: hidden; margin-top: var(--space-1-5); }
.meter > i { display: block; height: 100%; background: var(--mint); }
.me { display: flex; align-items: center; gap: var(--space-2-5); padding: var(--space-1-5) var(--space-2-5); border-radius: var(--radius-sm); color: var(--shell-ink); text-decoration: none; }
.me:hover { background: var(--white-a6); }
.me-av { width: 28px; height: 28px; border-radius: 50%; background: var(--shell-3); display: grid; place-items: center; font-weight: var(--weight-semibold); font-size: var(--text-xs); flex: none; }
.me > span:last-child { min-width: 0; overflow: hidden; }
.me small { display: block; color: var(--shell-ink-2); font-size: var(--text-meta); line-height: 1.2; }

.topbar { display: none; }
.rail-scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: var(--space-6) var(--space-8) var(--space-16); }
.page.narrow { max-width: 880px; }

/* ---------- app header (part of the shell colour) ---------- */
.apphead { background: var(--shell); color: var(--shell-ink); border-bottom: 1px solid var(--bottle-950); }
.apphead-in { max-width: 1180px; margin: 0 auto; padding: var(--space-4-5) var(--space-8) 0; }
.apphead-row { display: flex; align-items: center; gap: var(--space-3-5); flex-wrap: wrap; }
.app-switch { display: inline-flex; align-items: center; gap: var(--space-2); background: none; border: 0; color: var(--white); font-size: var(--text-3xl); font-weight: var(--weight-semibold); letter-spacing: -0.02em; padding: 0; cursor: pointer; }
.app-switch .i { color: var(--shell-ink-2); }
.app-url { color: var(--mint); font-size: var(--text-sm); text-decoration: none; display: inline-flex; align-items: center; gap: var(--space-1-25); }
.app-url:hover { color: var(--white); text-decoration: underline; }
.apphead-actions { margin-left: auto; display: flex; gap: var(--space-2); align-items: center; }
.apphead-meta { margin-top: var(--space-1); color: var(--shell-ink-2); font-size: var(--text-ui); }
.tabs { display: flex; gap: var(--space-1); margin-top: var(--space-3-5); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; padding: var(--space-2-5) var(--space-3) var(--space-3); color: var(--shell-ink-2); text-decoration: none; font-weight: var(--weight-medium); white-space: nowrap; display: inline-flex; gap: var(--space-2); align-items: center; }
.tabs a:hover { color: var(--white); }
.tabs a[aria-current="page"] { color: var(--white); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: var(--radius-3xs) var(--radius-3xs) 0 0; background: var(--leg-on-dark); }
.tabs .badge { background: var(--shell-3); color: var(--shell-ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 36px; padding: 0 var(--space-3-5); border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-weight: var(--weight-medium); font-size: var(--text-md); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out), color 150ms;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); color: var(--ink); }
.btn:active { transform: translateY(0.5px); }
.btn.primary { background: var(--shell); border-color: var(--shell); color: var(--white); }
.btn.primary:hover { background: var(--shell-3); border-color: var(--shell-3); color: var(--white); }
.btn.on-dark { background: var(--mint); border-color: var(--mint); color: var(--shell); font-weight: var(--weight-semibold); }
.btn.on-dark:hover { background: var(--mint-2); border-color: var(--mint-2); color: var(--shell); }
.btn.ghost-dark { background: transparent; border-color: var(--shell-line); color: var(--shell-ink); }
.btn.ghost-dark:hover { background: var(--white-a8); color: var(--white); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--bottle-a6); color: var(--ink); }
.btn.danger { color: var(--fail-ink); border-color: var(--fail-line); }
.btn.danger:hover { background: var(--fail-bg); border-color: var(--fail); color: var(--fail-ink); }
.btn.danger.solid { background: var(--fail); border-color: var(--fail); color: var(--white); }
.btn.sm { min-height: 30px; padding: 0 var(--space-2-5); font-size: var(--text-ui); gap: var(--space-1-5); }
.btn.lg { min-height: 42px; padding: 0 var(--space-4-5); font-size: var(--text-base); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn .cost { font-weight: var(--weight-regular); opacity: 0.8; font-size: var(--text-xs); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; font-weight: var(--weight-medium); }
.linkbtn:hover { color: var(--shell); }
.btn-row { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }

/* ---------- door tags (the signature) ---------- */
.tag {
  --tag-ink: var(--ink-3); --tag-bg: transparent; --tag-line: var(--line-strong);
  display: inline-flex; align-items: center; gap: var(--space-1-5);
  height: 26px; padding: 0 var(--space-2-25) 0 var(--space-1-75); border-radius: var(--radius-sm);
  border: 1px solid var(--tag-line); background: var(--tag-bg); color: var(--tag-ink);
  font-size: var(--text-xs); font-weight: var(--weight-semibold); white-space: nowrap; line-height: 1;
}
/* the door-tag notch: a half-round cut in the left edge */
.tag { padding-left: var(--space-2-5); -webkit-mask: radial-gradient(circle at 0 50%, transparent 3.5px, var(--opaque) 4px); mask: radial-gradient(circle at 0 50%, transparent 3.5px, var(--opaque) 4px); }
.tag .i { width: 13px; height: 13px; stroke-width: 2.4; }
.tag.pass { --tag-ink: var(--pass); --tag-bg: var(--pass-bg); --tag-line: var(--pass-line); }
.tag.broken { --tag-ink: var(--white); --tag-bg: var(--fail); --tag-line: var(--fail); }
.tag.unsure { --tag-ink: var(--run); --tag-bg: var(--run-bg); --tag-line: var(--run-line); }
.tag.run { --tag-ink: var(--run); --tag-bg: var(--run-bg); --tag-line: var(--run-line); }
.tag.run .i { animation: spin 1.1s linear infinite; }
.tag.none { --tag-ink: var(--ink-3); --tag-bg: transparent; --tag-line: var(--line-strong); border-style: dashed; }
.tag.seen { --tag-ink: var(--ink-2); --tag-bg: var(--surface-2); --tag-line: var(--line-strong); }
.tag.deny { --tag-ink: var(--deny); --tag-bg: var(--deny-bg); --tag-line: var(--linen-250); }
.tag.notrun { --tag-ink: var(--ink-3); --tag-bg: transparent; --tag-line: var(--line-strong); border-style: dashed; }
.tag.lock { --tag-ink: var(--ink-2); --tag-bg: var(--surface-2); --tag-line: var(--line); }
.tag.plain { -webkit-mask: none; mask: none; padding-left: var(--space-2); }
.tag.on-dark { --tag-bg: var(--white-a8); --tag-line: var(--shell-line); --tag-ink: var(--shell-ink); }
.tag.on-dark.broken { --tag-bg: var(--fail); --tag-line: var(--fail); --tag-ink: var(--white); }
.tag.on-dark.pass { --tag-bg: var(--leaf-750); --tag-line: var(--leaf-500); --tag-ink: var(--leaf-25); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 var(--space-1-5); border-radius: var(--radius-lg); background: var(--deny-bg); color: var(--ink-2); font-size: var(--text-tag); font-weight: var(--weight-semibold); }
.badge.hot { background: var(--ink); color: var(--white); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.45; } }

/* ---------- generic blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.card-pad { padding: var(--space-5); }
.section { margin-top: var(--space-7); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); flex-wrap: wrap; }
.section-head h2 { font-size: var(--text-xl); }
.section-head p { color: var(--ink-3); font-size: var(--text-ui); margin-top: var(--space-0-5); }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-5); }
.page-title h1 { font-size: var(--text-5xl); }
.page-title p { color: var(--ink-3); margin-top: var(--space-1); }
.muted { color: var(--ink-3); }
.small { font-size: var(--text-ui); }
.xs { font-size: var(--text-meta); }
.row { display: flex; align-items: center; gap: var(--space-2-5); }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: var(--space-3); }
.hr { height: 1px; background: var(--line); margin: var(--space-5) 0; border: 0; }
.note {
  display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-3-5); border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: var(--text-ui);
}
.note > .i { margin-top: var(--space-0-5); flex: none; }
.note.warn { background: var(--run-bg); border-color: var(--run-line); color: var(--warn-ink); }
.note.bad { background: var(--fail-bg); border-color: var(--fail-line); color: var(--fail-ink); }
.note.good { background: var(--pass-bg); border-color: var(--pass-line); color: var(--good-ink); }
.note.lockn { background: var(--surface); border-style: dashed; }
.note strong { color: inherit; }
.note .btn-row { margin-top: var(--space-2-5); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: var(--space-1-5); }
.field + .field { margin-top: var(--space-3-5); }
.field label, .label { font-weight: var(--weight-medium); font-size: var(--text-ui); color: var(--ink); }
.field .hint { font-size: var(--text-meta); color: var(--ink-3); }
.input, .select, textarea.input {
  width: 100%; min-height: 38px; padding: var(--space-2) var(--space-2-75); border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  transition: border-color 150ms, box-shadow 150ms;
}
.input::placeholder { color: var(--placeholder); }
.input:hover { border-color: var(--ink-3); }
.input:focus { border-color: var(--leg); box-shadow: 0 0 0 3px var(--leg-bg); outline: none; }
.input[aria-invalid="true"] { border-color: var(--fail); box-shadow: 0 0 0 3px var(--fail-bg); }
.input.lg { min-height: 46px; font-size: var(--text-base); }
.input.mono { font-family: var(--mono); font-size: var(--text-ui); }
.err { color: var(--fail-ink); font-size: var(--text-ui); display: flex; gap: var(--space-1-5); align-items: center; }
.ok { color: var(--pass); font-size: var(--text-ui); display: flex; gap: var(--space-1-5); align-items: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3-5); }
.form-grid .field + .field { margin-top: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: var(--space-2-5); cursor: pointer; font-weight: var(--weight-medium); }
.switch input { position: absolute; opacity: 0; width: 36px; height: 20px; margin: 0; cursor: pointer; }
.switch .track { width: 36px; height: 20px; border-radius: var(--radius-lg); background: var(--line-strong); position: relative; transition: background 150ms; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px var(--black-a20); transition: transform 180ms var(--ease-out); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--leg); outline-offset: 2px; }
.switch input:disabled + .track { opacity: 0.5; }
.check { display: inline-flex; gap: var(--space-2-5); align-items: flex-start; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: var(--space-0-5) 0 0; accent-color: var(--shell); flex: none; }
.combo { position: relative; }
.combo-list { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; max-height: 240px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); padding: var(--space-1); }
.combo-list button { display: flex; width: 100%; text-align: left; padding: var(--space-1-75) var(--space-2-5); border: 0; background: none; border-radius: var(--radius-xs); cursor: pointer; justify-content: space-between; gap: var(--space-2-5); }
.combo-list button:hover, .combo-list button[aria-selected="true"] { background: var(--leg-bg); }
.combo-list .muted { font-size: var(--text-meta); }

/* ---------- tables (split-flap discipline: fixed columns, state restyles the row) ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.table th { text-align: left; font-weight: var(--weight-medium); font-size: var(--text-xs); color: var(--ink-3); padding: var(--space-2-5) var(--space-3-5); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: var(--space-2-75) var(--space-3-5); border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover td { background: var(--row-hover); }
.table tbody tr.is-broken td { background: var(--fail-row); }
.table tbody tr.is-broken:hover td { background: var(--fail-row-hover); }
.table tbody tr.is-selected td { background: var(--leg-bg); }
.table .t-main { font-weight: var(--weight-medium); color: var(--ink); text-decoration: none; }
.table a.t-main:hover { text-decoration: underline; }
.table .t-sub { color: var(--ink-3); font-size: var(--text-xs); margin-top: var(--space-0-5); }
.table td.r, .table th.r { text-align: right; }
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); }

.chips { display: flex; gap: var(--space-1-5); flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: var(--space-1-5); height: 30px; padding: 0 var(--space-2-75); border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: var(--text-ui); font-weight: var(--weight-medium); }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--leg); background: var(--leg-bg); color: var(--leg); }
.chip .n { color: var(--ink-3); font-weight: var(--weight-medium); }
.chip[aria-pressed="true"] .n { color: var(--leg); }
.toolbar { display: flex; gap: var(--space-2-5); align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: var(--space-3); }
.search { position: relative; }
.search .i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search .input { padding-left: var(--space-8); width: 240px; min-height: 32px; }

/* ---------- setup checklist ---------- */
.checklist { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-3-5) var(--space-3) var(--space-4); margin-bottom: var(--space-4-5); }
.checklist-title { font-weight: var(--weight-semibold); white-space: nowrap; }
.checklist-title small { display: block; color: var(--ink-3); font-weight: var(--weight-regular); font-size: var(--text-xs); }
.cl-steps { display: flex; gap: var(--space-1-5); flex: 1; min-width: 0; flex-wrap: wrap; }
.cl-step { display: inline-flex; align-items: center; gap: var(--space-1-75); height: 30px; padding: 0 var(--space-2-5); border-radius: var(--radius-sm); font-size: var(--text-ui); color: var(--ink-3); text-decoration: none; border: 1px solid transparent; }
.cl-step .n { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: var(--text-2xs); font-weight: var(--weight-semibold); border: 1.5px solid var(--line-strong); color: var(--ink-3); flex: none; }
.cl-step.done { color: var(--ink-2); }
.cl-step.done .n { background: var(--pass); border-color: var(--pass); color: var(--white); }
.cl-step.next { border-color: var(--leg); background: var(--leg-bg); color: var(--leg); font-weight: var(--weight-semibold); }
.cl-step.next .n { border-color: var(--leg); color: var(--leg); }
.cl-step.locked .n { border-style: dashed; }
a.cl-step:hover { color: var(--ink); background: var(--surface-2); }
a.cl-step.next:hover { color: var(--leg); background: var(--leg-hover); }

/* ---------- verdict ---------- */
.verdict { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 0; overflow: hidden; }
.verdict-body { padding: var(--space-5) var(--space-5-5); display: flex; flex-direction: column; gap: var(--space-2-5); }
.verdict-line { display: flex; gap: var(--space-3); align-items: flex-start; }
.verdict-icon { width: 34px; height: 34px; border-radius: var(--radius-md); display: grid; place-items: center; flex: none; }
.verdict-icon.broken { background: var(--fail); color: var(--white); }
.verdict-icon.pass { background: var(--pass); color: var(--white); }
.verdict-icon.idle { background: var(--deny-bg); color: var(--ink-2); }
.verdict-icon.run { background: var(--run-bg); color: var(--run); }
.verdict h2 { font-size: var(--text-3xl); font-weight: var(--weight-semibold); letter-spacing: -0.02em; }
.verdict.one { grid-template-columns: 1fr; }
.verdict-icon.stale { background: var(--run); color: var(--white); }
.verdict-icon.unsure { background: var(--run-bg); color: var(--run); }
.verdict-icon.sm { width: 30px; height: 30px; }
.verdict .sub { color: var(--ink-2); }
.verdict-shot { position: relative; display: block; border-left: 1px solid var(--line); background: var(--screen-ink); }
.verdict-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.verdict-shot:hover img { opacity: 0.92; }
.verdict-meta { display: flex; gap: var(--space-4-5); flex-wrap: wrap; color: var(--ink-3); font-size: var(--text-ui); padding-left: var(--space-11-5); }
.verdict-meta b { color: var(--ink-2); font-weight: var(--weight-medium); }

/* ---------- the coverage board ---------- */
.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-6); align-items: start; }
.board-wrap { padding: 0; overflow: clip; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3-5) var(--space-4); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.board-head h2 { font-size: var(--text-xl); }
.board-head p { color: var(--ink-3); font-size: var(--text-ui); margin-top: var(--space-0-5); }
.board { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.board th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--ink-3); padding: var(--space-2-25) var(--space-3); border-bottom: 1px solid var(--line); }
.board th.k { width: 150px; }
.board th .kname { color: var(--ink); font-weight: var(--weight-semibold); font-size: var(--text-ui); display: block; }
.board th .ksub { display: block; font-size: var(--text-meta); font-weight: var(--weight-regular); }
.board td { padding: var(--space-1-5) var(--space-3); border-bottom: 1px solid var(--line); vertical-align: middle; }
.board tr:last-child td { border-bottom: 0; }
.board tr.grp td { background: var(--surface-2); color: var(--ink-3); font-size: var(--text-meta); font-weight: var(--weight-semibold); padding: var(--space-1-75) var(--space-3); }
.board .pg { display: flex; flex-direction: column; min-width: 0; }
.board .pg b { font-weight: var(--weight-medium); font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .pg span { color: var(--ink-3); font-size: var(--text-meta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board button.tag { cursor: pointer; transition: transform 120ms var(--ease-out), box-shadow 120ms; }
.board button.tag:hover { box-shadow: 0 0 0 3px var(--bottle-a8); }
.board .tag-empty { color: var(--line-strong); font-size: var(--text-ui); padding-left: var(--space-2); }
.board tr.is-broken td { background: var(--fail-row); }
.board tr.is-current td { background: var(--leg-bg); }
.legend { display: flex; gap: var(--space-1-5); flex-wrap: wrap; }
.legend .chip { height: 28px; }
.legend .chip .tag { height: 20px; padding: 0 var(--space-1-5) 0 var(--space-1-25); font-size: var(--text-tag); }
.flip { animation: flip 420ms var(--ease-out); }
@keyframes flip { from { transform: rotateX(80deg); opacity: 0.2; } to { transform: none; opacity: 1; } }

/* ---------- side panel (cell detail) ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 70; animation: fade 160ms ease-out; }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 71;
  background: var(--surface); box-shadow: -12px 0 40px -10px var(--black-a25);
  display: flex; flex-direction: column; animation: slide 220ms var(--ease-out);
}
.panel-head { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4-5) var(--space-5); border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: var(--text-xl); }
.panel-body { padding: var(--space-4-5) var(--space-5) var(--space-7); overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0.4; } }

.shot { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); background: var(--screen-ink); position: relative; }
.shot img, .shot video { width: 100%; display: block; }
.shot-bar { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1-75) var(--space-2-5); background: var(--linen-175); border-bottom: 1px solid var(--line); font-size: var(--text-meta); color: var(--ink-2); }
.shot-bar .dots { display: flex; gap: var(--space-1-25); }
.shot-bar .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--linen-275); display: block; }
.shot-bar .addr { flex: 1; min-width: 0; background: var(--surface); border-radius: var(--radius-xs); padding: var(--space-0-75) var(--space-2-25); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: var(--text-tag); }

/* ---------- overview aside ---------- */
.aside-card + .aside-card { margin-top: var(--space-4); }
.aside-card h3 { font-size: var(--text-md); margin-bottom: var(--space-2-5); display: flex; justify-content: space-between; align-items: center; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; gap: var(--space-2-5); padding: var(--space-2) 0; border-top: 1px solid var(--line); }
.mini-list li:first-child { border-top: 0; padding-top: 0; }
.mini-list a { color: var(--ink); text-decoration: none; font-weight: var(--weight-medium); }
.mini-list a:hover { text-decoration: underline; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-1-5) var(--space-4); font-size: var(--text-sm); }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); }

/* ---------- run detail ---------- */
.run-meta { display: flex; gap: var(--space-2-5) var(--space-5-5); flex-wrap: wrap; color: var(--ink-3); font-size: var(--text-sm); margin-top: var(--space-2); }
.run-meta span { display: inline-flex; gap: var(--space-1-5); align-items: center; }
.failure { overflow: hidden; }
.failure-head { padding: var(--space-4-5) var(--space-5); border-bottom: 1px solid var(--line); display: flex; gap: var(--space-3-5); align-items: flex-start; flex-wrap: wrap; }
.failure-head h2 { font-size: var(--text-h3); }
.failure-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.failure-steps { border-right: 1px solid var(--line); padding: var(--space-4) 0; }
.failure-main { padding: var(--space-4) var(--space-5) var(--space-5); min-width: 0; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li button { display: grid; grid-template-columns: 26px 1fr auto; gap: var(--space-2-5); align-items: start; width: 100%; text-align: left; padding: var(--space-2-25) var(--space-5); background: none; border: 0; cursor: pointer; color: var(--ink-2); }
.steps li button:hover { background: var(--surface-2); }
.steps .sn { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: var(--text-tag); font-weight: var(--weight-semibold); background: var(--pass-bg); color: var(--pass); }
.steps .st { font-size: var(--text-sm); line-height: 1.4; }
.steps .st small { display: block; color: var(--ink-3); font-size: var(--text-meta); }
.steps .sms { color: var(--ink-3); font-size: var(--text-meta); }
.steps li.bad button { background: var(--fail-bg); }
.steps li.bad .sn { background: var(--fail); color: var(--white); }
.steps li.bad .st { color: var(--fail-ink); font-weight: var(--weight-medium); }
.steps li.bad.stale button { background: var(--run-bg); }
.steps li.bad.stale .sn { background: var(--run); }
.steps li.bad.stale .st { color: var(--ochre-750); }
.steps li[aria-current="step"] button { outline: 2px solid var(--leg); outline-offset: -2px; }
.evb { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: var(--space-4); }
.evb > div { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-3) var(--space-3-5); }
.evb h4 { font-size: var(--text-xs); color: var(--ink-3); font-weight: var(--weight-medium); margin-bottom: var(--space-1); }
.evb .got { border-color: var(--fail-line); background: var(--fail-bg); }
.evb .got h4 { color: var(--fail-ink); }
.quote { font-weight: var(--weight-semibold); }
.cause { margin-top: var(--space-3-5); padding: var(--space-3-5) var(--space-4); border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--line); }
.cause h3 { font-size: var(--text-base); margin-bottom: var(--space-1-5); display: flex; gap: var(--space-2); align-items: center; }
.cause p + p { margin-top: var(--space-1-5); }
.seg-tabs { display: inline-flex; padding: var(--space-0-75); gap: var(--space-0-5); border-radius: var(--radius-sm); background: var(--deny-bg); }
.seg-tabs button { border: 0; background: transparent; padding: var(--space-1) var(--space-2-5); border-radius: var(--radius-xs); cursor: pointer; font-size: var(--text-ui); font-weight: var(--weight-medium); color: var(--ink-2); display: inline-flex; gap: var(--space-1-5); align-items: center; }
.seg-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px var(--black-a8); }
.actions-bar { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-3-5) var(--space-5); border-top: 1px solid var(--line); background: var(--surface-2); }
.progress { height: 6px; border-radius: var(--radius-2xs); background: var(--deny-bg); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 100%; background: var(--run); transform-origin: left center; transform: scaleX(var(--p, 0)); transition: transform 400ms var(--ease-out); }
.progress.done > i { background: var(--pass); }

/* ---------- explorer (live view) ---------- */
.live-top { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.live-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--space-5); margin-top: var(--space-4-5); align-items: start; }
.live-shot .shot { box-shadow: 0 1px 0 var(--black-a2); }
.live-shot .shot img { aspect-ratio: 1120 / 780; object-fit: cover; object-position: top; }
.live-caption { margin-top: var(--space-2-5); display: flex; gap: var(--space-2-5); align-items: baseline; }
.live-caption b { font-weight: var(--weight-semibold); }
.phase { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3-5); }
.phase span { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-1-5) var(--space-2-5); border-radius: var(--radius-sm); font-size: var(--text-ui); color: var(--ink-3); background: var(--surface); border: 1px solid var(--line); }
.phase span.done { color: var(--pass); }
.phase span.now { color: var(--leg); border-color: var(--leg); background: var(--leg-bg); font-weight: var(--weight-semibold); }
.feed { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; }
.feed li { display: flex; gap: var(--space-2-5); align-items: center; padding: var(--space-1-75) var(--space-3-5); border-top: 1px solid var(--line); font-size: var(--text-ui); }
.feed li:first-child { border-top: 0; }
.feed li .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed li.now { background: var(--leg-bg); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--space-1-5); }
.thumbs img { border-radius: var(--radius-xs); border: 1px solid var(--line); aspect-ratio: 1120/780; object-fit: cover; object-position: top; }

/* ---------- first visit (setup) ---------- */
.setup { min-height: 100vh; display: flex; flex-direction: column; }
.setup-bar { background: var(--shell); color: var(--shell-ink); }
.setup-bar-in { max-width: 1180px; margin: 0 auto; padding: var(--space-3) var(--space-8); display: flex; align-items: center; gap: var(--space-5); }
.stepper { display: flex; gap: var(--space-0-5); list-style: none; margin: 0 0 0 auto; padding: 0; counter-reset: s; overflow-x: auto; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.stepper li { display: flex; align-items: center; gap: var(--space-1-75); padding: var(--space-1-5) var(--space-2-5); border-radius: var(--radius-sm); font-size: var(--text-ui); color: var(--shell-ink-2); white-space: nowrap; }
.stepper li .n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: var(--text-tag); font-weight: var(--weight-semibold); border: 1.5px solid var(--shell-line); }
.stepper li.done { color: var(--shell-ink); }
.stepper li.done .n { background: var(--brand); border-color: var(--brand); color: var(--white); }
.stepper li[aria-current="step"] { color: var(--white); background: var(--white-a8); font-weight: var(--weight-semibold); }
.stepper li[aria-current="step"] .n { border-color: var(--leg-on-dark); color: var(--leg-on-dark); }
.setup-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: var(--space-8) var(--space-8) var(--space-16); }
.setup-main.narrow { max-width: 720px; }
.setup-h { font-size: var(--text-5xl); letter-spacing: -0.02em; }
.setup-lead { color: var(--ink-2); font-size: var(--text-base); margin-top: var(--space-2); max-width: 64ch; }
.setup-foot { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-7); flex-wrap: wrap; }
.setup-foot .spacer { flex: 1; }
.kind-card { padding: var(--space-4-5) var(--space-5); }
.kind-card + .kind-card { margin-top: var(--space-3); }
.kind-head { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.kind-head h3 { font-size: var(--text-lg); }
.kind-av { width: 34px; height: 34px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--deny-bg); color: var(--ink-2); flex: none; }
.kind-av.in { background: var(--pass-bg); color: var(--pass); }
.found { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }
.found a, .found span { font-size: var(--text-ui); }
.signin-proof { display: grid; grid-template-columns: 200px 1fr; gap: var(--space-3-5); align-items: center; margin-top: var(--space-3-5); }
.signin-proof img { border-radius: var(--radius-sm); border: 1px solid var(--line); }
.add-kind { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; margin-top: var(--space-4); }
.sugg { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: var(--space-3); align-items: start; padding: var(--space-3-5) var(--space-4); border-top: 1px solid var(--line); }
.sugg:first-child { border-top: 0; }
.sugg.skipped .sugg-title { color: var(--ink-3); }
.sugg-title { font-weight: var(--weight-medium); }
.sugg-meta { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; margin-top: var(--space-1-5); color: var(--ink-3); font-size: var(--text-xs); }
.keep-skip { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.keep-skip button { border: 0; background: var(--surface); padding: var(--space-1-25) var(--space-3); cursor: pointer; font-size: var(--text-ui); font-weight: var(--weight-medium); color: var(--ink-2); display: inline-flex; gap: var(--space-1-5); align-items: center; }
.keep-skip button + button { border-left: 1px solid var(--line-strong); }
.keep-skip button[aria-pressed="true"].keep { background: var(--pass-bg); color: var(--pass); }
.keep-skip button[aria-pressed="true"].skip { background: var(--deny-bg); color: var(--ink); }
.choice { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: var(--space-3-5); align-items: start; padding: var(--space-4-5) var(--space-5); }
.choice + .choice { border-top: 1px solid var(--line); }
.choice-ic { width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); }
.choice h3 { font-size: var(--text-title-sm); }
.choice p { color: var(--ink-3); font-size: var(--text-sm); margin-top: var(--space-0-5); }
.code { position: relative; background: var(--code-bg); color: var(--code-ink); border-radius: var(--radius-md); padding: var(--space-3-5) var(--space-4); font-family: var(--mono); font-size: var(--text-xs); line-height: 1.6; overflow-x: auto; white-space: pre; }
.code .btn { position: absolute; top: 8px; right: 8px; }
.code-tabs { display: flex; gap: var(--space-0-5); margin-bottom: calc(-1 * var(--space-px)); }
.code-tabs button { border: 1px solid transparent; background: none; padding: var(--space-1-5) var(--space-3); border-radius: var(--radius-sm) var(--radius-sm) 0 0; cursor: pointer; font-size: var(--text-xs); color: var(--ink-3); font-weight: var(--weight-medium); }
.code-tabs button[aria-pressed="true"] { background: var(--code-bg); color: var(--code-ink); }

/* ---------- settings ---------- */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-8); align-items: start; }
.snav { position: sticky; top: 56px; display: flex; flex-direction: column; gap: var(--space-0-5); }
.snav a { display: flex; align-items: center; gap: var(--space-2-5); padding: var(--space-2) var(--space-2-5); border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-weight: var(--weight-medium); font-size: var(--text-sm); }
.snav a:hover { background: var(--bottle-a5); color: var(--ink); }
.snav a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.snav a[aria-current="page"] .i { color: var(--leg); }
.snav .sep { height: 1px; background: var(--line); margin: var(--space-2) var(--space-2-5); }
.snav .label { padding: var(--space-1) var(--space-2-5); color: var(--ink-3); font-size: var(--text-meta); font-weight: var(--weight-medium); }
.sblock { padding: 0; }
.sblock + .sblock { margin-top: var(--space-4); }
.sblock-head { padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: var(--space-3); align-items: flex-start; flex-wrap: wrap; }
.sblock-head h2 { font-size: var(--text-lg); }
.sblock-head p { color: var(--ink-3); font-size: var(--text-ui); margin-top: var(--space-0-75); max-width: 70ch; }
.sblock-body { padding: var(--space-4-5) var(--space-5); }
.sblock-foot { padding: var(--space-3) var(--space-5); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; align-items: center; gap: var(--space-3); background: var(--surface-2); border-radius: 0 0 var(--radius-md) var(--radius-md); flex-wrap: wrap; }
.saved { color: var(--pass); font-size: var(--text-ui); display: inline-flex; gap: var(--space-1-5); align-items: center; }
.lockline { display: flex; align-items: center; gap: var(--space-2-5); padding: var(--space-2-5) var(--space-3); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--ink-2); font-size: var(--text-sm); background: var(--surface-2); flex-wrap: wrap; }
.lockline .i { color: var(--ink-3); }
.lockline b { font-weight: var(--weight-semibold); }
.plan-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.plan-card { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.plan-card.current { box-shadow: inset 0 0 0 2px var(--shell); }
.plan-card h3 { font-size: var(--text-base); display: flex; justify-content: space-between; align-items: center; }
.plan-card .price { font-size: var(--text-3xl); font-weight: var(--weight-semibold); letter-spacing: -0.02em; }
.plan-card ul { margin: 0; padding: 0; list-style: none; font-size: var(--text-ui); color: var(--ink-2); }
.plan-card li { display: flex; gap: var(--space-2); align-items: flex-start; padding: var(--space-0-75) 0; }
.plan-card li .i { color: var(--pass); margin-top: var(--space-0-5); }
.bignum { font-size: var(--text-big); font-weight: var(--weight-semibold); letter-spacing: -0.02em; }
.balance { display: grid; grid-template-columns: auto 1fr; gap: var(--space-6); align-items: center; }
.bar { height: 8px; border-radius: var(--radius-xs); background: var(--deny-bg); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); }

/* ---------- toast & popover ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; background: var(--shell); color: var(--white); padding: var(--space-2-5) var(--space-4); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); display: flex; gap: var(--space-2-5); align-items: center; font-size: var(--text-sm); animation: rise 220ms var(--ease-out); max-width: calc(100vw - 32px); }
.toast .i { color: var(--mint); }
@keyframes rise { from { transform: translate(-50%, 8px); opacity: 0; } }
.pop { position: absolute; z-index: 50; right: 0; top: calc(100% + 8px); width: 320px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); padding: var(--space-4); animation: fade 140ms ease-out; }
.pop h3 { font-size: var(--text-base); }
.pop p { color: var(--ink-2); font-size: var(--text-sm); margin-top: var(--space-1-5); }
.pop .btn-row { margin-top: var(--space-3-5); }
.rel { position: relative; }
.menu { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; min-width: 240px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); padding: var(--space-1-5); }
.menu a, .menu button { display: flex; align-items: center; gap: var(--space-2-5); width: 100%; padding: var(--space-2) var(--space-2-5); border-radius: var(--radius-xs); text-decoration: none; color: var(--ink); border: 0; background: none; cursor: pointer; text-align: left; font-size: var(--text-sm); }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu .sep { height: 1px; background: var(--line); margin: var(--space-1-5) var(--space-1); }

.empty { text-align: left; padding: var(--space-9) var(--space-7); display: grid; grid-template-columns: 48px 1fr; gap: var(--space-4); align-items: start; }
.empty-ic { width: 48px; height: 48px; border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3); }
.empty h3 { font-size: var(--text-lg); }
.empty p { color: var(--ink-3); margin-top: var(--space-1); max-width: 60ch; }
.empty .btn-row { margin-top: var(--space-3-5); }

.app-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: var(--space-4); align-items: center; padding: var(--space-4) var(--space-5); }
.app-row + .app-row { border-top: 1px solid var(--line); }
.app-name { font-weight: var(--weight-semibold); font-size: var(--text-title-sm); color: var(--ink); text-decoration: none; }
.app-name:hover { text-decoration: underline; }
.covbar { display: flex; height: 8px; border-radius: var(--radius-xs); overflow: hidden; background: var(--deny-bg); gap: var(--space-0-5); }
.covbar i { display: block; height: 100%; }
.covbar .p { background: var(--pass); }
.covbar .b { background: var(--fail); }
.covbar .d { background: var(--linen-400); }

.warn-txt { color: var(--ochre-650); }
.bad-txt { color: var(--fail-ink); }
.good-txt { color: var(--pass); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .tag.run .i { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .failure-grid { grid-template-columns: minmax(0, 1fr); }
  .failure-steps { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; top: 0; left: 0; bottom: 0; height: 100vh; width: 280px; z-index: 80; transform: translateX(-100%); transition: transform 220ms var(--ease-out); }
  body.nav-open .rail { transform: none; }
  body.nav-open .rail-scrim { display: block; }
  .rail-scrim { display: none; position: fixed; inset: 0; background: var(--scrim-strong); z-index: 79; }
  .topbar { display: flex; align-items: center; gap: var(--space-2-5); padding: var(--space-2) var(--space-4); background: var(--shell); color: var(--shell-ink); border-bottom: 1px solid var(--shell-line); position: sticky; top: 0; z-index: 40; }
  .topbar .btn { min-height: 34px; }
  .topbar .brand { margin-right: auto; }
  .live-grid { grid-template-columns: minmax(0, 1fr); }
  .settings { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .snav { position: static; flex-direction: row; overflow-x: auto; gap: var(--space-1); padding-bottom: var(--space-1); scrollbar-width: none; }
  .snav::-webkit-scrollbar { display: none; }
  .snav a { white-space: nowrap; }
  .snav .sep, .snav .label { display: none; }
  .plan-cards { grid-template-columns: minmax(0, 1fr); }
  .board th { top: var(--topbar-h); }
}
@media (max-width: 720px) {
  .page, .apphead-in, .setup-main, .setup-bar-in { padding-left: var(--space-4); padding-right: var(--space-4); }
  .page { padding-top: var(--space-4); }
  .apphead-in { padding-top: var(--space-3-5); }
  .app-switch { font-size: var(--text-2xl); }
  .apphead-actions { margin-left: 0; width: 100%; }
  .apphead-actions .btn { flex: 1; }
  .page-title h1, .setup-h { font-size: var(--text-3xl); }
  .verdict { grid-template-columns: minmax(0, 1fr); }
  .verdict-shot { border-left: 0; border-top: 1px solid var(--line); max-height: 180px; }
  .checklist { flex-direction: column; align-items: stretch; gap: var(--space-2-5); }
  .cl-step:not(.next) .lbl { display: none; }
  .board th.k { width: 68px; padding: var(--space-2-25) var(--space-1-5); }
  .board th .kname { font-size: var(--text-meta); }
  .board th .ksub { display: none; }
  .board td { padding: var(--space-1-5) var(--space-2); }
  .board .tag { padding: 0 var(--space-1-5); gap: 0; }
  .board .tag .lbl { display: none; }
  .board .tag { -webkit-mask: none; mask: none; padding: 0 var(--space-1-5); }
  .table.stack-sm thead { display: none; }
  .table.stack-sm, .table.stack-sm tbody, .table.stack-sm tr, .table.stack-sm td { display: block; width: 100%; }
  .table.stack-sm tr { padding: var(--space-2-5) var(--space-3-5); border-bottom: 1px solid var(--line); }
  .table.stack-sm tr:last-child { border-bottom: 0; }
  .table.stack-sm td { padding: var(--space-0-5) 0; border: 0; }
  .table.stack-sm td.r { text-align: left; }
  .table.stack-sm td[data-l]::before { content: attr(data-l) ": "; color: var(--ink-3); font-size: var(--text-xs); }
  .evb { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .app-row { grid-template-columns: minmax(0, 1fr); gap: var(--space-2-5); }
  .search .input { width: 100%; }
  .search { flex: 1; }
  .stepper .lbl { display: none; }
  .stepper li[aria-current="step"] .lbl { display: inline; }
  .setup-bar-in { gap: var(--space-3); }
  .signin-proof { grid-template-columns: minmax(0, 1fr); }
  .choice { grid-template-columns: minmax(0, 1fr); }
  .choice-ic { display: none; }
  .empty { grid-template-columns: minmax(0, 1fr); padding: var(--space-6) var(--space-5); }
  .sugg { grid-template-columns: 20px minmax(0, 1fr); }
  .sugg .keep-skip { grid-column: 2; justify-self: start; }
  .pop { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; }
  .toolbar { align-items: stretch; }
  .balance { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .failure-head, .actions-bar { padding-left: var(--space-4); padding-right: var(--space-4); }
  .failure-head > .verdict-icon, .failure-head > .tag { display: none; }
  .failure-head .btn-row .btn.primary { width: 100%; }
  .failure-main { padding: var(--space-3-5) var(--space-4) var(--space-4); }
  .steps li button { padding: var(--space-2-25) var(--space-4); }
}
@media (max-width: 720px) {
  .cl-step { height: auto; min-height: 30px; padding: var(--space-1) var(--space-2-5); }
  .stepper li:not([aria-current]) { display: none; }
  .search { flex-basis: 100%; }
}

/* ---------- round 2 ---------- */
/* new tag states */
.tag.stale { --tag-ink: var(--ochre-750); --tag-bg: var(--run-bg); --tag-line: var(--run-line); }
.tag.notfound { --tag-ink: var(--fail-ink); --tag-bg: var(--white); --tag-line: var(--fail-line); }
.tag.deny { --tag-ink: var(--pass); --tag-bg: var(--white); --tag-line: var(--pass-line); }
.tag.ghost { --tag-ink: var(--linen-450); --tag-bg: transparent; --tag-line: transparent; font-weight: var(--weight-medium); -webkit-mask: none; mask: none; padding-left: var(--space-1); }
.tag.on-dark.stale { --tag-bg: var(--ochre-400); --tag-line: var(--ochre-400); --tag-ink: var(--ochre-950); }
.tag { align-self: center; justify-self: start; width: auto; flex: none; }
.dot.stale { background: var(--ochre-400); }
.kchip { display: inline-flex; align-items: center; gap: var(--space-1-25); height: 24px; padding: 0 var(--space-2); border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--ink-2); white-space: nowrap; }
.wchip { display: inline-flex; align-items: center; gap: var(--space-1); height: 28px; padding: 0 var(--space-1) 0 var(--space-2-5); border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: var(--text-ui); font-weight: var(--weight-medium); }
.wchip button { border: 0; background: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: var(--radius-xs); cursor: pointer; color: var(--ink-3); }
.wchip button:hover { background: var(--deny-bg); color: var(--ink); }
.table tbody tr.is-stale td { background: var(--warn-row); }
.board tr.is-stale td { background: var(--warn-row); }
.board .pg .host { color: var(--ink-3); font-weight: var(--weight-regular); font-size: var(--text-meta); margin-left: var(--space-2); }
.board th.k { width: 176px; }
.board tr.fold td { background: var(--surface-2); padding: var(--space-2-5) var(--space-3); }
.board tr.fold .grow { color: var(--ink-2); font-size: var(--text-sm); }
.covbar .broken, .covbar .notfound { background: var(--fail); }
.covbar .stale { background: var(--run); }
.covbar .covered { background: var(--pass); }

/* page heads: text left, actions right; stacked on phones */
.page-head { display: flex; align-items: flex-start; gap: var(--space-4); margin-bottom: var(--space-5); }
.page-head h1 { font-size: var(--text-5xl); letter-spacing: -0.02em; }
.page-head p { color: var(--ink-3); margin-top: var(--space-1); }
.page-head .setup-lead { color: var(--ink-2); }
.head-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; flex: none; }
.head-actions:empty { display: none; }
.backlink { display: inline-flex; align-items: center; gap: var(--space-1); }
.nowrap, .nowrap-link { white-space: nowrap; }

/* setup bar extras */
.step-mini { display: none; color: var(--shell-ink); font-size: var(--text-ui); font-weight: var(--weight-semibold); }
.step-bar { height: 3px; background: var(--white-a8); }
.step-bar > i { display: block; height: 100%; width: 100%; background: var(--leg-on-dark); transform-origin: left; transform: scaleX(var(--p, 0)); }
.signup-bar { max-width: 460px !important; padding-left: 0 !important; padding-right: 0 !important; }
.setup-foot.sticky { position: sticky; bottom: 0; background: var(--ground); padding: var(--space-3-5) 0; margin-top: var(--space-5); border-top: 1px solid var(--line); z-index: 5; }

/* tabs in Tests */
.seg-tab { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-1-5) var(--space-3); border-radius: var(--radius-xs); color: var(--ink-2); text-decoration: none; font-weight: var(--weight-medium); font-size: var(--text-sm); }
.seg-tab:hover { color: var(--ink); }
.seg-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px var(--black-a8); }
.search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: var(--weight-medium) var(--text-2xs) var(--mono); color: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius-xs); padding: var(--space-px) var(--space-1-25); background: var(--surface-2); }
.table th.cb, .table td.cb { width: 36px; padding-right: 0; }
.table td.cb input, .table th.cb input { width: 16px; height: 16px; accent-color: var(--shell); }
.bulkbar { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2-5) var(--space-3-5); margin-bottom: var(--space-2-5); border-radius: var(--radius-md); background: var(--leg-bg); border: 1px solid var(--leg-line); flex-wrap: wrap; }
.expect { display: block; font-size: var(--text-meta); color: var(--ink-3); margin-bottom: var(--space-0-75); }
.table.flat { border: 0; border-radius: 0; }
.sm-input { min-height: 32px; padding: var(--space-1) var(--space-2); width: auto; min-width: 0; max-width: 100%; }
.edit-row { margin-bottom: var(--space-2); }

/* inbox */
.inbox-row { display: flex; align-items: center; gap: var(--space-3-5); padding: var(--space-3-5) var(--space-4-5); color: inherit; text-decoration: none; }
.inbox-row + .inbox-row { border-top: 1px solid var(--line); }
.inbox-row:hover { background: var(--row-hover); }
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--fail); margin-right: var(--space-2); vertical-align: 1px; }

/* failure */
.failure.stale .failure-head { background: var(--warn-row); }
.failure.broken .failure-head { background: var(--fail-row); }
.verdict-short { margin-top: var(--space-2); color: var(--ink-2); }
.cause.test { background: var(--run-bg); border-color: var(--run-line); }
.cause.test h3 { color: var(--warn-ink); }
.cause.app { background: var(--fail-bg); border-color: var(--fail-line); }
.failure-mini { padding: var(--space-4) var(--space-4-5); margin-bottom: var(--space-4); }
.failure-mini.stale { background: var(--warn-row); border-color: var(--run-line); }
.failure-mini.broken { background: var(--fail-row); border-color: var(--fail-line); }
.evb { margin-top: 0; margin-bottom: var(--space-3-5); }
.panel-h3 { font-size: var(--text-md); margin: var(--space-4-5) 0 var(--space-2); }
.lockline.solid { border-style: solid; background: var(--surface); }
.sblock.danger { border-color: var(--fail-line); }
.aside { display: flex; flex-direction: column; gap: var(--space-4); }
.aside .aside-card + .aside-card { margin-top: 0; }

@media (max-width: 960px) {
  .board th { top: var(--topbar-h); }
}
@media (max-width: 720px) {
  .page-head { flex-direction: column; align-items: stretch; gap: var(--space-3); }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1 1 auto; }
  .stepper { display: none; }
  .step-mini { display: block; margin-left: auto; }
  .setup-bar-in .btn { flex: none; }
  .topbar .small { display: none; }
  .verdict h2 { font-size: var(--text-2xl); }
  .verdict-meta { padding-left: 0; }
  .checklist .cl-steps { display: none; }
  .checklist { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .checklist-title { flex: 1; white-space: normal; }
  .board th.k { width: 64px; }
  .board .pg .host { display: block; margin-left: 0; }
  /* compact list rows: title on line 1, facts on line 2 */
  .table.stack-sm tr { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1-5) var(--space-2-5); padding: var(--space-3) var(--space-3-5); border-bottom: 1px solid var(--line); }
  .table.stack-sm td { display: inline-flex; align-items: center; width: auto; padding: 0; border: 0; background: transparent !important; }
  .table.stack-sm td.c-main { display: block; flex-basis: 100%; }
  .table.stack-sm td.cb { order: -1; }
  .table.stack-sm td.cb + td.c-main { flex-basis: calc(100% - 46px); }
  .table.stack-sm td.r { margin-left: auto; }
  .table.stack-sm td[data-l]::before { content: none; }
  .table.stack-sm .hide-sm { display: none !important; }
  .table.stack-sm tr.is-broken { background: var(--fail-row); }
  .table.stack-sm tr.is-stale { background: var(--warn-row); }
  .table.stack-sm .t-sub { margin-top: 0; }
  .failure-head .run-meta { gap: var(--space-1-5) var(--space-3); }
  .inbox-row { align-items: flex-start; flex-wrap: wrap; }
  .inbox-row .nowrap { flex-basis: 100%; padding-left: var(--space-11); }
  .bulkbar .btn { flex: 1; }
}
@media (max-width: 720px) {
  .verdict-meta { gap: var(--space-0-5) var(--space-3-5); }
  .seg-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg-tab { white-space: nowrap; }
  .setup-bar .brand span { display: none; }
  .step-mini { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}

/* ---------- round 3 ---------- */
/* "needs updating" gets its own olive hue; running is the blue active colour; amber is only for warnings */
.tag.stale { --tag-ink: var(--upd); --tag-bg: var(--upd-bg); --tag-line: var(--upd-line); }
.tag.run { --tag-ink: var(--leg); --tag-bg: var(--leg-bg); --tag-line: var(--leg-line-2); }
.progress > i { background: var(--leg); }
.verdict-icon.run { background: var(--leg-bg); color: var(--leg); }
.verdict-icon.stale { background: var(--upd-bg); color: var(--upd); box-shadow: inset 0 0 0 1.5px var(--upd-line); }
.steps li.bad.stale button { background: var(--upd-bg); }
.steps li.bad.stale .sn { background: var(--upd); }
.steps li.bad.stale .st { color: var(--upd); }
.table tbody tr.is-stale td, .board tr.is-stale td { background: var(--upd-row); }
.covbar .stale { background: var(--upd-solid); }
.dot.stale { background: var(--olive-300); }
.failure.stale .failure-head { background: var(--upd-row); }
.cause.test { background: var(--upd-bg); border-color: var(--upd-line); }
.cause.test h3 { color: var(--upd); }
.failure-mini.stale { background: var(--upd-row); border-color: var(--upd-line); }
.tag.on-dark.quiet { --tag-bg: transparent; --tag-line: var(--shell-line); --tag-ink: var(--shell-ink); font-weight: var(--weight-medium); }
.tag.on-dark.quiet .i { color: var(--leaf-300); }
.tag.on-dark.run { --tag-bg: var(--blue-a12); --tag-line: var(--blue-a35); --tag-ink: var(--blue-150); }

/* live board: paths get room; kinds get a fixed column */
.live-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.board.live th.k { width: 132px; }
.board.live .tag { font-size: var(--text-meta); }
.board tr.fold .fold-in { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }

/* what's left */
.todo { padding: 0; margin-bottom: var(--space-4-5); }
.todo-head { display: flex; align-items: baseline; gap: var(--space-3); padding: var(--space-3-5) var(--space-4-5) var(--space-1); }
.todo-head h2 { font-size: var(--text-xl); }
.todo-list { list-style: none; margin: 0; padding: var(--space-1) 0 var(--space-1-5); }
.todo-list li { display: flex; align-items: center; gap: var(--space-3-5); padding: var(--space-2-5) var(--space-4-5); }
.todo-list li + li { border-top: 1px solid var(--line); }
.todo-list b { display: block; font-weight: var(--weight-medium); }
.todo-list .small { display: block; }
.todo-n { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-size: var(--text-tag); font-weight: var(--weight-semibold); color: var(--ink-3); flex: none; }

/* gap actions and explore-again promises */
.gap-box { margin-top: var(--space-4-5); padding: var(--space-3-5) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); }
.will { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.will h3 { font-size: var(--text-md); display: flex; gap: var(--space-1-5); align-items: center; margin-bottom: var(--space-1-5); }
.will ul { margin: 0; padding-left: var(--space-4-5); color: var(--ink-2); font-size: var(--text-sm); }
.will li + li { margin-top: var(--space-1); }

/* page access cards (phone only) */
.access-cards { display: none; }
.acc-card { padding: var(--space-3) var(--space-3-5); }
.acc-card + .acc-card { margin-top: var(--space-2-5); }
.acc-head { display: flex; flex-direction: column; gap: var(--space-0-5); margin-bottom: var(--space-2); }
.acc-row { display: flex; align-items: center; gap: var(--space-2-5); padding: var(--space-1-5) 0; border-top: 1px solid var(--line); }
.acc-row .kchip { min-width: 92px; }

/* plans: price rows line up; Current sits in the corner */
.plan-card { position: relative; }
.plan-card h3 .tag { position: absolute; top: 12px; right: 12px; }

/* empty states carry the door-tag shape */
.empty-ic { -webkit-mask: radial-gradient(circle at 0 50%, transparent 5px, var(--opaque) 5.5px); mask: radial-gradient(circle at 0 50%, transparent 5px, var(--opaque) 5.5px); border-style: dashed; border-color: var(--line-strong); background: var(--surface); }

.rerun-row td { background: var(--surface-2); }
.table td.nowrap, .table th.nowrap { white-space: nowrap; }
.table .t-sub { white-space: nowrap; }
.table td.c-main .t-sub { white-space: normal; }

/* sub-navigation that scrolls shows that it scrolls */

@media (max-width: 720px) {
  .access-table { display: none; }
  .access-cards { display: block; }
  .lockline { flex-direction: column; align-items: flex-start; }
  .lockline > .grow { width: 100%; }
  .note .btn-row .btn { white-space: normal; text-align: left; height: auto; padding-top: var(--space-1-5); padding-bottom: var(--space-1-5); max-width: 100%; }
  .seg-tabs, .snav { -webkit-mask: linear-gradient(90deg, var(--opaque) 85%, transparent); mask: linear-gradient(90deg, var(--opaque) 85%, transparent); padding-right: var(--space-6); }
  .will { grid-template-columns: 1fr; }
  .todo-list li { flex-wrap: wrap; }
  .todo-list li .btn { margin-left: var(--space-9); }
  .board.live th.k { width: 64px; }
}
@media (max-width: 480px) {
  form[data-form="invite"] .form-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

/* ---------- round 4 ---------- */
/* the two-column live view only on wide screens */
.live-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 961px) { .live-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
/* the header's main button reads as a button */
.btn.on-dark { background: var(--white); border-color: var(--white); color: var(--shell); }
.btn.on-dark:hover { background: var(--mint-2); border-color: var(--mint-2); color: var(--shell); }
.btn.on-dark[aria-disabled="true"] { background: var(--white-a25); border-color: transparent; color: var(--shell-ink); opacity: 1; }
/* readable grey pills */
.tag.ghost { --tag-ink: var(--linen-650); }
.tag.seen { --tag-ink: var(--ink-2); --tag-bg: var(--linen-125); --tag-line: var(--linen-325); }
.tag.none { --tag-ink: var(--linen-725); --tag-line: var(--linen-375); }
/* status tags sit at the top of their row, never floating mid-form */
.choice > .tag, .kind-head > .tag { align-self: start; margin-top: var(--space-0-5); }
/* the selected failing step is outlined, with no side stripe */
.steps li.bad button, .steps li.bad.stale button { box-shadow: none; }
/* "What happened" takes the verdict's tone */
.evb.stale .got { background: var(--upd-bg); border-color: var(--upd-line); }
.evb.stale .got h4 { color: var(--upd); }
/* durations use proportional figures so "1 min 13 s" doesn't gap */
.table td.r.num, .table td.r { font-variant-numeric: proportional-nums; font-feature-settings: "tnum" 0; }
.disclose { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: var(--space-1-5); color: var(--ink-2); font-weight: var(--weight-medium); }
.disclose::-webkit-details-marker { display: none; }
details[open] > .disclose .i { transform: rotate(90deg); }
.hostchip { display: inline-flex; align-items: center; height: 22px; padding: 0 var(--space-2); margin-right: var(--space-1-5); border-radius: var(--radius-xs); font: var(--weight-medium) var(--text-meta) var(--mono); border: 1px solid var(--line-strong); background: var(--surface); }
.hostchip.bad { border-color: var(--fail-line); color: var(--fail-ink); background: var(--white); }
.hostchip.ok { border-color: var(--pass-line); color: var(--pass); background: var(--white); }
.wsteps { list-style: none; margin: var(--space-1) 0 0; padding: 0; }
.wsteps li { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) 0; font-size: var(--text-sm); color: var(--ink-3); }
.wsteps li.now { color: var(--leg); font-weight: var(--weight-medium); }
.wsteps li.now .i { animation: spin 1.1s linear infinite; }
.wsteps li.done { color: var(--pass); }
.wsteps .d { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: inline-block; }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.diff-col { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-3) var(--space-3-5); }
.diff-col h3 { font-size: var(--text-ui); display: flex; gap: var(--space-1-5); align-items: center; margin-bottom: var(--space-1-5); }
.diff-col ul { margin: 0; padding-left: var(--space-4-5); font-size: var(--text-sm); }
.diff-col.out { background: var(--surface-2); }
.diff-col.out h3 { color: var(--ink-2); }
.diff-col.in { background: var(--pass-bg); border-color: var(--pass-line); }
.diff-col.in h3 { color: var(--pass); }
.card.card-pad > .kv:first-child { margin-top: 0; }
@media (max-width: 720px) {
  .live-shot .shot img { max-height: 220px; object-position: top; }
  .thumbs { display: flex; overflow-x: auto; gap: var(--space-1-5); }
  .thumbs img { width: 84px; flex: none; }
  .thumbs img:nth-child(n+5) { display: none; }
  .board .pg b { white-space: normal; overflow-wrap: normal; }
  .board .pg span { white-space: normal; }
  .lockline { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--space-2); }
  .lockline > .btn { grid-column: 1 / -1; justify-self: start; }
  .diff { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .setup-foot .btn.lg { white-space: normal; text-align: left; min-height: 46px; height: auto; padding-top: var(--space-2); padding-bottom: var(--space-2); max-width: 100%; }
}

/* ---------- round 5 ---------- */
/* no side stripes */
.board tr.is-new td:first-child { box-shadow: none; }
.steps li.bad.stale button, .steps li.bad button { box-shadow: none; }
/* board tags wrap inside their cell instead of overflowing it */
.board td .tag { max-width: 100%; white-space: normal; height: auto; min-height: 26px; padding-top: var(--space-0-75); padding-bottom: var(--space-0-75); line-height: 1.2; }
.tag.changed { --tag-ink: var(--leg); --tag-bg: var(--leg-bg); --tag-line: var(--leg-line-2); }
.board-key { display: flex; flex-wrap: wrap; gap: var(--space-1-5) var(--space-4); padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--line); font-size: var(--text-xs); color: var(--ink-2); }
.board-key span { display: inline-flex; align-items: center; gap: var(--space-1-25); }
.gapbar { display: flex; align-items: center; gap: var(--space-2-5); flex-wrap: wrap; padding: var(--space-2-5) var(--space-4); background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: var(--text-sm); }
.flash { color: var(--pass); font-weight: var(--weight-medium); display: flex; gap: var(--space-1-5); align-items: center; margin-bottom: var(--space-1-5); }
.hint-strong { display: inline-flex; gap: var(--space-1-5); align-items: center; font-size: var(--text-sm); color: var(--ink); background: var(--leg-bg); border: 1px solid var(--leg-line); padding: var(--space-1-5) var(--space-2-5); border-radius: var(--radius-sm); }
.draft { margin: var(--space-1) 0 0; padding-left: var(--space-5); font-size: var(--text-sm); }
.draft li { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-0-5) 0; }
ol.draft { list-style: decimal; }
ol.draft li { display: list-item; }
ol.draft li .btn { vertical-align: middle; margin-left: var(--space-1-5); }
.draft.cannot { color: var(--ink-3); }
.mini-list li .tag { flex: none; }
.aside .mini-list a { white-space: nowrap; }
.feed li .grow { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* empty states: a large door tag as the mark */
.empty { grid-template-columns: auto 1fr; }
.empty-ic { width: auto; height: auto; border: 0; background: none; -webkit-mask: none; mask: none; display: block; }
.tag.big { height: 40px; padding: 0 var(--space-4) 0 var(--space-4-5); font-size: var(--text-md); gap: var(--space-2); -webkit-mask: radial-gradient(circle at 0 50%, transparent 6px, var(--opaque) 6.5px); mask: radial-gradient(circle at 0 50%, transparent 6px, var(--opaque) 6.5px); }
.tag.big .i { width: 16px; height: 16px; }
/* new test drawer: page select gets the full width */
.panel .form-grid { grid-template-columns: minmax(0, 1fr); }
.setup-bar-in.signup-bar .brand span { display: inline; }

@media (max-width: 720px) {
  /* list rows: the same geometry on every row; columns never move */
  .table.stack-sm tr { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-1-5) var(--space-2-5); }
  .table.stack-sm td { min-width: 0; }
  .table.stack-sm td.c-main { grid-column: 1 / -1; }
  .table.stack-sm td.cb { grid-column: 1; grid-row: 1; }
  .table.stack-sm td.cb + td.c-main { grid-column: 2 / -1; grid-row: 1; }
  .table.stack-sm td.r { grid-column: -2 / -1; justify-self: end; margin-left: 0; }
  .table.stack-sm td:empty { display: none; }
  /* also worth doing: text above, action below */
  .todo-head { flex-direction: column; gap: var(--space-0-5); }
  .todo-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .todo-list li .btn { grid-column: 2; justify-self: start; margin-left: 0; }
  /* setup footer: hint above, Back left, primary right */
  .setup-foot { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2-5); }
  .setup-foot > .small, .setup-foot > .hint-strong, .setup-foot > span.spacer { grid-column: 1 / -1; }
  .setup-foot > .spacer { display: none; }
  .setup-foot > .btn.primary, .setup-foot > button.btn.lg:last-child { justify-self: end; grid-column: 2; }
  /* status tags stay beside the title */
  .choice { grid-template-columns: minmax(0, 1fr) auto; }
  .choice > .tag { grid-column: 2; grid-row: 1; }
  .gapbar .btn { flex: 1 1 auto; }
}
@media (max-width: 720px) { .setup-foot > .small, .setup-foot > .hint-strong { order: -1; } }
@media (max-width: 720px) {
  .empty { grid-template-columns: minmax(0, 1fr); }
  .table.stack-sm tr { grid-template-columns: auto auto minmax(0, 1fr); }
  .table.stack-sm td.c-date { grid-column: 1 / -1; grid-row: 3; color: var(--ink-3); font-size: var(--text-xs); }
  .table.stack-sm td.c-date .t-sub { display: inline !important; margin-left: var(--space-1-5); }
  .table.stack-sm td.r { grid-column: 3; grid-row: 2; }
  .table.stack-sm td.cb + td.c-main ~ td.c-date { grid-row: 3; }
  .gapbar .grow { flex-basis: 100%; }
}
@media (max-width: 720px) {
  .table.stack-sm td.cb, .table.stack-sm th.cb { display: none !important; }
  .table.stack-sm td.cb + td.c-main { grid-column: 1 / -1; }
}
@media (max-width: 720px) { .gapbar > .i { display: none; } }

/* ---------- round 6 ---------- */
/* capture mode: settled states only */
/* "Covered by another kind": its own outlined look and double check */
.tag.shared { --tag-ink: var(--pass); --tag-bg: var(--white); --tag-line: var(--pass-line); border-style: dashed; }
/* "changed, re-run" belongs to the needs-updating family, not the active blue */
.tag.changed { --tag-ink: var(--upd); --tag-bg: var(--white); --tag-line: var(--upd-line); }
.verdict-icon.run .i { color: var(--leg); }
/* Recent runs: the label never collides with its tag */
.aside .mini-list li { flex-wrap: wrap; }
.aside .mini-list li a.grow { flex: 1 0 auto; }
.aside .mini-list li .tag { flex: 0 1 auto; min-width: 0; white-space: normal; height: auto; min-height: 26px; }
.board-key .tag { height: 22px; font-size: var(--text-tag); }
.board-key .tag .i { width: 12px; height: 12px; }
.draft.passed { list-style: none; padding-left: 0; color: var(--pass); }
.draft.passed li { display: flex; gap: var(--space-1-5); align-items: center; }
.tag.seen { --tag-ink: var(--ink-2); --tag-bg: var(--linen-160); --tag-line: var(--linen-350); }
.live-run-table { table-layout: fixed; }
@media (max-width: 720px) {
  /* replace-login and other forms inside a settings row use the full card width */
  .choice > div > form, .choice form[data-form="login"] { grid-column: 1 / -1; }
  .choice:has(form) { grid-template-columns: minmax(0, 1fr); }
  .choice:has(form) > .tag { grid-column: 1; grid-row: 1; justify-self: start; }
  .choice:has(form) > div { grid-column: 1; grid-row: 2; }
  .feed { max-height: none; }
  .empty .btn-row .btn { white-space: normal; height: auto; min-height: 36px; }
}
@media (max-width: 720px) {
  .todo-list li { grid-template-columns: minmax(0, 1fr); }
  .todo-list li .btn { grid-column: 1; }
}

/* ---------- round 7: app logos, Alerts ---------- */
.applogo { display: inline-grid; place-items: center; flex: none; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; vertical-align: middle; }
.applogo img { width: 100%; height: 100%; object-fit: contain; padding: 12%; animation: logo-in 420ms var(--ease-out); }
.applogo.letter { background: var(--surface-2); color: var(--ink-2); font-weight: var(--weight-semibold); }
.applogo.s20 { width: 20px; height: 20px; border-radius: var(--radius-xs); font-size: var(--text-2xs); }
.applogo.s36 { width: 36px; height: 36px; font-size: var(--text-lg); }
.applogo.s40 { width: 40px; height: 40px; font-size: var(--text-h3); border-radius: var(--radius-md); }
@keyframes logo-in { from { opacity: 0; transform: scale(0.9); } }
.app-switch .applogo { margin-right: var(--space-1); border-color: transparent; }
.nav .sub a .applogo { border-color: transparent; }
.setup-h.with-logo { display: flex; align-items: center; gap: var(--space-3); }
.menu a .applogo { margin-right: var(--space-0-5); }
.alert-group { padding: 0; margin-bottom: var(--space-4); }
.group-head { display: flex; align-items: center; gap: var(--space-2-5); flex-wrap: wrap; padding: var(--space-3-5) var(--space-4-5); border-bottom: 1px solid var(--line); }
.group-head h2 { font-size: var(--text-lg); }
.group-head p { flex-basis: 100%; margin-top: calc(-1 * var(--space-1)); }
.group-empty { padding: var(--space-3-5) var(--space-4-5); }
.alert-row { display: grid; grid-template-columns: 10px 150px minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4-5); }
.alert-row + .alert-row { border-top: 1px solid var(--line); }
.alert-row.unread .alert-text { font-weight: var(--weight-semibold); }
.alert-app { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-ui); color: var(--ink-2); min-width: 0; }
.alert-app span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-text { font-size: var(--text-md); }
.alert-when { display: block; font-weight: var(--weight-regular); margin-top: var(--space-0-5); }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fail); display: inline-block; }
.unread-dot.off { background: transparent; }
.ghost-row { opacity: 0.55; border: 1px dashed var(--line-strong); margin: 0 var(--space-4-5) var(--space-4); border-radius: var(--radius-md); }
@media (max-width: 720px) {
  .alert-row { grid-template-columns: 10px minmax(0, 1fr) auto; gap: var(--space-1-5) var(--space-2-5); }
  .alert-row .alert-app { grid-column: 2 / -1; }
  .alert-row .alert-text { grid-column: 2 / -1; }
  .alert-row > .tag { grid-column: 2; justify-self: start; }
  .alert-row .alert-act { grid-column: 3; }
  .applogo.s40 { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) { .applogo img { animation: none; } }
.board.live th.k { width: 156px; }
@media (max-width: 720px) { .board.live th.k { width: 64px; } }

/* "Couldn't check": text at 4.5:1 or more on its tint */
.tag.unsure { --tag-ink: var(--ochre-850); }

/* round 8 polish */
.setup-foot > .foot-hint { flex-basis: 100%; order: -1; }
.aside .mini-list li { flex-wrap: nowrap; }
.aside .mini-list li .tag { white-space: nowrap; }
.aside .mini-list .rr-date { flex: none; white-space: nowrap; }
.chans { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1-5) var(--space-4); margin-top: var(--space-1-5); color: var(--ink-3); }
.chans .chan { display: inline-flex; align-items: center; gap: var(--space-1-5); }
.unread-dot.quiet { background: var(--ink-3); }
.covkey { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3-5); margin-top: var(--space-2); }
.covkey span { display: inline-flex; align-items: center; gap: var(--space-1-5); }
.covkey i { width: 8px; height: 8px; border-radius: var(--radius-3xs); display: inline-block; }
.covkey i.broken, .covkey i.notfound { background: var(--fail); }
.covkey i.stale { background: var(--upd-solid); }
.covkey i.covered { background: var(--pass); }
.covkey i.rest { background: var(--deny-bg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tabs.more-r, .snav.more-r, .seg-tabs.more-r { -webkit-mask-image: linear-gradient(90deg, var(--opaque) calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, var(--opaque) calc(100% - 44px), transparent); }
.tabs.more-l, .snav.more-l, .seg-tabs.more-l { -webkit-mask-image: linear-gradient(90deg, transparent, var(--opaque) 44px); mask-image: linear-gradient(90deg, transparent, var(--opaque) 44px); }
.tabs.more-l.more-r, .snav.more-l.more-r, .seg-tabs.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, var(--opaque) 44px, var(--opaque) calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, transparent, var(--opaque) 44px, var(--opaque) calc(100% - 44px), transparent); }
@media (max-width: 720px) {
  .feed li .grow { display: block; -webkit-line-clamp: unset; overflow: visible; }
  .choice:has(form) > .tag { grid-column: 1; grid-row: 1; justify-self: end; }
  .choice:has(form) > div { grid-column: 1; grid-row: 1; }
  .choice:has(form) > div > h3 { min-height: 30px; padding-right: var(--space-27-5); }
}

/* final stranger round */
.tag.ready { --tag-ink: var(--ink-2); --tag-bg: var(--surface-2); --tag-line: var(--line-strong); }
.tag.thin { border-style: dashed; }
.tag.pass.thin { --tag-bg: transparent; }
.verdict-icon.ready { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-strong); }
.kind-tag { display: inline-block; margin-left: var(--space-2); padding: 0 var(--space-1-5); border-radius: var(--radius-xs); font-size: var(--text-2xs); font-weight: var(--weight-semibold); line-height: 18px; vertical-align: 1px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.kind-tag.changes { color: var(--fail); border-color: currentColor; background: transparent; }
.draft small { display: flex; align-items: center; gap: var(--space-1); margin-top: var(--space-0-5); font-size: var(--text-meta); }
.applogo img { animation: none; }
.applogo.fresh img { animation: logo-in 420ms var(--ease-out); }

.code { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }

/* last round */
.tag.pass.partial { --tag-bg: var(--white); border-style: dashed; }
.tag.shared.pre, .tag.deny.pre { --tag-ink: var(--ink-2); --tag-bg: var(--surface-2); --tag-line: var(--line-strong); }
.table td.r.num, .table td.num { white-space: nowrap; }
.failure .btn-row .rel .menu { left: auto; right: 0; }

/* test page proof */
.proof-card { overflow: hidden; }
.proof-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2-5) var(--space-4); padding-top: var(--space-4-5); padding-bottom: var(--space-3-5); }
.proof-head h2 { font-size: var(--text-lg); }
.proof-head .tag { vertical-align: middle; margin-left: var(--space-1); }
.card-pad-x { padding-left: var(--space-5); padding-right: var(--space-5); }
.proof-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); border-top: 1px solid var(--line); }
.proof-media { padding: var(--space-4) var(--space-5); }
.proof-steps { border-left: 1px solid var(--line); padding: var(--space-2) 0; }
.proof-steps li[aria-current] button { background: var(--leg-bg); color: var(--ink); }
.proof-steps li[aria-current] .sn { background: var(--leg); color: var(--white); }
.proof-steps button:disabled { cursor: default; }
.proof-foot { display: flex; flex-wrap: wrap; gap: var(--space-1-5) var(--space-4); justify-content: space-between; padding-top: var(--space-3); padding-bottom: var(--space-3-5); border-top: 1px solid var(--line); }
.proof-none { display: grid; gap: var(--space-2-5); justify-items: start; margin-top: var(--space-3); }
.proof-none p { color: var(--ink-2); max-width: 60ch; }
@media (max-width: 900px) {
  .proof-grid { grid-template-columns: minmax(0, 1fr); }
  .proof-steps { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 720px) { .proof-head > .grow { flex-basis: 100%; } }
.steps .sms { white-space: nowrap; }

/* a listed test: the whole row opens it */
.table tbody tr.click { position: relative; }
.table tbody tr.click:hover td { background: var(--surface-2); }
.row-link::after { content: ""; position: absolute; inset: 0; }
.row-link:focus-visible { outline: none; }
.row-link:focus-visible::after { outline: 2px solid var(--leg); outline-offset: -2px; border-radius: var(--radius-xs); }
.table tbody tr.click input, .table tbody tr.click button, .table tbody tr.click select, .replay-chip, .rowlink .btn, .rowlink button, .t-sub a { position: relative; z-index: 1; }
.t-cell { display: flex; align-items: flex-start; gap: var(--space-3); min-width: 0; }
.t-text { min-width: 0; }
.t-thumb { width: 64px; height: 40px; flex: none; border-radius: var(--radius-xs); border: 1px solid var(--line); object-fit: cover; object-position: top; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); }
.replay-chip { display: inline-flex; align-items: center; gap: var(--space-1); margin-top: var(--space-1); font-size: var(--text-meta); font-weight: var(--weight-semibold); color: var(--leg); text-decoration: none; padding: var(--space-px) var(--space-1-5) var(--space-px) var(--space-1); border-radius: var(--radius-xs); }
.replay-chip:hover { background: var(--leg-bg); }
.t-text .replay-chip { display: flex; width: max-content; }
td.chev, th.chev { width: 28px; padding-left: 0 !important; color: var(--ink-3); }
.chev .i { transition: transform 160ms var(--ease-out); }
tr.click:hover .chev .i, .trow:hover .chev .i, .rowlink:hover .chev .i { transform: translateX(3px); color: var(--ink); }
.trows { display: grid; gap: var(--space-2); }
.trow { display: flex; align-items: center; gap: var(--space-2-5); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-2) var(--space-2-5); background: var(--surface); }
.trow:hover { background: var(--surface-2); }
.trow-main { display: flex; align-items: center; gap: var(--space-3); flex: 1; min-width: 0; color: var(--ink); text-decoration: none; }
.trow-main .t-main { font-weight: var(--weight-medium); }
.trow .replay-chip { margin-top: 0; }
.trow .chev { color: var(--ink-3); display: inline-flex; }
.verdict-tests { display: grid; gap: var(--space-2); margin: var(--space-3-5) 0 var(--space-1); }
.sugg.rowlink { position: relative; cursor: pointer; }
.sugg.rowlink:hover { background: var(--surface-2); }
.sugg .sugg-title { color: var(--ink); text-decoration: none; font-weight: var(--weight-semibold); display: block; }
.sugg > .chev { align-self: center; color: var(--ink-3); }
.hint-once { margin-bottom: var(--space-3-5); align-items: center; }
@media (prefers-reduced-motion: reduce) { .chev .i { transition: none; } }
@media (max-width: 720px) {
  .t-thumb { width: 52px; height: 34px; }
  .trow { flex-wrap: wrap; }
  td.chev { display: none; }
}
@media (max-width: 720px) { .table.stack-sm tr.click td.chev { display: block; position: absolute; right: 12px; top: 14px; padding: 0 !important; width: auto; } .table.stack-sm tr.click td.c-main { padding-right: var(--space-7); } }
.steps .st { min-width: 0; overflow-wrap: normal; }

/* text layout */
.host-chip { display: inline-block; font-size: var(--text-2xs); color: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 0 var(--space-1-25); line-height: 16px; margin-left: var(--space-1); white-space: nowrap; vertical-align: 1px; }
.url-link { display: inline; overflow-wrap: normal; }
.nobr { white-space: nowrap; }
.ticks { list-style: none; margin: var(--space-1) 0 0; padding: 0; display: grid; gap: var(--space-0-75); }
.ticks li { display: flex; gap: var(--space-1-5); align-items: baseline; }
.ticks li .i { flex: none; color: var(--pass); position: relative; top: 2px; }
.steps .ticks li .i { color: inherit; }
.proof-sub { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2-5); margin-top: var(--space-0-5); }
@media (min-width: 901px) { .proof-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
.table td .t-sub, td .t-sub { white-space: normal; }
@media (max-width: 720px) { .trow-main { flex: 1 1 100%; } }

/* replay modal */
html.modal-open { overflow: hidden; }
.modal { position: fixed; z-index: 80; inset: 32px max(24px, calc((100vw - 1240px) / 2)); background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-pop); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; transition: transform 200ms var(--ease-out); }
.modal-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--shell); color: var(--white); }
.modal-bar .grab { display: none; }
.modal-title { min-width: 0; }
.modal-title h2 { font-size: var(--text-lg); color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-title p { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1-5) var(--space-2-5); margin-top: var(--space-1); font-size: var(--text-xs); color: var(--shell-ink-2); }
.modal-title .kchip { background: var(--white-a10); color: var(--white); border-color: transparent; }
.modal-nav { display: flex; align-items: center; gap: var(--space-2); }
.modal-pos { color: var(--shell-ink-2); }
.modal-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); min-height: 0; }
.modal-media { padding: var(--space-4); overflow: auto; display: grid; gap: var(--space-2-5); align-content: start; }
.modal-media .seg-tabs { justify-self: start; }
.modal-media video { max-height: calc(100vh - 230px); background: var(--screen-ink); }
.modal-steps { border-left: 1px solid var(--line); overflow: auto; padding: var(--space-2) 0; }
.modal-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-2-5) var(--space-4); border-top: 1px solid var(--line); }
.modal-foot .muted { margin-left: auto; }
.proof-shot { position: relative; }
.play-over { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2-5) var(--space-4) var(--space-2-5) var(--space-3); border-radius: var(--radius-full); background: var(--play-bg); color: var(--white); font-weight: var(--weight-semibold); font-size: var(--text-md); text-decoration: none; box-shadow: 0 6px 20px var(--black-a25); }
.play-over:hover { background: var(--shell); }
.verdict-shot { position: relative; }
.step-link, .step-static { display: grid; grid-template-columns: 26px 1fr auto; gap: var(--space-2-5); align-items: start; padding: var(--space-2-25) var(--space-5); color: var(--ink-2); text-decoration: none; }
.step-link:hover { background: var(--surface-2); }
.steps li.bad .step-link, .steps li.bad .step-static { background: var(--fail-bg); }
@media (max-width: 720px) {
  .modal { inset: 0; border-radius: 0; grid-template-rows: auto minmax(0, 1fr) auto; padding-bottom: env(safe-area-inset-bottom); }
  .modal-bar { grid-template-columns: auto minmax(0, 1fr); padding-top: calc(var(--space-3-5) + env(safe-area-inset-top)); position: relative; }
  .modal-bar .grab { display: block; position: absolute; top: 5px; left: 50%; width: 36px; height: 4px; margin-left: calc(-1 * var(--space-4-5)); border-radius: var(--radius-3xs); background: var(--white-a35); }
  .modal-nav { grid-column: 1 / -1; justify-content: space-between; }
  .modal-body { grid-template-columns: minmax(0, 1fr); overflow: auto; }
  .modal-media { overflow: visible; padding: var(--space-3); }
  .modal-media video { max-height: 50vh; }
  .modal-steps { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
}
@media (prefers-reduced-motion: reduce) { .modal { transition: none; } }

/* ---------- breadcrumbs (desktop) and the phone app ---------- */
.backlink { display: none !important; }
.crumbs { margin: 0 0 var(--space-3-5); font-size: var(--text-ui); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-0-5) 0; margin: 0; padding: 0; }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: "/"; color: var(--ink-3); margin: 0 var(--space-2); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: var(--weight-medium); max-width: 48ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar, .tabbar { display: none; }
.mlist { padding: var(--space-1-5) 0; margin-bottom: var(--space-4); }
.mlist-h { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-ui); font-weight: var(--weight-semibold); color: var(--ink-3); padding: var(--space-2-5) var(--space-5) var(--space-1-5); }
.mrow { display: flex; align-items: center; gap: var(--space-3-5); min-height: 52px; padding: var(--space-2) var(--space-5); color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.mrow:first-of-type { border-top: 0; }
.mrow:hover, .mrow:active { background: var(--surface-2); }
.mrow-ic { width: 32px; height: 32px; border-radius: var(--radius-md); background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.mrow-l { display: block; font-weight: var(--weight-medium); }
.mrow-s { display: block; font-size: var(--text-xs); color: var(--ink-3); }
.mrow > .i { color: var(--ink-3); }
@media (max-width: 720px) {
  .rail, .rail-scrim, .topbar, .apphead, .crumbs { display: none !important; }
  .shell { display: block; min-height: 100vh; }
  .pbar { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; position: sticky; top: 0; z-index: 45; min-height: 52px; padding: env(safe-area-inset-top) var(--space-1) 0; background: var(--shell); color: var(--white); border-bottom: 1px solid var(--shell-line); }
  .pbar-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--white); border-radius: var(--radius-lg); cursor: pointer; text-decoration: none; }
  .pbar-btn:active { background: var(--white-a12); }
  .pbar-title { min-width: 0; text-align: center; font-weight: var(--weight-semibold); font-size: var(--text-lg); }
  .pbar-t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pbar-app { display: inline-flex; align-items: center; gap: var(--space-2); max-width: 100%; }
  .pbar-app .applogo { border-color: transparent; }
  .pbar .rel .pop { right: 4px; left: auto; top: calc(100% + 4px); width: min(340px, calc(100vw - 16px)); position: absolute; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 46; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px var(--ink-a6); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-0-5); min-height: 56px; font-size: var(--text-2xs); font-weight: var(--weight-medium); color: var(--ink-3); text-decoration: none; }
  .tabbar a[aria-current] { color: var(--leg); }
  .tabbar a[aria-current] .tb-ic { background: var(--leg-bg); }
  .tabbar a:active { background: var(--surface-2); }
  .tb-ic { position: relative; display: grid; place-items: center; width: 52px; height: 28px; border-radius: var(--radius-2xl); }
  .tb-badge { position: absolute; top: -2px; right: 8px; min-width: 16px; height: 16px; padding: 0 var(--space-1); border-radius: var(--radius-md); background: var(--fail); color: var(--white); font-size: var(--text-tiny); font-weight: var(--weight-bold); display: grid; place-items: center; }
  .main { padding-bottom: calc(var(--space-16) + env(safe-area-inset-bottom)); }
  .page { padding: var(--space-4) var(--space-4) var(--space-8); }
  /* drawers become bottom sheets */
  .panel { top: auto; left: 0; right: 0; width: 100%; max-height: 92vh; border-radius: var(--radius-3xl) var(--radius-3xl) 0 0; animation: sheet 240ms var(--ease-out); padding-bottom: env(safe-area-inset-bottom); }
  .panel::before { content: ""; display: block; width: 36px; height: 4px; border-radius: var(--radius-3xs); background: var(--line-strong); margin: var(--space-2) auto 0; flex: none; }
  .panel-head { padding-top: var(--space-2-5); }
  /* one main action stays at hand */
  .setup-foot { position: sticky; bottom: 0; z-index: 5; background: var(--ground); padding: var(--space-3) 0 calc(var(--space-3) + env(safe-area-inset-bottom)); margin-top: var(--space-5); border-top: 1px solid var(--line); }
  /* lists feel like an app: full-width rows, a pressed state */
  .table tbody tr.click:active td, .trow:active, .sugg.rowlink:active { background: var(--surface-2); }
  .tabs { display: none; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .panel { animation: none; } }
@media (max-width: 720px) { .modal-body { align-content: start; } .modal-foot .muted { display: none; } }

/* ---------- the page loader: the logo's cards stack, then the check draws (ui.loader) ---------- */
.page-loader { position: fixed; inset: 0; z-index: var(--layer-loader); display: grid; place-items: center;
               background: var(--page-veil); opacity: 0; visibility: hidden;
               transition: opacity var(--page-fade), visibility var(--page-fade); }
.page-loader.is-on { opacity: 1; visibility: visible; }
.page-loader:not(.is-on) .logo-loader * { animation: none; }
.logo-loader { display: inline-grid; place-items: center; width: var(--loader-md); height: var(--loader-md); }
.logo-loader--sm { width: var(--loader-sm); height: var(--loader-sm); }
.logo-loader--lg { width: var(--loader-lg); height: var(--loader-lg); }
.logo-loader svg { width: 100%; height: 100%; overflow: visible; }
.logo-loader rect { transform-box: fill-box; transform-origin: 50% 100%;
                    animation: logo-stack var(--loader-cycle) ease-in-out infinite both; }
.logo-loader__back { fill: var(--logo-back); }
.logo-loader__mid { fill: var(--logo-mid); animation-delay: calc(var(--loader-cycle) * .1) !important; }
.logo-loader__front { fill: var(--logo-front); animation-delay: calc(var(--loader-cycle) * .2) !important; }
.logo-loader__check { fill: none; stroke: var(--logo-check); stroke-width: 6.5; stroke-linecap: round;
                      stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1;
                      animation: logo-check-loop var(--loader-cycle) ease-in-out infinite both; }
.logo-loader--once rect { animation-iteration-count: 1; }
.logo-loader--once .logo-loader__check { animation-name: logo-check; animation-iteration-count: 1; }
@media (prefers-reduced-motion: reduce) {
  .logo-loader rect, .logo-loader__check { animation: none !important; }
  .logo-loader__check { stroke-dashoffset: 0; }
}
@keyframes logo-stack { 0% { transform: translateY(18%) scale(.9); opacity: 0; } 25%, 100% { transform: none; opacity: 1; } }
@keyframes logo-check { 0%, 35% { stroke-dashoffset: 1; } 60%, 100% { stroke-dashoffset: 0; } }
@keyframes logo-check-loop { 0%, 35% { stroke-dashoffset: 1; } 60%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }

/* ---------- the real app: what the prototype did with script ---------- */
.brand__mark { width: 26px; height: 26px; flex: none; }
/* the rail on narrow screens opens with the menu button (a checkbox: no script needed) */
.navtoggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
@media (max-width: 960px) {
  .navtoggle:checked ~ .shell .rail { transform: none; }
  .navtoggle:checked ~ .shell .rail-scrim { display: block; }
  .topbar label.btn { cursor: pointer; }
}
/* menus open from a <details>: the summary is the button */
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; }
.dd > summary::-webkit-details-marker { display: none; }
.dd[open] > summary .i:last-child { transform: rotate(180deg); }
.dd .menu form { margin: 0; }
.rail .dd .menu { left: var(--space-2-5); right: var(--space-2-5); min-width: 0; }
.rail-foot .dd .menu { top: auto; bottom: calc(100% + var(--space-1-5)); }
.menu .menu-who { padding: var(--space-2) var(--space-2-5); font-size: var(--text-sm); color: var(--ink-3); overflow-wrap: anywhere; }
.menu .menu-who strong { display: block; color: var(--ink); font-weight: var(--weight-semibold); }
.menu a[aria-current] { font-weight: var(--weight-semibold); }
/* app logos: the initial on a tile until the site's own icon has loaded, then the icon */
.applogo { position: relative; background: var(--surface-2); color: var(--ink-2); font-weight: var(--weight-semibold); }
.applogo__letter { line-height: 1; }
.applogo img { position: absolute; inset: 0; opacity: 0; background: var(--white); }
.applogo img.is-ready { opacity: 1; }
.nav .sub a { min-width: 0; }
.nav .sub a .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the app header's run button posts a form */
.apphead-actions form { margin: 0; }
.inline { display: inline; margin: 0; }
form.inline { display: inline-flex; }
/* the phone's top bar: the title alone is centered between two 48px buttons */
.pbar-gap { width: 44px; }
.pbar .dd > summary { list-style: none; }
@media (max-width: 720px) {
  .board th { top: var(--pbar-h); }
}
.mrow--button { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); font: inherit; text-align: left; cursor: pointer; }
.mlist form:first-of-type .mrow--button { border-top: 0; }
.run-why { color: var(--shell-ink-2); }
.credits-mini.low b { color: var(--coral-400); }
.credits-mini .meter { display: block; }

/* ---------- the design page (/design) ---------- */
.ds-block + .ds-block { margin-top: var(--space-3); }
.ds-block h3 { font-size: var(--text-md); margin-bottom: var(--space-2-5); }
.ds-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--space-2-5); }
.ds-swatch { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; font-size: var(--text-meta); }
.ds-swatch .mono { overflow-wrap: anywhere; }
.ds-chip { display: block; width: 100%; min-width: 48px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); }
.ds-row { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: center; }
.ds-row + .ds-row { margin-top: var(--space-2-5); }
.ds-name { min-width: 200px; color: var(--ink-3); }
.ds-bar { display: inline-block; height: 8px; background: var(--leg); border-radius: var(--radius-3xs); }
.ds-dark { background: var(--shell); padding: var(--space-3); border-radius: var(--radius-md); }

/* ------------------------------------------------------------------ group c: settings, Alerts, Apps */
.app-cov { padding-bottom: var(--space-4); }
a.chip { text-decoration: none; }
.app-cov + .app-row { border-top: 1px solid var(--line); }
.covbar .unsure, .covkey i.unsure { background: var(--run); }
.inbox-mail + .inbox-mail { border-top: 1px solid var(--line); }
.inbox-mail > summary { cursor: pointer; list-style: none; }
.inbox-mail > summary::-webkit-details-marker { display: none; }
.inbox-mail[open] > summary { background: var(--surface-2); }
.alert-text > .small { display: block; }
/* the upgrade at a plan limit (saas partials/upsell.html), until moments move to the new macros */
.onboard { margin-bottom: var(--space-4); }
.onboard .actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.upsell { border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--surface); padding: var(--space-4); display: grid; gap: var(--space-3); }
.upsell__text { display: grid; gap: var(--space-1); font-size: var(--text-sm); color: var(--ink-2); }
.upsell__text strong { color: var(--ink); }
.upsell__compare { border-collapse: collapse; font-size: var(--text-ui); width: 100%; max-width: 480px; }
.upsell__compare th, .upsell__compare td { text-align: left; padding: var(--space-1-5) var(--space-2); border-bottom: 1px solid var(--line); }
.upsell__now, .upsell__year, .upsell__soon { color: var(--ink-3); font-size: var(--text-xs); }
.upsell .btn.btn--primary { background: var(--shell); border-color: var(--shell); color: var(--white); }
.upsell .btn.btn--primary:hover { background: var(--shell-3); border-color: var(--shell-3); color: var(--white); }
/* ------------------------------------------------------------------ group b: an app's daily pages */
.run-sum { margin: var(--space-1) 0 var(--space-5); }
.test-meta { margin: calc(-1 * var(--space-3)) 0 var(--space-5); }
.lead-line { margin-bottom: var(--space-3); }
.h-sm { font-size: var(--text-lg); margin-bottom: var(--space-1); }
.board-foot { padding-top: var(--space-2-5); padding-bottom: var(--space-3); border-top: 1px solid var(--line); }
.proof-row { justify-content: space-between; margin: var(--space-4-5) 0 var(--space-2-5); gap: var(--space-2-5); }
.proof-row h3 { font-size: var(--text-base); }
.sugg.sugg-b { grid-template-columns: auto auto minmax(0, 1fr) auto; }
.sugg-b .cb { padding-top: var(--space-1); }
.sugg-act { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); }
.sugg-act .row { gap: var(--space-2); }
.sugg-b .note { margin-top: var(--space-2-5); }
.board td > .dd > summary.tag { cursor: pointer; list-style: none; }
.board td > .dd > summary.tag::-webkit-details-marker { display: none; }
.modal.modal--page { position: static; inset: auto; box-shadow: none; border: 1px solid var(--line); min-height: 0; }
.modal--page .modal-x, .modal--page .modal-nav { display: none; }
.modal--page .modal-bar { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 720px) {
  .sugg.sugg-b { grid-template-columns: auto minmax(0, 1fr); }
  .sugg-b .t-thumb { display: none; }
  .sugg-act { grid-column: 2; align-items: flex-start; }
}
a.tag { text-decoration: none; }
a.tag:hover .lbl { text-decoration: underline; }
.trow .t-text > .t-sub { display: block; }
.aside-card .url-link + h3, .aside-card p + h3, .aside-card .kv + p { margin-top: var(--space-3-5); }
.ask-b { max-width: min(520px, calc(100vw - var(--space-8))); padding: var(--space-5); border: 1px solid var(--line); color: var(--ink); }
.ask-b::backdrop { background: var(--scrim); }
.ask-b-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.ask-b-head h2 { font-size: var(--text-h3); }
.ask-b-body { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.level-pick { width: auto; }
/* the hosted app's one card (saas partials/banner.html: an upgrade moment or the first-time step) in the new look */
.btn.btn--primary { background: var(--shell); border-color: var(--shell); color: var(--white); }
.btn.btn--primary:hover { background: var(--shell-3); border-color: var(--shell-3); color: var(--white); }
.btn.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.btn--ghost:hover { background: var(--bottle-a6); color: var(--ink); }
.onboard { margin-bottom: var(--space-4); }
.onboard__in { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); padding: var(--space-4) var(--space-4-5); border-left: 3px solid var(--leg); }
.onboard__text, .upsell__text { flex: 1 1 320px; display: grid; gap: var(--space-1); }
.onboard__text span, .upsell__text span { color: var(--ink-2); font-size: var(--text-sm); }
.onboard .actions, .onboard__form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.upsell__compare { border-collapse: collapse; font-size: var(--text-xs); }
.upsell__compare th, .upsell__compare td { padding: var(--space-1) var(--space-2-5); border-bottom: 1px solid var(--line); text-align: left; }
.upsell__now, .upsell__year, .upsell__soon { color: var(--ink-3); font-size: var(--text-xs); }
.upsell__ways { margin: 0; padding-left: var(--space-4); color: var(--ink-2); font-size: var(--text-sm); }

/* ---------- group a: the first visit ---------- */
.welcome-progress > i { background: var(--shell); }
.live-tile__screen img:not([src]) { visibility: hidden; }  /* not started yet: no picture, no broken-image icon */
.welcome-who { margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-1-5); color: var(--shell-ink-2); }
.setup-main .page-head .setup-lead { margin-top: var(--space-2); }
.sugg > div { min-width: 0; }
/* the live run (run_live.html): the class names app.js updates in place */
.live-bar { display: flex; gap: var(--space-0-5); height: 8px; border-radius: var(--radius-xs); overflow: hidden; margin-top: var(--space-2); background: var(--deny-bg); }
.live-bar__seg { flex: 1; background: var(--deny-bg); transition: background-color 400ms var(--ease-out); }
.live-bar__seg--running { background: var(--run); animation: pulse 1.2s ease-in-out infinite; }
.live-bar__seg--passed, .live-bar__seg--retry { background: var(--pass); }
.live-bar__seg--changed { background: var(--upd-solid); }
.live-bar__seg--failed { background: var(--fail); }
.live-bar__seg--not_checked, .live-bar__seg--not_run { background: var(--line-strong); }
.live-counts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-8); margin: var(--space-4) 0 0; }
.live-counts div { display: flex; flex-direction: column-reverse; }
.live-counts dt { color: var(--ink-3); font-size: var(--text-ui); }
.live-counts dd { margin: 0; font-size: var(--text-3xl); font-weight: var(--weight-semibold); }
.live-counts dd.is-bumped { animation: flip 400ms var(--ease-out); }
.live-phases { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: var(--space-4) 0 0; padding: var(--space-3) 0 0; border-top: 1px solid var(--line); }
.live-phases__step { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.live-phases__step--next { color: var(--ink-3); font-weight: var(--weight-regular); }
.rail__dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: var(--text-tag); border: 1.5px solid var(--line-strong); color: var(--ink-3); flex: none; }
.rail__dot--now { border-color: var(--leg); color: var(--leg); }
.rail__dot--done { background: var(--pass); border-color: var(--pass); color: var(--white); }
.live-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3); }
.live-tile { display: flex; flex-direction: column; overflow: hidden; }
.live-tile--queued { opacity: 0.65; }
.live-tile--running { box-shadow: 0 0 0 2px var(--leg); }
.live-tile--failed { box-shadow: 0 0 0 2px var(--fail); }
.live-tile--changed { box-shadow: 0 0 0 2px var(--upd-solid); }
.live-tile--not_checked, .live-tile--not_run { border-style: dashed; }
.live-tile.is-flipped { animation: flip 500ms var(--ease-out); }
.live-tile__screen { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--surface-2); }
.live-tile__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.live-tile__pill { position: absolute; top: var(--space-2); left: var(--space-2); }
.live-tile__body { display: grid; gap: var(--space-1); padding: var(--space-3) var(--space-3-5); }
.live-tile__title { font-weight: var(--weight-medium); font-size: var(--text-sm); }
.pill { display: inline-flex; align-items: center; gap: var(--space-1); padding: 0 var(--space-2); border-radius: var(--radius-sm); font-size: var(--text-tag); font-weight: var(--weight-semibold); line-height: 22px; white-space: nowrap; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink-2); }
.pill--pass, .pill--retry { background: var(--pass-bg); border-color: var(--pass-line); color: var(--good-ink); }
.pill--broken { background: var(--fail); border-color: var(--fail); color: var(--white); }
.pill--changed { background: var(--upd-bg); border-color: var(--upd-line); color: var(--upd); }
.pill--unsure { background: var(--run-bg); border-color: var(--run-line); color: var(--warn-ink); }
.pill--running { background: var(--leg-bg); border-color: var(--leg-line); color: var(--leg); }
.pill--notrun, .pill--none { border-style: dashed; color: var(--ink-3); }

/* ---------- step 5: the last pages off the older shells (usage, admin on your computer, signing in yourself) ---------- */
.usage-tallies { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3); }
.usage-apps { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; gap: var(--space-1); font-size: var(--text-sm); }
.usage-apps li { display: flex; justify-content: space-between; gap: var(--space-3); }
.live { overflow: hidden; }
.live__bar { display: flex; align-items: center; gap: var(--space-1-5); padding: var(--space-2) var(--space-2-5); border-bottom: 1px solid var(--line); }
.live__url { flex: 1; min-width: 0; font-size: var(--text-ui); color: var(--ink-2); background: var(--surface-2); border-radius: var(--radius-sm); padding: var(--space-1) var(--space-2-5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live__status { white-space: nowrap; }
.live__screen { position: relative; background: var(--screen-ink); cursor: pointer; outline: none; }
.live__screen:focus-within { box-shadow: inset 0 0 0 2px var(--leg); }
.live__screen img { width: 100%; height: auto; display: block; min-height: 240px; }
.live__keys { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; resize: none; }
.live__window { padding: var(--space-7); font-size: var(--text-base); color: var(--ink-2); }

/* ------------------------------------------------------------------ the checkout window (partials/checkout.html)
   Every payment opens here, inside our page: Whop's checkout element mounts in .pay-sheet-mount. A sheet over the page
   on a desktop, the whole screen on a phone. */
.pay-sheet { width: min(560px, calc(100vw - var(--space-8))); max-height: calc(100vh - var(--space-8)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-pop); color: var(--ink); background: var(--surface); overflow: hidden; }
.pay-sheet[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.pay-sheet::backdrop { background: var(--scrim); }
.pay-sheet-head { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4) var(--space-4-5) var(--space-3); border-bottom: 1px solid var(--line); }
.pay-sheet-head h2 { font-size: var(--text-h3); }
.pay-sheet-body { overflow: auto; padding: var(--space-4) var(--space-4-5); min-height: 0; }
.pay-sheet-state { display: flex; align-items: center; gap: var(--space-2-5); color: var(--ink-2); }
.pay-sheet-state[hidden] { display: none; }
.pay-sheet-state .note { width: 100%; }
.pay-sheet-state .btn-row { margin-top: var(--space-2-5); }
.pay-sheet-state > .i { animation: spin 1s linear infinite; }
.pay-sheet-mount { min-height: 420px; }
.pay-sheet-foot { display: flex; align-items: center; gap: var(--space-1-5); padding: var(--space-2-5) var(--space-4-5); border-top: 1px solid var(--line); background: var(--surface-2); }
@media (max-width: 720px) {
  .pay-sheet { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .pay-sheet-head { padding-top: calc(var(--space-4) + env(safe-area-inset-top)); }
  .pay-sheet-foot { padding-bottom: calc(var(--space-2-5) + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .pay-sheet-state > .i { animation: none; } }
.pay-note { margin-top: var(--space-3-5); }
.pay-sheet [hidden] { display: none; }
/* the billing page's Payments (settings/billing.html): the total with its tax under it; on a phone, each payment is
   its name, then the date, total, status and its receipt or next step */
.pay-table .pay-total .t-sub { white-space: nowrap; }
@media (max-width: 720px) {
  .table.stack-sm.pay-table tr { grid-template-columns: auto minmax(0, 1fr); }
  .table.stack-sm.pay-table td.c-main, .table.stack-sm.pay-table td.pay-next { grid-column: 1 / -1; }
  .table.stack-sm.pay-table td.pay-total { display: flex; flex-direction: column; align-items: flex-start; grid-column: 1 / -1; justify-self: start; text-align: left; }
  .table.stack-sm.pay-table td.pay-next .btn { white-space: normal; text-align: left; }
}

/* ---------- plan/envs: an app's environments as the plan's fixed rows ---------- */
.env-new { border-top: 1px solid var(--line); padding-top: var(--space-3); display: grid; gap: var(--space-2); }
.env-new-row { gap: var(--space-2) var(--space-3); }
.env-new-row .small { display: block; }
.env-new-row .input { max-width: 320px; }
/* ------------------------------------------------------------------ Coding agents (saas templates/agents.html) */
.agents-lock { margin-bottom: var(--space-4); }
.agent-steps { list-style: none; margin: 0; padding: 0; }
.agent-step { display: flex; gap: var(--space-3-5); padding: var(--space-4-5) var(--space-5); }
.agent-step + .agent-step { border-top: 1px solid var(--line); }
.agent-step h3 { font-size: var(--text-base); margin-bottom: var(--space-1); }
.agent-step .grow > * + * { margin-top: var(--space-2-5); }
.agent-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--shell); color: var(--white); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.agent-make { display: grid; gap: var(--space-2-5); max-width: 420px; }
.agent-key { margin-top: var(--space-2); gap: var(--space-2); }
.agent-key .input { min-width: 0; flex: 1 1 auto; }
.agent-newkey { flex: 1 1 auto; min-width: 0; word-break: break-all; padding: var(--space-2) var(--space-2-5); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.agent-snippets .seg-tabs { margin-bottom: var(--space-2-5); }
.agent-pane > * + * { margin-top: var(--space-2); }
.agent-cap { margin-top: var(--space-1-5); gap: var(--space-1-5); }
@media (max-width: 720px) {
  .agent-step { padding: var(--space-4) var(--space-4); gap: var(--space-2-5); }
  .agent-snippets .seg-tabs { display: flex; }
}
.agent-keys .k-req a { display: block; margin-top: var(--space-0-5); }
@media (max-width: 720px) {
  /* a key on a phone: its name, then when it was used, its requests and credits, then its limit and Revoke */
  .table.stack-sm.agent-keys tr { grid-template-columns: minmax(0, 1fr) auto; }
  .table.stack-sm.agent-keys td.c-main, .table.stack-sm.agent-keys td.k-last, .table.stack-sm.agent-keys td.k-req,
  .table.stack-sm.agent-keys td.k-cred { grid-column: 1 / -1; display: block; }
  .table.stack-sm.agent-keys td.k-last::before, .table.stack-sm.agent-keys td.k-req::before,
  .table.stack-sm.agent-keys td.k-cred::before { content: attr(data-l) ": "; color: var(--ink-3); font-size: var(--text-xs); }
  .table.stack-sm.agent-keys td.k-req a { display: inline; margin-left: var(--space-1-5); }
  .table.stack-sm.agent-keys td.k-cap { grid-column: 1; }
  .table.stack-sm.agent-keys td.k-stop { grid-column: 2; justify-self: end; }
  .table.stack-sm.agent-asked tr { grid-template-columns: minmax(0, 1fr) auto; }
  .table.stack-sm.agent-asked td.c-main { grid-column: 1; }
  .table.stack-sm.agent-asked td.chev { grid-column: 2; grid-row: 1; }
  .table.stack-sm.agent-asked td.a-who { grid-column: 1 / -1; color: var(--ink-2); font-size: var(--text-xs); }
  .table.stack-sm.agent-asked td.a-when { grid-column: 1; }
  .table.stack-sm.agent-asked td.a-tag { grid-column: 2; justify-self: end; }
}
/* round 2: the setup tabs fit a phone; each code block holds its Copy; code wraps at spaces and a long address
   scrolls inside its block instead of breaking mid-word */
.agent-tabs button { white-space: nowrap; }
.agent-code { position: relative; }
.agent-code .code { white-space: pre-wrap; word-break: normal; overflow-wrap: normal; padding-right: calc(var(--space-18) + var(--space-6)); }
.agent-code > .btn { position: absolute; top: var(--space-2); right: var(--space-2); }
.agent-cap .input { width: 6em; }
.agent-cap { align-items: center; }
@media (max-width: 720px) {
  .agent-snippets .seg-tabs.agent-tabs { display: flex; width: 100%; -webkit-mask: none; mask: none; padding-right: var(--space-0-75); overflow: visible; }
  .agent-tabs button { flex: 1 1 0; justify-content: center; padding-left: var(--space-1-5); padding-right: var(--space-1-5); }
  .agent-code .code { padding-right: var(--space-4); padding-top: var(--space-10); }
}
.agent-code { background: var(--code-bg); border-radius: var(--radius-md); }
@media (max-width: 720px) {
  .table.stack-sm.agent-asked td.a-tag { grid-column: 1 / -1; justify-self: start; }
  .table.stack-sm.agent-asked td.a-tag .t-sub { display: inline; margin-left: var(--space-2); }
}
/* round 3: a returning workspace folds the setup into one line; keys no agent has used yet sit apart; on a phone the
   monthly limit is labelled like the other cells */
.agent-more > summary.disclose { display: flex; align-items: center; padding: var(--space-4) var(--space-5); color: var(--ink); }
.agent-more > summary.disclose:hover { background: var(--surface-2); }
.agent-more[open] > summary.disclose { border-bottom: 1px solid var(--line); }
.agent-more-t { font-weight: var(--weight-semibold); margin-right: var(--space-1-5); }
.agent-unused td.u-state { white-space: nowrap; }
@media (max-width: 720px) {
  .agent-more > summary.disclose { padding: var(--space-4); align-items: flex-start; }
  .agent-more > summary.disclose .small { display: block; }
  .table.stack-sm.agent-keys td.k-cap::before,
  .table.stack-sm.agent-unused td.k-cap::before { content: attr(data-l); display: block; color: var(--ink-3); font-size: var(--text-xs); }
  .table.stack-sm.agent-unused tr { grid-template-columns: minmax(0, 1fr) auto; }
  .table.stack-sm.agent-unused td.c-main, .table.stack-sm.agent-unused td.u-state { grid-column: 1 / -1; }
  .table.stack-sm.agent-unused td.k-cap { grid-column: 1; }
  .table.stack-sm.agent-unused td.k-stop { grid-column: 2; justify-self: end; align-self: end; }
}
@media (max-width: 720px) {
  /* the limit takes its own row under its label (its form needs the width), Revoke under it */
  .table.stack-sm.agent-keys td.k-cap, .table.stack-sm.agent-unused td.k-cap { grid-column: 1 / -1; display: block; }
  .table.stack-sm.agent-keys td.k-stop, .table.stack-sm.agent-unused td.k-stop { grid-column: 1 / -1; justify-self: start; }
}
/* a key is one long word: it may break anywhere rather than run out of its code block */
.agent-code .agent-token { word-break: break-all; }
/* round 4: both key tables share their column widths (limits and Revoke line up); an empty list is one short line */
@media (min-width: 721px) {
  .table.agent-keys, .table.agent-unused { table-layout: fixed; width: 100%; }
  .agent-keys .kc-main, .agent-unused .kc-main { width: 24%; }
  .agent-keys .kc-last, .agent-unused .kc-last { width: 11%; }
  .agent-keys .kc-req, .agent-unused .kc-req { width: 16%; }
  .agent-keys .kc-cred, .agent-unused .kc-cred { width: 17%; }
  .agent-keys .kc-cap, .agent-unused .kc-cap { width: 22%; }
  .agent-keys .kc-stop, .agent-unused .kc-stop { width: 10%; }
}
.agent-none { margin: 0; }
@media (min-width: 721px) { .agent-keys td.k-stop, .agent-unused td.k-stop { text-align: right; } }
/* the unit shows beside a limit only, never "No limit credits" */
.agent-cap .input:placeholder-shown + .cap-unit { display: none; }
@media (max-width: 720px) {
  /* a request on a phone: who asked and when, labelled like the key rows */
  .table.stack-sm.agent-asked td.a-who::before, .table.stack-sm.agent-asked td.a-when::before { content: attr(data-l) ":\00a0"; color: var(--ink-3); font-size: var(--text-xs); }
}
/* step 3's prompt is prose: normal type in a quote block, its Copy in the corner */
.agent-quote { position: relative; background: var(--surface-2); border-left: 3px solid var(--line-strong); border-radius: var(--radius-md); }
.agent-quote blockquote { margin: 0; padding: var(--space-3) calc(var(--space-18) + var(--space-6)) var(--space-3) var(--space-4); }
.agent-quote > .btn { position: absolute; top: var(--space-2); right: var(--space-2); }
.agent-another { margin-top: var(--space-2-5); }
.agent-another .agent-make { margin-top: var(--space-2-5); }
@media (max-width: 720px) {
  .agent-quote blockquote { padding: var(--space-10) var(--space-4) var(--space-3); }
}
/* ---------- leftovers ---------- */
/* a closed menu or pop lays nothing out (Chrome keeps a closed <details> content in layout, hidden) */
.dd:not([open]) > :not(summary) { display: none; }
