/* =========================================================================
   G.S. SANGONE NICHELINO — design system "Matchday"
   Blu notte + oro champagne · Barlow Condensed (titoli) / Barlow (testo)
   ========================================================================= */

/* ---------- font locali (funzionano anche offline in palestra) ---------- */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/Barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/Barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/Barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/Barlow-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/BarlowCondensed-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/BarlowCondensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/BarlowCondensed-700.woff2") format("woff2"); }

/* ---------- token ---------- */
:root {
  /* primitivi */
  --navy-950: #060F1F;
  --navy-900: #0A1A33;
  --navy-800: #0F2547;
  --navy-700: #12325E;
  --navy-600: #1D4E9E;
  --gold-300: #E9D49A;
  --gold-400: #D7B566;
  --gold-500: #C29B3E;
  --gold-700: #7D5F1A;

  /* semantici */
  --bg: #F3F4F7;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --line: #E2E6EC;
  --line-strong: #CBD2DC;
  --ink: #0C1626;
  --ink-2: #344054;
  --muted: #5A6576;
  --focus: var(--navy-600);

  --ok: #146C36;      --ok-bg: #E4F3E9;
  --ko: #B42318;      --ko-bg: #FCE9E7;
  --warn: #8A5300;    --warn-bg: #FDF0D8;
  --info: #1D4E9E;    --info-bg: #E6EDF8;
  --neutral: #475467; --neutral-bg: #EEF0F3;

  --font-display: "Barlow Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  --font-body: "Barlow", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px;
  --shadow-1: 0 1px 2px rgba(10, 26, 51, .05), 0 6px 18px -10px rgba(10, 26, 51, .16);
  --shadow-2: 0 2px 6px rgba(10, 26, 51, .08), 0 22px 44px -20px rgba(10, 26, 51, .42);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --t-fast: 150ms;
  --t-med: 260ms;

  --container: 1200px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --z-sticky: 40; --z-nav: 50; --z-skip: 100;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--navy-600); text-underline-offset: .2em; }
a:hover { color: var(--navy-800); }
h1, h2, h3 {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  line-height: 1.04; color: var(--navy-900); margin: 0; text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.5rem); letter-spacing: .01em; }
h2 { font-size: 1.4rem; letter-spacing: .04em; }
h3 { font-size: 1.05rem; letter-spacing: .08em; }
p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 700; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -120px; z-index: var(--z-skip);
  background: var(--gold-400); color: var(--navy-950); font-weight: 700;
  padding: .75rem 1.1rem; border-radius: var(--r-sm); text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.ic {
  width: 1.15em; height: 1.15em; flex: 0 0 auto; display: inline-block; vertical-align: -.2em;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.mini { font-size: .85rem; color: var(--muted); }
.attenzione { color: var(--warn); font-weight: 600; }
.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
main.main { flex: 1; padding-block: clamp(1.5rem, 3vw, 2.25rem) 3.5rem; }
main.main:focus { outline: none; }

/* elementi scuri: il focus diventa oro */
.topbar, .hero, .login-visual, .barra-salva, .site-footer, .dialogo-head { --focus: var(--gold-300); }

/* =========================================================================
   BARRA SUPERIORE
   ========================================================================= */
.topbar {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: var(--navy-950); color: #fff;
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .8);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--gold-500) 18%, var(--gold-300) 50%, var(--gold-500) 82%, transparent 100%);
}
.topbar-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 70px; }
.brand { display: flex; align-items: center; gap: .8rem; color: #fff; text-decoration: none; flex: 0 0 auto; }
.brand:hover { color: #fff; }
.brand-crest { width: 40px; height: 45px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45)); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: .72rem;
  letter-spacing: .28em; text-transform: uppercase; color: var(--gold-400);
}
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.32rem;
  letter-spacing: .07em; text-transform: uppercase; margin-top: .22rem;
}

.nav-pannello { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.nav { display: flex; align-items: center; gap: .15rem; }
.nav a {
  position: relative; display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px; padding: 0 .85rem; border-radius: var(--r-sm);
  color: rgba(255, 255, 255, .74); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  letter-spacing: .09em; text-transform: uppercase;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.nav a .ic { opacity: .75; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav a[aria-current="page"] { color: #fff; }
.nav a[aria-current="page"] .ic { opacity: 1; color: var(--gold-300); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: 4px; height: 2px;
  border-radius: 2px; background: var(--gold-400);
}

/* menu utente */
.menu-utente { position: relative; }
.utente-btn {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 44px;
  padding: 0 .65rem 0 .35rem; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); color: #fff;
  font: 600 .95rem var(--font-body);
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.utente-btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }
.utente-btn .ic-chev { transition: transform var(--t-fast); opacity: .7; }
.utente-btn[aria-expanded="true"] .ic-chev { transform: rotate(180deg); }
.avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-300), var(--gold-500)); color: var(--navy-950);
  font-family: var(--font-display); font-weight: 700; font-size: .95rem; letter-spacing: .04em;
}
.utente-info { display: none; }
.menu-utente-lista {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; z-index: var(--z-nav);
  margin: 0; padding: .4rem; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-2); display: none;
}
.menu-utente-lista.aperto { display: block; animation: cala var(--t-med) var(--ease-out); }
.menu-utente-lista a {
  display: flex; align-items: center; gap: .65rem; min-height: 44px; padding: 0 .75rem;
  border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-weight: 500;
}
.menu-utente-lista a .ic { color: var(--muted); }
.menu-utente-lista a:hover { background: var(--surface-2); color: var(--navy-900); }
.menu-utente-lista a[aria-current="page"] { background: var(--info-bg); color: var(--navy-800); font-weight: 600; }
.menu-utente-lista .sep { height: 1px; margin: .35rem .25rem; background: var(--line); }
.menu-utente-lista a.esci, .menu-utente-lista a.esci .ic { color: var(--ko); }
.menu-utente-lista a.esci:hover { background: var(--ko-bg); }
.no-js .menu-utente-lista { position: static; display: flex; background: none; border: 0; box-shadow: none; padding: 0; }
.no-js .menu-utente-lista a { color: rgba(255, 255, 255, .8); }
.no-js .utente-btn { display: none; }

.nav-toggle {
  display: none; align-items: center; justify-content: center; width: 46px; height: 46px; margin-left: auto;
  border-radius: var(--r-sm); border: 1px solid rgba(255, 255, 255, .2); background: transparent;
  color: #fff; cursor: pointer;
}
.nav-toggle .ic { width: 24px; height: 24px; }
.nav-toggle .ic-x { display: none; }
.nav-toggle[aria-expanded="true"] .ic-menu { display: none; }
.nav-toggle[aria-expanded="true"] .ic-x { display: block; }

