/* Layout idea: a fixed left-to-right map whose boxes carry a worked example from a live job-screening build, a reserved detail panel on the right, then the two artifacts error analysis produces. */
:root {
  --bg: var(--kb-page);
  --surface: var(--kb-surface);
  --ink: var(--kb-ink);
  --muted: var(--kb-muted);
  --line: var(--kb-hairline);
  --review: var(--kb-slate);
  --review-fill: var(--kb-slate-tint);
  --decide: var(--kb-brass);
  --decide-fill: var(--kb-brass-tint);
  --eval: var(--kb-sage);
  --eval-fill: var(--kb-sage-tint);
  --warn: var(--kb-ink);
  --warn-fill: var(--kb-neutral-sel);
  --ok: var(--kb-ink);
  --shadow: var(--kb-shadow);
  --font-body: var(--kb-font-body);
  --font-mono: var(--kb-font-body);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
a { color: var(--kb-brass); }
button { font: inherit; color: inherit; }
:focus-visible { outline: var(--kb-focus-width) solid var(--kb-focus); outline-offset: 2px; }
.mono { font-family: var(--font-mono); }

.page { padding-bottom: 40px; display: flex; flex-direction: column; gap: var(--kb-space-5); }

.intro { display: flex; flex-direction: column; gap: 8px; max-width: 74ch; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.intro p { margin: 0; }
.intro .example { color: var(--muted); }
.sample-note { display: flex; gap: 10px; align-items: baseline; border: 1.5px dashed var(--decide); border-radius: 10px; padding: 8px 12px; font-size: 14px; color: var(--ink); background: var(--surface); }
.tag { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--decide); white-space: nowrap; }

.terms { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.terms h2 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.terms dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
.terms dt { font-weight: 600; display: inline; }
.terms dt::after { content: ":"; }
.terms dd { margin: 0 0 0 4px; color: var(--muted); display: inline; }
@media (max-width: 760px) { .terms dl { grid-template-columns: 1fr; } }

.main { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.map-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.key { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); align-items: center; }
.key span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; border: 2px solid; display: inline-block; }
.swatch.review { background: var(--review-fill); border-color: var(--review); }
.swatch.decide { background: var(--decide-fill); border-color: var(--decide); }
.swatch.eval { background: var(--eval-fill); border-color: var(--eval); }
.swatch.sample { border-style: dashed; border-color: var(--muted); background: transparent; }

.map-scroll { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow-x: auto; }
.map { position: relative; min-width: 660px; padding: 16px 20px 22px; }
.wires { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.wires path { fill: none; stroke-width: 2; }
.wires .w-review { stroke: var(--review); }
.wires .w-decide { stroke: var(--decide); }
.wires .w-eval { stroke: var(--eval); }
.wires .ah-review { fill: var(--review); stroke: none; }
.wires .ah-decide { fill: var(--decide); stroke: none; }
.wires text { font-family: var(--font-mono); font-size: 11px; fill: var(--decide); }

.map-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.group-label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; }
.group-label.review { color: var(--review); }

.row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 30px; position: relative; }
.row-a { margin-bottom: 44px; }
.row-b { align-items: center; margin-bottom: 40px; }

