/* Inter ospitato nel sito: nessuna richiesta a Google Fonts (IP dei visitatori) */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/familjen-grotesk-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/familjen-grotesk-latin-700-normal.woff2") format("woff2");
}
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef0f6;
  --border: #e2e5ee;
  --text: #121521;
  --muted: #5d6478;
  --accent: #4f46e5;
  --accent-2: #db2777;
  --accent-soft: #eef0ff;
  --ok: #047857;
  --ok-soft: #d1fae5;
  --danger: #b91c1c;
  --ball-text: #ffffff;
  --shadow: 0 1px 2px rgba(16, 20, 40, .04), 0 8px 24px rgba(16, 20, 40, .06);
  --radius: 18px;
  color-scheme: light;  /* Solo tema chiaro, anche con il sistema in modalità scura */
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
[v-cloak] { display: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Barra superiore */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; }
/* Logo: beuta con le palline + Familjen Grotesk */
.logo {
  display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none;
  font-family: "Familjen Grotesk", Inter, system-ui, sans-serif; font-weight: 700; font-size: 23px; letter-spacing: -0.03em;
}
.logo-icon { width: 22px; height: 25px; flex: none; }
.logo-icon .beuta { fill: none; stroke: var(--text); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.logo-icon .bolla-1, .logo-icon .bolla-3 { fill: var(--accent); }
.logo-icon .bolla-2 { fill: var(--accent-2); }
.logo-icon .bolla-3 { opacity: .6; }
.logo-lab { font-weight: 500; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a.link { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 10px; border-radius: 10px; }
.nav a.link:hover { color: var(--text); background: var(--surface-2); }
.nav a.link-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--ball-text); font-weight: 600; padding: 8px 14px; }
.nav a.link-cta:hover { background: color-mix(in oklab, var(--accent) 85%, #000); color: var(--ball-text); }
.link-cta .count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .25); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; }
@media (max-width: 720px) { .nav a.link:not(.link-cta) { display: none; } }

/* Menu Profilo */
.profile { position: relative; }
.profile-btn { padding-left: 6px; }
.avatar {
  width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--ball-text); font-size: 12px; font-weight: 700;
}
.profile-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 240px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 6px;
}
.profile-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.profile-head .label { display: block; font-size: 12px; }
.profile-head strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.profile-menu a, .profile-menu button {
  display: block; width: 100%; text-align: left; font: inherit; font-size: 14px; color: var(--text); text-decoration: none;
  background: transparent; border: 0; border-radius: 8px; padding: 9px 12px; cursor: pointer;
}
.profile-menu a:hover, .profile-menu button:hover { background: var(--surface-2); }
.profile-menu .danger { color: var(--danger); border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; margin-top: 6px; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 400px at 10% -10%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(700px 360px at 95% 0%, color-mix(in oklab, var(--accent-2) 18%, transparent), transparent 70%);
}
.hero-body {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center;
  padding: 36px 0 56px;
}
@media (max-width: 960px) { .hero-body { grid-template-columns: 1fr; gap: 32px; padding-top: 20px; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 6px 12px; border-radius: 999px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
h1 {
  font-size: clamp(34px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.03em;
  margin: 18px 0 12px; font-weight: 800;
}
.grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.stats {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0;
  margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border);
}
.stat { padding-right: 28px; margin-right: 28px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.stat b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 13px; }
@media (max-width: 480px) {
  .stat { padding-right: 16px; margin-right: 16px; }
  .stat b { font-size: 21px; }
}

/* Ultima estrazione di tutte le ruote, nella hero */
.hero-draw { padding: 20px 20px 12px; }
.hero-draw-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; padding: 0 6px; }
.hero-draw-head h2 { margin: 0; }
.hero-draw-head .label { display: inline-block; }
.hero-draw-head .label::first-letter { text-transform: uppercase; }
.draw-list { list-style: none; margin: 0; padding: 0; }
.draw-list button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font: inherit; color: var(--text); background: transparent; border: 0; border-radius: 10px;
  padding: 6px; cursor: pointer; text-align: left;
}
.draw-list button:hover { background: var(--surface-2); }
.draw-list button.active { background: var(--accent-soft); }
.draw-list button.active .draw-name { color: var(--accent); }
.draw-name { font-size: 14px; font-weight: 600; }
.draw-list .balls { gap: 5px; flex-wrap: nowrap; }
.ball.xs { width: 28px; height: 28px; font-size: 12px; box-shadow: none; }

