/* Seven Worlds public pages.
 *
 * The palette, the two typefaces and the engraved rules are the game's own, not
 * a website approximation of them: Cinzel and Sarabun are the exact files the
 * app bundles, subset here to Latin, and every colour is a token from
 * lib/core/theme/app_colors.dart. Somebody arriving from the Play listing
 * should recognise the surface.
 *
 * There is no inline style anywhere in these pages. Production Traefik serves
 * them under style-src 'self' with no 'unsafe-inline', and a page that needs an
 * exception to render is a page that stops rendering the day the header is
 * tightened.
 *
 * THE GUTTER RULE. Every page except the home page puts .wrap and its block
 * class on ONE element — <div class="wrap doc"> — so a block that writes the
 * `padding` shorthand silently sets .wrap's inline padding to 0 and the whole
 * page runs edge to edge. That is exactly what `.doc { padding: 34px 0 10px }`
 * did on eleven of the twelve pages, and it is invisible to an overflow check
 * because nothing overflows: the text simply starts on the first pixel of the
 * screen. So .wrap owns `padding-inline` and every block that composes with it
 * writes `padding-block` and never the shorthand. site_test.go fails on a
 * shorthand declared for any composing class.
 */

/* font-display is `optional`, not `swap`, and the two faces below the fold
 * still are.
 *
 * `swap` paints in a fallback and re-lays the page out when the real face
 * arrives, and on this page that reflow moved the whole hero block: Lighthouse
 * measured desktop CLS at 0.16 against a 0.1 Core Web Vitals bar and named
 * "Web font loaded" as the entire cause. Mobile appeared clean at 0.007 only
 * because the throttled load pushed the swap past the end of the measurement
 * window — preloading the fonts brought it inside and it read 0.191, which is
 * what a real reader was getting all along.
 *
 * `optional` gives the face a short block period and then commits: it is used
 * from the first frame or it is not used for that load at all, and either way
 * nothing re-lays out. The two faces above the fold are preloaded in
 * layout.html so they almost always win that window, and any load that misses
 * it renders in the fallback and has the real face cached for the next page.
 * The cost is a first visit on a slow link seeing the fallback serif; the
 * alternative was every visit shifting under the reader. */
@font-face {
  font-family: 'Cinzel';
  src: url('/assets/fonts/Cinzel-Regular.woff2') format('woff2');
  font-weight: 400 700;
  font-display: optional;
}

@font-face {
  font-family: 'Sarabun';
  src: url('/assets/fonts/Sarabun-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: optional;
}

@font-face {
  font-family: 'Sarabun';
  src: url('/assets/fonts/Sarabun-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: optional;
}

:root {
  --ground: #14082b;
  --ground-deep: #0c0420;
  --deep-purple: #1a0a2e;
  --card: #1e1e2c;
  --card-warm: #241634;
  --ink-black: #1c1c1e;
  --gold: #d4af37;
  --gold-hi: #f0d9a0;
  --parchment: #f5e6c8;
  --saffron: #ff9933;
  --correct: #4caf50;
  --danger: #e53935;

  --text: var(--parchment);
  /* Both dims are measured against the grounds they actually stand on. The
   * previous 0.44 faint composited to 3.70:1 and carried every caption, the
   * whole footer and the input placeholder. */
  --text-dim: rgba(245, 230, 200, 0.72);
  --text-faint: rgba(245, 230, 200, 0.6);
  --hairline: rgba(212, 175, 55, 0.3);
  --hairline-soft: rgba(212, 175, 55, 0.16);

  /* A raised surface catches the same light the page is read under: one lit lip
   * along its crown, one soft cast under its foot. Nothing on these pages lifts
   * by being brighter than the ground. */
  --lip: rgba(255, 240, 205, 0.075);
  --cast: 0 20px 46px -26px rgba(0, 0, 0, 0.9);

  --display: 'Cinzel', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --body: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --cipher: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  /* One fluid scale, so a 1280px page is not a 375px page with more empty
   * ground around it. */
  --step--2: clamp(13px, 12.6px + 0.11vw, 14px);
  --step--1: clamp(14.5px, 14px + 0.13vw, 15.5px);
  --step-0: clamp(16px, 15.4px + 0.16vw, 17.5px);
  --step-1: clamp(17px, 15.6px + 0.38vw, 20px);
  --step-2: clamp(21px, 18.4px + 0.7vw, 27px);
  --step-3: clamp(26px, 20.6px + 1.44vw, 38px);
  --step-4: clamp(30px, 21.4px + 2.3vw, 52px);

  --gutter: clamp(20px, 5.2vw, 40px);
  --column: 1120px;
  --measure: 68ch;
  --radius: 14px;
  --radius-sm: 10px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

/* The page is a material, not a fill. Four layers, all procedural, all fixed,
 * all behind the content: grain, edge fall-off, and the two lamps the page is
 * read under. The grain is an SVG data URI, which the CSP already allows under
 * img-src 'self' data: — it is a background image, not inline style. */
body {
  margin: 0;
  background-color: var(--ground);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)' opacity='0.55'/%3E%3C/svg%3E"),
    radial-gradient(150% 110% at 50% 38%, transparent 54%, rgba(6, 2, 16, 0.42) 100%),
    radial-gradient(120% 64% at 50% -8%, rgba(212, 175, 55, 0.17), transparent 62%),
    radial-gradient(88% 52% at 10% 2%, rgba(255, 153, 51, 0.1), transparent 60%);
  background-repeat: repeat, no-repeat, no-repeat, no-repeat;
  background-size: 200px 200px, auto, auto, auto;
  background-position: 0 0, 50% 40%, 50% 0, 10% 0;
  background-blend-mode: soft-light, normal, normal, normal;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold-hi);
  text-decoration-color: var(--hairline);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--gold);
}

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

