:root {
  --paper: #fafaf7;
  --paper-home: #f7f7f2;
  --paper-soft: #f3f0e9;
  --paper-raised: rgba(255, 255, 252, 0.86);
  --ink: #2d2d32;
  --muted: #6d7069;
  --faint: #858881;
  --line: rgba(45, 45, 50, 0.18);
  --line-strong: rgba(45, 45, 50, 0.34);
  --coral: #f28e8e;
  --coral-ink: #8e4149;
  --sky: #8ec5e8;
  --mint: #95d5b2;
  --peach: #f7c59f;
  --lavender: #c3aed6;
  --butter: #f3d675;
  --aqua: #7fc8c2;
  --rose: #e7a1c4;
  --brown: #8b6f5a;
  --neutral: #92979f;
  --accent: var(--coral-ink);
  --accent-soft: rgba(242, 142, 142, 0.18);
  --fresh: linear-gradient(145deg, var(--coral) 5%, var(--sky) 48%, var(--mint) 94%);
  --fresh-soft: linear-gradient(135deg, rgba(242, 142, 142, 0.20), rgba(243, 214, 117, 0.13) 48%, rgba(149, 213, 178, 0.20));
  --panel: #25282c;
  --panel-text: #f8f6f0;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Aptos, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --site-shell: min(1540px, calc(100vw - 80px));
  --content-width: 850px;
  --header-height: 98px;
  --radius-small: 10px;
  --radius-medium: 18px;
  --radius-large: 30px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #171a1e;
  --paper-home: #171a1e;
  --paper-soft: #22262c;
  --paper-raised: rgba(35, 39, 45, 0.88);
  --ink: #f0efeb;
  --muted: #aaa9af;
  --faint: #92969d;
  --line: rgba(240, 239, 235, 0.17);
  --line-strong: rgba(240, 239, 235, 0.34);
  --coral-ink: #f0a0a3;
  --accent: #f0a0a3;
  --accent-soft: rgba(242, 142, 142, 0.12);
  --fresh-soft: linear-gradient(135deg, rgba(242, 142, 142, 0.11), rgba(243, 214, 117, 0.07) 48%, rgba(149, 213, 178, 0.12));
  --panel: #0f1216;
  --panel-text: #f0efeb;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  overflow-x: hidden;
  background: var(--paper);
  scrollbar-color: var(--faint) var(--paper);
  scrollbar-width: thin;
}

html::-webkit-scrollbar {
  width: 12px;
}

html::-webkit-scrollbar-track {
  background: var(--paper);
}

html::-webkit-scrollbar-thumb {
  border: 3px solid var(--paper);
  border-radius: 999px;
  background: var(--faint);
}

html::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background-color 300ms ease, color 300ms ease;
}

::selection {
  background: rgba(242, 142, 142, 0.52);
  color: #2d2d32;
}

a {
  color: inherit;
}

button,
select {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button:active,
.button:active {
  transform: translateY(1px);
}

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

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.nowrap {
  white-space: nowrap;
}

.tex-math {
  color: inherit;
}

.math-inline {
  display: inline-block;
  margin-inline: 0.045em;
  vertical-align: -0.08em;
  white-space: nowrap;
}

.math-inline .katex {
  font-size: 1.08em;
}

.math-inline--wide {
  margin-inline: 0.08em;
}

.math-stat {
  display: inline-block;
  vertical-align: -0.06em;
}

.math-stat .katex {
  font-size: 1.05em;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 16px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.reading-progress {
  position: fixed;
  z-index: 999;
  inset: 0 0 auto;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--fresh);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.site-shell {
  width: var(--site-shell);
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 30;
  background: color-mix(in srgb, var(--paper) 91%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.wordmark-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 50%;
  background: var(--fresh);
  color: #24302b;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.site-navigation {
  display: flex;
  align-items: center;
  gap: 44px;
}

.site-navigation a {
  position: relative;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.site-navigation a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms var(--ease);
}

.site-navigation a:hover,
.site-navigation a[aria-current="page"] {
  color: var(--ink);
}

.site-navigation a:hover::after,
.site-navigation a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  justify-self: end;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: transform 220ms var(--ease), border-color 180ms ease, background-color 180ms ease;
}

.theme-toggle:hover {
  transform: rotate(8deg) scale(1.04);
  border-color: var(--line-strong);
  background: var(--paper-soft);
}

.theme-toggle svg {
  width: 19px;
  grid-area: 1 / 1;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
  transition: transform 250ms var(--ease), opacity 180ms ease;
}

.moon-icon {
  opacity: 0;
  transform: rotate(-24deg) scale(0.72);
}

html[data-theme="dark"] .sun-icon {
  opacity: 0;
  transform: rotate(24deg) scale(0.72);
}

html[data-theme="dark"] .moon-icon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.menu-toggle {
  display: none;
}

.article-hero {
  position: relative;
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(390px, 0.82fr);
  gap: clamp(54px, 7vw, 126px);
  align-items: center;
  padding-block: clamp(78px, 8.5vw, 138px);
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.hero-copy,
.hero-figure {
  position: relative;
  z-index: 2;
}

.hero-orb {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  background: var(--fresh);
  pointer-events: none;
}

.hero-orb--left {
  width: clamp(160px, 17vw, 300px);
  height: clamp(160px, 17vw, 300px);
  left: max(-235px, -14vw);
  top: 34%;
  opacity: 0.7;
  animation: orb-drift 14s var(--ease) infinite alternate;
}

.hero-orb--right {
  width: 110px;
  height: 110px;
  right: -30px;
  top: 72px;
  opacity: 0.57;
  animation: orb-drift 11s var(--ease) 800ms infinite alternate-reverse;
}

@keyframes orb-drift {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(8px, -12px, 0) rotate(7deg); }
}

.article-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 44px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.article-breadcrumbs a {
  text-decoration: none;
}

.article-breadcrumbs a:hover {
  color: var(--accent);
}

.article-breadcrumbs time::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  margin-right: 14px;
  vertical-align: middle;
  background: var(--line-strong);
}

.hero-eyebrow,
.section-label,
.micro-label {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 20px;
  color: var(--muted);
}

.hero-eyebrow > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fresh);
}

