/* Agentic Developer Handbook — interactive learning site.
   No framework, no build step. The content is the protagonist.

   Palette: taken from the launch video. The landing page uses it as a dark
   theme (body.theme-dark). The interactive pages keep a light "paper"
   working surface for long reading and typing, with the same header,
   blues, and ink. */

:root {
  /* Dark neutrals */
  --graphite: #0A0B0D;
  --panel: #0F1115;
  --panel-raised: #14161B;
  --hairline: #262A31;
  --border: #363B45;
  --ink: #ECEAE4;
  --ink-muted: #7B818D;
  --ink-subtle: #555B67;
  /* Accents */
  --electric: #2F6BFF;
  --electric-soft: #9DB8FF;
  --signal: #62E6F2;
  --field: #2B5CFF;
  /* Light section / code */
  --paper: #ECEAE4;
  --ink-black: #0B0C0E;
  --code-string: #A7D9A0;
  --code-comment: #5F6675;

  /* Electric, deepened for text and fills on paper (5.5:1 on --paper). */
  --electric-deep: #1F4FD8;

  --radius: 8px;
  --content-width: 46rem;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  font-size: 16px;
}

/* Light working theme (Capstone 01, readiness assessment). */
body {
  --ink: var(--ink-black);
  --surface: #F7F6F2;
  --muted: #555B67;
  --line: #D3D0C8;
  --accent: var(--electric-deep);
  --accent-ink: #FFFFFF;
  --accent-soft: #E1E8FF;
  --warn-soft: #F7EDD6;
  --warn-line: #D6B25E;
}

/* Dark theme (landing page). */
body.theme-dark {
  --ink: #ECEAE4;
  --surface: var(--panel);
  --muted: var(--ink-muted);
  --line: var(--hairline);
  --accent: var(--electric);
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(47, 107, 255, 0.14);
  background: var(--graphite);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  line-height: 1.6;
}

code, pre {
  font-family: var(--mono);
  font-size: 0.9em;
}

pre {
  background: var(--panel);
  color: var(--paper);
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  overflow-x: auto;
}

h1, h2, h3 {
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

p { margin: 0.5rem 0 1rem; }

a {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.muted { color: var(--muted); }

/* ---------- Header (shared, always dark) ---------- */

.site-header {
  border-bottom: 1px solid var(--hairline);
  background: var(--graphite);
}

.site-header .inner {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.site-header .brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--paper);
  letter-spacing: -0.01em;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  align-self: center;
}

/* The logo mark: transparent PNG, only ever shown on dark surfaces. */
.brand-mark {
  inline-size: 1.75rem;
  block-size: 1.75rem;
  margin-right: 0.55rem;
}

.site-header .context {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.site-nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.2rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.site-nav .header-link {
  color: var(--electric-soft);
  font-weight: 600;
}

.site-header a:focus-visible {
  outline-color: var(--electric-soft);
}

/* ---------- Landing ---------- */

.landing {
  max-width: 74rem;
  margin: 0 auto;
  padding: 0 1.25rem 4.5rem;
}

.landing p {
  max-width: 44rem;
}

/* Hero: copy on the left, the launch video on the right. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  padding: 4.5rem 0 1rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 1.1rem;
}

/* Signal cyan is a detail only: one small marker. */
.eyebrow::before {
  content: "";
  display: inline-block;
  inline-size: 0.45rem;
  block-size: 0.45rem;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--signal);
  vertical-align: 0.08em;
}

.project-name {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--electric-soft);
  margin: 0 0 0.75rem;
}

.project-mark {
  inline-size: 3.5rem;
  block-size: 3.5rem;
  flex: none;
}

.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  max-width: 17ch;
}

.landing .lede {
  font-size: 1.15rem;
  line-height: 1.6;
}

.boundary {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-muted);
  border-left: 2px solid var(--border);
  padding-left: 0.8rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.75rem;
}

.hero-copy {
  min-width: 0;
}

/* Demo window around the launch video. */
.demo-window {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  background: var(--panel-raised);
  border-bottom: 1px solid var(--hairline);
}

.window-dots {
  display: inline-flex;
  gap: 0.35rem;
}

.window-dots span {
  inline-size: 0.55rem;
  block-size: 0.55rem;
  border-radius: 50%;
  background: var(--border);
}

.window-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-toggle {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  min-block-size: 1.9rem;
  cursor: pointer;
}

.video-toggle:hover {
  border-color: var(--electric);
}

.video-frame {
  aspect-ratio: 832 / 464;
  background: var(--graphite);
}

.video-frame video {
  display: block;
  cursor: pointer;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.window-caption {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  padding: 0.6rem 0.8rem;
  border-top: 1px solid var(--hairline);
}

/* Sections separated by hairlines, not shadows. */
.band {
  margin-top: 4.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--hairline);
}

.band-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-bottom: 1.5rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0;
}

.band-note {
  color: var(--ink-muted);
  margin: 0;
}

/* Learning path: numbered label cells, like the labs list in the video. */
.path {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.5rem;
  counter-reset: lab;
}

