:root {
  --paper: #f4efe4;
  --paper-2: #fffdf8;
  --ink: #1c1610;
  --ink-2: #3d362c;
  --muted: #6b6256;
  --line: rgba(28, 22, 16, 0.12);
  --line-2: rgba(28, 22, 16, 0.22);
  --orange: #e85d04;
  --orange-2: #c2410c;
  --teal: #3d7a76;
  --teal-2: #2a5552;
  --header: #0b0b0b;
  --ok: #2f6b4f;
  --wrap: 1120px;
  --narrow: 760px;
  --head-h: 78px;
  --serif: "Source Serif 4", "Times New Roman", serif;
  --sans: "Outfit", system-ui, sans-serif;
  --cond: "Oswald", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 0.45em;
}
h1 { font-size: clamp(2.2rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 20;
}
.skip:focus { left: 1rem; top: 1rem; }
.wrap { width: min(var(--wrap), calc(100% - 2rem)); margin-inline: auto; }
.wrap-narrow { width: min(var(--narrow), calc(100% - 2rem)); }

.site-head {
  position: sticky;
  top: 0;
  z-index: 12;
  background: var(--header);
  color: #f6efe4;
}
.head-inner {
  min-height: var(--head-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand img, .brand svg {
  height: 46px;
  width: auto;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  font-family: var(--sans);
  font-size: 0.92rem;
}
.nav a { text-decoration: none; color: #e8dfd2; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  position: relative;
}
.nav-toggle span,
.nav-toggle span:before,
.nav-toggle span:after {
  display: block;
  width: 20px;
  height: 2px;
  background: #f3eadc;
  position: absolute;
  left: 12px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span { top: 21px; }
.nav-toggle span:before,
.nav-toggle span:after { content: ""; left: 0; }
.nav-toggle span:before { top: -6px; }
.nav-toggle span:after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span:before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:after { top: 0; transform: rotate(-45deg); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 560;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-2); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0.45rem 0.95rem; font-size: 0.88rem; }
.btn-on-dark { border-color: rgba(255,255,255,0.22); color: #fff; }

.hero {
  position: relative;
  padding: clamp(1.4rem, 4vw, 3.2rem) 0 3.2rem;
  overflow: hidden;
}
.hero:before {
  content: "";
  position: absolute;
  inset: auto -12% -40% 40%;
  height: 28rem;
  background: radial-gradient(circle, rgba(232,93,4,0.16), transparent 62%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: start;
}
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-2);
  margin-bottom: 0.9rem;
}
.hero h1 .mark {
  color: var(--orange-2);
  font-style: italic;
}
.lead { font-size: 1.18rem; color: var(--ink-2); max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.6rem 0 1.8rem; }
.hero-stats {
  display: flex;
  gap: 1.6rem;
  font-family: var(--sans);
}
.hero-stats b {
  display: block;
  font-family: var(--cond);
  font-size: 2rem;
  line-height: 1;
  color: var(--orange-2);
}
.hero-stats span { color: var(--muted); font-size: 0.86rem; }
.hero-aside {
  position: relative;
  align-self: start;
  margin-top: calc(0.78rem * 1.2 + 0.9rem);
}
.hero-lily {
  width: min(118%, 480px);
  margin-left: auto;
  margin-right: -1.2rem;
  filter: drop-shadow(0 18px 30px rgba(28,22,16,0.12));
}
.hero-note { display: none; }

.section { padding: 3.2rem 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 1.6rem;
}
.kicker {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-2);
  margin-bottom: 0.4rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.4rem;
}
.filter-btn {
  font-family: var(--sans);
  font-size: 0.82rem;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}
.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.filter-meta {
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.rank-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.rank-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.2rem 1.25rem 1.3rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  text-decoration: none;
  min-height: 168px;
  position: relative;
  overflow: hidden;
}
.rank-card:hover { border-color: var(--orange); }
.rank-card .n {
  font-family: var(--cond);
  font-size: 3rem;
  line-height: 0.85;
  color: var(--orange);
}
.rank-card h3 { font-size: 1.25rem; margin-bottom: 0.35rem; }
.rank-card p { color: var(--muted); font-size: 0.98rem; margin: 0; }
.rank-card .meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-2);
  margin-top: 0.7rem;
}

