:root {
  --bg: #f6f4ef;
  --panel: #e9e6dc;
  --ink: #20231f;
  --muted: #5f655a;
  --line: #cecec4;
  --line-soft: #e0dfd5;
  --accent: #293829;
  --accent-soft: #687154;
  --up: #2f5b34;
  --down: #8a3b22;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }
main { max-width: 1400px; margin: 0 auto; padding: 0 5% 60px; outline: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; background: var(--accent); color: #fff; padding: 8px 14px; }
.skip:focus { left: 8px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 14px; line-height: 1.6; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn { display: inline-block; font-size: 13px; border: 1px solid var(--accent); background: var(--accent); color: #fff; padding: 9px 16px; border-radius: 24px; text-decoration: none; cursor: pointer; }
.btn[disabled] { opacity: .45; cursor: default; }

/* Header */
.site-header { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 18px 5%; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 10; }
.logo { font-family: var(--serif); font-size: 26px; text-decoration: none; white-space: nowrap; }
.logo em { font-weight: normal; color: var(--accent-soft); }
.search-form { flex: 1; min-width: 220px; }
.search-form input { width: 100%; border: 0; border-bottom: 1px solid #adb4a3; background: transparent; padding: 10px 2px; font-size: 14px; outline-offset: 4px; color: var(--ink); }
nav { display: flex; gap: 22px; font-size: 12px; letter-spacing: .5px; }
nav a { text-decoration: none; }
nav a:hover, nav a.active { text-decoration: underline; text-underline-offset: 4px; }

/* Type */
.eyebrow { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
h1, h2, h3 { font-family: var(--serif); font-weight: normal; }
h1 { font-size: clamp(38px, 6vw, 76px); line-height: 1.02; margin: 14px 0; }
h1 em, h2 em { color: var(--accent-soft); font-style: normal; }
h2 { font-size: 30px; margin: 40px 0 12px; }
h3 { font-size: 22px; margin: 8px 0; }
.lede { max-width: 640px; color: var(--muted); line-height: 1.7; font-size: 15px; }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }
.crumbs { font-size: 11px; letter-spacing: .5px; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-current] { color: var(--ink); }
.page-head { padding: 26px 0 22px; border-bottom: 1px solid var(--line); }
.page-head .lede { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 16px; }
.line-link { font-size: 12px; text-decoration: none; border-bottom: 1px solid; padding-bottom: 3px; }
.section-top { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 56px 0 18px; flex-wrap: wrap; }
.section-top h2 { margin: 6px 0 0; }

/* Home */
.intro { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; padding: 50px 0 32px; }
.stats { display: grid; grid-template-columns: repeat(2, auto); gap: 18px 34px; justify-content: start; }
.stats b { display: block; font: normal 34px var(--serif); }
.stats span { font-size: 11px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.hero { display: grid; grid-template-columns: 1.5fr 1fr; background: var(--panel); min-height: 420px; }
.hero-image { position: relative; overflow: hidden; background: #485247; min-height: 320px; display: block; }
.hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-copy { padding: 44px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.hero-copy h2 { font-size: clamp(32px, 3.4vw, 50px); line-height: 1.05; margin: 14px 0 8px; }
.hero-copy h2 a { text-decoration: none; }
.hero-copy p { color: var(--muted); line-height: 1.7; font-size: 14px; margin: 4px 0; }
.hero-copy .credit { font-size: 10px; margin-top: 18px; }
.pair-list { list-style: none; padding: 0; margin: 0; columns: 2 380px; column-gap: 36px; }
.pair-list li { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--line-soft); display: grid; gap: 2px; }
.pair-list a { font-family: var(--serif); font-size: 18px; text-decoration: none; }
.pair-list a b { font-weight: normal; color: var(--muted); }
.pair-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pair-list span { font-size: 12px; color: var(--muted); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0; }
.chip { border: 1px solid #c6cabc; background: transparent; padding: 8px 15px; border-radius: 24px; font-size: 12px; text-decoration: none; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--accent); }
button.chip[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 34px 24px; padding: 24px 0; }
.card-img { aspect-ratio: 3 / 2; position: relative; overflow: hidden; background: var(--panel); display: block; text-decoration: none; }
.card-img > img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .card-img img { transform: scale(1.025); }
.card-img .rep-tag { position: absolute; left: 8px; bottom: 8px; }
.placeholder { height: 100%; min-height: 140px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px; font-family: var(--serif); color: #53634b; background: linear-gradient(160deg, #e9e6dc, #dcdccf); }
.placeholder b { font-size: 28px; font-weight: normal; line-height: 1.1; }
.placeholder span { margin-top: 8px; font-style: italic; font-size: 14px; }
.placeholder.big { aspect-ratio: 3 / 2; height: auto; width: 100%; }
.card-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.card-meta a { text-decoration: none; }
.card h3 { font-size: 23px; margin: 8px 0 4px; line-height: 1.2; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.card p { font-size: 12px; color: var(--muted); margin: 4px 0; line-height: 1.6; }

/* Photos */
.photo { margin: 0; }
.photo .shot { display: block; width: 100%; padding: 0; border: 0; background: var(--panel); cursor: zoom-in; aspect-ratio: 3 / 2; overflow: hidden; }
.photo .shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s; }
.photo .shot:hover img { opacity: .9; }
.photo figcaption { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.photo figcaption .cap { color: var(--ink); }
.photo .credit, .photo .credit a { color: var(--muted); }
.rep-tag { display: inline-block; background: #f1e7c9; color: #5b4a17; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; padding: 3px 7px; margin-right: 6px; vertical-align: middle; cursor: help; }
.photo-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin: 12px 0 8px; }

/* Family timeline */
.timeline { margin: 28px 0 10px; }
.tl-scroll { overflow-x: auto; padding-bottom: 4px; }
.tl-inner { min-width: 640px; position: relative; padding-bottom: 26px; }
.tl-row { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; margin: 8px 0; }
.tl-line { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); width: 70px; }
.tl-track { position: relative; height: 46px; background: var(--line-soft); grid-column: -2; }
.bar { position: absolute; top: 4px; height: 38px; background: var(--accent); color: #fff; text-decoration: none; font-size: 13px; display: flex; align-items: center; padding: 0 10px; overflow: hidden; white-space: nowrap; border-right: 2px solid var(--bg); }
.bar:nth-child(even) { background: var(--accent-soft); }
.bar.ongoing { background-image: linear-gradient(90deg, transparent 80%, #ffffff30); }
.bar:hover, .bar:focus-visible { filter: brightness(1.25); }
.bar .tick { position: absolute; top: 0; bottom: 0; width: 2px; background: #f1e7c9; }
.tl-axis { position: absolute; left: 0; right: 0; bottom: 0; height: 20px; font-size: 10px; color: var(--muted); }
.tl-row:first-child:not(:only-child) ~ .tl-axis, .tl-axis { margin-left: 0; }
.tl-axis span { position: absolute; transform: translateX(-50%); }
.timeline:has(.tl-line) .tl-axis { left: 82px; }

/* Family page generation rows */
.gen-list { display: grid; gap: 0; margin-top: 10px; }
.gen-row { display: grid; grid-template-columns: minmax(220px, 380px) 1fr; gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: start; }
.gen-row h3 { font-size: 30px; margin: 6px 0 8px; }
.gen-row h3 a { text-decoration: none; }
.gen-row p { font-size: 14px; line-height: 1.6; margin: 6px 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; border: 1px solid var(--line); padding: 3px 8px; border-radius: 12px; color: var(--muted); }

/* Generation page */
.gen-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 36px; margin-top: 26px; align-items: start; }
.gen-top h2 { margin-top: 0; }
.facts { width: 100%; border-collapse: collapse; font-size: 14px; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line-soft); line-height: 1.55; }
.facts th { font-weight: normal; color: var(--muted); width: 32%; font-size: 12px; letter-spacing: .3px; }
.nd { color: var(--muted); font-style: italic; font-size: 13px; }
.nd-block { color: var(--muted); font-style: italic; font-size: 14px; }
.ref { font-size: 10px; margin-left: 1px; }
.ref a { text-decoration: none; color: var(--accent-soft); }
.ref a:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; margin: 10px 0 6px; position: relative; }   /* keeps visually hidden labels inside the scroller */
.spec, .compare { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.spec th, .spec td, .compare th, .compare td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.spec thead th, .compare thead th { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: normal; white-space: nowrap; }
.spec td { white-space: nowrap; }
.spec.pt td:nth-child(4), .spec.credits td { white-space: normal; }
.compare thead th { white-space: normal; font-size: 12px; letter-spacing: 0; text-transform: none; }
.compare thead th a { font-family: var(--serif); font-size: 19px; color: var(--ink); text-decoration: none; }
.compare tbody th { font-weight: normal; color: var(--muted); font-size: 12px; width: 180px; }
.compare tr.group th { font-family: var(--serif); font-size: 18px; color: var(--ink); padding-top: 22px; }
.compare td { min-width: 180px; }
.delta { font-size: 12px; color: var(--muted); }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.changes { list-style: none; padding: 0; margin: 10px 0; max-width: 860px; }
.changes li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); line-height: 1.6; font-size: 15px; }
.topic { display: inline-block; min-width: 92px; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 2px 7px; margin-right: 8px; text-align: center; vertical-align: 2px; }
.what-changed { margin-top: 10px; }
.revisions .revision { border-top: 1px solid var(--line); padding: 18px 0; }
.rev-head h3 { font-size: 24px; margin: 4px 0; }
.rev-head .when { font-size: 13px; color: var(--muted); margin: 2px 0 8px; }
.kind { display: inline-block; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; border: 1px solid var(--line); border-radius: 10px; padding: 2px 7px; color: var(--muted); }
.notes { line-height: 1.7; font-size: 14px; max-width: 860px; }
.gen-nav { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 36px; padding-top: 18px; font-size: 14px; }
.gen-nav a { text-decoration: none; }
.gen-nav a:hover { text-decoration: underline; }
.sources-list { margin-top: 40px; border-top: 1px solid var(--line); }
.sources-list ol { font-size: 13px; line-height: 1.7; padding-left: 24px; max-width: 980px; }
.sources-list li:target { background: #f1e7c9; }
.src-type { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-left: 6px; }
.pair-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0 6px; }

/* Buttons on pages */
.save-btn, .compare-btn { font-size: 12px; border: 1px solid #c6cabc; background: transparent; color: var(--ink); padding: 7px 14px; border-radius: 24px; cursor: pointer; }
.save-btn[aria-pressed="true"], .compare-btn[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.save-count { font-size: 12px; color: var(--muted); }
.fix-link { font-size: 12px; color: var(--muted); }
.compare-tray { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 25; background: var(--bg); border: 1px solid var(--accent); padding: 10px 14px; display: flex; gap: 12px; align-items: center; font-size: 13px; box-shadow: 0 6px 20px #0002; }

/* Explorer filters */
.filters-panel { border-bottom: 1px solid var(--line); padding: 10px 0 6px; }
.filter-group { border: 0; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-group legend { float: left; width: 110px; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); padding-top: 9px; }
.filter-status { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

/* Compare page */
.compare-pick { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.compare-pick label { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; max-width: 100%; }
.compare-pick select { padding: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); max-width: 100%; min-width: 0; }
.compare-pick .chosen { display: flex; flex-wrap: wrap; gap: 8px; }

/* Lists */
.events { list-style: none; padding: 0; margin: 8px 0; }
.events li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; line-height: 1.6; }
.events a { font-family: var(--serif); font-size: 17px; text-decoration: none; }
.events a:hover { text-decoration: underline; }
.events .kind { margin-right: 8px; min-width: 120px; text-align: center; }
.garage-list, .popular { padding-left: 20px; font-size: 15px; }
.garage-list { list-style: none; padding: 0; }
.garage-list li, .popular li { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.garage-list a, .popular a { font-family: var(--serif); font-size: 19px; text-decoration: none; }
.popular .count { float: right; color: var(--muted); font-size: 13px; }
.decade h2 { margin-bottom: 0; }
.results-group h2 { font-size: 24px; }
.search-big { display: flex; gap: 10px; max-width: 640px; margin: 14px 0; }
.search-big input { flex: 1; padding: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.search-big button { border: 1px solid var(--accent); background: var(--accent); color: #fff; padding: 0 18px; cursor: pointer; }

/* Directory */
.directory { columns: 3 260px; column-gap: 32px; padding: 24px 0; }
.directory a { display: grid; gap: 2px; text-decoration: none; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font: normal 20px var(--serif); break-inside: avoid; }
.directory a:hover { color: var(--accent-soft); }
.directory small { font: 12px var(--sans); color: var(--muted); }

/* Prose */
.prose { max-width: 700px; line-height: 1.8; font-size: 15px; color: #3c4038; }
.prose li { margin: 6px 0; }
.notice { background: #e3eadf; padding: 14px 18px; margin: 18px 0; max-width: 680px; }

/* Suggest form */
.suggest { display: grid; gap: 14px; max-width: 640px; margin-top: 18px; }
.suggest fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.suggest legend { font-size: 13px; margin-bottom: 6px; }
.suggest fieldset label { display: flex; gap: 8px; align-items: baseline; }
.suggest > label, .suggest .row2 label { display: grid; gap: 6px; font-size: 13px; }
.suggest input:not([type=radio]), .suggest textarea, .suggest select { font-size: 14px; padding: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); width: 100%; }
.suggest .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.suggest .opt { color: var(--muted); font-size: 12px; }
.suggest .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.suggest button { justify-self: start; }
.form-status { font-size: 13px; color: var(--down); }

/* Footer */
.site-footer { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 24px 5%; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); line-height: 1.7; }
.site-footer a { color: inherit; }

/* Lightbox */
#lightbox { width: min(1200px, 94vw); max-height: 94vh; padding: 0; border: 0; background: #151714; color: #f1efe8; overflow: hidden; }
#lightbox[open] { display: grid; grid-template-columns: 1fr 300px; }
#lightbox::backdrop { background: #000c; }
.lb-img { display: flex; align-items: center; justify-content: center; background: #0d0e0c; min-height: 50vh; }
.lb-img img { max-width: 100%; max-height: 94vh; display: block; }
.lb-caption { padding: 56px 26px 26px; overflow-y: auto; }
.lb-caption .eyebrow, .lb-caption .sources a, .lb-caption p { color: #b9bdb0; }
.lb-caption h3 { font-size: 24px; margin: 10px 0; }
.lb-caption a { color: #f1efe8; }
.lb-count { font-size: 11px; letter-spacing: 1px; }
.lb-close, .lb-nav { position: absolute; z-index: 2; border: 0; background: #f6f4efe6; color: var(--ink); cursor: pointer; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; }
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 10px; top: 45%; }
.lb-next { right: 310px; top: 45%; }

/* Analytics consent */
.consent { position: fixed; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 35; max-width: 640px; margin: 0 auto; background: var(--bg); border: 1px solid var(--accent); padding: 14px 18px; box-shadow: 0 6px 20px #0002; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-size: 13px; }
.consent p { margin: 0; flex: 1 1 280px; line-height: 1.5; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; background: var(--ink); color: #fff; padding: 12px 18px; font-size: 13px; max-width: calc(100vw - 32px); box-shadow: 0 6px 20px #0003; }
.toast .link-btn { color: #fff; margin-left: 10px; font-weight: bold; }

@media (max-width: 960px) {
  .gen-top { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .intro, .hero { grid-template-columns: 1fr; }
  .intro { gap: 20px; padding-top: 32px; }
  .hero-copy { padding: 26px; }
  .gen-row { grid-template-columns: 1fr; gap: 12px; }
  #lightbox[open] { grid-template-columns: 1fr; overflow-y: auto; }
  .lb-img img { max-height: 70vh; }
  .lb-caption { padding: 18px 20px 24px; }
  .lb-next { right: 10px; top: 30vh; }
  .lb-prev { top: 30vh; }
}
@media (max-width: 560px) {
  .site-header { gap: 12px; padding: 14px 16px; position: static; }
  .search-form { order: 3; flex-basis: 100%; }
  nav { flex-wrap: wrap; gap: 8px 14px; }
  main { padding: 0 16px 50px; }
  h2 { font-size: 26px; }
  .stats b { font-size: 28px; }
  .pair-photos { grid-template-columns: 1fr; }
  .suggest .row2 { grid-template-columns: 1fr; }
  .filter-group legend { float: none; width: 100%; padding: 0; }
  .facts th { width: 38%; }
  .compare-tray { left: 16px; right: 16px; flex-wrap: wrap; }
  .gen-row h3 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card-img img { transition: none; } }