.path li {
  counter-increment: lab;
}

.path a {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  block-size: 100%;
  padding: 0.85rem 0.9rem 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.path a::before {
  content: counter(lab, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--electric-soft);
}

.path a:hover {
  border-color: var(--electric);
  background: var(--panel-raised);
}

.roadmap-note {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 1rem 0 0;
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 1px dashed var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  margin-right: 0.5rem;
}

/* Learn / Compose / Decide. */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.experience-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.experience-card:hover {
  border-color: var(--electric);
}

.experience-card h3 {
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin: 0.2rem 0 0.4rem;
}

.card-kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric-soft);
  margin: 0 0 0.4rem;
}

.step {
  color: var(--ink-muted);
  margin-right: 0.4rem;
}

.experience-card .card-actions {
  margin-top: auto;
  padding-top: 0.75rem;
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

/* Statement on the blue field. */
.statement {
  margin-top: 4.5rem;
  padding: clamp(2rem, 6vw, 4rem);
  border-radius: 12px;
  background-color: var(--field);
  background-image:
    linear-gradient(rgba(11, 12, 14, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 12, 14, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
}

.statement h2 {
  color: var(--ink-black);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 16ch;
  margin-bottom: 1.25rem;
}

/* White on the blue field (5.2:1); ink black only at heading size. */
.statement p {
  color: #FFFFFF;
  font-size: 1.1rem;
  margin: 0;
}

/* Open source: the one light section. */
.open-source {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  padding: clamp(1.75rem, 5vw, 3rem);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink-black);
}

.open-source h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.open-source .card-kicker {
  color: var(--electric-deep);
}

.open-source a:not(.button) {
  color: var(--electric-deep);
  font-weight: 600;
}

.open-source a:focus-visible {
  outline-color: var(--electric-deep);
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.55rem;
}

.checklist li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--electric-deep);
  font-weight: 700;
}

.terminal {
  margin: 0;
  background: var(--panel);
  color: var(--paper);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  font-size: 0.8rem;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
}

/* Comment grey from the palette is too faint for text; muted ink reads. */
.terminal .c {
  color: var(--ink-muted);
}

.terminal .s {
  color: var(--code-string);
}

.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--graphite);
  color: var(--ink-muted);
}

.site-footer .inner {
  max-width: 78rem;
  margin: 0 auto;
  padding: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--electric-soft);
}

.site-footer .muted {
  color: var(--ink-muted);
}

/* Dark-theme links, buttons, and focus. Nav, path cells, and buttons keep
   their own colors. */
.theme-dark a:not(.button):not(.site-nav a):not(.brand):not(.path a):not(.open-source a) {
  color: var(--electric-soft);
}

.theme-dark a.button.primary {
  background: var(--field);
  border-color: var(--field);
  color: #FFFFFF;
}

.theme-dark a.button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}

.theme-dark a.button.secondary:hover {
  background: var(--panel-raised);
  border-color: var(--electric-soft);
}

.theme-dark a:focus-visible,
.theme-dark button:focus-visible {
  outline-color: var(--electric-soft);
}

a.button.dark {
  background: var(--ink-black);
  border: 1px solid var(--ink-black);
  color: var(--paper);
}

a.button.dark:hover {
  background: #1B1E24;
  filter: none;
}

/* Video file missing: the poster frame stays, nothing is clickable. */
.is-unavailable {
  cursor: default;
  pointer-events: none;
}

@media (max-width: 64rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
    padding-top: 2.75rem;
  }

  .hero h1 {
    max-width: 18ch;
  }

  .path {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .card-grid,
  .open-source {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 36rem) {
  .band,
  .statement {
    margin-top: 3rem;
  }

  /* Stacked list: number and name on one line, easy to tap. */
  .path {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }

  .path a {
    flex-direction: row;
    align-items: baseline;
    gap: 0.9rem;
    padding: 0.8rem 1rem;
  }

  .cta-row .button {
    flex: 1 1 100%;
    text-align: center;
  }
}

/* ---------- Three-column app layout ---------- */

.layout {
  max-width: 78rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr) 15rem;
  gap: 2rem;
  align-items: start;
}

.stage-nav,
.progress-rail {
  position: sticky;
  top: 1.5rem;
}

/* ---------- Stage navigation ---------- */

.stage-nav h2,
.progress-rail h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.stage-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stage-nav button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.6rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.stage-nav button:hover {
  background: var(--accent-soft);
}

.stage-nav button[aria-current="step"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.stage-status {
  inline-size: 1.25rem;
  text-align: center;
  flex: none;
  font-variant-numeric: tabular-nums;
}

/* ---------- Progress rail ---------- */

.progress-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.progress-block .figure {
  font-size: 1.3rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  background: var(--line);
  border-radius: 99px;
  height: 0.5rem;
  margin-top: 0.5rem;
  overflow: hidden;
}

.progress-fill {
  background: var(--accent);
  height: 100%;
  width: 0;
  border-radius: 99px;
  transition: width 200ms ease;
}

.rail-actions button {
  width: 100%;
  margin-top: 0.4rem;
}

/* ---------- Content stages ---------- */

.stage {
  max-width: var(--content-width);
}

.stage[hidden] {
  display: none;
}

/* Stages take focus when shown (for keyboard and screen-reader users);
   mark it calmly, with room around the content. */
.stage:focus {
  outline: none;
}

.stage:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0.75rem;
  border-radius: 4px;
}

