/*
 * Crux Interactive homepage — the Crux network.
 *
 * Night-time transit signage on the Crux platform's slate. Lines are the only
 * saturated colour and each one means something: brass is the Crux ID line,
 * blue is CruxAI's transfers, green is Calendar–Cloud. Brass also marks the
 * single primary action. Overpass (signage) names things and Atkinson
 * Hyperlegible Next carries everything else; there is no monospace. Surfaces
 * are separated by space and tone steps, not hairlines: the only drawn lines
 * are the network's own.
 */

:root {
  color-scheme: dark;

  --font-sign: "Overpass", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ground: #0f151a;
  --ground-deep: #0a0f13;
  --panel: #151d24;
  --panel-2: #1c252c;
  --ink: #efeee8;
  --ink-2: #bcc5c9;
  --ink-3: #8f9ba1;
  --rule: rgba(235, 242, 246, 0.13);
  --rule-strong: rgba(235, 242, 246, 0.3);

  --line-id: #dfb45f;
  --line-ai: #78b5ce;
  --line-cal: #7bc5a6;
  --on-brass: #17130a;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 136px;

  --r: 3px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 180ms;
  --header-h: 64px;
  --gutter: 32px;
  --measure: 66ch;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s4));
  scrollbar-color: #2c373f var(--ground);
}

body {
  margin: 0;
  font-variant-numeric: tabular-nums;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--line-id);
}

::selection { background: var(--line-id); color: var(--on-brass); }

img, svg { display: block; max-width: 100%; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--font-sign); font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
p, dd { text-wrap: pretty; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--rule-strong);
  transition: text-decoration-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--line-id); outline-offset: 3px; border-radius: 2px; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute;
  left: var(--s4);
  top: -80px;
  z-index: 100;
  padding: var(--s3) var(--s4);
  background: var(--ink);
  color: var(--ground);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--s3); }

.icon { width: 18px; height: 18px; flex: none; }

/* ---------- Plates (buttons) ---------- */

.plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--r);
  background: var(--panel-2);
  color: var(--ink);
  font-family: var(--font-sign);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.plate:hover { background: #283440; }
.plate:active { transform: translateY(1px); }
.plate-primary { background: var(--line-id); color: var(--on-brass); }
.plate-primary:hover { background: #ecc77c; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ground);
  transition: background-color var(--dur) var(--ease-out);
}
.site-header.is-scrolled { background: var(--panel); }

.header-inner { display: flex; align-items: center; gap: var(--s5); height: var(--header-h); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-family: var(--font-sign);
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img { width: 30px; height: 30px; border-radius: 6px; }

.primary-nav { flex: 1; }
.nav-list { display: flex; align-items: center; gap: var(--s1); }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: 44px;
  padding: 0 var(--s3);
  color: var(--ink-2);
  font-size: 0.9688rem;
  text-decoration: none;
  cursor: pointer;
}
.nav-link:hover, .menu[open] > .nav-link { color: var(--ink); }
.chevron { width: 15px; height: 15px; transition: transform var(--dur) var(--ease-out); }
.menu[open] .chevron { transform: rotate(180deg); }

.header-actions { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.header-cta { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }

.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }

.menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  padding: var(--s2);
  border-radius: var(--r);
  background: var(--panel-2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.menu[open] > .menu-panel { animation: menu-in 160ms var(--ease-out); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }

.products-panel { width: 440px; }

.menu-station {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: var(--s3);
  min-height: 44px;
  padding: var(--s2) var(--s3);
  border-radius: 2px;
  text-decoration: none;
}
.menu-station:hover { background: #283440; }
.menu-station-name { font-family: var(--font-sign); font-size: 1rem; font-weight: 700; line-height: 1.3; }
.menu-station-host { color: var(--ink-3); font-size: 0.8125rem; }

.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--panel);
  cursor: pointer;
}
.account-trigger:hover, .account-menu[open] > .account-trigger { background: var(--panel-2); }
.account-name { max-width: 16ch; overflow: hidden; font-size: 0.9375rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--panel-2); }
.avatar-initial { display: inline-grid; place-items: center; color: var(--line-ai); font-family: var(--font-sign); font-weight: 800; }

