/* ═══ Hero ═════════════════════════════════════════════════════════════ */
.hero { padding-top: var(--s-5); }
@media (min-width: 768px) { .hero { padding-top: var(--s-7); } }
.hero__intro { grid-column: wide; display: grid; gap: var(--s-4); }
.hero__title { display: contents; }
.hero__numeral {
  font-family: var(--f-display); font-size: var(--t-numeral); line-height: 0.8;
  letter-spacing: -0.035em; font-variant-numeric: lining-nums; margin-left: -0.04em;
  min-height: 0.8em;   /* holds its line while summary.json loads: no layout shift */
}
.hero__unit { font-family: var(--f-display); font-style: italic; font-size: clamp(1.75rem, 1.2rem + 2.6vw, 3.25rem); line-height: 1.05; color: var(--ink); }
.hero__unit em { font-style: normal; color: var(--rubric); }
.hero__lede { font-size: var(--t-lede); line-height: 1.5; color: var(--ink-2); max-width: 38rem; min-height: 4.5em; }
/* The hero's slots hold their lines while the prose loads, so the shelf below never jumps (CLS). */
.hero [data-slot]:empty { display: block; }
.hero__intro > .kicker { min-height: 1.5em; }
.hero__unit { min-height: 1.05em; }
@media (max-width: 599px) { .hero__unit { min-height: 2.1em; } .hero__lede { min-height: 9em; } }
@media (min-width: 600px) and (max-width: 899px) { .hero__lede { min-height: 6em; } }
@media (min-width: 900px) {
  .hero__intro { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-7); align-items: end; row-gap: var(--s-3); }
  .hero__intro > .kicker { grid-column: 1 / -1; margin-bottom: var(--s-3); }
  .hero__numeral { grid-row: 2 / span 2; }
  .hero__unit { grid-column: 2; align-self: end; }
  .hero__lede { grid-column: 2; padding-bottom: 0.35em; }
}

/* ═══ The river: every finished book, a year at a time ═════════════════ */
.river {
  grid-column: full; position: relative; margin-top: var(--s-6);
  --cover-h: 108px; --gap: 8px; --year-gap: 28px; --rows: 2;
  --inset: max(var(--gutter), (100% - var(--wide)) / 2);   /* first cover lines up with the text above */
}
@media (min-width: 600px)  { .river { --cover-h: 118px; --gap: 10px; --year-gap: 44px; --rows: 3; margin-top: var(--s-7); } }
/* On laptops the whole shelf, three rows deep, should sit in the first screen with the title. */
@media (min-width: 1024px) { .river { --cover-h: clamp(112px, calc((100svh - 560px) / 3), 168px); --year-gap: 56px; } }

.river__head { padding-inline: var(--inset); }
.river__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-block-size: 44px; }
/* ‹ › for a mouse without a sideways wheel; touch swipes, so they only exist where there is hover */
.river__arrows { display: flex; gap: var(--s-2); flex: none; }
@media (hover: none) { .river__arrows { display: none; } }
.river__arrow { border: 1px solid var(--rule-strong); }
.river__arrow:disabled { opacity: 0.35; cursor: default; background: transparent; }
.river__hint { margin-top: var(--s-3); }
.ribbon-key { display: inline-block; inline-size: 5px; block-size: 11px; background: var(--rubric); vertical-align: -1px; margin-right: 5px; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }

.river__scroller {
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: var(--s-4) var(--inset) var(--s-5);
  scroll-padding-inline: var(--inset);
  /* Reserve the final height before the books arrive so nothing below jumps */
  min-height: calc(var(--rows) * var(--cover-h) + (var(--rows) - 1) * var(--gap) + 3.5rem + var(--s-4) + var(--s-5));
  --fade: 28px;
}
.river__scroller::-webkit-scrollbar { display: none; }
.river__scroller.can-left  { -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fade)); mask-image: linear-gradient(90deg, transparent, #000 var(--fade)); }
.river__scroller.can-right { -webkit-mask-image: linear-gradient(270deg, transparent, #000 var(--fade)); mask-image: linear-gradient(270deg, transparent, #000 var(--fade)); }
.river__scroller.can-left.can-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent); mask-image: linear-gradient(90deg, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent); }

.river__track { list-style: none; padding: 0; display: flex; align-items: flex-start; gap: var(--year-gap); width: max-content; }
.river__year { display: flex; flex-direction: column; }
.river__label { position: sticky; left: 0; align-self: flex-start; display: flex; align-items: baseline; gap: var(--s-2); height: 3.5rem; padding-right: var(--s-3); white-space: nowrap; }
.river__label .y { font-family: var(--f-display); font-size: 2.25rem; line-height: 1; font-variant-numeric: lining-nums; }
.river__label .n { font-family: var(--f-ui); font-size: var(--t-micro); color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.river__rows { display: flex; flex-direction: column; gap: var(--gap); }
.river__row { display: flex; gap: var(--gap); justify-content: space-between; height: var(--cover-h); }
.river__row:last-child { justify-content: flex-start; }
.river__year--undated .river__label .y { font-style: italic; color: var(--ink-2); }

.river__gap { display: flex; flex-direction: column; inline-size: 5.5rem; }

/* The first year and the gap after it, as one narrow block */
.river__lead { inline-size: 5.5rem; flex: none; }
.river__lead .river__label { flex-direction: column; align-items: flex-start; gap: 2px; justify-content: flex-end; }
.river__lead .river__rows { min-height: calc(var(--rows) * var(--cover-h) + (var(--rows) - 1) * var(--gap)); }
.river__lead .river__row { height: min(var(--cover-h), 8.25rem); }
.river__leadgap {
  flex: 1; display: grid; place-items: center; text-align: center; padding: var(--s-2) var(--s-1);
  font-family: var(--f-display); font-style: italic; font-size: 1rem; line-height: 1.25; color: var(--ink-3);
  border-inline: 1px dashed var(--rule-strong);
}
.nowrap { white-space: nowrap; }
@media (min-width: 600px) { .river__gap { inline-size: 7.5rem; } }
.river__gap .river__label .y { font-size: 1.5rem; color: var(--ink-3); }
.river__gap p { flex: 1; display: grid; place-items: center; text-align: center; font-family: var(--f-display); font-style: italic; color: var(--ink-3); font-size: 1.0625rem; line-height: 1.25;
  border-inline: 1px dashed var(--rule); margin-inline: var(--s-3); min-height: calc(var(--rows) * var(--cover-h) + (var(--rows) - 1) * var(--gap)); padding: var(--s-3); }

/* Skeleton and failure states share the reserved space */
.river__status { display: grid; place-items: center; min-height: inherit; color: var(--ink-3); font-family: var(--f-display); font-style: italic; font-size: 1.25rem; text-align: center; padding-inline: var(--gutter); }

/* ── Scrubber: where you are on the shelf, and a way to get anywhere ──── */
.scrubber { padding-inline: var(--inset); }
.scrubber__label { margin-bottom: var(--s-1); }
.scrubber__track { position: relative; display: flex; gap: 2px; height: 40px; touch-action: none; cursor: pointer; border-radius: 4px; }
.scrubber__seg { position: relative; flex: var(--w) 1 0; min-width: 3px; height: 100%; border-bottom: 2px solid var(--rule); }
.scrubber__seg--empty { border-bottom-style: dashed; }
.scrubber__seg span { position: absolute; left: 0; bottom: 6px; font-family: var(--f-ui); font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }
.scrubber__seg.is-active { border-bottom-color: var(--ink-2); }
.scrubber__seg.is-active span { color: var(--ink); }
.scrubber__window {
  position: absolute; top: 0; bottom: -2px; left: 0; width: 10%; pointer-events: none;
  border-bottom: 2px solid var(--rubric); background: color-mix(in oklab, var(--rubric) 7%, transparent);
  border-radius: 3px 3px 0 0;
}
.scrubber__track:focus-visible { outline-offset: 4px; }
/* Phones: only the first, the last and the active year, so labels never collide */
@media (max-width: 599px) {
  .scrubber__seg span { display: none; }
  .scrubber__seg.is-end span, .scrubber__seg.is-active span { display: block; }
}
.scrubber__seg.is-covered:not(.is-active) span { display: none; }

/* ═══ Covers ═══════════════════════════════════════════════════════════ */
.cover {
  --ar: 0.667;
  position: relative; flex: none; display: block; padding: 0; border: 0;
  height: 100%; aspect-ratio: var(--ar); border-radius: var(--radius);
  background: var(--paper-sunk); box-shadow: var(--shadow-object);
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.cover img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
/* Hairline so pale covers don't dissolve into the paper, nor dark ones into the dark page */
.cover::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 14%, transparent); pointer-events: none; z-index: 1; }
@media (hover: hover) {
  button.cover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
}
button.cover:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lift); outline-offset: 4px; border-radius: var(--radius); }
button.cover:active { transform: translateY(-1px); transition-duration: var(--dur-1); }