.node {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  text-align: left; padding: 10px 11px; border-radius: 10px; border: 2px solid; cursor: pointer;
  background: var(--surface); transition: transform .12s ease, box-shadow .12s ease;
}
.node:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.n-title { font-weight: 700; font-size: 14px; line-height: 1.25; }
.n-sub { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.n-num { font-family: var(--font-mono); font-size: 11px; color: var(--review); }
.node.review { border-color: var(--review); background: var(--review-fill); }
.node.decide { border-color: var(--decide); background: var(--decide-fill); }
.node.eval { border-color: var(--eval); background: var(--eval-fill); }
.node.rule { border-style: dashed; background: var(--surface); }
.node.selected { box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px currentColor; }
.node.review.selected { color: var(--review); }
.node.decide.selected { color: var(--decide); }
.node.eval.selected { color: var(--eval); }
.node.selected .n-title { color: var(--ink); }

/* Sample strip inside each box */
.mini { margin-top: 7px; padding-top: 7px; border-top: 1.5px dashed color-mix(in srgb, var(--muted) 45%, transparent); font-size: 11.5px; line-height: 1.35; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.mini .big { font-family: var(--font-mono); font-size: 13px; }
.dots { display: flex; gap: 5px; align-items: center; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--review); display: inline-block; }
.dots i.bad { background: var(--warn); }
.dots i.after { background: color-mix(in srgb, var(--muted) 50%, transparent); }
.split { display: flex; height: 8px; border-radius: 4px; overflow: hidden; }
.split .p { background: var(--ok); }
.split .f { background: var(--warn); }
.counts { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; }
.counts .n { font-family: var(--font-mono); }
.bars { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 6px; align-items: center; font-size: 11px; }
.bars b { height: 7px; border-radius: 3px; background: var(--review); display: block; }
.bars .n { font-family: var(--font-mono); }
.mini q { quotes: "\201C" "\201D"; font-style: italic; color: var(--muted); }

#n5 { grid-column: 3 / span 2; justify-self: center; width: 82%; }
.pill { position: relative; z-index: 2; justify-self: center; font-family: var(--font-mono); font-size: 12px; padding: 4px 12px; border-radius: 999px; border: 2px solid var(--decide); color: var(--decide); background: var(--surface); text-align: center; line-height: 1.3; }
.pill small { display: block; font-size: 10.5px; color: var(--muted); }
#fixPill { grid-column: 1; }

.frame { position: relative; border: 2px solid var(--eval); border-radius: 14px; padding: 34px 14px 16px; background: color-mix(in srgb, var(--eval-fill) 35%, var(--surface)); }
.frame-head { position: absolute; z-index: 2; top: -16px; left: 0; right: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 30px; padding: 0 14px; }
#evalPill { grid-column: 3 / span 2; justify-self: center; border-color: var(--eval); color: var(--eval); }
.frame-label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--eval); margin: 0 0 10px; }
.row-c { column-gap: 12px; margin-bottom: 30px; }
.row-rule { display: flex; justify-content: center; }
#n7 { width: 56%; align-items: center; text-align: center; }

.map-hint { font-size: 13px; color: var(--muted); margin: 0; }

