/* ==========================================================================
   5DWN — Football more than a game
   Stile editoriale sportivo: colori piatti dal logo (arancio del "5",
   navy, bianco), Archivo Bold per i titoli, Archivo Thin per i sottotitoli,
   Barlow Condensed per etichette e numeri, Barlow per il testo.
   Niente gradienti, niente ombre, angoli al massimo 8px.
   ========================================================================== */

/* Archivo statico (file forniti): Bold per i titoli, Thin per i sottotitoli — sito e grafiche */
@font-face { font-family: "Archivo Bold"; src: url("../fonts/Archivo-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo Thin"; src: url("../fonts/Archivo-Thin.ttf") format("truetype"); font-weight: 100; font-style: normal; font-display: swap; }

:root {
  --orange: #f7b263;
  --accent: #f7b263;      /* arancio per testi e bordi (più scuro nel tema chiaro) */
  --navy: #0a1730;        /* sfondo pagina */
  --navy-2: #0f2142;      /* superfici */
  --navy-3: #162c55;      /* superfici in evidenza / intestazioni */
  --navy-ink: #060f20;    /* testo scuro su arancio */
  --white: #ffffff;
  --line: #1f3561;
  --line-strong: #2c4677;
  --text: #ffffff;
  --text-muted: #a9b6cf;
  --text-dim: #7385a8;
  --text-soft: #dfe5f1;   /* testo lungo editoriale */
  --win: #5ad38c;
  --loss: #f27777;
  --live: #ff4d5e;

  --r: 6px;      /* card */
  --r-sm: 4px;   /* bottoni, badge */
  --maxw: 1180px;

  --font-title: "Archivo Bold", "Barlow Condensed", sans-serif;
  --font-sub: "Archivo Thin", "Barlow", sans-serif;
  --font-display: "Barlow Condensed", sans-serif;
  --font-body: "Barlow", sans-serif;
}

/* Tema chiaro: stessi componenti, palette invertita. Il "bianco" di enfasi
   diventa navy, le superfici diventano chiare; l'arancio di fondo resta quello
   del logo, quello dei testi è più scuro per restare leggibile. */
:root[data-theme="light"] {
  --accent: #c76a00;
  --navy: #f3f4f7;
  --navy-2: #ffffff;
  --navy-3: #e9edf3;
  --white: #0a1730;
  --line: #dde2ea;
  --line-strong: #c2c9d6;
  --text: #0a1730;
  --text-muted: #46536d;
  --text-dim: #66728c;
  --text-soft: #26324a;
  --win: #16884a;
  --loss: #c83636;
  --live: #d4192c;
  color-scheme: light;
}
:root { color-scheme: dark; }
:root[data-theme="light"] img.site-logo { content: url("../img/logo-5dwn-nero.png"); }

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--navy);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}
h2 { font-size: clamp(1.6rem, 4.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
strong, b { font-weight: 700; }
button { font-family: var(--font-body); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding: 28px 0 64px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Numeri da scoreboard ovunque servano */
.num, .score, .rec, .seed, .sc, .s, .n,
.standings td, .schedule td:first-child { font-family: var(--font-display); font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  border-bottom: 3px solid var(--orange);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; }
.brand img { height: 22px; width: auto; }
.brand:hover { text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--r-sm);
  background: transparent; border: 1px solid var(--line-strong); color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }

.site-nav { display: none; }
.site-nav.open {
  display: block; position: absolute; left: 0; right: 0; top: 63px;
  background: var(--navy); border-bottom: 1px solid var(--line); padding: 4px 16px 12px;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.site-nav a {
  display: block; padding: 12px 4px; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted);
}
.site-nav a:hover { color: var(--white); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent); }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.open { display: block; position: static; padding: 0; background: none; border: 0; margin-left: auto; }
  .site-nav ul { flex-direction: row; gap: 4px; }
  .site-nav a { padding: 18px 12px 15px; border-bottom: 3px solid transparent; margin-bottom: -3px; font-size: 1.05rem; }
  .site-nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--white); }
  .brand img { height: 24px; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 3px solid var(--orange); background: var(--navy-2); padding: 32px 0 40px; color: var(--text-muted); font-size: 0.95rem; }