@media (max-width: 1080px) and (min-width: 900px) {
  .nav a .ic { display: none; }
  .utente-nome { display: none; }
}
@media (max-width: 899px) {
  .topbar-inner { min-height: 64px; }
  .brand-crest { width: 34px; height: 38px; }
  .brand-name { font-size: 1.15rem; }
  .js .nav-toggle { display: inline-flex; }
  .js .nav-pannello {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem var(--gutter) 1.25rem; background: var(--navy-950);
    border-top: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .8);
    max-height: calc(100dvh - 64px); overflow-y: auto;
  }
  .js .nav-pannello.aperto { display: flex; animation: cala var(--t-med) var(--ease-out); }
  .nav { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a { min-height: 52px; padding: 0 .75rem; border-radius: 0; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 1.12rem; }
  .nav a[aria-current="page"] { background: rgba(255, 255, 255, .05); }
  .nav a[aria-current="page"]::after { left: 0; right: auto; top: 12px; bottom: 12px; width: 3px; height: auto; }
  .menu-utente { margin-top: 1rem; }
  .utente-btn { display: none; }
  .utente-info { display: flex; align-items: center; gap: .7rem; padding: .5rem .75rem; color: #fff; }
  .utente-info small { display: block; color: rgba(255, 255, 255, .6); font-size: .8rem; }
  .menu-utente-lista, .menu-utente-lista.aperto {
    display: block; position: static; min-width: 0; padding: 0; animation: none;
    background: none; border: 0; box-shadow: none;
  }
  .menu-utente-lista a { color: rgba(255, 255, 255, .8); min-height: 48px; border-radius: 0; }
  .menu-utente-lista a .ic { color: rgba(255, 255, 255, .6); }
  .menu-utente-lista a:hover, .menu-utente-lista a[aria-current="page"] { background: rgba(255, 255, 255, .06); color: #fff; }
  .menu-utente-lista .sep { background: rgba(255, 255, 255, .1); }
  .menu-utente-lista a.esci, .menu-utente-lista a.esci .ic { color: #FFA59A; }
  .menu-utente-lista a.esci:hover { background: rgba(255, 165, 154, .1); }
}

/* =========================================================================
   HERO DI PAGINA (immagine + overlay)
   ========================================================================= */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--navy-950); color: #fff;
  border-bottom: 1px solid rgba(215, 181, 102, .28);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--hero-sm, none) var(--hero-pos, center) / cover no-repeat;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(0deg, rgba(6, 15, 31, .92) 0%, rgba(6, 15, 31, .55) 55%, rgba(6, 15, 31, .7) 100%);
}
@media (min-width: 800px) {
  .hero::before { background-image: var(--hero, none); }
  .hero::after {
    background:
      linear-gradient(90deg, rgba(6, 15, 31, .97) 0%, rgba(6, 15, 31, .86) 36%, rgba(6, 15, 31, .45) 72%, rgba(6, 15, 31, .3) 100%),
      linear-gradient(0deg, rgba(6, 15, 31, .85) 0%, rgba(6, 15, 31, 0) 50%);
  }
}
.hero-inner {
  position: relative; display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 1.5rem 2.5rem;
  min-height: 250px; padding-block: clamp(2.25rem, 5vw, 3.75rem) clamp(1.75rem, 4vw, 2.75rem);
}
.hero-inner > :not(.hero-numero) { position: relative; z-index: 1; }
.hero--compatto .hero-inner { min-height: 0; padding-block: clamp(1.75rem, 4vw, 2.5rem) clamp(1.5rem, 3vw, 2rem); }
.hero--grande .hero-inner { min-height: 440px; align-items: stretch; }
.hero-testo { flex: 1 1 420px; min-width: 0; }
.hero h1 { color: #fff; }
.h1-pre {
  display: block; font-size: .42em; letter-spacing: .14em; color: rgba(255, 255, 255, .7);
  margin-bottom: .35rem; font-weight: 600;
}
.hero h1 .oro { color: var(--gold-300); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .65rem; margin: 0 0 .75rem;
  font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  letter-spacing: .24em; text-transform: uppercase; color: var(--gold-400);
}
.eyebrow::before { content: ""; width: 30px; height: 2px; background: currentColor; flex: 0 0 auto; }
.hero-sub { color: rgba(255, 255, 255, .76); max-width: 60ch; margin: .8rem 0 0; font-size: 1.06rem; }
.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; margin-top: 1rem;
  color: rgba(255, 255, 255, .82); font-size: 1rem;
}
.hero-meta > span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-meta .ic { color: var(--gold-400); }
.hero-nota {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: .9rem;
  padding: .4rem .8rem; border-radius: 999px; font-weight: 600; font-size: .92rem;
  background: rgba(253, 240, 216, .12); color: #F6D9A2; border: 1px solid rgba(246, 217, 162, .35);
}
.hero-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.hero-azioni { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.hero-numero {
  position: absolute; right: var(--gutter); bottom: -.14em; z-index: 0; pointer-events: none;
  font-family: var(--font-display); font-weight: 700; line-height: .8;
  font-size: clamp(9rem, 20vw, 17rem); color: transparent;
  -webkit-text-stroke: 2px rgba(215, 181, 102, .42);
}
@media (max-width: 640px) {
  .hero-numero { font-size: 8rem; opacity: .6; }
  .hero-azioni { width: 100%; }
  .hero-azioni .btn { flex: 1 1 auto; }
}

/* vetro sull'immagine */
.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .15); border-radius: var(--r-lg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}

/* ---------- dashboard: prossima gara nell'hero ---------- */
.hero-dash { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 2rem; width: 100%; align-items: end; }
.hero-dash .hero-testo { align-self: center; }
.gara-hero { padding: 1.35rem 1.4rem 1.4rem; }
.gara-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.gara-hero-top .eyebrow { margin: 0; }
.quando-chip {
  font-family: var(--font-display); font-weight: 700; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .25rem .65rem; border-radius: 999px; background: var(--gold-400); color: var(--navy-950);
}
.sfida { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem; text-align: center; }
.sfida-squadra { display: grid; justify-items: center; gap: .55rem; min-width: 0; }
.sfida-squadra svg { width: 54px; height: 61px; }
.sfida-sigla {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06);
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: .04em;
}
.sfida-nome {
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; line-height: 1.1;
  text-transform: uppercase; letter-spacing: .04em; overflow-wrap: anywhere;
}
.sfida-ruolo { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .6); font-family: var(--font-display); font-weight: 600; }
.sfida-vs { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--gold-300); letter-spacing: .06em; }
.gara-hero-meta {
  display: grid; gap: .45rem; margin: 1.15rem 0 1.2rem; padding-top: 1.05rem;
  border-top: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .84); font-size: .95rem;
}
.gara-hero-meta span { display: flex; align-items: flex-start; gap: .55rem; }
.gara-hero-meta .ic { color: var(--gold-400); margin-top: .15rem; }
.gara-hero-azioni { display: flex; gap: .6rem; flex-wrap: wrap; }
.gara-hero-azioni .btn { flex: 1 1 auto; }

