/* On Healing: The Great Turning's Ridge palette and type, set as a short book. Lighter: one column, no chrome but a thread of progress. */
:root {
  --paper: #ece8df; --paper-2: #f4f1ea; --ink: #1e1e1c; --ink-2: #3d3b36; --mute: #6b6860;
  --river: #2f4f3f; --river-soft: rgba(47,79,63,.14); --mark: #8a3b2e; --rule: rgba(30,30,28,.14);
  --font-display: 'Spectral', Georgia, 'Times New Roman', serif;
  --font-body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 36rem; color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --paper: #171715; --paper-2: #201f1c; --ink: #ece8df; --ink-2: #cfcabf; --mute: #a29e94;
  --river: #9fbfa9; --river-soft: rgba(159,191,169,.16); --mark: #d98a74; --rule: rgba(236,232,223,.16); color-scheme: dark; } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
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); font-family: var(--font-display); font-size: 1.2rem; line-height: 1.68; }
a { color: var(--river); text-underline-offset: .18em; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; background: var(--paper-2); padding: 8px 12px; z-index: 50; }
.btn { display: inline-flex; align-items: center; justify-content: center; font: 500 1rem var(--font-body); background: var(--ink); color: var(--paper); border: 0; border-radius: 999px; padding: 12px 22px; min-height: 46px; cursor: pointer; text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--river); outline-offset: 3px; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

/* progress thread and a quiet bar once reading */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40; }
.progress i { display: block; height: 100%; width: 0; background: var(--river); transition: width .2s linear; }
.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule); font-family: var(--font-body); font-size: .9rem; }
.bar-title { color: var(--ink); text-decoration: none; font-family: var(--font-display); font-size: 1.05rem; }
.bar-part { color: var(--mute); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-btn { font: inherit; background: transparent; color: var(--ink); border: 0; box-shadow: inset 0 0 0 1px var(--rule); border-radius: 999px; padding: 6px 14px; min-height: 36px; cursor: pointer; }
.toc { position: fixed; z-index: 35; top: 56px; right: 12px; left: 12px; max-width: 26rem; margin-left: auto; background: var(--paper-2); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 10px 6px; font-family: var(--font-body); }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: flex; gap: 12px; align-items: baseline; padding: 9px 12px; color: var(--ink); text-decoration: none; border-radius: 8px; }
.toc a:hover, .toc a:focus-visible { background: var(--river-soft); }
.toc-num { font-family: var(--font-display); color: var(--river); min-width: 2.2em; }
.toc-min { margin-left: auto; color: var(--mute); font-size: .85rem; white-space: nowrap; }

/* the hook: the question is the whole first screen */
.hook { min-height: 100svh; max-width: var(--measure); margin: 0 auto; padding: 14vh 20px 48px; display: flex; flex-direction: column; justify-content: center; }
.mark { color: var(--river); }
.kicker { font-style: italic; color: var(--river); margin: 18px 0 6px; font-size: 1.05rem; }
.hook-q { font-weight: 400; font-size: clamp(2.6rem, 9vw, 4.6rem); line-height: 1.02; letter-spacing: -.01em; margin: 0 0 18px; text-wrap: balance; }
.hook-sub { font-size: 1.3rem; line-height: 1.5; color: var(--ink-2); margin: 0 0 14px; max-width: 30rem; text-wrap: pretty; }
.hook-meta { font-family: var(--font-body); font-size: .9rem; color: var(--mute); margin: 0 0 28px; }
.gate { display: grid; gap: 8px; }
.gate-label { font-family: var(--font-body); font-size: .9rem; color: var(--mute); }
.gate-row { display: flex; gap: 10px; flex-wrap: wrap; }
.gate-in { flex: 1 1 220px; min-width: 0; font: 1.1rem var(--font-body); padding: 12px 14px; color: var(--ink); background: transparent; border: 0; border-bottom: 1.5px solid var(--ink-2); border-radius: 0; }
.gate-in:focus-visible { outline: none; border-bottom-color: var(--river); }
.gate-err { font: .9rem var(--font-body); color: var(--mark); margin: 0; min-height: 1.2em; }
.gate-note, .gate-more { font: .85rem/1.55 var(--font-body); color: var(--mute); margin: 0; }
.gate-more summary { cursor: pointer; } .gate-more p { margin: 6px 0 0; }
.welcome p { font-family: var(--font-body); font-size: 1rem; color: var(--ink-2); margin: 0 0 12px; }
.welcome-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* the text, set as a book */
.text { max-width: var(--measure); margin: 0 auto; padding: 0 20px 80px; }
.honesty { font-style: italic; color: var(--ink-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 18px 0; margin: 0 0 40px; font-size: 1.05rem; }
.playbill { text-align: center; margin: 0 0 56px; }
.playbill h2 { font: 500 .8rem var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--mute); margin: 0 0 22px; }
.cast { display: grid; gap: 2px; margin: 0 auto 18px; max-width: 30rem; }
.cast-name { font-variant: small-caps; letter-spacing: .08em; font-size: 1.25rem; }
.cast-desc { color: var(--ink-2); font-size: 1rem; line-height: 1.5; }
.cast-also { color: var(--ink-2); font-size: 1rem; }
.cast-also strong { font-weight: 400; font-variant: small-caps; letter-spacing: .06em; }
.scene { font-size: 1rem; line-height: 1.6; color: var(--ink-2); max-width: 31rem; margin: 26px auto 0; text-align: left; border-left: 2px solid var(--rule); padding-left: 14px; }
.scene-k { display: block; font: 500 .75rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 4px; }

