/* GENERATO da bin/console assets:build — non modificare: modifica app.css e rigenera. */
/* =====================================================================
   DIGISCOVERY — Design system
   Palette: blu #2563EB · viola #8B5CF6 · ciano #06B6D4 · blu notte #0F172A
   Nessuna dipendenza esterna, font ospitato localmente.
   ===================================================================== */

@font-face {
  font-family: "Google Sans";
  src: url("../fonts/google-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  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: "Google Sans";
  src: url("../fonts/google-sans-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  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: "Google Sans";
  src: url("../fonts/google-sans-italic-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
  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 di ripiego con le metriche di Google Sans (misurate: larghezza 99,8% di Arial, 108,2% di Roboto;
   ascendente 0,97 em, discendente 0,29 em): finché il web font non è pronto il testo occupa lo stesso spazio,
   quindi lo scambio (font-display: swap) non sposta il layout (CLS) su nessun dispositivo. */
@font-face {
  font-family: "Google Sans Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans"), local("Helvetica"), local("Helvetica Neue");
  size-adjust: 99.8%; ascent-override: 97.2%; descent-override: 29.1%; line-gap-override: 0%;
}
@font-face {
  font-family: "Google Sans Fallback Roboto";
  src: local("Roboto"), local("Roboto-Regular");
  size-adjust: 108.2%; ascent-override: 89.6%; descent-override: 26.8%; line-gap-override: 0%;
}

:root {
  --blue: #2563EB;
  --blue-600: #1D4ED8;
  --blue-50: #EFF6FF;
  --blue-100: #DBEAFE;
  --violet: #8B5CF6;
  --violet-600: #7C3AED;
  --violet-50: #F5F3FF;
  --cyan: #06B6D4;
  --cyan-50: #ECFEFF;
  --navy: #0F172A;
  --navy-900: #0B1120;
  --navy-800: #111A2E;
  --navy-700: #1E293B;
  --slate: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50: #F8FAFC;
  --white: #FFFFFF;
  --green: #16A34A;
  --green-50: #F0FDF4;
  --green-100: #DCFCE7;
  --amber: #D97706;
  --amber-50: #FFFBEB;
  --red: #DC2626;
  --red-50: #FEF2F2;
  --orange: #F97316;

  --text: #0F172A;
  --text-2: #475569;
  --text-3: #64748B;
  --border: #E2E8F0;
  --bg: #F8FAFC;
  --surface: #FFFFFF;

  --grad-brand: linear-gradient(135deg, #2563EB 0%, #6D5BF6 60%, #8B5CF6 100%);
  --grad-text: linear-gradient(90deg, #3B82F6 0%, #06B6D4 100%);
  --grad-hero: radial-gradient(1200px 600px at 85% 10%, rgba(59,130,246,.35), transparent 60%),
               radial-gradient(900px 500px at 10% 90%, rgba(139,92,246,.28), transparent 60%),
               radial-gradient(600px 400px at 50% 50%, rgba(6,182,212,.10), transparent 70%),
               linear-gradient(180deg, #0A1022 0%, #0F172A 100%);
  --grad-pro: linear-gradient(135deg, #F97316, #E11D48);
  --grad-boost: linear-gradient(135deg, #3B82F6, #8B5CF6);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-xs: 0 1px 2px rgba(15,23,42,.06);
  --shadow-sm: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --shadow: 0 6px 24px -6px rgba(15,23,42,.12), 0 2px 6px rgba(15,23,42,.05);
  --shadow-lg: 0 24px 60px -20px rgba(15,23,42,.30);
  --shadow-blue: 0 10px 30px -10px rgba(37,99,235,.55);
  --ring: 0 0 0 4px rgba(37,99,235,.18);

  --font: "Google Sans", "Google Sans Fallback", "Google Sans Fallback Roboto", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --header-h: 72px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; }}
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; 
}
img, svg, video { max-width: 100%; height: auto; display: block; }
img { border-style: none; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-600); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.02em; color: var(--navy); font-weight: 700; text-wrap: balance; }
p, li, dd, figcaption { text-wrap: pretty; }
h1 { font-size: clamp(30px, 4vw, 44px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 20px; letter-spacing: -.01em; }
h4 { font-size: 16px; letter-spacing: -.005em; font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .9em; background: var(--slate-100); padding: 2px 6px; border-radius: 6px; }
blockquote { margin: 0 0 1em; padding: 12px 16px; border-left: 3px solid var(--blue); background: var(--blue-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-2); }
table { border-collapse: collapse; width: 100%; }
button { font: inherit; cursor: pointer; }
input, select, textarea, optgroup { font-family: inherit; }
:focus-visible { outline: 3px solid rgba(37,99,235,.55); outline-offset: 2px; border-radius: 6px; }
.site-header--dark :focus-visible, .hero :focus-visible, .section-dark :focus-visible, .site-footer :focus-visible, .auth-side :focus-visible { outline-color: rgba(147,197,253,.85); }
::selection { background: rgba(37,99,235,.18); }

.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: 12px; top: -60px; z-index: 1000; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }

.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: -0.18em; }

/* ------------------------------------------------------------------ layout */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }
@media (max-width: 640px) { .container { padding: 0 16px; }}
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
@media (max-width: 640px) { .section { padding: 56px 0; }}
.section-dark { background: var(--grad-hero); color: #CBD5E1; }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-white { background: #fff; }

.stack { display: flex; flex-direction: column; gap: 16px; } .stack-sm { gap: 10px; } .stack-lg { gap: 28px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cluster-sm { gap: 6px; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }}
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }}
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }}
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: minmax(0, 1fr); }}

