/* Reset, type, and the shared controls every view uses. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* Paper grain: fixed, non-interactive, never on a scrolling layer. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; }
[hidden] { display: none !important; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.98;
  text-wrap: balance;
}
h2 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); }
h3 { font: 600 1.3rem/1.2 var(--font-label); letter-spacing: 0.01em; text-wrap: balance; }
p { text-wrap: pretty; }
em { font-style: italic; }
.muted { color: var(--ink-4); }

:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; }
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 200;
  background: var(--ink); color: var(--marble); padding: 10px 14px;
  font: 500 0.92rem var(--font-label); text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.kicker {
  font: 600 0.86rem/1.4 var(--font-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.kicker::before { content: ''; width: 8px; height: 8px; background: var(--crimson); flex: none; }
.kicker em { text-transform: none; letter-spacing: 0.02em; font-family: var(--font-serif); font-size: 0.95rem; }
.kicker--crimson { color: var(--crimson); }
.kicker--light { color: var(--stone-2); }

/* Buttons: flat poster blocks with a hard offset shadow in the cover's red. */
.btn {
  --lift: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  min-height: 48px;
  padding: 0.95em 1.4em;
  font: 700 0.95rem/1 var(--font-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--marble);
  border: 1.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--lift);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--lift); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--lift); transition-duration: 0.06s; }
.btn--primary { --lift: var(--crimson); background: var(--ink); color: var(--marble); border-color: var(--ink); }
.btn--light { --lift: var(--crimson); background: var(--marble); border-color: var(--marble); }
.btn--sm { min-height: 40px; padding: 0.7em 1em; font-size: 0.7rem; box-shadow: 3px 3px 0 var(--lift); }
.btn--lg { min-height: 58px; padding: 1.15em 1.7em; font-size: 0.85rem; }
.btn--wide { width: 100%; }
.btn__arrow { display: inline-block; transition: transform 0.3s var(--ease); font-size: 1.1em; }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn[disabled] { cursor: progress; }
.btn.is-busy {
  background-image: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--marble) 16%, transparent) 50%, transparent 80%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.link-btn {
  font: 500 0.9rem var(--font-label);
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-decoration: underline;
  text-decoration-color: var(--stone-2);
  text-underline-offset: 4px;
  transition: color 0.2s;
}
.link-btn:hover { color: var(--crimson); text-decoration-color: currentColor; }
.link-btn--light { color: var(--stone-1); }
/* Text for assistive technology only, such as a chart's written values. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hint { font: 400 0.83rem var(--font-label); color: var(--ink-4); letter-spacing: 0.04em; }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-lede { margin-top: 20px; color: var(--ink-3); font-size: 1.15rem; max-width: 58ch; }

/* View switching */
body:not([data-view='landing']) #landing { display: none; }
body[data-view='landing'] #view { display: none; }
body[data-view='quiz'] .site-nav,
body[data-view='quiz'] .site-foot,
body[data-view-pending] .site-foot { display: none; } /* main.js settleView [RCLS] */
#view:focus { outline: none; }

@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.001ms !important; }
}
