/* MultiTunnel's site. The look is the app window's (mt-tray ui/app.css), taken
   to a page: ink and teal on warm paper, a dot field under everything, contour
   lines behind each title, ink sections with the mark huge and faint, and
   stations on a line for steps. Plain hairlines where a divider is needed.
   No cards with soft shadows, no gradient blobs, no stock icons.

   Type (README, "Type"): Fraunces for headings, Funnel Display for the
   wordmark and everything that labels or acts, Funnel Sans for reading.

   Motion ("Motion" below) is brief, plays once, and only under
   prefers-reduced-motion: no-preference. Every picture's resting state is
   its finished state, so with motion off, or before anything loads, the page
   is complete and readable.

   Text is at least 4.5:1 on its surface (ratios noted). The brand teal is
   4.2:1 on white, so it draws shapes and text uses a deeper teal. */

/* ── Fonts: self-hosted, SIL Open Font License (licences beside the files) ── */

@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-latin-opsz-wght.woff2") format("woff2");
  font-weight: 500 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Funnel Display";
  src: url("/static/fonts/funnel-display-latin-wght.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Funnel Sans";
  src: url("/static/fonts/funnel-sans-latin-wght.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap;
}
/* Local stand-ins sized to the web fonts' widths (measured with fontTools on
   the site's own sentences), so the swap barely moves a line. */
@font-face {
  font-family: "Fraunces fallback";
  src: local("Georgia Bold"), local("Georgia-Bold"), local("Georgia");
  font-weight: 500 700;
  size-adjust: 90.4%; ascent-override: 108%; descent-override: 28%; line-gap-override: 0%;
}
@font-face {
  font-family: "Funnel fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica");
  size-adjust: 101%; ascent-override: 99%; descent-override: 25%; line-gap-override: 0%;
}
@font-face {
  font-family: "Funnel Sans fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica");
  size-adjust: 101.8%; ascent-override: 98.2%; descent-override: 24.6%; line-gap-override: 0%;
}

/* ── Tokens ── */

:root {
  color-scheme: light;
  --ink: #0F1B2D;
  --teal: #0E8A7E;
  --grey: #8A8F99;

  --bg: #F3F2ED;            /* warm paper */
  --band: #EAE8E0;
  --surface: #FBFAF7;
  --line: #D9D6CC;
  --text: #0F1B2D;
  --muted: #4B505A;         /* 7.2:1 on --bg, 6.5:1 on --band */
  --accent-text: #0B6F66;   /* 5.4:1 on --bg, 4.9:1 on --band */
  --accent-fill: #0B7268;   /* white on it: 5.8:1 */
  --on-accent: #FFFFFF;
  --dots: rgba(15, 27, 45, 0.075);
  --contour: #0E8A7E;
  --lane-faint: rgba(15, 27, 45, 0.07);
  --tube: rgba(14, 138, 126, 0.16);
  --focus: #1D4ED8;

  /* The mark: ink is you, teal is a network. */
  --mark-you: var(--ink);
  --mark-net: var(--teal);

  /* Ink sections: the app's side bar. */
  --deep: #0F1B2D;
  --deep-text: #E9EDF3;     /* 15:1 on --deep */
  --deep-muted: #B9C3D1;    /* 9.6:1 */
  --deep-teal: #3FD0C0;     /* 9.3:1 */
  --deep-line: rgba(233, 237, 243, 0.14);
  --side: #0F1B2D;

  /* The teal band: a network's own colour, deepened. */
  --tealband: #0A4A45;
  --tealband-text: #F1F8F7;   /* 9.6:1 */
  --tealband-muted: #B9DCD7;  /* 6.6:1 */

  --display: "Fraunces", "Fraunces fallback", Georgia, "Times New Roman", serif;
  --label: "Funnel Display", "Funnel fallback", "Segoe UI", system-ui, sans-serif;
  --font: "Funnel Sans", "Funnel Sans fallback", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --gutter: 40px;
  --bar: 68px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-draw: cubic-bezier(0.6, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #F4F5F7;
    --teal: #3FD0C0;
    --grey: #7D8698;
    --bg: #0C131D;
    --band: #152131;
    --surface: #182536;
    --line: #253142;
    --text: #EEF1F5;
    --muted: #A3ABBA;         /* 7.9:1 on --bg, 7.0:1 on --band */
    --accent-text: #3FD0C0;   /* 9.6:1 on --bg */
    --accent-fill: #3FD0C0;
    --on-accent: #0F1B2D;     /* 9.0:1 */
    --dots: rgba(244, 245, 247, 0.05);
    --contour: #3FD0C0;
    --lane-faint: rgba(244, 245, 247, 0.06);
    --tube: rgba(63, 208, 192, 0.10);
    --focus: #8AB4FF;
    --deep: #050A11;
    --side: #050A11;
    --tealband: #0B2A2B;
    --tealband-text: #EEF6F5;
    --tealband-muted: #A8CFCA;
  }
}

/* ── Base ── */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar) + 16px);
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--dots) 1px, transparent 1.3px);
  background-size: 18px 18px;
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  font-optical-sizing: auto;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.012em;
}
h1, h2 { text-wrap: balance; }
p, li, figcaption, dd { text-wrap: pretty; }
h1 { font-size: clamp(2.4rem, 1.2rem + 2.95vw, 3.85rem); line-height: 1.0; letter-spacing: -0.022em; }
h2 { font-size: clamp(1.9rem, 1.35rem + 1.8vw, 2.9rem); line-height: 1.05; letter-spacing: -0.018em; }
h3 { font-size: 1.36rem; line-height: 1.18; }
p, ul, ol, dl, figure { margin: 0; }
strong, b { font-weight: 600; }
code { font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; font-size: 0.92em; }

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

.icon { width: 1.15em; height: 1.15em; flex: none; }

.skip {
  position: absolute; left: 16px; top: 0; z-index: 50;
  transform: translateY(-120%);
  padding: 10px 16px; background: var(--surface); color: var(--text);
  border: 2px solid var(--text); font-weight: 600; text-decoration: none;
}
.skip:focus { transform: translateY(12px); }