/* ------------------------------------------------------------------ tipografia */
.display { font-size: clamp(38px, 6vw, 68px); line-height: 1.02; letter-spacing: -.035em; font-weight: 700; }
.lead { font-size: 18px; color: var(--text-2); line-height: 1.65; }
@media (max-width: 640px) { .lead { font-size: 16.5px; line-height: 1.6; }}
.section-dark .lead { color: #CBD5E1; }
.muted { color: var(--text-3); }
.small, small { font-size: 13px; }
.xs { font-size: 12px; }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.text-center { text-align: center; }
.gradient-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; line-height: 1.4;
  text-transform: uppercase; color: var(--blue); background: var(--blue-50); border: 1px solid var(--blue-100);
  padding: 6px 14px; border-radius: 999px;
}
.section-dark .eyebrow { color: #93C5FD; background: rgba(59,130,246,.10); border-color: rgba(96,165,250,.35); }
.section-title { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-title h2 { margin-bottom: 10px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.prose { max-width: 72ch; color: var(--text-2); }
.prose h2 { font-size: 22px; margin-top: 1.6em; } .prose h3 { font-size: 18px; margin-top: 1.4em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose li { margin-bottom: .35em; }

/* ------------------------------------------------------------------ bottoni */
.btn {
  --btn-bg: #fff; --btn-color: var(--navy); --btn-border: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
  border-radius: 12px; border: 1px solid var(--btn-border); background: var(--btn-bg); color: var(--btn-color);
  font-weight: 700; font-size: 14.5px; line-height: 1.2; text-align: center; white-space: nowrap; cursor: pointer; user-select: none;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn:hover { color: var(--btn-color); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.btn-primary { --btn-bg: var(--blue); --btn-color: #fff; --btn-border: var(--blue); box-shadow: var(--shadow-blue); }
.btn-primary:hover { --btn-bg: var(--blue-600); box-shadow: 0 14px 34px -10px rgba(37,99,235,.65); }
.btn-gradient { --btn-bg: var(--grad-brand); --btn-color: #fff; --btn-border: transparent; background: var(--grad-brand); box-shadow: var(--shadow-blue); }
.btn-secondary { --btn-bg: #fff; --btn-color: var(--navy); }
.btn-secondary:hover { border-color: var(--slate-300); }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; --btn-color: var(--text-2); }
.btn-ghost:hover { --btn-bg: var(--slate-100); box-shadow: none; }
.btn-dark { --btn-bg: var(--navy); --btn-color: #fff; --btn-border: var(--navy); }
.btn-outline-light { --btn-bg: transparent; --btn-color: #fff; --btn-border: rgba(255,255,255,.45); }
.btn-outline-light:hover { --btn-bg: rgba(255,255,255,.08); --btn-border: #fff; }
.btn-light { --btn-bg: #fff; --btn-color: var(--blue); --btn-border: #fff; }
.btn-danger { --btn-bg: #fff; --btn-color: var(--red); --btn-border: #FECACA; }
.btn-danger:hover { --btn-bg: var(--red-50); }
.btn-danger-solid { --btn-bg: var(--red); --btn-color: #fff; --btn-border: var(--red); }
.btn-success { --btn-bg: var(--green); --btn-color: #fff; --btn-border: var(--green); }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 13.5px; border-radius: 10px; }
.btn-xs { min-height: 30px; padding: 5px 10px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 16px; border-radius: 14px; }
.btn-block { display: flex; width: 100%; }
.btn-icon { padding: 0; width: 44px; min-width: 44px; }
.btn-icon.btn-sm { width: 36px; min-width: 36px; }
.btn-icon.btn-xs { width: 30px; min-width: 30px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.link-arrow .ico { transition: transform .2s var(--ease); }
.link-arrow:hover .ico { transform: translateX(3px); }

/* ------------------------------------------------------------------ form */
label, .label { display: block; font-weight: 600; font-size: 14px; color: var(--navy); margin-bottom: 6px; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=color]),
select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; font: inherit; font-size: 15px; color: var(--text);
  background: #fff; border: 1px solid var(--slate-300); border-radius: 12px; outline: none;
  transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.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 14px center;
}
select[multiple] { background-image: none; padding-right: 14px; min-height: 120px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue) !important; box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--slate-400); }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--red) !important; }
input:disabled, select:disabled, textarea:disabled { background: var(--slate-100); color: var(--slate); cursor: not-allowed; }
input[type=file] { font: inherit; font-size: 14px; max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; margin-right: 12px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--navy); cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; flex: none; cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--blue); }
.form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .form-row, .form-row-3 { grid-template-columns: minmax(0, 1fr); }}
.field { display: flex; flex-direction: column; min-width: 0; }
.hint { font-size: 13px; color: var(--text-3); margin-top: 6px; }
.field-error { font-size: 13px; color: var(--red); margin: 6px 0 0; font-weight: 600; }
.required::after { content: " *"; color: var(--red); }
.counter { font-size: 12px; color: var(--text-3); text-align: right; margin-top: 4px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 14.5px; color: var(--text); cursor: pointer; margin: 0; line-height: 1.5; }
.check b, .check strong { font-weight: 700; }
.check a { font-weight: 600; }
.check input { margin-top: 2px; }
.check-list { display: flex; flex-direction: column; gap: 10px; }
.input-icon { position: relative; }
.input-icon > .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--slate-400); pointer-events: none; }
.input-icon > input { padding-left: 42px !important; }
.input-group { display: flex; gap: 8px; }
.input-group > input, .input-group > select { flex: 1; }
.fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 0; }
.fieldset legend { font-weight: 700; padding: 0 8px; color: var(--navy); }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; font-size: 14.5px; margin: 0; }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--slate-300); position: relative; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--blue); }
.switch input:checked::after { transform: translateX(18px); }
.choice { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--radius); background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; margin: 0; font-weight: 500; }
.choice:hover { border-color: var(--slate-300); }
.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-50); box-shadow: 0 0 0 3px rgba(37,99,235,.10); }
.choice input { margin-top: 3px; }
.choice-title { font-weight: 700; color: var(--navy); display: block; font-size: 14.5px; }
.choice-desc { font-size: 13px; color: var(--text-3); display: block; }

