/* WTF Is Going On: the reading shell. Marked Up: heavy tight Helvetica, serif body, marker swipes, hairlines.
   One frozen frame (bar, margin furniture, red footer rule, rail); the only thing that changes per chapter is --ch. */
:root {
  --fs: clamp(18.5px, 1.05vw + 8px, 21px);
  --measure: 34em;
  --bar-h: var(--safe-top);
  --rail-h: var(--safe-bottom);
  --ch: var(--pink);
}
html,
body {
  height: 100%;
  overflow: hidden;
}
body {
  font-size: var(--fs);
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
}
::selection {
  background: color-mix(in srgb, var(--ch) 45%, transparent);
}
.skip-link {
  position: fixed;
  left: 8px;
  top: -80px;
  z-index: 90;
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 12px;
}
.skip-link:focus {
  top: 8px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- bar (top chrome, always there) ---------- */
.bar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--bar-h);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  padding: 0 var(--gut);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.bar .sp {
  flex: 1;
}
.cbtn {
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: 0;
  padding: 10px 0;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
}
.cbtn:hover {
  border-bottom-color: var(--lead);
}
.cbtn[aria-pressed="true"] {
  color: var(--lead);
}
.bar .home {
  font: 800 15px/1 var(--sans);
  letter-spacing: -0.04em;
  text-transform: none;
  color: var(--lead);
}
.snd {
  display: flex;
  align-items: center;
  gap: 10px;
}
.snd .cbtn {
  min-width: 6.6em;
  text-align: left;
}
.vol {
  -webkit-appearance: none;
  appearance: none;
  width: 64px;
  height: 20px;
  background: linear-gradient(var(--muted), var(--muted)) center / 100% 1px
    no-repeat;
  margin: 0;
  cursor: pointer;
}
.vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 3px;
  height: 14px;
  background: var(--lead);
  border: 0;
  border-radius: 0;
}
.vol::-moz-range-thumb {
  width: 3px;
  height: 14px;
  background: var(--lead);
  border: 0;
  border-radius: 0;
}

/* ---------- stage: one page at a time ---------- */
.stage {
  position: fixed;
  inset: var(--bar-h) 0 var(--rail-h) 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.page {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}
.page > .body {
  animation: turn 0.5s var(--ease) both;
}
.page.cover > .body,
.page.end > .body {
  animation: none;
}
.page.back > .body {
  animation-name: turn-back;
}
@keyframes turn {
  from {
    opacity: 0;
    transform: translateX(46px);
  }
}
@keyframes turn-back {
  from {
    opacity: 0;
    transform: translateX(-46px);
  }
}
.body {
  flex: 1;
  padding: clamp(28px, 6vh, 64px) var(--gut) clamp(36px, 7vh, 72px);
}

/* ---------- footer: the red hairline, on every page ---------- */
.foot {
  margin: 0 var(--gut);
  padding: 12px 0 18px;
  border-top: 1px solid var(--lead);
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 6px 32px;
  font: 400 11px/1.5 var(--sans);
  color: var(--muted);
}
.foot .slug {
  font: 500 10px/1.5 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lead);
}
.foot .view {
  font: italic 400 13px/1.4 var(--serif);
  color: var(--body);
  display: block;
  margin-top: 3px;
}
.foot .support {
  max-width: 68ch;
  margin: 0;
}

