/* The Narnian Chronicles · local companion
   No external fonts, images, or network requests. */

:root {
  color-scheme: light;
  --ink: #172721;
  --ink-soft: #46534d;
  --forest: #123b31;
  --forest-deep: #092a23;
  --moss: #4f6d5d;
  --gold: #b48a47;
  --gold-light: #d9bd82;
  --paper: #f5f0e6;
  --paper-deep: #e9e0cf;
  --surface: #fbf8f1;
  --line: rgba(35, 54, 45, .16);
  --line-strong: rgba(35, 54, 45, .3);
  --serif: Iowan Old Style, Baskerville, Baskerville Old Face, Palatino Linotype, Book Antiqua, Georgia, serif;
  --sans: Avenir Next, Avenir, Futura, Trebuchet MS, Arial, sans-serif;
  --shadow: 0 24px 70px rgba(19, 38, 31, .14);
  --page-max: 1240px;
  --reader-size: 20px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8e2d5;
  --ink-soft: #aeb7b1;
  --forest: #b7ccb9;
  --forest-deep: #081c18;
  --moss: #99ae9f;
  --gold: #d3ad6d;
  --gold-light: #f0d59b;
  --paper: #111a17;
  --paper-deep: #19231f;
  --surface: #17221e;
  --line: rgba(232, 226, 213, .14);
  --line-strong: rgba(232, 226, 213, .26);
  --shadow: 0 24px 70px rgba(0, 0, 0, .36);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 4%, rgba(180, 138, 71, .06), transparent 26rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E");
  content: '';
  inset: 0;
  opacity: .025;
  pointer-events: none;
  position: fixed;
  z-index: 1000;
}
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: rgba(180, 138, 71, .3); }

.skip-link {
  background: var(--ink);
  color: var(--paper);
  left: 1rem;
  padding: .8rem 1rem;
  position: fixed;
  top: -5rem;
  z-index: 2000;
}
.skip-link:focus { top: 1rem; }

