/* Shared design for both editions. --accent and --accent-pair mirror each
   other, and colour never carries meaning on its own: every accented element
   also has text. */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/newsreader.6e4f2958c3.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/source-sans-3.7a19a7027e.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/source-sans-3-italic.9a15dafc2c.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #faf7f2;
  --panel: #f2ece2;
  --panel-hover: #eae2d5;
  --ink: #1d1b18;
  --ink-soft: #57524a;
  --rule: #d9d1c4;
  --rule-strong: #8a8174;
  --accent: #2d5f8b;
  --accent-pair: #a84a14;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --measure: 65ch;
  /* Hero, essay and colophon share one left edge; prose stays within --measure. */
  --column: 46rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --masthead-height: 4rem;
  color-scheme: light;
}

[data-edition="accelerater"] {
  --accent: #a84a14;
  --accent-pair: #2d5f8b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
}

[id] {
  scroll-margin-top: calc(var(--masthead-height) + 1rem);
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.12em;
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100%;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

.skip-link:focus {
  top: 0.5rem;
}

/* Entrance handoff fallback: completely invisible during normal JS or
   meta-refresh handoff; reveals a minimal link only if both are blocked. */

.entrance-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: var(--gutter);
  opacity: 0;
  visibility: hidden;
  animation: entrance-fallback-reveal 0.25s ease 2.5s forwards;
}

.entrance-fallback__link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.65rem 1.2rem;
  border: 1px solid var(--rule-strong);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 0 rgb(29 27 24 / 0.06);
}

.entrance-fallback__link:hover {
  background: var(--paper);
  border-color: var(--accent-pair);
  text-decoration: none;
}

@keyframes entrance-fallback-reveal {
  from {
    opacity: 0;
    visibility: hidden;
  }
  to {
    opacity: 1;
    visibility: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entrance-fallback {
    animation: entrance-fallback-reveal 0.01ms steps(1, end) 2.5s forwards;
  }
}

/* Paired press colophon emblem and counterpart pole cue. */

.emblem {
  display: block;
  flex-shrink: 0;
  width: 30px;
  height: 18px;
  transform: translateY(0.04em);
}

.emblem__frame {
  fill: var(--paper);
  stroke: var(--rule-strong);
  stroke-width: 1.15;
}

.emblem__active {
  fill: var(--accent);
}

.emblem__divider {
  stroke: var(--rule-strong);
  stroke-width: 1;
}

[data-edition="pauser"] .emblem__glyph--pause,
[data-edition="accelerater"] .emblem__glyph--accel {
  fill: var(--paper);
}

[data-edition="pauser"] .emblem__glyph--accel,
[data-edition="accelerater"] .emblem__glyph--pause {
  fill: var(--rule-strong);
}

.pair-glyph {
  display: block;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  fill: var(--accent-pair);
}

/* Masthead: compact, and the only persistent chrome. */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 72rem;
  min-height: calc(var(--masthead-height) - 3px);
  margin: 0 auto;
  padding: 0.35rem var(--gutter);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark__accent {
  color: var(--accent);
}

.counterpart {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--rule-strong);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-align: left;
  box-shadow: 0 1px 0 rgb(29 27 24 / 0.06);
}

.counterpart__arrow {
  display: inline-block;
  flex-shrink: 0;
  color: var(--accent-pair);
}

.counterpart:hover,
.counterpart:focus-visible {
  background: var(--paper);
  border-color: var(--accent-pair);
  box-shadow: 0 2px 6px rgb(29 27 24 / 0.08);
  text-decoration: none;
}

@media (prefers-reduced-motion: no-preference) {
  .counterpart,
  .entrance-fallback__link {
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  }

  .counterpart:hover,
  .entrance-fallback__link:hover {
    transform: translateY(-1px);
  }

  .counterpart:active,
  .entrance-fallback__link:active {
    transform: translateY(0);
  }

  .counterpart__arrow {
    transition: transform 140ms ease;
  }

  .counterpart:hover .counterpart__arrow,
  .colophon__counterpart:hover .counterpart__arrow,
  .entrance-fallback__link:hover .counterpart__arrow {
    transform: translateX(2px);
  }
}

/* Opening screen: name, position, introduction, invitation to read. */

.hero {
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(2.5rem, 8.5vw, 5.5rem) var(--gutter) clamp(2rem, 5.5vw, 3.75rem);
}

.hero h1::before {
  content: "";
  display: block;
  width: 2.75rem;
  height: 2px;
  margin-bottom: 1.35rem;
  background: var(--accent);
}

.hero--compact {
  padding-top: clamp(3rem, 10vw, 5.5rem);
  padding-bottom: clamp(3rem, 10vw, 5.5rem);
}

.hero--compact h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.2rem);
}

.hero--compact h1::before {
  display: none;
}

.kicker,
.section__label,
.note__label {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.kicker {
  margin: 0 0 1.25rem;
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7.5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.standfirst {
  max-width: 40rem;
  margin: 1.5rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.6vw, 1.5rem);
  line-height: 1.45;
  color: var(--ink);
}

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  margin-top: 1.5rem;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

.read-link:hover {
  background: var(--ink);
  text-decoration: none;
}

/* The essay: one readable column. */

.essay {
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter) 4.5rem;
}

.essay > .section {
  max-width: var(--measure);
}

.section {
  padding-top: 2.75rem;
  margin-top: 2.75rem;
  border-top: 1px solid var(--rule);
}

.section--summary {
  margin-top: 0;
  padding: 1.5rem 1.5rem 0.65rem;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: var(--panel);
}

.section--summary h2 {
  margin-top: 0;
  font-size: 1.45rem;
}

.section--summary ul {
  padding-left: 1.2rem;
}