.part { padding: 28px 0 8px; scroll-margin-top: 64px; }
.part-head { text-align: center; margin: 24px 0 34px; }
.part-num { display: block; font-size: 1rem; color: var(--river); letter-spacing: .1em; }
.part-head h2 { font-weight: 400; font-size: 1.9rem; line-height: 1.15; margin: 4px 0 6px; text-wrap: balance; }
.part-min { font: .8rem var(--font-body); color: var(--mute); }
.part p { margin: 0 0 1.05em; }
.who { font-variant: small-caps; letter-spacing: .1em; font-size: .92em; color: var(--mute); margin-right: .25em; }
.stage { font-style: italic; color: var(--mute); margin: 1.5em 0 !important; padding-left: 1em; }
.stage em { font-style: normal; }
.voice { margin: 1.6em 0 1.8em; padding: 2px 0 2px 1.2em; border-left: 2px solid var(--river); }
.voice p { margin: 0 0 .7em; color: var(--ink-2); font-size: 1.08rem; line-height: 1.66; }
.voice-who { font: 500 .78rem var(--font-body) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--river) !important; margin: 0 0 .4em !important; }
.voice cite { display: block; font: italic .85rem/1.45 var(--font-body); color: var(--mute); }
.ask { margin: 1.6em 0 !important; font-size: 1.22rem; line-height: 1.5; }
.stage-last { margin-top: 3.2em !important; font-size: 1.15rem; color: var(--ink) !important; padding-left: 0; text-align: center; }
.part-next { text-align: center; margin: 40px 0 0 !important; font: .95rem var(--font-body); }
.part-next a { text-decoration: none; border-bottom: 1px solid currentColor; }
.endnote { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--rule); font-size: 1rem; line-height: 1.6; color: var(--ink-2); }
.endnote h2 { font: 500 .8rem var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--mute); margin: 0 0 14px; }
.endnote h3 { font: 500 .75rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin: 26px 0 8px; }
.sources { padding-left: 1.2em; font: .9rem/1.6 var(--font-body); }
.sources li { margin-bottom: 6px; }
.foot { text-align: center; margin-top: 72px; padding-top: 32px; border-top: 1px solid var(--rule); }
.foot-k { font: 500 .78rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin: 8px 0; }
.foot-t { max-width: 28rem; margin: 0 auto 18px; font-size: 1.05rem; color: var(--ink-2); }
@media (max-width: 480px) { body { font-size: 1.18rem; } .hook { padding-top: 10vh; } .part-head h2 { font-size: 1.6rem; } .voice { padding-left: .9em; } }
@media print { .progress, .bar, .toc, .hook, .foot .btn { display: none !important; } .text { display: block !important; } body { font-size: 12pt; } }
/* touch: every target at least 44px tall (2026-10-12 mobile pass) */
@media (pointer: coarse) { .bar-btn { min-height: 44px; padding: 8px 16px; } .gate-more summary { min-height: 44px; display: flex; align-items: center; } .toc a { min-height: 44px; } .part-next a { display: inline-block; padding: 10px 0; } .sources li a { display: inline-block; padding: 8px 0; } }
@media (pointer: coarse) { .bar-title { min-height: 44px; display: inline-flex; align-items: center; } }