.site-footer .grid { display: grid; gap: 24px; }
.site-footer img { height: 26px; width: auto; margin-bottom: 12px; }
.site-footer strong { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; color: var(--white); font-size: 1.05rem; }
.site-footer .payoff { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); font-size: 1.1rem; margin-bottom: 6px; }
.site-footer ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }
.site-footer .legal { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--text-dim); }
@media (min-width: 760px) { .site-footer .grid { grid-template-columns: 2fr 1fr 1fr; } }

/* ---------- Blocchi comuni ---------- */
.page-head { margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.6rem, 10vw, 4.2rem); margin-bottom: 0.15em; }
.page-head p { font-family: var(--font-sub); font-weight: 100; color: var(--text-muted); margin: 0; max-width: 680px; }
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-size: 0.95rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}
.eyebrow.live { color: var(--live); }
.section { margin-top: 44px; }
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px; padding-top: 10px; border-top: 3px solid var(--white);
}
.section-head h2 { margin: 0; }
.section-head .count { font-size: 0.85rem; color: var(--text-dim); }

.card { background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 20px; border-radius: var(--r-sm);
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.05em;
  border: 2px solid var(--white); color: var(--white); background: transparent; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; background: var(--white); color: var(--navy); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--orange); border-color: var(--accent); color: var(--navy-ink); }
.btn-primary:hover { background: var(--white); border-color: var(--white); color: var(--navy); }
.link-more { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* Selettori (tab) */
.segmented {
  display: inline-flex; flex-wrap: wrap; max-width: 100%;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
}
.segmented button {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.05em;
  border: 0; border-right: 1px solid var(--line-strong); cursor: pointer;
  padding: 9px 16px; background: transparent; color: var(--text-muted); white-space: nowrap;
}
.segmented button:last-child { border-right: 0; }
.segmented button:hover { color: var(--white); }
.segmented button[aria-pressed="true"], .segmented button[aria-selected="true"] { background: var(--orange); color: var(--navy-ink); }
.segmented button small { opacity: 0.7; }

/* Caricamento / errore / vuoto */
.state { padding: 36px 16px; text-align: center; color: var(--text-muted); }
.spinner {
  width: 32px; height: 32px; margin: 0 auto 12px; border-radius: 50%;
  border: 3px solid var(--line-strong); border-top-color: var(--accent); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.state.error { color: var(--text); border: 1px solid var(--line-strong); border-left: 4px solid var(--loss); border-radius: var(--r); background: var(--navy-2); text-align: left; padding: 20px; }
.state.error .label { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--loss); margin-bottom: 4px; }
.state.error button { margin-top: 8px; }
.notice {
  font-size: 0.88rem; color: var(--text); background: var(--navy-2);
  border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: var(--r-sm); padding: 8px 12px; margin-bottom: 16px;
}
.updated { font-size: 0.82rem; color: var(--text-dim); margin-top: 14px; }

.skeleton { background: var(--navy-2); border-radius: var(--r); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { background: var(--navy-3); } }

/* Logo squadra */
.logo { width: 28px; height: 28px; object-fit: contain; flex: none; }
.logo-lg { width: 44px; height: 44px; }

/* ---------- Home ---------- */
.hero { padding: 48px 0 36px; text-align: center; border-bottom: 1px solid var(--line); }
.hero-logo { width: min(560px, 86%); height: auto; margin: 0 auto 22px; }
.hero .payoff {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  font-size: clamp(1.5rem, 5.5vw, 2.3rem); line-height: 1.05; color: var(--white); margin-bottom: 12px;
}
.hero .payoff strong { color: var(--accent); }
.hero .sub { font-family: var(--font-sub); font-weight: 100; color: var(--text-muted); max-width: 560px; margin: 0 auto 28px; font-size: 1.05rem; }
.hero .cta { display: grid; gap: 10px; max-width: 420px; margin: 0 auto; }
@media (min-width: 640px) { .hero { padding: 80px 0 56px; } .hero .cta { grid-template-columns: repeat(3, auto); max-width: none; justify-content: center; } }

.yardline { width: 64px; height: 4px; margin: 36px auto 0; background: var(--orange); }

.quick-links { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .quick-links { grid-template-columns: repeat(4, 1fr); } }
.quick-link {
  display: block; padding: 16px; border-radius: var(--r); background: var(--navy-2);
  border: 1px solid var(--line); border-top: 4px solid var(--orange); color: var(--text);
}
.quick-link:hover { background: var(--navy-3); text-decoration: none; }
.quick-link strong { font-family: var(--font-display); font-size: 1.4rem; text-transform: uppercase; letter-spacing: 0.02em; display: block; line-height: 1.1; }
.quick-link span { display: block; font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }

/* ---------- Card partita ---------- */
.games-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .games-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .games-grid { grid-template-columns: repeat(3, 1fr); } }

