/* ============================================================================
   Parity front page (2026-11-09).

   The world: a mirror on a cream page. Your machine on the left, Citadel on
   the right, one fact per row, pressed against a center seam so a matching
   row reads as its own reflection. "Match" means the same bytes; a row that
   does not match visibly breaks the reflection. Cream paper, WSU green ink,
   and gold for one thing only, a difference (plus focus in the dark).
   Instrument Serif sets the display lines, Lato (from WayneUI) the reading,
   IBM Plex Mono the printouts, values and ids.

   The mirror is one component (section 4, the detail variant in section 8),
   and the status words live in one place, WORDS at the top of parity.js (the
   finished-state words are in index.html too, for readers without JavaScript).
   The desktop app (design/parity-app.md) should use the same words.

   The mark is the one file brand/parity-mark.png, kept small beside the
   wordmark until the new mark lands. It is never redrawn here.

   Dark: the same mirror after hours. A deep green-black, cream type, mint for
   links and matches, differences still gold.

   File map: 1. fonts and tokens  2. base  3. masthead  4. hero and mirror
             5. terminal  6. facts  7. sections  8. side by side  9. commands
             10. install  11. squire, never  12. agents  13. stack, next
             14. footer  15. dark  16. responsive  17. motion  18. print
   ========================================================================== */

/* ------------------------------------------------------ 1. fonts and tokens */

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
}

:root {
  --p-bench: #f6f1e3;        /* Cream: the page */
  --p-paper: #fffdf7;        /* cards */
  --p-sand: #ede6d3;         /* sunk panels */
  --p-line: #d9cfb6;         /* hairlines */
  --p-line-2: #c4b894;
  --p-ink: #1a1a1a;          /* Ink */
  --p-ink-2: #45463f;        /* muted text, 8:1 on cream */
  --p-green: #0c5449;        /* Wayne Green */
  --p-green-2: #0e6556;
  --p-green-deep: #083d35;
  --p-gold: #ffcc33;         /* Wayne Gold: a difference */
  --p-gold-ink: #6b4f00;     /* gold as text on cream */
  --p-steel: #52525b;        /* the site accent (tentative) */
  --p-mint: #dcece5;         /* soft green fills */
  --p-glass: rgba(12, 84, 73, 0.055);  /* Citadel's half of the mirror */
  --p-seam: rgba(12, 84, 73, 0.38);
  --p-sheen: rgba(255, 255, 255, 0.8);
  --p-link: var(--p-green);
  --p-focus: var(--p-green);
  --p-term-bg: #102320;      /* printouts are dark in both themes */
  --p-term-ink: #e8efea;
  --p-term-dim: #9fb6ae;
  --p-term-ok: #74cfb4;
  --p-term-gold: #ffcc33;
  --p-term-line: #24413b;
  --p-masthead: rgba(246, 241, 227, 0.94);
  --p-shadow: 0 1px 0 rgba(26, 26, 26, 0.04), 0 18px 40px -26px rgba(26, 26, 26, 0.45);

  --p-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --p-body: var(--wsu-font-family-body, Lato, Calibri, "Helvetica Neue", Arial, sans-serif);
  --p-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --p-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --p-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --p-radius: 18px;
  --p-masthead-h: 64px;

  /* agent-ready kit tokens */
  --ar-bg: var(--p-paper);
  --ar-ink: var(--p-ink);
  --ar-muted: var(--p-ink-2);
  --ar-rule: var(--p-line);
  --ar-accent: var(--p-green);
  --ar-on-accent: #ffffff;
  --ar-code-bg: var(--p-sand);
  --ar-code-ink: var(--p-ink);
  --ar-term-bg: var(--p-term-bg);
  --ar-term-ink: var(--p-term-ink);
  --ar-focus: var(--p-focus);
  --ar-radius: 14px;
  --ar-display: var(--p-serif);
  --ar-body: var(--p-body);
  --ar-mono: var(--p-mono);
  --ar-shadow: var(--p-shadow);

  color-scheme: light;
}

/* -------------------------------------------------------------- 2. base */

html {
  background: var(--p-bench);
  scroll-padding-top: calc(var(--p-masthead-h) + 1rem);
}

body {
  margin: 0;
  color: var(--p-ink);
  background: var(--p-bench);
  font-family: var(--p-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}

.wsu-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}

a {
  color: var(--p-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--p-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

code {
  font-family: var(--p-mono);
  font-size: 0.88em;
  padding: 0.08em 0.32em;
  border-radius: 5px;
  background: var(--p-sand);
  color: var(--p-ink);
}

h1, h2, h3 {
  margin: 0;
  color: var(--p-ink);
}

h2 {
  font-family: var(--p-serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.1rem;
  line-height: 1.3;
}

/* The eyebrow's bullet is a short rule. (Metaphor-free on purpose: the metaphor stays in the hero.) */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--p-green);
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 1.6rem;
  height: 2px;
  background: currentColor;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--p-green);
  transition: background-color 0.2s, color 0.2s;
}

.btn--primary {
  background: var(--p-green);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--p-green-deep);
  border-color: var(--p-green-deep);
}

.btn--quiet {
  background: transparent;
  color: var(--p-green);
}

.btn--quiet:hover {
  background: var(--p-paper);
}

.chip {
  display: inline-block;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  background: var(--p-paper);
  border: 1px solid var(--p-line-2);
  color: var(--p-ink-2);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ---------------------------------------------------------- 3. masthead */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--p-masthead);
  border-bottom: 1px solid var(--p-line);
}