/* Selettore ruota */
.ruote {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.ruote .wrap { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; scrollbar-width: none; }
.ruote .wrap::-webkit-scrollbar { display: none; }
.pill {
  flex: none; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 500; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.pill:hover { border-color: var(--accent); }
.pill.active { background: var(--accent); border-color: var(--accent); color: var(--ball-text); }

/* Sezioni e griglia */
main.wrap { padding-top: 28px; padding-bottom: 56px; }  /* main.wrap: .wrap da sola azzererebbe il padding verticale */
.section-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 48px 0 6px; }
.section-sub { color: var(--muted); margin: 0 0 18px; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; min-width: 0;
}
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }
@media (max-width: 900px) {
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
  .span-3 { grid-column: span 6; }
}
.card h2 { font-size: 16px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
.card .sub { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.kpi b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.kpi span { color: var(--muted); font-size: 13px; }

/* Palline */
.balls { display: flex; gap: 10px; flex-wrap: wrap; }
.ball {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 19px;
  color: var(--ball-text);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .15);
}
.ball.sm { width: 34px; height: 34px; font-size: 14px; box-shadow: none; }
.ball.ghost { background: var(--surface-2); color: var(--text); }
.hero-ball .ball { width: 64px; height: 64px; font-size: 24px; }
@media (max-width: 480px) {
  .hero-ball { gap: 8px; }
  .hero-ball .ball { width: 48px; height: 48px; font-size: 19px; }
}
.date-big { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 18px; }

/* Ultima estrazione della ruota: striscia su una riga */
.latest-strip { display: flex; align-items: center; gap: 16px 32px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.latest-strip .sub { margin: 0; }
.latest-date { flex: 1; margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; text-align: right; }
.latest-date::first-letter { text-transform: uppercase; }
@media (max-width: 720px) {
  .latest-date { flex-basis: 100%; text-align: left; }
  .latest-strip .ball { width: 48px; height: 48px; font-size: 18px; }
  .latest-strip .balls { gap: 8px; }
}

/* Liste */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.list li:first-child { border-top: 0; }
.list .when { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 82px; }
.list .balls { gap: 6px; }

/* Barre */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 34px 1fr 64px; align-items: center; gap: 12px; }
.bar-track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bar-fill.flat { background: var(--muted); opacity: .55; }
.bar-max { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--muted); opacity: .5; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; }
.bar-val small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
@media (max-width: 640px) { .cols-2 { grid-template-columns: 1fr; } }

