/* Lunar's palette and media; shared editorial CSS owns body type and layout. */
html[data-project="lunar-construction"] {
  color-scheme: dark;
  background: #090d13;
  --lunar-background: #090d13;
  --lunar-ink: #edf1f5;
  --lunar-muted: #a8b5c5;
  --lunar-accent: #85d9e5;
  --lunar-rule: #26303d;
}
html[data-project="lunar-construction"] body {
  margin: 0; padding: 0; max-width: none;
  color: var(--lunar-ink); background: var(--lunar-background);
  font-family: var(--font-noto-sans), sans-serif;
}
html[data-project="lunar-construction"] main { width: 100%; max-width: none; margin: 0; }
.lunar-page {
  font-size: var(--body-size, clamp(16px, 1.4vw, 18px)); line-height: 1.75;
}
.lunar-page *, .lunar-page *::before, .lunar-page *::after { box-sizing: border-box; }
.lunar-page :is(h1,h2,h3,p,figure,dl,dd) { margin: 0; }
.lunar-page [hidden] { display: none !important; }
.lunar-page h2 { color: var(--lunar-ink); font-size: clamp(28px, 2.6vw, 40px); line-height: 1.22; letter-spacing: -.035em; font-weight: 550; text-wrap: pretty; }
.lunar-page a { color: var(--lunar-accent); text-underline-offset: 4px; text-decoration-color: #85d9e580; }
.lunar-page a:hover { color: #c9f5fa; text-decoration-color: currentColor; }
.lunar-page :is(a,button):focus-visible { outline: 2px solid var(--lunar-accent); outline-offset: 5px; }
.lunar-page ::selection { background: #85d9e5; color: #090d13; }
.lunar-affiliations { max-width: 90ch; margin-top: 20px; color: var(--lunar-muted); font-size: 14px; line-height: 1.75; }

/* No width on the story: each shared .rp-section owns its 1080px boundary. */
.lunar-story.rp-editorial {
  --rp-text: var(--lunar-ink);
  --rp-muted: var(--lunar-muted);
  --rp-index-color: var(--lunar-muted);
  --rp-divider: var(--lunar-rule);
  --rp-strong-rule: var(--lunar-rule);
  --research-primary: var(--lunar-ink);
  --research-blue: var(--lunar-accent);
}
.lunar-story a { text-decoration-color: currentColor; }
.lunar-page .rp-section .lunar-problem-intro { margin-top: 16px; color: var(--rp-muted); }
.lunar-page .rp-rationale-intro > p:not(.rp-eyebrow) { color: var(--rp-muted); }
.lunar-page figure { min-width: 0; }
.lunar-page figure video { display: block; width: 100%; height: auto; object-fit: contain; background: #000; }
.lunar-page figcaption { color: var(--lunar-muted); }
.lunar-motion-toggle { display: block; margin-top: 20px; padding: 8px 0; background: none; border: 0; border-bottom: 1px solid currentColor; color: var(--lunar-accent); font: inherit; font-size: 14px; line-height: 1.5; cursor: pointer; }
.lunar-motion-toggle:hover { color: #c9f5fa; }
.lunar-page .lunar-media-error { padding: 16px; background: #141e2a; color: var(--lunar-muted); font-size: 14px; }
.lunar-method-figure > a { display: block; background: #fff; cursor: zoom-in; }
.lunar-method-figure img { display: block; width: 100%; height: auto; }
/* Shared metric geometry stays intact; only the light-page palette changes. */
.lunar-page .lunar-story .rp-metric-grid > div { background: #111a25; border-color: var(--rp-divider); }
.lunar-page .lunar-story .rp-metric-grid dd { color: var(--lunar-accent); }

html[data-project="lunar-construction"] footer { box-sizing: border-box; width: min(calc(100% - 2 * clamp(20px, 3.4vw, 48px)), 1200px); max-width: none; margin-inline: auto; padding: 24px 0 40px; border-top: 1px solid var(--lunar-rule); text-align: left; }
html[data-project="lunar-construction"] footer p { color: var(--lunar-muted); font-size: 13px; line-height: 1.6; margin: 0; }
@media (prefers-reduced-motion: reduce) { .lunar-page { scroll-behavior: auto; } }

/* Underline caption links so they are distinguishable without color (WCAG 1.4.1). */
html[data-project="lunar-construction"] .lunar-page figcaption a { text-decoration-line: underline; }