.masthead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--p-masthead-h);
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--p-ink);
  text-decoration: none;
}

.masthead__brand img {
  border-radius: 9px;
}

.masthead__name {
  font-family: var(--p-serif);
  font-size: 1.7rem;
  line-height: 1;
}

.masthead__ver {
  font-family: var(--p-mono);
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--p-line-2);
  border-radius: 999px;
  color: var(--p-ink-2);
}

.masthead__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.15rem 1.1rem;
}

.masthead__nav a {
  color: var(--p-ink);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.masthead__nav a:hover {
  border-bottom-color: var(--p-green);
}

.masthead__nav .masthead__install {
  padding: 0.4rem 0.95rem;
  border: 2px solid var(--p-green);
  border-radius: 999px;
  color: var(--p-green);
}

.masthead__nav .masthead__install:hover {
  background: var(--p-green);
  color: #ffffff;
}

/* -------------------------------------------------- 4. hero and mirror */

.hero {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.hero__copy {
  padding-top: clamp(0rem, 2vw, 1.5rem);
}

.hero__title {
  font-family: var(--p-serif);
  font-weight: 400;
  font-size: clamp(4.6rem, 11vw, 8.8rem);
  line-height: 0.86;
  letter-spacing: -0.025em;
  margin: 0 0 0.2rem;
}

.hero__tagline {
  margin: 0 0 1.4rem;
  font-family: var(--p-serif);
  font-style: italic;
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  line-height: 1.12;
  color: var(--p-green);
}

.hero__blurb {
  max-width: 34rem;
  margin: 0 0 1rem;
  font-size: 1.12rem;
}

.hero__blurb--quiet {
  font-size: 1rem;
  color: var(--p-ink-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.6rem 0 1.4rem;
}

.hero__agent {
  margin-top: 0.5rem;
}

/* The mirror card. One component, two sizes: the hero (values only) and the
   side-by-side section (a label column and the image switch, section 8).
   Your machine sits left of the seam, Citadel right of it, each value pressed
   against the seam so a matching row reads as a reflection. Citadel's half is
   the glass: a faint green tint that runs down the column. */
.mirror-card {
  margin: 0;
  min-width: 0;
}

.mirror--hero {
  position: relative;
  padding: clamp(1.1rem, 2.6vw, 1.7rem) clamp(0.9rem, 2.2vw, 1.5rem) clamp(1.1rem, 2.4vw, 1.5rem);
  background: var(--p-paper);
  border: 1px solid var(--p-line);
  border-radius: 24px;
  box-shadow: var(--p-shadow);
}

.mirror-card__caption {
  margin: 0.9rem 0.25rem 0;
  font-size: 0.9rem;
  color: var(--p-ink-2);
}

.mirror {
  --seam-w: 2.75rem;
  --status-w: 5.5rem;
  --spread: 0rem;            /* how far apart the halves sit; the hero opens wide, then closes */
}

.mirror__heads,
.mirror__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--seam-w) minmax(0, 1fr) var(--status-w);
  grid-template-areas: "l seam r status";
  align-items: stretch;
}

.mirror__head--label,
.mirror__label { grid-area: label; }
.mirror__head--l,
.mirror__val--l { grid-area: l; }
.mirror__head--seam,
.mirror__seam { grid-area: seam; }
.mirror__head--r,
.mirror__val--r { grid-area: r; }
.mirror__head--status,
.mirror__status { grid-area: status; }

.mirror__head {
  padding: 0 0.9rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--p-ink-2);
}

.mirror__head--l {
  text-align: right;
  transform: translateX(calc(var(--spread) * -1));
}

.mirror__head--r {
  color: var(--p-green);
  transform: translateX(var(--spread));
}

.mirror__head--status {
  padding-inline: 0.5rem 0;
}

.mirror__val {
  display: flex;
  align-items: center;
  min-height: 2.9rem;
  padding: 0.45rem 0.9rem;
  font-family: var(--p-mono);
  font-size: 0.92rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  box-sizing: border-box;
  transform: translateX(var(--shift, 0));
}

.mirror__val--l {
  --shift: calc(var(--spread) * -1);
  justify-content: flex-end;
  text-align: right;
}

/* An id breaks only between its label and its hash. */
.mirror__val--id {
  flex-wrap: wrap;
  column-gap: 0.6ch;
  overflow-wrap: normal;
}

.mirror__val--r {
  --shift: var(--spread);
  justify-content: flex-start;
  background: var(--p-glass);
}

/* The glass runs past the seam's edge, so the tint is one band from top to bottom. */
.mirror__heads .mirror__head--r {
  background: var(--p-glass);
  border-radius: 12px 12px 0 0;
  padding-top: 0.7rem;
}

.mirror__heads {
  align-items: end;
}

.mirror__row:last-child .mirror__val--r {
  border-radius: 0 0 12px 12px;
}

/* The seam: one hairline down the middle, and on each row a small round stamp
   with the comparison sign. "=" match, "≈" close, "≠" differs; screen readers
   get the words next to it. */
.mirror__seam {
  position: relative;
  display: grid;
  place-items: center;
}

.mirror__seam::before,
.mirror__seam::after {
  content: "";
  position: absolute;
  left: calc(50% - 1px);
  width: 2px;
  background: var(--p-seam);
}