.hero-eyebrow strong {
  color: var(--ink);
  font-weight: 650;
}

.article-hero h1 {
  max-width: 920px;
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(52px, 5.5vw, 82px);
  font-weight: 400;
  letter-spacing: -0.052em;
  line-height: 0.98;
  text-wrap: balance;
}

.article-hero h1 em {
  color: var(--accent);
  font-weight: 400;
}

.hero-authors {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1.6;
}

.hero-authors strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-authors a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.hero-authors a:hover {
  color: var(--accent);
}

.hero-description {
  max-width: 700px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.6;
}

.hero-actions,
.closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  margin-top: 36px;
}

.button {
  min-height: 47px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px solid transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: transform 180ms var(--ease), color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button--primary {
  border-color: var(--coral-ink);
  background: var(--coral-ink);
  color: #fffaf6;
}

.button--primary:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--coral-ink) 82%, var(--ink));
  background: color-mix(in srgb, var(--coral-ink) 88%, var(--ink));
}

.button--quiet {
  padding-inline: 2px;
  border-bottom-color: var(--line-strong);
}

.button--quiet:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.button--pending {
  border-bottom-style: dashed;
  color: var(--faint);
  cursor: default;
  font-weight: 560;
}

.button--pending:hover {
  border-bottom-color: var(--line-strong);
  color: var(--faint);
}

.button span {
  transition: transform 220ms var(--ease);
}

.button:hover span {
  transform: translate(2px, -2px);
}

.article-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 48px 0 0;
  padding: 23px 0 0;
  border-top: 1px solid var(--line);
}

.article-facts > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-right: 22px;
  margin-right: 22px;
  border-right: 1px solid var(--line);
}

.article-facts > div:last-child {
  padding-right: 0;
  margin-right: 0;
  border-right: 0;
}

.article-facts dt {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-facts dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
}

.hero-figure {
  align-self: center;
  margin: 0;
  padding: 24px;
  border: 1px solid rgba(139, 111, 90, 0.22);
  border-radius: var(--radius-large);
  background: var(--paper-raised);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 28px 65px -48px rgba(105, 69, 54, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.hero-figure-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.live-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  animation: breathe 2.8s var(--ease) infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.82); opacity: 0.62; }
  50% { transform: scale(1); opacity: 1; }
}

.hero-figure img {
  width: 100%;
  height: auto;
  display: block;
  margin: 22px 0 16px;
  border-radius: var(--radius-medium);
  background: transparent;
  object-fit: contain;
}

.hero-figure figcaption {
  width: 100%;
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.mobile-toc {
  display: none;
}

.article-layout {
  width: min(1190px, calc(100vw - 80px));
  display: grid;
  grid-template-columns: 218px minmax(0, var(--content-width));
  gap: clamp(54px, 7vw, 104px);
  justify-content: center;
  align-items: start;
  padding-block: 74px 150px;
}

.desktop-toc {
  align-self: stretch;
  min-width: 0;
}

.toc-sticky {
  position: sticky;
  top: 30px;
  max-height: calc(100dvh - 60px);
  display: flex;
  flex-direction: column;
  padding: 5px 8px 20px 0;
}

.toc-title {
  margin: 0 0 25px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-list li {
  border-left: 1px solid var(--line);
}

.toc-list li.is-active {
  border-left-color: var(--accent);
}

.toc-list a {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 7px;
  padding: 10px 0 10px 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
}

.toc-list a span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.8;
}

.toc-list a:hover,
.toc-list li.is-active a {
  color: var(--ink);
}

.article-prose {
  min-width: 0;
  color: var(--ink);
  font-size: 17.5px;
  line-height: 1.74;
}

.article-prose p,
.article-prose li {
  max-width: 66ch;
}

.article-prose p {
  margin: 0 0 1.4em;
}

.article-prose strong {
  font-weight: 670;
}

.article-prose a:not(.button) {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent);
  text-underline-offset: 0.2em;
}

.article-lede {
  max-width: 760px;
  padding: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 27px);
  line-height: 1.5;
}

.article-lede p {
  max-width: none;
  margin: 0;
}

.article-lede p + p {
  margin-top: 0.9em;
}

.opening-answer {
  max-width: 760px;
  margin: 38px 0 42px;
  padding: 5px 0 6px 28px;
  border-left: 2px solid var(--coral-ink);
}

.opening-answer .micro-label {
  margin-bottom: 13px !important;
}

