/* PalGeo public site. Tokens mirror DESIGN.md; do not add hues here. */
/* Zain (SIL OFL, see fonts/Zain-OFL.txt). It ships 400, 700 and 800: the
   ranges below send the 500s to Regular and the 600s to Bold, so no weight in
   this sheet is synthesised by the browser. */
@font-face { font-family: "Zain"; font-weight: 400 500; font-display: swap; src: url(fonts/zain-Regular.woff2) format("woff2"); }
@font-face { font-family: "Zain"; font-weight: 600 700; font-display: swap; src: url(fonts/zain-Bold.woff2) format("woff2"); }
@font-face { font-family: "Zain"; font-weight: 800; font-display: swap; src: url(fonts/zain-ExtraBold.woff2) format("woff2"); }

:root {
  --abyss: #020F1F; --shelf: #091A2D; --shoal: #12263D; --shoal-2: #23374D;
  --waterline: rgba(68, 201, 240, .24); --hair: rgba(186, 201, 219, .12);
  --text: #F1F6FA; --text-2: #BAC9DB; --text-3: #95A7BB;
  --accent: #44C9F0; --accent-press: #29AED4; --on-accent: #020F1F; --accent-subtle: rgba(68, 201, 240, .16);
  --settled: #5CF2FF; --unsettled: #C77DFF; --selected: #FFB020;
  --danger: #FF6B6B; --success: #4CE49A;
  --r-s: 6px; --r-m: 10px; --r-l: 14px;
  --gutter: clamp(16px, 4vw, 48px);
  --head: 60px;
  --ease: cubic-bezier(.22, 1, .36, 1);          /* entrances */
  --move: cubic-bezier(.25, 1, .5, 1);           /* things travelling on screen */
  --lift: 0 2px 4px rgba(2, 15, 31, .85), 0 6px 26px rgba(2, 15, 31, .8);
  /* roles that differ between the two themes */
  --btn: var(--accent); --btn-hover: #6BD6F4; --btn-press: var(--accent-press); --on-btn: #020F1F;
  --head-bg: rgba(9, 26, 45, .93); --pill: #E6EAEE; --on-pill: #020F1F; --field: #12263D;
  --pop: var(--lift); --drop: 0 40px 80px -30px rgba(0, 0, 0, .9);
  /* chart series (seo/kit.mjs) */
  --h1: #44C9F0; --h2: #FFB020; --h3: #C77DFF; --h4: #4CE49A; --h5: #FF6B6B; --h6: #5CF2FF; --h7: #F28BD0; --h8: #B8C16A; --h9: #8FA8FF; --h10: #E08A4C;
  color-scheme: dark;
}
/* Light theme: set by the head script (stored choice, else the system setting).
   --accent becomes the link blue, which also carries rings, borders and small
   fills; the primary button keeps the brand cyan through --btn. */
:root[data-theme="light"] {
  --abyss: #E6EAEE; --shelf: #FFFFFF; --shoal: #F3F5F7; --shoal-2: #C4CDD7;
  --waterline: #C4CDD7; --hair: rgba(2, 15, 31, .12);
  --text: #020F1F; --text-2: #43536A; --text-3: #51627A;
  --accent: #0B6E92; --accent-press: #095A78; --on-accent: #FFFFFF; --accent-subtle: rgba(11, 110, 146, .12);
  --danger: #B3261E; --success: #0B6B45;
  --btn: #44C9F0; --btn-hover: #6BD6F4; --btn-press: #29AED4;
  --head-bg: rgba(255, 255, 255, .94); --pill: #020F1F; --on-pill: #FFFFFF; --field: #FFFFFF;
  --lift: none; --pop: 0 8px 24px rgba(2, 15, 31, .16); --drop: 0 28px 56px -28px rgba(2, 15, 31, .45);
  --h1: #0B6E92; --h2: #B26A00; --h3: #7B3FD1; --h4: #0B7A4B; --h5: #C2362F; --h6: #0E8FA6; --h7: #B8358F; --h8: #6B7420; --h9: #3F5BD9; --h10: #A6541C;
  color-scheme: light;
}
/* The scroll scene is imagery with text over it: it keeps the dark values in
   both themes, so nothing inside it changes with the toggle. */
:root[data-theme="light"] .descent, :root[data-theme="light"] .tip {
  --abyss: #020F1F; --shelf: #091A2D; --shoal: #12263D; --shoal-2: #23374D;
  --waterline: rgba(68, 201, 240, .24); --hair: rgba(186, 201, 219, .12);
  --text: #F1F6FA; --text-2: #BAC9DB; --text-3: #95A7BB;
  --accent: #44C9F0; --accent-press: #29AED4; --on-accent: #020F1F; --accent-subtle: rgba(68, 201, 240, .16);
  --danger: #FF6B6B; --success: #4CE49A;
  --lift: 0 2px 4px rgba(2, 15, 31, .85), 0 6px 26px rgba(2, 15, 31, .8); --field: #12263D;
  color: var(--text); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--abyss); scroll-behavior: smooth; scroll-padding-top: calc(var(--head) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--abyss); color: var(--text);
  font: 400 19px/1.75 "Zain", "Geeza Pro", Arial, sans-serif;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--accent); color: var(--on-accent); }