img {
  max-width: 100%;
  height: auto;
}

/* Type on this page is cut into it: the lower lip of the stroke catches the
 * lamp, the upper lip casts back into the groove. On a dark ground the lit stop
 * is what reads as depth, which is the inversion the Campaign surfaces make. */
.decode,
.section__title,
.doc__title,
.doc__body h1,
.doc__body h2,
.mode__name,
.panel__title,
.figure__value {
  text-shadow:
    0 1px 0 rgba(255, 240, 205, 0.09),
    0 -1px 0 rgba(0, 0, 0, 0.5);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--deep-purple);
  border: 1px solid var(--gold);
  border-radius: 8px;
}

/* .wrap owns the gutter and nothing else may write it. See THE GUTTER RULE. */
.wrap {
  width: 100%;
  max-width: var(--column);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- masthead ---------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--hairline-soft);
  background: rgba(16, 6, 35, 0.88);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.masthead__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
  color: var(--text);
}

.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.brand__name {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--gold-hi);
}

.masthead__nav {
  order: 2;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 22px);
}

.masthead__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-dim);
  font-size: var(--step--2);
  text-decoration: none;
}

.masthead__nav a:hover {
  color: var(--gold-hi);
}

.masthead__link {
  order: 3;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: var(--step--2);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-hi);
  background: rgba(212, 175, 55, 0.08);
}

.masthead__link:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.16);
}

/* The four section links used to be display:none below 760px, which left the
 * whole marketing site reachable from a phone only through the footer. They
 * total about 240px of text; they were hidden because the row could not wrap,
 * not because there was no room. The nav takes a row of its own instead. */
@media (max-width: 760px) {
  .masthead__row {
    padding-block: 6px;
  }

  .masthead__link {
    order: 2;
  }

  .masthead__nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    padding-top: 2px;
    border-top: 1px solid var(--hairline-soft);
  }

  .masthead__nav a {
    min-height: 40px;
  }
}

/* ---- hero -------------------------------------------------------------- */

/* The hero is a diptych: the two worlds the game is actually about, side by
 * side, with the headline standing on the seam between them. The page used to
 * open on a wordmark, a headline and a button over empty ground — a marketing
 * site for a game with 610 photographed objects and a hundred painted mission
 * scenes that showed a reader no pixel of any of it.
 *
 * The wordmark went with that change rather than being stacked on top of it.
 * The masthead, the tab title and the share card all carry the name already,
 * and the hero's first 200px is worth more than a third repeat of it.
 *
 * THE HERO INVERTS ON A PHONE. Above 760px the words stand over the field.
 * Below it they cannot: each half is then about 180px wide, the field would
 * have to crop a 1.45 landscape to a hard portrait, and a three-line display
 * headline plus a lede plus a 52pt button has nowhere to sit on top of it. So
 * the field becomes a band across the top and the words stand on the page
 * under it, which is the same composition read in sequence rather than in
 * layers. */
.hero {
  position: relative;
}

.diptych {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: clamp(420px, 44vw, 560px);
  isolation: isolate;
}

.diptych__half {
  position: relative;
  overflow: hidden;
}

.diptych__half img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.88) brightness(.72);
}

/* The wash is what makes the headline readable, and it is a gradient rather
 * than a flat scrim so the lit parts of each picture — the lanterns, the
 * morning on the temple — survive it. */
.diptych__half::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 8, 43, .58), rgba(20, 8, 43, .12) 30%, rgba(12, 4, 32, .88));
}

.diptych__seam {
  position: absolute;
  inset-block: 0;
  left: 50%;
  width: 1px;
  z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(240, 217, 160, .5), transparent);
}

.diptych__tag {
  position: absolute;
  z-index: 3;
  bottom: 12px;
  margin: 0;
  font-family: var(--display);
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(245, 230, 200, .74);
}

