/* The Blueprint Explorer. The palette, fonts and white background are the project
   site's own, whatever color scheme the reader's system prefers. Nothing here
   animates. */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --paper: #f5f6f8;
  --line: #d9dde3;
  --line-soft: #e4e7ec;
  --text: #565c66;
  --heading: #1b1e24;
  --accent: #e8631a;
  --accent-strong: #b8480c;
  --accent-wash: #fdf1e9;
  /* Cyan for what passes: 5.4:1 on white, 5.0:1 on its wash. */
  --ok: #0e7490;
  --ok-wash: #ecf9fc;
  --ok-line: #b3e1ea;
  --bad: #b3261e;
  --bad-wash: #fbeceb;
  --focus: #b8480c;
  --shadow: 0 1px 2px rgba(27, 30, 36, 0.06), 0 4px 16px rgba(27, 30, 36, 0.05);
  /* One color per area, given out in alphabetical order of area names. */
  --c0: #3a6ea5;
  --c1: #7a6a2f;
  --c2: #c9500f;
  --c3: #0891b2;
  --c4: #6b4fa0;
  --c5: #3d4451;
  --c6: #8a5a8f;
  --c7: #a33d6b;
  --c8: #9c6b2f;
  --radius: 14px;
  --maxw: 1080px;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--heading);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

a { color: var(--accent-strong); text-underline-offset: 2px; }
code, kbd, pre, .mono { font-family: "Space Mono", ui-monospace, monospace; }
code { font-size: 0.92em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

/* --- header ------------------------------------------------------------------------ */

header.site {
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
}

header.site .bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
}

.brand .mark {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex: none;
  display: block;
}

nav.top {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 14px;
}

nav.top a {
  color: var(--text);
  text-decoration: none;
  padding: 4px 0;
}

nav.top a:hover { color: var(--heading); text-decoration: underline; }

/* --- intro ---------------------------------------------------------------------------- */

.intro { padding-top: 48px; padding-bottom: 24px; }

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 6px 14px;
  border: 1px solid var(--ok-line);
  background: var(--ok-wash);
  border-radius: 18px;
  font-size: 13px;
  color: var(--heading);
}

.status-line .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }

.intro h1 { font-size: clamp(36px, 6vw, 56px); margin: 0 0 14px; }
.lede { font-size: 18px; max-width: 720px; margin: 0 0 28px; color: var(--heading); }
.how { max-width: 720px; margin: 20px 0 6px; }
.runner-state { margin: 0; font-size: 14px; }

.stats { margin: 0; }

.stat-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.stat {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.1;
}

.stat-label { font-size: 14px; }

/* --- views ------------------------------------------------------------------------------ */

.view { padding: 40px 0 24px; border-top: 1px solid var(--line-soft); }
.view h2 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 18px; display: flex; align-items: center; gap: 12px; }

.view h2 .num {
  font-family: "Space Mono", monospace;
  font-size: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--accent-wash);
  color: var(--accent-strong);
  border: 1px solid var(--accent);
  flex: none;
}

.figure, .diagram-stage {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

figcaption { font-size: 15px; margin-top: 14px; max-width: 760px; }
figcaption p { margin: 0 0 8px; }

.canvas { width: 100%; }
.canvas svg { display: block; width: 100%; height: auto; overflow: visible; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; align-items: center; }

label { font-size: 14px; color: var(--heading); display: inline-flex; flex-direction: column; gap: 4px; }

select, textarea {
  font: inherit;
  color: var(--heading);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  max-width: 100%;
}

select { min-width: 200px; }

.btn {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--heading);
  cursor: pointer;
}

.btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-strong); }
.btn:disabled { opacity: 0.55; cursor: default; }
/* White on the deeper orange: 5.3:1. */
.btn-primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #ffffff; }
.btn-primary:hover:not(:disabled) { background: #9e3d0a; border-color: #9e3d0a; color: #ffffff; }

.picker, .mode { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.pick {
  font: inherit;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.pick[aria-pressed="true"] { background: var(--heading); color: var(--bg); border-color: var(--heading); }
.pick:hover:not([aria-pressed="true"]) { border-color: var(--accent); color: var(--heading); }

.panel:empty { display: none; }

.panel {
  margin-top: 18px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px;
}

.panel h3 { margin: 0 0 6px; font-size: 22px; }
.panel h4 { margin: 18px 0 8px; font-size: 16px; }
.panel p { margin: 0 0 10px; }
.muted { color: var(--text); font-size: 14px; }
.big-line { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 20px; color: var(--heading); margin: 0 0 14px; }

details > summary { cursor: pointer; color: var(--heading); font-weight: 600; font-size: 14px; }
details.table-view { margin-top: 12px; }
details.table-view > div { margin-top: 10px; }

pre.record {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  overflow-x: auto;
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--heading);
}

/* tables */

.table-wrap { width: 100%; overflow-x: auto; }

table.data {
  border-collapse: collapse;
  width: 100%;
  font-size: 13.5px;
}

table.data th, table.data td {
  text-align: left;
  vertical-align: top;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line-soft);
  overflow-wrap: break-word;
}

table.data th { color: var(--heading); font-weight: 600; }
table.data tbody th[scope="row"] code { white-space: nowrap; }
table.data.wrap-first tbody th[scope="row"] code { white-space: normal; overflow-wrap: anywhere; }
table.data td[data-label="Required?"], table.data td[data-label="Verdict"] { white-space: nowrap; }

/* On a narrow screen each row becomes a small card, its cells labeled. */
@media (max-width: 640px) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack, table.stack tbody, table.stack tr, table.stack th, table.stack td { display: block; width: 100%; }
  table.stack tr { border: 1px solid var(--line-soft); border-radius: 10px; padding: 6px 10px; margin-bottom: 8px; background: var(--surface); }
  table.stack th, table.stack td { border: 0; padding: 3px 0; white-space: normal; }
  table.stack tbody th[scope="row"] { white-space: normal; font-size: 14px; }
  table.stack td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--text); }
}

/* verdict marks: always a symbol and a word, never color alone */

.verdict { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 600; font-size: 13px; max-width: 100%; }
.verdict.pass { color: var(--ok); }
.verdict.fail { color: var(--bad); }

.findings { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }

.findings li {
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--bad);
  background: var(--surface);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.findings li.ok { border-left-color: var(--ok); }
.findings code { color: var(--heading); }
.findings .rule-list li { border: 0; border-radius: 0; background: none; padding: 0; }

/* --- 1. where it sits ------------------------------------------------------------------- */

.diagram { display: grid; gap: 18px; }
.diagram[hidden] { display: none; }
.caption-text h3 { margin: 0 0 6px; font-size: 20px; }
.caption-text p { margin: 0; max-width: 720px; }

.band { border-radius: 12px; padding: 14px; border: 1px solid var(--line); }
.band-floor { background: var(--accent-wash); border-color: var(--accent); }
.band-dpi { background: var(--paper); }
.band-person { background: var(--ok-wash); border-color: var(--ok-line); text-align: center; }
.band-title { margin: 0 0 10px; font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700; color: var(--heading); font-size: 17px; }
.band-person .band-title { margin: 0; }
.band-title small { font-family: "Inter", system-ui, sans-serif; font-weight: 500; color: var(--text); font-size: 13px; margin-left: 6px; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

.chips li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 14px;
  color: var(--heading);
}

.chips li b { margin-right: 4px; }

.flow-link, .flow-return {
  margin: 6px 0;
  text-align: center;
  font-size: 14px;
  color: var(--text);
}

.arrow { display: block; font-size: 22px; line-height: 1; color: var(--accent-strong); }
.flow-return .arrow { display: inline; margin-right: 6px; }

.dg-union { display: grid; gap: 10px; }

.union-floor {
  text-align: center;
  background: var(--accent-wash);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 14px;
  color: var(--heading);
}

.union-floor small, .member small { display: block; color: var(--text); font-size: 13px; font-weight: 400; }