.mirror__seam::before { top: 0; height: 50%; }
.mirror__seam::after { bottom: 0; height: 50%; }

.mirror__heads .mirror__head--seam {
  position: relative;
}

.mirror__heads .mirror__head--seam::after {
  content: "";
  position: absolute;
  left: calc(50% - 1px);
  bottom: 0;
  width: 2px;
  height: 0.9rem;
  background: var(--p-seam);
}

.mirror__glyph {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  border: 1.5px solid var(--p-green);
  background: var(--p-paper);
  color: var(--p-green);
  font-family: var(--p-mono);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  box-sizing: border-box;
}

.mirror__status {
  display: flex;
  align-items: center;
  padding-left: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--p-green);
}

/* Close and Differs break the reflection: the left value slips off its line,
   the seam cracks (its two halves step apart), and the stamp turns gold. */
.mirror__row[data-state="close"] .mirror__val--l {
  --shift: calc(var(--spread) * -1 - 0.35rem);
}

.mirror__row[data-state="differs"] .mirror__val--l {
  --shift: calc(var(--spread) * -1 - 0.7rem);
}

.mirror__row[data-state="differs"] .mirror__val--l {
  color: var(--p-gold-ink);
  font-style: italic;
  transform: translate(var(--shift), 0.12rem) rotate(-0.8deg);
}

.mirror__row[data-state="close"] .mirror__val--l {
  transform: translate(var(--shift), 0.06rem) rotate(-0.35deg);
}

.mirror__row:is([data-state="close"], [data-state="differs"]) .mirror__seam::before {
  background: var(--p-gold-ink);
  transform: translateX(-2px);
}

.mirror__row:is([data-state="close"], [data-state="differs"]) .mirror__seam::after {
  background: var(--p-gold-ink);
  transform: translateX(2px);
}

.mirror__row[data-state="close"] .mirror__glyph {
  border-style: dashed;
  border-color: var(--p-gold-ink);
  color: var(--p-gold-ink);
}

.mirror__row[data-state="differs"] .mirror__glyph {
  border-color: var(--p-gold);
  background: var(--p-gold);
  color: #1a1a1a;
  transform: rotate(-8deg);
}

.mirror__row[data-state="close"] .mirror__status {
  color: var(--p-gold-ink);
}

.mirror__row[data-state="differs"] .mirror__status {
  color: var(--p-gold-ink);
}

/* The summary under the mirror: one serif line, the way the CLI ends its printout. */
.mirror__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.8rem;
  min-height: 2.6rem;
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--p-line);
}

.mirror__word {
  font-family: var(--p-serif);
  font-size: 2.3rem;
  line-height: 1;
  color: var(--p-green);
}

.mirror.is-close .mirror__word,
.mirror.is-differs .mirror__word {
  color: var(--p-gold-ink);
}

.mirror__sub {
  font-family: var(--p-mono);
  font-size: 0.85rem;
  color: var(--p-ink-2);
  overflow-wrap: anywhere;
}

.mirror__replay {
  display: inline-flex;
  margin-top: 0.9rem;
  padding: 0.4rem 0.9rem;
  font: 700 0.9rem var(--p-body);
  color: var(--p-green);
  background: transparent;
  border: 2px solid var(--p-green);
  border-radius: 999px;
  cursor: pointer;
}

.mirror__replay:hover {
  background: var(--p-green);
  color: #ffffff;
}

.mirror__replay[hidden] {
  display: none;
}

/* ------------------------------------------------------------ 5. terminal */

.term {
  min-width: 0;
  border-radius: 14px;
  background: var(--p-term-bg);
  color: var(--p-term-ink);
  overflow: hidden;
}

.term__bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid var(--p-term-line);
  font-family: var(--p-mono);
  font-size: 0.75rem;
  color: var(--p-term-dim);
}

/* Three short bars, not traffic lights. */
.term__bar span {
  width: 2px;
  height: 9px;
  background: var(--p-term-dim);
  opacity: 0.6;
}

.term__bar span:nth-child(2) {
  height: 13px;
}

.term__bar b {
  margin-left: 0.6rem;
  font-weight: 400;
}

.term__body {
  margin: 0;
  padding: 1rem 1.1rem 1.15rem;
  font-family: var(--p-mono);
  font-size: 0.8rem;
  line-height: 1.62;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--p-term-ink);
}

.term__body code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  border-radius: 0;
}

.term__body b {
  font-weight: 600;
  color: #ffffff;
}

/* Each step line hangs: a long line wraps under its description, not under the check mark. */
.t-line:not(.t-end) {
  display: inline-block;
  box-sizing: border-box;
  width: 100%;
  padding-left: 11ch;
  text-indent: -11ch;
}

.t-prompt { color: var(--p-term-dim); }
.t-cmd { color: #ffffff; font-weight: 600; }
.t-title { font-weight: 600; color: #ffffff; }
.t-ok { color: var(--p-term-ok); }
.t-run { color: var(--p-term-gold); }
.t-dim { color: var(--p-term-dim); }
.t-url { color: var(--p-term-gold); }

.t-id {
  position: relative;
  color: #ffffff;
}

.t-id::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--p-term-gold);
  transform: scaleX(1);
  transform-origin: left;
}

.term--flat {
  border: 1px solid var(--p-term-line);
}

.term--flat:focus-visible {
  outline: 3px solid var(--p-focus);
  outline-offset: 3px;
}

