:root {
  color-scheme: dark;
  --bg: #0f0f0d;
  --bg-2: #171612;
  --panel: rgba(30, 29, 24, 0.84);
  --line: rgba(190, 180, 152, 0.28);
  --gold: #d3a34a;
  --gold-bright: #f1cb76;
  --text: #f6f0df;
  --muted: #a9a08b;
  --shadow: rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(230, 168, 70, 0.18), transparent 34rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 18px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
a { color: var(--gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; }
.site-header,
.content-shell,
.site-footer {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}
.site-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 22px 0 14px;
}
.brand {
  color: var(--text);
  font-weight: 780;
  font-size: 1.1rem;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--gold-bright);
}
.article {
  padding: clamp(24px, 4vw, 54px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(28, 27, 23, 0.92), rgba(14, 14, 12, 0.78));
  box-shadow: 0 24px 70px var(--shadow);
}
.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--gold-bright);
  font-weight: 720;
}
h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 0.96;
}
h2 {
  margin: 38px 0 12px;
  font-size: clamp(1.25rem, 2vw, 1.9rem);
}
.lede {
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}
p, li {
  color: var(--muted);
  line-height: 1.7;
}
.info-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 6px;
}
.info-strip div,
.content-card,
details {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}
.info-strip div {
  padding: 14px;
}
.info-strip span,
.content-card span,
.content-card small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 740;
  text-transform: uppercase;
}
.info-strip strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  line-height: 1.35;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.content-card {
  display: grid;
  gap: 8px;
  min-height: 140px;
  padding: 16px;
}
.content-card strong {
  color: var(--text);
  font-size: 1.12rem;
  line-height: 1.25;
}
.content-card small {
  text-transform: none;
  line-height: 1.45;
}
.link-list {
  padding-left: 18px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}
th, td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}
th {
  color: var(--text);
  font-size: 0.75rem;
  text-transform: uppercase;
}
td {
  color: var(--muted);
}
details {
  margin-top: 12px;
  padding: 14px 16px;
}
summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 740;
}
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 22px 0 32px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .site-header,
  .info-strip {
    grid-template-columns: 1fr;
  }
  .site-header {
    display: grid;
  }
  .info-strip {
    display: grid;
  }
}

/* ============================================================
   Extended design tokens
   ============================================================ */
:root {
  --color-success:        #7ac97a;
  --color-success-bg:     #0f1f0f;
  --color-success-border: #3a6a3a;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ============================================================
   Status chips
   ============================================================ */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.status-chip--live {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success-border);
}
.status-chip--live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse-dot 1.4s ease-in-out infinite;
}
.status-chip--ft {
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.08);
}
.status-chip--scheduled {
  background: rgba(211,163,74,0.08);
  color: var(--gold);
  border: 1px solid rgba(211,163,74,0.2);
}
.status-chip--today {
  background: rgba(211,163,74,0.12);
  color: var(--gold-bright);
  border: 1px solid rgba(211,163,74,0.3);
  animation: pulse-gold 2s ease-in-out infinite;
}
.status-chip--elim {
  background: rgba(180,60,60,0.1);
  color: #c87a7a;
  border: 1px solid rgba(180,60,60,0.2);
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(211,163,74,0.3); }
  50%       { box-shadow: 0 0 0 4px rgba(211,163,74,0); }
}

/* ============================================================
   Match Hero block (fixture pages)
   ============================================================ */
.match-hero {
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 36px;
}
.match-hero__round {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 24px;
}
.match-hero__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.match-hero__team  { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.match-hero__flag  { font-size: 3rem; line-height: 1; }
.match-hero__name  { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.match-hero__seed  { font-size: 0.75rem; color: var(--muted); }
.match-hero__vs    { font-size: 1.1rem; color: rgba(255,255,255,0.25); font-weight: 400; }
.match-hero__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.match-hero__scoreline {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.05em;
}
.match-hero__score-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.match-hero__meta {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.match-hero__meta a { color: var(--gold); }
.match-hero__meta a:hover { text-decoration: underline; }
.match-hero__meta-sep { color: rgba(255,255,255,0.15); }

/* ============================================================
   Team Stats Grid (team pages)
   ============================================================ */
.team-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin: 28px 0 32px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
}
.team-stat {
  background: rgba(255,255,255,0.04);
  padding: 16px 12px;
  text-align: center;
}
.team-stat__value {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.team-stat__value--gold  { color: var(--gold); }
.team-stat__value--green { color: var(--color-success); }
.team-stat__value--muted { color: var(--muted); }
.team-stat__label {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   FAQ / details accordion upgrade
   ============================================================ */
.article details {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  margin-bottom: 8px;
  margin-top: 0;
  padding: 0;
  overflow: hidden;
}
.article details[open] { border-color: var(--gold); }
.article summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.article summary::-webkit-details-marker { display: none; }
.article summary::after {
  content: '+';
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 300;
  flex-shrink: 0;
}
.article details[open] summary::after { content: '–'; }
.article details > *:not(summary) {
  padding: 0 20px 16px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ============================================================
   Nav active state (add aria-current="page" on the active link)
   ============================================================ */
.nav a {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ============================================================
   Article typography tightening (does not affect bracket homepage)
   ============================================================ */
.article h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 8px;
}
.article h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.article h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin: 24px 0 8px;
}

/* ============================================================
   Bracket CTA strip (end of every article page)
   ============================================================ */
.bracket-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 20px 24px;
  margin-top: 48px;
  text-decoration: none;
}
.bracket-cta__icon { font-size: 1.8rem; flex-shrink: 0; }
.bracket-cta__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.bracket-cta__text strong { color: var(--text); font-size: 0.95rem; }
.bracket-cta__text span   { color: var(--muted); font-size: 0.82rem; }
.bracket-cta__button {
  background: var(--gold);
  color: #111111;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.bracket-cta__button:hover { background: var(--gold-bright); text-decoration: none; }

/* ============================================================
   Mobile additions
   ============================================================ */
@media (max-width: 640px) {
  .site-header { flex-direction: column; gap: 12px; padding: 12px 16px; }
  .nav { display: flex; gap: 20px; flex-wrap: wrap; }
  .match-hero__teams { gap: 12px; }
  .match-hero__flag { font-size: 2rem; }
  .match-hero__name { font-size: 1rem; }
  .match-hero__scoreline { font-size: 1.5rem; }
  .team-stats { grid-template-columns: repeat(2, 1fr); }
  .bracket-cta { flex-direction: column; text-align: center; }
  .bracket-cta__button { align-self: center; }
}
