@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/alegreya-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/alegreya-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Alegreya";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/alegreya-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Alegreya";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/alegreya-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/young-serif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/young-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/atkinson-next-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/atkinson-next-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/atkinson-next-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/atkinson-next-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Spline Sans Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/spline-sans-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Spline Sans Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/spline-sans-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --bg: oklch(0.155 0.018 295);
  --bg-raise: oklch(0.19 0.018 295);
  --bg-well: oklch(0.13 0.014 295);
  --ink: oklch(0.88 0.018 85);
  --ink-dim: oklch(0.69 0.018 85);
  --ink-faint: oklch(0.60 0.018 85);
  --gold: oklch(0.8 0.115 78);
  --gold-dim: oklch(0.62 0.08 78);
  /* See DECISIONS.md — Saved highlight colour. */
  --saved-highlight: oklch(0.76 0.085 190 / 0.0728);
  --saved-highlight-hover: oklch(0.76 0.085 190 / 0.112);
  --saved-highlight-line: oklch(0.72 0.105 190 / 0.7);
  --saved-highlight-underline: oklch(0.72 0.105 190 / 0.448);
  --line: oklch(0.28 0.02 290);
  --testable: oklch(0.75 0.12 145);
  --unfalsifiable: oklch(0.68 0.025 290);
  --agrees: oklch(0.74 0.09 235);
  --shell: 1080px;
  --reader: 780px;
  --prose: 62ch;
  --prose-size: 1.25rem;
  --prose-leading: 1.72;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --page-inline: clamp(20px, 5vw, 72px);
  /* See DECISIONS.md — Missing Secrets canonical reader shell. */
  --fixed-ui-clearance: calc(180px + env(safe-area-inset-bottom));
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-block: 80px var(--fixed-ui-clearance);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  background: var(--bg);
  color: var(--ink);
  font-family: "Alegreya", Georgia, serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: auto;
}
button, input, textarea, select { font: inherit; }
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: var(--gold); text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.skip-link {
  position: fixed;
  inset: 12px auto auto 12px;
  z-index: 200;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 100px;
  background: var(--gold);
  color: var(--bg-well);
  font: 500 0.8125rem/1.4 "Spline Sans Mono", monospace;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}
.skip-link:focus { transform: none; }

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 2px;
  pointer-events: none;
}
.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold-dim);
  transition: width 0.18s linear;
}

.toc-toggle {
  display: none;
  position: fixed;
  inset: 14px auto auto 14px;
  z-index: 92;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  gap: var(--space-2);
  padding: 0 14px;
  border: 1px solid var(--gold-dim);
  border-radius: 100px;
  background: color-mix(in oklch, var(--bg-well) 92%, transparent);
  color: var(--gold);
  backdrop-filter: blur(12px);
  font: 500 0.8125rem/1.4 "Spline Sans Mono", monospace;
  cursor: pointer;
}
.toc-toggle-page { color: var(--ink-faint); font-size: 0.75rem; }
.toc-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 89;
  border: 0;
  background: oklch(0 0 0 / 0.65);
}
.toc-rail {
  position: fixed;
  inset: 14px auto 14px 14px;
  z-index: 90;
  width: 210px;
  display: flex;
  flex-direction: column;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: color-mix(in oklch, var(--bg-well) 92%, transparent);
  box-shadow: 0 18px 54px oklch(0 0 0 / 0.35);
  backdrop-filter: blur(12px);
  font-family: "Spline Sans Mono", monospace;
}
.toc-rail-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.reader-home,
.toc-rail-head button,
.toc-highlights {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 0;
  background: none;
  color: var(--gold-dim);
  font: 500 0.8125rem/1.4 "Spline Sans Mono", monospace;
  text-decoration: none;
}
.toc-rail-head button {
  display: none;
  min-width: 44px;
  justify-content: center;
  color: var(--ink-dim);
  cursor: pointer;
}
.reader-position {
  display: flex;
  gap: 7px;
  padding: 0 var(--space-2) var(--space-3);
  color: var(--ink-faint);
  font: 400 0.75rem/1.5 "Spline Sans Mono", monospace;
  text-transform: uppercase;
}
.toc-rail nav { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.toc-link {
  min-height: 44px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  border-radius: 8px;
  color: var(--ink-faint);
  font-size: 0.75rem;
  line-height: 1.35;
  text-decoration: none;
}
.toc-link:hover { color: var(--ink); background: var(--bg-raise); }
.toc-link[aria-current="location"] { color: var(--gold); background: var(--bg-raise); }
.toc-page { color: var(--gold-dim); }
.toc-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.toc-highlights {
  flex: none;
  justify-content: center;
  margin-top: var(--space-2);
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink-dim);
}
.toc-highlights:hover, .reader-home:hover { color: var(--gold); }