.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; width: 100%; }
.hero-stat {
  display: block; padding: 1rem 1.15rem; color: #fff; text-decoration: none;
  transition: background-color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
a.hero-stat:hover { color: #fff; background: rgba(255, 255, 255, .14); border-color: rgba(215, 181, 102, .5); }
.hero-stat .stat-num { color: #fff; }
.hero-stat .stat-label { color: rgba(255, 255, 255, .7); }
.hero-stat.allerta .stat-num { color: #FFA59A; }
.hero-stat.ok .stat-num { color: var(--gold-300); }
@media (max-width: 960px) {
  .hero-dash { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero--grande .hero-inner { min-height: 0; }
}

/* =========================================================================
   CARD / GRIGLIE / SEZIONI
   ========================================================================= */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.1rem, 2.2vw, 1.6rem); box-shadow: var(--shadow-1); margin-bottom: 1.5rem;
  min-width: 0;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: .75rem 1rem; margin-bottom: 1.15rem;
}
.card-head > div { display: flex; gap: .5rem; flex-wrap: wrap; }
.card h2, .titolo-sez { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.card h2::before, .titolo-sez::before {
  content: ""; width: 4px; height: 1.05em; border-radius: 2px; flex: 0 0 auto;
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
}
.card h3 { color: var(--gold-700); margin: 1.5rem 0 .8rem; }
.titolo-sez { font-size: 1.55rem; margin-bottom: 1rem; }
.conta-pill {
  display: inline-grid; place-items: center; min-width: 1.9rem; height: 1.6rem; padding: 0 .5rem;
  border-radius: 999px; background: var(--navy-900); color: var(--gold-300);
  font-size: .9rem; letter-spacing: .02em; font-variant-numeric: tabular-nums;
}
.conta-pill.ko { background: var(--ko); color: #fff; }
.card-allarme { border-top: 3px solid var(--ko); }
.sezione { margin-bottom: 2.25rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; margin-bottom: 1.5rem; }
.grid-2 > .card, .grid-2 > .colonna > .card:last-child { margin-bottom: 0; }
.grid-dash { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.colonna { display: grid; gap: 1.5rem; min-width: 0; }
.colonna > .card { margin-bottom: 0; }
@media (max-width: 900px) {
  .grid-2, .grid-dash { grid-template-columns: 1fr; }
}

/* ---------- statistiche ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.stat {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.1rem 1.25rem 1.15rem 1.4rem; box-shadow: var(--shadow-1);
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
}
.stat-num {
  display: block; font-family: var(--font-display); font-weight: 700; font-size: 2.7rem;
  line-height: 1; color: var(--navy-900); font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block; margin-top: .4rem; font-family: var(--font-display); font-weight: 600;
  font-size: .86rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.stat.vittorie .stat-num { color: var(--ok); }
.stat.sconfitte .stat-num { color: var(--ko); }
@media (max-width: 720px) { .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* =========================================================================
   BOTTONI
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: 0 1.15rem; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--navy-900);
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; line-height: 1;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.btn:hover { border-color: var(--navy-800); color: var(--navy-950); background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn.primario { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn.primario:hover { background: var(--navy-950); border-color: var(--navy-950); color: #fff; }
.btn.oro {
  background: linear-gradient(180deg, var(--gold-300) 0%, var(--gold-400) 100%);
  border-color: var(--gold-400); color: var(--navy-950);
  box-shadow: 0 8px 22px -12px rgba(215, 181, 102, .9);
}
.btn.oro:hover { background: var(--gold-300); border-color: var(--gold-300); color: var(--navy-950); }
.btn.vetro { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .3); color: #fff; }
.btn.vetro:hover { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn.pericolo { color: var(--ko); border-color: #EBC1BC; }
.btn.pericolo:hover { background: var(--ko-bg); border-color: var(--ko); color: var(--ko); }
.btn.testo { border-color: transparent; background: transparent; padding-inline: .6rem; }
.btn.testo:hover { background: var(--surface-2); border-color: transparent; }
.btn.piccolo { min-height: 36px; padding: 0 .8rem; font-size: .92rem; letter-spacing: .06em; gap: .4rem; }
.btn.icona { padding: 0; width: 36px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.in-corso { opacity: .55; cursor: progress; transform: none; }
.btn .conta {
  display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .3rem;
  border-radius: 999px; background: rgba(255, 255, 255, .2); font-size: .82rem; letter-spacing: 0;
}
.btn:not(.primario) .conta { background: var(--navy-900); color: var(--gold-300); }

/* =========================================================================
   BADGE / CHIP / PUNTEGGI
   ========================================================================= */
.badge {
  display: inline-flex; align-items: center; gap: .4rem; padding: .22rem .62rem;
  border-radius: 999px; font-size: .8rem; font-weight: 600; line-height: 1.3; white-space: nowrap;
  background: var(--neutral-bg); color: var(--neutral);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.badge.no-dot::before { display: none; }
.badge.valido { background: var(--ok-bg); color: var(--ok); }
.badge.scaduto, .badge.mancante { background: var(--ko-bg); color: var(--ko); }
.badge.in_scadenza, .badge.senza_scadenza, .badge.avviso { background: var(--warn-bg); color: var(--warn); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.tipo-certificato_medico { background: var(--info-bg); color: var(--info); }
.badge.tipo-carta_identita { background: #E3F2EE; color: #0F5E4A; }
.badge.tipo-altro { background: var(--neutral-bg); color: var(--neutral); }
.badge.casa { background: var(--navy-800); color: #fff; }
.badge.casa::before { background: var(--gold-400); }
.badge.trasferta { background: transparent; color: var(--navy-800); box-shadow: inset 0 0 0 1px var(--line-strong); }
.hero .badge.trasferta { color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45); }
.hero .badge.casa { background: var(--gold-400); color: var(--navy-950); }
.hero .badge.casa::before { background: var(--navy-950); }

.score {
  display: inline-flex; align-items: center; gap: .45rem; padding: .2rem .65rem .2rem .22rem;
  border-radius: var(--r-sm); background: var(--neutral-bg); color: var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; letter-spacing: .04em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.score-esito {
  display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 6px;
  background: var(--neutral); color: #fff; font-size: .88rem;
}
.score.vinta { background: var(--ok-bg); color: var(--ok); }
.score.vinta .score-esito { background: var(--ok); }
.score.persa { background: var(--ko-bg); color: var(--ko); }
.score.persa .score-esito { background: var(--ko); }

.maglia {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px; flex: 0 0 auto;
  background: var(--navy-900); color: var(--gold-300);
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums;
}
.maglia.vuota { background: var(--neutral-bg); color: var(--muted); }
.iniziali {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  background: var(--navy-900); color: var(--gold-300);
  font-family: var(--font-display); font-weight: 700; font-size: .98rem; letter-spacing: .04em;
}

/* =========================================================================
   PARTITE (lista match)
   ========================================================================= */
.match-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.match {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: .9rem 1.25rem; padding: .8rem 1rem .8rem .8rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.match:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.match.passata { background: var(--surface-2); }
.data-blocco {
  display: grid; justify-items: center; align-content: center; gap: .1rem;
  width: 66px; min-height: 76px; padding: .45rem .25rem; border-radius: var(--r-md);
  background: var(--navy-900); color: #fff; text-align: center; line-height: 1;
  font-family: var(--font-display); text-transform: uppercase;
}
.data-blocco .sett { font-size: .76rem; font-weight: 600; letter-spacing: .14em; color: rgba(255, 255, 255, .7); }
.data-blocco .gg { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.data-blocco .mese { font-size: .82rem; font-weight: 700; letter-spacing: .16em; color: var(--gold-400); }
.match.passata .data-blocco { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-2); }
.match.passata .data-blocco .sett { color: var(--muted); }
.match.passata .data-blocco .mese { color: var(--gold-700); }
.match-body { min-width: 0; }
.match-teams {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1.12;
  text-transform: uppercase; letter-spacing: .03em; color: var(--navy-900); overflow-wrap: anywhere;
}
.match-teams .vs { font-size: .85rem; letter-spacing: .14em; color: var(--gold-700); }
.match-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; margin-top: .4rem;
  color: var(--muted); font-size: .9rem;
}
.match-meta > span { display: inline-flex; align-items: center; gap: .35rem; min-width: 0; }
.match-meta .ic { color: var(--gold-500); }
.match-palestra { overflow-wrap: anywhere; }
.match-nota { display: flex; align-items: center; gap: .4rem; margin: .45rem 0 0; color: var(--warn); font-weight: 600; font-size: .9rem; }
.match-side { display: flex; align-items: center; justify-content: flex-end; gap: .55rem; flex-wrap: wrap; }
.match-meta > .match-palestra { align-items: flex-start; }
.match-palestra .ic { margin-top: .2rem; }
/* la riga si adatta alla larghezza del contenitore, non della finestra */
.match-list { container-type: inline-size; }
@container (max-width: 820px) {
  .match { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .match .data-blocco { grid-row: 1 / span 2; }
  .match-side { grid-column: 2; justify-content: flex-start; }
  .match-meta > .match-palestra { flex-basis: 100%; }
}
.match-meta > .quando-meta { display: none; }
@container (max-width: 460px) {
  .match { padding: .75rem; gap: .75rem .9rem; }
  .match .data-blocco { grid-row: auto; width: 58px; min-height: 68px; }
  .match-side { grid-column: 1 / -1; }
  .match-side .btn { flex: 1 1 auto; }
  .match-side > .quando { display: none; }
  .match-meta > .quando-meta { display: inline-flex; }
  .match-teams { font-size: 1.15rem; }
}
.quando {
  font-family: var(--font-display); font-weight: 700; font-size: .84rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-700); padding: .2rem .55rem; border-radius: 999px; background: #FBF4E2;
}

/* risultati compatti */
.risultati { list-style: none; margin: 0; padding: 0; }
.risultati li {
  display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) auto; align-items: center; gap: .85rem;
  padding: .7rem 0; border-bottom: 1px solid var(--line);
}
.risultati li:last-child { border-bottom: 0; }
.risultati .r-data { font-family: var(--font-display); font-weight: 600; letter-spacing: .06em; color: var(--muted); font-variant-numeric: tabular-nums; text-transform: uppercase; }
.risultati .r-avv { font-weight: 600; color: var(--navy-900); overflow-wrap: anywhere; }
.risultati .r-avv small { display: block; font-weight: 500; color: var(--muted); font-size: .8rem; }

/* =========================================================================
   ROSA (card giocatore)
   ========================================================================= */
.rosa-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.ricerca { display: flex; gap: .5rem; align-items: center; flex: 1 1 340px; max-width: 520px; }
.ricerca .campo-ic { position: relative; flex: 1; }
.ricerca .campo-ic .ic { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ricerca input[type="search"] { padding-left: 2.6rem; margin: 0; }
.filtri { display: flex; flex-wrap: wrap; gap: .4rem; }
.pill {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: 0 1rem;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
  font-family: var(--font-display); font-weight: 600; font-size: .98rem; letter-spacing: .07em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.pill:hover { border-color: var(--navy-800); color: var(--navy-900); }
.pill.attivo, .pill[aria-pressed="true"] { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.pill .conta { font-variant-numeric: tabular-nums; opacity: .75; }

.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 1.15rem; }
.player-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1); color: inherit; text-decoration: none;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out), border-color var(--t-fast);
}
.player-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-strong); color: inherit; }
.player-card:focus-visible { outline-offset: 3px; border-radius: var(--r-lg); }
.player-top {
  position: relative; isolation: isolate; overflow: hidden; min-height: 122px;
  padding: 1.05rem 1.15rem 1.1rem; color: #fff;
  background:
    radial-gradient(130% 150% at 100% 0%, rgba(29, 78, 158, .55) 0%, rgba(29, 78, 158, 0) 60%),
    linear-gradient(160deg, var(--navy-800) 0%, var(--navy-950) 100%);
}
.player-top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300) 50%, transparent);
}
.player-num {
  position: absolute; right: .55rem; bottom: -.2em; z-index: -1;
  font-family: var(--font-display); font-weight: 700; font-size: 6.2rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(215, 181, 102, .75);
  transition: transform var(--t-med) var(--ease-out);
}
.player-card:hover .player-num { transform: translateY(-4px); }
.player-nome { display: block; font-size: .95rem; font-weight: 500; color: rgba(255, 255, 255, .75); }
.player-cognome {
  display: block; max-width: 72%; margin-top: .1rem; overflow-wrap: anywhere;
  font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; line-height: 1;
  text-transform: uppercase; letter-spacing: .02em;
}
.player-sopr { display: block; margin-top: .45rem; font-size: .86rem; color: var(--gold-300); font-style: italic; }
.player-flag {
  position: absolute; top: .8rem; right: .8rem; font-family: var(--font-display); font-weight: 700;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .18rem .5rem; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff;
}
.player-body { display: grid; gap: .5rem; padding: .95rem 1.15rem 1.1rem; flex: 1; }
.player-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .9rem; color: var(--muted); }
.player-row > span:first-child { white-space: nowrap; }
.player-row .badge { font-size: .76rem; padding: .2rem .5rem; gap: .35rem; }
.player-row strong { color: var(--ink); font-weight: 600; }
.player-card.inattivo .player-top { filter: grayscale(1) brightness(.85); }
.player-card.inattivo { background: var(--surface-2); }

/* =========================================================================
   TABELLE
   ========================================================================= */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-inline: -.25rem; padding-inline: .25rem; }
.tabella { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; }
.tabella th, .tabella td { text-align: left; padding: .8rem .85rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabella thead th {
  background: var(--surface-2); border-bottom: 1px solid var(--line-strong); white-space: nowrap;
  font-family: var(--font-display); font-weight: 600; font-size: .84rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.tabella thead th:first-child { border-top-left-radius: var(--r-sm); }
.tabella thead th:last-child { border-top-right-radius: var(--r-sm); }
.tabella tbody tr { transition: background-color var(--t-fast); }
.tabella tbody tr:hover td { background: #F8F9FB; }
.tabella tbody tr:last-child td { border-bottom: 0; }
.tabella .azioni { text-align: right; white-space: nowrap; }
.tabella .azioni > * { vertical-align: middle; }
.tabella .azioni > form { display: inline; }
.tabella .file-link { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; overflow-wrap: break-word; max-width: 30ch; }
.tabella .file-link .ic { color: var(--gold-500); }
.no-wrap { white-space: nowrap; }
.cella-stack small { display: block; color: var(--muted); font-size: .8rem; }

/* su schermi stretti le tabelle diventano schede etichetta / valore */
@media (max-width: 700px) {
  .table-wrap:has(.tabella--stack) { overflow: visible; margin: 0; padding: 0; }
  .tabella--stack thead { display: none; }
  .tabella--stack, .tabella--stack tbody, .tabella--stack tr, .tabella--stack td { display: block; width: 100%; }
  .tabella--stack tr { padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .tabella--stack tbody tr:last-child { border-bottom: 0; }
  .tabella--stack td {
    position: relative; min-height: 1.9rem; padding: .3rem 0 .3rem 7.4rem;
    border: 0; text-align: left; white-space: normal;
  }
  .tabella--stack td::before {
    content: attr(data-label); position: absolute; left: 0; top: .45rem; width: 6.9rem;
    font-family: var(--font-display); font-weight: 600; font-size: .78rem; letter-spacing: .12em;
    text-transform: uppercase; color: var(--muted);
  }
  .tabella--stack td:empty { display: none; }
  .tabella--stack td.azioni { display: flex; flex-wrap: wrap; gap: .5rem; padding: .7rem 0 0; }
  .tabella--stack td.azioni::before { display: none; }
  .tabella--stack tbody tr:hover td { background: none; }
  .tabella--stack .file-link { max-width: none; overflow-wrap: anywhere; }
}

/* =========================================================================
   CONVOCAZIONI
   ========================================================================= */
.conv-legenda { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; color: var(--muted); font-size: .9rem; }
.conv-list { list-style: none; margin: 0; padding: 0; }
.conv-row {
  display: grid; grid-template-columns: auto minmax(0, 1.4fr) auto minmax(150px, 1fr);
  align-items: center; gap: .75rem 1.1rem; padding: .8rem .85rem;
  border-bottom: 1px solid var(--line); border-left: 3px solid transparent;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.conv-row:last-child { border-bottom: 0; }
.conv-row:has(input[value="convocato"]:checked) { background: #F2F6FC; border-left-color: var(--navy-800); }
.conv-row:has(input[value="riserva"]:checked) { background: #FCF7EA; border-left-color: var(--gold-400); }
.conv-nome { min-width: 0; }
.conv-nome strong { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .03em; color: var(--navy-900); }
.conv-nome .mini { margin-left: .3rem; }
.conv-docs { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.conv-nota input { margin: 0; min-height: 40px; }

.seg {
  display: inline-flex; gap: 2px; padding: 3px; margin: 0; min-inline-size: 0;
  border: 1px solid var(--line); border-radius: 10px; background: var(--neutral-bg);
}
.seg legend { padding: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg label {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px; margin: 0;
  padding: 0 .85rem; border-radius: 8px; cursor: pointer; white-space: nowrap;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  transition: background-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.seg label:hover { color: var(--navy-900); }
.seg input:checked + label { background: var(--surface); color: var(--navy-900); box-shadow: 0 1px 3px rgba(10, 26, 51, .16); }
.seg input[value="convocato"]:checked + label { background: var(--navy-800); color: #fff; }
.seg input[value="riserva"]:checked + label { background: var(--gold-400); color: var(--navy-950); }
.seg input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 1px; }

.barra-salva {
  position: sticky; bottom: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem;
  margin: 1.25rem calc(clamp(1.1rem, 2.2vw, 1.6rem) * -1) calc(clamp(1.1rem, 2.2vw, 1.6rem) * -1);
  padding: .9rem clamp(1.1rem, 2.2vw, 1.6rem) calc(.9rem + env(safe-area-inset-bottom));
  background: rgba(6, 15, 31, .96); color: #fff; border-top: 2px solid var(--gold-400);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.contatore { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; }
.contatore b { font-size: 1.55rem; color: var(--gold-300); margin-right: .2rem; font-variant-numeric: tabular-nums; }
.contatore .sep { color: rgba(255, 255, 255, .35); margin: 0 .6rem; }
@media (max-width: 760px) {
  .conv-row { grid-template-columns: auto minmax(0, 1fr); }
  .conv-row .seg, .conv-row .conv-nota { grid-column: 1 / -1; }
  .conv-row .seg { display: flex; }
  .conv-row .seg label { flex: 1; padding: 0 .4rem; }
  .barra-salva .btn { flex: 1; }
}

/* esito partita */
.esito-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 1.25rem; }
.esito-form .campo-set { width: 120px; }
.esito-form .campo-set input { text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.esito-form .check { margin-bottom: .1rem; }
@media (max-width: 640px) {
  .esito-form { display: grid; grid-template-columns: 1fr 1fr; }
  .esito-form .check, .esito-form .btn { grid-column: 1 / -1; }
  .esito-form .campo-set { width: auto; }
}

/* =========================================================================
   FORM
   ========================================================================= */
label { display: block; font-size: .92rem; font-weight: 600; color: var(--ink-2); }
input[type="text"], input[type="password"], input[type="date"], input[type="number"],
input[type="email"], input[type="tel"], input[type="search"], select, textarea {
  display: block; width: 100%; min-height: 46px; margin-top: .4rem; padding: .6rem .85rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface);
  font: inherit; font-size: 1rem; font-weight: 400; color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
textarea { min-height: 90px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #98A2B3; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(29, 78, 158, .2);
}
input::placeholder, textarea::placeholder { color: #8A94A3; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 2.4rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6576' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 18px;
}
input[type="file"] {
  display: block; width: 100%; margin-top: .4rem; padding: .9rem; font: inherit; font-size: .92rem; color: var(--muted);
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); background: var(--surface-2); cursor: pointer;
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
input[type="file"]:hover { border-color: var(--navy-600); background: #F1F5FB; }
input[type="file"]::file-selector-button {
  margin-right: .85rem; padding: .55rem 1rem; border: 0; border-radius: var(--r-sm); cursor: pointer;
  background: var(--navy-800); color: #fff; font-family: var(--font-display); font-weight: 600;
  font-size: .95rem; letter-spacing: .08em; text-transform: uppercase;
}
input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--navy-800); cursor: pointer; flex: 0 0 auto; }

.form-griglia { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.35rem; }
.span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-griglia { grid-template-columns: 1fr; } }
.gruppo { border: 0; padding: 0; margin: 0 0 1.85rem; min-inline-size: 0; }
.gruppo:last-of-type { margin-bottom: 0; }
.gruppo legend {
  display: flex; align-items: center; gap: .75rem; width: 100%; padding: 0; margin-bottom: 1rem;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold-700);
}
.gruppo legend::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.req { color: var(--ko); margin-left: .15rem; }
.hint { display: block; margin-top: .35rem; font-size: .84rem; font-weight: 400; color: var(--muted); }
.check { display: flex; align-items: center; gap: .65rem; min-height: 44px; font-weight: 500; color: var(--ink); cursor: pointer; }
.azioni-form {
  display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; padding-top: 1.35rem; border-top: 1px solid var(--line);
}
.form-riga { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.form-riga label { flex: 1 1 220px; }
.campo-password { position: relative; display: block; }
.campo-password input { padding-right: 3.1rem; }
.toggle-pw {
  position: absolute; right: 4px; bottom: 4px; width: 42px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer;
}
.toggle-pw:hover { background: var(--surface-2); color: var(--navy-900); }
.toggle-pw .ic-eye-off { display: none; }
.toggle-pw[aria-pressed="true"] .ic-eye { display: none; }
.toggle-pw[aria-pressed="true"] .ic-eye-off { display: block; }

/* ---------- messaggi flash ---------- */
.flashes { display: grid; gap: .65rem; margin-bottom: 1.5rem; }
.flash {
  display: flex; align-items: flex-start; gap: .75rem; padding: .85rem .9rem .85rem 1rem;
  border-radius: var(--r-md); border: 1px solid var(--line); border-left: 4px solid var(--neutral);
  background: var(--surface); box-shadow: var(--shadow-1); font-size: .97rem; color: var(--ink);
  animation: cala var(--t-med) var(--ease-out);
}
.flash > .ic { margin-top: .12rem; width: 1.25em; height: 1.25em; }
.flash p { flex: 1; margin: 0; }
.flash.success { border-left-color: var(--ok); } .flash.success > .ic { color: var(--ok); }
.flash.error { border-left-color: var(--ko); background: #FFFBFA; } .flash.error > .ic { color: var(--ko); }
.flash.warning { border-left-color: var(--gold-500); } .flash.warning > .ic { color: var(--warn); }
.flash-chiudi {
  display: grid; place-items: center; width: 32px; height: 32px; margin: -.25rem -.2rem -.25rem 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer;
}
.flash-chiudi:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- dialog modale ---------- */
.dialogo {
  width: min(540px, calc(100vw - 2rem)); padding: 0; border: 0; border-radius: var(--r-xl);
  background: var(--surface); color: var(--ink); box-shadow: 0 40px 90px -30px rgba(6, 15, 31, .75);
  white-space: normal; text-align: left;
}
.dialogo::backdrop { background: rgba(6, 15, 31, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dialogo[open] { animation: sali var(--t-med) var(--ease-out); }
.dialogo-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.35rem; background: var(--navy-950); color: #fff; border-bottom: 2px solid var(--gold-400);
}
.dialogo-head h2 { color: #fff; font-size: 1.25rem; }
.dialogo-head .btn { color: #fff; }
.dialogo-head .btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.dialogo-body { padding: 1.35rem; }
.dialogo-body .mini { margin-bottom: 1rem; overflow-wrap: anywhere; }

/* ---------- liste ---------- */
.mancanze { list-style: none; margin: 0; padding: 0; }
.mancanze li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .25rem .85rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.mancanze li:last-child { border-bottom: 0; }
.mancanze .iniziali { grid-row: span 2; }
.mancanze a.nome { font-weight: 700; color: var(--navy-900); text-decoration: none; }
.mancanze a.nome:hover { text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.altri summary {
  list-style: none; display: inline-flex; align-items: center; gap: .4rem; margin-top: .85rem; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--navy-600);
  min-height: 40px;
}
.altri summary::-webkit-details-marker { display: none; }
.altri[open] summary .ic { transform: rotate(180deg); }

.lista-doc { list-style: none; margin: 0; padding: 0; }
.lista-doc li { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lista-doc li:last-child { border-bottom: 0; }
.lista-doc .chi { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); }
.lista-doc .chi em { color: var(--warn); font-weight: 600; }

.scheda { display: grid; grid-template-columns: minmax(120px, 40%) minmax(0, 1fr); margin: 0; }
.scheda dt, .scheda dd { margin: 0; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.scheda dt {
  font-family: var(--font-display); font-weight: 600; font-size: .86rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); padding-right: 1rem; align-self: stretch; display: flex; align-items: center;
}
.scheda dd { font-weight: 500; overflow-wrap: anywhere; }
.scheda dt:nth-last-of-type(1), .scheda dd:last-of-type { border-bottom: 0; }
.da-compilare { color: var(--warn); font-style: italic; font-weight: 500; }

.stato-doc { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.stato-doc li {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  padding: .85rem 1rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line);
}
.stato-doc .nome-doc { display: flex; align-items: center; gap: .65rem; font-weight: 600; }
.stato-doc .nome-doc .ic { color: var(--navy-600); }
.stato-doc .scad { display: block; font-size: .82rem; font-weight: 500; color: var(--muted); }

.azioni-rapide { display: grid; gap: .6rem; }
.azioni-rapide a {
  display: flex; align-items: center; gap: .8rem; padding: .8rem .9rem; border-radius: var(--r-md);
  border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600;
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.azioni-rapide a:hover { border-color: var(--navy-800); background: var(--surface-2); color: var(--navy-900); }
.azioni-rapide .ic-box {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto;
  background: var(--navy-900); color: var(--gold-300);
}
.azioni-rapide small { display: block; font-weight: 400; color: var(--muted); font-size: .84rem; }
.azioni-rapide .freccia { margin-left: auto; color: var(--muted); }

.vuoto { display: grid; justify-items: center; gap: .45rem; padding: 2rem 1rem; text-align: center; color: var(--muted); }
.vuoto > .ic { width: 2.2rem; height: 2.2rem; color: var(--gold-500); stroke-width: 1.6; }
.vuoto strong { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-900); }

.nota-piede { display: flex; align-items: flex-start; gap: .5rem; color: var(--muted); font-size: .9rem; margin-top: 1rem; }
.nota-piede .ic { color: var(--gold-500); margin-top: .15rem; }

/* =========================================================================
   LOGIN
   ========================================================================= */
.pagina-login { background: var(--navy-950); }
.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(400px, .85fr); }
.login-visual {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  padding: clamp(1.5rem, 4vw, 3.25rem);
}
.login-visual::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--hero-sm) center 22% / cover no-repeat;
}
@media (min-width: 900px) { .login-visual::before { background-image: var(--hero); } }
.login-visual::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(0deg, rgba(6, 15, 31, .96) 0%, rgba(6, 15, 31, .35) 55%, rgba(6, 15, 31, .55) 100%),
    linear-gradient(90deg, rgba(6, 15, 31, .55) 0%, rgba(6, 15, 31, 0) 70%);
}
.login-brand { display: flex; align-items: center; gap: .9rem; }
.login-brand svg { width: 52px; height: 59px; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .5)); }
.login-claim h1 { color: #fff; font-size: clamp(2.7rem, 1.8rem + 4vw, 5rem); line-height: .94; }
.login-claim h1 .oro { color: var(--gold-300); }
.login-claim p { color: rgba(255, 255, 255, .78); font-size: 1.1rem; max-width: 46ch; margin-top: 1rem; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: clamp(1.75rem, 5vw, 3.5rem); background: var(--surface); }
.login-form { width: 100%; max-width: 390px; }
.login-form h2 { font-size: 2rem; margin-bottom: .35rem; }
.login-form h2::before { display: none; }
.login-form .sottotitolo { color: var(--muted); margin-bottom: 1.75rem; }
.login-form label { margin-bottom: 1.1rem; }
.login-form .btn { margin-top: .5rem; min-height: 50px; font-size: 1.1rem; }
.login-form .mini { margin-top: 1.5rem; display: flex; gap: .5rem; align-items: flex-start; }
.login-form .mini .ic { color: var(--gold-500); margin-top: .1rem; }
@media (max-width: 899px) {
  .login { grid-template-columns: 1fr; }
  .login-visual { min-height: 46vh; }
  .login-panel { position: relative; margin-top: -1.75rem; border-radius: var(--r-xl) var(--r-xl) 0 0; align-items: flex-start; }
}

/* =========================================================================
   ERRORE
   ========================================================================= */
.errore-codice {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(6rem, 18vw, 11rem); line-height: .85;
  color: transparent; -webkit-text-stroke: 2px var(--gold-400); margin-bottom: .5rem;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, .62); font-size: .88rem; border-top: 1px solid rgba(215, 181, 102, .25); }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.5rem; padding-block: 1.4rem; }
.footer-brand { display: flex; align-items: center; gap: .65rem; font-family: var(--font-display); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.footer-brand svg { width: 24px; height: 27px; }

/* =========================================================================
   MOTION
   ========================================================================= */
@keyframes cala { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes sali { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero-testo, .hero-azioni, .gara-hero { animation: entra 520ms var(--ease-out) both; }
.hero-azioni, .gara-hero { animation-delay: 80ms; }
.roster > .player-card { animation: entra 420ms var(--ease-out) both; }
.roster > .player-card:nth-child(2) { animation-delay: 30ms; }
.roster > .player-card:nth-child(3) { animation-delay: 60ms; }
.roster > .player-card:nth-child(4) { animation-delay: 90ms; }
.roster > .player-card:nth-child(5) { animation-delay: 120ms; }
.roster > .player-card:nth-child(6) { animation-delay: 150ms; }
.roster > .player-card:nth-child(n+7) { animation-delay: 180ms; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =========================================================================
   DISTINTA DI GARA — foglio A4 pensato per la stampa in BIANCO E NERO.
   La struttura è affidata a linee e tipografia nera; i grigi sono solo
   decorativi (se il browser non stampa gli sfondi, nulla va perso).
   Nessun testo bianco su fondo scuro.
   ========================================================================= */
.distinta-body { display: block; background: #D8DADE; color: #111; }

.barra-stampa {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem;
  padding: .75rem var(--gutter); background: var(--navy-950); color: #fff;
  border-bottom: 2px solid var(--gold-400); --focus: var(--gold-300);
}
.barra-stampa .btn:not(.primario) { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.barra-stampa .btn:not(.primario):hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .55); color: #fff; }
.barra-stampa .btn.primario { background: linear-gradient(180deg, var(--gold-300), var(--gold-400)); border-color: var(--gold-400); color: var(--navy-950); }
.barra-stampa .btn.primario:hover { background: var(--gold-300); }
.barra-nota { display: inline-flex; align-items: center; gap: .5rem; margin: 0; font-size: .92rem; color: rgba(255, 255, 255, .78); }
.barra-nota .ic { color: var(--gold-400); }

.distinta {
  --d-ink: #111;
  --d-ink-2: #404040;
  --d-rule: #111;
  --d-hair: #8F8F8F;
  --d-hair-2: #BDBDBD;
  --d-tint: #E9E9E9;
  --d-tint-2: #F4F4F4;
  --d-w-hair: .5pt;
  --d-w-hair-2: .5pt;
  width: 210mm; max-width: calc(100% - 2rem); min-height: 297mm;
  margin: 1.5rem auto 2.5rem; padding: 12mm;
  background: #fff; color: var(--d-ink);
  font-family: var(--font-body); font-size: 9.5pt; line-height: 1.35;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 24px 60px -24px rgba(0, 0, 0, .4);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.distinta h1, .distinta h2 { color: var(--d-ink); }

/* intestazione: stemma nero, società, timbro a doppio filetto */
.d-testata {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 0 5mm; padding-bottom: 4mm; margin-bottom: 1.6mm;
  border-bottom: 2.2pt solid var(--d-rule);
}
.d-testata::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4pt;
  border-bottom: .6pt solid var(--d-rule);
}
.d-stemma { width: 19mm; height: 21.4mm; }
.d-eyebrow {
  margin: 0 0 1.2mm; font-family: var(--font-display); font-weight: 600; font-size: 7.5pt;
  letter-spacing: .3em; text-transform: uppercase; color: var(--d-ink-2);
}
.distinta h1 { font-size: 22pt; line-height: .98; letter-spacing: .03em; }
.d-campionato { margin: 1.4mm 0 0; font-size: 9pt; color: var(--d-ink-2); }
.d-timbro {
  display: grid; justify-items: center; gap: .7mm; min-width: 37mm; padding: 2.4mm 4mm 2.6mm;
  border: 2.8pt double var(--d-rule); text-align: center; line-height: 1;
  font-family: var(--font-display); text-transform: uppercase;
}
.d-timbro-titolo { font-weight: 700; font-size: 17pt; letter-spacing: .1em; }
.d-timbro-sotto { font-weight: 600; font-size: 8pt; letter-spacing: .36em; }
.d-timbro-gara {
  width: 100%; margin-top: 1.4mm; padding-top: 1.6mm; border-top: .6pt solid var(--d-rule);
  font-weight: 700; font-size: 9.5pt; letter-spacing: .1em; font-variant-numeric: tabular-nums;
}

/* la sfida */
.d-sfida { display: flex; align-items: center; justify-content: center; gap: 4.5mm; margin: 5.5mm 0 4mm; }
.d-squadra {
  flex: 1 1 0; min-width: 0; font-family: var(--font-display); font-weight: 700; font-size: 15.5pt;
  line-height: 1.05; letter-spacing: .04em; text-transform: uppercase; overflow-wrap: anywhere;
}
.d-squadra:first-child { text-align: right; }
.d-squadra:last-child { text-align: left; }
.d-squadra:only-child { text-align: center; }
.d-vs {
  flex: 0 0 auto; display: grid; place-items: center; width: 9.5mm; height: 9.5mm;
  border: 1pt solid var(--d-rule); border-radius: 50%;
  font-family: var(--font-display); font-weight: 700; font-size: 8.5pt; letter-spacing: .06em; text-transform: uppercase;
}

/* dati della gara */
.d-info { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border: 1pt solid var(--d-rule); }
.d-info > div { min-width: 0; padding: 1.6mm 2.6mm 1.9mm; border-right: var(--d-w-hair-2) solid var(--d-hair-2); border-bottom: var(--d-w-hair-2) solid var(--d-hair-2); }
.d-info > div:nth-child(4) { border-right: 0; }
.d-info > .d-info-largo { grid-column: 1 / -1; border-right: 0; }
.d-info > .d-info-meta { grid-column: span 2; border-bottom: 0; }
.d-info > div:last-child { border-bottom: 0; border-right: 0; }
.d-info dt {
  font-family: var(--font-display); font-weight: 600; font-size: 6.8pt; letter-spacing: .18em;
  text-transform: uppercase; color: var(--d-ink-2);
}
.d-info dd { margin: .6mm 0 0; font-weight: 600; font-size: 10pt; overflow-wrap: anywhere; min-height: 1.2em; }

/* elenchi atleti */
.d-sezione { margin-top: 5mm; break-inside: avoid; page-break-inside: avoid; }
.d-sez-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 4mm; margin-bottom: 1.8mm; }
.distinta h2 { font-size: 11.5pt; letter-spacing: .16em; }
.d-conteggio {
  font-family: var(--font-display); font-weight: 700; font-size: 10pt; letter-spacing: .04em; line-height: 1.2;
  padding: .3mm 2.2mm; border: 1pt solid var(--d-rule); border-radius: 1.6mm; font-variant-numeric: tabular-nums;
}
.d-conteggio small { margin-left: .8mm; font-size: 6.8pt; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }

.d-tabella { width: 100%; border-collapse: collapse; table-layout: fixed; border: 1pt solid var(--d-rule); }
.d-tabella th, .d-tabella td {
  height: 7.2mm; padding: 0 2mm; vertical-align: middle;
  border-left: var(--d-w-hair-2) solid var(--d-hair-2); border-right: var(--d-w-hair-2) solid var(--d-hair-2); border-bottom: var(--d-w-hair) solid var(--d-hair);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.d-tabella thead th {
  height: 6mm; background: var(--d-tint); border-bottom: 1pt solid var(--d-rule);
  font-family: var(--font-display); font-weight: 700; font-size: 7.4pt; letter-spacing: .12em;
  text-transform: uppercase; text-align: center; color: var(--d-ink);
}
.d-tabella thead th.c-cognome, .d-tabella thead th.c-nome { text-align: left; }
.d-tabella .c-n { width: 11mm; text-align: center; background: var(--d-tint-2); }
.d-tabella td.c-n { font-family: var(--font-display); font-weight: 700; font-size: 12.5pt; font-variant-numeric: tabular-nums; }
.d-tabella thead th.c-n { background: var(--d-tint); }
.d-tabella .c-cognome { width: 22%; }
.d-tabella td.c-cognome { font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.d-tabella .c-nome { width: 17%; }
.d-tabella .c-nascita { width: 15%; text-align: center; font-variant-numeric: tabular-nums; }
.d-tabella .c-tessera { width: 15%; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.distinta--fitta .d-tabella tbody td { height: 6.4mm; }

/* firme e risultato */
.d-piede { display: grid; grid-template-columns: 1fr 1fr 1.55fr; gap: 6mm; align-items: stretch; margin-top: 6mm; break-inside: avoid; page-break-inside: avoid; }
.d-firma, .d-risultato { display: flex; flex-direction: column; min-width: 0; }
.d-label {
  margin-bottom: 1.6mm; font-family: var(--font-display); font-weight: 700; font-size: 7.6pt;
  letter-spacing: .18em; text-transform: uppercase; color: var(--d-ink);
}
.d-linea { flex: 1 1 auto; min-height: 11mm; border-bottom: .75pt solid var(--d-rule); }
.d-nome { min-height: 1.3em; margin-top: 1.2mm; font-size: 8.5pt; font-style: italic; text-align: center; color: var(--d-ink-2); }
.d-parziali { width: 100%; border-collapse: collapse; table-layout: fixed; border: 1pt solid var(--d-rule); }
.d-parziali th, .d-parziali td { height: 8.4mm; padding: 0 1mm; border: var(--d-w-hair) solid var(--d-hair); text-align: center; vertical-align: middle; }
.d-parziali thead th {
  height: 5.4mm; background: var(--d-tint); border-bottom: 1pt solid var(--d-rule);
  font-family: var(--font-display); font-weight: 700; font-size: 7pt; letter-spacing: .08em; text-transform: uppercase;
}
.d-parziali thead th:first-child { width: 32%; }
.d-parziali tbody th {
  padding: .6mm 1.6mm; text-align: left; line-height: 1.1;
  font-family: var(--font-display); font-weight: 600; font-size: 7.4pt; letter-spacing: .03em; text-transform: uppercase;
  overflow-wrap: anywhere;
}
.d-parziali .tot {
  width: 11mm; border-left: 1pt solid var(--d-rule); background: var(--d-tint-2);
  font-family: var(--font-display); font-weight: 700; font-size: 12.5pt; font-variant-numeric: tabular-nums;
}
.d-parziali thead .tot { background: var(--d-tint); font-size: 7pt; }

.d-nota { margin: 4.5mm 0 0; padding-top: 2mm; border-top: var(--d-w-hair-2) solid var(--d-hair-2); font-size: 7pt; color: var(--d-ink-2); text-align: center; }

/* anteprima su schermi stretti (non influisce sulla stampa) */
@media screen and (max-width: 720px) {
  .distinta { padding: 1.1rem; min-height: 0; }
  .d-testata { grid-template-columns: auto minmax(0, 1fr); }
  .d-timbro { grid-column: 1 / -1; justify-self: start; margin-top: 3mm; }
  .d-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-info > div:nth-child(4) { border-right: var(--d-w-hair-2) solid var(--d-hair-2); }
  .d-info > div:nth-child(2n) { border-right: 0; }
  .d-info > .d-info-meta { border-right: 0; }
  .d-info > .d-info-meta:not(:last-child) { border-bottom: var(--d-w-hair-2) solid var(--d-hair-2); }
  .d-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .d-tabella { min-width: 600px; }
  .d-piede { grid-template-columns: 1fr 1fr; }
  .d-risultato { grid-column: 1 / -1; }
}

@page { size: A4 portrait; margin: 9mm 12mm; }
@media print {
  .no-print, .topbar, .site-footer, .skip-link { display: none !important; }
  html, body, .distinta-body { background: #fff !important; }
  .d-scroll { overflow: visible; }
  .distinta {
    width: auto; max-width: none; min-height: 0; margin: 0; padding: 0; box-shadow: none;
    /* in stampa: testo nero pieno e filetti neri sottili, nitidi anche su laser economiche */
    --d-ink: #000; --d-ink-2: #000; --d-rule: #000;
    --d-hair: #000; --d-hair-2: #000; --d-w-hair: .4pt; --d-w-hair-2: .25pt;
  }
}
