/* Foglio di stile condiviso «Partite in TV» — versione 2026-09-19.10 (base: landing del Padova 2026-09-18.7 + hub e card squadra) */
/* Bar Thomas — landing «Il Padova in TV» — CSS autonomo, nessuna dipendenza.
   Token allineati alla landing pubblicata /it/dopo-turno-brentelle/ (settembre 2026).
   Font di sistema: zero richieste di rete, nessun layout shift da font. */

:root {
  --paper: #f8f5ef;
  --white: #ffffff;
  --ink: #19382e;
  --muted: #4a5750;
  --line: #d9ddd3;
  --wine: #832d42;
  --warm: #e6b85e;
  --warm-soft: #fbf1d6;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 8px;
  --wrap: 1120px;
  --narrow: 720px;
  --sticky-h: 0px;
  --consent-h: 0px;
  color-scheme: light;
}

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

html {
  font-family: var(--sans);
  font-size: 18px;               /* base grande: pubblico 35-60, uso mobile */
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-block: 1.5rem calc(var(--sticky-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100dvh;
  padding-bottom: calc(var(--sticky-h) + var(--consent-h));
  overflow-wrap: anywhere;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 2.5px; }

/* Focus visibile e coerente ovunque (WCAG 2.4.7, 2.4.11, 2.4.13) */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible, .wordmark:focus-visible { outline-offset: 4px; }

/* Layout */
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: var(--narrow); }
.faq-wrap { max-width: 980px; }
.section { padding-block: clamp(2.25rem, 6vw, 4rem); scroll-margin-top: 12px; }
.section--alt { background: var(--white); border-block: 1px solid var(--line); }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 30;
  background: var(--white); color: var(--ink);
  padding: 12px 20px; border: 2px solid var(--ink); border-radius: var(--radius);
  font-weight: 700; transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Header */
.header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; padding-block: 6px; }
.wordmark {
  display: inline-flex; align-items: center; min-height: 44px; padding-block: 8px;
  font-size: 1.45rem; font-weight: 800; letter-spacing: -0.04em; text-decoration: none; white-space: nowrap;
}
.wordmark span { color: var(--wine); }
.header__where { font-size: 0.9rem; color: var(--muted); text-align: right; max-width: 11rem; }
@media (width <= 359px) { .header__where { display: none; } }
@media (width >= 600px) { .header__where { max-width: none; } }

/* Bottoni: target ≥ 56×56 sui principali, ≥ 44×44 sugli altri (WCAG 2.5.8 richiede 24×24) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; min-width: 56px; padding: 14px 24px;
  border-radius: var(--radius); border: 2px solid var(--ink);
  font-size: 1.125rem; font-weight: 750; line-height: 1.3; text-decoration: none;
  cursor: pointer; transition: background-color .15s, color .15s;
}
.btn--primary { background: var(--ink); color: var(--white); }
.btn--primary:hover { background: #22483c; }
.btn--secondary { background: var(--white); color: var(--ink); }
.btn--secondary:hover { background: var(--warm-soft); }
.btn__icon { width: 24px; height: 24px; flex: none; }
.btn--secondary .btn__icon { color: #0f7a41; }

.cta-group { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
.hero .cta-group { margin-top: 1.35rem; }
@media (width <= 599px) {
  .cta-group { flex-direction: column; }
  .cta-group .btn { width: 100%; }
}

/* Hero */
.hero { padding-block: 1rem 2.5rem; }
.hero__grid { display: grid; gap: 1.75rem; }
.eyebrow {
  display: inline-block; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--wine); margin-bottom: 0.75rem;
}
h1 {
  font-size: clamp(2.1rem, 7.6vw, 3.6rem);
  line-height: 1.06; font-weight: 800; letter-spacing: -0.03em;
  text-wrap: balance; max-width: 12ch;
}
h1 .h1__soft { display: block; color: var(--muted); font-weight: 700; font-size: 0.6em; letter-spacing: -0.01em; margin-top: 0.35em; line-height: 1.2; text-wrap: pretty; }
@media (width <= 599px) { h1 { max-width: none; } }

