@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/eb-garamond-normal.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/eb-garamond-italic.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/eb-garamond-normal.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/eb-garamond-italic.woff2") format("woff2");
}

:root {
  --bg: #101010;
  --bg-deep: #0b0b0b;
  --ink: #ece4d6;
  --muted: #a79c8c;
  --soft: #d9d0c1;
  --line: #2b2825;
  --paper: #f2ebdd;
  --brown: #231d17;
  --accent: #e0644b;
  --seal: #7e2418;
  --blue: #3a5f80;
  --gold: #c9a45c;
  --ice: #8fb3d1;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--paper);
  color: var(--brown);
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { left: 12px; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  font-family: var(--serif);
  letter-spacing: 0.28em;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
}
.primary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.primary-nav a {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { color: var(--ink); }
.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid #34302b;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}

.landing { background: var(--bg); color: var(--ink); font-family: var(--serif); min-height: 100vh; }
.landing a { color: var(--ink); }
.wrap { max-width: 1320px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.landing > .wrap:first-child { padding-top: 20px; padding-bottom: 8px; }
.kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
  gap: 48px;
  align-items: center;
  min-height: 760px;
  padding-top: 24px;
  padding-bottom: 96px;
}
.hero-copy { display: flex; flex-direction: column; gap: 28px; max-width: 680px; }
.hero h1 {
  margin: 0;
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0.08em;
  font-size: clamp(42px, 6vw, 86px);
  white-space: nowrap;
}
.hero h1 span {
  display: block;
  font-size: 0.32em;
  letter-spacing: 0.42em;
  margin-top: 22px;
  color: #cfc5b4;
}
.byline { margin: 0; letter-spacing: 0.32em; font-size: 15px; color: #cfc5b4; }
.lede {
  margin: 8px 0 0;
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  color: var(--soft);
  max-width: 36em;
}
.more-cue { margin: 4px 0 0; }
.more-cue a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
.more-cue a:hover { color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 12px; }
.cta, .ghost {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  min-height: 48px;
  padding: 16px 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
}
a.cta { background: var(--paper); color: #1a1612; }
a.cta:hover { background: #fff; color: #1a1612; }
.ghost { color: var(--ink); border: 1px solid #4a443d; padding: 16px 24px; }
.ghost:hover { border-color: var(--ink); }
.mobius {
  width: 100%;
  max-width: 620px;
  height: auto;
  display: block;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.band { border-top: 1px solid var(--line); }
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 64px;
  padding-top: 112px;
  padding-bottom: 112px;
}
.split h2, .block-title {
  margin: 0;
  font-weight: 400;
  font-size: clamp(36px, 4vw, 48px);
  line-height: 1.12;
}
.prose { font-size: 21px; line-height: 1.6; color: var(--soft); }
.prose p { margin: 0 0 24px; }
.facts {
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-size: 22px; }
.strip-section { background: #171615; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; padding-top: 96px; }
.strip-head h2 { margin: 12px 0 0; font-weight: 400; font-size: 40px; line-height: 1.15; }
.strip-link {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
}
.strip {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 40px 0 72px;
}
.thumb {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--muted);
}
.thumb img {
  height: 300px;
  width: auto;
  display: block;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.35s ease, filter 0.35s ease;
  filter: brightness(0.92);
}
.thumb:hover img { transform: translateY(-4px); filter: brightness(1); }
.thumb span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.thumb strong { color: var(--ink); font-weight: 400; }
.key-card {
  background: var(--paper);
  color: var(--brown);
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.key-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: baseline;
  border-bottom: 1px solid #d9cdb7;
  padding-bottom: 22px;
  font-size: 23px;
}
.key-row:last-child { border-bottom: 0; padding-bottom: 0; }
.key-row .pct { font-family: var(--mono); font-size: 12px; color: var(--blue); }
.accent-picker { display: flex; gap: 8px; align-items: center; }
.accent-picker button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
}
.accent-picker button.on { outline: 1px solid var(--ink); outline-offset: 3px; }
.pull {
  max-width: 980px;
  margin: 0 auto;
  padding: 128px 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  text-align: center;
}
.pull blockquote {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.3;
  font-style: italic;
}
.pull figcaption, .stars { font-family: var(--mono); }
.stars { color: var(--accent); letter-spacing: 0.6em; font-size: 14px; }
.pull figcaption { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.seal {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--seal);
  box-shadow: inset 0 0 0 10px #6a1d13, inset 0 0 0 12px #9a3424, 0 24px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  color: #e9c9b9;
}
.seal .mark { font-size: 44px; line-height: 1; }
.seal .word { font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; }
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.site-footer .wrap { padding: 40px 32px 56px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }

.reader { background: var(--paper); color: var(--brown); font-family: var(--serif); min-height: 100vh; }
.reader-bar { background: var(--bg); color: var(--ink); position: sticky; top: 0; z-index: 5; }
.reader-bar .inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.reader-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tbtn {
  background: transparent;
  border: 1px solid #3b3631;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  min-height: 36px;
  min-width: 36px;
  padding: 0 12px;
  cursor: pointer;
}
.tbtn:hover { border-color: var(--ink); }
.tbtn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.progress { height: 2px; background: var(--line); }
.progress > div { height: 2px; width: 0; background: var(--accent); transition: width 0.25s ease; }
.reader-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px 120px;
  display: flex;
  gap: 56px;
  align-items: flex-start;
}
.toc {
  flex: 0 0 240px;
  position: sticky;
  top: 78px;
  padding: 56px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.toc .tbtn { color: var(--brown); border-color: #8a7d6d; background: #f7f1e6; }
.toc .tbtn:hover { border-color: var(--brown); color: var(--brown); }
.toc p { margin: 0 0 8px; letter-spacing: 0.14em; text-transform: uppercase; color: #6a5e50; }
.toc a { color: #5e5246; text-decoration: none; display: flex; justify-content: space-between; gap: 8px; }
.toc a:hover { color: var(--brown); }
.toc a[aria-current="true"] {
  color: var(--brown);
  font-weight: 500;
  border-left: 2px solid #a8321f;
  padding-left: 10px;
  margin-left: -12px;
}
.toc .sealed-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8a7d6d;
  margin-top: 8px;
  border-top: 1px solid #d9cdb7;
  padding-top: 18px;
}
.reader-main { flex: 1 1 560px; min-width: 0; padding: 56px 0 0; }
.edition-section { scroll-margin-top: 84px; padding-bottom: 72px; }
.edition-section + .edition-section { border-top: 1px solid #d9cdb7; padding-top: 72px; }
.section-kicker { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #6a5e50; }
.edition-section h1 { margin: 10px 0 0; font-weight: 400; font-size: clamp(40px, 5vw, 52px); line-height: 1.1; }
.folio-range { margin: 10px 0 0; font-family: var(--mono); font-size: 13px; color: var(--blue); }
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 660px) minmax(220px, 300px);
  gap: 40px 56px;
  margin-top: 40px;
}
.reading {
  font-size: var(--read-size, 21px);
  line-height: 1.66;
  max-width: 660px;
}
.reading p { margin: 0 0 0.9em; }
.banner {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--blue);
  background: #e9e1d1;
  padding: 22px 24px;
  margin-bottom: 1.2em;
}
.banner strong { display: block; margin-bottom: 8px; font-weight: 500; }
.ornament { text-align: center; color: #8a7d6d; letter-spacing: 0.6em; font-size: 13px; }
.reader .c2, .reader .c1 { font-style: normal; font-weight: 400; }
.reader.marks .c2 { font-style: italic; }
.reader.marks .c1 { font-style: italic; font-weight: 700; }
.reader.marks .lac { color: #a8321f; }
.lac { cursor: help; text-decoration: none; border-bottom: 1px dotted currentColor; }
.variant {
  font: inherit;
  background: transparent;
  border: 0;
  padding: 0 2px;
  cursor: pointer;
  color: inherit;
  border-bottom: 1.5px solid var(--blue);
}
.variant:hover { background: #e3eaf0; }
.apparatus {
  display: flex;
  flex-direction: column;
  gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--blue);
}
.vellum-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-decoration: none;
  color: var(--brown);
}
.vellum-card img { width: 96px; height: auto; display: block; box-shadow: 0 6px 18px rgba(35, 29, 23, 0.25); }
.vellum-card .eyebrow { letter-spacing: 0.12em; text-transform: uppercase; color: #6a5e50; }
.vellum-card .label { font-family: var(--serif); font-size: 19px; line-height: 1.3; display: block; margin-top: 6px; }
.vellum-card .go { color: var(--seal); display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.note { border-top: 1px solid #d9cdb7; padding-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.note .eyebrow { letter-spacing: 0.12em; text-transform: uppercase; color: #6a5e50; }
.note p { margin: 0; }
.note em { font-family: var(--serif); font-size: 15px; }
.picks { display: flex; margin-top: 4px; }
.pick {
  font-family: var(--mono);
  font-size: 12px;
  min-height: 40px;
  padding: 0 12px;
  cursor: pointer;
  border: 1px solid var(--blue);
  background: transparent;
  color: var(--blue);
}
.pick.on { background: var(--blue); color: var(--paper); }
.section-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  border-top: 1px solid #d9cdb7;
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-nav a { color: var(--seal); text-decoration: none; min-height: 44px; display: flex; align-items: center; }
.reader-bottom, .vellum-pill { display: none; }

.viewer-app {
  height: 100vh;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--mono);
}
.viewer-top {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  padding: 6px 16px;
  gap: 10px;
}
.viewer-top .ib { min-width: 32px; min-height: 32px; }
.viewer-title { display: flex; align-items: center; gap: 12px; }
.folio-name { font-family: var(--serif); font-size: 18px; line-height: 1.1; text-align: center; min-width: 108px; }
.folio-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-align: center; }
.ib {
  background: #1b1a18;
  border: 1px solid #34302b;
  color: var(--ink);
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  padding: 0 10px;
}
.ib:hover { border-color: #8c8274; }
.seg-group { display: flex; border: 1px solid #34302b; flex-wrap: wrap; }
.seg {
  background: transparent;
  border: 0;
  color: var(--muted);
  min-height: 30px;
  padding: 0 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.seg.on { background: var(--ink); color: var(--bg); }
.viewer-body { flex: 1 1 auto; min-height: 0; display: flex; }
.stage {
  flex: 1 1 560px;
  min-width: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  background: var(--bg-deep);
}
.stage.drag { cursor: grabbing; }
.stage-transform { transform-origin: center center; display: flex; }
.leaf-frame { position: relative; display: inline-block; line-height: 0; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); }
.leaf-frame > img, .opening img { height: min(68vh, 720px); width: auto; display: block; user-select: none; }
.opening { display: flex; background: #1a1714; }
.gutter { width: 2px; background: var(--bg-deep); }
.overlays { position: absolute; inset: 0; }
.ov-conf, .ov-band, .ov-dmg, .ov-hand, .ov-dip, .ov-lac { position: absolute; box-sizing: border-box; }
.overlays:not(.show-conf) .ov-conf,
.overlays:not(.show-conf) .ov-band,
.overlays:not(.show-dmg) .ov-dmg,
.overlays:not(.show-dmg) .ov-lac,
.overlays:not(.show-hand) .ov-hand,
.overlays:not(.show-dips) .ov-dip { display: none; }
.ov-lac { background: #a8321f; color: #fbede7; font-size: 9px; padding: 1px 4px; letter-spacing: 0.04em; line-height: 1.3; }
.ov-hand-label {
  position: absolute;
  right: 1.5%;
  background: #1c2c3a;
  color: #cfe0ee;
  font-size: 8px;
  padding: 2px 4px;
  white-space: nowrap;
  line-height: 1.3;
}
.stage-hint { position: absolute; left: 24px; top: 16px; margin: 0; font-size: 11px; color: #8c8274; letter-spacing: 0.04em; }
.zoombar, .minimap {
  position: absolute;
  bottom: 20px;
  background: rgba(16, 16, 16, 0.86);
  border: 1px solid var(--line);
}
.zoombar { left: 20px; display: flex; gap: 4px; align-items: center; padding: 6px; }
.zoombar span { min-width: 56px; text-align: center; font-size: 12px; color: #cfc5b4; }
.minimap { right: 20px; padding: 8px; }
.minimap-frame { position: relative; height: 112px; }
.minimap img { height: 112px; width: auto; display: block; opacity: 0.8; }
#minimap-rect { position: absolute; border: 1.5px solid var(--accent); box-sizing: border-box; pointer-events: none; }
.viewer-panel {
  flex: 0 0 340px;
  max-width: 360px;
  overflow: auto;
  background: #131211;
  border-left: 1px solid var(--line);
  padding: 8px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.tabs { display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
.panel-hide, .panel-show {
  margin-left: auto;
  background: transparent;
  border: 1px solid #34302b;
  color: var(--muted);
  min-height: 30px;
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.panel-hide:hover, .panel-show:hover { border-color: var(--ink); color: var(--ink); }
.panel-show { display: none; margin-left: 0; }
.viewer-app.panel-hidden .viewer-panel { display: none; }
.viewer-app.panel-hidden .panel-show {
  display: inline-flex;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}
.tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  min-height: 44px;
  padding: 0 4px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.layer {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.layer small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.sw { width: 34px; height: 20px; border-radius: 10px; background: #34302b; position: relative; }
.sw::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #8c8274;
}
.layer.on .sw { background: var(--ink); }
.layer.on .sw::after { left: 17px; background: var(--bg); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.legend i { width: 10px; height: 10px; display: inline-block; margin-right: 6px; }
.meta {
  margin: 0;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  font-size: 12px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.meta dt { color: var(--muted); }
.meta dd { margin: 0; font-family: var(--serif); font-size: 16px; }
.hand-note { margin: 0; font-size: 12px; line-height: 1.6; color: var(--ice); border-top: 1px solid var(--line); padding-top: 16px; }
.read-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  border: 1px solid #34302b;
  padding: 0 16px;
  text-decoration: none;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.trans-intro { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.6; }
.trans { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.trans li { display: grid; grid-template-columns: 22px 1fr 40px; gap: 10px; align-items: baseline; }
.trans .n, .trans .pct { font-size: 10px; color: #8c8274; }
.trans .line { font-family: var(--serif); font-size: 16px; line-height: 1.35; }
.filmstrip {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 6px 12px 6px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  align-items: flex-end;
}
.ft {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  color: #8c8274;
  font-family: var(--mono);
  font-size: 10px;
}
.ft img { height: 46px; width: auto; display: block; outline: 2px solid transparent; outline-offset: 2px; opacity: 0.72; }
.ft:hover img, .ft.on img { opacity: 1; }
.ft.on img { outline-color: var(--ink); }
.ft.on { color: var(--ink); }
.film-gap {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 6px;
  color: #6e665c;
  font-size: 10px;
  border-left: 1px solid var(--line);
}
.dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }

.folios { background: var(--bg); color: var(--ink); font-family: var(--serif); min-height: 100vh; }
.folios header { border-bottom: 1px solid var(--line); }
.folios header .wrap { padding-top: 20px; padding-bottom: 20px; }
.folios main { padding-top: 72px; padding-bottom: 120px; display: flex; flex-direction: column; gap: 48px; }
.folios h1 { margin: 14px 0 0; font-weight: 400; font-size: clamp(40px, 5vw, 56px); line-height: 1.05; }
.intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 32px 64px;
  align-items: end;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 24px; }
.chip {
  background: transparent;
  border: 1px solid #3b3631;
  color: #cfc5b4;
  min-height: 40px;
  padding: 0 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .count { opacity: 0.7; }
.folio-section {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px 48px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.folio-section h2 { margin: 0; font-weight: 400; font-size: 26px; line-height: 1.2; }
.range { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.leaf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 28px 20px;
}
.leaf { text-decoration: none; color: var(--muted); display: flex; flex-direction: column; gap: 10px; }
.leaf img { width: 100%; height: auto; display: block; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); transition: transform 0.3s ease; }
.leaf:hover img { transform: translateY(-4px); }
.leaf.dim { opacity: 0.22; }
.leaf .cap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
}
.leaf .cap b { color: var(--ink); font-weight: 400; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

.colophon { background: var(--bg); color: var(--ink); font-family: var(--serif); min-height: 100vh; }
.seal-view { min-height: 100vh; display: flex; flex-direction: column; }
.seal-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 48px 24px 96px;
  text-align: center;
}
.seal-copy { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.seal-copy h1 { margin: 0; font-weight: 400; font-size: clamp(36px, 5vw, 48px); line-height: 1.1; }
.seal-copy p { margin: 0; font-size: 21px; line-height: 1.6; color: var(--soft); }
.pips { display: flex; gap: 6px; align-items: center; }
.pips i { width: 28px; height: 3px; background: #34302b; display: block; }
.pips i.on { background: var(--accent); }
.pips span { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: 10px; }
.quiet {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 44px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.quiet:hover { color: var(--ink); }
.confirm {
  border: 1px solid var(--seal);
  background: #1a1210;
  padding: 20px 24px;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.confirm p { margin: 0; font-size: 19px; line-height: 1.5; }
.confirm-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.break {
  border: 1px solid var(--accent);
  color: #f6d9cf;
  background: transparent;
  text-decoration: none;
  padding: 0 20px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.paper-note { background: var(--paper); color: var(--brown); }
.note-credit { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: #6A5E50; }
.paper-note .split {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 64px;
  row-gap: 18px;
}
.paper-note .note-head { grid-column: 1; grid-row: 1; }
.paper-note .note-body,
.paper-note .note-aside {
  font-size: 22px;
  line-height: 1.65;
}
.paper-note .note-body { grid-column: 1; grid-row: 2; gap: 22px; }
.paper-note .note-body p { margin: 0; }
.paper-note .note-aside { grid-column: 2; grid-row: 2; padding-top: 0; gap: 22px; }
.note-callout {
  margin: 0;
  padding: 20px 22px;
  border: 1px solid #c4b8a4;
  background: #e7decc;
}
.twist { margin: 0; font-size: clamp(18px, 2.2vw, 30px); line-height: 1.15; }
.twist em { font-style: italic; color: var(--seal); }
.work h2 { margin: 0; font-weight: 400; font-size: clamp(36px, 4vw, 48px); line-height: 1.1; }
.loop { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.loop article {
  border: 1px solid #34302b;
  background: #151413;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 190px;
}
.loop article:first-child { border-color: var(--ice); background: #121a21; }
.loop .step { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.loop article:first-child .step { color: var(--ice); }
.loop strong { font-size: 28px; font-weight: 400; line-height: 1.1; }
.loop span { font-size: 17px; line-height: 1.5; color: #cfc5b4; }
.loop-return {
  margin: 0 8%;
  height: 40px;
  border: 1.5px solid var(--ice);
  border-top: 0;
}
.loop-caption { margin: 12px 0 0; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--ice); letter-spacing: 0.06em; }
.stage-block { border-bottom: 1px solid var(--line); }
.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: 56px;
  align-items: start;
  padding-top: 96px;
  padding-bottom: 96px;
}
.stage-grid h3 { margin: 0; font-weight: 400; font-size: 38px; line-height: 1.15; }
.stage-grid p { margin: 0; font-size: 20px; line-height: 1.6; color: var(--soft); }
.stack { display: flex; flex-direction: column; gap: 18px; }
pre, .specimen {
  margin: 0;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  padding: 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: #cfc5b4;
  overflow-x: auto;
  white-space: pre-wrap;
}
figcaption, .caption { font-family: var(--mono); font-size: 11px; color: #8c8274; }
.state-table {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, auto);
  gap: 10px 20px;
  font-family: var(--mono);
  font-size: 12px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  align-items: baseline;
}
.state-table span:nth-child(-n+4) { color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills span { border: 1px solid #34302b; padding: 6px 10px; font-family: var(--mono); font-size: 11px; color: #cfc5b4; }
.bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  height: 180px;
}
.bars div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; height: 100%; }
.bars b { width: 100%; display: block; }
.bars em, .bar-labels span { font-family: var(--mono); font-size: 11px; font-style: normal; color: #cfc5b4; }
.bar-labels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; text-align: center; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.chart { border: 1px solid var(--line); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.stats {
  margin: 0;
  padding-top: 72px;
  padding-bottom: 72px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}
.stats div { display: flex; flex-direction: column-reverse; gap: 8px; }
.stats dt { font-family: var(--mono); font-size: 12px; color: var(--muted); line-height: 1.5; }
.stats dd { margin: 0; font-size: 56px; line-height: 1; }
.closing {
  max-width: 980px;
  margin: 0 auto;
  padding: 96px 32px 112px;
  text-align: center;
}
.closing p { margin: 20px 0 0; font-size: 28px; line-height: 1.45; font-style: italic; }
.closing .kicker { margin-top: 28px; font-size: 12px; font-style: normal; color: var(--muted); }
.callout img, .compare img { width: 100%; height: auto; display: block; border: 1px solid var(--line); }
.hand-figures { gap: 28px; }
.hand-figures figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hand-figures figure.hand-plate { width: 60%; align-self: flex-end; }

@media (max-width: 1100px) {
  .toc { display: none; }
  .toc.open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 30;
    background: var(--paper);
    padding: 28px 24px 40px;
    overflow: auto;
  }
  .section-grid { grid-template-columns: 1fr; }
  .folio-section { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .primary-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 0; }
  .site-header.nav-open .primary-nav { display: flex; }
  .hero { min-height: 0; padding-bottom: 48px; }
  .landing > .wrap:first-child { padding-top: 12px; padding-bottom: 4px; }
  .split, .stage-grid { padding-top: 64px; padding-bottom: 64px; gap: 28px; }
  .paper-note .split { grid-template-columns: 1fr; column-gap: 0; row-gap: 28px; }
  .paper-note .note-head,
  .paper-note .note-body,
  .paper-note .note-aside { grid-column: 1; grid-row: auto; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .viewer-top { padding: 10px 12px; }
  .viewer-title .folio-name { min-width: 0; font-size: 18px; }
  .seg { padding: 0 10px; }
}
@media (max-width: 768px) {
  .reader-tools { display: none; }
  .reader-bottom {
    display: flex;
    position: sticky;
    bottom: 0;
    z-index: 6;
    background: var(--bg);
    padding: 6px 12px calc(10px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .bb {
    background: transparent;
    border: 0;
    color: var(--ink);
    min-width: 56px;
    min-height: 48px;
    font-family: var(--mono);
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    text-decoration: none;
  }
  .bb.on { color: var(--accent); }
  .vellum-pill {
    display: flex;
    position: fixed;
    right: 16px;
    bottom: 92px;
    gap: 10px;
    align-items: center;
    background: var(--bg);
    color: var(--ink);
    text-decoration: none;
    padding: 8px 14px 8px 8px;
    font-family: var(--mono);
    font-size: 11px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
    z-index: 6;
  }
  .vellum-pill img { height: 44px; width: auto; display: block; }
  .hero-actions .cta, .hero-actions .ghost { flex: 1 1 100%; justify-content: center; }
  .viewer-app { height: auto; min-height: 100vh; }
  .viewer-body { flex-direction: column; }
  .stage { height: 62vh; flex: none; }
  .leaf-frame > img, .opening img { height: min(54vh, 520px); }
  .viewer-panel { flex: none; max-width: none; border-left: 0; border-top: 1px solid var(--line); max-height: none; }
  .key-card, .seal { margin: 0 auto; }
  .stats dd { font-size: 42px; }
}