/* A ribbon marker for five-star books */
.cover--fav::after {
  content: ""; position: absolute; top: -3px; right: 14%; z-index: 2;
  inline-size: 7px; block-size: 18%; min-block-size: 16px; background: var(--rubric);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  box-shadow: 0 1px 1px rgb(0 0 0 / 0.2);
}

/* Generated cover for books with no image: cloth binding, blind-stamped frame */
.cover--type { container-type: inline-size; background: var(--cloth, #23344F); color: var(--cloth-text); overflow: hidden; }
.cover--type .cover__frame {
  position: absolute; inset: 7%; border: 1px solid rgb(243 235 221 / 0.42);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center;
  padding: 10% 6% 8%;
}
.cover--type .cover__title {
  font-family: var(--f-display); font-size: clamp(9px, 14.5cqi, 24px); line-height: 1.04; letter-spacing: 0.005em;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; overflow-wrap: anywhere; hyphens: auto;
}
.cover--type .cover__title[lang="ml"] { font-size: clamp(8px, 11cqi, 18px); line-height: 1.35; hyphens: manual; overflow-wrap: break-word; }
.cover--type .cover__rule { inline-size: 24%; block-size: 1px; background: rgb(243 235 221 / 0.55); flex: none; }
.cover--type .cover__author {
  font-family: var(--f-ui); font-size: clamp(6px, 7.5cqi, 11px); letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.25;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}

/* ═══ Book dialog ═══════════════════════════════════════════════════════ */
.book-dialog {
  margin: auto; border: 0; padding: 0; color: var(--ink); background: var(--paper-raised);
  width: min(44rem, 100% - 2 * var(--gutter)); max-height: min(88dvh, 52rem);
  border-radius: 14px; box-shadow: var(--shadow-float); overscroll-behavior: contain;
}
.book-dialog::backdrop { background: rgb(12 10 7 / 0.48); }
.book-dialog[open] { animation: dialog-in var(--dur-3) var(--ease-out); }
.book-dialog[open]::backdrop { animation: fade-in var(--dur-2) var(--ease-out); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(0.985); } }
@keyframes fade-in { from { opacity: 0; } }
@media (max-width: 599px) {
  .book-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; max-height: 92dvh; }
  @keyframes dialog-in { from { transform: translateY(100%); } }
}
.book-dialog__inner { padding: var(--s-6) var(--s-5) var(--s-6); display: grid; gap: var(--s-6); }
@media (min-width: 600px) { .book-dialog__inner { padding: var(--s-7) var(--s-7) var(--s-7); } }
.book-dialog__close { position: absolute; top: var(--s-2); right: var(--s-2); z-index: 2; }
.book-dialog__grab { display: none; }
@media (max-width: 599px) { .book-dialog__grab { display: block; inline-size: 36px; block-size: 4px; border-radius: 2px; background: var(--rule); margin: 10px auto 0; } }

.book-card { display: grid; grid-template-columns: 96px 1fr; gap: var(--s-5); align-items: start; }
@media (min-width: 600px) { .book-card { grid-template-columns: 148px 1fr; gap: var(--s-6); } }
.book-card .cover { height: auto; width: 100%; }
.book-card__title { font-family: var(--f-display); font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); line-height: 1.05; margin-top: var(--s-2); padding-right: var(--s-6); }
.book-card__native { font-size: 1.25rem; line-height: 1.5; color: var(--ink-2); margin-top: var(--s-1); }
.book-card__author { font-family: var(--f-text); font-style: italic; color: var(--ink-2); margin-top: var(--s-2); }
.book-card__facts { margin-top: var(--s-4); display: grid; gap: var(--s-1); }

.book-dialog__section h3 { margin-bottom: var(--s-3); }
.book-dialog__reasons { padding-left: 1.1em; color: var(--ink-2); font-size: var(--t-small); font-family: var(--f-ui); }
.book-dialog__quotes { list-style: none; padding: 0; display: grid; gap: var(--s-5); }
.book-dialog__quotes li { border-left: 2px solid var(--rubric); padding-left: var(--s-4); }
.book-dialog__quotes blockquote { font-family: var(--f-text); font-size: 1.0625rem; line-height: 1.55; }
.book-dialog__credit { font-family: var(--f-ui); font-size: var(--t-micro); color: var(--ink-3); border-top: 1px solid var(--rule); padding-top: var(--s-3); }

/* ═══ Charts: the figure frame every chart module draws into ═══════════ */
.figure { margin-block: var(--s-7) 0; }
.figure + .figure { margin-top: var(--s-8); }
.figure__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
.figure__title { font-family: var(--f-display); font-size: var(--t-title); line-height: 1.12; }
.figure__q { font-family: var(--f-text); font-style: italic; font-size: 1rem; color: var(--ink-3); margin-top: var(--s-1); }
.figure__body { position: relative; min-height: var(--chart-h, 300px); }
.figure__body--short { --chart-h: 200px; }
.figure__body--tall  { --chart-h: 440px; }
.figure__body--square { --chart-h: 0px; aspect-ratio: 1; max-width: 32rem; margin-inline: auto; }
.figure__body[data-state="pending"]::after,
.figure__body[data-state="loading"]::after {
  content: ""; position: absolute; inset: auto 0 0; height: 1px; background: var(--rule);
}
.figure__body[data-state="error"] { display: grid; place-items: center; color: var(--ink-3); font-family: var(--f-display); font-style: italic; }
.figure__body svg { overflow: visible; }
.figure__caption { margin-top: var(--s-4); font-family: var(--f-text); font-size: 1rem; line-height: 1.55; color: var(--ink-2); max-width: var(--measure); }
.figure__caption:empty { display: none; }

.figures--pair { display: grid; gap: var(--s-8); }
.figures--pair > .figure { margin-top: var(--s-7); }
@media (min-width: 900px) { .figures--pair { grid-template-columns: 1fr 1fr; column-gap: var(--s-7); } }

/* Chart vocabulary shared by every module */
.c-axis text, .c-label { font-family: var(--f-ui); font-size: 12px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.c-axis line, .c-axis path { stroke: var(--rule-strong); stroke-width: 1; fill: none; shape-rendering: crispEdges; }
.c-grid line { stroke: var(--rule); stroke-width: 1; shape-rendering: crispEdges; }
.c-label--strong { fill: var(--ink); font-weight: 600; }
.c-annot { font-family: var(--f-display); font-style: italic; font-size: 15px; fill: var(--ink-2); }
.c-mark { transition: opacity var(--dur-1) var(--ease-out); }
.c-mark:focus-visible { outline: none; stroke: var(--rubric); stroke-width: 2; }
.c-dim .c-mark:not(.is-hot) { opacity: 0.35; }

.text-button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--s-2); margin: -10px 0 0 0;
  border: 0; background: none; color: var(--ink-3); font-family: var(--f-ui); font-size: var(--t-micro);
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; white-space: nowrap; border-radius: 6px;
}
.text-button:hover { color: var(--ink); }
.text-button[aria-pressed="true"] { color: var(--rubric); }