html { scrollbar-color: var(--shoal-2) var(--abyss); }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: var(--accent); text-underline-offset: .28em; text-decoration-thickness: 1px; }
@media (hover: hover) and (pointer: fine) { a:hover { color: var(--text); } }
/* pressed: text links and text-like controls dim; buttons and pills have their own state */
a:not(.btn):not(.store):active, summary:active, .tut-go:active, .tut-all:active, .pager [role="tab"]:active { opacity: .7; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 800; line-height: 1.3; text-wrap: balance; }
p { text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- chrome ---------- */
.head {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: var(--head);
  display: flex; align-items: center; gap: 16px; padding: 0 clamp(16px, 2.2vw, 48px);
  background: var(--head-bg); border-bottom: 1px solid var(--waterline);
}
/* The Qushan lockup: the on-dark cut by default, the light cut under the light
   theme, the Latin one on English pages, and the symbol alone where the
   lockup would fall under its 120px minimum. */
.brand { flex: none; display: flex; align-items: center; color: var(--text); text-decoration: none; }
.brand img { height: 38px; width: auto; }
/* the Latin lockup is narrower: 41px keeps it at its 120px minimum width */
@media (min-width: 601px) { :root[lang="en"] .head .brand img { height: 41px; } }
:root[data-theme="light"] .brand img { content: url(qushan-lockup.svg); }
:root[data-theme="light"][lang="en"] .brand img { content: url(qushan-lockup-en.svg); }
.head nav { display: flex; gap: 0; margin-inline-start: 4px; }
.head nav a { white-space: nowrap; color: var(--text-2); text-decoration: none; font-size: 16px; font-weight: 500; padding: 8px 7px; border-radius: var(--r-s); transition: color .2s, background-color .2s; }
.head .who { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
/* theme toggle: the sun offers light, the moon offers dark */
.theme { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 999px; border: 1px solid var(--waterline);
  background: transparent; color: var(--text-2); cursor: pointer; transition: color .2s, background-color .2s, scale .14s var(--ease); }
.theme svg { width: 20px; height: 20px; }
.theme .moon, :root[data-theme="light"] .theme .sun { display: none; }
:root[data-theme="light"] .theme .moon { display: block; }
.theme:active { scale: .94; }
@media (pointer: coarse) { .theme { width: 44px; height: 44px; } }
@media (max-width: 1380px) { .head nav { display: none; } }
@media (max-width: 700px) { #nav-in { display: none; } }
@media (max-width: 600px) {
  .head { gap: 12px; }
  .head .brand img { content: url(qushan-mark-on-dark.svg); height: 32px; }
  :root[data-theme="light"] .head .brand img, :root[data-theme="light"][lang="en"] .head .brand img { content: url(qushan-mark.svg); }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: var(--r-m); cursor: pointer;
  font: inherit; font-weight: 700; font-size: 18px; text-decoration: none; white-space: nowrap;
  background: var(--btn); color: var(--on-btn);
  transition: background-color .16s var(--ease), scale .14s var(--ease);
}
.btn:active { background: var(--btn-press); scale: .975; }
.btn.quiet:active, .btn.danger:active { background: var(--shoal); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.quiet { background: transparent; color: var(--text); border: 1px solid var(--waterline); font-weight: 600; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 17px; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); font-weight: 600; }

.field {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r-m);
  border: 1px solid var(--waterline); background: var(--field); color: var(--text);
  font: inherit; direction: ltr; text-align: left; caret-color: var(--accent);
}
.field::placeholder { color: var(--text-3); }
.field:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.join { display: flex; gap: 8px; max-width: 440px; }
.join .field { flex: 1 1 0; min-width: 0; }
.msg { min-height: 26px; margin-top: 8px; font-size: 16px; color: var(--danger); }
.msg.ok { color: var(--text-2); }
.card .msg:empty { min-height: 0; margin: 0; }
.usage .when { font-size: 15px; margin-top: 2px; }
.field.gift { font-family: ui-monospace, Menlo, monospace; letter-spacing: .08em; text-align: left; }
@media (max-width: 480px) { .join { flex-direction: column; } }

/* ---------- the descent ---------- */
.descent { position: relative; height: 900vh; }
.stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #031221; contain: layout paint;
  --p1: 0; --p2: 0; --ex: 0; --p4: 0; --p5: 0; --sx: 50%; --sy: 45%; --gap: 300px;
}
.plane {
  position: absolute; left: 50%; top: 50%;
  width: max(100vw, calc(100svh * 1.6)); aspect-ratio: 2180 / 1362;
  transform-style: preserve-3d; transform-origin: 50% 50%;
  transform:
    translate(calc(-50% + var(--pan, 0px) * (1 - var(--ex)) - var(--dx, 0px) * var(--p4) * .7 + var(--ex) * var(--ex-x, 0px)),
              calc(-50% - var(--dy, 0px) * var(--p4) * .7 + var(--ex) * var(--ex-y, 0px)))
    rotateX(calc(var(--ex) * 60deg)) rotateZ(calc(var(--ex) * -34deg))
    scale(calc(1 - var(--ex) * var(--shrink, .56) + var(--p4) * .7));
}
.stage.live .plane { will-change: transform; }
.sheet {
  --up: clamp(0, calc(var(--ex) * 1.3 - (3 - var(--i)) * .1), 1);
  position: absolute; inset: 0; transform: translateZ(calc(var(--up) * var(--gap) * var(--i)));
  outline: 1.5px solid rgba(186, 201, 219, calc(var(--ex) * .7)); outline-offset: -1px;
}
.sheet > img, .sheet > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sheet.ground { --i: 0; box-shadow: 0 60px 120px rgba(0, 0, 0, calc(var(--ex) * .6)); }
.sheet.ground img { object-fit: cover; transition: opacity .9s var(--ease);
  filter: saturate(.95) brightness(calc(.9 - var(--p2) * .12 - var(--p4) * .18 + var(--ex) * .22)); }
.sheet.ground img.next { opacity: 0; }
.sheet.zones { --i: 1; background: rgba(18, 38, 61, calc(var(--ex) * .55)); }
/* one opacity on the layer, not a calc on each of its paths */
.sheet.zones svg { clip-path: circle(calc(var(--p2) * 135%) at var(--sx) var(--sy)); opacity: calc((.56 + var(--ex) * .44) * (1 - var(--p4))); }
.sheet.lots { --i: 2; background: rgba(9, 26, 45, calc(var(--ex) * .5)); }
.sheet.lots svg { clip-path: circle(calc(var(--p1) * 135%) at var(--sx) var(--sy)); }
.sheet.pick { --i: 3; outline: 0; pointer-events: none; }
.sheet.pick svg { opacity: max(var(--p4), var(--ex)); }
.lots path { fill: transparent; stroke-width: 1.7; vector-effect: non-scaling-stroke; stroke-linejoin: round; cursor: pointer; transition: fill .15s; }
.lots path.s { stroke: var(--settled); }
.lots path.u { stroke: var(--unsettled); }
.lots path.hot { fill: rgba(255, 176, 32, .28); stroke: var(--selected); }
.lots text { font: 600 26px "Zain", Arial, sans-serif; fill: var(--text); stroke: var(--abyss); stroke-width: 6px; paint-order: stroke; stroke-linejoin: round;
  text-anchor: middle; pointer-events: none; font-variant-numeric: tabular-nums; }
.lots .lbl { opacity: calc(var(--p1) * (1 - var(--ex))); }
.pick path { fill: rgba(255, 176, 32, .26); stroke: var(--selected); stroke-width: 3.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.pin { position: absolute; left: var(--sx); top: var(--sy); width: 1px; height: 1px; }
.sweep {
  position: absolute; left: var(--sx); top: var(--sy); width: 100%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid var(--settled); pointer-events: none;
  transform: translate(-50%, -50%) scale(calc(var(--ring, 0) * 2.7)); opacity: var(--ring-o, 0);
}
.shade { position: absolute; inset: 0; pointer-events: none; opacity: calc(1 - var(--ex) * .75 - var(--p5) * .4);
  background:
    linear-gradient(to top, rgba(2, 15, 31, .97) 0%, rgba(2, 15, 31, .92) 30%, rgba(2, 15, 31, .74) 50%, rgba(2, 15, 31, .38) 68%, rgba(2, 15, 31, 0) 84%),
    linear-gradient(to bottom, rgba(2, 15, 31, .72) 0, rgba(2, 15, 31, 0) 22%);
}
.fly { position: absolute; inset: 0; width: 100%; height: 100%; opacity: var(--p5); pointer-events: none; }
.stage .shade { z-index: 1; }

/* names of the separated sheets */
.sheets { position: absolute; left: calc(50% + var(--ex-x, 0px)); top: calc(50% + var(--ex-y, 0px)); pointer-events: none; }
.sheets li {
  position: absolute; left: calc(var(--reach, 300px) + 66px); width: 190px; text-align: start;
  --up: clamp(0, calc(var(--ex) * 1.3 - (3 - var(--i)) * .1), 1);
  transform: translateY(calc(-50% - var(--up) * var(--step, 140px) * var(--i)));
  /* the names wait until the sheets have parted: over the flat map they would only be noise */
  opacity: clamp(0, calc(var(--ex) * 4 - (3 - var(--i)) * .25 - 2.2), 1);
  font-size: 16.5px; font-weight: 600; color: var(--text); white-space: nowrap;
}
.sheets li small { display: block; color: var(--text-3); font-weight: 400; font-size: 14px; }
.sheets li::after { content: ""; position: absolute; right: calc(100% + 10px); top: 50%; width: 46px; border-top: 1px dashed rgba(186, 201, 219, .6); }
@media (max-width: 900px) { .sheets { display: none; } }

/* floating data */
.float {
  position: absolute; z-index: 3; background: rgba(9, 26, 45, .95); border: 1px solid var(--waterline); border-radius: var(--r-l);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7); font-size: 16.5px;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .14s linear, transform .14s var(--ease), visibility 0s .14s;
}
.float.on { opacity: 1; visibility: visible; transform: none; transition: opacity .32s var(--ease) .12s, transform .42s var(--ease) .12s, visibility 0s; }
.float h3 { font-size: 16.5px; font-weight: 700; padding: 12px 16px 6px; }
.float ul { padding: 0 16px 12px; }
.float li { display: flex; align-items: center; gap: 10px; padding: 3px 0; color: var(--text-2); }
.float li b { margin-inline-start: auto; padding-inline-start: 18px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.float i { flex: none; width: 13px; height: 13px; border-radius: 3px; background: var(--c); border: 1px solid rgba(255, 255, 255, .22); }
.float i.line { height: 0; width: 18px; border: 0; border-top: 3px solid var(--c); border-radius: 0; }
.float.legend { inset-inline-end: var(--gutter); top: calc(var(--head) + 24px); min-width: 230px; }
/* placed with `translate` every frame; its entrance is a small growth from the plot's side */
.float.card { left: 0; top: 0; width: 290px; transform: none; scale: .96; transform-origin: 100% 50%; transition: opacity .14s linear, scale .14s var(--ease), visibility 0s .14s; }
.float.card.flip { transform-origin: 0 50%; }
.float.card.on { scale: 1; transition: opacity .3s var(--ease) .1s, scale .4s var(--ease) .1s, visibility 0s; }
.float.card div { display: flex; justify-content: space-between; gap: 14px; padding: 7px 16px; border-top: 1px solid var(--hair); }
.float.card dt { color: var(--text-2); white-space: nowrap; }
.float.card dd { font-weight: 600; text-align: end; }
.float.card .st { color: var(--settled); } .float.card .st.u { color: var(--unsettled); }
.float.card::before { content: ""; position: absolute; top: 50%; inset-inline-end: 100%; width: 84px; border-top: 2px solid var(--selected); }
.float.card.flip::before { inset-inline-end: auto; inset-inline-start: 100%; }
.float.card { border-color: var(--selected); }
.tip { position: fixed; z-index: 40; pointer-events: none; padding: 6px 12px; background: var(--abyss); border: 1px solid var(--selected); border-radius: var(--r-s);
  left: 0; top: 0; font-size: 15px; font-weight: 600; white-space: nowrap; transform: translate(-50%, calc(-100% - 14px)); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.facts li { padding: 6px 14px; border: 1px solid var(--waterline); border-radius: 999px; background: rgba(9, 26, 45, .9); font-size: 16px; font-weight: 500; }
.facts b { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .float.legend { top: calc(var(--head) + 62px); inset-inline-end: auto; inset-inline-start: 12px; min-width: 0; font-size: 14.5px; }
  .float.card::before { display: none; }
  .float.card { width: 236px; font-size: 14.5px; }
  /* a phone shows the four facts that identify the plot; the rest is in the app */
  .float.card [data-opt] { display: none; }
}

.caps { position: absolute; inset: auto var(--gutter) clamp(20px, 5svh, 56px) var(--gutter); max-width: 620px; z-index: 2; }
.cap { position: absolute; inset: auto 0 0 0; opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .15s linear, transform .15s var(--ease), visibility 0s .15s; }
.cap.past { transform: translateY(-12px); }
.cap.on { opacity: 1; visibility: visible; transform: none; transition: opacity .38s var(--ease) .14s, transform .5s var(--ease) .14s, visibility 0s; }
.cap h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.7rem); line-height: 1.3; }
.cap h2 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.5rem); }
.cap h1, .cap h2 { text-shadow: var(--lift); }
.cap p { color: var(--text); margin-top: 12px; max-width: 34em; text-shadow: 0 1px 3px rgba(2, 15, 31, .9), 0 3px 16px rgba(2, 15, 31, .85); }
.cap .join { margin-top: 22px; }
.towns { text-shadow: 0 1px 3px rgba(2, 15, 31, .9);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; font-size: 16px; color: var(--text-2); }
.towns button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid transparent; background: rgba(9, 26, 45, .8); color: var(--text-2);
  font: inherit; font-weight: 500; cursor: pointer; transition: color .2s, border-color .2s; }