.opening-answer > p:not(.micro-label) {
  max-width: 30em;
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(23px, 2.5vw, 29px);
  line-height: 1.38;
}

.opening-answer small {
  display: block;
  max-width: 62ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.evidence-note,
.caution-note,
.theory-note {
  position: relative;
  max-width: 790px;
  padding: 23px 26px 23px 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--fresh-soft);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.evidence-note::before,
.caution-note::before {
  content: "i";
  position: absolute;
  top: 24px;
  left: 23px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
}

.evidence-note p,
.caution-note p,
.theory-note p {
  max-width: none;
  margin: 0;
}

.article-section {
  position: relative;
  padding-block: 92px 18px;
  border-top: 0;
  scroll-margin-top: 54px;
}

.article-prose > #problem,
.article-prose > #experiments,
.article-prose > #limitations,
.article-prose > #references {
  border-top: 1px solid var(--line);
}

.article-prose > .article-section:first-of-type {
  margin-top: 66px;
}

.article-prose > #problem {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

#problem .opening-lede {
  margin-bottom: 56px;
}

.section-label {
  margin: 0 0 18px !important;
}

.article-section h2 {
  max-width: 800px;
  margin: 0 0 36px;
  font-family: var(--serif);
  font-size: clamp(35px, 4vw, 50px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.06;
  text-wrap: balance;
}

.section-dek {
  max-width: 64ch !important;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.7;
}

.result-caveat {
  margin-top: -20px !important;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.article-section h3 {
  max-width: 760px;
  margin: 58px 0 22px;
  font-family: var(--serif);
  font-size: clamp(25px, 2.4vw, 31px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.article-section h4 {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.35;
}

.article-section blockquote {
  margin: 38px 0;
  padding: 7px 0 7px 28px;
  border-left: 2px solid var(--coral);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.55;
}

.article-section blockquote p {
  margin: 0;
}

.comparison-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 40px 0 24px;
  border-block: 1px solid var(--line);
}

.comparison-strip > div {
  padding: 30px 34px 32px 0;
}

.comparison-strip > div + div {
  padding-left: 34px;
  border-left: 1px solid var(--line);
}

.comparison-strip h3 {
  margin: 14px 0 13px;
  font-size: 24px;
}

.comparison-strip p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.reduction-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 36px 0 34px;
  border-block: 1px solid var(--line);
}

.reduction-strip > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 18px;
  align-items: baseline;
  padding: 25px 28px 26px 0;
}

.reduction-strip > div + div {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.reduction-strip > div > span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reduction-strip strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 400;
}

.reduction-strip p {
  grid-column: 1 / -1;
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.micro-label {
  margin: 0 !important;
}

.dataset-ledger {
  max-width: 810px;
  margin: 36px 0 50px;
  padding: 18px 0 15px;
  border-block: 1px solid var(--line);
}

.dataset-ledger > .micro-label {
  margin-bottom: 10px !important;
}

.dataset-ledger-intro {
  max-width: 72ch !important;
  margin: 0 0 9px !important;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.dataset-ledger dl {
  margin: 0;
}

.dataset-ledger-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  padding: 19px 0 20px;
}

.dataset-ledger-row + .dataset-ledger-row {
  border-top: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
}

.dataset-ledger dt {
  min-width: 0;
}

.dataset-ledger dt span {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.dataset-ledger dt small {
  display: block;
  margin-top: 7px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.45;
  text-transform: uppercase;
}

.dataset-ledger dd {
  min-width: 0;
  margin: 0;
}

.dataset-ledger dd > p:first-child {
  max-width: 66ch;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.dataset-ledger code {
  padding: 0;
  background: none;
  color: inherit;
  font-family: var(--mono);
  font-size: 0.92em;
}

.dataset-ledger-meta,
.dataset-ledger-note {
  max-width: none !important;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.65;
}

.dataset-ledger-meta {
  margin: 0 !important;
}

.dataset-ledger-meta span {
  margin-inline: 5px;
}

.dataset-ledger-meta span:first-child {
  margin-left: 0;
}

.dataset-ledger-note {
  margin: 0 !important;
  padding-top: 13px;
  border-top: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
}

.explorer-section > .explorer {
  width: min(950px, calc(100vw - 48px));
  margin: 44px 0 18px 50%;
  transform: translateX(-50%);
}

.explorer {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(139, 111, 90, 0.24);
  border-radius: var(--radius-large);
  background: var(--paper-raised);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54), 0 32px 70px -52px rgba(105, 69, 54, 0.52);
}

.explorer::before {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -88px;
  top: -106px;
  border-radius: 50%;
  background: var(--fresh);
  opacity: 0.56;
  pointer-events: none;
}

.explorer-toolbar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) auto minmax(420px, 1.6fr);
  gap: 26px;
  align-items: end;
  padding: 28px 30px 24px;
  border-bottom: 1px solid var(--line);
}

.field label,
.dimension-toggle legend {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.field select {
  width: 100%;
  min-height: 44px;
  padding: 9px 38px 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.dimension-toggle {
  min-width: 134px;
  margin: 0;
  padding: 0;
  border: 0;
}

.dimension-toggle > div,
.gallery-tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper-soft);
}

.dimension-toggle button,
.gallery-tabs button {
  min-width: 60px;
  min-height: 36px;
  padding: 7px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  transition: transform 180ms var(--ease), background-color 180ms ease, color 180ms ease;
}

.dimension-toggle button.is-active,
.gallery-tabs button.is-active {
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(45, 45, 50, 0.08);
}

.axis-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.field--z[hidden] {
  display: none;
}

.explorer-context {
  display: grid;
  grid-template-columns: repeat(3, max-content) minmax(160px, 1fr);
  gap: 22px;
  align-items: center;
  padding: 17px 30px;
  border-bottom: 1px solid var(--line);
  background: var(--fresh-soft);
}

.explorer-context > div {
  display: grid;
  gap: 2px;
}

.explorer-context span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.explorer-context strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
}

