/* The review app's style (plan.md Part 5, How it looks): the specification viewer's colours, type and quiet surface,
   with three states it never needed — approved, rejected, waiting. Its parts are not copied; the frame is the app's. */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f5;
  --panel: #fbfbfa;
  --text: #1d1c1a;
  --muted: #6b6862;
  --faint: #93908a;
  --line: #e6e4df;
  --line-soft: #efedea;
  --accent: #8a5a2b;
  --accent-soft: #f2e9de;
  --code-bg: #f4f3f0;
  --place: #3f6f86;
  --place-soft: #e4eef3;
  --ok: #3d7a4a;
  --ok-soft: #e7f0e4;
  --bad: #a3412e;
  --bad-soft: #f7e5df;
  --warn: #8a6400;
  --warn-soft: #f5edd3;
  --on-state: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px rgba(0, 0, 0, .06);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --read: 840px;
  --wide: 1200px;
  --surface: #ffffff;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #202025; --bg: #16161a; --bg-soft: #1c1c21; --panel: #1a1a1f; --text: #e8e6e1; --muted: #a3a09a; --faint: #77746e;
    --line: #2c2c33; --line-soft: #26262c; --accent: #d9a86c; --accent-soft: #2a2219; --code-bg: #202026;
    --place: #79b3ca; --place-soft: #1b262b; --ok: #8fc79c; --ok-soft: #1b2a1f; --bad: #e3927f; --bad-soft: #2f1d18;
    --warn: #d9b660; --warn-soft: #2b2512; --on-state: #16161a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --surface: #202025; --bg: #16161a; --bg-soft: #1c1c21; --panel: #1a1a1f; --text: #e8e6e1; --muted: #a3a09a; --faint: #77746e;
  --line: #2c2c33; --line-soft: #26262c; --accent: #d9a86c; --accent-soft: #2a2219; --code-bg: #202026;
  --place: #79b3ca; --place-soft: #1b262b; --ok: #8fc79c; --ok-soft: #1b2a1f; --bad: #e3927f; --bad-soft: #2f1d18;
  --warn: #d9b660; --warn-soft: #2b2512; --on-state: #16161a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* ---------- base ---------- */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg-soft); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 1.4em; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
code {
  font-family: var(--mono); font-size: .86em;
  background: var(--code-bg); border: 1px solid var(--line-soft); border-radius: 5px; padding: .1em .35em;
}
pre {
  font-family: var(--mono); font-size: 13px; line-height: 1.55; overflow-x: auto;
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13.5px; }
.error { color: var(--bad); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- controls: flat, a hairline border, muted until hovered ---------- */

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--muted);
  font: inherit; font-size: 13px; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
button:hover, .btn:hover { color: var(--text); border-color: var(--faint); text-decoration: none; }
button:disabled { opacity: .5; cursor: default; }
.btn.icon { width: 36px; padding: 0; font-size: 14px; }
button.link {
  height: auto; padding: 0; border: 0; background: none; color: var(--accent); font-size: inherit;
}
button.link:hover { text-decoration: underline; text-underline-offset: 3px; }

input[type="text"], input[type="search"], input[type="number"], input[type="password"], input:not([type]), textarea, select {
  width: 100%; font: inherit; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
  transition: border-color .12s ease;
}
textarea { line-height: 1.5; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-soft); outline-offset: 1px; border-color: var(--accent); }
input[type="radio"], input[type="checkbox"] { accent-color: var(--accent); }
input[type="file"] { font-size: 13.5px; color: var(--muted); }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: var(--surface); }
label { display: block; font-size: 13.5px; color: var(--muted); }

/* ---------- the frame: one header, the app's few places ---------- */

header.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  height: 64px; padding: 0 28px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--text); white-space: nowrap; }
.brand span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.brand:hover { text-decoration: none; }
#nav { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
#nav a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: 13.5px; white-space: nowrap;
}
#nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
#nav a.on { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
#nav .count { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 650; font-size: 11px; font-variant-numeric: tabular-nums; }
header.top .spacer { flex: 1; }
.who { color: var(--muted); font-size: 13px; white-space: nowrap; }
.who .role { color: var(--faint); }
header.top form { margin: 0; }
.menu-btn { display: none; }

@media (max-width: 900px) {
  header.top { padding: 0 12px; gap: 10px; }
  .menu-btn { display: inline-flex; }
  .who { display: none; }
  #nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 12px 14px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  header.top.open #nav { display: flex; }
  #nav a { padding: 9px 10px; font-size: 15px; }
}

/* ---------- the page: a reading width, and a wider one for tables and screenshots ---------- */

