/* Card Game Index — single stylesheet, no webfonts, no framework. */

:root {
  --paper: #faf7f0;
  --paper-deep: #f3eee2;
  --surface: #fffdf8;
  --ink: #16181d;
  --ink-soft: #3c4049;
  --muted: #6b6f7a;
  --line: #e6ddcc;
  --line-strong: #d8ccb4;
  --green: #1a5c43;
  --green-soft: #e8f0ea;
  --amber: #8a5314;
  --amber-soft: #f7ecdb;
  --blue: #33486b;
  --blue-soft: #e8edf4;
  --violet: #5b3f8c;
  --violet-soft: #efe9f8;
  --radius: 14px;
  --maxw: 1120px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #d8e6dc; color: var(--ink); }

img, svg { display: block; max-width: 100%; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #0f3f2d; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

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

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

.skip {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: top .15s ease;
}
.skip:focus { top: 12px; color: var(--paper); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 247, 240, .88);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--green);
  color: #f6f2e8;
  font-size: 15px;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: .875rem;
  white-space: nowrap;
}
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--green); }

.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 550;
}
.nav-cta:hover { background: var(--green); }

/* ---------- breadcrumb ---------- */

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 22px;
  font-size: .8rem;
  color: var(--muted);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--green); }
.crumbs span[aria-hidden] { color: #c4bcaa; }

/* ---------- hero ---------- */

.hero { padding: 26px 0 40px; }

.letter-tile {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 2px 0 var(--line);
  color: var(--green);
  font-family: var(--serif);
  font-size: 1.9rem;
  line-height: 1;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.15rem, 5.4vw, 3.6rem);
  line-height: 1.03;
  letter-spacing: -.028em;
  max-width: 18ch;
}

.lede {
  margin: 0;
  max-width: 66ch;
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.lede strong { font-weight: 600; color: var(--ink); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 18px 32px;
  margin: 36px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  max-width: 760px;
}
.stats div { margin: 0; }
.stats dt {
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.stats dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.32rem;
  letter-spacing: -.01em;
}

/* ---------- quick answer ---------- */

.answer {
  background: var(--green-soft);
  border-left: 3px solid var(--green);
  border-radius: 4px 12px 12px 4px;
  padding: 20px 24px;
  margin-bottom: 34px;
}
.answer p { margin: 0; max-width: 78ch; font-size: .97rem; line-height: 1.62; color: #23372c; }
.answer strong { color: #123a2b; }

.eyebrow {
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 650;
  margin: 0 0 8px !important;
}

/* ---------- quick picks ---------- */

.picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
  margin-bottom: 48px;
}

.pick {
  display: block;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.pick:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(40, 34, 20, .05);
}
.pick-label {
  display: block;
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.pick-name {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.25;
}

/* ---------- list + toolbar ---------- */

.list-head { margin-bottom: 18px; }
.list-head h2,
.note h2,
.faq h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 1.85rem);
  letter-spacing: -.018em;
  line-height: 1.15;
}
.list-sub { margin: 0; color: var(--muted); font-size: .92rem; }

.toolbar {
  position: sticky;
  top: 62px;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  margin-bottom: 8px;
  background: linear-gradient(var(--paper) 84%, rgba(250, 247, 240, 0));
}

.search {
  position: relative;
  flex: 1 1 250px;
  max-width: 340px;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: .9rem;
  appearance: none;
}
.search input::placeholder { color: #9a9588; }
.search input:focus {
  border-color: var(--green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 92, 67, .12);
}
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.chip span {
  font-size: .7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.chip.is-active span { color: #b9b3a3; }

.count {
  margin: 0 0 0 auto;
  font-size: .78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 18px 20px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  scroll-margin-top: 140px;
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(40, 34, 20, .06);
}
.card:target {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26, 92, 67, .14);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .63rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  line-height: 1.5;
}
.badge--hobby { background: var(--green-soft); color: var(--green); }
.badge--family { background: var(--amber-soft); color: var(--amber); }
.badge--traditional { background: var(--blue-soft); color: var(--blue); }
.badge--digital { background: var(--violet-soft); color: var(--violet); }

.card-num {
  font-size: .7rem;
  color: #b3ac9c;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.card-title {
  margin: 12px 0 5px;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -.012em;
}

.card-meta {
  margin: 0 0 10px;
  font-size: .78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.card-meta span + span::before {
  content: "\00b7";
  margin: 0 7px;
  color: #c4bcaa;
}

.card-blurb {
  margin: 0 0 12px;
  font-size: .885rem;
  line-height: 1.58;
  color: var(--ink-soft);
}

.card-tags {
  margin: 0;
  font-size: .72rem;
  letter-spacing: .02em;
  color: #938d7e;
}

.card-link {
  margin-top: auto;
  padding-top: 14px;
  font-size: .79rem;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
  align-self: flex-start;
  width: 100%;
}
.card-tags + .card-link { margin-top: 14px; }
.card-link:hover { text-decoration: underline; }

.card[hidden] { display: none; }

.empty {
  margin: 28px 0;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}

/* ---------- note / method ---------- */

.note {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  max-width: 76ch;
}
.note p { margin: 0 0 14px; color: var(--ink-soft); font-size: .95rem; line-height: 1.68; }
.note ul { margin: 0 0 16px; padding-left: 1.15em; color: var(--ink-soft); font-size: .95rem; }
.note li { margin-bottom: 8px; line-height: 1.6; }
.note strong { color: var(--ink); }

/* ---------- faq ---------- */

.faq {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  max-width: 76ch;
}
.faq h2 { margin-bottom: 14px; }

.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: .97rem;
  line-height: 1.45;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.2;
  transition: transform .18s ease;
}
.qa[open] summary::after { content: "\2212"; }
.qa-a { padding: 0 40px 18px 0; }
.qa-a p { margin: 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.65; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 88px;
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
  padding-top: 44px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
}

.footer-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: -.01em;
}
.footer-blurb { margin: 0; max-width: 36ch; font-size: .85rem; color: var(--muted); line-height: 1.6; }

.footer-h {
  margin: 0 0 10px;
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin-bottom: 6px; font-size: .85rem; }
.footer-col a { color: var(--ink-soft); text-decoration: none; }
.footer-col a:hover { color: var(--green); text-decoration: underline; }

.footer-legal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px 26px;
  border-top: 1px solid var(--line-strong);
  font-size: .74rem;
  color: var(--muted);
}
.footer-legal p { margin: 0; }

/* ---------- prose (about / 404) ---------- */

.prose { max-width: 760px; padding-bottom: 20px; }
.prose h1 {
  margin: 22px 0 16px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -.025em;
}
.prose h2 {
  margin: 38px 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -.015em;
}
.prose p { margin: 0 0 14px; color: var(--ink-soft); line-height: 1.72; }
.prose ul { margin: 0 0 16px; padding-left: 1.2em; color: var(--ink-soft); }
.prose li { margin-bottom: 8px; line-height: 1.65; }
.prose .updated { margin-top: 36px; font-size: .82rem; color: var(--muted); }
.prose .eyebrow { margin-bottom: 10px; }

.button {
  display: inline-block;
  margin-top: 6px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--green);
  color: #fbf8f1;
  font-size: .9rem;
  font-weight: 550;
  text-decoration: none;
}
.button:hover { background: #123f2e; color: #fbf8f1; }

/* ---------- A-Z index (hub) ---------- */

.az-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.az-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 15px 16px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.az-tile:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(40, 34, 20, .06);
}
.az-letter {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--green);
}
.az-count { font-size: .71rem; color: var(--muted); }
.az-arrow {
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--green);
  font-size: .9rem;
  opacity: 0;
  transform: translateX(-2px);
  transition: opacity .18s ease, transform .18s ease;
}
.az-tile:hover .az-arrow { opacity: 1; transform: translateX(0); }

