:root {
  --bg: #F4F6ED;
  --field-bg: #EDECE3;
  --text-primary: #2C2A29;
  --text-secondary: #6C6A6A;
  --text-muted: #959493;
  --border: #D9D7CB;
  --border-strong: #C3C1B4;
  --accent: #1F4C7A;
  --accent-deep: #14314F;
  --quote-blue: #2F4A5F;
  --chart-tint: rgba(31, 76, 122, 0.06);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.page { max-width: 880px; margin: 0 auto; padding: 56px 32px 0; }

/* ---------- header / logo / nav (shared across all pages) ---------- */
.site-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 76px; }
.logo { position: relative; display: inline-block; width: 138px; height: 22px; text-decoration: none; border-bottom: 1px solid var(--border-strong); padding-bottom: 5px; }
.logo-bars { position: absolute; top: 0; left: 6px; display: flex; gap: 2.5px; align-items: flex-end; height: 18px; transition: opacity 0.18s ease; }
.logo-bars span { display: block; width: 3px; height: 100%; background: var(--accent); }
.logo-bars span:last-child { margin-left: 3px; transform: rotate(-10deg); transform-origin: bottom center; }
.logo-text {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); height: 18px; line-height: 18px;
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: 0.02em; color: var(--text-primary);
  white-space: nowrap; opacity: 0; transition: opacity 0.18s ease;
}
.logo-text .dot { color: var(--accent); font-weight: 700; }
.logo:hover .logo-bars { opacity: 0; }
.logo:hover .logo-text { opacity: 1; }
.nav { display: flex; gap: 24px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.04em; color: var(--text-secondary); }
.nav a { display: inline-block; height: 22px; line-height: 19px; color: var(--text-secondary); text-decoration: none; border-bottom: 1px solid var(--border-strong); padding-bottom: 2px; box-sizing: border-box; }
.nav a:hover { color: var(--accent-deep); border-color: var(--accent); }
.nav a.current { color: var(--accent-deep); border-color: var(--accent); }

/* ---------- footer (shared) ---------- */
.site-footer {
  max-width: 816px;
  margin: 40px auto 0;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: stretch;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--text-muted);
}
.footer-copy { position: relative; padding: 16px 20px; white-space: nowrap; }
.footer-copy::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 1px; background: var(--border-strong); }
.footer-tagline { flex: 1; display: flex; align-items: center; padding: 16px 20px; }
.footer-bars { display: flex; align-items: stretch; gap: 7px; padding: 0 7px 0 18px; }
.footer-bars span { display: block; flex: 0 0 1px; width: 1px; background: var(--border); }
@media (max-width: 640px) {
  .site-footer { flex-direction: column; }
  .footer-copy { white-space: normal; padding: 14px 18px 12px; }
  .footer-copy::after { top: auto; left: 20px; right: 20px; bottom: 0; width: auto; height: 1px; }
  .footer-tagline { padding: 12px 18px 14px; }
  .footer-bars { display: none; }
}

/* ================= homepage ================= */
.hero-pattern { position: relative; padding-bottom: 40px; margin-bottom: 72px; border-bottom: 1px solid var(--border); }
h1 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 52px; line-height: 1.05; margin: 0 0 20px; letter-spacing: -0.01em; }
.intro { font-size: 16px; line-height: 1.65; color: var(--text-secondary); max-width: 560px; margin: 0; }