/* Table view */
.table-wrap { overflow-x: auto; max-height: 28rem; overflow-y: auto; border-top: 1px solid var(--ink); }
.table-stack > * + * { margin-top: var(--s-6); }
.data-table { width: 100%; font-family: var(--f-ui); font-size: var(--t-small); font-variant-numeric: lining-nums tabular-nums; }
.data-table caption { text-align: left; caption-side: bottom; padding-top: var(--s-2); color: var(--ink-3); font-size: var(--t-micro); }
.data-table th, .data-table td { padding: 8px 12px 8px 0; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.data-table thead th { position: sticky; top: 0; background: var(--paper); font-size: var(--t-micro); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.data-table td.n, .data-table th.n { text-align: right; padding-right: 0; padding-left: 12px; }

/* ═══ Tooltip / bottom sheet ═══════════════════════════════════════════ */
.tip {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
  max-width: 18rem; padding: 10px 12px; border-radius: 8px;
  background: var(--paper-raised); color: var(--ink); box-shadow: var(--shadow-float); border: 1px solid var(--rule);
  font-family: var(--f-ui); font-size: var(--t-small); line-height: 1.4;
  opacity: 0; transform: translateY(4px); transition: opacity var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
.tip.is-on { opacity: 1; transform: none; }
.tip__title { font-family: var(--f-display); font-size: 1.1875rem; line-height: 1.15; }
.tip__meta { color: var(--ink-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.tip--sheet {
  left: 0 !important; right: 0; top: auto !important; bottom: 0; max-width: none; pointer-events: auto;
  border-radius: 16px 16px 0 0; padding: var(--s-5) var(--s-5) calc(var(--s-5) + env(safe-area-inset-bottom));
  transform: translateY(100%); border-width: 1px 0 0;
}
.tip--sheet.is-on { transform: none; transition-duration: var(--dur-2); }
.tip__close { position: absolute; top: 4px; right: 4px; }
/* "View as table" hides the chart body; a chart that sets display on its mount must not undo that */
.figure__body[hidden] { display: none !important; }
/* A text column right after a right-aligned number needs its own gap */
.data-table td.n + td:not(.n), .data-table th.n + th:not(.n) { padding-left: 16px; }

/* ═══ Charts: Books per year, ratings, engagement, time travel, subjects ═══ */
/* A key under a chart, shared vocabulary: icon + label, wraps on small screens */
.chart-key { list-style: none; padding: 0; margin-top: var(--s-3); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.chart-key li { display: inline-flex; align-items: center; gap: 6px; }
.chart-key svg { flex: none; }

/* Focusable dots: a visible ring on keyboard focus (SVG ignores outline) */
.er-dot:focus-visible, .tt-dot:focus-visible { stroke: var(--rubric); stroke-width: 2.5; }
.er-dot, .tt-dot { cursor: pointer; }
.tt-annot { font-size: 14px; }

/* Topic mix: small multiples */
.tm-grid { display: grid; grid-template-columns: repeat(var(--tm-cols, 2), minmax(0, 1fr)); gap: var(--s-5) var(--tm-gap, 16px); }
.tm-panel { margin: 0; min-width: 0; }
.tm-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); border-top: 1px solid var(--rule); padding-top: var(--s-2); margin-bottom: var(--s-1); }
.tm-name { font-family: var(--f-display); font-size: 1.125rem; line-height: 1.15; min-width: 0; }
.tm-total { flex: none; }
.tm-note { margin-bottom: var(--s-4); max-width: var(--measure); }
/* Titles that wrap to two lines must not push their bars out of line with the neighbours */
@supports (grid-template-rows: subgrid) {
  .tm-panel { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
  .tm-head { align-items: start; }
  .tm-panel > svg { align-self: end; }
}

/* ═══ Charts: Pace and habit: lifecycles, calendar, reading clock ═══ */
/* ── Sequential ramp key (calendar) ─────────────────────────────────── */
.seq-key { display: flex; align-items: center; gap: 3px; margin-bottom: var(--s-3); font-size: var(--t-micro); }
.seq-key > span:first-child { margin-right: 4px; }
.seq-key > span:last-child { margin-left: 4px; }
.seq-swatch { inline-size: 12px; block-size: 12px; border-radius: 2px; }
.seq-swatch--0 { background: var(--seq-0); box-shadow: inset 0 0 0 1px var(--rule); }
.seq-swatch--1 { background: var(--seq-1); }
.seq-swatch--2 { background: var(--seq-2); }
.seq-swatch--3 { background: var(--seq-3); }
.seq-swatch--4 { background: var(--seq-4); }
.seq-swatch--5 { background: var(--seq-5); }

/* ── Calendar ──────────────────────────────────────────────────────── */
.cal-annot { font-size: 13px; }
.cal-notes { list-style: none; padding: 0; margin-top: var(--s-3); display: grid; gap: 2px; }
.cal-k { display: inline-block; inline-size: 12px; block-size: 10px; margin-right: 8px; vertical-align: -1px; }
.cal-k--streak { border: 1.5px solid var(--rubric); border-left: 0; inline-size: 6px; }
.cal-k--peak { background: var(--rubric); clip-path: polygon(0 50%, 100% 0, 100% 100%); }
.cal-k--gap { background: repeating-linear-gradient(45deg, var(--rule-strong) 0 1.2px, transparent 1.2px 4px); }

/* ── Reading clock ─────────────────────────────────────────────────── */
.figure__body[data-chart="reading-clock"] { max-width: 34rem; }
.rc-centre { font-family: var(--f-display); font-size: 44px; fill: var(--ink); font-variant-numeric: lining-nums; }
@media (max-width: 519px) { .rc-centre { font-size: 34px; } }
.rc-hit { cursor: default; }
.rc-bars:has(.rc-hit:hover) .rc-bar { opacity: 0.55; }
.rc-bars .rc-bar:has(+ .rc-hit:hover) { opacity: 1; }

/* ── Lifecycles ────────────────────────────────────────────────────── */
.lc-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: var(--s-3); }
.lc-legend li { display: inline-flex; align-items: center; gap: 6px; }
.lc-k-span { inline-size: 18px; block-size: 6px; border-radius: 2px; background: var(--ink-2); }
.lc-k-pause { inline-size: 18px; block-size: 0; border-top: 1.5px dotted var(--ink-3); }
.lc-scroll { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.lc-scroll svg { max-width: none; }
.lc-scroll:focus-visible { outline-offset: 2px; }
.lc-hint { margin-top: var(--s-2); }
.lc-span { fill: var(--ink-2); }
.lc-book--deferred .lc-span { fill: var(--st-deferred); }
.lc-book--abandoned .lc-span { fill: none; stroke: var(--st-abandoned); stroke-width: 1.25; }
.lc-pause { stroke: var(--ink-3); stroke-width: 1.25; stroke-dasharray: 1 3; stroke-linecap: round; }
.lc-book { transition: opacity var(--dur-1) var(--ease-out); cursor: pointer; }
.lc-books:has(.lc-book:hover) .lc-book:not(:hover) { opacity: 0.4; }
.lc-area { fill: var(--ink-3); fill-opacity: 0.16; }
.lc-line { fill: none; stroke: var(--ink-2); stroke-width: 1.25; stroke-linejoin: round; }
.lc-tick { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 3; }
.lc-strip-title { font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 12px; }

/* ═══ Charts: Authors, languages, the unfinished ══════════════════════════ */
/* ── Authors returned to ─────────────────────────────────────────────── */
.ta-list { list-style: none; padding: 0; display: grid; gap: var(--s-6) var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); padding-top: var(--s-5); }
@media (min-width: 640px)  { .ta-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .ta-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ta-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); align-items: end; }
@media (min-width: 640px) { .ta-row { grid-template-columns: auto minmax(0, 1fr); gap: var(--s-4); } }
.ta-fan { --h: 66px; position: relative; display: flex; align-items: flex-end; height: calc(var(--h) + 6px); width: 136px; padding-top: 6px; }
@media (min-width: 520px) { .ta-fan { --h: 84px; width: 196px; } }
.ta-fan .cover { height: var(--h); position: absolute; left: calc(var(--j) * var(--step)); bottom: 0; }
.ta-fan .cover--fav::after { min-block-size: 12px; inline-size: 5px; }
@media (hover: hover) { .ta-fan .cover:hover { z-index: 50 !important; } }
.ta-fan .cover:focus-visible { z-index: 50 !important; }
.ta-text { min-width: 0; padding-bottom: 2px; }
.ta-count { font-family: var(--f-display); font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); line-height: 0.9; color: var(--ink); font-variant-numeric: lining-nums; }
.ta-name { font-family: var(--f-display); font-size: 1.25rem; line-height: 1.1; margin-top: var(--s-1); text-wrap: balance; }
.ta-text .meta { margin-top: 2px; }
.ta-none { font-style: italic; }
.ta-more { margin-top: var(--s-4); }

/* ── The Malayalam shelf ─────────────────────────────────────────────── */
.lg { display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .lg { grid-template-columns: minmax(0, 1fr) 17rem; gap: var(--s-7); align-items: start; } }
.lg-shelf { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: var(--s-4) var(--s-3); }
@media (min-width: 520px) { .lg-shelf { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: var(--s-5) var(--s-4); } }
.lg-book { min-width: 0; display: flex; flex-direction: column; }
.lg-book .cover { width: 100%; height: auto; }
.lg-native { margin-top: var(--s-2); font-family: var(--f-display); font-size: clamp(0.8125rem, 0.75rem + 0.3vw, 0.9375rem); line-height: 1.35; overflow-wrap: break-word; }
.lg-latin { font-size: var(--t-micro); line-height: 1.3; margin-top: 1px; overflow-wrap: break-word; }
.lg-latin:empty { display: none; }
.lg-side { border-top: 1px solid var(--ink); padding-top: var(--s-3); }
.lg-strip { display: flex; gap: 2px; height: 14px; margin-top: var(--s-3); }
.lg-seg { flex: var(--w) 1 0; min-width: 4px; border-radius: 1px; }
.lg-seg--en { background: var(--ink-2); }
.lg-seg--ml { background: var(--rubric); }
.lg-seg--tr { background: repeating-linear-gradient(45deg, var(--ink-3) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--ink-3); }
.lg-legend { list-style: none; padding: 0; margin-top: var(--s-2); display: flex; flex-wrap: wrap; gap: 2px var(--s-4); }
.lg-legend b { color: var(--ink); font-weight: 600; }
.lg-swatch { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; border-radius: 1px; }
.lg-sub { margin-top: var(--s-5); }
.lg-orig { list-style: none; padding: 0; margin-top: var(--s-2); font-family: var(--f-ui); font-size: var(--t-small); }
.lg-orig li { display: grid; grid-template-columns: 7.5rem 1fr auto; align-items: center; gap: var(--s-2); min-height: 24px; border-bottom: 1px solid var(--rule); }
.lg-oname { color: var(--ink-2); }
.lg-dots { display: flex; gap: 3px; }
.lg-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.lg-on { color: var(--ink-3); font-size: var(--t-micro); }

/* ── Funnel ──────────────────────────────────────────────────────────── */
.fn-label { font-family: var(--f-display); font-size: 19px; fill: var(--ink); }
.fn-in { font-family: var(--f-ui); font-size: 12px; font-weight: 600; fill: var(--paper); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.fn-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px var(--s-5); margin-top: var(--s-3); }
.fn-kinds { display: grid; gap: var(--s-6); margin-top: var(--s-6); }
@media (min-width: 900px) { .fn-kinds { grid-template-columns: 1fr 1fr; gap: var(--s-7); } }
.fn-group > .kicker { border-bottom: 1px solid var(--ink); padding-bottom: var(--s-2); color: var(--ink-2); }
.fn-kindlist { list-style: none; padding: 0; }
.fn-kindlist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-3); row-gap: 6px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.fn-kname { font-family: var(--f-text); font-size: 1rem; line-height: 1.3; }
.fn-kn { font-size: var(--t-small); color: var(--ink-2); }
.fn-dots { grid-column: 1 / -1; max-width: 100%; height: auto; }

/* ── Abandonment ─────────────────────────────────────────────────────── */
.ab-panels { display: grid; gap: var(--s-7); }
@media (min-width: 900px) { .ab-panels { grid-template-columns: 1fr 1fr; gap: 48px; } }
.ab-panel > .kicker { margin-bottom: var(--s-3); }
.ab-note { margin-top: var(--s-2); }
.ab-key { display: inline-block; width: 12px; height: 10px; border-radius: 1px; vertical-align: -1px; }
.ab-key--abandoned { background: var(--paper-sunk); box-shadow: inset 0 0 0 1.5px var(--st-abandoned); }
.ab-key--deferred { background: repeating-linear-gradient(45deg, var(--st-deferred) 0 1.5px, transparent 1.5px 3.5px); box-shadow: inset 0 0 0 1.5px var(--st-deferred); }
.ab-shelf { margin-top: var(--s-8); border-top: 1px solid var(--ink); padding-top: var(--s-3); }
.ab-shelf > .kicker { margin-bottom: var(--s-2); }
.ab-group { padding-block: var(--s-4); border-bottom: 1px solid var(--rule); }
.ab-ghead { color: var(--ink-2); margin-bottom: var(--s-3); }
.ab-ghead b { font-weight: 600; color: var(--ink); }
.ab-covers { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-2); }
.ab-covers .cover { height: 64px; }
@media (min-width: 520px) { .ab-covers .cover { height: 84px; } .ab-covers { gap: var(--s-3); } }