.account-panel { left: auto; right: 0; width: 260px; }
.account-summary { display: grid; padding: var(--s2) var(--s3) var(--s4); }
.account-summary strong { font-family: var(--font-sign); font-weight: 800; overflow-wrap: anywhere; }
.account-summary span { color: var(--ink-3); font-size: 0.8125rem; overflow-wrap: anywhere; }
.menu-row { display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: 0 var(--s3); color: var(--ink-2); text-decoration: none; }
.menu-row:hover { background: #283440; color: var(--ink); }

.mobile-nav { display: none; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r); background: var(--panel); cursor: pointer; }
.icon-button .icon-close, .mobile-nav[open] .icon-open { display: none; }
.mobile-nav[open] .icon-close { display: block; }

.mobile-panel {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  padding: var(--s3) var(--gutter) var(--s7);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 0;
  background: var(--panel);
  box-shadow: none;
}
html.nav-open { overflow: hidden; }
.mobile-stations .menu-station { padding-inline: 0; }
.mobile-links { margin-top: var(--s5); }
.mobile-links a { display: flex; align-items: center; min-height: 48px; color: var(--ink-2); font-size: 1.0625rem; text-decoration: none; }
.mobile-account { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s5); }

/* ---------- Station symbols and line swatches ---------- */

.station-symbol { width: 20px; height: 20px; flex: none; overflow: visible; }
.station-symbol circle { fill: var(--ground); stroke: var(--ink); stroke-width: 3; }
.station-symbol.is-interchange circle { fill: var(--ink); stroke: var(--line-id); stroke-width: 3.5; }

.swatch { width: 28px; height: 10px; flex: none; }
.swatch path { stroke-width: 6; stroke-linecap: round; }
.swatch-id path { stroke: var(--line-id); }
.swatch-ai path { stroke: var(--line-ai); }
.swatch-cal path { stroke: var(--line-cal); }

/* ---------- Hero: the network ---------- */

.hero { padding-block: var(--s6) var(--s8); }
.hero-frame { position: relative; }