.diptych__tag--l {
  left: var(--gutter);
}

.diptych__tag--r {
  right: var(--gutter);
  text-align: right;
}

.hero__over {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  text-align: center;
  padding-inline: var(--gutter);
  padding-block: clamp(24px, 4vw, 44px);
}

.hero__block {
  max-width: 640px;
}

/* The signature: the headline arrives enciphered and resolves in front of the
 * reader. It is the thing the game asks you to do, performed by the page
 * itself. The plaintext is what lives in the HTML — the script enciphers it on
 * load and then decodes it — so a reader with no JavaScript, or with reduced
 * motion, simply gets the sentence. */
.decode {
  font-family: var(--display);
  font-size: var(--step-4);
  line-height: 1.05;
  letter-spacing: .012em;
  margin: 0 auto 18px;
  max-width: 21ch;
  color: var(--text);
  text-wrap: balance;
  text-shadow:
    0 2px 16px rgba(6, 2, 16, .92),
    0 1px 0 rgba(0, 0, 0, .7);
}

.decode__line {
  display: block;
}

/* The HTML carries the plain sentence, because that is what a reader with this
 * script blocked has to be left with. With the script running, the headline is
 * not painted until it has been enciphered: otherwise the answer is shown,
 * taken away, and solved again in front of a reader who already read it.
 *
 * This is only safe because the "js" class is set before first paint — see the
 * render-blocking script tag in layout.html. It is `visibility` rather than
 * `opacity` or `display` so the line keeps its box and nothing reflows when it
 * appears. */
.js .decode {
  visibility: hidden;
}

.js .decode--live {
  visibility: visible;
}

.decode__line--accent {
  color: var(--gold-hi);
}

/* Break points stay at the spaces, and each letter holds the width of the
 * letter it resolves into. Between them the decode animation is laid out
 * exactly like its own finished state, so it cannot shift the page under the
 * reader — see decodeHeadline in site.js, which measures and sets the widths. */
.decode__word {
  white-space: nowrap;
}

.decode__cell {
  display: inline-block;
  text-align: center;
}

.decode span[data-locked='false'] {
  color: var(--saffron);
  opacity: .72;
}

.hero__lede {
  max-width: 50ch;
  margin: 0 auto 26px;
  color: rgba(245, 230, 200, .92);
  font-size: var(--step-1);
  text-shadow: 0 1px 12px rgba(6, 2, 16, .9);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  max-width: 100%;
  padding: 14px 26px;
  min-height: 52px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: #2a1c05;
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .03em;
  text-align: center;
  text-decoration: none;
  border: 1px solid rgba(255, 240, 200, .55);
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 240, .5),
    0 12px 36px -12px rgba(212, 175, 55, .5);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 240, .5),
    0 16px 42px -12px rgba(212, 175, 55, .62);
}

.cta:active {
  transform: translateY(0);
}

/* The Play mark is four flat colour paths and carries no stroke, so it must
 * never inherit currentColor: on the gold plate it would come out one tone. */
.play {
  width: 19px;
  height: 19px;
  flex: none;
}

.cta--quiet {
  background: rgba(245, 230, 200, .04);
  color: var(--gold-hi);
  border-color: var(--hairline);
  box-shadow: none;
}

.cta--quiet:hover {
  border-color: var(--gold);
  box-shadow: none;
}

