/* Altirio — Editorial Jade.
   Colours are the app's Editorial Jade tokens (altirio-ios c35e578: OrbisCore/Sources/OrbisCore/Resources/
   themes.json "jade" + app-themes.json "editorialJade"). The dark journey section takes its ground from the
   approved Nocturne Jade Dark icon. Text uses the system face (SF Pro on Apple devices), titles Newsreader,
   as the app's interface does. scripts/check.mjs reads the :root block for contrast. */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/Newsreader-Variable.woff") format("woff");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/Newsreader-Italic-Variable.woff") format("woff");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f2f5f3;      /* chrome.paper: mineral white */
  --panel: #f8faf9;      /* chrome.panelSolid */
  --ocean: #fafcfb;
  --land: #d2dad4;       /* sage land */
  --brand: #0c6b5d;      /* emerald stipple, chrome.brand */
  --onbrand: #f6faf8;    /* chrome.onBrand */
  --route: #b66a42;      /* copper routes */
  --ink: #1c2b27;        /* chrome.ink */
  --muted: #4d5a56;      /* chrome.muted (ink at 66 %) darkened for small text */
  --line: #a9b8af;       /* chrome.line */
  --soft: #dde4df;       /* chrome.lineSoft */
  --night: #112622;      /* the Nocturne Jade Dark icon's ground */
  --nighttext: #dbe5e0;  /* paper, softened for long text on night */
  --nightmuted: #9fb4ab; /* captions on night */
  /* Home art-direction study (site/home-art-study), colour study A/B: a pure white page for both variants, on the
     Home page only (body.home). 57e5ea2's alabaster (#f3f0ea) is kept in docs/home-art-study for comparison. */
  --ground: #ffffff;     /* the one continuous page surface, header and arrival included */
  --emerald: #0b5c4f;    /* deep emerald-jade ink: stipple, links */
  --copper: #a3461f;     /* burnt copper: the one focal route */
  --deep: #16251f;       /* text ink */
  --quiet: #585e59;      /* small text */
  --hair: #dadfdc;       /* hairlines on white: header rule, theme switch, screens, Privacy divider */
  --nightaccent: #e7b48d; /* “In development” on the deep jade section */
  /* Interactive atlas v2: the hero's Midnight card, the build section's cards and the warm-paper showcase. */
  --nightcard: #163029;  /* a card on the deep jade */
  --midnight: #0c1430;   /* the atlas card in Midnight (the globe's own ocean, a step deeper) */
  --midnighttext: #e6ebff;
  --midnightmuted: #9fb0e0;
  --mint: #7fefd9;       /* Midnight's journey colour */
  --warm: #f6f5f1;       /* Act 3's warm paper */
  --warmcard: #faf9f6;
  --warmline: #e4e0d6;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 75rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-wrap: break-word;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 16;   /* the app holds Newsreader's optical size at 16 (docs/fonts.md) */
  letter-spacing: -0.008em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