.cta-hint { margin-top: 10px; font-size: 0.9rem; color: var(--muted); }
.cta-hint strong { color: var(--ink); font-weight: 800; }
.trust { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin-top: 1rem; }
.hours { font-size: 1rem; }
.hours strong { font-weight: 800; }
.rating { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; font-size: 1rem; }
.rating__stars { color: #9a660a; font-size: 1.15rem; line-height: 1; }  /* ambra scura: 4,5:1 su carta */
.rating__value { font-weight: 800; }
.rating__count { color: var(--muted); }
.rating__count[hidden] { display: none; }
.hours-link { display: inline-block; min-height: 44px; padding-block: 10px; font-size: 0.95rem; }

.hero__figure { position: relative; }
.hero__figure picture { display: block; }
.hero__figure img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--line); background: #e9e4d8;
}
.hero__figure figcaption { margin-top: 8px; font-size: 0.9rem; color: var(--muted); }
.badge-tv {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; font-size: 0.9rem; font-weight: 800;
  box-shadow: 0 2px 10px rgba(25, 56, 46, .12);
}
.badge-tv svg { width: 20px; height: 20px; }

@media (width >= 900px) {
  .hero { padding-block: 2rem 3.5rem; }
  .hero__grid { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 3rem; }
  h1 { max-width: 14ch; }
}

/* Fascia «In diretta ufficiale» + loghi ufficiali (slot; i file vanno aggiunti dal titolare) */
.partners { background: var(--white); border-block: 1px solid var(--line); }
.partners__inner {
  display: grid; gap: 10px 2rem; padding-block: 1.1rem; align-items: center;
  grid-template-areas: "title" "logos" "text";
}
.partners__title { grid-area: title; font-size: 0.82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--wine); }
.partners__text { grid-area: text; font-size: 1rem; max-width: 60ch; }
.partners__logos { grid-area: logos; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; min-height: 56px; }
.partners__logos li[hidden] { display: none; }
.partners__logos:not(:has(li:not([hidden]))) { display: none; }  /* nessuno spazio vuoto se i file mancassero */
.partners__logos img { height: 56px; width: auto; max-width: 180px; object-fit: contain; }
@media (width >= 760px) {
  .partners__inner { grid-template-columns: 1fr auto; grid-template-areas: "title logos" "text logos"; row-gap: 4px; }
  .partners__logos { justify-content: flex-end; }
}

