/* TrumpsBook — publisher's catalogue: forest cloth, parchment stock, wood rail (pass 3) */

:root {
  /* parchment stock */
  --paper: #f2ead9;
  --paper-deep: #e7dcc5;
  --paper-edge: #d3c5a7;
  /* cool ink */
  --ink: #16222c;
  --ink-soft: #364651;
  --ink-muted: #55626b;
  /* forest bookcloth — masthead, primary action */
  --forest: #1e4a3b;
  --forest-deep: #153a2d;
  --forest-lift: #2b5f4c;
  --on-forest: #f2ead9;
  --on-forest-soft: #cfdccf;
  /* teal — links, focus */
  --teal: #1b5f78;
  --teal-deep: #114658;
  --teal-pale: #a9d6dc;
  /* vermilion — marks, years */
  --vermilion: #c9432b;
  --vermilion-ink: #ad351f;
  /* wood — shelf rail */
  --wood: #5c3d26;
  --wood-light: #8b6644;
  --wood-dark: #3b2615;
  /* brass — tertiary metal, hairlines on cloth only */
  --brass: #b08d3e;
  --brass-light: #dcbb6a;
  /* slate — footer */
  --slate: #1a2a38;
  --on-slate: #dde3e4;
  --on-slate-muted: #a3b3bd;

  --shadow-book: 0 1px 1px rgba(46, 30, 14, 0.28), 0 12px 16px -9px rgba(46, 30, 14, 0.55);
  --shadow-book-lift: 0 1px 1px rgba(46, 30, 14, 0.24), 0 22px 22px -12px rgba(46, 30, 14, 0.5);
  --max: 70rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --cell-pad: clamp(0.6rem, 1.6vw, 1.25rem);
  --font-display: "Spectral", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 17px;
  scroll-behavior: smooth;
  scrollbar-color: var(--forest) var(--paper-deep);
  caret-color: var(--teal);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { flex: 1 0 auto; }

::selection {
  background: var(--teal);
  color: var(--paper);
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 160ms var(--ease);
}
a:hover { color: var(--vermilion-ink); }
a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  z-index: 30;
  padding: 0.45rem 0.75rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 2px;
}
.skip-link:focus { top: 0.75rem; }

/* —— masthead (forest cloth) —— */
.masthead {
  background: var(--forest);
  color: var(--on-forest);
}
.masthead a:focus-visible { outline-color: var(--brass-light); }

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
  padding-top: 1.2rem;
  padding-bottom: 1.05rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--on-forest);
  text-decoration: none;
}
.wordmark span {
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.01em;
  color: var(--brass-light);
}
.wordmark:hover { color: var(--on-forest); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  font-size: 0.88rem;
  font-weight: 500;
}
.nav a {
  color: var(--on-forest-soft);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.nav a:hover { color: var(--on-forest); border-bottom-color: var(--on-forest-soft); }
.nav a[aria-current="page"] {
  color: var(--on-forest);
  border-bottom-color: var(--brass-light);
}

/* —— hero: type only —— */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 2rem clamp(2rem, 6vw, 5rem);
  align-items: end;
  padding-top: clamp(2rem, 5vw, 3.75rem);
  padding-bottom: clamp(2.25rem, 5vw, 4rem);
}
.hero-rule {
  height: 1px;
  background: var(--brass);
  opacity: 0.55;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 6.1vw, 4.5rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--brass-light);
}

.hero .lede {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.55;
  color: var(--on-forest);
  max-width: 34ch;
}
.disclaimer {
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(242, 234, 217, 0.22);
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--on-forest-soft);
  max-width: 40ch;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  .hero .lede, .disclaimer { max-width: 46ch; }
}

/* headband — the multi-hue thread at the head of the spine */
.headband {
  height: 7px;
  background: linear-gradient(
    90deg,
    var(--vermilion) 0 34%,
    var(--brass) 34% 45%,
    var(--teal) 45% 78%,
    var(--wood) 78% 100%
  );
}

