/* Theme 1: Classic cardboard — cream stock, slab headings, vintage card frame */
:root {
  --paper: #f3ead6;
  --paper-2: #ebdfc4;
  --ink: #2b2118;
  --muted: #6e604f;
  --line: #d6c7a6;
  --red: #a3271f;
  --navy: #1f3a5f;
  --link: #8a2019;
  --head: "Alfa Slab One", "Rockwell", Georgia, serif;
  --slab: "Roboto Slab", "Rockwell", Georgia, serif;
  --body: "Source Serif 4", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1e1913;
    --paper-2: #2a231b;
    --ink: #efe4cc;
    --muted: #b3a387;
    --line: #463a2c;
    --red: #e0574b;
    --navy: #8fb0d9;
    --link: #f08a7d;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* keep the filter boxes working on flex/grid items */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  background-image: radial-gradient(rgba(120, 90, 40, .06) 1px, transparent 1px);
  background-size: 4px 4px;
  color: var(--ink);
  font: 17px/1.55 var(--body);
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); font-size: .9em; }

/* Header: red band with cream pinstripe */
.site-header {
  background: var(--red);
  border-bottom: 5px double #f3ead6;
  box-shadow: 0 2px 0 var(--navy);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.logo { display: flex; align-items: center; gap: 10px; color: #f3ead6; }
.logo:hover { text-decoration: none; }
.logo-mark {
  font: 18px/1 var(--head); letter-spacing: .02em;
  background: #f3ead6; color: var(--red); padding: 7px 8px 5px; border-radius: 50%;
  border: 2px solid var(--navy);
}
.logo-text { font: 22px/1 var(--head); letter-spacing: .02em; text-shadow: 2px 2px 0 rgba(0,0,0,.25); }
.sport-nav { display: flex; gap: 4px; overflow-x: auto; }
.sport-nav a {
  color: #f3ead6; font: 600 13px/1 var(--slab); text-transform: uppercase; letter-spacing: .08em;
  padding: 8px 10px; border-radius: 3px; white-space: nowrap;
}
.sport-nav a:hover, .sport-nav a[aria-current] { background: rgba(0,0,0,.18); text-decoration: none; }

.crumbs { margin: 18px 0 10px; font: 14px var(--slab); color: var(--muted); overflow-wrap: anywhere; }
.crumbs span { margin: 0 6px; }

h1, h2 { font-family: var(--head); font-weight: 400; letter-spacing: .01em; }
h1 { font-size: 2rem; line-height: 1.15; margin: 6px 0 6px; overflow-wrap: anywhere; color: var(--navy); }
h1 .sub { display: block; font: 600 1.05rem var(--slab); color: var(--muted); }
h2 { font-size: 1.3rem; margin: 28px 0 10px; color: var(--navy); }
.lede { color: var(--muted); margin: 0 0 16px; font-style: italic; }

/* Card hero */
.card-hero { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: start; margin-top: 8px; }
@media (min-width: 860px) { .card-hero { grid-template-columns: minmax(0, 1fr) 328px; } }

/* eBay widget in the hero's right column, sized for 5 listings */
.hero-ebay { background: #fff; border: 1.5px solid var(--line); border-radius: 6px; padding: 10px 12px 4px; box-shadow: 0 6px 16px rgba(60, 40, 10, .12); }
.ebay-title { margin: 0 0 6px; font-size: 1.1rem; border-bottom: 3px solid var(--red); padding-bottom: 4px; }
/* EPN layout is 300x750 with ~125px per listing; 670px shows the header + 5 listings */
.epn-box-tall { width: 300px; max-width: 100%; height: 670px; margin: 0 auto; overflow: hidden; }
.hero-ebay .epn-placement { display: block; width: 100%; height: 100%; min-height: 0; max-width: none; }
.hero-art { display: flex; justify-content: center; }
.hero-info h1 { margin-top: 0; }
.eyebrow { display: block; font: 600 .95rem var(--slab); color: var(--red); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.h1-player { font-size: 2.6rem; line-height: 1.05; }
.h1-num { display: inline-block; margin-left: 8px; font: 700 1.2rem var(--slab); color: var(--paper); background: var(--navy); padding: 3px 10px; border-radius: 3px; vertical-align: middle; }
.hero-team { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 4px 0 12px; }
.team-name { font: 600 1.05rem var(--slab); color: var(--t1); filter: saturate(.85); }
.hero-team .badge { margin: 0; }

/* Drawn card: cream border, team-color frame, banner name plate */
.cardart {
  margin: 0; width: 100%; max-width: 260px; aspect-ratio: 5 / 7;
  background: #f7f0de; padding: 12px; border-radius: 10px;
  box-shadow: 0 1px 0 #fff inset, 0 10px 24px rgba(60, 40, 10, .28), 0 2px 4px rgba(60, 40, 10, .2);
  transform: rotate(-2deg);
}
.ca-frame {
  position: relative; height: 100%; border: 4px solid var(--t1); border-radius: 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--t2) 14%, #efe3c6), #e6d6b1);
  display: grid; grid-template-rows: auto 1fr auto; overflow: hidden;
}
.ca-top { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 0; }
.ca-brand { font: 20px/1 var(--head); color: var(--t1); text-shadow: 1px 1px 0 #fff; }
.ca-year { font: 700 12px/1 var(--slab); color: #f7f0de; background: var(--t2); border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; }
.ca-photo { display: grid; place-items: center; color: color-mix(in srgb, var(--t2) 45%, #b9a57d); }
.ca-photo svg { width: 55%; }
.ca-plate {
  background: var(--t1); color: #fff; text-align: center; padding: 8px 6px 9px;
  border-top: 3px solid var(--t2); clip-path: polygon(0 0, 100% 0, 96% 100%, 4% 100%); margin: 0 6px 10px;
}
.ca-name { display: block; font: 17px/1.1 var(--head); letter-spacing: .02em; }
.ca-team { display: block; font: 600 10px/1.3 var(--slab); text-transform: uppercase; letter-spacing: .12em; opacity: .9; }
.ca-num { position: absolute; top: 48px; left: 8px; font: 700 11px var(--slab); color: var(--t2); }
.ca-variant { position: absolute; top: 48px; right: 8px; font: 700 10px var(--slab); text-transform: uppercase; color: var(--t1); }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0; margin: 16px 0 0; border-top: 2px solid var(--ink); }
.facts div { padding: 10px 12px 10px 0; border-bottom: 1px dashed var(--line); }
.facts dt { font: 600 11px var(--slab); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }

/* Badges */
.badges { margin: 6px 0; }
.badge {
  display: inline-block; margin: 0 6px 6px 0; padding: 3px 10px 2px; border-radius: 3px;
  font: 700 11px/1.4 var(--slab); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap;
  border: 1.5px solid currentColor; background: transparent; color: var(--muted);
}
.badge-rc { color: #2f6b2c; background: #e3efd8; }
.badge-au { color: #8a5a00; background: #f6e6bc; }
.badge-mem { color: #6b3c1d; background: #efdccb; }
.badge-sn { color: #5b2a86; background: #ebdff5; }
.badge-pr { color: var(--navy); }

/* Prev / next + versions */
.prevnext { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin: 20px 0 4px; }
.prevnext a { display: grid; padding: 10px 14px; margin-right: 12px; border: 1.5px solid var(--line); border-radius: 4px; background: var(--paper-2); }
.prevnext a:hover { border-color: var(--red); text-decoration: none; }
.prevnext small { font: 600 11px var(--slab); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.prevnext .next { grid-column: -2 / -1; margin-right: 0; }

.card-layout { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .card-layout { grid-template-columns: minmax(0, 1fr) 450px; } }
.section-title { border-bottom: 3px solid var(--red); padding-bottom: 4px; }
.versions { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.versions a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--paper-2); border-left: 4px solid var(--red); color: var(--ink); }
.versions a:hover { text-decoration: none; background: var(--line); }
.versions span { color: var(--muted); font-size: .9em; }
.epn-placement { display: block; width: 100%; max-width: 450px; min-height: 800px; }

/* Browse pages */
.tiles { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tiles.years { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tiles a { display: block; padding: 14px; border: 1.5px solid var(--line); border-top: 5px solid var(--red); border-radius: 4px; background: var(--paper-2); color: var(--ink); }
.tiles a:hover { border-color: var(--red); text-decoration: none; }
.tiles strong { display: block; font: 1.3rem var(--head); font-weight: 400; color: var(--navy); }
.tiles span { display: block; color: var(--muted); font-size: .85rem; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.filter { width: 100%; max-width: 420px; padding: 9px 12px; margin: 0 0 12px; font: inherit; border: 1.5px solid var(--line); border-radius: 4px; background: #fffaf0; color: var(--ink); }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px; border-bottom: 1px dashed var(--line); vertical-align: top; }
thead th { font: 600 12px var(--slab); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 2px solid var(--ink); }
td.num { white-space: nowrap; font: 700 14px var(--slab); color: var(--navy); }
tbody tr:nth-child(even) { background: rgba(120, 90, 40, .05); }

.site-footer { margin-top: 56px; border-top: 5px double var(--line); color: var(--muted); font-size: .85rem; }
.site-footer .wrap { padding-top: 16px; padding-bottom: 28px; }
.site-footer p { margin: 4px 0; }

/* Versions list inside the hero's left column */
.hero-versions .section-title { margin-top: 24px; font-size: 1.15rem; }

/* "Find this card on" buttons */
.find-on { margin-top: 20px; }
.find-title { margin: 0 0 10px; font: 600 15px var(--slab); color: var(--ink); text-transform: none; letter-spacing: 0; }
.find-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.cd-logo { display: inline-flex; align-items: center; justify-content: center; height: 40px; margin: 0; padding: 0 14px; box-sizing: border-box; border: 1px solid #d5d8dc; border-radius: 8px; background: #fff; text-decoration: none !important; vertical-align: top; }
.cd-logo:hover { border-color: #9aa1a8; background: #f6f7f8; }
.cd-logo img { height: 22px; width: auto; display: block; border: 0; }
.cd-logo span { margin-left: 9px; font: 500 13px/1 Helvetica, Arial, sans-serif; color: #555; }
.cd-logo-bsc { background: #000; border-color: #000; padding: 0 10px; }
.cd-logo-bsc:hover { background: #000; border-color: #fec503; }
.cd-logo-bsc img { height: 30px; }

/* Home page collage: scattered pile of real cards */
.home-hero { margin-top: 18px; }
.collage { position: relative; width: 100%; aspect-ratio: 1040 / 430; margin: 14px 0 10px; }
.collage-card {
  position: absolute; width: 13%; height: auto; border-radius: 4px;
  transform: rotate(var(--rot));
  box-shadow: 0 2px 3px rgba(60, 40, 10, .25), 0 10px 22px rgba(60, 40, 10, .25);
  transition: transform .18s ease, box-shadow .18s ease;
}
.collage-card.wide { width: 17%; }
.collage-card:hover { transform: rotate(0deg) scale(1.12); z-index: 99 !important; box-shadow: 0 16px 34px rgba(60, 40, 10, .4); }
@media (max-width: 600px) { .collage { aspect-ratio: 1040 / 470; } }

/* Phones: keep everything inside the screen width */
html, body { overflow-x: hidden; }
@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  .h1-player { font-size: 2rem; }
  .logo-text { font-size: 18px; }
  .sport-nav { gap: 0; }
  .sport-nav a { padding: 8px 7px; font-size: 12px; letter-spacing: .04em; }
  .tiles, .tiles.years { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-hero { overflow: hidden; padding: 0 4px; }
}

/* ---------- Browse pages ---------- */
.section-title .muted { font-family: var(--slab); font-size: .8em; }

/* Sport page: decade jump bar + compact year tiles */
.jumpbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; position: sticky; top: 0; z-index: 5; padding: 8px 0; background: var(--paper); }
.jumpbar a { font: 700 13px var(--slab); padding: 5px 10px; border: 1.5px solid var(--line); border-radius: 3px; background: var(--paper-2); color: var(--navy); }
.jumpbar a:hover { border-color: var(--red); text-decoration: none; }
.decade { scroll-margin-top: 56px; }
.tiles.years { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.tiles.years a { padding: 10px 12px; border-top-width: 4px; }
.tiles.years strong { font-size: 1.35rem; }
.tiles.years span { font-size: .8rem; line-height: 1.4; }

/* Year page */
.title-row { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.year-nav { display: flex; gap: 8px; margin-bottom: 18px; }
.year-nav a { font: 700 14px var(--slab); padding: 7px 12px; border: 1.5px solid var(--line); border-radius: 4px; background: var(--paper-2); }
.year-nav a:hover { border-color: var(--red); text-decoration: none; }
.tiles.sets { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tiles.sets strong { font-size: 1.15rem; line-height: 1.2; margin-bottom: 4px; }
.tiles.sets span { line-height: 1.45; }
.list.columns { columns: 2 320px; column-gap: 36px; }
.list.columns li { break-inside: avoid; display: flex; justify-content: space-between; gap: 12px; }

/* Set page */
.set-facts { margin: 10px 0 8px; }
.tiles.checklists { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.tiles.checklists a { border-top-width: 3px; padding: 11px 14px; }
.tiles.checklists strong { font: 600 1rem/1.3 var(--slab); color: var(--link); margin-bottom: 2px; }
.tiles.checklists.base a { border-top-width: 5px; }
.tiles.checklists.base strong { font: 1.25rem var(--head); color: var(--navy); }
.rookies li { justify-content: flex-start; align-items: baseline; }
.rookies .num { font: 700 13px var(--slab); color: var(--navy); min-width: 48px; }
.rookies .muted { margin-left: auto; }

/* Checklist page */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.chip { font: 600 13px var(--slab); padding: 5px 11px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper-2); color: var(--link); }
.chip:hover { border-color: var(--red); text-decoration: none; }
.chip.current { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.chip.more { background: transparent; }
table.checklist td { vertical-align: middle; }
table.checklist tr.rookie td { background: rgba(47, 107, 44, .07); }
table.checklist tr.rookie td:first-child { box-shadow: inset 3px 0 0 #2f6b2c; }
.team-sm { display: none; }
@media (max-width: 600px) {
  .tiles.sets, .tiles.checklists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles.sets strong { font-size: 1rem; }
  .tiles.sets a, .tiles.checklists a { padding: 10px; }
  table.checklist .team { display: none; }
  .team-sm { display: block; font-size: .82rem; color: var(--muted); }
  table.checklist td:last-child .badge { white-space: normal; }
  .year-nav { margin-bottom: 8px; }
}

/* Wide eBay strip on browse pages */
.ebay-strip { margin: 16px 0 18px; }
.epn-box-wide { width: 100%; height: 222px; overflow: hidden; background: var(--paper); }
.ebay-strip .epn-placement { display: block; width: 100%; height: 100%; min-height: 0; max-width: none; }
/* eBay's iframe paints white; multiply blends that white into the cream box behind it */
.epn-box-wide iframe { mix-blend-mode: multiply; }

/* Note under each decade heading */
.era-note { margin: -2px 0 12px; font-style: italic; color: var(--muted); }
.site-footer .copyright { font-weight: 600; color: var(--ink); }
.site-footer p { max-width: 820px; }
.see-all { margin: 10px 0 0; font: 600 14px var(--slab); }