/* ═══ Charts: Margins: highlight position, era words ═══ */
/* ── Where in the book: legend ─────────────────────────────────────── */
.hp-legend { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin-bottom: var(--s-2); }
.hp-key { display: inline-flex; align-items: center; gap: 6px; }
.hp-key i { display: inline-block; flex: none; }
.hp-key__bar { inline-size: 10px; block-size: 10px; background: var(--ink-2); border-radius: 1px; }
.hp-key__line { inline-size: 18px; block-size: 8px; position: relative;
  background: linear-gradient(var(--rubric), var(--rubric)) center / 100% 1.75px no-repeat; }
.hp-key__line::after { content: ""; position: absolute; left: 50%; top: 50%; inline-size: 7px; block-size: 7px; margin: -3.5px 0 0 -3.5px;
  border-radius: 50%; border: 1.5px solid var(--rubric); background: var(--paper); box-sizing: border-box; }

/* ── Words of each era ──────────────────────────────────────────────── */
.ew-grid { display: grid; grid-template-columns: repeat(var(--ew-cols, 1), minmax(0, 1fr)); gap: var(--s-6) var(--s-5); }
.ew-era { min-width: 0; border-top: 1px solid var(--ink); padding-top: var(--s-3); }
.ew-era__head { display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--s-3); }
.ew-era__name { font-family: var(--f-display); font-size: 1.75rem; line-height: 1; font-variant-numeric: lining-nums; }
.ew-era__n { font-size: var(--t-micro); }
.ew-terms { list-style: none; padding: 0; display: grid; gap: 2px; }
.ew-term { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: var(--s-2); padding-bottom: 5px; }
.ew-term__word { font-family: var(--f-display); font-size: var(--fs, 1rem); line-height: 1.12; overflow-wrap: anywhere; color: var(--ink); }
.ew-term.is-top .ew-term__word { color: var(--rubric); font-style: italic; }
.ew-term__n { font-size: 12px; white-space: nowrap; }
.ew-term__bar { position: absolute; left: 0; bottom: 1px; block-size: 2px; inline-size: calc(var(--w, 0) * 100%); background: var(--rule-strong); border-radius: 1px; }
.ew-term.is-top .ew-term__bar { background: color-mix(in oklab, var(--rubric) 55%, var(--rule)); }

