:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #647084;
  --paper: #f4f6f8;
  --surface: #ffffff;
  --line: #d8dee7;
  --navy: #172033;
  --cyan: #0f7f88;
  --cyan-soft: #dff3f3;
  --blue: #2f67ad;
  --blue-soft: #e4eefb;
  --green: #287a56;
  --green-soft: #e2f2e9;
  --amber: #a35c0c;
  --amber-soft: #faecd7;
  --coral: #a8453d;
  --coral-soft: #f8e4e1;
  --shadow: 0 14px 34px rgba(23, 32, 51, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
button, a { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(15, 127, 136, .35); outline-offset: 3px; }

.masthead { background: var(--navy); color: #fff; border-bottom: 4px solid var(--cyan); }
.masthead__inner, main, footer { width: min(1480px, calc(100% - 40px)); margin: 0 auto; }
.masthead__inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-weight: 700; }
.brand__mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--cyan); border-radius: 6px; font-size: 13px; }
.masthead__meta { display: flex; align-items: center; gap: 14px; color: #c9d2df; font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 7px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--live { color: #8ee0ba; }

main { padding: 38px 0 64px; }
.intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(420px, .75fr); gap: 54px; align-items: end; }
.eyebrow { margin: 0 0 8px; color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { max-width: 820px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 6vw, 76px); font-weight: 600; line-height: .98; letter-spacing: 0; }
.intro__lead { max-width: 850px; margin: 22px 0 0; color: var(--muted); font-size: 18px; line-height: 1.65; }
.facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.facts div { min-width: 0; padding: 16px 0; }
.facts div:nth-child(odd) { padding-right: 18px; border-right: 1px solid var(--line); }
.facts div:nth-child(even) { padding-left: 18px; }
.facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 5px 0 0; font-weight: 750; }