/* Panel */
.panel { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 420px; }
.panel-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.panel-pos { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.icon-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 13px; }
.icon-btn:hover { border-color: var(--muted); }
.panel-body { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.empty { padding: 40px 22px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; color: var(--muted); }
.empty strong { color: var(--ink); font-size: 16px; }
.start-btn { border: 2px solid var(--review); background: var(--review-fill); color: var(--ink); border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 600; }
.chip { display: inline-block; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; border: 1.5px solid; }
.chip.review { color: var(--review); border-color: var(--review); background: var(--review-fill); }
.chip.decide { color: var(--decide); border-color: var(--decide); background: var(--decide-fill); }
.chip.eval { color: var(--eval); border-color: var(--eval); background: var(--eval-fill); }
.d-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.d-head h2 { font-size: 21px; line-height: 1.2; }
.d-sum { margin: 0; font-size: 15px; }
.d-sec { display: flex; flex-direction: column; gap: 8px; }
.d-sec h3 { font-size: 12px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; }
.idea { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.idea b { display: block; margin-bottom: 2px; }
.idea p { margin: 0; font-size: 14px; }
.idea.wrong { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: var(--warn-fill); border-left: 4px solid var(--warn); }
.idea.wrong b { color: var(--warn); }
.in-sample { border: 1.5px dashed var(--decide); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.in-sample p { margin: 0; }
.in-sample .ib-title { font-weight: 700; }
.in-sample .ib-label { font-weight: 700; margin-bottom: -4px; }
.in-sample ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.steps li { display: grid; grid-template-columns: 18px 1fr; gap: 6px; font-size: 13.5px; }
.steps .st { font-family: var(--font-mono); font-weight: 600; }
.steps .ok { color: var(--ok); }
.steps .bad { color: var(--warn); }
.steps .down { color: var(--muted); }
.steps em { color: var(--muted); font-style: normal; }
.related { display: flex; flex-wrap: wrap; gap: 8px; }
.rel-btn { border: 1.5px solid var(--line); border-radius: 999px; padding: 3px 11px; background: var(--surface); cursor: pointer; font-size: 13px; }
.rel-btn:hover { border-color: var(--muted); }
.pager { display: flex; justify-content: space-between; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); margin-top: auto; }
.pager button { flex: 1; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; cursor: pointer; font-size: 13px; text-align: left; }
.pager button:last-child { text-align: right; }
.pager button:disabled { opacity: .45; cursor: default; }
.pager small { display: block; color: var(--muted); font-size: 11px; font-family: var(--font-mono); }
.scrim { display: none; }

@media (max-width: 1079px) {
  .main { grid-template-columns: minmax(0, 1fr); }
  .panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 92vw); max-height: none; min-height: 0; border-radius: 12px 0 0 12px; z-index: 50; transform: translateX(105%); transition: transform .22s ease; }
  .panel.open { transform: translateX(0); }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(10, 14, 20, .35); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .scrim.open { opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) { .panel, .scrim, .node { transition: none; } .node:hover { transform: none; } }

/* Outputs section */
.outputs { display: flex; flex-direction: column; gap: 14px; }
.outputs > h2 { font-size: 20px; }
.outputs > p { margin: 0; color: var(--muted); max-width: 78ch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.card h3 { font-size: 16px; }
.card > p { margin: 0; font-size: 14px; color: var(--muted); max-width: 80ch; }
.cols { display: flex; flex-wrap: wrap; gap: 6px; }
.cols span { font-family: var(--font-mono); font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
.cols span.coded { border-color: var(--review); color: var(--review); background: var(--review-fill); }
.tscroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; min-width: 640px; }
th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); border-bottom: 1.5px solid var(--line); padding: 6px 8px; white-space: nowrap; }
td { border-bottom: 1px solid var(--line); padding: 7px 8px; vertical-align: top; }
td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.pf { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.pf.pass { color: var(--ok); }
.pf.fail { color: var(--warn); }
.dec { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1.5px solid; white-space: nowrap; }
.dec.fix { color: var(--decide); border-color: var(--decide); background: var(--decide-fill); }
.dec.eval { color: var(--eval); border-color: var(--eval); background: var(--eval-fill); }
.muted { color: var(--muted); }
.meta { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 6px 14px; align-items: start; font-size: 13.5px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.meta .stepchip { font-family: var(--font-mono); font-size: 11px; color: var(--review); border: 1.5px solid var(--review); background: var(--review-fill); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.meta b { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
@media (max-width: 760px) { .meta { grid-template-columns: 1fr; } }
.subhead { font-size: 13.5px; font-weight: 600; margin: 4px 0 0; }
table.full { min-width: 0; }
table.full th[scope="row"] { font-family: var(--font-mono); font-weight: 500; color: var(--ink); width: 150px; vertical-align: top; }
table.full tr.coded th[scope="row"] { color: var(--review); }
table.full tr.coded td { background: color-mix(in srgb, var(--review-fill) 60%, transparent); }
.multi { margin: 0; padding-left: 18px; }

footer.src { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 16px; }
footer.src h2 { font-size: 13px; color: var(--ink); }
footer.src ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
footer.src p { margin: 0; }

/* Brand block. One raised surface on navy: the map and the two documents are unfilled frames, the eval types sit in
   a sage container (edge, wash, title in the accent), boxes are the one raised surface, a category is an edge plus a
   shaped marker (slate square badges, brass diamond, sage circle, dashed square for the rule), and nesting drops into
   the darker well. Status (pass/fail, the broken trace step, what goes wrong) is neutral: text and shape, no new hues. */

/* Labels: sentence case in the body face */
.tag, .group-label, .frame-label, .chip, .d-sec h3 { text-transform: none; letter-spacing: 0; }

/* Opening (shared rhythm): 12px between the title and the intro paragraphs */
.intro { gap: var(--kb-space-3); }
/* The running-example note: a neutral dashed edge, no fill; its label in ink */
.sample-note { border: 1px dashed var(--kb-line); background: transparent; }
.tag { color: var(--ink); font-size: 13px; font-weight: 600; }

/* Terms: a section ruled off by a hairline, not a raised card (as on OpenRouter) */
.terms { background: transparent; border: 0; border-top: 1px solid var(--kb-hairline); border-radius: 0; padding: 18px 0 0; box-shadow: none; }

/* Key: the same filled shapes as the map's markers. The dashed entry is the dashed line inside each box. */
.swatch { border: 0; }
.swatch.review { background: var(--kb-slate); border-radius: 3px; }
.swatch.decide { background: var(--kb-brass); width: 11px; height: 11px; border-radius: 1px; transform: rotate(45deg); margin: 0 1.5px; }
.swatch.eval { background: var(--kb-sage); border-radius: 50%; }
.swatch.sample { width: 16px; height: 0; border-radius: 0; border-top: 1px dashed var(--kb-muted); background: transparent; }

/* The map: an unfilled frame, so the boxes are the only raised objects. It scrolls sideways inside its frame on narrow
   screens, with the shared scroll cue. */
.map-scroll { background: transparent; border: 1px solid var(--kb-zone-frame); border-radius: 14px; box-shadow: none; }
.map { padding: 20px; }
.group-label { font-size: 14px; font-weight: 600; }
.frame-label { color: var(--kb-sage); font-size: 14px; font-weight: 600; }

/* Wires and arrowheads are muted; the "rerun" label gets a page-coloured halo */
.wires .w-review, .wires .w-decide, .wires .w-eval { stroke: var(--kb-muted); stroke-width: 1.5; }
.wires .ah-review, .wires .ah-decide { fill: var(--kb-muted); }
.wires text { font-family: var(--kb-font-body); font-size: 12px; fill: var(--kb-muted); paint-order: stroke; stroke: var(--kb-page); stroke-width: 4px; stroke-linejoin: round; }

/* Boxes: the raised surface with a 1px category edge; hover lifts to the full accent */
.node { background: var(--kb-surface); border: 1px solid var(--kb-line); border-radius: 8px; padding: 12px 14px; color: var(--ink); }
.node.review { background: var(--kb-surface); border-color: var(--kb-slate-edge); }
.node.decide { background: var(--kb-surface); border-color: var(--kb-brass-edge); }
.node.eval { background: var(--kb-surface); border-color: var(--kb-sage-edge); }
.node.rule { background: transparent; border: 1px dashed var(--kb-line); }
.node:hover { background: var(--kb-surface-hover); box-shadow: none; }
.node.review:hover { border-color: var(--kb-slate); }
.node.decide:hover { border-color: var(--kb-brass); }
.node.eval:hover { border-color: var(--kb-sage); }
.node.rule:hover { background: var(--kb-surface-hover); border-color: var(--kb-muted); }
/* Selected, after hover so it wins: the category's selected fill and an ink line inside. Focus stays the ring outside. */
.node.selected { box-shadow: inset 0 0 0 2px var(--kb-ink); }
.node.review.selected, .node.decide.selected, .node.eval.selected, .node.rule.selected { color: var(--ink); }
.node.review.selected { background: var(--kb-slate-sel); }
.node.decide.selected { background: var(--kb-brass-sel); }
.node.eval.selected { background: var(--kb-sage-sel); }
.node.rule.selected { background: var(--kb-surface); }

/* Markers: review steps are slate square badges with a navy number; the decision a brass diamond, each eval type a
   sage circle and the matching rule a dashed square, in front of the title */
.n-num { align-self: flex-start; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-bottom: 4px; border-radius: 3px; background: var(--kb-slate); color: var(--kb-on-fill); font-family: var(--kb-font-body); font-size: 12px; font-weight: 700; line-height: 1; }
.node.decide .n-title::before, .node.eval .n-title::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: 1px; }
.node.decide .n-title::before { width: 8px; height: 8px; margin: 0 9px 0 1px; background: var(--kb-brass); border-radius: 1px; transform: rotate(45deg); }
.node.eval .n-title::before { background: var(--kb-sage); border-radius: 50%; }
.node.rule .n-title::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: 0; background: transparent; border: 1px dashed var(--kb-muted); border-radius: 2px; }

/* The real-build strip in each box, below a dashed line. Trace marks: steps that worked are solid slate dots, the
   step that broke is a hollow ink ring, and the steps after it are small and dim (shape and fill, not red). */
.mini { border-top: 1px dashed var(--kb-line); }
.dots i { width: 10px; height: 10px; background: var(--kb-slate); }
.dots i.bad { width: 12px; height: 12px; background: transparent; box-shadow: inset 0 0 0 2px var(--kb-ink); }
.dots i.after { width: 7px; height: 7px; background: var(--kb-line); }

/* Fix and Eval: outline pills in their category, on the page colour so the wires stop at their edge */
.pill { border: 1px solid var(--kb-brass-edge); color: var(--kb-brass); background: var(--kb-page); font-size: 13px; font-weight: 600; }
.pill small { font-size: 12px; font-weight: 400; }
#evalPill { border-color: var(--kb-sage-edge); color: var(--kb-sage); }

/* The eval types: a sage container. 20px inside; the Eval pill's columns follow the frame's padding. */
.frame { border: 1.5px solid var(--kb-sage-edge); background: var(--kb-sage-wash); padding: 34px 20px 20px; }
.frame-head { padding: 0 20px; }

/* The panel: 24px inside. It sticks below the site header; the slide-over uses the page colour and covers the header. */
.main { gap: var(--kb-space-5); }
@media (min-width: 1280px) { .main { gap: var(--kb-space-6); } }
.panel-body { padding: var(--kb-space-5); gap: var(--kb-space-5); }
.panel-top { padding: 12px var(--kb-space-5); border-bottom-color: var(--kb-hairline); }
.panel-pos { font-size: 14px; }
@media (min-width: 1080px) {
  .panel { top: calc(var(--kb-header-h) + var(--kb-space-4)); max-height: calc(100vh - var(--kb-header-h) - var(--kb-space-6)); box-shadow: none; }
  /* Empty panel (the shared pattern): an unfilled dashed frame; the heading, a line 10px below, the button 20px below */
  .panel:has(.empty) { background: transparent; border: 1px dashed var(--kb-zone-frame); }
  .panel:has(.empty) .panel-top { background: var(--kb-page); border-radius: 12px 12px 0 0; }
}
@media (max-width: 1079px) {
  .panel { z-index: 60; background: var(--kb-page); border-color: var(--kb-hairline); box-shadow: var(--kb-shadow-side); }
  .panel-top { background: var(--kb-page); }
  .scrim { z-index: 59; }
}
.empty { padding: var(--kb-empty-pad); gap: 0; }
.empty strong { font: var(--kb-empty-head); color: var(--ink); }
.empty span { margin-top: 10px; font: var(--kb-empty-body); color: var(--muted); }

/* Buttons: the shared standard. Primary is brass (Start at step 1, Next); secondary is a ghost (Close, Previous). */
.start-btn, .icon-btn, .pager button { display: inline-flex; align-items: center; justify-content: center; min-height: var(--kb-btn-h); padding: var(--kb-btn-pad); border-radius: var(--kb-btn-radius); font-size: var(--kb-btn-size); font-weight: var(--kb-btn-weight); }
.start-btn { margin-top: 20px; background: var(--kb-brass); border: 1px solid var(--kb-brass); color: var(--kb-on-fill); }
.start-btn:hover { filter: brightness(1.06); }
.icon-btn { background: transparent; border: 1px solid var(--kb-line); }
.icon-btn:hover { border-color: var(--kb-muted); }
.pager { padding: 12px var(--kb-space-5); border-top-color: var(--kb-hairline); }
/* Previous and Next stack their small label over the box's name; Next is the primary button */
.pager button { flex-direction: column; align-items: flex-start; padding: 8px 14px; background: transparent; border: 1px solid var(--kb-line); }
.pager button:last-child { align-items: flex-end; }
.pager small { font-size: 13px; font-weight: 400; color: var(--muted); }
#nextBtn { background: var(--kb-brass); border-color: var(--kb-brass); color: var(--kb-on-fill); }
#nextBtn small { color: var(--kb-on-fill); }
#nextBtn:hover:not(:disabled) { filter: brightness(1.06); }

/* Panel content. Chips: the accent on its tint. The ideas are a hairline-separated list, not a stack of boxes;
   "What goes wrong" items are callouts: a neutral line rule on the well. "In the build" is a well with a dashed
   neutral edge, the dashed line that marks the real build in the boxes. */
.chip { font-size: 13px; font-weight: 600; border-width: 1px; }
.chip.review { border-color: var(--kb-slate-edge); }
.chip.decide { border-color: var(--kb-brass-edge); }
.chip.eval { border-color: var(--kb-sage-edge); }
.d-sec h3 { font-size: 14px; font-weight: 600; }
.idea { border: 0; border-radius: 0; padding: 10px 0; }
.idea + .idea { border-top: 1px solid var(--kb-hairline); }
.d-sec h3 + .idea:not(.wrong) { padding-top: 2px; }
.idea.wrong, .idea.wrong + .idea.wrong { background: var(--kb-well); border: 0; border-left: 3px solid var(--kb-line); border-radius: 0; padding: 10px 14px; }
.idea.wrong b { color: var(--ink); }
.in-sample { background: var(--kb-well); border: 1px dashed var(--kb-line); padding: 12px 14px; }
.steps .st { font-weight: 700; }
.steps .down { color: var(--muted); }
.rel-btn { border: 1px solid var(--kb-line); background: transparent; padding: 4px 12px; font-size: 14px; }
.rel-btn:hover { border-color: var(--kb-muted); background: var(--kb-surface-hover); }

/* The two documents: unfilled frames with a ruled heading; When / Who / What sits in the well */
.card { background: transparent; border: 1px solid var(--kb-zone-frame); border-radius: 14px; box-shadow: none; padding: 20px; }
.card h3 { padding-bottom: 10px; border-bottom: 1px solid var(--kb-hairline); }
.meta { background: var(--kb-well); border: 0; }
.meta .stepchip { font-size: 12px; font-weight: 600; border-width: 1px; border-color: var(--kb-slate-edge); }

/* Tables: hairline rules under a muted head (as on Devin). The reviewer-written rows sit on the slate tint, slate being
   the review steps' colour. */
th { font-size: 13px; border-bottom: 1px solid var(--kb-line); }
table.full th[scope="row"] { font-size: 13px; font-weight: 600; }
table.full tr.coded th[scope="row"] { color: var(--kb-slate); }
table.full tr.coded td { background: var(--kb-slate-tint); }

/* Pass and fail: neutral status tags. Pass is the outline tag; fail the filled one. Text unchanged. */
.pf { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.pf.pass { color: var(--ink); border: 1px solid var(--kb-line); background: transparent; }
.pf.fail { color: var(--ink); border: 1px solid var(--kb-muted); background: var(--kb-neutral-sel); }
/* Fix and Fix + eval: the decision's brass and the eval types' sage, each on its tint */
.dec { border-width: 1px; font-weight: 600; }
.dec.fix { border-color: var(--kb-brass-edge); }
.dec.eval { border-color: var(--kb-sage-edge); }
