/* Font locali (@fontsource, variabili) */
@font-face {
  font-family: "Sora Variable"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("../fonts/sora-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sora Variable"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("../fonts/sora-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans Variable"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans Variable"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono Variable"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono Variable"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("../fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--f-ui);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--ghiaccio);
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgba(59, 154, 217, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255, 127, 97, 0.07), transparent 60%),
    linear-gradient(180deg, #F7FAFC 0%, var(--ghiaccio) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01" on;
}

/* Trama a linee di strada molto tenue */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='120'%3E%3Cg stroke='%230F4E7A' stroke-opacity='.045' stroke-width='2' stroke-dasharray='14 12' fill='none'%3E%3Cpath d='M0 30h240M0 90h240'/%3E%3C/g%3E%3C/svg%3E");
}

h1, h2, h3, h4 { font-family: var(--f-title); margin: 0; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: var(--fs-2xl); font-weight: 700; }
h2 { font-size: var(--fs-xl); font-weight: 650; }
h3 { font-size: var(--fs-lg); font-weight: 600; }
h4 { font-size: var(--fs-md); font-weight: 600; }
p { margin: 0; }
a { color: var(--blu); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
svg { flex-shrink: 0; }

button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { font-size: 16px; } /* niente zoom su iOS */
button { cursor: pointer; background: none; border: 0; padding: 0; }
button, a, [role="button"], [role="tab"], label.card-choice {
  touch-action: manipulation;
}
button, [role="button"], [role="tab"] { -webkit-user-select: none; user-select: none; }
[hidden] { display: none !important; }

:focus { outline: none; }
/* Anello di focus unico (wave 4): 2 px, staccato di 2 px; dentro i contenitori che scorrono va verso l'interno */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sidebar :focus-visible, .login :focus-visible { outline-color: var(--focus-dark); }
[tabindex="-1"]:focus-visible { outline: none; }
.tabs [role="tab"]:focus-visible, .chips-scroll .chip:focus-visible { outline-offset: -2px; }

::selection { background: rgba(255, 127, 97, 0.28); }

.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.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;
}
.row { display: flex; align-items: center; gap: var(--s2); }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.col { display: flex; flex-direction: column; gap: var(--s2); }
.spacer { flex: 1; }
.grow { flex: 1; min-width: 0; }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 14px; border-radius: var(--r-sm);
  transition: transform var(--d-menu) var(--ease-out);
}
.skip-link:focus { transform: translateY(72px); }

/* Barra di scorrimento discreta */
* { scrollbar-width: thin; scrollbar-color: rgba(15, 78, 122, 0.22) transparent; }
