/*
 * The landing site's one stylesheet (ADR 0185): Pack-Star's look, its
 * default dark scheme and splash screen. The bucket sends style-src 'self'
 * (ADR 0184), so pages carry no style attributes or <style> blocks; every
 * rule is here, and tour.js changes looks through classes and the CSSOM.
 */

/* ExoLP Display: Anybody, changed by scripts/build_display_font.py under the
   SIL Open Font License, which is served beside it (ADR 0190). */
@font-face {
  font-family: "ExoLP Display";
  src: url("/fonts/exolp-display.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --charcoal: #121212;
  --window: #1a1a1a;
  --panel: #232323;
  --border: #363535;
  /* Form fields' edges: 3:1 or more against the page and the field (WCAG 1.4.11). */
  --field-edge: #7a7a7a;
  --edge: #262626;
  --text: #e8e8e8;
  --muted: #a0a0a0;
  --title: #efede6;
  --accent: #e0722f;
  --accent-hover: #ff9b5e;
  --accent-tint: #3a2414;
  --info: #8ab4f8;
  --info-tint: #1c2333;
  --ok: #6fcf8e;
  --ok-tint: #1f3a24;
  --neutral: #c3c3c3;
  --neutral-tint: #2b2b2b;
  --paper: #efede6;
  --paper-text: #1a1a1a;
  --paper-muted: #5a5a5a;
  --paper-line: #c9c5b9;
  --paper-rule: #d9d6cc;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display: "ExoLP Display", "JetBrains Mono", sans-serif;
  --ease: cubic-bezier(0.65, 0, 0.25, 1);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html.is-tour-locked,
html.is-tour-locked body { overflow: hidden; }

body {
  margin: 0;
  background: var(--charcoal);
  color: var(--text);
  font: 15px/1.7 var(--mono);
}

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

:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
}

h1, h2, h3, p { margin: 0; }

/* The page's shared SVG symbols: in the page, never shown themselves. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: absolute;
  left: -9999px;
  top: 16px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--charcoal);
}

.skip:focus { left: 16px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Type */

.display {
  overflow-wrap: break-word;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--title);
}

/* Small enough on a 320px screen for a long word, such as ACCESSIBILITY,
   to fit (WCAG 1.4.10); a longer one still breaks rather than overflow. */
.h1 { font-size: clamp(20px, 3vw, 42px); line-height: 1.25; }
/* Balanced lines, so a heading that wraps doesn't leave a hyphen or one
   short word alone at the end of a line. */
.h2 { font-size: clamp(20px, 2.4vw, 32px); line-height: 1.3; text-wrap: balance; }
/* A product's name, on one line at any width (the phone size is below). */
.h2--name { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.1; letter-spacing: 0.12em; white-space: nowrap; }

/* A name such as Pack-Star in a title never breaks at its hyphen. */
.nowrap { white-space: nowrap; }

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.lede { font-size: 18px; line-height: 1.5; color: var(--title); }
.body { font-size: 15px; color: var(--muted); }
.body--lg { font-size: 16px; max-width: 40em; }
.accent { color: var(--accent); }

.footnote-ref { color: var(--accent); text-decoration: none; }

.stack { display: flex; flex-direction: column; gap: 20px; }

/* Buttons and tags */

.actions { display: flex; flex-wrap: wrap; gap: 12px 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 14px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.btn--primary { background: var(--accent); color: var(--charcoal); }
.btn--primary:hover { background: var(--accent-hover); color: var(--charcoal); }
.btn--secondary { border-color: var(--border); background: var(--window); color: var(--text); font-weight: 400; }
.btn--secondary:hover { border-color: var(--accent); color: var(--text); }
.btn--dark { background: var(--charcoal); color: var(--title); }
.btn--dark:hover { background: #000000; color: var(--title); }
.btn--small { min-height: 44px; padding: 0 20px; font-size: 13px; }
.btn--compact { min-height: 44px; padding: 0 18px; font-size: 12px; letter-spacing: 0.14em; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn svg { flex: none; }

.chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}

.chip--sm { padding: 1px 9px; font-size: 11px; }
.chip--accent { background: var(--accent-tint); color: var(--accent); }
.chip--info { background: var(--info-tint); color: var(--info); }
.chip--ok { background: var(--ok-tint); color: var(--ok); }
.chip--neutral { background: var(--neutral-tint); color: var(--neutral); }
.chip--start { align-self: flex-start; }
.chip--foot { margin-top: auto; align-self: flex-start; }

/* Header and footer */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--title);
  text-decoration: none;
}

