/* The Likeness Test
   Direction: an editorial lab notebook. Cool paper, ink, one cobalt accent taken
   from the specimen illustrations. Newsreader for headlines and long-form prose,
   Geist for interface, Geist Mono for every figure and label.
   No JavaScript: all motion is CSS and switches off under reduced motion. */

:root {
  --paper: #fbf6ee;
  --paper-2: #f5ecdd;
  --surface: #fffdf9;
  --ink: #1c1a33;
  --ink-2: #3b3854;
  --muted: #6a6280;
  --line: rgba(28, 26, 51, 0.11);
  --line-strong: rgba(28, 26, 51, 0.2);
  --accent: #2747e0;
  --accent-soft: rgba(39, 71, 224, 0.09);
  --accent-ink: #ffffff;
  --coral: #e5533d;
  --plate: #e6eafc;
  --flag: #8a5a06;
  --flag-bg: #faeedb;
  --shadow: 0 1px 2px rgba(60, 40, 30, 0.05), 0 12px 32px -12px rgba(60, 40, 30, 0.16);
  --shadow-lift: 0 2px 4px rgba(60, 40, 30, 0.06), 0 28px 56px -20px rgba(60, 40, 30, 0.28);
  --glass: rgba(255, 252, 246, 0.74);

  /* topic colours: fill, readable text, soft wash, image plate */
  --topic: var(--accent);
  --topic-ink: var(--accent);
  --topic-soft: var(--accent-soft);

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --ui: "Geist", ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
  --data: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --measure: 38rem;
  --wrap: 76rem;
  --r-lg: 1.75rem;
  --r-md: 1.125rem;
  --gutter: max(1.25rem, env(safe-area-inset-left, 0px));
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14122a;
    --paper-2: #1b1934;
    --surface: #211f3d;
    --ink: #f6f1e9;
    --ink-2: #ddd5ca;
    --muted: #aca3bf;
    --line: rgba(246, 241, 233, 0.1);
    --line-strong: rgba(246, 241, 233, 0.2);
    --accent: #93a6ff;
    --accent-soft: rgba(147, 166, 255, 0.14);
    --accent-ink: #14122a;
    --coral: #ff8a73;
    --flag: #e6b457;
    --flag-bg: #332714;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.3), 0 28px 56px -20px rgba(0, 0, 0, 0.75);
    --glass: rgba(33, 31, 61, 0.72);
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* faint paper grain, fixed so it never repaints while scrolling */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 60vh);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, transparent 60vh);
}
main, .foot { position: relative; z-index: 1; }

img { max-width: 100%; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: var(--gutter);
  padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
}
.wrap.narrow { max-width: calc(var(--measure) + 2.5rem); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  z-index: 40;
}
.skip:focus { left: 0.75rem; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.2rem, 5.6vw, 4.1rem); line-height: 1.02; }
h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.1; }
h3 { font-size: 1.2rem; line-height: 1.25; }
h1 em, h2 em { font-style: italic; color: var(--muted); }
p { margin: 0; text-wrap: pretty; }

/* ---------- small parts ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--data);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.pill-n { color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.35rem 0.4rem 0.35rem 1.35rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 500ms var(--ease), box-shadow 500ms var(--ease);
  box-shadow: var(--shadow);
}
.btn .go-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  padding-right: 1.35rem;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn:hover .go-icon { transform: translate(2px, -2px) scale(1.05); }
.btn:active { transform: scale(0.98); }

.go-icon {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
  transition: transform 500ms var(--ease), background-color 300ms var(--ease);
}

/* specimen plate: the illustrations are drawn on light paper, so they always sit on it */
.plate {
  background: var(--plate);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: calc(var(--r-md) - 0.375rem);
  box-shadow: inset 0 0 0 1px rgba(15, 19, 27, 0.06);
}
.plate img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease);
}
.plate-empty {
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--data);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6a6280;
}

.bezel {
  padding: 0.4rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}
.bezel > .plate { border-radius: calc(var(--r-lg) - 0.4rem); }