/* --------------------------------------------------------------- 6. facts */

.facts {
  border-block: 1px solid var(--p-line);
  background: var(--p-paper);
}

.facts__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts__list li {
  padding: 1.3rem 1.2rem 1.4rem;
  border-left: 1px solid var(--p-line);
  font-size: 0.95rem;
  color: var(--p-ink-2);
}

.facts__list li:first-child {
  border-left: 0;
  padding-left: 0;
}

.facts__list strong {
  display: block;
  font-family: var(--p-serif);
  font-weight: 400;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--p-green);
  margin-bottom: 0.3rem;
}

/* ------------------------------------------------------------ 7. sections */

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.head {
  max-width: 48rem;
  margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
}

.head--split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1rem 3rem;
  align-items: end;
}

.head__note {
  margin: 0.9rem 0 0;
  color: var(--p-ink-2);
  max-width: 40rem;
}

.head--split .head__note {
  margin: 0;
}

.section--mirror {
  background: var(--p-paper);
  border-bottom: 1px solid var(--p-line);
}

/* --------------------------------------------------- 8. side by side */

/* The detail mirror adds a label column on the left, and an image switch. */
.mirror--detail {
  --status-w: 6.5rem;
  position: relative;
}

.mirror--detail .mirror__heads,
.mirror--detail .mirror__row {
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr) var(--seam-w) minmax(0, 1fr) var(--status-w);
  grid-template-areas: "label l seam r status";
}

.mirror--detail .mirror__row {
  border-top: 1px solid var(--p-line);
}

.mirror--detail .mirror__row:last-child {
  border-bottom: 1px solid var(--p-line);
}

.mirror--detail .mirror__val {
  min-height: 3.3rem;
  font-size: 0.86rem;
}

.mirror--detail .mirror__head--label {
  padding-left: 0;
}

.mirror__label {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem 0.5rem 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--p-ink);
}

.mirror--detail .mirror__row:last-child .mirror__val--r {
  border-radius: 0;
}

.mirror--detail .mirror__summary {
  justify-content: center;
  margin-top: 1.6rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius);
  background: var(--p-bench);
  text-align: center;
}

.mirror--detail .mirror__word {
  font-size: 2rem;
}

.mirror__switch {
  display: inline-flex;
  padding: 4px;
  margin-bottom: 1.6rem;
  border-radius: 999px;
  background: var(--p-sand);
  border: 1px solid var(--p-line);
}

.mirror__switch button {
  min-height: 2.6rem;
  padding: 0.4rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--p-ink);
  font: 700 0.95rem var(--p-body);
  cursor: pointer;
}

.mirror__switch button code {
  background: transparent;
  padding: 0;
}

.mirror__switch button[aria-checked="true"] {
  background: var(--p-green);
  color: #ffffff;
}

.mirror__switch button[aria-checked="true"] code {
  color: #ffffff;
}

.mirror__fine {
  max-width: 48rem;
  margin: 1.3rem auto 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--p-ink-2);
}

/* ------------------------------------------------------------ 9. commands */

.day {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  align-items: start;
}

.day__steps {
  display: grid;
  gap: 0.4rem;
}

.day__step {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  grid-template-areas: "no cmd" "no what";
  gap: 0.1rem 0.8rem;
  align-items: start;
  padding: 0.85rem 1rem;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--p-ink);
  font: inherit;
  cursor: pointer;
}

.day__step:hover {
  background: var(--p-paper);
  border-color: var(--p-line);
}

.day__step[aria-selected="true"] {
  background: var(--p-paper);
  border-color: var(--p-green);
  box-shadow: inset 4px 0 0 var(--p-green);
}

.day__no {
  grid-area: no;
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 1.3rem;
  margin-top: 0.15rem;
  border-radius: 999px;
  border: 2px solid var(--p-green);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--p-green);
  background: var(--p-mint);
  box-sizing: border-box;
}

.day__step[aria-selected="true"] .day__no {
  background: var(--p-gold);
  border-color: var(--p-gold-ink);
  color: #1a1a1a;
}

.day__cmd {
  grid-area: cmd;
  font-family: var(--p-mono);
  font-weight: 600;
  font-size: 0.98rem;
}

.day__what {
  grid-area: what;
  font-size: 0.93rem;
  color: var(--p-ink-2);
}

.day__out .term {
  min-height: 22rem;
}

/* Terminal or app: each step's panel holds both faces. The switch shows one; without JavaScript there is no
   switch and both show, the printout first. The app's window gets the wider column, so its type stays readable. */
.day__panel {
  display: grid;
  gap: 1.4rem;
  border-radius: 14px;
}

.day__panel[hidden] {
  display: none;
}

.day__panel:focus-visible {
  outline: 3px solid var(--p-focus);
  outline-offset: 3px;
}

/* The switch sits above both columns, so it stays under the pointer when the app's column widens. */
.day__faces {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1.6rem;
}

.day__switch {
  display: none;
  flex: none;
  padding: 4px;
  border-radius: 999px;
  background: var(--p-sand);
  border: 1px solid var(--p-line);
}

.js .day__switch {
  display: inline-flex;
}

.day__switch button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.5rem;
  padding: 0.35rem 1.05rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--p-ink);
  font: 700 0.93rem var(--p-body);
  white-space: nowrap;
  cursor: pointer;
}

.day__switch button:hover {
  background: var(--p-paper);
}

