:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --surface: #ffffff;
  --ink: #17202a;
  --ink-2: #4a5968;
  --muted: #71808d;
  --line: #ced5db;
  --line-dark: #9daab5;
  --blue: #0057b8;
  --blue-dark: #003f86;
  --blue-pale: #e9f2fa;
  --orange: #dc673c;
  --code: #eef1f3;
  --s1: #0057b8;
  --s2: #4d9bd3;
  --s3: #dc673c;
  --neutral: #a1adb6;
  --grid: #dde3e7;
  --axis: #aeb9c1;
  --ring: #ced5db;
  --accent-ink: #0057b8;
  --accent-wash: #e9f2fa;
  --sign: #0057b8;
  --sign-ink: #ffffff;
  --board: #17202a;
  --board-2: #26313b;
  --board-line: #43505c;
  --board-ink: #ffffff;
  --board-muted: #b6c0c8;
  --amber: #f0a069;
  --reading-progress: 0%;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.62 "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--blue); }
p { margin: 0 0 1rem; }
h1, h2, h3 { margin-top: 0; color: var(--ink); }
.mono, .readout .v, .strip .code, .route .wp-code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.skip-link {
  position: fixed; left: 1rem; top: 0; z-index: 100; transform: translateY(-160%);
  padding: .75rem 1rem; color: #fff; background: var(--ink);
}
.skip-link:focus { top: 1rem; transform: none; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 30;
  color: var(--ink); background: rgba(247,246,242,.96);
  border-bottom: 1px solid var(--line-dark);
  backdrop-filter: blur(12px);
}
.top::after {
  content: ""; position: absolute; left: 0; bottom: -1px;
  width: var(--reading-progress); height: 2px; background: var(--blue);
}
.bar {
  max-width: 1280px; min-height: 76px; margin: auto; padding: .8rem 2rem;
  display: flex; align-items: center; gap: 3rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .7rem; min-width: 220px;
  color: var(--ink); text-decoration: none; font-size: 1.2rem; font-weight: 700;
  letter-spacing: -.035em;
}
.brand small {
  display: block; margin-top: .05rem; color: var(--muted);
  font-size: .66rem; line-height: 1.2; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase;
}
.brand-ic { width: 29px; height: 29px; padding: 5px; color: #fff; background: var(--blue); }
nav { display: flex; align-items: center; justify-content: flex-end; gap: .15rem; flex: 1; }
nav a {
  padding: .65rem .8rem; color: var(--ink-2); text-decoration: none;
  font-size: .88rem; font-weight: 600; border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
nav a:hover { color: var(--blue); }
nav a[aria-current="page"] { color: var(--blue); border-color: var(--blue); }
nav .source-link { margin-left: 1rem; border: 1px solid var(--line-dark); }
nav .source-link:hover { border-color: var(--blue); }
.lensbar { padding: .45rem 2rem; color: var(--ink-2); background: var(--blue-pale); font-size: .85rem; }

/* Layout and type */
main { max-width: 1280px; margin: auto; padding: 0 2rem 6rem; }
.page > h1 { margin: 3.5rem 0 .75rem; font-size: clamp(2.4rem, 4vw, 3.8rem); line-height: 1; letter-spacing: -.055em; }
.page > .lede { max-width: 72ch; margin-bottom: 2.25rem; color: var(--ink-2); font-size: 1.08rem; }
.eyebrow {
  margin-bottom: .8rem; color: var(--blue); font-size: .72rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
}
.note { max-width: 78ch; color: var(--ink-2); font-size: .92rem; }
.sign { display: flex; align-items: center; gap: .8rem; }
.sign-ic {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center;
  color: #fff; background: var(--blue);
}
h1.sign .sign-ic { width: 42px; height: 42px; }
.sign-ic svg { width: 58%; height: 58%; }
h2.sign { margin: 4.5rem 0 .75rem; font-size: 1.75rem; letter-spacing: -.035em; }

/* Overview */
.hero { margin: 0; }
.hero-in { padding: 0; }
.mission-line {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 0; color: var(--muted); border-bottom: 1px solid var(--line);
  font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
.hero-layout {
  display: grid; grid-template-columns: minmax(0,.92fr) minmax(520px,1.08fr);
  gap: 4rem; align-items: center; padding: 4.6rem 0 3.5rem;
}
.hero h1 {
  max-width: 11ch; margin: 0 0 1.6rem; font-size: clamp(3.6rem, 6vw, 5.6rem);
  line-height: .96; letter-spacing: -.07em; font-weight: 700;
}
.hero .lede { max-width: 53ch; color: var(--ink-2); font-size: 1.08rem; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin: 1.8rem 0 1rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: .65rem 1rem; text-decoration: none; font-size: .88rem; font-weight: 700;
  border: 1px solid var(--blue); transition: color .18s ease, background .18s ease;
}
.primary { color: #fff; background: var(--blue); }
.primary:hover { background: var(--blue-dark); }
.secondary { color: var(--blue); background: transparent; }
.secondary:hover { background: var(--blue-pale); }
.source-note { color: var(--muted); font-size: .78rem; }
.source-note span { color: var(--line-dark); }

.airspace { min-width: 0; border: 1px solid var(--line-dark); background: #f3f7fa; }
.map-heading {
  display: flex; justify-content: space-between; padding: .9rem 1rem 0;
  color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .1em;
}
.route-map { display: block; width: 100%; height: auto; }
.map-airports { fill: var(--blue); }
.map-airports text { fill: var(--ink); font: 700 12px "Helvetica Neue", Arial, sans-serif; }
.secondary-airports { fill: #6e8799; }
.secondary-airports text { fill: #61798b; font: 10px "Helvetica Neue", Arial, sans-serif; }
.ocean-label { fill: #7793a7; font: 9px "SFMono-Regular", monospace; letter-spacing: 2px; }
#active-flight-path { stroke: var(--blue); stroke-dasharray: 7 7; animation: route-dash 14s linear infinite; }
.flight-traveler { fill: var(--orange); }
.route-switch { display: flex; border-top: 1px solid var(--line); }
.route-switch button {
  flex: 1; min-height: 40px; color: var(--ink-2); background: #fff;
  border: 0; border-right: 1px solid var(--line); font: 600 .78rem "SFMono-Regular", monospace;
  cursor: pointer;
}
.route-switch button:last-child { border-right: 0; }
.route-switch button:hover { color: var(--blue); background: var(--blue-pale); }
.route-switch button[aria-pressed="true"] { color: #fff; background: var(--blue); }
.route-story {
  min-height: 102px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem; background: #fff; border-top: 1px solid var(--line);
}
.route-story span { color: var(--blue); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.route-story p { max-width: 38ch; margin: .35rem 0 0; color: var(--ink-2); font-size: .84rem; line-height: 1.5; }
.route-story strong { color: var(--blue); font: 500 2rem/1 "SFMono-Regular", monospace; white-space: nowrap; }
.route-story small { display: block; margin-top: .35rem; color: var(--muted); font: .67rem "Helvetica Neue", Arial, sans-serif; text-align: right; }
.map-caption { margin: 0; padding: 0 1rem .85rem; color: var(--muted); background: #fff; font-size: .67rem; }
.route-story.is-changing { animation: story-swap .35s ease; }

.readout {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
  margin: 0; border: 1px solid var(--line-dark); background: var(--surface);
}
.readout .tile { min-width: 0; padding: 1.35rem 1.25rem; border-right: 1px solid var(--line); }
.readout .tile:last-child { border-right: 0; }
.readout .v { color: var(--ink); font-size: clamp(1.45rem,2.2vw,2rem); line-height: 1.1; letter-spacing: -.06em; }
.readout .tile:first-child .v { color: var(--blue); }
.readout .k { margin-top: .5rem; color: var(--muted); font-size: .68rem; line-height: 1.45; letter-spacing: .07em; text-transform: uppercase; }
.readout.light { margin: 1.25rem 0 1.75rem; }
.readout .tile.hl { background: var(--blue-pale); }

.section-intro {
  display: flex; align-items: end; justify-content: space-between; gap: 2rem;
  margin: 5.5rem 0 1.5rem; padding-top: 1.35rem; border-top: 4px solid var(--ink);
}
.section-intro h2 { margin: 0; font-size: 2.5rem; line-height: 1; letter-spacing: -.055em; }
.section-intro > p { max-width: 36ch; margin: 0; color: var(--muted); font-size: .88rem; text-align: right; }
.board { border-top: 1px solid var(--line-dark); }
.finding {
  display: grid; grid-template-columns: minmax(150px,.38fr) minmax(0,1.62fr);
  gap: 2rem; padding: 2.35rem 0; border-bottom: 1px solid var(--line-dark);
}
.finding-label { color: var(--blue); font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.finding-copy { max-width: 850px; }
.finding h3 { margin: 0 0 .75rem; font-size: clamp(1.45rem,2.5vw,2.05rem); line-height: 1.15; letter-spacing: -.035em; }
.finding p { max-width: 72ch; color: var(--ink-2); }
.finding a { display: inline-block; margin-top: .2rem; font-size: .86rem; font-weight: 700; text-underline-offset: 4px; }

/* Project history and tools */
.route {
  position: relative; display: grid; grid-template-columns: repeat(5,1fr); gap: 1.3rem;
  margin: 2rem 0 0; padding: 0; list-style: none;
}
.route::before { content: ""; position: absolute; left: 8px; right: 19%; top: 10px; border-top: 1px solid var(--line-dark); }
.route li { position: relative; padding-top: 2.3rem; }
.route .wp { position: absolute; top: 3px; left: 0; width: 15px; height: 15px; background: var(--paper); border: 2px solid var(--blue); }
.route li.pivot .wp { background: var(--orange); border-color: var(--orange); }
.route li.end .wp { top: -2px; width: 25px; height: 25px; color: var(--blue); border: 0; background: transparent; }
.route li.end svg { width: 25px; height: 25px; transform: rotate(90deg); }
.route .wp-code { display: block; margin-bottom: .35rem; color: var(--blue); font-size: .67rem; letter-spacing: .08em; text-transform: uppercase; }
.route b { display: block; margin-bottom: .35rem; font-size: .92rem; line-height: 1.35; }
.route span.d { display: block; color: var(--ink-2); font-size: .82rem; line-height: 1.55; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.2rem; }
.chips span { padding: .4rem .65rem; color: var(--ink-2); background: #fff; border: 1px solid var(--line); font: .77rem "SFMono-Regular", monospace; }

/* Filters and controls */
.filters {
  display: flex; flex-wrap: wrap; align-items: end; gap: .8rem 1rem;
  margin: 1.2rem 0 .5rem; padding: 1rem; background: #fff; border: 1px solid var(--line-dark);
}
.filters label { display: flex; flex-direction: column; gap: .35rem; color: var(--ink-2); font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
select, input, button {
  min-height: 39px; padding: .45rem .65rem; color: var(--ink); background: #fff;
  border: 1px solid var(--line-dark); font: 14px "Helvetica Neue", Arial, sans-serif;
}
select {
  appearance: none; padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%234a5968' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .65rem center;
}
input { min-width: 210px; }
button { cursor: pointer; font-weight: 700; }
button:hover { color: var(--blue); border-color: var(--blue); background: var(--blue-pale); }
.filter-summary { margin: .65rem 0 1.4rem; color: var(--muted); font: .75rem "SFMono-Regular", monospace; }
.loading, .empty { padding: 1rem 0; color: var(--muted); }

/* Figures, data tables, and cards */
.grid2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.grid2 .wide { grid-column: 1 / -1; }
figure { min-width: 0; margin: 0; padding: 1.25rem; background: #fff; border: 1px solid var(--line); }
.page > figure { margin: 1rem 0; }
figcaption { margin-bottom: .2rem; font-size: 1rem; font-weight: 700; }
.sub { margin-bottom: 1rem; color: var(--muted); font-size: .78rem; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0 0 .7rem; color: var(--ink-2); font-size: .78rem; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { width: 11px; height: 11px; display: inline-block; }
.legend i.dash { width: 16px; height: 0; border-top: 2px dashed; }
details { margin-top: .4rem; padding-top: .45rem; border-top: 1px solid var(--line); font-size: .78rem; }
summary { color: var(--muted); cursor: pointer; }
.tablewrap { overflow-x: auto; margin: .8rem 0; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: .8rem; }
th, td { padding: .55rem .65rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
td.wrap { min-width: 260px; white-space: normal; }
tr.best td { font-weight: 700; }
.cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(290px,1fr)); gap: 1rem; }
.card, .panel { padding: 1.2rem; background: #fff; border: 1px solid var(--line); }
.card { border-top: 3px solid var(--blue); }
.card h3, .panel h3 { margin-bottom: .45rem; font-size: 1rem; }
.card p, .card li, .panel li { font-size: .87rem; }
.card .tag { display: inline-block; margin-bottom: .65rem; padding: .18rem .4rem; color: #fff; background: var(--blue); font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.panel ul, .card ul { margin: .4rem 0 0; padding-left: 1.15rem; }

/* Pipeline and model */
.strips { display: grid; grid-template-columns: repeat(4,1fr); gap: .55rem; margin: 1.5rem 0 .75rem; padding: 0; list-style: none; }
.strip button { width: 100%; height: 100%; display: grid; grid-template-columns: 42px 1fr; padding: 0; text-align: left; background: #fff; border: 1px solid var(--line); }
.strip .code { display: grid; place-items: center; color: #fff; background: var(--ink); font-size: .8rem; font-weight: 700; }
.strip .body { padding: .7rem; }
.strip b { display: block; font-size: .82rem; }
.strip span.s { display: block; color: var(--muted); font-size: .72rem; font-weight: 400; }
.strip button[aria-pressed="true"] { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.strip button[aria-pressed="true"] .code { background: var(--blue); }
.archdetail { padding: 1.2rem; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); }
.archdetail ul { margin: .5rem 0 0; padding-left: 1.15rem; font-size: .86rem; }
pre { margin: .5rem 0; padding: .8rem; overflow-x: auto; color: #26333e; background: var(--code); font: .76rem/1.55 "SFMono-Regular", Consolas, monospace; }
.sqlbox { margin: .8rem 0; padding: 1rem; background: #fff; border: 1px solid var(--line); }
.split { margin: 1.3rem 0; }
.split .track { height: 38px; display: flex; gap: 2px; overflow: hidden; }
.split .seg { display: flex; align-items: center; padding: 0 .7rem; color: #fff; font: 600 .75rem "SFMono-Regular", monospace; white-space: nowrap; }
.split .labels { display: flex; justify-content: space-between; margin-top: .3rem; color: var(--muted); font-size: .72rem; }
.callout { margin: 1.2rem 0; padding: 1rem 1.2rem; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--orange); }
.roles .card .interview { padding-top: .65rem; border-top: 1px solid var(--line); color: var(--ink-2); }

/* Role remnants and tooltip */
body:not([data-role="all"]) [data-roles].lens-dim { opacity: .35; }
body:not([data-role="all"]) [data-roles].lens-hit { outline: 2px solid var(--blue); outline-offset: 3px; }
#tt {
  position: fixed; z-index: 50; max-width: 280px; padding: .5rem .65rem;
  pointer-events: none; opacity: 0; color: #fff; background: var(--ink);
  border: 1px solid #fff; font-size: .75rem; line-height: 1.45;
}
footer {
  max-width: 1280px; margin: auto; padding: 1.7rem 2rem 3rem;
  color: var(--muted); border-top: 1px solid var(--line-dark); font-size: .76rem;
}
.footer-brand { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; color: var(--ink); font-size: .86rem; }

/* Motion */
.reveal {
  opacity: 1; transform: none;
  animation: content-enter .38s ease both;
  animation-delay: var(--reveal-delay,0ms);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@keyframes route-dash { to { stroke-dashoffset: -180; } }
@keyframes story-swap { from { opacity: .25; } to { opacity: 1; } }
@keyframes content-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .flight-traveler { display: none; }
}

@media (max-width: 980px) {
  .bar { gap: 1rem; }
  .brand { min-width: 190px; }
  .hero-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-copy { max-width: 760px; }
  .airspace { width: 100%; max-width: 720px; }
  .route { grid-template-columns: 1fr; gap: 0; }
  .route::before { left: 7px; right: auto; top: 4px; bottom: 8px; border-top: 0; border-left: 1px solid var(--line-dark); }
  .route li { padding: 0 0 1.7rem 2rem; }
  .route .wp { top: 2px; }
  .strips { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 0; }
  .top { position: static; }
  .bar { min-height: auto; padding: 1rem 1.25rem .65rem; flex-wrap: wrap; }
  .brand { min-width: 0; }
  nav { order: 3; width: 100%; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; }
  nav a { white-space: nowrap; }
  nav .source-link { margin-left: 0; }
  main { padding: 0 1.25rem 4rem; }
  .mission-line { font-size: .62rem; }
  .hero-layout { padding: 3.2rem 0 2.5rem; }
  .hero h1 { font-size: clamp(3rem,13vw,4.2rem); }
  .readout { grid-template-columns: repeat(2,1fr); }
  .readout .tile { border-bottom: 1px solid var(--line); }
  .readout .tile:nth-child(even) { border-right: 0; }
  .section-intro { align-items: start; flex-direction: column; gap: .7rem; }
  .section-intro > p { text-align: left; }
  .finding { grid-template-columns: 1fr; gap: .65rem; padding: 1.75rem 0; }
  .grid2 { grid-template-columns: 1fr; }
  .grid2 .wide { grid-column: auto; }
  .cards { grid-template-columns: 1fr; }
  .filters label { flex: 1 1 140px; }
  input { width: 100%; min-width: 0; }
  .page > h1 { font-size: 2.7rem; }
  .footer-brand { flex-direction: column; }
}

@media (max-width: 460px) {
  .brand small { display: none; }
  .mission-line { align-items: start; }
  .hero h1 { font-size: 3rem; }
  .hero .lede { font-size: 1rem; }
  .route-switch button { font-size: .68rem; }
  .route-story { align-items: start; }
  .route-story strong { font-size: 1.55rem; }
  .readout .tile { padding: 1rem .85rem; }
  .readout .v { font-size: 1.45rem; }
  .section-intro h2 { font-size: 2.15rem; }
  .strips { grid-template-columns: 1fr; }
  figure { padding: 1rem .85rem; }
}