.controls { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.search {
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; padding: 9px 12px;
  border: 1px solid var(--border-strong); border-radius: 3px; background: var(--field-bg);
  color: var(--text-primary); width: 220px;
}
.search::placeholder { color: var(--text-muted); }
.search:focus { outline: none; border-color: var(--accent); }

.chips { display: flex; gap: 8px; }
.chip {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.03em; padding: 7px 12px;
  border: 1px solid var(--border-strong); border-radius: 20px; background: transparent; color: var(--text-secondary);
  cursor: pointer;
}
.chip.active { border-color: var(--accent); color: var(--accent-deep); background: rgba(61, 111, 168, 0.08); }

table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-muted); font-weight: 500; padding: 0 12px 10px 0;
  border-bottom: 1px solid var(--border-strong); cursor: pointer; user-select: none; white-space: nowrap;
  position: sticky; top: 0; background: var(--bg); z-index: 2; transition: box-shadow 0.15s ease;
}
thead.is-stuck th { box-shadow: 0 6px 10px -7px rgba(44, 42, 41, 0.45); }
thead th:hover { color: var(--accent-deep); }
.arrow { font-size: 9px; margin-left: 4px; color: var(--border-strong); display: inline-block; }
.arrow.active { color: var(--accent-deep); }
th.rank-col { width: 44px; }
th.year-col { width: 84px; }
th.plus-col { width: 32px; }

tbody tr.row { cursor: pointer; }
tbody tr.row td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; vertical-align: middle; }
tbody tr.row:hover td { background: rgba(61, 111, 168, 0.035); }
tbody tr.row.expanded td { border-bottom: none; }
tbody tr.row.milestone td { border-bottom: 2px solid var(--border-strong); }
.rank { font-family: 'IBM Plex Mono', monospace; color: var(--text-muted); font-size: 13px; }
.title-cell { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: 15px; letter-spacing: -0.005em; }
.author-cell { color: var(--text-secondary); }
.mobile-sortbar { display: none; }
.mobile-rank-prefix { display: none; }
.mobile-meta-line { display: none; }
@media (max-width: 640px) {
  thead { display: none; }
  .mobile-sortbar { display: flex; gap: 8px; margin-bottom: 16px; }
  .mobile-sortbar select {
    font-family: 'IBM Plex Mono', monospace; font-size: 12px; padding: 8px 10px;
    border: 1px solid var(--border-strong); border-radius: 3px; background: var(--field-bg);
    color: var(--text-primary); flex: 1;
  }
  .mobile-sortbar button {
    font-family: 'IBM Plex Mono', monospace; font-size: 13px; padding: 8px 14px;
    border: 1px solid var(--border-strong); border-radius: 3px; background: transparent;
    color: var(--accent-deep); cursor: pointer;
  }
  td.rank, td.author-cell, td.year-cell, td.genre-cell { display: none; }
  .mobile-rank-prefix { display: inline; font-family: 'IBM Plex Mono', monospace; color: var(--text-muted); font-size: 12px; margin-right: 6px; }
  .mobile-meta-line { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-secondary); margin-top: 4px; }
}
.genre-tag {
  font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: var(--text-secondary);
  border: 1px solid var(--border-strong); border-radius: 3px; padding: 2px 6px;
}
.year-cell { font-family: 'IBM Plex Mono', monospace; color: var(--text-muted); font-size: 13px; }
.plus { font-family: 'IBM Plex Mono', monospace; font-size: 16px; color: var(--accent); text-align: center; display: block; line-height: 1; }

tr.detail-row td { padding: 0; border-bottom: 1px solid var(--border); }
.detail-wrap { display: grid; grid-template-columns: auto 1fr; gap: 28px; padding: 24px 12px 32px 0; align-items: start; }
@media (max-width: 640px) {
  .detail-wrap { grid-template-columns: 1fr; }
  .cover-block { width: 96px; height: 138px; }
  .cover-block.has-cover { max-width: 110px; max-height: 160px; }
  .cover-block.has-cover img { max-width: 110px; max-height: 160px; }
}
.cover-block {
  width: 132px; height: 190px; background: transparent; border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center; font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; color: var(--text-muted); text-align: center; padding: 8px; overflow: hidden;
}
.cover-block.has-cover { width: auto; height: auto; max-width: 150px; max-height: 220px; border: none; padding: 0; display: block; }
.cover-block.has-cover img { display: block; width: auto; height: auto; max-width: 150px; max-height: 220px; }
.review-block .byline {
  font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--text-muted); margin: 0 0 10px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.review-block p.review-text { font-size: 14.5px; line-height: 1.7; color: var(--text-primary); margin: 0 0 14px; }