.day__switch button[aria-checked="true"] {
  background: var(--p-green);
  color: #ffffff;
}

.day__switch button:focus-visible {
  outline: 3px solid var(--p-focus);
  outline-offset: 2px;
}

/* "Coming in 0.2.0" rides inside the button, so nobody reads the app as something to download today. */
.day__soon {
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.92;
}

.day__same {
  flex: 1 1 22rem;
  max-width: 46rem;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--p-ink-2);
}

.js .day:not(.is-app) .shot,
.js .day.is-app .day__panel > .term {
  display: none;
}

.js .day.is-app {
  grid-template-columns: minmax(0, 0.58fr) minmax(0, 1.42fr);
}

/* The app's window: its own slim bar (the same three short bars as the printouts), then the screen. */
.shot {
  margin: 0;
}

.shot__frame {
  border: 1px solid var(--p-line-2);
  border-radius: 14px;
  overflow: hidden;
  background: var(--p-paper);
  box-shadow: var(--p-shadow);
}

.shot__bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.45rem 0.9rem;
  border-bottom: 1px solid var(--p-line);
  background: var(--p-sand);
  font-family: var(--p-mono);
  font-size: 0.75rem;
  color: var(--p-ink-2);
}

.shot__bar span {
  width: 2px;
  height: 9px;
  background: var(--p-ink-2);
  opacity: 0.55;
}

.shot__bar span:nth-child(2) {
  height: 13px;
}

.shot__bar b {
  margin-left: 0.6rem;
  font-weight: 400;
}

.shot picture,
.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.3rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--p-ink-2);
}

.shot figcaption b {
  color: var(--p-ink);
}

.shot figcaption a {
  font-weight: 700;
  color: var(--p-link);
  white-space: nowrap;
}

.after {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: clamp(2.2rem, 5vw, 3.4rem);
}

.after__item {
  padding: 1.3rem 1.4rem;
  border-top: 3px solid var(--p-green);
  background: var(--p-paper);
  border-radius: 0 0 14px 14px;
}

.after__item h3 {
  font-family: var(--p-serif);
  font-weight: 400;
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.after__item p {
  margin: 0;
  font-size: 0.98rem;
}

/* ------------------------------------------------------------- 10. install */

.section--install {
  background: var(--p-green-deep);
  color: #f6f1e3;
}

.section--install h2,
.section--install h3 {
  color: #fffdf7;
}

.section--install .eyebrow {
  color: var(--p-gold);
}

.section--install .head__note,
.section--install .oses__need,
.section--install .downloads__note {
  color: #d9e6df;
}

.section--install a {
  color: #ffe08a;
}

.section--install code {
  background: rgba(255, 255, 255, 0.1);
  color: #fffdf7;
}

.section--install .chip {
  display: block;
  width: fit-content;
  margin-top: 0.9rem;
  padding: 0.45rem 0.85rem;
  border-radius: 12px;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #f6f1e3;
}

.section--install :where(a, button, [tabindex]):focus-visible {
  outline-color: var(--p-gold);
}

.oses {
  max-width: 52rem;
}

.oses__tabs {
  display: flex;
  gap: 0.3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.oses__tabs button {
  min-height: 2.8rem;
  padding: 0.45rem 1.1rem;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #d9e6df;
  font: 700 1rem var(--p-body);
  cursor: pointer;
}

.oses__tabs button[aria-selected="true"] {
  color: #ffffff;
  border-bottom-color: var(--p-gold);
}

.oses__panel {
  padding-top: 1.3rem;
}

.oses__where {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.copyline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.65rem 0.65rem 1.1rem;
  border-radius: 14px;
  background: var(--p-term-bg);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.copyline code {
  flex: 1;
  min-width: 0;
  padding: 0;
  background: none;
  color: #ffffff;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.copyline__btn {
  flex: none;
  min-height: 2.4rem;
  padding: 0.35rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--p-gold);
  color: #1a1a1a;
  font: 700 0.9rem var(--p-body);
  cursor: pointer;
}

.copyline__btn:hover {
  background: #ffe08a;
}

.copyline__btn:focus-visible {
  outline: 3px solid #ffffff;
}

.oses__need {
  margin: 0.9rem 0 0;
  max-width: 46rem;
}

.downloads {
  margin-top: clamp(2.4rem, 5vw, 3.4rem);
}

.downloads__title {
  font-family: var(--p-serif);
  font-weight: 400;
  font-size: 1.8rem;
}

.downloads__note {
  max-width: 46rem;
  margin: 0.4rem 0 1.2rem;
}

.downloads__wrap {
  overflow-x: auto;
}

.downloads__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.downloads__table th,
.downloads__table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.downloads__table thead th {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d9e6df;
}

.downloads__table td a {
  font-family: var(--p-mono);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------- 11. squire, never */

.squire {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem 3rem;
}

.squire__body p {
  margin: 0 0 1rem;
}

.section--squire .copyline {
  margin-bottom: 1rem;
}

.section--squire {
  border-bottom: 1px solid var(--p-line);
}

.section--never {
  background: var(--p-paper);
  border-bottom: 1px solid var(--p-line);
}

.never {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.never li {
  padding-top: 1rem;
  border-top: 3px solid var(--p-green);
}

.never h3 {
  font-family: var(--p-serif);
  font-weight: 400;
  font-size: 1.55rem;
  margin-bottom: 0.3rem;
}

.never p {
  margin: 0;
  color: var(--p-ink-2);
}

/* ---------------------------------------------------------------- 12. agents */

.orders {
  display: grid;
  gap: 1.2rem;
}

.ar-prompt__title {
  font-family: var(--p-serif);
  font-weight: 400;
  font-size: 1.6rem;
}

.orders__fine {
  margin: 0.4rem 0 0;
  color: var(--p-ink-2);
  font-size: 0.95rem;
}

/* ----------------------------------------------------------- 13. stack, next */

.section--stack {
  background: var(--p-paper);
  border-block: 1px solid var(--p-line);
}

.team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  grid-template-areas: "mark name" "mark role" "mark here";
  gap: 0.1rem 0.9rem;
  align-items: start;
  padding: 0.9rem;
  border: 1px solid var(--p-line);
  border-radius: 14px;
  background: var(--p-bench);
}

.member__mark {
  grid-area: mark;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
}

.member__mark img {
  display: block;
  border-radius: 12px;
}

.member__mark--tile {
  background: var(--p-green);
  border-radius: 12px;
}

.member__name {
  grid-area: name;
  font-weight: 700;
}

.member__role {
  grid-area: role;
  font-size: 0.9rem;
  color: var(--p-ink-2);
}

.member__here {
  grid-area: here;
  justify-self: start;
  margin-top: 0.3rem;
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  background: var(--p-gold);
  color: #1a1a1a;
  font-size: 0.75rem;
  font-weight: 700;
}

.member--self {
  border-color: var(--p-green);
  box-shadow: inset 0 0 0 1px var(--p-green);
}

.next {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem 3rem;
  align-items: start;
}

.next p {
  color: var(--p-ink-2);
}

.schedule {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.schedule li {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--p-line);
  border-radius: 14px;
  background: var(--p-paper);
}

.schedule .chip {
  flex: none;
  font-weight: 700;
  color: var(--p-green);
  border-color: var(--p-green);
}

/* The road to 1.0: each release checklist run is a stamp, in the mirror's own words. A run that matched wears the
   green ring and says Proven; the run still owed waits in a dashed ring, the way a row waits before Citadel's half
   reflects in. The rows come from MAINTAINING.md, "Checklist runs"; move a stamp only when its row lands there. */
.road {
  display: grid;
  gap: 1rem;
}

.proofs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.proof {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--p-line);
  border-radius: 14px;
  background: var(--p-paper);
}

.proof[data-state="owed"] {
  border-style: dashed;
  border-color: var(--p-line-2);
  background: transparent;
}

.proof__glyph {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  border: 1.5px solid var(--p-green);
  background: var(--p-mint);
  color: var(--p-green);
  font-family: var(--p-mono);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  box-sizing: border-box;
}

.proof[data-state="owed"] .proof__glyph {
  border-style: dashed;
  border-color: var(--p-ink-2);
  background: var(--p-paper);
  color: var(--p-ink-2);
}

.proof__what {
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--p-ink-2);
}

.proof__what strong {
  display: block;
  color: var(--p-ink);
  font-size: 1rem;
}

.proof__state {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--p-green);
}