/* ------------------------------------------------------------------ card */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); min-width: 0; }
.card-body { padding: 24px; }
.card-header { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-header h2, .card-header h3, .card-header h4 { margin: 0; font-size: 16px; }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--border); background: var(--slate-50); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-tint { background: linear-gradient(180deg, var(--blue-50), #fff); border-color: var(--blue-100); }
@media (max-width: 640px) { .card-body { padding: 18px; } .card-header { padding: 14px 18px; }}

/* ------------------------------------------------------------------ badge, pill, chip */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.4; color: #fff; background: var(--navy); white-space: nowrap; }
.badge-pro { background: var(--grad-pro); box-shadow: 0 4px 12px -4px rgba(225,29,72,.5); }
.badge-boost { background: var(--grad-boost); box-shadow: 0 4px 12px -4px rgba(99,102,241,.5); }
.badge-soft { background: var(--slate-100); color: var(--text-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.35; white-space: nowrap; background: var(--slate-100); color: var(--text-2); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill-plain::before { display: none; }
.pill-ok { background: var(--green-50); color: #15803D; } /* testo con contrasto AA (≥ 4,5:1) */
.pill-warn { background: var(--amber-50); color: #B45309; }
.pill-off { background: var(--slate-100); color: #475569; }
.pill-info { background: var(--blue-50); color: var(--blue); }
.pill-violet { background: var(--violet-50); color: var(--violet-600); }
.pill-danger { background: var(--red-50); color: #B91C1C; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: #334155; background: var(--slate-100); border: 1px solid transparent; line-height: 1.35; white-space: nowrap; }
@media (max-width: 640px) { a.chip:not(.chip-dark) { padding-top: 8px; padding-bottom: 8px; }}
a.chip:hover, button.chip:hover { background: var(--blue-50); color: var(--blue); border-color: var(--blue-100); }
.chip-outline { background: #fff; border-color: var(--border); }
.chip-blue { background: var(--blue-50); color: var(--blue); }
.chip-dark { background: rgba(255,255,255,.07); color: #E2E8F0; border: 1px solid rgba(255,255,255,.14); padding: 7px 14px; border-radius: 10px; font-size: 13px; }
a.chip-dark:hover { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); }
.chip-remove { background: none; border: 0; padding: 0; color: inherit; opacity: .6; cursor: pointer; display: inline-flex; }
.chip-remove:hover { opacity: 1; }
.verified { color: var(--blue); width: 18px; height: 18px; flex: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--slate-300); display: inline-block; flex: none; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--red); color: #fff; }

/* ------------------------------------------------------------------ avatar */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; object-fit: cover; font-weight: 700; color: #fff; background: var(--grad-brand); letter-spacing: -.02em; box-shadow: 0 0 0 3px #fff, var(--shadow-sm); }
.avatar-xs { width: 28px; height: 28px; font-size: 11px; box-shadow: 0 0 0 2px #fff; }
.avatar-sm { width: 36px; height: 36px; font-size: 13px; box-shadow: 0 0 0 2px #fff; }
.avatar-md { width: 60px; height: 60px; font-size: 20px; }
.avatar-lg { width: 96px; height: 96px; font-size: 32px; }
.avatar-xl { width: 140px; height: 140px; font-size: 46px; box-shadow: 0 0 0 5px #fff, var(--shadow); }
.avatar-g0 { background: linear-gradient(135deg, #2563EB, #06B6D4); }
.avatar-g1 { background: linear-gradient(135deg, #7C3AED, #EC4899); }
.avatar-g2 { background: linear-gradient(135deg, #0EA5E9, #6366F1); }
.avatar-g3 { background: linear-gradient(135deg, #10B981, #0EA5E9); }
.avatar-g4 { background: linear-gradient(135deg, #F59E0B, #EF4444); }
.avatar-g5 { background: linear-gradient(135deg, #8B5CF6, #2563EB); }
.avatar-wrap { position: relative; display: inline-flex; flex: none; }
.avatar-status { position: absolute; right: 4%; bottom: 4%; width: 22%; height: 22%; min-width: 12px; min-height: 12px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px #fff; }
.avatar-status.warn { background: #F59E0B; } .avatar-status.off { background: var(--slate-300); }

/* ------------------------------------------------------------------ brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font-weight: 700; letter-spacing: -.02em; font-size: 22px; line-height: 1; }
.brand:hover { color: var(--navy); }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-word b { font-weight: 700; color: inherit; }
.brand-word span { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-light { color: #fff; } .brand-light:hover { color: #fff; }
.brand-sm { font-size: 18px; } .brand-sm .brand-mark { width: 30px; height: 30px; }

/* ------------------------------------------------------------------ header pubblico */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: rgba(255,255,255,.86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(226,232,240,.8); }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 28px; }
@media (max-width: 1320px) { .site-header .container { gap: 18px; } .nav-links { gap: 2px; } .nav-links a { padding: 8px 9px; font-size: 14px; } .nav-actions { gap: 6px; }}
.site-header--dark { position: absolute; left: 0; right: 0; background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header--dark.is-scrolled { position: fixed; background: rgba(10,16,34,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: rgba(255,255,255,.08); }
.nav-links { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-links a { display: block; white-space: nowrap; padding: 8px 11px; border-radius: 10px; font-weight: 600; font-size: 14.5px; color: var(--text-2); }
.nav-links a:hover, .nav-links a.is-active { color: var(--navy); background: var(--slate-100); }
.site-header--dark .nav-links a { color: #CBD5E1; }
.site-header--dark .nav-links a:hover, .site-header--dark .nav-links a.is-active { color: #fff; background: rgba(255,255,255,.08); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-actions .nav-login { font-weight: 700; color: var(--navy); padding: 8px 12px; }
.site-header--dark .nav-actions .nav-login { color: #fff; }
.nav-toggle { display: none; }
.nav-toggle .nav-ico-close, .nav-toggle[aria-expanded=true] .nav-ico-open { display: none; }
.nav-toggle[aria-expanded=true] .nav-ico-close { display: inline-block; }
.mobile-menu { display: none; }
@media (max-width: 1220px) {
  .site-header .nav-links, .site-header .nav-actions .hide-mobile { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-menu { position: fixed; inset: var(--header-h) 0 0; z-index: 49; background: #fff; padding: 20px 16px 40px; overflow-y: auto; display: none; flex-direction: column; gap: 6px; }
  .mobile-menu.is-open { display: flex; }
  .mobile-menu a:not(.btn) { padding: 12px 14px; border-radius: 12px; font-weight: 700; color: var(--navy); font-size: 17px; }
  .mobile-menu a:not(.btn):hover { background: var(--slate-100); }
  .mobile-menu a.is-active:not(.btn) { background: var(--blue-50); color: var(--blue); }
  .mobile-menu hr { margin: 12px 0; }
  .mobile-menu .btn + .btn { margin-top: 4px; }
  .site-header--dark .nav-toggle { color: #fff; border-color: rgba(255,255,255,.25); background: transparent; }}

/* dropdown (details) */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }

/* ------------------------------------------------------------------ footer */
/* Spazio in fondo: l'ultima riga resta sopra il pulsante «torna su» (48px a 20–28px dal bordo). */
.site-footer { background: var(--navy-900); color: #94A3B8; padding: 64px 0 calc(92px + env(safe-area-inset-bottom)); font-size: 14px; }
.site-footer a { color: #CBD5E1; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid h2, .footer-grid h4 { color: #fff; font-size: 14px; margin-bottom: 14px; letter-spacing: -.005em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
/* Touch: link del footer alti 44px (area di tocco), senza cambiare l'aspetto. */
@media (pointer: coarse) { .footer-grid ul { gap: 0; } .footer-grid ul a { display: inline-flex; align-items: center; min-height: 44px; } .footer-grid h2 { margin-bottom: 4px; }}
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.footer-trust { display: inline-flex; align-items: flex-start; gap: 7px; }
.footer-trust .ico { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.footer-principle { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); color: #CBD5E1; font-size: 13.5px; }
/* «Scarica l'app»: pulsanti nello stile del sito (non i badge ufficiali degli store); disattivati se lo store non è ancora configurato. */
.footer-app { margin-top: 22px; }
.footer-app h2 { color: #fff; font-size: 14px; margin-bottom: 10px; letter-spacing: -.005em; }
/* .footer-grid ul impila i link in colonna: i pulsanti degli store restano in riga (anche su touch). */
.footer-grid .store-btns { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; }
.site-footer .store-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; min-width: 164px; padding: 7px 16px 7px 13px; border-radius: 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); color: #fff; text-decoration: none; transition: background .15s ease, border-color .15s ease; }
.site-footer a.store-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.34); color: #fff; }
.store-btn .ico { width: 22px; height: 22px; flex: none; }
.store-btn > span { display: flex; flex-direction: column; line-height: 1.2; }
.store-btn small { font-size: 11px; color: #94A3B8; letter-spacing: .02em; }
.store-btn b { font-size: 15px; font-weight: 700; }
.site-footer .store-btn.is-disabled { opacity: .62; cursor: default; border-style: dashed; }
@media (max-width: 560px) { .store-btns li { flex: 1 1 150px; } .site-footer .store-btn { width: 100%; min-width: 0; }}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; }}
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; }}

/* ------------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; background: var(--grad-hero); color: #CBD5E1; padding: calc(var(--header-h) + 64px) 0 72px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 70%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.hero h1 { color: #fff; margin: 22px 0 22px; }
.hero .lead { max-width: 560px; }
.hero-visual { position: relative; min-height: 520px; }
@media (max-width: 1000px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero-visual { min-height: 0; }}

.search-bar { display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 18px; background: #fff; border-radius: 16px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.6), 0 0 0 6px rgba(255,255,255,.08); max-width: 600px; }
.search-bar .ico { color: var(--slate-400); width: 20px; height: 20px; }
.search-bar input { border: 0 !important; box-shadow: none !important; min-height: 46px !important; padding: 8px 4px !important; font-size: 16px !important; flex: 1; min-width: 0; background: transparent !important; text-overflow: ellipsis; }
.search-bar .btn { min-height: 48px; padding: 0 24px; border-radius: 12px; }
.search-bar--light { box-shadow: var(--shadow); border: 1px solid var(--border); max-width: none; }
/* Su schermi stretti resta solo l'icona: il testo «Cerca» è nascosto visivamente ma resta il nome accessibile. */
@media (max-width: 520px) { .search-bar .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; } .search-bar .btn { padding: 0 16px; min-width: 52px; }}
.hero-chips { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-stats { margin-top: 44px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; max-width: 640px; }
.hero-stat { display: flex; align-items: center; gap: 12px; }
.hero-stat-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(37,99,235,.18); color: #60A5FA; border: 1px solid rgba(96,165,250,.25); flex: none; }
.hero-stat b { display: block; color: #fff; font-size: 19px; letter-spacing: -.02em; line-height: 1.1; }
.hero-stat span { font-size: 12.5px; color: #94A3B8; }
@media (max-width: 640px) { .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }}

.float-card { position: absolute; padding: 18px 20px; border-radius: 20px; background: linear-gradient(160deg, rgba(37,99,235,.22), rgba(15,23,42,.55)); border: 1px solid rgba(147,197,253,.22); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: #fff; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); animation: float 7s ease-in-out infinite; }
.float-card .ico { width: 30px; height: 30px; color: #60A5FA; margin-bottom: 10px; }
.float-card b { display: block; font-size: 15.5px; line-height: 1.25; }
.float-card span { font-size: 12px; color: #94A3B8; }
.float-card--violet { background: linear-gradient(160deg, rgba(139,92,246,.30), rgba(15,23,42,.55)); border-color: rgba(196,181,253,.25); }
.float-card--violet .ico { color: #C4B5FD; }
.float-card--white { background: rgba(255,255,255,.96); color: var(--navy); border-color: #fff; }
.float-card--white span { color: var(--text-3); }
.float-card--white .ico { color: var(--blue); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-10px) rotate(var(--r, 0deg)); } }

/* ------------------------------------------------------------------ step / feature */
.feature { padding: 28px 24px; text-align: center; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--border); transition: transform .2s var(--ease), box-shadow .2s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; color: #fff; background: var(--blue); box-shadow: var(--shadow-blue); }
.feature-icon .ico { width: 26px; height: 26px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--text-3); }
.icon-box { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--blue-50); color: var(--blue); }
.icon-box .ico { width: 22px; height: 22px; }
.icon-box-violet { background: var(--violet-50); color: var(--violet-600); }
.icon-box-cyan { background: var(--cyan-50); color: #0891B2; }
.icon-box-green { background: var(--green-50); color: var(--green); }
.icon-box-amber { background: var(--amber-50); color: var(--amber); }
.icon-box-red { background: var(--red-50); color: var(--red); }
.icon-box-lg { width: 56px; height: 56px; border-radius: 16px; }
.icon-box-lg .ico { width: 26px; height: 26px; }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/13px no-repeat; }
.checklist-sm li { font-size: 14px; gap: 10px; }
.checklist-sm li::before { width: 18px; height: 18px; background-size: 11px; }

/* categorie */
.cat-card { display: flex; gap: 14px; align-items: center; padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--navy); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue-100); color: var(--navy); }
.cat-card b { display: block; font-size: 15px; line-height: 1.3; }
.cat-card b + span { display: block; font-size: 13px; color: var(--text-3); }

/* ------------------------------------------------------------------ ricerca */
.page-hero { padding: 36px 0 28px; background: #fff; border-bottom: 1px solid var(--border); }
.page-hero h1 { margin-bottom: 6px; font-size: clamp(26px, 3.2vw, 36px); }
.search-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; align-items: start; padding: 28px 0 64px; }
@media (max-width: 1000px) { .search-layout { grid-template-columns: minmax(0, 1fr); }}
.filters { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; scrollbar-width: thin; }
@media (max-width: 1000px) { .filters { position: static; max-height: none; display: none; } .filters.is-open { display: block; }}
.filter-group { padding: 16px 0; border-bottom: 1px solid var(--border); }
.filter-group:first-child { padding-top: 0; }
.filter-group:last-child { border-bottom: 0; }
.filter-group h4 { font-size: 13.5px; margin-bottom: 10px; }
.filter-cats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.filter-cats a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--text-2); font-size: 14px; font-weight: 600; }
.filter-cats a:hover { background: var(--slate-100); color: var(--navy); }
.filter-cats a.is-active { background: var(--blue-50); color: var(--blue); }
.filter-cats .ico { color: var(--slate-400); }
.filter-cats a.is-active .ico { color: var(--blue); }
.filter-cats .n { margin-left: auto; font-size: 12px; color: var(--slate-400); font-weight: 600; }
.filter-cats ul { list-style: none; padding: 2px 0 6px 30px; margin: 0; }
.filter-cats ul a { font-size: 13.5px; padding: 5px 10px; font-weight: 500; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-bar select { width: auto; min-height: 38px; padding: 6px 34px 6px 12px; font-size: 13.5px; border-radius: 10px; background-position: right 10px center; font-weight: 600; color: var(--text-2); }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.results-head .count-label { font-size: 14px; color: var(--text-3); }
.results-list { display: flex; flex-direction: column; gap: 14px; }

.featured-zone { border-radius: var(--radius-lg); padding: 14px; margin-bottom: 22px; background: linear-gradient(135deg, rgba(37,99,235,.06), rgba(139,92,246,.07)); border: 1px dashed rgba(99,102,241,.35); }
.featured-zone-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 0 4px 12px; flex-wrap: wrap; }
.featured-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; color: var(--violet-600); text-transform: uppercase; letter-spacing: .08em; }
.featured-note { font-size: 12.5px; color: var(--text-3); }

.result-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) 240px; gap: 18px; padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); transition: box-shadow .2s var(--ease), border-color .2s, transform .2s var(--ease); }
.result-card:hover { box-shadow: var(--shadow); border-color: var(--slate-300); }
.result-card .ribbon { position: absolute; top: -9px; left: 18px; z-index: 3; }
.result-card > .avatar-wrap { align-self: start; }
.result-name { display: flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 700; color: var(--navy); line-height: 1.25; letter-spacing: -.01em; }
.result-name a { color: inherit; }
.result-name a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.result-title { color: var(--text-2); font-size: 14px; font-weight: 500; }
.result-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--text-3); align-items: center; }
.result-meta .ico { color: var(--slate-400); }
.result-body .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.result-media { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; height: 132px; overflow: hidden; }
.result-media img, .result-media .ph { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; background: var(--slate-100); }
.result-media img:first-child, .result-media .ph:first-child { grid-row: span 2; }
.result-media.n1 { grid-template-columns: minmax(0, 1fr); } .result-media.n1 img { grid-row: span 2; }
.result-media.n2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .result-media.n2 img { grid-row: span 2; }
.result-actions { position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; gap: 6px; }
.save-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--slate); display: grid; place-items: center; transition: all .15s; }
.save-btn:hover, .save-btn.is-saved { color: #E11D48; border-color: #FECDD3; background: #FFF1F2; }
.save-btn.is-saved .ico { fill: currentColor; }
.result-card .chip, .result-card a:not(.result-link) { position: relative; z-index: 2; }
@media (max-width: 900px) { .result-card { grid-template-columns: auto minmax(0, 1fr); } .result-media { grid-column: 1 / -1; height: 110px; } .result-name, .result-title { padding-right: 42px; }}
@media (max-width: 520px) { .result-card { padding: 16px; gap: 12px; } .result-card .avatar-md { width: 48px; height: 48px; }}

.interpretation { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--violet-50); border: 1px solid #DDD6FE; color: #4C1D95; font-size: 14px; margin-bottom: 18px; }
.interpretation .ico { color: var(--violet-600); margin-top: 2px; }

/* profili in griglia (card verticali) */
.pro-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); transition: transform .2s var(--ease), box-shadow .2s; }
.pro-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pro-card-head { display: flex; gap: 12px; align-items: center; }

/* empty state */
.empty { text-align: center; padding: 56px 24px; border: 1px dashed var(--slate-300); border-radius: var(--radius-lg); background: #fff; }
.empty .icon-box { margin: 0 auto 16px; width: 64px; height: 64px; border-radius: 50%; }
.empty .icon-box .ico { width: 28px; height: 28px; }
.empty h3 { margin-bottom: 8px; }
.empty p { color: var(--text-3); max-width: 480px; margin: 0 auto 18px; }

/* paginazione */
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--text-2); background: #fff; border: 1px solid var(--border); }
.pagination a:hover { border-color: var(--blue); color: var(--blue); }
.pagination .is-current { background: var(--blue); color: #fff; border-color: var(--blue); }
.pagination .gap { border: 0; background: none; min-width: 20px; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--text-3); margin-bottom: 12px; }
.breadcrumbs a { color: var(--text-3); font-weight: 600; }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs .ico { width: 14px; height: 14px; color: var(--slate-300); }

/* ------------------------------------------------------------------ profilo pubblico */
.profile-cover { height: 220px; background: var(--grad-hero); position: relative; overflow: hidden; }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(15,23,42,.35)); }
.profile-head { position: relative; margin-top: -76px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow); padding: 24px 28px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; z-index: 2; }
.profile-head h1 { font-size: clamp(24px, 3vw, 32px); margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-head .headline { font-size: 16px; color: var(--text-2); font-weight: 600; margin: 4px 0 8px; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 900px) { .profile-head { grid-template-columns: minmax(0, 1fr); text-align: left; margin-top: -60px; padding: 20px; } .profile-head .avatar-xl { width: 110px; height: 110px; margin-top: -70px; } .profile-actions { justify-content: flex-start; }}
.profile-tabs { position: sticky; top: var(--header-h); z-index: 20; background: rgba(248,250,252,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); margin: 24px 0 28px; }
.profile-tabs nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.profile-tabs a { padding: 14px 14px; font-weight: 700; font-size: 14.5px; color: var(--text-3); border-bottom: 2px solid transparent; white-space: nowrap; }
.profile-tabs a:hover, .profile-tabs a.is-active { color: var(--blue); border-bottom-color: var(--blue); }
.profile-section { scroll-margin-top: calc(var(--header-h) + 70px); }
.info-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--text-2); }
.info-list li { display: flex; gap: 10px; align-items: flex-start; }
.info-list .ico { color: var(--slate-400); margin-top: 2px; }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.portfolio-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; color: var(--text); transition: transform .2s var(--ease), box-shadow .2s; }
.portfolio-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.portfolio-card .thumb { aspect-ratio: 16 / 10; background: var(--slate-100); overflow: hidden; position: relative; }
.portfolio-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.portfolio-card:hover .thumb img { transform: scale(1.04); }
.portfolio-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.portfolio-card h4 { margin: 0; font-size: 15px; }
.thumb-ph { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; background: var(--grad-brand); }
.thumb-ph .ico { width: 34px; height: 34px; opacity: .8; }

/* Skill DNA */
.skill-dna { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 28px; }
.skill-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.skill-row .name { font-weight: 700; font-size: 14px; color: var(--navy); }
.skill-level { display: inline-flex; gap: 4px; }
.skill-level i { width: 22px; height: 7px; border-radius: 4px; background: var(--slate-200); }
.skill-level i.on { background: var(--grad-brand); }
.skill-row .meta { grid-column: 1 / -1; font-size: 12px; color: var(--text-3); }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 22px 28px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: -4px; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); }
.timeline h4 { margin: 0 0 2px; font-size: 15px; }
.testimonial { padding: 20px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--border); }
.testimonial blockquote { background: none; border: 0; padding: 0; margin: 0 0 14px; color: var(--text); font-size: 15px; }
.declared-note { font-size: 12px; color: var(--text-3); display: inline-flex; gap: 6px; align-items: center; }
.qr-box { display: inline-block; padding: 10px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); }
.qr-box svg { width: 160px; height: 160px; }

/* ------------------------------------------------------------------ app shell (area riservata / admin) */
.app-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: var(--slate-50); }
.app-sidebar { background: var(--navy-900); color: #94A3B8; padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #334155 transparent; }
.app-sidebar .brand { padding: 4px 8px; }
.app-nav { display: flex; flex-direction: column; gap: 2px; }
.app-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #A5B4CB; font-weight: 600; font-size: 14px; transition: background .15s, color .15s; }
.app-nav a .ico { width: 18px; height: 18px; color: #64748B; transition: color .15s; }
.app-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.app-nav a:hover .ico { color: #CBD5E1; }
.app-nav a.is-active { background: linear-gradient(90deg, rgba(37,99,235,.95), rgba(37,99,235,.75)); color: #fff; box-shadow: 0 8px 20px -10px rgba(37,99,235,.8); }
.app-nav a.is-active .ico { color: #fff; }
.app-nav .count { margin-left: auto; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-topbar { height: 68px; display: flex; align-items: center; gap: 14px; padding: 0 28px; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head > :first-child { flex: 1 1 340px; min-width: 0; }
/* Azioni a destra, centrate sulla riga del titolo; se non ci stanno vanno a capo su una riga propria. */
.page-head > :last-child:not(:first-child) { flex: 0 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 44px; margin-top: -5px; }
@media (max-width: 640px) { .page-head > :last-child:not(:first-child) { margin-top: -8px; }}
.page-head h1 { font-size: 28px; line-height: 1.2; margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--text-3); }
.app-burger { display: none; }
@media (max-width: 1000px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .app-sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 80; transform: translateX(-100%); transition: transform .25s var(--ease); }
  .app-sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .app-burger { display: inline-flex; }
  .app-topbar { padding: 0 16px; }}
.backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 70; display: none; }
.backdrop.is-open { display: block; }

/* ------------------------------------------------------------------ app shell su smartphone e tablet
   --app-bottom: spazio occupato in basso dalla barra di navigazione (0 su desktop); lo usano contenuto,
   barre di salvataggio fisse e toast (--sticky-cta-h, vedi «Mobile e touch»). */
.app-body { --topbar-h: 68px; --bnav-h: 0px; --app-bottom: 0px; }
.app-sidebar :focus-visible { outline-color: rgba(147,197,253,.85); }
.app-topbar-title { display: none; }
.app-bottomnav { display: none; }
@media (max-width: 1000px) {
  .app-body { --topbar-h: 60px; }
  .app-topbar { height: calc(var(--topbar-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); gap: 8px; }
  .app-topbar-title { display: block; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: var(--navy); }
  .app-topbar.title-on-scroll .app-topbar-title { opacity: 0; transform: translateY(6px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
  .app-topbar.title-on-scroll.is-titled .app-topbar-title { opacity: 1; transform: none; }
  .app-topbar > :not(.app-topbar-title) { flex: none; }
  .app-topbar .dropdown > summary { min-height: 44px; display: flex; align-items: center; flex-wrap: nowrap; }
  /* Menu a scomparsa: fuori dall'albero di accessibilità quando è chiuso, scorrevole, rispetta notch e barra home. */
  .app-sidebar { width: min(300px, 86vw); padding: max(16px, env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); gap: 18px; visibility: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; transition: transform .25s var(--ease), visibility 0s linear .25s; }
  .app-sidebar.is-open { visibility: visible; transition-delay: 0s; }
  .app-nav a { min-height: 44px; }
  .app-shell > .backdrop { display: block; opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility 0s linear .25s; -webkit-tap-highlight-color: transparent; }
  .app-shell > .backdrop.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }}
html.drawer-lock, html.drawer-lock body { overflow: hidden; }
/* Barra di navigazione inferiore (professionisti e clienti): non su desktop né con il telefono in orizzontale. */
@media (max-width: 1000px) and (min-height: 501px) {
  .app-bottomnav { display: grid; grid-template-columns: repeat(5, minmax(0, 112px)); justify-content: space-around; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); background: rgba(255,255,255,.96);
    backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-top: 1px solid var(--border); box-shadow: 0 -10px 30px -18px rgba(15,23,42,.3); }
  .app-bottomnav a, .app-bottomnav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; height: var(--bnav-h); padding: 6px 2px 5px; margin: 0;
    background: none; border: 0; border-radius: 0; color: var(--text-3); font: inherit; font-size: 11.5px; font-weight: 700; line-height: 1.15; letter-spacing: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .app-bottomnav a:hover, .app-bottomnav button:hover { color: var(--navy); }
  .app-bottomnav .ico { width: 22px; height: 22px; }
  .app-bottomnav .is-active { color: var(--blue-600); }
  .app-bottomnav .count { position: absolute; top: -3px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; line-height: 18px; box-shadow: 0 0 0 2px #fff; }
  .app-bottomnav :focus-visible { outline-offset: -3px; border-radius: 12px; }}
@media print { .app-bottomnav { display: none !important; }}
/* Tastiera aperta su touch (app.js aggiunge html.is-typing): la barra in basso si toglie di mezzo. */
@media (max-width: 1000px) and (pointer: coarse) {
  html.is-typing .app-bottomnav { display: none; }}
/* Barra di salvataggio dei moduli lunghi: sempre raggiungibile in fondo allo schermo, sopra la navigazione
   inferiore e la barra home. .save-bar = sempre fissa; .save-bar-mobile = fissa solo sotto i 1000px
   (piè di scheda e procedura guidata, che su desktop restano al loro posto). */
.app-body { --app-bottom-safe: max(var(--app-bottom), env(safe-area-inset-bottom)); }
/* Campo a fuoco o primo errore: mai nascosto sotto la topbar o sotto barre fisse in basso. */
.app-body input, .app-body select, .app-body textarea, .app-body .check, .app-body .choice, .app-body .field-error { scroll-margin-top: calc(var(--topbar-h) + 24px); scroll-margin-bottom: calc(var(--app-bottom) + 96px); }

/* Aree di tocco ≥ 44 px nell'area riservata con puntatore touch (stessa regola di .pub per il sito pubblico). */
@media (pointer: coarse) {
  .app-body .btn-sm, .app-body .btn-xs { min-height: 44px; }
  .app-body .btn-icon.btn-sm, .app-body .btn-icon.btn-xs { width: 44px; min-width: 44px; }
  .app-body a.chip, .app-body button.chip { min-height: 44px; }
  .app-body .chip-remove { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; font-size: 18px; }
  .app-body .link-btn { min-height: 44px; display: inline-flex; align-items: center; }
  .app-body .tabs a, .app-body .tabs button { min-height: 48px; display: inline-flex; align-items: center; }
  .app-body .segmented label, .app-body .segmented a, .app-body .segmented button { min-height: 44px; }
  .app-body .switch input { margin-block: 9px; }
  .app-body .breadcrumbs a, .app-body a.link-arrow, .app-body .url-box a { display: inline-flex; align-items: center; min-height: 44px; }
  .app-body details > summary.xs, .app-body details > summary.small { display: flex; align-items: center; min-height: 44px; }
  .app-body .pagination a, .app-body .pagination span { min-width: 44px; height: 44px; }
  .app-body .save-btn { width: 44px; height: 44px; }
  /* Campi compatti con !important nei CSS di modulo: anche loro a 16px su touch (niente zoom di iOS). */
  .app-body :is(.filter-form, .skill-item, .search-inline, .cl-item-side, .copy-field, .cl-share-box) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea), .app-body select.cl-inline-select { font-size: 16px !important; }
  .app-body .check:has(> input) { min-height: 44px; }
  .app-body :is(.check-list, .check-grid) > .check:has(> input) { align-items: center; }
  .app-body :is(.check-list, .check-grid) > .check:has(> input) > input { margin-top: 0; }}
@media (hover: none) {
  .app-body .app-nav a:hover:not(.is-active) { background: none; color: #A5B4CB; }}

/* chart SVG */
.chart-box { --chart-h: 210px; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; padding: 8px 0 26px; font-family: var(--font); font-size: 11.5px; line-height: 1; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chart-y { position: relative; height: var(--chart-h); }
.chart-y span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.chart-plot { position: relative; height: var(--chart-h); min-width: 0; }
.chart-x { position: absolute; left: 0; right: 0; top: calc(100% + 10px); }
.chart-x span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.chart-x span:last-child:not(:first-child) { transform: translateX(-100%); }
.chart { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; }
.chart .grid-line { stroke: var(--slate-200); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .line-2 { stroke: var(--violet); stroke-dasharray: 5 5; }
.chart .area { opacity: .9; }
.chart .pt line { stroke: var(--blue); stroke-width: 10; stroke-linecap: round; }
.chart .pt .pt-in { stroke: #fff; stroke-width: 5; }
.chart .pt { opacity: 0; transition: opacity .15s; pointer-events: none; }
.chart .hit:hover + .pt, .chart .hit.is-on + .pt { opacity: 1; }
.chart-plot { touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
@media (max-width: 640px) { .chart-box { --chart-h: 150px !important; font-size: 11px; column-gap: 8px; } .chart-x .alt { display: none; }}
.chart .bar { fill: var(--blue); rx: 4; }
.chart-tip { position: fixed; z-index: 100; pointer-events: none; background: var(--navy); color: #fff; padding: 8px 10px; border-radius: 10px; font-size: 12px; box-shadow: var(--shadow); transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; }

/* progress e completezza */
.progress { height: 8px; border-radius: 999px; background: var(--slate-200); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--grad-brand); }
.ring { --p: 0; --size: 96px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--blue) calc(var(--p) * 1%), var(--slate-200) 0); position: relative; flex: none; }
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.ring b { position: relative; font-size: 22px; color: var(--navy); letter-spacing: -.02em; }

/* tabelle */
.table-wrap { position: relative; width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.table { width: 100%; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 700; padding: 12px 16px; background: var(--slate-50); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--slate-100); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FBFDFF; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
/* Tabelle che scorrono in orizzontale (area riservata e admin): ombre ai bordi dove c'è altro contenuto
   e, su schermi stretti, prima colonna fissa. app.js aggiunge .is-overflowing / .is-scrolled al contenitore. */
.table-wrap { overscroll-behavior-x: contain; scrollbar-width: thin;
  background: linear-gradient(90deg, #fff 30%, rgba(255,255,255,0)) left center / 40px 100% no-repeat local,
    linear-gradient(270deg, #fff 30%, rgba(255,255,255,0)) right center / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(15,23,42,.14), rgba(15,23,42,0)) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(15,23,42,.14), rgba(15,23,42,0)) right center / 12px 100% no-repeat scroll, #fff; }
.table-wrap .table td { background-clip: padding-box; }
@media (max-width: 760px) {
  .table-wrap.is-overflowing .table:not(.table-stack) :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: #fff; transition: box-shadow .2s; }
  .table-wrap.is-scrolled .table:not(.table-stack) :is(th, td):first-child { box-shadow: 8px 0 10px -8px rgba(15,23,42,.25); }}
/* Tabelle che su smartphone diventano schede impilate: <table class="table table-stack">, <td data-label="…">.
   Etichetta a sinistra e valore a destra; la cella senza etichetta (titolo, azioni) occupa tutta la riga. */
@media (max-width: 760px) {
  .table-stack tr :is(a:not(.cell-main), button, input, select, summary, form, label) { position: relative; z-index: 1; }}

/* liste */
.list { list-style: none; padding: 0; margin: 0; }
.list > li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--slate-100); }
.list > li:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--text-3); font-weight: 600; }
.kv dd { margin: 0; color: var(--text); }
@media (max-width: 640px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 10px; }}

/* ------------------------------------------------------------------ alert / toast */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); font-size: 14px; border: 1px solid; line-height: 1.5; }
.alert .ico { margin-top: 2px; width: 18px; height: 18px; }
.alert-info { background: var(--blue-50); border-color: var(--blue-100); color: #1E3A8A; }
.alert a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; } /* link riconoscibili nel testo */
.alert-success { background: var(--green-50); border-color: var(--green-100); color: #14532D; }
.alert-warning { background: var(--amber-50); border-color: #FDE68A; color: #78350F; }
.alert-danger, .alert-error { background: var(--red-50); border-color: #FECACA; color: #7F1D1D; }
.alert-neutral { background: var(--slate-50); border-color: var(--border); color: var(--text-2); }
.toast-stack { position: fixed; top: 84px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); }
.toast { box-shadow: var(--shadow-lg); animation: toast-in .35s var(--ease); background-color: #fff; }
.toast.is-leaving { animation: toast-out .3s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }
.toast-close { margin: -7px -8px -7px auto; background: none; border: 0; color: inherit; opacity: .55; padding: 8px; display: inline-flex; border-radius: 8px; flex: none; }
.toast-close .ico { margin: 0; }
.toast-close:hover { opacity: 1; }

/* ------------------------------------------------------------------ modal (dialog) */
dialog.modal { border: 0; padding: 0; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); color: var(--text); background: #fff; }
dialog.modal::backdrop { background: rgba(15,23,42,.55); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: modal-in .25s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 24px 0; }
.modal-head h2, .modal-head h3 { margin: 0; font-size: 20px; }
.modal-body { padding: 18px 24px 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
/* Finestra di conferma (data-confirm, app.js): a foglio dal basso su smartphone, pulsanti a tutta larghezza. */
dialog.modal-confirm { width: min(440px, calc(100vw - 24px)); }
.modal-confirm-body { display: flex; gap: 14px; align-items: flex-start; padding: 24px 24px 20px; }
.modal-confirm-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--blue-50); color: var(--blue); }
.modal-confirm-icon .ico { width: 22px; height: 22px; }
.modal-confirm.is-danger .modal-confirm-icon { background: var(--red-50); color: #B91C1C; }
.modal-confirm-text { min-width: 0; padding-top: 2px; }
.modal-confirm-text h2 { font-size: 18px; line-height: 1.35; margin: 0; letter-spacing: -.01em; overflow-wrap: anywhere; }
.modal-confirm-text p { margin: 6px 0 0; font-size: 14.5px; color: var(--text-2); }
.modal-confirm .modal-foot { border-top: 0; padding-top: 0; }
.modal-confirm .modal-foot .btn { min-width: 112px; }
@media (max-width: 640px) {
  dialog.modal-confirm { width: 100%; max-width: none; margin: auto 0 0; border-radius: 22px 22px 0 0; animation: sheet-in .28s var(--ease); }
  .modal-confirm-body { padding: 26px max(20px, env(safe-area-inset-right)) 18px max(20px, env(safe-area-inset-left)); }
  .modal-confirm .modal-foot { flex-direction: column-reverse; gap: 10px; padding: 0 max(20px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
  .modal-confirm .modal-foot .btn { width: 100%; min-height: 50px; }}
@keyframes sheet-in { from { transform: translateY(40px); opacity: .6; } }

/* Campo file dell'area riservata (app.js): pulsante grande, nome del file e miniature delle immagini scelte. */
.file-pick { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.file-pick > input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.file-pick-btn { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; padding: 10px 12px; min-height: 58px; border: 1.5px dashed var(--slate-300); border-radius: 14px; background: var(--slate-50); cursor: pointer; font-weight: 500; transition: border-color .15s, background .15s; }
.file-pick-btn:hover, .file-pick:focus-within .file-pick-btn { border-color: var(--blue); background: var(--blue-50); }
.file-pick:focus-within .file-pick-btn { box-shadow: var(--ring); }
.file-pick-cta { pointer-events: none; flex: none; }
.file-pick-name { min-width: 0; flex: 1 1 140px; font-size: 13.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-pick.has-file .file-pick-name { color: var(--navy); font-weight: 600; }
.file-pick:has(input[aria-invalid=true]) .file-pick-btn { border-color: var(--red); }
.file-pick-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.file-pick-thumbs img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

/* ------------------------------------------------------------------ tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 12px; overscroll-behavior-x: contain; }
.tabs::-webkit-scrollbar { display: none; }
.tabs > * { scroll-snap-align: start; flex: none; }
/* Schede che scorrono in orizzontale: sfumatura sul lato dove c'è altro contenuto (classi da app.js). */
.tabs.is-scroll-end { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.tabs.is-scroll-start { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
.tabs.is-scroll-start.is-scroll-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
.tabs a, .tabs button { padding: 11px 14px; background: none; border: 0; border-bottom: 2px solid transparent; font-weight: 700; font-size: 14px; color: var(--text-3); white-space: nowrap; margin-bottom: -1px; }
.tabs a:hover, .tabs button:hover { color: var(--navy); }
.tabs .is-active, .tabs [aria-selected=true] { color: var(--blue); border-bottom-color: var(--blue); }
.segmented { display: inline-flex; padding: 4px; gap: 4px; background: var(--slate-100); border-radius: 14px; flex-wrap: wrap; }
.segmented label, .segmented a, .segmented button { margin: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 16px; border-radius: 11px; font-weight: 700; font-size: 13.5px; color: var(--text-2); cursor: pointer; background: none; border: 0; line-height: 1.2; min-width: 96px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:hover, .segmented a:hover, .segmented button:hover { color: var(--navy); background: rgba(255,255,255,.7); }
.segmented label:has(input:focus-visible) { outline: 3px solid rgba(37,99,235,.35); outline-offset: 2px; }
.segmented label:has(input:checked), .segmented .is-active { background: var(--blue); color: #fff; box-shadow: var(--shadow-blue); }
.segmented .save { font-size: 11px; font-weight: 700; color: var(--violet-600); background: var(--violet-50); border-radius: 6px; padding: 1px 6px; margin-top: 4px; }
.segmented label:has(input:checked) .save, .segmented .is-active .save { background: rgba(255,255,255,.2); color: #fff; }

/* ------------------------------------------------------------------ piani e prezzi */
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
@media (max-width: 960px) { .plan-grid { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; }}
.plan-card { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 28px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); }
.plan-card--pro { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad-brand) border-box; box-shadow: 0 30px 60px -30px rgba(37,99,235,.45); }
.plan-card--boost { background: linear-gradient(180deg, #F5F3FF, #fff); border-color: #DDD6FE; }
.plan-card .plan-name { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--navy); }
.plan-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); }
.price { display: flex; align-items: baseline; gap: 6px; color: var(--navy); }
.price b { font-size: 42px; letter-spacing: -.04em; font-weight: 700; line-height: 1; }
.price span { color: var(--text-3); font-weight: 600; font-size: 14px; }
.price-note { font-size: 13px; color: var(--text-3); min-height: 20px; }
.pay-methods { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--text-3); font-size: 12.5px; }
.pay-mark { font-weight: 700; font-size: 17px; letter-spacing: -.02em; font-style: italic; }
.pay-mark.paypal { color: #003087; } .pay-mark.paypal span { color: #0070E0; }
.pay-mark.stripe { color: #635BFF; font-style: normal; }

/* ------------------------------------------------------------------ varie */
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; font-size: 12px; font-weight: 500; line-height: 1.4; padding: 7px 10px; border-radius: 8px; width: max-content; max-width: 260px; white-space: normal; z-index: 90; text-align: left; letter-spacing: 0; text-transform: none; }
@keyframes shimmer { to { background-position: -200% 0; } }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: var(--grad-hero); color: #CBD5E1; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side h2 { color: #fff; font-size: clamp(26px, 3vw, 38px); }
.auth-side .eyebrow { color: #93C5FD; background: rgba(59,130,246,.10); border-color: rgba(96,165,250,.35); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.auth-box { width: 100%; max-width: 440px; }
.auth-box h1 { font-size: 30px; margin-bottom: 6px; }
.auth-box .segmented { flex-wrap: nowrap; }
.auth-box .segmented label { flex: 1 1 0; min-width: 0; text-align: center; }
@media (max-width: 480px) { .auth-box .segmented label { padding: 10px 6px; font-size: 13px; }}
@media (max-width: 900px) { .auth-wrap { grid-template-columns: minmax(0, 1fr); } .auth-side { display: none; }}
.anchor-offset { scroll-margin-top: calc(var(--header-h) + 24px); }
.legal-note { font-size: 12.5px; color: var(--text-3); }
.mono { font-family: var(--mono); }
.text-blue { color: var(--blue); } .text-green { color: #15803D; } .text-red { color: var(--red); } .text-white { color: #fff; }
.w-full { width: 100%; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .justify-center { justify-content: center; } .grow { flex: 1; min-width: 0; } .wrap { flex-wrap: wrap; } .gap-sm { gap: 10px; } .gap { gap: 16px; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 24px; } .mt-5 { margin-top: 36px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; } .mb-4 { margin-bottom: 24px; } .mb-5 { margin-bottom: 36px; }
.hidden, [hidden] { display: none !important; }
@media (max-width: 640px) { .hide-sm { display: none !important; }}
@media (min-width: 1001px) { .show-md { display: none !important; }}
@media print { .site-header, .site-footer, .app-sidebar, .app-topbar, .profile-tabs, .btn, .toast-stack, .back-to-top { display: none !important; } body { background: #fff; }}

/* ------------------------------------------------------------------ torna su (sito pubblico) */
/* Sotto header (50), menu mobile (49), annuncio flottante (60), toast (200) e dialog (top layer). */
.back-to-top {
  position: fixed; z-index: 45; right: max(20px, calc(env(safe-area-inset-right) + 12px));
  bottom: calc(20px + env(safe-area-inset-bottom) + var(--btt-offset, 0px));
  width: 48px; height: 48px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--navy); border: 1px solid var(--border); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(.96);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s, background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.back-to-top:hover { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: var(--shadow-blue); }
.back-to-top:active { transform: scale(.96); }
.back-to-top:focus-visible { outline: 3px solid rgba(37,99,235,.55); outline-offset: 3px; border-radius: 50%; }
.back-to-top .ico { width: 20px; height: 20px; }
@media (min-width: 1001px) { .back-to-top { right: max(28px, calc(env(safe-area-inset-right) + 12px)); bottom: calc(28px + env(safe-area-inset-bottom) + var(--btt-offset, 0px)); }}
#main:focus { outline: none; }
.app-topbar .btn { position: relative; }

.hero .lead { color: #CBD5E1; }
.announce { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 10px 16px; font-size: 14px; font-weight: 600; text-align: center; background: var(--blue-50); color: #1E3A8A; border-bottom: 1px solid var(--blue-100); }
.announce-warning { background: var(--amber-50); color: #78350F; border-bottom-color: #FDE68A; }
.announce-float { position: fixed; z-index: 60; bottom: 16px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); border-radius: 999px; border: 1px solid var(--blue-100); box-shadow: var(--shadow-lg); }
@media (min-width: 901px) { .result-card .result-media { margin-right: 46px; }}
.table-wrap { max-width: 100%; }
.flex > .stack, .cluster > .stack { min-width: 0; }
input[type=file] { width: 100%; min-width: 0; }
@media (max-width: 560px) {
  .table th, .table td { padding: 10px 10px; }}

/* =====================================================================
   Mobile e touch — fondamenta globali (viewport, aree sicure, tastiere, tocco)
   ===================================================================== */

/* Viewport dinamico (dvh/svh): niente salti quando la barra del browser mobile compare o scompare. */
@supports (height: 100dvh) {
  .filters { max-height: calc(100dvh - var(--header-h) - 32px); }
  dialog.modal { max-height: calc(100dvh - 32px); }
  .auth-wrap { min-height: 100svh; }}
dialog.modal { overscroll-behavior: contain; }

/* Aree sicure (notch, angoli arrotondati, barra home) per contenuti a tutta larghezza ed elementi fissi. */
@supports (padding: max(0px)) {
  .container { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
  @media (max-width: 640px) { .container { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }}}
.announce-float { bottom: calc(16px + max(env(safe-area-inset-bottom), var(--sticky-cta-h, 0px))); }
@media (max-width: 1220px) {
  /* Il menu parte sotto l'header reale (anche con la barra annunci sopra) e rispetta notch e barra home. */
  .mobile-menu { top: var(--menu-top, var(--header-h)); padding: 16px max(16px, env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); overscroll-behavior: contain; }
  .mobile-menu a:not(.btn) { display: flex; align-items: center; min-height: 48px; }
  .mobile-menu .btn { flex: none; }
  .nav-toggle.btn-sm { width: 44px; min-width: 44px; min-height: 44px; }}
@media (max-width: 640px) {
  /* Toast in basso, nella zona del pollice, sopra l'eventuale barra d'azione fissa. */
  .toast-stack { top: auto; bottom: calc(12px + max(env(safe-area-inset-bottom), var(--sticky-cta-h, 0px), var(--app-bottom, 0px))); left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); max-width: none; }
  .modal-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }}
@media (pointer: coarse) { .toast-close { min-width: 44px; min-height: 44px; margin: -12px -12px -12px auto; align-items: center; justify-content: center; }}

/* Campi: 16px su touch/mobile (iOS non zooma la pagina al focus); il campo a fuoco non finisce sotto header o barre fisse. */
@media (max-width: 640px), (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=color]),
  select, textarea { font-size: 16px !important; }}
input, select, textarea, .check, .choice { scroll-margin-top: calc(var(--header-h) + 24px); scroll-margin-bottom: 96px; }

/* Aree di tocco ≥ 44×44 px sul sito pubblico (.pub = layout public/auth/minimal) con puntatore touch. */
@media (pointer: coarse) {
  .pub .btn-sm { min-height: 44px; }
  .pub .btn-xs { min-height: 44px; }
  .pub .btn-icon.btn-sm, .pub .btn-icon.btn-xs { width: 44px; min-width: 44px; }
  .pub .save-btn { width: 44px; height: 44px; }
  .pub .pagination { gap: 8px; }
  .pub .pagination a, .pub .pagination span { min-width: 44px; height: 44px; }
  .pub a.chip, .pub button.chip { min-height: 44px; }
  .pub .link-btn { min-height: 44px; display: inline-flex; align-items: center; }
  .pub .breadcrumbs { gap: 0 6px; }
  .pub .breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; }
  .pub .result-name, .pub .result-title { padding-right: 52px; }
  .pub .brand, .pub .link-arrow { min-height: 44px; }
  .pub .tap { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
  .pub .check { padding-top: 11px; padding-bottom: 11px; }
  .pub .check-list { gap: 0; }
  /* Elementi piccoli con tooltip o ancora (badge, icone, pill): area di tocco estesa senza cambiare l'aspetto. */
  .pub [data-tip]:not(.pill)::before, .pub a.pill::after { content: ""; position: absolute; inset: -12px -4px; }
  .pub a.pill { position: relative; }}

/* Dispositivi senza hover: niente sollevamenti «appiccicati» dopo il tocco; i tooltip CSS restano solo per la tastiera
   (al tocco app.js mostra una nuvoletta leggibile e posizionata dentro lo schermo). */
@media (hover: none) {
  .btn:hover, .card-hover:hover, .feature:hover, .cat-card:hover, .pro-card:hover, .portfolio-card:hover, .insight-card:hover, .back-to-top:active { transform: none; }
  .portfolio-card:hover .thumb img, .link-arrow:hover .ico { transform: none; }
  [data-tip]:hover::after { content: none; }
  [data-tip]:focus-visible::after { content: attr(data-tip); }}
.result-card [data-tip], .pro-card [data-tip], .match-card [data-tip] { z-index: 2; }
[data-tip] { -webkit-tap-highlight-color: transparent; }
.tip-bubble { position: fixed; z-index: 210; left: 12px; top: 0; max-width: min(300px, calc(100vw - 24px)); padding: 9px 12px; border-radius: 10px; background: var(--navy); color: #fff; font-size: 13px; font-weight: 500; line-height: 1.45; letter-spacing: 0; text-transform: none; text-align: left; box-shadow: var(--shadow-lg); pointer-events: none; }

/* Barra d'azione fissa in basso (profilo, annuncio) su mobile/tablet: compare quando le azioni principali escono
   dallo schermo e si nasconde quando la sezione di destinazione o il footer sono visibili (public/app.js). */
.sticky-cta { display: none; }
@media (max-width: 1000px) {
  .sticky-cta { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 46; padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: rgba(255,255,255,.95); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-top: 1px solid var(--border); box-shadow: 0 -12px 30px -14px rgba(15,23,42,.22);
    transform: translateY(110%); visibility: hidden; transition: transform .25s var(--ease), visibility 0s linear .25s; }
  .sticky-cta.is-shown { transform: none; visibility: visible; transition-delay: 0s; }
  .sticky-cta-inner { display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 0 auto; }
  .sticky-cta-inner .btn { min-height: 48px; }
  .sticky-cta-inner .btn-icon { width: 48px; min-width: 48px; }
  .sticky-cta-inner .btn-primary { flex: 1 1 auto; min-width: 0; }
  .sticky-cta-text { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 1.3; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sticky-cta-text b { display: block; color: var(--navy); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sticky-cta-text ~ .btn { flex: none; }}
@media (max-width: 1000px) and (prefers-reduced-motion: reduce) { .sticky-cta { transform: none; }}

/* Pannello a scomparsa dal basso (filtri su mobile): .sheet[data-sheet] con .sheet-head, .sheet-body, .sheet-foot.
   Su desktop resta un normale pannello laterale e testata/piede del foglio sono nascosti. */
.sheet-head, .sheet-foot, .sheet-backdrop { display: none; }
@media (max-width: 1000px) {
  .sheet[data-sheet] { position: fixed !important; left: 0; right: 0; bottom: 0; top: auto; z-index: 95; display: flex !important; flex-direction: column;
    max-height: calc(100vh - 16px); margin: 0; padding: 0 !important; background: #fff; border: 0 !important; border-radius: 22px 22px 0 0 !important;
    box-shadow: 0 -20px 60px -10px rgba(15,23,42,.35); overflow: hidden; transform: translateY(100%); visibility: hidden; transition: transform .3s var(--ease), visibility 0s linear .3s; }
  @supports (height: 100dvh) { .sheet[data-sheet] { max-height: calc(100dvh - 16px - env(safe-area-inset-top)); }}
  .sheet[data-sheet].is-open { transform: none; visibility: visible; transition-delay: 0s; }
  .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; padding: 14px max(12px, env(safe-area-inset-right)) 10px max(20px, env(safe-area-inset-left)); border-bottom: 1px solid var(--border); position: relative; }
  .sheet-head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--slate-300); }
  .sheet-head h2 { margin: 0; font-size: 18px; }
  .sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 8px max(20px, env(safe-area-inset-right)) 20px max(20px, env(safe-area-inset-left)); }
  .sheet-foot { display: flex; gap: 10px; flex: none; padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); border-top: 1px solid var(--border); background: #fff; }
  .sheet-foot .btn { min-height: 48px; }
  .sheet-foot [data-sheet-apply] { flex: 1 1 auto; min-width: 0; }
  .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 94; background: rgba(15,23,42,.5); opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility 0s linear .3s; }
  .sheet-backdrop.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
  .sheet .sheet-desktop-only { display: none !important; }
  .sheet .check { min-height: 44px; align-items: center; }
  .sheet .check input { margin-top: 0; }
  .sheet .check-list { gap: 0; }
  .sheet .filter-group:first-child { padding-top: 12px; }}
html.sheet-lock, html.sheet-lock body { overflow: hidden; }

/* Telefono in orizzontale (poca altezza): l'header non resta fisso, così il contenuto ha spazio. */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header:not(.site-header--dark) { position: relative; }
  .site-header--dark.is-scrolled { position: absolute; background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .profile-tabs { top: 0; }
  .profile-section, .anchor-offset { scroll-margin-top: 64px; }
  .sticky-cta { padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  .sticky-cta-inner .btn { min-height: 44px; }
  .sticky-cta-inner .btn-icon { width: 44px; min-width: 44px; }
  input, select, textarea, .check, .choice { scroll-margin-top: 24px; }}
.result-kinds { margin-top: 2px; font-weight: 600; letter-spacing: .01em; }
