:root {
  color-scheme: light;
  --paper: #f5f1e7;
  --ink: #253f35;
  --muted: #5f6a5c;
  --accent: #805e43;
  --line: #d7d9c8;
  --wash: #e9eadb;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
button, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, summary:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 20; padding: 12px 18px; background: var(--ink); color: white; }
.skip-link:focus { top: 8px; }
.reader-header { flex-shrink: 0; position: relative; z-index: 5; background: #f5f1e7f5; backdrop-filter: blur(12px); }
.header-inner { min-height: 76px; max-width: 1032px; padding: 12px 20px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font: 15px/1.25 var(--serif); white-space: nowrap; }
.brand-mark { font: italic 31px/1 var(--serif); letter-spacing: -3px; color: var(--accent); }
.brand small { display: block; font: 7px/1.7 var(--sans); letter-spacing: 1.4px; margin-top: 4px; color: var(--muted); }
.chapter-picker-button { min-height: 44px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: transparent; border-radius: 24px; padding: 8px 13px; white-space: nowrap; font-size: 12px; }
.chapter-picker-button > span:last-child { font-size: 17px; }
.reading-track { height: 2px; background: var(--line); }
#reading-fill { display: block; width: 0; height: 100%; background: #8d9b6c; }
#journey { width: 100%; max-width: 670px; margin: 0 auto; padding: 0; flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; }
#journey::-webkit-scrollbar { display: none; }
.chapter { flex: 0 0 100%; min-width: 0; height: 100%; padding: 35px 23px 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; scroll-snap-align: start; scroll-snap-stop: always; scrollbar-width: thin; }
.slide-nav { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 670px; margin: 0 auto; padding: 5px 15px max(5px,env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.slide-nav button { width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); font-size: 24px; }
.slide-nav button:disabled { opacity: .25; cursor: default; }
.slide-nav span { font-size: 12px; color: var(--muted); }
.eyebrow { font-size: 10px; font-weight: 500; line-height: 1.5; letter-spacing: 1.9px; color: var(--accent); text-transform: uppercase; margin: 0; }
.chapter-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 22px; }
.chapter-meta > span { font-size: 10px; color: var(--muted); }
.chapter-heading { font: normal clamp(38px, 10.5vw, 55px)/1.08 var(--serif); letter-spacing: -1.6px; margin: 0 0 18px; text-wrap: balance; outline: none; }
.chapter-heading:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.chapter-teaser { font: italic 19px/1.55 var(--serif); color: var(--muted); margin: 0 0 27px; }
.book-intro { margin: 0 0 27px; border-left: 2px solid #aeb995; padding: 3px 0 3px 15px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.book-intro strong { color: var(--ink); font-weight: 550; }
.spoiler-note { font-size: 11px; line-height: 1.7; color: var(--muted); padding: 11px 0 17px; border-bottom: 1px solid var(--line); margin: 0 0 26px; }
.spoiler-dot { display: inline-block; width: 5px; height: 5px; background: #809360; border-radius: 50%; margin: 0 7px 2px 0; }
.story-copy { margin: 0 0 27px; font: 18px/1.85 var(--serif); }
.chapter-recap { margin: -10px 0 12px; }
.chapter-recap summary { display: flex; align-items: center; min-height: 48px; gap: 12px; font-size: 13px; color: var(--muted); cursor: pointer; list-style: none; }
.chapter-recap summary::-webkit-details-marker { display: none; }
.chapter-recap summary::after { content: '+'; color: var(--accent); margin-left: auto; font-size: 18px; }
.chapter-recap[open] summary::after { content: '−'; }
.chapter-recap .story-copy { margin-top: 15px; }
.chapter-scene { margin: 0 -23px 34px; }
.scene-art { aspect-ratio: 15 / 19; overflow: hidden; background: #b1bda3; }
.scene-art svg { display: block; width: 100%; height: auto; }
.chapter-scene figcaption { padding: 21px 23px 0; }
.chapter-scene figcaption .eyebrow { font-size: 9px; }
.chapter-scene figcaption h3 { font: normal 26px/1.2 var(--serif); letter-spacing: -.5px; margin: 11px 0 12px; text-wrap: balance; }
.chapter-scene figcaption > p:last-child { font-size: 15px; line-height: 1.85; color: var(--muted); margin: 0; }
.where-we-are { margin: 26px 0 31px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.where-we-are .eyebrow { font-size: 9px; margin-bottom: 7px; display: block; }
.where-we-are p { margin: 0; }
.field-study { margin: 31px -8px 34px; background: #eee7d6; border: 1px solid #d6d3bd; box-shadow: 0 8px 24px #41574608; }
.study-header { padding: 21px 20px 17px; }
.study-header .eyebrow { font-size: 9px; margin-bottom: 7px; }
.study-header h3 { font: normal 24px/1.22 var(--serif); margin: 0; letter-spacing: -.5px; text-wrap: balance; }
.study-panels { display: grid; }
.study-panel { margin: 0; padding: 0 18px 23px; }
.study-panel + .study-panel { border-top: 1px solid #d6d3bd; padding-top: 22px; }
.panel-image { display: block; width: 100%; height: auto; aspect-ratio: 1.32; overflow: hidden; }
.panel-image svg { display: block; width: 100%; height: 100%; }
.study-panel figcaption { margin-top: 16px; }
.panel-title { display: flex; gap: 9px; align-items: baseline; font: 19px/1.4 var(--serif); margin-bottom: 9px; }
.panel-number { font: italic 13px var(--serif); color: var(--accent); }
.study-panel figcaption p { font-size: 15px; line-height: 1.85; margin: 0; color: #53624e; }
.evidence-note { padding: 17px 20px 20px; border-top: 1px solid #d6d3bd; color: #606950; font-size: 12px; line-height: 1.85; }
.evidence-note strong { font-weight: 550; color: var(--ink); }
.study-caption { font-size: 10px; padding: 0 20px 17px; margin: -7px 0 0; color: #666a55; }
.reading-observations { margin: 35px 0; }
.reading-observations > h3 { font: normal 25px/1.25 var(--serif); margin: 0 0 22px; letter-spacing: -.6px; }
.observation { display: flex; align-items: flex-start; gap: 14px; margin: 0 0 22px; }
.observation > span { font: italic 18px/1.8 var(--serif); color: #a29370; width: 18px; flex-shrink: 0; }
.observation p { margin: 0; font-size: 15px; line-height: 1.9; }
.context-thread { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 30px 0; padding: 6px 0; }
.context-thread summary { min-height: 52px; padding: 12px 4px; display: flex; align-items: center; justify-content: space-between; gap: 15px; cursor: pointer; list-style: none; font: 17px/1.5 var(--serif); }
.context-thread summary::-webkit-details-marker { display: none; }
.context-thread summary::after { content: '+'; color: var(--accent); font: 20px var(--sans); }
.context-thread details[open] > summary::after { content: '−'; }
.context-thread details + details { border-top: 1px solid var(--line); }
.context-answer { padding: 0 4px 18px; font-size: 15px; line-height: 1.9; color: var(--muted); }
.context-answer p { margin: 0 0 12px; }
.context-answer p:last-child { margin-bottom: 0; }
.reflection { margin: 37px 0 0; }
.reflection > .eyebrow { font-size: 9px; margin-bottom: 14px; }
.reflection blockquote { margin: 0 0 22px; font: italic 23px/1.5 var(--serif); letter-spacing: -.3px; }
.note-label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.reflection textarea, .legacy-notes textarea { width: 100%; resize: vertical; min-height: 117px; max-height: 500px; border: 1px solid #7b876f; border-radius: 3px; padding: 15px; background: #efeee1; font: 16px/1.75 var(--serif); }
.reflection textarea::placeholder { color: var(--muted); font-style: italic; }
.note-status { font-size: 10px; color: var(--muted); margin: 6px 0 0; min-height: 18px; }
.legacy-notes { margin-top: 24px; }
.legacy-notes summary { min-height: 44px; cursor: pointer; font-size: 13px; color: var(--muted); }
.chapter-transition { padding: 35px 0 41px; margin-top: 18px; border-bottom: 1px solid var(--line); }
.next-card { background: #e4e8d7; border: 1px solid #d4dbc2; border-radius: 3px; padding: 23px 20px 20px; }
.next-card .eyebrow { font-size: 9px; margin-bottom: 12px; }
.next-card h3 { font: normal 24px/1.25 var(--serif); margin: 0 0 12px; }
.next-card p { margin: 0 0 19px; font-size: 13px; line-height: 1.8; color: #5e6b54; }
.continue-button { display: flex; align-items: center; justify-content: space-between; gap: 15px; width: 100%; min-height: 52px; border: 1px solid var(--ink); border-radius: 3px; background: var(--ink); color: #f7f3e8; padding: 13px 15px; font-size: 14px; text-decoration: none; text-align: left; }
.continue-button:hover { background: #3a5545; }
.continue-button > span:last-child { font-size: 19px; }
.next-card .continue-warning { margin: 10px 0 0; font-size: 10px; text-align: center; }
.chapter-connector { display: flex; align-items: center; gap: 12px; color: var(--muted); font: italic 14px var(--serif); min-height: 44px; text-decoration: none; }
.chapter-connector::before { content: ''; width: 28px; height: 1px; background: #a9b393; }
.journey-car-leg { padding: 0 20px 23px; }
.journey-car-leg + .journey-car-leg { padding-top: 22px; border-top: 1px solid #d6d3bd; }
.journey-car-leg h4 { font: normal 19px/1.4 var(--serif); margin: 0 0 18px; }
.journey-cars { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.car-study { margin: 0; }
.car-study svg { display: block; width: 100%; height: auto; }
.car-study figcaption { font-size: 13px; margin-top: 12px; line-height: 1.6; }
.car-study figcaption strong { display: block; font-size: 14px; font-weight: 550; }
.car-study figcaption span { display: block; font: italic 17px/1.5 var(--serif); }
.car-explanation { margin: 0; padding: 0 20px 23px; font-size: 14px; line-height: 1.85; color: #53624e; }
.reader-footer { max-width: 670px; padding: 35px 23px 40px; margin: auto; text-align: center; color: var(--muted); }
.footer-mark { display: block; color: #9c926f; font: italic 38px var(--serif); letter-spacing: -3px; margin-bottom: 14px; }
.reader-footer p { font-size: 12px; line-height: 1.9; margin: 0 0 12px; }
.reader-footer small { font-size: 10px; }
.storage-warning, .no-script { max-width: 624px; margin: 15px auto; padding: 12px 18px; background: #efe1c9; font-size: 13px; line-height: 1.7; }
dialog { color: var(--ink); background: var(--paper); width: calc(100% - 16px); max-width: 480px; max-height: 88dvh; padding: 24px 23px max(24px,env(safe-area-inset-bottom)); border: 1px solid #c8cdb5; border-radius: 16px 16px 0 0; position: fixed; inset: auto 0 0; margin: 0 auto; overflow: auto; overscroll-behavior: contain; }
dialog::backdrop { background: #19392bd1; backdrop-filter: blur(4px); }
body:has(dialog[open]) { overflow: hidden; }
.sheet-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.sheet-header h2 { font: normal 32px/1.2 var(--serif); letter-spacing: -.8px; margin: 9px 0 0; }
.icon-button { min-width: 44px; min-height: 44px; background: transparent; border: 1px solid var(--line); border-radius: 50%; font-size: 16px; }
.picker-help { font-size: 13px; line-height: 1.8; color: var(--muted); margin: 20px 0 16px; }
.chapter-option { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 11px 6px; min-height: 57px; background: transparent; border: 0; border-top: 1px solid var(--line); text-align: left; font-size: 16px; }
.chapter-option .option-number { font: italic 20px var(--serif); color: var(--accent); width: 28px; flex-shrink: 0; }
.chapter-option .option-name { margin-right: auto; }
.chapter-option .option-state { color: var(--muted); font-size: 10px; }
.chapter-option[aria-current] { color: var(--ink); background: #e6e9d8; }
#jump-confirmation { border-top: 1px solid var(--line); padding-top: 24px; }
#jump-confirmation h3 { font: normal 27px/1.25 var(--serif); margin: 0 0 14px; }
#jump-confirmation p { font-size: 14px; line-height: 1.9; color: var(--muted); }
.back-button { min-height: 44px; padding: 10px 0; margin-top: 10px; border: 0; background: none; text-decoration: underline; text-underline-offset: 4px; font-size: 13px; }
@media(min-width:650px) {
  .chapter-scene { margin-inline: -30px; }
  .chapter-scene figcaption { padding-inline: 30px; }
  .header-inner { padding: 15px 32px; min-height: 85px; }
  .brand { font-size: 18px; gap: 14px; }
  .brand small { font-size: 8px; }
  .chapter-picker-button { font-size: 13px; padding-inline: 17px; }
  .chapter { padding: 56px 30px 0; }
  .chapter-heading { font-size: 55px; }
  .chapter-teaser { font-size: 21px; }
  .story-copy { font-size: 19px; }
  .field-study { margin-inline: -20px; }
  .study-header { padding: 26px 25px 20px; }
  .study-header h3 { font-size: 28px; }
  .study-panels { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .study-panel { padding: 0 23px 25px; }
  .study-panel + .study-panel { border-top: 0; border-left: 1px solid #d6d3bd; padding-top: 0; }
  .study-panel figcaption p { font-size: 14px; }
  .panel-title { font-size: 18px; }
  .evidence-note { padding: 19px 25px 22px; }
  .next-card { padding: 28px; }
  .next-card h3 { font-size: 29px; }
  dialog { inset: 0; margin: auto; border-radius: 8px; padding: 28px; }
}
@media(max-width:350px) {
  .chapter-scene { margin-inline: -19px; }
  .chapter-scene figcaption { padding-inline: 19px; }
  .header-inner { padding-inline: 15px; }
  .brand { font-size: 13px; gap: 7px; }
  .brand small { font-size: 6px; letter-spacing: .8px; }
  .brand-mark { font-size: 28px; }
  .chapter-picker-button { font-size: 11px; padding-inline: 10px; gap: 7px; }
  .chapter { padding-inline: 19px; }
  .chapter-meta > span { font-size: 9px; }
  .chapter-heading { font-size: 37px; }
}
@media(prefers-reduced-motion:reduce) { html, #journey { scroll-behavior: auto; } }
@media print {
  body { display: block; height: auto; overflow: visible; }
  .reader-header, .slide-nav, .chapter-transition, dialog, .reader-footer, textarea, .note-label, .note-status { display: none; }
  #journey { display: block; max-width: none; overflow: visible; padding: 0; }
  .chapter { height: auto; overflow: visible; break-before: page; }
  .chapter[aria-hidden="true"] { display: none; }
  .chapter:first-child { break-before: auto; }
  .field-study, .reflection, .context-thread { break-inside: avoid; }
}
