@font-face {
  font-family: "Overpass";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/assets/fonts/overpass.woff2) format("woff2");
}
@font-face {
  font-family: "Overpass Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/overpass-mono.woff2) format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/atkinson-hyperlegible-next.woff2) format("woff2");
}

/* Colors come from the app icon (navy, ice, sky blue, sunset) and are used
   like a transit map: a sky-blue line for traffic that goes through the proxy,
   a grey line for direct traffic. */
:root {
  --paper: #f1f6fb;
  --surface: #ffffff;
  --ink: #11134a;
  --muted: #535a7e;
  --rule: #d6e0ee;
  --route: #1f8fd6;
  --route-text: #1468aa;
  --route-soft: #e3f2fc;
  --direct: #a6b0c6;
  --sun: #d9772f;

  --display: "Overpass", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "Atkinson Hyperlegible Next", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Overpass Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e0d3e;
    --surface: #171957;
    --ink: #e6f6fe;
    --muted: #a6b1d8;
    --rule: #2a2e6e;
    --route: #52c6fe;
    --route-text: #84d6fe;
    --route-soft: #16265f;
    --direct: #3d4382;
    --sun: #ffa65c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.62 var(--body);
  -webkit-font-smoothing: antialiased;
}

.label, .nav, .platform, .toggle, .map-address, .map .t, .chips li, .steps li::after { font-variant-ligatures: none; }

a { color: var(--route-text); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--route); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 16px; z-index: 10; padding: 8px 12px; background: var(--surface); color: var(--ink); }

/* Header */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 21px/1 var(--display); letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; flex: none; border-radius: 9px; box-shadow: 0 0 0 1px var(--rule); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font: 500 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--route); }

/* Shared type */
.label { margin: 0 0 14px; font: 500 13px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
h1, h2, h3 { font-family: var(--display); color: var(--ink); }
h2 { margin: 0 0 16px; font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; line-height: 1.04; letter-spacing: -.03em; }
h3 { margin: 0 0 6px; font-size: 20px; font-weight: 750; letter-spacing: -.01em; line-height: 1.25; }
.lede { margin: 0; max-width: 34em; font-size: clamp(18px, 2vw, 20px); color: var(--muted); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(28px, 6vw, 80px) 0 clamp(48px, 7vw, 96px); }
.app-icon { display: block; width: 88px; height: 88px; margin-bottom: 26px; border-radius: 20px; box-shadow: 0 0 0 1px var(--rule), 0 14px 34px rgba(17, 19, 74, .22); }
.hero h1 { margin: 0 0 22px; font-size: clamp(42px, 7.2vw, 80px); font-weight: 850; line-height: .98; letter-spacing: -.045em; }
.hero h1 em { font-style: normal; color: var(--route); }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 700 16px/1 var(--display); text-decoration: none; }
.button:hover { background: var(--route-text); color: var(--surface); }
.platform { font: 500 13px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* Route map: the signature element */
.map { margin: 0; padding: clamp(16px, 2.6vw, 26px); border-radius: 26px; background: var(--surface); border: 1px solid var(--rule); }
.map-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px 14px; border-bottom: 1px solid var(--rule); }
.map-address { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 14px/1 var(--mono); color: var(--muted); }
.toggle { display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border: 1px solid var(--rule); border-radius: 999px; background: transparent; color: var(--ink); font: 600 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.toggle[hidden] { display: none; }
.toggle .switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--direct); transition: background .2s; }
.toggle .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle[aria-pressed="true"] .switch { background: var(--route); }
.toggle[aria-pressed="true"] .switch::after { transform: translateX(16px); }
.toggle .state::after { content: "Off"; }
.toggle[aria-pressed="true"] .state::after { content: "On"; }

.map svg { display: block; width: 100%; height: auto; margin-top: 8px; }
.map .line { fill: none; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; transition: opacity .3s; }
.map .line-proxy, .map .line-tab-direct { stroke: var(--route); }
.map .line-direct { stroke: var(--direct); }
.map .station { fill: var(--surface); stroke: var(--ink); stroke-width: 4; transition: opacity .3s; }
.map .station-big { stroke-width: 5; }
.map .station-end { stroke: var(--sun); }
.map .t { fill: var(--ink); font: 600 15px var(--mono); letter-spacing: .02em; transition: opacity .3s; }
.map .t-sub { fill: var(--muted); font-weight: 500; font-size: 13px; }
.map .t-route { fill: var(--route-text); }
.map .t-direct { fill: var(--muted); }
.map .dot { fill: var(--surface); stroke: var(--sun); stroke-width: 4; }
.map figcaption { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 15px; color: var(--muted); min-height: 3.2em; }

.map .when-off { opacity: 0; }
.map.is-off .when-on { opacity: .14; }
.map.is-off .when-off { opacity: 1; }
.map.is-off .dot-on, .map:not(.is-off) .dot-off { display: none; }
.map .caption-off, .map.is-off .caption-on { display: none; }
.map.is-off .caption-off { display: inline; }

