/* ==========================================================================
   Dogflation — design system
   ========================================================================== */

/* ---------- Tokens --------------------------------------------------------- */

:root {
  /* Palette */
  --canvas: #FBF7EF;
  --canvas-2: #F4EEDF;
  --ink: #1A1A1A;
  --ink-soft: #2A2A2A;
  --muted: #E8DFC9;
  --muted-deep: #D8CDB3;
  --mustard: #F2A413;
  --mustard-soft: #FFD173;
  --ketchup: #C0392B;
  --relish: #6B8E23;
  --hairline: rgba(26, 26, 26, 0.12);
  --hairline-strong: rgba(26, 26, 26, 0.42);

  /* Confidence dot colors */
  --dot-verified: #4F8E3D;
  --dot-reported: #888888;
  --dot-crowdsourced: var(--mustard);
  --dot-stale: var(--ketchup);

  /* Typography */
  --font-display: "Fraunces", Georgia, serif;
  --font-impact: "Dela Gothic One", "Fraunces", Georgia, serif;
  --font-body: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  /* Type scale */
  --fs-display: clamp(28px, 9vw, 132px);
  --fs-h1: clamp(40px, 6vw, 72px);
  --fs-h2: clamp(26px, 3.5vw, 44px);
  --fs-h3: 22px;
  --fs-body: 16px;
  --fs-small: 13.5px;
  --fs-eyebrow: 11px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Layout */
  --content-max: 1200px;
  --content-pad: clamp(16px, 4vw, 44px);
  --ticker-height: 32px;
  --nav-height: 64px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-micro: 160ms;
  --dur-comp: 320ms;
  --dur-hero: 1000ms;

  /* Radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-block: 5px 5px 0 var(--ink);
  --shadow-block-lg: 8px 8px 0 var(--ink);
}

/* ---------- Reset / base --------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  background-image:
    radial-gradient(rgba(26,26,26,0.05) 1px, transparent 1px),
    radial-gradient(rgba(26,26,26,0.035) 1px, transparent 1px);
  background-size: 28px 28px, 9px 9px;
  background-position: 0 0, 4px 4px;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--ketchup); }
.numeric, .price { font-variant-numeric: tabular-nums; }
::selection { background: var(--mustard); color: var(--ink); }

/* ---------- Layout primitives --------------------------------------------- */

.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--content-pad);
}

section { padding-block: var(--space-8); }
@media (max-width: 720px) { section { padding-block: var(--space-6); } }
#methodology-summary { border-top: 2px solid var(--ink); }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  border-bottom: 3px double var(--ink);
  padding-bottom: var(--space-3);
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.7;
}

.divider-zig {
  height: 18px;
  width: 100%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='18' viewBox='0 0 40 18' preserveAspectRatio='none'><path d='M0 9 L10 3 L20 15 L30 3 L40 9' fill='none' stroke='%23F2A413' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.55'/></svg>");
  background-repeat: repeat-x;
  background-size: 40px 18px;
  margin-block: var(--space-7);
}

/* ---------- Headings ------------------------------------------------------ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0;
}
h1 { font-size: var(--fs-h1); }
h2 {
  font-family: var(--font-impact);
  font-weight: 400;
  font-size: var(--fs-h2);
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
h2 em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  text-transform: none;
  letter-spacing: -0.02em;
}
h3 { font-size: var(--fs-h3); }

/* ---------- Ticker --------------------------------------------------------- */

