/* =====================================================================
   The Last Station — public routes (marketing, privacy, terms, support)

   HOUSE SYSTEM. The :root tokens below are the shared XPLabs estate set,
   identical to the Space Glyph and Life XP bundles, so the three titles
   sit inside one estate rather than beside each other. The accent is the
   violet Games theme from play.xplabs.us, not the corporate green and not
   the game's own phosphor green — the origin sets the theme, the product
   does not.

   Do not delete the :root block. The Life XP bundle shipped without it and
   every var() on its privacy policy silently fell back to the UA default:
   serif type, no gutters, no heading scale, on a legally-required page.
   Nothing errors and nothing warns — the page just quietly stops being
   designed. If you fork this file, fork the tokens with it.

   This file deliberately does NOT replicate the estate's shared nav. That
   nav is JavaScript-driven and synced by tools/sync_nav.py. A copy here
   would drift silently and the drift would land on a page Apple reads
   during review. The header below is a static, no-JS reduction.

   THERE IS NO JAVASCRIPT ON THESE PAGES, and there must not be. The
   privacy policy states these pages carry no scripts, cookies, pixels,
   external fonts, or remote images. Adding any breaks a published claim.

   Paths are absolute from /the-last-station/, so the bundle deploys to any
   origin without edits.
   ===================================================================== */

:root {
  --ink: #07090A;
  --ink-2: #0A0D0E;
  --surface: #101016;
  --surface-2: #17161F;
  --line: #1E2527;
  --line-soft: #161C1D;
  --paper: #E9EFEC;        /* 16.3:1 on --ink */
  --muted: #9BA8A3;        /* 7.9:1 on --ink */
  --muted-dim: #7E8B86;    /* 5.4:1 on --ink — labels only, never body text */
  --signal: #A98BFF;       /* 7.43:1 on --ink — the Games violet */
  --amber: #F5A524;        /* 9.6:1 on --ink — does not vary across the estate */

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --t-micro: 0.6875rem;
  --t-small: 0.8125rem;
  --t-body: 1.0625rem;
  --t-lead: clamp(1.125rem, 1.02rem + 0.42vw, 1.375rem);
  --t-h3: clamp(1.1875rem, 1.12rem + 0.3vw, 1.4375rem);
  --t-h2: clamp(1.75rem, 1.4rem + 1.6vw, 2.625rem);
  --t-h1: clamp(2.0625rem, 1.55rem + 2.35vw, 3.375rem);

  --gap: 1.5rem;
  --section-y: clamp(3rem, 5.5vw, 5rem);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --maxw: 1180px;
  --readw: 46rem;
  --radius: 3px;
  --header-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 0.5rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--signal);
  color: var(--ink);
  border-radius: var(--radius);
  font-weight: 600;
}

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

/* ---- header ------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--gap);
  flex-wrap: wrap;
  width: 100%;
  padding-block: 0.65rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-inline-end: auto;
}
.brand svg { flex: none; }
.brand b { font-weight: 700; }
.brand span {
  font-family: var(--mono);
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-dim);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2.4vw, 1.6rem);
  flex-wrap: wrap;
  font-size: var(--t-small);
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  padding-block: 0.2rem;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--paper); }
.nav-links a[aria-current="page"] {
  color: var(--paper);
  border-bottom-color: var(--signal);
}

/* ---- page furniture ----------------------------------------------- */

main { display: block; }

.page {
  padding-block: var(--section-y);
}

.doc {
  max-width: var(--readw);
}

.eyebrow {
  font-family: var(--mono);
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--signal);
  margin: 0 0 0.65rem;
}

h1 {
  font-size: var(--t-h1);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

h2 {
  font-size: var(--t-h2);
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 2.75rem 0 0.85rem;
  text-wrap: balance;
}

h3 {
  font-size: var(--t-h3);
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

p, ul, ol { margin: 0 0 1.05rem; }
ul, ol { padding-inline-start: 1.25rem; }
li { margin-block: 0.4rem; }

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

.meta {
  font-family: var(--mono);
  font-size: var(--t-small);
  color: var(--muted-dim);
}

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

/* ---- home ---------------------------------------------------------- */

.hero { padding-block-end: 1rem; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block-start: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--signal);
  background: var(--signal);
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: 600;
  text-decoration: none;
}
.btn.secondary {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}
.btn.secondary:hover { border-color: var(--signal); color: var(--paper); }
span.btn { cursor: default; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--gap);
  margin-block-start: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
}
.card p { margin: 0; color: var(--muted); }

/* ---- notices ------------------------------------------------------- */

.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--signal);
  border-radius: var(--radius);
  padding: 1.35rem;
  margin-block: 1.75rem;
}
.notice > :last-child { margin-bottom: 0; }
.notice h2, .notice h3 { margin-block-start: 0; }
.notice.warning { border-left-color: var(--amber); }

/* ---- faq ----------------------------------------------------------- */

details {
  border-bottom: 1px solid var(--line-soft);
  padding-block: 0.35rem;
}
details summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 2rem 0.85rem 0;
  position: relative;
  font-weight: 600;
  color: var(--paper);
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  color: var(--signal);
  font-size: 1.15rem;
  line-height: 1;
}
details[open] summary::after { content: "\2212"; }
details p {
  color: var(--muted);
  padding-block-end: 0.65rem;
  margin-bottom: 0;
}

/* ---- footer -------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--ink-2);
  padding-block: 2.5rem;
  margin-block-start: var(--section-y);
  font-size: var(--t-small);
}
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.4rem;
  margin-bottom: 1.4rem;
}
.foot-nav a {
  color: var(--muted);
  text-decoration: none;
}
.foot-nav a:hover { color: var(--paper); }
.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  justify-content: space-between;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: var(--t-micro);
}

/* ---- preferences --------------------------------------------------- */

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

@media (prefers-contrast: more) {
  :root {
    --muted: #C9D3CF;
    --muted-dim: #C9D3CF;
    --line: #46514F;
    --line-soft: #46514F;
  }
}

@media print {
  .site-header, .foot-nav, .cta-row { display: none; }
  body { background: #fff; color: #000; }
  main a { color: #000; }
}