.brand:hover { color: var(--title); }

/* ExoLP Display sets its capitals a little high in the line (ascent
   0.795em, descent 0.24em, cap height 0.675em): lowering the name by 0.06em
   centres it on the mark. */
.brand__name,
.screen__title {
  display: inline-block;
  transform: translateY(0.06em);
  font-family: var(--display);
  text-transform: uppercase;
  line-height: 1;
}

.brand__name { font-size: 22px; letter-spacing: 0.2em; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav a { text-decoration: none; }
.site-nav .btn { color: var(--charcoal); }

.site-footer { background: var(--charcoal); color: var(--muted); }

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 40px;
  padding-bottom: 40px;
  font-size: 13px;
}

.site-footer .brand__name { font-size: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer nav a { color: var(--muted); }

.site-footer__fine {
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.6;
}

.site-footer__fine a { color: var(--muted); }

/* Pausing the page's motion (WCAG 2.2.2): site.js shows the button and
   remembers the choice. */
.motion-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--field-edge);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: 13px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.motion-btn svg { flex: none; }
.motion-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

.motion-paused .spin,
.motion-paused .orbit,
.motion-paused .orbit-rev,
.motion-paused .pulse,
.motion-paused .pulse-b { animation-play-state: paused; }

/* Bands */

.band { position: relative; overflow: hidden; }
.band--window { background: var(--window); border-bottom: 1px solid var(--edge); }
.band--charcoal { background: var(--charcoal); border-bottom: 1px solid var(--edge); }
.band--paper { background: var(--paper); color: var(--paper-text); }

/* The night sky behind the darker sections. site.js draws it on a canvas:
   stars that twinkle each on its own clock, and now and then a shooting
   star. Without the script, or for reduced motion, the stars hold still. */
.starry {
  position: relative;
  isolation: isolate;
  background: var(--charcoal) url("/img/stars-0.svg") 0 0 / 720px 540px repeat;
}

.has-sky .starry { background-image: none; }

.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* The main sections fill most of a window, their content in the middle. */
.panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(100vh, 1080px);
  min-height: min(100svh, 1080px);
}

/* The hero shares the window with the header above it. */
.hero-panel {
  min-height: calc(min(100vh, 1080px) - 92px);
  min-height: calc(min(100svh, 1080px) - 92px);
}

.split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-top: 112px;
  padding-bottom: 112px;
}

.split__copy { flex: 1 1 440px; min-width: 0; }
.split__visual { flex: 1 1 460px; min-width: 0; }
.split__visual svg { display: block; width: 100%; height: auto; }

.points {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.points li { display: flex; gap: 12px; }
.points__n { color: var(--accent); }
.points strong { font-weight: 600; color: var(--title); }
.points span span { color: var(--muted); }

.footnote { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* Hero */

.hero-panel { border-bottom: 1px solid var(--edge); }

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-top: 56px;
  padding-bottom: 112px;
}

.hero__copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }

/* Three Pack-Star screens, stacked: the front one whole, the others behind
   it up and to the right, dimmed. Pointing at one behind lifts it; clicking
   it, or its button, brings it to the front (site.js). */

.screens-fig { flex: 1 1 500px; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }

.screens {
  --step: 30px;
  position: relative;
  height: 470px;
  padding: calc(var(--step) * 2) calc(var(--step) * 2) 0 0;
}