.book-hero,
main,
.site-footer {
  width: min(var(--reader), calc(100% - 48px));
  margin-inline: auto;
}
.book-hero {
  min-height: min(720px, 88svh);
  display: grid;
  align-content: center;
  padding-block: var(--space-24);
}
.hero-kicker,
.hero-meta,
.sec-num {
  font-family: "Spline Sans Mono", monospace;
  font-size: 0.75rem;
  line-height: 1.55;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.hero-kicker, .sec-num { margin: 0; color: var(--gold-dim); }
.book-hero h1 {
  max-width: 10ch;
  margin: var(--space-4) 0 var(--space-6);
  font-family: "Young Serif", Georgia, serif;
  font-size: clamp(3.25rem, 9vw, 7.5rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero-summary {
  max-width: 52ch;
  margin: 0;
  color: var(--ink-dim);
  font-size: 1.25rem;
  line-height: 1.6;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin-top: var(--space-8);
  color: var(--ink-faint);
}

main { padding-bottom: var(--fixed-ui-clearance); }
.honesty-compact {
  padding: var(--space-16) 0 var(--space-24);
  border-top: 1px solid var(--line);
}
.section-head { margin-bottom: var(--space-8); }
.section-head h2 {
  max-width: 16ch;
  margin: var(--space-2) 0 0;
  font-family: "Young Serif", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4.75rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.honesty-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}
.honesty-grid article {
  min-width: 0;
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-well);
}
.honesty-grid h3 {
  margin: 0 0 var(--space-3);
  color: var(--gold-dim);
  font: 500 0.8125rem/1.4 "Spline Sans Mono", monospace;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.honesty-grid p { margin: 0; color: var(--ink-dim); font-size: var(--prose-size); line-height: var(--prose-leading); }

.front-matter {
  margin-bottom: var(--space-16);
  border-block: 1px solid var(--line);
}
.front-matter > summary {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  color: var(--gold-dim);
  font: 500 0.8125rem/1.4 "Spline Sans Mono", monospace;
  cursor: pointer;
  list-style-position: inside;
}
.front-matter > summary span:last-child { color: var(--ink-faint); font-size: 0.75rem; }
.front-matter[open] > summary { border-bottom: 1px solid var(--line); }
.front-matter-pages { padding-top: var(--space-8); }

.book-page {
  position: relative;
  padding: 54px 0 76px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 72px;
}
.page-number {
  position: absolute;
  top: 48px;
  right: -118px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--bg);
  color: var(--gold-dim);
  font: 400 0.75rem/1.4 "Spline Sans Mono", monospace;
  cursor: pointer;
}
.page-number:hover,
.page-number:focus-visible,
.page-number[aria-expanded="true"] { border-color: var(--gold-dim); color: var(--gold); }
.original-page {
  margin: 0 0 42px;
  overflow: hidden;
  border: 1px solid var(--gold-dim);
  border-radius: 12px;
  background: var(--bg-well);
}
.original-page[hidden] { display: none; }
.original-label, .original-status {
  padding: 10px 13px;
  color: var(--gold-dim);
  font: 400 0.75rem/1.5 "Spline Sans Mono", monospace;
  letter-spacing: 0.05em;
}
.original-status { padding-top: 0; color: var(--ink-faint); }
.original-page img { width: 100%; height: auto; background: white; }

.source-flow { max-width: var(--prose); }
.source-text {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  font-family: "Alegreya", Georgia, serif;
  font-size: var(--prose-size);
  font-weight: 400;
  line-height: var(--prose-leading);
}
.editorial-paragraph { margin: 0; color: inherit; font: inherit; }
.editorial-paragraph + .editorial-paragraph { margin-top: 1.2em; }
.source-paragraph + .source-paragraph,
.source-quote + .source-paragraph,
.image-row + .source-paragraph { margin-top: 1.06em; }
.source-heading {
  margin: 58px 0 22px;
  color: var(--ink);
  max-width: 16ch;
  font-family: "Young Serif", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4.75rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.025em;
  scroll-margin-top: 72px;
}
.source-heading-part { display: block; }
.source-heading-final { margin-bottom: 22px; }
.source-flow > .source-heading:first-child { margin-top: 0; }
.source-display { margin: 24px 0 12px; font-size: var(--prose-size); line-height: var(--prose-leading); }
.source-display + .source-display { margin-top: 0; }
.source-caption { margin: 30px 0 12px; color: var(--ink-dim); font-size: var(--prose-size); line-height: var(--prose-leading); }
.source-quote {
  margin: 30px 0;
  padding: 22px 0;
  border-block: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: var(--prose-size);
  font-style: italic;
  line-height: var(--prose-leading);
}
.image-row {
  display: grid;
  grid-template-columns: var(--image-columns);
  gap: 4px;
  align-items: end;
  margin: 30px 0;
  overflow: hidden;
  border-radius: 9px;
  background: white;
}
.image-row img {
  width: 100%;
  height: auto;
  min-width: 0;
  background: white;
}
.image-row img[data-image-id] {
  cursor: pointer;
  touch-action: manipulation;
  transition: outline-color 0.16s ease, filter 0.16s ease;
}
.image-row img[data-image-id]:hover { filter: brightness(0.94) saturate(0.94); }
.image-row img[data-image-id]:focus-visible,
.image-row img.saved-image {
  outline: 3px solid var(--saved-highlight-line);
  outline-offset: -3px;
}
.image-row img.saved-image { filter: brightness(0.96) saturate(0.92); }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-16) 0 var(--fixed-ui-clearance);
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font: 400 0.75rem/1.6 "Spline Sans Mono", monospace;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; color: var(--gold-dim); }

