:root {
  --paper: #f7f6f1;
  --ink: #171816;
  --muted: #74746d;
  --line: #cfcec7;
  --sky: #80bdd9;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
}

.home {
  display: grid;
  grid-template-columns: minmax(16rem, 0.82fr) minmax(24rem, 1.18fr);
  gap: clamp(4rem, 10vw, 10rem);
  width: min(70rem, calc(100% - 3rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 8rem) 0;
  align-items: center;
}

.intro {
  align-self: center;
}

.portrait {
  display: block;
  width: min(100%, 18rem);
  height: auto;
  border-radius: 50%;
  background: var(--sky);
}

h1 {
  max-width: 12ch;
  margin: 2rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 4.5vw, 4.5rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.writing {
  width: 100%;
  max-width: 38rem;
}

.eyebrow {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.timeline {
  margin: 0;
  padding: 0 0 0 1.4rem;
  border-left: 1px solid var(--line);
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 0 0 2.75rem 1.5rem;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  position: absolute;
  top: 0.25rem;
  left: -1.69rem;
  width: 0.5rem;
  height: 0.5rem;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
  content: "";
}

.timeline time {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.timeline a {
  display: block;
  text-decoration: none;
}

.timeline h2 {
  display: inline;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.8vw, 2.1rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
  background-image: linear-gradient(var(--sky), var(--sky));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 0.18em;
  transition: background-size 180ms ease;
}

.timeline a:hover h2,
.timeline a:focus-visible h2 {
  background-size: 100% 0.18em;
}

.timeline a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 0.4rem;
}

.timeline p {
  max-width: 33rem;
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.post {
  width: min(42rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 0 8rem;
}

.back {
  display: inline-block;
  margin-bottom: clamp(4rem, 9vw, 7rem);
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.back:hover,
.back:focus-visible {
  color: var(--ink);
}

.post header {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.post time {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
}

.post h1 {
  max-width: none;
  margin-top: 1rem;
}

.post-body {
  padding-top: 2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.22rem);
  line-height: 1.8;
}

.post-body p {
  margin: 0 0 1.5em;
}

/* Long-form research note */

.post--wide {
  width: min(76rem, calc(100% - 3rem));
}

.essay-header {
  max-width: 61rem;
  padding-bottom: clamp(3rem, 6vw, 5rem) !important;
}

.essay-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.draft-badge,
.provisional-label {
  display: inline-block;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #9b543c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 0.4rem 0.55rem;
  text-transform: uppercase;
}

.essay-header h1 {
  max-width: 15ch;
  font-size: clamp(3rem, 7.5vw, 7rem);
  line-height: 0.92;
}

.dek {
  max-width: 42rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  line-height: 1.45;
}

.essay-body {
  padding-top: clamp(2rem, 5vw, 4rem);
}

.essay-section {
  margin-bottom: clamp(7rem, 14vw, 12rem);
  scroll-margin-top: 2rem;
}

.section-heading {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1.25rem;
  width: min(45rem, 100%);
  margin: 0 auto clamp(2.5rem, 6vw, 4rem);
  align-items: baseline;
}

.section-heading span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.prose {
  width: min(42rem, 100%);
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.24rem);
  line-height: 1.8;
}

.prose p {
  margin: 0 0 1.5em;
}

.prose--ending {
  margin-top: 3rem;
}

.pullquote {
  width: min(56rem, 100%);
  margin: clamp(3.5rem, 8vw, 6rem) 0 !important;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.evidence-card {
  margin: 0;
}

.evidence-card--wide {
  grid-column: 1 / -1;
}

.evidence-card img {
  display: block;
  width: 100%;
  height: clamp(15rem, 38vw, 31rem);
  border-radius: 0.25rem;
  filter: saturate(0.84) contrast(1.03);
  object-fit: cover;
}

.evidence-card:not(.evidence-card--wide) img {
  height: clamp(13rem, 28vw, 23rem);
}

.evidence-card figcaption,
.diagram-card figcaption,
.posterior-figure figcaption,
.temperature-card figcaption {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.evidence-card figcaption a {
  display: block;
  margin-top: 0.25rem;
  text-underline-offset: 0.2em;
}

.diagram-card,
.posterior-figure,
.temperature-card {
  width: min(64rem, 100%);
  margin: clamp(2.5rem, 6vw, 4.5rem) auto;
}

.diagram-card svg,
.temperature-card svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: #eeede7;
}

.diagram-card--dark svg {
  border-color: #30332f;
  background: #171916;
}

.diagram-card .panel-label,
.diagram-card .axis-label,
.diagram-card .step-label,
.diagram-card .comparison-title,
.diagram-card .comparison-note,
.diagram-card .shared-x-label,
.diagram-card .swarm-label {
  fill: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.diagram-card .panel-label,
.diagram-card .comparison-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.diagram-card .axis-label,
.diagram-card .step-label,
.diagram-card .comparison-note,
.diagram-card .shared-x-label {
  font-size: 14px;
}

.diagram-card .axis-label--vertical {
  transform: rotate(-90deg);
  transform-origin: 485px 230px;
}

.crystal-grid rect,
.crystal-grid path,
.domain-animation .grain-shell {
  fill: #d9e4e4;
  fill-opacity: 0.16;
  stroke: #9a9c96;
  stroke-width: 1.3;
}

.small-atoms circle {
  fill: #d1a847;
}

.atom circle {
  stroke: var(--paper);
  stroke-width: 2;
}

.atom text {
  fill: #fff;
  font-size: 15px;
  font-weight: 700;
  text-anchor: middle;
}

.atom-k circle {
  fill: #cba33f;
}

.atom-ar {
  animation: argon-escape 6s ease-in-out infinite;
  opacity: 0;
  transform-box: view-box;
  transform-origin: center;
}

.atom-ar circle {
  fill: #4e9fc2;
}

.atom-k {
  animation: potassium-decay 6s ease-in-out infinite;
}

.escape-path {
  fill: none;
  stroke: #80bdd9;
  stroke-dasharray: 4 8;
  stroke-width: 2;
}

.retention-chart .axis,
.heat-steps .axis,
.spike-comparison .axis {
  fill: none;
  stroke: #858780;
  stroke-width: 1.5;
}

.retention-curve {
  fill: none;
  stroke: #5c9975;
  stroke-width: 5;
}

.freezing-line {
  stroke: #80bdd9;
  stroke-dasharray: 6 6;
  stroke-width: 2;
}

.zero-label,
.cold-label {
  fill: var(--muted);
  font-size: 13px;
}

.curve-dot {
  offset-path: path("M555 90 C665 90 690 96 720 135 C760 190 770 310 895 335");
  animation: follow-retention 6s ease-in-out infinite;
  fill: #171816;
  offset-rotate: 0deg;
}

.domain circle:not(.gas) {
  fill: none;
  stroke-width: 4;
}

.domain--large circle:not(.gas) { stroke: #b3695f; }
.domain--medium circle:not(.gas) { stroke: #5c9975; }
.domain--small circle:not(.gas) { stroke: #609cb7; }

.domain .gas {
  animation: domain-empty 7s ease-in-out infinite;
  fill: #80bdd9;
  opacity: 0.65;
  transform-box: fill-box;
  transform-origin: center;
}

.domain--small .gas { animation-delay: 0s; }
.domain--medium .gas { animation-delay: 0.65s; }
.domain--large .gas { animation-delay: 1.3s; }

.step-line {
  fill: none;
  stroke: #d48b62;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.step-dot {
  animation: step-pulse 7s ease-in-out infinite;
  fill: #171816;
  stroke: #80bdd9;
  stroke-width: 4;
}

.step-dot--two { animation-delay: 0.65s; }
.step-dot--three { animation-delay: 1.3s; }

.spike-comparison .axis {
  stroke: #747872;
}

.spike-comparison .comparison-title,
.spike-comparison .shared-x-label,
.spike-comparison .comparison-note {
  fill: #b8bbb4;
  text-anchor: middle;
}

.spike {
  animation: spike-breathe 4s ease-in-out infinite alternate;
  stroke: #e17a5f;
  stroke-width: 7;
}

.spike--two {
  animation-delay: 0.4s;
}

.spike-cap {
  fill: #f0b27f;
}

.posterior-fill {
  fill: #80bdd9;
  fill-opacity: 0.2;
}

.posterior-line {
  animation: draw-posterior 5s ease-in-out infinite;
  fill: none;
  stroke: #80bdd9;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  stroke-width: 5;
}

.inference-pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0.7rem;
  width: min(68rem, 100%);
  margin: 3.5rem auto;
  align-items: center;
}

.inference-pipeline div {
  min-height: 7rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: #eeede7;
}

.inference-pipeline small,
.inference-pipeline strong {
  display: block;
}

.inference-pipeline small {
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
}

.inference-pipeline strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.25;
}

.inference-pipeline > span {
  color: var(--muted);
}

.inference-pipeline .pipeline-result {
  border-color: #80bdd9;
  background: #dcecf1;
}

.chain-trace {
  fill: none;
  opacity: 0.38;
  stroke-dasharray: 5 8;
  stroke-width: 2;
}

.chain-trace--a { stroke: #80bdd9; }
.chain-trace--b { stroke: #f0b27f; }
.chain-trace--c { stroke: #8fc098; }
.walker--a { fill: #80bdd9; }
.walker--b { fill: #f0b27f; }
.walker--c { fill: #8fc098; }

.swarm-label {
  fill: #c1c4bd !important;
  font-size: 16px;
  text-anchor: middle;
}

.posterior-figure {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: #fff;
}

.posterior-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.repo-note {
  display: flex;
  gap: 1rem 1.5rem;
  width: min(42rem, 100%);
  margin: 3rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  align-items: baseline;
  flex-wrap: wrap;
}

.repo-note span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.repo-note a {
  font-size: 0.85rem;
  text-underline-offset: 0.2em;
}

.temperature-card {
  position: relative;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: #eeede7;
}

.temperature-card svg {
  border: 0;
  background: transparent;
}

.provisional-label {
  position: absolute;
  z-index: 1;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--paper);
}

.plot-title {
  fill: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
}

.plot-subtitle,
.zero-text,
.cold-word,
.warm-word,
.ci-label,
.sw-label {
  fill: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.plot-subtitle,
.ci-label,
.sw-label { font-size: 14px; }
.zero-text,
.cold-word,
.warm-word { font-size: 13px; }
.zero-text { text-anchor: middle; fill: #347d9e; font-weight: 700; }
.warm-word { text-anchor: end; }

.plot-axis,
.plot-tick {
  stroke: #888a84;
  stroke-width: 2;
}

.zero-rule {
  stroke: #609cb7;
  stroke-dasharray: 6 7;
  stroke-width: 3;
}

.ci-line {
  stroke: #347d9e;
  stroke-linecap: round;
  stroke-width: 12;
}

.ci-end {
  fill: var(--paper);
  stroke: #347d9e;
  stroke-width: 4;
}

.ci-median {
  fill: #171816;
  stroke: #eeede7;
  stroke-width: 4;
}

.ci-pointer {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
}

.sw-marker {
  fill: #b95f4a;
}

.essay-footer {
  width: min(42rem, 100%);
  margin: 0 auto;
  padding: 2rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
}

.essay-footer a {
  text-underline-offset: 0.2em;
}

@keyframes potassium-decay {
  0%, 27% { opacity: 1; }
  34%, 94% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes argon-escape {
  0%, 26% { opacity: 0; transform: translate(0, 0); }
  34%, 54% { opacity: 1; transform: translate(0, 0); }
  78% { opacity: 1; transform: translate(280px, -116px); }
  90%, 100% { opacity: 0; transform: translate(280px, -116px); }
}

@keyframes follow-retention {
  0%, 8% { offset-distance: 0%; }
  82%, 100% { offset-distance: 100%; }
}

@keyframes domain-empty {
  0%, 15% { opacity: 0.65; transform: scale(1); }
  50%, 82% { opacity: 0.04; transform: scale(0.2); }
  100% { opacity: 0.65; transform: scale(1); }
}

@keyframes step-pulse {
  0%, 16%, 55%, 100% { opacity: 0.25; transform: scale(1); }
  28% { opacity: 1; transform: scale(1.65); }
}

@keyframes spike-breathe {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

@keyframes draw-posterior {
  0%, 8% { stroke-dashoffset: 900; }
  55%, 100% { stroke-dashoffset: 0; }
}

/* Plain research note */

.essay--plain > h1 {
  max-width: 18ch;
  margin: 0.8rem 0 1.25rem;
  font-size: clamp(2.15rem, 5.5vw, 4.8rem);
  line-height: 0.98;
}

.essay-date {
  display: block;
}

.essay-intro {
  max-width: 38rem;
  margin: 0 0 clamp(2.5rem, 6vw, 4.5rem);
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.98rem;
  line-height: 1.65;
}

.essay-opening {
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.essay-copy {
  width: min(39rem, 100%);
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.92rem, 1.4vw, 1rem);
  line-height: 1.72;
}

.essay-copy p {
  margin: 0 0 1.4em;
}

.essay-copy a,
.essay-media a {
  text-underline-offset: 0.18em;
}

.essay-copy--ending {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.essay-media {
  width: min(58rem, 100%);
  margin: clamp(2.5rem, 6vw, 4.5rem) auto;
}

.essay-media--video {
  width: min(42rem, 100%);
}

.essay-media--result {
  width: min(48rem, 100%);
}

.video-shell {
  position: relative;
  contain: layout paint;
  isolation: isolate;
  overflow: hidden;
  line-height: 0;
}

.video-shell video,
.essay-media img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #30332f;
  border-radius: 0.25rem;
  background: #151628;
}

.video-shell > vsc-controller {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

.essay-media--light img {
  border-color: var(--line);
  background: #fff;
}

.essay-media figcaption,
.essay-opening figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.essay-opening figcaption a {
  display: inline;
  margin: 0;
}

::selection {
  color: var(--ink);
  background: var(--sky);
}

@media (max-width: 760px) {
  .home {
    grid-template-columns: 1fr;
    gap: 5.5rem;
    width: min(34rem, calc(100% - 2.5rem));
    padding: 3.5rem 0 5rem;
    align-items: start;
  }

  .portrait {
    width: 10.5rem;
  }

  h1 {
    max-width: 11ch;
    margin-top: 1.5rem;
  }

  .timeline {
    padding-left: 0.8rem;
  }

  .timeline li {
    padding-left: 1.3rem;
  }

  .timeline li::before {
    left: -1.09rem;
  }

  .post--wide {
    width: min(100% - 2rem, 76rem);
  }

  .essay-header h1 {
    font-size: clamp(2.8rem, 14vw, 4.8rem);
  }

  .evidence-grid {
    grid-template-columns: 1fr;
  }

  .evidence-card--wide {
    grid-column: auto;
  }

  .evidence-card img,
  .evidence-card:not(.evidence-card--wide) img {
    height: auto;
    max-height: 25rem;
  }

  .inference-pipeline {
    grid-template-columns: 1fr;
  }

  .inference-pipeline > span {
    text-align: center;
    transform: rotate(90deg);
  }

  .inference-pipeline div {
    min-height: 0;
  }

  .provisional-label {
    position: static;
    margin-bottom: 0.5rem;
  }

  .posterior-figure {
    overflow-x: auto;
  }

  .posterior-figure img {
    width: 62rem;
    max-width: none;
  }
}

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

/* Compact two-column research note */

.post--wide {
  width: min(68rem, calc(100% - 3rem));
  padding-top: clamp(1rem, 2vw, 1.75rem);
  padding-bottom: 5rem;
}

.post--wide .back {
  margin-bottom: 1.25rem;
}

.essay--compact > h1 {
  max-width: 24ch;
  margin: 0.45rem 0 1rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.98;
}

.essay--compact .essay-copy {
  font-size: clamp(0.9rem, 1.2vw, 0.98rem);
  line-height: 1.67;
}

.essay--compact .essay-copy--opening {
  width: min(48rem, 100%);
  margin: 0 0 1.35rem;
}

.essay--compact .essay-opening {
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.essay--compact .essay-opening .evidence-card--wide {
  grid-column: auto;
}

.essay--compact .essay-opening img,
.essay--compact .essay-opening .evidence-card:not(.evidence-card--wide) img {
  width: 100%;
  height: clamp(10rem, 18vw, 14rem);
  object-fit: cover;
}

.essay-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  width: min(62rem, 100%);
  margin: clamp(2rem, 4vw, 3.25rem) auto;
  align-items: center;
}

.essay-row-copy {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.9rem, 1.2vw, 0.98rem);
  line-height: 1.67;
}

.essay-row-copy p {
  margin: 0 0 1em;
}

.equation {
  display: block;
  margin: 1rem 0 1.1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: "STIX Two Text", "Cambria Math", Georgia, serif;
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
  line-height: 1.55;
}

.equation > span {
  display: block;
}

.essay-inline-media {
  min-width: 0;
  margin: 0;
}

.essay-inline-media video,
.essay-inline-media img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #30332f;
  border-radius: 0.25rem;
  background: #151628;
}

.essay-inline-media--light img {
  border-color: var(--line);
  background: #fff;
}

.essay-inline-media figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.45;
}

.essay-inline-media figcaption a {
  text-underline-offset: 0.18em;
}

.essay-row--result {
  align-items: start;
}

.essay--compact .essay-copy--ending {
  width: min(62rem, 100%);
  margin-top: 2rem;
  padding-top: 1.25rem;
}

@media (max-width: 760px) {
  .post--wide {
    width: min(100% - 2rem, 68rem);
    padding-top: 1rem;
  }

  .post--wide .back {
    margin-bottom: 1rem;
  }

  .essay--compact > h1 {
    max-width: 16ch;
    font-size: clamp(2rem, 10.5vw, 2.8rem);
  }

  .essay--compact .essay-opening {
    grid-template-columns: 1fr 1fr;
  }

  .essay--compact .essay-opening .evidence-card--wide {
    grid-column: 1 / -1;
  }

  .essay--compact .essay-opening img,
  .essay--compact .essay-opening .evidence-card:not(.evidence-card--wide) img {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .essay-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 2.25rem auto;
  }

  .essay-inline-media {
    width: min(28rem, 100%);
  }
}

/* Structured research note */

.essay--structured > h1 {
  max-width: none;
  font-size: clamp(1.8rem, 3.4vw, 3.05rem);
}

.title-break {
  display: block;
}

@media (min-width: 761px) {
  .essay--structured > h1 {
    white-space: nowrap;
  }
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 5vw, 4rem);
  width: min(62rem, 100%);
  margin-right: auto;
  margin-left: auto;
  align-items: start;
}

.intro-sequence {
  margin-top: 2rem;
}

.intro-row {
  margin-bottom: clamp(3.5rem, 8vw, 6rem);
}

.intro-row:last-child {
  margin-bottom: 0;
}

.intro-media {
  display: grid;
  gap: 1rem;
  width: 82%;
  min-width: 0;
}

.article-toc {
  margin-top: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.92rem;
  line-height: 1.5;
}

.toc-label {
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.article-toc > ol > li + li {
  margin-top: 0.75rem;
}

.article-toc ol ol {
  margin-top: 0.35rem;
  color: var(--muted);
}

.article-toc a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.pebble-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.pebble-pair figure,
.canyon-figure,
.degraded-crater-figure,
.shuster-figure {
  min-width: 0;
  margin: 0;
}

.pebble-pair img,
.canyon-figure img,
.degraded-crater-figure img,
.shuster-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.25rem;
  object-fit: cover;
}

.shuster-figure {
  width: 82%;
}

.pebble-pair img {
  height: auto;
  aspect-ratio: 1 / 1;
}

.degraded-crater-figure img {
  aspect-ratio: 16 / 10;
  object-position: center top;
}

.shuster-figure img {
  border: 1px solid var(--line);
  background: #fff;
  object-fit: contain;
}

.canyon-figure img {
  background: #000;
}

.sketch-placeholders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.sketch-placeholders div {
  display: grid;
  min-height: 8.5rem;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 0.25rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.62rem;
  text-align: center;
}

.pebble-pair figcaption,
.canyon-figure figcaption,
.degraded-crater-figure figcaption,
.shuster-figure figcaption,
.section-media figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.45;
}

.pebble-pair figcaption a,
.canyon-figure figcaption a,
.degraded-crater-figure figcaption a,
.shuster-figure figcaption a,
.section-media figcaption a {
  text-underline-offset: 0.16em;
}

.article-copy {
  min-width: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.35vw, 1.1rem);
  line-height: 1.72;
}

.article-copy p {
  margin: 0 0 1em;
}

.article-copy ul,
.article-copy ol {
  margin: 0.15rem 0 1.15rem;
  padding-left: 1.25rem;
}

.article-copy li + li {
  margin-top: 0.65rem;
}

.notation-table {
  width: 100%;
  margin: 0.85rem 0 1.15rem;
  border-collapse: collapse;
  font-size: 0.9em;
  line-height: 1.45;
}

.notation-table th,
.notation-table td {
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.notation-table tr:last-child th,
.notation-table tr:last-child td {
  border-bottom: 1px solid var(--line);
}

.notation-table th {
  width: 5.5rem;
  padding-right: 1rem;
  font-weight: 400;
}

.derivation {
  margin: 1.1rem 0 1.25rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.derivation summary {
  padding: 0.75rem 0;
  color: var(--muted);
  cursor: pointer;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.025em;
}

.derivation-body {
  padding: 0.2rem 0 0.55rem;
  font-size: 0.94em;
}

.derivation-body p {
  margin-bottom: 0.7rem;
}

.derivation-body .equation {
  margin: 0.65rem 0 0.9rem;
  font-size: 0.96rem;
}

.intro-row .article-copy p:last-child {
  margin-bottom: 0;
}

.major-section {
  margin-top: clamp(4.5rem, 9vw, 7rem);
  scroll-margin-top: 2rem;
}

.major-heading h2 {
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 3.2vw, 2.7rem);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.subsection {
  margin-bottom: clamp(3.5rem, 7vw, 5.5rem);
  scroll-margin-top: 2rem;
}

.article-copy h3 {
  margin: 0 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.section-media,
.section-media-stack {
  min-width: 0;
  margin: 0;
}

.section-media-stack {
  display: grid;
  gap: 1.25rem;
}

.section-media video,
.section-media img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #30332f;
  border-radius: 0.25rem;
  background: #151628;
}

.section-media--light img {
  border-color: var(--line);
  background: #fff;
}

.section-media--light {
  width: 82%;
}

.section-media--diagram img {
  border-color: var(--line);
  background: #f7f5ef;
}

.essay--structured .equation {
  margin: 1.5rem 0 1.6rem;
  padding: 0;
  border: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
}

.essay--structured .equation--wide {
  font-size: clamp(0.9rem, 1.2vw, 1.02rem);
}

.essay--structured .equation--nowrap {
  font-size: clamp(0.78rem, 1.05vw, 0.92rem);
  white-space: nowrap;
}

.essay--structured .katex-display {
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.1rem 0;
}

@media (max-width: 760px) {
  .essay--structured > h1 {
    max-width: 16ch;
    font-size: clamp(2rem, 10.5vw, 2.8rem);
  }

  .title-break {
    display: none;
  }

  .article-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .intro-sequence {
    margin-top: 1.5rem;
  }

  .intro-row {
    gap: 1.15rem;
    margin-bottom: 3.75rem;
  }

  .intro-row:last-child {
    margin-bottom: 0;
  }

  .intro-media,
  .shuster-figure,
  .section-media--light {
    width: 88%;
  }

  .major-section {
    margin-top: 4.5rem;
  }

  .major-heading {
    gap: 0;
  }

  .major-heading > div {
    display: none;
  }

  .major-heading h2 {
    margin-bottom: 2rem;
  }

  .subsection {
    gap: 1.25rem;
    margin-bottom: 3.5rem;
  }
}

/* Math-heavy research note */

.essay--note .essay-body {
  padding-top: clamp(1.5rem, 4vw, 3rem);
}

.essay--note .essay-section {
  margin-bottom: clamp(4rem, 8vw, 7rem);
}

.essay--note .section-heading {
  width: min(44rem, 100%);
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.essay--note .section-heading h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.04;
}

.essay--note .prose {
  width: min(44rem, 100%);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.75;
}

.essay--note .prose p {
  margin: 0 0 1.25em;
}

.essay--note .prose h3 {
  margin: 2.25rem 0 0.9rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 1.9vw, 1.35rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.essay--note .prose ul {
  margin: 0.15rem 0 1.25rem;
  padding-left: 1.45rem;
}

.essay--note .prose li + li {
  margin-top: 0.5rem;
}

.essay--note .prose .equation {
  margin: 1.1rem 0 1.2rem;
}

.essay--note .katex-display {
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.2rem 0;
}

.essay--note .notation-table th {
  width: 7.5rem;
}

/* TEMPORARY draft marker. Everything tagged .slop is prose awaiting a rewrite;
   delete the class from an element once that part has been corrected, and
   delete this block once none remain. */
.slop,
.slop p,
.slop li,
.slop h2,
.slop h3,
.slop th,
.slop td,
.slop summary,
.slop figcaption,
.slop .katex,
.slop .equation {
  color: #c02f1d;
}

.slop .article-copy,
.slop .major-heading h2 {
  border-left: 3px solid #c02f1d;
  padding-left: 1rem;
}

p.slop {
  border-left: 3px solid #c02f1d;
  padding-left: 1rem;
}

.slop .section-media img,
.slop .section-media video {
  border-color: #c02f1d;
}

.section-media-stack .section-media--light {
  width: 100%;
}

.sketch-placeholders--three {
  grid-template-columns: repeat(3, 1fr);
}

.sketch-placeholders--three div {
  min-height: 6.5rem;
}

.todo {
  color: var(--muted);
}

.todo::before {
  content: "[";
}

.todo::after {
  content: "]";
}
