/* Six centuries, not one sentence read: stylesheet, second pass.
   Own look: vellum, iron-gall ink and the manuscript's own pigments. */

@font-face { font-family: "EVA Hand"; src: url("../fonts/evaa.ttf") format("truetype"); font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f1e7d3; --paper-2: #e8dcc3; --paper-3: #dccdaf; --paper-deep: #cdbb95;
  --ink: #241a12; --ink-2: #5b4a39; --ink-3: #8a7560;
  --rule: rgba(36, 26, 18, 0.16); --rule-strong: rgba(36, 26, 18, 0.42);
  --azurite: #2f6fb5; --copper: #4b8f2f; --ochre: #b5452c; --violet: #7b52c1; --gold: #a9801f;
  --series-1: #b5452c; --series-2: #2f6fb5; --series-3: #4b8f2f; --series-4: #7b52c1;
  --night: #1a1410; --night-2: #241c16; --vellum-on-night: #efe4cf; --vellum-dim: #c6b59b;
  --focus: #2f6fb5;
  --shadow: 0 18px 50px rgba(36, 26, 18, 0.22), 0 2px 6px rgba(36, 26, 18, 0.12);
  --frame: 0 0 0 1px rgba(36,26,18,.25), 0 30px 60px -20px rgba(0,0,0,.6), 0 8px 18px -8px rgba(0,0,0,.5);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --eva: "EVA Hand", serif;
  --measure: 64ch; --wide: 1180px; --gutter: 16px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.2 0 0 0 0 0.14 0 0 0 0 0.08 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #1a1410; --paper-2: #241c16; --paper-3: #31271e; --paper-deep: #3d3126;
    --ink: #efe4cf; --ink-2: #c6b59b; --ink-3: #9a8970;
    --rule: rgba(239, 228, 207, 0.16); --rule-strong: rgba(239, 228, 207, 0.42);
    --azurite: #5f95dd; --copper: #4f9a3e; --ochre: #e0674a; --violet: #9a7ad8; --gold: #d4a84b;
    --series-1: #e0674a; --series-2: #5f95dd; --series-3: #4f9a3e; --series-4: #9a7ad8;
    --focus: #5f95dd;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
    --frame: 0 0 0 1px rgba(239,228,207,.2), 0 30px 60px -20px rgba(0,0,0,.8), 0 8px 18px -8px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1a1410; --paper-2: #241c16; --paper-3: #31271e; --paper-deep: #3d3126;
  --ink: #efe4cf; --ink-2: #c6b59b; --ink-3: #9a8970;
  --rule: rgba(239, 228, 207, 0.16); --rule-strong: rgba(239, 228, 207, 0.42);
  --azurite: #5f95dd; --copper: #4f9a3e; --ochre: #e0674a; --violet: #9a7ad8; --gold: #d4a84b;
  --series-1: #e0674a; --series-2: #5f95dd; --series-3: #4f9a3e; --series-4: #9a7ad8;
  --focus: #5f95dd;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
  --frame: 0 0 0 1px rgba(239,228,207,.2), 0 30px 60px -20px rgba(0,0,0,.8), 0 8px 18px -8px rgba(0,0,0,.6);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  background-image: radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.35), transparent 50%), radial-gradient(ellipse at 90% 100%, rgba(120,80,30,.12), transparent 55%);
  font-family: var(--body); font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.2rem); line-height: 1.62;
  overflow-x: hidden; font-feature-settings: "liga", "kern", "onum"; position: relative;
}
/* parchment grain over everything, very faint */
body::before { content: ""; position: fixed; inset: 0; background-image: var(--grain); opacity: .5; pointer-events: none; z-index: 0; mix-blend-mode: multiply; }
:root[data-theme="dark"] body::before { opacity: .25; mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { opacity: .25; mix-blend-mode: screen; } }
body > * { position: relative; z-index: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--rule-strong); text-underline-offset: 0.16em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 4px; font-family: var(--ui); text-decoration: none; }
.skip:focus { top: 12px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.08; margin: 0; letter-spacing: -0.012em; }
h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.6rem); font-variation-settings: "opsz" 96, "SOFT" 50; }
h3 { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem); margin: 2.4em 0 .45em; font-variation-settings: "opsz" 48, "SOFT" 30; }
h3::before { content: ""; display: block; width: 44px; height: 3px; background: var(--ochre); margin-bottom: .55em; border-radius: 2px; }
h4 { font-family: var(--ui); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .74rem; color: var(--ink-2); margin: 1.6em 0 .4em; }
p { margin: 0 0 1.15em; }
p.lead { font-size: 1.18em; line-height: 1.5; }
strong { font-weight: 600; } em { font-style: italic; }
blockquote { margin: 2em 0; padding: .4em 0 .4em 1.3em; border-left: 3px solid var(--ochre); font-family: var(--display); font-size: 1.3em; line-height: 1.35; font-style: italic; font-variation-settings: "opsz" 36, "SOFT" 60, "WONK" 1; }
blockquote cite { display: block; margin-top: .6em; font-size: .62em; font-style: normal; font-family: var(--ui); color: var(--ink-2); letter-spacing: .04em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 3em auto; width: min(100%, var(--measure)); }
ul, ol { padding-left: 1.3em; } li { margin-bottom: .45em; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em; }
.eva { font-family: var(--eva); font-size: 1.35em; line-height: 1.3; letter-spacing: .02em; }
.small { font-size: .84em; color: var(--ink-2); font-family: var(--ui); line-height: 1.5; }
.ui { font-family: var(--ui); }