.inv-list { display: flex; flex-direction: column; gap: 0.85rem; }
.inv-card {
  display: grid;
  grid-template-columns: 5.2rem 1fr auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.15rem 1.25rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  text-decoration: none;
}
.inv-card:hover { border-color: var(--orange); }
.inv-card .n {
  font-family: var(--cond);
  font-size: 3.2rem;
  line-height: 0.8;
  color: var(--orange);
}
.inv-card h3 { font-size: 1.35rem; margin: 0 0 0.2rem; }
.inv-card .who { margin: 0; color: var(--ink-2); font-size: 0.98rem; }
.inv-card .blurb { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.98rem; }
.inv-go {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--orange-2);
  white-space: nowrap;
}

.page-head { padding: 2.4rem 0 1.4rem; }
.crumbs {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}
.crumbs a { color: var(--teal-2); }
.rank-intro { font-size: 1.08rem; color: var(--ink-2); }

.ficha-head { padding: 2.2rem 0 0.4rem; }
.ficha-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem;
  align-items: start;
}
.rank-badge {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--cond);
  font-size: 2.6rem;
  line-height: 1;
}
.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem 1.8rem;
  margin: 1.4rem 0 0;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.92rem;
}
.meta-strip b { display: block; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 560; }

.article { padding: 1.6rem 0 3.5rem; }
.prose { font-size: 1.06rem; }
.prose h2 { margin-top: 1.7rem; }
.prose-updated {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
}
.prose ul { padding-left: 1.15rem; }
.prose li { margin-bottom: 0.35rem; }
.prose a { color: var(--orange-2); }
.callout {
  background: #efe6d2;
  border-left: 4px solid var(--teal);
  padding: 1rem 1.1rem;
  margin: 1.4rem 0;
}
.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.2rem;
  font-family: var(--sans);
  font-size: 0.92rem;
}
.pager a { color: var(--teal-2); }

.article-list { display: grid; gap: 0.8rem; }
.article-card {
  display: block;
  padding: 1.2rem 1.25rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  text-decoration: none;
}
.article-card:hover { border-color: var(--orange); }
.article-card h3 { font-size: 1.28rem; }

.site-foot {
  background: var(--header);
  color: #e7ddd0;
  padding: 3rem 0 1.4rem;
  font-family: var(--sans);
  font-size: 0.92rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 0.9fr;
  gap: 2rem;
}
.foot-brand svg, .foot-brand img { height: 40px; width: auto; margin-bottom: 0.8rem; }
.foot-brand p { color: #b8afa2; }
.site-foot h4 {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f3eadc;
  margin-bottom: 0.7rem;
}
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 0.35rem; }
.site-foot a { color: #cfc4b6; text-decoration: none; }
.site-foot a:hover { color: #fff; }
.foot-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: #9c9387;
  font-size: 0.82rem;
}
.foot-note { color: #8d8478; font-size: 0.8rem; max-width: 52rem; }

.empty {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-2);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1.4rem 0 0.4rem;
  max-width: 36rem;
}
.hero-search .btn { flex-shrink: 0; }
.hero-search input,
.explorer-search input {
  flex: 1;
  min-height: 48px;
  border: 1px solid var(--line-2);
  background: var(--paper-2);
  color: var(--ink);
  font: inherit;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
}
.hero-search input:focus,
.explorer-search input:focus {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.explorer-search { margin-bottom: 1.1rem; }
.explorer-row { margin-bottom: 0.85rem; }
.explorer-row-end {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.tool-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.ex-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}
.ex-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  text-align: left;
  width: 100%;
  padding: 1.05rem 1.1rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.ex-card:hover { border-color: var(--orange); }
.ex-card h3 { font-size: 1.15rem; margin: 0 0 0.2rem; }
.ex-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.ex-card .who { color: var(--teal-2); font-family: var(--sans); font-size: 0.78rem; margin-bottom: 0.35rem; }
.ex-board.is-timeline { grid-template-columns: 1fr; }
.ex-board.is-timeline .ex-card { grid-template-columns: 7.5rem 1fr; align-items: start; }
.ex-year {
  font-family: var(--cond);
  color: var(--orange-2);
  font-size: 1.05rem;
}

.rank-tools { margin-bottom: 1rem; }
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
}
.jump-dot {
  font-family: var(--cond);
  font-size: 0.9rem;
  text-decoration: none;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: var(--paper-2);
  color: var(--ink-2);
}
.jump-dot:hover { border-color: var(--orange); color: var(--orange-2); }
.sort-bar { display: flex; gap: 0.4rem; flex-wrap: wrap; }

button.inv-card {
  width: 100%;
  appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: var(--paper-2);
}
.inv-row {
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.inv-row .inv-card { border: 0; }
.inv-row.is-open { border-color: var(--orange); }
.inv-extra {
  padding: 0 1.25rem 1.2rem 5.2rem;
  color: var(--ink-2);
}
.inv-extra-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}
.ficha-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0 0;
}