a { color: var(--brand); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.wide { max-width: 92rem; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; border-radius: 0.5rem; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Header */
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; padding: 0.25rem 0; }
.brand picture, .brand img.icon { flex: none; }
.brand .icon { width: 2.25rem; height: 2.25rem; border-radius: 22.5%; box-shadow: 0 0 0 1px rgba(28, 43, 39, 0.08); }
.brand .wordmark { width: auto; height: 1.85rem; }
.site-nav ul { list-style: none; display: flex; gap: 0.25rem; margin: 0; padding: 0; }
.site-nav a {
  display: inline-block; padding: 0.55rem 0.8rem; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: 0.97rem;
}
.site-nav a:hover { background: var(--soft); }
.site-nav a[aria-current="page"] { color: var(--brand); text-decoration: underline; text-underline-offset: 0.3em; }

/* Home — interactive atlas v2 (site/interactive-atlas-v2), in three acts: a crisp white hero with the live atlas card,
   a deep emerald section on how an atlas is built, and a warm-paper showcase with the offline and privacy summary.
   Scoped to body.home: Privacy and Support keep Editorial Jade's mineral white. */
.home { background: var(--ground); color: var(--deep); }
.home a { color: var(--emerald); }
.home :focus-visible { outline-color: var(--deep); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.home .it { font-style: italic; font-weight: 450; }
.eyebrow { font: 500 0.72rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--emerald); }

/* Controls that need the script are hidden until js/atlas-boot.js has said it can run (no layout change later). */
html:not(.atlas-js) .js-only { display: none; }

/* Header: brand · globe colours · navigation · status. Sticky on wide screens; two rows on a phone. */
.home .site-header { border-bottom: 1px solid var(--hair); background: var(--ground); }
.home .site-header .wrap, .home .site-footer .wrap { max-width: 86rem; }
.home .header-row { display: grid; grid-template-columns: auto 1fr auto auto; grid-template-areas: "brand theme nav badge"; align-items: center; column-gap: 1.25rem; min-height: 4rem; }
.home .brand { grid-area: brand; }
.home .brand .icon { width: 2rem; height: 2rem; }
.home .brand .wordmark { height: 1.6rem; }
.header-tools { display: contents; }
.theme-switch { grid-area: theme; justify-self: center; display: inline-flex; align-items: center; gap: 0.15rem; padding: 0.22rem; border: 1px solid var(--hair); border-radius: 999px; background: #f4f6f5; }
.theme-label { display: none; }
.theme-switch button {
  display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap; min-height: 2.1rem; padding: 0.3rem 0.85rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--deep); font: 500 0.84rem/1 var(--sans); cursor: pointer;
}
.theme-switch button:hover { background: rgba(22, 37, 31, 0.06); }
.theme-switch button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 2px rgba(22, 37, 31, 0.14), 0 0 0 1px rgba(22, 37, 31, 0.06); }
.swatch { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: #bfd8e2; box-shadow: inset 0 0 0 1.5px #0b5c4f; }
[data-theme="midnight"] .swatch { background: #101a36; box-shadow: inset 0 0 0 1.5px #8aa6ff; }
.home .site-nav { grid-area: nav; }
.home .site-nav a { color: var(--deep); font-size: 0.92rem; padding: 0.5rem 0.65rem; }
.home .site-nav a:hover { background: rgba(22, 37, 31, 0.06); }
.status-badge {
  grid-area: badge; display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap;
  padding: 0.32rem 0.75rem; border: 1px solid var(--hair); border-radius: 999px; font: 500 0.8rem/1.2 var(--sans); color: var(--deep);
}
.status-badge .dot { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 3px rgba(11, 92, 79, 0.14); }
html:not(.atlas-js) .home .header-row { grid-template-columns: auto 1fr auto auto; grid-template-areas: "brand . nav badge"; }
@media (min-width: 64rem) {
  .home .site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
  html { scroll-padding-top: 5.5rem; }
}
@media (max-width: 71.99rem) { .nav-anchor { display: none; } }
@media (max-width: 47.99rem) {
  .home .header-row { grid-template-columns: auto 1fr; grid-template-areas: "brand nav" "theme badge"; column-gap: 0.5rem; row-gap: 0.1rem; min-height: 0; padding-top: 0.55rem; padding-bottom: 0.6rem; }
  html:not(.atlas-js) .home .header-row { grid-template-areas: "brand nav" "badge badge"; }
  .home .site-nav { justify-self: end; }
  .home .site-nav ul { gap: 0; }
  .home .site-nav a { padding: 0.55rem 0.55rem; font-size: 0.9rem; }
  .theme-switch { justify-self: start; }
  .theme-switch button { gap: 0.35rem; min-height: 2rem; padding: 0.25rem 0.55rem; font-size: 0.76rem; }
  .status-badge { justify-self: end; gap: 0.4rem; font-size: 0.72rem; padding: 0.26rem 0.55rem; }
  html:not(.atlas-js) .status-badge { justify-self: start; }
}
@media (max-width: 22.5rem) { .swatch { display: none; } }

/* ── Act 1: the hero — copy, the sample's counts and Play history beside the live atlas card ───────────────────── */
.hero-inner {
  max-width: 86rem; margin: 0 auto; padding: clamp(1.4rem, 3vw, 2.4rem) var(--gutter) clamp(3rem, 6vw, 5rem);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.75rem, 4vw, 3rem); align-items: center;
}
.hero-copy { max-width: 36rem; }
.hero h1 { margin-top: 0.9rem; font-size: clamp(2.9rem, 1.6rem + 4.6vw, 5.6rem); line-height: 0.98; letter-spacing: -0.028em; color: var(--deep); }
.hero h1 .it { color: var(--emerald); letter-spacing: -0.02em; white-space: nowrap; }
.hero-lead { margin-top: clamp(1rem, 2.2vw, 1.5rem); max-width: 31rem; font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem); line-height: 1.6; color: var(--quiet); }