.union-members { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.union-members li { display: flex; flex-direction: column; align-items: stretch; text-align: center; gap: 6px; }
.flow-up, .flow-down { color: var(--accent-strong); font-size: 14px; }

.member {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 8px;
  font-weight: 600;
  color: var(--heading);
  font-size: 15px;
}

.recipients {
  background: var(--ok-wash);
  border: 1px solid var(--ok-line);
  border-radius: 12px;
  padding: 8px;
  font-size: 13px;
  color: var(--heading);
}

.dg-path, .dg-checks, .dg-phases { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }

.dg-path li, .dg-checks li {
  position: relative;
  flex: 1 1 140px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  color: var(--heading);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dg-path li:first-child { background: var(--ok-wash); border-color: var(--ok-line); }
.dg-path li small, .dg-checks li small { color: var(--text); font-size: 13px; }
.dg-path li:not(:last-child)::after, .dg-checks li:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translate(50%, -50%);
  color: var(--accent-strong);
  font-size: 16px;
  z-index: 1;
}

.dg-checks .check-layer { background: var(--accent-wash); border-color: var(--accent); flex-basis: 180px; }
.dg-checks .check-doc { flex-basis: 110px; }

.layer-num {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  color: var(--accent-strong);
}

.dg-repo { display: grid; gap: 12px; }

.repo-core {
  background: var(--accent-wash);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  color: var(--heading);
  display: grid;
  gap: 2px;
}

.repo-core code { font-size: 18px; font-weight: 700; }
.repo-core small { color: var(--text); }

.repo-ring { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }

.repo-ring li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--heading);
  display: grid;
  gap: 2px;
}

.repo-ring .dep { color: var(--accent-strong); font-size: 13px; }
.repo-ring small { color: var(--text); font-size: 13px; }

.dg-phases li {
  flex: 1 1 170px;
  background: var(--ok-wash);
  border: 1px solid var(--ok-line);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  color: var(--heading);
}

.phase-num { font-family: "Space Mono", monospace; font-size: 12px; color: var(--text); }
.done { color: var(--ok); font-size: 13px; font-weight: 600; }

/* --- 2. contracts map ------------------------------------------------------------------- */

.legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend svg { flex: none; }

svg .node-box { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
svg .node:hover .node-box { stroke: var(--accent); }
svg .node.selected .node-box { stroke: var(--accent); stroke-width: 3; fill: var(--accent-wash); }
svg .node:focus { outline: none; }
svg .node:focus-visible .node-box { stroke: var(--focus); stroke-width: 3.5; }
svg .node-name { font-family: "Space Mono", monospace; font-weight: 700; fill: var(--heading); }
svg .node-version { font-family: "Inter", sans-serif; fill: var(--text); }
svg .edge { fill: none; stroke: var(--text); stroke-width: 1.4; opacity: 0.75; }
svg .edge.out { stroke: var(--accent-strong); stroke-width: 2.4; opacity: 1; }
svg .edge.in { stroke: var(--ok); stroke-width: 2.4; opacity: 1; }
svg .edge.faded, svg .person-edge.faded { opacity: 0.15; }
svg .node.faded { opacity: 0.45; }
svg .arrowhead { fill: var(--text); }
svg .arrowhead.out { fill: var(--accent-strong); }
svg .arrowhead.in { fill: var(--ok); }
svg .floor-ring { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 4 6; }
svg .floor-label, svg .lane-head-text, svg .axis-text { font-family: "Inter", sans-serif; fill: var(--text); }
svg .person-box { fill: var(--ok-wash); stroke: var(--ok); stroke-width: 1.5; stroke-dasharray: 5 4; }
svg .person-text { font-family: "Space Grotesk", sans-serif; font-weight: 700; fill: var(--heading); }
svg .person-sub { font-family: "Inter", sans-serif; fill: var(--text); }
svg .person-edge { fill: none; stroke: var(--ok); stroke-width: 1.6; stroke-dasharray: 5 5; }
svg .swatch { stroke: none; }

.area-c0 { fill: var(--c0); color: var(--c0); }
.area-c1 { fill: var(--c1); color: var(--c1); }
.area-c2 { fill: var(--c2); color: var(--c2); }
.area-c3 { fill: var(--c3); color: var(--c3); }
.area-c4 { fill: var(--c4); color: var(--c4); }
.area-c5 { fill: var(--c5); color: var(--c5); }
.area-c6 { fill: var(--c6); color: var(--c6); }
.area-c7 { fill: var(--c7); color: var(--c7); }
.area-c8 { fill: var(--c8); color: var(--c8); }

.area-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: currentColor; flex: none; }