/* drop cap on the first paragraph of each chapter */
.drop::first-letter { font-family: var(--display); font-weight: 600; font-size: 3.9em; line-height: .78; float: left; margin: .08em .12em 0 0; color: var(--ochre); font-variation-settings: "opsz" 144, "SOFT" 80, "WONK" 1; }

/* star bullets, after the recipes section */
ul.stars { list-style: none; padding-left: 1.6em; }
ul.stars li { position: relative; }
ul.stars li::before { content: ""; position: absolute; left: -1.6em; top: .32em; width: 1em; height: 1em; background: var(--ochre); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l2.3 6.2 6.6.3-5.2 4.1 1.8 6.4L12 14.3 6.5 18l1.8-6.4L3.1 7.5l6.6-.3z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l2.3 6.2 6.6.3-5.2 4.1 1.8 6.4L12 14.3 6.5 18l1.8-6.4L3.1 7.5l6.6-.3z'/%3E%3C/svg%3E") center/contain no-repeat; }

/* ornament rule in Voynichese */
.orn { display: flex; align-items: center; gap: 18px; width: min(100% - 2 * var(--gutter), var(--measure)); margin: 2.6em auto; color: var(--ink-3); font-family: var(--eva); font-size: 1.5rem; letter-spacing: .08em; user-select: none; }
.orn::before, .orn::after { content: ""; flex: 1; height: 1px; background: var(--rule-strong); opacity: .6; }

/* ---------- citations ---------- */
sup.cite { font-size: .58em; line-height: 0; vertical-align: .5em; margin-left: .08em; }
sup.cite a { text-decoration: none; color: var(--azurite); font-family: var(--ui); font-weight: 600; padding: .1em .25em; border-radius: 3px; }
sup.cite a:hover, sup.cite a:focus-visible { background: var(--paper-3); }
.cite-pop { position: absolute; z-index: 60; max-width: min(340px, calc(100vw - 2 * var(--gutter))); background: var(--night); color: var(--vellum-on-night); padding: 10px 12px; border-radius: 6px; font-family: var(--ui); font-size: .8rem; line-height: 1.4; box-shadow: var(--shadow); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.cite-pop.show { opacity: 1; transform: none; } .cite-pop b { color: #d4a84b; }

/* ---------- layout ---------- */
.prose { width: min(100% - 2 * var(--gutter), var(--measure)); margin-inline: auto; }
.wide { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }
.chapter { padding: 0 0 clamp(3rem, 6vw, 6rem); position: relative; }
.chapter-head { width: min(100% - 2 * var(--gutter), var(--measure)); margin: 0 auto 2.2rem; }
.chapter-num { font-family: var(--ui); font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ochre); margin-bottom: .9rem; display: flex; align-items: center; gap: 12px; }
.chapter-num::after { content: ""; height: 1px; flex: 1; background: currentColor; max-width: 110px; opacity: .5; }
p.standfirst { font-family: var(--display); font-size: 1.32em; line-height: 1.38; margin-top: 1rem; color: var(--ink-2); font-variation-settings: "opsz" 30, "SOFT" 40; }

/* chapter opener: a full-bleed strip of the manuscript with the title over it */
.opener { position: relative; min-height: clamp(380px, 56vh, 620px); display: grid; align-items: end; overflow: hidden; background: var(--night); color: var(--vellum-on-night); margin-bottom: clamp(2.4rem, 5vw, 4.5rem); isolation: isolate; }
.opener img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); opacity: .78; filter: saturate(.85) contrast(1.02); z-index: -2; transform: scale(1.02); }
.opener::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(26,20,16,.35) 0%, rgba(26,20,16,.05) 30%, rgba(26,20,16,.82) 75%, rgba(26,20,16,.97) 100%); }
.opener .inner { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; padding: 22vh 0 2.6rem; }
.opener .chapter-num { color: #d4a84b; }
.opener h2 { max-width: 20ch; color: #f3eadb; text-shadow: 0 2px 30px rgba(0,0,0,.5); }
.opener p.standfirst { color: #d9ccb3; max-width: 58ch; }
.opener .credit { position: absolute; right: var(--gutter); bottom: 10px; font-family: var(--ui); font-size: .66rem; letter-spacing: .06em; color: rgba(239,228,207,.55); text-transform: uppercase; }

/* ---------- top bar / nav ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.topbar .inner { display: flex; align-items: center; gap: 12px; padding: 0 var(--gutter); height: 52px; width: min(100%, var(--wide)); margin-inline: auto; }
.brand { font-family: var(--display); font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap; font-variation-settings: "SOFT" 60; display: inline-flex; align-items: center; }
.brand .eva { font-size: 1.25em; margin-right: 6px; color: var(--ochre); }
.chapnav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; margin: 0 4px; }
.chapnav::-webkit-scrollbar { display: none; }
.chapnav a { font-family: var(--ui); font-size: .74rem; letter-spacing: .04em; text-decoration: none; white-space: nowrap; padding: 8px 10px; border-radius: 999px; color: var(--ink-2); min-height: 40px; display: inline-flex; align-items: center; }
.chapnav a[aria-current="true"] { background: var(--paper-3); color: var(--ink); }
.chapnav a:hover { color: var(--ink); }
.iconbtn { min-width: 40px; min-height: 40px; border: 1px solid var(--rule); background: transparent; border-radius: 999px; cursor: pointer; display: inline-grid; place-items: center; font-family: var(--ui); font-size: .78rem; padding: 0 12px; }
.iconbtn:hover { background: var(--paper-3); }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--ochre); transition: width .1s linear; }
@media (prefers-reduced-motion: reduce) { .progress { transition: none; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 94vh; display: grid; align-items: end; overflow: hidden; isolation: isolate; background: var(--night); color: var(--vellum-on-night); }
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 28%; opacity: .75; filter: saturate(.9) contrast(1.05); transform-origin: 50% 40%; }
.hero-img.animate { animation: drift 40s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.04) translateY(0); } to { transform: scale(1.14) translateY(-2.5%); } }
@media (prefers-reduced-motion: reduce) { .hero-img.animate { animation: none; } }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(26,20,16,.45) 0%, rgba(26,20,16,.08) 35%, rgba(26,20,16,.86) 78%, var(--night) 100%); }
.hero .inner { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; padding: 18vh 0 7vh; }
.hero .kicker { font-family: var(--ui); letter-spacing: .22em; text-transform: uppercase; font-size: .76rem; color: #d4a84b; margin-bottom: 1.2rem; }
.hero h1 { font-size: clamp(2.7rem, 2rem + 5.6vw, 7.2rem); font-weight: 400; line-height: .98; max-width: 14ch; font-variation-settings: "opsz" 144, "SOFT" 70, "WONK" 1; letter-spacing: -.02em; }
.hero h1 em { font-style: italic; color: #d4a84b; }
.hero .dek { max-width: 46ch; font-size: clamp(1.1rem, 1rem + .6vw, 1.4rem); line-height: 1.45; margin-top: 1.6rem; color: #e7dcc4; font-family: var(--display); font-variation-settings: "opsz" 30; }
.hero .byline { margin-top: 1.6rem; font-family: var(--ui); font-size: .8rem; color: #c6b59b; display: flex; gap: 1.4em; flex-wrap: wrap; }
.hero .eva-strip { position: absolute; right: var(--gutter); top: 18vh; writing-mode: vertical-rl; font-family: var(--eva); font-size: 1.6rem; color: rgba(239,228,207,.32); letter-spacing: .1em; user-select: none; }
@media (max-width: 700px) { .hero .eva-strip { display: none; } .hero { min-height: 86vh; } }
.hero .cue { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); font-family: var(--ui); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: #c6b59b; }

/* ---------- museum panels for pictures ---------- */
.museum { background: var(--night); color: var(--vellum-on-night); padding: clamp(1.6rem, 4vw, 3.2rem) 0; margin: 2.4em 0; position: relative; }
.museum::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, rgba(255,235,200,.08), transparent 60%); pointer-events: none; }
.museum .inner { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; position: relative; }
.museum .shelf { display: grid; gap: clamp(16px, 3vw, 36px); grid-template-columns: repeat(var(--cols, 3), 1fr); align-items: start; }
.museum figure { margin: 0; }
.museum figure img { box-shadow: var(--frame); border-radius: 3px; background: #2a211a; width: 100%; }
.museum figcaption { font-family: var(--ui); font-size: .8rem; line-height: 1.5; color: var(--vellum-dim); margin-top: .9em; }
.museum figcaption b { color: var(--vellum-on-night); font-weight: 600; }
.museum sup.cite a { color: #d4a84b; } .museum sup.cite a:hover { background: rgba(255,255,255,.08); }
.museum .note { font-family: var(--ui); font-size: .78rem; color: rgba(239,228,207,.55); margin-top: 1.4em; }
.museum.pair .shelf { --cols: 2; max-width: 900px; margin-inline: auto; }
.museum.single .shelf { --cols: 1; max-width: 820px; margin-inline: auto; }
.museum.portrait .shelf { grid-template-columns: minmax(220px, 300px) 1fr; align-items: center; }
.museum.portrait .text { font-family: var(--body); font-size: 1.02em; line-height: 1.6; color: #e7dcc4; }
.museum.portrait .text p { margin-bottom: 1em; }
@media (max-width: 760px) { .museum .shelf, .museum.pair .shelf, .museum.portrait .shelf { grid-template-columns: 1fr 1fr; } .museum.single .shelf, .museum.portrait .shelf { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .museum .shelf, .museum.pair .shelf { grid-template-columns: 1fr; } }

/* annotated image with pins, on a dark panel; notes beside it on desktop */
.walk { display: grid; gap: clamp(16px, 3vw, 40px); grid-template-columns: minmax(0, 7fr) minmax(260px, 5fr); align-items: start; }
@media (max-width: 860px) { .walk { grid-template-columns: 1fr; } }
.annot { position: relative; display: block; overflow: hidden; border-radius: 3px; box-shadow: var(--frame); background: #15100c; cursor: default; }
.annot img { width: 100%; display: block; will-change: transform; }
.annot.zoomed { cursor: zoom-out; }
.annot .pin.ring { background: transparent; border: 3px solid #f3eadb; color: transparent; width: 44px; height: 44px; margin: -22px 0 0 -22px; box-shadow: 0 0 0 2px rgba(0,0,0,.45), inset 0 0 0 2px rgba(0,0,0,.35); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 2px rgba(0,0,0,.45), inset 0 0 0 2px rgba(0,0,0,.35); } 50% { box-shadow: 0 0 0 7px rgba(243,234,219,.25), inset 0 0 0 2px rgba(0,0,0,.35); } }
@media (prefers-reduced-motion: reduce) { .annot .pin.ring { animation: none; } }
.annot.zoomed .pin:not(.ring) { opacity: .55; }
.annot-reset { position: absolute; right: 10px; bottom: 10px; z-index: 3; font-family: var(--ui); font-size: .74rem; font-weight: 600; padding: 7px 11px; border-radius: 999px; border: 1px solid rgba(243,234,219,.5); background: rgba(26,20,16,.8); color: #f3eadb; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .3s; min-height: 34px; }
.annot.zoomed .annot-reset { opacity: 1; pointer-events: auto; }
.pin-notes li { cursor: zoom-in; }
.pin { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; z-index: 2; border-radius: 50%; border: 2px solid #f3eadb; background: var(--ochre); color: #fff; font-family: var(--ui); font-weight: 700; font-size: .82rem; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.45); padding: 0; transition: transform .15s var(--ease); }
.pin:hover { transform: scale(1.12); }
.pin[aria-expanded="true"] { background: var(--azurite); transform: scale(1.15); }
.pin-notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pin-notes li { font-family: var(--ui); font-size: .86rem; line-height: 1.5; padding: 11px 13px; border: 1px solid rgba(239,228,207,.18); border-radius: 8px; background: rgba(255,255,255,.04); color: var(--vellum-dim); cursor: pointer; }
.pin-notes li.active { border-color: var(--azurite); box-shadow: inset 0 0 0 1px var(--azurite); color: var(--vellum-on-night); background: rgba(95,149,221,.1); }
.pin-notes b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ochre); color: #fff; font-size: .74rem; margin-right: 7px; vertical-align: middle; }
.pin-notes li.active b { background: var(--azurite); }
.walk .pin-notes { margin-top: 0; }
@media (max-width: 860px) { .pin-notes { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }

/* pan-zoom viewer */
.zoomer { position: relative; overflow: hidden; border-radius: 4px; box-shadow: var(--frame); background: #15100c; aspect-ratio: 16 / 10; touch-action: none; cursor: grab; }
.zoomer:active { cursor: grabbing; }
.zoomer img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: 0 0; will-change: transform; user-select: none; -webkit-user-drag: none; max-width: none; box-shadow: none; }
.zoomer .hot { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 2px solid #f3eadb; background: rgba(181,69,44,.92); color: #fff; font-family: var(--ui); font-weight: 700; font-size: .8rem; display: grid; place-items: center; cursor: pointer; padding: 0; }
.zoomer .hot[aria-expanded="true"] { background: var(--azurite); }
.zoom-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.museum .zoom-controls .btn { border-color: rgba(239,228,207,.35); color: var(--vellum-on-night); }
.museum .zoom-controls .btn:hover { background: rgba(255,255,255,.08); }
.museum .zoom-controls .small { color: rgba(239,228,207,.6); }
.zoom-note { font-family: var(--ui); font-size: .88rem; color: var(--vellum-on-night); min-height: 1.4em; margin-top: 8px; }
.zoom-note b { color: #d4a84b; }

.btn { font-family: var(--ui); font-size: .82rem; font-weight: 600; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--rule-strong); background: transparent; cursor: pointer; color: var(--ink); }
.btn:hover { background: var(--paper-3); }
.btn[aria-pressed="true"], .btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.small { min-height: 34px; padding: 4px 10px; font-size: .76rem; }

/* ---------- stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 2em 0; }
.stat { padding: 18px 16px 14px; border: 1px solid var(--rule); border-radius: 8px; background: linear-gradient(180deg, var(--paper-2), var(--paper)); position: relative; overflow: hidden; }
.stat::after { content: attr(data-eva); position: absolute; right: 8px; bottom: -6px; font-family: var(--eva); font-size: 2.4rem; color: var(--ink); opacity: .07; pointer-events: none; }
.stat .n { font-family: var(--display); font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.9rem); line-height: 1; font-variation-settings: "opsz" 72; }
.stat .l { font-family: var(--ui); font-size: .78rem; color: var(--ink-2); margin-top: 7px; line-height: 1.4; }

/* ---------- book map ---------- */
.bookmap { margin: 1.5em 0; }
.bookmap .controls { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.bookmap .legend { display: flex; gap: 6px 10px; flex-wrap: wrap; font-family: var(--ui); font-size: .78rem; color: var(--ink-2); margin: 10px 0; }
.bookmap .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(20px, 1fr)); gap: 3px; }
.bookmap .tile { aspect-ratio: 3 / 4; border-radius: 2px; border: 0; padding: 0; cursor: pointer; background: var(--c, var(--paper-3)); position: relative; transition: transform .15s var(--ease), opacity .2s; min-width: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.bookmap .tile:hover, .bookmap .tile:focus-visible { transform: scale(1.35); z-index: 2; outline-offset: 1px; }
.bookmap .tile.missing { background: transparent; border: 1px dashed var(--rule-strong); cursor: default; box-shadow: none; }
.bookmap .tile.fold::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: 2px; height: 2px; background: rgba(255,255,255,.7); }
.bookmap .tile.dim { opacity: .18; }
.bookmap .readout { font-family: var(--ui); font-size: .88rem; min-height: 3.2em; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper-2); line-height: 1.45; }
.bookmap .readout .tag { display: inline-block; font-size: .72rem; padding: 1px 7px; border-radius: 999px; background: var(--paper-3); margin-right: 6px; }
.sec-herbal { --c: #4b8f2f; } .sec-astronomical { --c: #2f6fb5; } .sec-zodiac { --c: #7b52c1; } .sec-cosmological { --c: #1f8f8a; }
.sec-biological { --c: #b5452c; } .sec-pharmaceutical { --c: #b58a2c; } .sec-recipes { --c: #8a7560; } .sec-text { --c: #5b4a39; }
.lang-A { --c: #2f6fb5; } .lang-B { --c: #b5452c; } .lang-none { --c: #bcae94; }
.hand-1 { --c: #2f6fb5; } .hand-2 { --c: #b5452c; } .hand-3 { --c: #4b8f2f; } .hand-4 { --c: #7b52c1; } .hand-5 { --c: #b58a2c; }

/* ---------- lives chart (the carbon date against the candidates) ---------- */
.lives { margin: 2.4em auto; font-family: var(--ui); --from: 1200; --to: 1950; padding: 20px 22px 16px; border: 1px solid var(--rule); border-radius: 12px; background: linear-gradient(180deg, var(--paper-2), var(--paper)); }
.lives .title { font-family: var(--display); font-weight: 500; font-size: 1.35rem; margin-bottom: 4px; font-variation-settings: "opsz" 30; color: var(--ink); }
.lives .sub { font-family: var(--ui); font-size: .84rem; color: var(--ink-2); margin-bottom: 18px; max-width: 72ch; line-height: 1.5; }
.lives .sub b { color: var(--copper); font-weight: 700; }
.lives .legend { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: .76rem; color: var(--ink-2); margin: 0 0 14px; }
.lives .legend span { display: inline-flex; align-items: center; gap: 6px; } .lives .legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.lives .body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.lives .chart-side { min-width: 0; }
.lives .row[role="button"] { cursor: pointer; }
.lives .row[role="button"]:hover { background: color-mix(in srgb, var(--paper-3) 60%, transparent); }
.lives .row[aria-expanded="true"] { background: color-mix(in srgb, var(--ochre) 10%, transparent); box-shadow: inset 3px 0 0 var(--ochre); }
.lives .panel { border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); padding: 14px 16px; font-size: .88rem; line-height: 1.55; min-height: 240px; position: sticky; top: 64px; }
.lives .panel h4 { margin: 0 0 8px; font-family: var(--display); text-transform: none; letter-spacing: 0; font-size: 1.3rem; font-weight: 500; color: var(--ink); }
.lives .panel p { margin-bottom: .7em; } .lives .panel .status { margin-left: 0; }
.lives .panel p.claim { display: block; border: 0; padding: 0; background: none; margin: 0 0 .7em; grid-template-columns: none; }
.lives .detail { display: none; } .lives .detail.show { display: block; }
@media (max-width: 900px) { .lives .body { grid-template-columns: 1fr; } .lives .panel { position: static; } }
.lives .axis { display: grid; grid-template-columns: 190px 1fr; align-items: end; margin-bottom: 6px; padding-top: 4px; }
.lives .axis .ticks { position: relative; height: 22px; border-bottom: 1px solid var(--rule-strong); }
.lives .axis .ticks span { position: absolute; bottom: 4px; transform: translateX(-50%); font-size: .72rem; color: var(--ink-2); letter-spacing: .04em; }
.lives .axis .ticks span::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 1px; height: 5px; background: var(--rule-strong); }
.lives .rows { position: relative; }
.lives .band { position: absolute; top: -8px; bottom: -8px; left: calc(190px + (var(--b0) - var(--from)) / (var(--to) - var(--from)) * (100% - 190px)); width: calc((var(--b1) - var(--b0)) / (var(--to) - var(--from)) * (100% - 190px)); background: linear-gradient(90deg, rgba(75,143,47,.14), rgba(75,143,47,.42), rgba(75,143,47,.14)); border-left: 1px dashed var(--copper); border-right: 1px dashed var(--copper); border-radius: 3px; pointer-events: none; }
.lives .band span { position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .72rem; font-weight: 700; color: var(--copper); letter-spacing: .04em; }
.lives .rows { margin-bottom: 26px; }
.lives .row { display: grid; grid-template-columns: 190px 1fr; align-items: center; min-height: 46px; border-top: 1px solid var(--rule); position: relative; }
.lives .row:last-child { border-bottom: 1px solid var(--rule); }
.lives .who { padding: 8px 14px 8px 2px; font-size: .86rem; line-height: 1.25; }
.lives .who b { display: block; font-family: var(--display); font-size: 1.05rem; font-weight: 500; }
.lives .who small { color: var(--ink-2); font-size: .72rem; }
.lives .track { position: relative; height: 46px; }
.lives .bar { position: absolute; top: 14px; height: 18px; left: calc((var(--a) - var(--from)) / (var(--to) - var(--from)) * 100%); width: max(4px, calc((var(--b) - var(--a)) / (var(--to) - var(--from)) * 100%)); border-radius: 4px; background: var(--ochre); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.lives .bar.ok { background: var(--gold); } .lives .bar.tool { background: var(--ink-3); width: 4px; }
.lives .verdict { position: absolute; top: 12px; left: calc((var(--b) - var(--from)) / (var(--to) - var(--from)) * 100% + 10px); font-size: .74rem; color: var(--ink-2); white-space: nowrap; line-height: 22px; }
.lives .verdict.flip { left: auto; right: calc((1 - (var(--a) - var(--from)) / (var(--to) - var(--from))) * 100% + 10px); }
.lives .verdict b { color: var(--ink); font-weight: 600; }
.lives .foot { font-size: .78rem; color: var(--ink-3); margin-top: 10px; line-height: 1.5; }
@media (max-width: 700px) {
  .lives .axis, .lives .row { grid-template-columns: 1fr; }
  .lives .who small { display: block; }
  .lives .axis .who { display: none; }
  .lives .band { left: calc((var(--b0) - var(--from)) / (var(--to) - var(--from)) * 100%); width: calc((var(--b1) - var(--b0)) / (var(--to) - var(--from)) * 100%); }
  .lives { padding: 14px 12px 12px; } .lives .who { padding: 8px 0 0; } .lives .track { height: 40px; } .lives .bar { top: 10px; }
  .lives .verdict { font-size: .68rem; top: 8px; }
}

/* ---------- timeline ---------- */
.timeline { position: relative; margin: 2em 0; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 0; bottom: 0; width: 2px; background: var(--rule); }
.tl-item { position: relative; margin-bottom: 1.7em; }
.tl-item::before { content: ""; position: absolute; left: -26px; top: .4em; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ochre); }
.tl-item.gap::before { border-color: var(--ink-3); border-style: dashed; }
.tl-item .when { font-family: var(--ui); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ochre); font-weight: 700; }
.tl-item .what { margin-top: .25em; } .tl-item .what p { margin-bottom: .4em; }
.status { display: inline-block; font-family: var(--ui); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--rule-strong); margin-left: 8px; vertical-align: middle; }
.status.documented { border-color: var(--copper); color: var(--copper); } .status.hearsay { border-color: var(--gold); color: var(--gold); } .status.contested { border-color: var(--ochre); color: var(--ochre); }
.tl-gap { font-family: var(--display); font-style: italic; color: var(--ink-2); padding: .5em 0 1.2em; font-size: 1.1em; font-variation-settings: "opsz" 36, "WONK" 1; }

/* ---------- glyph table ---------- */
.glyphs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin: 1.5em 0; }
.glyph { border: 1px solid var(--rule); border-radius: 8px; background: linear-gradient(180deg, var(--paper-2), var(--paper)); padding: 8px 6px 8px; text-align: center; cursor: pointer; display: grid; grid-template-rows: 58px auto auto; gap: 3px; justify-items: center; align-items: end; }
.glyph:hover, .glyph[aria-pressed="true"] { border-color: var(--azurite); box-shadow: inset 0 0 0 1px var(--azurite); }
.glyph .g { font-family: var(--eva); font-size: 2.3rem; line-height: 1; color: var(--ink); align-self: end; padding-bottom: 2px; }
.glyph .e { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; color: var(--ink-2); }
.glyph .k { font-family: var(--ui); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.glyph.gallows .g { color: var(--ochre); }
.glyph-note { font-family: var(--ui); font-size: .9rem; line-height: 1.55; min-height: 4.5em; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper-2); display: flex; align-items: center; gap: 12px; }
.glyph-note .g { font-family: var(--eva); font-size: 2.2rem; line-height: 1; flex: none; width: 48px; text-align: center; }

/* transliteration demo */
.translit { display: grid; gap: 12px; margin: 1.5em 0; }
.translit .line { display: grid; gap: 4px; padding: 14px 16px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper-2); }
.translit .ev { font-family: var(--eva); font-size: 1.75rem; line-height: 1.55; word-spacing: .35em; overflow-wrap: anywhere; padding-top: 4px; }
.translit .tr { font-family: ui-monospace, Menlo, monospace; font-size: .84rem; color: var(--ink-2); overflow-wrap: anywhere; line-height: 1.6; }
.translit .w { display: inline-block; border-radius: 3px; padding: 0 2px; }
.translit .w:hover, .translit .w.hl { background: color-mix(in srgb, var(--azurite) 25%, transparent); }
.typebox { display: grid; gap: 10px; margin: 1.5em 0; }
.typebox input { font: inherit; font-family: ui-monospace, Menlo, monospace; font-size: 1rem; padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--paper-2); color: var(--ink); width: 100%; }
.typebox .out { font-family: var(--eva); font-size: 2.4rem; line-height: 1.5; min-height: 1.6em; padding: 12px 14px 8px; border: 1px dashed var(--rule-strong); border-radius: 8px; overflow-wrap: anywhere; }

/* word builder */
.wordbuild { display: grid; gap: 12px; margin: 1.5em 0; padding: 18px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper-2); }
.wordbuild .slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wordbuild .slot { text-align: center; padding: 10px 4px 8px; border-radius: 8px; background: var(--paper); border: 1px solid var(--rule); display: grid; grid-template-rows: auto 48px auto; align-items: end; justify-items: center; gap: 4px; }
.wordbuild .slot .lab { font-family: var(--ui); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.wordbuild .slot .val { font-family: var(--eva); font-size: 2rem; line-height: 1; }
.wordbuild .slot .ev { font-family: ui-monospace, Menlo, monospace; font-size: .78rem; color: var(--ink-2); min-height: 1.2em; }
.wordbuild .result { font-family: var(--eva); font-size: 2.8rem; text-align: center; line-height: 1.4; padding-top: 6px; }
.wordbuild .result small { display: block; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; color: var(--ink-2); line-height: 1.2; }
.wordbuild .verdict { font-family: var(--ui); font-size: .88rem; text-align: center; color: var(--ink-2); min-height: 1.4em; }

/* ---------- charts ---------- */
.chart { margin: 2.4em 0; padding: 18px 18px 14px; border: 1px solid var(--rule); border-radius: 12px; background: linear-gradient(180deg, var(--paper-2), var(--paper)); }
.chart .title { font-family: var(--display); font-weight: 500; font-size: 1.25rem; margin-bottom: 2px; font-variation-settings: "opsz" 30; }
.chart .sub { font-family: var(--ui); font-size: .82rem; color: var(--ink-2); margin-bottom: 12px; max-width: 70ch; line-height: 1.5; }
.chart svg { width: 100%; height: auto; display: block; font-family: var(--ui); overflow: visible; }
.chart .legend { display: flex; gap: 8px 16px; flex-wrap: wrap; font-family: var(--ui); font-size: .78rem; color: var(--ink-2); margin-top: 8px; }
.chart .legend span { display: inline-flex; align-items: center; gap: 6px; } .chart .legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.chart .tip { position: absolute; pointer-events: none; background: var(--night); color: var(--vellum-on-night); font-family: var(--ui); font-size: .76rem; padding: 6px 9px; border-radius: 5px; opacity: 0; transition: opacity .12s; white-space: nowrap; z-index: 5; }
.chart .tip.show { opacity: 1; } .chart-wrap { position: relative; }
.chart table { width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: .82rem; margin-top: 8px; }
.chart th, .chart td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule); } .chart th { font-weight: 600; color: var(--ink-2); }
.chart td.num, .chart th.num { text-align: right; font-variant-numeric: tabular-nums; }
.chart .toggle { margin-top: 8px; } .chart .table-view[hidden] { display: none; }
.chart .source { font-family: var(--ui); font-size: .74rem; color: var(--ink-3); margin-top: 8px; line-height: 1.5; }

/* ---------- binding animation ---------- */
.binding { margin: 2em 0; padding: 20px; border: 1px solid var(--rule); border-radius: 12px; background: linear-gradient(180deg, var(--paper-2), var(--paper)); }
.binding .modes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.binding svg { width: 100%; height: auto; display: block; overflow: visible; }
.binding .leaf { transition: transform .9s var(--ease), opacity .6s; }
.binding .pg { font-family: var(--display); font-size: 14px; font-weight: 600; }
.binding .explain { font-family: var(--ui); font-size: .92rem; line-height: 1.55; margin-top: 12px; min-height: 4.5em; }
.binding .explain b { color: var(--ochre); }
.binding .order { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.binding .order span { padding: 3px 8px; border-radius: 4px; background: var(--paper); border: 1px solid var(--rule); transition: background .4s; }
.binding .order span.a { border-color: var(--ochre); background: color-mix(in srgb, var(--ochre) 18%, var(--paper)); }
.binding .order .arrow { color: var(--ink-3); border: 0; background: none; padding: 0; }
@media (prefers-reduced-motion: reduce) { .binding .leaf { transition: none; } }

/* ---------- zodiac ring ---------- */
.zring { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: clamp(16px, 3vw, 40px); align-items: center; margin: 1.5em 0; }
.zring .ring { position: relative; aspect-ratio: 1; max-width: 560px; margin-inline: auto; width: 100%; }
.zring .ring::before { content: ""; position: absolute; inset: 9%; border-radius: 50%; border: 1px dashed var(--rule-strong); }
.zring .sign { position: absolute; left: 50%; top: 50%; width: 17%; aspect-ratio: 1; margin: -8.5% 0 0 -8.5%; border-radius: 50%; padding: 0; border: 2px solid var(--paper-deep); background: var(--paper-2); cursor: pointer; overflow: hidden; transform: translate(var(--x), var(--y)); transition: transform .3s var(--ease), box-shadow .2s; box-shadow: 0 6px 18px -6px rgba(0,0,0,.5); }
.zring .sign img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.05); }
.zring .sign:hover { transform: translate(var(--x), var(--y)) scale(1.1); z-index: 2; }
.zring .sign[aria-pressed="true"] { border-color: var(--ochre); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ochre) 35%, transparent), 0 6px 18px -6px rgba(0,0,0,.5); z-index: 2; }
.zring .sign.lost { border-style: dashed; border-color: var(--ink-3); background: transparent; box-shadow: none; display: grid; place-items: center; font-family: var(--ui); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); text-align: center; line-height: 1.2; }
.zring .sign .lab { position: absolute; left: 0; right: 0; bottom: 0; font-family: var(--ui); font-size: .6rem; letter-spacing: .06em; text-transform: uppercase; background: rgba(26,20,16,.7); color: #efe4cf; padding: 2px 0; }
.zring .centre { position: absolute; left: 50%; top: 50%; width: 44%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; overflow: hidden; box-shadow: var(--frame); background: var(--paper-2); display: grid; place-items: center; }
.zring .centre img { width: 100%; height: 100%; object-fit: cover; }
.zring .centre .empty { font-family: var(--display); font-style: italic; color: var(--ink-2); text-align: center; padding: 10%; font-size: 1.1rem; }
.zring .info { font-family: var(--ui); font-size: .9rem; line-height: 1.55; padding: 18px 20px; border: 1px solid var(--rule); border-radius: 12px; background: linear-gradient(180deg, var(--paper-2), var(--paper)); min-height: 12em; }
.zring .info h4 { margin-top: 0; font-family: var(--display); text-transform: none; letter-spacing: 0; font-size: 1.5rem; font-weight: 500; color: var(--ink); }
.zring .info dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0; font-size: .84rem; }
.zring .info dt { color: var(--ink-3); } .zring .info dd { margin: 0; }
.zring .info .nav { display: flex; gap: 8px; margin-top: 12px; }
.zring .wheel-note { font-family: var(--ui); font-size: .78rem; color: var(--ink-2); text-align: center; margin-top: 8px; }
@media (max-width: 760px) { .zring { grid-template-columns: 1fr; } .zring .ring { max-width: 420px; } .zring .sign .lab { font-size: .5rem; } }

