/* ==================================================================
   TRENDZION
   An editorial almanac about the language of prophetic record.
   Fraunces (display serif) · EB Garamond (body) · IBM Plex Sans (ui)
   ================================================================== */

:root {
  /* paper & ink */
  --paper:        #f5eedc;
  --paper-warm:   #f8f2df;
  --paper-deep:   #ebe1c4;
  --paper-shadow: rgba(59, 42, 18, 0.08);

  --ink:          #14100a;
  --ink-soft:     #342b1c;
  --muted:        #7a6c4e;
  --muted-soft:   #a4916a;

  --rule:         #ccb97f;
  --rule-soft:    #ddcd9a;
  --rule-fine:    rgba(20, 16, 10, 0.14);

  /* gold leaf, indigo ink */
  --gold:         #a67a1a;
  --gold-bright:  #c89a2e;
  --gold-deep:    #7d5a10;
  --gold-glow:    rgba(166, 122, 26, 0.22);

  --indigo:       #1e3356;
  --indigo-bright:#3a5684;
  --indigo-soft:  rgba(30, 51, 86, 0.08);

  --sepia-hi:     #efd99a;
  --rise:         #2d8a3c;
  --decline:      #bb2f1b;

  /* typography */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body:    "EB Garamond", "Iowan Old Style", Georgia, serif;
  --font-ui:      "IBM Plex Sans", -apple-system, "Helvetica Neue", sans-serif;

  /* layout */
  --max-w:        1180px;
  --gutter:       28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at top, var(--paper-warm) 0%, var(--paper) 45%, var(--paper-deep) 120%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* Paper grain — layered SVG noise at fixed position */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.38;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' seed='11' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.05 0 0 0 0 0.02 0 0 0 0.14 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ==================================================================
   MASTHEAD
   ================================================================== */

.masthead {
  padding: 56px 0 36px;
  position: relative;
}

.masthead-top {
  display: flex;
  justify-content: flex-end;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule-fine);
  margin-bottom: 36px;
  animation: fade-up 900ms 100ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.nameplate {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "SOFT" 60;
  font-weight: 900;
  font-size: clamp(51px, 9.3vw, 134px);   /* was clamp(76, 14vw, 200) — reduced 1/3 */
  line-height: 0.84;
  letter-spacing: -0.04em;
  text-align: center;
  color: var(--ink);
  animation: nameplate-in 1400ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.nameplate-zion {
  color: var(--gold);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

.nameplate-trend {
  display: inline-block;
  height: 0.82em;            /* match cap-height of the display type */
  width: auto;                /* preserve aspect ratio */
  margin-left: 0.04em;        /* tight like the next letter in a word */
  vertical-align: baseline;   /* image bottom sits on the text baseline */
  transform: translateY(0.05em); /* tiny nudge down so it doesn't float */
}

@keyframes nameplate-in {
  0%   { opacity: 0; transform: translateY(14px); letter-spacing: -0.008em; }
  100% { opacity: 1; transform: translateY(0);    letter-spacing: -0.04em; }
}

.standfirst {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(16px, 2.2vw, 21px);
  text-align: center;
  color: var(--ink-soft);
  margin-top: 26px;
  letter-spacing: 0.01em;
  animation: fade-up 1100ms 350ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.dedication {
  font-family: var(--font-body);
  font-size: clamp(23px, 2.7vw, 27px);    /* was (14, 1.6vw, 16) — increased 2/3 */
  font-weight: 700;
  text-align: center;
  color: var(--ink-soft);
  margin-top: 18px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
  animation: fade-up 1100ms 500ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.dedication strong { font-weight: 700; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rule-double {
  margin-top: 48px;
  height: 7px;
  border-top: 1.5px solid var(--rule);
  border-bottom: 0.5px solid var(--rule);
  animation: rule-draw 1300ms 500ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

@keyframes rule-draw {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* ==================================================================
   SHARED SECTION ATTRIBUTES
   ================================================================== */

.section-num {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 72;
  font-size: clamp(44px, 6vw, 64px);
  font-weight: 700;
  line-height: 0.9;
  color: var(--gold);
  font-style: italic;
  letter-spacing: -0.02em;
}

.section-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-top: 12px;
}

.ornament-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 auto 52px;
  max-width: 520px;
  color: var(--gold);
}

.ornament-rule::before,
.ornament-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule), transparent);
}

.ornament-rule span {
  font-size: 18px;
  line-height: 1;
  color: var(--gold);
  transform: translateY(-1px);
}

.ornament-rule.rr { color: var(--indigo); }
.ornament-rule.rr span { color: var(--indigo); }
.ornament-rule.rr::before,
.ornament-rule.rr::after { background: linear-gradient(90deg, transparent, var(--indigo-bright), transparent); }

/* ==================================================================
   SECTION I — Hero: table of contents
   ================================================================== */

.hero { padding: 52px 0 88px; }

.hero-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
}

.hero-legend {
  position: sticky;
  top: 36px;
  align-self: start;
}

.hero-caption {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-top: 32px;
}

.hero-caption-small {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--muted);
  margin-top: 14px;
  font-size: 15px;
}

.toc {
  list-style: none;
  counter-reset: toc-counter;
}

.toc-item {
  counter-increment: toc-counter;
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: baseline;
  gap: 20px;
  padding: 20px 0 22px;
  border-top: 1px solid var(--rule-fine);
  cursor: pointer;
  position: relative;
  transition: padding-left 350ms cubic-bezier(0.2, 0.7, 0.3, 1);
  animation: toc-in 750ms calc(var(--i) * 75ms + 650ms) cubic-bezier(0.25, 0.7, 0.3, 1) both;
}

.toc-item:first-child { border-top: none; }

@keyframes toc-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.toc-item::before {
  content: counter(toc-counter, upper-roman) ".";
  font-family: var(--font-display);
  font-variation-settings: "opsz" 42;
  font-size: 24px;
  color: var(--muted);
  font-style: italic;
  text-align: right;
  font-feature-settings: "lnum" 1;
  transition: color 300ms ease;
}

.toc-item:hover { padding-left: 6px; }
.toc-item:hover::before,
.toc-item.is-active::before { color: var(--gold); }

.toc-label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
}