/* The contour lines' one copy (base.html); kept out of layout, not display:
   none, so <use> can still draw it. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap { width: 100%; max-width: calc(1160px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }


/* ── The mark ── */

.ring { fill: none; stroke-width: 8; }
.ring--you { stroke: var(--mark-you); }
.ring--net { stroke: var(--mark-net); }
.is-off .ring, .mark--off .ring { stroke: var(--grey); }
.mark--connecting .ring--net { stroke-dasharray: 5.3 3.94; } /* the app icon's 7 on, 5.2 off (brand/rings.go), per 100 of path */

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
}
.brand__mark { width: 34px; height: 34px; }
.brand__name { font: 600 1.5rem/1 var(--label); letter-spacing: -0.02em; }
.brand--light { color: #F4F5F7; }
.brand--small .brand__mark { width: 22px; height: 22px; }
.brand--small .brand__name { font-size: 0.95rem; }

/* Light rings wherever the ground is ink or deep teal. */
.deep, .foot, .menu, .appshot__side, .section--teal { --mark-you: #F4F5F7; --mark-net: #3FD0C0; }

/* The mark huge and faint, drawn as two tubes (the app's side-bar art). */
.tubes { position: absolute; pointer-events: none; }
.tubes path { fill: none; }
.tubes .tube { stroke: var(--tube-stroke, rgba(233, 237, 243, 0.09)); stroke-width: 8; }
.tubes .bore { stroke: var(--bore, var(--deep)); stroke-width: 7.1; }

/* ── The bar ── */

.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top__bar { display: flex; align-items: center; gap: 28px; min-height: var(--bar); }
.top__links { display: flex; gap: 4px; margin-left: auto; }
.top__links a, .menu__links a { color: var(--muted); text-decoration: none; font: 500 1.06rem/1 var(--label); }
.top__links a { position: relative; padding: 11px 12px; border-radius: 4px; }
.top__links a:hover { color: var(--text); }
/* The current page: a plain teal bar under its name. */
.top__links a[aria-current="page"] { color: var(--text); font-weight: 600; box-shadow: inset 0 -3px 0 var(--teal); border-radius: 0; }
.top__toggle {
  display: none; margin-left: auto;
  width: 48px; height: 48px; align-items: center; justify-content: center;
  border: 1.5px solid currentColor; border-radius: 4px;
  background: transparent; color: inherit; cursor: pointer;
}
.top__toggle .icon { width: 24px; height: 24px; }

.menu {
  /* A popover: reset its own box, then make it the ink side bar. */
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden auto;
  background: var(--deep); color: var(--deep-text); --bore: var(--deep);
}
.menu:popover-open { display: flex; flex-direction: column; }
.menu::backdrop { background: rgba(15, 27, 45, 0.5); }
.menu__head { position: relative; display: flex; align-items: center; min-height: var(--bar); }
.menu__head .top__toggle { display: inline-flex; color: var(--deep-text); }
.menu__links { position: relative; display: grid; gap: 4px; padding-top: 24px; padding-bottom: 48px; }
.menu__links a { color: var(--deep-text); font: 600 2.1rem/1.1 var(--display); padding: 10px 0 10px 16px; }
.menu__links a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--deep-teal); }
.menu__art { width: 760px; right: -300px; bottom: -260px; }
.menu :focus-visible, .deep :focus-visible, .foot :focus-visible, .section--teal :focus-visible { outline-color: #8AB4FF; }

/* ── Buttons ── */

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px;
  border: 1.5px solid var(--text); border-radius: 4px;
  background: transparent; color: var(--text);
  font: 600 1.06rem/1.1 var(--label); letter-spacing: 0.005em;
  text-decoration: none; cursor: pointer;
}
/* Hover: the arrow steps forward. */
.btn:hover { background: var(--surface); }
.btn:hover .icon { transform: translateX(3px); }
.btn--primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-fill); filter: brightness(1.08); }
.btn--ink { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn--ink:hover { background: var(--text); filter: brightness(1.2); }
.btn--ink[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--teal); }
.btn--light { border-color: currentColor; color: inherit; }
.btn--light:hover { background: rgba(255, 255, 255, 0.08); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* "Play again", under a picture that plays (shown by site.js only when
   motion is allowed). */
.replay {
  display: inline-flex; align-items: center; gap: 6px; justify-self: start;
  min-height: 32px; padding: 4px 12px 4px 8px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--muted); font: 500 0.92rem/1 var(--label); cursor: pointer;
}
.replay:hover { color: var(--text); border-color: var(--muted); }
.replay:hover .icon { transform: rotate(-60deg); }
.replay[hidden] { display: none; }
.replay--light { background: transparent; border-color: var(--deep-line); color: var(--deep-muted); }
.replay--light:hover { color: var(--deep-text); border-color: var(--deep-muted); }

/* ── Bands: the top of every page, over contour lines ── */

.band {
  position: relative; overflow: hidden;
  background: var(--band);
  border-bottom: 1px solid var(--line);
  padding: 76px 0 70px;
}
.contours {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
  fill: none; stroke: var(--contour); stroke-width: 1;
  opacity: 0.6;
  -webkit-mask-image: linear-gradient(to right, transparent 12%, #000 70%);
  mask-image: linear-gradient(to right, transparent 12%, #000 70%);
}
.band__inner { position: relative; display: grid; gap: 18px; justify-items: start; }
.band__inner > * { max-width: 54rem; }
.band__inner .lede { max-width: 44rem; }

.kicker {
  display: flex; align-items: center; gap: 12px;
  font: 500 1rem/1.3 var(--label); letter-spacing: 0.02em; color: var(--muted);
}
.kicker--light { color: var(--deep-muted); }

.lede { font-size: 1.25rem; line-height: 1.5; color: var(--muted); max-width: 40rem; }

/* ── Home: the hero ── */

.band--hero { padding: 60px 0 84px; }
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr); gap: 48px; align-items: center; }
.hero__text { position: relative; z-index: 1; display: grid; gap: 22px; }
.hero__text .actions { margin-top: 8px; }
.h1__quiet { display: block; color: var(--accent-text); }

/* The emblem: the mark at the eye of the contour lines, up and to the right
   of the app window, which overlaps it. */