.ticker {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--canvas);
  height: var(--ticker-height);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 2px solid var(--mustard);
}
.ticker-track {
  display: flex;
  gap: var(--space-7);
  white-space: nowrap;
  animation: ticker-scroll 200s linear infinite;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ticker-item { display: inline-flex; align-items: center; gap: 12px; }
.ticker-item::after {
  content: "";
  display: inline-block;
  width: 16px; height: 6px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='6' viewBox='0 0 16 6'><path d='M0 3 L4 1 L8 5 L12 1 L16 3' fill='none' stroke='%23F2A413' stroke-width='1.4' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  margin-left: 18px;
}
.ticker-up { color: #B6D7A8; }
.ticker-down { color: #E8A89D; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Nav ------------------------------------------------------------ */

.nav {
  position: sticky;
  top: var(--ticker-height);
  z-index: 40;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(251, 247, 239, 0.88);
  border-bottom: 1px solid var(--hairline);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: var(--nav-height);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-impact);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { width: 32px; height: 32px; }
.nav-links { display: flex; gap: var(--space-5); align-items: center; }
.nav-links a {
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: var(--ink-soft);
  padding: 6px 2px;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--ink);
  color: var(--canvas) !important;
  padding: 8px 14px !important;
  border-radius: var(--r-pill);
}
.nav-cta:hover { background: var(--mustard); color: var(--ink) !important; }
@media (max-width: 640px) {
  .brand { font-size: 17px; gap: 8px; }
  .brand-mark { width: 26px; height: 26px; }
  .nav-links { gap: var(--space-3); }
  .nav-links a { font-size: 11px; letter-spacing: 0.06em; padding: 6px 0; }
}
@media (max-width: 380px) {
  .nav-links { gap: var(--space-2); }
  .nav-links a { font-size: 10px; letter-spacing: 0.04em; }
}

/* ---------- Hero ----------------------------------------------------------- */

.hero {
  padding-block: var(--space-9) var(--space-7);
  border-bottom: 2px solid var(--ink);
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: var(--space-4);
  display: flex; gap: 16px; align-items: center;
}
.hero-eyebrow::before {
  content: "";
  width: 36px; height: 2px;
  background: var(--ink);
  flex-shrink: 0;
}
.hero-headline {
  font-family: var(--font-impact);
  font-weight: 400;
  font-size: var(--fs-display);
  letter-spacing: -0.005em;
  line-height: 0.88;
  text-transform: uppercase;
  margin: 0 0 var(--space-5);
}
.hero-sub {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(17px, 2.2vw, 26px);
  line-height: 1.3;
  color: var(--ink-soft);
  max-width: 44ch;
  margin-bottom: var(--space-5);
}

/* Rotating fun-fact strip */
.hero-facts {
  position: relative;
  min-height: 2em;
  margin-bottom: var(--space-7);
  max-width: 60ch;
}
.hero-fact {
  position: absolute;
  top: 0; left: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  opacity: 0;
  animation: fact-cycle 50s infinite;
}
.hero-fact:nth-child(1)  { animation-delay: 0s; }
.hero-fact:nth-child(2)  { animation-delay: 5s; }
.hero-fact:nth-child(3)  { animation-delay: 10s; }
.hero-fact:nth-child(4)  { animation-delay: 15s; }
.hero-fact:nth-child(5)  { animation-delay: 20s; }
.hero-fact:nth-child(6)  { animation-delay: 25s; }
.hero-fact:nth-child(7)  { animation-delay: 30s; }
.hero-fact:nth-child(8)  { animation-delay: 35s; }
.hero-fact:nth-child(9)  { animation-delay: 40s; }
.hero-fact:nth-child(10) { animation-delay: 45s; }
@keyframes fact-cycle {
  0%, 100% { opacity: 0; }
  2%, 8%   { opacity: 0.7; }
  10%      { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-fact { animation: none; opacity: 0; }
  .hero-fact:first-child { opacity: 0.7; }
}

/* Hero 4-stat grid */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-block);
}
.hero-stat-cell {
  padding: 28px 24px 24px;
  border-right: 1px solid var(--ink);
  background: var(--canvas);
}
.hero-stat-cell:last-child { border-right: 0; }
.hero-stat-number {
  font-family: var(--font-impact);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 50px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hero-stat-desc {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.6;
  margin-top: 8px;
  line-height: 1.6;
  max-width: 220px;
}
@media (max-width: 820px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat-cell:nth-child(2) { border-right: 0; }
  .hero-stat-cell:nth-child(3) { border-top: 1px solid var(--ink); }
  .hero-stat-cell:nth-child(4) { border-top: 1px solid var(--ink); border-right: 0; }
}
@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat-cell { border-right: 0; border-top: 1px solid var(--ink); }
  .hero-stat-cell:first-child { border-top: 0; }
}
@media (max-width: 640px) {
  .hero { padding-block: var(--space-6) var(--space-5); }
  .hero-eyebrow { margin-bottom: var(--space-3); }
}

/* ---------- Editorial bar ------------------------------------------------- */

.editorial-bar {
  background: var(--ink);
  color: var(--canvas);
  padding: var(--space-8) 0;
}
.editorial-bar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.5;
  margin-bottom: var(--space-4);
}
.editorial-bar-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.5vw, 30px);
  line-height: 1.35;
  max-width: 54ch;
  margin: 0;
}