.towns button[aria-pressed="true"] { color: var(--selected); border-color: var(--selected); }

/* the steps, as a timeline */
.rail { position: absolute; inset-inline-end: var(--gutter); top: 50%; transform: translateY(-50%); z-index: 2; display: grid;
  padding: 10px 16px 10px 12px; background: rgba(9, 26, 45, .93); border: 1px solid var(--waterline); border-radius: var(--r-l); }
.rail li { position: relative; }
.rail::before, .rail::after { content: ""; position: absolute; inset-inline-start: 23px; top: 31px; bottom: 31px; width: 2px; background: var(--shoal-2); }
.rail::after { background: var(--accent); transform: scaleY(var(--prog, 0)); transform-origin: 50% 0; }
.rail button { position: relative; display: flex; align-items: center; gap: 14px; min-height: 42px; padding: 0; background: none; border: 0;
  color: var(--text-3); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; text-align: start; transition: color .2s var(--ease); }
.rail button::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--shelf); border: 2px solid var(--shoal-2);
  transition: background-color .25s, border-color .25s, box-shadow .25s; position: relative; z-index: 1; }
.rail li.done button { color: var(--text-2); }
.rail li.done button::before { background: var(--accent); border-color: var(--accent); }
.rail li.now button { color: var(--text); }
.rail li.now button::before { background: var(--abyss); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-subtle); }
.rail .n { font-variant-numeric: tabular-nums; color: var(--text-3); font-weight: 500; font-size: 14px; margin-inline-end: -6px; }
@media (max-width: 760px) {
  .rail { top: auto; bottom: auto; inset-inline-end: auto; inset-inline-start: 12px; top: calc(var(--head) + 12px); transform: none; padding: 6px 10px; grid-auto-flow: column; }
  .rail::before, .rail::after { display: none; }
  .rail li::before { content: ""; position: absolute; inset-inline-start: -50%; top: 19px; width: 100%; height: 2px; background: var(--shoal-2); }
  .rail li:first-child::before { display: none; }
  .rail li.done::before, .rail li.now::before { background: var(--accent); }
  .rail button { min-height: 40px; min-width: 30px; font-size: 0; gap: 0; }
  .rail .n { display: none; }
}
.credit { position: absolute; inset-inline-end: var(--gutter); bottom: 8px; z-index: 2; font-size: 12.5px; color: var(--text-3); opacity: calc(1 - var(--p5)); }
@media (max-width: 760px) { .credit { inset-inline-end: auto; inset-inline-start: var(--gutter); bottom: 2px; font-size: 11.5px; } }