/* ── A thematic journey across the eras ─────────────────────────────── */
/* Reserve about the drawn height while pending, then let the content set it. */
.figure__body--journey { --chart-h: 640px; }
.figure__body--journey[data-state="ready"] { --chart-h: 0px; }
.jr { --jr-gap: var(--s-5); }
.jr--wide { --jr-gap: var(--s-4); }
.jr--wide .jr-passage__text { font-size: 0.9375rem; }
.jr-eras { list-style: none; padding: 0; }
.jr--wide .jr-eras { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--jr-gap); }
.jr-era { min-width: 0; border-top: 1px solid var(--ink); padding-top: var(--s-3); }
.jr-era article { display: flex; flex-direction: column; }
/* Wide: every card has the same six rows (head, thesis, note, numbers, books, passage), aligned across the eras. */
@supports (grid-template-rows: subgrid) {
  .jr--wide .jr-eras { grid-auto-rows: auto; row-gap: 0; }
  .jr--wide .jr-era, .jr--wide .jr-era article { display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; }
}
.jr-era__note.is-empty { display: none; }
.jr--wide .jr-era__note.is-empty { display: block; margin: 0; }
.jr-era__name { font-family: var(--f-display); font-size: 1.5rem; line-height: 1.1; margin-top: var(--s-1); }
.jr-era__thesis { font-family: var(--f-text); font-size: 1rem; line-height: 1.5; color: var(--ink-2); margin-top: var(--s-2); }
.jr-era__note { font-family: var(--f-ui); font-size: var(--t-micro); line-height: 1.4; color: var(--ink-3); margin-top: var(--s-2); }
.jr-nums { display: flex; gap: var(--s-4); margin-top: var(--s-3); font-family: var(--f-ui); }
.jr-num { display: flex; flex-direction: column; }
.jr-num__v { font-size: 1.125rem; line-height: 1.2; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.jr-num__l { font-size: var(--t-micro); line-height: 1.25; color: var(--ink-3); white-space: nowrap; }
.jr-books { list-style: none; padding: 0; margin-top: var(--s-3); display: grid; gap: 2px; font-family: var(--f-text); font-size: 0.9375rem; line-height: 1.4; }
.jr-passage { margin-top: var(--s-3); }
/* Passages are chosen to fit (≤ 25 words); the clamp is only a safety net. */
.jr-passage__text { font-family: var(--f-text); font-size: 1rem; line-height: 1.45; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; }
.jr-passage__text::before { content: "\201C"; color: var(--rubric); }
.jr-passage__text::after { content: "\201D"; color: var(--rubric); }
.jr-passage__src { font-family: var(--f-ui); font-size: var(--t-micro); color: var(--ink-3); margin-top: var(--s-2); }
.jr-passage__src cite { font-style: italic; }
.jr-passage__src a { color: var(--ink-2); white-space: nowrap; }

/* Below 900px: the cards scroll sideways, with an index of the eras above them */
.jr-index { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: var(--s-2); }
.jr-index__btn {
  min-block-size: 44px; padding: 0; text-align: center; white-space: nowrap; background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  font-family: var(--f-ui); font-size: 12px; color: var(--ink-3); font-variant-numeric: lining-nums tabular-nums; cursor: pointer;
}
.jr-index__btn[aria-current="true"] { color: var(--ink); border-bottom-color: var(--rubric); }
.jr-scroller { position: relative; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: var(--s-2); }
.jr-scroller::-webkit-scrollbar { display: none; }
.jr-scroller:focus-visible { outline-offset: 2px; }
.jr:not(.jr--wide) .jr-eras { display: flex; gap: var(--jr-gap); }
.jr:not(.jr--wide) .jr-era { flex: 0 0 min(85%, 22rem); scroll-snap-align: start; }

/* Threads */
.jr-threads { margin-top: var(--s-5); }
.jr-threads__title { margin-bottom: var(--s-3); }
.jr-threads__list { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.jr-thread p { font-family: var(--f-text); font-size: 1rem; line-height: 1.5; }
.jr-thread strong { font-weight: 600; }
.jr-thread__era { color: var(--ink-3); white-space: nowrap; }
.jr-arrow { color: var(--ink-3); }
.jr--wide .jr-threads__list { gap: var(--s-3); }
.jr-thread__name.jr-thread__name { font-family: var(--f-ui); font-size: var(--t-micro); font-weight: 600; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--ink-2); line-height: 1.3; margin-bottom: var(--s-1); }
.jr-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--jr-gap); }
.jr-step { position: relative; min-width: 0; padding-top: 14px; }
/* The line runs from each step (or gap) across its column and the gutter to the next one. */
.jr-step.is-step::before, .jr-step.is-gap::before { content: ""; position: absolute; left: 0; right: calc(-1 * var(--jr-gap)); top: 4px; block-size: 1px; }
.jr-step.is-step::before { background: var(--rule-strong); }
.jr-step.is-gap::before { background: repeating-linear-gradient(90deg, var(--rule-strong) 0 1px, transparent 1px 4px); }
.jr-step.is-last::before { display: none; }
.jr-step.is-step::after { content: ""; position: absolute; left: 0; top: 1px; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--rubric); }
.jr-step__book { font-family: var(--f-text); font-size: 0.9375rem; line-height: 1.35; }
.jr--wide .jr-step__book { display: block; }
/* Wide: titles stand as lists, so they underline on hover and focus only. Links in running text
   (the phone threads) and "Read on the shelf" keep the underline. */
.jr--wide .jr-book, .jr--wide .jr-step__book { text-decoration-color: transparent; }
.jr--wide .jr-book:hover, .jr--wide .jr-book:focus-visible,
.jr--wide .jr-step__book:hover, .jr--wide .jr-step__book:focus-visible { text-decoration-color: var(--rubric); }

/* Phones: each era's words run as a line of type, separated by middots */
.ew-grid--flow { gap: var(--s-5); }
.ew-grid--flow .ew-era__head { flex-direction: row; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.ew-grid--flow .ew-terms { display: block; line-height: 1.3; }
.ew-grid--flow .ew-term { display: inline; padding: 0; white-space: nowrap; }
.ew-grid--flow .ew-term__n, .ew-grid--flow .ew-term__bar { display: none; }
.ew-grid--flow .ew-term__word { line-height: 1.3; overflow-wrap: normal; }
.ew-grid--flow .ew-term:not(:last-child)::after { content: "\00a0·\0020"; white-space: normal; color: var(--ink-3); font-family: var(--f-ui); font-size: 0.9rem; }

/* ── Shared controls: search, selects, buttons, marked words (the shelf of marks uses them) ── */
.qe-input, .qe-select {
  inline-size: 100%; min-block-size: 44px; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--rule-strong); background: var(--paper-raised); color: var(--ink);
  font-family: var(--f-ui); font-size: 1rem;   /* ≥16px: no zoom-on-focus in iOS Safari */
  transition: border-color var(--dur-1) var(--ease-out);
}
.qe-input::placeholder { color: var(--ink-3); }
.qe-input:hover, .qe-select:hover { border-color: var(--ink-3); }
.qe-input:focus-visible, .qe-select:focus-visible { outline: 2px solid var(--rubric); outline-offset: 1px; border-color: var(--rubric); border-radius: 8px; }
.qe-select {
  appearance: none; -webkit-appearance: none; padding-right: 32px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.qe-select option { background: var(--paper-raised); color: var(--ink); }

.qe-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-block-size: 44px; padding: 0 var(--s-4);
  border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink);
  font-family: var(--f-ui); font-size: var(--t-small); font-weight: 600; white-space: nowrap;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.qe-btn:hover { background: var(--ink); color: var(--paper); }
.qe-btn--quiet { border-color: var(--rule-strong); color: var(--ink-2); font-weight: 500; }
.qe-btn--quiet:hover { background: var(--paper-sunk); color: var(--ink); }
.qe-btn:disabled { opacity: 0.45; cursor: default; background: transparent; color: var(--ink-2); }

.qe-hit { background: color-mix(in oklab, var(--rubric) 22%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.qe-note { font-family: var(--f-text); font-style: italic; color: var(--ink-2); font-size: 1rem; border-left: 2px solid var(--rubric); padding-left: var(--s-3); }
.qe-note .kicker { font-style: normal; margin-right: 4px; }
.qe-book {
  border: 0; background: none; padding: 0; color: var(--ink); font: inherit; font-weight: 600; text-align: left;
  text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--rubric) 60%, transparent);
  text-decoration-thickness: 1px; text-underline-offset: 0.2em;
  min-block-size: 24px;   /* WCAG 2.2 target size (inline text link exception applies too) */
}
.qe-book:hover { text-decoration-color: var(--rubric); color: var(--rubric); }
.qe-more { border: 0; background: none; padding: 0 2px; color: var(--rubric); font-family: var(--f-ui); font-size: var(--t-small); font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; min-block-size: 24px; }
.qe-btn[hidden] { display: none; }

/* ═══ Charts: Forensics, profile, shortcomings ════════════════════════════ */
/* ═══ Forensics: the clock that ran backwards ═════════════════════════ */
.rd { display: grid; gap: var(--s-2); }
.rd-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-bottom: var(--s-3); }
.rd-legend li { display: inline-flex; align-items: center; gap: var(--s-2); }
.rd-key { display: inline-block; flex: none; inline-size: 18px; block-size: 10px; position: relative; }
.rd-key--stamp::before { content: ""; position: absolute; left: 4px; top: 0; inline-size: 7px; block-size: 7px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.rd-key--true::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; block-size: 2px; background: var(--rubric); }
.rd-key--true::after { content: ""; position: absolute; left: 6px; top: 2px; inline-size: 6px; block-size: 6px; border-radius: 50%; background: var(--rubric); }
.rd-key--anchor::before { content: ""; position: absolute; left: 4px; top: 0; inline-size: 7px; block-size: 7px; transform: rotate(45deg); border: 1.5px solid var(--ink); background: var(--paper); }
.rd-key--onset::before { content: ""; position: absolute; left: 8px; top: -3px; bottom: -3px; border-left: 1.5px dashed var(--ink); }