/* ---------- Tale of Two Ballparks ----------------------------------------- */

.tale-intro {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 var(--space-6);
}
.tale-footnote {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-soft);
  opacity: 0.65;
  margin: var(--space-4) 0 0;
  max-width: 80ch;
}
.tale-footnote a {
  color: inherit;
}
.tale-asterisk {
  color: var(--mustard);
  font-weight: 700;
}
.tale-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}
@media (max-width: 680px) { .tale-lists { grid-template-columns: 1fr; } }

.tale-list-card {
  background: var(--canvas-2);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-block);
}
.tale-list-header {
  padding: 12px 18px;
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.tale-list-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
}
.tale-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  background: var(--ink);
  color: var(--canvas);
  white-space: nowrap;
}
.tale-list-body { padding: 0 18px; }
.tale-list-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
.tale-list-row:last-child { border-bottom: 0; }
.tale-list-rank {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.45;
}
.tale-list-park-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
}
.tale-list-team {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.6;
  margin-top: 2px;
}
.tale-list-price {
  font-family: var(--font-impact);
  font-weight: 400;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Toolbar -------------------------------------------------------- */

.toolbar-sticky {
  position: sticky;
  top: calc(var(--ticker-height) + var(--nav-height));
  z-index: 30;
  background: var(--canvas);
  padding-block: 14px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: var(--space-6);
  /* Pull out to full wrap width */
  margin-inline: calc(-1 * var(--content-pad));
  padding-inline: var(--content-pad);
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  max-width: var(--content-max);
  margin-inline: auto;
}
.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.search-box::before {
  content: "⌕";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  opacity: 0.45;
  pointer-events: none;
  line-height: 1;
}
.search-box input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: 2px solid var(--ink);
  background: var(--canvas);
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: box-shadow var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.search-box input:focus {
  box-shadow: var(--shadow-block);
  transform: translate(-2px, -2px);
}
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }

.filter-group {
  display: flex;
  flex-wrap: wrap;
  border: 2px solid var(--ink);
}
.filter-btn {
  background: var(--canvas);
  border: 0;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid transparent;
  padding: 9px 13px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-micro), color var(--dur-micro);
  line-height: 1;
}
.filter-btn:last-child { border-right: 0; }
.filter-btn:hover:not(.active) { background: var(--muted); }
.filter-btn.active { background: var(--ink); color: var(--canvas); }

@media (max-width: 640px) {
  .filter-group {
    border: 0;
    gap: 6px;
  }
  .filter-btn,
  .filter-btn:last-child {
    border: 1px solid var(--ink);
    border-radius: var(--r-pill);
    padding: 7px 12px;
    font-size: 10.5px;
  }
}

/* ---------- Card grid ------------------------------------------------------ */

.directory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.directory-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-9) var(--space-5);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
  opacity: 0.7;
}

/* ---------- Baseball card -------------------------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--ink);
  background: var(--canvas);
  box-shadow: var(--shadow-block);
  cursor: pointer;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
  overflow: hidden;
  /* No aspect-ratio: let content determine height */
}
.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-block-lg);
}
.card:focus-visible {
  outline: 3px solid var(--mustard);
  outline-offset: 2px;
}

.card-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  background: var(--canvas-2);
  flex-shrink: 0;
}
.card-team {
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.25;
}
.card-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  opacity: 0.45;
  flex-shrink: 0;
  padding-top: 1px;
}

/* Illustration "photo" area — team-color tinted via inline style */
.card-illustration {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: var(--canvas-2); /* overridden inline per card */
  border-bottom: 1px solid var(--ink);
  flex-shrink: 0;
}
.card-yoy-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: var(--r-pill);
  line-height: 1.4;
}
.card-yoy-badge.is-up   { background: var(--ketchup); color: #fff; }
.card-yoy-badge.is-down { background: var(--relish);  color: #fff; }

/* Nameplate */
.card-nameplate {
  padding: 14px 14px 10px;
  text-align: center;
  border-bottom: 1px solid var(--ink);
  flex-shrink: 0;
}
.card-price {
  font-family: var(--font-impact);
  font-weight: 400;
  font-size: 40px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.card-unit {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.5;
  margin-top: 4px;
}
.card-park-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.25;
  margin-top: 8px;
}
.card-city-name {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.5;
  margin-top: 3px;
}

/* Stats footer — 2×2 grid for rank, vs avg, $/in, yoy */
.card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  padding: 10px 14px 12px;
  gap: 8px 12px;
  flex-shrink: 0;
}
.card-stat { display: flex; flex-direction: column; gap: 2px; }
.card-stat-label {
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.45;
  line-height: 1;
}
.card-stat-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}
.card-stat-val.is-up { color: var(--ketchup); }
.card-stat-val.is-down { color: var(--relish); }
.card-stat-val.is-no-data {
  color: var(--ink-soft);
  opacity: 0.55;
  font-style: italic;
  font-size: 11px;
}