.proof[data-state="owed"] .proof__state {
  color: var(--p-ink-2);
}

/* -------------------------------------------------------------- 14. footer */

.foot {
  background: var(--p-green-deep);
  color: #d9e6df;
  padding-block: 2.4rem;
}

.foot__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.6rem 2rem;
  align-items: baseline;
}

.foot p {
  margin: 0;
  font-size: 0.92rem;
}

.foot__joke {
  font-family: var(--p-serif);
  font-style: italic;
  font-size: 1.5rem !important;
  color: var(--p-gold);
}

.foot a {
  color: #ffffff;
}

.foot :where(a):focus-visible {
  outline-color: var(--p-gold);
}

/* ---------------------------------------------------------------- 15. dark */

@media (prefers-color-scheme: dark) {
  :root {
    --p-bench: #0c1513;
    --p-paper: #13201d;
    --p-sand: #1a2b27;
    --p-line: #26392f;
    --p-line-2: #36504a;
    --p-ink: #ecefe9;
    --p-ink-2: #b9c7c1;
    --p-green: #74cfb4;
    --p-green-2: #8fdcc5;
    --p-green-deep: #08221d;
    --p-gold-ink: #ffd866;
    --p-mint: #173a32;
    --p-glass: rgba(116, 207, 180, 0.07);
    --p-seam: rgba(116, 207, 180, 0.45);
    --p-sheen: rgba(116, 207, 180, 0.16);
    --p-link: #8fdcc5;
    --p-focus: #ffcc33;
    --p-term-bg: #08110f;
    --p-term-line: #22382f;
    --p-masthead: rgba(12, 21, 19, 0.94);
    --p-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 18px 40px -26px rgba(0, 0, 0, 0.85);
    --ar-on-accent: #062520;
    color-scheme: dark;
  }

  .btn--primary {
    color: #062520;
  }

  .btn--primary:hover {
    background: #8fdcc5;
    border-color: #8fdcc5;
  }

  .masthead__nav .masthead__install:hover,
  .mirror__replay:hover {
    color: #062520;
  }

  .mirror__switch button[aria-checked="true"],
  .mirror__switch button[aria-checked="true"] code,
  .day__switch button[aria-checked="true"] {
    color: #062520;
  }

  .member__mark--tile {
    background: #0c5449;
  }

  .section--install {
    background: #0a2a24;
    border-block: 1px solid var(--p-line);
  }

  .copyline {
    background: #061310;
  }
}

