:root {
  color-scheme: light;
  --canvas: #f3f5f2;
  --surface: #ffffff;
  --surface-2: #f8f9f7;
  --ink: #17201b;
  --muted: #59655e;
  --line: #d8ded9;
  --line-strong: #aab6ad;
  --forest: #1d5c43;
  --forest-dark: #164734;
  --forest-soft: #e2efe7;
  --blue: #285f82;
  --blue-soft: #e5f0f6;
  --amber: #85580d;
  --amber-soft: #f7ecd5;
  --red: #8b332e;
  --red-soft: #f7e7e4;
  --violet: #5d4b78;
  --violet-soft: #eeeaf3;
  --shadow: 0 10px 28px rgba(23, 32, 27, 0.07);
  --radius: 8px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
button, input, textarea, select { font: inherit; }
button, summary { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(40, 95, 130, 0.3);
  outline-offset: 2px;
}
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: 0; }
p { color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
label { display: block; margin-bottom: 6px; color: var(--ink); font-size: 13px; font-weight: 800; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}
input, select { min-height: 44px; padding: 0 11px; }
textarea { min-height: 92px; padding: 10px 11px; resize: vertical; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  transform: translateY(-150%);
  background: var(--ink);
  color: #fff;
}
.skip-link:focus { transform: translateY(0); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}
.topbar-inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; font-weight: 850; }
.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  background: var(--forest);
  color: #fff;
  font-size: 13px;
}
.tabs { display: flex; align-self: stretch; gap: 0; }
.tab-cluster { display: flex; align-items: center; flex: 0 0 auto; }
.tab {
  position: relative;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  padding: 0 5px 0 11px;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
}
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 0;
  left: 9px;
  height: 3px;
  background: var(--forest);
}
.tab-help {
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.tab-help > span {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.tab-help:hover > span,
.tab-help:focus-visible > span,
.tab-help[aria-expanded="true"] > span {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}
.tab-tooltip {
  position: fixed;
  z-index: 100;
  width: min(320px, calc(100vw - 24px));
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--ink);
  box-shadow: var(--shadow);
  color: #fff;
  pointer-events: none;
}
.tab-tooltip strong,
.tab-tooltip span { display: block; }
.tab-tooltip strong { margin-bottom: 3px; font-size: 14px; }
.tab-tooltip span { color: #dce5df; font-size: 13px; line-height: 1.45; }
.access { position: relative; margin-left: auto; }
.access > summary {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  list-style: none;
}
.access > summary::-webkit-details-marker { display: none; }
.access svg, .icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.access-panel {
  position: absolute;
  top: 52px;
  right: 0;
  width: min(360px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.access-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 72px; }
.view[hidden] { display: none; }
.global-status { min-height: 24px; margin: 0; }
.status { color: var(--muted); font-size: 14px; }
.error { color: var(--red); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 44px;
  align-items: end;
  padding: 30px 0 40px;
}
.kicker { margin-bottom: 10px; color: var(--forest); font-size: 12px; font-weight: 850; text-transform: uppercase; }
h1 { max-width: 820px; margin-bottom: 16px; font-size: clamp(38px, 5vw, 64px); }
.hero-copy { max-width: 720px; margin-bottom: 0; font-size: 19px; line-height: 1.55; }
.method-note { padding: 18px; border-left: 4px solid var(--blue); background: var(--blue-soft); }
.method-note strong { display: block; margin-bottom: 5px; }
.method-note p { margin-bottom: 0; color: #314d5e; }
.page-heading { margin-top: 28px !important; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 38px 0 18px;
}
.section-head h2 { margin-bottom: 5px; font-size: 28px; }
.section-head p { max-width: 700px; margin-bottom: 0; }
.compact-head { margin-top: 26px; }
.progress-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(260px, 1.5fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}
.metric, .next-step { min-height: 104px; padding: 16px 18px; background: var(--surface); }
.metric strong { display: block; margin-bottom: 4px; font-size: 26px; }
.metric span, .next-step span { color: var(--muted); font-size: 13px; }
.next-step { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--forest-soft); }
.next-step strong { display: block; }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}
.button:hover { border-color: var(--ink); }
.button.primary { border-color: var(--forest); background: var(--forest); color: #fff; }
.button.primary:hover { background: var(--forest-dark); }
.button.danger { border-color: var(--red); color: var(--red); }
.button:disabled { cursor: not-allowed; opacity: 0.48; }
.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.domain-list { display: grid; gap: 10px; }
.domain {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.domain > summary {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  gap: 13px;
  align-items: center;
  min-height: 74px;
  padding: 12px 16px;
  list-style: none;
}
.domain > summary::-webkit-details-marker { display: none; }
.domain > summary:hover { background: var(--surface-2); }
.domain-index {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}
.domain-name strong { display: block; }
.domain-name span { color: var(--muted); font-size: 13px; }
.domain-body { padding: 0 20px 22px 65px; border-top: 1px solid var(--line); }
.answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 22px 0; }
.answer-label { margin-bottom: 7px; color: var(--forest); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.answer-grid p { margin-bottom: 0; color: var(--ink); }
.detail-list { display: grid; gap: 8px; }
.detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}
.detail-row strong { display: block; }
.detail-row small { color: var(--muted); }
.chevron { transition: transform 180ms ease; }
.domain[open] .chevron { transform: rotate(180deg); }

.hardness {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 13px;
  padding: 0 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.hardness.adopted, .hardness.supported { background: var(--forest-soft); color: var(--forest); }
.hardness.testing { background: var(--blue-soft); color: var(--blue); }
.hardness.hypothesis, .hardness.idea { background: var(--amber-soft); color: var(--amber); }
.hardness.stale { background: var(--blue-soft); color: var(--blue); }
.hardness.blocked, .hardness.contradicted, .hardness.killed { background: var(--red-soft); color: var(--red); }
.hardness.superseded { background: var(--violet-soft); color: var(--violet); }

.surface, .next-card, .inspector {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.surface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}
.surface-head h2, .surface-head h3 { margin: 0; font-size: 20px; }
.surface-body { padding: 18px; }
.count {
  display: grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}
.empty-state { padding: 34px 20px; color: var(--muted); text-align: center; }
.empty-state h2 { color: var(--ink); }

.next-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.next-card { overflow: hidden; box-shadow: var(--shadow); }
.next-head { padding: 22px 24px; border-bottom: 1px solid var(--line); }
.next-head h2 { margin: 8px 0; font-size: 30px; }
.next-body { padding: 24px; }
.risk-score {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  margin: 20px 0;
}
.risk-number {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 26px;
  font-weight: 900;
}
.risk-track { height: 9px; overflow: hidden; border-radius: 5px; background: var(--line); }
.risk-fill { height: 100%; background: var(--amber); }
.factor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.factor { padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.factor strong { display: block; font-size: 19px; }
.factor span { color: var(--muted); font-size: 12px; }
.side-stack { display: grid; gap: 14px; }
.side-card { padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.side-card h3 { margin-bottom: 8px; }
.side-card ul { margin: 0; padding-left: 20px; }
.decision-panel { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.decision-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.segmented { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.segment {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}
.segment[aria-pressed="true"] { border-color: var(--forest); background: var(--forest-soft); color: var(--forest); }
.impact {
  margin-top: 20px;
  padding: 18px;
  border: 2px solid var(--forest);
  border-radius: var(--radius);
  background: var(--forest-soft);
}
.impact h3 { margin-bottom: 8px; }
.impact ul { margin: 0; padding-left: 20px; }

.workflow-workspace {
  display: grid;
  gap: 14px;
  max-width: 920px;
}
.request-card,
.workflow-launcher,
.workflow-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.request-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.65fr);
  gap: 22px;
  padding: 22px;
}
.request-card h2,
.workflow-launcher h2,
.workflow-step h2 { margin-bottom: 8px; font-size: 26px; }
.request-card p { margin-bottom: 0; }
mark {
  border-radius: 4px;
  padding: 1px 4px;
  background: var(--forest-soft);
  color: var(--forest-dark);
}
.request-facts {
  display: grid;
  align-content: start;
  gap: 8px;
}
.request-facts span,
.workflow-meta span,
.agent-meta span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 4px 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.workflow-launcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 22px;
  background: var(--blue-soft);
}
.workflow-launcher p { margin-bottom: 0; color: #314d5e; }
.workflow-meta,
.agent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.workflow-meta { justify-content: flex-end; }
.workflow-step {
  padding: 0;
  overflow: hidden;
}
.active-step { border-color: var(--line-strong); }
.queued-step {
  opacity: 0.72;
  background: var(--surface-2);
}
.step-rail {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.queued-step .step-rail { border-bottom: 0; }
.step-index {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}
.queued-step .step-index {
  background: var(--line-strong);
  color: var(--ink);
}
.human-result {
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.human-result h3 {
  max-width: 760px;
  margin-bottom: 8px;
  font-size: 30px;
}
.human-result p { max-width: 760px; margin-bottom: 0; }
.pass-summary {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.pass-summary > div {
  max-width: 860px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.pass-summary strong {
  display: block;
  margin-bottom: 4px;
}
.pass-summary p {
  margin: 0;
  color: var(--muted);
}
.answer-form {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.field-help {
  max-width: 760px;
  margin: -2px 0 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.answer-form textarea { min-height: 118px; }
.answer-form button { justify-self: start; }
.ai-first-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 860px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--blue-soft);
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.manual-answer-form {
  display: grid;
  gap: 14px;
}
.optional-context {
  max-width: 760px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.optional-context > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}
.optional-context > summary::-webkit-details-marker { display: none; }
.optional-context > summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.optional-context > div {
  padding: 0 14px 14px;
}
.optional-context textarea {
  min-height: 86px;
  background: var(--surface);
}
.workflow-disclosure {
  border-bottom: 1px solid var(--line);
}
.workflow-disclosure:last-child { border-bottom: 0; }
.workflow-disclosure > summary {
  min-height: 48px;
  padding: 12px 22px;
  color: var(--ink);
  font-weight: 850;
  list-style: none;
}
.workflow-disclosure > summary::-webkit-details-marker { display: none; }
.workflow-disclosure > summary:hover { background: var(--surface-2); }
.workflow-disclosure pre {
  overflow: auto;
  max-height: 320px;
  margin: 0 22px 22px;
  padding: 14px;
  border-radius: 6px;
  background: #17201b;
  color: #eef3ef;
  font-size: 12px;
  line-height: 1.5;
}
.workflow-disclosure.secondary {
  background: var(--surface-2);
}
.plain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 0 22px 22px;
}
.plain-grid strong { display: block; margin-bottom: 6px; }
.plain-grid p { margin-bottom: 10px; }
.plain-grid ul { margin: 0; padding-left: 20px; color: var(--muted); }
.compact-factors {
  padding: 0 22px 22px;
  margin-top: 0;
}
.review-card {
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background: var(--forest-soft);
}
.review-card h3 {
  margin-bottom: 8px;
  font-size: 26px;
}
.change-preview {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 16px 0;
  border: 1px solid #bdd2c5;
  border-radius: 6px;
  background: #bdd2c5;
}
.change-preview > div {
  padding: 14px;
  background: var(--surface);
}
.change-preview strong { display: block; margin-bottom: 4px; }
.change-preview p { margin-bottom: 0; color: var(--ink); }

.graph-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(180px, 0.6fr));
  gap: 12px;
  margin-bottom: 14px;
}
.graph-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.node-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.node-button {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}
.node-button:hover, .node-button.active { border-color: var(--forest); background: var(--forest-soft); }
.node-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); }
.node-button[data-hardness="adopted"] .node-dot, .node-button[data-hardness="supported"] .node-dot { background: var(--forest); }
.node-button[data-hardness="testing"] .node-dot { background: var(--blue); }
.node-button[data-hardness="stale"] .node-dot, .node-button[data-hardness="blocked"] .node-dot, .node-button[data-hardness="contradicted"] .node-dot { background: var(--red); }
.node-main strong { display: block; }
.node-main span { color: var(--muted); font-size: 12px; }
.inspector { position: sticky; top: 82px; min-height: 280px; padding: 18px; }
.inspector h2 { margin-bottom: 8px; font-size: 24px; }
.inspector-section { padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.inspector-section h3 { margin-bottom: 7px; font-size: 15px; }
.relation-list { display: grid; gap: 6px; }
.relation { padding: 8px 10px; border-left: 3px solid var(--blue); background: var(--blue-soft); font-size: 13px; }

.work-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 0.75fr); gap: 18px; align-items: start; }
.form-surfaces { display: grid; gap: 18px; }
.form-stack { display: grid; gap: 13px; padding: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.test-row, .evidence-row {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.test-row:last-child, .evidence-row:last-child { border-bottom: 0; }
.row-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.row-top strong { display: block; }
.row-meta { color: var(--muted); font-size: 12px; }
.evidence-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.direction { color: var(--blue); font-weight: 850; }
.direction.refutes { color: var(--red); }
.direction.neutral { color: var(--muted); }

.activity { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.activity-row { border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-row > summary {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 140px 110px 28px;
  gap: 14px;
  align-items: center;
  min-height: 62px;
  padding: 10px 15px;
  list-style: none;
}
.activity-row > summary::-webkit-details-marker { display: none; }
.activity-row > summary:hover { background: var(--surface-2); }
.activity-title strong { display: block; }
.activity-title span, .activity-time { color: var(--muted); font-size: 12px; }
.audit { padding: 0 16px 18px 120px; }
.audit pre, .method-card pre {
  overflow: auto;
  max-height: 360px;
  padding: 14px;
  border-radius: 6px;
  background: #17201b;
  color: #eef3ef;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.step-audit { margin-top: 8px; border: 1px solid var(--line); border-radius: 6px; }
.step-audit > summary { padding: 10px 12px; }
.step-content { padding: 0 12px 14px; }
.ai-cost-panel { margin-bottom: 18px; }
.ai-cost-card h2 { margin: 0; font-size: 34px; }
.cost-bars {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.cost-bar-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 72px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.cost-bar {
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.cost-bar i {
  display: block;
  height: 100%;
  background: var(--forest);
}
.bar-fill-5 { width: 5%; }
.bar-fill-10 { width: 10%; }
.bar-fill-15 { width: 15%; }
.bar-fill-20 { width: 20%; }
.bar-fill-25 { width: 25%; }
.bar-fill-30 { width: 30%; }
.bar-fill-35 { width: 35%; }
.bar-fill-40 { width: 40%; }
.bar-fill-45 { width: 45%; }
.bar-fill-50 { width: 50%; }
.bar-fill-55 { width: 55%; }
.bar-fill-60 { width: 60%; }
.bar-fill-65 { width: 65%; }
.bar-fill-70 { width: 70%; }
.bar-fill-75 { width: 75%; }
.bar-fill-80 { width: 80%; }
.bar-fill-85 { width: 85%; }
.bar-fill-90 { width: 90%; }
.bar-fill-95 { width: 95%; }
.bar-fill-100 { width: 100%; }
.cost-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.graph-thumb-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.graph-thumb-box textarea {
  min-height: 74px;
}
.thumb-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.thumb {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
}
.thumb svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.thumb.up:hover, .thumb.up.active { border-color: var(--forest); background: var(--forest-soft); color: var(--forest); }
.thumb.down:hover, .thumb.down.active { border-color: var(--red); background: var(--red-soft); color: var(--red); }

.method-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr); gap: 20px; }
.method-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.loop-steps { display: grid; gap: 1px; margin-top: 18px; background: var(--line); }
.loop-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 13px; background: var(--surface); }
.loop-step > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--forest-soft);
  color: var(--forest);
  font-size: 13px;
  font-weight: 850;
}
.loop-step strong { display: block; }
.loop-step small { color: var(--muted); }
.pnl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pnl-grid-spaced { margin-top: 10px; }
.pnl-cell { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pnl-cell strong { display: block; font-size: 22px; }
.pnl-cell span { color: var(--muted); font-size: 12px; }
.warning { padding: 15px; border-left: 4px solid var(--amber); background: var(--amber-soft); color: #5f430f; }

.guide-heading > div { max-width: 900px; }
.guide-heading h1 { max-width: 900px; }
.guide-intro {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1.45fr);
  gap: 42px;
  padding: 28px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.guide-intro h2 { max-width: 430px; margin-bottom: 0; font-size: 30px; }
.responsibility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.responsibility-grid h3 { margin-bottom: 7px; font-size: 18px; }
.responsibility-grid p { margin-bottom: 0; }
.guide-section { padding-top: 12px; }
.guide-section > .section-head { align-items: start; }
.guide-diagram {
  display: grid;
  justify-items: center;
  overflow: hidden;
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--surface-2);
  background-size: 28px 28px;
}
.diagram-node {
  width: min(100%, 430px);
  padding: 14px 16px;
  border: 2px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  text-align: center;
}
.diagram-node strong,
.diagram-node span { display: block; }
.diagram-node strong { font-size: 16px; }
.diagram-type {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.plan-node { border-color: var(--forest); box-shadow: 0 0 0 4px var(--forest-soft); }
.risk-node { border-color: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.diagram-edge {
  position: relative;
  display: grid;
  min-height: 58px;
  place-items: center;
}
.diagram-edge::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 2px solid var(--line-strong);
}
.diagram-edge::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: calc(50% - 4px);
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  border-right: 2px solid var(--line-strong);
  border-bottom: 2px solid var(--line-strong);
}
.diagram-edge span {
  position: relative;
  z-index: 1;
  padding: 2px 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.diagram-pair {
  display: grid;
  width: min(100%, 760px);
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.diagram-pair .diagram-node { width: 100%; }
.diagram-pair-edge { color: var(--blue); font-size: 26px; font-weight: 900; text-align: center; }
.diagram-decision {
  display: grid;
  width: min(100%, 620px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 2px solid var(--blue);
  border-radius: 6px;
  background: var(--blue-soft);
}
.diagram-decision span {
  padding: 12px 8px;
  border-right: 1px solid #bfd3df;
  color: var(--blue);
  font-weight: 850;
  text-align: center;
}
.diagram-decision span:last-child { border-right: 0; }
.diagram-projections {
  display: grid;
  width: min(100%, 760px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.diagram-projections > div {
  padding: 12px;
  border: 1px solid var(--forest);
  border-radius: 6px;
  background: var(--forest-soft);
  text-align: center;
}
.diagram-projections strong,
.diagram-projections span { display: block; }
.diagram-projections span { color: var(--forest-dark); font-size: 12px; }
.diagram-return {
  display: flex;
  width: min(100%, 760px);
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  padding: 13px;
  border-top: 2px solid var(--violet);
  color: var(--violet);
}
.diagram-return > span { font-size: 27px; line-height: 1; }
.guide-steps {
  overflow: hidden;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.guide-steps li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.guide-step-number {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--forest-soft);
  color: var(--forest);
  font-size: 13px;
  font-weight: 900;
}
.guide-steps strong { display: block; margin-bottom: 3px; font-size: 17px; }
.guide-steps p { margin-bottom: 0; }
.text-action {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid var(--forest);
  background: transparent;
  color: var(--forest);
  font-weight: 850;
}
.text-action:hover { color: var(--forest-dark); border-bottom-color: var(--forest-dark); }
.tab-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.tab-map > div {
  min-height: 128px;
  padding: 17px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.tab-map strong { display: block; margin-bottom: 5px; }
.tab-map p { margin-bottom: 0; font-size: 14px; }
.glossary-head { align-items: end !important; }
.glossary-search { width: min(340px, 100%); flex: 0 0 auto; }
.glossary-list { margin: 0; border-top: 1px solid var(--line-strong); }
.glossary-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
}
.glossary-row dt { font-weight: 850; }
.glossary-row dd { margin: 0; color: var(--muted); }
.glossary-empty { border-bottom: 1px solid var(--line); }

@media (max-width: 980px) {
  .topbar-inner { flex-wrap: wrap; gap: 8px; padding: 8px 0 0; }
  .brand { margin-right: auto; }
  .access { margin-left: 0; }
  .tabs { order: 3; width: 100%; overflow-x: auto; }
  .tab-cluster { flex: 0 0 auto; }
  .hero, .next-layout, .graph-layout, .work-grid, .method-grid, .request-card { grid-template-columns: 1fr; gap: 20px; }
  .guide-intro { grid-template-columns: 1fr; gap: 20px; }
  .progress-band { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .next-step { grid-column: 1 / -1; }
  .inspector { position: static; }
  .pnl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .page, .topbar-inner { width: min(100% - 22px, 1180px); }
  .page { padding-top: 18px; }
  .hero { padding: 12px 0 28px; }
  h1 { font-size: 38px; }
  .hero-copy { font-size: 17px; }
  .progress-band, .graph-toolbar, .node-list, .factor-grid, .segmented, .form-grid, .answer-grid, .pnl-grid { grid-template-columns: 1fr; }
  .next-step { grid-column: auto; align-items: flex-start; flex-direction: column; }
  .workflow-launcher, .step-rail { grid-template-columns: 1fr; display: grid; }
  .workflow-meta { justify-content: flex-start; }
  .plain-grid { grid-template-columns: 1fr; }
  .human-result h3 { font-size: 24px; }
  .domain > summary { grid-template-columns: 34px minmax(0, 1fr) auto 20px; padding-inline: 11px; }
  .domain-body { padding: 0 14px 17px; }
  .activity-row > summary { grid-template-columns: 72px minmax(0, 1fr) 26px; }
  .activity-row .activity-time, .activity-row .hardness { display: none; }
  .audit { padding: 0 11px 14px; }
  .risk-score { grid-template-columns: 72px minmax(0, 1fr); }
  .risk-number { width: 68px; height: 68px; font-size: 21px; }
  .responsibility-grid, .tab-map { grid-template-columns: 1fr; }
  .guide-diagram { padding: 24px 14px; }
  .diagram-pair { grid-template-columns: 1fr; }
  .diagram-pair-edge { transform: rotate(90deg); }
  .diagram-decision { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diagram-decision span { border-bottom: 1px solid #bfd3df; }
  .diagram-decision span:nth-child(2) { border-right: 0; }
  .diagram-decision span:nth-child(3),
  .diagram-decision span:nth-child(4) { border-bottom: 0; }
  .diagram-projections { grid-template-columns: 1fr; }
  .guide-steps li { grid-template-columns: 42px minmax(0, 1fr); }
  .guide-steps .text-action { grid-column: 2; justify-self: start; }
  .glossary-head { align-items: stretch !important; flex-direction: column; }
  .glossary-row { grid-template-columns: 1fr; gap: 4px; padding-inline: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