@media (prefers-reduced-motion: reduce) {
  .map .dot { display: none; }
  .map .line, .map .station, .map .t, .toggle .switch, .toggle .switch::after { transition: none; }
}

/* Sections */
.band { padding: clamp(52px, 8vw, 104px) 0; border-top: 1px solid var(--rule); }
.band-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: clamp(28px, 4vw, 48px); }
.band-head .lede { justify-self: end; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; margin: 0; padding: 0; list-style: none; }
.features li { padding: 22px 0 26px; border-top: 2px solid var(--ink); }
.features p { margin: 0; color: var(--muted); }
.features .is-proxy { border-top-color: var(--route); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 46px 28px 0 0; counter-increment: step; }
.steps li::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 8px; background: var(--route); }
.steps li:first-child::before { left: 13px; border-radius: 4px 0 0 4px; }
.steps li:last-child::before { right: auto; width: 14px; }
.steps li::after { content: counter(step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 4px solid var(--ink); font: 700 14px/1 var(--mono); color: var(--ink); }
.steps p { margin: 0; color: var(--muted); max-width: 22em; }

.note { margin-top: clamp(32px, 4vw, 48px); padding: 22px 24px; border-left: 6px solid var(--route); border-radius: 0 16px 16px 0; background: var(--route-soft); }
.note h3 { margin-bottom: 10px; }
.note ul { margin: 0; padding-left: 1.1em; }
.note li { margin: 4px 0; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin: 0; }
.facts div { padding: 20px 0; border-top: 1px solid var(--rule); }
.facts dt { margin-bottom: 4px; font: 750 20px/1.25 var(--display); }
.facts dd { margin: 0; color: var(--muted); }
.more { margin: 28px 0 0; font-weight: 700; }

.support { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px 64px; align-items: start; }
.support-card { padding: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--rule); }
.support-card p { margin: 0 0 18px; color: var(--muted); }
.support-card .email { display: block; margin-bottom: 18px; font: 700 clamp(18px, 2.4vw, 22px)/1.2 var(--display); overflow-wrap: anywhere; }
.support-card .fine { margin: 18px 0 0; font-size: 15px; }

/* Legal pages */
.doc-head { padding: clamp(28px, 5vw, 64px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--rule); }
.doc-head h1 { margin: 0 0 16px; font-size: clamp(40px, 6.4vw, 68px); font-weight: 850; line-height: 1; letter-spacing: -.04em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding: 0; list-style: none; }
.chips li { padding: 7px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); font: 500 13px/1.2 var(--mono); color: var(--muted); }
.chips code { font: inherit; color: var(--ink); }

.doc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding: clamp(28px, 4vw, 48px) 0 clamp(56px, 8vw, 96px); }
.toc { position: sticky; top: 20px; }
.toc ol { margin: 0; padding: 0 0 0 14px; list-style: none; border-left: 4px solid var(--rule); }
.toc a { display: block; padding: 5px 0; color: var(--muted); text-decoration: none; font-size: 15px; line-height: 1.35; }
.toc a:hover { color: var(--route-text); }
.doc article { max-width: 46em; }
.doc section { padding: 6px 0 26px; scroll-margin-top: 20px; }
.doc section + section { padding-top: 26px; border-top: 1px solid var(--rule); }
.doc h2 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 30px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.doc p { margin: 12px 0; }
.doc ul { margin: 12px 0; padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--route); }
.doc address { font-style: normal; margin-top: 12px; padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--rule); }

/* Footer */
.footer { padding: 28px 0 40px; border-top: 1px solid var(--rule); font-size: 15px; color: var(--muted); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); }

/* 404 */
.lost { min-height: 62vh; display: grid; align-content: center; padding: 48px 0; }
.lost h1 { margin: 0 0 12px; font-size: clamp(40px, 6vw, 64px); font-weight: 850; letter-spacing: -.04em; line-height: 1; }
.lost p { margin: 0 0 24px; color: var(--muted); }

@media (max-width: 900px) {
  .hero, .band-head, .support { grid-template-columns: 1fr; }
  .band-head .lede { justify-self: start; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc { grid-template-columns: 1fr; }
  .toc { position: static; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 0 8px; }
  .nav { gap: 2px 16px; }
  .features, .facts { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li { padding: 0 0 28px 54px; }
  .steps li::before { left: 13px; right: auto; top: 0; bottom: 0; width: 8px; height: auto; }
  .steps li:first-child::before { top: 13px; border-radius: 4px 4px 0 0; }
  .steps li:last-child::before { bottom: auto; height: 14px; width: 8px; }
  .steps li:last-child { padding-bottom: 0; }
  .map .t { font-size: 17px; }
  .map .t-sub { font-size: 15px; }
}
