/* ==========================================================================
   OSRS Bingo — dark parchment & gold theme
   ========================================================================== */

:root {
  --bg: #0c0a07;
  --surface: #17130e;
  --surface-2: #1e1913;
  --surface-3: #262019;
  --border: #33291d;
  --border-strong: #4a3b28;
  --gold: #d4a92c;
  --gold-bright: #f5c944;
  --gold-dim: #8a7326;
  --text: #ede4d3;
  --text-dim: #a89a82;
  --text-faint: #6f6350;
  --danger: #e5484d;
  --radius: 14px;
  --font-display: "Cinzel", "Georgia", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --shadow-tile: 0 2px 10px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 18px 60px rgba(0, 0, 0, 0.65);
}

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

html {
  scrollbar-gutter: stable;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  padding: clamp(16px, 3vw, 40px);
  position: relative;
  overflow-x: hidden;
}

/* Ambient glow behind the header */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 50% -80px, rgba(212, 169, 44, 0.13), transparent 65%),
    radial-gradient(700px 500px at -5% 40%, rgba(229, 72, 77, 0.05), transparent 70%),
    radial-gradient(700px 500px at 105% 40%, rgba(62, 142, 247, 0.05), transparent 70%),
    radial-gradient(800px 500px at 50% 105%, rgba(70, 196, 110, 0.05), transparent 70%),
    radial-gradient(1400px 900px at 50% 110%, rgba(60, 40, 15, 0.25), transparent 60%);
  z-index: 0;
}

.site-header,
.filters,
main,
.site-footer {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   Header & event titles
   -------------------------------------------------------------------------- */

.event-titles {
  text-align: center;
  padding: clamp(8px, 2vw, 24px) 0 28px;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 3vw, 34px);
}

.crab {
  width: clamp(56px, 8vw, 110px);
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(212, 169, 44, 0.35));
  animation: crab-float 4.5s ease-in-out infinite;
}

.crab-right {
  transform: scaleX(-1);
  animation-delay: -2.2s;
}

@keyframes crab-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

@media (max-width: 620px) {
  .crab { display: none; }
}

h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, var(--gold-bright) 20%, var(--gold) 55%, #9a7a1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(212, 169, 44, 0.25);
}

.subtitle {
  color: var(--text-dim);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

.dates {
  color: var(--text-faint);
  font-size: 0.8rem;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.group-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid rgba(212, 169, 44, 0.35);
  border-radius: 99px;
  padding: 6px 16px;
  transition: all 0.15s ease;
}

.group-link:hover {
  background: rgba(212, 169, 44, 0.1);
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212, 169, 44, 0.25);
}

.demo-badge {
  display: inline-block;
  margin: 14px auto 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #100d08;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  border-radius: 99px;
  padding: 6px 18px;
  box-shadow: 0 0 18px rgba(212, 169, 44, 0.45);
  animation: badge-pulse 2.4s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(212, 169, 44, 0.35); }
  50% { box-shadow: 0 0 26px rgba(212, 169, 44, 0.6); }
}

/* --------------------------------------------------------------------------
   Scoreboard
   -------------------------------------------------------------------------- */

.scoreboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.team-card {
  --team: var(--gold);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-top: 3px solid var(--team);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  box-shadow: var(--shadow-tile);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.team-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.team-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(320px 120px at 50% -30px, color-mix(in srgb, var(--team) 22%, transparent), transparent 70%);
  pointer-events: none;
}

.team-card.leader {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--team) 35%, transparent), var(--shadow-tile);
}

.team-card .crown {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 1.15rem;
  filter: drop-shadow(0 0 6px rgba(245, 201, 68, 0.6));
  animation: crown-bob 2.6s ease-in-out infinite;
}

@keyframes crown-bob {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-3px) rotate(6deg); }
}

