:root {
  color-scheme: light;
  --ink: #102b2a; --muted: #526765; --paper: #f7f8f3; --surface: #ffffff;
  --line: #cad7d2; --deep: #082c29; --green: #00a88f; --green-dark: #007d6b;
  --mint: #dff5ed; --amber: #f5c451; --amber-soft: #fff3cf; --danger: #a83232;
  --shadow: 0 22px 60px rgba(8, 44, 41, .1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px; line-height: 1.6; background: var(--paper); color: var(--ink);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 90% 2%, rgba(0,168,143,.14), transparent 30rem), var(--paper); }
button, select, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--green-dark); text-underline-offset: .18em; }
a:hover { color: var(--deep); }
:focus-visible { outline: 4px solid rgba(245,196,81,.85); outline-offset: 3px; }
.skip-link { position: fixed; left: 1rem; top: -8rem; z-index: 20; padding: .8rem 1rem; color: white; background: var(--deep); border-radius: .5rem; }
.skip-link:focus { top: 1rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.site-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 82px; padding: 0 4vw; color: white; background: rgba(8,44,41,.97); box-shadow: 0 1px 0 rgba(255,255,255,.13); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: white; text-decoration: none; }
.brand-mark { color: #fff; border-color: #fff; display: grid; place-items: center; width: 46px; height: 46px; border: 2px solid rgba(255,255,255,.72); border-radius: 50%; color: var(--amber); font-size: 24px; font-weight: 850; }
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand strong { color: #fff; letter-spacing: .13em; font-size: 17px; }
.brand small { margin-top: .28rem; color: #b9d4cf; font-size: 15px; }
.primary-nav { display: flex; align-items: center; justify-content: flex-end; gap: .2rem; }
.primary-nav button, .menu-button { border: 0; border-radius: 999px; color: #d9e9e6; background: transparent; cursor: pointer; font-size: 15px; font-weight: 700; padding: .55rem .72rem; }
.primary-nav button:hover, .primary-nav button[aria-current="page"] { color: white; background: rgba(255,255,255,.12); }
.primary-nav button[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--amber); }
.menu-button { display: none; border: 1px solid rgba(255,255,255,.35); }
main { min-height: 72vh; }
.loading, .fatal { width: min(780px, 90vw); margin: 12vh auto; padding: 2.5rem; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 1.4rem; box-shadow: var(--shadow); }
.loader { display: inline-block; width: 48px; height: 48px; border: 5px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.view { animation: enter .24s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } }
.hero { position: relative; overflow: hidden; padding: clamp(4rem, 9vw, 8rem) 5vw clamp(3rem, 7vw, 6rem); color: white; background: linear-gradient(128deg, #082c29 0%, #0b4540 62%, #116759 100%); }
.hero::after { content: ""; position: absolute; right: -8rem; bottom: -12rem; width: 34rem; height: 34rem; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 4rem rgba(255,255,255,.03), 0 0 0 9rem rgba(255,255,255,.025); }
.hero-inner { position: relative; z-index: 1; width: min(1180px, 100%); margin: 0 auto; }
.eyebrow { margin: 0 0 .8rem; color: var(--green-dark); font-size: 15px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.hero .eyebrow { color: #8fe5d2; }
h1, h2, h3 { overflow-wrap: anywhere; line-height: 1.13; letter-spacing: -.025em; }
h1 { max-width: 900px; margin: 0; font-size: clamp(2.5rem, 6vw, 5.5rem); }
h2 { margin: 0 0 .8rem; font-size: clamp(1.65rem, 3vw, 2.55rem); }
h3 { margin: 0 0 .5rem; font-size: 1.25rem; }
.hero-lede { max-width: 850px; margin: 1.5rem 0 0; color: #d6e8e4; font-size: clamp(1.12rem, 2vw, 1.4rem); }
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.7rem; }
.button, button.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .65rem 1.05rem; border: 1px solid var(--deep); border-radius: .65rem; color: white; background: var(--deep); cursor: pointer; font-weight: 800; text-decoration: none; }
.button:hover, button.button:hover { color: white; background: #124a45; }
.button.secondary { color: var(--deep); background: white; border-color: var(--line); }
.button.secondary:hover { background: var(--mint); }
.hero .button { color: var(--deep); background: var(--amber); border-color: var(--amber); }
.hero .button.secondary { color: white; background: transparent; border-color: rgba(255,255,255,.45); }
.content { width: min(1180px, 90vw); margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 420px); gap: 2rem; align-items: end; margin-bottom: 2rem; }
.section-head p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.metric { padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 8px 25px rgba(8,44,41,.05); }
.metric strong { display: block; color: var(--deep); font-size: clamp(1.7rem, 3.4vw, 2.7rem); line-height: 1; }
.metric span { display: block; margin-top: .6rem; color: var(--muted); font-size: 16px; }
.grid-two, .grid-three { display: grid; gap: 1rem; margin-top: 1rem; }
.grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { padding: clamp(1.25rem, 3vw, 2rem); background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 8px 25px rgba(8,44,41,.05); }
.card p:last-child { margin-bottom: 0; }
.accent-card { background: linear-gradient(145deg, var(--mint), white 60%); border-color: #93d6c7; }
.caution-card { background: linear-gradient(145deg, var(--amber-soft), white 60%); border-color: #e8d18d; }
.table-guidance { margin-bottom: 1rem; }
.status-pill { display: inline-flex; align-items: center; min-height: 34px; padding: .22rem .68rem; border-radius: 999px; color: #075d4f; background: var(--mint); font-size: 15px; font-weight: 850; letter-spacing: .04em; }
.status-pill::before { content: ""; width: 9px; height: 9px; margin-right: .42rem; border-radius: 50%; background: var(--green); }
.status-pill.caution { color: #765700; background: var(--amber-soft); }
.status-pill.caution::before { background: #d19b00; }
.plain-list { margin: .7rem 0 0; padding-left: 1.25rem; }
.plain-list li { margin: .55rem 0; }
.page-intro { padding: clamp(2.5rem, 6vw, 4.5rem) 5vw 2.3rem; color: white; background: var(--deep); }
.page-intro > div { width: min(1180px, 100%); margin: 0 auto; }
.page-intro p:last-child { max-width: 860px; color: #cfdfdc; font-size: 1.08rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin-bottom: 1rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; }
.field { display: grid; gap: .35rem; min-width: 190px; }
.field label, .field-label { color: var(--deep); font-size: 15px; font-weight: 800; }
.field input, .field select, select { min-height: 48px; padding: .55rem .7rem; color: var(--ink); background: white; border: 1px solid #9fb4af; border-radius: .55rem; font-size: 16px; }
.check-field { display: flex; align-items: center; gap: .55rem; min-height: 48px; font-weight: 700; }
.check-field input { width: 22px; height: 22px; accent-color: var(--green-dark); }
.results-count { margin-left: auto; color: var(--muted); font-size: 16px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 8px 25px rgba(8,44,41,.05); }
table { width: 100%; min-width: 950px; border-collapse: collapse; }
th, td { padding: .85rem .8rem; border-bottom: 1px solid #e2eae7; text-align: right; vertical-align: middle; font-size: 15px; }
th { position: sticky; top: 0; color: #334d4b; background: #edf3f0; font-weight: 850; }
th:first-child, td:first-child { text-align: left; }
tbody tr:hover { background: #f1faf6; }
tbody tr.is-selected { background: #e7f6f1; box-shadow: inset 5px 0 0 var(--green-dark); }
.candidate-link { border: 0; color: var(--green-dark); background: transparent; cursor: pointer; font-weight: 850; text-decoration: underline; text-underline-offset: .2em; }
.candidate-link[aria-pressed="true"] { color: var(--deep); text-decoration-thickness: .16em; }
.candidate-detail { margin-top: 1rem; border-left: 6px solid var(--green); }
.candidate-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-top: 1rem; }
.detail-grid div { padding: .8rem; background: #f4f7f5; border-radius: .6rem; }
.detail-grid dt { color: var(--muted); font-size: 15px; }
.detail-grid dd { margin: .25rem 0 0; color: var(--deep); font-size: 18px; font-weight: 800; }
.network-panel { margin-top: 1rem; padding: clamp(1.25rem, 3vw, 2rem); background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow); scroll-margin-top: 7rem; }
.network-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 1.5rem; align-items: end; }
.network-heading p { max-width: 780px; margin-bottom: 0; color: var(--muted); }
.network-selector { width: 100%; }
.network-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(290px, .8fr); gap: 1rem; margin-top: 1.25rem; align-items: stretch; }
.network-canvas-scroll { overflow: auto; border: 1px solid var(--line); border-radius: .8rem; background: linear-gradient(135deg, #f7fbf9, #eef6f2); overscroll-behavior-inline: contain; }
.network-canvas { display: block; width: 100%; min-width: 760px; height: auto; aspect-ratio: 1200 / 680; }
.network-source-edge { stroke: #9eb3ae; stroke-width: 2.2; }
.network-selected-corridor { stroke: #d29100; stroke-width: 7; stroke-linecap: round; }
.network-node { fill: #496b65; stroke: white; stroke-width: 2; }
.network-node.slack { fill: var(--green-dark); stroke: var(--amber); stroke-width: 4; }
.network-hit-line { stroke: transparent; stroke-width: 42; pointer-events: stroke; cursor: pointer; }
.network-hit-line.candidate-hit { stroke-width: 48; }
.network-hit-node { fill: transparent; stroke: transparent; stroke-width: 0; cursor: pointer; }
.network-hit-line:focus, .network-hit-line[aria-pressed="true"] { stroke: rgba(0, 125, 107, .32); }
.network-hit-line.candidate-hit:focus, .network-hit-line.candidate-hit[aria-pressed="true"] { stroke: rgba(245, 196, 81, .5); }
.network-hit-node:focus, .network-hit-node[aria-pressed="true"] { fill: rgba(245, 196, 81, .42); stroke: var(--deep); stroke-width: 3; }
.network-inspector { min-width: 0; padding: 1.15rem; border: 1px solid #93d6c7; border-radius: .8rem; background: linear-gradient(145deg, var(--mint), white 72%); overflow-wrap: anywhere; }
.network-inspector h3 { overflow-wrap: anywhere; }
.network-facts { margin-top: .75rem; }
.network-pin-state { color: var(--muted); font-weight: 750; }
.network-legend { display: flex; flex-wrap: wrap; gap: .65rem 1.2rem; margin-top: 1rem; color: var(--muted); font-size: 16px; }
.network-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.network-legend span::before { content: ""; display: inline-block; width: 30px; height: 5px; border-radius: 999px; background: #9eb3ae; }
.network-legend .selected-key::before { height: 7px; background: #d29100; }
.network-legend .bus-key::before, .network-legend .slack-key::before { width: 14px; height: 14px; border-radius: 50%; background: #496b65; }
.network-legend .slack-key::before { background: var(--green-dark); box-shadow: 0 0 0 3px var(--amber); }
.network-boundary { margin: 1rem 0 0; padding: 1rem; color: #5f4900; background: var(--amber-soft); border-left: 5px solid #d29100; }
.chart-card { overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-gutter: stable; padding: 1.1rem; background: white; border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow); }
.chart-card svg { display: block; width: 100%; height: auto; min-height: 460px; }
.axis-label { fill: var(--ink); font-size: 16px; font-weight: 800; }
.tick-label { fill: var(--muted); font-size: 15px; }
.gridline { stroke: #dce6e2; stroke-width: 1; }
.point { fill: #7ba59d; opacity: .78; stroke: white; stroke-width: 1.5; cursor: pointer; }
.point.pareto { fill: var(--green-dark); opacity: .95; }
.point.selected { fill: var(--amber); stroke: var(--deep); stroke-width: 3; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .7rem; color: var(--muted); font-size: 16px; }
.legend span::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: .35rem; border-radius: 50%; background: #7ba59d; }
.legend .pareto-key::before { background: var(--green-dark); }
.timeline { display: grid; gap: .8rem; }
.timeline article { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 1rem; align-items: start; padding: 1rem; background: white; border: 1px solid var(--line); border-radius: .8rem; }
.timeline article > strong { color: var(--deep); }
.timeline article > span { color: var(--muted); }
.council-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.council-card { border-top: 6px solid var(--green); }
.count-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-top: 1rem; }
.count-row div { padding: .7rem; text-align: center; background: var(--mint); border-radius: .65rem; }
.count-row strong { display: block; font-size: 1.45rem; }
.quantum-path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-top: 1rem; }
.quantum-path article { position: relative; padding: 1rem; background: white; border: 1px solid var(--line); border-radius: .8rem; }
.quantum-path article:not(:last-child)::after { content: "→"; position: absolute; right: -.72rem; top: 42%; z-index: 2; color: var(--green-dark); font-size: 1.4rem; font-weight: 900; }
.definition-list { display: grid; gap: .7rem; margin: 0; }
.definition-list div { padding: .85rem 0; border-bottom: 1px solid var(--line); }
.definition-list dt { color: var(--deep); font-weight: 850; }
.definition-list dd { margin: .25rem 0 0; color: var(--muted); }
.download-list { display: grid; gap: .7rem; }
.download-list a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 58px; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: .7rem; text-decoration: none; font-weight: 800; }
.download-list a:hover { background: var(--mint); }
.sample-demo { display: grid; gap: 1rem; padding: 1.2rem; background: #f2f6f4; border: 1px dashed #93a9a4; border-radius: .8rem; }
.sample-bars { display: grid; gap: .65rem; }
.sample-bar { display: grid; grid-template-columns: minmax(170px, 1fr) 2fr 70px; gap: .7rem; align-items: center; }
.sample-bar-track { height: 15px; overflow: hidden; background: #dce6e2; border-radius: 999px; }
.sample-bar-track i { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.site-footer { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; padding: 2.5rem 5vw; color: #cfe1dd; background: #061f1d; }
.site-footer p { max-width: 680px; margin-bottom: 0; font-size: 16px; }
.site-footer nav { display: grid; align-content: start; justify-items: start; gap: .5rem; }
.site-footer a { color: white; }
.noscript { margin: 0; padding: 1rem 5vw; color: white; background: var(--danger); }

.timeline, .timeline > *, .quantum-status, .quantum-status > * { min-width: 0; max-width: 100%; }
.timeline article, .quantum-status .status-pill { overflow-wrap: anywhere; word-break: normal; }
.quantum-status .status-pill { white-space: normal; }
.chart-card:focus-visible { outline: 4px solid rgba(245,196,81,.85); outline-offset: 3px; }
@media (max-width: 1050px) {
  .site-header { flex-wrap: wrap; padding-top: .7rem; padding-bottom: .7rem; }
  .menu-button { display: block; }
  .primary-nav { display: none; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: .3rem; }
  .primary-nav.open { display: flex; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-three, .quantum-path { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .network-heading, .network-layout { grid-template-columns: 1fr; }
  .quantum-path article::after { display: none; }
}
@media (max-width: 720px) {
  :root { font-size: 17px; }
  .draft-banner { display: block; text-align: center; }
  .draft-banner strong { display: block; }
  .section-head, .grid-two, .grid-three, .council-grid, .site-footer { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid, .count-row { grid-template-columns: 1fr 1fr; }
  .timeline article { grid-template-columns: 1fr; gap: .3rem; }
  .results-count { width: 100%; margin-left: 0; }
  .sample-bar { grid-template-columns: 1fr; }
  .chart-card svg { width: 1000px; max-width: none; min-height: 560px; }
  .network-canvas { min-width: 720px; }
}
@media (max-width: 430px) {
  .metric-grid, .quantum-path, .detail-grid, .count-row { grid-template-columns: 1fr; }
  .content { width: min(92vw, 1180px); }
  .site-header { gap: .75rem; padding-inline: 1rem; }
  .brand { min-width: 0; }
  .brand > span { min-width: 0; overflow-wrap: anywhere; }
  .menu-button { flex-shrink: 0; }
  .hero, .page-intro { padding-inline: 1.2rem; }
}
@media (pointer: coarse) {
  .network-hit-line { stroke-width: 64; }
  .network-hit-line.candidate-hit { stroke-width: 72; }
  .network-hit-node { r: 28px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