.pull-quote {
  font-family: 'Inter', sans-serif; font-style: italic; font-size: 15px; color: var(--quote-blue);
  border-left: 2px solid var(--accent); padding-left: 14px; margin: 0;
}
tr.hidden { display: none; }

/* ================= about / bio ================= */
.module { border: 1px solid var(--border-strong); border-bottom: none; padding: 0; }
.page > .module:last-of-type, .page > div > .module:last-of-type { border-bottom: 1px solid var(--border-strong); }
.content { max-width: 480px; padding: 36px 28px; }
.content-wide { max-width: 800px; padding: 36px 28px; }
.body-col { max-width: 352px; }
.content + .content { padding-top: 0; }
.about-page p, .bio-page p { font-size: 15px; line-height: 1.7; margin: 0 0 14px; }
.about-page p:last-child, .bio-page p:last-child { margin-bottom: 0; }
.about-page .lead-headline, .bio-page .lead-headline { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 28px; line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 20px; color: var(--text-primary); }
.section-label { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); margin: 0 0 20px; }
.module.module-bleed { padding: 0; }

.hero-shelf { position: relative; width: 100%; aspect-ratio: 1600 / 1046; display: block; overflow: hidden; background: var(--field-bg); }
.hero-shelf img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-shelf .hero-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--text-muted); }
.hero-caption {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 28px 32px;
  background: linear-gradient(to top, rgba(20, 49, 79, 0.8), rgba(20, 49, 79, 0) 60%);
  opacity: 0; transition: opacity 0.25s ease; pointer-events: none;
}
.hero-caption p { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: 16px; line-height: 1.5; color: var(--bg); margin: 0; max-width: 480px; }
.hero-shelf:hover .hero-caption { opacity: 1; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.two-col-cell.left { padding: 36px 28px; display: flex; flex-direction: column; justify-content: center; }
.two-col-cell.right { padding: 36px 28px; display: flex; flex-direction: column; justify-content: center; }
.two-col-cell.bleed { padding: 0; }
.two-col.top-align .two-col-cell { justify-content: flex-start; }
.module.split { position: relative; }
.module.split::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--border-strong); }
@media (max-width: 600px) {
  .two-col { grid-template-columns: 1fr; }
  .module.split::after { display: none; }
  .two-col-cell.right { border-top: 1px solid var(--border-strong); }
  .bio-photo-block { height: 220px; }
}

.chart-title { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: 15px; margin: 0 0 6px; }
.chart-wrap svg { width: 100%; height: auto; display: block; }
.chart-caption { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-secondary); font-style: italic; margin: 8px 0 0; }
.chart-cell { background: var(--chart-tint); }

.navy-block { background: var(--accent-deep); color: var(--bg); padding: 36px 28px; height: 100%; }
.navy-block p { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 28px; line-height: 1.3; margin: 0; color: var(--bg) !important; }

.two-col.matched-height { min-height: 380px; }
.after-label-cell { padding-top: 20px; }

.inline-link { color: var(--accent-deep); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag-chip {
  font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: 0.02em; color: var(--text-secondary);
  border: 1px solid var(--border-strong); border-radius: 3px; padding: 4px 9px;
}

.criteria-list { display: flex; flex-direction: column; gap: 10px; }
.criteria-item { display: flex; align-items: baseline; gap: 14px; }
.criteria-num { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.02em; color: var(--accent); flex: 0 0 auto; }
.criteria-q { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: 15px; line-height: 1.4; color: var(--text-primary); }

.bio-two-col { min-height: 460px; }
.bio-photo-block {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--field-bg); font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-muted);
}
.bio-photo-block img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bio-content-cell { padding-bottom: 64px; }
.bio-social { display: flex; gap: 8px; margin-top: 20px; }
.social-link {
  width: 30px; height: 30px; border: 1px solid var(--border-strong); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--text-secondary);
  text-decoration: none; font-family: 'IBM Plex Mono', monospace; font-size: 11px;
}
.social-link:hover { border-color: var(--accent); color: var(--accent-deep); }