.cta--danger {
  background: linear-gradient(180deg, #b03a36, #8b0000);
  color: #ffeaea;
  border-color: rgba(255, 170, 170, .34);
  box-shadow: inset 0 1px 0 rgba(255, 200, 200, .22);
}

.cta--danger:hover {
  box-shadow: inset 0 1px 0 rgba(255, 200, 200, .22);
}

.hero__note {
  margin: 16px 0 0;
  font-size: var(--step--2);
  color: rgba(245, 230, 200, .68);
  text-shadow: 0 1px 8px rgba(6, 2, 16, .9);
}

@media (max-width: 760px) {
  .diptych {
    height: clamp(178px, 44vw, 235px);
  }

  /* Tracked small caps need room the narrow band does not have: at 360px
   * "MAYA, PALENQUE" reached the last pixel of the screen. */
  .diptych__tag {
    bottom: 9px;
    font-size: 9px;
    letter-spacing: .12em;
  }

  .diptych__tag--l {
    left: 14px;
  }

  .diptych__tag--r {
    right: 14px;
  }

  .hero__over {
    position: static;
    padding-block: clamp(26px, 6vw, 36px) clamp(20px, 4vw, 28px);
  }

  .decode,
  .hero__lede,
  .hero__note {
    text-shadow: none;
  }

  .hero__lede {
    color: var(--text-dim);
  }

  .hero__note {
    color: var(--text-faint);
  }
}

/* A thin band of cipher glyphs under the hero. It is the same alphabet the
 * decode runs on, drifting slowly, and it is the only ambient motion on the
 * page. */
.frieze {
  overflow: hidden;
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
  padding-block: 9px;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.05), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

.frieze__run {
  display: flex;
  gap: 18px;
  width: max-content;
  font-family: var(--cipher);
  font-size: 12px;
  letter-spacing: 0.42em;
  color: rgba(212, 175, 55, 0.4);
  animation: drift 46s linear infinite;
}

@keyframes drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---- sections ---------------------------------------------------------- */

.section {
  padding-block: clamp(38px, 5.4vw, 58px);
}

.section--tight {
  padding-block: clamp(26px, 3.6vw, 38px);
}

/* The engraved rule is the app's own section device: a small-caps label with a
 * hairline struck out from it. It marks a section without pretending the
 * sections are a numbered sequence, which they are not. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--hairline), transparent);
}

.section__title {
  font-family: var(--display);
  font-size: var(--step-3);
  line-height: 1.16;
  margin: 0 0 14px;
  color: var(--text);
  text-wrap: balance;
}

.section__body {
  max-width: var(--measure);
  color: var(--text-dim);
  margin: 0 0 16px;
}

.section__body strong {
  color: var(--text);
  font-weight: 600;
}

/* ---- raised surfaces --------------------------------------------------- */

/* One treatment, five surfaces. A card is told from the page by shape: it
 * agrees with the lamp above it — lit along its crown, casting under its foot —
 * rather than by being a lighter rectangle with a border round it. */
.mode,
.panel,
.toc,
.figure,
.crew__card,
.ledger__side,
.road,
.way {
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  background-image:
    linear-gradient(180deg, rgba(255, 240, 205, 0.06), rgba(255, 240, 205, 0) 44%),
    linear-gradient(158deg, var(--card-warm), var(--ink-black));
  box-shadow:
    inset 0 1px 0 var(--lip),
    var(--cast);
}

/* ---- mode cards -------------------------------------------------------- */

.modes {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 620px) {
  .modes {
    grid-template-columns: 1fr 1fr;
  }
}

.mode {
  position: relative;
  padding: 24px 22px 22px;
  transition: transform 200ms ease, border-color 200ms ease;
}

.mode:hover {
  transform: translateY(-3px);
  border-color: var(--hairline);
}

.mode__glyph {
  display: block;
  width: 26px;
  height: 26px;
  margin-bottom: 12px;
  color: var(--gold);
}

.mode__name {
  font-family: var(--display);
  font-size: var(--step-1);
  line-height: 1.24;
  margin: 0 0 8px;
  color: var(--text);
}

.mode__name a {
  text-decoration: none;
  color: inherit;
}

.mode__name a:hover {
  color: var(--gold-hi);
}

.mode__text {
  margin: 0;
  font-size: var(--step--1);
  line-height: 1.62;
  color: var(--text-dim);
}

/* ---- figures ----------------------------------------------------------- */

.figures {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 620px) {
  .figures {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---- the crew ---------------------------------------------------------- */

/* Three equal cards, because the three founders are equal. No lead card, no
 * ordering by anything but the order they were given in.
 *
 * There is no portrait here and no silhouette standing in for one. We have no
 * photographs to publish, and a grey avatar placeholder tells the reader that
 * something is missing; an engraved seal is a finished thing that belongs to
 * the same page the wax and the letterpress do. */
.crew {
  display: grid;
  gap: 16px;
  margin: 30px 0 36px;
}

@media (min-width: 640px) {
  .crew {
    grid-template-columns: repeat(3, 1fr);
  }
}

.crew__card {
  padding: 32px 20px 26px;
  text-align: center;
}

.crew__seal {
  display: block;
  width: 26px;
  height: 26px;
  margin: 0 auto 20px;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  background-image: linear-gradient(150deg, rgba(240, 217, 160, 0.26), rgba(212, 175, 55, 0) 70%);
  box-shadow: inset 0 1px 0 var(--lip);
  transform: rotate(45deg);
}

.crew__name {
  margin: 0;
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.2;
  color: var(--gold-hi);
  text-shadow:
    0 1px 0 rgba(255, 240, 205, 0.09),
    0 -1px 0 rgba(0, 0, 0, 0.5);
}

.crew__role {
  margin: 8px 0 0;
  color: var(--gold);
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.figure {
  padding: 18px 12px;
  text-align: center;
}

.figure__value {
  display: block;
  font-family: var(--display);
  font-size: var(--step-2);
  line-height: 1.1;
  color: var(--gold-hi);
}

.figure__label {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---- documents --------------------------------------------------------- */

/* Documents read in a column of their own. .doc__body used to cap at 68ch and
 * sit left-aligned inside the 1120px marketing column, so every legal and
 * content page was a narrow ragged strip of prose against half a screen of dead
 * ground. One column, centred, and everything in it aligns to the same edges. */
.doc {
  max-width: var(--column);
  padding-block: clamp(34px, 5vw, 52px) 12px;
}

.doc__title {
  font-family: var(--display);
  font-size: var(--step-3);
  line-height: 1.12;
  margin: 0 0 18px;
  color: var(--text);
  text-wrap: balance;
}

/* The page opens on its own engraved rule rather than on a paragraph that
 * happens to be large. */
.doc__title::after {
  content: '';
  display: block;
  height: 1px;
  width: min(230px, 60%);
  margin-top: 20px;
  background: linear-gradient(90deg, var(--gold), var(--hairline-soft) 55%, transparent);
}

/* A content page already opens on the eyebrow's own struck rule, so the title
 * does not draw a second one three lines under it. */
.eyebrow + .doc__title::after {
  display: none;
}

.doc__meta {
  font-size: var(--step--2);
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin: 0 0 8px;
}

.doc__body {
  font-size: var(--step-0);
  line-height: 1.72;
}

/* THE COMPONENT RULE, which is the gutter defect one level up. A document body
 * holds prose AND components — a mode card, a panel, a notice, a lede — and a
 * descendant type selector like `.doc__body p` outranks the component's own
 * single class, so the component silently loses its type and colour. It did:
 * the Chronicle cards on /chronicles were drawing the document's own section
 * rule inside the card, and the deletion notices lost their red and green. So
 * every prose rule here is scoped to an element carrying no class of its own,
 * and a component owns what it looks like.
 *
 * The rule itself is the fading one .eyebrow already owned, applied where the
 * hierarchy was weakest. It is a background rather than a flex child, so a
 * heading that wraps to two lines still gets a full-width rule. */
.doc__body h2:not([class]) {
  font-family: var(--display);
  font-size: var(--step-2);
  line-height: 1.2;
  margin: 48px 0 14px;
  padding-top: 24px;
  border-top: none;
  background-image: linear-gradient(90deg, var(--hairline), var(--hairline-soft) 46%, transparent 92%);
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 0;
  color: var(--gold-hi);
  text-wrap: balance;
}

.doc__body h3:not([class]) {
  font-family: var(--body);
  font-size: var(--step-1);
  font-weight: 600;
  margin: 26px 0 8px;
  color: var(--text);
}

.doc__body p:not([class]),
.doc__body li {
  color: var(--text-dim);
}

.doc__body li {
  margin-bottom: 9px;
}

.doc__body li::marker {
  color: var(--gold);
}

.doc__body strong {
  color: var(--text);
  font-weight: 600;
}

.content-page {
  padding-block-start: clamp(34px, 5vw, 52px);
}

.content__lede {
  margin: 0 0 28px;
  color: var(--text);
  font-size: var(--step-1);
  line-height: 1.62;
}

.content-grid {
  display: grid;
  gap: 16px;
  margin: 26px 0;
}

@media (min-width: 620px) {
  .content-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.breadcrumbs {
  margin-bottom: 24px;
  color: var(--text-faint);
  font-size: var(--step--2);
  letter-spacing: 0.06em;
}

.link-list,
.source-list {
  padding-left: 22px;
}

.source-list a {
  overflow-wrap: anywhere;
}

.toc {
  margin: 24px 0 10px;
  padding: 20px 22px;
}

.toc__title {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}

.toc ol {
  margin: 0;
  padding-left: 22px;
  columns: 1;
  font-size: var(--step--1);
}

.toc li {
  margin-bottom: 4px;
  break-inside: avoid;
}

@media (min-width: 620px) {
  .toc ol {
    columns: 2;
    column-gap: 30px;
  }
}

/* A table that scrolls says so. Two cover layers ride the content
 * (background-attachment: local) and two shadows ride the box (scroll), so the
 * shadow at an end is covered exactly when there is nothing more that way — no
 * script, and nothing shown on a table that fits. */
.table-scroll {
  overflow-x: auto;
  margin: 18px 0 22px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  background-color: #1b0f30;
  background-image:
    linear-gradient(90deg, #1b0f30 30%, rgba(27, 15, 48, 0)),
    linear-gradient(270deg, #1b0f30 30%, rgba(27, 15, 48, 0)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0)),
    linear-gradient(270deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  background-position: 0 0, 100% 0, 0 0, 100% 0;
  background-repeat: no-repeat;
  background-size: 46px 100%, 46px 100%, 26px 100%, 26px 100%;
  background-attachment: local, local, scroll, scroll;
  scrollbar-width: thin;
  scrollbar-color: var(--hairline) transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
  min-width: 460px;
}

th,
td {
  padding: 13px 15px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--text-dim);
}

th {
  font-family: var(--body);
  font-weight: 600;
  color: var(--gold-hi);
  white-space: nowrap;
  background: rgba(212, 175, 55, 0.06);
}

tbody tr:nth-child(even) td {
  background: rgba(255, 240, 205, 0.022);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ---- deletion ---------------------------------------------------------- */

.panel {
  padding: 24px 22px;
  margin: 24px 0;
  border-color: var(--hairline);
}

.panel--quiet {
  border-color: var(--hairline-soft);
}

.panel__title {
  font-family: var(--display);
  font-size: var(--step-1);
  line-height: 1.24;
  margin: 0 0 10px;
  color: var(--text);
}

.steps {
  margin: 0 0 4px;
  padding-left: 22px;
}

.steps li {
  margin-bottom: 10px;
  color: var(--text-dim);
}

/* The deletion form's own label. It was ".field" and the hero's picture grid
 * became ".field" too, which is what TestNoTwoComponentsClaimTheSameClassName
 * exists for. */
.field {
  display: block;
  margin: 18px 0 8px;
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

.input {
  width: 100%;
  padding: 14px 15px;
  min-height: 52px;
  font-family: var(--body);
  font-size: 16px;
  color: var(--text);
  background: rgba(12, 4, 32, 0.85);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.input::placeholder {
  color: var(--text-faint);
}

.input:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.35),
    0 0 0 3px rgba(212, 175, 55, 0.22);
}

.form__actions {
  margin-top: 20px;
}

.notice {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(229, 57, 53, 0.5);
  border-left-width: 4px;
  background: rgba(229, 57, 53, 0.12);
  color: #ffdedd;
  font-size: var(--step--1);
}

.notice--good {
  border-color: rgba(76, 175, 80, 0.5);
  background: rgba(76, 175, 80, 0.12);
  color: #dcf5dd;
}

.ledger {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin: 20px 0 8px;
}

@media (min-width: 700px) {
  .ledger {
    grid-template-columns: 1fr 1fr;
  }
}

.ledger__side {
  padding: 20px;
}

.ledger__head {
  font-family: var(--display);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.ledger__side--gone .ledger__head {
  color: #ffa9a5;
}

.ledger__side--kept .ledger__head {
  color: var(--gold-hi);
}

.ledger__side ul {
  margin: 0;
  padding-left: 20px;
  font-size: var(--step--1);
}

.ledger__side li {
  margin-bottom: 8px;
  color: var(--text-dim);
}

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

.footer {
  margin-top: clamp(46px, 6vw, 68px);
  border-top: 1px solid var(--hairline-soft);
  padding-block: clamp(30px, 4vw, 42px) clamp(36px, 5vw, 52px);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.045), rgba(8, 3, 20, 0.45));
  font-size: var(--step--1);
  color: var(--text-faint);
}

.footer__grid {
  display: grid;
  gap: 26px;
  grid-template-columns: 1fr;
}

@media (min-width: 520px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 760px) {
  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

@media (min-width: 1040px) {
  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  }
}

.footer p {
  margin: 0 0 8px;
}

.footer h2 {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 12px;
}

.footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer li {
  margin-bottom: 8px;
}

.footer a {
  color: var(--text-dim);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer a:hover {
  color: var(--gold-hi);
  text-decoration: underline;
}

.footer__legal {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline-soft);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-faint);
}

/* ---- the route --------------------------------------------------------- */

/* The home page is a path the reader walks down, which is the app's own
 * MissionSpine brought to the web: a seal in a fixed gutter, the road already
 * walked struck in the accent, the road ahead still dotted. A stack of cards
 * says "here are some features"; a route says how far you have come and where
 * it goes, which is the thing a story game is selling.
 *
 * Three rules hold it together, all of them learned on the timeline it comes
 * from. The gutter is ONE width for every station or the route bends. The
 * seal sits at the HEAD of its station rather than centred in it, so it lines
 * up with the heading it marks. And a station's vertical gap lives inside its
 * own body, or the leg is cut between rows. */
.route {
  padding-block: clamp(34px, 5vw, 56px) clamp(18px, 3vw, 28px);
}

.station {
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: clamp(14px, 2.4vw, 26px);
}

.station__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.station__leg {
  width: 2px;
  flex: 1;
  min-height: 12px;
}

.station__leg--walked {
  background: linear-gradient(180deg, var(--gold), rgba(212, 175, 55, .45));
}

/* Ground the reader has not covered yet, drawn the way the mission timeline
 * draws it: a dotted background rather than a border, so it survives any
 * height the station body turns out to have. */
.station__leg--ahead {
  background-image: linear-gradient(180deg, var(--hairline) 55%, transparent 0);
  background-size: 2px 9px;
  background-repeat: repeat-y;
}

.seal {
  width: 38px;
  height: 38px;
  flex: none;
  margin-top: 3px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  color: #2a1c05;
  background: radial-gradient(120% 120% at 32% 24%, var(--gold-hi), var(--gold) 58%, #9c7c22);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 235, .6),
    inset 0 -3px 6px rgba(90, 66, 10, .45),
    0 6px 18px -6px rgba(212, 175, 55, .7);
}

/* The same seal, gone cold. A stage the reader has not reached is a place on
 * the page rather than an object on it. */
.seal--cold {
  background: radial-gradient(120% 120% at 32% 24%, #4a3f5c, #2c2340 60%, #1d1730);
  color: rgba(245, 230, 200, .52);
  box-shadow: inset 0 1px 0 rgba(255, 240, 205, .1);
}

.station__body {
  min-width: 0;
  padding-block: 0 clamp(30px, 4.4vw, 48px);
}

.station__body--last {
  padding-block-end: 0;
}

.station__kick {
  margin: 5px 0 6px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}

.section__body--lead {
  color: var(--text);
  font-size: var(--step-1);
  line-height: 1.6;
}

/* Below 600px the 56px gutter is a fifth of the reading width. It narrows
 * rather than being dropped: losing the spine on a phone would leave the
 * majority of readers with the stack of cards this replaced. */
@media (max-width: 600px) {
  .station {
    grid-template-columns: 32px 1fr;
    column-gap: 13px;
  }

  .seal {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }
}

/* The last leg is the only one that ends in nothing. Five of the seven worlds
 * are still being written, so the route deliberately runs off the bottom of
 * the page rather than stopping on a full stop: the dotted road ahead is the
 * roadmap, said with the device the whole page is already made of. */
.station__leg--open {
  min-height: 34px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent);
  mask-image: linear-gradient(180deg, #000, transparent);
}

/* A ledger rather than seven cards. Five of these are places the reader
 * cannot go, and drawn as plates they would out-weigh the two that are open —
 * which is the same argument the app's own Atlas makes with HorizonLedger. It
 * carries no tap affordance at all, because there is nothing behind it yet. */
.worlds {
  margin: 20px 0 0;
  padding-inline: 0;
  list-style: none;
  border-top: 1px solid var(--hairline-soft);
}

.world {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding-block: 11px;
  border-bottom: 1px solid var(--hairline-soft);
}

.world__name {
  font-family: var(--display);
  font-size: var(--step--1);
  color: var(--text-faint);
  margin-right: auto;
}

.world--open .world__name {
  color: var(--text);
}

.world__state {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.world--open .world__state {
  color: var(--gold);
}

/* Below 520px the longer world names take the whole row and push the state
 * onto a second line, so some rows read across and some read down. They all
 * read down instead: one shape for seven rows. */
@media (max-width: 520px) {
  .world {
    display: block;
  }

  .world__state {
    display: block;
    margin-top: 2px;
  }
}

.worlds__note {
  margin: 14px 0 0;
  font-size: 11.5px;
  color: var(--text-faint);
}

.tally {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin: 20px 0 0;
  padding-block: 14px 0;
  border-top: 1px solid var(--hairline-soft);
  list-style: none;
  padding-inline: 0;
  font-size: var(--step--1);
  color: var(--text-dim);
}

.tally b {
  font-family: var(--display);
  font-size: var(--step-1);
  color: var(--gold-hi);
  margin-right: 6px;
}

/* ---- road cards -------------------------------------------------------- */

.road {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 200ms ease, border-color 200ms ease;
}

.road:hover {
  transform: translateY(-3px);
  border-color: var(--hairline);
}

.road__art {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.road__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.9) brightness(.84);
}

.road__art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(20, 8, 43, .92));
}

.road__where {
  position: absolute;
  left: 16px;
  bottom: 11px;
  z-index: 2;
  font-family: var(--display);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}

.road__body {
  display: block;
  padding: 18px 18px 20px;
}

.road__name {
  display: block;
  font-family: var(--display);
  font-size: var(--step-1);
  line-height: 1.24;
  margin-bottom: 8px;
  color: var(--text);
}

.road:hover .road__name {
  color: var(--gold-hi);
}

.road__text {
  display: block;
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--text-dim);
}

.road__go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-hi);
}

.road__go svg {
  width: 13px;
  height: 13px;
}

/* ---- the four ways ----------------------------------------------------- */

.ways {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin-top: 4px;
}

@media (min-width: 560px) {
  .ways {
    grid-template-columns: 1fr 1fr;
  }
}

.way {
  display: flex;
  gap: 14px;
  padding: 17px 18px;
}

.way__ico {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--gold);
  border: 1px solid var(--hairline-soft);
  background: rgba(212, 175, 55, .07);
}

.way__ico svg {
  width: 18px;
  height: 18px;
}

.way__name {
  font-family: var(--display);
  font-size: var(--step-0);
  margin: 1px 0 5px;
  color: var(--text);
}

.way__text {
  margin: 0;
  font-size: var(--step--1);
  line-height: 1.55;
  color: var(--text-dim);
}

/* ---- the relic strip --------------------------------------------------- */

/* Seven objects, one per world, and the count is the point: it is the first
 * thing on this site that proves the Museum exists.
 *
 * Seven is prime, so no column count below seven fills its last row — a grid
 * leaves an orphan on every phone. Below 860px the strip becomes one
 * scrollable row instead, which also keeps each object big enough to read
 * rather than shrinking seven of them into a 320px column. */
.relics {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  margin: 4px 0 0;
  padding-inline: 0;
  list-style: none;
}

/* The photograph fills the case, which is what the app's own MuseumVitrine
 * does and is one ground fewer than the alternative. Letterboxing the object
 * inside the case put a white rectangle inside a dark rectangle on a dark
 * page: three grounds for one object, and the whitest thing on the site was
 * the padding around a mask rather than the mask.
 *
 * That only works because the tiles are cropped to their own content at pack
 * time — see square_on_content — so filling the case cannot cut the top off a
 * tall mask. */
.relic__case {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border: 1px solid var(--hairline-soft);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(12, 4, 32, .9);
}

.relic__case img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Seven museum photographs carry seven studio grounds — white, grey, near
 * black — so a row of them reads ragged however well each one is cropped. The
 * vignette draws every edge down toward the page and leaves the object itself
 * untouched, which is both what unifies the row and what a lit case actually
 * looks like. It is a display treatment, not an edit: the record and its
 * credit are unchanged, and the app applies its own to these same files. */
.relic__case::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(112% 112% at 50% 42%, transparent 46%, rgba(12, 4, 32, .78) 100%),
    linear-gradient(180deg, rgba(212, 175, 55, .05), transparent 40%);
}

.relic__name {
  display: block;
  margin-top: 8px;
  font-family: var(--display);
  font-size: 12px;
  color: var(--gold-hi);
}

.relic__place {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-faint);
}

.relic {
  text-align: center;
}

.relics__credit {
  margin: 16px 0 0;
  font-size: 11.5px;
  color: var(--text-faint);
}

@media (max-width: 860px) {
  .relics {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: var(--hairline) transparent;
    padding-block: 0 6px;
  }

  .relic {
    flex: 0 0 clamp(112px, 30vw, 138px);
    scroll-snap-align: start;
  }
}

/* ---- straight answers -------------------------------------------------- */

/* The questions the support inbox actually receives, answered in view. They
 * are also the page's FAQPage graph, built from the same list in Go, so the
 * answer a reader gets and the answer an answer engine quotes cannot drift. */
.answers {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin: 4px 0 0;
}

@media (min-width: 720px) {
  .answers {
    grid-template-columns: 1fr 1fr;
    gap: 14px 30px;
  }
}

.answer {
  padding-block: 0 14px;
  border-bottom: 1px solid var(--hairline-soft);
}

.answer__q {
  font-family: var(--display);
  font-size: var(--step-0);
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 7px;
}

.answer__a {
  margin: 0;
  font-size: var(--step--1);
  line-height: 1.62;
  color: var(--text-dim);
}

.answers__more {
  margin-top: 22px;
}

/* ---- closing band ------------------------------------------------------ */

.close {
  text-align: center;
  padding-block: clamp(36px, 5vw, 58px);
  border-top: 1px solid var(--hairline-soft);
  background: radial-gradient(90% 130% at 50% 100%, rgba(212, 175, 55, .12), transparent 70%);
}

.close__body {
  max-width: 52ch;
  margin: 0 auto 24px;
  color: var(--text-dim);
}

/* ---- scroll reveal ----------------------------------------------------- */

/* The hiding is gated on the .js class the script itself sets on <html>.
 * Without that gate a blocked, failed or slow script leaves half the page
 * invisible while still taking up its space — which is what it did: the privacy
 * link, the modes and the Museum section were all sitting there at zero opacity.
 * Content is never hidden by default; the reveal is the enhancement. */
/* The transition is declared on the state being entered, not on the resting
 * state. Declared on the resting state it also animates the way IN to it — so
 * a gate class arriving even one frame late does not snap a section to hidden,
 * it plays a 620ms fade to hidden in front of the reader. */
.js .reveal {
  opacity: 0;
  transform: translateY(10px);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 620ms ease, transform 620ms ease;
}

/* Motion is decoration here, so all of it goes. What stays is every word and
 * every control: the decode script writes the plaintext straight in, the
 * reveals resolve to their finished state, and the frieze simply stops. */
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .frieze__run {
    animation: none;
  }

  .cta,
  .mode,
  .road {
    transition: none;
  }

  .cta:hover,
  .mode:hover,
  .road:hover {
    transform: none;
  }
}