/* —— affiliate disclosure line (precedes first Amazon link) —— */
.disclosure-line {
  background: var(--paper-deep);
  border-bottom: 1px solid var(--paper-edge);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.disclosure-line p {
  margin-block: 0;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}
.disclosure-line a { font-weight: 600; }

/* —— sections —— */
.section { padding-top: clamp(2.75rem, 6vw, 4.25rem); }
.rules-band .section { padding-bottom: clamp(3rem, 7vw, 5rem); }
.shelf-grid { padding-bottom: clamp(0.5rem, 2vw, 1.5rem); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  flex-wrap: wrap;
  margin: 0 0 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--ink);
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.section-head .aside {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.section-intro {
  margin: 0;
  max-width: 62ch;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

/* —— shelf: jackets stand on a wood rail —— */
.shelf-grid,
.start-grid {
  display: grid;
  margin: 0 calc(var(--cell-pad) * -1);
}
.shelf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.start-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.entry {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 1.1rem;
  padding: 2rem var(--cell-pad) 10px;
}
/* the rail: butts against its neighbours so each row reads as one board */
.stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  background: linear-gradient(180deg, var(--wood-light) 0 2px, var(--wood) 2px 8px, var(--wood-dark) 8px);
  box-shadow: 0 9px 12px -7px rgba(46, 30, 14, 0.5);
}

.cover {
  display: flex;
  align-items: flex-end;
  flex: 0 0 auto;
  max-width: 100%;
  transform-origin: 50% 100%;
  transition: transform 320ms var(--ease);
}
.cover img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  border-radius: 1px 2px 2px 1px;
  box-shadow: var(--shadow-book);
  transition: box-shadow 320ms var(--ease);
}
.shelf-grid .stage { height: 17rem; }
.shelf-grid .cover { height: 100%; }
.shelf-grid .cover img { max-height: 100%; }

.entry:hover .cover,
.entry:focus-within .cover { transform: translateY(-5px); }
.entry:hover .cover img,
.entry:focus-within .cover img { box-shadow: var(--shadow-book-lift); }

.cover--placeholder {
  width: 9rem;
  aspect-ratio: 2 / 3;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  text-align: center;
  border: 1px dashed var(--ink-muted);
  background: var(--paper-deep);
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.entry-copy { padding: 0.95rem var(--cell-pad) 2.1rem; }
.entry h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.012em;
  text-wrap: balance;
  transition: color 160ms var(--ease);
}
.entry:hover h3 { color: var(--teal-deep); }
.entry .meta {
  margin: 0 0 0.6rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--ink-muted);
}
.entry .year {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--vermilion-ink);
}

/* Start here: larger jacket, copy stands beside it on the same rail */
.start-grid { margin-top: 0.5rem; }
.start-grid .stage {
  flex: 1;
  padding-top: 1.75rem;
}
.start-grid .stage { gap: 1rem; }
.start-grid .cover { max-width: 9.5rem; }
.start-grid .cover img { max-height: 14rem; }
.start-grid .entry-copy {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 0 1.1rem;
}
.start-grid .entry h3 { font-size: 1.28rem; }

@media (max-width: 1250px) {
  .start-grid .cover { max-width: 8.25rem; }
  .start-grid .cover img { max-height: 12.5rem; }
}
@media (max-width: 1100px) {
  .start-grid { grid-template-columns: 1fr; }
  .start-grid .cover { max-width: 8.5rem; }
  .start-grid .stage { gap: 1.4rem; }
}
@media (max-width: 1040px) {
  .shelf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .shelf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf-grid .stage { height: 13.5rem; padding-top: 1.25rem; }
  .entry-copy { padding-bottom: 1.5rem; }
  .entry h3 { font-size: 1.04rem; }
}

@media (max-width: 380px) {
  .start-grid .cover { max-width: 6.25rem; }
  .start-grid .stage { gap: 0.9rem; }
}

/* —— Amazon actions —— */
.buy {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
/* whole entry is the target; the link text stays the accessible name */
.buy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.buy svg {
  width: 0.95em;
  height: 0.95em;
  flex: none;
  transition: transform 240ms var(--ease);
}
.entry:hover .buy svg { transform: translateX(3px); }
.buy:focus-visible { outline-offset: 4px; }

.shelf-grid .buy {
  color: var(--teal);
  padding: 0.15rem 0;
  border-bottom: 1px solid currentColor;
}
.shelf-grid .entry:hover .buy { color: var(--teal-deep); }

.start-grid .buy {
  padding: 0.6rem 0.75rem;
  font-size: 0.82rem;
  white-space: nowrap;
  color: var(--on-forest);
  background: var(--forest);
  border-radius: 3px;
  transition: background 160ms var(--ease);
}
.start-grid .entry:hover .buy,
.start-grid .buy:focus-visible { background: var(--forest-deep); color: var(--on-forest); }

.tbd {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.loading {
  grid-column: 1 / -1;
  margin: 1.5rem var(--cell-pad);
  color: var(--ink-muted);
  font-size: 0.95rem;
}

/* —— how we list —— */
.rules-band {
  background: var(--paper-deep);
  border-top: 1px solid var(--paper-edge);
}
.rules-band .section { padding-top: clamp(2.5rem, 5vw, 3.5rem); }
.rules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem clamp(1.25rem, 3vw, 2.5rem);
  margin: 1.5rem 0 0;
}
.rules div { min-width: 0; }
.rules dt {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--forest);
}
.rules dd {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
@media (max-width: 900px) {
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .rules { grid-template-columns: 1fr; gap: 1.15rem; }
}

/* —— prose pages —— */
.prose {
  max-width: 40rem;
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem);
}
.prose h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.prose .sub {
  margin: 0 0 1.9rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--ink);
  color: var(--ink-muted);
  font-size: 1rem;
}
.prose p {
  margin: 0 0 1.05rem;
  color: var(--ink-soft);
  line-height: 1.65;
}
.prose a { font-weight: 600; }