/* the reading bar (2026-10-12): one small bar at the bottom on every screen, as on The Great Turning */
.rbar { position: fixed; z-index: 38; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(520px, calc(100vw - 24px)); display: flex; gap: 2px; padding: 5px; background: color-mix(in srgb, var(--paper-2) 94%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: 18px; box-shadow: 0 2px 6px rgba(0,0,0,.12), 0 18px 48px rgba(0,0,0,.18); transition: transform .2s ease, opacity .2s ease; font-family: var(--font-body); }
.rbar.rb-away { transform: translate(-50%, calc(100% + 24px)); opacity: 0; pointer-events: none; }
.rbar button { border: 0; background: transparent; color: var(--ink); font: inherit; cursor: pointer; border-radius: 13px; min-height: 48px; }
.rbar button:hover { background: var(--river-soft); }
.rbar button:focus-visible { outline: 2px solid var(--river); outline-offset: 1px; }
.rb-where { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 10px; text-align: left; }
.rb-ico { width: 20px; height: 20px; color: var(--river); flex: none; }
.rb-text { display: grid; min-width: 0; line-height: 1.2; }
.rb-ch { font-family: var(--font-display); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-left { font-size: .78rem; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-btn { flex: none; width: 56px; display: grid; place-items: center; align-content: center; gap: 1px; font-size: .7rem !important; color: var(--ink-2) !important; }
.rb-aa { font-family: var(--font-display); font-size: 1.1rem; line-height: 1; color: var(--ink); }
body:not(.gated) { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
@media (prefers-reduced-motion: reduce) { .rbar { transition: none; } }
@media (max-width: 599px) {
  .bar { display: none !important; }
  .rbar { bottom: 0; width: 100%; border-radius: 18px 18px 0 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .rbar.rb-away { transform: translate(-50%, 110%); }
  .toc { top: auto; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); max-height: 70dvh; overflow-y: auto; }
}
@media print { .rbar { display: none !important; } }
.toc a.here { background: var(--river-soft); box-shadow: inset 3px 0 0 var(--river); }
@media (max-width: 360px) { .rb-btn { width: 48px; } }

/* listening (2026-10-12) */
.listen-all-row { margin: 0 0 28px; }
.listen-all { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; text-align: left; }
.listen-all svg, .listen-btn svg { width: 1.1em; height: 1.1em; flex: none; }
.listen-all .la-min { flex-basis: 100%; font-size: .8rem; color: var(--mute); padding-left: 1.6em; }
.part-listen { text-align: center; margin: -22px 0 26px !important; }
.listen-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--river); font: .9rem var(--font-body); cursor: pointer; padding: 8px 12px; min-height: 44px; border-radius: 999px; }
.listen-btn:hover, .listen-btn.playing { background: var(--river-soft); }
.listen-bar { position: fixed; z-index: 39; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: min(560px, calc(100vw - 24px)); background: var(--paper-2); border-radius: 18px; box-shadow: 0 2px 6px rgba(0,0,0,.14), 0 20px 50px rgba(0,0,0,.22); padding: 10px 14px 8px; font-family: var(--font-body); }
.listen-bar svg { width: 22px; height: 22px; }
.lb-top { display: flex; align-items: center; gap: 10px; }
.lb-title { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.lb-title #lb-title { font-family: var(--font-display); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-sub { font-size: .75rem; color: var(--mute); }
.lb-seek-row { display: flex; align-items: center; gap: 10px; margin: 2px 0; }
.lb-time { font-size: .75rem; color: var(--mute); font-variant-numeric: tabular-nums; min-width: 2.6em; }
.lb-seek { flex: 1; min-width: 0; accent-color: var(--river); min-height: 32px; }
.lb-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.lb-btn { border: 0; background: transparent; color: var(--ink); cursor: pointer; width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; font: 600 .85rem var(--font-body); }
.lb-btn:hover { background: var(--river-soft); }
.lb-main { width: 54px; height: 54px; box-shadow: inset 0 0 0 1.5px var(--ink); }
.lb-main svg { width: 26px; height: 26px; }
.lb-spacer { width: 44px; }
body.listening .rbar { display: none; }
body.listening:not(.gated) { padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 599px) { .listen-bar { bottom: 0; width: 100%; border-radius: 18px 18px 0 0; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); } }
@media print { .listen-bar, .listen-btn, .listen-all-row { display: none !important; } }