.toc-label .term {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 72, "SOFT" 30;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.015em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 250ms ease;
}

.toc-item:hover .term,
.toc-item.is-active .term { color: var(--gold-deep); }

.toc-leaders {
  flex: 1;
  height: 1.25em;
  border-bottom: 1.5px dotted var(--muted-soft);
  margin: 0 8px 0.42em;
  transform-origin: left center;
  animation: leaders-draw 1000ms calc(var(--i) * 75ms + 950ms) cubic-bezier(0.3, 0.7, 0.3, 1) both;
  opacity: 0.7;
}

@keyframes leaders-draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.toc-count {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  font-feature-settings: "tnum" 1, "lnum" 1;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.toc-count strong {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 30;
  font-size: 19px;
  font-weight: 500;
  font-style: italic;
  color: var(--ink-soft);
  margin-right: 3px;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-legend { position: static; }
  .toc-item { grid-template-columns: 32px 1fr auto; gap: 12px; padding: 16px 0; }
  .toc-label .term { font-size: 26px; }
  .toc-leaders { display: none; }
}

/* ==================================================================
   TOP-30 RANKING VARIANT — denser than the old 10-term hero TOC,
   adds rise/decline arrow + impact % with hoverable tooltip.
   ================================================================== */

.toc.toc-top30 { counter-reset: toc-counter; }

.toc.toc-top30 .toc-item {
  grid-template-columns: 38px 1fr 96px 146px 190px;
  gap: 14px;
  padding: 7px 0 7px;
  align-items: center;
}

.toc.toc-top30 .toc-item::before {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.toc.toc-top30 .toc-label .term {
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 500;
  line-height: 1.1;
}

.toc.toc-top30 .toc-item:hover .term,
.toc.toc-top30 .toc-item.is-active .term { color: var(--gold-deep); }

/* merge badge — small star glyph for combined concepts */
.toc-merged {
  display: inline-block;
  font-size: 14px;
  color: var(--gold);
  margin-left: 6px;
  vertical-align: super;
  line-height: 1;
}

/* impact-change cell — fixed width, flex space-between so arrow is left
   and percentage is right. Border color matches the arrow direction. */
.toc-impact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 146px;                      /* fixed for left-edge alignment */
  padding: 5px 12px;
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.5);
  border: 1.5px solid var(--rule-fine);
  cursor: help;
  transition: all 200ms ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.toc-impact:hover {
  background: var(--paper-warm);
}

.toc-impact .arrow {
  font-size: 14px;                   /* larger triangle */
  line-height: 1;
  flex-shrink: 0;
}

/* Direction-specific colors — triangle AND border match */
.toc-impact.rise {
  border-color: var(--rise);
}
.toc-impact.rise .arrow {
  color: var(--rise);
}

.toc-impact.decline {
  border-color: var(--decline);
}
.toc-impact.decline .arrow {
  color: var(--decline);
}

.toc-impact .pct {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 24;
  font-style: italic;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
  flex-grow: 1;
}

.toc-rates {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  justify-self: end;
  white-space: nowrap;
}

/* Sparkline thumbnail — live mini-chart of the term's by_year data.
   Clicking it drills into the entry section, same as clicking the word. */
.toc-spark {
  display: block;
  width: 96px;
  height: 28px;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 180ms ease;
  justify-self: start;
}

.toc-spark:hover { opacity: 1; }

.toc-spark .spark-line {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toc-spark.rise .spark-line { stroke: var(--rise); }
.toc-spark.decline .spark-line { stroke: var(--decline); }

.toc-spark .spark-area {
  opacity: 0.18;
}
.toc-spark.rise .spark-area { fill: var(--rise); }
.toc-spark.decline .spark-area { fill: var(--decline); }

@media (max-width: 760px) {
  .toc.toc-top30 .toc-item {
    grid-template-columns: 28px 1fr 134px;
    gap: 8px 10px;
    padding: 8px 0 10px;
  }
  .toc-spark { display: none; }
  .toc-impact {
    width: 134px;
    font-size: 12px;
    padding: 5px 10px;
  }
  .toc-impact .pct { font-size: 14px; }
  .toc-impact .arrow { font-size: 13px; }
  .toc-rates { display: none; }
}

/* ==================================================================
   IMPACT-CHANGE HOVER TOOLTIP
   ================================================================== */

.impact-tooltip {
  position: fixed;
  z-index: 300;
  max-width: 420px;
  padding: 20px 22px 18px;
  background: var(--paper-warm);
  border: 1px solid var(--gold);
  box-shadow:
    0 0 0 4px var(--paper),
    0 8px 28px rgba(20, 16, 10, 0.18);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
}

.impact-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.impact-tooltip h4 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 32;
  font-size: 20px;
  font-weight: 600;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 4px;
}

.impact-tooltip .tip-metric {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 48;
  font-size: 28px;
  font-style: italic;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 12px;
}

.impact-tooltip .tip-metric .arrow {
  font-size: 18px;
  vertical-align: middle;
  margin-right: 6px;
}

.impact-tooltip .tip-metric.rise .arrow { color: var(--rise); }
.impact-tooltip .tip-metric.decline .arrow { color: var(--decline); }

.impact-tooltip .tip-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-top: 14px;
  margin-bottom: 4px;
}

