/* ════════════════════════════════════════════════════════════════
   Volumes — Marketing Site Styles
   Builds on colors_and_type.css. Editorial, paper-plane sensibility.
   ──────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--on-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Layout primitives ───────────────────────────────── */
.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}
.wrap-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .wrap, .wrap-narrow { padding: 0 24px; }
}

/* Section rhythm */
.section { padding: 96px 0; }
.section-lg { padding: 144px 0; }
.section-sm { padding: 56px 0; }
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .section-lg { padding: 88px 0; }
}

/* Density tweak */
[data-density="airy"] .section { padding: 128px 0; }
[data-density="airy"] .section-lg { padding: 176px 0; }
[data-density="tight"] .section { padding: 64px 0; }
[data-density="tight"] .section-lg { padding: 96px 0; }

/* ── Top bar ─────────────────────────────────────────── */
.site-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(0);  /* no blur — just stable bg */
  border-bottom: 1px solid var(--divider);
}
.site-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.wordmark {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--on-bg);
  display: flex;
  align-items: center;
  gap: 14px;
}
.wordmark .dot {
  width: 10px; height: 10px;
  background: var(--primary);
  border-radius: 1px;
  display: inline-block;
}
.site-nav {
  display: flex;
  gap: 36px;
  align-items: center;
}
.site-nav a {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--on-surface-muted);
  letter-spacing: 0.01em;
  position: relative;
  padding: 4px 0;
  transition: color var(--dur-state) var(--ease-paper);
}
.site-nav a:hover { color: var(--on-bg); }
.site-nav a.active {
  color: var(--on-bg);
}
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--primary);
}
.site-nav-cta {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-paper);
  letter-spacing: 0.02em;
  transition: transform 80ms var(--ease-paper), background 120ms var(--ease-paper);
}
.site-nav-cta:hover { transform: translateY(-1px); background: var(--primary-deep, var(--primary)); }
@media (max-width: 880px) {
  .site-nav { gap: 22px; }
  .site-nav .hide-md { display: none; }
}
@media (max-width: 640px) {
  .site-nav .hide-sm { display: none; }
  .wordmark { font-size: 14px; letter-spacing: 0.22em; }
}

/* ── Type helpers ────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--primary);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--primary);
}
.section-marker {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 13px;
  color: var(--primary);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.display-xl {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1.04;
  letter-spacing: -0.012em;
  color: var(--on-bg);
  margin: 0;
  text-wrap: balance;
}
.display-xl em {
  font-style: italic;
  color: var(--primary);
  font-weight: 400;
}
.display-l {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.008em;
  color: var(--on-bg);
  margin: 0;
  text-wrap: balance;
}
.display-l em { font-style: italic; color: var(--primary); }
.display-m {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.16;
  color: var(--on-bg);
  margin: 0;
  text-wrap: balance;
}
.lede {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.5;
  color: var(--on-surface-muted);
  text-wrap: pretty;
  margin: 0;
}
.body-l {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--on-surface);
  text-wrap: pretty;
}
.body-m {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--on-surface-muted);
  text-wrap: pretty;
}
.smallcaps {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  font-weight: 600;
}

/* ── Buttons (site-level) ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: var(--radius-paper);
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: transform 80ms var(--ease-paper), background 150ms var(--ease-paper);
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-1);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn-primary:active { transform: scale(0.98); }
.btn-ghost {
  background: transparent;
  color: var(--on-bg);
  border: 1.5px solid var(--outline);
}
.btn-ghost:hover { background: var(--surface-variant); }
.btn-link {
  background: none;
  color: var(--primary);
  padding: 8px 0;
  border-bottom: 1px solid var(--primary);
  border-radius: 0;
}

/* ── Paper card (web-context) ────────────────────────── */
.paper-card {
  background: var(--surface);
  border-radius: var(--radius-paper);
  box-shadow: var(--shadow-1);
  padding: 32px;
}
.paper-card.raised { box-shadow: var(--shadow-2); }
.paper-card.floating { box-shadow: var(--shadow-3); }