.team-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--team);
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.team-stats {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.team-points {
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.team-points small {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-left: 5px;
}

.team-tiles {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 7px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid rgba(0, 0, 0, 0.5);
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--team) 65%, #000), var(--team));
  box-shadow: 0 0 10px color-mix(in srgb, var(--team) 55%, transparent);
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.team-members {
  color: var(--text-faint);
  font-size: 0.78rem;
  line-height: 1.5;
}

.member-link {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px dotted var(--border-strong);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.member-link:hover {
  color: var(--team);
  border-bottom-color: var(--team);
}

/* --------------------------------------------------------------------------
   Filters
   -------------------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.filter-chip {
  --team: var(--gold);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.filter-chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.filter-chip.active {
  color: #100d08;
  background: var(--team);
  border-color: var(--team);
  box-shadow: 0 0 14px color-mix(in srgb, var(--team) 45%, transparent);
}

.filter-divider {
  width: 1px;
  align-self: stretch;
  margin: 2px 6px;
  background: var(--border-strong);
}

/* --------------------------------------------------------------------------
   Board & tiles
   -------------------------------------------------------------------------- */

.board {
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), 1fr);
  gap: 12px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  aspect-ratio: 1 / 0.92;
  padding: 16px 10px 22px;
  /* --heat/--chip (set per-tile from JS) tint the tile by point value:
     cool slate → gold → ember across the board's point range */
  background:
    linear-gradient(180deg, var(--heat, transparent), transparent 82%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid color-mix(in srgb, var(--chip, var(--gold)) 22%, var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-tile);
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  color: inherit;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease,
    opacity 0.3s ease, filter 0.3s ease;
  animation: tile-in 0.5s ease backwards;
}

@keyframes tile-in {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.tile:hover,
.tile:focus-visible {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--gold-dim);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 169, 44, 0.25);
  z-index: 2;
}

.tile:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Filtered-out tiles stay clearly visible — just receded, never hidden */
.tile.dimmed {
  opacity: 0.68;
  filter: saturate(0.55) brightness(0.85);
  pointer-events: auto;
}

/* Fully swept tile — every team has it */
.tile.swept {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--border));
  background: linear-gradient(180deg, #241d10, #17130a);
  box-shadow: 0 0 18px rgba(212, 169, 44, 0.18), var(--shadow-tile);
}

.tile-icon {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  line-height: 1;
  margin-top: 4px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
  transition: transform 0.25s ease;
}

.tile:hover .tile-icon {
  transform: scale(1.15) rotate(-4deg);
}

.tile-icon-img {
  height: clamp(40px, 5.2vw, 60px);
  max-width: 82%;
  object-fit: contain;
  margin-top: 4px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
  transition: transform 0.25s ease;
}

.tile:hover .tile-icon-img {
  transform: scale(1.12) rotate(-4deg);
}

.tile-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.68rem, 1.35vw, 0.85rem);
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--text);
}

.tile-points {
  font-size: 0.68rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--chip, var(--gold)) 85%, #fff);
  background: color-mix(in srgb, var(--chip, var(--gold)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--chip, var(--gold)) 45%, transparent);
  border-radius: 99px;
  padding: 2px 9px;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

/* Strike-through cross for each team that has claimed the tile */
.tile-cross {
  position: absolute;
  inset: 6% 8%;
  width: 84%;
  height: 88%;
  pointer-events: none;
  overflow: visible;
}

.tile-cross line {
  stroke: var(--cross, var(--gold));
  stroke-width: 5.5px;
  stroke-linecap: round;
  opacity: 0.62;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--cross) 60%, transparent));
  stroke-dasharray: 130;
  stroke-dashoffset: 130;
  animation: cross-draw 0.45s ease-out forwards;
}

.tile-cross line:nth-child(2) {
  animation-delay: 0.18s;
}

@keyframes cross-draw {
  to { stroke-dashoffset: 0; }
}

/* Per-team claim strip along the bottom of each tile */
.claim-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 7px;
  display: flex;
}

.claim-strip .seg {
  flex: 1;
  background: var(--seg, transparent);
  opacity: 0.95;
}

.claim-strip .seg.unclaimed {
  background: rgba(255, 255, 255, 0.04);
}

/* Partially-filled segment: a team's progress toward a multi-part tile */
.claim-strip .seg.partial {
  background: rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.claim-strip .seg-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: block;
  opacity: 0.9;
}

/* Claim count badge (top-right) */
.claim-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}

.claim-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 6px color-mix(in srgb, var(--dot) 70%, transparent);
  animation: dot-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes dot-pop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* First team on a tile: gold ring on their dot (they scored double) */
.claim-dot.first {
  box-shadow: 0 0 0 2px var(--gold-bright), 0 0 8px color-mix(in srgb, var(--dot) 70%, transparent);
}

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

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 4, 2, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
}

.modal {
  width: min(560px, 100%);
  max-height: min(84vh, 720px);
  overflow-y: auto;
  background: linear-gradient(180deg, var(--surface-3), var(--surface));
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: var(--shadow-pop), 0 0 0 1px rgba(212, 169, 44, 0.12);
  padding: 28px clamp(20px, 4vw, 34px) 30px;
  animation: modal-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 6px;
}