.screen {
  position: absolute;
  left: 0;
  bottom: 0;
  width: calc(100% - var(--step) * 2);
  height: calc(100% - var(--step) * 2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--window);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  font-size: 11px;
  line-height: 1.5;
  transition: transform 0.5s var(--ease);
}

.screen[data-pos="0"] { z-index: 3; transform: none; }
.screen[data-pos="1"] { z-index: 2; transform: translate(var(--step), calc(var(--step) * -1)); cursor: pointer; }
.screen[data-pos="2"] { z-index: 1; transform: translate(calc(var(--step) * 2), calc(var(--step) * -2)); cursor: pointer; }
.screen[data-pos="1"]:hover { transform: translate(var(--step), calc(var(--step) * -1 - 10px)); }
.screen[data-pos="2"]:hover { transform: translate(calc(var(--step) * 2), calc(var(--step) * -2 - 10px)); }

.screen__veil {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: var(--charcoal);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.screen[data-pos="1"] .screen__veil { opacity: 0.45; }
.screen[data-pos="2"] .screen__veil { opacity: 0.65; }
.screen[data-pos="1"]:hover .screen__veil,
.screen[data-pos="2"]:hover .screen__veil { opacity: 0.2; }

.screen__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--charcoal);
}

.screen__title { font-size: 12px; letter-spacing: 0.3em; white-space: nowrap; color: var(--title); }
.screen__page { margin-left: auto; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.screen__body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.screen__row { display: flex; align-items: center; gap: 8px; }
.screen__gap { flex: 1 1 0; }
.screen__foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); color: var(--muted); }

.screen-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-right: 60px; }
.screens-fig figcaption { padding-right: 60px; font-size: 12px; }
.screen-tabs .rail-btn { min-height: 40px; font-size: 11px; }

.fake-input {
  flex: 1 1 0;
  min-width: 0;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--charcoal);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}

.fake-btn { padding: 4px 10px; border: 1px solid var(--border); border-radius: 7px; white-space: nowrap; }
.fake-btn--accent { border-color: var(--accent); background: var(--accent); color: var(--charcoal); font-weight: 600; }

/* Chemicals */