/* ── Hero geometric paper-planes (Ben Nicholson-style) ─ */
.geom-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.geom-bg svg {
  position: absolute;
  width: 100%;
  height: 100%;
}
.hero-content { position: relative; z-index: 1; }

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--divider);
  padding: 64px 0 48px 0;
  background: var(--surface-variant);
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 720px) {
  .site-footer .cols { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.site-footer h5 {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  margin: 0 0 16px 0;
  font-weight: 600;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--on-surface);
  transition: color var(--dur-state) var(--ease-paper);
}
.site-footer a:hover { color: var(--primary); }
.site-footer .colophon {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 32px;
  border-top: 1px solid var(--divider);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--on-surface-muted);
}
.site-footer .colophon-tagline {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-bg);
}

/* ── Rule (decorative hairline) ──────────────────────── */
.hr {
  border: none;
  height: 1px;
  background: var(--divider);
  margin: 0;
}

/* ── Two-up grid ─────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.grid-2.flip { direction: rtl; }
.grid-2.flip > * { direction: ltr; }
@media (max-width: 880px) {
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 880px) {
  .grid-3 { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Phone screenshot frame (site-scaled) ────────────── */
.site-phone {
  width: 360px;
  margin: 0 auto;
  filter: drop-shadow(0 30px 50px rgba(0,0,0,0.18)) drop-shadow(0 12px 20px rgba(0,0,0,0.10));
}
.site-phone .phone-shell {
  width: 360px;
  height: 720px;
  box-shadow: none;
}
.site-phone .reader-word { font-size: 36px; padding: 0 16px; }
.site-phone .vol-tab {
  font-size: 9px;
  letter-spacing: 0.08em;
}
.site-phone .vol-screen::-webkit-scrollbar { width: 0; height: 0; }
.site-phone .vol-screen { scrollbar-width: none; }

/* ── Pull quote ──────────────────────────────────────── */
.pullquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.4;
  color: var(--on-bg);
  text-wrap: balance;
  border-left: 2px solid var(--primary);
  padding-left: 32px;
  margin: 0;
}
.pullquote cite {
  display: block;
  margin-top: 16px;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 13px;
  color: var(--on-surface-muted);
  letter-spacing: 0.04em;
}

/* ── eWPM equation block ─────────────────────────────── */
.ewpm-eq {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 28px);
  color: var(--on-bg);
  flex-wrap: wrap;
}
.ewpm-eq .term {
  background: var(--surface);
  padding: 8px 18px;
  border-radius: var(--radius-paper);
  box-shadow: var(--shadow-1);
  font-style: normal;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
}
.ewpm-eq .op { color: var(--primary); font-style: normal; font-family: var(--font-sans); font-weight: 400; }

/* ── Stats list ──────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stats > div {
  padding: 24px 16px;
  border-right: 1px solid var(--divider);
}
.stats > div:last-child { border-right: none; }
.stats .num {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(36px, 4vw, 48px);
  font-variant-numeric: tabular-nums;
  color: var(--on-bg);
  line-height: 1;
  letter-spacing: -0.01em;
}
.stats .num em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.55em;
  color: var(--primary);
  margin-left: 4px;
  vertical-align: middle;
}
.stats .lab {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--on-surface-muted);
  margin-top: 12px;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div:nth-child(2) { border-right: none; }
  .stats > div { border-bottom: 1px solid var(--divider); }
  .stats > div:nth-last-child(-n+2) { border-bottom: none; }
}

/* ── Room card (web-style for landing) ───────────────── */
.room-card {
  background: var(--surface);
  border-radius: var(--radius-paper);
  box-shadow: var(--shadow-1);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  transition: transform 200ms var(--ease-paper), box-shadow 200ms var(--ease-paper);
}
.room-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.room-card .marker {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
}
.room-card h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
  margin: 0;
  color: var(--on-bg);
}
.room-card p {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--on-surface-muted);
  margin: 0;
  flex: 1;
}
.room-card .badge {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  border: 1px solid var(--outline);
  padding: 3px 8px;
  border-radius: 999px;
  align-self: flex-start;
}

/* ── Feature row (text + visual) ─────────────────────── */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 80px 0;
  border-bottom: 1px solid var(--divider);
}
.feature-row:last-child { border-bottom: none; }
.feature-row.flip > .feature-text { order: 2; }
@media (max-width: 880px) {
  .feature-row { grid-template-columns: 1fr; gap: 48px; padding: 56px 0; }
  .feature-row.flip > .feature-text { order: unset; }
}
.feature-text .num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--primary);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.feature-text h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(32px, 3.6vw, 44px);
  line-height: 1.1;
  margin: 0 0 20px 0;
  color: var(--on-bg);
  text-wrap: balance;
}
.feature-text p {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-surface);
  margin: 0 0 16px 0;
  max-width: 480px;
  text-wrap: pretty;
}
.feature-text ul {
  margin: 16px 0 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-text ul li {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--on-surface);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}