.explorer-context p {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.plot-guide {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 30px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-soft) 80%, var(--sky) 20%);
}

.plot-guide p {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.plot-guide p span {
  display: inline-block;
  margin-right: 8px;
  color: var(--accent);
  font-size: 13px;
}

.plot-guide button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plot-guide button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.plot-wrap {
  position: relative;
  min-height: 550px;
  background: color-mix(in srgb, var(--paper) 94%, white);
}

.pareto-plot {
  width: 100%;
  height: 550px;
}

.plot-loading {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 10px);
  place-content: center;
  gap: 8px;
  background: var(--paper);
  transition: opacity 220ms ease;
}

.plot-loading.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.plot-loading span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
  animation: plot-pulse 1.1s ease-in-out infinite;
}

.plot-loading span:nth-child(2) {
  background: var(--sky);
  animation-delay: 120ms;
}

.plot-loading span:nth-child(3) {
  background: var(--mint);
  animation-delay: 240ms;
}

.plot-loading p {
  grid-column: 1 / -1;
  margin: 10px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-align: center;
}

@keyframes plot-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(-6px); opacity: 1; }
}

.explorer-footer {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 28px;
  padding: 22px 30px 25px;
  border-top: 1px solid var(--line);
}

.explorer-footer p {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.explorer-footer p:first-child {
  overflow-wrap: anywhere;
}

.frontier-key {
  width: 12px;
  height: 12px;
  display: inline-block;
  margin-right: 9px;
  border: 3px solid var(--coral-ink);
  border-radius: 50%;
  vertical-align: -2px;
}

.projection-note {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.equation {
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vw, 24px);
  margin: 34px 0;
  padding: 27px 24px;
  overflow-x: auto;
  border-block: 1px solid var(--line);
  color: var(--ink);
  font-size: clamp(20px, 3vw, 30px);
  white-space: nowrap;
}

.equation .math-display {
  display: block;
  flex: none;
  min-width: max-content;
  margin: 0;
  font-size: 1em;
}

.equation .katex-display {
  margin: 0;
}

.insight-panel {
  margin: 42px 0;
  padding: 8px 0 8px 30px;
  border-left: 2px solid var(--aqua);
}

.insight-panel .equation {
  justify-content: flex-start;
  margin: 20px 0 16px;
  padding: 17px 0;
  border-color: var(--line);
  font-size: clamp(19px, 2.3vw, 26px);
}

.equation.equation--compact {
  font-size: clamp(19px, 2.3vw, 26px);
}

.insight-panel > p:not(.micro-label) {
  max-width: 64ch;
  color: var(--muted);
  font-size: 15px;
}

.insight-panel > p:last-child {
  margin-bottom: 0;
}

.algorithm-walkthrough {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 320px;
  margin: 34px 0 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--paper-raised);
}

.algorithm-steps {
  display: grid;
  align-content: start;
  padding: 20px 0;
  border-right: 1px solid var(--line);
}

.algorithm-steps button {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 17px 20px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms var(--ease), color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.algorithm-steps button span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
}

.algorithm-steps button:hover {
  color: var(--ink);
  background: var(--fresh-soft);
}

.algorithm-steps button.is-active {
  border-left-color: var(--coral-ink);
  background: var(--fresh-soft);
  color: var(--ink);
  font-weight: 650;
}

.algorithm-detail {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: center;
  padding: 42px 52px;
  overflow: hidden;
}