/* ---------- masthead: floating island ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: calc(env(safe-area-inset-top, 0px) + 0.85rem) var(--gutter) 0;
  pointer-events: none;
}
.island {
  pointer-events: auto;
  max-width: var(--wrap);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.4rem 0.4rem 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.logo img { display: block; border-radius: 8px; }
.nav { margin-left: auto; display: flex; gap: 0.15rem; }
.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0 0.95rem;
  border-radius: 999px;
  min-height: 2.6rem;
  display: inline-flex;
  align-items: center;
  transition: color 300ms var(--ease), background-color 300ms var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--accent-soft); }

/* ---------- home hero ---------- */

.hero { padding-block: clamp(3rem, 8vw, 6.5rem) clamp(2rem, 4vw, 3rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero h1 { margin-block: 1.4rem 1.5rem; max-width: 16ch; }
.hero h1 em { display: block; }
.lede {
  font-family: var(--display);
  font-size: clamp(1.1rem, 1.8vw, 1.32rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 50ch;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-meta {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.stat .n {
  display: block;
  font-family: var(--data);
  font-size: 1.6rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat .l { font-size: 0.78rem; color: var(--muted); }

/* z-axis cascade of three specimens */
.hero-stack {
  position: relative;
  aspect-ratio: 1 / 0.92;
}
.specimen {
  position: absolute;
  width: 66%;
  display: block;
  padding: 0.4rem 0.4rem 0;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lift);
  text-decoration: none;
  color: var(--ink);
  transition: transform 900ms var(--ease), box-shadow 600ms var(--ease);
}
.specimen-cap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.5rem 0.7rem;
  font-family: var(--data);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.specimen-cap span { color: var(--accent); }
.s2 { top: 0; left: 4%; rotate: -4deg; z-index: 1; }
.s1 { top: 22%; right: 0; rotate: 3deg; z-index: 2; }
.s0 { bottom: 0; left: 12%; rotate: -1.5deg; z-index: 3; }
.specimen:hover { z-index: 4; transform: translateY(-6px) scale(1.02); box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-lift); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0 0.5rem 0 1.1rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  transition: box-shadow 400ms var(--ease), transform 400ms var(--ease);
}
.chip span {
  font-family: var(--data);
  font-size: 0.72rem;
  min-width: 1.9rem;
  height: 1.9rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.chip:hover { box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow); transform: translateY(-1px); }

/* ---------- sections and cards ---------- */

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-head { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.section-head h2 { margin-top: 0.9rem; }
.section-head.split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem 3rem;
  flex-wrap: wrap;
}
.section-blurb { max-width: 36ch; color: var(--muted); font-size: 0.98rem; }

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.9rem, 2vw, 1.4rem);
}
.card { display: flex; min-width: 0; }
.card > a {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.4rem;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: transform 700ms var(--ease), box-shadow 700ms var(--ease);
}
.card-body { display: flex; flex-direction: column; gap: 0.6rem; padding: 1rem 0.85rem 0.9rem; flex: 1; }
.card-meta {
  display: flex;
  gap: 1rem;
  font-family: var(--data);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.card-meta span:first-child { color: var(--accent); }
.card h3 { font-size: 1.16rem; font-weight: 500; letter-spacing: -0.012em; }
.card-desc { color: var(--muted); font-size: 0.95rem; line-height: 1.55; }
.card-go {
  margin-top: auto;
  padding-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 300ms var(--ease);
}
.card > a:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-lift); }
.card > a:hover .plate img { transform: scale(1.035); }
.card > a:hover .card-go { color: var(--ink); }
.card > a:hover .go-icon { transform: translate(2px, -2px) scale(1.05); background: var(--accent); color: var(--accent-ink); }
.card > a:active { transform: scale(0.99); }

/* the first card of each topic is the bento feature */
.card.feature { grid-column: span 2; grid-row: span 2; }
.card.feature .plate { aspect-ratio: auto; flex: 1; min-height: 14rem; }
.card.feature h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.12; }
.card.feature .card-body { padding: 1.4rem 1.2rem 1.2rem; gap: 0.85rem; }

/* ---------- method ---------- */

.method { padding: 0.4rem; }
.method-core {
  border-radius: calc(var(--r-lg) - 0.4rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  background:
    radial-gradient(60rem 20rem at 100% 0%, var(--accent-soft), transparent 60%),
    var(--paper-2);
}
.method-core h2 { margin-top: 1rem; max-width: 20ch; }
.method-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 3rem;
  margin-top: 1.75rem;
}
.method-cols p { font-family: var(--display); font-size: 1.12rem; line-height: 1.6; color: var(--ink-2); }