.drawer-root, .compare-root {
  position: fixed;
  inset: 0;
  z-index: 20;
}
.drawer-back {
  position: absolute;
  inset: 0;
  background: rgba(14, 11, 8, 0.45);
}
.drawer, .compare-panel {
  position: absolute;
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 1.4rem 1.4rem 1.6rem;
  box-shadow: -16px 0 40px rgba(28, 22, 16, 0.12);
}
.drawer {
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100%;
  overflow: auto;
}
.compare-panel {
  inset: 6vh 6vw auto;
  max-height: 88vh;
  overflow: auto;
  width: auto;
}
.drawer-x {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.drawer-meta { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin-top: 1rem;
}
.compare-col { padding-right: 0.4rem; }
.compare-col + .compare-col {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

body.drawer-open { overflow: hidden; }

.timeline-sec { padding-top: 0.4rem; }
.timeline {
  position: relative;
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  cursor: grab;
  padding: 0.4rem 0.2rem 1.4rem;
  scrollbar-width: thin;
  user-select: none;
}
.timeline.is-drag { cursor: grabbing; }
.timeline-line { display: none; }
.time-node {
  position: relative;
  flex: 0 0 168px;
  text-decoration: none;
  padding-top: 0;
}
.time-node:before { display: none; }
.time-year {
  display: block;
  font-family: var(--cond);
  color: var(--orange-2);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}
.time-node strong { display: block; font-size: 1.12rem; margin-bottom: 0.15rem; }
.time-node span:last-child { color: var(--muted); font-size: 0.92rem; }
.time-node:hover strong { color: var(--orange-2); }

@media (max-width: 900px) {
  .hero-grid, .rank-board, .foot-grid, .ficha-top, .inv-card, .ex-board, .compare-grid {
    grid-template-columns: 1fr;
  }
  .ex-board.is-timeline .ex-card { grid-template-columns: 1fr; }
  .inv-card .n { font-size: 2.4rem; }
  .inv-go { display: none; }
  .inv-extra { padding-left: 1.25rem; }
  .compare-col + .compare-col { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 1rem; }
  .hero-search { flex-direction: column; }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    inset: var(--head-h) 0 auto 0;
    background: var(--header);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.2rem 1.4rem;
    gap: 0.85rem;
  }
  .nav.is-open { display: flex; }
  .hero-aside { margin-top: 0; min-height: 0; }
  .hero-lily { margin: 0 auto; width: min(100%, 380px); }
  .section-head { flex-direction: column; align-items: start; }
}