.algorithm-detail h4 {
  max-width: 520px;
  margin: 16px 0;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.algorithm-detail > p:last-of-type {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.confidence-glyph {
  position: absolute;
  width: 176px;
  height: 176px;
  right: -48px;
  bottom: -48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.58;
}

.confidence-glyph::before,
.confidence-glyph::after,
.confidence-glyph span,
.confidence-glyph i,
.confidence-glyph b {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.confidence-glyph::before {
  inset: 25px;
  border: 1px solid var(--line);
}

.confidence-glyph::after {
  inset: 51px;
  border: 1px solid var(--line);
}

.confidence-glyph span {
  width: 17px;
  height: 17px;
  left: 47px;
  top: 48px;
  background: var(--coral);
}

.confidence-glyph i {
  width: 13px;
  height: 13px;
  right: 38px;
  top: 77px;
  background: var(--sky);
}

.confidence-glyph b {
  width: 10px;
  height: 10px;
  left: 81px;
  bottom: 35px;
  background: var(--mint);
}

.paper-figure {
  margin: 48px 0 38px;
}

.paper-figure img,
.performance-gallery figure img {
  width: 100%;
  display: block;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.paper-figure figcaption,
.performance-gallery figcaption {
  width: 100%;
  max-width: 100%;
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* Captions follow the figure width, not the prose measure. */
.hero-figure > figcaption,
.article-prose figure > figcaption {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.mle-comparison-figure {
  width: min(950px, calc(100vw - 48px));
  margin: 36px 0 38px 50%;
  transform: translateX(-50%);
}

.mle-chart-frame {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--paper);
  scrollbar-color: var(--sky) transparent;
  scrollbar-width: thin;
}

.mle-chart-frame:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.mle-chart-frame img {
  width: 100%;
  min-width: 720px;
  height: auto;
  display: block;
  border: 0;
  border-radius: 0;
}

.mle-comparison-figure figcaption strong {
  color: var(--ink);
  font-weight: 650;
}

.method-note {
  max-width: 790px;
  margin: 34px 0 0;
  padding: 20px 24px;
  border-left: 2px solid var(--aqua);
  background: color-mix(in srgb, var(--aqua) 10%, transparent);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.method-note p {
  max-width: none;
  margin: 0;
}

.method-note strong {
  color: var(--ink);
}

.theory-note {
  margin-top: 42px;
  padding-left: 28px;
  background: linear-gradient(135deg, rgba(195, 174, 214, 0.17), rgba(142, 197, 232, 0.09));
}

.theory-note .micro-label {
  margin-bottom: 11px !important;
}

.complexity-lines {
  display: grid;
  gap: 7px;
  margin: 14px 0 16px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.35;
}

.complexity-lines span {
  display: block;
}

.metric-ribbon {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 40px 0 48px;
  border-block: 1px solid var(--line);
}

.metric-ribbon > div {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 27px 28px 29px 0;
}

.metric-ribbon > div + div {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.metric-ribbon strong {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.metric-ribbon > div > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 32px 0 36px;
  border-block: 1px solid var(--line);
}

.diagnostic-grid > div {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 24px 26px 26px 0;
}

.diagnostic-grid > div + div {
  padding-left: 26px;
  border-left: 1px solid var(--line);
}

.diagnostic-grid strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 400;
}

.diagnostic-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.performance-gallery {
  margin: 48px 0 56px;
  padding: 30px 0;
  border-block: 1px solid var(--line);
}

.gallery-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
}

.gallery-head h3 {
  margin: 10px 0 0;
  font-size: 27px;
}

.gallery-tabs button {
  min-width: 88px;
}

.performance-gallery figure {
  margin: 0;
}

.performance-gallery figure img {
  aspect-ratio: auto;
  object-fit: contain;
}

/* Click-to-enlarge figures follow the companion counting blog's interaction. */
html {
  scrollbar-gutter: stable;
}

body.dialog-open {
  overflow: hidden;
}

.figure-zoom {
  position: relative;
  display: block;
  width: 100%;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
}

.figure-zoom:focus-visible {
  outline: 2px solid var(--coral-ink);
  outline-offset: 6px;
}

.zoom-hint {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .04em;
  text-align: right;
}

.figure-zoom:hover .zoom-hint {
  color: var(--coral-ink);
}

.hero-figure figcaption {
  margin-top: 15px;
}

[data-theme="dark"] .figure-zoom img {
  background: #22262c;
  border-radius: 4px;
}

[data-theme="dark"] .hero-figure .figure-zoom img {
  background: #22262c;
}

[data-theme="dark"] #figure-dialog.is-cover .dialog-image-wrap,
[data-theme="dark"] #figure-dialog.is-cover img {
  background: #22262c;
}

#figure-dialog {
  box-sizing: border-box;
  width: min(1400px, 95vw);
  max-width: 95vw;
  max-height: 94dvh;
  padding: 20px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--paper);
}

#figure-dialog::backdrop {
  background: #15191dc9;
  backdrop-filter: blur(5px);
}

.dialog-bar,
.dialog-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dialog-bar {
  justify-content: space-between;
  padding-bottom: 16px;
}

#figure-dialog-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.dialog-controls {
  flex-shrink: 0;
}

.dialog-controls button,
.dialog-controls a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: transparent;
  font: 12px var(--mono);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.dialog-controls button:hover,
.dialog-controls a:hover {
  border-color: var(--coral-ink);
}

.dialog-image-wrap {
  max-height: 69dvh;
  overflow: auto;
  overscroll-behavior: contain;
  background: #fafaf7;
}

#figure-dialog-image {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: 68dvh;
  padding: 16px;
  object-fit: contain;
}

#figure-dialog.is-zoomed #figure-dialog-image {
  width: 170%;
  max-height: none;
}

#figure-dialog-caption {
  width: 100%;
  max-width: none;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 720px) {
  #figure-dialog {
    padding: 12px;
  }

  .dialog-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .dialog-controls {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .dialog-controls button,
  .dialog-controls a {
    padding: 10px 7px;
    font-size: 10px;
  }

  #figure-dialog.is-zoomed #figure-dialog-image {
    width: 240%;
  }
}

.table-wrap {
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  margin: 24px 0 30px;
  border-block: 1px solid var(--line);
  overscroll-behavior-inline: contain;
}