.rd-panel { margin-top: var(--s-4); }
.rd-panel:first-of-type { margin-top: 0; }
.rd-panel__note { text-transform: none; letter-spacing: 0; font-weight: 400; }
@media (max-width: 599px) { .rd-panel__note { display: block; margin-top: 2px; } }

.rd-zoom { fill: var(--paper-sunk); }
.rd-band { fill: transparent; }
.rd-band--alt { fill: color-mix(in oklab, var(--paper-sunk) 70%, transparent); }
.rd-break { fill: var(--paper); stroke: var(--rule); stroke-dasharray: 2 4; }
.rd-true { fill: none; stroke: var(--rubric); stroke-width: 1.75; stroke-linejoin: round; }
.rd-truedots circle { fill: var(--rubric); }
.rd-stamps circle { fill: var(--paper); stroke: var(--ink-3); stroke-width: 1.25; }
.rd-overview .rd-stamps circle { fill: var(--ink-3); stroke: none; }
.rd-overview .rd-true { stroke-width: 1.5; }
.rd-tooth { fill: none; stroke: var(--ink-3); stroke-width: 1; opacity: 0.6; }
.rd-reset { fill: none; stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 1.5 3; }
.rd-onset { stroke: var(--ink); stroke-width: 1.25; stroke-dasharray: 4 3; }
.rd-onset-label { fill: var(--ink); }
.rd-ceiling { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 1 3; }
.rd-arrow { fill: none; stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.rd-arrowhead { fill: none; stroke: var(--ink-2); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.rd-delta { font-family: var(--f-display); font-size: 17px; fill: var(--ink); font-variant-numeric: lining-nums; }
.rd-delta--sm { font-size: 15px; }
.rd-feasible { fill: color-mix(in oklab, var(--rubric) 22%, transparent); }
.rd-ibeam { fill: none; stroke: var(--rubric); stroke-width: 1.5; }
.rd-anchor { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; cursor: pointer; }
.rd-anchor--unused { stroke-dasharray: 2 2; }
@media (hover: hover) { .rd-anchor:hover { fill: var(--ink); } }

.rd-cards { display: grid; gap: var(--s-6); margin-top: var(--s-6); }
.rd-facts { display: grid; gap: var(--s-6); }
@media (min-width: 768px) { .rd-facts { grid-template-columns: 1fr 1fr; column-gap: var(--s-7); } }
.rd-fact { border-top: 1px solid var(--ink); padding-top: var(--s-3); display: grid; gap: var(--s-2); align-content: start; }
.rd-fact__big, .rd-seg__delta { font-family: var(--f-display); font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem); line-height: 1; font-variant-numeric: lining-nums; letter-spacing: -0.01em; }
.rd-fact__big span, .rd-seg__delta span { font-size: 0.42em; color: var(--ink-3); letter-spacing: 0; }
.rd-segs { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5) var(--s-4); }
@media (min-width: 900px) { .rd-segs { grid-template-columns: repeat(4, 1fr); column-gap: var(--s-5); } }
.rd-seg { border-top: 1px solid var(--rule-strong); padding-top: var(--s-3); display: grid; gap: var(--s-2); align-content: start; }
.rd-seg__delta { font-size: clamp(1.875rem, 1.5rem + 1.4vw, 2.5rem); }
.rd-seg--bounded { border-top: 1px dashed var(--ink); }
.rd-seg--bounded .rd-seg__delta { font-style: italic; }
.rd-excluded { max-width: var(--measure); }

/* ═══ Reader profile ═══════════════════════════════════════════════════ */
.pf { display: grid; gap: var(--s-6); }
.pf-intro { display: grid; gap: var(--s-2); max-width: var(--measure); }
.pf-framing { font-family: var(--f-display); font-style: italic; font-size: 1.25rem; line-height: 1.3; color: var(--ink-2); }
.pf-traits { list-style: none; padding: 0; display: grid; gap: var(--s-6); }
.pf--two .pf-traits { grid-template-columns: 1fr 1fr; column-gap: var(--s-8); row-gap: var(--s-7); }
.pf-trait { border-top: 1px solid var(--ink); padding-top: var(--s-3); display: grid; gap: var(--s-2); align-content: start; }
.pf-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); }
.pf-label { font-family: var(--f-display); font-size: 1.5rem; line-height: 1.1; }
.pf-score { flex: none; }
.pf-score__n { font-family: var(--f-display); font-size: 2.75rem; line-height: 0.9; font-variant-numeric: lining-nums; letter-spacing: -0.01em; }
.pf-reading { font-family: var(--f-text); font-style: italic; color: var(--ink-2); margin-top: -4px; }

.pf-scale { margin-top: var(--s-2); }
.pf-track { position: relative; block-size: 14px; }
.pf-track::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; block-size: 2px; background: var(--rule); border-radius: 1px; }
.pf-fill { position: absolute; left: 0; top: 6px; block-size: 2px; inline-size: calc(var(--x) * 1%); background: var(--ink-2); border-radius: 1px; }
.pf-tick { position: absolute; top: 2px; block-size: 10px; left: calc(var(--x) * 1%); border-left: 1px solid var(--rule-strong); }
.pf-dot { position: absolute; top: 0; left: calc(var(--x) * 1%); inline-size: 14px; block-size: 14px; margin-left: -7px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink); }
.pf-dot--high, .pf-dot--low { background: var(--ink); }
.pf-poles { display: flex; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-2);
  font-family: var(--f-ui); font-size: var(--t-micro); color: var(--ink-3); line-height: 1.35; }
.pf-pole { max-width: 48%; }
.pf-pole--high { text-align: right; }
.pf-pole.is-near { color: var(--ink); font-weight: 600; }
.pf-caveat { font-family: var(--f-ui); font-size: var(--t-small); line-height: 1.45; color: var(--ink-2); padding-left: var(--s-3); border-left: 2px solid var(--rule-strong); margin-top: var(--s-2); }
.pf-caveat__k { font-size: var(--t-micro); font-weight: 600; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--ink-3); }

.pf-how { margin-top: var(--s-1); }
.pf-how summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; list-style: none;
  font-family: var(--f-ui); font-size: var(--t-micro); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); border-radius: 6px; }
.pf-how summary::-webkit-details-marker { display: none; }
.pf-how summary::before { content: "+"; display: inline-grid; place-items: center; inline-size: 18px; block-size: 18px; border: 1px solid var(--rule-strong); border-radius: 50%; font-size: 12px; line-height: 1; color: var(--ink-2); }
.pf-how[open] summary::before { content: "–"; }
.pf-how summary:hover { color: var(--ink); }
.pf-how__n { font-weight: 400; letter-spacing: 0.02em; text-transform: none; color: var(--ink-3); }
.pf-signals { list-style: none; padding: 0 0 var(--s-2); display: grid; gap: var(--s-4); }
.pf-signal { display: grid; gap: 4px; }
.pf-signal__label { font-family: var(--f-text); font-size: 1rem; line-height: 1.4; }
.pf-signal__row { display: grid; grid-template-columns: minmax(5.5rem, auto) 1fr auto; align-items: center; gap: var(--s-3);
  font-family: var(--f-ui); font-size: var(--t-small); font-variant-numeric: lining-nums tabular-nums; }
.pf-signal__value { font-weight: 600; }
.pf-signal__bar { position: relative; block-size: 6px; background: var(--paper-sunk); border-radius: 3px; overflow: hidden; }
.pf-signal__bar span { position: absolute; inset: 0 auto 0 0; inline-size: calc(var(--x) * 1%); background: var(--ink-3); }
.pf-signal__norm { color: var(--ink-3); }

