:root {
  --ink: #101417;
  --ink-2: #1b2227;
  --steel: #68737c;
  --mist: #f1f4f2;
  --paper: #fbfcfa;
  --line: #cbd2cf;
  --lime: #c8f23f;
  --blue: #2d64f1;
  --orange: #ff6738;
  --ice: #d8edff;
  --max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: .22em; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 100; top: .8rem; left: -9999px; padding: .7rem 1rem; color: white; background: var(--blue); }
.skip-link:focus { left: .8rem; }

.site-header { position: sticky; z-index: 50; top: 0; display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 82px; padding: 0 max(1rem, calc((100vw - var(--max)) / 2)); border-bottom: 2px solid var(--ink); background: rgba(251, 252, 250, .96); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: .85rem; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; width: 48px; height: 48px; place-items: center; border: 2px solid var(--ink); background: var(--lime); font: 900 .82rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.brand > span:last-child { display: grid; line-height: 1.12; }
.brand strong { font-size: 1.06rem; letter-spacing: -.02em; }
.brand small { margin-top: .25rem; color: var(--steel); font: 700 .65rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; text-transform: uppercase; }
.primary-nav { display: flex; height: 82px; align-items: stretch; border-left: 1px solid var(--line); }
.primary-nav a { display: flex; align-items: center; padding: 0 1.05rem; border-right: 1px solid var(--line); color: var(--ink); font-size: .76rem; font-weight: 850; letter-spacing: .05em; text-decoration: none; text-transform: uppercase; }
.primary-nav a:hover { color: white; background: var(--ink); }
.nav-button { display: none; border: 2px solid var(--ink); padding: .6rem .8rem; color: var(--ink); background: var(--lime); font-weight: 850; }

.home-stage { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); grid-template-rows: auto 1fr; min-height: calc(100vh - 82px); border-bottom: 2px solid var(--ink); background: var(--mist); }
.stage-index { grid-column: 1 / -1; display: flex; justify-content: space-between; padding: .75rem max(1rem, calc((100vw - var(--max)) / 2)); border-bottom: 1px solid var(--ink); color: var(--steel); background: var(--paper); font: 750 .7rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.stage-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(3rem, 7vw, 7.5rem) max(1rem, calc((100vw - var(--max)) / 2)); padding-right: clamp(2rem, 6vw, 6rem); }
.eyebrow, .route-code { margin: 0 0 .8rem; color: var(--blue); font: 850 .7rem/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.stage-copy h1 { max-width: 820px; margin: 0; font-size: clamp(3.5rem, 8vw, 8.6rem); line-height: .86; letter-spacing: -.075em; text-transform: uppercase; }
.stage-copy > p:not(.eyebrow) { max-width: 720px; margin: 2rem 0 0; color: var(--steel); font-size: clamp(1.05rem, 1.8vw, 1.35rem); }
.stage-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.button-primary, .button-quiet { display: inline-block; padding: .9rem 1.1rem; border: 2px solid var(--ink); font-size: .8rem; font-weight: 900; letter-spacing: .04em; text-decoration: none; text-transform: uppercase; }
.button-primary { color: var(--ink); background: var(--lime); box-shadow: 6px 6px 0 var(--ink); }
.button-primary:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--ink); }
.button-quiet { background: transparent; }
.button-quiet:hover { color: white; background: var(--ink); }
.stage-board { position: relative; overflow: hidden; min-height: 520px; border-left: 2px solid var(--ink); color: white; background: var(--ink); }
.stage-board.stage-photo { margin: 0; background: var(--ink); }
.stage-board.stage-photo > img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 68% center; filter: saturate(.94) contrast(1.03); }
.stage-board figcaption { position: absolute; z-index: 3; left: .8rem; bottom: .8rem; padding: .4rem .5rem; color: white; background: rgba(16,20,23,.86); font: 800 .62rem/1.2 ui-monospace, monospace; letter-spacing: .04em; text-transform: uppercase; }
.stage-board::before, .stage-board::after { position: absolute; z-index: 1; content: ""; border: 2px solid var(--lime); border-radius: 50%; }
.stage-board::before { width: 66%; aspect-ratio: 1; top: 9%; left: 17%; }
.stage-board::after { width: 22%; aspect-ratio: 1; right: 8%; bottom: 8%; border-color: var(--orange); }
.stage-board .line { position: absolute; z-index: 2; display: block; background: var(--lime); }
.line-a { width: 2px; height: 100%; left: 50%; }
.line-b { width: 100%; height: 2px; top: 50%; }
.line-c { width: 2px; height: 85%; left: 28%; top: 9%; transform: rotate(48deg); transform-origin: center; background: var(--blue) !important; }
.stage-board b { position: absolute; z-index: 2; padding: .4rem .55rem; color: var(--ink); background: var(--lime); font: 900 .7rem/1 ui-monospace, monospace; letter-spacing: .06em; }
.stage-board b:nth-of-type(1) { top: 10%; left: 8%; }
.stage-board b:nth-of-type(2) { top: 34%; right: 7%; background: var(--ice); }
.stage-board b:nth-of-type(3) { bottom: 28%; left: 12%; background: var(--orange); }
.stage-board b:nth-of-type(4) { right: 20%; bottom: 7%; }