/* The proposal is the concrete ask, so it is the one labelled section. */

.section__label {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  background: var(--accent);
  color: var(--paper);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.section--proposal {
  border-top: 3px solid var(--accent);
}

.section--proposal h2 {
  font-size: clamp(2rem, 5vw, 2.6rem);
}

.section--proposal li strong {
  color: var(--accent);
}

.section--proposal li + li {
  margin-top: 0.75rem;
}

h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.35rem;
  line-height: 1.25;
}

p,
ul,
ol {
  margin: 0 0 1.15rem;
}

li + li {
  margin-top: 0.4rem;
}

strong {
  font-weight: 700;
}

/* Evidence, its limits, and conclusions kept visibly apart. */

.note {
  margin: 1.5rem 0;
  padding: 0.9rem 1.1rem 0.15rem;
  border-left: 4px solid var(--rule-strong);
  background: var(--panel);
  border-radius: 0 5px 5px 0;
}

.note__label {
  margin: 0 0 0.45rem;
  color: var(--ink-soft);
}

.note--limits {
  border-left-style: dashed;
}

.note--conclusion {
  border-left-color: var(--accent);
  background: transparent;
  border-top: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.note--conclusion .note__label {
  color: var(--accent);
}

/* Expandable evidence notes (native disclosure, no script needed). */

details.evidence {
  margin: 1.75rem 0;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--paper);
}

details.evidence > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 600;
  list-style: none;
  border-radius: 4px;
}

details.evidence > summary:hover {
  background: var(--panel);
}

details.evidence > summary::-webkit-details-marker {
  display: none;
}

details.evidence > summary::after {
  content: "+";
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
}

details.evidence[open] > summary {
  border-bottom: 1px solid var(--rule);
  border-radius: 4px 4px 0 0;
  background: var(--panel);
}

details.evidence[open] > summary::after {
  content: "−";
}

details.evidence[open] {
  padding-bottom: 1rem;
}

details.evidence > :not(summary):not(.note) {
  margin-left: 1rem;
  margin-right: 1rem;
}

details.evidence > :not(summary):not(.note):first-of-type {
  margin-top: 0.9rem;
}

details.evidence > :last-child {
  margin-bottom: 0;
}

details.evidence p,
details.evidence li {
  font-size: 1rem;
  line-height: 1.6;
}

details.evidence .note {
  margin: 0.9rem 1rem 0;
  padding: 0.85rem 1rem 0.2rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  background: var(--panel);
}

details.evidence .note--finding .note__label {
  color: var(--accent);
}

details.evidence .note--limits {
  border-left: 3px dashed var(--rule-strong);
  border-top: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

details.evidence .note ul,
details.evidence .note ol {
  padding-left: 1.25rem;
  margin-bottom: 0.8rem;
}

details.evidence .note p {
  margin-bottom: 0.75rem;
}

.cite {
  white-space: normal;
}

.counterpart-note {
  margin: 2rem 0 0;
}

.counterpart-note a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 44px;
  font-weight: 600;
}

/* Annotated sources: heading outside disclosure, collapsed until opened or cited. */

.sources__intro {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

.sources-disclosure {
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--paper);
}

.sources-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  list-style: none;
  border-radius: 4px;
}

.sources-disclosure > summary:hover {
  background: var(--panel);
}

.sources-disclosure > summary::-webkit-details-marker {
  display: none;
}

.sources-disclosure > summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
}

.sources-disclosure[open] > summary {
  border-bottom: 1px solid var(--rule);
  border-radius: 4px 4px 0 0;
  background: var(--panel);
}

.sources-disclosure[open] > summary::after {
  content: "−";
}

.sources-disclosure__count {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 400;
}

.sources {
  list-style: none;
  padding: 0 1.1rem;
  margin: 0;
}

.source {
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
}

.source:first-child {
  border-top: 0;
}

.source + .source {
  margin-top: 0;
}

.source:target {
  padding-left: 0.85rem;
  margin-left: -0.85rem;
  border-left: 3px solid var(--accent);
}

.source__title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.3;
}

.source__title a {
  display: inline-block;
  padding: 0.55rem 0;
  min-height: 44px;
}

.source__meta,
.source__note {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.source__notes {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
}

.source__notes div {
  margin-top: 0.5rem;
}

.source__notes dt {
  font-weight: 700;
}

.source__notes dd {
  margin: 0;
}

/* Colophon. */

.colophon {
  border-top: 1px solid var(--rule);
  background: var(--panel);
}

.colophon__inner {
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 2.25rem var(--gutter) calc(2.75rem + env(safe-area-inset-bottom, 0px));
  font-size: 1rem;
  color: var(--ink-soft);
}

.colophon__name {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}

.address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.address__value {
  color: var(--ink);
  font-weight: 600;
}

.copy-button {
  min-height: 44px;
  padding: 0.4rem 1rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.copy-button:hover {
  border-color: var(--ink);
}

.copy-status:empty {
  display: none;
}

.colophon__counterpart {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 44px;
  font-weight: 600;
}

.colophon__counterpart .counterpart__arrow {
  color: currentColor;
}

@media (max-width: 30rem) {
  .masthead__inner {
    gap: 0.5rem;
  }

  .emblem {
    width: 26px;
    height: 16px;
  }

  .wordmark {
    gap: 0.4rem;
    font-size: 1.18rem;
  }

  .counterpart {
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
  }

  .pair-glyph {
    width: 10px;
    height: 10px;
  }

  .section--summary {
    padding: 1.25rem 1.1rem 0.4rem;
  }

  details.evidence .note {
    margin: 0.75rem 0.75rem 0;
  }

  .sources {
    padding: 0 0.85rem;
  }
}