/* ---------------------------------------------------------- 16. responsive */

@media (max-width: 980px) {
  .hero__grid,
  .head--split,
  .day,
  .squire,
  .next {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts__list li:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .facts__list li:nth-child(n + 3) {
    border-top: 1px solid var(--p-line);
  }

  .after {
    grid-template-columns: minmax(0, 1fr);
  }

  .day__out .term {
    min-height: 0;
  }

  .js .day.is-app {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .masthead__nav a:not(.masthead__install):not([href="docs/"]) {
    display: none;
  }

  .proofs {
    grid-template-columns: minmax(0, 1fr);
  }

  .masthead__ver {
    display: none;
  }

  .mirror__switch {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    width: 100%;
    box-sizing: border-box;
  }

  .mirror__switch button {
    border-radius: 14px;
  }

  /* The detail mirror folds: the label and the status ride above each pair. */
  .mirror--detail {
    --seam-w: 2.25rem;
  }

  .mirror--detail .mirror__heads,
  .mirror--detail .mirror__row {
    grid-template-columns: minmax(0, 1fr) var(--seam-w) minmax(0, 1fr);
    grid-template-areas: "label label status" "l seam r";
  }

  .mirror--detail .mirror__heads {
    grid-template-areas: "l seam r";
  }

  .mirror--detail :is(.mirror__head--label, .mirror__head--status) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .mirror--detail .mirror__label {
    padding: 0.75rem 0 0.15rem;
  }

  .mirror--detail .mirror__status {
    justify-content: flex-end;
    padding: 0.75rem 0 0.15rem;
  }

  .mirror--detail .mirror__val {
    min-height: 2.6rem;
    padding: 0.35rem 0.6rem 0.65rem;
    align-items: flex-start;
  }

  .mirror--detail .mirror__val--r {
    padding-top: 0.35rem;
  }
  .never {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts__list {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts__list li {
    border-left: 0 !important;
    padding-left: 0 !important;
    border-top: 1px solid var(--p-line);
  }

  .facts__list li:first-child {
    border-top: 0;
  }

  .foot__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .copyline {
    flex-wrap: wrap;
  }

  .downloads__table td a {
    font-size: 0.78rem;
  }
}

@media (max-width: 420px) {
  .hero__title {
    font-size: 4.2rem;
  }

  .mirror__word {
    font-size: 1.9rem;
  }

  .mirror__val {
    padding-inline: 0.55rem;
    font-size: 0.84rem;
  }

  .oses__tabs button {
    padding-inline: 0.7rem;
  }
}

@media (max-width: 600px) {
  /* The hero keeps the pair and the stamp; its status words go to screen readers only (every row says Match,
     and the summary says it once). */
  .mirror--hero {
    --seam-w: 2.25rem;
    --status-w: 0px;
  }

  .mirror--hero {
    padding-inline: 0.6rem;
  }

  .mirror--hero .mirror__val {
    padding-inline: 0.45rem;
    font-size: 0.78rem;
  }

  .mirror--hero .mirror__head {
    padding-inline: 0.45rem;
    letter-spacing: 0.1em;
  }

  .mirror--hero :is(.mirror__status, .mirror__head--status) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .mirror--hero .mirror__val {
    font-size: 0.72rem;
  }

  /* The terminal-or-app switch stacks, as the mirror's switch does, so "Coming in 0.2.0" never pushes sideways. */
  .js .day__switch {
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    border-radius: 18px;
  }

  .day__switch button {
    justify-content: center;
    border-radius: 14px;
  }
}

/* -------------------------------------------------------------- 17. motion */

/* Only with motion. Without it the mirror is the finished reading, and every word is there.

   The hero plays parity up as a comparison: the halves start apart; for each row your machine's value
   unfolds from the seam while the stamp pulses (checking), then Citadel's value unfolds on the other
   side as its reflection, the stamp lands and the status word slides in. When every row matches, the
   halves close on the seam and a glint runs down the stamps. The head script drops the motion class if
   parity.js never arrives, so the first paint below is never a dead end. */

.motion .mirror__val {
  transition: transform 0.9s var(--p-spring), color 0.3s;
}

.motion .mirror__seam::before,
.motion .mirror__seam::after {
  transition: transform 0.45s var(--p-spring), background-color 0.3s;
}

.motion .mirror__glyph {
  transition: transform 0.5s var(--p-spring), background-color 0.3s, border-color 0.3s, color 0.3s;
}

.motion .mirror__status {
  transition: color 0.3s;
}

/* The opening frame: halves apart, rows waiting. */
.motion .mirror[data-autoplay]:not(.is-finished) {
  --spread: 1.1rem;
}

.motion .mirror[data-autoplay]:not(.is-finished) .mirror__row:not(.is-checking):not(.is-shown) :is(.mirror__val, .mirror__glyph, .mirror__status),
.motion .mirror[data-autoplay]:not(.is-finished) .mirror__row.is-checking :is(.mirror__val--r, .mirror__status) {
  visibility: hidden;
}

.motion .mirror__val--l {
  transform-origin: right center;
}

.motion .mirror__val--r {
  transform-origin: left center;
}

.motion .mirror__row.is-checking .mirror__val--l {
  animation: p-unfold-l 0.55s var(--p-ease) both;
}

.motion .mirror__row.is-checking .mirror__glyph {
  animation: p-pulse 0.9s ease-in-out infinite;
}

.motion .mirror__row.is-shown .mirror__val--r {
  animation: p-unfold-r 0.65s var(--p-spring) both;
}

.motion .mirror__row.is-shown .mirror__glyph {
  animation: p-pop 0.42s var(--p-spring);
}

.motion .mirror__row.is-shown .mirror__status {
  animation: p-slide 0.45s var(--p-ease) 0.12s both;
}

@keyframes p-unfold-l {
  0% { transform: translateX(var(--shift)) perspective(700px) rotateY(88deg); }
  100% { transform: translateX(var(--shift)) perspective(700px) rotateY(0deg); }
}

@keyframes p-unfold-r {
  0% { transform: translateX(var(--shift)) perspective(700px) rotateY(-88deg); }
  100% { transform: translateX(var(--shift)) perspective(700px) rotateY(0deg); }
}

@keyframes p-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 204, 51, 0); }
  50% { box-shadow: 0 0 0 5px rgba(255, 204, 51, 0.55); }
}

@keyframes p-pop {
  0% { transform: scale(0.4); }
  100% { transform: scale(1); }
}

@keyframes p-slide {
  0% { transform: translateX(-0.5rem); }
  100% { transform: translateX(0); }
}

/* On Match: a gold glint runs down the stamps, top to bottom. */
.motion .mirror.is-aligned .mirror__glyph {
  animation: p-glint 0.9s var(--p-ease) calc(var(--i, 0) * 70ms) both;
}

/* ...and a sheen crosses Citadel's glass, one pane after another, so it reads as one diagonal light. */
.mirror__val--r {
  position: relative;
  overflow: hidden;
}

.motion .mirror.is-aligned .mirror__val--r::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, var(--p-sheen) 50%, transparent 70%);
  transform: translateX(-110%);
  animation: p-sheen 1.1s var(--p-ease) calc(var(--i, 0) * 70ms + 120ms) both;
  pointer-events: none;
}

