:root {
  color-scheme: light;
  --bg: #f8f7f3;
  --paper: #fffdf8;
  --ink: #202124;
  --muted: #62615c;
  --faint: #dedbd2;
  --line: #cfcac0;
  --accent: #355070;
  --accent-soft: #e9eef6;
  --measure: 760px;
  --wide: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.58;
}

a {
  color: #174f7d;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.14em;
}

a:hover {
  color: #0a3657;
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
}

.site-header__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.site-mark {
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 0.8rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

.home {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 3.4rem 1.2rem 5rem;
}

.home-title {
  max-width: var(--wide);
  margin: 0 0 1rem;
  font-size: clamp(1.65rem, 4.15vw, 3.25rem);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}

.home-intro {
  max-width: 720px;
  margin: 0 0 2.5rem;
  color: #3f3d38;
  font-size: 1.08rem;
}

.contents-heading {
  margin: 2.2rem 0 0.8rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-list {
  max-width: 820px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-card {
  border-top: 1px solid var(--line);
  padding: 0.95rem 0 1.1rem;
}

.section-card--disabled {
  opacity: 0.48;
}

.section-card--disabled details {
  color: var(--muted);
}

.section-card a,
.section-card span {
  display: inline-block;
  color: var(--ink);
  font-size: 1.05rem;
  text-decoration: none;
}

.section-card a:hover {
  text-decoration: underline;
}

.new-splatter {
  margin-left: 0.45rem;
  padding: 0.16rem 0.34rem 0.14rem;
  transform: rotate(-8deg);
  background: #b7352d;
  color: #fffdf8 !important;
  border: 2px solid #fff1a8;
  border-radius: 55% 44% 58% 42%;
  box-shadow: 0 1px 0 #711f1a;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.62rem !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.section-card p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  line-height: 1.42;
}

.status {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.article-layout {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.4rem 1.2rem 5rem;
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(210px, 1fr);
  gap: 3.2rem;
}

.article {
  min-width: 0;
}

.article h1,
.article h2,
.article h3,
.article h4 {
  line-height: 1.18;
  letter-spacing: 0;
}

.article h1 {
  margin: 0 0 1.3rem;
  font-size: 2.45rem;
  font-weight: 500;
}

.article h2 {
  margin: 3.2rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 1.7rem;
  font-weight: 500;
}

.article h3 {
  margin: 2.2rem 0 0.8rem;
  font-size: 1.28rem;
  font-weight: 600;
}

.article h4 {
  margin: 1.8rem 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 650;
}

.article p {
  margin: 0 0 1.05rem;
}

.article ol,
.article ul {
  margin: 0 0 1.1rem 1.35rem;
  padding: 0;
}

.article li {
  margin: 0.2rem 0;
}

.footnote-ref {
  font-size: 0.75em;
  line-height: 0;
  scroll-margin-top: 1rem;
}

.footnotes {
  margin: 2rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.88em;
}

.article .footnotes li {
  margin-bottom: 0.8rem;
  scroll-margin-top: 1rem;
}

.article .footnotes p {
  margin-bottom: 0.55rem;
}

.footnote-backref {
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0 1.35rem;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.84rem;
  line-height: 1.42;
}

.article th,
.article td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--faint);
  text-align: left;
  vertical-align: top;
}

.article th {
  border-bottom-color: var(--line);
  color: #3f3d38;
  font-weight: 650;
}

.article code {
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 0.86em;
  background: #efede6;
  border-radius: 4px;
  padding: 0.06rem 0.22rem;
}

.article pre {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  padding: 0.8rem 0.95rem;
  background: #f0eee8;
  border: 1px solid var(--faint);
  border-radius: 6px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.article pre code {
  padding: 0;
  background: transparent;
}

.math-block {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  padding: 0.2rem 0;
}

.media-figure {
  margin: 1.6rem 0 1.8rem;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.75rem;
}

.media-figure img,
.media-figure video {
  display: block;
  width: 100%;
  height: auto;
  background: white;
}

.media-figure--lm-possible-spacetime-paths {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.media-figure figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  line-height: 1.35;
}

.media-actions {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.76rem;
}

.media-actions a,
.media-actions button {
  border: 1px solid var(--line);
  background: #f7f5ee;
  color: var(--ink);
  border-radius: 4px;
  padding: 0.32rem 0.5rem;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.media-actions a:hover,
.media-actions button:hover {
  border-color: #a9a293;
}

.manuscript-sidebar {
  margin: 1.7rem 0 1.9rem;
  padding: 0.95rem 1rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
}

.manuscript-sidebar::before {
  content: "Sidebar";
  display: block;
  margin-bottom: 0.55rem;
  color: var(--accent);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.manuscript-sidebar h4 {
  margin-top: 0;
}

.manuscript-sidebar .media-figure {
  background: #fffdf8;
}

.manuscript-details {
  margin: 1.4rem 0 1.6rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
  color: #3f3d38;
}

.manuscript-details summary {
  cursor: pointer;
  color: var(--accent);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 650;
}

.manuscript-details__body {
  margin-top: 0.85rem;
}

.manuscript-details__body > :last-child {
  margin-bottom: 0;
}

.article .chapter-toc {
  margin: 1.6rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  line-height: 1.4;
}

.chapter-toc__title {
  font-weight: 600;
}

.article .chapter-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.chapter-toc > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}

.chapter-toc > ul > li > a {
  font-weight: 600;
}

.article .chapter-toc li ul {
  margin-top: 0.4rem;
  padding-left: 0.85rem;
}

.chapter-toc a {
  color: var(--accent);
  text-decoration: none;
}

.chapter-toc a:hover,
.chapter-toc a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .chapter-toc > ul {
    grid-template-columns: 1fr;
  }
}

.page-toc {
  position: sticky;
  top: 1.2rem;
  align-self: start;
  padding-left: 1rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  line-height: 1.35;
}

.page-toc strong {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--ink);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-toc a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin: 0 0 0.35rem;
}

.page-toc a.depth-3 {
  padding-left: 0.8rem;
}

.page-toc a.depth-4 {
  padding-left: 1.6rem;
  font-size: 0.72rem;
}

.page-toc a:hover {
  color: var(--ink);
}

.site-footer {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.4rem 1.2rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.76rem;
}

.site-footer a {
  display: inline-block;
  margin-left: 0.5rem;
}

/* Evidence pages stay outside the manuscript's reading flow. */
.article-layout.review-layout {
  display: block;
}

.review-location {
  color: var(--muted);
  font: 0.78rem system-ui, sans-serif;
}

.animation-review code {
  overflow-wrap: anywhere;
}

.review-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  margin: 1.2rem 0;
  font: 0.85rem system-ui, sans-serif;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 1.2rem;
  list-style: none;
  padding: 0;
}

.review-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.article .review-card h2 {
  font-size: 1.2rem;
  margin: 0 0 0.7rem;
  padding: 0;
  border: 0;
}

.review-card > p:last-child {
  font: 0.78rem system-ui, sans-serif;
  color: var(--muted);
}

.review-card img,
.review-frame img,
.review-contact-sheet img {
  display: block;
  max-width: 100%;
  height: auto;
}

.review-context {
  border-left: 2px solid var(--line);
  padding-left: 1rem;
}

.review-hash,
.review-facts,
.review-source-list {
  overflow-wrap: anywhere;
}

.review-hash {
  font: 0.72rem ui-monospace, monospace;
}

.review-facts dt {
  font-weight: 600;
}

.review-facts dd {
  margin: 0 0 0.7rem;
}

.review-frames {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.review-frame,
.review-contact-sheet {
  margin: 0.8rem 0;
}

.review-frame figcaption,
.review-contact-sheet figcaption {
  font: 0.78rem system-ui, sans-serif;
  color: var(--muted);
  margin-top: 0.4rem;
}

@media (max-width: 650px) {
  .review-frames { grid-template-columns: 1fr; }
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(20, 20, 18, 0.86);
  z-index: 40;
}

.lightbox[aria-hidden="false"] {
  display: flex;
}

.lightbox__inner {
  position: relative;
  max-width: min(1200px, 96vw);
  max-height: 92vh;
}

.lightbox img,
.lightbox video {
  max-width: 100%;
  max-height: 88vh;
  background: white;
}

.lightbox__close {
  position: absolute;
  top: -2.2rem;
  right: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  color: white;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (max-width: 900px) {
  html {
    font-size: 17px;
  }

  .site-header__inner,
  .site-nav {
    flex-wrap: wrap;
  }

  .article-layout {
    display: block;
  }

  .page-toc {
    position: static;
    margin: 0 0 2rem;
    padding: 0.9rem 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .article h1 {
    font-size: 2rem;
  }

  .home-title {
    font-size: clamp(1.65rem, 4.15vw, 2.2rem);
  }
}
