/* Desk page v2: plain white, rule-based. Follows docs/superpowers/specs/2026-11-23-desk-page-v2-mockup.html. Light only. */
:root {
  --ink: #16181d; --ink-2: #4a505c; --ink-3: #7b828f;
  --line: #e4e6ea; --line-2: #eef0f3; --wash: #f7f8fa;
  --accent: #1f4fd8; --red: #b42318; --amber: #a15c07; --green: #1a7f4b;
  --top: 48px; /* the header's height: what sticks under it starts here */
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: var(--ink); }
html { scroll-padding-top: calc(var(--top) + 8px); } /* a link to a step lands below the header */
body { font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: var(--ink); background: #fff; border: 1px solid #c9cdd4; border-radius: 4px; padding: 4px 10px; cursor: pointer; }
button:hover { background: var(--wash); }
button.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
button.primary:hover { background: #2c3038; }
p { margin: 0 0 8px; }
.muted { color: var(--ink-3); }
.spacer { flex: 1; }

/* Header and banners */
/* The header stays at the top of the window while the page scrolls under it. */
header.top { display: flex; align-items: baseline; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3; height: var(--top); background: #fff; }
header.top h1 { font-size: 15px; margin: 0; font-weight: 650; }
header.top h1 a { color: inherit; }
header.top h1 a:hover { text-decoration: none; color: var(--accent); }
header.top .who { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 12.5px; color: var(--ink-3); }
header.top .who button { font-size: 12px; padding: 2px 8px; }
.signin { max-width: 440px; }
.signin form { display: grid; gap: 8px; margin: 16px 0 10px; }
.signin label { font-size: 13px; color: var(--ink-2); }
.signin input[type="email"] { font: inherit; color: var(--ink); border: 1px solid #c9cdd4; border-radius: 4px; padding: 8px 10px; }
.signin button { justify-self: start; }
.signin .hint { color: var(--ink-3); font-size: 12.5px; }
.signin .banner { border: 1px solid var(--line); border-radius: 4px; margin-top: 10px; }
header.top .meta { color: var(--ink-3); font-size: 12.5px; }
.banner { padding: 7px 20px; border-bottom: 1px solid var(--line); font-size: 13px; }
.banner.error { background: #fff8f7; color: var(--red); border-bottom-color: #f3d6d3; }
.banner.warn { background: #fffbe6; color: #5c4b00; border-bottom-color: #ecdf9a; }
.banner.ok { background: #f1f8f3; color: var(--green); border-bottom-color: #cfe8d8; }

/* Left list */
.layout { display: grid; grid-template-columns: 372px minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
/* On a wide screen the desk page is as tall as the window and does not scroll: the header (and any
   banner) stays put, and the list and the incident each scroll in their own pane under it, so
   neither scrollbar runs up beside the header. */
@media (min-width: 961px) {
  body.desk { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  body.desk header.top, body.desk .banner { flex: none; }
  body.desk .layout { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  body.desk main { overflow-y: auto; }
}
/* The list scrolls by itself. Reaching its end does not start scrolling anything else. */
nav.list { border-right: 1px solid var(--line); min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
nav.list .toolbar { position: sticky; top: 0; z-index: 1; }
.group h2 { margin: 0; padding: 14px 14px 6px; font-size: 12px; font-weight: 650; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.group h2 .dot { width: 8px; height: 8px; border-radius: 50%; }
.group h2 .n { color: var(--ink-3); font-weight: 400; }
.dot-needs_work { background: #b42318; }
.dot-known_waiting { background: #f2b705; }
.dot-no_action { background: #9aa1ad; }
.dot-changes { background: var(--accent); }
.toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--wash); font-size: 12.5px; }
.toolbar .all { display: none; }
.js .toolbar .all { display: block; }
.toolbar button { font-size: 12.5px; }
.toolbar button:disabled { color: var(--ink-3); cursor: default; background: #fff; }
/* A row is the checkbox beside the link: a checkbox cannot live inside a link. */
.row { display: block; padding: 8px 14px; border-top: 1px solid var(--line-2); }
.row.pick { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 0 6px; align-items: start; }
.row:hover { background: var(--wash); }
/* The incident shown on the right: a pale blue row with a blue left edge, drawn inside the row so
   nothing shifts. */
.row.sel, .row.sel:hover { background: #eaf0fe; box-shadow: inset 3px 0 0 var(--accent); }
.row.sel .num { font-weight: 650; }
.row.sel .title { color: var(--ink); }
.row input[type="checkbox"] { margin: 3px 0 0; }
.row .body { display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; align-items: start; color: inherit; min-width: 0; }
.row .body:hover { text-decoration: none; }
.row .num { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.row .age { color: var(--ink-3); font-size: 12.5px; text-align: right; }
.row .title { grid-column: 1 / 3; color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { grid-column: 1 / 3; color: var(--ink-3); font-size: 12px; }
.row .sub .warn { color: var(--red); }
.row .sub .run { color: var(--accent); }
.group .empty { margin: 0; padding: 4px 14px 10px; color: var(--ink-3); font-size: 12.5px; }

/* The incident */
main { padding: 22px 34px 60px; min-width: 0; }
main > .empty { color: var(--ink-3); }
/* Home: numbers, the map of sites, and what to open first */
.home p { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }
.home .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.home .nums { display: flex; flex-wrap: wrap; gap: 6px 26px; align-items: baseline; }
.home .nums b { font-size: 20px; font-weight: 650; color: var(--ink); margin-right: 2px; }
.home .map { display: block; width: 100%; max-width: 900px; height: auto; margin: 14px 0 0; }
.home .map text { pointer-events: none; font-size: 12px; fill: var(--ink-2); paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.home .map a:hover { text-decoration: none; }
.home .map text.left { text-anchor: end; }
.site { stroke: #fff; stroke-width: 1.5px; fill-opacity: .85; }
.site-needs_work { fill: #b42318; }
.site-known_waiting { fill: #f2b705; }
.site-no_action { fill: #9aa1ad; }
.site-changes { fill: var(--accent); }
.site.sel { stroke: var(--accent); stroke-width: 3px; }
.map a:hover .site, .map a:focus .site { fill-opacity: 1; }
.home .legend { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.home h2 { font-size: 14px; font-weight: 650; margin: 22px 0 6px; }
.home h2 .back { font-weight: 400; font-size: 12.5px; margin-left: 10px; }
.home .empty { color: var(--ink-3); font-size: 13px; margin: 0; }
.map a:focus-visible .site { stroke: var(--accent); stroke-width: 3px; }
.need { list-style: none; margin: 0; padding: 0; max-width: 900px; border-bottom: 1px solid var(--line-2); }
.need li { border-top: 1px solid var(--line-2); }
.need a { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 150px) 170px 44px; gap: 12px; align-items: baseline; padding: 7px 4px; color: var(--ink); font-size: 13px; }
.need a:hover { background: var(--wash); text-decoration: none; }
.need .num, .need .age { font-family: var(--mono); font-size: 12.5px; }
.need .title, .need .sites { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.need .sites, .need .age { color: var(--ink-3); }
.need .age { text-align: right; }
.need .reason { color: var(--ink-2); }
.need .reason.flag { color: #b42318; }
.crumb { font-size: 12.5px; color: var(--ink-3); }
.crumb .num { font-family: var(--mono); color: var(--ink); }
main h1 { font-size: 20px; line-height: 1.3; margin: 4px 0 6px; font-weight: 650; overflow-wrap: anywhere; }
.inc-state { font-size: 13px; color: var(--ink-2); }
.inc-state b { font-weight: 650; }
.s-needs_work { color: #b42318; }
.s-known_waiting { color: #a15c07; }
.s-no_action { color: #4a505c; }
.inc-state .changed { color: var(--accent); }
.when { font-size: 12.5px; color: var(--ink-3); }
.actions .when { margin-left: 10px; }
p.when { margin: 8px 0 0; }
.headline { margin: 12px 0 0; font-size: 15px; }
/* Diagnosis progress: the panel on the card and the thin bar under a list row. */
progress { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 6px; border: 0; border-radius: 3px; background: var(--line); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--accent); transition: width .6s ease; }
progress::-moz-progress-bar { background: var(--accent); }
.row .row-bar { grid-column: 1 / 3; height: 3px; margin-top: 4px; }
.progress { margin: 12px 0 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--wash); }
.progress .p-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font-size: 13.5px; }
.progress .p-head b { font-weight: 650; }
.progress .p-time { color: var(--ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress .p-stages { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 9px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--ink-3); }
.progress .p-stages li::before { content: "\25CB"; display: inline-block; width: 1.3em; }
.progress .p-stages li.done { color: var(--green); }
.progress .p-stages li.done::before { content: "\2713"; }
.progress .p-stages li.now { color: var(--ink); font-weight: 600; }
.progress .p-stages li.now::before { content: "\25CF"; color: var(--accent); animation: p-pulse 1.2s ease-in-out infinite; }
.progress .p-now { display: flex; align-items: baseline; gap: 8px; margin: 9px 0 0; padding: 6px 9px; border-left: 3px solid var(--accent); border-radius: 0 4px 4px 0; background: #fff; }
.progress .p-tag { font-size: 10.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.progress .p-label { min-height: 1.4em; font-family: var(--mono); font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
/* A new check draws the eye once, briefly, then sits still. */
.progress .p-now.changed { animation: p-flash 1s ease-out; }
@keyframes p-flash { from { background: #dbe6ff; } to { background: #fff; } }
.progress .p-note { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-3); }
/* The card under a running re-diagnosis is the old one: still readable and usable, but set back. */
.progress.old ~ * { opacity: .6; }
@keyframes p-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .progress .p-stages li.now::before, .progress .p-now.changed { animation: none; }
  progress::-webkit-progress-value { transition: none; }
}
.notice { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); border-left: 2px solid #c9cdd4; padding: 2px 0 2px 12px; }
.notice.bad { border-left-color: var(--red); }
.notice.bad b { color: var(--red); font-weight: 650; }
.notice ul { margin: 4px 0 0; padding-left: 18px; }
.actions { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; }

section { margin-top: 26px; }
section > h2 { font-size: 13px; font-weight: 650; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
section > h2 .n { color: var(--ink-3); font-weight: 400; margin-left: 6px; }

/* Ticket numbers linked inside card text open ServiceNow in a new tab. */
main section a[target="_blank"]::after { content: " ↗"; }

/* Alerts */
table.alerts { border-collapse: collapse; width: 100%; font-size: 13px; }
table.alerts td { padding: 5px 10px 5px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.alerts td.c { width: 34px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
table.alerts td.k { width: 170px; }
table.alerts td.d { width: 150px; font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
table.alerts td.x { color: var(--ink-2); overflow-wrap: anywhere; }
table.alerts th { text-align: left; font-weight: 400; font-size: 12px; color: var(--ink-3); padding: 5px 10px 5px 0; border-bottom: 1px solid var(--line); }
table.each { margin-top: 8px; }
table.each td.d { width: auto; }
table.each td.t { white-space: nowrap; color: var(--ink-2); }
.state { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.state.open { background: var(--red); }
.state.cleared { background: var(--green); }
.alert-meta { font-size: 12.5px; color: var(--ink-3); margin: 0 0 6px; }

/* "Show each alert", "Show n more" */
details.more { margin-top: 6px; }
details.more > summary { cursor: pointer; font-size: 12.5px; color: var(--accent); list-style: none; display: inline-block; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary:hover { text-decoration: underline; }

/* What was checked */
ul.checked { list-style: none; margin: 0; padding: 0; }
ul.checked li { padding: 7px 0; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; }
ul.checked .res { grid-column: 1; color: var(--ink-2); font-size: 13px; }
ul.checked .ev { grid-row: 1 / 3; grid-column: 2; font-family: var(--mono); font-size: 12px; align-self: start; padding-top: 2px; white-space: nowrap; }
ul.checked pre.evout { grid-column: 1 / -1; margin: 4px 0 0; }
ul.plain { margin: 0; padding-left: 18px; }
ul.plain li { margin-bottom: 5px; }
ul.plain .why { color: var(--ink-3); }

/* Next steps */
ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
ol.steps > li { counter-increment: s; display: grid; grid-template-columns: 26px minmax(0, 1fr); padding: 12px 0; border-bottom: 1px solid var(--line-2); }
ol.steps > li::before { content: counter(s); color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 5px; }
.cmd { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 4px; background: var(--wash); font-family: var(--mono); font-size: 13px; }
.cmd .dev { padding: 6px 10px; border-right: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.cmd .line { padding: 6px 10px; flex: 1; overflow-x: auto; white-space: nowrap; }
.cmd button { border: 0; border-left: 1px solid var(--line); border-radius: 0 4px 4px 0; background: transparent; font-size: 12px; color: var(--ink-2); align-self: stretch; }
.cmd button:hover { background: #eef0f3; }
.cmd .copy { display: none; }
.js .cmd .copy { display: block; }
.look { margin: 8px 0 4px; font-size: 13px; color: var(--ink-2); }
.branches { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.branches li { display: grid; grid-template-columns: minmax(180px, 34%) 1fr; gap: 12px; padding: 4px 0; }
.branches .if { color: var(--ink); }
.branches .then { color: var(--ink-2); }
.escalate { border-left: 2px solid var(--red); padding-left: 12px; }
.escalate .tag { color: var(--red); font-weight: 650; font-size: 12.5px; }
.escalate .contact { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }

/* Card footer */
footer.cardfoot { margin-top: 30px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
footer.cardfoot p { margin: 0; }
footer.cardfoot form { display: contents; } /* its controls sit in the footer's row, as in the mockup */
footer.cardfoot input { font: inherit; color: var(--ink); border: 1px solid #c9cdd4; border-radius: 4px; padding: 4px 8px; width: 220px; max-width: 100%; }

/* Tool output */
pre { background: var(--wash); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; overflow: auto; max-height: 420px; font: 12.5px/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 8px; }
code { font: 13px var(--mono); background: var(--wash); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; overflow-wrap: anywhere; }

/* Evidence page */
.evidence-page { padding: 22px 34px 60px; }
.evidence-page dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 13px; margin: 0 0 16px; }
.evidence-page dt { color: var(--ink-3); }
.evidence-page dd { margin: 0; overflow-wrap: anywhere; }
.evidence-page h2 { font-size: 13px; font-weight: 650; margin: 18px 0 6px; }
.evidence-page h2 .muted { font-weight: 400; margin-left: 6px; }
.evidence-page details > summary { cursor: pointer; font-size: 12.5px; color: var(--accent); margin: 12px 0 6px; }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  nav.list { border-right: 0; border-bottom: 1px solid var(--line); overflow-y: visible; }
  header.top { height: auto; min-height: var(--top); flex-wrap: wrap; } /* it may wrap on a narrow screen */
  main, .evidence-page { padding: 18px; }
  /* A phone is too narrow for the whole map: it keeps a usable size and scrolls sideways in its box. */
  .home .mapbox { overflow-x: auto; }
  .home .map { min-width: 620px; }
  .need a { grid-template-columns: 96px minmax(0, 1fr) 44px; gap: 2px 12px; }
  .need .sites, .need .reason { grid-column: 2 / 4; white-space: normal; }
  .need .sites { grid-row: 2; }
  .need .reason:empty { display: none; }
}

/* Fault path strip */
.path { display: flex; align-items: stretch; margin: 4px 0 2px; overflow-x: auto; }
.hop { flex: 1 1 0; min-width: 150px; border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; background: #fff; }
.hop .kind { font-size: 11.5px; color: var(--ink-3); }
.hop .name { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hop .st { font-size: 12px; margin-top: 4px; color: var(--ink-2); overflow-wrap: anywhere; }
.hop .st a { font-family: var(--mono); font-size: 11.5px; }
/* A box's state is its mark and words (and a faint tint for a fault), not a coloured edge. */
.hop.bad { border-color: #efcdc8; background: #fff8f7; }
.hop .al { font-size: 12px; color: var(--red); margin-top: 2px; }
.ok-t { color: var(--green); }
.bad-t { color: var(--red); }
.unk-t { color: var(--ink-3); }
.link { flex: 0 0 26px; align-self: center; height: 1px; background: #b9bec7; }
.link.cut { background: repeating-linear-gradient(90deg, var(--red) 0 4px, transparent 4px 8px); height: 2px; }
.path-note { font-size: 12px; color: var(--ink-3); margin: 6px 0 0; }

/* Confirmation page */
.confirm-page { padding: 22px 34px 60px; max-width: 720px; }
.confirm-page .ask { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
ul.picked { list-style: none; margin: 14px 0 0; padding: 0; }
ul.picked li { padding: 6px 0; border-bottom: 1px solid var(--line-2); }
ul.picked .num { font-family: var(--mono); font-size: 12.5px; margin-right: 8px; }
a.button { display: inline-block; padding: 4px 10px; border: 1px solid #c9cdd4; border-radius: 4px; color: var(--ink); }
a.button:hover { background: var(--wash); text-decoration: none; }

/* Paste box and verdict under a run step */
.branches li.hit { background: #f1f8f3; box-shadow: -8px 0 0 #f1f8f3, 8px 0 0 #f1f8f3; }
.branches li.hit .if::before { content: "✓ "; color: var(--green); }
.verdict { margin-top: 12px; border-left: 2px solid var(--green); padding: 2px 0 2px 12px; }
.verdict.pending, .verdict.failed { border-left-color: var(--line); }
.verdict .who { font-size: 12px; color: var(--ink-3); }
.verdict .v { margin: 2px 0 6px; }
.verdict .label { margin: 4px 0 0; font-size: 12px; color: var(--ink-2); }
.verdict .next { margin: 0 0 6px; font-weight: 600; }
.verdict .next.esc { color: var(--red); font-weight: 650; font-size: 12.5px; border-left: 2px solid var(--red); padding-left: 8px; }
.verdict .rule { margin: 8px 0 0; font-size: 12px; }
.verdict .also { font-size: 13px; color: var(--ink-2); margin: 8px 0 4px; }
.verdict .more-cmd + .more-cmd { margin-top: 10px; }
details.paste { margin-top: 10px; }
details.paste summary { cursor: pointer; font-size: 13px; color: var(--accent); list-style: none; }
details.paste summary::-webkit-details-marker { display: none; }
details.paste textarea { display: block; box-sizing: border-box; width: 100%; height: 108px; margin-top: 8px; font: 12.5px/1.45 var(--mono); border: 1px solid #c9cdd4; border-radius: 4px; padding: 8px; resize: vertical; color: var(--ink); }
.paste-row { display: flex; gap: 10px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.paste-error { margin: 10px 0 0; font-size: 13px; color: var(--red); }
.paste-off { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-3); }
details.earlier { margin-top: 8px; font-size: 12px; color: var(--ink-3); }
details.earlier summary { cursor: pointer; }
details.earlier ul { margin: 4px 0 0; padding-left: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