.az-tile--soon {
  background: transparent;
  border-color: transparent;
  cursor: default;
  opacity: .5;
}
.az-tile--soon .az-letter { color: #c9c2b2; }
.az-tile--soon .az-count { color: #b3ac9c; }

/* ---------- letters nav (letter pages) ---------- */

.letters-nav {
  margin-top: 34px;
  padding-top: 0;
}
.letters-nav-title {
  margin: 0 0 14px;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.letters-nav-row { display: flex; flex-wrap: wrap; gap: 8px; }

.letter-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.letter-pill span { font-size: .7rem; font-weight: 400; color: var(--muted); }
.letter-pill:hover { border-color: var(--ink); color: var(--ink); }
.letter-pill.is-current { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.letter-pill.is-current span { color: #b9b3a3; }
.letter-pill--all { border-style: dashed; font-weight: 400; }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 20px 0 30px; }
  .hero h1 { max-width: none; }
  .stats { gap: 16px 20px; margin-top: 26px; }
  .stats dd { font-size: 1.15rem; }
  .toolbar {
    position: static;
    padding: 12px 0 4px;
    margin-bottom: 10px;
    background: none;
  }
  .count { margin-left: 0; width: 100%; }
  .search { max-width: none; }
  .picks {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin: 0 -18px 40px;
    padding: 0 18px 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .picks::-webkit-scrollbar { display: none; }
  .pick { flex: 0 0 78%; scroll-snap-align: start; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-legal { flex-direction: column; gap: 4px; }
  .card { padding: 16px 16px 18px; }
  .az-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; }
  .az-tile { padding: 12px 13px 11px; }
  .az-letter { font-size: 1.3rem; }
  .letters-nav { margin-top: 44px; }
  .header-inner { gap: 10px; }
  .brand { font-size: .98rem; gap: 8px; }
  .brand-mark { width: 26px; height: 26px; border-radius: 7px; font-size: 13px; }
  .site-nav { gap: 10px; font-size: .82rem; }
  .nav-cta { padding: 7px 12px; }
}

@media (max-width: 460px) {
  .brand { font-size: .9rem; }
  .brand-mark { width: 24px; height: 24px; font-size: 12px; }
  .site-nav { gap: 8px; font-size: .78rem; }
  .nav-cta { padding: 6px 10px; }
  .footer-inner { grid-template-columns: 1fr; }
  .chips { width: 100%; }
}

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