.rule-list { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.rule-list li { margin-bottom: 4px; }

.fixture-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

.fixture-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}

.fixture-list .name { font-family: "Space Mono", monospace; font-size: 13px; color: var(--heading); overflow-wrap: anywhere; }
.fixture-list .note { flex: 1 1 220px; color: var(--text); font-size: 13px; }

.link-btn {
  font: inherit;
  font-size: 13px;
  background: none;
  border: none;
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 2px 0;
}

/* --- 3. follow ----------------------------------------------------------------------------- */

.check-chips { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

.check-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ok-line);
  background: var(--ok-wash);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--heading);
}

.check-chip.fail { border-color: var(--bad); background: var(--bad-wash); }
.check-chip .mark { font-weight: 700; color: var(--ok); }
.check-chip.fail .mark { color: var(--bad); }

.lane-legend { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.lane-legend li { display: inline-flex; align-items: center; gap: 6px; }

.lane-code {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--heading);
}

.lane-code.household { background: var(--ok-wash); border-color: var(--ok-line); }

svg .lane-guide { stroke: var(--line-soft); stroke-width: 1.5; }
svg .lane-head { fill: var(--paper); stroke: var(--line); }
svg .lane-head.household { fill: var(--ok-wash); stroke: var(--ok-line); }
svg .lane-head-text { font-family: "Space Mono", monospace; font-weight: 700; fill: var(--heading); }
svg .row-bg { fill: transparent; }
svg .row:hover .row-bg { fill: var(--paper); }
svg .row.selected .row-bg { fill: var(--accent-wash); }
svg .row.flagged .row-bg { fill: var(--bad-wash); }
svg .row.flagged.selected .row-bg { fill: var(--accent-wash); }
svg .row:focus { outline: none; }
svg .row:focus-visible .row-bg { stroke: var(--focus); stroke-width: 3; }
svg .row-label { font-family: "Inter", sans-serif; fill: var(--heading); }
svg .row-sub { font-family: "Space Mono", monospace; fill: var(--text); }
svg .row-date { font-family: "Space Mono", monospace; fill: var(--heading); }
svg .row-time { font-family: "Space Mono", monospace; fill: var(--text); }
svg .marker { stroke: var(--surface); stroke-width: 2; }
svg .flag-mark { font-family: "Inter", sans-serif; font-weight: 700; fill: var(--bad); }
svg .changed-ring { fill: none; stroke: var(--accent-strong); stroke-width: 2.5; }
svg .chain { fill: none; stroke: var(--heading); stroke-width: 1.5; stroke-dasharray: 3 3; }
svg .chain-head { fill: var(--heading); }

.report-card {
  margin-top: 18px;
  border: 1px solid var(--ok-line);
  background: var(--ok-wash);
  border-radius: var(--radius);
  padding: 18px;
}

.report-card h3 { margin: 0 0 4px; font-size: 20px; }
.report-tiles { list-style: none; margin: 12px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.report-tiles li { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; }
.report-tiles .value { display: block; font-family: "Space Grotesk", sans-serif; font-size: 24px; font-weight: 700; color: var(--heading); }
.report-tiles .label { font-size: 13px; }

/* --- 4. what if ----------------------------------------------------------------------------- */

.check-key { margin: 0 0 14px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; }
.check-key li { display: inline-flex; align-items: center; gap: 6px; color: var(--heading); }

.key-num {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--heading);
  flex: none;
}

