/* ============================================================
   METS ON FIRE — night game at Citi Field meets vintage cardboard
   Palette (validated vs surface #0A1433):
     tiers  #5FC9F8 ice · #4B7BC8 cool · #F6D65C warm · #FB7A24 hot · #D62839 blazing
     brand  #002D72 mets blue · #FF5910 mets orange
   ============================================================ */

:root {
  --navy-deep: #050C24;
  --surface: #0A1433;
  --surface-2: #101C42;
  --surface-3: #17255A;
  --mets-blue: #002D72;
  --mets-orange: #FF5910;
  --orange-hot: #FB7A24;
  --cream: #F4E9D0;
  --cream-dim: #E4D6B4;
  --ink: #F2F5FF;
  --ink-2: #A9B4D6;
  --ink-3: #6B77A3;
  --card-navy-ink: #0E1B45;
  --tier: var(--orange-hot);
  --font-display: 'Graduate', serif;
  --font-body: 'Barlow Semi Condensed', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: radial-gradient(120% 90% at 50% -10%, #12235C 0%, var(--surface) 38%, var(--navy-deep) 100%) fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- atmosphere layers ---- */
.pinstripes {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(90deg,
    transparent 0 26px, rgba(255,255,255,0.028) 26px 28px);
}
.grain {
  position: fixed; inset: -50%; pointer-events: none; z-index: 1; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 9s steps(6) infinite;
}
@keyframes grain-shift {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); }
  40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-2%); }
  80% { transform: translate(3%,3%); }
}

main, header, footer { position: relative; z-index: 2; }

/* ============================================================ MASTHEAD */
.masthead {
  text-align: center;
  padding: 3.2rem 1rem 0;
  border-bottom: 3px solid var(--mets-orange);
  background:
    linear-gradient(180deg, rgba(0,45,114,0.35) 0%, transparent 70%);
}
.masthead-inner { position: relative; max-width: 1100px; margin: 0 auto; }

.ticket-stub {
  position: absolute; top: -1.4rem; left: 0;
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 14px;
  border: 1.5px dashed var(--ink-3);
  border-radius: 6px;
  transform: rotate(-4deg);
  color: var(--ink-2);
  font-size: 0.68rem; letter-spacing: 0.18em;
}
.stub-season { color: var(--orange-hot); }

