/* Mootstead design tokens and the accessibility floor (VISUAL-DESIGN-SYSTEM.md).
   Ground, not glass: chalk and warm stone, peat and ink, moss and lichen, and
   one ember, used once on a screen for the instant a Moment is made.
   Hand-written in the token shape the contrast check reads: primitives and
   semantic names in the root block, the dark theme in the media query and
   again under data-theme. Light is the default; dark follows the device only.
   No closing braces inside comments in the token blocks: the reader stops at the first one. */

@font-face {
  font-family: "Alegreya";
  src: url("/fonts/alegreya-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("/fonts/alegreya-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  color-scheme: light dark;

  /* Ground: chalk and warm stone. Text: peat and ink. */
  --colour-neutral-0: #fbf9f4;
  --colour-neutral-50: #f4f1ea;
  --colour-neutral-100: #ebe5d9;
  --colour-neutral-200: #d8cfbe;
  --colour-neutral-400: #8a7d6b;
  --colour-neutral-600: #5a4b3e;
  --colour-neutral-900: #1e1b18;

  /* The living colour, steps 50 to 900: lichen to moss. 500 is the light action. */
  --colour-accent-50: #eef1e4;
  --colour-accent-100: #dfe6cc;
  --colour-accent-300: #9daa7c;
  --colour-accent-500: #3f5a36;
  --colour-accent-600: #32492b;
  --colour-accent-700: #273a22;
  --colour-accent-900: #1c2a19;

  /* Ember: the one warm accent. */
  --colour-ember-500: #a2461f;
  --colour-ember-300: #e08a5f;

  --colour-positive-100: #e6efdf;
  --colour-positive-500: #3f5a36;
  --colour-caution-100: #f6ecd6;
  --colour-caution-500: #7f5a12;
  --colour-critical-100: #f7e3dc;
  --colour-critical-500: #9b2f1c;

  --font-family-display: "Alegreya", Georgia, "Times New Roman", serif;
  --font-family-sans: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;

  --font-size-xs: 0.8125rem;
  --font-size-sm: 0.9375rem;
  --font-size-base: 1.0625rem;
  --font-size-md: 1.25rem;
  --font-size-lg: 1.5rem;
  --font-size-xl: 1.875rem;
  --font-size-2xl: 2.375rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  --spacing-scale: pair 0.5rem, between 1rem, submit 1.5rem;

  --radius: 10px;
  --radius-small: 6px;
  --touch: 48px;
  --measure: 62ch;

  /* Motion: one curve, three durations. */
  --curve: cubic-bezier(0.2, 0, 0, 1);
  --tap: 90ms;
  --ease-t: 200ms;
  --enter: 320ms;

  --surface: var(--colour-neutral-50);
  --surface-sunken: var(--colour-neutral-100);
  --surface-raised: var(--colour-neutral-0);
  --border: var(--colour-neutral-200);
  --border-strong: var(--colour-neutral-400);
  --text: var(--colour-neutral-900);
  --text-muted: var(--colour-neutral-600);
  --text-inverse: var(--colour-neutral-0);
  --action: var(--colour-accent-500);
  --action-hover: var(--colour-accent-600);
  --action-quiet: var(--colour-accent-50);
  --focus-ring: var(--colour-accent-500);
  --ember: var(--colour-ember-500);
  --danger: var(--colour-critical-500);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --colour-neutral-0: #2a241f;
  --colour-neutral-50: #1e1b18;
  --colour-neutral-100: #262119;
  --colour-neutral-200: #3d352c;
  --colour-neutral-400: #a39684;
  --colour-neutral-600: #cfc5b5;
  --colour-neutral-900: #f4f1ea;
  --colour-positive-100: #1c2a19;
  --colour-positive-500: #b6c497;
  --colour-caution-100: #33270e;
  --colour-caution-500: #e5c27a;
  --colour-critical-100: #3a1a12;
  --colour-critical-500: #f0a08a;
  --action: var(--colour-accent-300);
  --action-hover: #b6c497;
  --action-quiet: var(--colour-accent-900);
  --focus-ring: var(--colour-accent-300);
  --ember: var(--colour-ember-300);
  --text-inverse: #1e1b18;
  }
}
:root[data-theme="dark"] {
  --colour-neutral-0: #2a241f;
  --colour-neutral-50: #1e1b18;
  --colour-neutral-100: #262119;
  --colour-neutral-200: #3d352c;
  --colour-neutral-400: #a39684;
  --colour-neutral-600: #cfc5b5;
  --colour-neutral-900: #f4f1ea;
  --colour-positive-100: #1c2a19;
  --colour-positive-500: #b6c497;
  --colour-caution-100: #33270e;
  --colour-caution-500: #e5c27a;
  --colour-critical-100: #3a1a12;
  --colour-critical-500: #f0a08a;
  --action: var(--colour-accent-300);
  --action-hover: #b6c497;
  --action-quiet: var(--colour-accent-900);
  --focus-ring: var(--colour-accent-300);
  --ember: var(--colour-ember-300);
  --text-inverse: #1e1b18;
}