/* ---------- sections ---------- */
.band { padding: clamp(48px, 6vw, 88px) var(--gutter); border-top: 1px solid var(--hair); }
.wrap { max-width: 1240px; margin: 0 auto; }
.band h2 { font-size: clamp(1.6rem, 1.15rem + 1.5vw, 2.25rem); max-width: 20em; }
.band .lede { color: var(--text-2); margin-top: 12px; max-width: 38em; font-size: 18px; }
/* Wide screens: the heading takes the start side and its introduction sits
   beside it, so the row is used across its width. */
@media (min-width: 1000px) {
  .band > .wrap:not(.split) { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(32px, 5vw, 80px); align-items: end; }
  .band > .wrap:not(.split) > * { grid-column: 1 / -1; min-width: 0; }
  .band > .wrap:not(.split) > h2 { grid-column: 1; }
  .band > .wrap:not(.split) > .lede { grid-column: 2; margin-top: 0; }
}
/* A section whose content stands beside its heading (offline packs, contact). */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.split .side p { color: var(--text-2); margin-top: 12px; font-size: 18px; max-width: 30em; }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr); } .split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); } }

/* film */
.film { margin-top: clamp(24px, 3vw, 36px); border: 1px solid var(--waterline); border-radius: var(--r-l); overflow: hidden; background: #031221; }
.film video { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.films { margin-top: clamp(24px, 3vw, 36px); }
.films .film { margin-top: 0; flex: 0 0 100%; scroll-snap-align: center; }
.films-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-l); }
.films-track::-webkit-scrollbar { display: none; }
.films-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.films-tabs [role="tab"] { min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--waterline); background: none; color: var(--text-2); font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, scale .14s var(--ease); }
.films-tabs [role="tab"]:active, .scenes button:active, .bases button:active, .pager .step:active { scale: .97; }
.films-tabs [role="tab"][aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
:root[data-theme="light"] .films-tabs [role="tab"][aria-selected="true"],
:root[data-theme="light"] .scenes button[aria-pressed="true"], :root[data-theme="light"] .bases button[aria-pressed="true"] { background: var(--pill); border-color: var(--pill); color: var(--on-pill); }
.films-tabs [role="tab"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .films-tabs [role="tab"]:not([aria-selected="true"]):hover { color: var(--text); border-color: var(--text-3); } }
@media (prefers-reduced-motion: no-preference) { .films-track { scroll-behavior: smooth; } }
.film-credit { padding: 8px 14px 10px; font-size: 12.5px; color: var(--text-3); border-top: 1px solid var(--waterline); }
.film-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* features */
.feat { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(28px, 6vw, 96px); align-items: center;
  padding: clamp(28px, 4vw, 56px) 0; border-top: 1px solid var(--hair); }
.pages { margin-top: clamp(20px, 2.5vw, 32px); }
#features { padding-bottom: clamp(40px, 5vw, 72px); }
.feat.flip { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); }
.feat.flip > .shot { order: -1; }
.feat.solo { grid-template-columns: minmax(0, 46em); align-items: start; }
.feat h3 { font-size: clamp(1.3rem, 1.05rem + .7vw, 1.6rem); }
.feat .say > p { color: var(--text-2); margin-top: 10px; max-width: 36em; font-size: 18px; }
.feat .say > .fine { font-size: 16px; color: var(--text-3); }
.spec { margin-top: 18px; }
.spec div { display: grid; grid-template-columns: 9.5em 1fr; gap: 4px 18px; padding: 9px 0; border-top: 1px solid var(--hair); font-size: 17px; }
.spec dt { font-weight: 600; color: var(--text); }
.spec dd { color: var(--text-2); }
.shot.phone { justify-self: center; width: min(100%, 270px); aspect-ratio: 1206 / 2622; border-radius: 36px; border: 8px solid #111B27; background: #05080D; overflow: hidden;
  box-shadow: var(--drop); }