.site-header {
  align-items: center;
  backdrop-filter: blur(15px);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  height: 78px;
  padding: 0 clamp(1rem, 4vw, 4rem);
  position: relative;
  z-index: 100;
}
.site-brand { align-items: center; display: flex; gap: .75rem; text-decoration: none; width: max-content; }
.site-brand > span:last-child { display: flex; flex-direction: column; }
.site-brand b { font-family: var(--serif); font-size: 1.05rem; letter-spacing: .01em; line-height: 1.05; }
.site-brand small { color: var(--ink-soft); font-size: .57rem; font-weight: 700; letter-spacing: .17em; margin-top: .25rem; text-transform: uppercase; }
.brand-mark { align-items: center; border: 1px solid var(--gold); border-radius: 50%; display: inline-flex; height: 35px; justify-content: center; position: relative; transform: rotate(45deg); width: 35px; }
.brand-mark::after { border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); border-radius: 50%; content: ''; inset: 4px; position: absolute; }
.brand-mark span { color: var(--gold); font-size: .8rem; transform: rotate(-45deg); }
.brand-mark.small { height: 31px; width: 31px; }
.primary-nav { align-items: stretch; align-self: stretch; display: flex; gap: 2.2rem; }
.primary-nav a { align-items: center; color: var(--ink-soft); display: flex; font-size: .72rem; font-weight: 700; letter-spacing: .12em; position: relative; text-decoration: none; text-transform: uppercase; }
.primary-nav a::after { background: var(--gold); bottom: 0; content: ''; height: 2px; left: 50%; position: absolute; right: 50%; transition: .2s ease; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--ink); }
.primary-nav a:hover::after, .primary-nav a[aria-current="page"]::after { left: 0; right: 0; }
.header-actions { align-items: center; display: flex; gap: .35rem; justify-self: end; }
.icon-button { align-items: center; background: transparent; border: 0; color: var(--ink); cursor: pointer; display: flex; gap: .45rem; height: 40px; justify-content: center; padding: 0 .65rem; }
.icon-button:hover { background: var(--paper-deep); }
.icon-button > span:first-child { font-family: var(--serif); font-size: 1.5rem; line-height: 1; }
.icon-button .button-label { font-size: .67rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.theme-toggle { border-left: 1px solid var(--line); margin-left: .25rem; }

.site-footer .admin-link { opacity: .55; }
.site-footer .admin-link:hover { opacity: 1; }

.eyebrow { color: var(--moss); display: block; font-size: .64rem; font-weight: 800; letter-spacing: .2em; line-height: 1.4; text-transform: uppercase; }
.eyebrow.light { color: var(--gold-light); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; }
h1 em, h2 em { color: var(--gold); font-weight: 400; }
.button { align-items: center; border: 1px solid transparent; cursor: pointer; display: inline-flex; font-size: .68rem; font-weight: 800; gap: 1.3rem; justify-content: center; letter-spacing: .13em; min-height: 50px; padding: .2rem 1.4rem; text-decoration: none; text-transform: uppercase; transition: transform .2s, background .2s, color .2s; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--gold); color: #10261f; }
.button.primary:hover { background: var(--gold-light); }
.button.ghost { background: transparent; border-color: rgba(255,255,255,.38); color: #fff; }
.button.pale { background: var(--paper); color: #17352c; }
.text-link { align-items: center; color: var(--forest); display: inline-flex; font-size: .68rem; font-weight: 800; gap: .7rem; letter-spacing: .11em; text-decoration: none; text-transform: uppercase; }
.text-link span { transition: transform .2s; }
.text-link:hover span { transform: translateX(4px); }

.home-hero {
  align-items: center;
  background:
    radial-gradient(circle at 79% 45%, rgba(197, 158, 87, .21), transparent 17rem),
    linear-gradient(116deg, #0b3027 0%, #164739 63%, #0c2f27 100%);
  color: #f5f0e5;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr);
  min-height: min(720px, calc(100vh - 78px));
  overflow: hidden;
  padding: 7rem max(5vw, calc((100vw - var(--page-max)) / 2));
  position: relative;
}
.home-hero::after { border: 1px solid rgba(211, 173, 109, .12); border-radius: 50%; content: ''; height: 44rem; position: absolute; right: -18rem; top: -18rem; width: 44rem; }
.hero-copy { max-width: 760px; position: relative; z-index: 2; }
.hero-copy h1 { font-size: clamp(3.5rem, 6.6vw, 6.6rem); letter-spacing: -.055em; line-height: .89; margin: 1.1rem 0 2rem; }
.hero-copy h1 em { color: #d5b778; display: inline-block; font-size: .7em; letter-spacing: -.03em; margin-top: .5em; }
.hero-copy > p { color: #c6d2cc; font-family: var(--serif); font-size: 1.12rem; line-height: 1.75; max-width: 690px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.3rem; }
.hero-emblem { align-items: center; display: flex; justify-content: center; position: relative; z-index: 1; }
.hero-constellation { inset: 0; pointer-events: none; position: absolute; }
.emblem-rings { align-items: center; border: 1px solid rgba(217, 189, 130, .55); border-radius: 50%; display: flex; flex-direction: column; height: clamp(270px, 28vw, 395px); justify-content: center; position: relative; width: clamp(270px, 28vw, 395px); }
.emblem-rings::before, .emblem-rings::after { border: 1px solid rgba(217, 189, 130, .25); border-radius: 50%; content: ''; inset: 1rem; position: absolute; }
.emblem-rings::after { inset: 3.5rem; }
.emblem-rings > span { color: var(--gold-light); font-size: 1.4rem; position: absolute; top: 2rem; }
.emblem-rings b { color: #e2ca96; font-family: var(--serif); font-size: clamp(7rem, 13vw, 12rem); font-weight: 400; line-height: .8; text-shadow: 0 0 60px rgba(217, 189, 130, .25); }
.emblem-rings small { color: #9eb0a8; font-size: .55rem; font-weight: 800; letter-spacing: .28em; margin-top: 1.6rem; text-align: center; }
.hero-constellation i { background: rgba(255,255,255,.75); border-radius: 50%; box-shadow: 0 0 10px rgba(255,255,255,.7); height: 2px; position: absolute; width: 2px; }
.hero-constellation i:nth-child(1) { left: 8%; top: 22%; }.hero-constellation i:nth-child(2) { left: 36%; top: 13%; }.hero-constellation i:nth-child(3) { left: 65%; top: 25%; }.hero-constellation i:nth-child(4) { left: 91%; top: 14%; }.hero-constellation i:nth-child(5) { left: 74%; top: 74%; }.hero-constellation i:nth-child(6) { left: 42%; top: 83%; }.hero-constellation i:nth-child(7) { left: 13%; top: 68%; }
.scroll-cue { align-items: center; bottom: 1.6rem; color: #9eb0a8; display: flex; font-size: .55rem; font-weight: 700; gap: 1rem; left: 50%; letter-spacing: .18em; position: absolute; text-decoration: none; text-transform: uppercase; transform: translateX(-50%); z-index: 2; }
.scroll-cue i { color: var(--gold-light); font-family: var(--serif); font-size: 1rem; font-style: normal; }

.ruled-section { margin: 0 auto; max-width: var(--page-max); padding: 7rem 2rem; }
.section-heading { align-items: end; border-bottom: 1px solid var(--line-strong); display: flex; gap: 2rem; justify-content: space-between; margin-bottom: 3rem; padding-bottom: 1.4rem; }
.section-heading h2 { font-size: clamp(2.2rem, 4vw, 3.4rem); letter-spacing: -.035em; line-height: 1; margin: .55rem 0 0; }
.section-heading > p { color: var(--ink-soft); font-family: var(--serif); line-height: 1.6; margin: 0; max-width: 390px; }
.book-grid { display: grid; gap: 2.4rem 1.5rem; grid-template-columns: repeat(4, 1fr); }
.book-card { min-width: 0; }
.book-card-art { align-items: center; background: linear-gradient(145deg, color-mix(in srgb, var(--book-color) 83%, #222), var(--book-color)); display: flex; height: 325px; justify-content: center; overflow: hidden; position: relative; text-decoration: none; transition: transform .25s, box-shadow .25s; }
.book-card-art::before { border: 1px solid rgba(255,255,255,.15); content: ''; inset: 12px; position: absolute; }
.book-card-art:hover { box-shadow: var(--shadow); transform: translateY(-6px); }
.book-glow { background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%); height: 20rem; position: absolute; right: -6rem; top: -7rem; width: 20rem; }
.book-mark { align-items: center; border: 1px solid rgba(245, 228, 187, .7); border-radius: 50%; color: #f5e4bb; display: flex; flex-direction: column; height: 145px; justify-content: center; position: relative; width: 145px; z-index: 2; }
.book-mark::after { border: 1px solid rgba(245, 228, 187, .3); border-radius: 50%; content: ''; inset: 7px; position: absolute; }
.book-mark-star { font-size: .7rem; position: absolute; top: 1.2rem; }
.book-mark b { font-family: var(--serif); font-size: 3.2rem; font-weight: 400; line-height: 1; }
.book-mark small { font-size: .48rem; font-weight: 800; letter-spacing: .27em; margin-top: .4rem; }
.book-mark.large { height: 240px; width: 240px; }
.book-mark.large b { font-size: 5.8rem; }
.book-mark.large .book-mark-star { font-size: 1rem; top: 1.8rem; }
.book-card-copy { padding: 1.2rem .15rem 0; }
.book-card-copy h3 { font-size: 1.35rem; line-height: 1.12; margin: .6rem 0 .45rem; }
.book-card-copy h3 a { text-decoration: none; }
.book-card-copy h3 a:hover { color: var(--gold); }
.book-card-copy p { color: var(--ink-soft); font-family: var(--serif); font-size: .9rem; font-style: italic; margin: 0 0 .45rem; }
.book-card-copy > span:last-child { color: var(--moss); font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.center-action { margin: 3rem 0 0; text-align: center; }

.two-worlds { display: grid; grid-template-columns: 1fr 1fr; }
.world-panel { min-height: 590px; padding: 6rem max(4vw, calc((100vw - var(--page-max)) / 2)); }
.world-panel h2 { font-size: clamp(2.8rem, 4vw, 4.4rem); letter-spacing: -.04em; line-height: .97; margin: 1rem 0 1.5rem; }
.world-panel > p { font-family: var(--serif); font-size: 1.05rem; line-height: 1.75; max-width: 530px; }
.reading-panel { background: linear-gradient(145deg, #123d32, #0b2d26); color: #f5f0e5; padding-left: max(5vw, calc((100vw - var(--page-max)) / 2)); }
.reading-panel > p { color: #b9c7c0; }
.wiki-panel { background: var(--paper-deep); padding-right: max(5vw, calc((100vw - var(--page-max)) / 2)); }
.mini-entry-list { border-top: 1px solid var(--line-strong); margin: 2rem 0; }
.mini-entry-list a { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 1rem; grid-template-columns: 90px 1fr auto; padding: .9rem 0; text-decoration: none; }
.mini-entry-list a span { color: var(--moss); font-size: .58rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.mini-entry-list a b { font-family: var(--serif); font-weight: 500; }
.mini-entry-list a i { color: var(--gold); font-style: normal; }
.featured-section { padding-bottom: 8rem; }
.featured-grid { border-left: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); }
.featured-entry { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); display: grid; gap: 1.1rem; grid-template-columns: auto 1fr auto; min-height: 180px; padding: 1.5rem; text-decoration: none; transition: background .2s; }
.featured-entry:hover { background: var(--surface); }
.entry-number { color: var(--gold); font-family: var(--serif); font-size: .75rem; }
.featured-entry > span:nth-child(2) { display: flex; flex-direction: column; }
.featured-entry small { color: var(--moss); font-size: .54rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.featured-entry b { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; margin: .5rem 0 .65rem; }
.featured-entry em { color: var(--ink-soft); font-family: var(--serif); font-size: .86rem; font-style: normal; line-height: 1.45; }
.featured-entry > i { color: var(--gold); font-style: normal; }

.site-footer { align-items: center; background: var(--forest-deep); color: #dfe7e1; display: flex; justify-content: space-between; min-height: 150px; padding: 2rem max(4vw, calc((100vw - var(--page-max)) / 2)); }
.site-footer > div { align-items: center; display: flex; gap: 1rem; }
.site-footer p { font-family: var(--serif); font-size: .92rem; line-height: 1.45; margin: 0; }
.site-footer p span { color: #8fa39a; }
.site-footer nav { display: flex; gap: 1.5rem; }
.site-footer nav a { color: #aebcb6; font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }
.site-footer nav a:hover { color: var(--gold-light); }

.page-wrap { margin: 0 auto; max-width: var(--page-max); padding: 0 2rem 7rem; }
.page-hero { padding: 7rem 0 4rem; }
.page-hero.compact { border-bottom: 1px solid var(--line-strong); max-width: 900px; padding-bottom: 3rem; }
.page-hero h1 { font-size: clamp(3.7rem, 7vw, 6.7rem); letter-spacing: -.06em; line-height: .88; margin: 1rem 0 1.8rem; }
.page-hero > p, .page-hero > div > p { color: var(--ink-soft); font-family: var(--serif); font-size: 1.15rem; line-height: 1.7; max-width: 730px; }
.breadcrumbs { align-items: center; color: var(--ink-soft); display: flex; flex-wrap: wrap; font-size: .59rem; font-weight: 800; gap: .65rem; letter-spacing: .12em; margin: 2rem auto 0; max-width: var(--page-max); text-transform: uppercase; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs span:last-child { color: var(--ink); }

.order-tabs { border-bottom: 1px solid var(--line-strong); display: flex; gap: 2rem; margin-top: 4rem; }
.order-tabs button { background: transparent; border: 0; color: var(--ink-soft); cursor: pointer; font-size: .64rem; font-weight: 800; letter-spacing: .14em; padding: 1rem 0; position: relative; text-transform: uppercase; }
.order-tabs button[aria-selected="true"] { color: var(--ink); }
.order-tabs button[aria-selected="true"]::after { background: var(--gold); bottom: -1px; content: ''; height: 3px; left: 0; position: absolute; right: 0; }
.order-note { align-items: baseline; display: flex; gap: 1rem; padding: 2rem 0; }
.order-note b { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.order-note span { color: var(--ink-soft); font-family: var(--serif); }
.library-grid { grid-template-columns: repeat(3, 1fr); }
.library-grid .book-card-art { height: 390px; }
.reader-note { align-items: center; border: 1px solid var(--line-strong); display: flex; gap: 2rem; margin-top: 5rem; padding: 2rem 2.5rem; }
.reader-note .ornament { align-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); display: flex; flex: 0 0 54px; height: 54px; justify-content: center; }
.reader-note h2 { font-size: 1.4rem; margin: 0 0 .4rem; }
.reader-note p { color: var(--ink-soft); font-family: var(--serif); line-height: 1.55; margin: 0; }

.book-index { margin: 0 auto; max-width: var(--page-max); padding: 0 2rem 7rem; }
.book-index > .breadcrumbs { margin-left: 0; }
.book-hero { align-items: center; display: grid; gap: clamp(3rem, 7vw, 7rem); grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); padding: 5rem 0 6rem; }
.book-hero-art { align-items: center; aspect-ratio: 4 / 5; background: linear-gradient(145deg, color-mix(in srgb, var(--book-color) 83%, #222), var(--book-color)); display: flex; justify-content: center; overflow: hidden; position: relative; }
.book-hero-art::after { border: 1px solid rgba(255,255,255,.18); content: ''; inset: 18px; position: absolute; }
.book-hero-copy h1 { font-size: clamp(3.8rem, 7vw, 6.8rem); letter-spacing: -.06em; line-height: .85; margin: 1.2rem 0 1rem; }
.book-hero-copy .strapline { color: var(--gold); font-family: var(--serif); font-size: 1.35rem; font-style: italic; }
.book-author { color: var(--moss); display: block; font-family: var(--serif); font-size: .95rem; margin: -0.2rem 0 1.2rem; }
.book-hero-copy > p:not(.strapline) { color: var(--ink-soft); font-family: var(--serif); font-size: 1.08rem; line-height: 1.7; max-width: 620px; }
.book-stats { border-top: 1px solid var(--line); display: flex; gap: 2rem; margin-top: 2.2rem; padding-top: 1.4rem; }
.book-stats span { color: var(--ink-soft); font-size: .57rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.book-stats b { color: var(--ink); font-family: var(--serif); font-size: 1.2rem; font-weight: 500; margin-right: .2rem; }
.dedication { border-bottom: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong); margin: 0 auto 2rem; max-width: 760px; padding: 2.5rem 1rem; text-align: center; }
.dedication p { font-family: var(--serif); line-height: 1.65; margin: .75rem auto 0; max-width: 650px; }
.contents-section { padding: 3rem 0 5rem; }
.chapter-list { border-top: 1px solid var(--line-strong); list-style: none; margin: 0; padding: 0; }
.chapter-list li { border-bottom: 1px solid var(--line); }
.chapter-list a { align-items: center; display: grid; gap: 1.5rem; grid-template-columns: 65px 1fr auto; min-height: 76px; padding: 0 1rem; text-decoration: none; transition: background .18s, padding .18s; }
.chapter-list a:hover { background: var(--surface); padding-left: 1.4rem; }
.chapter-list span { color: var(--gold); font-family: var(--serif); }
.chapter-list b { font-family: var(--serif); font-size: 1.08rem; font-weight: 500; }
.chapter-list i { color: var(--moss); font-size: .58rem; font-style: normal; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.edition-note { border-left: 3px solid var(--gold); background: var(--surface); padding: 1.7rem 2rem; }
.edition-note span { color: var(--moss); font-size: .58rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.edition-note p { font-family: var(--serif); line-height: 1.6; margin: .5rem 0 0; }
.adjacent-books { border-top: 1px solid var(--line-strong); display: grid; grid-template-columns: 1fr 1fr; margin-top: 5rem; padding-top: 1.8rem; }
.adjacent-books a { display: flex; flex-direction: column; text-decoration: none; }
.adjacent-books a:last-child { text-align: right; }
.adjacent-books small { color: var(--moss); font-size: .55rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.adjacent-books b { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; margin-top: .3rem; }

.reader-page .site-header { position: sticky; top: 0; }
.reading-progress { background: transparent; height: 2px; left: 0; position: fixed; right: 0; top: 77px; z-index: 150; }
.reading-progress span { background: var(--book-color, var(--gold)); display: block; height: 100%; transform: scaleX(0); transform-origin: left; }
.reader { display: grid; grid-template-columns: 280px minmax(0, 1fr); margin: 0 auto; max-width: 1280px; min-height: 100vh; }
.reader-rail { align-self: start; border-right: 1px solid var(--line); height: calc(100vh - 78px); overflow-y: auto; padding: 2rem 1.5rem 3rem 1rem; position: sticky; top: 78px; }
.back-to-book { align-items: center; color: var(--ink-soft); display: flex; font-size: .6rem; font-weight: 800; gap: .5rem; letter-spacing: .1em; margin-bottom: 2rem; text-decoration: none; text-transform: uppercase; }
.back-to-book:hover { color: var(--gold); }
.rail-section { border-top: 1px solid var(--line-strong); padding-top: 1.3rem; }
.rail-section + .rail-section { margin-top: 2rem; }
.rail-toc { display: flex; flex-direction: column; margin-top: .8rem; }
.rail-toc a { align-items: baseline; border-left: 2px solid transparent; color: var(--ink-soft); display: grid; font-family: var(--serif); font-size: .78rem; gap: .6rem; grid-template-columns: 25px 1fr; line-height: 1.3; padding: .5rem .6rem; text-decoration: none; }
.rail-toc a span { color: var(--gold); font-size: .62rem; }
.rail-toc a:hover, .rail-toc a[aria-current="page"] { background: var(--surface); border-left-color: var(--book-color); color: var(--ink); }
.chapter-notes > a { border-bottom: 1px solid var(--line); display: flex; flex-direction: column; padding: .65rem 0; text-decoration: none; }
.chapter-notes > a span { color: var(--moss); font-size: .48rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.chapter-notes > a b { font-family: var(--serif); font-size: .8rem; font-weight: 500; margin-top: .2rem; }
.chapter-notes > a:hover b { color: var(--gold); }
.reading-column { min-width: 0; padding: 0 clamp(2.5rem, 8vw, 8rem) 7rem; }
.chapter-heading { border-bottom: 1px solid var(--line-strong); padding: 5.5rem 0 2rem; text-align: center; }
.chapter-numeral { color: var(--book-color); display: block; font-family: var(--serif); font-size: 3.5rem; line-height: 1; margin-top: 2rem; }
.chapter-heading h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -.03em; line-height: 1.05; margin: .65rem auto 2.2rem; max-width: 800px; text-wrap: balance; }
.reader-tools { display: inline-flex; border: 1px solid var(--line); }
.reader-tools button { background: transparent; border: 0; border-right: 1px solid var(--line); color: var(--ink-soft); cursor: pointer; font-size: .58rem; font-weight: 800; letter-spacing: .08em; min-height: 34px; padding: 0 .8rem; text-transform: uppercase; }
.reader-tools button:last-child { border: 0; }
.reader-tools button:hover, .reader-tools button[aria-pressed="true"] { background: var(--paper-deep); color: var(--ink); }
.novel-text { font-family: var(--serif); font-size: var(--reader-size); line-height: 1.78; margin: 4rem auto; max-width: 38em; }
.novel-text p { margin: 0 0 1.15em; position: relative; scroll-margin-top: 98px; }
.novel-text p:first-child::first-letter { color: var(--book-color); float: left; font-size: 4.2em; line-height: .78; padding: .12em .1em 0 0; }
.novel-text em { font-style: italic; }
.wiki-term { border-bottom: 1px dotted color-mix(in srgb, var(--book-color) 75%, transparent); color: inherit; text-decoration: none; }
.wiki-term:hover { background: color-mix(in srgb, var(--book-color) 12%, transparent); color: var(--book-color); }
.paragraph-link { color: var(--gold); font-family: var(--sans); font-size: .58em; left: -1.7em; opacity: 0; padding: .3em; position: absolute; text-decoration: none; top: .4em; transition: opacity .15s; }
.novel-text p:hover .paragraph-link, .paragraph-link:focus, .novel-text p:target .paragraph-link { opacity: .8; }
.novel-text p:target { background: color-mix(in srgb, var(--gold) 10%, transparent); box-shadow: -10px 0 0 color-mix(in srgb, var(--gold) 10%, transparent), 10px 0 0 color-mix(in srgb, var(--gold) 10%, transparent); }
.chapter-end { align-items: center; color: var(--ink-soft); display: flex; flex-direction: column; font-family: var(--serif); font-size: .75rem; gap: .7rem; margin: 5rem 0; }
.chapter-end span { color: var(--gold); }
.chapter-end p { margin: 0; }
.chapter-nav { border-top: 1px solid var(--line-strong); display: grid; grid-template-columns: 1fr 1fr; padding-top: 2rem; }
.chapter-nav a { display: flex; flex-direction: column; max-width: 320px; text-decoration: none; }
.chapter-nav .next { justify-self: end; text-align: right; }
.chapter-nav small { color: var(--moss); font-size: .54rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.chapter-nav b { font-family: var(--serif); font-size: .95rem; font-weight: 500; line-height: 1.3; margin-top: .35rem; }
.chapter-nav a:hover b { color: var(--gold); }
.reader.focus-mode { display: block; max-width: 1040px; }
.reader.focus-mode .reader-rail { display: none; }

.reader-rights-notice {
  background: #0b3027;
  border-left: 3px solid var(--gold-light);
  bottom: 1.25rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  color: #f5f0e5;
  max-width: 450px;
  opacity: 0;
  padding: 1.2rem 3.2rem 1.25rem 1.35rem;
  position: fixed;
  right: 1.25rem;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
  width: calc(100vw - 2.5rem);
  z-index: 1200;
}
.reader-rights-notice.is-visible { opacity: 1; transform: translateY(0); }
.reader-rights-notice > span { color: var(--gold-light); display: block; font-size: .55rem; font-weight: 800; letter-spacing: .16em; margin-bottom: .55rem; text-transform: uppercase; }
.reader-rights-notice p { color: #c9d4cf; font-family: var(--serif); font-size: .82rem; line-height: 1.55; margin: 0; }
.reader-rights-notice button { background: transparent; border: 0; color: #d7e0dc; cursor: pointer; font-family: var(--serif); font-size: 1.35rem; height: 38px; position: absolute; right: .6rem; top: .55rem; width: 38px; }
.reader-rights-notice button:hover, .reader-rights-notice button:focus-visible { color: var(--gold-light); }

.wiki-hero { align-items: center; display: grid; gap: 4rem; grid-template-columns: 1fr 320px; max-width: none; }
.wiki-hero h1 { max-width: 800px; }
.wiki-hero-index { align-items: center; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; font-family: var(--serif); font-size: 2.4rem; grid-template-columns: 1fr 1fr; height: 280px; justify-items: center; padding: 3.2rem; position: relative; width: 280px; }
.wiki-hero-index::after { border: 1px solid var(--line); border-radius: 50%; content: ''; inset: 14px; position: absolute; }
.wiki-hero-index span:nth-child(3) { color: var(--gold); }
.category-section, .spotlight-section { padding: 5rem 0; }
.category-grid { border-left: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); }
.category-grid a { align-items: center; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); display: grid; gap: 1.1rem; grid-template-columns: auto 1fr auto; min-height: 110px; padding: 1.4rem; text-decoration: none; }
.category-grid a:hover { background: var(--surface); }
.category-grid a > span { color: var(--gold); font-family: var(--serif); font-size: .72rem; }
.category-grid a div { display: flex; flex-direction: column; }
.category-grid small { color: var(--moss); font-size: .52rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.category-grid b { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; margin-top: .3rem; }
.category-grid i { color: var(--gold); font-style: normal; }
.spotlight-grid { display: grid; gap: 1px; grid-template-columns: repeat(3, 1fr); background: var(--line); border: 1px solid var(--line); }
.spotlight-card { background: var(--paper); display: flex; flex-direction: column; min-height: 330px; overflow: hidden; padding: 2rem; position: relative; text-decoration: none; }
.spotlight-card:hover { background: var(--surface); }
.spotlight-letter { bottom: -2.2rem; color: var(--paper-deep); font-family: var(--serif); font-size: 14rem; line-height: 1; position: absolute; right: -.5rem; z-index: 0; }
.spotlight-card small, .spotlight-card h3, .spotlight-card p, .spotlight-card i { position: relative; z-index: 1; }
.spotlight-card small { color: var(--moss); font-size: .55rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.spotlight-card h3 { font-size: 2rem; margin: 1rem 0; }
.spotlight-card p { color: var(--ink-soft); font-family: var(--serif); font-size: .91rem; line-height: 1.55; }
.spotlight-card i { color: var(--gold); font-family: var(--serif); font-size: .7rem; font-style: normal; margin-top: auto; }
.chronology-callout { align-items: center; background: linear-gradient(110deg, #0c3028, #184638); color: #f5f0e5; display: grid; gap: 3rem; grid-template-columns: auto 1fr auto; margin: 4rem 0 1rem; padding: 3rem 4rem; }
.chronology-callout .orbit { align-items: center; border: 1px solid rgba(217,189,130,.5); border-radius: 50%; display: flex; height: 90px; justify-content: center; width: 90px; }
.chronology-callout .orbit i { color: var(--gold-light); font-style: normal; }
.chronology-callout h2 { font-size: 2.4rem; margin: .5rem 0; }
.chronology-callout p { color: #b8c5bf; font-family: var(--serif); margin: 0; }

.wiki-article-page { margin: 0 auto; max-width: var(--page-max); padding: 0 2rem 8rem; }
.wiki-article-page > .breadcrumbs { margin-left: 0; }
.wiki-layout { align-items: start; display: grid; gap: clamp(3rem, 6vw, 6rem); grid-template-columns: minmax(0, 1fr) 310px; padding-top: 5rem; }
.article-heading { border-bottom: 1px solid var(--line-strong); padding-bottom: 2rem; }
.article-heading h1 { font-size: clamp(4rem, 7vw, 7.2rem); letter-spacing: -.06em; line-height: .87; margin: 1rem 0; }
.aliases { color: var(--ink-soft); font-family: var(--serif); font-size: .87rem; font-style: italic; margin: 0; }
.aliases span { color: var(--ink); }
.article-lede { font-family: var(--serif); font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.65; margin: 2.5rem 0; max-width: 790px; }
.article-lede::first-letter { color: var(--gold); float: left; font-size: 3.8em; line-height: .8; padding: .14em .1em 0 0; }
.spoiler-note { align-items: center; background: var(--surface); border-left: 3px solid var(--gold); display: flex; gap: 1rem; padding: 1rem 1.3rem; }
.spoiler-note > span { align-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); display: flex; flex: 0 0 26px; font-family: var(--serif); height: 26px; justify-content: center; }
.spoiler-note p { color: var(--ink-soft); font-family: var(--serif); font-size: .83rem; margin: 0; }
.article-section { margin-top: 5.5rem; }
.article-section > header { align-items: center; border-bottom: 1px solid var(--line-strong); display: flex; gap: 1.2rem; padding-bottom: 1rem; }
.section-number { color: var(--gold); font-family: var(--serif); font-size: 1rem; }
.article-section h2 { font-size: 2.4rem; margin: .25rem 0 0; }
.section-intro { color: var(--ink-soft); font-family: var(--serif); line-height: 1.6; margin: 1.3rem 0 2rem; }
.article-copy { color: var(--ink); font-family: var(--serif); font-size: 1.05rem; line-height: 1.8; margin-top: 1.8rem; max-width: 780px; }
.article-copy > :first-child { margin-top: 0; }
.article-copy h2, .article-copy h3, .article-copy h4 { font-weight: 500; line-height: 1.15; margin: 2.2em 0 .65em; }
.article-copy h2 { font-size: 2rem; }
.article-copy h3 { font-size: 1.55rem; }
.article-copy h4 { font-size: 1.25rem; }
.article-copy p, .article-copy li { line-height: 1.8; }
.article-copy blockquote { border-left: 3px solid var(--gold); color: var(--ink-soft); font-size: 1.08em; font-style: italic; margin: 2rem 0; padding: .35rem 0 .35rem 1.5rem; }
.article-copy figure { margin: 2.2rem 0; }
.article-copy img { display: block; height: auto; max-width: 100%; }
.article-copy figcaption { color: var(--ink-soft); font-family: var(--sans); font-size: .62rem; line-height: 1.5; margin-top: .65rem; }
.article-copy table { border-collapse: collapse; display: block; margin: 2rem 0; max-width: 100%; overflow-x: auto; width: max-content; }
.article-copy th, .article-copy td { border: 1px solid var(--line-strong); padding: .65rem .8rem; text-align: left; }
.article-copy th { background: var(--paper-deep); font-family: var(--sans); font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }
.article-copy code { background: var(--paper-deep); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82em; padding: .12em .3em; }
.source-group { border-bottom: 1px solid var(--line); }
.source-group summary { align-items: center; cursor: pointer; display: grid; gap: .9rem; grid-template-columns: auto 1fr auto auto; list-style: none; min-height: 62px; }
.source-group summary::-webkit-details-marker { display: none; }
.source-color { background: var(--source-color); border-radius: 50%; height: 9px; width: 9px; }
.source-group summary b { font-family: var(--serif); font-size: .95rem; font-weight: 500; }
.source-group summary > span:nth-of-type(2) { color: var(--ink-soft); font-size: .55rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.source-group summary i { color: var(--gold); font-style: normal; transition: transform .2s; }
.source-group[open] summary i { transform: rotate(180deg); }
.source-group ol { list-style: none; margin: 0 0 1.5rem 1rem; padding: 0; }
.source-group li { border-left: 1px solid var(--line); }
.source-group li a { display: flex; flex-direction: column; padding: .8rem 1rem; text-decoration: none; }
.source-group li a:hover { background: var(--surface); border-left: 2px solid var(--gold); margin-left: -1px; }
.source-group li span { color: var(--moss); font-size: .5rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.source-group q { color: var(--ink-soft); font-family: var(--serif); font-size: .85rem; line-height: 1.5; margin: .45rem 0; quotes: none; }
.source-group li b { color: var(--gold); font-size: .5rem; letter-spacing: .1em; text-transform: uppercase; }
.empty-state { color: var(--ink-soft); font-family: var(--serif); font-style: italic; }
.related-grid { display: grid; gap: 1px; grid-template-columns: repeat(2, 1fr); background: var(--line); border: 1px solid var(--line); margin-top: 2rem; }
.related-card { background: var(--paper); display: flex; flex-direction: column; min-height: 170px; padding: 1.3rem; text-decoration: none; }
.related-card:hover { background: var(--surface); }
.related-card > span { color: var(--moss); font-size: .5rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.related-card > b { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; margin-top: .45rem; }
.related-card p { color: var(--ink-soft); font-family: var(--serif); font-size: .79rem; line-height: 1.4; margin: .6rem 0; }
.related-card i { color: var(--gold); font-style: normal; margin-top: auto; }
.infobox { border: 1px solid var(--line-strong); padding: 1.2rem; position: sticky; top: 100px; }
.infobox-emblem { align-items: center; aspect-ratio: 1; background: var(--forest); color: #ead6a7; display: flex; justify-content: center; overflow: hidden; position: relative; }
.infobox-emblem::after { border: 1px solid rgba(234,214,167,.35); border-radius: 50%; content: ''; inset: 12%; position: absolute; }
.infobox-emblem span { font-family: var(--serif); font-size: 8rem; line-height: 1; opacity: .82; }
.infobox-emblem i { font-size: .7rem; font-style: normal; position: absolute; top: 1.5rem; }
.infobox h2 { font-size: 1.7rem; margin: 1.2rem 0 .5rem; }
.type-badge { color: var(--moss); font-size: .55rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.infobox dl { border-top: 1px solid var(--line); margin: 1.2rem 0 0; }
.infobox dl > div { border-bottom: 1px solid var(--line); display: grid; gap: .6rem; grid-template-columns: 42% 1fr; padding: .75rem 0; }
.infobox dt { color: var(--moss); font-size: .51rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.infobox dd { font-family: var(--serif); font-size: .78rem; line-height: 1.35; margin: 0; }
.appearance-list { display: flex; flex-wrap: wrap; gap: .35rem; padding-top: 1.2rem; }
.appearance-list > span { color: var(--moss); flex: 0 0 100%; font-size: .51rem; font-weight: 800; letter-spacing: .1em; margin-bottom: .3rem; text-transform: uppercase; }
.appearance-list a { border-left: 3px solid var(--pill); background: var(--surface); font-family: var(--serif); font-size: .65rem; padding: .4rem .55rem; text-decoration: none; }
.infobox-search { align-items: center; border-top: 1px solid var(--line); color: var(--forest); display: flex; font-size: .57rem; font-weight: 800; justify-content: space-between; letter-spacing: .1em; margin-top: 1.2rem; padding: 1rem 0 0; text-decoration: none; text-transform: uppercase; }

.index-page .breadcrumbs { margin-left: 0; }
.alphabet { border-bottom: 1px solid var(--line-strong); display: flex; flex-wrap: wrap; gap: .3rem; margin: 3rem 0; padding-bottom: 1.5rem; }
.alphabet a { align-items: center; border: 1px solid var(--line); display: flex; font-family: var(--serif); height: 34px; justify-content: center; text-decoration: none; width: 34px; }
.alphabet a:hover { background: var(--forest); color: var(--paper); }
.az-group { display: grid; grid-template-columns: 90px 1fr; padding: 1.5rem 0 3rem; }
.az-group > h2 { color: var(--gold); font-size: 3rem; margin: 0; }
.az-group > div { border-top: 1px solid var(--line-strong); }
.az-group a { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 1rem; grid-template-columns: 95px minmax(160px, .7fr) 1fr auto; min-height: 76px; padding: .7rem .8rem; text-decoration: none; }
.az-group a:hover { background: var(--surface); }
.az-group a > span { color: var(--moss); font-size: .5rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.az-group a > b { font-family: var(--serif); font-size: 1.03rem; font-weight: 500; }
.az-group a > p { color: var(--ink-soft); font-family: var(--serif); font-size: .79rem; margin: 0; }
.az-group a > i { color: var(--gold); font-style: normal; }

.timeline-key { border-bottom: 1px solid var(--line-strong); display: flex; gap: 2rem; justify-content: flex-end; padding: 2rem 0 1rem; }
.timeline-key span { align-items: center; color: var(--ink-soft); display: flex; font-size: .55rem; font-weight: 800; gap: .5rem; letter-spacing: .1em; text-transform: uppercase; }
.timeline-key i { border-radius: 50%; display: inline-block; height: 8px; width: 8px; }
.story-dot { background: var(--forest); }.publication-dot { border: 2px solid var(--gold); }
.timeline { margin: 0 auto; max-width: 950px; padding: 5rem 0; position: relative; }
.timeline::before { background: var(--line-strong); content: ''; left: 29px; position: absolute; top: 5rem; bottom: 5rem; width: 1px; }
.timeline-row { display: grid; gap: 2rem; grid-template-columns: 60px 90px 1fr; padding: 0 0 5rem; position: relative; }
.timeline-row:last-child { padding-bottom: 0; }
.timeline-point { align-items: center; background: var(--book-color); border: 7px solid var(--paper); border-radius: 50%; color: #fff; display: flex; font-family: var(--serif); height: 58px; justify-content: center; position: relative; width: 58px; z-index: 1; }
.timeline-year { color: var(--gold); font-family: var(--serif); font-size: 1.25rem; padding-top: .65rem; }
.timeline-year small { color: var(--ink-soft); display: block; font-family: var(--sans); font-size: .45rem; font-weight: 800; letter-spacing: .1em; margin-top: .2rem; text-transform: uppercase; }
.timeline-copy { border-top: 1px solid var(--line-strong); padding-top: .8rem; }
.timeline-copy h2 { font-size: 2.1rem; margin: .5rem 0; }
.timeline-copy h2 a { text-decoration: none; }
.timeline-copy p { color: var(--ink-soft); font-family: var(--serif); line-height: 1.55; }
.timeline-page .reader-note { justify-content: space-between; }
.timeline-page .reader-note > div { flex: 1; }

/* Book-grounded history timeline */
.history-hero { align-items: end; background: linear-gradient(135deg, #092e27 0%, #174d3f 70%, #295c4a 100%); color: #f6f0df; display: grid; gap: clamp(3rem, 7vw, 8rem); grid-template-columns: minmax(0, 1.4fr) minmax(250px, .6fr); margin-top: 2.5rem; min-height: 560px; overflow: hidden; padding: clamp(3rem, 7vw, 7rem); position: relative; }
.history-hero::before { border: 1px solid rgba(225,198,137,.2); border-radius: 50%; content: ''; height: 34rem; position: absolute; right: -12rem; top: -17rem; width: 34rem; }
.history-hero::after { background: radial-gradient(circle, rgba(227,198,134,.38) 0 1px, transparent 1.5px); background-size: 38px 38px; content: ''; inset: 0; mask-image: linear-gradient(90deg, transparent 35%, #000); opacity: .35; position: absolute; }
.history-hero > * { position: relative; z-index: 1; }
.history-hero h1 { font-size: clamp(4.6rem, 8vw, 8rem); letter-spacing: -.065em; line-height: .82; margin: 1.2rem 0 1.8rem; }
.history-hero h1 em { color: #e2c487; font-weight: 400; }
.history-hero p { color: #c5d2cc; font-family: var(--serif); font-size: 1.15rem; line-height: 1.7; margin: 0; max-width: 720px; }
.history-hero dl { border-left: 1px solid rgba(226,196,135,.55); margin: 0; padding-left: 1.8rem; }
.history-hero dl > div { border-bottom: 1px solid rgba(255,255,255,.13); padding: 1.1rem 0; }
.history-hero dt { color: #e2c487; font-family: var(--serif); font-size: 2.35rem; }
.history-hero dd { color: #b8c8c1; font-size: .55rem; font-weight: 800; letter-spacing: .14em; margin: .25rem 0 0; text-transform: uppercase; }
.history-method { align-items: center; background: var(--paper-deep); border: 1px solid var(--line-strong); display: grid; gap: 1.5rem; grid-template-columns: auto 1fr auto; margin: 2.5rem 0; padding: 1.6rem 1.8rem; }
.history-method .ornament { align-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); display: flex; height: 42px; justify-content: center; width: 42px; }
.history-method h2 { font-size: 1.25rem; margin: 0 0 .3rem; }
.history-method p { color: var(--ink-soft); font-family: var(--serif); font-size: .82rem; line-height: 1.55; margin: 0; max-width: 850px; }
.history-method > a { color: var(--forest); font-size: .55rem; font-weight: 800; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.history-era-nav { background: color-mix(in srgb, var(--paper) 94%, transparent); border-bottom: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong); display: flex; gap: .15rem; margin: 4rem 0 0; overflow-x: auto; padding: .75rem 0; position: sticky; scrollbar-width: thin; top: 77px; z-index: 55; }
.history-era-nav a { align-items: center; color: var(--ink-soft); display: flex; flex: 0 0 auto; font-size: .5rem; font-weight: 800; gap: .45rem; letter-spacing: .07em; padding: .65rem .8rem; text-decoration: none; text-transform: uppercase; transition: background .2s ease, color .2s ease; }
.history-era-nav a span { align-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--gold); display: flex; font-family: var(--serif); font-size: .65rem; font-weight: 500; height: 24px; justify-content: center; letter-spacing: 0; width: 24px; }
.history-era-nav a:hover, .history-era-nav a.current { background: var(--forest); color: var(--paper); }
.history-era-nav a:hover span, .history-era-nav a.current span { border-color: rgba(255,255,255,.35); color: #e2c487; }
.history-legend { border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: flex-end; padding: 1rem 0; }
.history-legend span { align-items: center; color: var(--ink-soft); display: flex; font-size: .48rem; font-weight: 750; gap: .45rem; letter-spacing: .07em; text-transform: uppercase; }
.history-legend i { border-radius: 50%; height: 8px; width: 8px; }
.history-legend i.stated { background: var(--forest); }
.history-legend i.relative { background: var(--gold); }
.history-legend i.sequence { border: 1px solid var(--moss); }
.history-timeline { margin: 0 auto; max-width: 1120px; padding: 2rem 0 5rem; }
.history-era { padding: 6rem 0 1rem; scroll-margin-top: 128px; }
.history-era-heading { align-items: start; border-bottom: 1px solid var(--line-strong); display: grid; gap: 1.6rem; grid-template-columns: 70px minmax(0, 1fr); margin-bottom: 3rem; padding-bottom: 2rem; }
.history-era-heading > span { color: var(--gold); font-family: var(--serif); font-size: 2rem; line-height: 1; }
.history-era-heading small { color: var(--moss); display: block; font-size: .57rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.history-era-heading h2 { font-size: clamp(2.8rem, 5vw, 4.7rem); letter-spacing: -.055em; line-height: .95; margin: .55rem 0 1rem; }
.history-era-heading p { color: var(--ink-soft); font-family: var(--serif); font-size: 1rem; line-height: 1.65; margin: 0; max-width: 800px; }
.history-events { margin-left: 35px; position: relative; }
.history-events::before { background: var(--line-strong); bottom: 0; content: ''; left: 0; position: absolute; top: 0; width: 1px; }
.history-event { display: grid; gap: 2rem; grid-template-columns: 70px minmax(0, 1fr); padding: 0 0 3.8rem; position: relative; scroll-margin-top: 142px; }
.history-marker { align-items: flex-start; display: flex; justify-content: center; margin-left: -35px; width: 70px; }
.history-marker span { align-items: center; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 50%; color: var(--gold); display: flex; font-family: var(--serif); font-size: .68rem; height: 42px; justify-content: center; width: 42px; }
.history-event-main { border-top: 1px solid var(--line); padding-top: .9rem; }
.history-event-main > header { align-items: start; display: flex; justify-content: space-between; }
.history-event-main > header > div { align-items: center; display: flex; flex-wrap: wrap; gap: .6rem; }
.history-date { color: var(--moss); font-size: .55rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.precision-badge { border-radius: 20px; font-size: .44rem; font-weight: 850; letter-spacing: .08em; padding: .28rem .48rem; text-transform: uppercase; }
.precision-badge.stated { background: color-mix(in srgb, var(--forest) 12%, transparent); color: var(--forest); }
.precision-badge.relative { background: color-mix(in srgb, var(--gold) 17%, transparent); color: var(--ink-soft); }
.precision-badge.sequence { border: 1px solid var(--line); color: var(--ink-soft); }
.event-permalink { color: var(--line-strong); font-family: var(--serif); font-size: 1rem; text-decoration: none; }
.event-permalink:hover { color: var(--gold); }
.history-event-main h3 { font-size: clamp(1.9rem, 3vw, 2.7rem); letter-spacing: -.035em; line-height: 1.05; margin: .7rem 0 .8rem; }
.history-event-main > p { color: var(--ink-soft); font-family: var(--serif); font-size: .98rem; line-height: 1.68; margin: 0; max-width: 880px; }
.history-related { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1.1rem; }
.history-related::before { color: var(--ink-soft); content: 'Related'; font-size: .46rem; font-weight: 850; letter-spacing: .12em; opacity: .72; padding: .42rem .4rem .35rem 0; text-transform: uppercase; }
.history-related a { background: var(--surface); border: 1px solid var(--line); border-radius: 2px; color: var(--forest); font-family: var(--serif); font-size: .67rem; padding: .34rem .5rem; text-decoration: none; }
.history-related a:hover { border-color: var(--gold); }
.history-sources { align-items: start; border-top: 1px dotted var(--line-strong); display: grid; gap: 1rem; grid-template-columns: 90px 1fr; margin-top: 1.2rem; padding-top: 1rem; }
.history-sources > span { color: var(--ink-soft); font-size: .46rem; font-weight: 850; letter-spacing: .12em; opacity: .72; padding-top: .45rem; text-transform: uppercase; }
.history-sources > div { display: flex; flex-wrap: wrap; gap: .45rem; }
.history-sources a { align-items: center; border-left: 3px solid var(--gold); color: var(--ink); display: grid; gap: .15rem .6rem; grid-template-columns: auto auto auto; padding: .3rem .65rem; text-decoration: none; }
.history-sources a:hover { background: var(--surface); }
.history-sources a > span { color: var(--moss); font-size: .48rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.history-sources a > b { font-family: var(--serif); font-size: .67rem; font-weight: 600; }
.history-sources a > i { color: var(--gold); font-style: normal; }
.history-sources a > small { color: var(--ink-soft); font-family: var(--serif); font-size: .58rem; grid-column: 1 / -1; opacity: .74; }
.book-chronology { border-top: 3px double var(--line-strong); margin-top: 4rem; padding-top: 7rem; scroll-margin-top: 118px; }
.book-chronology-heading { max-width: 850px; }
.book-chronology-heading h2 { font-size: clamp(3rem, 6vw, 5rem); letter-spacing: -.055em; line-height: .95; margin: .7rem 0 1.2rem; }
.book-chronology-heading p { color: var(--ink-soft); font-family: var(--serif); font-size: 1.05rem; line-height: 1.7; }

.prose-page { max-width: 770px; padding: 3rem 0; }
.prose-page h2 { font-size: 2rem; margin: 3rem 0 .7rem; }
.prose-page p { color: var(--ink-soft); font-family: var(--serif); font-size: 1.08rem; line-height: 1.8; }
.prose-page code { background: var(--paper-deep); border: 1px solid var(--line); border-radius: 2px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78em; padding: .12rem .3rem; }

.comparison-page { margin: 0 auto; max-width: 1500px; padding: 0 2.5rem 8rem; }
.comparison-page > .breadcrumbs { margin-left: 0; }
.comparison-hero { align-items: end; background: linear-gradient(120deg, #0a2c25, #17483a); color: #f5f0e5; display: grid; gap: 5rem; grid-template-columns: minmax(0, 1.4fr) minmax(250px, .6fr); margin: 2.5rem 0 0; min-height: 560px; overflow: hidden; padding: clamp(3rem, 7vw, 7rem); position: relative; }
.comparison-hero::after { border: 1px solid rgba(217,189,130,.22); border-radius: 50%; content: ''; height: 38rem; position: absolute; right: -16rem; top: -17rem; width: 38rem; }
.comparison-hero > div, .comparison-hero > aside { position: relative; z-index: 1; }
.comparison-hero h1 { font-size: clamp(3.7rem, 7vw, 7.4rem); letter-spacing: -.06em; line-height: .87; margin: 1.2rem 0 2rem; }
.comparison-hero > div > p { color: #c1cec8; font-family: var(--serif); font-size: 1.12rem; line-height: 1.7; max-width: 760px; }
.comparison-hero aside { border-left: 1px solid rgba(217,189,130,.6); padding-left: 1.4rem; }
.comparison-hero aside span { color: var(--gold-light); font-size: .57rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.comparison-hero aside p { color: #adbbb5; font-family: var(--serif); font-size: .88rem; line-height: 1.55; margin: .7rem 0 0; }
.comparison-key { background: color-mix(in srgb, var(--paper) 93%, transparent); border-bottom: 1px solid var(--line-strong); display: grid; gap: 1.5rem; grid-template-columns: 1fr 1fr; margin: 0; padding: 1.2rem 0; position: sticky; top: 78px; z-index: 60; }
.comparison-key span { align-items: center; display: flex; font-size: .59rem; font-weight: 800; gap: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.comparison-key i { align-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); display: flex; font-family: var(--serif); font-size: .7rem; font-style: normal; height: 28px; justify-content: center; width: 28px; }
.comparison-row { border-bottom: 1px solid var(--line-strong); padding: 5rem 0 5.5rem; }
.comparison-row > header { align-items: start; display: grid; gap: 1.5rem; grid-template-columns: 50px minmax(0, 1fr); margin-bottom: 2rem; max-width: 880px; }
.comparison-row > header > span { color: var(--gold); font-family: var(--serif); font-size: 1.1rem; padding-top: .3rem; }
.comparison-row > header small { color: var(--moss); font-size: .57rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.comparison-row > header h2 { font-size: clamp(2.3rem, 4vw, 3.8rem); letter-spacing: -.04em; line-height: 1; margin: .45rem 0 .7rem; }
.comparison-row > header p { color: var(--ink-soft); font-family: var(--serif); line-height: 1.6; margin: 0; }
.comparison-pair { display: grid; gap: 1.5rem; grid-template-columns: 1fr 1fr; }
.comparison-pair figure { margin: 0; min-width: 0; }
.sample-image-button { aspect-ratio: 3 / 2; background: var(--forest-deep); border: 0; cursor: zoom-in; display: block; overflow: hidden; padding: 0; position: relative; width: 100%; }
.sample-image-button::after { align-items: center; background: rgba(7,28,23,.82); bottom: 1rem; color: #fff; content: '↗  Enlarge'; display: flex; font-size: .49rem; font-weight: 800; height: 32px; letter-spacing: .1em; opacity: 0; padding: 0 .8rem; position: absolute; right: 1rem; text-transform: uppercase; transform: translateY(5px); transition: .2s ease; }
.sample-image-button:hover::after, .sample-image-button:focus-visible::after { opacity: 1; transform: translateY(0); }
.sample-image-button img { display: block; height: 100%; object-fit: cover; transition: transform .5s ease; width: 100%; }
.sample-image-button:hover img { transform: scale(1.012); }
.comparison-pair figcaption { border-left: 2px solid var(--gold); display: grid; gap: .8rem 1rem; grid-template-columns: auto 1fr; margin-top: 1.1rem; padding-left: 1rem; }
.comparison-pair figcaption span { color: var(--gold); font-size: .51rem; font-weight: 800; letter-spacing: .12em; padding-top: .25rem; text-transform: uppercase; }
.comparison-pair figcaption b { font-family: var(--serif); font-size: 1.05rem; font-weight: 500; }
.comparison-pair figcaption p { color: var(--ink-soft); font-family: var(--serif); font-size: .78rem; grid-column: 2; line-height: 1.45; margin: 0; }
.comparison-end { align-items: center; display: grid; gap: 2rem; grid-template-columns: auto 1fr; margin: 6rem auto 0; max-width: 800px; text-align: center; }
.comparison-end > span { align-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); display: flex; height: 70px; justify-content: center; width: 70px; }
.comparison-end small { color: var(--moss); font-size: .55rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.comparison-end h2 { font-size: 2.6rem; margin: .5rem 0; }
.comparison-end p { color: var(--ink-soft); font-family: var(--serif); line-height: 1.55; margin: 0; }
.image-lightbox { background: transparent; border: 0; height: 100%; margin: 0; max-height: none; max-width: none; padding: clamp(2rem, 5vw, 5rem); width: 100%; }
.image-lightbox::backdrop { backdrop-filter: blur(10px); background: rgba(3,14,12,.92); }
.image-lightbox img { display: block; height: calc(100vh - 10rem); margin: 0 auto; max-width: 100%; object-fit: contain; width: 100%; }
.image-lightbox p { color: #e7e2d6; font-family: var(--serif); margin: .8rem 0 0; text-align: center; }
.lightbox-close { background: rgba(7,28,23,.85); border: 1px solid rgba(255,255,255,.4); color: #fff; cursor: pointer; font-family: var(--serif); font-size: 1.5rem; height: 42px; position: fixed; right: 1.5rem; top: 1.5rem; width: 42px; z-index: 2; }

.search-dialog { background: transparent; border: 0; height: 100%; margin: 0; max-height: none; max-width: none; padding: clamp(1rem, 5vw, 5rem); width: 100%; }
.search-dialog::backdrop { backdrop-filter: blur(9px); background: rgba(5, 22, 18, .82); }
.search-shell { background: var(--paper); box-shadow: 0 30px 100px rgba(0,0,0,.45); margin: 0 auto; max-height: calc(100vh - 2rem); max-width: 850px; overflow: hidden; }
.search-shell > header { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 1.4rem 1.6rem; }
.search-shell h2 { font-size: 1.8rem; margin: .25rem 0 0; }
.dialog-close { background: transparent; border: 1px solid var(--line); color: var(--ink); cursor: pointer; font-family: var(--serif); font-size: 1.6rem; height: 38px; line-height: 1; width: 38px; }
.search-box { align-items: center; border-bottom: 1px solid var(--line-strong); display: flex; gap: 1rem; margin: 0 1.6rem; }
.search-box > span { color: var(--gold); font-family: var(--serif); font-size: 2rem; }
.search-box input { background: transparent; border: 0; color: var(--ink); font-family: var(--serif); font-size: 1.25rem; outline: 0; padding: 1.2rem 0; width: 100%; }
.search-meta { color: var(--ink-soft); font-size: .57rem; font-weight: 800; letter-spacing: .1em; padding: .8rem 1.6rem; text-transform: uppercase; }
.search-results { max-height: min(55vh, 560px); overflow-y: auto; padding: 0 1.6rem 1rem; }
.search-result { align-items: center; border-top: 1px solid var(--line); display: grid; gap: 1rem; grid-template-columns: 100px 1fr auto; padding: .8rem .4rem; text-decoration: none; }
.search-result:hover, .search-result.active { background: var(--surface); }
.search-result > span { color: var(--moss); font-size: .49rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.search-result div { min-width: 0; }
.search-result b { display: block; font-family: var(--serif); font-size: .95rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result p { color: var(--ink-soft); font-family: var(--serif); font-size: .74rem; line-height: 1.35; margin: .25rem 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result mark { background: rgba(180,138,71,.22); color: inherit; }
.search-result i { color: var(--gold); font-style: normal; }
.search-shell > footer { border-top: 1px solid var(--line); color: var(--ink-soft); display: flex; font-size: .53rem; justify-content: space-between; padding: .7rem 1.6rem; }
kbd { background: var(--paper-deep); border: 1px solid var(--line-strong); border-radius: 2px; font-family: var(--sans); padding: .08rem .25rem; }
.term-tooltip { background: var(--forest-deep); box-shadow: 0 16px 45px rgba(0,0,0,.32); color: #e7e2d6; cursor: pointer; max-width: 290px; padding: 1rem 1.1rem; position: fixed; width: calc(100vw - 24px); z-index: 500; }
.term-tooltip[hidden] { display: none; }
.term-tooltip > span { color: var(--gold-light); font-size: .49rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.term-tooltip p { color: #b8c6bf; font-family: var(--serif); font-size: .76rem; line-height: 1.45; margin: .45rem 0 .7rem; }
.term-tooltip b { color: var(--gold-light); font-size: .48rem; letter-spacing: .1em; text-transform: uppercase; }

@media (max-width: 1050px) {
  .book-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-copy h1 { font-size: clamp(3.5rem, 7vw, 5.5rem); }
  .world-panel { padding: 5rem 4vw; }
  .reader { grid-template-columns: 230px minmax(0, 1fr); }
  .reading-column { padding-left: 4rem; padding-right: 4rem; }
  .wiki-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 3rem; }
}

@media (max-width: 820px) {
  .site-header { grid-template-columns: 1fr auto; }
  .primary-nav { display: none; }
  .home-hero { grid-template-columns: 1fr; padding-top: 5rem; }
  .hero-emblem { display: none; }
  .book-grid, .library-grid { grid-template-columns: repeat(2, 1fr); }
  .two-worlds { grid-template-columns: 1fr; }
  .world-panel { min-height: auto; }
  .featured-grid, .category-grid, .spotlight-grid { grid-template-columns: repeat(2, 1fr); }
  .book-hero { gap: 3rem; }
  .book-hero-art .book-mark.large { height: 180px; width: 180px; }
  .book-hero-art .book-mark.large b { font-size: 4rem; }
  .reader { display: block; }
  .reader-rail { background: var(--paper); bottom: 0; box-shadow: 10px 0 50px rgba(0,0,0,.2); display: none; height: calc(100vh - 78px); left: 0; max-width: 310px; padding: 2rem; position: fixed; top: 78px; width: 85%; z-index: 80; }
  .reader.toc-open .reader-rail { display: block; }
  .reading-column { padding: 0 2rem 6rem; }
  .wiki-layout { display: flex; flex-direction: column; }
  .infobox { order: -1; position: static; width: 100%; }
  .infobox-emblem { aspect-ratio: auto; height: 180px; }
  .wiki-hero { grid-template-columns: 1fr; }
  .wiki-hero-index { display: none; }
  .chronology-callout { grid-template-columns: auto 1fr; padding: 2.5rem; }
  .chronology-callout .button { grid-column: 2; justify-self: start; }
  .az-group a { grid-template-columns: 80px minmax(160px, 1fr) auto; }
  .az-group a > p { display: none; }
  .history-hero { align-items: start; gap: 3rem; grid-template-columns: 1fr; min-height: auto; }
  .history-hero dl { display: flex; gap: 2rem; }
  .history-hero dl > div { flex: 1; }
  .history-method { grid-template-columns: auto 1fr; }
  .history-method > a { grid-column: 2; }
  .history-era-heading { grid-template-columns: 50px minmax(0, 1fr); }
  .comparison-hero { align-items: start; gap: 3rem; grid-template-columns: 1fr; }
}

@media (max-width: 590px) {
  .site-header { height: 68px; padding: 0 1rem; }
  .site-brand small, .button-label { display: none; }
  .theme-toggle { padding: 0 .45rem; }
  .home-hero { min-height: calc(100vh - 68px); padding: 4rem 1.2rem 6rem; }
  .hero-copy h1 { font-size: 3.25rem; }
  .hero-copy > p { font-size: 1rem; }
  .scroll-cue { display: none; }
  .ruled-section, .page-wrap, .book-index, .wiki-article-page { padding-left: 1.2rem; padding-right: 1.2rem; }
  .ruled-section { padding-bottom: 5rem; padding-top: 5rem; }
  .section-heading { align-items: start; flex-direction: column; }
  .book-grid, .library-grid { grid-template-columns: 1fr; }
  .book-card { display: grid; gap: 1rem; grid-template-columns: 135px 1fr; }
  .book-card-art, .library-grid .book-card-art { height: 190px; }
  .book-mark { height: 95px; width: 95px; }
  .book-mark b { font-size: 2rem; }.book-mark-star { top: .7rem; }.book-mark small { font-size: .4rem; }
  .book-card-copy { padding-top: 1rem; }
  .featured-grid, .category-grid, .spotlight-grid { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 2rem; }
  .site-footer nav { flex-wrap: wrap; }
  .page-hero { padding-top: 5rem; }
  .page-hero h1 { font-size: 3.7rem; }
  .book-hero { grid-template-columns: 1fr; padding-top: 3rem; }
  .book-hero-art { aspect-ratio: 3 / 2; }
  .book-hero-copy h1 { font-size: 3.8rem; }
  .book-stats { gap: 1rem; }
  .chapter-list a { gap: .8rem; grid-template-columns: 40px 1fr; }
  .chapter-list i { display: none; }
  .reader-note { align-items: start; padding: 1.3rem; }
  .adjacent-books { gap: 1rem; }
  .reading-progress { top: 67px; }
  .reader-rail { height: calc(100vh - 68px); top: 68px; }
  .reading-column { padding: 0 1.2rem 5rem; }
  .chapter-heading { padding-top: 4rem; }
  .chapter-heading h1 { font-size: 2.5rem; }
  .novel-text { font-size: min(var(--reader-size), 19px); line-height: 1.7; }
  .novel-text p { scroll-margin-top: 86px; }
  .reader-rights-notice { bottom: .75rem; left: .75rem; max-width: none; right: .75rem; width: auto; }
  .paragraph-link { left: -1em; }
  .chapter-nav { gap: 1rem; }
  .article-heading h1 { font-size: 4rem; }
  .article-lede { font-size: 1.25rem; }
  .related-grid { grid-template-columns: 1fr; }
  .source-group summary { grid-template-columns: auto 1fr auto; }
  .source-group summary > span:nth-of-type(2) { display: none; }
  .chronology-callout { display: block; }
  .chronology-callout .orbit { margin-bottom: 2rem; }
  .chronology-callout .button { margin-top: 1.5rem; }
  .az-group { grid-template-columns: 45px 1fr; }
  .az-group > h2 { font-size: 2rem; }
  .az-group a { grid-template-columns: 1fr auto; }
  .az-group a > span { grid-column: 1; }.az-group a > b { grid-column: 1; }.az-group a > i { grid-column: 2; grid-row: 1 / 3; }
  .timeline-key { justify-content: flex-start; }
  .timeline-row { gap: 1rem; grid-template-columns: 55px 1fr; }
  .timeline-year { grid-column: 2; padding: .2rem 0 0; }
  .timeline-copy { grid-column: 2; }
  .history-hero { margin-left: -1rem; margin-right: -1rem; margin-top: 1rem; padding: 3.5rem 1.2rem; }
  .history-hero h1 { font-size: 4rem; }
  .history-hero dl { border-left: 0; gap: .7rem; padding-left: 0; }
  .history-hero dt { font-size: 1.8rem; }
  .history-hero dd { font-size: .43rem; }
  .history-method { align-items: start; gap: 1rem; grid-template-columns: 1fr; padding: 1.2rem; }
  .history-method .ornament { height: 34px; width: 34px; }
  .history-method > a { grid-column: 1; }
  .history-era-nav { margin-left: -1rem; margin-right: -1rem; padding-left: .5rem; top: 67px; }
  .history-legend { justify-content: flex-start; }
  .history-era { padding-top: 4.5rem; }
  .history-era-heading { gap: .6rem; grid-template-columns: 32px minmax(0, 1fr); }
  .history-era-heading > span { font-size: 1.3rem; }
  .history-era-heading h2 { font-size: 2.6rem; }
  .history-events { margin-left: 20px; }
  .history-event { gap: .7rem; grid-template-columns: 40px minmax(0, 1fr); padding-bottom: 3rem; }
  .history-marker { margin-left: -20px; width: 40px; }
  .history-marker span { font-size: .55rem; height: 32px; width: 32px; }
  .history-event-main h3 { font-size: 1.85rem; }
  .history-sources { grid-template-columns: 1fr; }
  .history-sources > span { padding-top: 0; }
  .book-chronology { padding-top: 5rem; }
  .search-dialog { padding: .5rem; }
  .search-result { grid-template-columns: 1fr auto; }
  .search-result > span { grid-column: 1; }.search-result div { grid-column: 1; }.search-result > i { grid-column: 2; grid-row: 1 / 3; }
  .search-shell > footer { display: none; }
  .comparison-page { padding-left: 1rem; padding-right: 1rem; }
  .comparison-hero { margin-top: 1rem; min-height: auto; padding: 3rem 1.3rem; }
  .comparison-hero h1 { font-size: 3.5rem; }
  .comparison-key { display: none; }
  .comparison-row { padding: 4rem 0; }
  .comparison-row > header { gap: .7rem; grid-template-columns: 30px 1fr; }
  .comparison-pair { grid-template-columns: 1fr; }
  .comparison-pair figure + figure { margin-top: 2rem; }
  .comparison-end { align-items: center; display: flex; flex-direction: column; }
  .image-lightbox { padding: 3rem .5rem; }
  .image-lightbox img { height: calc(100vh - 7rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media print {
  .site-header, .site-footer, .reader-rail, .reader-tools, .reading-progress, .reader-rights-notice, .chapter-nav, .paragraph-link, .search-dialog { display: none !important; }
  body { background: #fff; color: #000; }
  .reader, .reading-column { display: block; margin: 0; max-width: none; padding: 0; }
  .novel-text { font-size: 11pt; max-width: none; }
}