.impact-tooltip .tip-label:first-child { margin-top: 0; }

.impact-tooltip .tip-values {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 24px;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  margin-bottom: 10px;
}

.impact-tooltip .tip-values span:nth-child(odd) {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12px;
}

.impact-tooltip .tip-values span:nth-child(even) {
  color: var(--ink);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
}

.impact-tooltip .tip-formula {
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
}

.impact-tooltip .tip-formula code {
  background: var(--sepia-hi);
  padding: 1px 5px;
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
}

.impact-tooltip .tip-rule {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rule-fine);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.impact-tooltip .tip-rule strong {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-deep);
  margin-right: 4px;
}

.impact-tooltip .tip-exclusion {
  margin-top: 6px;
  color: var(--decline);
  font-size: 12.5px;
  font-style: italic;
}

.impact-tooltip .tip-members {
  margin-top: 8px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--muted);
}

.impact-tooltip .tip-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--rule-fine);
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

/* ==================================================================
   SECTION II — The entry
   ================================================================== */

.entry {
  padding: 64px 0 88px;
  scroll-margin-top: 32px;
}

.entry-head {
  margin-bottom: 56px;
}

.entry-title {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 96, "SOFT" 60;
  font-size: clamp(39px, 6.5vw, 98px);      /* was clamp(78, 13vw, 196) — halved */
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-transform: capitalize;
  margin-top: 12px;
  transition: opacity 380ms ease, transform 380ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.entry-title.is-changing {
  opacity: 0;
  transform: translateY(6px);
}

.entry-meta {
  margin-top: 36px;
  display: flex;
  gap: 0;
  padding-top: 20px;
  border-top: 1.5px solid var(--rule);
  flex-wrap: wrap;
  align-items: stretch;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 40px 0 0;
}

.meta-item:first-child { padding-left: 0; }

.meta-rule {
  width: 1px;
  background: var(--rule-fine);
  margin: 4px 40px 4px 0;
  align-self: stretch;
}

.meta-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.meta-value {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 48;
  font-size: 34px;
  font-weight: 500;
  font-style: italic;
  color: var(--ink);
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: -0.005em;
}

@media (max-width: 620px) {
  .meta-item { padding-right: 24px; padding-bottom: 16px; }
  .meta-rule { display: none; }
}

/* --- chart panel ------------------------------------------------- */

.chart-panel {
  position: relative;
  margin-top: 40px;
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  padding: 44px 40px 28px;
  box-shadow:
    0 0 0 4px var(--paper),
    0 0 0 5px var(--rule-fine);
}

.chart-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--gold);
}
.chart-corner.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.chart-corner.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.chart-corner.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.chart-corner.br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.chart-wrap {
  position: relative;
  height: 360px;
  margin: 6px 0 18px;
}