.cartouche {
  position: absolute;
  top: var(--s2);
  left: var(--gutter);
  z-index: 1;
  width: min(43%, 520px);
}
.cartouche h1 {
  font-size: clamp(2.35rem, 3.9vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.hero-name { overflow-wrap: anywhere; }
.lede { max-width: 34ch; margin-top: var(--s4); color: var(--ink-2); font-size: 1.1875rem; line-height: 1.5; }

.cartouche-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin-top: var(--s5); }
.cartouche-links > a:not(.plate) { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

.ticket {
  display: grid;
  max-width: 380px;
  margin-top: var(--s5);
  padding-block: var(--s2);
  border-radius: var(--r);
  background: var(--panel);
}
.ticket-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: baseline;
  gap: var(--s1) var(--s3);
  padding: 10px var(--s4);
}
.ticket-label { color: var(--ink-3); font-size: 0.875rem; }
.ticket-value { font-size: 0.9375rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ticket meter { grid-column: 2; }

meter {
  width: 100%;
  height: 6px;
  border: 0;
  background: #2b3640;
  -webkit-appearance: none;
  appearance: none;
}
meter::-webkit-meter-bar { height: 6px; border: 0; border-radius: 0; background: #2b3640; }
meter::-webkit-meter-optimum-value { background: var(--line-ai); }
meter::-moz-meter-bar { background: var(--line-ai); }

/* The map. Units inside the SVG are viewBox units (1240 × 660). */
.network-map { width: 100%; height: auto; overflow: visible; }
.route { fill: none; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; transition: opacity var(--dur) var(--ease-out); }
.route-id { stroke: var(--line-id); }
.route-ai { stroke: var(--line-ai); }
.route-cal { stroke: var(--line-cal); }

.station { cursor: pointer; text-decoration: none; outline: none; }
.station-hit { fill: transparent; stroke: transparent; stroke-width: 3; transition: stroke var(--dur) var(--ease-out); }
.station-ring { fill: var(--ink); stroke: var(--ground); stroke-width: 5; }
.station.is-hub .station-ring { stroke: var(--line-id); stroke-width: 6; }
.station-name { fill: var(--ink); font-family: var(--font-sign); font-size: 25px; font-weight: 800; letter-spacing: -0.01em; }
.station-host { fill: var(--ink-3); font-size: 17px; }
.station:hover .station-name { fill: #ffffff; }
.station:hover .station-hit,
.station:focus-visible .station-hit { stroke: var(--line-id); }
.station:hover .station-host,
.station:focus-visible .station-host { fill: var(--ink-2); text-decoration: underline; }

.you-are-here path { fill: none; stroke: var(--line-id); stroke-width: 2; }
.you-are-here text { fill: var(--line-id); font-family: var(--font-sign); font-size: 17px; font-weight: 700; }

/* Signature interaction: a station lights the routes that serve it. */
.network-map:has(.station:is(:hover, :focus-visible)) .route { opacity: 0.18; }
.network-map:has([data-station="cruxai"]:is(:hover, :focus-visible)) .route[data-stations~="cruxai"],
.network-map:has([data-station="cloud"]:is(:hover, :focus-visible)) .route[data-stations~="cloud"],
.network-map:has([data-station="calendar"]:is(:hover, :focus-visible)) .route[data-stations~="calendar"],
.network-map:has([data-station="id"]:is(:hover, :focus-visible)) .route[data-stations~="id"],
.network-map:has([data-station="connect"]:is(:hover, :focus-visible)) .route[data-stations~="connect"],
.network-map:has([data-station="spaces"]:is(:hover, :focus-visible)) .route[data-stations~="spaces"],
.network-map:has([data-station="forms"]:is(:hover, :focus-visible)) .route[data-stations~="forms"] { opacity: 1; }

/* Strip map: the narrow-screen form of the same network. */
.network-strip { display: none; position: relative; margin-top: var(--s6); }
.network-strip::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 6px;
  width: 8px;
  border-radius: 4px;
  background: var(--line-id);
}
.stop { position: relative; padding: var(--s3) 0 var(--s3) 40px; }
.stop > a { display: grid; gap: 2px; text-decoration: none; }
.stop .station-symbol { position: absolute; left: 0; top: 15px; }
.stop-name { font-family: var(--font-sign); font-size: 1.3125rem; font-weight: 800; line-height: 1.3; }
.stop-host { color: var(--ink-3); font-size: 0.875rem; }
.stop > a:hover .stop-host { color: var(--ink-2); text-decoration: underline; }
.stop-here { color: var(--line-id); font-family: var(--font-sign); font-size: 0.9375rem; font-weight: 700; }
.stop-transfers { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin-top: 6px; color: var(--ink-2); font-size: 0.875rem; }
.stop-transfers > span { display: inline-flex; align-items: center; gap: 6px; }
.stop.is-hub { padding-block: var(--s4); }

.map-key {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s4) var(--s6);
  margin-top: var(--s6);
}
.map-key dt .station-symbol { width: 28px; height: 14px; }
.map-key dt { display: flex; align-items: center; gap: 10px; font-family: var(--font-sign); font-size: 0.9375rem; font-weight: 700; }
.map-key dd { margin-top: 2px; padding-left: 38px; color: var(--ink-3); font-size: 0.875rem; }
.map-key .code { color: var(--ink-2); }
.map-key .key-codes dd { padding-left: 38px; }

/* ---------- Stations ---------- */

.station-sign {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--s3) var(--s6);
  margin-bottom: var(--s8);
  padding-top: var(--s5);
  border-top: 8px solid var(--line-id);
}
.sign-name { display: flex; align-items: center; gap: var(--s4); }
.sign-name .station-symbol { width: 30px; height: 30px; }
.sign-name h2 { font-size: clamp(2.5rem, 5.2vw, 4.25rem); line-height: 0.95; letter-spacing: -0.035em; }
.sign-meta {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s5);
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.sign-host { color: var(--ink-3); }
.sign-note { font-family: var(--font-sign); font-weight: 700; color: var(--ink); }
.sign-line { display: inline-flex; align-items: center; gap: var(--s2); }
.sign-go {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--r);
  background: var(--panel-2);
  font-family: var(--font-sign);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.sign-go:hover { background: #283440; }
.sign-go .icon { transition: transform var(--dur) var(--ease-out); }
.sign-go:hover .icon { transform: translateX(3px); }

.section-station { padding-block: var(--s10); }
.section-id { background: var(--ground-deep); }

.statement { max-width: 32ch; font-size: clamp(1.375rem, 2.3vw, 1.875rem); line-height: 1.35; letter-spacing: -0.005em; }
.body-copy { max-width: var(--measure); margin-top: var(--s4); color: var(--ink-2); }

.services { display: grid; gap: var(--s5); }
.services dt { font-family: var(--font-sign); font-size: 1.125rem; font-weight: 700; line-height: 1.35; }
.services dd { max-width: var(--measure); margin-top: var(--s1); color: var(--ink-2); font-size: 1rem; }

/* CruxAI */
.ai-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; gap: var(--s8); }
.ai-media { min-width: 0; }
.capture-pair { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: var(--s4); }
.capture-pair img { width: 100%; height: auto; padding: 6px; border-radius: 26px; background: var(--panel-2); }
.capture-pair img + img { margin-top: var(--s8); }
.captures figcaption { max-width: 42ch; margin-top: var(--s4); color: var(--ink-3); font-size: 0.875rem; }
.ai-copy .services { margin-top: var(--s6); }
.aside { max-width: var(--measure); margin-top: var(--s5); color: var(--ink-2); }
.platforms { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s7); margin-top: var(--s6); }
.platforms li { display: grid; }
.platforms span { color: var(--ink-3); font-size: 0.875rem; }
.platforms a { font-weight: 600; }