.chem-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.chem-table th { padding: 0 6px 6px; font-weight: 400; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-align: left; }
.chem-table td { padding: 7px 6px; border-top: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chem-table .col-name { width: 31%; }
.chem-table .col-status { width: 15%; }
.chem-table .col-dot { width: 17%; }
.chem-table .col-rcra { width: 18%; }
.chem-table .col-bottles { width: 19%; }
.chem-table .muted { color: var(--muted); }
.chem-table td:nth-child(3) { white-space: normal; }

.tag { display: inline-block; padding: 0 6px; border-radius: 5px; font-size: 10px; line-height: 1.6; }
.tag--open { background: #3a2a14; color: #ffbf7a; }
.tag--sealed { background: #1f3a24; color: #8fe362; }
.tag--unpacked { background: #3a1a1a; color: #e36464; }
.tag--reactive { background: #6222c9; color: #ffffff; }
.tag--red { background: #c62828; color: #ffffff; }
.tag--blue { background: #1565c0; color: #ffffff; }
.tag--yellow { background: #ffd100; color: #121212; }
.tag--white { background: #3a3a3a; color: var(--text); }

/* Packs */

.packs { flex: 1; min-height: 0; display: flex; flex-direction: row; gap: 12px; }
.packs__list { flex: 0 0 34%; display: flex; flex-direction: column; gap: 8px; }

.pack-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.pack-card.is-open { border-color: var(--accent); }
.pack-card__head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pack-card__num { font-weight: 600; color: var(--title); }
.pack-card__meta { color: var(--muted); font-size: 10px; }

.fill { height: 4px; border-radius: 2px; background: #2b2b2b; overflow: hidden; }
.fill span { display: block; height: 100%; border-radius: 2px; }
.fill--open span { background: var(--accent); }
.fill--sealed span { background: #2ea44f; }
.fill--18 span { width: 18%; }
.fill--62 span { width: 62%; }
.fill--84 span { width: 84%; }

.packs__open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.packs__title { font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--title); }
.check-ok { color: #6fcf8e; white-space: nowrap; }
.packs__label { flex: 0 0 64px; color: var(--muted); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.packs__chems { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.packs__chems div { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.box { width: 12px; height: 12px; flex: none; border: 1px solid var(--muted); border-radius: 3px; }
.box--on { border-color: var(--accent); background: var(--accent); }

/* Reports */

.reports { flex: 1; min-height: 0; display: flex; flex-direction: row; gap: 12px; }
.reports__list { flex: 0 0 36%; display: flex; flex-direction: column; gap: 8px; }

.ship-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.ship-card.is-open { border-color: var(--accent); }
.ship-card__name { font-weight: 600; color: var(--title); }
.ship-card__meta { color: var(--muted); font-size: 10px; }
.ship-card .tag { align-self: flex-start; }

.reports__check { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.reports__mtn { font-size: 10px; letter-spacing: 0.12em; color: var(--muted); }
.reports__mtn strong { color: var(--accent); font-weight: 400; letter-spacing: 0.06em; }
.steps { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.dot { width: 12px; height: 12px; flex: none; border: 1px solid var(--border); border-radius: 50%; }
.dot--done { border-color: #6fcf8e; background: #6fcf8e; }
.steps .fake-btn { margin-left: auto; font-size: 10px; padding: 1px 8px; }
.reports__foot { display: flex; gap: 8px; margin-top: auto; }

@media (max-width: 560px) {
  .screens { --step: 16px; height: 430px; }
  .chem-table .col-rcra,
  .chem-table .col-bottles,
  .chem-table td:nth-child(4),
  .chem-table td:nth-child(5) { display: none; }
  .chem-table .col-name { width: 48%; }
  .chem-table .col-status { width: 30%; }
  .chem-table .col-dot { width: 22%; }
  .packs__list,
  .reports__list { display: none; }
  .screen-tabs { padding-right: 0; }
  /* The app's name and page fit a phone-sized screen's bar. */
  .screen__bar { padding: 10px; }
  .screen__title { font-size: 10px; letter-spacing: 0.15em; }
  .screen__page { font-size: 10px; letter-spacing: 0.12em; }
  /* CONSTELLAR fits a 320px screen. */
  .h2--name { font-size: min(30px, 7.4vw); letter-spacing: 0.1em; }
}

/* Pack-Star: the star system and its tour */

.ps-copy {
  transition: transform 0.7s var(--ease), opacity 0.5s ease;
}

.ps-copy.is-away { transform: translateX(-160px); opacity: 0; }

.ps-slot { flex: 1 1 460px; min-width: 0; aspect-ratio: 1 / 1; }

.ps-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.ps-stage.is-lifted {
  position: fixed;
  inset: 0;
  z-index: 60;
  height: 100%;
  aspect-ratio: auto;
}

.ps-svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

.ps-camera { transform-origin: 0 0; transform-box: view-box; }

.ps-stars { opacity: 0; transition: opacity 0.6s ease; }
.ps-stage.is-dark .ps-stars { opacity: 1; }

.ps-path { stroke: var(--border); transition: stroke 0.6s ease; }
.ps-path.is-current { stroke: var(--accent); }

.ps-ring { opacity: 0; transition: opacity 0.6s ease; }
.ps-ring.is-current { opacity: 1; }

.ps-label { transition: opacity 0.6s ease; }
.ps-stage.is-zoomed .ps-label { opacity: 0; }

.planet { cursor: pointer; }
.planet:focus-visible { outline: none; }
.planet:focus-visible .ps-ring { opacity: 1; }

.spin,
.orbit,
.orbit-rev { transform-origin: 0 0; transform-box: view-box; }

.spin { animation: spin 10s linear infinite; }
.spin--slow { animation-duration: 26s; }
.orbit { animation: spin 120s linear infinite; }
.orbit-rev { animation: spin-rev 120s linear infinite; }
.orbit--0 { animation-duration: 80s; }
.orbit--1 { animation-duration: 105s; }
.orbit--2 { animation-duration: 130s; }
.orbit--3 { animation-duration: 160s; }
.orbit--4 { animation-duration: 190s; }
.orbit--5 { animation-duration: 225s; }
.orbit--6 { animation-duration: 260s; }
.is-paused { animation-play-state: paused; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }

.ps-hud {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.ps-hud.is-visible { opacity: 1; }

.ps-hud__top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(16px, 3vw, 40px);
}

.ps-hud__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.ps-hud__title { font-size: 15px; letter-spacing: 0.3em; white-space: nowrap; }
.ps-hud__sub { font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--window);
  color: var(--text);
  cursor: pointer;
  pointer-events: auto;
}

.ps-panel {
  position: absolute;
  left: clamp(16px, 3vw, 48px);
  top: 50%;
  transform: translateY(-50%);
  width: min(400px, 34vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--window);
  pointer-events: auto;
}

.ps-panel section { display: flex; flex-direction: column; gap: 12px; }
.ps-panel__num { font-size: 13px; letter-spacing: 0.2em; color: var(--accent); }
.ps-panel__name { font-size: 26px; line-height: 1.2; letter-spacing: 0.1em; }
.ps-panel__head { font-size: 16px; font-weight: 600; line-height: 1.45; color: var(--title); }
.ps-panel__text { font-size: 14px; color: var(--muted); }
.ps-panel__nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.ps-panel__nav .btn--secondary { background: var(--charcoal); font-weight: 600; }

.ps-hud__bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}

.ps-rail { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; pointer-events: auto; }

.rail-btn {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--window);
  color: var(--text);
  font: 600 12px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.rail-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--charcoal); }
.ps-hint { font-size: 12px; letter-spacing: 0.1em; color: var(--muted); }

@media (max-width: 899px) {
  .ps-panel {
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 176px;
    width: auto;
    transform: none;
  }
}

/* Constellar */

.pulse { animation: pulse 2.8s linear infinite; }
.pulse-b { animation: pulse-b 3.4s linear infinite; }
.pulse-b--late { animation-delay: 1.2s; }

@keyframes pulse { from { stroke-dashoffset: 494; } to { stroke-dashoffset: 0; } }
@keyframes pulse-b { from { stroke-dashoffset: 348; } to { stroke-dashoffset: 0; } }

/* Who it's for */

.section-head { max-width: 760px; display: flex; flex-direction: column; gap: 18px; }
.section-pad { display: flex; flex-direction: column; gap: 48px; padding-top: 112px; padding-bottom: 112px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}

/* TRANSPORTERS fits a card at its narrowest (250px, .cards). */
.card__title { font-size: 14px; letter-spacing: 0.1em; }
.card p { font-size: 14px; color: var(--muted); }

/* Read by screen readers, not shown. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The program pages (ADR 0194): a claim under the name, the usual way set
   against the program's, and the difference it makes on the job. They show
   what Pack-Star and Constellar achieve, never how. */
.claim { max-width: 20em; font-size: clamp(22px, 2.6vw, 36px); line-height: 1.3; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.compare { display: flex; flex-direction: column; }

.compare__head,
.compare__row {
  display: grid;
  /* DISCREPANCIES, the longest topic, fits 200px at the topic's size. */
  grid-template-columns: minmax(200px, 0.6fr) 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.compare__head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.compare__head span:last-child { color: var(--accent); }

.compare__row { padding: 24px 0; border-bottom: 1px solid var(--border); }
.compare__topic { font-size: 14px; letter-spacing: 0.08em; }
.compare__then,
.compare__now { margin: 0; font-size: 14px; line-height: 1.7; }
.compare__then { color: var(--muted); }
.compare__now { padding-left: 16px; border-left: 2px solid var(--accent); color: var(--title); }

/* A phone shows each side's label above it; wider screens head the columns. */
@media (max-width: 760px) {
  .compare__head { display: none; }
  .compare__row { grid-template-columns: 1fr; gap: 12px; }
  .compare__label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }
  .compare__now .compare__label { color: var(--accent); }
}

.impact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.impact li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--window);
}

.impact h3 { font-size: 16px; letter-spacing: 0.08em; }
.impact h3::before { content: ""; display: block; width: 28px; height: 2px; margin-bottom: 16px; background: var(--accent); }
.impact p { font-size: 14px; color: var(--muted); }

/* A sample pack, every check passed: the outcome, not the workings. */
.proof {
  max-width: 460px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--window);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.proof__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--charcoal);
}

.proof__bar svg { flex: none; width: 18px; height: 18px; }
.proof__title { font-family: var(--display); font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase; white-space: nowrap; color: var(--title); }
.proof__bar .chip { margin-left: auto; }
.proof__list { margin: 0; padding: 6px 16px; list-style: none; }

.proof__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}

.proof__list li:last-child { border-bottom: 0; }
.proof__list .chip { margin-left: auto; }
.proof__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.proof figcaption { padding: 12px 16px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }

/* Why it matters */

.matters { position: relative; flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 48px; padding-top: 120px; padding-bottom: 64px; }

.notes {
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--window);
}

.notes h3 { font-size: 15px; font-weight: 600; color: var(--title); }
.notes p { font-size: 13px; color: var(--muted); }

.horizon { position: relative; display: block; width: 100%; height: 200px; }
/* The horizon runs on into the paper below it: no border between them. */
.band:has(> .horizon) { border-bottom: 0; }

/* Questions, on paper */

.band--paper .eyebrow { color: var(--paper-muted); }
.band--paper .display { color: var(--paper-text); }
.band--paper a { color: var(--paper-text); }

.faq-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  padding-top: 48px;
  padding-bottom: 104px;
}

.faq-wrap__head { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.faq { flex: 1 1 600px; min-width: 0; border-top: 1px solid var(--paper-line); }
.faq details { padding: 20px 0; border-bottom: 1px solid var(--paper-line); }
.faq summary { min-height: 32px; font-size: 16px; font-weight: 600; cursor: pointer; }
.faq p { margin-top: 12px; font-size: 14px; color: var(--paper-muted); }

.cta-band { padding-bottom: 104px; }

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(24px, 5vw, 64px);
  border-radius: 14px;
  background: var(--accent);
  color: var(--charcoal);
}

.cta__copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.cta .display { color: var(--charcoal); }
.cta p { font-size: 15px; }
.band--paper .cta .btn--dark { color: var(--title); }

/* The demo request form and the 404 page */

.page {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 48px;
  padding-bottom: 112px;
}

.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 20px; margin-top: 8px; }

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.form input,
.form textarea {
  padding: 12px 14px;
  border: 1px solid var(--field-edge);
  border-radius: 8px;
  background: var(--window);
  color: var(--text);
  font: 16px/1.5 var(--mono);
  letter-spacing: 0;
  text-transform: none;
}

.form input { min-height: 48px; }
.form textarea { resize: vertical; }
.form input:focus,
.form textarea:focus { border-color: var(--accent); }
.form__wide { grid-column: 1 / -1; }
.form__req { letter-spacing: 0.08em; text-transform: none; }
.form__note { font-size: 13px; color: var(--muted); }
.form__note a { color: var(--accent-hover); }

#demo-status { color: var(--title); }
#demo-status:empty { display: none; }

/* Focus outlines keep 3:1 on the light and orange grounds too. */
.band--paper :focus-visible { outline-color: var(--paper-text); }
.cta :focus-visible { outline-color: var(--charcoal); }

/* The privacy, terms and accessibility pages: long text, easy to read. */

.prose { max-width: 760px; padding-top: 48px; padding-bottom: 112px; }
.prose .h1 { margin-top: 8px; }
.prose .updated { margin-top: 12px; font-size: 13px; color: var(--muted); }
.prose h2 { margin-top: 48px; font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--title); scroll-margin-top: 24px; }
.prose h3 { margin-top: 28px; font-size: 15px; font-weight: 600; color: var(--title); }
.prose p,
.prose ul,
.prose ol,
.prose .table-wrap { margin-top: 14px; }
.prose ul,
.prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose strong { font-weight: 600; color: var(--title); }
.prose a { color: var(--accent-hover); text-underline-offset: 3px; }
.prose .table-wrap { overflow-x: auto; }
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; }
.prose th,
.prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { font-weight: 600; color: var(--title); }

/* The guides' index (ADR 0195): each guide's title and what it covers. */
.prose .guide-list { margin-top: 32px; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.prose .guide-list li { margin: 0; padding: 24px 0; border-bottom: 1px solid var(--border); }
.prose .guide-list h2 { margin-top: 0; font-size: 18px; }
.prose .guide-list h2 a { color: var(--title); text-decoration: none; }
.prose .guide-list h2 a:hover,
.prose .guide-list h2 a:focus-visible { color: var(--accent-hover); text-decoration: underline; }
.prose .guide-list p { margin-top: 8px; color: var(--muted); }

.toc {
  margin-top: 28px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--window);
}

.toc p { margin: 0; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 10px 0 0; }

/* The corner star and the night sky it opens (ADR 0191). site.js shows the
   star when a mouse nears the top right corner, on a first tap there, or on
   a keyboard's focus; the sky fades in over the page, then its message. */
.corner-star {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--title);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.6s ease;
  -webkit-tap-highlight-color: transparent;
}

.corner-star svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
  filter: drop-shadow(0 0 5px rgba(255, 244, 228, 0.8)) drop-shadow(0 0 16px rgba(224, 114, 47, 0.5));
  transform: scale(0.4) rotate(-45deg);
  transition: transform 0.7s var(--ease);
}

.corner-star.is-shown,
.corner-star:focus-visible { opacity: 1; }

.corner-star.is-shown svg,
.corner-star:focus-visible svg { transform: none; }

.corner-star:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

html.is-night-open,
html.is-night-open body { overflow: hidden; }

.night {
  position: fixed;
  inset: 0;
  z-index: 200;
  isolation: isolate;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--charcoal);
  opacity: 0;
  transition: opacity 1s ease;
}

.night:focus { outline: none; }
.night.is-open { opacity: 1; }

.night__message {
  max-width: 24em;
  margin: 0;
  font-size: clamp(20px, 2.6vw, 36px);
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.night.is-saying .night__message { opacity: 1; }

.night__hint {
  position: absolute;
  right: 0;
  bottom: 24px;
  left: 0;
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-align: center;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  transition: opacity 1.2s ease;
}

/* Esc means nothing without a keyboard; there the × is the way back. */
@media (hover: none) {
  .night__hint { display: none; }
}

.night__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 1.2s ease, color 0.2s ease;
}

.night__close svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.night__close:hover { color: var(--title); }
.night__close:focus-visible { opacity: 1; outline: 2px solid var(--accent); outline-offset: 2px; }

.night.is-quiet .night__hint,
.night.is-quiet .night__close { opacity: 1; }

.motion-paused .corner-star,
.motion-paused .corner-star svg,
.motion-paused .night,
.motion-paused .night__message,
.motion-paused .night__hint,
.motion-paused .night__close { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .spin,
  .orbit,
  .orbit-rev,
  .pulse,
  .pulse-b { animation: none; }

  .screen,
  .screen__veil,
  .ps-copy,
  .ps-stars,
  .ps-path,
  .ps-ring,
  .ps-label,
  .ps-hud,
  .corner-star,
  .corner-star svg,
  .night,
  .night__message,
  .night__hint,
  .night__close { transition: none; }
}