.shot.phone img { width: 100%; height: 100%; object-fit: cover; }

/* the four feature pages: stacked in one cell, so every page is the tallest one's height */
.pager { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--hair); }
.pager .play { margin-inline-start: auto; width: 40px; height: 40px; }
.pager .play svg { width: 16px; height: 16px; }
.pager .step { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 999px;
  border: 1px solid var(--waterline); background: transparent; color: var(--text-2); cursor: pointer; transition: background-color .2s, color .2s; }
.pager .step svg { width: 20px; height: 20px; }
.pager [role="tablist"] { display: flex; }
.pager [role="tab"] { display: grid; place-items: center; width: 34px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.pager [role="tab"]::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--shoal-2); transition: width .3s var(--move), background-color .2s; }
.pager [role="tab"][aria-selected="true"]::before { width: 24px; background: var(--accent); }
/* while it advances on its own, the current dot fills over the dwell, right to left with the reading */
.pages.auto .pager [role="tab"][aria-selected="true"]::before { background: linear-gradient(var(--accent), var(--accent)) right / 0% 100% no-repeat, var(--shoal-2); }
.pages.auto .pager.run [role="tab"][aria-selected="true"]::before { animation: dwell var(--dwell, 7s) linear forwards; }
@keyframes dwell { to { background-size: 100% 100%, auto; } }
.pager .count { padding: 0 6px; color: var(--text-3); font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* phones: the dots already say where you are; narrower dot targets keep one row */
@media (max-width: 480px) {
  .pager { gap: 4px; }
  .pager [role="tab"] { width: 26px; }
  .pager .count { display: none; }
}
.js .pages.on .pages-view { display: grid; touch-action: pan-y; overflow: clip; overflow-clip-margin: 48px;
  transition: height .5s var(--move); }
/* each page keeps its own height; the view takes the shown page's (site.js) */
.js .pages.on .feat { align-self: start; border-top: 0; padding: clamp(28px, 3.5vw, 48px) 0 clamp(32px, 4vw, 56px); }
/* the waiting pages sit 24px aside: keep that off the page's scroll width */
#features { overflow-x: clip; }
.js .pages.on .feat { grid-area: 1 / 1; visibility: hidden; opacity: 0; translate: 24px 0;
  transition: opacity .15s linear, translate .15s var(--move), visibility 0s .15s; }
/* pages before the current one wait on the right, those after it on the left: «next» arrives from the left */
.js .pages.on .feat.after { translate: -24px 0; }
.js .pages.on .feat.now { visibility: visible; opacity: 1; translate: 0 0;
  transition: opacity .38s var(--ease) .08s, translate .5s var(--move) .08s, visibility 0s; }
.js .pages.on .feat:focus-visible { outline-offset: -2px; border-radius: var(--r-m); }
/* the image keeps one side from page to page */
.js .pages.on .feat.flip { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); }
.js .pages.on .feat.flip > .shot { order: 0; }
@media (hover: hover) and (pointer: fine) {
  .pager .step:hover { color: var(--text); background: var(--shoal); }
  .pager [role="tab"]:not([aria-selected="true"]):hover::before { background: var(--text-3); }
}
@media (max-width: 900px) {
  .feat, .feat.flip, .feat.solo, .js .pages.on .feat.flip { grid-template-columns: 1fr; }
  .feat.flip > .shot { order: 0; }
  .spec div { grid-template-columns: 1fr; }
}

/* geodata: thematic layers, each a map capture with the key the map draws */
/* Four cards to a row on wide screens. Each card's parts sit on the rows of the
   shared grid (subgrid), so titles, texts, keys and sources line up across a row. */
.geo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; margin-top: 24px; }
.geo article { display: grid; grid-template-columns: minmax(0, 1fr); grid-row: span 5; grid-template-rows: subgrid; row-gap: 8px; align-content: start; min-width: 0; }
.geo figure { margin: 0; border: 1px solid var(--waterline); border-radius: var(--r-m); overflow: hidden; background: var(--shelf); }
.geo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.geo h3 { font-size: 18px; margin-top: 2px; }
.geo p { color: var(--text-2); font-size: 16px; line-height: 1.65; max-width: 34em; }
.geo .src { color: var(--text-3); font-size: 14.5px; }
.key { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 16px; color: var(--text-2); }
.key li { display: inline-flex; align-items: center; gap: 7px; }
.key svg { width: 14px; height: 14px; flex: none; }
/* light swatches need an edge on a light ground; the fills are the map's own */
.key svg rect { stroke: var(--hair); stroke-width: 1; }
.key.ramp { gap: 0; flex-wrap: nowrap; max-width: 30em; }
.key.ramp li { flex: 1 1 0; min-width: 0; flex-direction: column; align-items: stretch; gap: 4px; font-size: 14px; text-align: start; white-space: nowrap; overflow: hidden; }
.key.ramp svg { width: 100%; height: 10px; }
.key.ramp svg rect { stroke: none; }
/* On the landing page every key is one line: a long one scrolls sideways
   inside its card, fading at the far edge to say there is more. */