/* ---------- claims ledger ---------- */
.ledger { margin: 1.5em 0; }
.ledger .filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.claim { border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; background: linear-gradient(180deg, var(--paper-2), var(--paper)); display: grid; grid-template-columns: 72px 1fr; gap: 12px; }
.claim .yr { font-family: var(--display); font-size: 1.5rem; font-variation-settings: "opsz" 48; color: var(--ink-2); line-height: 1; }
.claim h4 { margin: 0 0 4px; text-transform: none; letter-spacing: 0; font-size: 1.05rem; color: var(--ink); font-family: var(--body); font-weight: 600; }
.claim p { font-size: .92em; margin-bottom: .5em; }
.claim .verdict { font-family: var(--ui); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; display: inline-block; margin-bottom: 8px; font-weight: 700; }
.v-refuted { background: color-mix(in srgb, var(--ochre) 18%, transparent); color: var(--ochre); }
.v-unsupported { background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--gold); }
.v-unproven { background: color-mix(in srgb, var(--ink-3) 22%, transparent); color: var(--ink-2); }
.v-accepted { background: color-mix(in srgb, var(--copper) 20%, transparent); color: var(--copper); }
.claim[hidden] { display: none; }
.ledger .count { font-family: var(--ui); font-size: .8rem; color: var(--ink-2); margin-bottom: 8px; }
@media (max-width: 480px) { .claim { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- three columns ---------- */
.kag { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin: 1.5em 0; }
.kag section { border: 1px solid var(--rule); border-radius: 12px; padding: 18px 20px; background: linear-gradient(180deg, var(--paper-2), var(--paper)); }
.kag h4 { margin-top: 0; display: flex; align-items: center; gap: 8px; } .kag h4 i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.kag ul { padding-left: 1.1em; font-size: .92em; } .kag li { margin-bottom: .5em; }

/* ---------- misc ---------- */
.aside { border-left: 3px solid var(--azurite); padding: .2em 0 .2em 1.1em; margin: 1.8em 0; font-size: .95em; }
.sources ol { padding-left: 2.2em; font-family: var(--ui); font-size: .85rem; line-height: 1.5; }
.sources li { margin-bottom: .7em; } .sources li:target { background: color-mix(in srgb, var(--gold) 22%, transparent); border-radius: 4px; }
.sources li .t { font-weight: 600; }
footer.site { border-top: 1px solid var(--rule); padding: 3rem 0 4rem; font-family: var(--ui); font-size: .85rem; color: var(--ink-2); }
footer.site a { color: var(--ink); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.scroll-hint { display: none; font-family: var(--ui); font-size: .72rem; color: var(--ink-3); margin-top: 4px; }

/* ---------- about page ---------- */
.about h2 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); margin-top: 2em; }
.about .chapter { padding-top: 2rem; }
.diary .entry { border-top: 1px solid var(--rule); padding: 1.4em 0; }
.diary .entry .date { font-family: var(--ui); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ochre); }
.diary .entry.milestone .date::after { content: "Milestone"; margin-left: 10px; padding: 1px 8px; border-radius: 999px; background: var(--gold); color: #1a1410; font-size: .68rem; letter-spacing: .06em; }
.diary .entry h3 { margin-top: .3em; font-size: 1.3rem; } .diary .entry h3::before { display: none; }

@media (max-width: 700px) {
  .chapter { padding-bottom: 2.6rem; } .binding { padding: 12px; }
  .wordbuild .slots { grid-template-columns: repeat(2, 1fr); }
  .brand .word { display: none; } .topbar .inner { gap: 6px; }
  .chart-wrap, .binding .stage { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .chart svg { min-width: 640px; } .binding svg { min-width: 560px; }
  .scroll-hint { display: block; }
  .opener .inner { padding-top: 16vh; }
}
@media print { .topbar, .cue, .zoom-controls, .btn { display: none !important; } .reveal { opacity: 1; transform: none; } body::before { display: none; } }