.hero__visual { --em: clamp(170px, 18vw, 250px); position: relative; padding-top: calc(var(--em) * 0.87); }
.hero__emblem { position: absolute; top: 0; right: 0; width: var(--em); aspect-ratio: 1; }
.hero__mark { position: relative; width: 100%; height: 100%; }
.hero__field {
  position: absolute; left: 50%; top: 50%; width: 280%; height: 280%;
  transform: translate(-50%, -50%); pointer-events: none;
  fill: none; stroke: var(--contour); stroke-width: 1; opacity: 0.6;
  -webkit-mask-image: radial-gradient(closest-side, transparent 16%, #000 30%, #000 var(--ripple), transparent calc(var(--ripple) + 26%));
  mask-image: radial-gradient(closest-side, transparent 16%, #000 30%, #000 var(--ripple), transparent calc(var(--ripple) + 26%));
}
@property --ripple { syntax: "<percentage>"; inherits: false; initial-value: 72%; }

/* The app, small. */
.appshot { position: relative; display: grid; gap: 12px; margin-right: clamp(0px, 2vw, 28px); }
.appshot figcaption { font-size: 0.95rem; color: var(--muted); }
.appshot__window {
  position: relative; display: grid; grid-template-columns: 162px minmax(0, 1fr);
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--dots) 1px, transparent 1.3px);
  background-size: 14px 14px;
  font-size: 0.85rem; line-height: 1.3;
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px rgba(15, 27, 45, 0.45);
}
.appshot__side {
  position: relative; overflow: hidden; display: grid; align-content: start; gap: 2px;
  padding: 22px 8px 18px; background: var(--side); color: #E9EDF3; --bore: var(--side);
}
.appshot__side .brand { padding: 0 6px 14px; }
.appshot__art { width: 340px; left: -150px; bottom: -130px; }
.appshot__nav { position: relative; padding: 6px 8px; border-radius: 4px; color: #A9B4C4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appshot__nav.is-current { color: #E9EDF3; font-weight: 600; background: rgba(63, 208, 192, 0.10); box-shadow: inset 3px 0 0 #3FD0C0; }
.appshot__main { min-width: 0; }
.appshot__band { position: relative; overflow: hidden; display: grid; gap: 4px; padding: 22px 18px 16px; background: var(--band); border-bottom: 1px solid var(--line); }
.appshot__band .contours { opacity: 0.45; }
.appshot__eyebrow { position: relative; font: 500 0.8rem/1 var(--label); color: var(--muted); letter-spacing: 0.03em; }
.appshot__title { position: relative; font: 600 1.16rem/1.15 var(--label); letter-spacing: -0.01em; }
.appshot__rows { list-style: none; padding: 4px 16px 14px; }
.appshot__rows li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.appshot__rows li:last-child { border-bottom: 0; }
.appshot__rows b { display: block; font: 600 1rem/1.15 var(--label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appshot__rows small { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.appshot__rows .is-off b { color: var(--muted); }
.appshot__glyph { width: 30px; height: 30px; }

/* Words stacked in one place; only the last shows unless motion swaps them. */
.swap { display: inline-grid; }
.swap > * { grid-area: 1 / 1; }
.swap__a, .swap__b { visibility: hidden; }

/* A switch whose thumb is a ring, as in the app (illustration only). */
.switch {
  position: relative; display: inline-block; flex: none; width: 40px; height: 22px;
  border: 1.5px solid var(--muted); border-radius: 999px; background: var(--surface);
}
.switch__thumb {
  position: absolute; top: 3.5px; left: 4px; width: 12px; height: 12px;
  border: 2.5px solid var(--muted); border-radius: 50%;
}
.switch.is-on { border-color: var(--teal); background: var(--teal); }
.switch.is-on .switch__thumb { transform: translateX(17px); border-color: var(--surface); background: var(--surface); }

/* ── Sections ── */

.section { position: relative; padding: 104px 0; }
.section--band { background: var(--band); }
.section--tight { padding: 56px 0 88px; }
.section:not(.section--band):not(.deep):not(.section--teal) + .section--tight { padding-top: 0; }
.section__head { position: relative; display: grid; gap: 16px; max-width: 48rem; margin-bottom: 52px; }
.split > .section__head { margin-bottom: 0; }

/* Rings: the mark as two tubes, huge and faint, behind the heading. */
.section--rings { overflow: hidden; --tube-stroke: var(--tube); --bore: var(--bg); }
.rings__art { width: 760px; left: -330px; top: 50%; transform: translateY(-50%); }
.section--rings > .wrap { position: relative; }

/* Teal: a network's colour, deepened, for the platforms. */
.section--teal { overflow: hidden; background: var(--tealband); color: var(--tealband-text); }
.section--teal h2 { color: #FFFFFF; }
.section--teal .lede { color: var(--tealband-muted); }
.section--teal .contours { stroke: #3FD0C0; opacity: 0.25; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 32px 64px; align-items: start; }
.prose { display: grid; gap: 1em; max-width: 64ch; }
.prose h2 { font-size: 1.8rem; margin-top: 1.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.3rem; margin-top: 0.6em; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: 0.4em; }
.prose li::marker { color: var(--accent-text); }

/* Points under a picture: hairline columns, each headed by a stub of lane
   marking. No boxes. */
.points {
  list-style: none; padding: 0; margin-top: 64px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 8px 44px;
  border-top: 1px solid var(--line);
}
.points li { display: grid; gap: 10px; align-content: start; padding-top: 26px; }
.points p { color: var(--muted); }
.section__head + .points { margin-top: 0; }
.points--light { border-top-color: var(--deep-line); }
.points--light p { color: var(--deep-text); }
.points--light h3 { color: #FFFFFF; }

/* ── Home: the lanes ── */

/* The caption is first in the source; it sits under the picture, beside
   "Play again". */
.lanes { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 32px; align-items: center; }
.lanes > svg { grid-column: 1 / -1; grid-row: 1; }
.lanes > figcaption { grid-column: 1; grid-row: 2; }
.lanes > .replay { grid-column: 2; grid-row: 2; }
.lanes > svg { display: block; width: 100%; height: auto; }
.lanes .lanes__tall { display: none; }
.lanes figcaption { max-width: 64ch; color: var(--muted); }
.lanes__pc { fill: none; stroke: var(--text); stroke-width: 3; stroke-linecap: round; }
.lanes__tube { fill: none; stroke: var(--teal); stroke-width: 15; stroke-linecap: round; }
.lanes__bore { fill: none; stroke: var(--bg); stroke-width: 8; }
/* Each lane's centre line: its packets, resting. */
.lanes__flow { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1.4 4.6; }
.lanes__net { fill: none; stroke: var(--teal); stroke-width: 8; }
.lanes__road { fill: none; stroke: var(--grey); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0.5 9; }
.lanes__name, .lanes__you { font: 600 23px var(--label); fill: var(--text); }
.lanes__note { font: 500 20px var(--label); fill: var(--muted); }
.lanes__name, .lanes__you, .lanes__note { paint-order: stroke; stroke: var(--bg); stroke-width: 9px; stroke-linejoin: round; }
.lanes__tall .lanes__name { font-size: 19px; }
.lanes__tall .lanes__you { font-size: 20px; }
.lanes__tall .lanes__note { font-size: 17px; }

/* ── Ink sections ── */

.deep { overflow: hidden; background: var(--deep); color: var(--deep-text); --bore: var(--deep); }
.deep h2, .deep h3 { color: #FFFFFF; }
.deep strong { color: #FFFFFF; }
.deep a { color: var(--deep-teal); }
.deep > .wrap { position: relative; }
.deep__art { width: 1100px; right: -380px; top: -330px; }
.contours--deep { stroke: #3FD0C0; opacity: 0.16; }
.pq { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px 72px; align-items: center; }
.pq__text { display: grid; gap: 20px; }
.pq__text p { color: var(--deep-text); max-width: 62ch; }
.link-light { display: inline-flex; align-items: center; gap: 8px; font: 600 1.1rem/1.2 var(--label); }
.link-light .icon { transition: transform 0.2s var(--ease-out); }
.link-light:hover .icon { transform: translateX(4px); }

/* The key exchange: two methods down their own wires into the two rings. */
.kx { display: grid; gap: 14px; justify-items: center; width: 100%; max-width: 440px; justify-self: center; }
.kx__sources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: 100%; overflow-wrap: anywhere; }
.kx__src { display: grid; gap: 2px; font: 500 0.95rem/1.25 var(--label); color: var(--deep-muted); }
.kx__src b { font: 600 1.35rem/1.1 var(--label); letter-spacing: -0.01em; }
.kx__src--you b { color: #F4F5F7; }
.kx__src--net { text-align: right; }
.kx__src--net b { color: var(--deep-teal); }
.kx__art { position: relative; width: 100%; aspect-ratio: 2 / 1; margin-top: -4px; }
.kx__wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.kx__wire { fill: none; stroke-width: 2.5; stroke-dasharray: 2 6; stroke-linecap: round; }
.kx__wire--you { stroke: rgba(244, 245, 247, 0.55); }
.kx__wire--net { stroke: rgba(63, 208, 192, 0.7); }
.kx__pulse { fill: none; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 14 100; stroke-dashoffset: -100; }
.kx__pulse--you { stroke: #F4F5F7; }
.kx__pulse--net { stroke: #3FD0C0; }
/* The mark: 40% of the art's width, centred, sitting on its foot, so the
   wires meet each ring at its outer side (x 124 and 276 of 400). */
.kx__mark { position: absolute; left: 30%; bottom: 0; width: 40%; height: 80%; }
.kx__out { display: grid; gap: 4px; text-align: center; max-width: 30ch; color: var(--deep-muted); }
.kx__out b { font: 600 1.45rem/1.15 var(--display); color: #FFFFFF; text-wrap: balance; }
.kx__clock { display: grid; gap: 8px; justify-items: center; width: 100%; padding-top: 18px; border-top: 1px solid var(--deep-line); text-align: center; }
.kx__clock p { font-size: 0.95rem; color: var(--deep-muted); }
/* Keys as short bars: the used ones grey, the newest bright. */
.kx__keys { list-style: none; padding: 0; display: flex; gap: 8px; width: min(100%, 230px); }
.kx__keys li { flex: 1 1 0; min-width: 0; height: 5px; background: rgba(233, 237, 243, 0.22); }
.kx__keys li:last-child { background: #3FD0C0; }

.facts { display: flex; flex-wrap: wrap; gap: 16px 56px; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line); }
.facts dt { font: 500 0.95rem/1.3 var(--label); color: var(--muted); letter-spacing: 0.02em; }
.facts dd { margin: 4px 0 0; font: 600 1.4rem/1.2 var(--display); }
.facts--light { position: relative; border-top-color: var(--deep-line); }
.facts--light dt { color: var(--deep-muted); }

/* ── Stations on a line (platforms) ── */

.stations {
  position: relative; list-style: none; padding: 0; margin: 8px 0 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 24px;
}
/* The line between stops: one dashed segment from each stop to the next. */
.stations li:not(:last-child)::after {
  content: ""; position: absolute; left: 44px; right: -10px; top: 11px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--grey) 0 10px, transparent 10px 16px);
  transform-origin: left;
}
.stations li { position: relative; display: grid; justify-items: start; gap: 4px; padding-left: 6px; }
.stations__dot {
  margin-bottom: 10px;
  width: 24px; height: 24px; border-radius: 50%;
  border: 3px solid var(--muted); background: var(--band);
}
.stations .is-now .stations__dot { border-color: var(--accent-fill); background: var(--accent-fill); box-shadow: 0 0 0 4px var(--band), 0 0 0 6px var(--teal); }
.stations b { font: 600 1.55rem/1 var(--display); }
.stations li > span:last-child { color: var(--muted); font-size: 0.95rem; }
.section--teal .stations li:not(:last-child)::after { background: repeating-linear-gradient(90deg, var(--tealband-muted) 0 10px, transparent 10px 16px); }
.section--teal .stations__dot { border-color: var(--tealband-muted); background: var(--tealband); }
.section--teal .stations .is-now .stations__dot { border-color: #3FD0C0; background: #3FD0C0; box-shadow: 0 0 0 4px var(--tealband), 0 0 0 6px #3FD0C0; }
.section--teal .stations b { color: #FFFFFF; }
.section--teal .stations li > span:last-child { color: var(--tealband-muted); }

/* ── Tickets ── */

.ticket {
  position: relative; padding: 36px 36px 32px;
  background: var(--surface); border: 1px solid var(--line);
}
.ticket h2 { font-size: clamp(1.65rem, 1.3rem + 1vw, 2.2rem); }
.talk { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.talk > div { display: grid; gap: 10px; max-width: 46rem; }
.talk__mark { width: 64px; height: 64px; flex: none; }
.talk:hover .talk__mark .ring--net, .talk:focus-within .talk__mark .ring--net { stroke-dasharray: none; }
.talk > .talk__lead { display: flex; align-items: center; gap: 24px; max-width: 52rem; }
.talk__lead > div { display: grid; gap: 10px; }
.talk p { color: var(--muted); }

/* ── Pricing ── */

.plans {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; align-items: stretch;
}
.plan {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 30px 24px 24px; background: var(--surface); border: 1px solid var(--line);
}
.plan--team { border-color: var(--accent-fill); box-shadow: inset 0 0 0 1px var(--accent-fill); }
.plan__name { font-size: 2rem; }
.plan__who { color: var(--muted); min-height: 3.2em; }
.plan__price { display: flex; flex-wrap: wrap; align-items: baseline; align-content: flex-end; gap: 2px 10px; min-height: 5.6rem; }
.plan__amount { font: 600 3.4rem/1 var(--display); letter-spacing: -0.03em; }
.plan--enterprise .plan__amount { font-size: 2.15rem; letter-spacing: -0.015em; }
.plan__unit { font: 500 1rem/1.25 var(--label); color: var(--muted); }
.plan__note { font: 500 0.95rem/1.35 var(--label); color: var(--text); padding: 8px 10px; background: var(--band); border-left: 3px solid var(--teal); }
.plan__features { list-style: none; padding: 16px 0 0; margin-top: 2px; border-top: 1px solid var(--line); display: grid; gap: 10px; align-content: start; flex: 1; }
.plan__features li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; line-height: 1.4; }
.plan__features .icon { width: 20px; height: 20px; color: var(--accent-text); margin-top: 1px; }
.plan__features .is-dev .icon { color: var(--muted); }
.tag {
  display: block; width: fit-content; margin-top: 4px; padding: 1px 8px; white-space: nowrap;
  font: 500 0.8rem/1.35 var(--label); color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; vertical-align: 1px;
}
.plan__cta { margin-top: 10px; width: 100%; }
.plans__vat { margin-top: 28px; color: var(--muted); max-width: 64ch; }
.terms { margin-top: 88px; display: grid; gap: 24px; }
.terms__title { font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.3rem); }
.terms .ledger { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); column-gap: 48px; }
.terms .ledger h3 { font-size: 1.2rem; }
/* A connection, drawn as the mark: one per person-or-service on a device. */
.conn { list-style: none; padding: 0; display: grid; gap: 14px; }
.conn li { display: flex; align-items: center; gap: 18px; font-size: 1.12rem; }
.conn__marks { display: inline-flex; gap: 6px; flex: none; min-width: 96px; }
.conn__mark { width: 44px; height: 44px; }

/* ── Rows: hairlines between, no boxes (security, how it works) ── */

.rows { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.rows > li {
  position: relative;
  display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1.6fr); gap: 12px 40px;
  padding: 38px 0; border-bottom: 1px solid var(--line);
}
/* Each icon is a station; a dashed line runs down through them. */
.rows > li::before {
  content: ""; position: absolute; left: 29px; top: 0; bottom: 0; width: 2px;
  background: repeating-linear-gradient(180deg, var(--grey) 0 10px, transparent 10px 16px);
}
.rows > li:first-child::before { top: 38px; }
.rows > li:last-child::before { bottom: auto; height: 38px; }
.rows__glyph { position: relative; width: 60px; height: 60px; padding: 13px; border: 3px solid var(--mark-net); border-radius: 50%; background: var(--bg); }
.rows__glyph.icon { color: var(--text); }
.rows > li:nth-child(odd) .rows__glyph { border-color: var(--mark-you); }
.rows > li:hover .rows__glyph { color: var(--accent-text); }
.rows h3 { font-size: 1.6rem; }
.rows__body { display: grid; gap: 14px; max-width: 64ch; }
.rows__body p { color: var(--text); }

/* Details: technical facts, out of the way until asked for (the app's .more). */
.more summary {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  min-height: 32px; font: 600 1rem/1.4 var(--label); color: var(--accent-text); letter-spacing: 0.01em;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::before {
  content: ""; width: 7px; height: 7px; margin-right: 2px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}
.more[open] summary::before { transform: rotate(45deg); }
.more summary:hover { text-decoration: underline; }
.more__body { display: grid; gap: 10px; padding: 10px 0 0 16px; margin-top: 6px; border-left: 3px solid var(--teal); }
.more__body p, .more__body li { color: var(--muted); }
.more__body { overflow-wrap: anywhere; }
.more__body ul { padding-left: 1.2em; display: grid; gap: 6px; }
.tech { display: grid; gap: 6px; }
.tech div { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.tech dt { min-width: 11em; color: var(--muted); }
.tech dd { margin: 0; font-weight: 600; }

/* ── How it works: the journey, stations down a line ── */

.journey { list-style: none; padding: 0; counter-reset: step; display: grid; max-width: 56rem; }
.journey > li {
  position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 28px;
  padding-bottom: 44px; counter-increment: step;
}
.journey > li::before {
  content: counter(step);
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  border: 6px solid var(--teal); background: var(--bg);
  font: 600 1.45rem/1 var(--display); color: var(--text);
  position: relative; z-index: 1;
}
.journey > li:nth-child(1)::before { border-color: var(--mark-you); }
/* The line the stations sit on. */
.journey > li::after {
  content: ""; position: absolute; left: 27px; top: 56px; bottom: 0; width: 2px;
  background: repeating-linear-gradient(180deg, var(--grey) 0 10px, transparent 10px 16px);
  transform-origin: top;
}
.journey > li:last-child::after { display: none; }
.journey > li:last-child { padding-bottom: 0; }
.journey__body { display: grid; gap: 10px; padding-top: 10px; max-width: 62ch; }
.journey__body p { color: var(--muted); }
/* Wide screens: the four steps run across, as stations on a line. */
@media (min-width: 1000px) {
  .journey { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 36px; max-width: none; }
  .journey > li { grid-template-columns: minmax(0, 1fr); gap: 18px 0; padding-bottom: 0; }
  .journey > li::after { left: 64px; right: -28px; top: 27px; bottom: auto; width: auto; height: 2px;
    background: repeating-linear-gradient(90deg, var(--grey) 0 10px, transparent 10px 16px); transform-origin: left; }
  .journey__body { padding-top: 0; }
}

.qa { display: grid; border-top: 1px solid var(--line); max-width: 60rem; }
.qa details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.qa summary { font: 600 1.32rem/1.3 var(--display); color: var(--text); letter-spacing: -0.01em; }
.qa summary::before { border-color: var(--accent-text); }
.qa .more__body p { color: var(--text); }

/* ── Status list (security: where we are; download: platforms) ── */

.status { list-style: none; padding: 0; border-top: 1px solid var(--line); display: grid; }
.status li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 4px 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.status .shape { margin-top: 6px; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--muted); }
.status .is-done .shape { border-color: var(--teal); background: var(--teal); }
.status .is-next .shape { border-color: var(--muted); }
.status b { font: 600 1.28rem/1.25 var(--display); }
.status p { grid-column: 2; color: var(--muted); }
.status__tag { font: 500 0.92rem/1.3 var(--label); color: var(--muted); margin-left: 8px; }

/* ── Contact ── */

.mailto {
  display: inline-flex; align-items: center; gap: 12px;
  font: 600 clamp(1.4rem, 1rem + 2vw, 2.2rem)/1.15 var(--label);
  color: var(--text); text-decoration: none; overflow-wrap: anywhere;
  border-bottom: 3px solid var(--teal); padding-bottom: 4px;
}
.mailto:hover { color: var(--accent-text); }
.mailto .icon { width: 0.9em; height: 0.9em; color: var(--accent-text); }
.mailto:hover .icon { transform: translateX(5px); }
.note { padding: 12px 16px; border-left: 3px solid var(--line); background: var(--surface); color: var(--muted); max-width: 64ch; }
.contact { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px 72px; align-items: start; }
.contact__main { display: grid; gap: 22px; }
.booking { display: grid; gap: 14px; }
.booking__slot[hidden] { display: none; }
.fine { font-size: 0.92rem; color: var(--muted); }

/* ── 404 ── */

.lost { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px 48px; align-items: center; }
.lost__mark { width: clamp(120px, 22vw, 220px); height: auto; }

/* ── Footer: ink, the rings huge and faint ── */

.foot { position: relative; overflow: hidden; padding: 72px 0 32px; background: var(--deep); color: var(--deep-text); --bore: var(--deep); }
.foot__art { width: 760px; left: -280px; bottom: -330px; }
.foot .wrap { position: relative; }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.foot__intro { display: grid; gap: 14px; align-content: start; max-width: 30rem; }
.foot__intro p { color: var(--deep-muted); }
.foot__intro .brand { color: #F4F5F7; }
.foot a { color: var(--deep-text); }
.foot__email { font-weight: 600; }
.foot__heading { font: 500 1rem/1.3 var(--label); color: var(--deep-muted); letter-spacing: 0.03em; margin-bottom: 12px; }
.foot__col ul { list-style: none; padding: 0; display: grid; gap: 4px; }
.foot__col a { display: inline-block; padding: 6px 0; text-decoration: none; }
.foot__col a:hover { text-decoration: underline; text-decoration-color: #3FD0C0; text-decoration-thickness: 2px; }
.foot__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--deep-line); font-size: 0.92rem; color: var(--deep-muted); }

/* A ledger: hairline rows beside a heading. */
.ledger { list-style: none; padding: 0; border-top: 1px solid var(--line); display: grid; }
.ledger li { display: grid; gap: 6px; align-content: start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.ledger p { color: var(--muted); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Motion ──────────────────────────────────────────────────────────────
   All of it is here, and all of it only with no preference for reduced
   motion. Each piece plays once and is done in under five seconds (WCAG
   2.2.2 needs no pause control then), moves only transform, opacity and
   strokes (nothing reflows), and never hides text for longer than a moment.

   On load (CSS alone):
     every page   the contour lines spread out from their eye      1.8 s
     home         the rings draw in and interlock                  0.4-1.5 s
     home         the app window rises                             0.6-1.3 s
     home         Riverside connects, then Northgate               1.4-3.1 s
   When scrolled into view (site.js adds .is-inview):
     .lanes       packets down each lane, the rest along the road  4.8 s
     .kx          both methods arrive, the rings lock, keys roll   4.4 s
     .stations    the line runs from stop to stop                  1.4 s
     .journey     the same, down or across the steps               1.4 s
     .reveal      blocks rise into place, a little staggered       0.6 s
   Hover: arrows step on. */

@media (prefers-reduced-motion: no-preference) {
  .btn .icon, .mailto .icon, .rows__glyph, .replay .icon { transition: transform 0.25s var(--ease-out), color 0.2s; }

  /* The contour lines spread out from their eye. */
  .band > .contours, .hero__field { animation: spread 1.8s 0.1s var(--ease-out) both; }
  .band > .contours {
    -webkit-mask-image: linear-gradient(to right, transparent 12%, #000 70%), radial-gradient(circle at 77% 50%, #000 var(--ripple), transparent calc(var(--ripple) + 20%));
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 12%, #000 70%), radial-gradient(circle at 77% 50%, #000 var(--ripple), transparent calc(var(--ripple) + 20%));
    mask-composite: intersect;
  }
  @keyframes spread { from { --ripple: 0%; } to { --ripple: 72%; } }

  /* Home: the rings draw in from their outer sides and meet at the
     crossings, each arriving where it lies on top. */
  .hero__mark .ring { animation: draw 1.1s var(--ease-draw) both; }
  .hero__mark .ring--you { animation-delay: 0.35s; }
  .hero__mark .ring--net { animation-delay: 0.5s; }
  .hero__mark { animation: settle 0.5s 1.45s var(--ease-out) both; }
  @keyframes draw {
    from { stroke-dasharray: 100 100; stroke-dashoffset: 100; stroke-opacity: 0; }
    2% { stroke-opacity: 1; }
    99.9% { stroke-dasharray: 100 100; stroke-dashoffset: 0; }
    to { stroke-dasharray: none; }
  }
  @keyframes settle { from, to { transform: none; } 50% { transform: scale(1.035); } }

  /* The app window rises, and two networks connect in the logo's states:
     off (grey) until --at, connecting (teal ring dashed) for a second, then
     connected (full colour). */
  .appshot { animation: rise 0.7s 0.6s var(--ease-out) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  .appshot__row--1 { --at: 1.4s; }
  .appshot__row--2 { --at: 2.1s; }
  .appshot__row .ring--you { animation: glyph-you 1s var(--at) linear both; }
  .appshot__row .ring--net { animation: glyph-net 1s var(--at) linear both; }
  .appshot__row .switch { animation: switch-off var(--at) step-end; }
  .appshot__row .switch__thumb { animation: thumb-off var(--at) step-end; }
  @keyframes glyph-you { 0% { stroke: var(--grey); } 1%, 100% { stroke: var(--mark-you); } }
  @keyframes glyph-net {
    0% { stroke: var(--grey); stroke-dasharray: none; }
    1% { stroke: var(--mark-net); stroke-dasharray: 5.3 3.94; stroke-dashoffset: 0; }
    99% { stroke: var(--mark-net); stroke-dasharray: 5.3 3.94; stroke-dashoffset: -27.75; }
    100% { stroke: var(--mark-net); stroke-dasharray: none; stroke-dashoffset: 0; }
  }
  /* The switch is off until --at, then simply its own (on) style. */
  @keyframes switch-off { from, to { border-color: var(--muted); background: var(--surface); } }
  @keyframes thumb-off { from, to { transform: none; border-color: var(--muted); background: transparent; } }
  /* The words: each shows for its own stretch of time. */
  .appshot__row .swap__a { animation: shown var(--at) linear; }
  .appshot__row .swap__b { animation: shown 1s var(--at) linear; }
  .appshot__row .swap__end { animation: unshown calc(var(--at) + 1s) linear; }
  .appshot__title .swap__a { animation: shown 2.4s linear; }
  .appshot__title .swap__b { animation: shown 0.7s 2.4s linear; }
  .appshot__title .swap__end { animation: unshown 3.1s linear; }
  @keyframes shown { from, to { visibility: visible; } }
  @keyframes unshown { from, to { visibility: hidden; } }

  /* The lanes: packets run down each network's own lane, three times, while
     the rest drifts off along the road; each network lights as they land. */
  .lanes.is-inview .lanes__flow { animation: flow 1.6s linear 3; }
  .lanes.is-inview .lanes__road { animation: road 1.6s linear 3; }
  .lanes.is-inview .lanes__net { animation: land 0.6s 0.9s var(--ease-out); }
  @keyframes flow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -30; } }
  @keyframes road { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -38; } }
  @keyframes land { from, to { stroke-width: 8; } 40% { stroke-width: 12; } }

  /* The key exchange: a pulse down each wire, the rings lock, then a new
     key every beat with the used ones greying out. */
  .kx.is-inview .kx__pulse { animation: pulse 0.9s 0.2s cubic-bezier(0.5, 0, 0.8, 1) both; }
  .kx.is-inview .kx__mark .ring { animation: draw 0.9s 0.95s var(--ease-draw) both; }
  .kx.is-inview .kx__keys li { animation: key 0.38s calc(1.9s + var(--k) * 0.38s) linear both; }
  .kx.is-inview .kx__keys li:last-child { animation-name: key-last; }
  .kx__keys li:nth-child(1) { --k: 0; }
  .kx__keys li:nth-child(2) { --k: 1; }
  .kx__keys li:nth-child(3) { --k: 2; }
  .kx__keys li:nth-child(4) { --k: 3; }
  .kx__keys li:nth-child(5) { --k: 4; }
  .kx__keys li:nth-child(6) { --k: 5; }
  @keyframes pulse { from { stroke-dashoffset: 14; } to { stroke-dashoffset: -100; } }
  @keyframes key {
    0% { opacity: 0; transform: translateY(-8px); background: #3FD0C0; }
    30%, 99% { opacity: 1; transform: none; background: #3FD0C0; }
    100% { opacity: 1; transform: none; background: rgba(233, 237, 243, 0.22); }
  }
  @keyframes key-last { 0% { opacity: 0; transform: translateY(-8px); } 30%, 100% { opacity: 1; transform: none; } }

  /* Stations: the line runs from stop to stop. */
  .stations.is-inview li:not(:last-child)::after,
  .journey.is-inview > li::after { animation: line 0.5s calc(var(--s, 0) * 0.22s + 0.15s) var(--ease-out) both; }
  .stations li:nth-child(2), .journey > li:nth-child(2) { --s: 1; }
  .stations li:nth-child(3), .journey > li:nth-child(3) { --s: 2; }
  .stations li:nth-child(4), .journey > li:nth-child(4) { --s: 3; }
  .stations li:nth-child(5) { --s: 4; }
  .journey.is-inview > li::after { animation-name: line-down; }
  @keyframes line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes line-down { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @media (min-width: 1000px) { .journey.is-inview > li::after { animation-name: line; } }

  /* Blocks below the first screen rise into place (site.js marks them). */
  .reveal { transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
  .reveal.is-pending { opacity: 0; transform: translateY(18px); }
  .reveal:nth-child(2) { transition-delay: 0.07s; }
  .reveal:nth-child(3) { transition-delay: 0.14s; }
  .reveal:nth-child(4) { transition-delay: 0.21s; }
  .reveal:nth-child(5) { transition-delay: 0.28s; }
}

/* ── Narrower ── */

@media (max-width: 1100px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan__who { min-height: 0; }
}

@media (max-width: 1080px) {
  .pq { grid-template-columns: minmax(0, 1fr); }
  .kx { justify-self: start; }
}

@media (max-width: 880px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero__visual { max-width: 620px; }
}

@media (max-height: 600px) and (min-width: 881px) {
  .band--hero { padding: 40px 0 56px; }
  .band--hero h1 { font-size: clamp(2.2rem, 1.2rem + 2.6vw, 3.3rem); }
  .hero__text { gap: 16px; }
}

@media (max-width: 900px) {
  .top__links { display: none; }
  .top__cta { margin-left: auto; }
  .top__toggle { display: inline-flex; margin-left: 0; }
  .rows > li { grid-template-columns: 56px minmax(0, 1fr); }
  .rows__body { grid-column: 2; }
  .rows__glyph { width: 48px; height: 48px; padding: 10px; }
  .rows > li::before { left: 23px; }
  .foot__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot__intro { grid-column: 1 / -1; }
  .contact { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  :root { --gutter: 24px; }
  .section { padding: 76px 0; }
  .band { padding: 52px 0 50px; }
  .band--hero { padding: 44px 0 64px; }
  .contours { opacity: 0.38; }
  .lanes .lanes__wide { display: none; }
  .lanes .lanes__tall { display: block; max-width: 420px; }
  .lanes { grid-template-columns: minmax(0, 1fr); }
  .lanes > .replay { grid-column: 1; grid-row: 3; }
  .stations { display: flex; flex-direction: column; gap: 22px; }
  .stations li { grid-template-columns: 24px auto; gap: 0 14px; align-items: center; }
  .stations li:not(:last-child)::after { left: 11px; right: auto; top: 30px; bottom: -16px; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--grey) 0 10px, transparent 10px 16px); transform-origin: top; }
  .section--teal .stations li:not(:last-child)::after { background: repeating-linear-gradient(180deg, var(--tealband-muted) 0 10px, transparent 10px 16px); }
  .stations.is-inview li:not(:last-child)::after { animation-name: line-down; }
  .stations__dot { grid-row: span 2; align-self: start; margin-bottom: 0; }
  .ticket { padding: 32px 22px 26px; }
  .plans { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  :root { --gutter: 16px; --bar: 60px; }
  body { font-size: 1rem; }
  .top__cta { display: none; }
  .top__toggle { margin-left: auto; }
  .brand__mark { width: 30px; height: 30px; }
  .brand__name { font-size: 1.32rem; }
  .lede { font-size: 1.12rem; }
  .hero__visual { --em: 150px; }
  .appshot { margin-right: 0; }
  .appshot__window { grid-template-columns: minmax(0, 1fr); }
  .appshot__side { display: none; }
  .rows > li { grid-template-columns: minmax(0, 1fr); padding: 28px 0; }
  .rows > li::before { display: none; }
  .rows__body { grid-column: 1; }
  .journey > li { grid-template-columns: 44px minmax(0, 1fr); gap: 0 18px; }
  .journey > li::before { width: 44px; height: 44px; border-width: 5px; font-size: 1.2rem; }
  .journey > li::after { left: 21px; top: 44px; }
  .lost { grid-template-columns: minmax(0, 1fr); }
  .actions .btn { flex: 1 1 auto; }
  .plan__amount { font-size: 3rem; }
}

/* A phone zoomed to 200% (under 360 px of page): the app's rows wrap names
   rather than cutting them. */
@media (max-width: 300px) {
  h1 { font-size: 2.05rem; overflow-wrap: anywhere; hyphens: auto; }
  .kx__sources { grid-template-columns: minmax(0, 1fr); }
  .kx__src--net { text-align: left; }
  .foot__grid { grid-template-columns: minmax(0, 1fr); }
  .tech dt { min-width: 0; }
  code, .foot__email, .mailto { overflow-wrap: anywhere; word-break: break-word; }
  .top__bar .brand__name { font-size: 1.05rem; }
  .top__bar { gap: 8px; }
  .top__toggle { width: 44px; height: 44px; }
  .appshot__rows .switch { display: none; }
  .appshot__rows li { grid-template-columns: 22px minmax(0, 1fr); }
  .hero__visual { --em: 110px; }
  .kx__src b { font-size: 1.1rem; }
  .plan { padding: 26px 16px 18px; }
  .plan__amount { font-size: 2.4rem; }
  .tag { white-space: normal; }
}
@media (max-width: 360px) {
  .appshot__rows { padding: 4px 10px 10px; }
  .appshot__rows li { grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; }
  .appshot__glyph { width: 22px; height: 22px; }
  .appshot__rows b { white-space: normal; overflow-wrap: anywhere; }
  .appshot__title { font-size: 1.1rem; }
}

/* ── Windows high contrast: the system's colours, shapes kept, decoration dropped ── */

@media (forced-colors: active) {
  .contours, .tubes, .hero__field, .kx__pulse { display: none; }
  .ring, .ring--you, .ring--net, .lanes__tube, .lanes__net, .lanes__pc, .lanes__flow, .kx__wire { stroke: CanvasText; }
  .mark--off .ring, .is-off .ring { stroke: GrayText; }
  .lanes__bore { stroke: Canvas; }
  .lanes__road { stroke: CanvasText; }
  .lanes__name, .lanes__you, .lanes__note { fill: CanvasText; }
  .switch, .switch__thumb, .stations__dot, .status .shape { border-color: CanvasText; }
  .switch.is-on, .stations .is-now .stations__dot, .status .is-done .shape { background: CanvasText; }
  .rows__glyph { border-color: CanvasText; }
  .rows > li::before { background: GrayText; }
  .kx__keys li { background: GrayText; }
  .kx__keys li:last-child { background: CanvasText; }
  .journey > li::before { border-color: CanvasText; }
  .top__links a[aria-current="page"], .menu__links a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; }
  .ticket, .plan { border: 2px solid CanvasText; }
  .tag { border-color: CanvasText; }
  .appshot__window { box-shadow: none; }
}

@media print {
  .top, .foot, .contours, .tubes, .skip, .replay, .hero__emblem { display: none; }
  body { background: #fff; color: #000; }
  .band, .deep, .section--band, .section--teal { background: none; color: #000; }
  .reveal.is-pending { opacity: 1; transform: none; }
}
