/* A work surface, not a page of cards. Hairlines separate things, colour means
   something has been found, and the data is the picture. */

@font-face { font-family: "Geist"; src: url(/fonts/sans.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/fonts/mono.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0a0b0d;
  --rail: #0a0b0d;
  --raise: #15171b;
  --hover: #111317;
  --line: #1f2227;
  --line-2: #2e3238;
  --ink: #eceef1;
  --ink-2: #a3a8b1;
  --ink-3: #6d727c;
  --primary: #eceef1;
  --on-primary: #0a0b0d;
  --harm: #ff6257;
  --harm-wash: rgba(255, 98, 87, .09);
  --caution: #e6b450;
  --caution-wash: rgba(230, 180, 80, .08);
  --pass: #5fb98e;
  --sans: "Geist", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --rail: #fafafa;
  --raise: #f1f2f4;
  --hover: #f7f7f8;
  --line: #e9eaed;
  --line-2: #d6d8dd;
  --ink: #111316;
  --ink-2: #565b64;
  --ink-3: #868b95;
  --primary: #111316;
  --on-primary: #ffffff;
  --harm: #d4261a;
  --harm-wash: rgba(212, 38, 26, .06);
  --caution: #9a6700;
  --caution-wash: rgba(154, 103, 0, .07);
  --pass: #17794f;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 13px/1.5 var(--sans); letter-spacing: -.003em; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; padding: 0; font-weight: inherit; font-size: inherit; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
code, .mono { font-family: var(--mono); font-size: 12px; letter-spacing: -.01em; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 1px; }
.nums { font-variant-numeric: tabular-nums; }

.eyebrow { color: var(--ink-3); font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.logo svg { width: 16px; height: 16px; fill: currentColor; }
.logo .hollow { fill: none; stroke: currentColor; stroke-width: 1.5; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 30px; padding: 0 12px; background: transparent; border: 1px solid var(--line-2); border-radius: 5px; font-weight: 500; white-space: nowrap; transition: background .1s, border-color .1s; }
.btn:hover { background: var(--raise); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary); opacity: .88; }
.btn-danger { background: var(--harm); border-color: var(--harm); color: #fff; }
.btn-danger:hover { background: var(--harm); opacity: .88; }

/* Sign in */
.signin { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.signin-form { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 14px; }
.signin-form h1 { font-size: 20px; font-weight: 500; letter-spacing: -.02em; margin-top: 28px; }
.signin-form p { color: var(--ink-2); }
.signin-form .btn { height: 34px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; color: var(--ink-2); font-size: 12px; }
.field input { height: 34px; padding: 0 10px; background: transparent; border: 1px solid var(--line-2); border-radius: 5px; color: var(--ink); font-family: var(--mono); font-size: 12px; }
.field input:focus { outline: 0; border-color: var(--ink-2); }
.form-error { color: var(--harm) !important; }

/* Shell */
.shell { height: 100%; display: grid; grid-template-columns: 196px minmax(0, 1fr); }
.rail { display: flex; flex-direction: column; min-height: 0; padding: 14px 10px 12px; background: var(--rail); border-right: 1px solid var(--line); }
.rail > .logo { padding: 2px 8px 16px; }
.rail-nav { display: flex; flex-direction: column; gap: 1px; }
.rail-nav a { display: flex; align-items: center; justify-content: space-between; height: 28px; padding: 0 8px; border-radius: 5px; color: var(--ink-2); font-weight: 450; }
.rail-nav a:hover { color: var(--ink); background: var(--hover); }
.rail-nav a[aria-current=page] { color: var(--ink); background: var(--raise); }
.count { color: var(--harm); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 1px; }
.mode { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; color: var(--ink-2); }
.mode::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pass); }
.mode.watch::before { background: var(--caution); }
.mode.stopped-mode::before { background: var(--harm); }
.rail-action { height: 28px; padding: 0 8px; border: 0; border-radius: 5px; background: none; color: var(--ink-2); text-align: left; }
.rail-action:hover { background: var(--hover); color: var(--ink); }
.rail-action.danger:hover { color: var(--harm); }
.account { font-weight: 500; color: var(--ink); }
.account-menu { display: flex; flex-direction: column; gap: 1px; }

.work { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.stopped { padding: 7px 16px; background: var(--harm-wash); border-bottom: 1px solid var(--line); color: var(--harm); }
.stopped strong { font-weight: 600; }
.view { flex: 1; min-height: 0; overflow: auto; }

/* Page heading: a title and one line of numbers */
.head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 18px 24px 14px; }
.head h1 { font-size: 15px; font-weight: 550; letter-spacing: -.015em; }
.head-sum { color: var(--ink-3); }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* Queue beside the selected action */
.triage { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: 100%; min-height: 0; }
.triage-screen { height: 100%; }
.queue { overflow-y: auto; border-right: 1px solid var(--line); padding: 8px; }
.q-row { display: grid; grid-template-columns: 6px minmax(0, 1fr); gap: 11px; padding: 10px 10px; border-radius: 6px; }
.q-row .mark { margin-top: 7px; }
.q-row + .q-row { margin-top: 1px; }
.q-row:hover { background: var(--hover); }
.q-row[aria-current=true] { background: var(--raise); }
.q-title { font-size: 14px; font-weight: 450; letter-spacing: -.01em; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.q-title.code { font: 12px/1.45 var(--mono); }
.q-meta { margin-top: 2px; color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.mark { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); flex: none; }
.mark.harm { background: var(--harm); }
.mark.caution { background: var(--caution); }
.mark.pass { background: var(--pass); }

/* The selected action: the consequence is the page */
.detail { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.detail-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 40px 64px 32px; }
.back { display: none; margin-bottom: 20px; color: var(--ink-2); }
.d-main, .details { max-width: 720px; }
/* The consequence, drawn. One mark per thing it touches. */
.field { min-height: 232px; }
.f-state { position: relative; height: 16px; color: var(--ink-3); font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.f-state span { position: absolute; left: 0; transition: opacity .15s; }
.state-after { opacity: 0; color: var(--harm); }
.detail.playing .state-now { opacity: 0; }
.detail.playing .state-after { opacity: 1; }
.f-groups { display: flex; flex-wrap: wrap; gap: 24px 44px; margin-top: 14px; }
.f-group { flex: 1 1 200px; min-width: 0; }
.f-count { color: var(--ink); opacity: 1; transition: color .12s; font-size: 34px; font-weight: 400; letter-spacing: -.04em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.f-count.unknown { color: var(--caution); }
.detail.aiming .f-count:not(.unknown), .detail.playing .f-count:not(.unknown) { color: var(--harm); }
.detail.aiming .field.guess .f-count, .detail.playing .field.guess .f-count { color: var(--caution); }
.f-target { min-height: 18px; margin-top: 2px; color: var(--ink-3); font: 12px/1.5 var(--mono); overflow-wrap: anywhere; }
.units { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px; margin-top: 18px; }
.units.chain { gap: 34px; }

.unit { --tone: var(--ink); position: relative; flex: none; display: grid; place-items: center; width: var(--s); height: var(--s); color: var(--tone); transition: transform .12s ease-out, opacity .12s, color .12s, background-color .12s, border-color .12s; }
.unit.sheet, .unit.block, .unit.snap { background: var(--tone); border-radius: 2px; }
.unit.sheet { clip-path: polygon(0 0, 68% 0, 100% 30%, 100% 100%, 0 100%); width: calc(var(--s) * .82); }
.unit.snap { border-radius: 6px; }
.unit.snap::after { content: ""; width: 34%; height: 34%; border-radius: 50%; background: var(--bg); }
.unit.node { border-radius: 50%; background: var(--tone); }
.chain .unit.node:not(:first-child)::before { content: ""; position: absolute; right: 100%; top: 50%; width: 34px; height: 1px; background: var(--line-2); }
.unit.coin { border-radius: 50%; border: 1.5px solid var(--tone); font-size: calc(var(--s) * .44); }
.unit svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linejoin: round; }
.unit.mystery { --s: 88px; border: 1.5px dashed var(--caution); border-radius: 50%; color: var(--caution); font-size: 36px; font-weight: 300; }

/* How far to believe it is drawn into the marks */
.field.modelled .unit { opacity: .42; }
.field.guess .unit:not(.mystery) { opacity: .75; }
.field.guess .unit.sheet, .field.guess .unit.block, .field.guess .unit.snap, .field.guess .unit.node { background: transparent; border: 1.5px dashed var(--tone); clip-path: none; }
.field.guess .unit svg { stroke-dasharray: 1.4 1.1; stroke-width: .9; }

/* Pointing at approve marks what goes. Holding it plays it. Letting go undoes it. */
.detail.aiming .unit.falls, .detail.playing .unit.falls, .detail.aiming .unit.leaves, .detail.playing .unit.leaves { --tone: var(--harm); }
.detail.aiming .field.guess .unit.falls, .detail.playing .field.guess .unit.falls { --tone: var(--caution); }
.detail.playing .unit { transition: transform .28s cubic-bezier(.5, 0, 1, .6) var(--d), opacity .28s linear var(--d); }
.detail.playing .unit.falls { transform: translateY(46px) rotate(9deg); opacity: 0; }
.detail.playing .unit.leaves { transform: translateX(46px); opacity: 0; }
.field .unit.arrives { opacity: .25; }
.detail.playing .field .unit.arrives { opacity: 1; }
.detail.playing .unit.changes { opacity: .3; }

.d-sentence { margin-top: 28px; font-size: 15px; line-height: 1.5; letter-spacing: -.01em; overflow-wrap: anywhere; }
.d-basis { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 8px; color: var(--ink-3); }
.d-basis .perm { color: var(--harm); }
.d-basis .weak { color: var(--caution); }
.command { margin: 32px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font: 12.5px/1.6 var(--mono); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 180px; overflow-y: auto; }

.details { margin-top: 24px; }
.details summary { display: inline-block; color: var(--ink-3); cursor: pointer; list-style: none; }
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: " +"; }
.details[open] summary::after { content: " \2212"; }
.details summary:hover { color: var(--ink); }
.more { display: flex; flex-direction: column; gap: 28px; margin-top: 24px; }
.section > .eyebrow { display: flex; justify-content: space-between; margin-bottom: 10px; }
.section p { color: var(--ink-2); overflow-wrap: anywhere; }
.section p + p { margin-top: 6px; }

/* How much to believe it: from reading the text up to running it on a copy */
.basis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
.basis-step { padding-top: 7px; border-top: 2px solid var(--line-2); color: var(--ink-3); font-size: 11.5px; line-height: 1.3; }
.basis-step.on { border-top-color: var(--ink); color: var(--ink-2); }
.basis-step.at { color: var(--ink); font-weight: 500; }
.basis.weak .basis-step.on { border-top-color: var(--caution); }
.basis.weak .basis-step.at { color: var(--caution); }
.basis-note { margin-top: 10px; }

/* Trace: what this session did on the way here */
.trace { display: flex; align-items: flex-start; overflow-x: auto; padding-bottom: 2px; }
.t-node { flex: 0 0 auto; width: 120px; min-width: 0; position: relative; padding: 16px 12px 0 0; }
.t-node::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: var(--line-2); }
.t-node:last-child::before { right: auto; width: 8px; }
.t-node .mark { position: absolute; top: 1px; left: 0; width: 7px; height: 7px; box-shadow: 0 0 0 3px var(--bg); }
.t-label { font: 11.5px/1.35 var(--mono); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-verdict { color: var(--ink-3); font-size: 11.5px; }
.t-node.now { width: 170px; }
.t-node.now .mark { width: 9px; height: 9px; top: 0; background: var(--ink); }
.t-node.now .t-label { color: var(--ink); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 20px; }
.fact dt { color: var(--ink-3); font-size: 11.5px; margin-bottom: 1px; }
.fact dd { overflow-wrap: anywhere; }
.note-warn { color: var(--caution); }

/* Decision bar: always in view, and nothing else in it */
.decide { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 12px 24px; background: var(--bg); border-top: 1px solid var(--line); }
.decide-time { margin-right: auto; color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.decide-time.soon { color: var(--harm); }
.decide-buttons { display: flex; gap: 6px; flex: none; }
.decide-buttons .btn, .decide-buttons .hold { height: 32px; padding: 0 14px; }
.decide-error { color: var(--harm); font-size: 12px; overflow-wrap: anywhere; }
.hold { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 12px; background: var(--primary); border: 0; border-radius: 5px; color: var(--on-primary); font-weight: 500; touch-action: none; user-select: none; white-space: nowrap; }
.hold:hover { opacity: .9; }
.hold:disabled { opacity: .5; cursor: default; }
.hold .fill { position: absolute; inset: 0; background: var(--harm); transform: scaleX(0); transform-origin: left; }
.hold.holding .fill { transform: scaleX(1); transition: transform 1.1s linear; }
.hold .label { position: relative; display: inline-flex; align-items: center; gap: 8px; }

/* Empty */
.empty { padding: 64px 24px; color: var(--ink-2); }
.empty h2 { color: var(--ink); font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.empty p { max-width: 52ch; }

/* Chart */
.chart { padding: 0 24px 14px; border-bottom: 1px solid var(--line); }
.hist { display: block; width: 100%; height: 48px; }
.hist .pass-bar { fill: var(--line-2); }
.hist .ask-bar { fill: var(--caution); }
.hist .stop-bar { fill: var(--harm); }
.hist-axis { display: flex; justify-content: space-between; margin-top: 4px; color: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }

/* Filters */
.segments { display: inline-flex; gap: 2px; }
.segments button { height: 26px; padding: 0 9px; border: 0; border-radius: 4px; background: none; color: var(--ink-3); font-size: 12px; }
.segments button:hover { color: var(--ink); }
.segments button[aria-pressed=true] { background: var(--raise); color: var(--ink); }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
.data th { position: sticky; top: 0; z-index: 1; padding: 7px 24px; background: var(--bg); border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 11.5px; font-weight: 450; text-align: left; white-space: nowrap; }
.data td { padding: 8px 24px; border-bottom: 1px solid var(--line); vertical-align: baseline; overflow-wrap: anywhere; }
.data td.grow { width: 100%; max-width: 0; }
tr.row { cursor: pointer; }
tr.row:hover > td { background: var(--hover); }
tr.row:focus-visible { outline-offset: -1px; }
.verdict { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); white-space: nowrap; }
.cell-action { font: 12px/1.5 var(--mono); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.dim { color: var(--ink-3); }
.hash { font: 12px var(--mono); color: var(--ink-3); }
tr.detail-row > td { background: var(--hover); padding: 6px 24px 12px; }
.detail-list { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 14px; font-size: 12px; padding: 6px 0; }
.detail-list dt { color: var(--ink-3); }
.detail-list dd { color: var(--ink-2); overflow-wrap: anywhere; }
.detail-list dd.mono { font: 11.5px/1.5 var(--mono); }

.verify { display: flex; align-items: center; gap: 8px; padding: 7px 24px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.verify.ok { color: var(--pass); }
.verify.bad { color: var(--harm); background: var(--harm-wash); }

.inv-find { color: var(--ink-2); }
.level { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }

/* Dialog and toast */
.dialog { width: min(420px, calc(100vw - 32px)); padding: 20px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; color: var(--ink); }
.dialog::backdrop { background: rgba(0, 0, 0, .6); }
.dialog h2 { font-size: 15px; font-weight: 550; letter-spacing: -.015em; }
.dialog p { margin-top: 6px; color: var(--ink-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.toast { position: fixed; right: 24px; top: 16px; z-index: 20; max-width: calc(100vw - 32px); padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 5px; background: var(--raise); color: var(--ink); }

@media (max-width: 860px) {
  html, body { height: auto; }
  .shell { display: block; height: auto; }
  .rail { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail > .logo { padding: 0; }
  .rail-nav { flex-direction: row; order: 3; flex: 1 0 100%; overflow-x: auto; }
  .rail-nav a { gap: 6px; flex: none; }
  .rail-foot { margin-left: auto; flex-direction: row; align-items: center; gap: 4px; }
  .mode { display: none; }
  .account-menu { flex-direction: row; }
  .view { overflow: visible; }
  .triage { display: block; height: auto; }
  .queue { border-right: 0; }
  .triage.has-selection .queue { display: none; }
  .triage:not(.has-selection) .detail { display: none; }
  .back { display: block; }
  .detail-scroll { overflow: visible; padding: 16px 16px 32px; }
  .decide { position: sticky; bottom: 0; padding: 10px 16px; }
  .f-count { font-size: 28px; }
  .field { min-height: 0; }
  .head { padding: 14px 16px 10px; }
  .chart { padding: 0 16px 12px; }
  .data th, .data td { padding-left: 16px; padding-right: 16px; }
  .basis-step { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* The map */
.map-tally { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.map-count { display: grid; gap: 4px; padding: 20px 24px; border-right: 1px solid var(--line); min-width: 0; }
.map-count:last-child { border-right: 0; }
.map-number { font-size: 34px; line-height: 1; letter-spacing: -.02em; }
.map-word { font-size: 13px; font-weight: 500; }
.map-means { font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.map-count.gated .map-number { color: var(--pass); }
.map-count.seen .map-number { color: var(--caution); }
.map-machine { font-size: 13px; font-weight: 500; padding: 20px 24px 8px; margin: 0; color: var(--ink-2); }
.map-list { list-style: none; margin: 0; padding: 0; }
.map-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); align-items: baseline; }
.map-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.map-label.seen { color: var(--caution); }
.map-label.limited { color: var(--ink); }
.map-label.gated { color: var(--pass); }
.map-name { font-weight: 500; }
.map-facts { font-size: 13px; color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }
.map-risk { font-size: 13px; color: var(--harm); margin-top: 2px; }
.map-side { font-size: 12px; color: var(--ink-3); text-align: right; display: grid; gap: 2px; }
.map-missing { color: var(--caution); }
.map-note { padding: 20px 24px; border-bottom: 1px solid var(--line); }
.map-note h2 { font-size: 13px; font-weight: 500; margin: 0 0 6px; }
.map-note p { font-size: 13px; color: var(--ink-3); margin: 6px 0; max-width: 72ch; }
.map-files, .map-blind { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; }
.map-files { font-family: var(--mono); font-size: 12px; color: var(--ink-2); display: grid; gap: 3px; }
.map-blind li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 6px 0; border-top: 1px solid var(--line); }
.map-needs { color: var(--ink-3); }
@media (max-width: 720px) {
  .map-tally { grid-template-columns: 1fr; }
  .map-count { border-right: 0; border-bottom: 1px solid var(--line); }
  .map-row { grid-template-columns: 64px minmax(0, 1fr); }
  .map-side { grid-column: 2; text-align: left; }
}



/* ---- Overview: the agent, what it can reach, and the wall ---- */
.overview, .test-page { display: flex; flex-direction: column; min-height: 100%; }
.test-page { max-width: 1120px; padding: 32px 36px 56px; gap: 22px; }
.overview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.overview > .overview-head { padding: 30px 36px 0; }
.overview-head h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.022em; font-weight: 540; margin: 0; text-wrap: balance; max-width: 26em; }
.overview-empty { padding: 36px; color: var(--ink-2); }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 16px 0 0; padding: 0 36px 20px; border-bottom: 1px solid var(--line); }
.step { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13px; text-decoration: none; }
.step:hover { color: var(--ink); }
.step-mark { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 11px; }
.step.done { color: var(--ink-2); }
.step.done .step-mark { background: var(--pass); border-color: var(--pass); color: var(--bg); }
.step.next { color: var(--ink); font-weight: 520; }
.step.next .step-mark { border-color: var(--ink); }
.overview-grid { flex: 1; display: grid; grid-template-columns: 250px minmax(0, 1fr) 372px; min-height: 0; }
.agent-column { border-right: 1px solid var(--line); padding: 10px 0; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.agent-list { display: flex; flex-direction: column; }
.agent-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 16px 11px 18px; background: none; border: 0; border-left: 2px solid transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.agent-row:hover { background: var(--hover); }
.agent-row.on { background: var(--raise); border-left-color: var(--ink); }
.agent-pip { width: 8px; height: 8px; border-radius: 50%; background: var(--harm); }
.agent-pip.limited { background: var(--caution); }
.agent-pip.gated { background: var(--pass); }
.agent-row-main { display: flex; flex-direction: column; min-width: 0; }
.agent-row-name { font-weight: 520; font-size: 14px; }
.agent-row-where { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-row-label { font-size: 11px; color: var(--harm); white-space: nowrap; }
.agent-row-label.limited { color: var(--caution); }
.agent-row-label.gated { color: var(--pass); }
.blind { padding: 0 18px; color: var(--ink-3); font-size: 12px; }
.blind summary { cursor: pointer; }
.blind ul { padding: 0; list-style: none; display: grid; gap: 8px; margin: 10px 0 0; }
.reach-stage { display: flex; align-items: center; justify-content: center; padding: 18px; min-width: 0; background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px; }
.reach { width: 100%; max-height: 74vh; }
.reach-line { fill: none; stroke: var(--harm); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke 600ms ease; }
.reach-line.through { stroke: var(--ink-3); }
.reach-dot { fill: var(--harm); transition: fill 600ms ease 300ms; }
.reach-dot.addon { fill: var(--ink-3); }
.reach-text { fill: var(--ink); font-size: 14px; font-family: var(--mono); transition: fill 600ms ease 300ms; }
.reach-agent { fill: var(--raise); stroke: var(--harm); stroke-width: 1.5; transition: stroke 600ms ease 500ms; }
.reach-initial { fill: var(--ink); font-size: 20px; font-weight: 560; }
.reach-name { fill: var(--ink-2); font-size: 14px; }
.reach-wall { stroke: var(--pass); stroke-width: 4; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 700ms cubic-bezier(.2, .7, .2, 1); }
.reach-wall-name { fill: var(--pass); font-size: 11px; letter-spacing: .14em; opacity: 0; transition: opacity 400ms ease 500ms; }
.reach.walled .reach-wall { stroke-dashoffset: 0; }
.reach.walled .reach-wall-name { opacity: 1; }
.reach.walled .reach-line:not(.through) { stroke: var(--line-2); stroke-dasharray: .012 .012; }
.reach.walled .reach-dot:not(.addon) { fill: var(--line-2); }
.reach.walled .reach-text { fill: var(--ink-3); }
.reach.walled .reach-agent { stroke: var(--pass); }
.agent-panel { border-left: 1px solid var(--line); padding: 22px 24px 40px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.panel-kicker { color: var(--ink-3); font-size: 12px; }
.panel-name { font-size: 22px; letter-spacing: -.015em; margin: -8px 0 0; font-weight: 540; }
.panel-verdict { border: 1px solid var(--line-2); border-left: 3px solid var(--harm); padding: 12px 14px; }
.panel-verdict.limited { border-left-color: var(--caution); }
.panel-verdict.gated { border-left-color: var(--pass); }
.panel-word { font-size: 18px; font-weight: 560; color: var(--harm); }
.panel-verdict.limited .panel-word { color: var(--caution); }
.panel-verdict.gated .panel-word { color: var(--pass); }
.panel-verdict p { margin: 4px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.panel-proof { display: flex; align-items: baseline; gap: 10px; color: var(--ink-2); font-size: 13px; line-height: 1.35; text-decoration: none; padding: 2px 0; }
.panel-number { font-size: 22px; font-weight: 560; white-space: nowrap; }
.panel-proof.harm .panel-number { color: var(--harm); }
.panel-proof.pass .panel-number { color: var(--pass); }
.panel-action { width: 100%; justify-content: center; }
.panel-note { color: var(--ink-3); font-size: 12px; line-height: 1.45; margin: 0; }
.panel-part { border-top: 1px solid var(--line); padding-top: 14px; }
.panel-part h3 { margin: 0 0 8px; font-size: 12px; font-weight: 520; color: var(--ink-3); }
.panel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; }
.owner-form { display: grid; gap: 10px; }
.panel-pass { color: var(--pass); font-size: 12px; margin: 8px 0 0; }
.panel-missing { color: var(--caution); font-size: 12px; margin: 8px 0 0; }
.dialog-list { padding-left: 18px; margin: 10px 0 16px; display: grid; gap: 8px; color: var(--ink-2); line-height: 1.45; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.test-sub { color: var(--ink-2); margin: 8px 0 0; max-width: 62ch; line-height: 1.5; }
.test-bar { height: 3px; background: var(--line); }
.test-bar span { display: block; height: 100%; background: var(--ink); transition: width 500ms ease; }
.test-score { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-2); }
.test-score-part { padding: 20px 24px; color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.test-score-part + .test-score-part { border-left: 1px solid var(--line-2); }
.test-number { font-size: 46px; letter-spacing: -.03em; font-weight: 540; margin-bottom: 4px; }
.test-score-part.harm .test-number { color: var(--harm); }
.test-score-part.pass .test-number { color: var(--pass); }
.test-table { display: grid; font-size: 13.5px; }
.test-row { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.5fr) minmax(0, 1.5fr) 110px; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: baseline; animation: rise 240ms ease both; }
.test-top { color: var(--ink-3); font-size: 12px; animation: none; }
.test-cell.harm { color: var(--harm); font-weight: 560; }
.test-cell.pass { color: var(--pass); }
.test-cell.caution { color: var(--caution); }
.test-cell.quiet { color: var(--ink-3); }
.test-owasp { color: var(--ink-3); font-size: 11px; }
.test-limits { color: var(--ink-3); font-size: 12.5px; line-height: 1.55; max-width: 78ch; margin: 0; }
.report-expected { max-width: 320px; }
.report-actions { display: flex; justify-content: flex-end; }
.report-text { border: 1px solid var(--line-2); padding: 20px 24px; font-family: var(--mono); font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .test-row { animation: none; } .reach-wall, .reach-line, .reach-dot, .reach-text, .reach-agent { transition: none; } }
@media (max-width: 1100px) {
  .overview-grid { grid-template-columns: 1fr; }
  .agent-column, .agent-panel { border: 0; }
  .test-row { grid-template-columns: minmax(0, 2fr) 1fr 1fr; }
  .test-owasp { display: none; }
}

/* The overview fills the window: the panel scrolls, the picture stays put. */
.view:has(.overview) { padding: 0; max-width: none; height: 100vh; overflow: hidden; }
.overview { height: 100vh; }
.overview-grid { min-height: 0; overflow: hidden; }
.agent-column, .reach-stage { min-height: 0; overflow: hidden; }
.reach { max-height: 100%; height: 100%; }
.agent-panel { min-height: 0; }
.agent-panel > * { flex: none; }
.owner-form { align-content: start; }
.owner-form .field { display: grid; gap: 5px; font-size: 12.5px; color: var(--ink-2); }
.owner-form input { width: 100%; }
.owner-form .field, .report-expected { min-height: 0; }
.signin .field { min-height: 0; }
.test-note { color: var(--ink-3); font-weight: 400; font-size: 12px; }
.reach-around { fill: none; stroke: var(--harm); stroke-width: 1.5; stroke-dasharray: 5 4; }
.reach-around-text { fill: var(--harm); font-size: 12.5px; }
.panel-around { border: 1px solid var(--line-2); border-left: 3px solid var(--harm); padding: 10px 14px; font-size: 13px; display: grid; gap: 6px; }
.panel-around strong { font-weight: 520; }


/* ---- The estate: a top bar in place of the side rail, then table, picture, panel ---- */
.shell { display: flex; flex-direction: column; }
.rail { flex-direction: row; align-items: center; height: 48px; width: 100%; padding: 0 16px; gap: 22px; border-right: 0; border-bottom: 1px solid var(--line); flex: none; }
.rail > .logo { margin: 0; padding: 0; }
.rail-nav { flex-direction: row; gap: 2px; flex: 1; }
.rail-nav a { white-space: nowrap; padding: 5px 10px; }
.rail-foot { flex-direction: row; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; position: relative; }
.rail-foot .rail-action { width: auto; white-space: nowrap; }
.account-menu { position: absolute; top: 34px; right: 0; background: var(--raise); border: 1px solid var(--line-2); z-index: 5; }
.work { flex: 1; min-height: 0; }
.view:has(.overview) { height: 100%; }
.overview { height: 100%; }
.estate-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.scope-switch { display: flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.scope { background: none; border: 0; color: var(--ink-3); font: inherit; font-size: 12.5px; padding: 5px 10px; cursor: pointer; }
.scope.on { background: var(--raise); color: var(--ink); }
.estate-title { display: flex; flex-direction: column; line-height: 1.25; font-size: 12px; color: var(--ink-3); }
.estate-title strong { color: var(--ink); font-size: 14px; font-weight: 560; }
.distribution { display: flex; width: 150px; height: 5px; border-radius: 3px; overflow: hidden; gap: 1px; }
.distribution span { flex: 1 1 0; background: var(--harm); }
.distribution .limited { background: var(--caution); }
.distribution .gated { background: var(--pass); }
.chips { display: flex; gap: 6px; align-items: center; }
.chips-right { margin-left: auto; }
.chip { background: none; border: 1px solid var(--line-2); color: var(--ink-2); border-radius: 999px; font: inherit; font-size: 12px; padding: 4px 11px; cursor: pointer; white-space: nowrap; }
.chip:hover { color: var(--ink); }
.chip.on { border-color: var(--harm); color: var(--harm); }
.chips .btn { height: 28px; font-size: 12px; text-decoration: none; display: inline-flex; align-items: center; }
.sample-note { background: var(--caution-wash); color: var(--caution); font-size: 12.5px; padding: 6px 16px; border-bottom: 1px solid var(--line); }
.overview-grid { grid-template-columns: minmax(380px, 0.95fr) minmax(0, 1.05fr) 340px; }
.table-column { display: flex; flex-direction: column; justify-content: space-between; min-height: 0; border-right: 1px solid var(--line); overflow: hidden; }
.estate-table { overflow-y: auto; min-height: 0; flex: 1; }
.estate-row { display: grid; grid-template-columns: minmax(0, 1.6fr) 124px 78px 62px; gap: 8px; align-items: center; width: 100%; padding: 8px 14px 8px 16px; background: none; border: 0; border-bottom: 1px solid var(--line); border-left: 3px solid var(--line-2); color: inherit; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.estate-row.high { border-left-color: var(--harm); }
.estate-row.moderate { border-left-color: var(--caution); }
.estate-row.low { border-left-color: var(--pass); }
.estate-row:hover { background: var(--hover); }
.estate-row.on { background: var(--harm-wash); }
.estate-top { position: sticky; top: 0; z-index: 1; background: var(--bg); color: var(--ink-3); font-size: 12px; cursor: default; border-left-color: transparent; }
.estate-top:hover { background: var(--bg); }
.estate-agent { display: flex; flex-direction: column; min-width: 0; }
.estate-name { font-weight: 520; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.estate-where { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.estate-score { display: flex; align-items: center; gap: 7px; color: var(--ink-2); }
.right { text-align: right; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: 11px; font-weight: 560; padding: 2px 6px; border-radius: 3px; color: #fff; background: #d6332a; }
.badge.moderate { background: #d98a1f; }
.badge.low { background: #2f8f62; }
.reach-stage { position: relative; background-color: #050608; }
:root[data-theme="light"] .reach-stage { background-color: var(--raise); }
.legend { position: absolute; top: 14px; left: 14px; width: 150px; background: var(--raise); border: 1px solid var(--line-2); border-radius: 6px; padding: 9px 11px; font-size: 12px; display: grid; gap: 5px; z-index: 1; }
.legend-title { color: var(--ink-3); }
.legend-row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 6px; }
.agent-pip { width: 8px; height: 8px; border-radius: 50%; background: var(--harm); display: inline-block; }
.agent-pip.limited { background: var(--caution); }
.agent-pip.gated { background: var(--pass); }
.estate { width: 100%; height: 100%; }
.estate-ring { fill: rgba(255, 255, 255, .025); stroke: var(--line-2); }
.estate-dot { fill: var(--harm); cursor: pointer; }
.estate-dot.limited { fill: var(--caution); }
.estate-dot.gated { fill: var(--pass); }
.estate-dot.on { stroke: var(--ink); stroke-width: 2; }
.estate-label { fill: var(--ink-2); font-size: 13px; }
.agent-panel { padding: 16px 18px 32px; gap: 12px; }
.panel-name { margin: 0; font-size: 19px; }
.panel-kicker { margin-top: -8px; }
.score-card { border: 1px solid var(--line-2); border-radius: 6px; padding: 12px 14px; display: grid; gap: 8px; }
.score-top { display: flex; justify-content: space-between; align-items: center; }
.score-title { font-size: 11px; letter-spacing: .08em; color: var(--ink-2); }
.score-number { font-size: 40px; font-weight: 560; letter-spacing: -.03em; line-height: 1; }
.score-number span { font-size: 14px; color: var(--ink-3); font-weight: 400; letter-spacing: 0; }
.score-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.score-pair > div { display: grid; gap: 2px; }
.score-small { color: var(--ink-3); font-size: 11.5px; }
.score-pair strong { font-size: 16px; font-weight: 560; }
.tone-seen { color: var(--harm); }
.tone-limited { color: var(--caution); }
.tone-gated { color: var(--pass); }
.meter { position: relative; height: 4px; border-radius: 2px; background: var(--line-2); }
.meter.scale { background: linear-gradient(90deg, #2f8f62 0 30%, #d9a21f 30% 60%, #d6332a 60% 100%); }
.meter.bad { background: linear-gradient(90deg, #e6b450, #d6332a); }
.meter.good { background: linear-gradient(90deg, #2f8f62, var(--line-2)); }
.meter-tick { position: absolute; top: -2px; width: 2px; height: 8px; background: var(--ink); }
.hazard { display: grid; gap: 5px; margin-bottom: 10px; font-size: 12.5px; }
.hazard-top { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-2); }
.hazard-value { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hazard-value.bad { color: var(--harm); font-weight: 560; }
.panel-part h3 { font-size: 11px; letter-spacing: .08em; font-weight: 500; }
.test-page { margin: 0 auto; width: 100%; }
@media (max-width: 1180px) {
  .overview-grid { grid-template-columns: 1fr; overflow: auto; }
  .view:has(.overview) { height: auto; overflow: auto; }
  .reach-stage { min-height: 420px; }
  .chips-right { margin-left: 0; }
  .rail { flex-wrap: wrap; height: auto; padding: 8px 16px; }
}

/* Company: risks, last night's attack, and what changed */
.co-actions { display: flex; gap: 8px; flex-shrink: 0; }
.co-section { display: flex; flex-direction: column; gap: 8px; }
.co-section h2 { font-size: 15px; font-weight: 550; letter-spacing: -.01em; }
.co-sub { color: var(--ink-2); }
.co-item, .co-goal { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; }
.co-item b, .co-goal b { font-weight: 550; }
.co-tag { font: 600 11px/20px var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.co-item.critical .co-tag, .co-goal.reached .co-tag { color: var(--harm); }
.co-item.high .co-tag { color: var(--caution); }
.co-goal.held .co-tag { color: var(--pass); }
.co-fix { margin-top: 3px; color: var(--ink-2); font-size: 13px; }
.co-route { margin: 6px 0 0 18px; color: var(--ink-2); font-size: 13px; }
.co-fixed { color: var(--pass); }
.co-new { color: var(--caution); }
.co-runs { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.co-runs th, .co-runs td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.co-runs th { color: var(--ink-2); font-weight: 500; }