/* ---- The floor ---- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  line-height: 1.55;
  font-variant-numeric: lining-nums tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; animation-timeline: auto !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: reduce) and (hover: hover) {
  .button:hover, .button--quiet:hover, .button--danger:hover { transform: none; }
}
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

h1, h2, h3 { margin: 0 0 var(--space-3); font-family: var(--font-family-display); font-weight: 700; line-height: 1.12; text-wrap: balance; }
h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
p { margin: 0 0 var(--space-4); max-width: var(--measure); }
a { color: var(--action); text-underline-offset: 0.18em; }
strong { font-weight: 700; }
code { font-size: var(--font-size-sm); overflow-wrap: anywhere; }

.skip { position: absolute; left: -9999px; top: 0; padding: var(--space-3); background: var(--surface-raised); color: var(--text); }
.skip:focus { left: var(--space-3); top: var(--space-3); z-index: 10; }
.hidden { display: none !important; }
.quiet { color: var(--text-muted); font-size: var(--font-size-sm); }
.eyebrow { color: var(--text-muted); font-size: var(--font-size-sm); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: var(--space-2); }

/* ---- Frame ---- */
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-4) var(--space-2); max-width: 44rem; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--text); text-decoration: none; }
.brand .mark { color: var(--action); }
.wordmark { font-family: var(--font-family-display); font-weight: 700; font-size: var(--font-size-md); letter-spacing: 0.01em; }
.nav { max-width: 44rem; margin: 0 auto; padding: 0 var(--space-4); }
.nav ul { display: flex; gap: var(--space-2); list-style: none; margin: 0; padding: 0; overflow-x: auto; }
.nav a { display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 var(--space-3); border-radius: var(--radius-small); color: var(--text-muted); text-decoration: none; font-weight: 700; }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-sunken); }
.main { max-width: 44rem; margin: 0 auto; padding: var(--space-4); }
.foot { max-width: 44rem; margin: var(--space-6) auto 0; padding: var(--space-4); border-top: 1px solid var(--border); }
.foot ul { display: flex; flex-wrap: wrap; gap: var(--space-4); list-style: none; margin: 0; padding: 0; font-size: var(--font-size-sm); }

/* ---- Panels and text ---- */
.panel { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-5); margin-bottom: var(--space-4); }
.hero { text-align: center; padding: var(--space-6) var(--space-2) var(--space-5); }
.hero .mark { color: var(--action); }
.hero p { margin-left: auto; margin-right: auto; }
.lede { font-size: var(--font-size-md); }
.prose h2 { margin-top: var(--space-5); font-size: var(--font-size-lg); }
.plain { margin: 0 0 var(--space-4); padding-left: var(--space-5); }
.plain li { margin-bottom: var(--space-2); }
.facts { display: grid; grid-template-columns: minmax(8rem, 1fr) 2fr; gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-4); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
@media (max-width: 34rem) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: var(--space-3); } }
.notice { padding: var(--space-3) var(--space-4); border-radius: var(--radius-small); background: var(--colour-positive-100); }
.notice--error { background: var(--colour-critical-100); color: var(--text); border-left: 4px solid var(--danger); }
.nudge { background: var(--action-quiet); }
.quote { padding-left: var(--space-3); border-left: 3px solid var(--border-strong); white-space: pre-wrap; }