.stage-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 1rem 0;
}

.notice {
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin: 1rem 0;
}

/* ---------- Buttons ---------- */

button.primary,
button.secondary,
button.ghost,
a.button {
  font: inherit;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

a.button {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  padding: 0.65rem 1.2rem;
}

a.button.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}

a.button.secondary {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--accent);
}

a.button:hover { filter: brightness(1.08); }
a.button.secondary:hover { background: var(--accent-soft); filter: none; }

button.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}

button.primary:hover { filter: brightness(1.08); }

button.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

button.secondary:hover { background: var(--accent-soft); }

button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
}

button.ghost:hover { color: var(--ink); border-color: var(--line); }

.stage-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ---------- Decision cards ---------- */

.decision-card h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.decision-card .hint {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
}

.usechoice {
  display: inline-flex;
  gap: 0.5rem;
  margin: 0.4rem 0 0.8rem;
}

.usechoice button {
  font: inherit;
  min-width: 4.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

/* YES and NO carry identical visual weight: same style when selected. */
.usechoice button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.6rem 0 0.25rem;
}

textarea,
input[type="text"] {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  resize: vertical;
}

textarea { min-height: 4.2rem; }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.8rem 0;
}

.check-row input[type="checkbox"] {
  inline-size: 1.15rem;
  block-size: 1.15rem;
  margin-top: 0.25rem;
  accent-color: var(--accent);
}

.check-row label {
  margin: 0;
  font-weight: 500;
}

/* ---------- Summary / comparison ---------- */

.summary-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.summary-list ul {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

table.compare th,
table.compare td {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.compare th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

td.differs {
  font-style: italic;
}

details.why {
  margin: 0.5rem 0;
}

details.why summary {
  cursor: pointer;
  color: var(--accent);
}

.flow {
  font-family: ui-monospace, Consolas, monospace;
  white-space: pre;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  line-height: 1.5;
}

/* ---------- Readiness assessment ---------- */

.question-card fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.question-card legend {
  font-weight: 600;
  padding: 0;
  margin-bottom: 0.25rem;
}

.question-card .help {
  margin: 0.25rem 0 0.6rem;
  font-size: 0.92rem;
}

.question-card[hidden] {
  display: none;
}

.answer-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

/* Yes, No, and Unsure carry identical visual weight. */
.answer-option {
  position: relative;
}

.answer-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  inline-size: 1px;
  block-size: 1px;
}

.answer-option label {
  display: inline-block;
  margin: 0;
  min-width: 4.5rem;
  text-align: center;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}

.answer-option input:checked + label {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

.answer-option input:focus-visible + label {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.derived {
  font-size: 0.92rem;
  margin: 0.5rem 0;
}

/* Neutral status markers: architectural candidates, never pass/fail colors. */
.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  white-space: nowrap;
  vertical-align: middle;
}

.status-badge.is-consider { background: var(--accent-soft); border-color: var(--accent); }
.status-badge.is-not-justified { background: var(--paper); color: var(--muted); }
.status-badge.is-undecided { background: var(--warn-soft); border-color: var(--warn-line); }

.status-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.status-rail li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.result-headline {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-left-width: 6px;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.result-headline strong {
  font-size: 1.2rem;
}

.result-headline p {
  margin: 0.4rem 0 0;
}

dl.answers dt {
  font-weight: 600;
  margin-top: 0.6rem;
}

dl.answers dd {
  margin: 0.15rem 0 0;
  white-space: pre-wrap;
}

#result-shape {
  white-space: pre-wrap;
}

.example-list li {
  margin-bottom: 0.5rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 64rem) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .stage-nav,
  .progress-rail {
    position: static;
  }

  .stage-nav ol {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.4rem;
  }

  .stage-nav button {
    white-space: nowrap;
    width: auto;
  }

  .progress-rail {
    order: -1;
  }

  .progress-rail .progress-block {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.4rem;
  }

  .progress-rail .progress-block .progress-track {
    flex: 1;
    margin-top: 0;
  }

  .progress-rail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .progress-rail > h2 {
    display: none;
  }

  .progress-rail .progress-block {
    flex: 1 1 14rem;
    margin-bottom: 0;
  }

  .rail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex: 1 1 100%;
  }

  .rail-actions button {
    width: auto;
    margin-top: 0;
    padding: 0.35rem 0.8rem;
    font-size: 0.9rem;
  }

  .summary-list {
    grid-template-columns: 1fr;
  }

  table.compare {
    display: block;
    overflow-x: auto;
  }

  .status-rail {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  }

  .progress-rail .progress-block:has(.status-rail) {
    display: block;
    flex-basis: 100%;
  }

  .site-header .context {
    display: none;
  }
}