/* —— footer (slate) —— */
.site-footer {
  background: var(--slate);
  color: var(--on-slate-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 3rem;
  padding-top: 2rem;
  padding-bottom: 2.25rem;
}
.site-footer p { margin: 0.25rem 0; max-width: 60ch; }
.site-footer .lead { color: var(--on-slate); }
.site-footer a { color: var(--teal-pale); }
.site-footer a:hover { color: var(--on-slate); }
.site-footer a:focus-visible { outline-color: var(--teal-pale); }
.site-footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-weight: 500;
}

/* —— title links on shelf (to /books/{slug}/) —— */
.title-link {
  color: inherit;
  text-decoration: none;
}
.title-link:hover { color: var(--teal-deep); }
.cover[href] { text-decoration: none; color: inherit; }
/* Amazon CTA is explicit only — do not paint the whole card as the buy hit-target */
.buy::before { content: none; display: none; }

/* —— noscript / static bibliography —— */
.static-shelf {
  margin: 1.25rem 0 0;
  padding: 0 0 0 1.25rem;
  max-width: 48rem;
  color: var(--ink-soft);
  line-height: 1.65;
}
.static-shelf li { margin-bottom: 0.45rem; }
.static-shelf a { font-weight: 600; }

/* —— book detail pages —— */
.book-page {
  padding-top: 1.5rem;
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0 0 1.5rem;
  font-size: 0.86rem;
  color: var(--ink-muted);
}
.crumb a { font-weight: 600; }

.book-layout {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: start;
}
.book-cover img {
  display: block;
  width: 100%;
  max-width: 14rem;
  height: auto;
  border-radius: 1px 2px 2px 1px;
  box-shadow: var(--shadow-book);
}
.book-copy h1 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.2vw, 2.75rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.book-meta {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.book-meta .year {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--vermilion-ink);
}
.book-meta .dot { margin: 0 0.35rem; color: var(--ink-muted); }
.book-lane {
  margin: 0 0 1.1rem;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--forest);
}
.book-blurb p {
  margin: 0 0 0.95rem;
  max-width: 52ch;
  color: var(--ink-soft);
  line-height: 1.65;
}
.book-notes {
  margin: 0 0 1.25rem;
  max-width: 52ch;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.book-notes .label { font-weight: 600; color: var(--ink-soft); }

.buy--page {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.05rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--on-forest);
  background: var(--forest);
  text-decoration: none;
  border-radius: 3px;
  transition: background 160ms var(--ease);
}
.buy--page:hover,
.buy--page:focus-visible {
  background: var(--forest-deep);
  color: var(--on-forest);
}
.book-cta { margin: 0 0 0.75rem; }
.book-cta-pending { margin: 0 0 0.75rem; }

.cta-disclosure {
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.9rem;
  max-width: 52ch;
  background: var(--paper-deep);
  border: 1px solid var(--paper-edge);
  border-radius: 2px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.cta-disclosure p { margin: 0; }
.cta-disclosure a { font-weight: 600; }
.book-independence {
  margin: 0;
  max-width: 52ch;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.related { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.related-list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}
.related-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--paper-edge);
  font-size: 1rem;
}
.related-list a { font-weight: 600; font-family: var(--font-display); }
.rel-meta { color: var(--ink-muted); font-size: 0.9rem; }

@media (max-width: 720px) {
  .book-layout { grid-template-columns: 1fr; }
  .book-cover img { max-width: 11rem; }
}