#selectionChip {
  position: fixed;
  z-index: 110;
  display: none;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--gold-dim);
  border-radius: 100px;
  background: var(--bg-well);
  box-shadow: 0 8px 30px oklch(0 0 0 / 0.42);
}
#selectionChip.on { display: flex; }
#selectionChip button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 100px;
  background: none;
  color: var(--gold);
  font: 500 0.8125rem/1.4 "Spline Sans Mono", monospace;
  cursor: pointer;
}
#selectionChip button:hover, #selectionChip button:focus-visible { background: var(--bg-raise); }
#selectionChip .retry { color: #ff938b; }
::highlight(saved-passages) {
  background: var(--saved-highlight);
  text-decoration: underline;
  text-decoration-color: var(--saved-highlight-underline);
  text-underline-offset: 3px;
}

#readerToast {
  position: fixed;
  z-index: 140;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  max-width: calc(100vw - 28px);
  padding: 11px 16px;
  transform: translate(-50%, 14px);
  border: 1px solid var(--gold-dim);
  border-radius: 100px;
  background: var(--bg-well);
  color: var(--gold);
  font: 500 0.8125rem/1.4 "Spline Sans Mono", monospace;
  opacity: 0;
  pointer-events: none;
  transition: 0.18s;
}
#readerToast.show { opacity: 1; transform: translate(-50%, 0); }

#askDrawer {
  position: fixed;
  z-index: 120;
  inset: 0 0 0 auto;
  width: min(470px, 96vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  flex-direction: column;
  padding: 0;
  transform: translateX(104%);
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--bg-well);
  color: var(--ink);
  box-shadow: -18px 0 60px oklch(0 0 0 / 0.35);
  transition: transform 0.22s ease;
}
#askDrawer:not([open]) { display: none; }
#askDrawer[open] { display: flex; }
#askDrawer.on { transform: none; }
#askDrawer::backdrop { background: oklch(0 0 0 / 0.65); }
#askDrawer header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
#askDrawer header span, .highlights-head span {
  color: var(--gold-dim);
  font: 500 0.75rem/1.5 "Spline Sans Mono", monospace;
  letter-spacing: 0.08em;
}
#askDrawer h2, .highlights-head h2 { margin: 3px 0 0; font-size: 1.32rem; font-weight: 600; }
#askDrawer header label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-faint);
  font: 400 0.75rem/1.4 "Spline Sans Mono", monospace;
}
#askDrawer header input { width: 24px; height: 24px; accent-color: var(--gold); }
#askDrawer header button,
.highlights-head button,
.highlights-head a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: none;
  color: var(--ink-dim);
  font: 400 0.8125rem/1.4 "Spline Sans Mono", monospace;
  text-decoration: none;
  cursor: pointer;
}
#askPassage {
  max-height: 150px;
  margin: 18px;
  padding: 15px 0 15px 15px;
  overflow: auto;
  border: 0;
  border-left: 2px solid var(--gold-dim);
  color: var(--ink-dim);
  font-size: 1rem;
  line-height: 1.55;
}
#askLog { flex: 1; overflow: auto; padding: 0 18px 18px; }
.ask-question { margin: 18px 0 7px; color: var(--gold); font: 500 0.8125rem/1.4 "Spline Sans Mono", monospace; }
.ask-answer { color: var(--ink); font-size: 1rem; line-height: 1.55; white-space: pre-wrap; }
.ask-answer.busy { color: var(--ink-faint); }
#askForm { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
#askQuestion {
  flex: 1;
  min-height: 48px;
  padding: 11px 12px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-raise);
  color: var(--ink);
  font: 400 1rem "Alegreya", Georgia, serif;
}
#askForm button {
  min-width: 68px;
  min-height: 44px;
  border: 1px solid var(--gold-dim);
  border-radius: 10px;
  background: none;
  color: var(--gold);
  font: 500 0.8125rem/1.4 "Spline Sans Mono", monospace;
  cursor: pointer;
}
#askStatus { min-height: 28px; padding: 0 18px 10px; color: #ffaaa3; font: 400 0.75rem/1.4 "Spline Sans Mono", monospace; }

#highlightsDialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(820px, calc(100vh - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-raise);
  color: var(--ink);
  box-shadow: 0 24px 80px oklch(0 0 0 / 0.58);
}
#highlightsDialog::backdrop { background: oklch(0 0 0 / 0.72); backdrop-filter: blur(4px); }
.highlights-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-raise);
}
.highlights-head > div:last-child { display: flex; gap: 7px; }
#highlightsStatus { padding: 16px 22px 0; color: var(--gold-dim); font: 400 0.75rem/1.4 "Spline Sans Mono", monospace; }
#highlightsList { padding: 10px 22px 28px; }
.reader-highlight-card { padding: 22px 0; border-bottom: 1px solid var(--line); }
.reader-highlight-card blockquote { margin: 0 0 12px; color: var(--ink); font-size: 1.1rem; line-height: 1.55; }
.reader-highlight-image {
  display: block;
  width: 100%;
  max-height: 420px;
  margin-bottom: 12px;
  object-fit: contain;
  border: 1px solid var(--saved-highlight-line);
  border-radius: 9px;
  background: oklch(0.97 0.005 190);
}
.reader-highlight-caption { margin: 0 0 12px; color: var(--ink-dim); font-size: 1rem; line-height: 1.5; }
.highlight-meta { margin-bottom: 13px; color: var(--ink-faint); font: 400 0.75rem/1.4 "Spline Sans Mono", monospace; }
.highlight-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.highlight-actions a,
.highlight-actions button,
#highlightsList > button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: none;
  color: var(--ink-dim);
  font: 400 0.8125rem/1.4 "Spline Sans Mono", monospace;
  text-decoration: none;
  cursor: pointer;
}
.highlight-actions a:hover, .highlight-actions button:hover { border-color: var(--gold-dim); color: var(--gold); }
.highlight-actions .flagged { border-color: var(--gold-dim); color: var(--gold); }
.highlight-actions .danger { border-color: oklch(0.5 0.07 25); color: #ff938b; }

/* Canonical research-learn narration UI. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.w { transition: color 0.15s ease, text-shadow 0.3s ease; }
.w.now { color: var(--gold) !important; text-shadow: 0 0 18px oklch(0.8 0.115 78 / 0.4); }
body.listening .source-text, body.listening [data-narrated] { color: oklch(0.92 0.012 85); }
body.listening .w { cursor: pointer; }

#listenBar {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 80;
  width: min(640px, calc(100vw - 28px));
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 100px;
  background: color-mix(in oklch, var(--bg-well) 92%, transparent);
  box-shadow: 0 8px 30px oklch(0 0 0 / 0.45);
  backdrop-filter: blur(12px);
  opacity: 0.72;
}
#listenBar.ready { opacity: 1; }
#listenBar.failed { border-color: oklch(0.5 0.07 25); }
#listenBar button {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-dim);
  font: 500 1rem/1 "Spline Sans Mono", monospace;
  cursor: pointer;
}
#listenBar button:hover { color: var(--gold); }
#listenBar #lbPlay {
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  color: var(--gold);
  font-size: 0.8125rem;
}
#lbTitle {
  max-width: 230px;
  flex: 0 1 auto;
  justify-content: flex-start !important;
  overflow: hidden;
  color: var(--ink-dim);
  font-size: 0.75rem !important;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#lbBar {
  position: relative;
  flex: 1;
  min-width: 70px !important;
}
#lbBar::before,
#lbFill {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 2px;
}
#lbBar::before { background: var(--line); }
#lbFill { right: auto; width: 0; background: var(--gold); }
#lbFollow.off { opacity: 0.4; }

#lbMenu {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 81;
  width: min(390px, calc(100vw - 28px));
  max-height: 60vh;
  display: none;
  padding: 8px;
  transform: translateX(-50%);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in oklch, var(--bg-well) 96%, transparent);
  box-shadow: 0 8px 30px oklch(0 0 0 / 0.5);
  backdrop-filter: blur(12px);
}
#lbMenu.on { display: block; }
#lbMenu button {
  width: 100%;
  min-height: 44px;
  display: block;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-dim);
  font: 400 0.75rem/1.35 "Spline Sans Mono", monospace;
  letter-spacing: 0.04em;
  text-align: left;
  cursor: pointer;
}
#lbMenu button:hover, #lbMenu button:focus-visible { background: var(--bg-raise); color: var(--ink); }
#lbMenu button.cur { color: var(--gold); }

.sayBtn {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 0;
  vertical-align: middle;
  border: 0;
  background: none;
  color: var(--gold);
  font: 500 0.75rem/1 "Spline Sans Mono", monospace;
  cursor: pointer;
  opacity: 0.6;
}
.sayBtn::before {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
}
.sayBtn::after { content: "▶"; position: relative; }
.sayBtn:hover, .sayBtn:focus-visible { opacity: 1; }
.detailsSayBtn { margin: 8px 0; }
.wblock { position: relative; }
.pplay {
  position: absolute;
  left: -48px;
  top: -5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-dim);
  font: 500 0.75rem/1 "Spline Sans Mono", monospace;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.pplay::before { content: "▶"; }
@media (hover: hover) {
  .wblock:hover > .pplay, .pplay:focus-visible { opacity: 0.8; }
  .pplay:hover { color: var(--gold); opacity: 1; }
}
@media (hover: none) { .pplay { display: none; } }

#jumpChip {
  position: fixed;
  z-index: 96;
  display: none;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--gold-dim);
  border-radius: 100px;
  background: color-mix(in oklch, var(--bg-well) 94%, transparent);
  box-shadow: 0 6px 24px oklch(0 0 0 / 0.45);
  backdrop-filter: blur(10px);
  color: var(--gold);
  font: 500 0.75rem/1 "Spline Sans Mono", monospace;
  letter-spacing: 0.05em;
  cursor: pointer;
}
#jumpChip.on { display: block; }
#readerToast { bottom: calc(104px + env(safe-area-inset-bottom)); }

/* See DECISIONS.md — Missing Secrets canonical reader shell. */
@media (max-width: 1239px) {
  .toc-toggle { display: flex; }
  .toc-rail {
    inset: 12px auto 12px 12px;
    width: min(360px, calc(100vw - 24px));
    transform: translateX(calc(-100% - 24px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .toc-rail.open { transform: none; opacity: 1; pointer-events: auto; }
  .toc-rail-head button { display: inline-flex; }
  .toc-backdrop.open { display: block; }
}

@media (max-width: 1080px) {
  .page-number { position: static; margin: 0 0 24px; }
}

@media (max-width: 620px) {
  .book-hero, main, .site-footer { width: min(100% - 40px, var(--reader)); }
  .book-hero { min-height: auto; padding-block: 112px var(--space-16); }
  .book-hero h1 { font-size: clamp(3rem, 16vw, 5rem); }
  .hero-meta { display: grid; gap: var(--space-2); }
  .honesty-compact { padding-block: var(--space-16); }
  .honesty-grid { grid-template-columns: 1fr; }
  .book-page { padding: 38px 0 58px; }
  .source-heading { margin-top: 44px; }
  .source-display, .source-caption, .source-quote { font-size: var(--prose-size); }
  .image-row { gap: 2px; margin-block: 24px; border-radius: 6px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .site-footer nav { gap: var(--space-4); }
  #askDrawer { width: 100vw; }
  .highlights-head { align-items: flex-start; padding: 16px; }
  .highlights-head > div:last-child { flex-direction: column; align-items: stretch; }
  .highlights-head button, .highlights-head a { justify-content: center; }
  #highlightsStatus, #highlightsList { padding-inline: 16px; }
  .reader-highlight-card blockquote { font-size: 1.02rem; }
  #listenBar #lbPrev, #listenBar #lbNext { display: none; }
  #listenBar #lbTitle {
    min-width: 0;
    max-width: 116px;
    flex: 1 1 76px;
    font-size: 0.625rem !important;
  }
  #listenBar #lbBar { min-width: 48px !important; }
  #listenBar { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