/* Crux ID */
.id-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; gap: var(--s8); }
.boarding { display: grid; gap: var(--s5); margin-top: var(--s7); }
.boarding li { display: grid; gap: 2px; }
.boarding strong { font-family: var(--font-sign); font-size: 1.1875rem; font-weight: 800; line-height: 1.35; }
.boarding span { color: var(--ink-2); }
.services-compact { margin-top: var(--s2); }

/* Crux Cloud */
.cloud-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; gap: var(--s7) var(--s8); }
.services-grid { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--s6); }
.cloud-layout .notice { grid-column: 2; grid-row: 1; }
.notice { padding: var(--s5); border-radius: var(--r); background: var(--panel); }
.notice h3 { font-size: 1.25rem; line-height: 1.3; }
.notice p { margin-top: var(--s2); color: var(--ink-2); }

/* Station index */
.station-index { padding-block: var(--s9); background: var(--ground-deep); }
.station-index h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; }
.index-rows { display: grid; gap: var(--s6); margin-top: var(--s7); }
.index-row {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) minmax(200px, 2.2fr) minmax(0, 4fr) 10.5rem;
  align-items: baseline;
  gap: var(--s2) var(--s5);
  text-decoration: none;
  transition: background-color var(--dur) var(--ease-out);
}
.index-row:hover .index-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.index-name { display: inline-flex; align-items: center; gap: var(--s3); font-family: var(--font-sign); font-size: 1.375rem; font-weight: 800; line-height: 1.3; }
.index-name .station-symbol { align-self: center; }
.index-host { color: var(--ink-3); font-size: 0.875rem; }
.index-summary { color: var(--ink-2); }
.index-transfer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: var(--s2); color: var(--ink-3); font-size: 0.9375rem; }
.index-go { display: inline-flex; align-items: center; justify-self: end; gap: var(--s2); font-family: var(--font-sign); font-weight: 700; white-space: nowrap; }
.index-go .icon { transition: transform var(--dur) var(--ease-out); }
.index-row:hover .index-go .icon { transform: translateX(3px); }