.table-wrap table {
  width: max-content;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.table-wrap th,
.table-wrap td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.table-wrap thead th {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.table-wrap th:first-child,
.table-wrap td:first-child {
  padding-left: 0;
  padding-right: 22px;
  text-align: left;
}

.table-wrap th:last-child,
.table-wrap td:last-child {
  padding-right: 0;
}

.table-wrap tbody th {
  font-weight: 650;
}

.table-wrap tbody tr:last-child th,
.table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.caution-note {
  margin-top: 42px;
  border: 0;
  border-left: 2px solid var(--peach);
  border-radius: 0;
  background: linear-gradient(135deg, rgba(247, 197, 159, 0.19), rgba(243, 214, 117, 0.10));
}

.open-questions {
  margin-top: 42px;
  border-top: 1px solid var(--ink);
}

.open-questions .future-direction {
  border-bottom: 1px solid var(--line);
}

.open-questions .future-direction:last-child {
  border-bottom: 0;
}

.open-questions .future-heading {
  min-height: 84px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 16px;
  align-items: center;
  margin: 0;
  padding: 20px 0;
}

.open-questions .future-heading > span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
}

.open-questions .future-heading strong {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 27px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.open-questions .future-direction > div {
  max-width: 730px;
  padding: 0 0 28px 54px;
  color: var(--muted);
  font-size: 15px;
}

.open-questions .future-direction > div p:last-child {
  margin-bottom: 0;
}

code {
  padding: 0.12em 0.38em;
  border-radius: 5px;
  background: var(--paper-soft);
  color: var(--brown);
  font-family: var(--mono);
  font-size: 0.82em;
  overflow-wrap: anywhere;
}

.closing-section {
  padding-bottom: 70px;
}

.takeaway-list {
  margin: 42px 0 0;
  padding: 0;
  border-top: 1px solid var(--ink);
  list-style: none;
}

.takeaway-list li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 22px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.takeaway-list li > span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
}

.takeaway-list p {
  max-width: none;
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.5;
}

.author-note {
  margin-top: 44px !important;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.references-section {
  padding-bottom: 22px;
}

.reference-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.reference-list li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.reference-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.reference-list span {
  padding-top: 4px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
}

.reference-list p {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.reference-list a {
  color: var(--ink) !important;
  font-weight: 650;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 52px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 720ms var(--ease), transform 720ms var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .article-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
    gap: 48px;
  }

  .article-hero h1 {
    font-size: clamp(50px, 5.7vw, 68px);
  }

  .hero-figure {
    padding: 18px;
  }

  .article-layout {
    width: min(1060px, calc(100vw - 56px));
    grid-template-columns: 190px minmax(0, 780px);
    gap: 58px;
  }

  .explorer-section > .explorer {
    width: min(850px, calc(100vw - 264px));
  }

  .mle-comparison-figure {
    width: min(850px, calc(100vw - 264px));
  }

  .explorer-toolbar {
    grid-template-columns: 170px auto 1fr;
    gap: 18px;
    padding-inline: 22px;
  }

  .explorer-context,
  .explorer-footer {
    padding-inline: 22px;
  }
}

@media (max-width: 930px) {
  :root {
    --site-shell: calc(100vw - 40px);
    --header-height: 78px;
  }

  .header-inner {
    grid-template-columns: 1fr auto auto;
    gap: 18px;
  }

  .wordmark-name {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .menu-line {
    position: relative;
    width: 18px;
    height: 1px;
    background: var(--ink);
  }

  .menu-line::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 1px;
    left: 0;
    top: 5px;
    background: var(--ink);
  }

  .site-navigation {
    position: absolute;
    top: 77px;
    left: -20px;
    right: -20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 18px 20px 26px;
    background: var(--panel);
    color: var(--panel-text);
    opacity: 0;
    pointer-events: none;
    transform: scaleY(0);
    transform-origin: top;
    transition: opacity 180ms ease, transform 260ms var(--ease);
  }

  .site-navigation.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: scaleY(1);
  }

  .site-navigation a {
    padding: 18px 0;
    border-bottom: 1px solid rgba(247, 247, 242, 0.18);
    color: var(--panel-text);
    font-family: var(--serif);
    font-size: 30px;
  }

  .site-navigation a::after {
    display: none;
  }

  .article-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 56px;
    padding-block: 72px 86px;
  }

  .article-hero h1 {
    max-width: 760px;
    font-size: clamp(48px, 9.5vw, 72px);
  }

  .hero-description {
    max-width: 680px;
  }

  .hero-figure {
    width: min(100%, 680px);
  }

  .mobile-toc {
    display: block;
    margin-top: 32px;
    border-block: 1px solid var(--line);
  }

  .mobile-toc summary {
    padding: 18px 0;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .mobile-toc nav {
    display: grid;
    padding-bottom: 18px;
  }

  .mobile-toc a {
    padding: 8px 0;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
  }

  .desktop-toc {
    display: none;
  }

  .article-layout {
    width: min(var(--content-width), calc(100vw - 56px));
    grid-template-columns: 1fr;
    padding-top: 62px;
  }

  .explorer-section > .explorer {
    width: min(950px, calc(100vw - 48px));
  }

  .mle-comparison-figure {
    width: min(950px, calc(100vw - 48px));
  }

  .explorer-toolbar {
    grid-template-columns: 1fr auto;
  }

  .axis-fields {
    grid-column: 1 / -1;
  }

  .explorer-context {
    grid-template-columns: repeat(3, 1fr);
  }

  .explorer-context p {
    grid-column: 1 / -1;
    text-align: left;
  }

  .plot-wrap,
  .pareto-plot {
    min-height: 540px;
    height: 540px;
  }

  .explorer-footer {
    grid-template-columns: 1fr;
  }

  .projection-note {
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 720px) {
  :root {
    --site-shell: calc(100vw - 36px);
  }

  .article-hero {
    padding-block: 58px 72px;
  }

  .article-breadcrumbs {
    margin-bottom: 34px;
  }

  .article-hero h1 {
    font-size: clamp(43px, 12.5vw, 61px);
    line-height: 1;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px 0;
  }

  .article-facts > div {
    display: grid;
    gap: 2px;
    padding-right: 14px;
    margin-right: 14px;
  }

  .article-facts > div:nth-child(2) {
    border-right: 0;
  }

  .article-facts > div:last-child {
    grid-column: auto;
  }

  .hero-figure {
    padding: 15px;
    border-radius: 22px;
  }

  .hero-figure-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .article-layout {
    width: calc(100vw - 36px);
    padding-block: 54px 100px;
  }

  .article-prose {
    font-size: 16px;
  }

  .section-dek {
    font-size: 17.5px;
  }

  .opening-answer {
    padding-left: 20px;
  }

  .article-section {
    padding-top: 70px;
  }

  .article-prose > .article-section:first-of-type {
    margin-top: 54px;
  }

  .article-section h2 {
    font-size: clamp(34px, 10vw, 44px);
  }

  .comparison-strip,
  .reduction-strip,
  .diagnostic-grid,
  .metric-ribbon {
    grid-template-columns: 1fr;
  }

  .comparison-strip > div,
  .comparison-strip > div + div,
  .reduction-strip > div,
  .reduction-strip > div + div,
  .diagnostic-grid > div,
  .diagnostic-grid > div + div,
  .metric-ribbon > div,
  .metric-ribbon > div + div {
    padding: 25px 0;
    border-left: 0;
  }

  .comparison-strip > div + div,
  .reduction-strip > div + div,
  .diagnostic-grid > div + div,
  .metric-ribbon > div + div {
    border-top: 1px solid var(--line);
  }

  .dataset-ledger-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 17px 0 18px;
  }

  .dataset-ledger dt small {
    margin-top: 4px;
  }

  .explorer-section > .explorer {
    width: calc(100vw - 20px);
  }

  .explorer-toolbar {
    grid-template-columns: 1fr;
    padding: 24px 18px 20px;
  }

  .dimension-toggle {
    width: 100%;
  }

  .dimension-toggle > div {
    width: 100%;
  }

  .dimension-toggle button {
    flex: 1;
  }

  .axis-fields {
    grid-template-columns: 1fr;
  }

  .explorer-context {
    grid-template-columns: 1fr 1fr;
    padding-inline: 18px;
  }

  .explorer-context > div:nth-child(3) {
    grid-column: 1 / -1;
  }

  .plot-guide {
    padding-inline: 18px;
  }

  .plot-wrap,
  .pareto-plot {
    min-height: 480px;
    height: 480px;
  }

  .explorer-footer {
    padding-inline: 18px;
  }

  .equation {
    justify-content: flex-start;
    font-size: 20px;
  }

  .insight-panel {
    padding: 7px 0 7px 20px;
  }

  .algorithm-walkthrough {
    grid-template-columns: 1fr;
  }

  .algorithm-steps {
    grid-template-columns: repeat(4, 1fr);
    padding: 0;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .algorithm-steps button {
    grid-template-columns: 1fr;
    gap: 5px;
    min-width: 88px;
    padding: 15px 12px;
    border-bottom: 2px solid transparent;
    border-left: 0;
    text-align: center;
  }

  .algorithm-steps button.is-active {
    border-bottom-color: var(--coral-ink);
  }

  .algorithm-detail {
    min-height: 280px;
    padding: 34px 24px;
  }

  .confidence-glyph {
    opacity: 0.35;
  }

  .gallery-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .performance-gallery {
    padding: 24px 0;
  }

  .performance-gallery figure img {
    aspect-ratio: auto;
  }

  .open-questions .future-heading {
    grid-template-columns: 30px 1fr;
    gap: 10px;
  }

  .open-questions .future-direction > div {
    padding-left: 40px;
  }

  .takeaway-list li {
    grid-template-columns: 38px 1fr;
    gap: 12px;
  }

  .takeaway-list p {
    font-size: 19px;
  }

  .closing-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  :root {
    --site-shell: calc(100vw - 30px);
  }

  .site-navigation {
    left: -15px;
    right: -15px;
  }

  .article-hero h1 {
    font-size: 42px;
  }

  .hero-description {
    font-size: 16px;
  }

  .article-layout {
    width: calc(100vw - 30px);
  }

  .explorer-section > .explorer {
    width: calc(100vw - 12px);
    border-radius: 20px;
  }

  .mle-comparison-figure {
    width: calc(100vw - 12px);
  }

  .explorer-context {
    grid-template-columns: 1fr;
  }

  .explorer-context > div:nth-child(3) {
    grid-column: auto;
  }

  .plot-guide {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-block: 12px;
  }

  .plot-wrap,
  .pareto-plot {
    min-height: 410px;
    height: 410px;
  }

  .gallery-tabs {
    width: 100%;
  }

  .gallery-tabs button {
    flex: 1;
  }
}

/* Shared editorial scale. Keep the cover headline and figure artwork intact. */
:root {
  --type-section: 48px;
  --type-heading: 28px;
  --type-body: 18px;
  --type-note: 14px;
  --type-label: 11px;
}

.article-section h2 {
  font-size: var(--type-section);
  line-height: 1.15;
}

.article-section h3,
.article-section h4,
.algorithm-detail h4,
.gallery-head h3,
.open-questions .future-heading strong {
  font-size: var(--type-heading);
  line-height: 1.25;
}

.article-prose,
.hero-description,
.article-lede,
.section-dek,
.opening-answer > p:not(.micro-label),
.article-section blockquote,
.insight-panel > p:not(.micro-label),
.algorithm-detail > p:last-of-type,
.open-questions .future-direction > div,
.evidence-note,
.caution-note,
.theory-note {
  font-family: var(--sans);
  font-size: var(--type-body);
  line-height: 1.7;
}

.hero-authors,
.hero-figure figcaption,
.paper-figure figcaption,
.performance-gallery figcaption,
#figure-dialog-caption,
#figure-dialog-title,
.reference-list p,
.result-caveat,
.method-note,
.author-note,
.opening-answer small,
.reduction-strip p,
.dataset-ledger-intro,
.dataset-ledger dd > p:first-child,
.dataset-ledger-note,
.explorer-context p,
.explorer-footer p,
.metric-ribbon > div > span,
.diagnostic-grid span,
.toc-list a,
.mobile-toc a,
.site-footer,
.table-wrap table,
.dimension-toggle button,
.gallery-tabs button,
.algorithm-steps button,
.plot-guide button,
.dialog-controls button,
.dialog-controls a {
  font-size: var(--type-note);
  line-height: 1.6;
}

.dataset-ledger dt span,
.explorer-context strong {
  font-size: var(--type-body);
}

.metric-ribbon strong,
.diagnostic-grid strong,
.reduction-strip strong {
  font-size: var(--type-heading);
}

.article-breadcrumbs,
.hero-eyebrow,
.section-label,
.micro-label,
.article-facts dt,
.article-facts dd,
.hero-figure-head,
.toc-title,
.toc-list a span,
.reduction-strip > div > span,
.dataset-ledger dt small,
.dataset-ledger-meta,
.field label,
.dimension-toggle legend,
.explorer-context span,
.plot-guide p,
.plot-loading p,
.algorithm-steps button span,
.zoom-hint,
.table-wrap thead th,
.open-questions .future-heading > span,
.reference-list span,
.mobile-toc summary {
  font-size: var(--type-label);
}

.field select {
  font-size: 16px;
}

@media (max-width: 700px) {
  :root {
    --type-section: 32px;
    --type-heading: 24px;
    --type-body: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media print {
  :root {
    --paper: #fff;
    --ink: #2d2d32;
    --muted: #5f625d;
  }

  .site-header,
  .reading-progress,
  .desktop-toc,
  .mobile-toc,
  .explorer-toolbar,
  .explorer-context,
  .plot-wrap,
  .explorer-footer,
  .closing-actions,
  .site-footer {
    display: none !important;
  }

  .article-hero,
  .article-layout {
    width: 100%;
    display: block;
    padding: 28px 0;
  }

  .hero-figure {
    max-width: 620px;
    margin-top: 30px;
  }

  .article-section {
    break-inside: avoid;
    padding-top: 42px;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* Shared paper-link and citation presentation. */
:root{--type-small:14px;--accent-ink:var(--accent);--wash:var(--paper-soft,var(--paper))}
.citation-bibtex{max-width:100%;box-sizing:border-box;margin:26px 0 0;padding:24px;background:var(--wash,var(--paper-soft));border:1px solid var(--line);border-radius:3px;white-space:pre-wrap;overflow-wrap:anywhere;font:var(--type-small)/1.65 var(--mono);text-align:left}
.citation-bibtex code{font:inherit}
.citation-bibtex:focus-visible{outline:2px solid var(--accent-ink);outline-offset:4px}
@media(max-width:720px){.citation-bibtex{padding:18px}}

/* Citation link sits below the numbered contents. */
.toc-citation{display:block;margin:22px 0 0;padding:18px 0 0 50px;border:0;border-top:1px solid var(--line);border-radius:0;color:var(--muted);font:400 var(--type-small)/1.5 var(--serif);text-decoration:none}
.toc-citation:hover{color:var(--ink)}
.toc-citation:focus-visible{outline:2px solid var(--accent-ink);outline-offset:4px}
.mobile-toc .toc-citation{margin-left:0;padding-left:0}
.citation-section .citation-label{margin:28px 0 12px;font:600 var(--type-small)/1.5 var(--sans);letter-spacing:0}
.citation-section .citation-reference{max-width:none}
.citation-section .citation-bibtex{margin-top:0}

.hero-actions .text-link{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:47px;padding:11px 2px;border:1px solid transparent;border-bottom-color:var(--line);font-size:14px;font-weight:650;text-decoration:none}.hero-actions .text-link:hover{color:var(--accent);border-bottom-color:var(--accent)}
.wordmark .wordmark-mark{display:block;width:34px;height:34px;flex:none;background:none;border:0;border-radius:0;box-shadow:none;transform:none;color:#3f9877}html[data-theme="dark"] .wordmark .wordmark-mark{color:#b5a1ff}