/* ---- Buttons and forms (button protocol: one shape, three intents) ---- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--touch); padding: 0 var(--space-5);
  border: 2px solid var(--action); border-radius: var(--radius-small);
  background: var(--action); color: var(--text-inverse);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background-color var(--tap) var(--curve), border-color var(--tap) var(--curve), transform var(--tap) var(--curve);
}
@media (hover: hover) { .button:hover { background: var(--action-hover); border-color: var(--action-hover); color: var(--text-inverse); transform: translateY(-1px); } }
.button:active { background: var(--action-hover); }
.button:disabled { opacity: 0.55; cursor: not-allowed; }
.button--quiet { background: transparent; color: var(--action); }
@media (hover: hover) { .button--quiet:hover { background: var(--action-quiet); color: var(--action); transform: translateY(-1px); } }
.button--danger { background: transparent; color: var(--danger); border-color: var(--danger); }
@media (hover: hover) { .button--danger:hover { background: var(--colour-critical-100); border-color: var(--danger); color: var(--danger); transform: translateY(-1px); } }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }
.actions.stack { flex-direction: column; align-items: stretch; }
.form { margin: 0 0 var(--space-4); }
.form.inline { display: inline; margin: 0; }
label { display: block; font-weight: 700; margin: var(--space-3) 0 var(--space-2); }
label.check { display: flex; gap: var(--space-2); align-items: flex-start; font-weight: 400; }
input, select, textarea { width: 100%; min-height: var(--touch); padding: var(--space-2) var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-small); background: var(--surface-raised); color: var(--text); font: inherit; }
input[type="checkbox"] { width: 1.4rem; min-height: 1.4rem; margin-top: 0.15rem; }
input[type="file"] { padding: var(--space-3); }

/* ---- Lists of people and Moments ---- */
.people, .moments, .devices, .notes, .queue, .photos { list-style: none; margin: 0; padding: 0; }
.people li, .moments li, .devices li, .notes li, .queue li { padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.people li:first-child, .moments li:first-child, .devices li:first-child, .notes li:first-child, .queue li:first-child { border-top: 0; }
.moments a { display: flex; flex-direction: column; min-height: var(--touch); color: var(--text); text-decoration: none; }
.who { display: block; font-weight: 700; }
.meta { display: block; color: var(--text-muted); font-size: var(--font-size-sm); }
.devices li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.photos li { margin-bottom: var(--space-4); }
.photos img, .held img { display: block; width: 100%; height: auto; border-radius: var(--radius-small); }
.report { margin-top: var(--space-3); }
.report summary { color: var(--text-muted); font-size: var(--font-size-sm); cursor: pointer; min-height: var(--touch); display: inline-flex; align-items: center; }
.code-text { font-size: var(--font-size-xl); font-weight: 700; letter-spacing: 0.14em; }

/* ---- The Moment: a seal, not a post ---- */
.seal { text-align: center; background: var(--surface-raised); border: 2px solid var(--action); border-radius: 50% / 18%; padding: var(--space-6) var(--space-5); margin-bottom: var(--space-4); }
.seal .mark { color: var(--action); }
.seal-line { font-family: var(--font-family-display); font-size: var(--font-size-lg); margin: var(--space-3) auto; }
.seal-when { color: var(--text-muted); margin-left: auto; margin-right: auto; }
.made { color: var(--ember); }
.welcome { text-align: center; }
.welcome .mark { color: var(--ember); }

/* ---- The exchange ---- */
.code { margin: var(--space-4) auto; text-align: center; }
.code img, .code svg { width: min(78vw, 300px); height: auto; aspect-ratio: 1; background: #ffffff; border-radius: var(--radius-small); padding: var(--space-2); }
.code figcaption { color: var(--text-muted); font-size: var(--font-size-sm); margin-top: var(--space-2); }
.viewfinder { position: relative; width: min(86vw, 360px); aspect-ratio: 1; margin: var(--space-3) auto; border-radius: var(--radius); overflow: hidden; background: var(--colour-neutral-900); }
.viewfinder video { width: 100%; height: 100%; object-fit: cover; }

/* ---- Console ---- */
.console .who { display: flex; align-items: center; gap: var(--space-3); font-size: var(--font-size-sm); color: var(--text-muted); }
.table { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); }
.table th, .table td { text-align: left; padding: var(--space-2); border-top: 1px solid var(--border); }

/* ---- The front page: golden hour (D-61) ----
   Bold flat fields of colour for the hour people are together. The page keeps
   its own fixed palette in both themes (each field carries its own ground and
   ink), real screens in phone frames, and slow scroll reveals that stand
   complete when still. Scoped to body[data-page="home"]. */
body[data-page="home"] {
  --lp-sun: #f6b941;
  --lp-sun-deep: #eaa21c;
  --lp-ember: #e4572e;
  --lp-moss: #2c4527;
  --lp-lichen: #cbd99c;
  --lp-ink: #1a1410;
  --lp-chalk: #fbf6ec;
  --lp-coral: #ff9a84;
  background: var(--lp-sun);
  color: var(--lp-ink);
  overflow-x: clip;
}
body[data-page="home"] .top { max-width: 76rem; padding: var(--space-5) var(--space-5) 0; }
body[data-page="home"] .brand, body[data-page="home"] .brand .mark { color: var(--lp-ink); }
body[data-page="home"] .wordmark { font-size: var(--font-size-lg); }
body[data-page="home"] .main { max-width: none; padding: 0; }
body[data-page="home"] .foot { max-width: none; margin: 0; padding: var(--space-6) max(var(--space-5), calc((100vw - 76rem) / 2)); background: var(--lp-ink); border: 0; }
body[data-page="home"] .foot a { color: var(--lp-sun); }
body[data-page="home"] :where(a, button):focus-visible { outline-color: var(--lp-ink); }

.lp { --lp-gutter: clamp(1.25rem, 5vw, 3rem); }
.lp p { max-width: 60ch; }
.lp-wrap { max-width: 76rem; margin: 0 auto; padding: 0 var(--lp-gutter); }
.lp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lp-eyebrow { font-weight: 700; font-size: var(--font-size-sm); letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 var(--space-4); }
.lp h1, .lp h2, .lp h3 { color: inherit; }
.lp em { font-style: italic; }
.lp-big em { display: block; }
.lp-big { font-size: clamp(2.4rem, 6.4vw, 5rem); line-height: 1.02; letter-spacing: -0.01em; margin-bottom: var(--space-5); max-width: 18ch; }
.lp-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.lp .lp-button { background: var(--lp-ink); border-color: var(--lp-ink); color: var(--lp-chalk); min-height: 56px; padding: 0 var(--space-6); border-radius: 999px; font-size: var(--font-size-md); }
.lp .lp-button-quiet { background: transparent; border-color: var(--lp-ink); color: var(--lp-ink); min-height: 56px; padding: 0 var(--space-6); border-radius: 999px; font-size: var(--font-size-md); }
@media (hover: hover) {
  .lp .lp-button:hover { background: var(--lp-moss); border-color: var(--lp-moss); color: var(--lp-chalk); transform: translateY(-2px); }
  .lp .lp-button-quiet:hover { background: var(--lp-ink); color: var(--lp-chalk); transform: translateY(-2px); }
}

/* The phone frame around a real screen. */
.lp-phone { margin: 0; width: 15.5rem; aspect-ratio: 390 / 844; border: 9px solid var(--lp-ink); border-radius: 2.4rem; overflow: hidden; background: var(--lp-ink);
  box-shadow: 0 2px 4px rgba(26, 20, 16, 0.25), 0 30px 60px -18px rgba(26, 20, 16, 0.45); }
.lp-phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 1.7rem; }

