/* Tournament of Albums — shared theme (design tokens + festive components).
   Linked by index.html and viz.html; page-specific rules stay inline in each
   page and load after this file so they win the cascade. */

:root {
  --paper: #FBF7F0;
  --surface: #FFFFFF;
  --pink: #FF3D7F;
  --cyan: #1EC8E0;
  --yellow: #FFD23F;
  --violet: #7C3AED;
  --ink: #1A1A2E;
  --ink-soft: #5A5A72;
  --line: rgba(26, 26, 46, 0.1);
}

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

body {
  font-family: 'Poppins', system-ui, sans-serif;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
  color: var(--ink);
  background: var(--paper);
}

:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

/* ── Non-prod environment banner ─────────────────────────────── */
/* Injected by theme.js when window.TOA_CONFIG.environment isn't "prod".
   Fixed and full-bleed because `body` is max-width'd and centred, so a
   statically-positioned child would be boxed in at 1100px. */
.env-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  text-align: center;
  color: var(--ink);
  background: var(--yellow);
  border-bottom: 3px solid var(--ink);
  padding: 0.4rem 1rem;
}
:root.has-env-banner body { padding-top: 2rem; }

/* ── Festive header ──────────────────────────────────────────── */
.page-header {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 1.1rem 1rem 0.9rem;
  margin-bottom: 1rem;
}
.header-deco { position: absolute; inset: 0; pointer-events: none; }
.header-deco svg { position: absolute; }
h1 {
  position: relative;
  font-family: 'Bungee', sans-serif;
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  margin: 0;
  line-height: 1;
  letter-spacing: 0.01em;
}
.title-ch {
  display: inline-block;
  animation: hop 1.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.07s);
}
@keyframes hop {
  0%, 70%, 100% { transform: translateY(0); }
  35%            { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) { .title-ch { animation: none; } }

/* ── Navigation tabs ─────────────────────────────────────────── */
/* Injected by theme.js immediately after .page-header on every page. */
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
}
.tab-link {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink); text-decoration: none;
  background: var(--surface);
  border: 2px solid var(--ink); border-radius: 20px;
  padding: 0.3rem 0.85rem;
  box-shadow: 3px 3px 0 var(--cyan);
}
.tab-link:hover { color: var(--violet); box-shadow: 3px 3px 0 var(--pink); }
/* The current section reads as "pressed in" against the white pills. No hover
   rule — you are already there. */
.tab-link[aria-current="page"] {
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--violet);
}

/* ── Panel ───────────────────────────────────────────────────── */
/* The site's signature card, used on several pages. Padding is deliberately
   not set here — every panel wants its own. The accent is a custom property rather than
   a modifier class per colour; Note the fallback -- this is here because an unresolved 
   var() is invalid at computed-value time.
 */
.panel {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--panel-accent, var(--cyan));
}

/* ── Section label ───────────────────────────────────────────── */
.section-label {
  font-family: 'Bungee', sans-serif;
  font-size: 1rem;
  color: var(--violet);
  margin: 0 0 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 3px solid var(--cyan);
}