.route-rail, .feature-board, .operating-standard, .library-section, .related-board { max-width: var(--max); margin: auto; padding: clamp(4rem, 8vw, 8rem) 1rem; }
.section-label { display: grid; grid-template-columns: 80px 1fr auto; gap: 1.5rem; align-items: end; padding-bottom: 1rem; border-bottom: 3px solid var(--ink); }
.section-label > span { color: var(--blue); font: 900 2.6rem/.9 ui-monospace, monospace; }
.section-label p { margin: 0; color: var(--steel); font: 800 .68rem/1 ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.section-label h2 { max-width: 800px; margin: .4rem 0 0; font-size: clamp(2rem, 4.7vw, 4.6rem); line-height: .95; letter-spacing: -.055em; text-transform: uppercase; }
.section-label > a { font-weight: 850; }
.route-list { border-bottom: 1px solid var(--ink); }
.route-list > a { display: grid; grid-template-columns: 110px minmax(220px, .75fr) 1fr; gap: 1.4rem; align-items: center; min-height: 120px; padding: 1.2rem 0; border-top: 1px solid var(--ink); text-decoration: none; }
.route-list > a:hover { padding-inline: 1rem; color: white; background: var(--ink); }
.route-list span, .routes-board > a > span, .route-head > span { font: 850 .72rem/1 ui-monospace, monospace; letter-spacing: .07em; }
.route-list strong { font-size: clamp(1.3rem, 2.3vw, 2rem); text-transform: uppercase; }
.route-list small { color: var(--steel); font-size: .98rem; }
.route-list > a:hover small { color: var(--line); }

.feature-board { padding-top: 2rem; }
.feature-grid, .library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 1px solid var(--ink); }
.article-card { display: grid; grid-template-columns: minmax(150px, .72fr) 1.28fr; min-height: 330px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.signal-art { position: relative; overflow: hidden; min-height: 210px; border-right: 1px solid var(--ink); color: white; background: var(--ink-2); isolation: isolate; }
.signal-art.signal-photo { margin: 0; }
.signal-photo > img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.03); }
.signal-photo::before, .signal-photo::after { z-index: 1; }
.signal-photo::before { background: rgba(16,20,23,.08); box-shadow: 0 0 0 999px rgba(16,20,23,.08); }
.signal-photo figcaption { position: absolute; z-index: 3; left: .65rem; bottom: .65rem; max-width: calc(100% - 4.8rem); padding: .3rem .4rem; color: white; background: rgba(16,20,23,.86); font: 800 .58rem/1.2 ui-monospace, monospace; letter-spacing: .03em; text-transform: uppercase; }
.signal-art::before { position: absolute; width: 64%; aspect-ratio: 1; top: 18%; left: 18%; border: 2px solid currentColor; border-radius: 50%; content: ""; }
.signal-art::after { position: absolute; width: 150%; height: 2px; top: 52%; left: -25%; background: currentColor; transform: rotate(-35deg); content: ""; }
.signal-art > span { position: absolute; z-index: 2; top: .8rem; left: .8rem; padding: .3rem .4rem; color: var(--ink); background: var(--lime); font: 900 .65rem/1 ui-monospace, monospace; }
.signal-art > b { position: absolute; z-index: 2; right: .8rem; bottom: .7rem; font: 900 3rem/1 ui-monospace, monospace; }
.signal-art i { position: absolute; z-index: 1; display: block; width: 18px; height: 18px; background: var(--lime); transform: rotate(45deg); }
.signal-art i:nth-of-type(1) { top: 22%; right: 19%; }
.signal-art i:nth-of-type(2) { bottom: 18%; left: 13%; background: var(--orange); }
.signal-art i:nth-of-type(3) { top: 58%; right: 31%; background: var(--blue); }
.variant-1 { color: var(--ink); background: var(--lime); }
.variant-1 > span, .variant-4 > span { color: white; background: var(--blue); }
.variant-2 { background: var(--blue); }
.variant-2 i, .variant-5 i { background: var(--ice); }
.variant-3 { color: var(--ink); background: var(--ice); }
.variant-4 { background: var(--orange); }
.variant-5 { background: #4d3aad; }
.card-data { padding: clamp(1.2rem, 3vw, 2.2rem); }
.card-data h3 { margin: 0; font-size: clamp(1.35rem, 2.5vw, 2.25rem); line-height: 1.02; letter-spacing: -.035em; text-transform: uppercase; }
.card-data h3 a { text-decoration: none; }
.card-data h3 a:hover { text-decoration: underline; }
.card-data > p:not(.route-code) { color: var(--steel); }
.text-link { font-size: .76rem; font-weight: 900; text-transform: uppercase; }

.operating-standard { max-width: none; color: white; background: var(--ink); }
.operating-standard > * { max-width: var(--max); margin-inline: auto; }
.operating-standard h2 { max-width: 900px; margin-top: 0; font-size: clamp(2.8rem, 6vw, 6.8rem); line-height: .88; letter-spacing: -.065em; text-transform: uppercase; }
.standard-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 3rem; border-top: 1px solid #586169; border-left: 1px solid #586169; }
.standard-grid > div { min-height: 240px; padding: 1.2rem; border-right: 1px solid #586169; border-bottom: 1px solid #586169; }
.standard-grid span { color: var(--lime); font: 900 2rem/1 ui-monospace, monospace; }
.standard-grid h3 { margin-top: 2.5rem; font-size: 1.25rem; text-transform: uppercase; }
.standard-grid p { color: #b8c0c5; }

.page-head { padding: clamp(4rem, 9vw, 9rem) max(1rem, calc((100vw - 1100px) / 2)); border-bottom: 3px solid var(--ink); background: var(--mist); }
.page-head h1, .route-head h1 { max-width: 1050px; margin: 0; font-size: clamp(3.5rem, 8vw, 8rem); line-height: .86; letter-spacing: -.075em; text-transform: uppercase; }
.page-head > p:not(.eyebrow), .route-head > div > p:not(.eyebrow) { max-width: 780px; margin-top: 1.5rem; color: var(--steel); font-size: 1.18rem; }
.standard-head { background: var(--ink); color: white; }
.standard-head > p:not(.eyebrow) { color: #b9c2c7; }
.standard-copy { max-width: 850px; margin: auto; padding: 4rem 1rem 7rem; font-size: 1.06rem; }
.standard-copy h2 { margin: 3.2rem 0 .8rem; padding-top: .9rem; border-top: 2px solid var(--ink); font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1; letter-spacing: -.04em; text-transform: uppercase; }
.standard-copy h2:first-child { margin-top: 0; }
.standard-copy li { margin: .55rem 0; }
.boundary-box { margin: 2rem 0; padding: 1.2rem; border: 2px solid var(--ink); background: var(--lime); }

.library-tools { display: flex; flex-wrap: wrap; align-items: end; gap: .55rem; margin-bottom: 1rem; }
.filter-button { min-height: 44px; padding: .65rem .85rem; border: 1px solid var(--ink); color: var(--ink); background: var(--paper); font-size: .72rem; font-weight: 850; text-transform: uppercase; cursor: pointer; }
.filter-button.active, .filter-button:hover { color: white; background: var(--ink); }
.library-tools label { display: grid; flex: 1 1 280px; gap: .3rem; margin-left: auto; color: var(--steel); font: 800 .66rem/1 ui-monospace, monospace; text-transform: uppercase; }
.library-tools input { width: 100%; min-height: 44px; padding: .65rem .8rem; border: 1px solid var(--ink); border-radius: 0; background: white; }
.result-count { font: 750 .7rem/1 ui-monospace, monospace; text-transform: uppercase; }
.article-card[hidden] { display: none; }
.no-results { padding: 1.5rem; border: 2px solid var(--orange); background: #fff1eb; }

.routes-board { display: grid; grid-template-columns: repeat(5, 1fr); max-width: var(--max); margin: 5rem auto; padding: 0 1rem; }
.routes-board > a { position: relative; min-height: 480px; padding: 1.3rem; border: 1px solid var(--ink); border-right: 0; text-decoration: none; }
.routes-board > a:last-child { border-right: 1px solid var(--ink); }
.routes-board > a:nth-child(2) { background: var(--lime); }
.routes-board > a:nth-child(4) { color: white; background: var(--blue); }
.routes-board > a:hover { color: white; background: var(--ink); }
.routes-board > a > b { position: absolute; right: 1rem; top: .8rem; color: var(--line); font: 900 4rem/1 ui-monospace, monospace; }
.routes-board h2 { margin-top: 9rem; font-size: 1.8rem; line-height: .95; text-transform: uppercase; }
.routes-board small { position: absolute; bottom: 1.1rem; font-weight: 850; text-transform: uppercase; }
.route-head { display: grid; grid-template-columns: 150px 1fr; gap: 2rem; padding: clamp(4rem, 9vw, 9rem) max(1rem, calc((100vw - var(--max)) / 2)); color: white; background: var(--blue); }
.route-head > span { padding-top: 1rem; color: var(--lime); }
.route-intro { display: grid; grid-template-columns: .6fr 1.4fr; gap: 3rem; max-width: 1000px; margin: auto; padding: 4rem 1rem; border-bottom: 2px solid var(--ink); }
.route-intro h2 { margin: 0; font-size: 2rem; text-transform: uppercase; }
.route-intro p { margin: 0; color: var(--steel); font-size: 1.08rem; }
.route-articles { display: grid; grid-template-columns: 1fr 1fr; max-width: var(--max); margin: 4rem auto 7rem; padding: 0 1rem; border-left: 1px solid var(--ink); }

.article-top { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(360px, .7fr); border-bottom: 3px solid var(--ink); }
.article-top > div:first-child { display: flex; flex-direction: column; justify-content: center; padding: clamp(3.5rem, 8vw, 8rem) max(1rem, calc((100vw - var(--max)) / 2)); padding-right: clamp(2rem, 5vw, 5rem); background: var(--mist); }
.article-top h1 { max-width: 900px; margin: 0; font-size: clamp(3.3rem, 7vw, 7.6rem); line-height: .88; letter-spacing: -.07em; text-transform: uppercase; }
.article-dek { max-width: 750px; color: var(--steel); font-size: 1.18rem; }
.article-stats { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.article-stats span { padding: .45rem .55rem; color: white; background: var(--ink); font: 750 .66rem/1 ui-monospace, monospace; text-transform: uppercase; }
.signal-art-large { min-height: 620px; border: 0; }
.article-shell { display: grid; grid-template-columns: 260px minmax(0, 760px); gap: 5rem; max-width: 1120px; margin: auto; padding: 5rem 1rem 7rem; }
.article-route { align-self: start; position: sticky; top: 120px; display: grid; gap: .65rem; padding-top: 1rem; border-top: 5px solid var(--ink); }
.article-route > span { color: var(--blue); font: 900 .72rem/1 ui-monospace, monospace; }
.article-route h2 { margin: .2rem 0; font-size: 1.35rem; line-height: 1; text-transform: uppercase; }
.article-route p { color: var(--steel); font-size: .88rem; }
.article-route a { font-size: .75rem; font-weight: 850; text-transform: uppercase; }
.prose { font: 18px/1.75 ui-serif, Georgia, Cambria, serif; }
.prose p { margin: 0 0 1.35rem; }
.prose h2 { margin: 3.3rem 0 1rem; padding-left: 1rem; border-left: 8px solid var(--lime); font: 900 clamp(1.9rem, 4vw, 3rem)/1 ui-sans-serif, system-ui, sans-serif; letter-spacing: -.04em; text-transform: uppercase; }
.prose h3 { margin-top: 2.4rem; font: 850 1.45rem/1.1 ui-sans-serif, system-ui, sans-serif; }
.prose li { margin: .55rem 0; }
.prose blockquote { margin: 2rem 0; padding: 1.4rem; border: 2px solid var(--ink); background: var(--mist); font-size: 1.05rem; }
.prose a { overflow-wrap: anywhere; color: #174cce; }
.prose h2:last-of-type { border-color: var(--blue); }
.related-board { border-top: 3px solid var(--ink); }
.related-board > div { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--ink); }
.related-board .article-card { grid-template-columns: 1fr; }
.related-board .signal-art { min-height: 180px; border-right: 0; border-bottom: 1px solid var(--ink); }

.not-found { min-height: 70vh; padding: clamp(5rem, 12vw, 12rem) max(1rem, calc((100vw - 1000px) / 2)); color: white; background: var(--blue); }
.not-found > span { font: 900 .8rem/1 ui-monospace, monospace; }
.not-found h1 { max-width: 850px; margin: 1rem 0; font-size: clamp(4rem, 9vw, 9rem); line-height: .82; letter-spacing: -.07em; text-transform: uppercase; }

.site-footer { padding: 4rem max(1rem, calc((100vw - var(--max)) / 2)) 2rem; border-top: 2px solid var(--lime); color: white; background: var(--ink); }
.footer-board { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 2rem; }
.footer-board section { display: flex; flex-direction: column; align-items: start; }
.footer-board h2 { margin: .6rem 0; font-size: 2.2rem; line-height: 1; text-transform: uppercase; }
.footer-board h3 { color: var(--lime); font: 850 .72rem/1 ui-monospace, monospace; text-transform: uppercase; }
.footer-board a { margin: .25rem 0; color: #d5dce0; font-size: .88rem; }
.footer-code { color: var(--lime); font: 800 .68rem/1 ui-monospace, monospace; }
.footer-legal { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid #4a5359; color: #9da8af; font-size: .75rem; }

@media (max-width: 1050px) {
  .primary-nav { display: none; position: absolute; top: 80px; left: 0; right: 0; height: auto; border: 0; background: var(--paper); }
  .primary-nav.open { display: grid; }
  .primary-nav a { min-height: 52px; border-bottom: 1px solid var(--line); }
  .nav-button { display: block; }
  .home-stage, .article-top { grid-template-columns: 1fr; }
  .stage-board, .signal-art-large { min-height: 480px; border-left: 0; border-top: 2px solid var(--ink); }
  .routes-board { grid-template-columns: 1fr 1fr; }
  .routes-board > a { min-height: 320px; border-right: 1px solid var(--ink); }
  .routes-board h2 { margin-top: 5rem; }
  .standard-grid { grid-template-columns: 1fr 1fr; }
  .footer-board { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .site-header { min-height: 72px; }
  .brand small { display: none; }
  .brand-mark { width: 42px; height: 42px; }
  .primary-nav { top: 70px; }
  .stage-index { display: grid; gap: .35rem; }
  .stage-copy h1, .page-head h1, .route-head h1, .article-top h1 { font-size: clamp(3.2rem, 15vw, 5.3rem); }
  .route-list > a { grid-template-columns: 80px 1fr; }
  .route-list small { grid-column: 2; }
  .section-label { grid-template-columns: 55px 1fr; }
  .section-label > a { grid-column: 2; }
  .feature-grid, .library-grid, .route-articles, .related-board > div { grid-template-columns: 1fr; }
  .article-card { grid-template-columns: 135px 1fr; min-height: 280px; }
  .standard-grid, .routes-board, .footer-board { grid-template-columns: 1fr; }
  .routes-board > a { min-height: 260px; }
  .route-head, .route-intro { grid-template-columns: 1fr; }
  .article-shell { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 3rem; }
  .article-route { position: static; }
}

@media (max-width: 470px) {
  .brand strong { font-size: .88rem; }
  .article-card { grid-template-columns: 1fr; }
  .signal-art { min-height: 190px; border-right: 0; border-bottom: 1px solid var(--ink); }
  .stage-board, .signal-art-large { min-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