.feature-text ul li::before {
  content: "·";
  position: absolute;
  left: 4px;
  top: 0;
  color: var(--primary);
  font-size: 28px;
  line-height: 1;
}

/* ── Editorial article-style block ───────────────────── */
.article {
  max-width: 680px;
  margin: 0 auto;
}
.article > h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
  color: var(--on-bg);
  margin: 56px 0 16px 0;
  text-wrap: balance;
}
.article > h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 20px;
  color: var(--on-bg);
  margin: 32px 0 12px 0;
}
.article p {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--on-surface);
  margin: 0 0 18px 0;
  text-wrap: pretty;
}
.article p.dropcap::first-letter {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 64px;
  float: left;
  line-height: 0.9;
  padding: 4px 12px 0 0;
  color: var(--primary);
}
.article hr.fleuron {
  border: none;
  text-align: center;
  margin: 48px 0;
}
.article hr.fleuron::before {
  content: "❦";
  font-family: var(--font-serif);
  color: var(--primary);
  font-size: 22px;
}
.article blockquote {
  margin: 32px 0;
  padding: 0 0 0 24px;
  border-left: 2px solid var(--primary);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.5;
  color: var(--on-bg);
}

/* ── Page header ─────────────────────────────────────── */
.page-header {
  padding: 96px 0 64px 0;
  border-bottom: 1px solid var(--divider);
}
.page-header .marker {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 24px;
  display: block;
}
.page-header h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.05;
  margin: 0 0 24px 0;
  color: var(--on-bg);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.page-header h1 em { color: var(--primary); }
.page-header p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.5;
  color: var(--on-surface-muted);
  max-width: 640px;
  margin: 0;
  text-wrap: pretty;
}

/* ── Sparkline visual (large editorial) ──────────────── */
.spark-large {
  width: 100%;
  height: 200px;
  display: block;
}

/* ── Floating tweaks compatibility ────────────────────── */
[data-theme="dark"] .site-bar {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

/* Subtle paper tint on bg between sections */
.tinted { background: var(--surface-variant); }

/* small badge inline */
.inline-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  border: 1px solid var(--outline);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}

/* Number list (numbered editorial) */
.num-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.num-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--divider);
  align-items: baseline;
}
.num-list li:last-child { border-bottom: none; }
.num-list .num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--primary);
  font-weight: 400;
}
.num-list h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 8px 0;
  color: var(--on-bg);
  line-height: 1.2;
}
.num-list p {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--on-surface-muted);
  margin: 0;
  max-width: 540px;
}

/* ── Curated text card ───────────────────────────────── */
.curated-card {
  background: var(--surface);
  border-radius: var(--radius-paper);
  box-shadow: var(--shadow-1);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 200ms var(--ease-paper), box-shadow 200ms var(--ease-paper);
}
.curated-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.curated-card .cover {
  aspect-ratio: 3 / 4;
  background: var(--pale-cream);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,.10), 0 4px 10px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .curated-card .cover {
  background: var(--medium-charcoal);
}
.curated-card .cover h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.1;
  margin: 0;
  color: var(--rich-black);
  text-wrap: balance;
}
[data-theme="dark"] .curated-card .cover h4 { color: var(--warm-cream); }
.curated-card .cover .author {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--warm-grey);
}
.curated-card .cover .ornament {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-serif);
  font-size: 32px;
  color: rgba(139, 0, 0, 0.18);
}
[data-theme="dark"] .curated-card .cover .ornament { color: rgba(212, 175, 55, 0.20); }
.curated-card .meta {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--on-surface-muted);
  display: flex;
  justify-content: space-between;
}
.curated-card .title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.2;
  color: var(--on-bg);
  margin: 0;
}
.curated-card .author-line {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--on-surface-muted);
  margin: 0;
}

/* ── Comparison table ────────────────────────────────── */
.compare {
  width: 100%;
  border-collapse: collapse;
  margin-top: 32px;
}
.compare th, .compare td {
  padding: 18px 20px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 15px;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}