.geo .key { flex-wrap: nowrap; gap: 0 10px; margin: 0; padding-bottom: 6px; font-size: 14px; white-space: nowrap; align-self: start;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--shoal-2) transparent; }
.geo .key li { flex: none; gap: 5px; }
.geo .key:not(.ramp) svg { width: 12px; height: 12px; }
.geo .key:not(.ramp) { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
[dir="rtl"] .geo .key:not(.ramp) { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); }
.geo .key:not(.ramp) li:last-child { padding-inline-end: 28px; }
.geo .key.ramp { gap: 0; max-width: none; }
.geo .key.ramp li { flex: 1 0 auto; overflow: visible; font-size: 13px; }
/* two captures per card: over imagery, and on the plain basemap */
.geo img.plain, .geo[data-base="plain"] img.photo { display: none; }
.geo[data-base="plain"] img.plain { display: block; }
html:not(.js) .bases { display: none; }
@media (max-width: 1180px) { .geo { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .geo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Phones: the eight maps are one swipeable row, the next card showing at the edge. */
@media (max-width: 640px) {
  .geo { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; grid-template-rows: repeat(5, auto); gap: 0 14px;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .geo::-webkit-scrollbar { display: none; }
  .geo article { scroll-snap-align: start; }
}

/* outputs */
.out { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; margin-top: clamp(24px, 3vw, 40px); }
.cad { border: 1px solid var(--waterline); border-radius: var(--r-m); overflow: hidden; background: #212830; position: sticky; top: calc(var(--head) + 24px); }
.cad img { width: 100%; height: auto; }
.cad figcaption, .outs figure + p { font-size: 16px; color: var(--text-2); }
.cad figcaption { padding: 10px 16px; background: var(--shelf); border-top: 1px solid var(--hair); }
.outs figure.paper { background: #fff; max-width: 300px; box-shadow: var(--drop); border: 0; border-radius: var(--r-s); }
.outs li { padding: 18px 0; border-top: 1px solid var(--hair); display: grid; grid-template-columns: 3.6em 1fr; gap: 4px 16px; }
.outs li:first-child { border-top: 0; padding-top: 0; }
.outs .ext { font-weight: 700; color: var(--accent); direction: ltr; text-align: start; font-size: 16px; padding-top: 3px; }
.outs h3 { font-size: 1.15rem; }
.outs p { color: var(--text-2); grid-column: 2; font-size: 17px; }
.outs figure, .outs figure + p { grid-column: 2; }
.outs figure { margin-top: 10px; border: 1px solid var(--hair); border-radius: var(--r-m); overflow: hidden; background: var(--shelf); }
@media (max-width: 900px) { .out { grid-template-columns: 1fr; } .cad { position: static; } }

/* platforms */
.scenes, .bases { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.scenes button, .bases button {
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--waterline); background: transparent;
  color: var(--text-2); font: inherit; font-size: 16.5px; font-weight: 600; cursor: pointer; transition: background-color .2s, color .2s, scale .14s var(--ease);
}
.scenes button[aria-pressed="true"], .bases button[aria-pressed="true"] { background: var(--accent-subtle); color: var(--accent); border-color: var(--accent); }
.devices { position: relative; margin-top: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: 1fr; }
.dev { background: #05080D; border: 1px solid #2B3A4C; box-shadow: var(--drop); overflow: hidden; position: relative; }
.dev img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; opacity: 0; filter: blur(3px); transition: opacity .3s var(--ease), filter .3s var(--ease); }
.dev img.on { filter: none; }
.dev img.on { opacity: 1; }
.dev.ipad { width: min(100%, 980px); aspect-ratio: 2420 / 1668; border-radius: clamp(14px, 2.2vw, 28px); border-width: clamp(6px, 1vw, 12px); border-color: #111B27; justify-self: start; }
.dev.iphone { position: absolute; inset-inline-end: 0; bottom: -7%; width: clamp(120px, 22vw, 262px); aspect-ratio: 1206 / 2622; border-radius: clamp(18px, 3.2vw, 40px); border-width: clamp(4px, .7vw, 9px); border-color: #111B27; }
.dev.android { position: absolute; inset-inline-end: 0; top: 12%; width: clamp(110px, 20vw, 240px); aspect-ratio: 1344 / 2992; border-radius: clamp(16px, 2.8vw, 34px); border-width: clamp(4px, .7vw, 9px); border-color: #111B27; }
.devnames { display: flex; gap: 10px 28px; flex-wrap: wrap; margin-top: clamp(56px, 8vw, 96px); color: var(--text-2); font-size: 16.5px; }
.devnames b { color: var(--text); font-weight: 600; direction: ltr; unicode-bidi: isolate; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-height: 56px; min-width: 168px; padding: 6px 20px;
  border: 1px solid var(--waterline); border-radius: 12px; background: var(--shoal); color: var(--text); line-height: 1.25;
  transition: background-color .2s ease, border-color .2s ease, scale .14s var(--ease); }
.store:not([aria-disabled="true"]):active { scale: .97; }
.store small { font-size: 14px; color: var(--text-2); }
.store b { font-size: 19px; font-weight: 700; direction: ltr; unicode-bidi: isolate; text-align: end; }
.store[aria-disabled="true"] { border-style: dashed; border-color: var(--shoal-2); background: transparent; cursor: default; }
.store[aria-disabled="true"] b { color: var(--text-2); }
@media (hover: hover) and (pointer: fine) { .store:not([aria-disabled="true"]):hover { background: var(--shoal-2); border-color: var(--accent); } }
@media (max-width: 700px) {
  .dev.iphone { bottom: -22%; width: 34vw; }
  .dev.android { top: auto; bottom: -22%; width: 31vw; }
  .devnames { margin-top: 30vw; }
}

/* packs */
/* The sixteen packs as two tables of eight, side by side; one column on a phone. */
.packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 48px); align-items: start; }
.packs table { width: 100%; border-collapse: collapse; font-size: 16.5px; }
.packs th { text-align: start; font-weight: 600; color: var(--text-3); font-size: 14.5px; padding: 0 0 8px; }
.packs td { padding: 7px 0; border-top: 1px solid var(--hair); }
.packs td:first-child { font-weight: 500; }
.packs td.n, .packs th.n { text-align: end; font-variant-numeric: tabular-nums; direction: ltr; }
.packs td .bar { display: block; height: 3px; margin-top: 4px; background: var(--accent); width: calc(var(--v) * 100%); min-width: 2px; border-radius: 2px; }
.packs .note { grid-column: 1 / -1; color: var(--text-3); font-size: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--waterline); }
@media (max-width: 640px) {
  .packs { grid-template-columns: 1fr; }
  /* the second table continues the first: its header is not repeated */
  .packs table + table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* contact: the form stands beside its heading, without a card of its own */
.contact label { display: block; font-size: 16px; color: var(--text-2); margin: 14px 0 6px; }
.contact .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.contact .two label { margin-top: 0; }
.contact .field.rtl { direction: rtl; text-align: right; }
.contact select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: 14px 50%, 20px 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-left: 36px; }
.contact textarea.field { resize: vertical; min-height: 132px; line-height: 1.7; }
.contact .send { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.contact .btn { min-width: 180px; }
.contact .note { flex: 1 1 240px; color: var(--text-3); font-size: 15.5px; }
.contact .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.contact [aria-invalid="true"] { border-color: var(--danger); }
@media (max-width: 560px) { .contact .two { grid-template-columns: 1fr; } .contact .two > div + div label { margin-top: 14px; } .contact .btn { width: 100%; } }

/* plan */
.plan { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); margin-top: clamp(24px, 3vw, 40px); align-items: start; }
.allow li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-top: 1px solid var(--hair); font-size: 18px; }
.allow li:first-child { border-top: 1px solid var(--waterline); }
.allow b { font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.allow small { color: var(--text-3); font-size: 15.5px; font-weight: 400; margin-inline-start: 6px; }
.allow + p { color: var(--text-3); font-size: 16px; margin-top: 14px; }
.signup { background: var(--shelf); border: 1px solid var(--waterline); border-radius: var(--r-l); padding: clamp(20px, 2.5vw, 28px); position: sticky; top: calc(var(--head) + 24px); }
.signup h3 { font-size: 1.25rem; }
.signup p { color: var(--text-2); margin-top: 8px; font-size: 17px; }
.signup label { display: block; font-size: 16px; color: var(--text-2); margin: 18px 0 6px; }
.signup .btn { width: 100%; margin-top: 12px; }
.signup .alt { margin-top: 12px; font-size: 16.5px; }
@media (max-width: 900px) { .plan { grid-template-columns: 1fr; } .signup { position: static; } }

/* honesty + foot */
.plain { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px clamp(28px, 4vw, 56px); margin-top: 24px; }
.plain h3 { font-size: 1.1rem; }
.plain p { color: var(--text-2); font-size: 17px; margin-top: 6px; }
/* the lockup, then the links in labelled groups */
.foot { padding: 36px var(--gutter) 40px; border-top: 1px solid var(--hair); color: var(--text-3); font-size: 16px; }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px clamp(24px, 4vw, 56px); align-items: start; }
.foot .brand img { height: 44px; }
.foot nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.foot h2 { font-size: 15px; font-weight: 700; color: var(--text-3); margin-bottom: 2px; }
.foot a:not(.brand) { color: var(--text); font-weight: 600; text-decoration: none; display: flex; align-items: center; min-height: 44px; line-height: 1.35; }
.foot a[dir="ltr"] { justify-content: flex-end; }
[dir="ltr"] .foot a[dir="ltr"] { justify-content: flex-start; }
@media (hover: hover) and (pointer: fine) { .foot a:not(.brand):hover { color: var(--accent); text-decoration: underline; } }
@media (min-width: 720px) { .foot nav { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .foot .wrap { grid-template-columns: 200px minmax(0, 1fr); } }

/* reveal for below-the-fold figures: visible by default, eased only when JS opts in */
.js .rise { opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease), transform .7s var(--ease); }
.js .rise.in { opacity: 1; transform: none; }

/* ---------- account + prose pages ---------- */
.page { max-width: 520px; margin: 0 auto; padding: calc(var(--head) + 40px) 16px 80px; }
.page.wide { max-width: 720px; }
.page h1 { font-size: 2rem; margin-bottom: 24px; }
.card { background: var(--shelf); border: 1px solid var(--waterline); border-radius: var(--r-l); padding: 22px; margin-bottom: 16px; }
.card h2 { font-size: 1.15rem; margin-bottom: 4px; }
.card p { color: var(--text-2); margin-bottom: 12px; }
.card label { display: block; font-size: 16px; color: var(--text-2); margin-bottom: 6px; }
.card form > .btn { width: 100%; margin-top: 16px; }
.muted { color: var(--text-3); font-size: 16.5px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.row > .btn { flex: 1 1 auto; }
#code { letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; font-size: 24px; }
.email { direction: ltr; unicode-bidi: plaintext; word-break: break-all; color: var(--text); }
.usage li { padding: 12px 0; border-top: 1px solid var(--hair); }
.usage li:first-child { border-top: 0; }
.line { display: flex; justify-content: space-between; gap: 12px; }
.usage .n { font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.meter { height: 6px; border-radius: 3px; background: var(--shoal); margin-top: 8px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s var(--ease); }
.meter.full > i { background: var(--danger); }
.prose { font-size: 18px; }
.prose h2 { font-size: 1.2rem; margin: 2.2rem 0 .6rem; padding-top: 1.3rem; border-top: 1px solid var(--hair); }
.prose p, .prose li { color: var(--text-2); }
.prose p + p { margin-top: .8rem; }
.prose ul { list-style: disc; padding-inline-start: 1.2rem; }
.prose li { margin-bottom: .45rem; }
.prose strong { color: var(--text); font-weight: 600; }
.prose .note { background: var(--shelf); border: 1px solid var(--waterline); border-radius: var(--r-l); padding: 1rem 1.15rem; margin: 1.25rem 0; }
/* guide pages (parcel-search and its English twin) */
.prose ol { list-style: decimal; padding-inline-start: 1.5rem; }
.prose ol li { padding-inline-start: .25rem; }
.prose ol li::marker { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.prose figure { margin: 1.6rem 0; }
.prose figure img { width: 100%; height: auto; display: block; border: 1px solid var(--waterline); border-radius: var(--r-l); }
.prose figcaption { color: var(--text-3); font-size: 16px; margin-top: .5rem; }
.prose .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2.4rem; }
.prose .cta .btn { text-decoration: none; }
.prose .scroll { overflow-x: auto; margin: 1rem 0; }
.prose table.figures { width: 100%; border-collapse: collapse; font-size: 16.5px; }
.prose table.figures th { text-align: start; color: var(--text-3); font-weight: 600; font-size: 15px; padding: 7px 10px; border-bottom: 1px solid var(--waterline); }
.prose table.figures td { padding: 7px 10px; border-bottom: 1px solid var(--hair); color: var(--text-2); }
.prose table.figures td:first-child { color: var(--text); }
.prose table.figures td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.prose table.figures.wide { min-width: 640px; }
.prose .guides { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid var(--hair); font-size: 16.5px; }
.prose .guides a { display: inline-flex; align-items: center; min-height: 44px; }

/* hover feedback only where a pointer can hover; touch gets the pressed state */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--btn-hover); color: var(--on-btn); }
  .btn.quiet:hover, .btn.danger:hover { background: var(--shoal); color: var(--text); }
  .btn.danger:hover { color: var(--danger); }
  .head nav a:hover, .theme:hover { color: var(--text); background: var(--shoal); }
  .bases button:not([aria-pressed="true"]):hover { color: var(--text); background: var(--shoal); }
  .towns button:hover { color: var(--text); border-color: var(--waterline); }
  .rail button:hover { color: var(--text); }
  .scenes button:not([aria-pressed="true"]):hover { color: var(--text); background: var(--shoal); }
  .lots path:hover { fill: rgba(255, 176, 32, .28); stroke: var(--selected); }
}
@media (pointer: coarse) {
  .towns button { min-height: 44px; padding: 0 14px; }
  /* links that stand at the end of a line get a finger-sized box */
  .geo .src a, .outs a[download], .cad figcaption a, .signup .alt a, .contact .note a, .devnames a, .say > p a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 760px) {
  /* one swipeable row instead of three lines of chips: the caption keeps its height */
  .towns { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .towns::-webkit-scrollbar { display: none; }
  .towns > * { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* layers cut in instead of sweeping; the stack still separates, since scrolling is the viewer's own motion */
  .sheet.zones svg, .sheet.lots svg { clip-path: none; }
  .sheet.zones svg { opacity: calc(var(--p2) * (.56 + var(--ex) * .44) * (1 - var(--p4))); }
  .sheet.lots svg { opacity: var(--p1); }
  .sweep { display: none; }
  .cap, .cap.on, .cap.past, .float, .float.on, .float.card, .float.card.on { transform: none; scale: 1; transition: opacity .12s linear, visibility 0s; }
  .js .rise, .js .rise.in { opacity: 1; transform: none; transition: none; }
  .dev img { filter: none; transition: opacity .12s linear; }
  .js .pages.on .feat, .js .pages.on .feat.after, .js .pages.on .feat.now { translate: none; transition: opacity .12s linear, visibility 0s; }
  .js .pages.on .pages-view { transition: none; }
  .pages.auto .pager.run [role="tab"][aria-selected="true"]::before { animation: none; background: var(--accent); }
  .pager [role="tab"]::before { transition: none; }
  .btn, .meter > i, .sheet.ground img, .rail button::before { transition: none; }
  .btn:active, .theme:active, .films-tabs [role="tab"]:active, .scenes button:active, .bases button:active, .pager .step:active, .store:active { scale: 1; }
}

/* Signed-in account: a desktop dashboard, not the phone-width sign-in column. */
.page.dash { max-width: 1120px; }
@media (min-width: 860px) {
  .dash-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start;
    grid-template-areas: "plan plan" "usage usage" "gift history" "buy buy" "acct acct"; }
  .dash-grid > .card { margin: 0; }
  #plan-card { grid-area: plan; } #usage-card { grid-area: usage; } #gift-card { grid-area: gift; }
  #history { grid-area: history; } #buy { grid-area: buy; } #acct-card { grid-area: acct; }
  #plan-card h2 { font-size: 1.6rem; }
  /* Five features, five tiles: the name, then the count large. */
  #usage-card .usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
  #usage-card .usage li, #usage-card .usage li:first-child { border: 1px solid var(--hair); border-radius: var(--r-m); padding: 14px 16px; }
  #usage-card .usage .line { flex-direction: column; align-items: flex-start; gap: 6px; }
  #usage-card .usage .line > span:first-child { color: var(--text-2); font-size: 15px; line-height: 1.4; min-height: 2.8em; }
  #usage-card .usage .n { font-size: 1.35rem; font-weight: 700; color: var(--text); }
  /* Rows for cards that are hidden collapse, so no double gap. */
  .dash-grid:has(#buy[hidden]) { grid-template-areas: "plan plan" "usage usage" "gift history" "acct acct"; }
  .dash-grid:has(#history[hidden]) { grid-template-areas: "plan plan" "usage usage" "gift gift" "buy buy" "acct acct"; }
  .dash-grid:has(#buy[hidden]):has(#history[hidden]) { grid-template-areas: "plan plan" "usage usage" "gift gift" "acct acct"; }
  #plan-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 24px; }
  #plan-card > h2 { margin: 0; }
  #plan-card > .email { margin: 0; grid-row: 2; justify-self: start; }
  #plan-card > .muted { margin: 0; grid-column: 2; grid-row: 1 / span 2; text-align: end; max-width: 380px; }
  #plan-card > .msg { grid-column: 1 / -1; }
  #acct-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
  #acct-card h2 { margin: 0; flex: 1 1 auto; }
  #acct-card .row { margin-top: 0; }
  #acct-card .row > .btn { flex: none; }
  #acct-card #delete-confirm, #acct-card .msg { flex-basis: 100%; }
  #gift-card form { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; align-items: end; }
  #gift-card form > h2, #gift-card form > p, #gift-card form > label { grid-column: 1 / -1; }
  #gift-card form .btn { margin: 0; }
}

/* Account page: billing contact for a paid plan. */
.buyer label { display: block; font-size: 16px; color: var(--text-2); margin: 14px 0 6px; }
.buyer .field.rtl { direction: rtl; text-align: right; }
.buyer .phone { display: grid; grid-template-columns: minmax(0, 150px) 1fr; gap: 8px; }
.buyer .phone input { direction: ltr; text-align: left; }
#buy-plans { margin-top: 18px; }

/* header menu: the guide and map pages, on every page and every width */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border-radius: var(--r-s);
  color: var(--text-2); font-size: 16px; font-weight: 500; white-space: nowrap; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); }
.menu[open] summary, .menu summary:active { color: var(--text); background: var(--shoal); }
.menu > div { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60; display: grid; min-width: 15em; padding: 8px;
  background: var(--shelf); border: 1px solid var(--waterline); border-radius: var(--r-l); box-shadow: var(--pop); }
.menu > div a { padding: 9px 12px; border-radius: var(--r-s); color: var(--text-2); text-decoration: none; font-size: 16.5px; white-space: nowrap; }
.menu > div a:active { color: var(--text); background: var(--shoal); }
@media (hover: hover) and (pointer: fine) { .menu summary:hover, .menu > div a:hover { color: var(--text); background: var(--shoal); } }
@media (max-width: 560px) {
  .menu summary { padding: 0 8px; font-size: 16px; }
  .head #nav-in { display: none; }
  .menu > div { position: fixed; inset-inline: 12px; top: calc(var(--head) + 6px); min-width: 0; max-height: calc(100dvh - var(--head) - 24px); overflow: auto; }
}
@media (max-width: 430px) { .head { gap: 6px; } .head .who { gap: 4px; } .menu summary { padding: 0 4px; font-size: 15px; } .head .btn.small { padding: 0 10px; font-size: 16px; } }
@media (max-width: 380px) { .head .btn.small { padding: 0 8px; font-size: 15px; } .head .brand img { height: 28px; } }

/* The primary button on a light ground: a hairline keeps its edge. */
:root[data-theme="light"] .btn:not(.quiet):not(.danger) { box-shadow: inset 0 0 0 1px rgba(2, 15, 31, .16); }
:root[data-theme="light"] .descent .btn { box-shadow: none; }