/* Scheda rapida: fatti essenziali in forma leggibile da persone, motori e assistenti */
.facts__title { margin-top: 2rem; font-size: 1rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.facts { display: grid; gap: 0; margin-top: 0.5rem; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 6px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
.facts dt { font-weight: 800; }
.facts dd { margin: 0; }
@media (width >= 760px) { .facts { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; } }
@media (width <= 419px) { .facts > div { grid-template-columns: 1fr; gap: 2px; } }

.where__text { margin-top: 0.75rem; color: var(--muted); }

/* Prossima partita */
.next__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
.updated { color: var(--muted); font-size: 0.92rem; }

.match-card {
  display: grid; gap: 4px;
  padding: 1.25rem 1.25rem 1.35rem;
  background: var(--white); border: 2px solid var(--ink); border-radius: 12px;
  box-shadow: 0 6px 24px rgba(25, 56, 46, .08);
}
.match-card__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.match-card__label { font-size: 0.82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--wine); }
.match-card__tbc { margin-top: 6px; font-size: 0.95rem; color: var(--muted); }
.match-card__note { margin-top: 8px; font-size: 0.95rem; color: var(--muted); }
.match-card__actions { margin-top: 10px; font-size: 0.95rem; color: var(--muted); }
.match-card__actions a { color: var(--ink); font-weight: 700; }
.matches time em { font-style: italic; font-weight: 600; color: var(--muted); }
.btn--small { min-height: 48px; font-size: 1rem; padding: 10px 18px; margin-top: 1rem; }
.btn--small[hidden] { display: none; }
.match-card__when { font-size: clamp(1.3rem, 4.6vw, 1.7rem); font-weight: 800; line-height: 1.15; }
.match-card__when .when__time { display: block; font-size: 0.8em; color: var(--muted); margin-top: 2px; }
.match-card__teams { font-size: 1.2rem; font-weight: 700; }
.match-card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px;
  padding: 4px 12px; border-radius: 999px; font-size: 0.92rem; font-weight: 700;
  background: var(--paper); border: 1px solid var(--line);
}
.tag--tv { background: var(--warm-soft); border-color: #d9b45e; }
.tag--tv svg { width: 18px; height: 18px; }
.tag--no { background: #f3f3f3; color: #5a5a5a; }
.tag--rel { background: var(--ink); color: var(--white); border-color: var(--ink); min-height: 30px; }
.tag--rel.tag--live { background: var(--wine); border-color: var(--wine); }
.match-card__empty { font-size: 1.05rem; }

.matches__title { margin-top: 1.25rem; font-size: 1rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.matches { margin-top: 0.5rem; border-top: 1px solid var(--line); }
.matches li {
  display: grid; grid-template-columns: minmax(7.5rem, auto) 1fr auto; gap: 6px 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1rem;
}
.matches li[hidden] { display: none; }
.matches time { font-weight: 800; font-variant-numeric: tabular-nums; }
.matches .teams { font-weight: 600; }
.matches .venue { color: var(--muted); font-size: 0.92rem; }
.matches .tv-flag { grid-column: 1 / -1; font-size: 0.9rem; color: #5a5a5a; }
.matches li[data-tv="no"] .teams { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--muted); }
.matches li[data-extra][hidden] { display: none; }
.note { margin-top: 1rem; color: var(--muted); font-size: 0.95rem; }
.note a { color: var(--ink); }
.tap-link { display: inline-block; padding-block: 12px; margin-block: -12px; }  /* area di tocco ≥ 44px senza spostare il testo */
@media (width <= 639px) {
  /* schermi stretti, landing di squadra: data e ora / squadre / competizione su tre righe (i nomi lunghi come
     «Borussia Dortmund – Inter» o «Salisburgo – Milan» non vanno più a capo dentro una colonna stretta) */
  .matches li { grid-template-columns: minmax(0, 1fr); gap: 2px; align-items: baseline; }
  .matches time, .matches .teams, .matches .teams-cell, .matches .venue, .matches .tv-flag { grid-column: 1; }
  .matches .venue { font-size: 0.88rem; }
  .matches .tv-flag { margin-top: 2px; }
  /* hub: la competizione è corta («Serie A · 5ª»): resta a destra della data, le squadre sotto */
  .matches li:has(.teams-cell) { grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; }
  .matches li:has(.teams-cell) time { grid-column: 1; grid-row: 1; }
  .matches li:has(.teams-cell) .venue { grid-column: 2; grid-row: 1; justify-self: end; text-align: right; }
  .matches li:has(.teams-cell) .teams-cell { grid-column: 1 / -1; grid-row: 2; }
  .matches li:has(.teams-cell) .tv-flag { grid-column: 1 / -1; grid-row: 3; }
}
}

/* Come funziona */
.points { display: grid; gap: 1rem; margin-top: 1.25rem; }
.point {
  display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start;
  padding: 1.1rem 1.1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
}
.point__icon { width: 48px; height: 48px; display: grid; place-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.point__icon svg { width: 28px; height: 28px; }
.point h3 { font-size: 1.15rem; font-weight: 800; line-height: 1.25; }
.point p { margin-top: 4px; color: var(--muted); font-size: 1rem; }
@media (width >= 760px) { .points { grid-template-columns: repeat(3, 1fr); } }

/* Dove siamo */
.where__grid { display: grid; gap: 1.5rem; }
.where__figure picture { display: block; }
.where__figure img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: #e9e4d8; }
.address { font-style: normal; font-size: 1.15rem; margin-top: 0.75rem; }
.address strong { font-weight: 800; }
@media (width >= 760px) { .where__grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 2.5rem; } }

/* FAQ — testo sempre visibile: niente accordion, zero tocchi in più */
.faq { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
@media (width >= 900px) { .faq { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; } }
.faq h3 { font-size: 1.15rem; font-weight: 800; }
.faq p { margin-top: 4px; }

/* Footer */
.footer { padding-block: 2rem 2.5rem; border-top: 1px solid var(--line); font-size: 0.95rem; color: var(--muted); }
.footer p { margin-top: 6px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 12px; }
.footer__links a, .footer__links button { display: inline-flex; align-items: center; min-height: 44px; padding: 0; background: none; border: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.footer__legal { font-size: 0.85rem; margin-top: 14px; }

/* Barra fissa in basso: compare quando il pulsante principale esce dallo schermo */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8;
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  background: rgba(248, 245, 239, .97); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 24px rgba(25, 56, 46, .08);
}
.sticky[hidden] { display: none; }
.sticky .btn { white-space: nowrap; }
.sticky .btn--primary { flex: 1 1 0; min-width: 0; }
.sticky .btn--secondary { flex: 0 0 auto; padding-inline: 14px; }
@media (width <= 599px) {
  .sticky .btn--secondary { padding-inline: 0; width: 56px; }
  .sticky .btn--secondary .btn__label { display: none; }   /* solo icona: il nome resta nell'aria-label */
  .sticky .btn--primary { font-size: 1.05rem; padding-inline: 12px; }
  .sticky .btn--primary .btn__icon { display: none; }
}
@media (width <= 359px) { .sticky .btn--primary { font-size: 1rem; } }
@media (width >= 900px) { .sticky { justify-content: center; } .sticky .btn--primary { flex: 0 1 420px; } }

/* Banner consenso: overlay fisso, nessuno spostamento del contenuto */
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 12;
  background: var(--white); color: var(--ink);
  border-top: 2px solid var(--ink);
  padding: 14px clamp(16px, 4vw, 48px) max(14px, env(safe-area-inset-bottom));
  box-shadow: 0 -6px 28px rgba(25, 56, 46, .16);
  max-height: 85dvh; overflow: auto;
}
.consent[hidden] { display: none; }
.consent__inner { max-width: var(--wrap); margin-inline: auto; display: grid; gap: 8px; }
.consent__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.consent__heading h2 { font-size: 1.1rem; }
.consent__close { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--white); border-radius: 8px; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.consent p { font-size: 0.95rem; line-height: 1.45; }
.consent__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.consent__actions .btn { min-height: 48px; font-size: 1rem; padding: 10px 12px; flex: 1 1 8rem; }
.consent__links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.consent__links a, .consent__customize { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; font-size: 0.9rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.consent__customize { background: none; border: 0; color: var(--ink); cursor: pointer; }
.consent__options { display: grid; gap: 10px; padding-top: 6px; }
.consent__options[hidden] { display: none; }
.consent__options fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 0; display: grid; gap: 8px; }
.consent__options legend { font-weight: 800; padding-inline: 4px; }
.consent__option { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; min-height: 44px; padding: 6px 0; cursor: pointer; }
.consent__option input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--ink); }
.consent__option span span { display: block; color: var(--muted); font-size: 0.92rem; }
.consent__current { font-weight: 700; }
.consent__status { font-size: 0.92rem; color: var(--muted); }
.consent__status:empty { display: none; }
@media (width <= 339px) { .consent__actions .btn { flex: 1 1 100%; } }