.wordmark {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 9vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  display: flex; justify-content: center; align-items: baseline; gap: 0.35em;
  animation: rise-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.wm-mets {
  color: var(--ink);
  text-shadow: 0 3px 0 var(--mets-blue), 0 6px 18px rgba(0,45,114,0.8);
}
.wm-on {
  font-size: 0.38em;
  color: var(--ink-2);
  border: 2px solid var(--ink-3);
  border-radius: 50%;
  padding: 0.42em 0.34em;
  transform: translateY(-0.35em);
}
.wm-fire {
  background: linear-gradient(180deg, #F6D65C 0%, var(--orange-hot) 45%, var(--mets-orange) 70%, #D62839 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 18px rgba(255,89,16,0.45));
  animation: flame-pulse 2.6s ease-in-out infinite;
}
@keyframes flame-pulse {
  0%,100% { filter: drop-shadow(0 0 14px rgba(255,89,16,0.35)); }
  50%     { filter: drop-shadow(0 0 26px rgba(255,89,16,0.65)); }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.tagline {
  margin-top: 0.7rem;
  color: var(--ink-2);
  letter-spacing: 0.34em;
  font-size: clamp(0.58rem, 1.6vw, 0.78rem);
  font-weight: 600;
  animation: rise-in 0.7s 0.15s cubic-bezier(0.2,0.8,0.2,1) both;
}

/* ---- level nav: outfield-wall tabs ---- */
.level-nav {
  margin-top: 2rem;
  display: flex; justify-content: center; flex-wrap: wrap;
}
.level-tab {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 0.65rem 1.5rem 0.8rem;
  text-decoration: none;
  color: var(--ink-2);
  border: 1px solid transparent; border-bottom: none;
  border-radius: 10px 10px 0 0;
  transition: color 0.2s, background 0.2s;
}
.level-tab:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.level-tab.active {
  color: var(--ink);
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 -6px 24px rgba(255,89,16,0.12) inset;
}
.level-tab.active .tab-level { color: var(--mets-orange); }
.tab-level { font-family: var(--font-display); font-size: 1.05rem; }
.tab-team { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* ============================================================ PAGE */
main { max-width: 1240px; margin: 0 auto; padding: 2.2rem 1.4rem 4rem; }

.level-head { text-align: center; margin-bottom: 1.8rem; animation: rise-in 0.5s both; }
.level-title { font-family: var(--font-display); font-size: clamp(1.4rem, 4vw, 2.2rem); letter-spacing: 0.04em; }
.level-sub { color: var(--ink-3); font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; margin-top: 0.3rem; }

/* ---- team heat hero ---- */
.team-hero {
  display: grid;
  grid-template-columns: minmax(210px, auto) 1fr;
  gap: 24px;
  align-items: center;
  background: linear-gradient(160deg, var(--surface-3), var(--surface-2));
  border: 1px solid rgba(255,255,255,0.12);
  border-top: 3px solid var(--tier, var(--mets-orange));
  border-radius: 12px;
  padding: 1.1rem 1.5rem;
  margin-bottom: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  animation: rise-in 0.5s both;
}
.team-hero-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  color: var(--orange-hot);
}
.team-heat-num {
  font-family: var(--font-display);
  font-size: 4.2rem; line-height: 1;
  margin: 0.25rem 0 0.4rem;
  color: var(--ink);
}
.team-heat-num span { font-size: 1rem; color: var(--ink-3); margin-left: 4px; }
.team-hero-meta { display: flex; align-items: center; gap: 12px; }
.team-tier-chip {
  background: var(--card-navy-ink); color: var(--ink);
  font-size: 0.64rem; font-weight: 800; letter-spacing: 0.16em;
  padding: 3px 10px; border-radius: 4px;
  box-shadow: inset 0 0 0 1.5px var(--tier);
}
.team-hero-meta .delta { color: var(--ink-2); font-size: 0.85rem; font-weight: 800; }
.team-hero-meta .delta.up { color: #7BD98F; }
.team-hero-meta .delta.down { color: #FF8896; }
.team-hero-meta .delta small { color: var(--ink-3); font-weight: 600; }
.team-hero-chart { min-width: 0; overflow-x: auto; }
.team-chart { display: block; width: 100%; height: auto; }

@media (max-width: 760px) {
  .team-hero { grid-template-columns: 1fr; gap: 8px; padding: 1rem 1.1rem; }
  /* keep axis labels legible: let the chart scroll sideways instead of shrinking */
  .team-chart { min-width: 560px; }
}

/* ---- summary tiles ---- */
.summary-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px; margin-bottom: 1.6rem;
}
.tile {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  animation: rise-in 0.5s both;
}
.tile:nth-child(2) { animation-delay: 0.06s; }
.tile:nth-child(3) { animation-delay: 0.12s; }
.tile:nth-child(4) { animation-delay: 0.18s; }
.tile-label { font-size: 0.62rem; letter-spacing: 0.24em; color: var(--ink-3); font-weight: 700; }
.tile-value { font-family: var(--font-display); font-size: 1.9rem; margin: 0.15rem 0 0.05rem; }
.tile-name { font-size: 0.86rem; color: var(--ink-2); font-weight: 600; }
.tile-hot  .tile-value { color: var(--orange-hot); }
.tile-cold .tile-value { color: #5FC9F8; }
.tile-rise .tile-value { color: #F6D65C; }
.tile-fall .tile-value { color: #4B7BC8; }

/* ---- filter row ---- */
.filter-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 2rem; }
.seg { display: inline-flex; border: 1px solid rgba(255,255,255,0.14); border-radius: 999px; overflow: hidden; }
.seg-btn {
  appearance: none; border: none; background: transparent; cursor: pointer;
  color: var(--ink-2); font-family: var(--font-body); font-weight: 700;
  font-size: 0.72rem; letter-spacing: 0.16em; padding: 0.5rem 1.1rem;
  transition: background 0.15s, color 0.15s;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { background: var(--mets-orange); color: #16070A; }

/* ============================================================ TIERS */
.tier-section { margin-bottom: 2.6rem; }
.tier-head { display: flex; align-items: center; gap: 12px; margin-bottom: 1.1rem; }
.tier-flames { font-size: 0.9rem; letter-spacing: -2px; }
.tier-name { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: 0.08em; }
.tier-count {
  font-size: 0.7rem; font-weight: 700; color: var(--ink-2);
  border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; padding: 1px 9px;
}
.tier-rule { flex: 1; height: 2px; border-radius: 2px; opacity: 0.5; }
.tier-blazing .tier-name { color: #FF8896; } .tier-blazing .tier-rule { background: linear-gradient(90deg, #D62839, transparent); }
.tier-hot     .tier-name { color: #FB7A24; } .tier-hot     .tier-rule { background: linear-gradient(90deg, #FB7A24, transparent); }
.tier-warm    .tier-name { color: #F6D65C; } .tier-warm    .tier-rule { background: linear-gradient(90deg, #F6D65C, transparent); }
.tier-cool    .tier-name { color: #7FA6E0; } .tier-cool    .tier-rule { background: linear-gradient(90deg, #4B7BC8, transparent); }
.tier-ice     .tier-name { color: #5FC9F8; } .tier-ice     .tier-rule { background: linear-gradient(90deg, #5FC9F8, transparent); }

/* ============================================================ CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 22px;
}

.bcard {
  perspective: 1400px;
  cursor: pointer;
  outline: none;
  height: 428px;
  animation: rise-in 0.55s both;
}
.card-grid .bcard:nth-child(2)  { animation-delay: 0.04s; }
.card-grid .bcard:nth-child(3)  { animation-delay: 0.08s; }
.card-grid .bcard:nth-child(4)  { animation-delay: 0.12s; }
.card-grid .bcard:nth-child(5)  { animation-delay: 0.16s; }
.card-grid .bcard:nth-child(n+6){ animation-delay: 0.2s; }

.bcard-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.3, 0.9, 0.3, 1);
}
.bcard:hover .bcard-inner { transform: translateY(-6px) rotate(0.4deg); }
.bcard.flipped .bcard-inner { transform: rotateY(180deg); }
.bcard.flipped:hover .bcard-inner { transform: rotateY(180deg) translateY(-6px); }
.bcard:focus-visible .bcard-inner { box-shadow: 0 0 0 3px var(--mets-orange); border-radius: 14px; }

.bcard-face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.06);
}
.bcard:hover .bcard-face { box-shadow: 0 18px 40px rgba(0,0,0,0.6), 0 0 26px -6px var(--tier); }

/* ---- FRONT: vintage cream cardboard ---- */
.bcard-front {
  background: linear-gradient(165deg, var(--cream) 0%, var(--cream-dim) 100%);
  color: var(--card-navy-ink);
}
.bcard-front .bcard-frame {
  position: absolute; inset: 9px;
  border: 2px solid var(--card-navy-ink);
  border-radius: 8px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.bcard-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 10px;
  font-weight: 800; font-size: 0.72rem; letter-spacing: 0.1em;
}
.bcard-rank { font-family: var(--font-display); font-size: 0.82rem; }
.bcard-pos { color: #5B4F33; }

.bcard-photo {
  position: relative;
  margin: 0 8px;
  height: 172px;
  border: 2px solid var(--card-navy-ink);
  border-radius: 5px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,0.05) 14px 15.5px),
    radial-gradient(100% 120% at 50% 0%, #1B2F6E 0%, var(--mets-blue) 60%, #021A45 100%);
}
.bcard-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 32%;
  filter: saturate(1.05) contrast(1.03);
  transition: transform 0.4s ease;
}
.bcard:hover .bcard-photo img { transform: scale(1.045); }

.bcard-nameplate {
  margin: 8px 8px 0;
  background: var(--mets-orange);
  color: #FFF6E8;
  border: 2px solid var(--card-navy-ink);
  border-radius: 4px;
  text-align: center;
  padding: 3px 6px;
  font-family: var(--font-display);
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}

.bcard-heatrow {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 12px 3px;
}
.bcard-heat { display: flex; flex-direction: column; }
.bcard-heat > div { display: flex; align-items: baseline; gap: 2px; }
.heat-szn { font-size: 0.56rem; font-weight: 800; letter-spacing: 0.1em; color: #5B4F33; }
.heat-num { font-family: var(--font-display); font-size: 2.1rem; line-height: 1; }
.heat-of { font-size: 0.7rem; font-weight: 700; color: #5B4F33; }
.bcard-tier { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.tier-chip {
  background: var(--card-navy-ink); color: var(--cream);
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.18em;
  padding: 2px 8px; border-radius: 3px;
  box-shadow: inset 0 0 0 1.5px var(--tier);
}
.delta { font-size: 0.74rem; font-weight: 800; color: #5B4F33; }
.delta.up { color: #0B6B35; }
.delta.down { color: #A81E2B; }
.delta small { font-weight: 600; color: #5B4F33; }

.bcard-spark {
  margin: 4px 8px 0;
  background: var(--surface-2);
  border: 2px solid var(--card-navy-ink);
  border-radius: 4px;
  padding: 3px 4px 1px;
}
.spark { display: block; width: 100%; height: 38px; }
.spark-mid { stroke: rgba(255,255,255,0.22); stroke-width: 1; stroke-dasharray: 3 3; }

.bcard-statline {
  text-align: center;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em;
  color: #4A402D;
  padding: 4px 6px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bcard-statline:last-of-type { padding-bottom: 6px; }

/* ---- BACK: night-mode stat card ---- */
.bcard-back {
  background: linear-gradient(165deg, var(--surface-3), var(--surface-2));
  color: var(--ink);
  transform: rotateY(180deg);
}
.bcard-back .bcard-frame {
  position: absolute; inset: 9px;
  border: 2px solid var(--mets-orange);
  border-radius: 8px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.bcard-back .bcard-topbar { color: var(--ink); }
.bcard-back .bcard-rank { color: var(--mets-orange); }
.bcard-back .bcard-pos { color: var(--ink-3); }

.bcard-chart { margin: 2px 6px; min-height: 130px; }
.season-chart { display: block; width: 100%; height: auto; }
.grid { stroke: rgba(255,255,255,0.09); stroke-width: 1; }
.grid-mid { stroke: rgba(255,255,255,0.22); stroke-dasharray: 4 3; }
.axis-lab { fill: var(--ink-3); font-size: 7.5px; font-family: var(--font-body); font-weight: 600; letter-spacing: 0.05em; }
.xhair { stroke: rgba(255,255,255,0.4); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-empty { text-align: center; color: var(--ink-3); font-size: 0.7rem; letter-spacing: 0.2em; padding: 3rem 0; }

.slash-row {
  display: flex; justify-content: center; align-items: baseline; gap: 8px;
  padding: 4px 10px 2px;
  font-family: var(--font-display);
  font-size: 0.9rem; letter-spacing: 0.04em;
  color: var(--ink);
  border-top: 1px solid rgba(255,255,255,0.12);
}
.slash-row span { font-family: var(--font-body); font-size: 0.56rem; font-weight: 800; letter-spacing: 0.22em; color: var(--ink-3); }

.adv-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4px 6px;
  padding: 5px 12px 0;
}
.adv-cell {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 2px;
}
.adv-cell span { font-size: 0.54rem; font-weight: 800; letter-spacing: 0.08em; color: var(--ink-3); }
.adv-cell strong { font-size: 0.76rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.heat-grid { padding-bottom: 5px; }
.heat-grid .adv-cell { border-bottom: none; }
.heat-grid .adv-cell strong { color: var(--orange-hot); }

.back-recent {
  text-align: center;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--ink-2);
  padding: 6px 6px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.bcard-flip-hint {
  margin-top: auto;
  text-align: center; padding: 6px;
  font-size: 0.56rem; letter-spacing: 0.26em; color: var(--ink-3); font-weight: 700;
}

/* ============================================================ TABLE VIEW */
.table-wrap { overflow-x: auto; border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; }
.rank-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 720px; }
.rank-table th {
  text-align: left; font-size: 0.62rem; letter-spacing: 0.2em; color: var(--ink-3);
  padding: 10px 12px; border-bottom: 2px solid var(--mets-orange);
  background: var(--surface-2);
  position: sticky; top: 0;
}
.rank-table td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.rank-table tbody tr:hover { background: rgba(255,255,255,0.04); }
.td-name { font-weight: 700; }
.td-heat { font-family: var(--font-display); }
.td-form { color: var(--ink-2); font-size: 0.78rem; white-space: nowrap; }
.rank-table .up { color: #7BD98F; font-weight: 700; }
.rank-table .down { color: #FF8896; font-weight: 700; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: baseline; }

/* ============================================================ FAQ */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.faq-item {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(255,255,255,0.09);
  border-left: 4px solid var(--mets-orange);
  border-radius: 10px;
  padding: 1.2rem 1.5rem 1.3rem;
  animation: rise-in 0.5s both;
}
.faq-item:nth-child(2) { animation-delay: 0.05s; }
.faq-item:nth-child(3) { animation-delay: 0.1s; }
.faq-item:nth-child(4) { animation-delay: 0.15s; }
.faq-item:nth-child(n+5) { animation-delay: 0.2s; }
.faq-q {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--orange-hot);
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}
.faq-item p, .faq-item li { color: var(--ink-2); font-size: 0.95rem; line-height: 1.6; }
.faq-item p + p { margin-top: 0.6rem; }
.faq-item strong { color: var(--ink); }
.faq-item em { color: var(--ink); }
.faq-item ol, .faq-item ul { margin: 0.5rem 0 0 1.3rem; display: flex; flex-direction: column; gap: 0.55rem; }
.faq-item li::marker { color: var(--mets-orange); font-weight: 700; }
.faq-table-wrap { margin: 0.7rem 0; }
.faq-table { min-width: 0; }
.tab-faq .tab-level {
  border: 1.5px solid currentColor; border-radius: 50%;
  width: 1.4em; height: 1.4em; line-height: 1.35em; text-align: center;
  font-size: 0.85rem; margin-bottom: 2px;
}

/* ============================================================ INJURED LIST */
.il-section { margin-top: 2.8rem; }
.il-title { color: #E88896; }
.il-rule { background: linear-gradient(90deg, #A81E2B, transparent); }
.il-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.il-chip {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(214, 40, 57, 0.4);
  border-left: 4px solid #A81E2B;
  border-radius: 10px;
  padding: 8px 12px 8px 8px;
}
.il-chip.il-rehab { border-color: rgba(246, 214, 92, 0.4); border-left-color: #B8951F; }
.il-chip img {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover; object-position: center 30%;
  background: var(--mets-blue);
  filter: grayscale(0.5);
  border: 1.5px solid rgba(255,255,255,0.18);
}
.il-name { font-weight: 700; font-size: 0.88rem; }
.il-meta { font-size: 0.7rem; color: var(--ink-3); letter-spacing: 0.06em; }
.il-status { color: #E88896; font-weight: 700; }
.il-rehab .il-status { color: #F6D65C; }

/* ============================================================ BENCHED / STATES */
.benched { margin-top: 2.6rem; text-align: center; }
.benched-title { font-family: var(--font-display); font-size: 0.85rem; color: var(--ink-3); letter-spacing: 0.14em; margin-bottom: 0.5rem; }
.benched-list { color: var(--ink-3); font-size: 0.8rem; max-width: 760px; margin: 0 auto; }

.loading { text-align: center; padding: 6rem 1rem; }
.loading-flame { font-size: 3rem; animation: flicker 0.9s ease-in-out infinite alternate; }
@keyframes flicker {
  from { transform: scale(1) rotate(-3deg); opacity: 0.85; }
  to   { transform: scale(1.18) rotate(3deg); opacity: 1; }
}
.loading-team { font-family: var(--font-display); font-size: 1.3rem; margin-top: 1rem; }
.loading-progress { color: var(--ink-3); letter-spacing: 0.24em; font-size: 0.7rem; margin-top: 0.6rem; font-weight: 700; }

.error-box { text-align: center; padding: 5rem 1rem; }
.error-title { font-family: var(--font-display); font-size: 1.6rem; color: var(--mets-orange); margin-bottom: 0.8rem; }
.btn-retry {
  margin-top: 1.4rem; cursor: pointer;
  background: var(--mets-orange); color: #16070A; border: none; border-radius: 999px;
  font-family: var(--font-body); font-weight: 800; letter-spacing: 0.2em;
  padding: 0.7rem 2.2rem; font-size: 0.8rem;
}

/* ============================================================ TOOLTIP */
.chart-tooltip {
  position: fixed; z-index: 50; pointer-events: none;
  background: rgba(5, 12, 36, 0.96);
  border: 1px solid var(--mets-orange);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.74rem; line-height: 1.5;
  padding: 8px 11px;
  max-width: 240px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  transform: translateY(-100%);
}
.chart-tooltip strong { color: var(--orange-hot); }

/* ============================================================ FOOTER */
.footer {
  border-top: 1px solid rgba(255,255,255,0.09);
  padding: 2rem 1.4rem 2.6rem;
  text-align: center;
  color: var(--ink-3);
  font-size: 0.78rem;
}
.footer p { max-width: 640px; margin: 0 auto 0.6rem; }
.footer-fine { font-size: 0.68rem; opacity: 0.8; }
.footer-kofi { margin: 0.4rem auto 1rem; }
.footer-kofi a {
  display: inline-block;
  color: var(--orange-hot);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  border: 1.5px solid var(--orange-hot);
  border-radius: 999px;
  padding: 0.45rem 1.3rem;
  transition: background 0.2s, color 0.2s;
}
.footer-kofi a:hover { background: var(--mets-orange); color: #16070A; }

/* ============================================================ RESPONSIVE / MOTION */
@media (max-width: 640px) {
  .ticket-stub { display: none; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
  .bcard { height: 410px; }
  /* compact one-row nav: level letters only */
  .tab-team { display: none; }
  .level-tab { padding: 0.55rem 0.9rem 0.65rem; }
  /* highlight tiles two-up instead of a tall stack */
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  main { padding: 1.6rem 1rem 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