/* ═══ Shortcomings: two honest columns ════════════════════════════════ */
.sc-list { list-style: none; padding: 0; counter-reset: sc; border-top: 1px solid var(--ink); }
.sc-item { counter-increment: sc; padding-block: var(--s-4) var(--s-5); border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 2rem 1fr; column-gap: var(--s-2); }
.sc-item::before { content: counter(sc, lower-roman) "."; grid-row: 1 / span 3; font-family: var(--f-display); font-style: italic; color: var(--rubric); font-size: 1.125rem; line-height: 1.6; }
.sc-title { font-family: var(--f-display); font-size: 1.375rem; line-height: 1.15; }
.sc-fact { font-size: 1rem; line-height: 1.55; color: var(--ink-2); margin-top: var(--s-2); }
.sc-books { margin-top: var(--s-2); }

/* ═══ The shelf of marks (every highlight) ═════════════════════════════════ */
.figure__body--wall { --chart-h: 520px; }
.hw { display: grid; gap: var(--s-6); align-items: start; }
.hw--wide { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-7); }
.hw--wide .hw-reader { position: sticky; top: calc(var(--masthead-h) + var(--s-4)); order: 0; }

/* The reader: the chosen passage with its book */
.hw-reader {
  --tone: var(--ink-3);
  position: relative; display: grid; gap: var(--s-4); padding: var(--s-5);
  background: color-mix(in oklab, var(--tone) 9%, var(--paper-raised));
  border: 1px solid var(--rule); border-top: 4px solid var(--tone); border-radius: var(--radius-ui);
  transition: background-color var(--dur-3) var(--ease-out), border-color var(--dur-3) var(--ease-out);
}
@media (min-width: 768px) { .hw-reader { padding: var(--s-6); } }
.hw-reader__head { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-4); align-items: start; }
@media (min-width: 520px) { .hw-reader__head { grid-template-columns: 128px minmax(0, 1fr); gap: var(--s-5); } }
.hw-reader__cover .cover { width: 100%; height: auto; box-shadow: var(--shadow-lift); cursor: zoom-in; transition: transform var(--dur-2) var(--ease-out); }
.hw-reader__cover .cover:hover { transform: translateY(-2px) rotate(-0.6deg); }
.hw-reader__head.is-new .hw-reader__cover { animation: hw-lift var(--dur-3) var(--ease-out); }
.hw-reader__book { display: grid; gap: 2px; min-width: 0; }
.hw-reader__title { font-family: var(--f-display); font-size: clamp(1.375rem, 1.15rem + 1vw, 1.875rem); line-height: 1.05; margin-top: var(--s-1); overflow-wrap: break-word; }
.hw-reader__author { font-family: var(--f-text); font-style: italic; color: var(--ink-2); }
.hw-open { justify-self: start; font-family: var(--f-ui); font-size: var(--t-small); margin-top: var(--s-1); }

/* Passages are set for reading: the text face by default, display type only for a line of a dozen words.
   Bands by word count: ≤ 14 display, 15–40 text, > 40 smaller text at a book's measure. */
.hw-quote {
  margin: 0; font-family: var(--f-text); font-size: 1.375rem; line-height: 1.45;
  text-wrap: pretty; overflow-wrap: break-word; outline: none;
  text-indent: -0.42em;   /* hang the opening mark, as .pullquote does */
}
.hw-quote::before { content: "\201C"; color: var(--rubric); }
.hw-quote::after { content: "\201D"; color: var(--rubric); }
.hw-quote.is-short { font-family: var(--f-display); font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); line-height: 1.1; letter-spacing: -0.003em; }
.hw-quote.is-long { font-size: 1.1875rem; line-height: 1.6; max-inline-size: 34em; }
/* A page-long passage is cut at twelve lines with "Read all N words" under it (no inner scroll).
   The padding makes room for the hanging mark, which overflow would otherwise clip. */
.hw-quote.is-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 12; overflow: hidden; padding-left: 0.5em; margin-left: -0.5em; }
.hw-readall { justify-self: start; min-block-size: 44px; margin-top: calc(-1 * var(--s-3)); }
.hw-readall[hidden] { display: none; }
.hw-quote.is-new { animation: hw-in var(--dur-3) var(--ease-out); }
.hw-reader__when { line-height: 1.6; }
.hw-reader__q { color: var(--st-deferred); }

/* The book as a strip: where each of its passages falls, and a slider to walk them */
.hw-strip-wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-3); }
.hw-strip-wrap .kicker { font-size: 12px; }
.hw-strip-track { position: relative; height: 32px; }
.hw-strip {
  position: absolute; inset: 9px 0; border-radius: 2px;
  background: linear-gradient(90deg, color-mix(in oklab, var(--tone) 30%, var(--paper)) calc(var(--fill) * 100%), transparent 0);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.hw-strip__tick { position: absolute; top: 0; bottom: 0; left: calc(var(--x) * 100%); width: 2px; margin-left: -1px; background: var(--ink-2); opacity: 0.55; }
.hw-strip__tick.is-out { opacity: 0.12; }
.hw-strip__tick.is-on { background: var(--rubric); opacity: 1; width: 3px; top: -6px; bottom: -6px; border-radius: 2px; }
.hw-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.hw-range:disabled { cursor: default; }
.hw-strip-track:has(.hw-range:focus-visible) { outline: 2px solid var(--rubric); outline-offset: 3px; border-radius: 4px; }

.hw-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.hw-next { margin-right: auto; }
.hw-link { min-block-size: 44px; }

/* Tools */
.hw-side { position: relative; min-width: 0; }
.hw-tools { display: grid; gap: var(--s-3); }
.hw-search { width: 100%; }
.hw-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.hw-chip {
  display: inline-flex; align-items: baseline; gap: 6px; min-block-size: 36px; padding: 0 var(--s-3);
  border: 1px solid var(--rule-strong); border-radius: 999px; background: transparent; color: var(--ink-2);
  font-family: var(--f-ui); font-size: var(--t-small); line-height: 34px;
}
@media (pointer: coarse) { .hw-chip { min-block-size: 44px; line-height: 42px; } }
.hw-chip:hover { background: var(--paper-sunk); color: var(--ink); }
.hw-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.hw-chip__n { font-size: var(--t-micro); opacity: 0.7; font-variant-numeric: tabular-nums; }
.hw-selects { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
@media (min-width: 600px) { .hw-selects { grid-template-columns: minmax(0, 15rem) minmax(0, 10rem); } }
.hw-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); margin: var(--s-4) 0 var(--s-3); }
.hw-status { margin: 0; font-weight: 600; color: var(--ink-2); }
.hw-clear { margin-left: var(--s-2); }
.hw-clear[hidden] { display: none; }

/* Shelf | List: two pressed-state buttons, one pill */
.hw-view { display: inline-flex; padding: 2px; border: 1px solid var(--rule-strong); border-radius: 999px; }
.hw-view__btn {
  min-block-size: 40px; min-inline-size: 64px; padding: 0 var(--s-4); border: 0; border-radius: 999px; background: transparent; color: var(--ink-2);
  font-family: var(--f-ui); font-size: var(--t-small); font-weight: 600;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.hw-view__btn:hover { color: var(--ink); background: var(--paper-sunk); }
.hw-view__btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.hw-wall-wrap[hidden], .hw-legend[hidden], .hw-list-wrap[hidden], .hw-more[hidden] { display: none; }
/* A select holding a value reads as an active filter, like a pressed chip */
.qe-select.is-set { border: 1.5px solid var(--ink); font-weight: 600; }

/* The list: matching passages, grouped by book, in reading order */
.hw-list-wrap { border-top: 1px solid var(--ink); }
.hw-group { padding-block: var(--s-5) var(--s-2); border-bottom: 1px solid var(--rule); }
.hw-group__head { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-3); align-items: center; margin-bottom: var(--s-2); }
.hw-group__cover .cover { width: 100%; height: auto; }
.hw-group__title { font-family: var(--f-display); font-size: 1.375rem; line-height: 1.1; overflow-wrap: break-word; }
.hw-group__title:focus-visible { outline-offset: 2px; }
.hw-items { list-style: none; padding: 0; }
.hw-item { padding: var(--s-2) 0 var(--s-2) var(--s-4); border-left: 2px solid transparent; }
.hw-item + .hw-item { border-top: 1px solid color-mix(in oklab, var(--rule) 60%, transparent); }
.hw-item.is-on, .hw-item:has(.hw-item__btn.is-expanded) { border-left-color: var(--rubric); background: color-mix(in oklab, var(--rubric) 5%, transparent); }
.hw-item__btn {
  position: relative; display: block; inline-size: 100%; padding: var(--s-1) 0; border: 0; background: none; color: var(--ink); text-align: left;
  font-family: var(--f-text); font-size: 1.0625rem; line-height: 1.55; border-radius: 4px;
}
/* State is the rule and the wash, never an underline: this is a paragraph to read, not a link */
.hw-item__btn, .hw-item__btn:hover, .hw-item__btn:focus { text-decoration: none; }
@media (hover: hover) { .hw-item:not(.is-on):has(.hw-item__btn:hover) { background: color-mix(in oklab, var(--rubric) 3%, transparent); } }
.hw-item__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; overflow-wrap: break-word; }
@media (max-width: 599px) { .hw-item__text { -webkit-line-clamp: 4; } }
.hw-item__btn.is-expanded .hw-item__text { display: block; -webkit-line-clamp: none; }
/* The clamp's visible affordance: a word under the cut text, inside the same button.
   (Its own line, not a fade over the text: the section behind it is a gradient.) */