/* Utility */
.nowrap { white-space: nowrap; }
.visually-hidden-when-js [data-js-only] { display: none; }

/* Movimento ridotto: nessuna animazione o transizione non essenziale */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Modalità alto contrasto forzato */
@media (forced-colors: active) {
  .btn, .consent__close { forced-color-adjust: none; border: 2px solid ButtonText; background: ButtonFace; color: ButtonText; }
  .btn--primary { background: ButtonText; color: ButtonFace; }
  .match-card, .point, .consent { border-color: CanvasText; }
}

@media print {
  .sticky, .consent, .skip-link { display: none !important; }
}

/* ===== Aggiunte 2026-09-19.10: pagine squadra e hub ===== */
.matches li[data-tv="?"] .teams { color: var(--muted); }
.matches li[data-tv="?"] .tv-flag, .matches li[data-tv="no"] .tv-flag { color: #6a4a00; }
.matches .teams:is(a) { display: inline-flex; align-items: center; min-height: 44px; margin-block: -8px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.matches .teams-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.matches .teams-cell .tag--rel { min-height: 26px; font-size: 0.85rem; padding-block: 2px; }

/* Card delle squadre (hub e «Le altre squadre in TV» nelle landing) */
.squadre { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 12px; }
.squadre__item { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 14px 16px; background: var(--white); border: 2px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; transition: border-color .16s, transform .16s; min-height: 88px; }
.squadre__item:hover { border-color: var(--ink); transform: translateY(-1px); }
.squadre__item:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.squadre__item img { width: 64px; height: 64px; object-fit: contain; }
.squadre__item--current { border-color: var(--ink); background: var(--paper); }
.squadre__name { display: block; font-size: 1.2rem; font-weight: 800; line-height: 1.15; }
.squadre__next { display: block; margin-top: 4px; font-size: 0.95rem; color: var(--muted); line-height: 1.4; }
.squadre__next strong { color: var(--ink); font-weight: 700; }
.squadre__cta { display: inline-block; margin-top: 6px; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
@media (width >= 640px) { .squadre { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .squadre__item { transition: none; } .squadre__item:hover { transform: none; } }

/* Fascia competizioni nell'hub */
.comps { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 1rem; padding: 0; list-style: none; }
.comps li { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-size: 0.92rem; font-weight: 700; }
.comps img { height: 26px; width: auto; }

/* Avviso «una TV, una partita» */
.one-tv { margin-top: 1.25rem; padding: 14px 16px; background: var(--warm-soft); border: 1px solid #d9b45e; border-radius: 12px; font-size: 0.98rem; }
.one-tv strong { font-weight: 800; }