#main { max-width: calc(var(--read) + 64px); margin: 0 auto; padding: 44px 32px 120px; }
#main.wide { max-width: calc(var(--wide) + 64px); }
#main:focus { outline: none; }
@media (max-width: 900px) { #main { padding: 24px 16px 96px; } }

h2, h3, h4 { letter-spacing: -.02em; line-height: 1.25; }
#main h2 {
  font-size: 32px; font-weight: 680; margin: 0 0 24px;
  padding-bottom: 0; border-bottom: 0;
}
#main h3 { font-size: 19px; font-weight: 660; margin: 32px 0 10px; }
#main h4 { font-size: 15px; font-weight: 660; margin: 18px 0 6px; color: var(--muted); }
.eyebrow {
  font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .10em;
  color: var(--accent); margin-bottom: 4px;
}
@media (max-width: 900px) { #main h2 { font-size: 24px; } }

/* ---------- tables: small uppercase headers, hairline rows ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 18px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
th {
  background: var(--bg-soft); color: var(--muted); font-weight: 620; font-size: 12px;
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--bg-soft); }
.align-right { text-align: right; }
.align-center { text-align: center; }

/* ---------- documents, set as the viewer sets the specification ---------- */

.markdown { font-size: 16.5px; line-height: 1.65; }
.markdown h1 { font-size: 28px; font-weight: 680; letter-spacing: -.02em; margin: 8px 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
#main .markdown h2 { font-size: 22px; margin: 40px 0 12px; padding-bottom: 8px; }
#main .markdown h3 { font-size: 18px; margin: 30px 0 8px; }
.markdown p, .markdown ul, .markdown ol { margin-bottom: 14px; }
.markdown li { margin: 3px 0; }
.markdown table { font-size: 14.5px; }
.markdown-table-wrap { max-width: 100%; border-radius: 10px; }
.markdown-table-wrap > table { display: table; width: 100%; margin: 0; }
.markdown blockquote { margin: 0 0 14px; padding-left: 16px; border-left: 3px solid var(--line); color: var(--muted); }

/* ---------- notices ---------- */

.empty {
  padding: 40px 24px; border: 1px solid var(--line); border-radius: 14px;
  color: var(--muted); background: var(--panel); text-align: center;
}
.hint { color: var(--faint); font-size: 13.5px; }
.flash {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  display: flex; align-items: center; gap: 9px; max-width: min(420px, calc(100vw - 40px));
  padding: 11px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); color: var(--text); font-size: 14px; box-shadow: var(--shadow);
}
.flash::before { content: ""; flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.flash.ok::before { background: var(--ok); }

/* ---------- an item: the one place colour is strong is the answer ---------- */

.card {
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  padding: 22px 24px; margin: 0 0 18px; scroll-margin-top: 150px;
}
.card.waiting { border-left: 3px solid var(--accent); }
.card > header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; font-size: 12px; }
.card .kind { color: var(--faint); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; }
.card .key { padding: 2px 7px; border-radius: 5px; background: var(--accent-soft); font-family: var(--mono); font-weight: 600; font-size: 12px; color: var(--accent); font-variant-numeric: tabular-nums; }
.card .state { font-weight: 600; color: var(--muted); }
.card > header .state { margin-left: auto; font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--bg-soft); }
.card > header .state.ok { background: var(--ok-soft); }
.card > header .state.warn { background: var(--warn-soft); }
.card > header .state.bad { background: var(--bad-soft); }
.card .state.accent { color: var(--accent); }
.card .state.ok { color: var(--ok); }
.card .state.bad { color: var(--bad); }
.card .state.warn { color: var(--warn); }
.ids { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; margin-left: auto; }
.ref {
  height: auto; padding: 0; border: 0; border-radius: 0; background: none;
  color: var(--muted); font-size: 13px; font-weight: 600; border-bottom: 1px dotted var(--faint);
}
.ref:hover, .ref[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); background: none; }
.peek {
  position: absolute; z-index: 60; max-height: 60vh; overflow-y: auto;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); box-shadow: var(--shadow); font-size: 14.5px; line-height: 1.55;
}
.peek-id { font-size: 12px; font-weight: 650; letter-spacing: .06em; color: var(--accent); margin-bottom: 4px; }
.peek-text p { margin: 0 0 8px; }
.sentence { font-size: 17px; line-height: 1.6; margin: 0 0 10px; }
.card .body { color: var(--text); font-size: 15px; }
.card .body p:last-child { margin-bottom: 0; }
.notes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0 0; }
.today { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.today.ok { color: var(--ok); background: var(--ok-soft); }
.today.warn { color: var(--warn); background: var(--warn-soft); }
.rules { display: grid; gap: 10px; margin: 4px 0 10px; }
.rule-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.rule-row .ref { justify-self: start; }
.rule-text { font-size: 17px; line-height: 1.6; }
.rule-text p { margin: 0; }
.rules-label { margin-top: 12px; }
.rules-label + .rules .rule-text { font-size: 15px; }
.ref.gone { text-decoration: line-through; }
.wording { font-size: 15px; color: var(--muted); margin: 0 0 10px; }
mark.ins { background: var(--accent-soft); color: inherit; border-radius: 4px; padding: 0 .15em; }
del.del { color: var(--faint); text-decoration: line-through dashed; }
figure { margin: 14px 0; }
figcaption { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.shot { display: block; border: 1px solid var(--line); border-radius: 10px; }
.shot-link { display: block; border-radius: 10px; cursor: zoom-in; }
.shot-link:hover .shot { border-color: var(--accent); }
.terms { font-size: 13.5px; color: var(--muted); margin: 8px 0 0; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 10px; }
.compare .version { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.compare .version:first-child { background: var(--panel); color: var(--muted); }
.compare .version:last-child { border-color: var(--accent); background: var(--accent-soft); }
.compare h4 { margin-top: 0 !important; font-size: 12px !important; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 700px) { .compare { grid-template-columns: 1fr; } }
.options-text { font-size: 14.5px; }

.answer { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.answer-label { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.answers { margin-top: 12px; }
.give { min-height: 38px; height: auto; padding: 8px 14px; font-size: 14px; font-weight: 600; background: var(--bg); }
.give.ok { color: var(--on-state); border-color: var(--ok); background: var(--ok); }
.give.bad { color: var(--bad); border-color: var(--line); }
.give.warn { color: var(--muted); border-color: var(--line); }
.give.ok:hover { background: var(--ok); color: var(--on-state); filter: brightness(1.08); }
.give.bad:hover { background: var(--bad-soft); color: var(--bad); }
.give.warn:hover { background: var(--warn-soft); color: var(--warn); }
.give.ok[aria-pressed="true"] { background: var(--ok); color: var(--on-state); }
.give.bad[aria-pressed="true"] { background: var(--bad); color: var(--on-state); }
.give.warn[aria-pressed="true"] { background: var(--warn); color: var(--on-state); }
.give.danger { background: var(--bad); border-color: var(--bad); color: var(--on-state); }
.give.neutral { background: var(--warn); border-color: var(--warn); color: var(--on-state); }
.give.decision { background: var(--accent); border-color: var(--accent); color: var(--on-state); }
.give.danger:hover, .give.neutral:hover, .give.decision:hover { color: var(--on-state); filter: brightness(1.08); }
.give-link { font-weight: 600; font-size: 13.5px; }
.task-given { flex: 1; min-width: 220px; }
.decide-now {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px;
  padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 600;
}
.standing { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 14.5px; font-weight: 600; }
.standing .link { font-size: 13.5px; }
.standing .decide-link { color: var(--accent); }
.picked-by { font-size: 13px; font-weight: 650; color: var(--place); }
.picked-note { font-weight: 400; color: var(--muted); }

.choices { display: grid; gap: 8px; }
.choice {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-size: 15px;
}
.choice:hover { border-color: var(--faint); }
.choice.on { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin-top: 5px; }
.choice-body { display: grid; gap: 4px; flex: 1; min-width: 0; }
.choice-body p { margin: 0; }
.choice-why { font-size: 13.5px; color: var(--muted); }
.choice-why strong { color: var(--accent); margin-right: 6px; }
.own-answer { margin-top: 4px; }
.compose { margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }

.marks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 16px; }
.mark { padding: 10px 12px; border-top: 3px solid var(--line); background: var(--panel); border-radius: 8px; font-size: 14px; }
.mark.approved, .mark.passed, .mark.done { border-top-color: var(--ok); }
.mark.rejected, .mark.failed { border-top-color: var(--bad); }
.mark.question, .mark.missing, .mark.could-not-be-tested { border-top-color: var(--warn); }
.mark.decision { border-top-color: var(--accent); }
.mark-who { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mark-word { font-weight: 650; margin: 2px 0; }
.mark-option p, .mark-option { display: inline; }
.mark-option, .mark-answer, .mark-note { margin-top: 3px; }
.mark-when { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--faint); }
.mark .shot { margin-top: 8px; max-width: 100%; }
.thread { margin-top: 12px; display: grid; gap: 8px; }
.reply { padding: 10px 12px; border-left: 3px solid var(--place); background: var(--place-soft); border-radius: 0 8px 8px 0; font-size: 14.5px; }

.single > p:first-child { font-size: 14px; }
.history { margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--panel); }
.history ul { list-style: none; padding: 0; display: grid; gap: 8px; margin: 10px 0 0; }

/* ---------- Waiting on you: the current step, its gate, its items down the page ---------- */

.gate { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px 20px; margin: 4px 0 20px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.gate .gate-line { margin: 0; font-size: 15px; }
.gate .carry { grid-column: 2; grid-row: 1; margin: 0; text-align: right; color: var(--muted); }
.gate .carry .link { color: var(--place); font-weight: 600; }
.gate progress { grid-column: 1 / -1; grid-row: 2; }
progress { width: 100%; height: 5px; appearance: none; border: 0; border-radius: 2px; background: var(--line-soft); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--line-soft); }
progress::-webkit-progress-value { background: var(--ok); }
progress::-moz-progress-bar { background: var(--ok); }
.step-tools { position: sticky; top: 64px; z-index: 10; background: var(--bg-soft); padding: 10px 0; margin-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.segmented { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.segmented button { height: 34px; border: 0; background: none; font-size: 13px; padding: 0 10px; border-radius: 7px; }
.segmented button:hover { background: var(--bg-soft); }
.segmented button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px #00000012; }
.group h3 { scroll-margin-top: 130px; }
.group-count { color: var(--faint); font-weight: 500; }
.dropped { margin: 0 0 14px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; }
.dropped summary { cursor: pointer; font-size: 13.5px; font-weight: 620; color: var(--muted); }
.dropped-body { margin-top: 10px; font-size: 14.5px; }
.check-line { font-size: 13.5px; margin: 0 0 14px; }
.rechecks { display: grid; gap: 12px; margin: 0 0 18px; }
.rechecks h3 { margin: 0; }
.check-line.ok { color: var(--ok); }
.check-line.bad { color: var(--bad); font-weight: 600; }
.new-round {
  position: sticky; top: 64px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: var(--place-soft); color: var(--place); font-weight: 600;
  box-shadow: var(--shadow);
}
.step-files { margin-top: 28px; display: grid; gap: 12px; }
.step-file { border: 1px solid var(--line); border-radius: 12px; padding: 16px 22px; background: var(--surface); }
.step-file > summary { cursor: pointer; font-size: 13.5px; font-weight: 620; color: var(--muted); font-family: var(--mono); }
.step-file[open] > summary { margin-bottom: 8px; }
.design-doc { margin-top: 8px; }
.design-doc li.in-place { list-style: none; margin: 10px 0 10px -1.4em; }
.cases-block, .findings-block { margin: 8px 0 24px; }
.apart { margin: 0 0 18px; padding: 14px 18px; border: 1px solid var(--warn); border-radius: 12px; background: var(--panel); }
#main .apart h3 { margin-top: 0; }
.apart .from { font-size: 12.5px; font-weight: 600; color: var(--warn); margin: 0 0 4px; }

/* ---------- the overview: the board, whole ---------- */

.overview > section { margin-top: 40px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.topline {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px;
  margin: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--line);
}
.summary-field { grid-column: span 2; min-width: 0; padding: 20px 24px; background: var(--surface); }
.topline dt { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.topline dd { margin: 0; font-size: 14px; line-height: 1.65; }
.summary-field-1 { grid-column: span 2; }
.summary-field-1 dd { font-size: 22px; font-weight: 650; letter-spacing: -.03em; line-height: 1.3; }
.summary-field-2 dd strong, .summary-field-3 dd strong { font-size: 24px; font-weight: 650; letter-spacing: -.03em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.summary-field-3 dd strong { color: var(--accent); }
.summary-field-4, .summary-field-5 { grid-column: span 3; padding-top: 18px; padding-bottom: 18px; background: var(--panel); }
.summary-field-4 dt, .summary-field-5 dt { margin-bottom: 3px; }
.waits { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.waits li .muted { display: block; margin-top: 3px; }
.waits li a { font-weight: 600; text-underline-offset: 3px; }
.status-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; background: var(--bg-soft); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-pill.done { color: var(--ok); background: var(--ok-soft); }
.status-pill.in-progress { color: var(--accent); background: var(--accent-soft); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.strip { display: inline-flex; gap: 2px; }
.seg { display: inline-block; width: 9px; height: 14px; border-radius: 2px; background: var(--line); }
.seg.closed { background: var(--ok); }
.seg.open { background: var(--accent); }
.seg.sent-back { background: var(--warn); }
.seg.skipped { background: repeating-linear-gradient(135deg, var(--faint) 0 2px, transparent 2px 4px); }
.phases { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.phase { border-bottom: 1px solid var(--line-soft); }
.phase:last-child { border-bottom: 0; }
.phase > summary {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 120px 150px 12px; gap: 14px; align-items: center;
  padding: 17px 20px; cursor: pointer; list-style: none; font-size: 14px;
}
.phase > summary::-webkit-details-marker { display: none; }
.phase > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); justify-self: end; transition: transform .12s ease; }
.phase[open] > summary::after { transform: rotate(45deg); }
.phase > summary:hover { background: var(--bg-soft); }
.phase.open > summary { background: var(--accent-soft); }
.phase[open] > summary { border-bottom: 1px solid var(--line-soft); }
.ph-n { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ph-name { display: grid; min-width: 0; gap: 4px; }
.ph-name strong { font-weight: 620; }
.ph-can { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-when { color: var(--muted); font-size: 13px; }
.ph-est { display: grid; font-size: 13px; color: var(--muted); }
.off { font-size: 12px; font-weight: 600; }
.off.late { color: var(--bad); }
.off.early { color: var(--ok); }
.ph-body { padding: 24px; font-size: 14.5px; background: var(--bg); }
.ph-can-full { color: var(--text); }
.ph-took { color: var(--muted); }
.phase-steps td:first-child { min-width: 210px; }
.rule-group { margin-top: 12px; }
.rule-section { display: flex; justify-content: space-between; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--line-soft); padding-bottom: 4px; }
.rules-list, .pieces { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.rules-list li, .pieces li { display: grid; grid-template-columns: 70px 1fr; gap: 10px; }
.rule-id { font-weight: 650; color: var(--muted); font-size: 13px; }
.rule-text p { margin: 0; }
.rule-owner { font-size: 12.5px; color: var(--faint); }
@media (max-width: 900px) {
  .phase > summary { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 6px 12px; }
  .phase > summary::after { grid-column: 3; grid-row: 1; }
  .phase > summary .ph-n { grid-row: 1 / 3; align-self: start; }
  .phase > summary .ph-name { grid-column: 2; }
  .phase > summary .strip, .ph-est, .ph-when { grid-column: 2; text-align: left; }
  .ph-body { padding-left: 18px; }
}

@media (max-width: 560px) {
  .topline { grid-template-columns: 1fr; }
  .summary-field, .summary-field-1, .summary-field-4, .summary-field-5 { grid-column: 1; }
  .summary-field { padding: 16px 18px; }
  .summary-field-1 dd { font-size: 22px; }
  .card { padding: 18px 16px; }
  .phase > summary { padding: 14px; }
  .tabs { flex-wrap: wrap; }
}

/* ---------- cases, the record, documents, what you find ---------- */

.tabs { display: flex; gap: 2px; margin: 0 0 16px; }
.tabs a { padding: 5px 10px; border-radius: 7px; color: var(--muted); font-size: 13.5px; }
.tabs a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.case-head { display: flex; align-items: baseline; gap: 10px; }
.case-key { font-weight: 650; }
.case-state { font-size: 12.5px; color: var(--muted); }
.case-state.ok { color: var(--ok); font-weight: 600; }
.case-state.bad { color: var(--bad); font-weight: 600; }
.case-sentence p { margin: 2px 0 0; }
.result { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; }
.result.ok { color: var(--ok); }
.result.bad { color: var(--bad); }
.result.warn { color: var(--warn); }
.result-note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.r-ok { color: var(--ok); }
.r-open { color: var(--muted); }
.r-bad { color: var(--bad); }
.record-search { margin: 0 0 12px; }
.step-marks > td { background: var(--bg-soft); padding: 12px 14px 4px; }
.step-marks .table-wrap { background: var(--bg); }
.word { font-weight: 600; font-size: 13.5px; }
.word.approved, .word.passed, .word.done { color: var(--ok); }
.word.rejected, .word.failed { color: var(--bad); }
.word.question, .word.missing, .word.could-not-be-tested { color: var(--warn); }
.word.decision { color: var(--accent); }
.document { display: grid; gap: 18px; }
.contents { padding: 12px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.contents-title { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.contents ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 28px; font-size: 14px; }
.contents li { break-inside: avoid; margin: 2px 0; }
.contents .link { color: var(--text); font-size: 14px; text-align: left; white-space: normal; }
.contents .link:hover { color: var(--accent); }
.markdown h2 { scroll-margin-top: 76px; }
@media (max-width: 700px) { .contents ol { columns: 1; } }
.steps-table td:first-child { white-space: nowrap; }
.steps-table tr.current td { background: var(--accent-soft); }
.steps-table tr.not-started td, .steps-table tr.skipped td { color: var(--faint); }
.step-state strong { font-weight: 620; }
.steps-table tr.closed .step-state strong { color: var(--ok); }


.finding { display: grid; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin: 8px 0 28px; }
.finding label { display: grid; gap: 6px; }
.finding input[type="number"] { max-width: 120px; }
.finding button[type="submit"] { justify-self: start; min-height: 40px; padding: 0 18px; background: var(--accent); color: var(--on-state); border-color: var(--accent); }
.findings-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.findings-list li { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }

/* ---------- signing in ---------- */

body.signin { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg-soft); }
.signin-card {
  width: min(420px, 100%); padding: 36px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
}
.signin-card h1 { font-size: 22px; font-weight: 680; letter-spacing: -.02em; margin: 0 0 4px; }
.signin-card h1 span { color: var(--faint); font-weight: 500; }
.signin-card form { display: grid; gap: 14px; margin-top: 18px; }
.signin-card label { display: grid; gap: 6px; }
.signin-card button { height: 38px; background: var(--accent); border-color: var(--accent); color: var(--on-state); font-size: 14px; font-weight: 600; }
.signin-card button:hover { color: var(--on-state); filter: brightness(1.08); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media print {
  header.top, .step-tools, .answer, .flash, .peek { display: none !important; }
}
.answers-lines { margin: 4px 0 10px; font-size: 14.5px; }
.disagreement-body { margin: 18px 0; }
.disagreement-section { padding: 14px 16px; margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; }
.disagreement-section h4 { margin: 0 0 6px; font-size: 14px; font-weight: 650; }
.disagreement-section p { margin: 0; line-height: 1.65; white-space: pre-line; }
.answers-lines ul, .unanswered { margin: 4px 0 0; padding-left: 1.1em; display: grid; gap: 4px; }
.unanswered { font-size: 15px; }
.shots-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.shots-compare figure { margin: 0; }
.shots-compare .shot { width: 100%; }
@media (max-width: 700px) { .shots-compare { grid-template-columns: 1fr; } }
.screen-facts { font-size: 14.5px; color: var(--muted); margin: 10px 0 0; }
.screen-facts strong { color: var(--text); font-weight: 600; }
.screen-facts p { margin: 0; }
.screen-open { display: inline-block; margin-top: 6px; font-weight: 600; }
.screen-all-words { margin: 12px 0 20px; }
.screen-all-words summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.word-change-label { color: var(--muted); font-size: 12px; }
.words { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 4px; font-size: 15px; }
.words li { padding: 4px 10px; border-left: 2px solid var(--line); }
.figma { margin: 0 0 18px; }
.figma > p { padding: 12px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin: 0; }
.signature { margin: 0 0 18px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.signature h3 { margin: 0 0 4px; }
.signature p { margin: 0; }
.line-words { color: var(--muted); }
abbr.line-key { text-decoration: underline dotted var(--faint); cursor: help; }
.finding-went { font-size: 14px; }
.finding-went .state { font-weight: 650; }
.record-phase { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin: 0 0 10px; }
.record-phase > summary { padding: 12px 16px; cursor: pointer; font-size: 15px; }
.record-phase > .table-wrap, .record-phase > p { margin: 0 16px 14px; }
.rollup-cell { display: grid; gap: 2px; font-size: 13px; margin-top: 4px; }
td.nowrap { white-space: nowrap; }
.cost-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 12px 0 8px; }
.cost-tile { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cost-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.cost-value { font-size: clamp(22px, 2vw, 28px); font-weight: 650; letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.cost-note { font-size: 12.5px; color: var(--muted); }
table.plans td.num, table.plans th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
table.plans td.num { white-space: nowrap; }
table.plans tr.total td { font-weight: 650; border-top: 1px solid var(--line); background: var(--accent-soft); padding-top: 16px; padding-bottom: 16px; }
table.plans td.strong { font-weight: 650; }
.costs .segmented { width: fit-content; margin: 16px 0; }
table.plans th.l { text-align: left; }

/* Review controls keep their context when a card or a filter changes. */
.slot, .cases tr { scroll-margin-top: 156px; }
[aria-busy="true"] { cursor: progress; }
.outside > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--warn); }
.outside[open] > summary { margin-bottom: 20px; }
.outside { border-color: var(--line); background: var(--warn-soft); }
.outside .card:last-child { margin-bottom: 0; }
.step-page > .eyebrow { margin-bottom: 8px; }
.step-page > h2 { margin-bottom: 10px !important; }
.step-page > .muted { margin-bottom: 24px; }
.card .rules { margin: 6px 0 16px; }
.rule-row .ref { align-self: start; margin-top: 4px; }
.choice { padding: 14px 16px; }
.choice:focus-within { border-color: var(--accent); }
.choice.on .choice-text { font-weight: 600; }
.own-answer { background: var(--surface); }
.standing { row-gap: 12px; }
.standing .change-mark { margin-left: auto; }
.mark { padding: 14px 16px; border-top-width: 2px; }
.shots-compare { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.shot { background: var(--bg-soft); }
.screen-facts { padding: 14px 16px; border-radius: 10px; background: var(--bg-soft); line-height: 1.8; }
.record-phase > summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 18px 20px; list-style: none; }
.record-phase > summary::-webkit-details-marker { display: none; }
.record-phase > summary::after { content: ""; flex: none; width: 6px; height: 6px; margin-left: auto; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); }
.record-phase[open] > summary::after { transform: rotate(45deg); }
.record-phase > summary:hover { background: var(--bg-soft); border-radius: 12px; }
.record .word { display: inline-block; white-space: nowrap; }
.steps-table td:first-child { min-width: 160px; }
.cases .case-cell { min-width: 240px; width: 36%; }
.cases th:not(:first-child) { min-width: 150px; }
.plans td:first-child { min-width: 200px; }
.calc td:first-child { width: 60%; }
.signin-card input { min-height: 44px; }
.signin-card .error { padding: 12px; background: var(--bad-soft); border-radius: 8px; font-size: 14px; }
@media (max-width: 1000px) {
  .cost-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .gate { grid-template-columns: 1fr; gap: 10px; }
  .gate .carry { grid-column: 1; grid-row: 3; text-align: left; }
  .summary-field { padding: 18px; }
  .summary-field-1 { grid-column: 1 / -1; }
  .summary-field-2, .summary-field-3 { grid-column: span 3; }
  .segmented button { min-height: 38px; }
  .card > header .state { margin-left: 0; }
  .give { min-height: 42px; }
  .ph-body { padding: 16px; }
  .finding { padding: 18px; }
}
@media (max-width: 560px) {
  .summary-field-2, .summary-field-3 { grid-column: 1; }
  .cost-tiles { gap: 10px; }
  .cost-tile { padding: 16px; }
  .cost-value { overflow-wrap: anywhere; }
  .card .actions.answers { gap: 8px; }
  .card .actions.answers > .give { flex: 1 1 auto; }
  .card .task-given { min-width: 0; flex-basis: 100%; }
  .standing .change-mark { margin-left: 0; }
  .record-phase > summary > .muted { flex-basis: 100%; font-size: 13px; }
  .record-phase > summary::after { position: absolute; right: 20px; top: 24px; }
  .record-phase > summary { position: relative; padding-right: 38px; }
  .signin-card { padding: 28px 24px; }
}

/* Keep review work close at hand. */
.next-dock { position: fixed; z-index: 25; bottom: 24px; right: max(24px, calc((100vw - var(--read)) / 2)); padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.next-dock .btn { min-height: 40px; background: var(--accent); color: var(--on-state); border-color: var(--accent); font-weight: 600; }
.step-page { padding-bottom: 60px; }
.standing.only-actions { justify-content: flex-end; }
.record-search-form { display: flex; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 28px; }
.record-search-form .record-search { margin: 0; min-width: 0; flex: 1; }
.record-search-form .btn { min-height: 40px; }
.record-results { margin-bottom: 36px; }
.mobile-cell-label { display: none; }

/* One viewer for the related screenshots, sharing a zoom and a position. */
.shot-viewer { width: calc(100vw - 48px); max-width: 1600px; height: calc(100dvh - 48px); max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.shot-viewer[open] { display: flex; flex-direction: column; }
.shot-viewer::backdrop { background: #000a; backdrop-filter: blur(4px); }
.shot-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.shot-tools { display: flex; align-items: center; gap: 8px; }
.shot-zoom { min-width: 48px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.shot-choices { flex: none; margin: 12px 20px; width: fit-content; max-width: calc(100% - 40px); }
.shot-choices button { white-space: normal; height: auto; min-height: 34px; line-height: 1.3; padding: 8px 12px; }
.shot-stage { flex: 1; min-height: 0; overflow: auto; background: var(--bg-soft); padding: 16px; overscroll-behavior: contain; }
.shot-stage img { display: block; max-width: none; margin: 0 auto; border: 1px solid var(--line); }
.shot-stage .error { padding: 24px; text-align: center; }

/* Costs: compare outcomes first, then inspect each source of cost. */
.cost-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
#main .cost-page-heading h2 { margin: 0; font-size: 36px; }
.cost-revision { font-size: 12px; color: var(--muted); padding: 7px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.cost-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; margin-bottom: 28px; }
.cost-metric { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; padding: 24px; height: auto; min-height: 166px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; line-height: 1.5; white-space: normal; }
.cost-metric:last-child { border-right: 0; }
.cost-metric:hover { background: var(--bg-soft); }
.cost-metric:focus-visible { outline-offset: -3px; }
.metric-value { font-size: clamp(22px, 2vw, 29px); line-height: 1.2; letter-spacing: -.035em; font-weight: 660; color: var(--text); font-variant-numeric: tabular-nums; }
.cost-metric:first-child .metric-value { font-size: 34px; }
.cost-metric.has-loss .metric-value { color: var(--bad); }
.metric-arrow { position: absolute; right: 16px; bottom: 14px; opacity: .5; }
.cost-note { padding-right: 8px; }
.cost-navigation { display: flex; gap: 28px; position: sticky; top: 64px; z-index: 12; background: var(--bg-soft); border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.cost-navigation button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; height: 50px; padding: 0 2px; font-size: 14px; }
.cost-navigation button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }
.cost-section { scroll-margin-top: 135px; margin-bottom: 54px; }
.cost-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.cost-section-number { display: inline-block; margin-right: 10px; color: var(--accent); font-family: var(--mono); font-size: 12px; }
#main .cost-section-heading h3 { display: inline; font-size: 22px; margin: 0; }
.cost-section-heading p { margin: 7px 0 0; }
.costs .cost-section-heading .segmented { margin: 0; flex: none; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.plan-card { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 22px; height: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-align: left; white-space: normal; line-height: 1.5; }
.plan-card:hover { border-color: var(--accent); background: var(--surface); }
.plan-card.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plan-card-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--text); }
.plan-card-heading strong { font-size: 17px; }
.plan-price { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.plan-kept { display: grid; grid-template-columns: 1fr auto; margin: 22px 0 18px; gap: 4px; }
.plan-kept .cost-label { grid-column: 1 / -1; }
.plan-kept > strong { font-size: 34px; line-height: 1.15; letter-spacing: -.035em; font-weight: 650; font-variant-numeric: tabular-nums; }
.loss-tag { align-self: center; font-size: 11px; font-weight: 600; padding: 4px 7px; border-radius: 5px; color: var(--bad); background: var(--bad-soft); }
.cost-meter { display: flex; height: 7px; background: var(--line-soft); border-radius: 4px; overflow: hidden; }
.meter-cost { background: var(--faint); }
.meter-kept { background: var(--ok); }
.meter-loss { background: var(--bad); }
.plan-card-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: 12px; }
.plan-detail-label { color: var(--accent); }
.plan-breakdown { margin-top: 24px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.breakdown-heading { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
#main .breakdown-heading h4 { margin: 0; color: var(--text); font-size: 16px; }
.plan-breakdown .table-wrap { border: 0; border-radius: 0; margin: 0; }
.costs table { background: var(--surface); }
.costs td, .costs th { padding: 15px 22px; }
.costs tbody th { text-align: left; font-weight: 450; font-size: 14px; text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--line-soft); }
.costs .calc tbody th { width: 55%; }
.costs .calc th.num, .costs .feature-costs th.num { text-align: right; }
.cost-subtotal td, .cost-subtotal th { border-top: 1px solid var(--line); color: var(--muted); background: var(--panel); }
.costs .keep-row td, .costs .keep-row th { padding-top: 19px; padding-bottom: 19px; background: var(--ok-soft); font-weight: 650; font-size: 16px; border: 0; }
.costs .keep-row td.r-bad { background: var(--bad-soft); }
.action-name { display: block; color: var(--text); }
.cost-provider { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 4px; }
.costs .feature-costs th:first-child { width: 43%; }
.costs .feature-costs tr.at-loss td:last-child { background: var(--bad-soft); }
.platform-layout { display: grid; grid-template-columns: 280px 1fr; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.platform-total { display: flex; flex-direction: column; gap: 8px; padding: 30px; background: var(--panel); border-right: 1px solid var(--line); }
.platform-total > strong { font-size: 42px; line-height: 1.2; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.platform-lines { padding: 8px 26px; }
.platform-line { padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.platform-line:last-child { border-bottom: 0; }
.platform-line-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 14px; }
.platform-line-head strong { font-weight: 550; }
.platform-meter { height: 4px; background: var(--line-soft); border-radius: 3px; margin-top: 14px; overflow: hidden; }
.platform-meter > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

@media (max-width: 900px) {
  .cost-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-metric { border-bottom: 1px solid var(--line); min-height: 150px; }
  .cost-metric:nth-child(2n) { border-right: 0; }
  .cost-metric:nth-last-child(-n+2) { border-bottom: 0; }
  .cost-section-heading { align-items: flex-start; flex-wrap: wrap; }
  .platform-layout { grid-template-columns: 220px 1fr; }
}
@media (max-width: 700px) {
  .cases-block .table-wrap { overflow: visible; border: 0; background: none; }
  table.cases, .cases tbody { display: block; min-width: 0; }
  .cases thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cases tbody tr { display: block; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; background: var(--surface); overflow: hidden; }
  .cases td { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 14px 16px; min-width: 0; }
  .cases .case-cell { display: block; min-width: 0; width: auto; padding: 18px 16px; background: var(--panel); }
  .cases .case-sentence { font-size: 15px; margin-top: 8px; }
  .mobile-cell-label { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
  .case-result-value { min-width: 0; overflow-wrap: anywhere; }
  .cases .result { align-items: flex-start; }
  .cases .give-link { white-space: normal; }
  .next-dock { right: 16px; bottom: 16px; max-width: calc(100% - 32px); }
  .shot-viewer { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 12px; }
  .shot-toolbar { flex-wrap: wrap; padding: 12px; }
  .shot-tools { gap: 6px; flex-wrap: wrap; }
  .shot-choices { margin: 10px 12px; max-width: calc(100% - 24px); }
  .shot-tools .btn { min-height: 40px; }
  .cost-page-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  #main .cost-page-heading h2 { font-size: 30px; }
  .cost-metric { padding: 18px; }
  .metric-value, .cost-metric:first-child .metric-value { font-size: 26px; }
  .cost-navigation { gap: 20px; overflow-x: auto; margin-bottom: 26px; }
  .cost-navigation button { font-size: 13px; flex-shrink: 0; }
  .cost-section { margin-bottom: 38px; }
  .cost-section-heading { gap: 14px; }
  .plan-cards { grid-template-columns: 1fr; }
  .plan-card { padding: 20px; }
  .platform-layout { grid-template-columns: 1fr; }
  .platform-total { padding: 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .platform-lines { padding: 4px 22px; }
  .costs td, .costs th { padding: 12px 14px; }
  .costs .calc { min-width: 0; }
  .costs .calc tbody th { width: 40%; }
  .costs .calc td { min-width: 0; }
  .costs .calc th, .costs .calc td { font-size: 12px; }
  .action-table { border: 0; background: none; overflow: visible; }
  .feature-costs, .feature-costs tbody { display: block; }
  .feature-costs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .feature-costs tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
  .costs .feature-costs th:first-child { display: block; grid-column: 1 / -1; width: auto; }
  .feature-costs td { display: block; white-space: normal !important; text-align: left !important; font-size: 13px; padding: 14px 12px; border: 0; }
  .feature-costs td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; margin-bottom: 6px; font-weight: 400; }
  .feature-costs .cost-provider { font-size: 11px; }
}
@media (max-width: 420px) {
  .record-search-form { flex-wrap: wrap; }
  .record-search-form input { flex-basis: 100% !important; }
  .record-search-form .btn { flex: 1; }
  .cost-metric { padding: 15px; }
  .metric-value, .cost-metric:first-child .metric-value { font-size: 23px; }
  .cost-metric .cost-label, .cost-metric .cost-note { font-size: 11px; }
}
@media print { .next-dock, .cost-navigation, .shot-viewer { display: none !important; } }
.single { padding-bottom: 60px; }
.case-result-value > a { display: block; margin-top: 6px; }
.next-dock { bottom: max(16px, env(safe-area-inset-bottom)); }
@media (min-width: 901px) { .cost-summary { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.saved-at { margin: 8px 0 0; font-size: 12px; }

/* Review pages: a clear subject and outcome, with the working area underneath. */
.card { padding: 0; margin-bottom: 12px; overflow: clip; }
.card.waiting { border-left: 1px solid var(--line); }
.card > header { display: block; margin: 0; padding: 18px 22px; position: relative; }
.card-identity { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.card .key { background: var(--bg-soft); color: var(--muted); }
.card .kind { font-size: 10px; letter-spacing: .08em; }
.card-toggle { display: grid; grid-template-columns: minmax(0, 1fr) auto 12px; gap: 18px; align-items: center; width: 100%; height: auto; padding: 0; border: 0; border-radius: 3px; background: none; white-space: normal; text-align: left; line-height: 1.5; color: var(--text); }
.card-toggle:hover { background: none; color: var(--text); }
.card-title { font-size: 16px; font-weight: 600; letter-spacing: -.015em; overflow-wrap: anywhere; }
.card > header .state { margin: 0; max-width: 230px; font-size: 11.5px; padding: 4px 9px; border-radius: 6px; font-weight: 600; }
.card > header .state.accent, .card > header .state.place { background: var(--place-soft); color: var(--place); }
.card-chevron { width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); justify-self: end; transition: transform .15s; }
.card.collapsed .card-chevron { transform: rotate(-45deg); }
.card.collapsed > header:hover { background: var(--panel); }
.card.collapsed .card-title { font-size: 15px; font-weight: 500; }
.card-content { padding: 4px 22px 22px; border-top: 1px solid var(--line-soft); }
.card-content > :first-child { margin-top: 18px; }
.card-content > .answer:first-child { border-top: 0; padding-top: 0; }
.card-content > :last-child { margin-bottom: 0; }
.card .state.place { color: var(--place); }
.card .notes { margin-bottom: 16px; }
.today { background: none !important; padding-left: 0 !important; font-size: 12px; }
#main .group > h3 { display: flex; align-items: baseline; gap: 8px; font-size: 15px; margin: 26px 0 12px; }
.group-count { font-size: 12px; }
.gate { background: var(--surface); padding: 20px 22px; margin-top: 20px; }
.gate-line strong { font-size: 24px; font-weight: 650; letter-spacing: -.04em; margin-right: 5px; }
.gate progress { height: 4px; }
.step-tools { margin-bottom: 0; padding: 8px 0; border: 0; }
.filters { background: transparent; border: 0; padding: 0; gap: 5px; }
.filters button { color: var(--muted); border: 1px solid transparent; min-height: 38px; }
.filters button.on { border-color: var(--line); background: var(--surface); box-shadow: none; }
.dropped, .outside { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 13px 2px; margin-bottom: 0; }
.outside > summary, .apart .from { color: var(--muted); }
.outside[open] { padding-bottom: 18px; }
.outside .card { background: var(--surface); }
.dropped-body { padding: 12px 16px; border-radius: 10px; background: var(--surface); }
.apart:not(.outside) { border-color: var(--line); background: var(--surface); }
.step-file > summary, .history > summary { padding: 16px 20px; list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.step-file > summary::-webkit-details-marker, .history > summary::-webkit-details-marker { display: none; }
.step-file > summary::after, .history > summary::after { content: '+'; margin-left: auto; font: 18px var(--sans); }
.step-file[open] > summary::after, .history[open] > summary::after { content: '−'; }
.step-file, .history { padding: 0; overflow: hidden; background: var(--surface); }
.step-file[open] > summary, .history[open] > summary { border-bottom: 1px solid var(--line-soft); margin-bottom: 0; }
.step-file > .markdown, .history > .version, .history > ul, .history > p { padding: 20px; margin: 0; }
.findings-block { background: var(--surface); padding: 24px; border: 1px solid var(--line); border-radius: 14px; }
#main .findings-block > h3 { margin-top: 0; }

/* Overview keeps the three measures distinct from the two people's queues. */
.topline { gap: 12px; border: 0; background: none; overflow: visible; }
.summary-field { border: 1px solid var(--line); border-radius: 12px; }
.summary-field-4, .summary-field-5 { background: var(--surface); }
.summary-field-4 dt, .summary-field-5 dt { font-size: 13px; font-weight: 650; color: var(--text); margin-bottom: 12px; }
.waits li { position: relative; padding-right: 62px; }
.waits li a { position: absolute; right: 0; top: 0; padding: 4px 9px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; color: var(--text); }
.phase.open > summary { background: var(--surface); }
.phase.open .ph-n { color: var(--place); background: var(--place-soft); border-color: transparent; }
.ph-n { border-radius: 8px; }
.ph-body { background: var(--panel); }
.legend { font-size: 12px; line-height: 1.7; }

/* Record: quieter summaries and legible outcomes, including narrow screens. */
.record-differences { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: var(--surface); margin: 24px 0; }
#main .record-differences > h3 { margin: 0 0 8px; font-size: 15px; }
.record-differences > p { margin: 0; }
.record-differences .card { margin-top: 16px; }
.record-mark { display: inline-block; padding: 3px 8px; border-radius: 5px; background: var(--bg-soft); font-size: 12px; font-weight: 600; }
.record-mark.approved, .record-mark.passed, .record-mark.done, .record-mark.decision { color: var(--ok); background: var(--ok-soft); }
.record-mark.rejected, .record-mark.failed { color: var(--bad); background: var(--bad-soft); }
.record-mark.question, .record-mark.missing, .record-mark.could-not-be-tested { color: var(--warn); background: var(--warn-soft); }
.record td:nth-child(2) { min-width: 190px; }
.record td:last-child { max-width: 420px; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .card > header { padding: 16px; }
  .card-toggle { grid-template-columns: minmax(0, 1fr) 12px; gap: 10px; }
  .card-toggle .card-title { grid-column: 1; font-size: 15px; }
  .card-toggle .state { grid-column: 1; justify-self: start; max-width: none; }
  .card-chevron { grid-column: 2; grid-row: 1 / 3; }
  .card-content { padding: 0 16px 18px; }
  .gate { padding: 16px; }
  .filters { flex-wrap: wrap; padding-bottom: 4px; }
  .filters button { flex: none; }
  .findings-block { padding: 18px; }
  .topline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-field { grid-column: span 2; }
  .summary-field-2, .summary-field-3 { grid-column: span 1; }
  .summary-field-2 dd strong, .summary-field-3 dd strong { font-size: 20px; }
  .summary-field-1 dd { font-size: 20px; }
  .record-phase > .table-wrap { margin: 0 12px 12px; }
  .record-results .table-wrap { overflow: visible; border: 0; background: transparent; }
  .record, .record tbody { display: block; }
  .record thead { display: none; }
  .record tr { display: grid; grid-template-columns: 1fr auto; padding: 16px; gap: 10px 12px; margin-bottom: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
  .record td { padding: 0; border: 0; min-width: 0 !important; font-size: 13px; }
  .record td:nth-child(1) { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 11px; align-self: center; }
  .record td:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .record td:nth-child(2) a { display: inline-block; font-weight: 650; margin-bottom: 4px; }
  .record td:nth-child(2) .small { color: var(--text); font-size: 15px; }
  .record td:nth-child(3) { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 11px; }
  .record td:nth-child(4), .record td:nth-child(5) { grid-column: 1 / -1; }
  .record td:last-child:empty { display: none; }
  .phase-steps, .phase-steps tbody, .steps-table, .steps-table tbody { display: block; }
  .phase-steps thead, .steps-table thead { display: none; }
  .phase-steps tr, .steps-table > tbody > tr:not(.step-marks) { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .phase-steps td, .steps-table > tbody > tr:not(.step-marks) > td { display: block; border: 0; padding: 3px 0; min-width: 0; font-size: 13px; }
  .phase-steps td:first-child, .steps-table > tbody > tr > td:first-child { font-weight: 600; }
  .phase-steps td:nth-child(n+3) { display: inline; color: var(--muted); font-size: 11px; margin-right: 10px; }
  .phase-steps td:nth-child(3)::before { content: 'Started '; }
  .phase-steps td:nth-child(4)::before { content: 'Closed '; }
  .phase-steps td:nth-child(5)::before { content: 'Took '; }
}
@media (prefers-reduced-motion: reduce) { .card-chevron { transition: none; } }
@media print { .card-content[hidden] { display: block !important; } .card-chevron { display: none; } }
.coverage-details { margin: 14px 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.coverage-details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.coverage-details .unanswered { margin-top: 16px; margin-bottom: 0; font-size: 14px; }
#main .markdown h1 { font-size: 24px; letter-spacing: -.025em; line-height: 1.3; }
#main .markdown h2 { font-size: 20px; margin: 28px 0 12px; }
#main .markdown h3 { font-size: 17px; margin: 24px 0 10px; }
.design-doc > div > h1:first-child { margin-top: 20px; }
.figma { margin-top: 16px; }
.reply { border-left: 0; border-radius: 8px; }
@media (max-width: 700px) {
  #main .markdown h1 { font-size: 21px; }
  #main .markdown h2 { font-size: 18px; }
}
.findings-block > .finding { border: 0; border-radius: 0; padding: 0; margin: 20px 0 28px; }
.findings-list { gap: 0; margin-bottom: 0; }
.findings-list li { padding: 20px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.findings-list li:last-child { padding-bottom: 0; }
.finding-went { font-size: 12px; color: var(--muted); margin-bottom: 0; }
.finding-went .state { font-weight: 600; }
.finding-went .state.ok { color: var(--ok); }
.finding-went .state.warn, .case-state.warn { color: var(--warn); }
.case-head { flex-wrap: wrap; gap: 4px 10px; margin-bottom: 5px; }
.case-state { padding: 2px 7px; border-radius: 5px; background: var(--bg-soft); font-size: 11px; }
.case-state.ok { background: var(--ok-soft); }
.case-state.bad { background: var(--bad-soft); }
.case-state.warn { background: var(--warn-soft); }
.steps-table > tbody > tr.current > td { background: var(--place-soft); }
@media (max-width: 700px) {
  .steps-table > tbody > tr.current { background: var(--place-soft); }
  .steps-table .step-marks, .steps-table .step-marks > td { display: block; width: 100%; }
  .step-marks > td { padding: 10px; }
  .item-marks, .item-marks tbody { display: block; }
  .item-marks tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 14px; border-bottom: 1px solid var(--line); }
  .item-marks tr:last-child { border-bottom: 0; }
  .steps-table .item-marks td { display: block; min-width: 0; border: 0; padding: 0; white-space: normal; font-size: 13px; }
  .item-marks td:first-child { grid-column: 1 / -1; font-weight: 500; }
  .item-marks td:not(:first-child)::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
  .item-marks .word { font-size: 12px; }
}
.saved-choice { margin-bottom: 16px; font-size: 15px; }
.saved-choice p { margin-bottom: 0; }
.saved-choice .answer-label { margin-bottom: 7px; }

/* Compact working layouts; review data and workflow completion remain distinct. */
:root { --read: 920px; }
#main { padding-top: 28px; }
#main h2 { font-size: 28px; margin-bottom: 20px; }
#main h3 { margin-top: 26px; font-size: 18px; }
.step-navigation { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.step-navigation select { width: min(100%, 400px); font-size: 12px; padding: 7px 30px 7px 10px; background: var(--surface); color: var(--muted); min-height: 36px; }
.current-step-link { font-size: 12px; white-space: nowrap; }
.step-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 14px; }
#main .step-heading h2 { margin: 0; }
.step-heading p { margin: 0; font-size: 12px; }
.gate { padding: 13px 16px; gap: 10px 18px; margin: 0 0 8px; border-radius: 10px; }
.gate .gate-line { font-size: 13px; }
.gate-line strong { font-size: 18px; letter-spacing: -.025em; margin-right: 3px; }
.gate .carry { font-size: 12px; }
.gate progress { height: 3px; }
.dropped, .outside { padding: 10px 0; }
.dropped summary, .outside > summary { font-size: 12px; }
.step-tools { padding: 8px 0 4px; }
.filters button { min-height: 34px; height: 34px; font-size: 12px; padding: 0 9px; }
#main .group > h3 { margin: 18px 0 8px; font-size: 13px; }
.card { border-radius: 10px; margin-bottom: 8px; }
.card > header { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 12px; padding: 13px 16px; }
.card-identity { flex-direction: column; align-items: flex-start; gap: 3px; margin: 0; }
.card .kind { font-size: 9px; letter-spacing: .035em; line-height: 1.35; }
.card .key { padding: 1px 5px; font-size: 11px; }
.card-title, .card.collapsed .card-title { font-size: 14px; line-height: 1.5; }
.card-toggle { gap: 12px; min-height: 36px; }
.card-flags { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; max-width: 250px; }
.card > header .state { padding: 3px 7px; font-size: 11px; }
.card-content { padding: 0 16px 16px; }
.card-content > :first-child { margin-top: 14px; }
.card .rules { margin-top: 14px; margin-bottom: 12px; }
.card .notes { margin-bottom: 12px; }
.card .answer { padding-top: 14px; margin-top: 14px; }
.card .answer:first-child { margin-top: 14px; }
.card .actions { gap: 7px; }
.card .give { height: 34px; font-size: 12px; }
.card .compose { padding: 14px; margin-top: 12px; }
.card .choice { padding: 11px 13px; }
.card .mark { padding: 11px 13px; font-size: 13px; }
.card .mark-who { font-size: 10px; }
.new-reply-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--place); font-size: 10px; font-weight: 650; white-space: nowrap; }
.new-reply-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.reply { padding: 12px 14px; font-size: 14px; }
.reply.unread { box-shadow: inset 0 0 0 1px var(--place); }
.reply .mark-who { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 5px; }
.step-files { margin-top: 18px; gap: 10px; }
.step-file > summary, .history > summary { padding: 12px 16px; font-size: 12px; }
.step-file > .markdown, .history > .version, .history > ul, .history > p { padding: 16px; }
.coverage-details { margin: 10px 0; padding: 11px 14px; }
.screen-facts { padding: 10px 12px; font-size: 12px; }
.words { font-size: 13px; }
.overview > section { margin-top: 28px; }
.summary-field { padding: 16px 18px; }
.topline dt { margin-bottom: 5px; }
.summary-field-1 dd { font-size: 20px; }
.summary-field-2 dd strong, .summary-field-3 dd strong { font-size: 22px; }
.summary-field-4 dt, .summary-field-5 dt { margin-bottom: 8px; }
.topline { gap: 10px; }
.phase > summary { padding-top: 14px; padding-bottom: 14px; }
.record-search-form { padding: 10px; margin-bottom: 20px; }
.record-phase > summary { padding: 14px 16px; font-size: 14px; }
.record-differences { padding: 14px 16px; margin: 20px 0; }
.record-results { margin-bottom: 24px; }
th, td { padding: 10px 14px; }
.findings-block { padding: 18px; }
.findings-block > .finding { gap: 12px; margin: 16px 0 20px; }
.findings-list li { padding: 14px 0; }
.findings-list li > p:first-child { margin-bottom: 6px; font-size: 14px; }
.findings-block > .finding { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.finding > label:first-of-type { grid-column: 1 / -1; }
.finding > button[type="submit"] { justify-self: end; }
.cost-page-heading { margin-bottom: 20px; }
.plan-card { padding: 18px; }
.cost-section { margin-top: 28px; }
@media (max-width: 700px) {
  #main { padding-top: 20px; }
  #main h2 { font-size: 24px; }
  .step-navigation { gap: 8px; flex-wrap: wrap; }
  .step-navigation select { width: 100%; }
  .current-step-link { margin-left: auto; }
  .step-heading { gap: 5px 12px; }
  .step-heading p { font-size: 11px; }
  .gate { padding: 12px; gap: 8px; }
  .card > header { grid-template-columns: 36px minmax(0, 1fr); gap: 9px; padding: 12px; align-items: start; }
  .card-identity { padding-top: 2px; }
  .card .kind { font-size: 8px; }
  .card-flags { grid-column: 1; justify-content: flex-start; max-width: none; }
  .card-toggle { gap: 6px 9px; }
  .card-content { padding: 0 12px 14px; }
  .card .give { min-height: 40px; }
  .filters button { min-height: 38px; }
  .summary-field { padding: 14px; }
  .summary-field-2 dd strong, .summary-field-3 dd strong { font-size: 19px; }
  .record-phase > summary { padding-right: 36px; }
  .record-phase > summary::after { top: 20px; right: 16px; }
  .record tr { padding: 13px; gap: 8px; margin-bottom: 8px; }
  .findings-block { padding: 14px; }
  .findings-block > .finding { grid-template-columns: minmax(0, 1fr); }
  .finding > button[type="submit"] { justify-self: start; }
}
@media print { .step-navigation { display: none; } }
/* Keep the native select's interaction, with one consistently inset, centered arrow. */
select, .step-navigation select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23828282' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 12px;
}


/* One list treatment for rules, extensions and platform pieces on Overview. */
.phase-scope-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin: 24px 0 14px; }
.phase-scope-heading h4 { margin: 0; font-size: 16px; color: var(--text); }
.phase-scope-heading > span { color: var(--muted); font-size: 13px; }
.ph-contents .rule-group { margin: 14px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.ph-contents .rule-section { margin: 0; padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--text); }
.ph-contents .rule-section > span:last-child { font-size: 12px; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 5px; padding: 0 7px; }
.ph-contents .rules-list { margin: 0; gap: 0; }
.ph-contents .rules-list > li { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.ph-contents .rules-list > li:last-child { border-bottom: 0; }
.ph-contents .rule-id { font: 12px/1.75 var(--mono); color: var(--muted); }
.ph-contents .rule-text { font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.ph-contents .rule-text strong { font-weight: 600; }
.ph-contents .rule-owner { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }

/* Review cards have a readable header, a response area and separate settings. */
.card { margin: 0 0 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 2px 5px rgb(0 0 0 / .035); }
.card > header { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 18px 20px; }
.card-identity { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 9px; padding: 0; }
.card .key { padding: 2px 6px; font-size: 12px; line-height: 1.5; }
.card .kind { font-size: 13px; line-height: 1.5; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
.review-audience { margin-left: auto; font-size: 13px; line-height: 1.5; color: var(--muted); }
.card-toggle { grid-template-columns: minmax(0, 1fr) auto 12px; gap: 16px; min-height: 28px; }
.card-title, .card.collapsed .card-title, .card-toggle .card-title { font-size: 16px; line-height: 1.5; font-weight: 600; }
.card-flags { max-width: 280px; }
.card > header .state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.5; padding: 5px 9px; }
.status-symbol { font-size: 14px; line-height: 1; }
.card.settled { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.card.settled > header { background: color-mix(in srgb, var(--ok-soft) 65%, var(--surface)); }
.card.settled.collapsed > header:hover { background: var(--ok-soft); }
.card-content { padding: 0 20px 18px; }
.card-content > :first-child { margin-top: 18px; }
.card .rule-text, .card .rules-label + .rules .rule-text, .card .body, .card .sentence, .card .choice-text, .card .saved-choice { font-size: 15px; line-height: 1.65; }
.card .rule-text strong { font-weight: 600; }
.card .rule-row { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; }
.card .answer-label { font-size: 13px; text-transform: none; letter-spacing: 0; }
.card .choice-why, .card .terms, .card .notes, .card .mark { font-size: 14px; }
.card .mark-who { font-size: 12px; }
.card .answer { padding: 18px; margin: 18px 0 0; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 9px; }
.card .answer:first-child { margin-top: 18px; padding-top: 18px; }
.card .actions { gap: 10px; }
.card .give { height: 38px; font-size: 14px; padding: 0 14px; }
.card .choice { padding: 12px 14px; background: var(--surface); }
.card .choice.on { background: var(--accent-soft); }
.card-settings { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 20px -20px -18px; padding: 12px 20px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }
.card-settings strong { font-weight: 500; color: var(--text); }
.card-settings .reviewer-change { font-size: 13px; padding: 4px 0 4px 12px; height: auto; color: var(--muted); }
.card-settings .reviewer-change:hover { color: var(--text); }
.card-content > .card-settings:last-child { margin-bottom: -18px; }
.reviewer-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.reviewer-dialog::backdrop { background: rgb(0 0 0 / .48); }
.reviewer-dialog h2 { margin: 0 0 6px; font-size: 22px; }
.dialog-item { color: var(--muted); font-size: 14px; line-height: 1.5; margin-bottom: 22px; }
.reviewer-options { padding: 0; margin: 0; border: 0; display: grid; gap: 10px; min-width: 0; }
.reviewer-options legend { margin-bottom: 10px; font-size: 13px; font-weight: 600; }
.reviewer-options label { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.reviewer-options label.selected { border-color: var(--accent); background: var(--accent-soft); }
.reviewer-options input { margin: 5px 0 0; flex: 0 0 auto; }
.reviewer-options label > span { display: grid; gap: 4px; }
.reviewer-options strong { font-size: 15px; font-weight: 600; }
.reviewer-options label span span, .dialog-note { font-size: 13px; line-height: 1.5; color: var(--muted); }
.dialog-note { margin: 16px 0 22px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.dialog-actions button { min-height: 40px; font-size: 14px; }
@media (max-width: 700px) {
  .card > header { padding: 16px; gap: 10px; }
  .card-identity { gap: 7px; }
  .review-audience { flex-basis: 100%; margin-left: 0; }
  .card-toggle { grid-template-columns: minmax(0, 1fr) 12px; gap: 10px; }
  .card-toggle .card-title { grid-column: 1; }
  .card-flags { grid-column: 1; justify-content: flex-start; max-width: none; }
  .card-chevron { grid-column: 2; grid-row: 1 / 3; }
  .card-content { padding: 0 16px 16px; }
  .card .answer { padding: 14px; }
  .card .give { min-height: 42px; }
  .card-settings { margin: 18px -16px -16px; padding: 10px 16px; }
  .card-content > .card-settings:last-child { margin-bottom: -16px; }
  .card-settings .reviewer-change { min-height: 40px; }
  .ph-contents .rules-list > li { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 12px; }
  .ph-contents .rule-section { padding: 12px; }
  .reviewer-dialog { padding: 20px; }
}

.dialog-actions .primary { background: var(--accent); border-color: var(--accent); color: var(--on-state); font-weight: 600; }

.card .answer:not(:has(.controls:not([hidden]))) { padding: 0; border: 0; background: none; }
#main .group > h3 { font-size: 15px; margin: 26px 0 12px; }

/* Step context and review progress are distinct reading blocks. */
.step-context { margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.step-context .step-heading { display: block; margin-bottom: 0; }
.step-context .step-heading p { margin-top: 8px; color: var(--muted); }
.step-context .review-intro { margin: 12px 0 0; }
.step-page .gate { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.design-coverage { margin: 12px 0 22px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
#main .design-coverage h3 { margin: 0 0 6px; font-size: 15px; }
.design-coverage p { margin: 0 0 10px; font-size: 14px; }
.design-coverage p:last-child { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.design-coverage summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.design-coverage .unanswered { margin: 10px 0 0; font-size: 14px; }

/* Reading list: the approved step 2/3 layout, also used when opening one of its items. */
.reading-list .step-heading { margin-bottom: 8px; }
.review-intro { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.preview-note { color: var(--muted); font-size: 12px; margin: 0 0 18px; }
.reading-list .gate { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; gap: 10px 20px; }
.reading-list .gate .gate-line, .reading-list .gate .carry { font-size: 13px; }
.reading-list .step-tools { border-bottom: 0; }
.reading-card { border: 1px solid var(--line); border-radius: 10px; box-shadow: none; margin-bottom: 12px; }
.reading-card.waiting, .reading-card.settled { border: 1px solid var(--line); }
.reading-card > header, .reading-card.settled > header { background: none; gap: 8px; padding: 18px 20px; }
.reading-card .card-identity { gap: 8px; }
.reading-card .kind, .reading-card .key { font-size: 12px; font-weight: 400; color: var(--muted); }
.reading-card .key { padding: 0; background: none; font-family: var(--sans); }
.reading-card .key::before { content: '·'; margin-right: 8px; }
.reading-card .card-flags { margin-left: auto; max-width: none; }
.reading-card > header .state { padding: 0; background: none; font-size: 12px; font-weight: 400; }
.reading-card .status-symbol { display: none; }
.reading-card .card-toggle { grid-template-columns: minmax(0, 1fr) 12px; gap: 16px; }
.reading-card .card-title, .reading-card.collapsed .card-title { font-size: 17px; line-height: 1.45; letter-spacing: -.01em; }
.reading-card .card-chevron { grid-column: 2; grid-row: 1; }
.reviewer-summary { font-size: 12px; color: var(--muted); line-height: 1.6; }
.reading-card .card-content > :first-child { margin-top: 0; }
.reading-card .body { color: var(--muted); font-size: 14px; }
.reading-card .marks { grid-template-columns: 1fr; gap: 10px; }
.reading-card .mark, .reading-card .choice-difference { padding: 12px 15px; background: var(--warn-soft); border: 0; border-left: 3px solid var(--warn); border-radius: 0; font-size: 14px; }
.reading-card .mark-who { text-transform: none; letter-spacing: 0; color: var(--warn); }
.reading-card .mark-when { font-size: 11px; }
.reading-card .choice-difference { margin: 16px 0; }
.reading-card .choice-difference .answer-label { color: var(--warn); }
.reading-card .choice-difference p { margin: 3px 0 0; }
.reading-card .choice-difference p p { display: inline; }
.reading-card .answer, .reading-card .answer:not(:has(.controls:not([hidden]))) { margin: 17px 0 0; padding: 15px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.reading-card .answer-label { margin-bottom: 10px; font-size: 13px; font-weight: 600; }
.reading-card .choices { gap: 0; }
.reading-card .choice { padding: 10px 0; border: 0; border-radius: 0; background: none; gap: 10px; }
.reading-card .choice.on { background: none; }
.reading-card .choice input { accent-color: var(--ok); }
.reading-card .choice-text { font-size: 14px; }
.reading-card .choice-why { font-size: 12px; }
.reading-card .choice-why strong { color: var(--ok); }
.reading-card .choice-why > span { display: block; }
.reading-card .give { font-size: 13px; border-radius: 7px; }
.reading-card .give.ok { background: var(--ok); color: var(--on-state); border-color: var(--ok); }
.reading-card .give.bad, .reading-card .give.warn { background: var(--surface); color: var(--text); border-color: var(--line); }
.reading-card .card-settings { background: none; border: 0; padding-top: 0; margin-top: 14px; }
.reading-card .card-settings .reviewer-change, .reading-card .change-mark { font-size: 12px; color: var(--muted); }
.reading-card .standing { margin: 0; }
@media (max-width: 700px) {
  .reading-card > header { padding: 16px; }
  .reading-card .card-title { font-size: 16px; }
  .reading-card .card-flags { max-width: 100%; }
  .reading-card .answer { padding: 15px 0 0; }
  .reading-list .gate { grid-template-columns: 1fr; }
  .reading-list .gate .carry { grid-row: 3; grid-column: 1; text-align: left; }
}

.suite-part { margin: 16px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.suite-test + .suite-test { margin-top: 14px; }
.suite-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0 0 4px; }
.suite-head code { overflow-wrap: anywhere; }
.suite-check { margin: 0 0 6px; }

/* Step 10 separates exploration from resolution of reported findings. */
.step-page .own-use-progress { display: block; margin-bottom: 24px; }
.own-use-progress p { margin: 0 0 8px; }
.own-use-guide { margin: 0 0 24px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
#main .own-use-guide > h3 { margin-top: 0; }
.own-use-guide > :last-child { margin-bottom: 0; }

/* QA sessions preserve individual results while keeping the queue manageable. */
.qa-session { margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.qa-session > summary { cursor: pointer; font-weight: 600; }
.qa-session[open] > summary { margin-bottom: 16px; }
.qa-session .table-wrap { margin-bottom: 0; }
.qa-tools { display: grid; gap: 12px; margin: 16px 0; }
.qa-tools input { width: 100%; }
.qa-tools .filters { flex-wrap: wrap; }

/* Closing status separates the summary from the decisions currently due. */
.closing-summary { border: 1px solid var(--line, #37373b); border-radius: 12px; padding: 22px; margin: 24px 0; }
.close-progress { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 0; list-style: none; }
.close-progress li { opacity: .55; }
.close-progress .current { opacity: 1; font-weight: 700; text-decoration: underline; text-underline-offset: 6px; }
.close-progress .complete { opacity: .8; }
.close-progress .complete::before { content: '✓ '; }

/* Decisions: a quiet reading list, with the outcome first and evidence on demand. */
#main.decisions-width { max-width: 1080px; }
.decisions-heading { margin-bottom: 28px; }
.decisions-heading h2 { margin-bottom: 4px; }
.decisions-heading p { color: var(--muted); margin: 0; }
.decision-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.decision-tabs a { padding: 0 0 12px; color: var(--muted); font-size: 14px; }
.decision-tabs a[aria-current] { color: var(--text); font-weight: 650; border-bottom: 2px solid var(--accent); }
.decision-toolbar { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.decision-search { display: flex; gap: 10px; }
.decision-search input { flex: 1; min-width: 0; margin: 0; }
.decision-search .btn { margin: 0; }
.decision-filters { display: flex; gap: 16px; margin-top: 16px; align-items: end; }
.decision-filter { flex: 1; min-width: 0; display: grid; gap: 5px; }
.decision-filter > span { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.decision-filter select { width: 100%; min-width: 0; font-size: 13px; margin: 0; }
.decision-clear { font-size: 13px; white-space: nowrap; padding-bottom: 8px; }
.decision-results-heading { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 12px; color: var(--muted); font-size: 13px; }
.decision-results-heading p { margin: 0; }
.decision-entry { padding: 22px 24px 0; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.decision-meta { display: flex; gap: 14px; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.decision-meta time { flex-shrink: 0; }
.decision-title { display: flex; align-items: start; gap: 20px; justify-content: space-between; }
#main .decision-title h3 { font-size: 17px; line-height: 1.45; font-weight: 600; margin: 0 0 12px; }
.decision-status { flex-shrink: 0; font-size: 11px; background: var(--bg-soft); color: var(--muted); padding: 3px 8px; border-radius: 5px; }
.decision-status.settled { color: var(--ok); background: var(--ok-soft); }
.decision-outcome { font-size: 15px; margin: 0 0 14px; color: var(--place); }
.decision-entry.past .decision-outcome { color: var(--muted); }
.decision-reason { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.decision-reason > span { color: var(--text); font-weight: 600; margin-right: 10px; }
.decision-history-note { font-size: 12px; color: var(--muted); }
.decision-details { border-top: 1px solid var(--line-soft); margin-top: 16px; }
.decision-details > summary { font-size: 12px; color: var(--muted); padding: 12px 0; cursor: pointer; }
.decision-responses { padding: 0 0 4px; }
.decision-response { padding: 14px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
.decision-response p { margin: 8px 0 0; overflow-wrap: anywhere; }
.decision-response-heading { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; }
.decision-response-heading time { margin-left: auto; color: var(--muted); font-size: 11px; }
.decision-old { color: var(--muted); font-size: 11px; }
.decision-source { display: inline-block; font-size: 13px; margin: 6px 0 18px; }
.decision-pagination { display: flex; justify-content: space-between; margin-top: 24px; }
.decision-empty { padding: 48px 24px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
@media (max-width: 620px) {
  .decision-filters { flex-wrap: wrap; gap: 12px; }
  .decision-filter { flex-basis: calc(50% - 12px); }
  .decision-filter:first-child { flex-basis: 100%; }
  .decision-entry { padding: 18px 16px 0; }
  .decision-title { flex-direction: column; gap: 0; }
  .decision-status { margin-bottom: 12px; }
  .decision-meta { flex-direction: column; gap: 2px; }
  .decision-tabs { gap: 20px; }
  .decision-toolbar { padding: 14px; }
}

/* Costs from the product ledger: evidence stays beside the amount, details open on demand. */
.cost-intro { color: var(--muted); max-width: 920px; line-height: 1.65; }
.cost-basis { display: inline-block; color: var(--muted); font-size: 11px; font-weight: 450; text-transform: none; letter-spacing: 0; }
.cost-revision-detail { margin: 12px 0 26px; font-size: 13px; line-height: 1.7; }
.cost-revision-detail summary, .cost-extra summary { cursor: pointer; color: var(--text); font-weight: 550; }
.cost-revision-detail p { max-width: 1000px; }
.cost-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; margin: 18px 0; }
.cost-pick { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 12px; max-width: 100%; }
.cost-pick select, .cost-pick input { min-height: 42px; width: 300px; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--surface); color: var(--text); }
.environment-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.environment-total { display: flex; flex-direction: column; align-items: start; gap: 8px; height: auto; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-align: left; white-space: normal; }
.environment-total.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.environment-total strong { font-size: 25px; font-variant-numeric: tabular-nums; }
.cost-evidence { margin-top: 7px; font-size: 12px; font-weight: 400; line-height: 1.65; color: var(--muted); }
.cost-evidence summary { cursor: pointer; font-size: 11px; }
.cost-evidence p { margin: 8px 0; overflow-wrap: anywhere; }
.costs .cost-evidence, .costs .cost-provider { white-space: normal; }
.costs .platform-cost-table th:first-child { width: 80%; }
.costs .platform-cost-table { min-width: 0; }
.costs .platform-cost-table td { vertical-align: top; }
.costs table { width: 100%; }
.cost-plan-options { margin-top: 18px; }
.cost-plan-link { border: 0; padding: 0; height: auto; background: transparent; color: var(--text); text-align: left; white-space: normal; font-size: 14px; font-weight: 550; text-decoration: underline; text-underline-offset: 4px; }
.cost-plan-table tr.selected { background: var(--accent-soft); }
.cost-plan-table tr.selected .cost-plan-link { color: var(--accent); }
.cost-plan-table th:first-child { width: 43%; }
.cost-break-even { padding: 20px 22px 8px; line-height: 1.65; }
.cost-caveat { padding: 0 22px 18px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.cost-extra { padding: 18px 20px; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cost-extra > summary { line-height: 1.6; }
.cost-extra .body { margin-top: 20px; }
.cost-extra p { line-height: 1.7; }
.cost-source-section { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .environment-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .environment-total { padding: 14px; font-size: 12px; }
  .environment-total strong { font-size: 22px; }
  .cost-controls, .cost-pick, .cost-pick select, .cost-pick input { width: 100%; }
  .costs .cost-plan-table { min-width: 0; }
  .costs .cost-plan-table th, .costs .cost-plan-table td { padding: 12px 8px; font-size: 11px; }
  .cost-plan-link { font-size: 12px; }
  .cost-extra { padding: 14px; }
  .costs .calc tbody th { width: 50%; }
}
@media (max-width: 700px) {
  .cost-plan-table, .cost-plan-table tbody { display: block; }
  .cost-plan-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cost-plan-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
  .costs .cost-plan-table th:first-child { grid-column: 1 / -1; width: auto; padding: 16px 14px 8px; border: 0; }
  .cost-plan-table th .cost-provider, .cost-plan-table th .cost-basis { display: inline; margin-left: 10px; font-size: 10px; }
  .cost-plan-table th .cost-plan-link { font-size: 14px; }
  .costs .cost-plan-table td { text-align: left; border: 0; padding: 10px 14px 16px; font-size: 13px; white-space: normal; }
  .cost-plan-table td::before { content: attr(data-label); display: block; margin-bottom: 5px; font-size: 10px; color: var(--muted); }
}

/* The Costs page is a compact working view; the ledger retains the detailed evidence. */
.cost-summary-simple { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cost-summary-simple .cost-metric { min-height: 152px; }
.costs > .cost-page-heading { margin-bottom: 22px; }
.costs > .cost-page-heading p { margin: 12px 0 0; }
.costs .cost-pick { margin-bottom: 18px; }
.costs .cost-controls .cost-pick { margin-bottom: 0; }
.costs .table-wrap { margin: 16px 0; }
.costs table { table-layout: fixed; }
.costs th, .costs td { overflow-wrap: normal; word-break: normal; vertical-align: top; }
.costs td.num { text-align: right; font-variant-numeric: tabular-nums; }
.costs .platform-cost-table th:first-child { width: 75%; }
.costs .feature-costs th:first-child { width: 46%; }
.costs .feature-costs th:not(:first-child) { width: 18%; }
.costs .calc th:first-child { width: 56%; }
.costs .calc th:not(:first-child) { width: 22%; }
.costs .plan-breakdown .table-wrap { margin: 0; }
.costs .plan-breakdown { margin-top: 8px; }
.costs .cost-comparison { scroll-margin-top: 135px; }
.costs .cost-comparison > .cost-pick { margin-top: 20px; }
.peak-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 18px 0; margin: 0; }
.peak-values dt { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.peak-values dd { margin: 0; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .cost-summary-simple { grid-template-columns: 1fr; }
  .cost-summary-simple .cost-metric { min-height: 0; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .cost-summary-simple .cost-metric:last-child { border-bottom: 0; }
  .costs .calc th:first-child { width: 48%; }
  .costs .calc th:not(:first-child) { width: 26%; }
  .costs .calc th, .costs .calc td { padding: 12px 10px; }
  .costs .feature-costs th:not(:first-child) { width: auto; }
  .peak-values { grid-template-columns: 1fr; gap: 0; padding: 8px 0; }
  .peak-values > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .peak-values dd { font-size: 22px; }
}
.costs th.num { text-align: right; }
.costs tbody th { background: transparent; color: var(--text); white-space: normal; }
.costs tbody tr:not(.keep-row):not(.cost-subtotal):hover th { background: var(--bg-soft); }
.costs .cost-subtotal th { background: var(--panel); color: var(--muted); }
.costs .keep-row th { background: var(--ok-soft); }
.costs tbody tr:last-child th { border-bottom: 0; }
@media (max-width: 700px) {
  .costs .feature-costs th:first-child { width: auto; }
}
.costs thead th { white-space: normal; }
@media (max-width: 700px) {
  .costs .calc thead th { font-size: 10px; letter-spacing: .03em; }
}