/* Hero */
.lp-hero { padding: var(--space-6) 0 var(--space-7); }
.lp-hero-grid { display: grid; gap: var(--space-7); align-items: center; }
.lp-hero h1 { font-size: clamp(3.4rem, 11vw, 7.75rem); line-height: 0.92; letter-spacing: -0.02em; margin: 0 0 var(--space-5); }
.lp-hero h1 em { color: var(--lp-chalk); -webkit-text-stroke: 0; text-shadow: 0.04em 0.04em 0 var(--lp-ember); }
.lp-mission-line { font-family: var(--font-family-display); font-size: clamp(1.35rem, 2.6vw, 1.75rem); line-height: 1.3; font-weight: 500; }
.lp-lede { font-size: var(--font-size-md); }
.lp-stage { position: relative; min-height: 34rem; display: grid; place-items: center; }
.lp-sun { position: absolute; width: min(30rem, 88vw); aspect-ratio: 1; border-radius: 50%; background: var(--lp-ember); animation: lp-breathe 9s ease-in-out infinite; }
.lp-sun::after { content: ""; position: absolute; inset: 14%; border-radius: 50%; background: var(--lp-coral); opacity: 0.55; }
.lp-stage .lp-phone { position: absolute; width: clamp(11rem, 36vw, 15rem); }
.lp-phone--left { transform: translateX(-46%) rotate(-8deg); animation: lp-float-l 7s ease-in-out infinite; }
.lp-phone--right { transform: translateX(46%) translateY(1.5rem) rotate(7deg); animation: lp-float-r 7s ease-in-out infinite; }
.lp-spark { position: absolute; top: 4%; width: 7rem; fill: none; stroke: var(--lp-ink); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 8 9; animation: lp-dash 2.4s linear infinite; z-index: 2; }
.lp-stamp { position: absolute; bottom: 2%; right: 4%; width: 7.5rem; aspect-ratio: 1; border-radius: 50%; background: var(--lp-moss); color: var(--lp-chalk); display: grid; place-items: center; text-align: center; font-family: var(--font-family-display); font-weight: 700; font-size: 1.15rem; line-height: 1.05; transform: rotate(-12deg); z-index: 3;
  box-shadow: 0 0 0 5px var(--lp-sun), 0 0 0 7px var(--lp-moss); animation: lp-stamp 7s var(--curve) infinite; }