.counts { margin-top: clamp(1.4rem, 3vw, 2rem); max-width: 29rem; padding: 0.95rem 1.25rem 1.05rem; border: 1px solid var(--hair); border-radius: 1.1rem; background: #f7f9f8; }
.counts-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--hair); font: 500 0.68rem/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--quiet); }
.tag { flex: none; padding: 0.2rem 0.5rem; border: 1px solid var(--hair); border-radius: 0.4rem; background: #fff; letter-spacing: 0.04em; text-transform: none; font-size: 0.68rem; }
.counts-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
.count { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.86rem; color: var(--quiet); }
.count b { font: 500 clamp(1.9rem, 1.6rem + 1vw, 2.35rem)/1 var(--serif); font-variation-settings: "opsz" 16; font-variant-numeric: lining-nums tabular-nums; color: var(--deep); }
.count.is-countries b { color: var(--emerald); }
.count.is-journeys b { color: var(--copper); }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.4rem; margin-top: clamp(1.3rem, 2.6vw, 1.8rem); }
.play {
  display: inline-flex; align-items: center; gap: 0.65rem; min-height: 3.1rem; padding: 0.75rem 1.5rem 0.75rem 1.2rem;
  border: 0; border-radius: 999px; background: var(--emerald); color: #fff; cursor: pointer;
  font: 600 1rem/1 var(--sans); box-shadow: 0 10px 24px -12px rgba(11, 92, 79, 0.7);
}
.play:hover { background: #094b40; }
.home .play:focus-visible, .home .play-mini:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; }
.play-icon { width: 0.78rem; height: 0.86rem; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
[data-state="playing"] .play-icon { clip-path: polygon(0 0, 36% 0, 36% 100%, 0 100%, 0 0, 64% 0, 100% 0, 100% 100%, 64% 100%, 64% 0); }
[data-state="ended"] .play-icon { clip-path: polygon(0 0, 100% 50%, 0 100%); }
.replay { min-height: 2.75rem; padding: 0.5rem 0.2rem; border: 0; background: none; color: var(--emerald); font: 600 0.95rem/1 var(--sans); text-decoration: underline; text-underline-offset: 0.25em; cursor: pointer; }
.replay[hidden] { display: none; }
.arrow-link { display: inline-flex; gap: 0.35rem; padding: 0.5rem 0; color: var(--deep) !important; font-weight: 500; text-decoration: none; border-bottom: 1.5px solid var(--copper); }
.arrow-link span { color: var(--copper); }
.hint { margin-top: 0.85rem; font-size: 0.84rem; color: var(--quiet); }
@media (hover: hover) and (pointer: fine) { .hint-touch { display: none; } }
@media (hover: none), (pointer: coarse) { .hint-mouse { display: none; } }

/* The atlas card: coordinates, the globe with the chosen journey, Play history on its timeline, the journeys. */
.atlas-card {
  position: relative; min-width: 0; padding: 0.95rem clamp(0.85rem, 1.6vw, 1.25rem) clamp(0.9rem, 1.6vw, 1.2rem);
  border: 1px solid #e2e7e4; border-radius: 1.75rem; background: #fff;
  box-shadow: 0 1px 2px rgba(22, 37, 31, 0.05), 0 28px 60px -34px rgba(22, 37, 31, 0.38);
}
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.25rem; padding: 0 0.3rem; }
.coords { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 500 0.7rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--quiet); }
.ghost-button { flex: none; white-space: nowrap; min-height: 2.25rem; padding: 0.3rem 0.85rem; border: 1px solid var(--hair); border-radius: 999px; background: #fff; color: var(--deep); font: 500 0.74rem/1 var(--mono); cursor: pointer; }
.ghost-button:hover { border-color: #b9c4be; }
.globe-area { position: relative; margin-top: 0.35rem; border-radius: 1.2rem; }
.atlas-live .globe-area { background: radial-gradient(circle, rgba(22, 37, 31, 0.1) 1px, transparent 1.3px) 0 0 / 22px 22px; }
.hero-globe { position: relative; width: min(100%, 35rem); aspect-ratio: 1; margin: 0 auto; }
.hero-globe img { width: 100%; height: 100%; }
.atlas-canvas, .mini-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Touch: the browser keeps vertical scrolling and pinch-zoom; a clearly sideways swipe is left to the globe's script. */
.atlas-canvas { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: pan-y pinch-zoom; }
@media (hover: hover) and (pointer: fine) { .atlas-canvas { cursor: grab; } .atlas-canvas.dragging { cursor: grabbing; } }
.atlas-live .hero-globe img, .atlas-js .phone-globe img { opacity: 0; }
.atlas-js .phone-globe img { display: none; }

.trip-card { margin-top: 0.85rem; padding: 0.85rem 1.05rem 0.9rem; border: 1px solid #e2e7e4; border-radius: 1rem; background: rgba(255, 255, 255, 0.95); box-shadow: 0 12px 30px -20px rgba(22, 37, 31, 0.45); pointer-events: none; }
.trip-kicker { font: 600 0.68rem/1.35 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper); }
.trip-title { margin-top: 0.3rem; font: 500 1.35rem/1.15 var(--serif); font-variation-settings: "opsz" 16; color: var(--deep); }
.trip-route { margin-top: 0.4rem; font: 500 0.76rem/1.45 var(--mono); color: var(--quiet); }
@media (min-width: 64rem) {
  .trip-card { position: absolute; left: 0.25rem; bottom: 0.5rem; width: min(23rem, 62%); margin: 0; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
}

.timeline { display: flex; align-items: center; gap: 0.85rem; margin-top: 0.85rem; padding: 0.6rem 0.95rem 0.5rem 0.6rem; border: 1px solid #e2e7e4; border-radius: 1.1rem; background: #fbfcfb; }
.play-mini { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: var(--emerald); color: #fff; cursor: pointer; }
.play-mini .play-icon { width: 0.7rem; height: 0.78rem; margin-left: 0.12rem; }
.play-mini[data-state="playing"] .play-icon { margin-left: 0; }
.timeline-body { flex: 1; min-width: 0; }
.timeline-head { display: flex; justify-content: space-between; gap: 1rem; white-space: nowrap; font: 600 0.74rem/1.3 var(--mono); color: var(--deep); }
.timeline-span { font-weight: 500; color: var(--quiet); }
.years-range { --fill: var(--emerald); --track: #dde3df; display: block; width: 100%; height: 1.5rem; margin: 0.15rem 0 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.years-range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--fill) calc(var(--p, 1) * 100%), var(--track) 0); }
.years-range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--track); }
.years-range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--fill); }
.years-range::-webkit-slider-thumb { -webkit-appearance: none; width: 1.05rem; height: 1.05rem; margin-top: calc(2px - 0.525rem); border-radius: 50%; background: var(--copper); border: 2.5px solid #fff; box-shadow: 0 0 0 1px rgba(22, 37, 31, 0.25), 0 2px 5px rgba(22, 37, 31, 0.25); }
.years-range::-moz-range-thumb { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--copper); border: 2.5px solid #fff; box-shadow: 0 0 0 1px rgba(22, 37, 31, 0.25); }
.years-range:focus-visible { outline: 3px solid var(--deep); outline-offset: 2px; border-radius: 6px; }
/* Each year's label sits under its stop of the slider (the thumb is 1.05rem wide); a pointer can pick a year by its label. */
.years-ticks { position: relative; height: 1rem; margin: 0.05rem 0 0; padding: 0; list-style: none; font: 500 0.6rem/1 var(--mono); color: var(--quiet); }
.years-ticks li { position: absolute; top: 0; left: calc(0.525rem + (100% - 1.05rem) * var(--t) / 7); transform: translateX(-50%); padding: 0.15rem 0.1rem; white-space: nowrap; cursor: pointer; }
.years-ticks li:hover { color: var(--deep); }
.years-ticks li:nth-child(2) { --t: 1; } .years-ticks li:nth-child(3) { --t: 2; } .years-ticks li:nth-child(4) { --t: 3; } .years-ticks li:nth-child(5) { --t: 4; }
.years-ticks li:nth-child(6) { --t: 5; } .years-ticks li:nth-child(7) { --t: 6; } .years-ticks li:nth-child(8) { --t: 7; } .years-ticks li:nth-child(1) { --t: 0; }
.globe-midnight .years-ticks li:hover { color: var(--midnighttext); }

/* The journeys: every chip is on screen at once. They wrap onto a second row where one row is too narrow (compact
   rows on a phone); nothing scrolls sideways and nothing is clipped. Dates stay in the overlay and the timeline. */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.85rem; }
.chips button {
  flex: none; display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0.55rem 0.85rem; border: 1px solid #dfe5e1; border-radius: 999px;
  background: #fff; color: var(--deep); font: 500 0.85rem/1.1 var(--sans); cursor: pointer; white-space: nowrap;
}
.chips button:hover { border-color: #b9c4be; }
.chips button[aria-pressed="true"] { background: var(--deep); border-color: var(--deep); color: #fff; }

/* Midnight: the card follows the globe's colours; the page stays light. */
.globe-midnight .atlas-card { background: var(--midnight); border-color: #1f2b55; color: var(--midnighttext); box-shadow: 0 28px 60px -30px rgba(9, 14, 40, 0.65); }
.globe-midnight.atlas-live .globe-area { background-image: radial-gradient(circle, rgba(160, 184, 255, 0.13) 1px, transparent 1.3px); }
.globe-midnight .coords, .globe-midnight .timeline-span, .globe-midnight .years-ticks, .globe-midnight .trip-route { color: var(--midnightmuted); }
.globe-midnight .ghost-button { background: transparent; border-color: #2a3765; color: var(--midnighttext); }
.globe-midnight .trip-card { background: rgba(12, 20, 48, 0.9); border-color: #27345f; }
.globe-midnight .trip-kicker { color: var(--mint); }
.globe-midnight .trip-title, .globe-midnight .timeline-head { color: var(--midnighttext); }
.globe-midnight .timeline { background: #101a3a; border-color: #27345f; }
.globe-midnight .years-range { --fill: #ffc76b; --track: #2a3765; }
.globe-midnight .chips button { background: #111b3d; border-color: #2a3765; color: var(--midnighttext); }
.globe-midnight .chips button[aria-pressed="true"] { background: var(--midnighttext); border-color: var(--midnighttext); color: var(--midnight); }
.globe-midnight .atlas-card :focus-visible { outline-color: var(--midnighttext); }

@media (min-width: 64rem) {
  .hero-inner { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: clamp(2.5rem, 4.5vw, 4.5rem); }
  .hero-globe { width: min(100%, 33rem); }
}
@media (min-width: 64rem) and (max-height: 60rem) { .hero-globe { width: min(100%, 30rem); } }
@media (max-width: 47.99rem) {
  .hero-inner { padding-top: 1.4rem; gap: 1.75rem; }
  .counts { padding: 0.8rem 1rem 0.9rem; }
  .counts-head { min-height: 2.45rem; letter-spacing: 0.05em; font-size: 0.64rem; }   /* two lines held, so the card never grows while playing */
  .coords { letter-spacing: 0.04em; font-size: 0.66rem; }
  .tag { font-size: 0.64rem; padding: 0.18rem 0.4rem; }
  .atlas-card { border-radius: 1.4rem; }
  .chips { gap: 0.4rem 0.35rem; }
  .chips button { min-height: 2.25rem; padding: 0.45rem 0.62rem; font-size: 0.8rem; }
  .card-top { min-height: 2.25rem; }
}

/* ── Act 2: how an atlas is built — deep emerald, the Nocturne Jade Dark icon's ground ─────────────────────────── */
.build { background: var(--night); color: var(--nighttext); padding: clamp(4rem, 9vw, 7rem) 0; }
.build .wrap { max-width: 86rem; }
.build .eyebrow { color: var(--nightaccent); }
.build-head { max-width: 46rem; }
.build h2 { margin-top: 0.9rem; font-size: clamp(2.3rem, 1.5rem + 3vw, 4rem); line-height: 1.02; letter-spacing: -0.022em; color: var(--paper); }
.build h2 .it { color: #93d6c0; white-space: nowrap; }
.build-note { max-width: 46rem; margin-top: clamp(1.4rem, 2.6vw, 1.9rem); font-size: 0.92rem; line-height: 1.55; color: var(--nightmuted); }
.build-note + .ways { margin-top: clamp(1.5rem, 3vw, 2.1rem); }
.build-lead { margin-top: 1.1rem; font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.18rem); line-height: 1.6; color: var(--nighttext); }
.ways { list-style: none; margin: clamp(2.2rem, 5vw, 3.5rem) 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 64rem) { .ways { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.way {
  display: flex; flex-direction: column; min-width: 0; padding: clamp(1.35rem, 2.4vw, 1.85rem) clamp(1.2rem, 2.2vw, 1.75rem);
  border: 1px solid rgba(219, 229, 224, 0.1); border-radius: 1.5rem; background: var(--nightcard);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 30px 50px -40px rgba(0, 0, 0, 0.6);
}
.way-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; min-height: 1.6rem; }   /* the same height with or without a badge */
.way-num { font: 500 0.7rem/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--nightmuted); }
.way-badge { padding: 0.22rem 0.6rem; border: 1px solid rgba(219, 229, 224, 0.2); border-radius: 999px; font: 500 0.68rem/1.3 var(--mono); color: var(--nighttext); }
.way-badge.is-dev { color: var(--nightaccent); border-color: rgba(231, 180, 141, 0.5); background: rgba(231, 180, 141, 0.08); }
.way h3 { margin-top: 1.1rem; font-size: clamp(1.45rem, 1.3rem + 0.5vw, 1.7rem); line-height: 1.15; color: var(--paper); }
.way-text { margin-top: 0.75rem; font-size: 0.97rem; line-height: 1.62; color: var(--nighttext); }
/* One preview per card: a label (where it has one), a name, a line under it. The same box in all three, at the card's foot. */
.way-demo {
  display: flex; flex-direction: column; justify-content: center; min-height: 6.6rem; margin-top: auto; padding: 1rem 1.15rem;
  border: 1px solid rgba(219, 229, 224, 0.1); border-radius: 1rem; background: #0c1c18;
}
.way-text + .way-demo { margin-top: auto; }
.way-text { margin-bottom: 1.5rem; }
.demo-label { margin-bottom: 0.45rem; font: 500 0.64rem/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nightmuted); }
.demo-title { font: 500 1.3rem/1.2 var(--serif); font-variation-settings: "opsz" 16; color: var(--paper); }
.demo-sub { margin-top: 0.3rem; font-size: 0.82rem; line-height: 1.4; color: var(--nightmuted); }

/* ── Act 3: the app itself on warm paper — three views and one phone — then the offline and privacy summary ──── */
.showcase { background: var(--warm); padding: clamp(4rem, 9vw, 7rem) 0 clamp(3.5rem, 7vw, 5.5rem); }
.showcase .wrap, .closing .wrap { max-width: 86rem; }
.showcase-inner { display: grid; gap: clamp(2.5rem, 6vw, 4rem); align-items: center; }
@media (min-width: 64rem) { .showcase-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.showcase .eyebrow { color: var(--copper); }
.showcase h2 { margin-top: 0.9rem; font-size: clamp(2.3rem, 1.5rem + 3vw, 3.9rem); line-height: 1.02; letter-spacing: -0.022em; color: var(--deep); }
.showcase h2 .it { color: var(--emerald); }
.showcase-lead { margin-top: 1rem; max-width: 33rem; font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.15rem); line-height: 1.6; color: var(--quiet); }
.views { display: grid; gap: 0.75rem; margin-top: clamp(1.6rem, 3vw, 2.2rem); max-width: 35rem; }
.view { padding: 0.95rem 1.15rem 1rem; border: 1px solid var(--warmline); border-radius: 1rem; background: var(--warmcard); }
.view-name { display: flex; align-items: center; gap: 0.6rem; font: 600 1rem/1.3 var(--sans); color: var(--deep); }
.view-name span { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; border: 1px solid var(--warmline); font: 500 0.7rem/1 var(--mono); color: var(--quiet); }
.view-text { margin-top: 0.3rem; padding-left: 2.05rem; font-size: 0.9rem; line-height: 1.55; color: var(--quiet); }
.view[role="tab"] { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s; }
.view[role="tab"]:hover { border-color: #cbc5b6; }
.view[aria-selected="true"] { background: #fff; border-color: var(--emerald); box-shadow: 0 0 0 1px var(--emerald), 0 14px 30px -22px rgba(22, 37, 31, 0.5); }
.view[aria-selected="true"] .view-name span { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.view:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; }

.phone-figure { margin: 0; display: grid; justify-items: center; }
.phone { width: min(19.5rem, 86vw); padding: 0.7rem; border-radius: 3rem; background: #1a2420; box-shadow: 0 0 0 1px #2b3631 inset, 0 50px 80px -40px rgba(22, 37, 31, 0.55), 0 20px 40px -30px rgba(22, 37, 31, 0.35); }
.phone-screen { position: relative; display: flex; flex-direction: column; height: 38rem; overflow: hidden; border-radius: 2.35rem; background: #f3f6f4; }
.phone-head { padding: 2.6rem 1.1rem 0.4rem; }
.phone-island { position: absolute; top: 0.6rem; left: 50%; width: 5.6rem; height: 1.55rem; margin-left: -2.8rem; border-radius: 999px; background: #0d1210; }
.phone-wordmark { width: auto; height: 1.35rem; }
.phone-stats { margin-top: 0.35rem; font-size: 0.7rem; color: var(--quiet); }
.phone-stats b { color: var(--deep); font-weight: 600; }
.phone-panel { flex: 1; min-height: 0; overflow: hidden; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.phone-panel[data-panel="atlas"] { -webkit-mask-image: none; mask-image: none; display: flex; flex-direction: column; justify-content: space-between; }
.phone-panel[hidden] { display: none; }
.phone-globe { position: relative; width: 84%; aspect-ratio: 1; margin: 0.6rem auto 0; }
.phone-globe img { width: 100%; height: 100%; border-radius: 50%; }
.phone-card { margin: 0 0.75rem; padding: 0.75rem 0.9rem 0.7rem; border-radius: 1rem; background: #fff; box-shadow: 0 8px 22px -14px rgba(22, 37, 31, 0.45); }
.pc-title { font: 500 1.05rem/1.2 var(--serif); font-variation-settings: "opsz" 16; color: var(--deep); }
.pc-sub { margin-top: 0.15rem; font-size: 0.7rem; color: var(--quiet); }
.pc-route { margin-top: 0.4rem; font: 500 0.68rem/1.4 var(--mono); color: var(--deep); }
.pc-foot { margin-top: 0.5rem; padding-top: 0.45rem; border-top: 1px solid #e6ebe8; font-size: 0.64rem; color: var(--quiet); }
.pl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 1.1rem 0.45rem; font: 500 1.2rem/1.2 var(--serif); font-variation-settings: "opsz" 16; color: var(--deep); }
.pl-head span { font: 500 0.64rem/1 var(--mono); color: var(--quiet); }
.pl-list, .jr-list { list-style: none; margin: 0 0.75rem; padding: 0 0.85rem; border-radius: 0.9rem; background: #fff; }
.pl-list li, .jr-list li { display: flex; flex-direction: column; padding: 0.5rem 0; border-bottom: 1px solid #ebefec; }
.pl-list li:last-child, .jr-list li:last-child { border-bottom: 0; }
.pl-list b, .jr-list b { font-size: 0.8rem; font-weight: 600; color: var(--deep); }
.pl-list span, .jr-list span { font-size: 0.68rem; color: var(--quiet); }
.jr-year { padding: 0.55rem 1.2rem 0.3rem; font: 500 0.62rem/1 var(--mono); letter-spacing: 0.1em; color: var(--quiet); }
.phone-bar { display: flex; margin: 0.55rem 0.75rem 0.9rem; padding: 0.22rem; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px #e1e7e3; }
.phone-bar span { flex: 1; padding: 0.45rem 0; border-radius: 999px; text-align: center; font: 500 0.72rem/1 var(--sans); color: var(--deep); }
.phone-bar span.is-on { background: var(--emerald); color: #fff; }
.phone-figure figcaption { max-width: 21rem; margin-top: 1.1rem; text-align: center; font-size: 0.8rem; line-height: 1.5; color: var(--quiet); }

.closing { background: var(--warm); padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(4rem, 8vw, 6rem); border-top: 1px solid var(--warmline); }
.home .closing .closing-inner { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (min-width: 64rem) { .home .closing .closing-inner { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); } }
.closing h2 { margin-top: 0.9rem; font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.4rem); line-height: 1.04; letter-spacing: -0.02em; color: var(--deep); }
.closing h2 .it { color: var(--emerald); }
.closing-lead { margin-top: 1rem; max-width: 30rem; font-size: 1.05rem; line-height: 1.6; color: var(--quiet); }
.closing-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1.4rem; }
.more { font-weight: 600; padding: 0.4rem 0; }
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 40rem) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.principle { padding: 1.3rem 1.4rem 1.4rem; border: 1px solid var(--warmline); border-radius: 1.15rem; background: var(--warmcard); }
.pr-kicker { font: 500 0.68rem/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--emerald); }
.pr-kicker.is-copper { color: var(--copper); }
.principle h3 { margin-top: 0.55rem; font-size: 1.3rem; line-height: 1.2; color: var(--deep); }
.principle p:last-child { margin-top: 0.5rem; font-size: 0.92rem; line-height: 1.58; color: var(--quiet); }

.home .site-footer { background: var(--warm); border-top-color: var(--warmline); color: var(--quiet); }
.home .site-footer .by, .home .site-footer nav a { color: var(--deep); }
.home .site-footer .sep { color: var(--warmline); }

@media (prefers-reduced-motion: reduce) { .view[role="tab"] { transition: none; } }

/* Document pages: Privacy and Support */
.doc { max-width: 44rem; padding: clamp(1.5rem, 5vw, 3.5rem) 0 clamp(3rem, 8vw, 5rem); }
.doc h1 { font-size: clamp(2.4rem, 1.9rem + 2.6vw, 3.6rem); }
.doc .kicker { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.6rem; }
.doc .meta { color: var(--muted); font-size: 0.97rem; margin-top: 0.9rem; }
.doc .lead { font-size: 1.2rem; line-height: 1.55; margin-top: 1rem; }
.doc h2 { font-size: clamp(1.6rem, 1.4rem + 0.9vw, 2rem); margin: 2.6rem 0 0.8rem; scroll-margin-top: 1.5rem; }
.doc h3 { font-size: 1.3rem; margin: 1.8rem 0 0.5rem; }
.doc p + p, .doc ul + p, .doc p + ul { margin-top: 0.9rem; }
.doc ul { padding-left: 1.25rem; margin: 0; }
.doc li + li { margin-top: 0.45rem; }
.index { margin-top: 2rem; padding: 1.1rem 1.4rem; background: var(--panel); border: 1px solid var(--soft); border-radius: 0.9rem; }
.index h2 { font-family: var(--sans); font-size: 0.95rem; font-weight: 600; letter-spacing: 0; margin: 0 0 0.5rem; }
.index ul { list-style: none; padding: 0; columns: 2 14rem; column-gap: 2rem; }
.index li { break-inside: avoid; }
.index li + li { margin-top: 0.3rem; }
.note { margin-top: 2rem; padding: 1.1rem 1.4rem; background: var(--panel); border: 1px solid var(--soft); border-left: 3px solid var(--brand); border-radius: 0.6rem; }
.note p + p { margin-top: 0.6rem; }
.doc .note h2 { margin: 0 0 0.6rem; font-size: 1.4rem; }
.faq h2 { scroll-margin-top: 1.5rem; }

/* Footer: compact, under a fine divider */
.site-footer { border-top: 1px solid var(--soft); padding: 1.25rem 0 1.5rem; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 2rem; }
.site-footer .by { color: var(--ink); font-weight: 600; }
.site-footer nav a { color: var(--ink); padding: 0.4rem 0.1rem; }
.site-footer .sep { margin: 0 0.45rem; color: var(--line); }

/* 404 */
.notfound { padding: clamp(3rem, 10vw, 7rem) 0; max-width: 36rem; }
.notfound h1 { font-size: clamp(2.2rem, 1.8rem + 2vw, 3rem); }
.notfound p { margin-top: 1rem; }