/* Deal night strip */
.card-deal {
  background: var(--mustard);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border-top: 2px solid var(--ink);
  line-height: 1.5;
  flex-grow: 1;
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.card-deal-badge {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 9px;
  background: var(--ink);
  color: var(--mustard);
  padding: 2px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- Modal ---------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--dur-comp) var(--ease-out);
}
.modal-overlay.is-visible { opacity: 1; }

.modal {
  background: var(--canvas);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-block-lg);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(12px);
  transition: transform var(--dur-comp) var(--ease-out);
}
.modal-overlay.is-visible .modal { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--ink);
  color: var(--canvas);
  border: 0;
  width: 32px;
  height: 32px;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--dur-micro);
}
.modal-close:hover { background: var(--ketchup); }

.modal-head {
  padding: 28px 56px 20px 28px; /* right padding for close btn */
  border-bottom: 2px solid var(--ink);
}
.modal-team {
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.modal-park {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 3px;
}

.modal-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: var(--canvas-2);
  border-bottom: 1px solid var(--ink);
}

.modal-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 2px solid var(--ink);
}
.modal-stat-cell {
  padding: 16px 20px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.modal-stat-cell:nth-child(even) { border-right: 0; }
.modal-stat-cell:nth-last-child(-n+2) { border-bottom: 0; }
.modal-stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.5;
}
.modal-stat-value {
  font-family: var(--font-impact);
  font-weight: 400;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-top: 4px;
}
.modal-stat-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.55;
  margin-top: 2px;
}

.modal-context {
  padding: 20px 24px;
  border-bottom: 2px solid var(--ink);
}
.modal-context-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.5;
  margin-bottom: var(--space-3);
}
.modal-context-table {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 16px;
}
.modal-context-dt {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.5;
  padding-top: 1px;
  line-height: 1.4;
}
.modal-context-dd {
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
}
.modal-context-dt.is-deal,
.modal-context-dd.is-deal {
  background: var(--mustard-soft);
  color: var(--ink);
  padding: 6px 10px;
  margin: -2px 0;
  font-weight: 600;
  opacity: 1;
}
.modal-context-dt.is-deal {
  box-shadow: 16px 0 0 var(--mustard-soft);
}

.price-ladder {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.4;
}
.price-ladder-row {
  display: grid;
  grid-template-columns: 44px 64px 1fr;
  gap: 12px;
  align-items: baseline;
}
.price-ladder-row.is-current {
  font-weight: 700;
}
.price-ladder-row.is-missing {
  opacity: 0.45;
}
.price-ladder-year {
  letter-spacing: 0.05em;
  opacity: 0.6;
}
.price-ladder-amt {
  font-variant-numeric: tabular-nums;
}
.price-ladder-delta {
  font-size: 11px;
  letter-spacing: 0.04em;
}
.price-ladder-delta.is-up   { color: var(--ketchup); }
.price-ladder-delta.is-down { color: var(--relish); }
.price-ladder-delta.is-flat { opacity: 0.55; }
.price-ladder-no-basis {
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: italic;
  opacity: 0.6;
}
.price-ladder-spacer {
  font-size: 11px;
  opacity: 0.4;
  font-style: italic;
}

.modal-cta {
  padding: 20px 24px;
}

/* ---------- Confidence dots ----------------------------------------------- */

.dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  vertical-align: 1px;
  margin-right: 6px;
}
.dot.is-verified { background: var(--dot-verified); }
.dot.is-reported { background: var(--dot-reported); }
.dot.is-crowdsourced { background: var(--dot-crowdsourced); }
.dot.is-stale, .dot.is-needs_review { background: var(--dot-stale); }