.modal-icon {
  font-size: 2.6rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

.modal-icon-img {
  height: 68px;
  max-width: 90px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

.modal-title-wrap {
  flex: 1;
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.modal-points {
  display: inline-block;
  margin-top: 7px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(212, 169, 44, 0.1);
  border: 1px solid rgba(212, 169, 44, 0.3);
  border-radius: 99px;
  padding: 3px 12px;
  letter-spacing: 0.06em;
}

.modal-close {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.modal-close:hover {
  color: var(--text);
  border-color: var(--border-strong);
  transform: rotate(90deg);
}

.modal-desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 14px 0 4px;
}

.modal h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 22px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.req-list {
  list-style: none;
}

.req-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.req-list li::before {
  content: "◆";
  position: absolute;
  left: 4px;
  color: var(--gold-dim);
  font-size: 0.7rem;
  top: 4px;
}

.claim-rows {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* Multi-part progress rows in the modal */
.prog-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prog-row {
  --team: var(--gold);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-left: 3px solid var(--team);
  border-radius: 10px;
  padding: 11px 14px 12px;
}

.prog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.prog-head .team-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--team);
}

.prog-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.part-cells {
  display: flex;
  gap: 5px;
  margin-bottom: 4px;
}

.part-cell {
  flex: 1;
  height: 9px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.part-cell.filled {
  background: var(--team);
  border-color: var(--team);
  box-shadow: 0 0 8px color-mix(in srgb, var(--team) 55%, transparent);
}

.prog-by {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 5px;
}

.prog-by em {
  color: var(--text-faint);
}

.prog-date {
  color: var(--text-faint);
  font-size: 0.75rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.claim-row {
  --team: var(--gold);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-left: 3px solid var(--team);
  border-radius: 10px;
  padding: 10px 14px;
}

.claim-row .who {
  flex: 1;
  min-width: 0;
}

.claim-row .team-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--team);
}

.first-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold-bright);
  background: rgba(212, 169, 44, 0.12);
  border: 1px solid rgba(212, 169, 44, 0.4);
  border-radius: 99px;
  padding: 1px 8px;
  letter-spacing: 0.04em;
  vertical-align: 1px;
}

.claim-row .claim-by {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 1px;
}

.claim-row .claim-note {
  color: var(--text-faint);
  font-size: 0.78rem;
  font-style: italic;
  margin-top: 3px;
}

.claim-row .claim-date {
  color: var(--text-faint);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.no-claims {
  color: var(--text-faint);
  font-size: 0.88rem;
  font-style: italic;
}

.wiki-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(212, 169, 44, 0.35);
  border-radius: 10px;
  padding: 8px 16px;
  transition: all 0.15s ease;
}

.wiki-link:hover {
  background: rgba(212, 169, 44, 0.1);
  border-color: var(--gold);
}

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */

.timeline-section {
  margin-top: 52px;
}

.timeline-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--gold);
  margin-bottom: 26px;
}

.timeline-heading::before,
.timeline-heading::after {
  content: "—";
  color: var(--border-strong);
  margin: 0 14px;
}

.timeline {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding-left: 26px;
}

/* The spine */
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-dim), var(--border) 85%, transparent);
  border-radius: 2px;
}

.tl-entry {
  --tl: var(--gold);
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-tile);
  animation: tile-in 0.5s ease backwards;
}

button.tl-entry {
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

button.tl-entry:hover,
button.tl-entry:focus-visible {
  transform: translateX(4px);
  border-color: color-mix(in srgb, var(--tl) 50%, var(--border));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

button.tl-entry:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.tl-node {
  position: absolute;
  left: -25px;
  top: 19px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tl);
  border: 2px solid var(--bg);
  box-shadow: 0 0 10px color-mix(in srgb, var(--tl) 70%, transparent);
}

/* Progress entries get a hollow node — a part, not a full claim */
.tl-node.ring {
  background: var(--bg);
  border: 3px solid var(--tl);
}

/* Points race chart */
.points-chart {
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-tile);
  padding: 18px 18px 14px;
}

.points-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.points-chart .grid {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.points-chart .grid.base {
  stroke-dasharray: none;
  stroke: var(--border-strong);
}

.points-chart .axis {
  fill: var(--text-faint);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.points-chart .race-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.6));
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.chart-legend .key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-legend .swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--sw);
}

.chart-legend strong {
  color: var(--text);
}

.tl-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.tl-date {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}

.tl-type {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--tl);
  background: color-mix(in srgb, var(--tl) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tl) 35%, transparent);
  border-radius: 99px;
  padding: 1px 9px;
  letter-spacing: 0.04em;
}

.tl-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}

.tl-detail {
  color: var(--text-dim);
  font-size: 0.83rem;
  line-height: 1.5;
  margin-top: 3px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.78rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.legend .key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend .swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--sw);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .board {
    grid-template-columns: repeat(3, 1fr);
  }
  .tile {
    aspect-ratio: auto;
    min-height: 132px;
  }
}

@media (max-width: 540px) {
  .board {
    grid-template-columns: repeat(2, 1fr);
  }
  .team-points {
    font-size: 1.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
