:root {
  --ink: #0E1322;
  --night: #0A0E1A;
  --night-2: #161D30;
  --paper: #F3F4F7;
  --mist: #EBEEF3;
  --line: #DDE1E8;
  --muted: #4B5466;
  --muted-2: #626C7E;
  --border: #7C8597;
  --on-dark: #F2F4F8;
  --on-dark-muted: #A9B2C3;
  --sky: #93A9FF;
  --accent: #2F54EB;
  --accent-ink: #2747D6;
  --accent-soft: #E8EDFF;
  --coral: #FF6B4A;
  --display: 'Bricolage Grotesque', sans-serif;
  --mono: 'Geist Mono', monospace;
  --serif: 'Instrument Serif', Georgia, serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Geist, system-ui, sans-serif; font-size: 17px; line-height: 1.6; }
a { color: var(--accent-ink); }
a:hover { color: #1B36A8; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* shared pieces */
.wrap { max-width: 1240px; margin: 0 auto; }
.section { padding: 120px 32px 136px; }
.dark { background: var(--night); color: var(--on-dark); }
.display { font-family: var(--display); font-weight: 700; line-height: .98; letter-spacing: -0.03em; }
.h-xl { font-size: clamp(56px, 7.4vw, 118px); }
.h-lg { font-size: clamp(44px, 4.6vw, 68px); }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--accent-ink); }
.dark .eyebrow { color: var(--sky); }
.lead { font-size: 19px; color: var(--muted); max-width: 56ch; }
.dark .lead { color: var(--on-dark-muted); }
.stack { display: flex; flex-direction: column; }
.head { gap: 18px; max-width: 860px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent, #fff); text-decoration: none; font-weight: 600; cursor: pointer; }
.btn:hover { color: #fff; filter: brightness(1.1); }
.logo { display: inline-flex; align-items: center; font-family: var(--display); font-weight: 700; line-height: 1; letter-spacing: -0.01em; }
.logo svg { height: 1.05em; width: auto; margin-right: .22em; flex: none; }
.row { display: flex; justify-content: space-between; gap: 12px; }
.field { min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-weight: 400; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 24px 32px 96px; }
.hero > .wrap { gap: 72px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 8px 8px 20px; border-radius: 999px; background: var(--night-2); border: 1px solid rgba(255,255,255,.1); }
.nav .logo { margin-right: auto; font-size: 26px; color: var(--on-dark); text-decoration: none; }
.nav-link { padding: 10px 14px; border-radius: 999px; color: #C5CCDA; text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-link:hover { color: #fff; }
.nav .btn { min-height: 44px; padding: 0 20px; font-size: 15px; }
.hero-grid { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.hero-copy { flex: 999 1 560px; min-width: 0; gap: 28px; }
.outline { display: block; color: transparent; -webkit-text-stroke: 2px var(--on-dark); }
.hero-copy > p { max-width: 48ch; font-size: 20px; color: var(--on-dark-muted); }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.ctas a:not(.btn) { color: var(--sky); font-weight: 600; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; color: var(--on-dark-muted); }
.race { flex: 1 1 100%; min-width: 0; gap: 18px; }
.race-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 32px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.12); }
.kicker { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .08em; color: var(--sky); }
.live { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.live span { display: flex; flex-direction: column; gap: 2px; min-width: 96px; font-size: 12px; color: var(--on-dark-muted); }
.live b { font-family: var(--mono); font-weight: 600; font-size: 22px; line-height: 1; color: var(--on-dark); font-variant-numeric: tabular-nums; }
.track { position: relative; width: 100%; aspect-ratio: 1240 / 560; }
.track svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.phase { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 48%; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.phase .kicker { color: var(--coral); }
.phase b { font-size: clamp(34px, 4.4vw, 64px); line-height: .95; }
.phase span:last-child { font-size: 16px; color: var(--on-dark-muted); }
.phases { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.phases li { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 3px solid rgba(255,255,255,.18); opacity: .4; transition: opacity .3s ease, border-color .3s ease; }
.phases li.done { opacity: 1; border-color: var(--on-dark); }
.phases li.now { opacity: 1; border-color: var(--coral); }
.phases span { font-family: var(--mono); font-size: 12px; color: var(--on-dark-muted); }
.phases b { font-size: 15px; font-weight: 650; color: var(--on-dark); }

/* ticker */
.ticker { position: relative; overflow: hidden; padding: 64px 0; background: var(--ink); }
.band { margin: 0 -60px; transform: rotate(1.2deg); background: var(--night-2); border-block: 1px solid rgba(255,255,255,.1); }
.band.front { position: relative; margin-top: -26px; transform: rotate(-1.2deg); background: var(--coral); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.belt { display: flex; align-items: center; width: max-content; gap: 36px; padding: 16px 0; white-space: nowrap; line-height: 1; }
.front .belt { padding: 18px 0; color: var(--night); }
.belt > span { display: inline-flex; align-items: center; gap: 36px; }
.sep { color: #3A4562; }
.t-serif { font-family: var(--serif); font-style: italic; font-size: 38px; color: #8A94A8; transform: translateY(2px); }
.t-pill { font-size: 24px; font-weight: 500; color: #6B7794; padding: 6px 16px; border: 1px solid #3A4562; border-radius: 999px; }
.t-sans { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: var(--on-dark-muted); transform: translateY(-2px); }
.f-sans { font-size: 36px; font-weight: 600; letter-spacing: -0.02em; }
.f-serif { font-family: var(--serif); font-style: italic; font-size: 50px; transform: translateY(3px); }
.f-chip { font-size: 26px; font-weight: 600; color: var(--coral); background: var(--night); padding: 10px 20px; border-radius: 999px; transform: translateY(-4px) rotate(-2deg); }
.f-display { font-family: var(--display); font-weight: 700; font-size: 40px; letter-spacing: -0.01em; color: #fff; }

/* menu */
.split { display: flex; flex-wrap: wrap; gap: 64px; align-items: flex-start; }
.split > :first-child { flex: 1 1 360px; min-width: 0; gap: 20px; }
.split > :last-child { flex: 2 1 560px; min-width: 0; }
.deco { width: 100%; max-width: 380px; height: auto; margin-top: 18px; }
.card { padding: 24px; border-radius: 22px; background: #fff; box-shadow: 0 20px 40px -28px rgba(14,19,34,.35); gap: 14px; }
.card .row span { font-size: 15px; color: var(--muted-2); }
.menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.menu div { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: var(--mist); }
.menu b { font-weight: 650; }
.menu span { font-size: 13px; line-height: 1.4; color: var(--muted-2); }

/* kpis */
.dark > .wrap, .tools > .wrap, .pricing > .wrap { gap: 48px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.kpis div { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 18px; background: var(--night-2); border: 1px solid rgba(255,255,255,.1); }
.kpis span { font-size: 14px; color: var(--on-dark-muted); }
.kpis strong { font-family: var(--display); font-weight: 700; font-size: 52px; line-height: .95; letter-spacing: -0.03em; }
.kpis span:last-child { color: var(--sky); }

/* tools */
.tools { position: relative; overflow: hidden; }
.tools > svg { position: absolute; top: 24px; right: -30px; width: 270px; height: 270px; pointer-events: none; }
.tools > .wrap { position: relative; }
.tiles { display: flex; flex-wrap: wrap; gap: 16px; }
.tile { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 32px; border-radius: 22px; background: #fff; border: 1px solid var(--line); }
.tile h3 { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.03em; }
.tile p { color: var(--muted); }
.tile.dark { flex: 7 1 520px; border: 0; background: var(--night); color: var(--on-dark); }
.tile.dark p { color: var(--on-dark-muted); }
.tile.wide { flex: 5 1 380px; }
.tile-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.tile-foot strong { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: .98; letter-spacing: -0.03em; }
.tile-foot small { font-size: 14px; color: var(--muted-2); }
.tile-foot.stat { align-items: baseline; gap: 10px; }
.person { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 6px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 14px; font-weight: 600; }
.person i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #4A6BFF; color: #fff; font-size: 11px; font-style: normal; }
.person.wait i { background: rgba(255,255,255,.18); }
.change { flex: 1 1 100%; display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--mist); font-size: 14px; font-weight: 600; }
.tag { padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 650; white-space: nowrap; background: var(--accent-soft); color: var(--accent-ink); }
.tag.ok { background: #DCF2E5; color: #0B6B3A; }

/* pricing */
.pricing { background: var(--mist); }
.price-grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.calc { flex: 7 1 460px; min-width: 0; gap: 22px; padding: 32px; border-radius: 22px; background: #fff; box-shadow: 0 24px 48px -32px rgba(14,19,34,.4); }
.calc .row { align-items: center; gap: 16px; }
.calc label, .calc legend, .net span { font-weight: 600; }
.num { width: 130px; padding: 0 14px; font-family: var(--display); font-weight: 700; font-size: 20px; text-align: right; letter-spacing: -0.03em; }
.calc fieldset { margin: 0; padding: 0; border: 0; }
.calc legend { padding: 0; margin-bottom: 10px; }
.toggle { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 999px; background: var(--mist); }
.toggle button { white-space: nowrap; padding: 0 8px; min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 15px; font-weight: 600; cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.sums { gap: 10px; font-variant-numeric: tabular-nums; }
.sums span { color: var(--muted); }
.net { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 2px solid var(--ink); }
.net strong { font-size: 64px; color: var(--accent); }
.plan { flex: 5 1 340px; min-width: 0; }
.plan > div { gap: 10px; padding: 18px 0 26px; border-top: 2px solid var(--ink); }
.plan h3 { font-size: 16px; font-weight: 650; color: var(--muted); }
.plan .display { font-size: 46px; line-height: 1; }
.plan p:not(.display) { color: var(--muted); }
.plan .note { padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted-2); }

/* faq */
.faq-search { min-height: 52px; padding: 0 18px; border-radius: 999px; font-size: 15px; }
.faq-list { border-top: 2px solid var(--ink); }
.faq-list div { display: flex; flex-direction: column; gap: 6px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.faq-list span { max-width: 62ch; color: var(--muted); }

/* closing */
.closing { position: relative; overflow: hidden; padding: 112px 32px; }
.closing > svg { position: absolute; right: -40px; bottom: -30px; width: 560px; height: auto; pointer-events: none; }
.closing .wrap { position: relative; gap: 28px; align-items: flex-start; }
.closing h2 { max-width: 14ch; }
.closing h2 span { display: block; color: var(--coral); }
.footer { padding: 28px 32px 40px; color: var(--on-dark-muted); border-top: 1px solid rgba(255,255,255,.12); font-size: 15px; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer .logo { font-size: 24px; color: var(--on-dark); }

@media (max-width: 640px) {
  .hero, .section, .closing, .footer { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 80px; padding-bottom: 88px; }
  .nav-link { display: none; }
  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: 1fr; }
  .phase { width: 70%; }
  .phase span:last-child { display: none; }
}

/* race page (gara.html) */
.gara { max-width: 480px; margin: 0 auto; font-size: 15px; line-height: 1.5; background: var(--paper); }
.gara-hero { position: relative; overflow: hidden; gap: 12px; padding: 28px 20px 26px; }
.gara-hero::before { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, var(--glow, rgba(74,107,255,.5)), transparent 70%); }
.gara-hero > * { position: relative; }
.gara-hero .where { font-size: 13px; font-weight: 600; color: var(--head-soft, #9DB0FF); }
.gara-hero h1 { font-size: 52px; }
.gara-hero .when { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; font-weight: 600; color: var(--head-soft, #C5CCDA); }
.gara-body { gap: 16px; padding: 20px; }
.gara-body .title { font-size: 14px; font-weight: 600; }
.quotes { gap: 8px; margin-top: 4px; }
.quote { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); color: var(--ink); text-align: left; cursor: pointer; }
.quote[aria-pressed="true"] { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }
.quote b { font-weight: 650; }
.quote small { font-size: 13px; color: var(--muted-2); }
.quote .display { font-size: 26px; line-height: 1; }
.box { gap: 10px; padding: 16px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.box label, .box .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.upload { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1.5px dashed var(--border); border-radius: 10px; background: var(--paper); font-weight: 600; color: var(--muted); cursor: pointer; }
.upload:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.sizes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.sizes button { min-height: 44px; border: 0; border-radius: 10px; background: var(--mist); color: var(--muted); font-weight: 650; cursor: pointer; }
.sizes button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.bill { gap: 8px; font-variant-numeric: tabular-nums; }
.bill span { color: var(--muted); }
.bill .row:last-child { padding-top: 8px; border-top: 1px solid var(--line); }
.bill .row:last-child b:last-child { font-size: 18px; }
.gara .btn { min-height: 52px; }
.btn.black { background: var(--ink); }
.gara .fine { font-size: 13px; color: var(--muted-2); text-align: center; }

/* organizer panel (pannello-*.html) */
.panel { display: flex; min-height: 100vh; font-size: 15px; line-height: 1.5; }
.side { flex: 0 0 232px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 18px 12px; background: #fff; border-right: 1px solid var(--line); }
.side .logo { padding: 4px 12px; font-size: 22px; color: var(--ink); text-decoration: none; }
.event-box { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--mist); }
.event-box span { font-size: 12px; color: var(--muted-2); }
.event-box b { font-weight: 650; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-weight: 500; text-decoration: none; white-space: nowrap; }
.side-nav a:hover { background: var(--mist); color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }
.side-nav small { font-size: 12px; font-weight: 700; color: #8A5300; }
.side-fill { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.route { display: flex; flex-direction: column; gap: 8px; padding: 16px 14px; border-radius: 16px; background: var(--night); color: #fff; }
.route-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.route-top span:first-child { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--sky); }
.route-top span:last-child { font-family: var(--mono); font-size: 12px; color: #C9D1E0; }
.route > b { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1; letter-spacing: -0.03em; }
.route > span { font-size: 13px; color: #C9D1E0; }
.route > .route-cap { font-size: 12px; }
.route svg { display: block; width: 100%; height: auto; max-height: 320px; overflow: visible; }
.route-bar { position: relative; height: 8px; margin: 6px 0 2px; border-radius: 999px; background: #26304A; }
.route-bar span { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--coral)); }
.route-bar i { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--coral); border: 3px solid var(--night); }

.pmain { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 16px 28px; background: #fff; border-bottom: 1px solid var(--line); color: var(--muted-2); }
.topbar b { color: var(--ink); }
.topbar > .small { font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pbody { display: flex; flex-direction: column; gap: 18px; padding: 28px; }
.pbody.split { flex-direction: row; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.pbody.split > :first-child { flex: 999 1 600px; min-width: 0; }
.pbody.split > :last-child { flex: 1 1 340px; min-width: 0; }
.ptitle h1 { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: .95; letter-spacing: -0.03em; }
.ptitle p { margin-top: 6px; max-width: 64ch; color: var(--muted); }
.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cols > * { flex: 1 1 340px; min-width: 0; }
.cols > .wide { flex: 2 1 520px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.pcard.focus { box-shadow: 0 0 0 2px var(--accent); }
.pcard.tight { gap: 4px; }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.head-row > b, .pcard > b { font-weight: 650; }
.small { font-size: 13px; color: var(--muted-2); }
.head-row > .small { font-size: 14px; }
.desc { font-size: 14px; color: var(--muted); }
.big { font-family: var(--display); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.list-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-row > span:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-row b { font-weight: 600; }
.tnum { font-variant-numeric: tabular-nums; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tag.warn { background: #FFF0D6; color: #8A5300; }
.tag.off { background: var(--mist); color: var(--muted-2); }

.pbtn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--mist); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
.pbtn:hover { color: var(--ink); filter: brightness(.96); }
.pbtn.primary { background: var(--accent); color: #fff; }
.pbtn.green { background: #0B6B3A; color: #fff; }
.pbtn.primary:hover, .pbtn.green:hover { color: #fff; filter: brightness(1.1); }
.pbtn.white { background: #fff; }
.pbtn.line { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.pbtn.dashed { background: transparent; border: 1.5px dashed var(--border); }
.pbtn.danger { color: #B42318; }
.pbtn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.pbtn.lg { min-height: 44px; padding: 0 18px; font-size: 15px; }
.pbtn.block { width: 100%; min-height: 44px; font-size: 15px; white-space: normal; }
.pbtn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.linkbtn { padding: 0; border: 0; background: none; font-weight: 600; color: var(--accent-ink); text-decoration: underline; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: #fff; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.chip span { opacity: .7; font-weight: 500; }
.opt { min-height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--mist); color: var(--muted); font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.opt[aria-checked="true"], .opt[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.opt.round { min-height: 32px; padding: 0 10px; border-radius: 999px; }
.opt.q { min-height: 28px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 650; }
.opt.q[aria-pressed="false"] { color: var(--muted-2); text-decoration: line-through; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--mist); }
.seg button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.seg [aria-pressed="true"], .seg [aria-selected="true"] { background: #fff; color: var(--ink); }
.seg .strong[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.switch { position: relative; flex: none; width: 44px; height: 26px; padding: 0; border: 0; border-radius: 999px; background: var(--border); cursor: pointer; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked="true"], [aria-checked="true"] > .switch { background: var(--accent); }
.switch[aria-checked="true"]::after, [aria-checked="true"] > .switch::after { left: 21px; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; text-align: left; cursor: pointer; }
.switch-row > span:first-child { display: flex; flex-direction: column; }
.switch-row b { font-weight: 600; }
.switch-row.sub { padding-left: 16px; }

.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.fcol { display: flex; flex-direction: column; gap: 6px; }
.fcol > label, .flabel { font-size: 14px; font-weight: 600; }
.lab { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.field.mono { font-family: var(--mono); font-size: 15px; }
textarea.field { padding: 10px 12px; line-height: 1.5; resize: vertical; }
.field:disabled { background: var(--mist); }
.msg { font-size: 13px; font-weight: 600; color: #B42318; }
.msg.ok { color: #0B6B3A; }
.msg.info { color: var(--muted); }
.msg:empty { display: none; }
.banner { padding: 12px 14px; border-radius: 12px; background: #DCF2E5; color: #0B6B3A; font-weight: 600; }
.confirm { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: #FFF0D6; }
.confirm.blue { background: var(--accent-soft); }

.ptable { overflow-x: auto; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.ptable table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.ptable th { padding: 12px 10px; text-align: left; font-size: 13px; font-weight: 600; color: var(--muted-2); }
.ptable td { padding: 10px; vertical-align: top; }
.ptable tbody tr { border-top: 1px solid var(--line); }
.ptable tr > :first-child { padding-left: 14px; }
.ptable tr > :last-child { padding-right: 14px; }
.ptable .r { text-align: right; }
.ptable.roomy td { padding-top: 12px; padding-bottom: 12px; }
.ptable tr.sel { background: var(--accent-soft); }
.meter { display: block; height: 6px; border-radius: 999px; background: var(--mist); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); }

/* panoramica */
.toggles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.tcard { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.tcard.open { box-shadow: 0 0 0 2px var(--accent); }
.tcard-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.tcard-row > span { display: flex; flex-direction: column; min-width: 0; }
.tcard-row b { font-weight: 650; }
.kgroup { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .06em; color: var(--muted); }
.kgroup span { width: 18px; height: 4px; border-radius: 2px; }
.kgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.kpi { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.kpi > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi > div > span:first-child { font-size: 13px; color: var(--muted); }
.kpi > div > span:last-child { font-size: 13px; font-weight: 600; }
.kpi strong { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi svg { flex: 0 1 112px; min-width: 64px; height: auto; overflow: visible; }
.wchart { position: relative; display: flex; gap: 8px; align-items: flex-end; height: 240px; padding: 26px 0 0 36px; border-bottom: 1px solid var(--border); background: repeating-linear-gradient(to top, var(--line) 0 1px, transparent 1px 42.8px); }
.wchart-y { position: absolute; left: 0; top: 18px; bottom: 0; display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: var(--muted-2); }
.wchart > div:not(.wchart-y) { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; font-size: 12px; font-weight: 650; }
.wchart .bar { width: 70%; max-width: 26px; border-radius: 4px 4px 0 0; }
.wchart-x { display: flex; gap: 8px; padding-left: 36px; font-size: 12px; color: var(--muted-2); }
.wchart-x span { flex: 1; text-align: center; }
.tip { background: var(--accent-soft); box-shadow: none; gap: 10px; }
.tip > b { color: var(--accent-ink); }
.todo { display: flex; gap: 8px; align-items: flex-start; border-bottom: 1px solid var(--line); }
.todo label { flex: 1; display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.todo input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.todo.done label { color: var(--muted-2); text-decoration: line-through; }
.x { flex: none; width: 32px; height: 32px; margin-top: 4px; border: 0; border-radius: 8px; background: none; color: var(--muted-2); font-size: 18px; line-height: 1; cursor: pointer; }
.x:hover { background: var(--mist); }

/* iscritti */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { flex: 1 1 220px; max-width: 320px; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; }
.bib { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; min-height: 30px; padding: 0 8px; border: 0; border-radius: 6px; background: var(--ink); color: #fff; font-family: var(--mono); font-weight: 600; font-size: 14px; cursor: pointer; }
.bib.done { background: #0B6B3A; }
.picked { font-size: 12px; font-weight: 650; color: #0B6B3A; }
.pop { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 10px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.athlete { display: flex; flex-direction: column; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.athlete b { font-weight: 600; white-space: nowrap; }
.athlete span { font-size: 12px; color: var(--muted-2); }
.sheet { display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -36px rgba(14,19,34,.5); }
.sheet.focus { gap: 12px; box-shadow: 0 0 0 2px var(--accent), 0 30px 60px -36px rgba(14,19,34,.5); }
.sheet h2 { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: .95; letter-spacing: -0.03em; }
.sheet.focus h2 { font-size: 28px; }
.sheet label { font-size: 13px; font-weight: 600; }
.close { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--mist); cursor: pointer; }
.bib-tag { white-space: nowrap; padding: 4px 10px; border-radius: 6px; background: var(--ink); color: #fff; font-family: var(--mono); font-weight: 600; }
.facts { margin: 0; display: flex; flex-direction: column; font-size: 14px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted-2); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.done-pill { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 999px; background: #DCF2E5; color: #0B6B3A; font-weight: 600; text-align: center; }
.doc { margin: 0; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 12px; background: #FAFBF8; box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; }
.doc figcaption, .doc > span { font-size: 12px; color: var(--muted-2); }
.doc > div { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 8px; background: #fff; box-shadow: 0 1px 3px rgba(14,19,34,.15); }

/* modulo, quote */
.frow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.frow b { font-weight: 600; }
.phone { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 26px; background: #fff; box-shadow: 0 0 0 8px var(--mist), 0 0 0 9px var(--line); }
.pf-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pf-label span { font-weight: 500; color: var(--muted-2); }
.pf-box { height: 34px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.qrow { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 18px 20px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.qrow > div:first-child { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qrow > div:first-child b { font-size: 17px; font-weight: 650; }
.qcount { display: flex; flex-direction: column; align-items: flex-end; }
.qcount strong { font-size: 32px; }
.tiers { flex: 3 1 420px; min-width: 0; display: flex; gap: 6px; }
.tier { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--mist); color: var(--muted-2); font-size: 12px; text-align: left; cursor: pointer; }
.tier b { font-size: 18px; font-variant-numeric: tabular-nums; }
.tier.past b { text-decoration: line-through; }
.tier.now { background: var(--accent); color: #fff; }
.tier.editing { box-shadow: 0 0 0 3px var(--coral); }
.tier u { font-size: 11px; opacity: .8; }

/* comunicazioni, incassi, statistiche */
.reach { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); }
.reach strong { font-size: 34px; color: var(--accent-ink); }
.token { min-height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: var(--mist); font-family: var(--mono); font-size: 12px; color: var(--muted); cursor: pointer; }
.mail-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted-2); }
.mail-head b { font-size: 16px; color: var(--ink); }
.mail-body { white-space: pre-line; }
mark { background: #D6DFFF; padding: 0 2px; }
.ledger > div:not(.net) { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ledger > .fee { padding-left: 16px; color: var(--muted-2); }
.ledger b { white-space: nowrap; }
.net.ink { margin-top: -1px; }
.net.ink strong { font-size: 56px; color: var(--ink); }
.iban { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--mist); }
.iban span:last-child { font-family: var(--mono); }
.dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 190px; }
.dow > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; font-size: 12px; }
.dow i { display: block; width: 100%; max-width: 38px; border-radius: 8px 8px 3px 3px; }
.dow span { color: var(--muted-2); }
.hbar { display: grid; grid-template-columns: 120px minmax(0, 1fr) 56px; gap: 10px; align-items: center; font-size: 14px; }
.hbar i { display: block; height: 12px; border-radius: 999px; background: var(--accent); }
.hbar span:last-child { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.ages { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; align-items: end; height: 170px; }
.ages > div { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; height: 100%; }
.ages > div > div { display: flex; gap: 2px; align-items: flex-end; height: 140px; }
.ages i { flex: 1; border-radius: 4px 4px 2px 2px; }
.ages span { font-size: 11px; color: var(--muted-2); text-align: center; }
.initials { display: grid; font-style: normal; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--mist); font-size: 12px; font-weight: 700; color: var(--muted); }

@media (max-width: 860px) {
  .panel { flex-direction: column; }
  .side { position: static; height: auto; flex: none; gap: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-nav { flex-direction: row; overflow-x: auto; }
  .side-fill { display: none; }
  .topbar, .pbody { padding-left: 16px; padding-right: 16px; }
  .pbody { padding-top: 20px; }
  .hbar { grid-template-columns: 96px minmax(0, 1fr) 52px; }
}

/* panel, live data */
.event-box label { font-size: 12px; color: var(--muted-2); }
.event-pick { width: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); font-weight: 650; cursor: pointer; }
.event-box .event-links { margin-top: 4px; color: var(--muted-2); }
.event-links a, .event-links .linkbtn { color: var(--accent-ink); font-size: 12px; }
.event-box .demo-note { margin-top: 6px; color: #8A5300; line-height: 1.4; }
.empty { padding: 18px; border-radius: 14px; background: var(--mist); color: var(--muted); }
.row-actions { display: inline-flex; justify-content: flex-end; flex-wrap: nowrap; gap: 6px; }
.copy { font-family: var(--mono); font-size: 12px; word-break: break-all; color: var(--muted); }
.doc iframe { width: 100%; height: 360px; border: 0; border-radius: 8px; background: #fff; }
.errors { margin: 0; padding-left: 18px; max-height: 220px; overflow: auto; font-size: 13px; color: #B42318; }
input[type="file"].field { padding: 9px 12px; }

/* account pages and public pages built on the API */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 22px; background: #fff; box-shadow: 0 24px 48px -32px rgba(14,19,34,.4); }
.auth-card .logo { font-size: 24px; color: var(--ink); text-decoration: none; }
.auth-card h1 { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1; letter-spacing: -0.03em; }
.auth-card label { font-size: 14px; font-weight: 600; }
.page { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; display: flex; flex-direction: column; gap: 16px; }
.page h1 { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 6vw, 52px); line-height: .98; letter-spacing: -0.03em; }

/* race logo on public pages: on a white badge so dark and light logos both show */
.logo-badge { align-self: flex-start; display: grid; place-items: center; min-width: 88px; min-height: 88px; padding: 12px 16px; border-radius: 20px; background: #fff; box-shadow: 0 10px 30px -12px rgba(0,0,0,.45); }
.logo-badge img { display: block; max-width: 220px; max-height: 96px; object-fit: contain; }
.colors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.colors label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.colors input { width: 100%; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: none; cursor: pointer; }
.cat-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 64px 64px 32px; gap: 6px; align-items: end; }
.cat-row .field { min-height: 38px; padding: 0 8px; font-size: 14px; }