.game { background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 8px; }
.game-meta {
  display: flex; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
}
.game-meta .status { font-weight: 700; color: var(--white); }
.game-meta .status.live { color: var(--live); }
.game-meta .status.live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--live); margin-right: 6px; animation: pulse 1.2s infinite; vertical-align: middle; }
@keyframes pulse { 50% { opacity: 0.3; } }
.game-team { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; }
.game-team .name { font-weight: 600; font-size: 1.02rem; color: inherit; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-team .name:hover { color: var(--accent); text-decoration: none; }
.game-team .name small { color: var(--text-dim); font-weight: 500; margin-left: 6px; font-size: 0.85rem; }
.game-team .score { font-weight: 700; font-size: 1.85rem; line-height: 1; min-width: 2ch; text-align: right; }
.game-team.loser { opacity: 0.5; }
.game-team.winner .score { color: var(--accent); }
.game-foot { font-size: 0.82rem; color: var(--text-dim); border-top: 1px solid var(--line); padding-top: 8px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.day-group { margin-bottom: 24px; }
.day-group h3 { font-size: 1.1rem; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 10px; }

.week-nav { display: flex; align-items: center; gap: 8px; }
.week-nav button {
  width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: transparent;
  color: var(--white); cursor: pointer; font-family: var(--font-display); font-size: 1.3rem; line-height: 1;
}
.week-nav button:hover:not(:disabled) { background: var(--orange); border-color: var(--accent); color: var(--navy-ink); }
.week-nav button:disabled { opacity: 0.3; cursor: default; }
.week-nav .label { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.04em; min-width: 140px; text-align: center; }

/* ---------- Classifiche ---------- */
.tables { display: grid; gap: 20px; }
@media (min-width: 1000px) { .tables.two { grid-template-columns: 1fr 1fr; } }
.table-card { background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.table-card > h3 { padding: 12px 14px; margin: 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-size: 1.35rem; }
.tag {
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em;
  background: var(--orange); color: var(--navy-ink); padding: 2px 7px; border-radius: var(--r-sm);
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.standings { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.standings th, .standings td { padding: 8px 10px; text-align: center; white-space: nowrap; }
.standings th {
  font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.08em; font-weight: 700; text-transform: uppercase;
  color: var(--text-dim); background: var(--navy-3);
}
.standings tbody tr { border-top: 1px solid var(--line); }
.standings tbody tr:hover, .standings tbody tr:hover .team-cell { background: var(--navy-3); }
.standings .team-cell { text-align: left; position: sticky; left: 0; background: var(--navy-2); min-width: 168px; font-family: var(--font-body); font-size: 0.98rem; }
.standings th.team-cell { background: var(--navy-3); font-family: var(--font-display); font-size: 0.85rem; }
.standings .team-cell a { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.standings .team-cell a:hover { text-decoration: none; color: var(--accent); }
.standings .rank { color: var(--text-dim); width: 28px; font-weight: 700; }
.standings .pos { color: var(--win); } .standings .neg { color: var(--loss); }
.standings tr.cutline td { border-bottom: 2px solid var(--orange); }
.seed-badge {
  display: inline-flex; width: 24px; height: 24px; border-radius: var(--r-sm); align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; background: var(--navy-3); color: var(--text);
}
.seed-badge.div { background: var(--orange); color: var(--navy-ink); }
.seed-badge.wc { background: transparent; border: 2px solid var(--orange); color: var(--accent); }
.short-name { display: inline; } .full-name { display: none; }
@media (min-width: 640px) { .short-name { display: none; } .full-name { display: inline; } }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.85rem; color: var(--text-muted); margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.clinch { color: var(--accent); font-family: var(--font-display); font-weight: 700; }
.conf-heading { margin-top: 28px; padding-top: 10px; border-top: 3px solid var(--white); }

/* ---------- Pill (etichette) ---------- */
.pill {
  display: inline-block; font-family: var(--font-display); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 1px 6px; border-radius: var(--r-sm); text-transform: uppercase;
}
.pill-bye { background: var(--orange); color: var(--navy-ink); }
.pill-div { background: var(--white); color: var(--navy); }
.pill-wc { border: 1px solid var(--orange); color: var(--accent); }
.pill-conf { background: var(--orange); color: var(--navy-ink); font-size: 1rem; }


/* ---------- Elenco squadre ---------- */
.div-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .div-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .div-grid { grid-template-columns: repeat(4, 1fr); } }
.div-card h3 { font-size: 1.15rem; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 10px; }
.team-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); color: var(--text);
  background: var(--navy-2); border: 1px solid var(--line); border-left: 5px solid var(--team, var(--orange));
  margin-bottom: 6px; font-weight: 600;
}
.team-link:hover { text-decoration: none; background: var(--navy-3); }
.team-link small { display: block; font-weight: 500; color: var(--text-dim); font-size: 0.85rem; }

/* ---------- Scheda squadra ---------- */
.team-hero {
  border-radius: var(--r); padding: 28px 20px;
  background: var(--team, var(--navy-3)); color: var(--team-ink, var(--white));
  border-bottom: 6px solid var(--team-alt, var(--orange));
  display: grid; gap: 18px; align-items: center;
}
.team-hero .big-logo { width: 110px; height: 110px; object-fit: contain; }
.team-hero .eyebrow { color: inherit; opacity: 0.8; }
.team-hero h1 { font-size: clamp(2.6rem, 11vw, 4.6rem); margin: 0; }
.team-hero .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.team-hero .meta span {
  border: 1px solid currentColor; padding: 2px 9px; border-radius: var(--r-sm);
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.swatches { display: flex; gap: 6px; margin-top: 14px; }
.swatches i { width: 22px; height: 22px; border-radius: var(--r-sm); border: 2px solid currentColor; display: inline-block; }
@media (min-width: 640px) { .team-hero { grid-template-columns: auto 1fr; padding: 36px; } .team-hero .big-logo { width: 150px; height: 150px; } }

.info-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); margin-top: 16px; }
@media (min-width: 860px) { .info-grid { grid-template-columns: repeat(4, 1fr); } }
.info { background: var(--navy-2); border: 1px solid var(--line); border-top: 3px solid var(--orange); border-radius: var(--r); padding: 12px 14px; }
.info .k { font-family: var(--font-display); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); font-weight: 700; }
.info .v { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; line-height: 1.1; margin-top: 4px; text-transform: uppercase; }
.info .v small { display: block; font-family: var(--font-body); text-transform: none; font-weight: 500; font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; line-height: 1.35; }


table.roster, table.schedule { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.roster th, .roster td, .schedule th, .schedule td { padding: 8px 10px; text-align: left; white-space: nowrap; }
.roster th, .schedule th {
  font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.08em; font-weight: 700; text-transform: uppercase;
  color: var(--text-dim); background: var(--navy-3);
}
.roster tbody tr, .schedule tbody tr { border-top: 1px solid var(--line); }
.roster tbody tr:hover, .schedule tbody tr:hover { background: var(--navy-3); }
.roster .num { font-weight: 700; font-size: 1.3rem; color: var(--accent); width: 44px; text-align: center; }
.roster .player { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.roster .player img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--navy-3); }
.roster .player > span { display: flex; flex-direction: column; line-height: 1.25; }
.roster .inj { font-size: 0.75rem; color: var(--loss); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.roster .pos { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.schedule .opp { display: flex; align-items: center; gap: 8px; font-weight: 600; color: inherit; }
.schedule .res { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.schedule .res-w { color: var(--win); } .schedule .res-l { color: var(--loss); } .schedule .res-t { color: var(--text-muted); }
.schedule .live { color: var(--live); }
.schedule tr.bye td { color: var(--text-dim); font-style: italic; }

.stats-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.stat { background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.stat .n { font-size: 2.2rem; font-weight: 700; line-height: 1; color: var(--accent); }
.stat .l { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--text-muted); }
.kv strong { font-family: var(--font-display); font-size: 1.2rem; }

.editorial { color: var(--text); font-size: 1.05rem; }
.editorial p { color: var(--text-soft); }
.editorial h3 { color: var(--accent); margin-top: 20px; }
.placeholder { color: var(--text-dim); font-style: italic; border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 16px; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--orange); }
.timeline li { padding: 0 0 14px 16px; position: relative; color: var(--text-soft); }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 8px; width: 10px; height: 10px; background: var(--orange); }
.timeline li b { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--accent); }

.two-col { display: grid; gap: 28px; }
@media (min-width: 1000px) { .two-col { grid-template-columns: 2fr 1fr; } }
.two-col > *, .duo > *, .tables > *, .stack > * { min-width: 0; }

/* ==========================================================================
   Componenti v2: banner settimana, calendario, profilo partita e giocatore
   ========================================================================== */

/* Esiti generici (W/L/T) */
.res { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.res-w { color: var(--win); } .res-l { color: var(--loss); } .res-t { color: var(--text-muted); }
.res.live { color: var(--live); }
.row-link { cursor: pointer; }
.count { font-size: 0.85rem; color: var(--text-dim); }

/* Card partita ora cliccabile */
a.game { color: var(--text); }
a.game:hover { text-decoration: none; border-color: var(--accent); }
a.game:hover .game-meta .status { color: var(--accent); }

/* ---------- 1. Banner settimana (striscia ESPN) ---------- */
.ticker { position: relative; display: flex; align-items: stretch; background: var(--navy-2); border-bottom: 1px solid var(--line); min-height: 100px; }
.ticker-head { flex: none; display: flex; align-items: center; padding: 0 12px; background: var(--orange); }
.ticker-week {
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--navy-ink); writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap;
}
.ticker-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ticker-track::-webkit-scrollbar { display: none; }
.ticker-empty { display: flex; align-items: center; padding: 0 16px; color: var(--text-muted); font-size: 0.9rem; }
.tk-card {
  flex: none; width: 148px; padding: 7px 12px 8px; border-right: 1px solid var(--line); color: var(--text); line-height: 1.2;
  display: flex; flex-direction: column; gap: 4px; scroll-snap-align: start;
}
.tk-card:hover { background: var(--navy-3); text-decoration: none; }
.tk-top {
  display: flex; justify-content: space-between; gap: 6px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted);
}
.tk-top .live { color: var(--live); }
.tk-team { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.tk-team .logo { width: 20px; height: 20px; }
.tk-team.lost { color: var(--text-dim); }
.tk-team.lost .logo { opacity: 0.5; }
.tk-score { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.tk-tv { margin-top: auto; font-family: var(--font-display); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticker-nav {
  display: none; position: absolute; top: 0; bottom: 0; width: 32px; border: 0; cursor: pointer;
  background: var(--navy-3); color: var(--white); font-family: var(--font-display); font-size: 1.5rem;
}
.ticker-nav.prev { left: 39px; border-right: 1px solid var(--line); }
.ticker-nav.next { right: 0; border-left: 1px solid var(--line); }
.ticker-nav:hover { background: var(--orange); color: var(--navy-ink); }
@media (min-width: 860px) { .ticker-nav { display: block; } .ticker-track { margin: 0 32px; } }

/* ---------- 3. Classifica lampo ---------- */
.leaders-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .leaders-grid { grid-template-columns: repeat(4, 1fr); } }
.leader {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "div div" "team rec"; gap: 6px 8px; align-items: center;
  padding: 10px 12px; background: var(--navy-2); border: 1px solid var(--line); border-top: 3px solid var(--orange); border-radius: var(--r); color: var(--text);
}
.leader:hover { background: var(--navy-3); text-decoration: none; }
.leader-div { grid-area: div; font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.leader-team { grid-area: team; display: flex; align-items: center; gap: 8px; min-width: 0; }
.leader-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-rec { grid-area: rec; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---------- 4. Ultimo reel ---------- */
.reel-card {
  display: grid; gap: 18px; align-items: center; padding: 20px; color: var(--text);
  background: var(--navy-2); border: 1px solid var(--line); border-left: 6px solid var(--orange); border-radius: var(--r);
}
.reel-card:hover { text-decoration: none; background: var(--navy-3); }
.reel-mark { display: flex; align-items: center; justify-content: center; width: 96px; height: 96px; background: var(--orange); color: var(--navy-ink); border-radius: var(--r); }
.reel-mark svg { width: 52px; height: 52px; }
.reel-cover { width: 100%; max-width: 220px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--r); }
.reel-body { display: grid; gap: 6px; justify-items: start; }
.reel-title { font-family: var(--font-display); font-size: clamp(1.5rem, 5vw, 2.1rem); text-transform: uppercase; line-height: 1.05; }
.reel-text { color: var(--text-muted); margin-bottom: 8px; }
@media (min-width: 640px) { .reel-card { grid-template-columns: auto 1fr; } }

/* ---------- Calendario ---------- */
.cal-block + .cal-block { margin-top: 12px; }
.cal-title { font-size: 1.5rem; color: var(--white); padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.cal-title.live { color: var(--live); }

/* ---------- Profilo partita ---------- */
.match-hero { background: var(--navy-2); border: 1px solid var(--line); border-top: 4px solid var(--orange); border-radius: var(--r); padding: 16px; }
.mh-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mh-status { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.06em; }
.mh-status.live { color: var(--live); }
.mh-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 14px 0 18px; }
.mh-team { display: grid; justify-items: center; text-align: center; gap: 6px; }
.mh-team.lost .mh-logo, .mh-team.lost .mh-name { opacity: 0.55; }
.mh-img { width: 64px; height: 64px; }
.mh-name a { display: grid; color: var(--text-muted); font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; text-transform: uppercase; line-height: 1.1; }
.mh-name a:hover { text-decoration: none; color: var(--accent); }
.mh-name strong { font-size: 1.5rem; color: var(--white); }
.mh-name span { font-size: 0.8rem; color: var(--text-dim); }
.mh-score { font-family: var(--font-display); font-weight: 800; font-size: 3.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.mh-score.won { color: var(--accent); }
.mh-vs { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--text-dim); }
.mh-info { display: grid; gap: 10px 20px; grid-template-columns: 1fr; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.mh-info dt { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }
.mh-info dd { margin: 2px 0 0; font-weight: 600; }
.placeholder-text { color: var(--text-dim); font-style: italic; font-weight: 500 !important; }
@media (min-width: 640px) {
  .match-hero { padding: 22px 26px; }
  .mh-team { grid-template-columns: auto 1fr auto; text-align: left; justify-items: start; gap: 14px; }
  .mh-team.right { grid-template-columns: auto 1fr auto; direction: rtl; text-align: right; }
  .mh-team.right > * { direction: ltr; }
  .mh-img { width: 72px; height: 72px; }
  .mh-name strong { font-size: 2rem; }
  .mh-score { font-size: 4.2rem; }
  .mh-info { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) { .mh-info { grid-template-columns: repeat(4, 1fr); } }

.duo { display: grid; gap: 16px; }
@media (min-width: 760px) { .duo { grid-template-columns: 1fr 1fr; } }
.duo-col { background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.duo-title { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; margin-bottom: 8px; }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li + li { border-top: 1px solid var(--line); }
.mini-list a { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 10px; padding: 8px 2px; color: var(--text); }
.mini-list a:hover { text-decoration: none; background: var(--navy-3); }
.ml-res { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; width: 1.2em; text-align: center; }
.ml-date { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; }
.ml-opp { display: flex; align-items: center; gap: 6px; font-weight: 600; min-width: 0; }
.ml-opp .logo { width: 20px; height: 20px; }
.ml-score { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.ml-score .logo { width: 20px; height: 20px; }
.mini-list em.pill { font-style: normal; margin-left: 4px; }
#h2h .mini-list a { grid-template-columns: auto 1fr auto; }

.h2h-tally { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 14px; margin-bottom: 10px; background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--r); text-align: center; }
.h2h-tally > div:not(.h2h-mid) { display: grid; justify-items: center; gap: 2px; }
.h2h-tally strong { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: var(--accent); }
.h2h-tally span { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; }
.h2h-mid { font-size: 0.85rem; color: var(--text-muted); }

.inj-list { list-style: none; margin: 0; padding: 0; }
.inj-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; }
.inj-list li + li { border-top: 1px solid var(--line); }
.inj-name { font-weight: 600; color: var(--text); }
.inj-name small { color: var(--text-dim); font-family: var(--font-display); font-weight: 700; margin-left: 4px; }
.inj-status { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.85rem; padding: 1px 6px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); align-self: start; }
.inj-status.s-O { background: var(--loss); border-color: var(--loss); color: var(--navy-ink); }
.inj-status.s-D { border-color: var(--loss); color: var(--loss); }
.inj-status.s-Q { border-color: var(--accent); color: var(--accent); }
.inj-detail { grid-column: 1 / -1; font-size: 0.82rem; color: var(--text-dim); }

.linescore td.tot { font-weight: 800; font-size: 1.25rem; }
.linescore tr.won td.tot { color: var(--accent); }

.compare { padding: 12px 14px; }
.cmp-head { display: grid; grid-template-columns: 1fr auto 1fr; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; text-transform: uppercase; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cmp-head span { display: flex; align-items: center; gap: 6px; }
.cmp-head span:last-child { justify-content: flex-end; }
.cmp-row { display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; gap: 4px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cmp-row:last-child { border-bottom: 0; }
.cmp-v { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.cmp-row .cmp-v:last-of-type { text-align: right; }
.cmp-l { text-align: center; font-size: 0.85rem; color: var(--text-muted); }
.cmp-bar { grid-column: 1 / -1; display: flex; height: 4px; gap: 2px; }
.cmp-bar i { display: block; height: 100%; }
.cmp-bar i.a { background: var(--white); }
.cmp-bar i.h { background: var(--orange); }

.top-player { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; padding: 10px 0; color: var(--text); }
.top-player + .top-player { border-top: 1px solid var(--line); }
.top-player:hover { text-decoration: none; }
.top-player:hover .tp-name { color: var(--accent); }
.top-player img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--navy-3); }
.tp-body { display: grid; line-height: 1.2; }
.tp-role { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.tp-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; text-transform: uppercase; }
.tp-line { font-size: 0.88rem; color: var(--text-muted); }

.plays { list-style: none; margin: 0; padding: 0; background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.plays-q { font-family: var(--font-display); font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 6px 14px; background: var(--navy-3); color: var(--text-muted); }
.play { display: grid; grid-template-columns: 28px 1fr; gap: 4px 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.plays-q + .play { border-top: 0; }
.play-body { display: grid; gap: 2px; }
.play-type { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.play-type b { color: var(--accent); }
.play-text { font-size: 0.92rem; }
.play-score { grid-column: 2; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }

.highlight-card { display: grid; gap: 8px; justify-items: start; padding: 18px 20px; background: var(--navy-2); border: 1px solid var(--line); border-left: 6px solid var(--orange); border-radius: var(--r); color: var(--text); }
.highlight-card:hover { text-decoration: none; background: var(--navy-3); }
.highlight-card strong { font-family: var(--font-display); font-size: 1.6rem; text-transform: uppercase; line-height: 1.05; }


/* ---------- Profilo giocatore ---------- */
.player-hero { overflow: hidden; }
.player-photo { width: 220px; height: auto; align-self: end; margin: -28px 0 -34px; }
.ph-team { display: inline-flex; align-items: center; gap: 6px; color: inherit; }
.ph-team:hover { text-decoration: underline; }
@media (min-width: 640px) { .player-photo { width: 260px; margin: -36px 0 -42px; } }
.stats-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stats-4 { grid-template-columns: repeat(4, 1fr); } }
.stack { display: grid; gap: 16px; }
.stat-table > h3 { padding: 12px 14px; margin: 0; border-bottom: 1px solid var(--line); font-size: 1.3rem; }
.cell-team { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-family: var(--font-display); font-weight: 700; }
.cell-team .logo { width: 18px; height: 18px; }
.total-row td { border-top: 2px solid var(--orange); font-weight: 700; color: var(--white); }
.group-row th { background: var(--navy-2); color: var(--accent); border-bottom: 1px solid var(--line); }
.gamelog a.res { white-space: nowrap; }
.gamelog a.res:hover { text-decoration: underline; }

/* ---------- Log partite (scheda squadra) ---------- */
.schedule.log tbody tr.row-link:hover { background: var(--navy-3); }
.schedule.log tr.upcoming td { color: var(--text-muted); }
.schedule.log tr.upcoming .opp { color: var(--text); }
.schedule.log a.log-link { color: inherit; }
.schedule.log a.log-link:hover { text-decoration: none; }
.res-time { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--white); }
.log-tv { font-size: 0.8rem; color: var(--text-dim); }
.schedule.log tfoot td { padding: 10px; border-top: 2px solid var(--orange); color: var(--text-muted); }
.schedule.log tfoot b { font-family: var(--font-display); font-size: 1.15rem; color: var(--white); }
.roster a.player { color: var(--text); }
.roster a.player:hover { color: var(--accent); text-decoration: none; }

/* ---------- Statistiche: leader NFL ---------- */
.leaders-cards { display: grid; gap: 16px; }
@media (min-width: 760px) { .leaders-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .leaders-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.leader-card { background: var(--navy-2); border: 1px solid var(--line); border-top: 4px solid var(--orange); border-radius: var(--r); overflow: hidden; scroll-margin-top: 80px; }
.lc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.lc-head h2 { font-size: 1.5rem; margin: 0; }
.ld-list { list-style: none; margin: 0; padding: 0; }
.ld-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 7px 14px; }
.ld-row + .ld-row { border-top: 1px solid var(--line); }
.ld-row:hover { background: var(--navy-3); }
.ld-rank { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--text-dim); text-align: center; font-variant-numeric: tabular-nums; }
.ld-rank small { font-size: 0.7rem; margin-right: 1px; }
.ld-player { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); }
.ld-player:hover { text-decoration: none; }
.ld-player:hover .ld-name { color: var(--accent); }
.ld-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--navy-3); flex: none; }
.ld-who { display: grid; min-width: 0; line-height: 1.2; }
.ld-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-meta { font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.ld-team { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; color: var(--text-muted); }
.ld-team:hover { color: var(--accent); text-decoration: none; }
.ld-team .logo { width: 22px; height: 22px; }
.ld-value { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; min-width: 3.2ch; text-align: right; font-variant-numeric: tabular-nums; }
.ld-row.first { padding: 12px 14px; background: var(--navy-3); }
.ld-row.first .ld-rank { color: var(--accent); font-size: 1.5rem; }
.ld-row.first .ld-photo { width: 52px; height: 52px; }
.ld-row.first .ld-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1.05; text-transform: uppercase; white-space: normal; }
@media (min-width: 640px) { .ld-row.first .ld-photo { width: 64px; height: 64px; } }
.ld-row.first .ld-value { font-size: 2.1rem; color: var(--accent); }

/* ---------- Tendine (tutti i selettori del sito) ---------- */
.select-field { display: inline-grid; gap: 4px; max-width: 100%; }
.select-label { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }
.select-wrap { position: relative; display: block; }
.select-wrap::after {
  content: ""; position: absolute; right: 14px; top: 50%; margin-top: -3px; pointer-events: none;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid var(--accent);
}
.select {
  -webkit-appearance: none; appearance: none; width: 100%; min-width: 260px; max-width: 100%;
  padding: 10px 40px 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--navy-2); color: var(--text); cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.03em;
}
.select:hover { border-color: var(--accent); }
.select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.select option, .select optgroup { background: var(--navy-2); color: var(--text); font-family: var(--font-body); text-transform: none; }
.select.is-current { border-color: var(--orange); border-left: 5px solid var(--orange); }
@media (max-width: 420px) { .select-field { display: grid; } .select { min-width: 0; } }
.roster-select { margin-bottom: 14px; }

/* ---------- Statistiche: controlli e classifica completa ---------- */
.stats-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin-bottom: 8px; }
.stats-controls .segmented button { padding: 11px 20px; font-size: 1.1rem; }
.rank-section { margin-top: 28px; }
.rank-note { font-size: 0.85rem; color: var(--text-muted); margin: -4px 0 12px; padding-left: 10px; border-left: 3px solid var(--accent); }
.rank-card .ld-list { border-bottom: 1px solid var(--line); }
.rank-card .placeholder { margin: 14px; }
.show-all { display: flex; width: calc(100% - 28px); margin: 14px; }
.ld-teamlogo { width: 40px; height: 40px; }
.ld-row.first .ld-teamlogo { width: 52px; height: 52px; }

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