.era-buttons {
  display: flex;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--rule-fine);
}

.era-buttons button {
  background: none;
  border: none;
  padding: 6px 18px 6px 0;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  cursor: pointer;
  transition: color 220ms ease;
  position: relative;
}

.era-buttons button + button { padding-left: 18px; }
.era-buttons button + button::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--rule-fine);
}

.era-buttons button:hover { color: var(--ink); }
.era-buttons button.active { color: var(--gold-deep); font-weight: 600; }

/* --- entry split: shifts + quotes -------------------------------- */

.entry-split {
  margin-top: 72px;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
}

.small-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 8px;
}

.dingbat {
  font-size: 22px;
  color: var(--gold);
  line-height: 1;
}

.small-head h3 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 48;
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  font-style: italic;
  letter-spacing: -0.01em;
}

.small-note {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule-fine);
}

/* shift list */
.shift-list { list-style: none; }

.shift-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-fine);
  align-items: baseline;
}

.shift-year {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 48;
  font-size: 34px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-style: italic;
}

.shift-text {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.shift-text .direction {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.shift-item.rise .direction { color: var(--rise); }
.shift-item.decline .direction { color: var(--decline); }

.shift-text .rate {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12px;
  font-feature-settings: "tnum" 1;
}

/* quote list */
.quote-list { list-style: none; counter-reset: quote-counter; }

.quote-item {
  counter-increment: quote-counter;
  padding: 32px 0 34px;
  border-bottom: 1px solid var(--rule-fine);
  position: relative;
}

.quote-item::before {
  content: counter(quote-counter, decimal-leading-zero);
  position: absolute;
  right: 0;
  top: 34px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted-soft);
}

.quote-attribution {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 14px;
}

.quote-attribution .year {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 36;
  font-size: 26px;
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: -0.01em;
  text-transform: none;
}

.quote-attribution .sep { color: var(--muted-soft); }

.quote-text {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.58;
  color: var(--ink);
  position: relative;
  padding-left: 38px;
}

.quote-text::before {
  content: "\201C";
  position: absolute;
  left: -4px;
  top: -18px;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-size: 96px;
  color: var(--gold-bright);
  line-height: 1;
  font-style: italic;
  font-weight: 700;
}

.quote-text em {
  font-style: italic;
  background: linear-gradient(180deg, transparent 55%, var(--sepia-hi) 55%, var(--sepia-hi) 92%, transparent 92%);
  padding: 0 1px;
  font-weight: 500;
}

@media (max-width: 900px) {
  .entry-split { grid-template-columns: 1fr; gap: 52px; }
  .chart-panel { padding: 36px 20px 22px; }
  .quote-text { font-size: 18px; padding-left: 30px; }
}

/* ==================================================================
   SECTION III — The reading room
   ================================================================== */

.reading-room {
  padding: 56px 0 60px;
  margin-top: 24px;
  position: relative;
  background:
    linear-gradient(180deg,
      transparent 0,
      rgba(30, 51, 86, 0.03) 20%,
      rgba(30, 51, 86, 0.06) 100%);
  border-top: 1px solid var(--rule);
}

.reading-room::before,
.reading-room::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, var(--indigo-bright) 50%, transparent 95%);
  opacity: 0.3;
}
.reading-room::before { top: 8px; }
.reading-room::after  { bottom: 8px; }