/* ---------- Tags ----------------------------------------------------------- */

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid var(--hairline);
  color: var(--ink-soft);
  white-space: nowrap;
}
.tag.is-included { color: var(--relish); border-color: var(--relish); }
.tag.is-extra { color: var(--ketchup); border-color: var(--ketchup); }

/* ---------- Year-over-year ------------------------------------------------- */

.yoy { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--ink-soft); }
.yoy.is-up { color: var(--ketchup); }
.yoy.is-down { color: var(--relish); }

/* ---------- Methodology grid ---------------------------------------------- */

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}
@media (max-width: 860px) { .methodology-grid { grid-template-columns: 1fr; } }

.methodology-card {
  background: var(--canvas-2);
  border: 2px solid var(--ink);
  padding: var(--space-5) var(--space-5) var(--space-5);
  box-shadow: 4px 4px 0 var(--ink);
}
.methodology-card-label {
  font-family: var(--font-impact);
  font-weight: 400;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--hairline-strong);
}
.methodology-card p {
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
  color: var(--ink-soft);
}
.methodology-steps {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  counter-reset: step;
}
.methodology-steps li {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  counter-increment: step;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.methodology-steps li::before {
  content: counter(step);
  font-family: var(--font-impact);
  font-size: 11px;
  background: var(--ink);
  color: var(--canvas);
  width: 18px; height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.methodology-confidence {
  list-style: none;
  padding: 0; margin: 0 0 var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.methodology-confidence li {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.methodology-note {
  font-size: 12px;
  color: var(--ink-soft);
  opacity: 0.7;
  margin: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}
.methodology-footer {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  opacity: 0.8;
}
.methodology-footer a { color: var(--ink); }
.methodology-footer a:hover { color: var(--ketchup); }

/* ---------- Methodology / Submit / Footer ---------------------------------- */

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.7;
}
.prose p { margin: 0 0 1.1em; }
.prose h3 {
  font-family: var(--font-impact);
  font-weight: 400;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-top: 2em;
  margin-bottom: 0.6em;
}
.prose strong { font-weight: 600; }

.submit {
  background: var(--canvas-2);
  border: 2px solid var(--ink);
  padding: var(--space-7) var(--space-6);
  box-shadow: var(--shadow-block);
}
.submit iframe { width: 100%; min-height: 420px; border: 0; background: var(--canvas); }

footer {
  border-top: 2px solid var(--ink);
  padding-block: var(--space-7);
  font-size: 13.5px;
  color: var(--ink-soft);
  background: var(--canvas-2);
}
footer a { color: var(--ink-soft); }
footer .footer-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
}
footer .footer-disclosure { max-width: 60ch; opacity: 0.75; font-size: 12.5px; }

/* ---------- Buttons -------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  background: var(--ink);
  color: var(--canvas);
  border: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-micro);
  width: 100%;
}
.btn:hover { background: var(--mustard); color: var(--ink); }

/* ---------- Sources -------------------------------------------------------- */

.sources-list {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3) var(--space-6);
}
@media (max-width: 720px) { .sources-list { grid-template-columns: 1fr; } }
.sources-list li {
  border-bottom: 1px solid var(--hairline);
  padding: 10px 0;
  font-size: 14px;
}
.sources-list a { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--hairline); }
.sources-list a:hover { color: var(--ketchup); border-bottom-color: var(--ketchup); }

/* ---------- Reduced motion ------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ticker-track { animation: none; }
}

/* ---------- Print cheat sheet --------------------------------------------- */

@media print {
  .ticker, .nav, #methodology-summary, footer,
  .toolbar-sticky, .hero-facts, .modal-overlay { display: none !important; }

  body {
    background: #fff;
    background-image: none;
    color: #000;
    font-size: 11pt;
  }

  .hero { padding-block: 12pt; border-bottom: 2pt solid #000; }
  .hero-headline { font-size: 36pt; }
  .hero-sub { font-size: 11pt; }
  .hero-stats { box-shadow: none; border: 1pt solid #000; }
  .hero-stat-number { font-size: 18pt; }

  #tale { page-break-after: always; }
  .tale-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16pt; }

  #directory { padding-block: 8pt; }
  .directory {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8pt !important;
  }
  .card {
    border: 1pt solid #000 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  .card-illustration { padding: 8pt; }
  .card-price { font-size: 16pt; }

  footer.print-only {
    display: block !important;
    text-align: center;
    font-size: 9pt;
    padding-top: 8pt;
    border-top: 1pt solid #ccc;
  }
}