@keyframes lp-breathe { 50% { transform: scale(1.05); } }
@keyframes lp-float-l { 50% { transform: translateX(-46%) translateY(-0.9rem) rotate(-6deg); } }
@keyframes lp-float-r { 50% { transform: translateX(46%) translateY(0.6rem) rotate(9deg); } }
@keyframes lp-dash { to { stroke-dashoffset: -34; } }
@keyframes lp-stamp { 0%, 12% { transform: rotate(-12deg) scale(1); } 6% { transform: rotate(-16deg) scale(1.12); } }

/* Ribbon */
.lp-ribbon { background: var(--lp-ink); color: var(--lp-sun); overflow: hidden; padding: var(--space-4) 0; border-block: 3px solid var(--lp-ink); }
.lp-ribbon-track { display: flex; width: max-content; gap: var(--space-5); font-family: var(--font-family-display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2.1rem); white-space: nowrap; animation: lp-marquee 38s linear infinite; }
.lp-dot { color: var(--lp-ember); font-size: 0.6em; align-self: center; }
@keyframes lp-marquee { to { transform: translateX(-50%); } }

/* Mission */
.lp-mission { background: var(--lp-ink); color: var(--lp-chalk); padding: var(--space-7) 0 calc(var(--space-7) * 2); }
.lp-mission .lp-eyebrow { color: var(--lp-sun); }
.lp-mission .lp-big em { color: var(--lp-sun); }
.lp-mission-text { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.55; }
.lp-pillars { list-style: none; margin: var(--space-7) 0 0; padding: 0; display: grid; gap: var(--space-4); }
.lp-pillars li { background: #2a211b; border-radius: 1.5rem; padding: var(--space-6) var(--space-5); border-top: 6px solid var(--lp-sun); }
.lp-pillars li:nth-child(2) { border-top-color: var(--lp-ember); }
.lp-pillars li:nth-child(3) { border-top-color: var(--lp-lichen); }
.lp-pillars h3 { font-size: var(--font-size-xl); margin-top: var(--space-2); }
.lp-num { font-weight: 700; color: var(--lp-sun); letter-spacing: 0.1em; }

/* How */
.lp-how { background: var(--lp-chalk); color: var(--lp-ink); padding: calc(var(--space-7) * 2) 0; border-radius: 3rem 3rem 0 0; margin-top: -3rem; position: relative; }
.lp-how .lp-big em { color: var(--lp-ember); }
.lp-steps { list-style: none; margin: var(--space-7) 0 0; padding: 0; display: grid; gap: var(--space-7); }
.lp-step { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.lp-step-num { position: absolute; top: -1.2rem; left: -0.6rem; z-index: 2; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--lp-ember); color: var(--lp-ink); display: grid; place-items: center; font-family: var(--font-family-display); font-weight: 700; font-size: var(--font-size-xl); }
.lp-step:nth-child(2) .lp-step-num { background: var(--lp-sun); }
.lp-step:nth-child(3) .lp-step-num { background: var(--lp-lichen); }
.lp-step h3 { font-size: var(--font-size-xl); margin-top: var(--space-5); }
.lp-step .lp-phone { width: 13.5rem; }
.lp-step-art { width: 13.5rem; aspect-ratio: 390 / 844; border-radius: 2.4rem; background: var(--lp-sun); display: grid; place-items: center; color: var(--lp-ink); overflow: hidden; position: relative; }
.lp-step-art::before, .lp-step-art::after { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: var(--lp-ember); opacity: 0.9; }
.lp-step-art::before { top: 12%; left: -18%; }
.lp-step-art::after { bottom: 10%; right: -22%; background: var(--lp-coral); }
.lp-meet { width: 55%; position: relative; z-index: 1; }

/* Ledger */
.lp-ledger { background: var(--lp-moss); color: var(--lp-chalk); padding: calc(var(--space-7) * 2) 0; overflow: hidden; }
.lp-ledger .lp-eyebrow, .lp-ledger .lp-big em { color: var(--lp-lichen); }
.lp-ledger h3 { font-size: var(--font-size-xl); margin-top: var(--space-6); color: var(--lp-sun); }
.lp-ledger-grid { display: grid; gap: var(--space-7); align-items: center; }
.lp-ledger-phones { position: relative; min-height: 30rem; display: grid; place-items: center; }
.lp-ledger-phones .lp-phone { position: absolute; width: clamp(11rem, 38vw, 14.5rem); border-color: var(--lp-ink); }
.lp-phone--a { transform: translateX(-38%) rotate(-5deg); }
.lp-phone--b { transform: translateX(38%) translateY(2.5rem) rotate(6deg); }
.lp-caption { font-size: var(--font-size-sm); opacity: 0.85; margin-top: var(--space-6); }

/* Not */
.lp-not { background: var(--lp-ember); color: var(--lp-ink); padding: calc(var(--space-7) * 2) 0; }
.lp-nots { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.lp-nots li { font-family: var(--font-family-display); font-weight: 700; font-size: clamp(1.35rem, 2.8vw, 2rem); line-height: 1.2; padding: var(--space-5) var(--space-5) var(--space-5) 4.2rem; background: var(--lp-chalk); border-radius: 1.25rem; position: relative; }
.lp-nots li::before { content: ""; position: absolute; left: 1.4rem; top: 50%; width: 1.6rem; height: 1.6rem; margin-top: -0.8rem; border-radius: 50%; background: var(--lp-ember); box-shadow: inset 0 0 0 0.45rem var(--lp-ink); }

/* Join */
.lp-join { background: var(--lp-sun); color: var(--lp-ink); padding: calc(var(--space-7) * 2) 0; }
.lp-join .lp-big em { color: var(--lp-chalk); text-shadow: 0.04em 0.04em 0 var(--lp-ember); }
.lp-join-grid { display: grid; gap: var(--space-7); align-items: end; }
.lp-member { background: var(--lp-chalk); border-radius: 1.75rem; padding: var(--space-6); box-shadow: 0 2px 4px rgba(26, 20, 16, 0.15), 0 24px 48px -20px rgba(26, 20, 16, 0.4); }
.lp-member h3 { font-size: var(--font-size-xl); }
.lp-member a:not(.button) { color: var(--lp-moss); }
.lp-small { font-size: var(--font-size-sm); margin-top: var(--space-4); }
.lp-hero a:not(.button), .lp-join a:not(.button) { color: var(--lp-ink); }

/* Scroll reveals: rise from nothing as the page is read; complete when still. */
@supports (animation-timeline: view()) {
  .lp-reveal { animation: lp-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
  .lp-ledger-phones .lp-phone--a.lp-reveal { animation-name: lp-rise-a; }
  .lp-ledger-phones .lp-phone--b.lp-reveal { animation-name: lp-rise-b; }
}
@keyframes lp-rise { from { opacity: 0; transform: translateY(2.5rem); } }
@keyframes lp-rise-a { from { opacity: 0; transform: translateX(-38%) translateY(4rem) rotate(-12deg); } }
@keyframes lp-rise-b { from { opacity: 0; transform: translateX(38%) translateY(6rem) rotate(12deg); } }

@media (min-width: 52rem) {
  .lp-hero { padding-top: var(--space-7); }
  .lp-hero-grid { grid-template-columns: 1.05fr 1fr; }
  .lp-stage { min-height: 40rem; }
  .lp-pillars { grid-template-columns: repeat(3, 1fr); }
  .lp-steps { grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
  .lp-ledger-grid { grid-template-columns: 1fr 1fr; }
  .lp-ledger-phones { min-height: 38rem; }
  .lp-nots { grid-template-columns: 1fr 1fr; }
  .lp-join-grid { grid-template-columns: 1.4fr 1fr; }
}
@media (max-width: 30rem) {
  .lp-stage { min-height: 27rem; }
  .lp-stamp { width: 6rem; font-size: 0.95rem; right: 0; }
  .lp-ledger-phones { min-height: 25rem; }
}
body[data-page="home"] { --lp-gutter: clamp(1.25rem, 5vw, 3rem); }
body[data-page="home"] .top { padding: var(--space-5) var(--lp-gutter) 0; }
@media (max-width: 51.99rem) {
  .lp-steps { gap: var(--space-6); }
  .lp-step { display: grid; grid-template-columns: 8.5rem 1fr; grid-template-rows: auto 1fr; column-gap: var(--space-5); align-items: start; }
  .lp-step > .lp-phone, .lp-step > .lp-step-art { grid-row: 1 / span 2; width: 8.5rem; border-radius: 1.5rem; border-width: 6px; }
  .lp-step > .lp-phone img { border-radius: 1.1rem; }
  .lp-step-num { width: 2.6rem; height: 2.6rem; font-size: var(--font-size-lg); top: -0.9rem; left: -0.6rem; }
  .lp-step h3 { margin-top: var(--space-2); font-size: var(--font-size-lg); }
}
@media (max-width: 30rem) {
  .lp-hero h1 { font-size: 4.1rem; }
  .lp-stage .lp-phone { width: 9.75rem; border-width: 7px; border-radius: 1.8rem; }
  .lp-stage .lp-phone img { border-radius: 1.3rem; }
  .lp-phone--left { transform: translateX(-40%) rotate(-8deg); }
  .lp-phone--right { transform: translateX(40%) translateY(1.5rem) rotate(7deg); }
  @keyframes lp-float-l { 50% { transform: translateX(-40%) translateY(-0.9rem) rotate(-6deg); } }
  @keyframes lp-float-r { 50% { transform: translateX(40%) translateY(0.6rem) rotate(9deg); } }
  .lp-ledger-phones .lp-phone { width: 9.75rem; border-width: 7px; border-radius: 1.8rem; }
}
.lp-pull { margin: var(--space-6) 0 0; padding: var(--space-5) 0 var(--space-5) var(--space-5); border-left: 6px solid var(--lp-ember); }
.lp-pull p { margin: 0; font-family: var(--font-family-display); font-style: italic; font-weight: 500; font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.15; color: var(--lp-sun); max-width: 24ch; }

/* ---- Your Constellation (D-63) ----
   A night sky in both themes: the canvas reads its colours from these. */
.sky, .sky-card, .sky-mini { --sky-ground: #16110d; --sky-sun: #f6b941; --sky-ember: #e4572e; --sky-chalk: #fbf6ec; --sky-lichen: #cbd99c; }
body[data-page="constellation"] .main { max-width: 72rem; }
body[data-page="constellation"] .nav, body[data-page="constellation"] .top { max-width: 72rem; }
.sky-head { max-width: 44rem; margin-bottom: var(--space-5); }
.sky-head h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.sky { display: grid; gap: 0; background: var(--sky-ground); color: var(--sky-chalk); border-radius: calc(var(--radius) * 2); overflow: hidden; margin-bottom: var(--space-5);
  box-shadow: 0 2px 4px rgba(22, 17, 13, 0.25), 0 30px 60px -24px rgba(22, 17, 13, 0.55); }
.sky-stage { position: relative; }
.sky-canvas { display: block; width: 100%; aspect-ratio: 1; touch-action: none; cursor: grab; }
.sky-canvas:active { cursor: grabbing; }
.sky-canvas:focus-visible { outline: 3px solid var(--sky-sun); outline-offset: -3px; }
.sky-hint { position: absolute; left: 0; right: 0; bottom: var(--space-3); margin: 0 auto; text-align: center; font-size: var(--font-size-xs); color: rgba(251, 246, 236, 0.7); pointer-events: none; }
.sky-panel { padding: var(--space-5); border-top: 1px solid rgba(251, 246, 236, 0.12); min-height: 9rem; }
.sky-panel-lede { color: rgba(251, 246, 236, 0.85); margin: 0; }
.sky-name { font-size: var(--font-size-xl); color: var(--sky-sun); margin-bottom: var(--space-1); }
.sky-panel .meta { color: rgba(251, 246, 236, 0.72); }
.sky-bridge { margin-top: var(--space-3); font-family: var(--font-family-display); font-size: var(--font-size-md); }
.sky-panel .sky-moments { list-style: none; margin: var(--space-4) 0; padding: 0; }
.sky-panel .sky-moments li { padding: var(--space-3) 0; border-top: 1px solid rgba(251, 246, 236, 0.12); display: flex; flex-direction: column; gap: 2px; }
.sky-panel a { color: var(--sky-sun); font-weight: 700; }
.sky-panel .sky-circle { font-weight: 400; font-size: var(--font-size-sm); color: var(--sky-lichen); }
.sky .sky-back { color: var(--sky-chalk); border-color: rgba(251, 246, 236, 0.5); }
@media (hover: hover) { .sky .sky-back:hover { background: rgba(251, 246, 236, 0.1); color: var(--sky-chalk); } }
.sky .sky-back:focus-visible, .sky-panel a:focus-visible { outline-color: var(--sky-sun); }
@media (min-width: 56rem) {
  .sky { grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 1fr); }
  .sky-canvas { aspect-ratio: auto; height: min(78vh, 46rem); }
  .sky-panel { border-top: 0; border-left: 1px solid rgba(251, 246, 236, 0.12); max-height: min(78vh, 46rem); overflow-y: auto; }
}
.sky-list { list-style: none; margin: 0; padding: 0; }
.sky-list > li { border-top: 1px solid var(--border); }
.sky-list > li:first-child { border-top: 0; }
.sky-list summary { display: flex; flex-direction: column; padding: var(--space-3) 0; cursor: pointer; min-height: var(--touch); }
.sky-list .sky-moments { list-style: none; margin: 0 0 var(--space-3); padding: 0 0 0 var(--space-4); border-left: 3px solid var(--border); }
.sky-list .sky-moments li { padding: var(--space-2) 0; display: flex; flex-direction: column; }

/* The card on the Ledger: a small turning sky. */
.panel.sky-card { padding: 0; overflow: hidden; background: var(--sky-ground); border-color: var(--sky-ground); }
.sky-link { display: grid; grid-template-columns: 7.5rem 1fr; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-5) var(--space-3) var(--space-3); color: var(--sky-chalk); text-decoration: none; min-height: 8rem; }
.sky-mini { display: block; width: 7.5rem; height: 7.5rem; border-radius: 50%; overflow: hidden; }
.sky-mini .sky-canvas { width: 100%; height: 100%; aspect-ratio: 1; cursor: inherit; }
.sky-card-words { display: flex; flex-direction: column; gap: var(--space-1); }
.sky-card-title { font-family: var(--font-family-display); font-weight: 700; font-size: var(--font-size-lg); color: var(--sky-sun); }
.sky-card-meta { font-size: var(--font-size-sm); color: rgba(251, 246, 236, 0.82); }
.sky-link:focus-visible { outline: 3px solid var(--sky-sun); outline-offset: -3px; }

/* ---- Profiles shared on witnessing (D-64) ---- */
.profile-list { list-style: none; margin: 0; padding: 0; }
.profile-list > li { padding: var(--space-4) 0; border-top: 1px solid var(--border); }
.profile-list > li:first-child { border-top: 0; }
.profile-card { display: flex; gap: var(--space-4); align-items: center; }
.profile-photo { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--surface-sunken); }
.profile-photo--none { display: grid; place-items: center; font-family: var(--font-family-display); font-weight: 700; font-size: var(--font-size-xl); color: var(--action); background: var(--action-quiet); }
.profile-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-line { font-family: var(--font-family-display); font-size: var(--font-size-md); }
.profile-contact { color: var(--text-muted); overflow-wrap: anywhere; }
.choice { border: 0; margin: var(--space-4) 0 0; padding: 0; }
.choice legend { font-weight: 700; margin-bottom: var(--space-2); padding: 0; }
.choice label.check { margin: var(--space-2) 0; }
input[type="radio"] { width: 1.4rem; min-height: 1.4rem; margin-top: 0.15rem; }
.sky-person { display: flex; gap: var(--space-3); align-items: center; }
.sky-person .profile-photo { width: 56px; height: 56px; }
.sky-line { font-family: var(--font-family-display); font-size: var(--font-size-md); margin: var(--space-3) 0 0; }
.sky-contact { color: rgba(251, 246, 236, 0.8); margin: var(--space-1) 0 0; overflow-wrap: anywhere; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--action); }

/* ---- Places on Moments (D-65) ---- */
.place-label { font-family: var(--font-family-display); font-size: var(--font-size-lg); margin-bottom: var(--space-1); }
.place-where { font-weight: 700; margin-bottom: var(--space-3); }
.place-map { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-small); overflow: hidden; background: var(--surface-sunken); margin: var(--space-3) 0; }
.place-map > .quiet { padding: var(--space-3); margin: 0; }
.place-map--on > .quiet { display: none; }
.place-pin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -22px 0 0 -11px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--colour-ember-500); box-shadow: 0 0 0 3px #ffffff, 0 4px 10px rgba(0, 0, 0, 0.35); pointer-events: none; z-index: 2; }
.place-dot { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--colour-ember-500); box-shadow: 0 0 0 3px #ffffff, 0 2px 8px rgba(0, 0, 0, 0.35); }
.place-ask p { margin-bottom: var(--space-3); }
.place-ask p:last-child { margin-bottom: 0; }
.place-consent { margin-top: var(--space-4); font-size: var(--font-size-sm); }
.sky-towns { margin: var(--space-3) 0 0; color: var(--sky-lichen); font-weight: 700; }
.sky-panel .sky-where { color: var(--sky-chalk); font-size: var(--font-size-sm); }
[hidden] { display: none !important; }

/* ---- Connections in common (D-70) ---- */
.common { margin: var(--space-3) 0 0; font-weight: 700; color: var(--action); }
.sky-common { margin: var(--space-3) 0 0; color: var(--sky-sun); font-weight: 700; }

/* Face to face (D-72): a small front-camera window under the code. */
.viewfinder--mini { width: 96px; margin: var(--space-3) auto 0; border-radius: var(--radius-small); }
.viewfinder--mini video { transform: scaleX(-1); }
.face-to-face { margin-top: var(--space-4); font-size: var(--font-size-sm); }
.check-number { font-size: var(--font-size-md); }
.check-number strong { font-size: var(--font-size-xl); letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