/* Newsroom */
.notices { padding-block: var(--s9); }
.notices-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s5) var(--s8); }
.notices-head h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; }
.notices-head p { margin-top: var(--s3); color: var(--ink-3); font-size: 0.9375rem; }
.notice-list { display: grid; gap: var(--s6); }
.notice-list a {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: var(--s1) var(--s5);
  text-decoration: none;
}
.notice-list time { grid-row: span 2; padding-top: 3px; color: var(--ink-3); font-size: 0.9375rem; }
.notice-title { font-family: var(--font-sign); font-size: 1.3125rem; font-weight: 800; line-height: 1.3; }
.notice-list a:hover .notice-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.notice-summary { max-width: var(--measure); color: var(--ink-2); font-size: 1rem; }
.notice-empty { align-self: center; color: var(--ink-2); }

/* Company */
.company { padding-block: var(--s9) var(--s10); }
.company-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s5) var(--s8); }
.company h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; }
.company-links { display: grid; gap: var(--s3); margin-top: var(--s6); }
.company-links li { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr); gap: var(--s1) var(--s5); }
.company-links a { font-family: var(--font-sign); font-weight: 700; }
.company-links span { color: var(--ink-3); }

/* ---------- Footer ---------- */

.site-footer { padding-block: var(--s8) var(--s6); background: var(--ground-deep); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: var(--s6); }
.footer-brand p { max-width: 26ch; margin-top: var(--s3); color: var(--ink-3); font-size: 0.9375rem; }
.social-links { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin-top: var(--s4); }
.social-links a, .footer-column a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink-2); font-size: 0.9375rem; text-decoration: none; }
.social-links a:hover, .footer-column a:hover { color: var(--ink); text-decoration: underline; }
.footer-heading { margin-bottom: var(--s2); font-family: var(--font-sign); font-size: 0.9375rem; font-weight: 800; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s2) var(--s5);
  margin-top: var(--s8);
  color: var(--ink-3);
  font-size: 0.875rem;
}
.footer-bottom a { color: var(--ink-2); }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Below this width the octilinear map can't keep its labels legible, so the
   page switches to the strip map and the title block sits above it. */
@media (max-width: 1000px) {
  .cartouche { position: static; width: auto; max-width: 40rem; }
  .network-map { display: none; }
  .network-strip { display: block; }
  .map-key { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }

  .primary-nav { display: none; }
  .mobile-nav { display: block; }

  .ai-layout, .id-layout, .cloud-layout, .notices-layout, .company-layout { grid-template-columns: minmax(0, 1fr); }
  .captures { max-width: 640px; }
  .cloud-layout .notice { grid-column: 1; grid-row: auto; }
  .ai-layout { gap: var(--s7); }
  .index-row { grid-template-columns: minmax(0, 1fr) auto; }
  .index-host { grid-column: 1; grid-row: 2; }
  .index-summary { grid-column: 1 / -1; }
  .index-go { grid-column: 2; grid-row: 1; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; --header-h: 60px; }
  .sign-in-link, .account-name { display: none; }
  .header-cta { padding: 0 12px; font-size: 0.875rem; }
  .brand span { font-size: 1rem; }

  .hero { padding-top: var(--s5); }
  .cartouche h1 { font-size: 2.125rem; }
  .section-station { padding-block: var(--s9); }
  .station-sign { grid-template-columns: minmax(0, 1fr); margin-bottom: var(--s6); }
  .sign-go { grid-column: 1; grid-row: auto; justify-self: start; }
  .ai-copy .services, .services-grid { grid-template-columns: minmax(0, 1fr); }
  /* Two phone captures can't share a phone's width legibly: swipe between them. */
  .capture-pair {
    display: flex;
    gap: var(--s3);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .capture-pair img { flex: 0 0 76%; width: auto; min-width: 0; height: auto; aspect-ratio: 720 / 1122; object-fit: cover; object-position: top; scroll-snap-align: start; }
  .capture-pair img + img { margin-top: 0; }
  .notice-list a { grid-template-columns: minmax(0, 1fr); }
  .notice-list time { grid-row: auto; padding-top: 0; }
  .company-links li { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-stations .menu-station { grid-template-columns: 20px 1fr; }
  .mobile-stations .menu-station-host { grid-column: 2; }
}

@media (max-width: 380px) {
  .brand span { display: none; }
}

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

@media (forced-colors: active) {
  .route { stroke: CanvasText; }
  .plate, .sign-go, .ticket, .notice { outline: 1px solid CanvasText; }
}