.compare thead th {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 18px;
  color: var(--on-bg);
  letter-spacing: 0;
  padding-bottom: 14px;
}
.compare thead th:first-child { font-style: italic; color: var(--on-surface-muted); font-size: 13px; }
.compare tbody th {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: 30%;
}
.compare td {
  color: var(--on-surface);
  line-height: 1.5;
}
.compare td.them { color: var(--on-surface-muted); }
.compare td.us {
  color: var(--on-bg);
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

/* Hero column flex */
.hero-flex {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 880px) {
  .hero-flex { grid-template-columns: 1fr; gap: 48px; }
}

/* Decorative book spine list */
.spines {
  display: flex;
  gap: 6px;
  height: 180px;
  align-items: flex-end;
  margin-top: 32px;
}
.spine {
  flex: 1;
  background: var(--surface);
  border-radius: 2px 2px 0 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.06);
  padding: 14px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--on-surface);
  text-align: center;
}

/* ── Responsive tweaks panel keeps clear of nav ──────── */

/* Sparkline mini */
.mini-spark { display: inline-block; vertical-align: middle; }

/* Print-style index (for science page) */
.index-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--divider);
}
.index-list li {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
  align-items: baseline;
  font-family: var(--font-sans);
  font-size: 15px;
}
.index-list li .n {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--primary);
  font-size: 14px;
}
.index-list li .pg {
  font-variant-numeric: tabular-nums;
  color: var(--on-surface-muted);
  font-size: 13px;
}

/* hover for index */
.index-list li a {
  color: var(--on-bg);
  display: contents;
}
.index-list li:hover .pg { color: var(--primary); }

/* ── Legal article (privacy / terms) ─────────────────── */
.legal {
  max-width: 720px;
  margin: 0 auto;
}
.legal .doc-meta {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--on-surface-muted);
  margin: 0 0 56px 0;
  padding: 16px 0;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.legal .doc-meta span strong {
  display: block;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.legal .doc-meta span {
  color: var(--on-bg);
}
.legal section.s {
  margin: 0 0 48px 0;
}
.legal h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 32px);
  line-height: 1.2;
  color: var(--on-bg);
  margin: 56px 0 20px 0;
  text-wrap: balance;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.legal h2 .n {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.65em;
  color: var(--primary);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.legal h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 21px;
  line-height: 1.3;
  color: var(--on-bg);
  margin: 32px 0 12px 0;
}
.legal p {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--on-surface);
  margin: 0 0 16px 0;
  text-wrap: pretty;
}
.legal p strong { font-weight: 600; color: var(--on-bg); }
.legal p em { font-style: italic; }
.legal a.legal-link {
  color: var(--primary);
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
  transition: border-color var(--dur-state) var(--ease-paper);
}
.legal a.legal-link:hover { border-bottom-color: var(--primary); }
.legal ol.lettered, .legal ol.numbered, .legal ul.plain {
  margin: 8px 0 18px 0;
  padding: 0 0 0 28px;
  list-style: none;
  counter-reset: lettered;
}
.legal ol.lettered li, .legal ol.numbered li, .legal ul.plain li {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--on-surface);
  margin: 0 0 10px 0;
  position: relative;
  text-wrap: pretty;
}
.legal ol.lettered > li {
  counter-increment: lettered;
}
.legal ol.lettered > li::before {
  content: "(" counter(lettered, lower-alpha) ")";
  position: absolute;
  left: -28px;
  font-variant-numeric: tabular-nums;
  color: var(--on-surface-muted);
}
.legal ol.numbered > li {
  list-style: decimal;
  margin-left: 4px;
}
.legal ul.plain > li::before {
  content: "·";
  position: absolute;
  left: -16px;
  color: var(--primary);
  font-size: 22px;
  line-height: 1;
  top: 0;
}
.legal .definition {
  display: block;
  margin: 0 0 14px 0;
}
.legal .definition strong {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--on-bg);
  margin-right: 6px;
}
.legal .callout {
  background: var(--surface);
  border-left: 2px solid var(--primary);
  padding: 16px 20px;
  margin: 20px 0 24px 0;
  border-radius: 0 var(--radius-paper) var(--radius-paper) 0;
}
.legal .callout p { margin: 0; color: var(--on-bg); }
.legal hr.fleuron {
  border: none;
  text-align: center;
  margin: 56px 0;
}
.legal hr.fleuron::before {
  content: "❦";
  font-family: var(--font-serif);
  color: var(--primary);
  font-size: 22px;
}
.legal .colophon {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--on-surface-muted);
}