.tabs { display: flex; gap: 4px; margin-top: 38px; padding-bottom: 8px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab { min-height: 42px; padding: 0 15px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab:hover { background: #e9edf2; color: var(--ink); }
.tab.is-active { background: var(--navy); color: #fff; }
.panel { padding-top: 34px; }
.panel[hidden] { display: none; }
.section-heading { display: flex; justify-content: space-between; gap: 40px; align-items: end; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: 27px; }
.section-heading > p { max-width: 590px; margin: 0; color: var(--muted); line-height: 1.55; }

.route-selector { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.route-button { min-height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); cursor: pointer; }
.route-button:hover { border-color: var(--cyan); }
.route-button.is-active { border-color: var(--cyan); background: var(--cyan); color: #fff; }

.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: stretch; }
.system-map { display: grid; grid-template-columns: repeat(5, minmax(160px, 1fr)); gap: 14px; min-width: 0; }
.stage { position: relative; min-width: 0; padding-top: 12px; border-top: 3px solid var(--stage-color); }
.stage::after { content: "›"; position: absolute; top: 58px; right: -13px; z-index: 4; color: #9aa5b4; font-size: 30px; font-weight: 300; }
.stage:last-child::after { display: none; }
.stage[data-group="interfaces"] { --stage-color: var(--cyan); --stage-soft: var(--cyan-soft); }
.stage[data-group="control"] { --stage-color: var(--blue); --stage-soft: var(--blue-soft); }
.stage[data-group="knowledge"] { --stage-color: var(--green); --stage-soft: var(--green-soft); }
.stage[data-group="runtime"] { --stage-color: var(--amber); --stage-soft: var(--amber-soft); }
.stage[data-group="resilience"] { --stage-color: var(--coral); --stage-soft: var(--coral-soft); }
.stage__number { color: var(--stage-color); font-size: 12px; font-weight: 800; }
.stage h3 { min-height: 48px; margin: 6px 0 3px; font-size: 16px; }
.stage__summary { min-height: 38px; margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.node-list { display: grid; gap: 8px; }
.node {
  position: relative;
  min-height: 86px;
  padding: 13px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 4px 12px rgba(23, 32, 51, .06);
  cursor: pointer;
  transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease;
}
.node:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.node strong { display: block; padding-right: 28px; font-size: 14px; }
.node small { display: block; margin-top: 7px; color: var(--muted); line-height: 1.4; }
.node__signal { position: absolute; top: 13px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--stage-color); }
.node__step { position: absolute; top: -7px; left: -7px; display: none; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; }
.node.is-route { border-color: var(--stage-color); background: var(--stage-soft); opacity: 1; }
.node.is-route .node__step { display: grid; }
.node.is-muted { opacity: .28; box-shadow: none; }
.node.is-selected { outline: 3px solid rgba(15, 127, 136, .2); border-color: var(--cyan); }

.inspector { min-height: 100%; padding: 22px; border: 1px solid var(--line); border-radius: 6px; background: var(--navy); color: #fff; }
.inspector__number { margin: 0 0 28px; color: #79d1d5; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.inspector h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 500; }
.inspector > p:not(.inspector__number) { color: #c7d0dd; line-height: 1.55; }
.inspector__contract { margin-top: 20px; }
.inspector__contract section { padding: 12px 0; border-top: 1px solid #3e485b; }
.inspector__contract span, .inspector__questions > span { display: block; color: #79d1d5; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.inspector__contract p { margin: 6px 0 0; color: #d8dee8; font-size: 12px; line-height: 1.48; }
.inspector dl { margin: 22px 0 0; }
.inspector dl div { padding: 12px 0; border-top: 1px solid #3e485b; }
.inspector dt { color: #8fa0b7; font-size: 11px; text-transform: uppercase; }
.inspector dd { margin: 6px 0 0; font-size: 13px; line-height: 1.45; }
.inspector a { display: inline-flex; margin-top: 18px; color: #8ee0ba; }
.inspector__questions { margin-top: 18px; }
.inspector__questions button { min-width: 32px; min-height: 32px; margin: 8px 6px 0 0; border: 1px solid #526078; border-radius: 4px; background: transparent; color: #fff; cursor: pointer; }
.inspector__questions button:hover { border-color: #79d1d5; color: #79d1d5; }
.route-story { display: flex; gap: 10px; align-items: center; margin-top: 16px; padding: 13px 0; border-top: 1px solid var(--line); color: var(--muted); }
.route-story strong { color: var(--ink); }

.option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.option { position: relative; padding: 22px; border-top: 4px solid var(--line); background: var(--surface); box-shadow: 0 8px 22px rgba(23, 32, 51, .06); }
.option.is-recommended { border-top-color: var(--green); }
.option__top { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.option__number { color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: 34px; }
.option__verdict { padding: 5px 8px; background: #edf0f4; color: var(--muted); font-size: 11px; font-weight: 750; }
.option.is-recommended .option__verdict { background: var(--green-soft); color: var(--green); }
.option h3 { margin: 20px 0 8px; font-size: 21px; }
.option > p { min-height: 48px; margin: 0; color: var(--muted); line-height: 1.5; }
.option h4 { margin: 22px 0 8px; font-size: 12px; text-transform: uppercase; }
.option ul { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.65; }

.timeline { margin: 0; padding: 0; list-style: none; counter-reset: phase; }
.timeline li { display: grid; grid-template-columns: 64px minmax(220px, .55fr) minmax(0, 1fr) 90px; gap: 18px; align-items: center; padding: 20px 0; border-top: 1px solid var(--line); }
.timeline__number { color: var(--cyan); font-family: Georgia, "Times New Roman", serif; font-size: 32px; }
.timeline h3 { margin: 0; font-size: 17px; }
.timeline p { margin: 0; color: var(--muted); line-height: 1.5; }
.timeline__status { justify-self: end; color: var(--muted); font-size: 12px; }
.timeline li.is-next .timeline__status { color: var(--green); font-weight: 800; }

.system-selector { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.course-system { min-height: 126px; padding: 16px; border: 1px solid var(--line); border-top: 4px solid var(--blue); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.course-system:hover { border-color: var(--cyan); }
.course-system.is-active { border-color: var(--navy); background: var(--navy); color: #fff; }
.course-system > span { color: var(--cyan); font-family: Georgia, "Times New Roman", serif; font-size: 25px; }
.course-system strong, .course-system small { display: block; }
.course-system strong { margin-top: 12px; font-size: 16px; }
.course-system small { margin-top: 6px; color: var(--muted); line-height: 1.4; }
.course-system.is-active small { color: #b9c4d3; }
.course-system-detail { margin-top: 14px; border-top: 5px solid var(--cyan); background: var(--surface); box-shadow: var(--shadow); }
.course-system-detail__intro { display: flex; gap: 18px; align-items: end; padding: 24px 26px; border-bottom: 1px solid var(--line); }
.course-system-detail__intro > span { color: var(--cyan); font-family: Georgia, "Times New Roman", serif; font-size: 52px; line-height: 1; }
.course-system-detail__intro p { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.course-system-detail__intro h3 { margin: 0; font-size: 27px; }
.course-system-detail__columns { display: grid; grid-template-columns: repeat(4, 1fr); }
.course-system-detail__columns section { min-height: 190px; padding: 22px; border-right: 1px solid var(--line); }
.course-system-detail__columns section:last-child { border-right: 0; }
.course-system-detail__columns span, .chapter-links > span, .audit-links > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.course-system-detail__columns p { margin: 12px 0 0; line-height: 1.6; }
.course-system-detail__footer { display: grid; grid-template-columns: 1.3fr .7fr; gap: 28px; padding: 22px 26px; border-top: 1px solid var(--line); background: #eef1f5; }
.chapter-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.chapter-links > span { grid-column: 1 / -1; }
.chapter-links a { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; text-decoration: none; }
.chapter-links a:hover { border-color: var(--blue); color: var(--blue); }
.chapter-links a span { color: var(--blue); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.audit-links > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.audit-links button { min-width: 42px; min-height: 36px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); cursor: pointer; }
.audit-links button:hover { border-color: var(--cyan); color: var(--cyan); }
.source-library { margin-top: 46px; }

.audit-toolbar { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(260px, 1.2fr) auto auto; gap: 14px; align-items: end; padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.audit-toolbar label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.audit-toolbar select, .audit-item select, .audit-item input { min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); }
.audit-toolbar button { min-height: 42px; padding: 0 14px; border: 0; border-radius: 4px; background: var(--navy); color: #fff; cursor: pointer; }
.audit-toolbar .button-secondary { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.audit-progress > div { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.audit-progress strong { font-family: Georgia, "Times New Roman", serif; font-size: 25px; }
.audit-progress span { color: var(--muted); font-size: 12px; }
.audit-progress progress { width: 100%; height: 8px; margin-top: 8px; accent-color: var(--green); }
.audit-filters { display: flex; gap: 6px; margin: 18px 0; padding-bottom: 8px; overflow-x: auto; }
.audit-filter { min-height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.audit-filter span { margin-right: 6px; color: var(--cyan); font-weight: 800; }
.audit-filter.is-active { border-color: var(--cyan); background: var(--cyan); color: #fff; }
.audit-filter.is-active span { color: #fff; }
.audit-list { display: grid; gap: 10px; }
.audit-item { padding: 18px; border-left: 5px solid var(--line); background: var(--surface); box-shadow: 0 5px 16px rgba(23, 32, 51, .05); }
.audit-item--pass, .audit-item--na { border-left-color: var(--green); }
.audit-item--partial { border-left-color: var(--amber); }
.audit-item--fail { border-left-color: var(--coral); }
.audit-item__heading { display: grid; grid-template-columns: 54px minmax(0, 1fr) 170px; gap: 14px; align-items: center; }
.audit-item__heading > span { color: var(--cyan); font-family: Georgia, "Times New Roman", serif; font-size: 22px; }
.audit-item__heading small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.audit-item__heading h3 { margin: 4px 0 0; font-size: 17px; }
.audit-item > p { margin: 15px 0 0; color: var(--muted); line-height: 1.55; }
.audit-item__evidence { margin-top: 14px; padding: 12px; background: #eef1f5; }
.audit-item__evidence span { color: var(--green); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.audit-item__evidence p { margin: 5px 0 0; font-size: 13px; line-height: 1.45; }
.audit-item > label { display: grid; gap: 6px; margin-top: 14px; color: var(--muted); font-size: 11px; }

.potok-audit-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.segmented button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.segmented button.is-active { background: var(--navy); color: #fff; }
.potok-audit-controls label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.potok-audit-controls select { min-height: 42px; padding: 0 34px 0 11px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); }
.potok-freshness { display: flex; max-width: 460px; margin: 0 0 10px auto; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.potok-pipeline-status { display: inline-flex; flex: 0 0 auto; padding: 5px 7px; border-radius: 4px; background: var(--green-soft); color: var(--green); font-size: 10px; font-weight: 850; letter-spacing: .04em; }
.potok-pipeline-status--no-new-audits { background: var(--blue-soft); color: var(--blue); }
.potok-pipeline-status--lagging, .potok-pipeline-status--stale { background: var(--amber-soft); color: var(--amber); }
.potok-pipeline-status--failed, .potok-pipeline-status--unknown { background: var(--coral-soft); color: var(--coral); }
.potok-freshness-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0 0 22px; border: 1px solid var(--line); background: var(--line); }
.potok-freshness-times div { min-width: 0; padding: 11px 14px; background: var(--surface); }
.potok-freshness-times dt { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.potok-freshness-times dd { margin: 5px 0 0; font-size: 12px; font-weight: 750; }
.potok-metrics { display: grid; grid-template-columns: repeat(5, 1fr); margin: 22px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.potok-metrics > div { min-width: 0; padding: 17px 15px; border-right: 1px solid var(--line); }
.potok-metrics > div:last-child { border-right: 0; }
.potok-metrics strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 500; }
.potok-metrics span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.potok-model-ranking { margin-bottom: 22px; border: 1px solid var(--navy); background: var(--surface); }
.potok-ranking__heading { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(420px, 1.2fr); gap: 28px; align-items: center; padding: 18px 20px; background: var(--navy); color: #fff; }
.potok-ranking__heading h3 { margin: 5px 0 0; font-size: 19px; }
.potok-ranking__heading p { margin: 0; color: rgba(255,255,255,.78); font-size: 13px; line-height: 1.55; }
.potok-ranking__heading .eyebrow { color: var(--cyan-soft); }
.potok-ranking__scores { display: grid; grid-template-columns: repeat(2, 1fr); }
.potok-ranking__scores section { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 16px 20px; border-right: 1px solid var(--line); }
.potok-ranking__scores section:last-child { border-right: 0; }
.potok-ranking__scores section > span { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 800; }
.potok-ranking__scores section div { display: grid; gap: 4px; min-width: 0; }
.potok-ranking__scores section div small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.potok-ranking__scores section > b { font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 500; }
.potok-ranking__scores section > b small { color: var(--muted); font: 10px Arial, sans-serif; }
.potok-ranking__note { margin: 0; padding: 10px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.potok-models { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-bottom: 22px; background: var(--line); border: 1px solid var(--line); }
.potok-models section { padding: 16px; background: var(--surface); }
.potok-models section > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.potok-models section > div span { color: var(--muted); font-size: 12px; }
.potok-models dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 0; }
.potok-models dl div { min-width: 0; }
.potok-models dt { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.potok-models dd { margin: 4px 0 0; font-weight: 750; }
.potok-models .potok-models__journal-only { grid-column: 1 / -1; }
.potok-models__journal-only p { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.potok-audit-table { border-top: 1px solid var(--line); }
.potok-audit-row { display: grid; grid-template-columns: 130px 120px minmax(260px, 1.35fr) 120px minmax(190px, .8fr) 130px; gap: 14px; align-items: center; min-width: 0; padding: 14px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.potok-audit-row--head { min-height: 42px; padding-block: 9px; background: var(--navy); color: #fff; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.potok-audit-row > div { min-width: 0; }
.potok-audit-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.potok-audit-link { display: inline-block; margin-top: 7px; color: var(--cyan); font-size: 11px; font-weight: 750; }
.potok-contour { display: inline-flex; padding: 5px 7px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 750; }
.potok-review-results { display: flex; flex-wrap: wrap; gap: 6px; }
.potok-verdict { display: grid; grid-template-columns: auto 1fr; gap: 2px 7px; min-width: 178px; padding: 7px 8px; border-left: 3px solid var(--green); background: var(--green-soft); font-size: 11px; }
.potok-verdict b { grid-row: 1 / 3; align-self: center; }
.potok-verdict small { margin: 0; }
.potok-verdict--pass_with_notes { border-color: var(--amber); background: var(--amber-soft); }
.potok-verdict--needs_fix, .potok-verdict--inconclusive { border-color: var(--coral); background: var(--coral-soft); }
.potok-value { display: inline-flex; min-width: 48px; justify-content: center; padding: 5px 7px; border-radius: 4px; font-weight: 800; }
.potok-value--9 { background: var(--green-soft); color: var(--green); }
.potok-value--7 { background: var(--blue-soft); color: var(--blue); }
.potok-value--5 { background: var(--amber-soft); color: var(--amber); }
.potok-value--1 { background: var(--coral-soft); color: var(--coral); }
.potok-audit-detail { grid-column: 1 / -1; padding-top: 2px; border-top: 1px dashed var(--line); }
.potok-audit-detail summary { width: max-content; padding-top: 9px; color: var(--cyan); font-size: 11px; font-weight: 750; cursor: pointer; }
.potok-audit-detail__body { padding: 14px; background: #f4f6f8; }
.potok-audit-detail__body > p { margin: 0 0 12px; font-size: 12px; line-height: 1.55; }
.potok-audit-detail__body > div { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.potok-audit-detail__body section { padding: 11px; border: 1px solid var(--line); background: #fff; }
.potok-audit-detail__body section span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.potok-audit-detail__body section p { margin: 8px 0 0; font-size: 12px; line-height: 1.45; }
.potok-audit-detail__body > small { margin-top: 10px; }
.potok-error, .potok-ok { display: inline-flex; padding: 5px 7px; border-radius: 4px; font-size: 11px; }
.potok-error { background: var(--coral-soft); color: var(--coral); }
.potok-ok { background: var(--green-soft); color: var(--green); }
.potok-error-log { display: grid; grid-template-columns: 230px 1fr; gap: 24px; margin-top: 28px; padding: 20px 0; border-top: 3px solid var(--coral); border-bottom: 1px solid var(--line); }
.potok-error-log h3 { margin: 0; font-size: 18px; }
.potok-error-log #potok-error-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.potok-error-log #potok-error-list > div { display: grid; grid-template-columns: 70px 1fr 28px; gap: 8px; padding: 9px 10px; background: var(--surface); font-size: 12px; }
.potok-error-log #potok-error-list > div b { color: var(--coral); text-align: right; }
.potok-empty { margin: 0; padding: 18px; background: var(--surface); color: var(--muted); }
.potok-value-method { margin-top: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.potok-value-method summary { color: var(--cyan); font-weight: 750; cursor: pointer; }
.potok-value-method p { max-width: 900px; margin: 12px 0 0; color: var(--muted); line-height: 1.6; }

.question-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr); gap: 24px; align-items: start; }
.question-list { display: grid; border-top: 1px solid var(--line); }
.question { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; min-height: 68px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.question:hover { background: #e9edf2; }
.question.is-active { background: var(--navy); color: #fff; }
.question > span { color: var(--cyan); font-family: Georgia, "Times New Roman", serif; font-size: 21px; }
.question.is-active > span { color: #79d1d5; }
.question strong { font-size: 14px; line-height: 1.4; }
.question-detail { position: sticky; top: 20px; min-height: 480px; padding: 26px; border-top: 4px solid var(--cyan); background: var(--surface); box-shadow: var(--shadow); }
.question-detail h2 { max-width: 760px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; line-height: 1.15; }
.question-detail__answer { margin: 20px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.fact-box { margin-top: 24px; padding: 18px; border-left: 4px solid var(--amber); background: var(--amber-soft); }
.fact-box span, .question-detail__links > span, .question-detail__sources > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.fact-box p { margin: 7px 0 0; line-height: 1.55; }
.question-detail__links, .question-detail__sources { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.question-detail__links div { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.question-detail__links button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); cursor: pointer; }
.question-detail__links button:hover { border-color: var(--cyan); color: var(--cyan); }
.question-detail__sources { display: grid; gap: 8px; }
.question-detail__sources a { color: var(--blue); font-size: 13px; }

.toolkit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-card { padding: 22px; border-top: 4px solid var(--line); background: var(--surface); box-shadow: 0 8px 22px rgba(23, 32, 51, .06); }
.tool-card--installed, .tool-card--active { border-top-color: var(--green); }
.tool-card--optional { border-top-color: var(--amber); }
.tool-card__top { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tool-card h3 { margin: 22px 0 6px; font-size: 21px; }
.tool-card > strong { color: var(--green); font-size: 12px; }
.tool-card--optional > strong, .tool-card--not-needed > strong { color: var(--amber); }
.tool-card > p { min-height: 84px; margin: 16px 0 0; color: var(--muted); line-height: 1.55; }
.tool-card dl { margin: 20px 0 0; }
.tool-card dl div { padding: 12px 0; border-top: 1px solid var(--line); }
.tool-card dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.tool-card dd { margin: 6px 0 0; font-size: 13px; line-height: 1.48; }
.tool-card a { display: inline-flex; margin-top: 18px; color: var(--blue); font-size: 13px; }
.prompt-section { margin-top: 48px; }
.section-heading--compact { margin-bottom: 18px; }
.prompt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.prompt-card { display: grid; grid-template-rows: auto 1fr auto; min-height: 250px; padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.prompt-card > div { display: flex; gap: 12px; align-items: baseline; }
.prompt-card > div span { color: var(--cyan); font-family: Georgia, "Times New Roman", serif; font-size: 24px; }
.prompt-card h3 { margin: 0; font-size: 17px; }
.prompt-card p { color: var(--muted); line-height: 1.6; }
.prompt-card button { justify-self: start; min-height: 38px; padding: 0 12px; border: 0; border-radius: 4px; background: var(--navy); color: #fff; cursor: pointer; }
.prompt-card button:hover { background: var(--cyan); }

.lesson-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.lesson { display: block; min-height: 230px; padding: 20px; border-top: 4px solid var(--blue); background: var(--surface); color: inherit; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; }
.lesson:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.lesson__number { color: var(--blue); font-family: Georgia, "Times New Roman", serif; font-size: 38px; }
.lesson h3 { margin: 24px 0 8px; font-size: 17px; }
.lesson p { margin: 0; color: var(--muted); line-height: 1.5; }
.lesson__actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.lesson__actions a { padding: 8px 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--blue); font-size: 12px; font-weight: 750; text-decoration: none; }
.lesson__actions a:hover { border-color: var(--blue); }
.course-flow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.course-flow span { padding: 8px 10px; background: #e9edf2; font-size: 13px; font-weight: 700; }
.course-flow i { color: var(--cyan); font-style: normal; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.link-row a { padding: 9px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); text-decoration: none; }
.link-row a:hover { border-color: var(--cyan); color: var(--cyan); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.45; }
th { background: var(--navy); color: #fff; font-size: 12px; text-transform: uppercase; }
td:first-child { font-weight: 750; }
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 28px; }
.principles article { padding-top: 14px; border-top: 3px solid var(--cyan); }
.principles span { color: var(--cyan); font-size: 12px; font-weight: 800; }
.principles h3 { margin: 8px 0 6px; font-size: 16px; }
.principles p { margin: 0; color: var(--muted); line-height: 1.5; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer a { color: var(--cyan); }

@media (max-width: 1120px) {
  .intro { grid-template-columns: 1fr; }
  .facts { max-width: 680px; }
  .map-layout { grid-template-columns: 1fr; }
  .system-map { grid-template-columns: repeat(3, 1fr); }
  .stage::after { display: none; }
  .inspector { min-height: 0; }
  .lesson-grid, .principles { grid-template-columns: repeat(2, 1fr); }
  .system-selector, .course-system-detail__columns { grid-template-columns: repeat(2, 1fr); }
  .course-system-detail__columns section:nth-child(2) { border-right: 0; }
  .course-system-detail__columns section { border-bottom: 1px solid var(--line); }
  .course-system-detail__footer { grid-template-columns: 1fr; }
  .audit-toolbar { grid-template-columns: 1fr 1fr; }
  .potok-metrics { grid-template-columns: repeat(3, 1fr); }
  .potok-metrics > div:nth-child(3) { border-right: 0; }
  .potok-metrics > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .potok-ranking__heading { grid-template-columns: 1fr; }
  .potok-audit-row { grid-template-columns: 110px 105px minmax(240px, 1fr) 105px 170px 110px; overflow-x: auto; }
  .question-layout { grid-template-columns: 1fr; }
  .question-detail { position: static; min-height: 0; }
  .toolkit-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .masthead__inner, main, footer { width: min(100% - 28px, 1480px); }
  .masthead__meta span:last-child { display: none; }
  main { padding-top: 26px; }
  .intro__lead { font-size: 16px; }
  .facts { grid-template-columns: 1fr; }
  .facts div, .facts div:nth-child(odd), .facts div:nth-child(even) { padding: 12px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .facts div:last-child { border-bottom: 0; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 10px; }
  .tabs { flex-wrap: wrap; overflow: visible; }
  .tab { flex: 1 1 auto; padding-inline: 10px; }
  .system-map { grid-template-columns: 1fr; }
  .stage h3, .stage__summary { min-height: 0; }
  .option-grid, .lesson-grid, .principles, .toolkit-grid, .prompt-grid, .system-selector, .course-system-detail__columns { grid-template-columns: 1fr; }
  .course-system-detail__columns section { min-height: 0; border-right: 0; }
  .course-system-detail__footer, .audit-toolbar { grid-template-columns: 1fr; }
  .chapter-links { grid-template-columns: 1fr; }
  .audit-item__heading { grid-template-columns: 42px 1fr; }
  .audit-item__heading select { grid-column: 2; }
  .potok-audit-controls { align-items: stretch; }
  .potok-freshness { width: 100%; max-width: none; margin: 0; align-items: flex-start; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; padding-inline: 7px; }
  .potok-audit-controls label { width: 100%; }
  .potok-metrics { grid-template-columns: 1fr 1fr; }
  .potok-metrics > div, .potok-metrics > div:nth-child(3) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .potok-metrics > div:nth-child(even) { border-right: 0; }
  .potok-metrics > div:last-child { border-right: 0; border-bottom: 0; }
  .potok-models { grid-template-columns: 1fr; }
  .potok-models dl { grid-template-columns: repeat(2, 1fr); }
  .potok-ranking__heading, .potok-ranking__scores, .potok-audit-detail__body > div { grid-template-columns: 1fr; }
  .potok-ranking__scores section { border-right: 0; border-bottom: 1px solid var(--line); }
  .potok-audit-row--head { display: none; }
  .potok-audit-row { grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; padding: 15px; border: 1px solid var(--line); overflow: visible; }
  .potok-audit-row > div::before { content: attr(data-label); display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
  .potok-review-results { grid-column: 1 / -1; }
  .potok-verdict { flex: 1 1 100%; min-width: 0; }
  .potok-error-log { grid-template-columns: 1fr; }
  .potok-error-log #potok-error-list { grid-template-columns: 1fr; }
  .potok-freshness-times { grid-template-columns: 1fr; }
  .option > p { min-height: 0; }
  .timeline li { grid-template-columns: 48px 1fr; gap: 8px 14px; }
  .timeline p, .timeline__status { grid-column: 2; justify-self: start; }
  .course-flow { align-items: stretch; }
  .course-flow span { flex: 1 1 100%; }
  .course-flow i { display: none; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .node, .lesson { transition: none; }
}