@keyframes p-sheen {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(110%); }
}

@keyframes p-glint {
  0% { box-shadow: 0 0 0 0 rgba(255, 204, 51, 0.85); }
  100% { box-shadow: 0 0 0 12px rgba(255, 204, 51, 0); }
}

.motion .mirror.is-fresh .mirror__word {
  animation: p-rise 0.7s var(--p-ease) both;
}

@keyframes p-rise {
  0% { transform: translateY(0.5rem); }
  100% { transform: translateY(0); }
}

/* The side-by-side mirror: Citadel's half reflects in, row by row, when it scrolls into view. */
.motion.js .mirror--detail:not(.is-seen) .mirror__row :is(.mirror__val--r, .mirror__glyph, .mirror__status) {
  visibility: hidden;
}

.motion .mirror--detail.is-seen .mirror__val--r {
  animation: p-unfold-r 0.7s var(--p-spring) calc(var(--i, 0) * 75ms + 80ms) both;
}

.motion .mirror--detail.is-seen .mirror__glyph {
  animation: p-pop 0.42s var(--p-spring) calc(var(--i, 0) * 75ms + 260ms) both;
}

/* After the reveal, the switch only moves what changes: the crack, the stamp, the slip. */
.motion .mirror--detail.is-settled :is(.mirror__val--r, .mirror__glyph) {
  animation: none;
}

.motion .mirror--detail .mirror__row.is-flip .mirror__glyph {
  animation: p-pop 0.42s var(--p-spring);
}

/* The road to 1.0: when it scrolls into view the proven stamps land one by one, as the mirror's do, and the run
   still owed gives the checking pulse three times, then rests. Nobody needs a stamp that nags. */
.motion.js .proofs:not(.is-seen) .proof__glyph {
  visibility: hidden;
}

.motion .proofs.is-seen .proof__glyph {
  animation: p-pop 0.42s var(--p-spring) calc(var(--i, 0) * 120ms + 120ms) both;
}

.motion .proofs.is-seen .proof[data-state="owed"] .proof__glyph {
  animation:
    p-pop 0.42s var(--p-spring) calc(var(--i, 0) * 120ms + 120ms) both,
    p-pulse 1.6s ease-in-out calc(var(--i, 0) * 120ms + 700ms) 3;
}

/* Terminal or app: the app's column eases wider, and its window rises into place, on the switch and on every
   step after it. Going back to the terminal, the printout fades in once. */
.motion .day {
  transition: grid-template-columns 0.55s var(--p-ease);
}

.motion.js .day.is-app .day__panel:not([hidden]) .shot__frame {
  animation: p-window 0.6s var(--p-spring) both;
}

.motion.js .day.is-flipping:not(.is-app) .day__panel:not([hidden]) > .term {
  animation: p-fade 0.4s var(--p-ease) both;
}

@keyframes p-window {
  0% { opacity: 0; transform: translateY(14px) scale(0.985); }
  100% { opacity: 1; transform: none; }
}

@keyframes p-fade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

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

/* --------------------------------------------------------------- 18. print */

@media print {
  .masthead,
  .hero__agent,
  .mirror__replay,
  .copyline__btn,
  .mirror__switch,
  .day__switch {
    display: none;
  }

  .mirror {
    --spread: 0rem !important;
  }

  .proof__glyph {
    visibility: visible !important;
  }
}