.hw-item__more { display: none; margin-top: 2px; font-family: var(--f-ui); font-size: var(--t-small); font-weight: 600; color: var(--rubric); line-height: 1.6; }
.hw-item__btn.is-clamped:not(.is-expanded) .hw-item__more { display: block; }
.hw-item__meta { margin-top: 2px; }
.hw-item .qe-note { margin-top: var(--s-2); font-size: 0.9375rem; }
.hw-item__acts { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); }
.hw-item__acts .qe-more { min-block-size: 44px; }
.hw-item__acts[hidden], .hw-reader[hidden] { display: none; }
.hw-more { margin-top: var(--s-5); }
.hw-empty { padding: var(--s-7) 0; text-align: center; font-family: var(--f-display); font-style: italic; font-size: 1.375rem; color: var(--ink-2); }

/* The wall of spines */
.hw-wall-wrap { padding: var(--s-3) 0 var(--s-4); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.hw-wall { --hw-h: 104px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 3px; }
@media (min-width: 900px) { .hw-wall { --hw-h: 116px; } }
@media (max-width: 767px) {
  .hw-wall-wrap { max-height: min(56svh, 30rem); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
  .hw-wall { --hw-h: 84px; gap: 12px 3px; }
}
.hw-year { position: relative; flex: none; width: 17px; height: var(--hw-h); margin: 0 3px 0 7px; border-left: 1px solid var(--rule-strong); }
.hw-year span {
  position: absolute; left: 3px; bottom: 0; writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--f-ui); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.hw-wall .hw-year:first-child { margin-left: 0; }

.hw-spine {
  --tick: rgb(255 250 240 / 0.82);
  position: relative; flex: none; width: var(--w); height: var(--hw-h); padding: 0; border: 0; border-radius: 1px 1px 0 0;
  background: linear-gradient(to bottom, var(--tone) calc(var(--fill) * 100%), transparent 0);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 14%, transparent);   /* dark on paper, light on ink */
  cursor: pointer; transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2) var(--ease-out), filter var(--dur-2) var(--ease-out);
}
.hw-spine.is-light { --tick: rgb(28 26 23 / 0.62); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 20%, transparent); }
/* The unread part of an unfinished book: an outline only */
.hw-spine.is-open::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--fill) * 100%);
  border: 1px dashed var(--rule-strong); border-top: 0;
}
.hw-tick { position: absolute; left: 1px; right: 1px; top: calc(var(--y) * 100%); height: 1.5px; margin-top: -0.75px; background: var(--tick); pointer-events: none; }
.hw-tick.is-peek, .hw-tick.is-on { left: -4px; right: -4px; height: 3px; margin-top: -1.5px; border-radius: 2px; z-index: 2; }
.hw-tick.is-peek { background: var(--ink); }
.hw-tick.is-on { background: var(--rubric); box-shadow: 0 0 0 1.5px var(--paper); }
@media (hover: hover) { .hw-spine:hover { transform: translateY(-4px); } }
.hw-spine.is-on { transform: translateY(-6px); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 24%, transparent), 0 6px 10px -6px rgb(0 0 0 / 0.5); }
.hw-spine:focus-visible { outline: 2px solid var(--rubric); outline-offset: 2px; }

.hw-wall.is-narrowed .hw-spine { filter: saturate(0.25); opacity: 0.5; }
.hw-wall.is-narrowed .hw-spine.is-out { opacity: 0.12; }
.hw-wall.is-narrowed .hw-spine:not(.is-out) { filter: none; opacity: 1; }
.hw-wall.is-narrowed .hw-tick { opacity: 0.18; }
.hw-wall.is-narrowed .hw-tick.is-hit { opacity: 1; left: -2px; right: -2px; height: 2px; background: var(--rubric); box-shadow: 0 0 0 1px var(--paper); }
.hw-wall.is-narrowed .hw-tick.is-on { opacity: 1; }

/* Legend */
.hw-legend { margin-top: var(--s-3); font-size: var(--t-micro); line-height: 1.6; }
.hw-key { display: inline-block; width: 7px; height: 14px; vertical-align: -2px; margin-left: 2px; }
.hw-key--spine { background: linear-gradient(transparent 30%, var(--paper) 30% 38%, transparent 38% 64%, var(--paper) 64% 72%, transparent 72%) , var(--ink-2); }
.hw-key--open { background: linear-gradient(var(--ink-2) 50%, transparent 0); box-shadow: inset 0 0 0 1px var(--rule-strong); }

/* Hover preview */
.hw-tip {
  position: absolute; left: var(--x); top: var(--ty); z-index: 5; width: min(260px, 80vw);
  transform: translate(-50%, calc(-100% - 14px)); pointer-events: none;
  display: grid; gap: 6px; padding: var(--s-3) var(--s-4);
  background: var(--ink); color: var(--paper); border-radius: 8px; box-shadow: var(--shadow-float);
  font-family: var(--f-text); font-size: 0.9375rem; line-height: 1.4;
}
.hw-tip[hidden] { display: none; }
.hw-tip__src { font-family: var(--f-ui); font-size: var(--t-micro); font-weight: 600; letter-spacing: 0.04em; opacity: 0.75; }

@keyframes hw-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes hw-lift { from { opacity: 0; transform: translateY(8px) rotate(-1deg); } }

/* ═══ Featured: every highlight, straight after the hero ════════════════ */
.hero__cta { margin-top: var(--s-2); }
@media (min-width: 900px) { .hero__cta { grid-column: 2; margin-top: 0; } }
.cta {
  display: inline-flex; align-items: center; gap: var(--s-2); min-block-size: 48px; padding: 0 var(--s-5);
  border-radius: 999px; background: var(--rubric); color: var(--paper); text-decoration: none;
  font-family: var(--f-ui); font-size: var(--t-small); font-weight: 600; letter-spacing: 0.01em;
  box-shadow: var(--shadow-object); transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.cta__arrow { display: inline-block; animation: cta-nudge 2.4s var(--ease-in-out) infinite; }
@keyframes cta-nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .cta__arrow { animation: none; } }

.masthead__link--hl { color: var(--rubric); font-weight: 600; }

.feature { position: relative; isolation: isolate; padding-block: var(--s-8) var(--s-8); }
.feature::before {
  content: ""; grid-column: full; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, var(--paper-sunk), var(--paper) 70%);
  border-top: 1px solid var(--rule);
}
.feature__head { grid-column: wide; max-width: 52rem; margin-bottom: var(--s-6); }
.feature__title { font-size: clamp(2.5rem, 1.6rem + 4.2vw, 4.75rem); }
.feature__title [data-token] { font-variant-numeric: lining-nums; }
.feature__lede { margin-top: var(--s-4); font-size: var(--t-lede); line-height: 1.55; color: var(--ink-2); max-width: 44rem; }
.feature__figure { margin-top: 0; }

.contents__feature .contents__title { color: var(--rubric); }

/* A first-time hint: the chosen spine breathes until the reader touches the shelf. */
.hw-wall:not(.is-touched) .hw-spine.is-on { animation: hw-breathe 2.2s var(--ease-in-out) 3; }
@keyframes hw-breathe { 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .hw-wall .hw-spine.is-on { animation: none; } }