/* Classifica ritardatari */
.rit-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.rit-row {
  display: grid; grid-template-columns: 22px 44px 56px minmax(0, 1fr) 52px; align-items: center; gap: 12px;
  padding: 7px 0; border-top: 1px solid var(--border);
}
.rit-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.rit-head { border-top: 0; padding-top: 0; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.rit-pos { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.rit-val { font-size: 18px; font-weight: 700; }
.rit-max { color: var(--muted); font-size: 14px; }
.rit-bar { display: flex; align-items: center; gap: 10px; }
.rit-bar .bar-track { flex: 1; height: 8px; }
.rit-bar .bar-fill { display: block; background: color-mix(in oklab, var(--accent) 45%, var(--surface-2)); }
.rit-pct { width: 38px; text-align: right; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.rit-row.near .bar-fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.rit-row.near .rit-pct { color: var(--accent-2); }
.rit-row.near .ball { background: color-mix(in oklab, var(--accent-2) 14%, var(--surface)); color: var(--accent-2); }
.rit-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.dot-near { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
@media (max-width: 900px) {
  .rit-cols { grid-template-columns: 1fr; }
  .rit-head-2 { display: none; }  /* Una sola intestazione quando le colonne si impilano */
}
.t-sm { display: none; }
@media (max-width: 420px) {
  .rit-row { grid-template-columns: 18px 38px 44px minmax(0, 1fr) 40px; gap: 8px; }
  .rit-pct { display: none; }
  .t-lg { display: none; }
  .t-sm { display: inline; }
}

/* Mappa 1-90 */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.seg button {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.heat { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.cell {
  aspect-ratio: 1; border-radius: 8px; border: 0; cursor: pointer; padding: 0; min-width: 0;
  display: grid; place-items: center; font: inherit; font-weight: 600; font-size: 14px;
  color: var(--text); transition: transform .12s;
}
.cell:hover { transform: scale(1.08); }
.cell { font-size: 13px; }
.cell.hot { color: var(--ball-text); }
.cell.sel { outline: 2px solid var(--text); outline-offset: 2px; }
@media (max-width: 480px) { .heat { gap: 4px; } .cell { font-size: 12px; border-radius: 7px; } }
.legend { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin-top: 14px; }
.legend .ramp { flex: 1; max-width: 200px; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--surface-2), var(--accent)); }
.detail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.detail div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.detail b { display: block; font-size: 20px; }
.detail span { color: var(--muted); font-size: 12px; }

/* Controlli */
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
select, input[type=email], input[type=password], .btn {
  font: inherit; font-size: 14px; border-radius: 12px; padding: 10px 14px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
input[type=email], input[type=password] { width: 100%; }
.input-pw { margin-top: 10px; }
.btn { cursor: pointer; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--ball-text); }
.btn.lg { padding: 13px 20px; font-size: 15px; }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
.label { color: var(--muted); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-top: 12px; }
.check input { margin-top: 3px; }

/* Generatore a passi */
.steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 18px; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.step-n {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700;
}
.step-body { display: grid; gap: 8px; min-width: 0; }
.step-label { font-size: 13px; font-weight: 600; color: var(--text); line-height: 28px; }
.step-body select { max-width: 380px; width: 100%; }
.group-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.accordion { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.acc-item + .acc-item { border-top: 1px solid var(--border); }
.acc-head {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  font: inherit; color: var(--text); background: transparent; border: 0; cursor: pointer; text-align: left;
}
.acc-head:hover { background: var(--surface-2); }
.acc-title { font-weight: 700; font-size: 14px; }
.acc-count {
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700;
}
.acc-current { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; }
.acc-chevron { margin-left: auto; color: var(--muted); transition: transform .15s; }
.acc-current + .acc-chevron { margin-left: 0; }
.acc-item.open .acc-chevron { transform: rotate(180deg); }
.acc-item.open .acc-head { background: var(--surface-2); }
.acc-body { display: grid; gap: 2px; padding: 6px; }
.acc-option {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px;
  font: inherit; color: var(--text); background: transparent; border: 0; cursor: pointer; text-align: left;
}
.acc-option:hover { background: var(--surface-2); }
.acc-option strong { display: block; font-size: 14px; }
.acc-option small { display: block; font-size: 12px; color: var(--muted); }
.acc-option.active { background: var(--accent-soft); }
.acc-option.active strong { color: var(--accent); }
.acc-radio { flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--border); }
.acc-option.active .acc-radio { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }
.gen-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.gen-panel { background: var(--surface-2); border-radius: 16px; padding: 20px; display: grid; gap: 4px; position: sticky; top: 90px; }
.gen-title { margin: 6px 0 2px; font-size: 18px; letter-spacing: -0.01em; }
.gen-panel .quota { background: var(--surface); }
.personal { display: grid; gap: 8px; margin-top: 12px; }
.personal input[type=text], .personal input[type=date] {
  width: 100%; font: inherit; font-size: 14px; border-radius: 12px; padding: 10px 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.date-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 900px) { .gen-layout { grid-template-columns: 1fr; } .gen-panel { position: static; } }
@media (max-width: 560px) { .date-fields { grid-template-columns: 1fr; } }
.quota {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 20px;
  padding: 10px 14px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--muted);
}
.quota strong { color: var(--text); }
.quota-dots { display: inline-flex; gap: 5px; margin-left: auto; }
.quota-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); }
.quota-dots i.used { background: var(--accent); border-color: var(--accent); }
.generated { display: grid; justify-items: start; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.generated-ok { color: var(--ok); font-weight: 700; font-size: 14px; }
.generated a { font-size: 14px; font-weight: 600; text-decoration: none; }
.step-hint { margin: 0; font-size: 13px; color: var(--muted); }
.gen-btn { width: 100%; justify-content: center; margin-top: 22px; }

/* Combinazioni */
.combos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 18px; max-height: 420px; overflow: auto; }
.combo { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 8px 10px; }
.combo .idx { color: var(--muted); font-size: 12px; width: 26px; font-variant-numeric: tabular-nums; }
.combo .balls { gap: 5px; flex-wrap: nowrap; }
.empty { color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.toast { color: var(--accent); font-size: 13px; font-weight: 600; }

/* Tabelle */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .balls { gap: 4px; flex-wrap: nowrap; }
td .ball.sm { width: 30px; height: 30px; font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Badge */
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.vinta { background: var(--ok-soft); color: var(--ok); }
.badge.persa { background: var(--surface-2); color: var(--muted); }
.badge.attesa { background: var(--accent-soft); color: var(--accent); }

/* Confronto esperimento */
.compare { display: grid; gap: 14px; }
.compare .bar-row { grid-template-columns: 150px 1fr 70px; }
@media (max-width: 480px) { .compare .bar-row { grid-template-columns: 1fr 70px; } .compare .bar-track { grid-column: 1 / -1; grid-row: 2; } }

/* Finestra di accesso */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(10, 12, 20, .55); display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.modal h2 { margin: 18px 0 6px; font-size: 20px; }
.seg-full { display: flex; }
.pw-field { position: relative; margin-top: 10px; }
.pw-field input { width: 100%; padding-right: 92px; font: inherit; font-size: 14px; border-radius: 12px; padding-top: 10px; padding-bottom: 10px; padding-left: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--surface-2); color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.captcha { margin-top: 14px; min-height: 65px; }
.pw-forgot { margin: 8px 0 0 !important; font-size: 13px; text-align: right; }
.seg-full button { flex: 1; }
.modal p { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.modal-wide { max-width: 920px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; padding: 0; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 26px 16px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0 0 6px; }
.modal-head p { margin: 0; }
.modal-body { padding: 8px 26px 22px; overflow: auto; }
.modal-close {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer;
}
.modal-close:hover { color: var(--text); border-color: var(--accent); }
@media (max-width: 560px) { .modal-head { padding: 18px 18px 12px; } .modal-body { padding: 6px 18px 18px; } }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.msg { font-size: 14px; margin-top: 12px; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }

/* Riquadro singolo centrato (accesso admin) */
.center-card { max-width: 440px; margin: 12vh auto 0; }

/* Testi lunghi */
.prose { max-width: 760px; }
.prose h2 { font-size: 20px; margin: 32px 0 8px; }
.prose p, .prose li { color: var(--text); }
.prose h3 { font-size: 16px; margin: 20px 0 6px; }
.prose table { margin: 8px 0 12px; }
.prose td { white-space: normal; }
.note { background: var(--accent-soft); border-radius: 14px; padding: 16px 18px; margin: 24px 0 8px; }
.prose h3 { font-size: 16px; margin: 20px 0 6px; }
.prose table { margin: 8px 0 12px; }
.prose td { white-space: normal; }
.note { background: var(--accent-soft); border-radius: 14px; padding: 16px 18px; margin: 24px 0 8px; }
.todo { background: #fef3c7; color: #92400e; padding: 1px 6px; border-radius: 6px; font-weight: 600; }  /* Dati ancora da inserire */

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr 1.4fr; gap: 40px; padding: 44px 0 32px; }
.footer-brand p { margin: 14px 0 0; max-width: 320px; }
.footer-col h3 { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 4px 0 14px; }
.footer-col a { display: block; color: var(--muted); text-decoration: none; padding: 4px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-col p { margin: 0 0 10px; }
.footer-rg a { display: inline; color: var(--accent); padding: 0; white-space: nowrap; }
.footer-meta { font-size: 12px; color: var(--muted); }
.badge-18 { display: inline-grid; place-items: center; width: 30px; height: 22px; border-radius: 6px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between; border-top: 1px solid var(--border); padding: 18px 0 28px; font-size: 12px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; } }
