:root {
  color-scheme: light;
  --paper: #e6e8eb;
  --paper-deep: #d7dbe0;
  --ink: #111318;
  --muted: #515963;
  --line: #c2c8d0;
  --rust: #b75f43;
  --gold: #c2a15a;
  --blue: #708b91;
  --white: #f0f1f3;
  --mono: "JetBrains Mono", Consolas, monospace;
  --sans: Inter, "Segoe UI", sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }

.topbar {
  min-height: 76px;
  padding: 0 clamp(22px, 6vw, 88px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper-deep);
  color: var(--ink);
}
.brand { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; font-size: 11px; font-weight: 600; letter-spacing: .14em; }
.brand__mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #8e9289; border-radius: 50%; color: #d4a080; font-family: Georgia, serif; font-size: 18px; letter-spacing: 0; }
.topbar__link { color: var(--ink); font-size: 13px; text-decoration: none; }
.topbar__link span { margin-left: 8px; color: #d4a080; }
.home-hero { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(400px, 1.1fr); align-items: center; gap: 5vw; max-width: 1440px; min-height: 640px; margin: auto; padding: 82px clamp(24px, 8vw, 120px) 104px; overflow: hidden; }
.home-hero__copy { position: relative; z-index: 1; max-width: 530px; }
.eyebrow, .figure-label, .hero-index, .section-number, .feature-meta, .card-top, .feature-art > span, .site-footer > span { font-family: var(--mono); font-size: 10px; letter-spacing: .13em; }
.eyebrow { color: var(--rust); }
.eyebrow i { display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--rust); }
.home-hero h1 { margin: 27px 0 10px; font-size: clamp(56px, 8vw, 102px); line-height: .96; letter-spacing: -.075em; font-weight: 500; }
.title-period { color: var(--rust); }
.hero-subtitle { max-width: 430px; margin: 18px 0 0; font-family: Georgia, serif; font-size: clamp(20px, 2.2vw, 27px); line-height: 1.35; }
.hero-intro { max-width: 420px; margin: 20px 0 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 25px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 22px; min-height: 49px; padding: 0 20px; font-size: 13px; text-decoration: none; }
.button--primary { background: var(--rust); color: #fff; }
.button--primary span { color: #fff; font-size: 18px; }
.text-link, .feature-link { font-size: 13px; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.text-link span { margin-left: 8px; color: var(--rust); }
.home-hero__art { position: relative; color: #8c938b; min-width: 0; }
.home-orbit { width: 100%; max-height: 440px; overflow: visible; }
.orbit-labels { fill: currentColor; stroke: none; font: 9px var(--mono); letter-spacing: 1px; }
.figure-label { display: block; margin: -4px 0 0 10%; color: var(--muted); }
.hero-index { position: absolute; right: clamp(24px, 8vw, 120px); bottom: 32px; left: clamp(24px, 8vw, 120px); display: flex; justify-content: space-between; gap: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); }
.home-section { max-width: 1250px; margin: 0 auto; padding: 84px clamp(24px, 7vw, 90px); }
.section-heading { display: grid; grid-template-columns: 35px minmax(220px, 1fr) minmax(220px, .75fr); align-items: start; gap: 22px; margin-bottom: 34px; }
.section-number { color: var(--rust); padding-top: 6px; }
.section-heading .eyebrow { margin: 0 0 10px; }
.section-heading h2 { margin: 0; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.15; font-weight: 500; letter-spacing: -.045em; }
.section-aside { max-width: 330px; margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.feature-card { display: grid; grid-template-columns: 1fr 1fr; min-height: 340px; background: var(--paper-deep); }
.feature-art { position: relative; display: grid; place-items: center; min-height: 320px; overflow: hidden; color: #8b9189; background: var(--paper); }
.feature-art > span { position: absolute; bottom: 19px; left: 22px; color: var(--muted); }
.feature-rings { position: relative; width: 225px; height: 225px; border: 1px solid #9fa398; border-radius: 50%; }
.feature-rings i { position: absolute; inset: 25px; border: 1px solid #aeb2a9; border-radius: 50%; }
.feature-rings i:nth-child(2) { inset: 60px; }
.feature-rings i:nth-child(3) { inset: -5px 47px; transform: rotate(38deg); }
.feature-rings b { position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--rust); }
.feature-copy { padding: clamp(30px, 5vw, 60px); }
.feature-meta { display: flex; flex-wrap: wrap; gap: 15px; color: var(--rust); }
.feature-copy h3 { margin: 30px 0 15px; font-family: Georgia, serif; font-weight: 400; font-size: clamp(28px, 4vw, 43px); line-height: 1.15; }
.feature-copy p, .volume-card p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.feature-link { display: inline-flex; gap: 12px; margin-top: 15px; }
.feature-link span { color: var(--rust); }
.volumes { padding-top: 25px; }
.volume-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.volume-card { min-height: 245px; padding: 24px; border: 1px solid var(--line); text-decoration: none; transition: background .2s, transform .2s; }
.volume-card:hover { background: var(--white); transform: translateY(-3px); }
.card-top { display: flex; justify-content: space-between; color: var(--rust); }
.card-top span:first-child { color: var(--ink); font-size: 19px; }
.volume-card h3 { margin: 35px 0 10px; font-family: Georgia, serif; font-size: 24px; font-weight: 400; }
.card-link { display: inline-block; margin-top: 14px; font-size: 12px; }
.reading-note { padding: 76px 24px 84px; text-align: center; background: var(--paper-deep); }
.reading-note .eyebrow { margin: 0; }
.reading-note blockquote { max-width: 780px; margin: 22px auto 15px; font-family: Georgia, serif; font-size: clamp(25px, 4vw, 42px); line-height: 1.25; }
.reading-note > p:not(.eyebrow) { margin: 0 auto 25px; color: var(--muted); font-size: 13px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px clamp(22px, 6vw, 88px); background: var(--paper-deep); color: var(--ink); }
.site-footer > span { color: #a4a79e; }
.site-footer > a:last-child { color: var(--ink); font-size: 12px; text-decoration: none; }

.reader-page { background: var(--paper); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.reading-progress { position: fixed; z-index: 5; top: 0; left: 0; width: 100%; height: 3px; background: transparent; }
.reading-progress span { display: block; width: 0; height: 100%; background: var(--rust); }
.reader-header { min-height: 62px; }
.reader-header__links { display: flex; gap: 22px; align-items: center; }
.reader-header__links a { color: var(--ink); font-size: 12px; text-decoration: none; }
.reader-intro { max-width: 1040px; margin: auto; padding: 54px 28px 32px; border-bottom: 1px solid var(--line); }
.reader-intro .eyebrow { margin: 0 0 15px; }
.reader-intro h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(38px, 6vw, 64px); font-weight: 400; letter-spacing: -.045em; }
.reader-intro p:last-child { margin: 12px 0 0; color: var(--muted); font-family: Georgia, serif; font-size: 20px; }
.reader-layout { display: grid; grid-template-columns: minmax(190px, 245px) minmax(0, 760px); gap: clamp(30px, 5vw, 75px); max-width: 1220px; margin: 0 auto; padding: 34px 28px 110px; align-items: start; }
.reader-toc { position: sticky; top: 18px; max-height: calc(100vh - 36px); overflow: auto; padding: 16px 14px 18px 0; border-right: 1px solid var(--line); scrollbar-color: #b9b4a9 transparent; scrollbar-width: thin; }
.reader-toc h2 { margin: 0 0 14px; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.toc-search { width: calc(100% - 14px); margin-bottom: 12px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 0; background: var(--white); color: var(--ink); font: 12px var(--sans); }
.reader-toc ul { margin: 0; padding: 0; list-style: none; }
.reader-toc li { margin: 0; }
.reader-toc li[data-depth="1"] { padding-left: 12px; }
.reader-toc li[data-depth="2"] { padding-left: 24px; }
.reader-toc li a { display: block; padding: 5px 10px 5px 0; color: var(--muted); font-size: 11px; line-height: 1.45; text-decoration: none; }
.reader-toc li.toc-volume { margin-top: 15px; padding-top: 10px; border-top: 1px solid var(--line); }
.reader-toc li.toc-intro + li.toc-volume { margin-top: 12px; }
.reader-toc li.toc-volume a { color: var(--ink); font-family: var(--mono); font-size: 10px; letter-spacing: .04em; }
.reader-toc li.toc-volume a span { color: var(--rust); }
.reader-toc li.toc-interlude a { color: var(--muted); font-style: italic; }
.reader-toc li.toc-sources { margin-top: 15px; padding-top: 10px; border-top: 1px solid var(--line); }
.reader-toc li.toc-sources a { color: var(--ink); font-weight: 600; }
.reader-toc li a:hover, .reader-toc li a:focus-visible { color: var(--rust); }
.reader-article { min-width: 0; font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.82; overflow-wrap: anywhere; }
.reader-article p { margin: 0 0 1.2em; }
.reader-article h1, .reader-article h2, .reader-article h3, .reader-article h4 { color: var(--ink); line-height: 1.25; scroll-margin-top: 24px; }
.reader-article h1 { margin: 2.6em 0 .8em; padding-top: .6em; border-top: 1px solid var(--line); font-family: var(--sans); font-size: clamp(26px, 3.5vw, 36px); font-weight: 500; letter-spacing: -.045em; }
.reader-article h2 { margin: 2em 0 .65em; font-family: var(--sans); font-size: clamp(21px, 2.8vw, 27px); font-weight: 500; letter-spacing: -.035em; }
.reader-article h3, .reader-article h4 { margin: 1.7em 0 .55em; font-family: var(--sans); font-size: 19px; font-weight: 600; }
.reader-article a { color: #8f4b35; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.reader-article ul, .reader-article ol { margin: 0 0 1.35em; padding-left: 1.6em; }
.reader-article li { margin: .25em 0; padding-left: .2em; }
.reader-article blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--rust); color: #555950; }
.reader-article img { display: block; max-width: 100% !important; height: auto !important; margin: 1.8em auto; object-fit: contain; }
.reader-article table { display: block; max-width: 100%; margin: 1.6em 0; overflow-x: auto; border-collapse: collapse; font-size: .85em; line-height: 1.5; }
.reader-article td, .reader-article th { padding: .65em .8em; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.reader-article hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--line); }
.reader-article .katex { font-size: 1em; }
.reader-article .katex-display { max-width: 100%; margin: 1.5em 0; padding: .2em 0 .45em; overflow-x: auto; overflow-y: hidden; }
.math-load-error { max-width: 1040px; margin: 18px auto; padding: 12px 16px; border-left: 3px solid var(--rust); background: var(--paper-deep); color: var(--ink); font-size: 13px; }
.reader-footer { max-width: 1040px; margin: auto; padding: 22px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.reader-footer a { color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.footer-links a { color: inherit; font-size: 12px; text-decoration: none; }
.footer-links a:hover { color: var(--rust); }

@media (max-width: 800px) {
  .home-hero { grid-template-columns: 1fr; gap: 15px; padding-top: 62px; }
  .home-hero__art { max-width: 560px; margin: auto; }
  .home-hero h1 { font-size: clamp(56px, 12vw, 88px); }
  .section-heading { grid-template-columns: 30px 1fr; }
  .section-aside { grid-column: 2; margin-top: -8px; }
  .reader-layout { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
  .reader-toc { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 16px; }
  .reader-toc ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reader-toc li[data-depth="1"] { padding-left: 8px; }
  .reader-toc li[data-depth="2"] { padding-left: 14px; }
  .reader-article { font-size: 17px; }
}
@media (max-width: 560px) {
  .topbar { min-height: 62px; padding: 0 18px; }
  .brand { gap: 8px; font-size: 9px; }
  .brand__mark { width: 27px; height: 27px; }
  .topbar__link, .reader-header__links a { font-size: 11px; }
  .home-hero { min-height: auto; padding: 56px 22px 92px; }
  .hero-index { right: 22px; left: 22px; font-size: 8px; }
  .home-section { padding: 62px 22px; }
  .feature-card { grid-template-columns: 1fr; }
  .feature-art { min-height: 250px; }
  .feature-copy { padding: 30px 24px; }
  .volume-grid { grid-template-columns: 1fr; }
  .volume-card { min-height: 210px; }
  .site-footer { flex-wrap: wrap; padding: 23px 18px; }
  .site-footer > span { display: none; }
  .site-footer .footer-links { order: 3; width: 100%; }
  .reader-intro { padding: 38px 20px 24px; }
  .reader-intro p:last-child { font-size: 17px; }
  .reader-layout { padding: 18px 20px 70px; }
  .reader-toc ul { grid-template-columns: 1fr; }
  .reader-header__links { gap: 12px; }
}
@media print {
  .topbar, .reading-progress, .reader-toc, .reader-footer { display: none !important; }
  body, .reader-page { background: #fff; }
  .reader-intro { padding: 0 0 20px; }
  .reader-layout { display: block; max-width: none; padding: 20px 0; }
  .reader-article { max-width: none; font-size: 11pt; line-height: 1.55; }
  .reader-article h1, .reader-article h2, .reader-article h3 { break-after: avoid; }
  .reader-article img { max-height: 8in; }
}
