/* TrovaOspiti.it — foglio di stile unico, senza build.
   Colori presi dal logo: blu elettrico, viola, inchiostro blu notte. */

@font-face { font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/outfit-latin-ext-wght-normal.woff2") format("woff2");
  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: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/outfit-latin-wght-normal.woff2") format("woff2");
  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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  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; }

:root {
  --ink: #14074a;
  --ink-soft: #3b3068;
  --muted: #6a6390;
  --line: #e5e1f3;
  --line-strong: #cfc8ea;
  --paper: #fbfaff;
  --tint: #f3f0fe;
  --surface: #ffffff;
  --blue: #1a0efd;
  --violet: #7a2bfb;
  --lilac: #b9a8ff;
  --grad: linear-gradient(115deg, #1a0efd 0%, #5a22fc 55%, #7a2bfb 100%);
  --ok: #0b7a55; --ok-bg: #e4f6ee;
  --warn: #8a5200; --warn-bg: #fff3d9;
  --bad: #b3261e; --bad-bg: #fdecea;
  --gold: #8e6b2c; --gold-bg: #f8f0de;
  --radius: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(20, 7, 74, .06);
  --shadow: 0 1px 2px rgba(20, 7, 74, .05), 0 18px 40px -18px rgba(20, 7, 74, .22);
  --shadow-lg: 0 2px 4px rgba(20, 7, 74, .05), 0 40px 80px -30px rgba(26, 14, 253, .32);
  --display: "Outfit", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--violet); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
:focus-visible { outline: 3px solid rgba(26, 14, 253, .35); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Struttura ---------- */
.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.wrap-narrow { width: min(780px, 100% - 2.5rem); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section-tint { background: var(--tint); }
.section-ink { background: var(--ink); color: #fff; }
.section-ink .lead, .section-ink .muted { color: #c9c2ea; }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--display); font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--violet); margin-bottom: 1rem; }
.eyebrow::before { content: ""; width: 1.6rem; height: 2px; background: var(--grad); border-radius: 2px; }
.section-ink .eyebrow { color: var(--lilac); }
.h1 { font-size: clamp(2.5rem, 5.6vw, 4.5rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.02; }
.h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); letter-spacing: -.03em; }
.h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
.h4 { font-size: 1.08rem; letter-spacing: -.01em; }
.lead { font-size: clamp(1.06rem, 1.5vw, 1.24rem); line-height: 1.55; color: var(--ink-soft); max-width: 40rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grid { display: grid; gap: 1.5rem; }
.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)); }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.row-between { justify-content: space-between; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Pulsanti ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.35rem; border-radius: 999px; border: 1px solid transparent; font: 600 .95rem/1.2 var(--display); letter-spacing: .005em; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(58, 24, 252, .7); }
.btn-primary:hover { color: #fff; box-shadow: 0 14px 30px -10px rgba(58, 24, 252, .85); transform: translateY(-1px); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #22107a; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--tint); color: var(--ink); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-outline-light:hover { border-color: #fff; color: #fff; }
.btn-danger { background: #fff; color: var(--bad); border-color: #f1c6c2; }
.btn-danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn-sm { padding: .5rem .9rem; font-size: .84rem; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger { color: var(--bad); }

/* ---------- Intestazione del sito ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 250, 255, .86); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(229, 225, 243, .8); }
.site-header .wrap { display: flex; align-items: center; gap: 2rem; height: 72px; }
.logo img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 1.75rem; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; }
.nav a.btn-ghost:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: .6rem; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; box-shadow: 0 6px 0 var(--ink), 0 -6px 0 var(--ink); }
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: .75rem 1.25rem 1.5rem; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.is-open { display: flex; }
  .nav a { padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-cta { flex-direction: column; align-items: stretch; margin-top: 1rem; }
  .nav-cta a { border: 0; }
}

/* ---------- Piè di pagina ---------- */
.site-footer { background: var(--ink); color: #cfc8ee; padding: 4rem 0 2rem; font-size: .93rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--lilac); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2.5rem; }
.footer-grid h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-logo img { height: 32px; width: auto; margin-bottom: 1.1rem; }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; color: #9d94c9; font-size: .84rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Apertura ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 7vw, 6rem); }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto 45%; height: 130%; background: radial-gradient(closest-side, rgba(122, 43, 251, .20), rgba(26, 14, 253, .08) 55%, transparent 75%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero .lead { margin: 1.5rem 0 2.2rem; }
.hero-note { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; font-size: .9rem; color: var(--muted); }
.hero-note span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-note span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.page-hero { padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff 0%, var(--paper) 100%); }

/* ---------- Calcolatore della ripartizione ---------- */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: clamp(1.4rem, 3vw, 2rem); }
.calc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.25rem; }
.calc-head strong { font: 600 1.05rem var(--display); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--tint); border-radius: 999px; margin-bottom: 1.4rem; }
.seg button { border: 0; background: transparent; padding: .55rem .5rem; border-radius: 999px; font: 600 .82rem var(--display); color: var(--ink-soft); cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.range { display: grid; gap: .35rem; margin-bottom: 1.1rem; }
.range-top { display: flex; justify-content: space-between; font-size: .88rem; color: var(--muted); }
.range-top output { font: 600 1rem var(--display); color: var(--ink); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: var(--line); outline-offset: 6px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 6px solid var(--blue); box-shadow: 0 4px 10px rgba(26, 14, 253, .35); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 6px solid var(--blue); box-shadow: 0 4px 10px rgba(26, 14, 253, .35); cursor: pointer; }
.bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--line); margin: 1.4rem 0 1.1rem; }
.bar span { display: block; transition: width .35s ease; }
.bar .is-host { background: var(--ink); }
.bar .is-ref { background: var(--blue); }
.bar .is-plat { background: var(--violet); }
.bar .is-disc { background: repeating-linear-gradient(135deg, #cfc6ff 0 6px, #e8e3ff 6px 12px); }
.split { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.split li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.split li:last-child { border-bottom: 0; }
.split .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .6rem; vertical-align: baseline; }
.split b { font: 600 1.02rem var(--display); font-variant-numeric: tabular-nums; }
.split .total { margin-top: .5rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--ink); color: #fff; border: 0; }
.split .total b { font-size: 1.5rem; }
.calc-foot { margin: 1rem 0 0; font-size: .84rem; color: var(--muted); }

/* ---------- Schede ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.3rem, 2.4vw, 1.9rem); }
.card-sm { border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.card-lift { box-shadow: var(--shadow); }
.card-ink { background: var(--ink); color: #fff; border-color: transparent; }
.card-ink .muted { color: #bdb4e6; }
.card h3:last-child, .card p:last-child { margin-bottom: 0; }
.card-link { display: block; text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); color: inherit; }
.icon-chip { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--tint); color: var(--blue); margin-bottom: 1.1rem; }
.icon-chip svg { width: 22px; height: 22px; }
.section-ink .icon-chip, .card-ink .icon-chip { background: rgba(255, 255, 255, .1); color: var(--lilac); }
.ticks { list-style: none; padding: 0; margin: 1.1rem 0 0; display: grid; gap: .6rem; }
.ticks li { position: relative; padding-left: 1.75rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .32em; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 8.3l2.4 2.4 5.2-5.4' fill='none' stroke='%231a0efd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.card-ink .ticks li::before, .section-ink .ticks li::before { background-color: rgba(255, 255, 255, .12); filter: brightness(3); }

/* Le due strade */
.road { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.road-num { font: 600 .8rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--violet); margin-bottom: .6rem; }
.road-figure { margin-top: auto; padding-top: 1.75rem; }
.figure-budget { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 1.2rem 1.3rem; border-radius: var(--radius); background: var(--tint); }
.figure-budget .big { font: 600 2.4rem/1 var(--display); letter-spacing: -.03em; }
.figure-budget .arrow { height: 2px; background: linear-gradient(90deg, var(--blue), var(--violet)); position: relative; border-radius: 2px; }
.figure-budget .arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left-color: var(--violet); }
.chart { width: 100%; height: auto; }
.chart text { font-family: var(--body); font-size: 12px; fill: #bdb4e6; }
.chart .val { font: 600 14px var(--display); fill: #fff; }

/* I tre livelli della scheda */
.level { position: relative; }
.level-tag { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font: 700 1.1rem var(--display); background: var(--grad); color: #fff; margin-bottom: 1rem; }
.reveal { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .55rem; font-size: .9rem; }
.reveal li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem .8rem; border-radius: 10px; background: var(--tint); }
.reveal .off { color: var(--muted); background: repeating-linear-gradient(135deg, #f1eefb 0 7px, #e9e5f8 7px 14px); }
.reveal .off i { display: inline-block; width: 4.2rem; height: .6rem; border-radius: 4px; background: var(--line-strong); }
.reveal .on i { display: inline-block; width: 1rem; height: 1rem; border-radius: 50%; background: var(--ok-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 8.3l2.4 2.4 5.2-5.4' fill='none' stroke='%230b7a55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }

/* Passi numerati */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.steps > li { counter-increment: step; position: relative; padding-left: 3.4rem; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; font: 600 .95rem var(--display); color: var(--blue); }
.steps > li strong { display: block; font: 600 1.05rem var(--display); margin-bottom: .15rem; }
.steps-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.steps-row > li { padding: 3.2rem 0 0; }
@media (max-width: 900px) { .steps-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps-row { grid-template-columns: 1fr; } }

/* Tabellone della Borsa */
.board { background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: .6rem; box-shadow: var(--shadow-lg); overflow: hidden; }
.board-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.1rem 1rem; }
.board-head strong { font: 600 1rem var(--display); letter-spacing: .02em; }
.live { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: #bdb4e6; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #37e6a3; box-shadow: 0 0 0 0 rgba(55, 230, 163, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(55, 230, 163, 0); } 100% { box-shadow: 0 0 0 0 rgba(55, 230, 163, 0); } }
.board table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.board th { text-align: left; font: 500 .72rem var(--body); letter-spacing: .1em; text-transform: uppercase; color: #9d94c9; padding: .6rem 1.1rem; }
.board td { padding: .85rem 1.1rem; border-top: 1px solid rgba(255, 255, 255, .09); vertical-align: middle; }
.board td small { display: block; color: #9d94c9; font-size: .8rem; }
.board .up { font: 600 1.15rem var(--display); color: #7df0c3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board .up::before { content: "▲ "; font-size: .6em; vertical-align: middle; }
.board .max { color: #bdb4e6; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board a { color: #fff; }
.board-scroll { overflow-x: auto; }
.board-empty { padding: 2.5rem 1.1rem; text-align: center; color: #bdb4e6; }
@media (prefers-reduced-motion: reduce) { .live::before { animation: none; } html { scroll-behavior: auto; } .btn, .card-link, .bar span { transition: none; } }

/* Fascia di invito finale */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(2.2rem, 5vw, 4rem); background: var(--grad); color: #fff; }
.cta-band::after { content: ""; position: absolute; right: -6rem; top: -8rem; width: 26rem; height: 26rem; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .22), transparent); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band p { color: #e6e0ff; max-width: 36rem; }

/* Domande frequenti */
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; font: 600 1.08rem var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.4rem; line-height: 1; color: var(--blue); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: .8rem 0 0; color: var(--ink-soft); max-width: 46rem; }

/* Testo lungo */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2.4rem; }
.prose h3 { font-size: 1.15rem; margin-top: 1.6rem; }
.prose li { margin-bottom: .4rem; }

/* ---------- Etichette ---------- */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .65rem; border-radius: 999px; font: 600 .76rem/1.4 var(--display); letter-spacing: .02em; background: var(--tint); color: var(--ink-soft); white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: #e7e5ff; color: var(--blue); }
.badge-gold { background: var(--gold-bg); color: var(--gold); }
.badge-ink { background: var(--ink); color: #fff; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { padding: .28rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .82rem; color: var(--ink-soft); }

/* ---------- Moduli ---------- */
.field { display: grid; gap: .35rem; margin-bottom: 1.1rem; align-content: start; }
.label { font: 600 .9rem var(--display); }
.label .opt { font-weight: 400; color: var(--muted); }
.input, .select, .textarea { width: 100%; padding: .72rem .9rem; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--ink); font: 400 1rem/1.4 var(--body); transition: border-color .15s ease, box-shadow .15s ease; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(26, 14, 253, .12); }
.textarea { min-height: 7.5rem; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2314074a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; background-size: 1rem; padding-right: 2.4rem; }
.hint { font-size: .84rem; color: var(--muted); }
.error { font-size: .86rem; color: var(--bad); font-weight: 500; }
.has-error .input, .has-error .select, .has-error .textarea { border-color: var(--bad); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.1rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .form-grid, .form-grid-3 { grid-template-columns: minmax(0, 1fr); } }
.checks { display: flex; flex-wrap: wrap; gap: .5rem; }
.check { position: relative; }
.check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.check span { display: inline-block; padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-size: .88rem; transition: all .15s ease; }
.check input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.check input:focus-visible + span { outline: 3px solid rgba(26, 14, 253, .35); outline-offset: 2px; }
.tick { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .9rem; font-size: .93rem; }
.tick input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--blue); flex: none; }
.fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; }
.fieldset > legend { font: 600 1.15rem var(--display); padding: 0; margin-bottom: .3rem; }
.fieldset > .hint { margin-bottom: 1.1rem; display: block; }
.inline-form { display: inline; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.5rem; }
.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.1rem; }
.choice label { position: relative; display: block; padding: 1rem 1.1rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice label:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(26, 14, 253, .12); }
.choice strong { display: block; font: 600 1rem var(--display); }
.choice small { color: var(--muted); }
@media (max-width: 560px) { .choice { grid-template-columns: 1fr; } }

/* Messaggi */
.flash { padding: .9rem 1.1rem; border-radius: var(--radius); background: var(--ok-bg); color: var(--ok); font-weight: 500; margin-bottom: 1.25rem; border: 1px solid #bfe8d6; }
.flash-info { background: #eceaff; color: var(--ink); border-color: #d6d1ff; }
.flash-warn { background: var(--warn-bg); color: var(--warn); border-color: #f4dfae; }
.flash-bad { background: var(--bad-bg); color: var(--bad); border-color: #f4cdc9; }
.flash ul { margin: 0; padding-left: 1.1rem; }

/* ---------- Accesso e registrazione ---------- */
.auth { min-height: calc(100vh - 72px); display: grid; place-items: start center; padding: clamp(2rem, 6vw, 4.5rem) 1.25rem; background: radial-gradient(60rem 30rem at 80% -10%, rgba(122, 43, 251, .12), transparent 60%), var(--paper); }
.auth-card { width: min(520px, 100%); }
.auth-card.wide { width: min(760px, 100%); }
.auth-card .card { box-shadow: var(--shadow); }

/* ---------- Area riservata ---------- */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink); color: #cfc8ee; padding: 1.4rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.side .logo img { height: 30px; margin: .3rem .5rem 1.8rem; }
.side-role { margin: 0 .6rem .9rem; font: 600 .72rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: #9d94c9; }
.side-nav { display: grid; gap: .15rem; }
.side-nav a { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .62rem .8rem; border-radius: 10px; color: #dcd6f5; text-decoration: none; font-weight: 500; font-size: .95rem; }
.side-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side-nav a[aria-current="page"] { background: rgba(255, 255, 255, .14); color: #fff; }
.side-nav .count { min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--violet); color: #fff; font: 600 .74rem/1.4rem var(--display); text-align: center; }
.side-foot { margin-top: auto; padding-top: 1.5rem; display: grid; gap: .15rem; }
.side-user { padding: .8rem; border-radius: 12px; background: rgba(255, 255, 255, .07); margin-bottom: .6rem; font-size: .86rem; }
.side-user strong { display: block; color: #fff; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot button { all: unset; cursor: pointer; padding: .62rem .8rem; border-radius: 10px; color: #dcd6f5; font-weight: 500; font-size: .95rem; }
.side-foot button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.main { padding: clamp(1.25rem, 3vw, 2.5rem); min-width: 0; }
.main-inner { max-width: 1080px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.75rem; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0; }
.page-head p { margin: .35rem 0 0; color: var(--muted); max-width: 44rem; }
.crumb { font-size: .86rem; color: var(--muted); margin-bottom: .5rem; }
.crumb a { color: var(--muted); }
.app-top { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app-top { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1.25rem; background: var(--ink); position: sticky; top: 0; z-index: 40; }
  .app-top img { height: 26px; }
  .app-top .nav-toggle { background: transparent; border-color: rgba(255, 255, 255, .3); }
  .app-top .nav-toggle span { background: #fff; box-shadow: 0 6px 0 #fff, 0 -6px 0 #fff; }
  .side { display: none; position: fixed; inset: 58px 0 0 0; height: auto; z-index: 39; }
  .side.is-open { display: flex; }
  .side .logo { display: none; }
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.05rem 1.15rem; }
.stat span { display: block; font-size: .84rem; color: var(--muted); }
.stat b { display: block; font: 600 1.7rem/1.2 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: .2rem; }
.stat small { color: var(--muted); font-size: .8rem; }
.stat-accent { background: var(--ink); border-color: var(--ink); color: #fff; }
.stat-accent span, .stat-accent small { color: #bdb4e6; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; padding: .75rem 1rem; font: 600 .76rem var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: #faf9ff; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table td small { display: block; color: var(--muted); }
.table .num { text-align: right; white-space: nowrap; }
.table th.num { text-align: right; }
.empty { padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); background: #fff; }
.empty strong { display: block; font: 600 1.1rem var(--display); color: var(--ink); margin-bottom: .3rem; }

.kv { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); gap: .1rem 1.25rem; margin: 0; }
.kv dt { color: var(--muted); padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.kv dd { margin: 0; padding: .5rem 0; border-bottom: 1px solid var(--line); font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dt { border: 0; padding-bottom: 0; } }

.money { list-style: none; margin: 0; padding: 0; }
.money li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); }
.money li b { font-variant-numeric: tabular-nums; }
.money .sum { border-bottom: 0; padding-top: .9rem; font: 600 1.25rem var(--display); }
.money .minus b { color: var(--ok); }

.copy { display: flex; gap: .5rem; align-items: stretch; }
.copy .input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }

/* Foto */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.photo { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--tint); border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-bar { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; gap: .4rem; padding: .5rem; background: linear-gradient(0deg, rgba(20, 7, 74, .78), transparent); }
.photo-bar button { border: 0; border-radius: 999px; padding: .3rem .65rem; font: 600 .74rem var(--display); cursor: pointer; background: #fff; color: var(--ink); }
.photo-flag { position: absolute; top: .5rem; left: .5rem; }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 150px; gap: .6rem; border-radius: var(--radius-lg); overflow: hidden; }
.gallery > :first-child { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 680px) { .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 120px; } .gallery > :first-child { grid-column: 1 / -1; grid-row: auto; height: 220px; } }
.ph { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--radius); background: linear-gradient(135deg, #ece8ff, #f7f5ff); color: var(--lilac); }
.ph svg { width: 44px; height: 44px; }

/* Schede delle strutture */
.listing { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease; }
.listing:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.listing-media { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #ece8ff, #f7f5ff); display: grid; place-items: center; color: var(--lilac); }
.listing-media img { width: 100%; height: 100%; object-fit: cover; }
.listing-media svg { width: 48px; height: 48px; }
.listing-media .badge { position: absolute; top: .8rem; left: .8rem; }
.listing-body { padding: 1.1rem 1.2rem 1.25rem; display: grid; gap: .5rem; }
.listing-body h3 { font-size: 1.12rem; margin: 0; }
.listing-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: .4rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.listing-meta b { font: 600 1.25rem var(--display); color: var(--blue); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; align-items: end; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 1.5rem; }
.filters .field { margin: 0; }

/* Calendario */
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.cal-month h4 { font-size: .98rem; text-transform: capitalize; margin-bottom: .6rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-grid span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; font-size: .8rem; font-variant-numeric: tabular-nums; background: #fff; border: 1px solid var(--line); }
.cal-grid .dow { border: 0; background: none; color: var(--muted); font-size: .7rem; aspect-ratio: auto; padding: .2rem 0; }
.cal-grid .pad { border: 0; background: none; }
.cal-grid .is-past { color: #c5bfe0; background: #faf9ff; }
.cal-grid .is-prenotata { background: var(--ink); border-color: var(--ink); color: #fff; }
.cal-grid .is-bloccata { background: repeating-linear-gradient(135deg, #ebe8f6 0 5px, #f6f4fc 5px 10px); color: var(--muted); }
.cal-grid .is-opzione { background: var(--warn-bg); border-color: #f0d596; color: var(--warn); }
.cal-grid .is-borsa { background: #e3e0ff; border-color: #c5beff; color: var(--blue); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; font-size: .84rem; color: var(--muted); margin-top: 1rem; }
.legend span { display: inline-flex; align-items: center; gap: .45rem; }
.legend i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); }

/* Valutazione a stelle */
.stars { display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.stars input { position: absolute; opacity: 0; }
.stars label { cursor: pointer; font-size: 1.5rem; line-height: 1; color: var(--line-strong); }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #f5a623; }
.stars input:focus-visible + label { outline: 3px solid rgba(26, 14, 253, .35); border-radius: 4px; }
.score { color: #f5a623; letter-spacing: .08em; }

/* Livello del segnalatore */
.meter { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--grad); border-radius: 8px; }

.pager { display: flex; justify-content: center; gap: .4rem; margin-top: 1.5rem; flex-wrap: wrap; }
.pager a, .pager span { padding: .45rem .85rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-size: .9rem; }
.pager .is-current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager .is-off { color: #c5bfe0; }

.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.sticky { position: sticky; top: 92px; }
.app .sticky { top: 1.5rem; }
@media (max-width: 960px) { .two-col { grid-template-columns: minmax(0, 1fr); } .sticky { position: static; } }

.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: .9rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font: 600 1rem var(--display); }
.compare tbody th { font-weight: 500; color: var(--muted); width: 22%; }

/* Schede chiare dentro una sezione scura: il testo torna scuro */
.section-ink .card:not(.card-ink) { color: var(--ink); }
.section-ink .card:not(.card-ink) .muted { color: var(--muted); }
.section-ink .steps > li strong { color: #fff; }

/* Tabellone: taglia ferma o già al massimo */
.board .flat { font: 600 1.15rem var(--display); color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board b { font-family: var(--display); }
details > summary.link-btn { list-style: none; }
details > summary.link-btn::-webkit-details-marker { display: none; }
.field .stars { justify-self: start; }