table.grid { border-collapse: collapse; width: 100%; max-width: 860px; font-size: 14px; }
table.grid th, table.grid td { border-bottom: 1px solid var(--line-soft); padding: 4px 4px; text-align: center; }
table.grid th[scope="row"] { text-align: left; font-weight: 400; width: 100%; }
table.grid thead th { font-weight: 600; color: var(--heading); }
table.grid thead th:first-child { text-align: left; padding-left: 8px; }
table.grid td, table.grid thead th:not(:first-child) { width: 38px; min-width: 30px; }
table.grid td:nth-child(even), table.grid thead th:nth-child(even):not(:first-child) { background: var(--paper); }
table.grid tr.selected th, table.grid tr.selected td { background: var(--accent-wash); }

.row-btn {
  font: inherit;
  font-size: 14px;
  text-align: left;
  background: none;
  border: none;
  color: var(--heading);
  cursor: pointer;
  padding: 6px 4px;
  width: 100%;
}

.row-btn:hover { color: var(--accent-strong); text-decoration: underline; }

.cell-mark { font-weight: 700; font-size: 16px; }
.cell-mark.pass { color: var(--ok); }
.cell-mark.fail { color: var(--bad); }
.cell-mark.wait { color: var(--text); }

.change-list { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.change-list li { margin-bottom: 4px; overflow-wrap: anywhere; }

/* --- 5. verdict map ------------------------------------------------------------------------- */

.summary-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.summary-line .big-line { margin: 0; }

.verdict-group { margin: 14px 0 0; }
.verdict-group h3 { margin: 0 0 6px; font-size: 15px; font-family: "Inter", sans-serif; font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.verdict-group h3 .count { font-weight: 400; color: var(--text); font-size: 13px; }

.marks { display: flex; flex-wrap: wrap; gap: 3px; line-height: 1; }

.marks span {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  border-radius: 3px;
  background: var(--ok-wash);
  color: var(--ok);
}

.marks span.fail { background: var(--bad-wash); color: var(--bad); font-weight: 700; }

/* --- 6. try your own ----------------------------------------------------------------------- */

.try-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }

@media (min-width: 900px) {
  .try-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .try-results { order: 2; }
  .try-controls { order: 1; }
}

.field-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.field-row[hidden] { display: none; }
.field-row label { flex: 1 1 200px; }
.field-row select { min-width: 0; width: 100%; }

.editor > summary { margin-bottom: 10px; }

.editor textarea {
  width: 100%;
  font-family: "Space Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  min-height: 240px;
  tab-size: 2;
}

.hint { font-size: 13px; margin: 6px 0 0; }
kbd { font-size: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; background: var(--paper); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.copy-state { font-size: 13px; min-height: 1.2em; margin: 8px 0 0; }

.layer-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.layer-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--paper);
}

.layer-card.pass { border-color: var(--ok-line); background: var(--ok-wash); }
.layer-card.fail { border-color: var(--bad); background: var(--bad-wash); }
.layer-card h3 { margin: 0; font-size: 16px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.layer-card p { margin: 4px 0 0; font-size: 14px; }

.world-lines { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.world-lines li { overflow-wrap: anywhere; }
.world-lines .detail { display: block; padding-left: 22px; color: var(--text); }

/* --- footer -------------------------------------------------------------------------------- */

.site-foot { border-top: 1px solid var(--line-soft); margin-top: 40px; padding: 28px 0 40px; font-size: 14px; }
.site-foot p { margin: 0 0 8px; max-width: 760px; }

@media (max-width: 560px) {
  .figure, .diagram-stage, .panel { padding: 14px; }
  .lede { font-size: 17px; }
  .union-members { gap: 6px; }
  .member { font-size: 13.5px; padding: 10px 6px; }
  .dg-path li:not(:last-child)::after, .dg-checks li:not(:last-child)::after { display: none; }
  select { min-width: 0; width: 100%; }
  .toolbar label { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