.rr-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.rr-head .section-num {
  color: var(--indigo);
}

.rr-title {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 96, "SOFT" 40;
  font-size: clamp(42px, 7vw, 84px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-style: italic;
  margin-top: 18px;
}

.rr-caption {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-top: 22px;
  font-style: italic;
  max-width: 640px;
}

/* Word picker: CSS multi-column layout, 6 columns that fill
   top-to-bottom. Compact — designed so both the picker and the
   compare chart fit on a standard desktop viewport without scroll. */
.rr-picker {
  column-count: 6;
  column-gap: 28px;
  column-fill: balance;
  padding: 20px 0;
  border-top: 1.5px solid var(--indigo-bright);
  border-bottom: 1.5px solid var(--indigo-bright);
  margin-bottom: 32px;
  position: relative;
}

.rr-picker .rr-chip {
  break-inside: avoid;
}

.rr-picker::before,
.rr-picker::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--indigo-soft);
}
.rr-picker::before { top: 4px; }
.rr-picker::after { bottom: 4px; }

/* Word picker: plain hyperlinks, compact for 6-column layout. */
.rr-chip {
  display: block;
  background: none;
  border: none;
  padding: 2px 0 2px 12px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--ink-soft);
  cursor: pointer;
  position: relative;
  transition: color 160ms ease;
  border-bottom: 1px dotted transparent;
}

.rr-chip::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  background: transparent;
  border: 1px solid var(--rule);
  transform: translateY(-50%);
  transition: all 180ms ease;
}

.rr-chip:hover {
  color: var(--indigo);
}

.rr-chip:hover::before {
  border-color: var(--indigo);
}

.rr-chip.is-on {
  color: var(--indigo);
  font-weight: 500;
}

.rr-chip.is-on::before {
  background: var(--pip-color, var(--indigo));
  border-color: var(--pip-color, var(--indigo));
}

@media (max-width: 980px) {
  .rr-picker {
    column-count: 3;
    column-gap: 28px;
  }
}

@media (max-width: 640px) {
  .rr-picker {
    column-count: 2;
    column-gap: 20px;
  }
  .rr-chip { font-size: 15px; }
}

.rr-empty {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  text-align: center;
  padding: 64px 20px;
  border: 1px dashed var(--rule);
}

.rr-chart-wrap {
  position: relative;
  background: var(--paper-warm);
  border: 1.5px solid var(--indigo-bright);
  padding: 28px 32px 24px;
  height: 380px;
  box-shadow:
    0 0 0 4px var(--paper),
    0 0 0 5px var(--indigo-soft);
}

.rr-chart-wrap::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(30, 51, 86, 0.18);
  pointer-events: none;
}

.rr-empty-hint {
  display: none;
}

@media (max-width: 720px) {
  .rr-chart-wrap { padding: 32px 16px 16px; height: 420px; }
}

/* ==================================================================
   COLOPHON
   ================================================================== */

.colophon {
  padding: 96px 0 88px;
  border-top: 1px solid var(--rule);
  background:
    linear-gradient(180deg, transparent, rgba(125, 90, 16, 0.05));
  margin-top: 48px;
}

.colophon-mark {
  text-align: center;
  font-size: 18px;
  color: var(--gold);
  margin-bottom: 26px;
}

.colophon-motto {
  text-align: center;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 680px;
  margin: 0 auto 64px;
  line-height: 1.55;
}

.colophon-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1.4fr;
  gap: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--rule-fine);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.colophon-grid p { max-width: 44ch; }

.colophon-grid .col-head {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink);
  margin-bottom: 10px;
  max-width: none;
}

@media (max-width: 760px) {
  .colophon-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ==================================================================
   UTILITIES
   ================================================================== */

::selection {
  background: var(--gold-glow);
  color: var(--ink);
}