/* ---------- article ---------- */

.art-head { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.art-head h1 { max-width: 22ch; margin-top: 1.25rem; font-size: clamp(2rem, 4.8vw, 3.5rem); }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--data);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { opacity: 0.5; }
.meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}
.meta span {
  font-family: var(--data);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  background: var(--surface);
}
.meta span:first-child { color: var(--accent); }

.art-hero { margin: clamp(1.75rem, 4vw, 2.75rem) 0 0; }
.art-hero .plate { aspect-ratio: 21 / 9; }

.art-grid {
  display: grid;
  grid-template-columns: 15rem minmax(0, var(--measure));
  gap: clamp(2rem, 6vw, 6rem);
  justify-content: center;
  padding-top: clamp(2rem, 5vw, 3.5rem);
}
.art-side { position: relative; }
.toc { position: sticky; top: 6.5rem; }
.toc-h {
  font-family: var(--data);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
  border-left: 1px solid var(--line);
}
.toc li { counter-increment: toc; }
.toc a {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  padding: 0.45rem 0 0.45rem 0.9rem;
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
  transition: color 300ms var(--ease), border-color 300ms var(--ease);
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--data);
  font-size: 0.68rem;
  padding-top: 0.12rem;
  color: var(--accent);
}
.toc a:hover { color: var(--ink); border-left-color: var(--accent); }

.prose { padding-bottom: 1rem; min-width: 0; }
.prose > p:first-child { font-size: 1.32rem; line-height: 1.55; color: var(--ink); }
.prose > p:first-child::first-letter {
  float: left;
  font-size: 3.6em;
  line-height: 0.82;
  padding: 0.3rem 0.6rem 0 0;
  font-weight: 500;
  color: var(--accent);
}
.prose p {
  font-family: var(--display);
  font-size: 1.18rem;
  line-height: 1.72;
  color: var(--ink-2);
  margin-top: 1.2rem;
}
.prose h2 {
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
}
.prose h3 { margin-top: 2rem; font-family: var(--ui); font-weight: 600; font-size: 1.05rem; letter-spacing: 0; }

/* One question and its answer, kept together so either can be read alone. */
.prose .faq {
  margin: 1.6rem 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--line);
}
.prose .faq h3 {
  margin: 0 0 0.45rem;
  color: var(--topic);
  text-wrap: balance;
}
.prose .faq p { margin: 0; }
.prose .faq + .faq { margin-top: 1.5rem; }
.prose strong { font-weight: 600; color: var(--ink); }

.prose blockquote {
  margin: 2.25rem 0;
  padding: 1.4rem 1.6rem;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  position: relative;
}
.prose blockquote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.2rem;
  bottom: 1.2rem;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}
.prose blockquote p {
  margin: 0;
  font-size: 1.26rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink);
}

.table-scroll {
  overflow-x: auto;
  margin: 2.25rem 0;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--ui);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}
th, td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td:first-child { font-weight: 600; color: var(--ink); }
td { min-width: 6.5rem; }
th {
  font-family: var(--data);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  background: var(--paper-2);
}
tbody tr { transition: background-color 200ms var(--ease); }
tbody tr:hover { background: var(--accent-soft); }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- per article disclosure, author's own wording ---------- */

.article-disclose {
  margin-top: 1.5rem;
  max-width: var(--measure);
  padding: 0.9rem 1.15rem;
  background: var(--flag-bg);
  box-shadow: inset 0 0 0 1px var(--flag);
  border-radius: var(--r-md);
}
.article-disclose p { font-size: 0.92rem; line-height: 1.5; color: var(--ink); }
.article-disclose p::before {
  content: "Disclosure. ";
  font-family: var(--data);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--flag);
}