/* —— compare hub —— */
.compare-page {
  padding-top: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
.compare-intro h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.compare-intro .sub {
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ink);
  color: var(--ink-muted);
  font-size: 1.02rem;
}
.compare-intro p {
  margin: 0 0 1rem;
  max-width: 62ch;
  color: var(--ink-soft);
  line-height: 1.65;
}

.lane {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
}
.lane h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.7rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--forest);
}
.lane-ed {
  margin: 0 0 1rem;
  max-width: 62ch;
  font-size: 0.96rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--paper-edge);
  border-radius: 2px;
  background: var(--paper);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.compare-table th,
.compare-table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--paper-edge);
}
.compare-table th {
  background: var(--paper-deep);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--forest);
  white-space: nowrap;
}
.compare-table tr:last-child td { border-bottom: none; }
/* Year column — only on era/lane book tables, not collaborator index */
.compare-table--books td:nth-child(2) {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--vermilion-ink);
  white-space: nowrap;
}
.compare-table a { font-weight: 600; }

/* Sticky title column for horizontal scroll on narrow viewports */
.compare-table th:first-child,
.compare-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--paper);
  box-shadow: 1px 0 0 var(--paper-edge);
  max-width: 14rem;
}
.compare-table th:first-child {
  background: var(--paper-deep);
  z-index: 2;
}

@media (max-width: 560px) {
  .compare-table {
    font-size: 0.86rem;
  }
  .compare-table th,
  .compare-table td {
    padding: 0.6rem 0.7rem;
  }
  .compare-table th:first-child,
  .compare-table td:first-child {
    max-width: 10.5rem;
  }
  .buy--inline {
    font-size: 0.8rem;
  }
}

.buy--inline {
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  white-space: nowrap;
}
.buy--inline:hover { color: var(--vermilion-ink); }

.compare-foot-disclosure {
  margin-top: 2.5rem;
  max-width: none;
}
.compare-foot-disclosure code {
  font-size: 0.88em;
  color: var(--ink);
}

/* Scroll cue for compare tables */
.table-wrap {
  position: relative;
}
.table-wrap::after {
  content: "Swipe for more →";
  display: none;
  position: sticky;
  left: 0;
  bottom: 0;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  background: linear-gradient(to top, var(--paper) 60%, transparent);
  pointer-events: none;
}
@media (max-width: 560px) {
  .table-wrap::after { display: block; }
  /* Drop repeated Lane column on narrow screens so Amazon CTA stays reachable */
  .compare-table--books th:nth-child(4),
  .compare-table--books td:nth-child(4) {
    display: none;
  }
  .compare-table--books th:nth-child(3),
  .compare-table--books td:nth-child(3) {
    max-width: 9rem;
  }
}


/* —— shelf notes (/notes/{slug}/) —— */
.note-page { padding-top: 1.5rem; }
.note-page .prose { padding-top: 0.5rem; }
.prose h2 {
  margin: 2.1rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.prose cite { font-style: italic; }
.credit-line {
  margin: 0 0 1.05rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--forest);
  background: var(--paper-deep);
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--ink);
  user-select: all;
}
.prose .credit-line { color: var(--ink); }
.editions td { color: var(--ink-soft); }
.editions .isbn { font-variant-numeric: tabular-nums; white-space: nowrap; }
.prose .table-note {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.timeline {
  margin: 0 0 1.05rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--paper-edge);
}
.timeline li {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--paper-edge);
  color: var(--ink-soft);
  line-height: 1.5;
}
.timeline .t-year {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--vermilion-ink);
}
.timeline a { font-family: var(--font-display); font-weight: 600; }
.note-cta { margin: 2rem 0 1.5rem; }
.prose .note-cta p { margin: 0; }
.prose .note-cta .cta-disclosure { margin: 0 0 0.85rem; }
.prose .note-sources {
  font-size: 0.86rem;
  color: var(--ink-muted);
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.shelf-note-link {
  margin: 0 0 1.1rem;
  max-width: 52ch;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.shelf-note-link a { font-weight: 600; }

/* —— shelf notes: pair compare (/notes/how-to-get-rich-vs-think-like-a-billionaire/) —— */
.compare-table.pair thead th {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  white-space: normal;
}
.compare-table.pair tbody th {
  width: 9.5rem;
  white-space: normal;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.82rem;
}
.compare-table.pair td { color: var(--ink-soft); line-height: 1.5; }
.prose .table-wrap + .table-note, .table-wrap + .table-wrap { margin-top: 1rem; }
.compare-table.editions caption { caption-side: top; text-align: left; font-weight: 600; padding: 0 0 .4rem; }
.note-cta .book-cta--pair {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