/* ---------- text pages ---------- */
.text .body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
}
.furn {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  font: 500 10.5px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lead);
  margin-bottom: 22px;
  font-variant-numeric: tabular-nums;
}
.furn-n {
  font: 800 30px/0.8 var(--sans);
  letter-spacing: -0.05em;
}
.furn-p {
  color: var(--muted);
}
.col {
  max-width: var(--measure);
  min-width: 0;
}
.col > p {
  margin: 0 0 0.95em;
  color: var(--body);
  hanging-punctuation: first;
  text-wrap: pretty;
}
.col > p.first::first-line {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.col h3.hd {
  font: 800 clamp(19px, 1.25em, 27px) / 1.02 var(--sans);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 1.7em 0 0.6em;
  padding-top: 0.75em;
  border-top: 1px solid var(--rule);
  text-wrap: balance;
}
.col h3.hd:first-child {
  margin-top: 0;
}
.hd .hd-n,
.tool-t .hd-n {
  color: var(--lead);
  margin-right: 0.3em;
  font-variant-numeric: tabular-nums;
}
.pull {
  font: 800 clamp(24px, 1.7em, 40px) / 1 var(--sans);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 1.2em 0;
}
.signoff {
  font: 800 clamp(30px, 5.2vw, 68px) / 0.9 var(--sans);
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: var(--lead);
  margin: 1.4em 0 0.4em;
  overflow-wrap: anywhere;
}

/* the marker: translucent, behind the words, a little uneven, safe across line breaks */
.hl {
  --a: calc(var(--hl-alpha) * 100%);
  --m: color-mix(in srgb, var(--c, var(--ch)) var(--a), transparent);
  --m2: color-mix(
    in srgb,
    var(--c, var(--ch)) calc(var(--a) * 0.55),
    transparent
  );
  color: inherit;
  background-color: transparent;
  background-image:
    linear-gradient(
      90deg,
      var(--m2),
      transparent 0.7em,
      transparent calc(100% - 0.9em),
      var(--m2)
    ),
    linear-gradient(
      178.8deg,
      transparent 13%,
      var(--m) 16%,
      var(--m) 83%,
      transparent 88%
    );
  padding: 0.06em 0.28em 0.04em 0.22em;
  margin: 0 -0.25em 0 -0.2em;
  border-radius: 0.5em 0.12em 0.42em 0.16em / 0.2em 0.5em 0.16em 0.42em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
span.gl {
  cursor: help;
  text-decoration: underline dotted var(--lead) 1.5px;
  text-underline-offset: 0.2em;
  border-radius: 0;
}
span.gl[aria-expanded="true"] {
  text-decoration-style: solid;
}
.gl-note {
  position: absolute;
  z-index: 5;
  display: block;
  background: var(--paper);
  border-top: 2px solid var(--lead);
  border-bottom: 1px solid var(--rule);
  padding: 9px 2px 10px;
  font: italic 400 15px/1.4 var(--serif);
  color: var(--ink);
  pointer-events: none;
}
.gl-note[hidden] {
  display: none;
}
.sw {
  cursor: pointer;
  border-bottom: 1.5px solid var(--lead);
  padding-bottom: 0.02em;
}
.sw::after {
  content: "\21C4";
  font: 500 0.55em/1 var(--mono);
  color: var(--lead);
  vertical-align: super;
  margin-left: 0.2em;
}
.sw.flip {
  animation: flip 0.3s var(--ease);
}
@keyframes flip {
  from {
    opacity: 0.2;
  }
}

/* figures */
.fig {
  margin: 1.7em 0 1.9em;
  width: min(760px, 100%);
}
.fig-host {
  min-height: 40px;
}
.fig figcaption {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 12px;
  align-items: baseline;
  margin-top: 10px;
  font: italic 400 15px/1.4 var(--serif);
  color: var(--body);
}
.fig-n {
  font: 500 10.5px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lead);
  font-style: normal;
}
.pending {
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font: italic 400 15px/1.4 var(--serif);
  color: var(--muted);
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.pending-id {
  font: 500 10.5px/1.4 var(--mono);
  font-style: normal;
  letter-spacing: 0.06em;
  color: var(--faint);
}

/* chapter 11 tools */
.tool {
  margin: 1.8em 0 2em;
  padding-top: 0.9em;
  border-top: 1px solid var(--ink);
}
.tool:first-child {
  margin-top: 0;
}
.tool-t {
  font: 800 clamp(20px, 1.3em, 28px) / 1.02 var(--sans);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 0.7em;
}
.tool dl {
  margin: 0;
}
.tool dt {
  font: 600 10px/1.2 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
}
.tool dd {
  margin: 0 0 0.9em;
}

/* the care note: calm, plain, clearly visible */
.care {
  max-width: var(--measure);
  margin: 0 0 clamp(24px, 5vh, 44px);
  padding: 14px 0 15px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font: 400 0.9em/1.5 var(--serif);
  color: var(--ink);
}
.care b {
  display: block;
  font: 600 10px/1.2 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

/* ---------- chapter title page ---------- */
.title .body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.t-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: auto;
  padding-bottom: 24px;
}
.t-top .t-eyebrow {
  flex: 1;
}
.t-spec {
  margin: 0;
  display: flex;
  gap: 0 22px;
  font: 500 10.5px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.t-spec div {
  border-top: 1px solid var(--rule);
  padding-top: 7px;
  min-width: 4.6em;
}
.t-spec dt {
  color: var(--muted);
}
.t-spec dd {
  margin: 2px 0 0;
  color: var(--ink);
}
.t-eyebrow {
  font: 500 10.5px/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lead);
  display: flex;
  gap: 14px;
  align-items: center;
}
.t-eyebrow::after {
  content: "";
  flex: 0 1 9rem;
  border-top: 1px solid var(--lead);
}
.t-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 clamp(20px, 4vw, 64px);
  align-items: end;
  margin-top: clamp(8px, 2vh, 20px);
}
.t-num {
  font: 800 clamp(150px, min(36vw, 66vh), 560px) / 0.74 var(--sans);
  letter-spacing: -0.075em;
  color: var(--lead);
  margin: 0 0 -0.02em -0.055em;
  padding-right: 0.06em;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
.t-txt {
  padding-bottom: 0.4rem;
  min-width: 0;
}
.t-title {
  font: 800 clamp(34px, min(6.2vw, 10.5vh), 96px) / 0.9 var(--sans);
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
  max-width: 11em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.t-title .hl {
  padding: 0 0.1em 0 0.06em;
  margin: 0 -0.1em 0 -0.06em;
  border-radius: 0;
  background-image: linear-gradient(
    179.3deg,
    transparent 41%,
    var(--m) 44%,
    var(--m) 87%,
    transparent 91%
  );
}
.t-sub {
  font: italic 400 clamp(19px, 1.25em, 27px) / 1.25 var(--serif);
  color: var(--body);
  margin: 0.75em 0 0;
  max-width: 28em;
  text-wrap: balance;
}
.t-view {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 12px;
  margin: 1.5em 0 0;
  max-width: 62ch;
  font: 400 11.5px/1.5 var(--mono);
  color: var(--muted);
}
.t-view::before {
  content: "view";
  font: 600 10px/1.75 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lead);
}
.t-go {
  margin-top: 1.6rem;
  display: flex;
  gap: 12px;
}
a.mk-btn {
  text-decoration: none;
  display: inline-block;
}

/* ---------- cover ---------- */
.cover {
  overflow: hidden;
}
.cover .body {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: min(560px, 100%);
  color: var(--lead);
}
.cv-dots,
.cv-swoosh {
  position: absolute;
  pointer-events: none;
  fill: var(--lead);
}
.cv-dots {
  top: 0;
  right: 0;
  width: clamp(150px, 26vw, 400px);
  height: auto;
}
.cv-swoosh {
  top: -2vw;
  left: -3vw;
  width: clamp(190px, 36vw, 560px);
  height: auto;
}
.cv-head {
  position: relative;
  margin-top: clamp(30px, 8vh, 100px);
  width: fit-content;
  max-width: 100%;
}
.cv-title {
  font: 800 clamp(42px, min(9.6vw, 17vh), 148px) / 0.9 var(--sans);
  letter-spacing: -0.065em;
  margin: 0 0 0 -0.04em;
  white-space: nowrap;
}
.cv-sub {
  font: 400 clamp(15px, min(2.5vw, 4.4vh), 36px) / 1.12 var(--sans);
  letter-spacing: -0.012em;
  margin: 0.4em 0 0 13.5%;
  max-width: 21em;
}
.cv-rule {
  border: 0;
  border-top: 2px solid var(--lead);
  margin: clamp(14px, 2.6vh, 30px) 0 0;
}
.cv-q {
  position: absolute;
  right: -0.13em;
  bottom: 0.02em;
  font: 800 clamp(190px, min(38vw, 47vh), 600px) / 0.74 var(--sans);
  letter-spacing: -0.045em;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}
.cv-low {
  position: relative;
  margin-top: auto;
  padding-top: 40px;
  padding-left: clamp(0px, 15vw, 260px);
  max-width: 44rem;
}

.cv-go {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.cover .mk-btn {
  background: var(--paper);
}
.cover .mk-btn.lead {
  background: var(--lead);
  border-color: var(--lead);
  color: #fff;
}
.cover .mk-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ---------- contents ---------- */
.contents .body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-content: start;
}
.c-h {
  font: 800 clamp(34px, 5vw, 64px) / 0.9 var(--sans);
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 18px;
}
.tally {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 10px 14px;
  padding: 14px 0 0;
  border-top: 1px solid var(--ink);
  max-width: 17rem;
}
.tally-n {
  font: 800 84px/0.76 var(--sans);
  letter-spacing: -0.06em;
  color: var(--lead);
  font-variant-numeric: tabular-nums;
}
.tally-l {
  font: 500 10.5px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tally-c {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
}
.tally-c i {
  height: 14px;
  border: 1px solid var(--faint);
}
.tally-c i.on {
  background: var(--ch);
  border-color: var(--ch);
}
.c-side p {
  font: italic 400 15px/1.4 var(--serif);
  color: var(--body);
  max-width: 24em;
  margin: 14px 0 0;
}
.c-side .acts {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
}
.toc {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}
.toc li {
  border-bottom: 1px solid var(--rule);
}
.toc a {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  gap: 0 14px;
  align-items: baseline;
  padding: 13px 0 12px;
  text-decoration: none;
}
.toc .n {
  font: 500 12px/1 var(--mono);
  color: var(--lead);
  font-variant-numeric: tabular-nums;
}
.toc .tt {
  font: 800 clamp(17px, 1.15em, 23px) / 1 var(--sans);
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(
      color-mix(in srgb, var(--ch) calc(var(--hl-alpha) * 100%), transparent) 0
        0
    )
    left 62% / 0% 0.62em no-repeat;
  transition: background-size 0.3s var(--ease);
}
.toc a:hover .tt,
.toc a:focus-visible .tt {
  background-size: 100% 0.62em;
}
.toc .st {
  display: block;
  font: italic 400 15px/1.3 var(--serif);
  color: var(--muted);
  margin-top: 4px;
}
.toc .state {
  font: 500 10px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.toc .state .got {
  color: var(--ink);
}
.toc .state i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  background: var(--ch);
  font-style: normal;
}
.toc .plain .tt {
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* ---------- end + about ---------- */
.end .body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.e-line {
  font: 800 clamp(44px, min(9.4vw, 13.2vh), 160px) / 0.84 var(--sans);
  letter-spacing: -0.06em;
  text-transform: uppercase;
  color: var(--lead);
  margin: 0 0 0 -0.03em;
  max-width: 9.5em;
  overflow-wrap: anywhere;
}
.e-more {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(20px, 4vh, 40px);
}
.about .col h1 {
  font: 800 clamp(34px, 5vw, 64px) / 0.9 var(--sans);
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 0.6em;
}
.about .lab {
  display: block;
  font: 600 10px/1.2 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lead);
  margin: 1.6em 0 0.5em;
  padding-top: 0.8em;
  border-top: 1px solid var(--rule);
}

/* ---------- plate page ---------- */
.plate-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--paper);
}
.plate-host {
  position: fixed;
  inset: 0;
  outline-offset: -3px;
}
.plate-host.is-pending {
  padding: calc(var(--bar-h) + 12vh) var(--gut) 0;
}
.plate-host.is-pending .pending {
  max-width: var(--measure);
}
body.on-plate .stage {
  visibility: hidden;
}
body.on-plate .bar,
body.on-plate .rail {
  background: transparent;
  border-color: transparent;
}

/* ---------- rail (bottom chrome: page position + turning) ---------- */
.rail {
  position: fixed;
  inset: auto 0 0 0;
  height: var(--rail-h);
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 2vw, 28px);
  padding: 0 var(--gut);
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
.rail .turn {
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 11px 13px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.rail .turn:hover {
  background: var(--ink);
  color: var(--paper);
}
.rail .turn.go {
  background: var(--lead);
  border-color: var(--lead);
  color: #fff;
}
.rail .turn[aria-disabled="true"] {
  visibility: hidden;
}
.pos {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  font: 500 10.5px/1.2 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pos b {
  font-weight: 500;
  color: var(--lead);
  white-space: nowrap;
}
.ticks {
  display: flex;
  align-items: flex-end;
  height: 20px;
  min-width: 0;
}
.ticks a {
  display: block;
  width: clamp(7px, 1.2vw, 14px);
  height: 20px;
  position: relative;
}
.ticks a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 8px;
  background: var(--faint);
}
.ticks a.t0::after {
  height: 14px;
}
.ticks a.pl::after {
  width: 5px;
  height: 5px;
  left: -2px;
  bottom: 1px;
  background: none;
  border: 1px solid var(--faint);
}
.ticks a.pl.done::after {
  background: var(--ch);
  border-color: var(--ch);
}
.ticks a.cur::after {
  width: 2px;
  height: 20px;
  background: var(--lead);
  border-color: var(--lead);
}
.ticks a.pl.cur::after {
  width: 7px;
  height: 7px;
  left: -3px;
}
.plate-say {
  font: italic 400 clamp(14px, 0.8em, 17px) / 1.25 var(--serif);
  color: var(--ink);
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.plate-say.after {
  animation: turn 0.5s var(--ease) both;
}
.plate-say .hl {
  --c: var(--ch);
}

/* ---------- key sheet ---------- */
.sheet {
  position: fixed;
  z-index: 60;
  top: var(--bar-h);
  right: 0;
  bottom: var(--rail-h);
  width: min(26rem, 100%);
  overflow-y: auto;
  background: var(--paper);
  border-left: 1px solid var(--ink);
  padding: 26px clamp(20px, 3vw, 34px) 30px;
}
.sheet h2 {
  font: 800 26px/0.95 var(--sans);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 4px;
}
.sheet .lead-in {
  font: italic 400 15px/1.4 var(--serif);
  color: var(--body);
  margin: 0 0 16px;
}
.sheet dl {
  margin: 0 0 22px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 18px;
  border-top: 1px solid var(--ink);
}
.sheet dt,
.sheet dd {
  margin: 0;
  padding: 8px 0 7px;
  border-bottom: 1px solid var(--rule);
}
.sheet dt {
  font: 500 11px/1.5 var(--mono);
  color: var(--lead);
  white-space: nowrap;
}
.sheet dd {
  font: 400 14px/1.4 var(--serif);
  color: var(--body);
}
.sheet .support {
  font: 400 13px/1.5 var(--serif);
  color: var(--ink);
  border-top: 1px solid var(--lead);
  padding-top: 12px;
  margin: 0 0 16px;
}

/* ---------- wide: an asymmetric column with a margin track for the furniture ---------- */
@media (min-width: 1080px) {
  .text .body,
  .about .body {
    grid-template-columns: minmax(170px, 23vw) minmax(0, var(--measure)) minmax(
        0,
        1fr
      );
    column-gap: 0;
  }
  .text .col,
  .about .col {
    grid-column: 2;
  }
  .text .care {
    grid-column: 2;
  }
  .track {
    grid-column: 1;
    grid-row: 1 / span 3;
  }
  .furn {
    position: sticky;
    top: clamp(28px, 6vh, 64px);
    flex-direction: column;
    gap: 9px;
    margin: 0;
    padding-right: 28px;
    max-width: 15rem;
  }
  .furn-n {
    font-size: 64px;
    margin-left: -0.04em;
  }
  .furn-t {
    padding-top: 9px;
    border-top: 1px solid var(--lead);
    align-self: stretch;
  }
  .fig {
    width: min(760px, calc(100% + 46px));
  }
  .contents .body {
    grid-template-columns: minmax(250px, 23vw) minmax(0, 46rem);
    gap: 0 clamp(24px, 4vw, 64px);
  }
  .c-side {
    position: sticky;
    top: clamp(28px, 6vh, 64px);
    align-self: start;
  }
  .title .care {
    margin-left: 0;
  }
}
@media (min-width: 700px) and (max-width: 1079px) {
  .text .body,
  .about .body {
    padding-left: clamp(40px, 11vw, 150px);
  }
  .contents .body {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0 36px;
  }
}

/* ---------- phone ---------- */
@media (max-width: 699px) {
  .bar {
    gap: 12px;
  }
  .bar .home {
    display: none;
  }
  .bar .kw {
    display: none;
  }
  .bar {
    gap: 10px;
    padding: 0 14px;
  }
  .snd .cbtn {
    min-width: 0;
  }
  .cbtn {
    letter-spacing: 0.1em;
  }
  .vol {
    width: 34px;
  }
  .snd {
    gap: 7px;
  }
  .foot {
    grid-template-columns: minmax(0, 1fr);
  }
  .t-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .t-num {
    font-size: clamp(150px, 56vw, 240px);
    margin-bottom: 0.1em;
  }
  .t-title {
    font-size: clamp(34px, 11.5vw, 56px);
  }
  .cv-title {
    font-size: 12.6vw;
  }
  .cv-sub {
    margin-left: 0;
    font-size: 17px;
  }
  .cv-q {
    font-size: 66vw;
    bottom: 22%;
  }
  .cv-low {
    padding-left: 0;
    padding-top: 62vw;
  }
  .toc a {
    grid-template-columns: 2rem minmax(0, 1fr);
  }
  .toc .state {
    grid-column: 2;
    text-align: left;
    margin-top: 6px;
  }
  .rail .turn {
    padding: 11px 10px;
  }
  .rail .turn .w {
    display: none;
  }
  .sheet {
    border-left: 0;
  }
}
@media (max-height: 620px) and (min-width: 700px) {
  .t-num {
    font-size: clamp(150px, 46vh, 300px);
  }
}

@media (max-width: 699px) {
  .t-spec {
    display: none;
  }
}

/* ---------- finale hooks: the satchel in the bar, the relic reveal over a plate ---------- */
.satchel {
  display: flex;
  align-items: center;
}
.satchel[hidden],
.satchel:empty {
  display: none;
}
.reveal-layer {
  position: fixed;
  inset: 0;
  z-index: 30;
}

/* chapter 11's title page carries the support note on top: the number gives it room */
.title .care + .t-top + .t-grid .t-num {
  font-size: clamp(140px, min(30vw, 42vh), 420px);
}

/* =====================================================================================================
   MOTION (PLAN section 12). Type that moves with intent, his red at scale, marker that draws itself.
   Chapter 11 pages carry .calm and get a plain fade only. Reduced motion lands every animation at its end.
   ===================================================================================================== */
.wipe {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: var(--lead);
  will-change: transform;
  pointer-events: none;
}
.wipe::before,
.wipe::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 9vw;
  background: var(--ch);
}
.wipe::before {
  right: 100%;
}
.wipe::after {
  left: 100%;
}
.sweep {
  position: fixed;
  top: var(--bar-h);
  bottom: var(--rail-h);
  left: 0;
  width: 3px;
  z-index: 35;
  background: var(--lead);
  pointer-events: none;
}
body.on-plate .sweep {
  top: 0;
  bottom: 0;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes rise {
  from {
    transform: translateY(105%);
  }
}
@keyframes slam {
  from {
    opacity: 0;
    transform: translateY(0.35em) scale(1.12);
  }
}
@keyframes grow {
  from {
    transform: scaleX(0);
  }
}
@keyframes drop {
  from {
    transform: translateY(-120%) rotate(-9deg);
  }
  70% {
    transform: translateY(4%) rotate(1.5deg);
  }
}
.wd {
  display: inline-block;
}

/* marker swipes: drawn left to right when they come into view */
.hl.pre {
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size 0.75s cubic-bezier(0.6, 0, 0.2, 1);
}
.hl.pre.drawn {
  background-size: 100% 100%;
}

/* glosses: a small live square after the term; the note unrolls from its rule */
span.gl::after {
  content: "";
  display: inline-block;
  width: 0.26em;
  height: 0.26em;
  margin-left: 0.14em;
  vertical-align: 0.62em;
  background: var(--lead);
  animation: breathe 2.6s ease-in-out infinite;
}
span.gl[aria-expanded="true"]::after {
  animation: none;
  transform: rotate(45deg);
}
@keyframes breathe {
  50% {
    opacity: 0.25;
    transform: scale(0.7);
  }
}
.gl-note {
  transform-origin: 0 0;
  animation: unroll 0.32s var(--ease) both;
}
@keyframes unroll {
  from {
    clip-path: inset(0 100% 0 0);
    transform: translateY(-4px);
  }
  60% {
    clip-path: inset(0 0 60% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* chapter title: the numeral rises out of the floor, the title lands word by word, then gets swiped */
.t-num {
  overflow: hidden;
  padding: 0.04em 0.1em 0.05em 0.055em;
  margin-left: -0.11em;
  margin-bottom: -0.06em;
}
.t-num > .t-n {
  display: block;
  animation: rise 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  transform: translate(calc(var(--mx, 0) * -10px), calc(var(--my, 0) * -6px));
}
.t-txt {
  transform: translate(calc(var(--mx, 0) * 6px), calc(var(--my, 0) * 3px));
}
.t-title .wd {
  animation: slam 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(0.3s + var(--i) * 80ms);
}
.t-title .hl {
  background-repeat: no-repeat;
  animation: swipe 0.8s cubic-bezier(0.6, 0, 0.2, 1) 0.85s both;
}
@keyframes swipe {
  from {
    background-size: 0% 100%;
  }
  to {
    background-size: 100% 100%;
  }
}
.t-eyebrow::after {
  transform-origin: 0 50%;
  animation: grow 0.9s var(--ease) 0.2s both;
}
.t-sub,
.t-view,
.t-go,
.t-spec {
  animation: fade 0.7s ease 0.95s both;
}

/* cover: the live field, the kicker dropping in, everything leaning toward the pointer */
.cv-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cover .body.fx-on .cv-dots {
  display: none;
}
.cv-title .wd {
  animation: slam 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(0.1s + var(--i) * 90ms);
}
.cv-sub,
.cv-low {
  animation: fade 0.8s ease 0.7s both;
}
.cv-rule {
  transform-origin: 0 50%;
  animation: grow 0.9s cubic-bezier(0.6, 0, 0.2, 1) 0.5s both;
}
.cv-q {
  transform: translate(calc(var(--mx, 0) * -18px), calc(var(--my, 0) * -10px));
}
.cv-q .q {
  display: inline-block;
  animation: drop 0.9s cubic-bezier(0.3, 1.3, 0.5, 1) both;
  animation-delay: calc(0.45s + var(--i) * 120ms);
}
.cv-swoosh {
  transform: translate(calc(var(--mx, 0) * 12px), calc(var(--my, 0) * 8px));
}
.cv-head {
  transform: translate(calc(var(--mx, 0) * 5px), calc(var(--my, 0) * 3px));
}

/* contents: rows arrive in order; each carries a small map of its pages */
.toc li {
  animation: fade 0.5s ease both;
  animation-delay: calc(var(--i, 11) * 45ms);
}
.tally-n {
  animation: slam 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
.map {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 9px;
  margin-top: 9px;
}
.map:empty {
  display: none;
}
.map i {
  width: 1px;
  height: 7px;
  background: var(--faint);
}
.map i.pl {
  width: 7px;
  height: 7px;
  background: none;
  border: 1px solid var(--muted);
}
.map i.pl.on {
  background: var(--ch);
  border-color: var(--ch);
}

/* the end: his sign-off on a full field of his red */
.end .body {
  background: var(--lead);
  color: #fff;
  justify-content: flex-end;
}
.end .e-line {
  color: #fff;
  transform: translate(calc(var(--mx, 0) * -8px), calc(var(--my, 0) * -5px));
}
.e-line .wd {
  animation: slam 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(0.15s + var(--i) * 85ms);
}
.e-more {
  animation: fade 0.7s ease 1.4s both;
}
.end .mk-btn {
  color: #fff;
  border-color: #fff;
}
.end .mk-btn:hover {
  background: #fff;
  color: var(--lead);
}
.end .mk-btn:focus-visible {
  outline-color: #fff;
}
.end .mk-note {
  color: #fff;
}

/* chapter 11: calm. a plain fade and nothing else. */
.calm .t-num > .t-n,
.calm .t-title .wd,
.calm .t-title .hl,
.calm .t-eyebrow::after,
.calm .t-sub,
.calm .t-view,
.calm .t-go,
.calm .t-spec,
.calm span.gl::after,
.calm .gl-note {
  animation: none;
}
.calm .t-num > .t-n,
.calm .t-txt {
  transform: none;
}
.page.calm > .body {
  animation: fade 0.5s ease both;
}

/* reduced motion: nothing loops, nothing draws itself; pages are still and complete */
@media (prefers-reduced-motion: reduce) {
  span.gl::after {
    animation: none;
  }
  .wd,
  .t-num > .t-n,
  .t-title .hl,
  .t-eyebrow::after,
  .t-sub,
  .t-view,
  .t-go,
  .t-spec,
  .cv-sub,
  .cv-low,
  .cv-rule,
  .cv-q .q,
  .toc li,
  .tally-n,
  .e-more,
  .gl-note,
  .page > .body {
    animation: none !important;
  }
  .wipe,
  .sweep {
    display: none;
  }
}

@media (max-width: 699px) {
  .cover .body {
    min-height: 100%;
  }
  .cv-head {
    order: 1;
    margin-top: 16vw;
  }
  .cv-title {
    font-size: 11.3vw;
  }
  .cv-q {
    order: 2;
    position: relative;
    right: auto;
    bottom: auto;
    align-self: flex-start;
    margin: 9vw 0 0 -1vw;
    font-size: 60vw;
    line-height: 0.8;
  }
  .cv-low {
    order: 3;
    padding-top: 28px;
    margin-top: auto;
  }
  .cv-swoosh {
    width: 62vw;
  }
  .e-line {
    font-size: 14.2vw;
    line-height: 0.86;
  }
}

/* his mark (shell/logo.js): colored by `color`, drawn in path by path, leaning toward the pointer */
.mark {
  display: block;
  height: auto;
  overflow: visible;
}
.mark path {
  stroke: currentColor;
  stroke-width: 0;
}
.cv-spark {
  position: absolute;
  pointer-events: none;
  color: var(--lead);
  left: calc(var(--gut) * 0.2);
  bottom: clamp(8px, 2vh, 22px);
  width: clamp(92px, 12.5vw, 190px);
  transform: rotate(calc(var(--mx, 0) * 14deg))
    scale(calc(1 + var(--my, 0) * 0.05));
  transform-origin: 45% 55%;
}
.cv-spark path,
.e-mark path {
  stroke-width: 0.012;
  stroke-dasharray: 1;
  animation: mark-draw 1.5s cubic-bezier(0.6, 0, 0.2, 1) both;
  animation-delay: calc(0.5s + var(--i) * 160ms);
}
@keyframes mark-draw {
  from {
    stroke-width: 2.5px;
    stroke-dashoffset: 1;
    fill-opacity: 0;
  }
  55% {
    stroke-width: 2.5px;
    fill-opacity: 0;
  }
  to {
    stroke-dashoffset: 0;
    fill-opacity: 1;
    stroke-width: 0;
  }
}
.bar .home {
  display: flex;
  align-items: center;
  gap: 7px;
}
.bar-mark {
  width: 13px;
  color: var(--lead);
}
.e-mark {
  position: absolute;
  right: var(--gut);
  top: clamp(24px, 6vh, 56px);
  width: clamp(54px, 7vw, 104px);
  color: #fff;
  transform: rotate(calc(var(--mx, 0) * 14deg));
}
.end .body {
  position: relative;
}
@media (max-width: 699px) {
  .cv-spark {
    left: auto;
    right: 16px;
    top: auto;
    bottom: 26px;
    width: 72px;
  }
  .bar .home {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cv-spark path,
  .e-mark path {
    animation: none !important;
  }
}

/* the date the book was written, set like the printed edition's footer line */
.cv-date {
  font: 500 clamp(10px, 1.1vw, 12px) / 1.2 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lead);
  margin: 10px 0 0;
}

/* =====================================================================================================
   THE IMPROVEMENTS PASS (docs/IMPROVEMENTS.md, SHELL). Each block names its item.
   ===================================================================================================== */

/* ---------- SH-01: read down before turning. the rail says so, and a cue names what is waiting below ---------- */
.rail .turn .lm,
.rail .turn.more .lt {
  display: none;
}
.rail .turn.more .lm {
  display: inline;
}
body > .fold-cue {
  position: fixed;
  right: var(--gut);
  bottom: calc(var(--rail-h) + 14px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
body > .fold-cue.on {
  opacity: 1;
  pointer-events: auto;
}
.fold-cue .fold-go,
body > .fold-cue .fold-more {
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lead);
  background: var(--paper);
  border: 0;
  border-bottom: 1px solid var(--lead);
  border-radius: 0;
  padding: 7px 2px 6px 8px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.fold-cue .fold-go {
  cursor: pointer;
}
.fold-cue .fold-go b {
  font-weight: 500;
}
.fold-cue .fold-go i {
  font-style: normal;
}
.fold-cue .fold-t {
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  font: italic 400 13px/1 var(--serif);
}
.fold-cue .fold-go:hover {
  background: var(--lead);
  color: #fff;
}
.fold-cue .fold-go:hover .fold-t {
  color: #fff;
}
body > .fold-cue .fold-more {
  border-bottom-color: transparent;
  color: var(--muted);
}

/* ---------- SH-12: rail ticks you can read (and SH-01: the current one fills as the page is read) ---------- */
.ticks {
  height: 26px;
}
.ticks a {
  width: clamp(9px, 1.5vw, 20px);
  height: 26px;
}
.ticks a::after {
  content: none;
}
.ticks .tk {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 2px;
  height: 12px;
  margin-left: -1px;
  background: var(--faint);
}
.ticks a.t0 .tk {
  height: 16px;
}
.ticks .dot {
  position: absolute;
  left: 50%;
  bottom: 19px;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: var(--muted);
}
.ticks a.pl .tk {
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: none;
  border: 1px solid var(--muted);
  animation: pl-breathe 4s ease-in-out infinite;
}
.ticks a.pl.done .tk {
  background: var(--ch);
  border-color: var(--ch);
  animation: none;
}
@keyframes pl-breathe {
  50% {
    transform: scale(0.72);
    opacity: 0.55;
  }
}
.ticks a.cur .tk {
  background: var(--lead);
  height: 20px;
}
.ticks a.pl.cur .tk {
  height: 10px;
  background: none;
  border-color: var(--lead);
}
.ticks a.cur::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--lead);
  transform-origin: 0 50%;
  transform: scaleX(var(--prog, 0));
}
.ticks a:hover .tk {
  background: var(--ink);
}
.ticks a.pl:hover .tk {
  background: none;
  border-color: var(--ink);
}
.ticks .tip {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.06em;
  color: var(--paper);
  background: var(--ink);
  padding: 5px 7px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.ticks a:hover .tip {
  opacity: 1;
}

/* ---------- SH-02: highlights and glosses answer the pointer ---------- */
.col .hl {
  position: relative;
  top: calc(var(--lift, 0) * -1px);
}
.text:not(.calm) .col .hl:hover {
  --a: calc((var(--hl-alpha) + 0.12) * 100%);
}
span.gl[aria-expanded="true"] {
  text-decoration: none;
  background: linear-gradient(
      color-mix(in srgb, var(--ch) calc(var(--hl-alpha) * 100%), transparent) 0
        0
    )
    left 92% / 100% 0.46em no-repeat;
}
span.gl[aria-expanded="true"]::after {
  transform: rotate(45deg) scale(1.4);
}
.gl-note {
  border: 0;
  border-left: 1px solid var(--ch);
  padding: 4px 8px 6px 12px;
  font: 400 15px/1.42 var(--serif);
  font-variant-caps: normal;
  letter-spacing: 0;
  text-transform: none;
  pointer-events: auto;
  box-shadow: 0 0 0 6px var(--paper);
}
.gl-note.in-margin {
  box-shadow: none;
}
.gl-lead::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -2px;
  width: 5px;
  height: 5px;
  background: var(--ch);
}
.gl-link {
  color: var(--lead);
  text-underline-offset: 0.18em;
}
.gl-lead {
  position: absolute;
  z-index: 4;
  height: 1px;
  background: var(--ch);
  pointer-events: none;
  transform-origin: 0 50%;
  animation: grow 0.28s var(--ease) both;
}
.gl-lead[hidden] {
  display: none;
}

/* ---------- SH-03: the margins. numbered gloss marks on the right, a map of the chapter and an echo on the left ---------- */
.gl-mark {
  position: absolute;
  z-index: 3;
  width: 17px;
  height: 17px;
  margin-top: 3px;
  font: 500 9.5px/15px var(--mono);
  text-align: center;
  color: var(--faint);
  border: 1px solid transparent;
  cursor: help;
  user-select: none;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.gl-mark:hover,
.gl-mark.on {
  color: var(--lead);
  border-color: var(--lead);
}
.furn > .mm,
.track > .echo {
  display: none;
}
@media (min-width: 1080px) {
  .text .body,
  .about .body {
    grid-template-columns:
      minmax(170px, 17vw) minmax(0, var(--measure))
      minmax(0, 1fr);
  }
  .track {
    position: relative;
  }
  .furn {
    max-width: calc(100% - 84px);
  }
  .furn > .mm {
    display: flex;
    flex-direction: column;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
    align-self: stretch;
  }
  .furn > .mm a {
    display: block;
    position: relative;
    width: 100%;
    height: 14px;
  }
  .furn > .mm a i {
    position: absolute;
    left: 0;
    top: 6px;
    width: 14px;
    height: 1px;
    background: var(--faint);
    transition: width 0.2s var(--ease);
  }
  .furn > .mm a.fg::after {
    content: "";
    position: absolute;
    left: 34px;
    top: 5px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--muted);
  }
  .furn > .mm a.pl i {
    width: 7px;
    height: 7px;
    top: 3px;
    background: none;
    border: 1px solid var(--muted);
  }
  .furn > .mm a.cur i {
    width: 28px;
    height: 2px;
    top: 5px;
    background: var(--lead);
  }
  .furn > .mm a.pl.cur i {
    width: 7px;
    height: 7px;
    top: 3px;
    background: var(--lead);
    border-color: var(--lead);
  }
  .furn > .mm a:hover i {
    width: 22px;
    background: var(--ink);
  }
  .furn > .mm a.pl:hover i {
    width: 7px;
  }
  .track > .echo {
    display: block;
    position: absolute;
    right: 30px;
    top: 0;
    bottom: 0;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font: 800 44px/1 var(--sans);
    letter-spacing: -0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    color: color-mix(in srgb, var(--ch) 22%, transparent);
    pointer-events: none;
    user-select: none;
  }
}

/* ---------- SH-04: the sheet in the incoming chapter's ink, carrying its numeral; the aperture; the sweep in --ch ---------- */
.wipe {
  background: var(--sheet, var(--lead));
  overflow: hidden;
  box-shadow:
    9vw 0 0 var(--lead),
    -9vw 0 0 var(--lead);
}
.wipe::before,
.wipe::after {
  content: none;
}
.wipe-n {
  position: absolute;
  left: var(--gut);
  bottom: 12vh;
  font: 800 60vh/0.74 var(--sans);
  letter-spacing: -0.075em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--paper);
  user-select: none;
}
.sweep {
  background: var(--ch);
}
.page.from-wipe > .body,
.from-wipe .t-num > .t-n {
  animation: none;
}

/* ---------- SH-05: eleven title pages, one layout; ten numerals each with one small habit (chapter 11: none) ---------- */
.t-num {
  position: relative;
  overflow: visible;
  clip-path: inset(-30% -30% 0 -30%);
}
.t-num > .t-n {
  position: relative;
  z-index: 1;
}
.t-fx {
  position: absolute;
  z-index: 0;
  left: 0.055em;
  top: 0.04em;
  right: 0.1em;
  bottom: 0.05em;
  pointer-events: none;
  animation: fade 0.9s ease 1s both;
}
.t-fx .nx {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
}
.t-fx .nl {
  position: absolute;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
/* 01: three outline echoes that trail the pointer */
.t-fx .e1,
.t-fx .e2,
.t-fx .e3 {
  color: transparent;
  -webkit-text-stroke: 1px var(--lead);
  --k: 1;
  opacity: calc(0.6 - var(--k) * 0.14);
  transform: translate(
    calc(var(--k) * 7px + var(--mx, 0) * var(--k) * 12px),
    calc(var(--k) * -7px + var(--my, 0) * var(--k) * 8px)
  );
}
.t-fx .e2 {
  --k: 2;
}
.t-fx .e3 {
  --k: 3;
}
/* 02: HUD corner brackets and two labels snap round the numeral */
.t-fx .hud {
  position: absolute;
  width: 0.07em;
  height: 0.07em;
  border: 2px solid var(--ink);
  animation: snap 0.3s var(--ease) 1.25s both;
}
.t-fx .hud.a {
  left: -0.02em;
  top: -0.02em;
  border-right: 0;
  border-bottom: 0;
}
.t-fx .hud.b {
  right: -0.02em;
  top: -0.02em;
  border-left: 0;
  border-bottom: 0;
}
.t-fx .hud.c {
  left: -0.02em;
  bottom: -0.02em;
  border-right: 0;
  border-top: 0;
}
.t-fx .hud.d {
  right: -0.02em;
  bottom: -0.02em;
  border-left: 0;
  border-top: 0;
}
[data-n="2"] .nl.l0 {
  left: 0.08em;
  top: -0.02em;
}
[data-n="2"] .nl.l1 {
  right: 0.08em;
  bottom: -0.02em;
}
@keyframes snap {
  from {
    opacity: 0;
    transform: scale(1.5);
  }
}
/* 03: the numeral is cut into four named boxes; they slide apart under the pointer */
.t-num[data-n="3"] > .t-n {
  color: transparent;
}
.t-num[data-n="3"] .t-fx {
  animation: rise 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.from-wipe .t-num[data-n="3"] .t-fx {
  animation: none;
}
.t-fx .cut {
  right: 0;
  bottom: 0;
  color: var(--lead);
  transition: transform 0.5s var(--ease);
}
.t-fx .c0 {
  clip-path: inset(-30% 50% 50% -30%);
}
.t-fx .c1 {
  clip-path: inset(-30% -30% 50% 50%);
}
.t-fx .c2 {
  clip-path: inset(50% 50% -30% -30%);
}
.t-fx .c3 {
  clip-path: inset(50% -30% -30% 50%);
}
.t-num[data-n="3"]:hover .c0 {
  transform: translate(-6px, -6px);
}
.t-num[data-n="3"]:hover .c1 {
  transform: translate(6px, -6px);
}
.t-num[data-n="3"]:hover .c2 {
  transform: translate(-6px, 6px);
}
.t-num[data-n="3"]:hover .c3 {
  transform: translate(6px, 6px);
}
[data-n="3"] .nl {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.t-num[data-n="3"]:hover .nl {
  opacity: 1;
}
[data-n="3"] .nl.l0 {
  left: 0;
  top: -16px;
}
[data-n="3"] .nl.l1 {
  right: 0;
  top: -16px;
}
[data-n="3"] .nl.l2 {
  left: 0;
  bottom: -14px;
}
[data-n="3"] .nl.l3 {
  right: 0;
  bottom: -14px;
}
/* 04: a soft blur that lifts as the pointer comes near (only where there is a pointer to come near) */
@media (hover: hover) {
  .t-num[data-n="4"] > .t-n {
    filter: blur(calc((1 - var(--near, 0)) * 7px));
    transition: filter 1.2s ease;
  }
}
/* 05: line, plane, volume: three offset outlines */
.t-fx .off {
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--ink) 34%, transparent);
  --k: 1;
  transform: translate(calc(var(--k) * 0.032em), calc(var(--k) * -0.032em));
}
.t-fx .o1 {
  --k: 2;
}
.t-fx .o2 {
  --k: 3;
}
[data-n="5"] .nl {
  right: calc(-0.02em - var(--k) * 0.032em);
  top: calc(var(--k) * -0.032em + var(--k) * 13px - 10px);
  --k: 1;
}
[data-n="5"] .nl.l1 {
  --k: 2;
}
[data-n="5"] .nl.l2 {
  --k: 3;
}
/* 06: a faint second numeral beside it; coming near pulls it into place */
.t-fx .twin {
  color: color-mix(in srgb, var(--lead) 16%, transparent);
  transform: translateX(calc((1 - var(--near, 0)) * 0.2em));
  transition: transform 0.7s var(--ease);
}
/* 07: filled with a tiling of tiny 07s */
.t-num[data-n="7"] > .t-n {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='11'%3E%3Ctext x='0.5' y='9.6' font-family='Helvetica Neue,Helvetica,Arial,sans-serif' font-weight='800' font-size='12' letter-spacing='-.5' fill='%23ff0060'%3E07%3C/text%3E%3C/svg%3E")
      0 0 / 18px 11px,
    linear-gradient(
      color-mix(in srgb, var(--lead) 20%, transparent),
      color-mix(in srgb, var(--lead) 20%, transparent)
    );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* 08: a slow standing wave */
.t-num[data-n="8"] > .t-n {
  filter: url(#t-wave);
}
.nfilter {
  position: absolute;
}
/* 09: five bars grow behind it */
.t-fx .bars {
  position: absolute;
  inset: 0 -0.04em 0 0;
  display: flex;
  align-items: flex-end;
  gap: 3%;
}
.t-fx .bars i {
  flex: 1;
  height: calc((var(--i) + 1) * 20%);
  background: color-mix(in srgb, var(--ch) 34%, transparent);
  transform-origin: 50% 100%;
  animation: grow-y 0.7s var(--ease) both;
  animation-delay: calc(1.1s + var(--i) * 130ms);
}
@keyframes grow-y {
  from {
    transform: scaleY(0);
  }
}
/* 10: it sits on a wobbly line and leans */
.t-fx .wob {
  position: absolute;
  left: -0.03em;
  bottom: -0.04em;
  width: calc(100% + 0.06em);
  height: 0.05em;
  overflow: visible;
}
.t-fx .wob path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.t-num[data-n="10"] > .t-n {
  transform-origin: 50% 100%;
  rotate: calc(var(--mx, 0) * 2.5deg);
}

/* ---------- SH-06: the title page says what the plate is, and how to go ---------- */
.t-spec a {
  color: inherit;
  text-decoration: underline 1px var(--lead);
  text-underline-offset: 3px;
}
.t-spec a:hover {
  color: var(--lead);
}
:is(.toc, .t-spec) .medal {
  display: inline-block;
  flex: none;
  vertical-align: middle;
}
:is(.toc, .t-spec) .medal svg {
  display: block;
  width: 100%;
  height: 100%;
}
.t-go {
  align-items: center;
}
.t-or {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- SH-24: hooks for other owners ---------- */
/* (1) CO-12: chapter 4's view line is meant to be read */
.t-view.loud {
  display: block;
  font: italic 400 14px/1.5 var(--serif);
  color: var(--body);
  border-left: 2px solid var(--ch);
  padding: 1px 0 2px 12px;
}
.t-view.loud::before {
  display: block;
  font-style: normal;
  margin-bottom: 2px;
}
/* (2) CH-03: more air between chapter 11's tools; the two labels as he wrote them, readable */
.calm .tool {
  margin-top: 2.7em;
  padding-top: 1.35em;
}
.calm .tool:first-child {
  margin-top: 0;
}
.calm .tool dt {
  font: 400 12px/1.3 var(--sans);
  letter-spacing: 0.02em;
  text-transform: none;
  margin-bottom: 5px;
}
.calm .tool dd {
  line-height: 1.75;
}
/* (3) CH-05: an optional quiet line under Why It Works */
.tool-aside {
  margin: 0 0 0.9em;
  font: italic 400 0.9em/1.6 var(--serif);
  color: var(--muted);
}

/* ---------- SH-07 + B-09: the cover. all three "?" fit, each one is a button, the dots stay off them ---------- */
.cv-q {
  right: var(--gut);
  font-size: clamp(150px, min(26vw, 44vh), 600px);
  pointer-events: auto;
  z-index: 1;
  display: flex;
}
.cv-q .q {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
}
.cv-q .q:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -0.06em;
}
.cv-q .q.boing {
  animation: boing 0.38s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}
@keyframes boing {
  from {
    transform: scale(0.92);
  }
  60% {
    transform: scale(1.04);
  }
}
.cover .cv-title .wd {
  animation: none;
}
.cover.intro .cv-title .wd {
  animation: slam 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(0.1s + var(--i) * 70ms);
}
.cv-head {
  z-index: 2;
}
.cv-head .cv-go {
  margin-top: clamp(16px, 3vh, 28px);
  animation: fade 0.8s ease 0.7s both;
}
.cv-date {
  min-height: 1.2em;
}
.cv-date.said {
  text-transform: none;
  letter-spacing: 0.04em;
}
.cv-spark {
  left: var(--gut);
  width: clamp(72px, 9vw, 140px);
  bottom: clamp(14px, 4vh, 40px);
  z-index: 2;
  pointer-events: auto;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
}
.cv-spark .mark {
  width: 100%;
}
.cv-spark.spin .mark {
  animation: spin-once 0.9s var(--ease);
}
@keyframes spin-once {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- SH-09: contents as a living map ---------- */
.toc .n b {
  display: inline-block;
  font-weight: 500;
  color: var(--ink);
  padding: 3px 4px 2px;
  background: color-mix(in srgb, var(--ch) 62%, transparent);
  transition: transform 0.3s var(--ease);
}
.toc a:hover .n b,
.toc a:focus-visible .n b {
  transform: translateX(6px);
}
.toc .here {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 5px 2px;
  font: 500 9.5px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lead);
  border: 1px solid var(--lead);
  vertical-align: 0.2em;
}
.toc .state {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  align-self: center;
}
.toc .state:empty {
  display: none;
}
.toc .band a {
  align-items: center;
  padding: 9px 0;
}
.toc .band .n {
  line-height: 0;
}
.toc .band .tt {
  font-size: 13px;
  letter-spacing: 0.02em;
}
.tally-w {
  display: block;
  width: 180px;
  margin-top: 18px;
  line-height: 0;
}
.contents .mini-wheel {
  display: block;
  overflow: visible;
}
.contents .mw-ring {
  fill: none;
  stroke: var(--rule);
  stroke-width: 0.7;
}
.contents .mw-s {
  fill: var(--paper);
  stroke: var(--faint);
  stroke-width: 0.8;
}
.contents .mw-s.got {
  stroke: var(--c);
  stroke-width: 1.8;
}
.contents .mw-s.loose {
  fill: color-mix(in srgb, var(--c) 40%, var(--paper));
  stroke: var(--c);
  stroke-width: 1.8;
}
.contents .mw-s.in {
  fill: var(--c);
  stroke: var(--c);
}
.contents .mw-key {
  fill: var(--paper);
  stroke: var(--faint);
  stroke-width: 0.8;
}
.contents .mw-key.in {
  fill: var(--lead);
  stroke: var(--lead);
}
.c-side .c-secrets {
  font: 500 10.5px/1.3 var(--mono);
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- SH-10: the end page remembers ---------- */
.end .body {
  min-height: calc(100vh - var(--bar-h) - var(--rail-h));
  min-height: calc(100dvh - var(--bar-h) - var(--rail-h));
}
.e-rec {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  margin-top: clamp(18px, 3.4vh, 34px);
  animation: fade 0.7s ease 1.2s both;
}
.e-receipt {
  margin: 0;
  display: flex;
  flex-direction: column;
  font: 500 11.5px/1.75 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
}
.e-seal {
  display: block;
  flex: none;
  width: 160px;
  height: 160px;
  background: #fff;
  line-height: 0;
}
.e-seal:focus-visible {
  outline-color: #fff;
}
.e-line .three {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.e-line .heart {
  position: absolute;
  left: 50%;
  top: -0.12em;
  width: 0.3em;
  height: 0.3em;
  margin-left: -0.15em;
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  pointer-events: none;
  animation: heart-up 1.2s ease-out both;
}
@keyframes heart-up {
  from {
    opacity: 0;
    transform: translateY(0) scale(0.7);
  }
  25% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(-40px) scale(1);
  }
}
@keyframes heart-still {
  from,
  to {
    opacity: 0;
  }
  30%,
  70% {
    opacity: 1;
  }
}

/* ---------- SH-13 + XC-05: the rail on a plate ---------- */
.plate-mid {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.plate-mid .keep {
  flex: none;
  border-bottom-color: var(--lead);
}

/* ---------- SH-15: the one time hints; SH-17: a secret found ---------- */
.fig {
  position: relative;
}
.page .hint-tag {
  position: absolute;
  z-index: 6;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lead);
  background: var(--paper);
  border: 1px solid var(--lead);
  padding: 4px 6px 3px;
  white-space: nowrap;
  pointer-events: none;
  animation: fade 0.4s ease both;
}
.page .hint-tag.for-fig {
  right: 0;
  top: -24px;
}
body > .toast {
  position: fixed;
  left: var(--gut);
  bottom: calc(var(--rail-h) + 14px);
  z-index: 45;
  margin: 0;
  max-width: min(30rem, calc(100vw - 2 * var(--gut)));
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.04em;
  color: var(--paper);
  background: var(--ink);
  padding: 9px 11px 8px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s var(--ease);
}
body > .toast.on {
  opacity: 1;
  transform: none;
}

/* ---------- SH-16 + SH-23 (6): the sound control. alive when it is, and usable on a phone ---------- */
.snd {
  position: relative;
}
.snd .cbtn.snd-b {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.snd-l .tap {
  color: var(--muted);
}
.snd-b .eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}
.snd-b .eq[hidden] {
  display: none;
}
.snd-b .eq i {
  width: 2px;
  height: 100%;
  background: var(--lead);
  transform-origin: 50% 100%;
  transform: scaleY(var(--v, 0.5));
  transition: transform 0.5s ease;
}
.snd .vol-btn {
  display: none;
}
.snd .vol-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 10px 14px;
}
.snd .vol-pop[hidden] {
  display: none;
}
.vol.vol-big {
  display: block;
  width: 160px;
  height: 30px;
}
@media (max-width: 899px) {
  .snd-l .tap {
    display: none;
  }
}
@media (max-width: 479px) {
  .snd > .vol {
    display: none;
  }
  .snd .vol-btn {
    display: inline-block;
  }
}

/* ---------- SH-18: dark theme highlights read as their own colour ---------- */
:root[data-theme="dark"] .hl {
  --a: 30%;
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--c, var(--ch));
}
:root[data-theme="dark"] .text:not(.calm) .col .hl:hover {
  --a: 42%;
}
:root[data-theme="dark"] .t-title .hl {
  box-shadow: none;
}

/* ---------- SH-20: a coda at the end of each chapter (1 to 10) ---------- */
.col > .coda {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 0 14px;
  align-items: baseline;
  margin: 2.6em 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  text-decoration: none;
}
.col > .coda .coda-k {
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.col > .coda .coda-n {
  font: 500 12px/1 var(--mono);
  color: var(--lead);
  font-variant-numeric: tabular-nums;
}
.col > .coda .coda-t {
  justify-self: start;
  font: 800 clamp(17px, 1.05em, 22px) / 1.05 var(--sans);
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(
      color-mix(in srgb, var(--lead) calc(var(--hl-alpha) * 100%), transparent)
        0 0
    )
    left 62% / 0% 0.62em no-repeat;
  transition: background-size 0.3s var(--ease);
}
.col > .coda:hover .coda-t,
.col > .coda:focus-visible .coda-t {
  background-size: 100% 0.62em;
}

/* ---------- SH-21: the two plain rows on the key sheet may wrap ---------- */
.sheet dt {
  white-space: normal;
  max-width: 10.5em;
}

/* ---------- SH-22: the bar's sparkle redraws itself under the pointer, and once when the cover opens ---------- */
.bar .home:hover .bar-mark path,
.bar .home:focus-visible .bar-mark path,
body[data-route="cover"] .bar-mark path {
  stroke-dasharray: 1;
  animation: mark-draw-s 0.6s cubic-bezier(0.6, 0, 0.2, 1) both;
  animation-delay: calc(var(--i) * 70ms);
}
@keyframes mark-draw-s {
  from {
    stroke-width: 16;
    stroke-dashoffset: 1;
    fill-opacity: 0;
  }
  60% {
    stroke-width: 16;
    fill-opacity: 0;
  }
  to {
    stroke-dashoffset: 0;
    fill-opacity: 1;
    stroke-width: 0;
  }
}

/* ---------- XC-01: the shell's one plate heading. a card for 1.4s, then docked under the bar ---------- */
.plate-card {
  position: fixed;
  z-index: 25;
  left: var(--gut);
  top: calc(var(--bar-h) + 8px);
  margin: 0;
  max-width: min(62vw, 420px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
  transform-origin: 0 0;
  transition: transform 0.56s var(--ease);
  animation: fade 0.3s ease both;
}
.pc-n {
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lead);
  -webkit-text-stroke: 2.5px var(--paper);
  paint-order: stroke fill;
}
.pc-t {
  font: 800 22px/1.02 var(--sans);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px 2px 0;
  -webkit-text-stroke: 3px var(--paper);
  paint-order: stroke fill;
  transition: color 0.56s ease;
}
.plate-card.intro {
  max-width: none;
  transform: translateY(var(--pc-y, 30vh)) scale(var(--pc-s, 4));
}
.plate-card.intro .pc-t {
  color: var(--ch);
  overflow: visible;
  -webkit-text-stroke-width: 1.2px;
}
.plate-card.intro .pc-n {
  -webkit-text-stroke-width: 1px;
}
/* a plate on a dark ground (it dispatches instrument:ground {dark:true}): the chrome over it goes to light ink */
body.plate-dark .bar,
body.plate-dark .rail,
body.plate-dark .plate-card {
  --paper: #0a0a0c;
  --ink: #f5f3ec;
  --body: #d9d6cc;
  --muted: #a9a69b;
  --faint: #8d8a80;
  --rule: #2b2b30;
  color-scheme: dark;
}
@media (max-width: 699px) {
  .plate-card {
    left: 14px;
    top: calc(var(--bar-h) + 4px);
    gap: 3px;
  }
  .pc-t {
    font-size: 19px;
  }
}

/* ---------- reduced motion and chapter 11: everything above lands still ---------- */
@media (prefers-reduced-motion: reduce) {
  .ticks a.pl .tk,
  .t-fx,
  .t-fx *,
  .gl-lead,
  .cv-q .q.boing,
  .cv-spark.spin .mark,
  .cv-head .cv-go,
  .e-rec,
  .page .hint-tag,
  .plate-card,
  .bar-mark path,
  .cover.intro .cv-title .wd {
    animation: none !important;
  }
  .e-line .heart {
    animation-name: heart-still;
  }
  .t-fx .cut,
  .t-fx .twin,
  .snd-b .eq i,
  body > .toast,
  body > .fold-cue,
  .plate-card,
  .t-num[data-n="4"] > .t-n {
    transition: none;
  }
  .t-num[data-n="4"] > .t-n {
    filter: none;
  }
  .t-num[data-n="10"] > .t-n {
    rotate: none;
  }
}

@media (max-width: 699px) {
  .cv-q {
    right: auto;
    font-size: clamp(104px, 30vw, 200px);
    margin: 7vw 0 0 0;
  }
  .cv-spark {
    left: auto;
    right: 16px;
    bottom: 22px;
  }
  .e-rec {
    flex-wrap: wrap;
  }
}

/* without the live field (reduced motion) the printed dots sit behind the question marks' own paper ground */
.cover .body:not(.fx-on) .cv-q {
  background: var(--paper);
  box-shadow: 0 0 0 10px var(--paper);
}

/* the receipt sits like a colophon at the lower right of the pink on wide pages, so nothing falls below the fold */
@media (min-width: 1100px) {
  .e-rec {
    position: absolute;
    right: var(--gut);
    bottom: clamp(36px, 7vh, 72px);
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    margin: 0;
  }
  .e-receipt {
    text-align: right;
  }
}
@media (max-width: 699px) {
  .cv-q {
    font-size: clamp(120px, 52vw, 250px);
  }
}

/* XC-07: chapter 11's pages keep the column they had before this pass (only the CH items change there) */
@media (min-width: 1080px) {
  .text.calm .body {
    grid-template-columns:
      minmax(170px, 23vw) minmax(0, var(--measure))
      minmax(0, 1fr);
  }
  .calm .furn {
    max-width: 15rem;
  }
}
/* dark: the underline arrives with the swipe, not before it */
:root[data-theme="dark"] .hl.pre {
  transition:
    background-size 0.75s cubic-bezier(0.6, 0, 0.2, 1),
    box-shadow 0.4s ease 0.5s;
}
:root[data-theme="dark"] .hl.pre:not(.drawn) {
  box-shadow: none;
}

/* on a phone the cue would sit on the words being read: the rail's "more" says it there instead */
@media (max-width: 699px) {
  body > .fold-cue {
    display: none;
  }
}

/* =====================================================================================================
   THE SHELL FIX PASS (docs/improve/shell-fix.md). Five small fixes; each block names its own.
   ===================================================================================================== */

/* ---------- FIX 1: chapter 11's glosses are quiet. a thin dotted line in the muted ink, no square, no swipe ---------- */
.calm span.gl {
  text-decoration: underline dotted var(--muted) 1px;
}
.calm span.gl::after {
  content: none;
}
.calm span.gl[aria-expanded="true"] {
  text-decoration: underline solid var(--muted) 1px;
  text-underline-offset: 0.2em;
  background: none;
}
.calm .gl-note {
  border-left-color: var(--muted);
}
.calm .gl-link {
  color: inherit;
}

/* ---------- FIX 3: on a phone "keep this frame" leaves the after-line's row and sits over "keep reading", both
   inside the rail's own 64px, so the after-line has the whole middle and nothing lands on the plate ---------- */
@media (max-width: 699px) {
  .plate-mid .keep {
    position: absolute;
    right: var(--gut);
    top: 3px;
    padding: 6px 0 5px;
  }
  .rail.has-keep .turn.next {
    align-self: end;
    margin-bottom: 4px;
    padding-top: 9px;
    padding-bottom: 9px;
  }
}

/* ---------- FIX 4: while the relic reveal is up the docked plate heading steps back (the coin sits there on a
   phone), and comes back when the reveal closes ---------- */
body.reveal-up .plate-card {
  animation: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* ---------- FIX 5: a plate on a dark ground. every piece of chrome over it is light ink, and the rail's buttons
   are outlines, not blocks of the theme's paper ---------- */
body.plate-dark .pc-n,
body.plate-dark .bar .home,
body.plate-dark .bar-mark,
body.plate-dark .bar .cbtn[aria-pressed="true"] {
  color: var(--ink);
}
body.plate-dark .rail .turn:not(.go) {
  background: transparent;
}
body.plate-dark .rail .turn:not(.go):hover {
  background: var(--ink);
  color: var(--paper);
}
body.plate-dark .rail .turn.go {
  color: #0a0a0c;
}

/* phone bar: another module (review/) adds a "suggest" item to the bar, which pushed "keys ?" off a 390px screen.
   A phone has hardware volume keys, so the in-bar volume button goes first; mute stays. */
@media (max-width: 479px) {
  .snd .vol-btn,
  .snd .vol-pop {
    display: none !important;
  }
  .bar {
    column-gap: 8px;
  }
}

/* the margin echo was a full-height strip, so a long phrase started below the fold and showed only its tail
   ("...SPLAY (HUD)"). It now sits under the page furniture, is as tall as its own text, and its type shrinks so the
   whole phrase fits on screen. */
@media (min-width: 1080px) {
  .track > .echo {
    top: 250px;
    bottom: auto;
    height: max-content;
    white-space: nowrap;
    font-size: clamp(
      16px,
      calc((100vh - 420px) / (var(--echo-n, 14) * 0.58)),
      44px
    );
  }
}