.disclose {
  margin: 3rem 0 1rem;
  padding: 1.4rem 1.5rem;
  border-radius: var(--r-md);
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.prose .disclose h2 {
  margin: 0 0 0.5rem;
  padding: 0;
  border: 0;
  font-family: var(--ui);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0;
}
.prose .disclose p { font-family: var(--ui); font-size: 0.92rem; line-height: 1.6; color: var(--muted); margin: 0; }

/* ---------- keep reading ---------- */

.more { padding-block: clamp(3rem, 7vw, 5rem); background: var(--paper-2); margin-top: clamp(2rem, 5vw, 4rem); }
.cards-3 .card h3 { font-size: 1.08rem; }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.pager a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.3rem;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 500ms var(--ease), transform 500ms var(--ease);
}
.pager a:hover { box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow); transform: translateY(-2px); }
.pager-next { grid-column: 2; text-align: right; }
.pager-l {
  font-family: var(--data);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.pager-t { font-family: var(--display); font-size: 1.05rem; line-height: 1.3; }

/* ---------- 404 ---------- */

.notfound { padding-block: clamp(3rem, 10vw, 8rem); }
.notfound h1 { margin-block: 1.2rem 1rem; }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--line); background: var(--paper); }
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem 3rem;
  padding-block: clamp(2.5rem, 6vw, 4rem) calc(env(safe-area-inset-bottom, 0px) + 2.5rem);
}
.foot-brand p { margin-top: 1rem; max-width: 40ch; color: var(--muted); font-size: 0.92rem; }
.foot-h {
  font-family: var(--data);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.foot ul a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.94rem;
}
.foot ul a:hover { color: var(--accent); }
.foot .small {
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- colour: topics, warm washes ---------- */

.t-dating { --topic: #e5533d; --topic-ink: #ad321d; --topic-soft: rgba(229, 83, 61, 0.11); --plate: #fde3d9; }
.t-professional { --topic: #2747e0; --topic-ink: #2747e0; --topic-soft: rgba(39, 71, 224, 0.10); --plate: #e3e8fd; }
.t-profile { --topic: #1f9a6e; --topic-ink: #127049; --topic-soft: rgba(31, 154, 110, 0.12); --plate: #d9f2e6; }
@media (prefers-color-scheme: dark) {
  .t-dating { --topic: #ff8a73; --topic-ink: #ff9d89; --topic-soft: rgba(255, 138, 115, 0.14); }
  .t-professional { --topic: #93a6ff; --topic-ink: #a5b4ff; --topic-soft: rgba(147, 166, 255, 0.15); }
  .t-profile { --topic: #5fd3a6; --topic-ink: #74dcb3; --topic-soft: rgba(95, 211, 166, 0.14); }
}

/* the illustrations are drawn on pale grey; multiplying them onto a tinted
   plate turns that grey into the topic colour while keeping the line work */
.plate { background: var(--plate); }
.plate img { mix-blend-mode: multiply; }

body.page-home {
  background:
    radial-gradient(38rem 26rem at 88% 14rem, rgba(229, 83, 61, 0.14), transparent 65%),
    radial-gradient(34rem 24rem at 62% 40rem, rgba(39, 71, 224, 0.12), transparent 65%),
    radial-gradient(30rem 22rem at 6% 4rem, rgba(31, 154, 110, 0.10), transparent 65%),
    var(--paper);
  background-repeat: no-repeat;
}
.hero h1 em { color: var(--coral); }
.hero .pill { color: var(--ink-2); }
.btn { background: var(--ink); }
.btn .go-icon { background: var(--coral); color: #fff; }

.pill-n, .specimen-cap span, .card-meta span:first-child, .meta span:first-child,
.toc a::before, .pager-l { color: var(--topic-ink); }
.card-meta span:first-child::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.45rem;
  border-radius: 999px;
  background: var(--topic);
  vertical-align: 0.05rem;
}
.section .pill { box-shadow: inset 0 0 0 1px var(--topic-soft); background: var(--topic-soft); color: var(--topic-ink); }
.chip span { background: var(--topic-soft); color: var(--topic-ink); }
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--topic), var(--shadow); }
.card > a:hover .go-icon { background: var(--topic); color: #fff; }
.card > a:hover { box-shadow: inset 0 0 0 1.5px var(--topic), var(--shadow-lift); }
.go-icon { background: var(--topic-soft); color: var(--topic-ink); }
.nav a:hover { background: var(--accent-soft); color: var(--accent); }

.section + .section { border-top: 1px solid var(--line); }
.section.t-dating { background: linear-gradient(180deg, rgba(229, 83, 61, 0.05), transparent 40%); }
.section.t-professional { background: linear-gradient(180deg, rgba(39, 71, 224, 0.045), transparent 40%); }
.section.t-profile { background: linear-gradient(180deg, rgba(31, 154, 110, 0.05), transparent 40%); }

.method-core {
  background:
    radial-gradient(40rem 18rem at 100% 0%, rgba(229, 83, 61, 0.16), transparent 60%),
    radial-gradient(40rem 18rem at 0% 100%, rgba(39, 71, 224, 0.14), transparent 60%),
    var(--paper-2);
}

/* article accents follow the article's topic */
.prose > p:first-child::first-letter { color: var(--topic); }
.prose blockquote { background: var(--topic-soft); }
.prose blockquote::before { background: var(--topic); }
.toc a:hover { border-left-color: var(--topic); }
tbody tr:hover { background: var(--topic-soft); }
th { background: var(--topic-soft); color: var(--ink-2); }
.art-hero .bezel { box-shadow: inset 0 0 0 1px var(--topic-soft), var(--shadow-lift); }
.more { background: var(--topic-soft); }

/* footer: a dark band closes the page */
.foot { background: #1c1a33; color: #f6f1e9; border-top: 0; }
.foot .logo, .foot ul a { color: #f6f1e9; }
.foot ul a:hover { color: #ff9d89; }
.foot-brand p, .foot .small, .foot-h { color: #b8b0c9; }
.foot .small { border-top-color: rgba(246, 241, 233, 0.14); }
@media (prefers-color-scheme: dark) { .foot { background: #0d0c1d; } }

/* ---------- motion: load reveal and scroll reveal, CSS only ---------- */

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from { transform: translateY(0.9rem); }
    to { transform: none; }
  }
  @keyframes drop-in {
    from { translate: 0 2rem; }
    to { translate: 0 0; }
  }
  .hero-copy > *, .art-head > * { animation: rise 900ms var(--ease) both; }
  .hero-copy > :nth-child(2), .art-head > :nth-child(2) { animation-delay: 80ms; }
  .hero-copy > :nth-child(3), .art-head > :nth-child(3) { animation-delay: 160ms; }
  .hero-copy > :nth-child(4), .art-head > :nth-child(4) { animation-delay: 240ms; }
  .hero-copy > :nth-child(5) { animation-delay: 320ms; }
  .specimen { animation: drop-in 1100ms var(--ease) both; }
  .s0 { animation-delay: 380ms; }
  .s1 { animation-delay: 260ms; }
  .s2 { animation-delay: 140ms; }
  .art-hero { animation: rise 1100ms var(--ease) 240ms both; }

  @supports (animation-timeline: view()) {
    @keyframes reveal {
      from { opacity: 0; transform: translateY(2.5rem) scale(0.985); }
      to { opacity: 1; transform: none; }
    }
    .card, .method, .section-head, .pager {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
  }
}

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

/* ---------- responsive ---------- */

@media (max-width: 64rem) {
  .art-grid { grid-template-columns: minmax(0, 1fr); max-width: calc(var(--measure) + 2.5rem); margin-inline: auto; gap: 0; }
  .toc {
    position: static;
    padding: 1.1rem 1.25rem;
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
    margin-bottom: 1rem;
  }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 52rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-stack { max-width: 30rem; width: 100%; margin-inline: auto; padding-block: 1rem 0; }
  .method-cols { grid-template-columns: minmax(0, 1fr); }
  .art-hero .plate { aspect-ratio: 3 / 2; }
}

@media (max-width: 40rem) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card.feature { grid-column: auto; grid-row: auto; }
  .nav a { padding: 0 0.65rem; font-size: 0.85rem; }
  .logo span { display: none; }
  .island { padding-left: 0.45rem; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager-next { grid-column: auto; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .prose p { font-size: 1.1rem; }
  .prose > p:first-child { font-size: 1.2rem; }
  .specimen { width: 74%; }
}

@media print {
  .masthead, .skip, .toc, .more, body::before { display: none; }
  body { background: #fff; color: #000; }
  .art-grid { display: block; }
}
