/* Deepread - home page
   Colori presi dal logo: blu #1D71B8 e indaco #222D5B. Niente nero puro. */

:root {
    --ink: #222d5b;          /* testo principale, indaco del logo */
    --ink-soft: #4a5683;     /* testo secondario */
    --ink-faint: #6b759c;    /* note e didascalie */
    --blue: #1d71b8;         /* blu del logo */
    --blue-deep: #165c98;
    --blue-tint: #e3eef9;
    --paper: #f4f6fa;        /* sfondo pagina */
    --surface: #ffffff;
    --line: #d9dfeb;
    --night: #1c2550;        /* fondo delle sezioni scure */
    --night-soft: #c9d3ee;
    --night-line: #36407a;
    --code-key: #8fc3f0;
    --code-str: #e8eefc;
    --code-num: #f3c98b;
    --danger: #b42318;
    --ok: #17703f;

    --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

    --wrap: 74rem;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --radius: 10px;
    --radius-sm: 6px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-deep); }

:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
    border-radius: 4px;
}

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

p { margin: 0; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
}
.skip:focus { top: 1rem; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Pulsanti */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.875rem;
    padding: 0.7rem 1.35rem;
    border: 2px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-deep); }
.btn-sm { min-height: 2.5rem; padding: 0.5rem 1.1rem; font-size: 0.9375rem; }
.btn[disabled] { opacity: .65; cursor: progress; }

/* Intestazione */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(244, 246, 250, 0.92);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 4.25rem;
}

.brand { flex-shrink: 0; }
.brand img { width: 9.5rem; height: auto; }

.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a {
    white-space: nowrap;
    color: var(--ink-soft);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
}
.nav a:hover { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 0.9rem; white-space: nowrap; }
.header-actions .lang,
.header-actions .login {
    color: var(--ink-soft);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
}
.header-actions .lang:hover,
.header-actions .login:hover { color: var(--ink); }

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 2.75rem; height: 2.75rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
}
.menu-toggle svg { margin: auto; }

.mobile-menu {
    display: none;
    border-top: 1px solid var(--line);
    padding: 0.5rem 0 1.25rem;
}
.mobile-menu a {
    display: block;
    padding: 0.7rem 0;
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}
.mobile-menu .btn { margin-top: 1rem; width: 100%; border-bottom: 0; color: #fff; }
.mobile-menu.is-open { display: block; }

@media (max-width: 1180px) {
    .nav { gap: 1.1rem; }
}
@media (max-width: 1080px) {
    .nav, .header-actions { display: none; }
    .menu-toggle { display: grid; }
}

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem); }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: center;
}

.hero h1 {
    font-size: clamp(2.1rem, 3.7vw, 3.05rem);
    line-height: 1.04;
    letter-spacing: -0.03em;
}

.hero .lede {
    margin-top: 1.4rem;
    max-width: 34rem;
    color: var(--ink-soft);
    font-size: 1.1875rem;
    line-height: 1.55;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.assurances {
    display: grid;
    gap: 0.55rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
    color: var(--ink-soft);
    font-size: 0.9688rem;
}
.assurances li { display: flex; gap: 0.6rem; align-items: center; }
.assurances svg { flex-shrink: 0; color: var(--blue); }

@media (max-width: 960px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Lettore: documento a sinistra, JSON a destra.
   È l'unico elemento con movimento automatico della pagina. */
.reader { position: relative; }

.reader-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
}
.reader-tab {
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-soft);
    font: inherit;
    font-size: 0.9063rem;
    font-weight: 600;
    cursor: pointer;
}
.reader-tab:hover { color: var(--ink); border-color: var(--ink-faint); }
.reader-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.reader-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
}
.reader-stage[hidden] { display: none; }

.paper {
    position: relative;
    z-index: 1;
    margin-top: 1.25rem;
    padding: 1.4rem 2.1rem 1.6rem 1.35rem;
    background: var(--surface);
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(34, 45, 91, .08), 0 12px 32px -12px rgba(34, 45, 91, .28);
    color: #3a4470;
    font-size: 0.6875rem;
    line-height: 1.45;
    overflow: hidden;
}
.paper .doc-title {
    margin: 0.9rem 0 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--ink);
}
.paper .doc-head { display: flex; justify-content: space-between; gap: 1rem; }
.paper .doc-org { font-weight: 700; font-size: 0.8125rem; color: var(--ink); }
.paper .doc-muted { color: #6b759c; }
.paper .doc-box { margin-top: 0.6rem; padding: 0.5rem 0.6rem; border: 1px solid #e3e7f0; border-radius: 2px; }
.paper .doc-label { display: block; color: #6b759c; font-size: 0.625rem; }
.paper table { width: 100%; margin-top: 0.7rem; border-collapse: collapse; }
.paper th, .paper td { padding: 0.28rem 0.3rem; text-align: left; border-bottom: 1px solid #e8ebf2; }
.paper th { font-weight: 600; color: #6b759c; font-size: 0.625rem; }
.paper td.num, .paper th.num { text-align: right; }
.paper .doc-foot { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-top: 0.8rem; }

.paper [data-k] {
    border-radius: 2px;
    box-shadow: 0 0 0 0 transparent;
    transition: background-color .25s ease, box-shadow .25s ease;
}
.paper [data-k].is-read { background: var(--blue-tint); }
.paper [data-k].is-hot { background: #cfe2f6; box-shadow: 0 0 0 2px var(--blue); }

.scan {
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 3.5rem;
    background: linear-gradient(180deg, rgba(29, 113, 184, 0) 0%, rgba(29, 113, 184, .16) 85%, rgba(29, 113, 184, .55) 100%);
    pointer-events: none;
    opacity: 0;
}
.reader.is-scanning .reader-stage:not([hidden]) .scan { animation: scan 1.5s cubic-bezier(.45, .05, .35, 1) forwards; }
@keyframes scan {
    0% { opacity: 1; transform: translateY(-3.5rem); }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translateY(var(--scan-end, 24rem)); }
}

.json {
    position: relative;
    z-index: 2;
    margin: 0 0 0 -1rem;
    padding: 1rem 0 1.1rem;
    background: var(--night);
    border-radius: var(--radius);
    box-shadow: 0 18px 40px -18px rgba(28, 37, 80, .6);
    color: var(--code-str);
    font-family: var(--mono);
    font-size: 0.6875rem;
    line-height: 1.6;
}
.json-head {
    display: flex;
    justify-content: space-between;
    padding: 0 0.9rem 0.6rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--night-line);
    color: var(--night-soft);
    font-family: var(--font);
    font-size: 0.8125rem;
}
.json ol { margin: 0; padding: 0; list-style: none; }
.json li {
    padding: 0 0.9rem;
    white-space: pre;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 3px solid transparent;
    transition: opacity .3s ease, background-color .2s ease;
}
.json li[data-k] { cursor: default; }
.json li[data-k]:hover, .json li.is-hot { background: rgba(143, 195, 240, .12); border-left-color: var(--code-key); }
.json .k { color: var(--code-key); }
.json .s { color: var(--code-str); }
.json .n { color: var(--code-num); }
.json .p { color: #8a94bf; }

.reader.is-scanning .json li { opacity: 0; }
.reader .json li.is-shown { opacity: 1; }

.reader-note {
    margin-top: 0.9rem;
    color: var(--ink-faint);
    font-size: 0.875rem;
}

@media (max-width: 640px) {
    .reader-stage { grid-template-columns: minmax(0, 1fr); }
    .paper { margin-top: 0; }
    .json { margin: -1rem 0.5rem 0; font-size: 0.6875rem; }
}

/* Fatti in breve */
.facts {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}
.facts dl {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}
.facts dl > div { padding: 1.4rem 1.5rem 1.5rem 0; }
.facts dl > div + div { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.facts dt { color: var(--ink-faint); font-size: 0.875rem; }
.facts dd { margin: 0.25rem 0 0; font-weight: 600; line-height: 1.4; }

@media (max-width: 860px) {
    .facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .facts dl > div:nth-child(3) { padding-left: 0; border-left: 0; }
    .facts dl > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 480px) {
    .facts dl { grid-template-columns: minmax(0, 1fr); }
    .facts dl > div, .facts dl > div + div { padding: 1.1rem 0; border-left: 0; }
    .facts dl > div + div { border-top: 1px solid var(--line); }
}

/* Sezioni */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-white { background: var(--surface); }

.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
.section-head p { margin-top: 1rem; color: var(--ink-soft); font-size: 1.125rem; }

.prose { max-width: 40rem; }
.prose p + p { margin-top: 1rem; }
.prose p { color: var(--ink-soft); }
.prose strong { color: var(--ink); font-weight: 600; }

/* Che cos'è */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}
.about-grid h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); margin-bottom: 1.25rem; }

.compare { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.compare li { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.compare h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.compare p { color: var(--ink-soft); font-size: 0.9688rem; }
.compare .after h3 { color: var(--blue); }

@media (max-width: 860px) {
    .about-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Come funziona: è una sequenza vera, i numeri servono */
.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}
.steps li { position: relative; padding-top: 3.25rem; counter-increment: step; }
.steps li::before {
    content: counter(step);
    position: absolute;
    top: 0; left: 0;
    display: grid;
    place-items: center;
    width: 2.25rem; height: 2.25rem;
    border: 2px solid var(--blue);
    border-radius: 50%;
    color: var(--blue);
    font-weight: 700;
}
.steps li::after {
    content: "";
    position: absolute;
    top: 1.125rem;
    left: 3rem;
    right: -1rem;
    height: 2px;
    background: var(--line);
}
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.steps p { color: var(--ink-soft); }

@media (max-width: 860px) {
    .steps { grid-template-columns: minmax(0, 1fr); }
    .steps li { padding: 0 0 0 3.5rem; min-height: 2.25rem; }
    .steps li::after { display: none; }
}

/* Documenti */
.doc-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.doc-item {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 3fr);
    gap: 0.5rem 2rem;
    align-items: baseline;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--line);
}
.doc-item h3 { font-size: 1.125rem; }
.doc-item .fields { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.doc-item .fields span {
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    background: var(--blue-tint);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 0.8125rem;
}
.doc-item .who { color: var(--ink-faint); font-size: 0.9375rem; }

.doc-more {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}
.doc-more p { color: var(--ink-soft); max-width: 36rem; }

@media (max-width: 860px) {
    .doc-item { grid-template-columns: minmax(0, 1fr); }
}

/* Calcolatore del risparmio */
.calc {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
}
.calc-inputs .field { margin-bottom: 1.25rem; }
.calc-inputs input { max-width: 12rem; }
.hint { margin-top: 0.3rem; color: var(--ink-faint); font-size: 0.875rem; }

.calc-results {
    padding: clamp(1.4rem, 3vw, 2.25rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.calc-lead {
    font-size: clamp(2.75rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1;
}
.calc-lead-label { margin-top: 0.4rem; color: var(--ink-soft); font-size: 1.0625rem; }

.bars { margin: 1.75rem 0 0.5rem; }
.bar-row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 0.75rem; align-items: center; padding: 0.35rem 0; }
.bar-name { color: var(--ink-soft); font-size: 0.9375rem; }
.bar-line { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.bar {
    display: block;
    flex: none;
    height: 22px;
    min-width: 3px;
    border-radius: 0 4px 4px 0;
    transition: width .35s ease;
}
.bar-today { background: #56519e; }
.bar-after { background: #3392d8; }
.bar-value {
    color: var(--ink);
    font-size: 0.9375rem;
    font-weight: 600;
    white-space: nowrap;
}

.calc-figures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1.25rem 0 0;
    border-top: 1px solid var(--line);
}
.calc-figures > div { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--line); }
.calc-figures > div:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--line); }
.calc-figures dt { color: var(--ink-faint); font-size: 0.875rem; }
.calc-figures dd { margin: 0.2rem 0 0; font-weight: 600; font-size: 1.125rem; }
.calc-figures .net dd { color: var(--blue); }
.calc-figures .net dd.is-negative { color: var(--ink-soft); }

.calc-warning {
    margin-top: 1rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    background: #fff6e0;
    color: #7a4b00;
    font-size: 0.9375rem;
}
.calc-note { margin: 1rem 0 1.25rem; color: var(--ink-faint); font-size: 0.875rem; }

@media (max-width: 960px) {
    .calc { grid-template-columns: minmax(0, 1fr); }
    .calc-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
    .calc-inputs input { max-width: none; }
}
@media (max-width: 560px) {
    .calc-inputs { grid-template-columns: minmax(0, 1fr); }
    .bar-row { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
    .calc-figures { grid-template-columns: minmax(0, 1fr); }
    .calc-figures > div:nth-child(even) { padding-left: 0; border-left: 0; }
}

/* Sicurezza */
.section-night { background: var(--night); color: #fff; }
.section-night .section-head p { color: var(--night-soft); }
.section-night a { color: #fff; }

.trust {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--night-line);
}
.trust li { padding: 1.6rem 1.75rem 1.75rem 0; border-bottom: 1px solid var(--night-line); }
.trust li:not(:nth-child(3n+1)) { padding-left: 1.75rem; border-left: 1px solid var(--night-line); }
.trust h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.trust p { color: var(--night-soft); font-size: 0.9688rem; }

.legal-note {
    margin-top: 2rem;
    max-width: 48rem;
    color: var(--night-soft);
    font-size: 0.9375rem;
}

@media (max-width: 960px) {
    .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .trust li, .trust li:not(:nth-child(3n+1)) { padding: 1.5rem 1.5rem 1.5rem 0; border-left: 0; }
    .trust li:nth-child(even) { padding-left: 1.5rem; border-left: 1px solid var(--night-line); }
}
@media (max-width: 600px) {
    .trust { grid-template-columns: minmax(0, 1fr); }
    .trust li, .trust li:nth-child(even) { padding: 1.4rem 0; border-left: 0; }
}

/* API */
.api-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}
.api-grid h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); margin-bottom: 1rem; }
.api-grid .intro { color: var(--ink-soft); }

.ticks { margin: 1.5rem 0 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding: 0.5rem 0 0.5rem 1.6rem; color: var(--ink-soft); font-size: 0.9688rem; }
.ticks li::before {
    content: "";
    position: absolute;
    left: 0.15rem; top: 0.95rem;
    width: 0.55rem; height: 0.3rem;
    border-left: 2px solid var(--blue);
    border-bottom: 2px solid var(--blue);
    transform: rotate(-45deg);
}
.ticks code, .api-grid p code {
    padding: 0.05rem 0.3rem;
    border-radius: 4px;
    background: var(--blue-tint);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 0.85em;
}

.code {
    margin: 0;
    padding: 1.2rem 1.3rem;
    overflow-x: auto;
    background: var(--night);
    border-radius: var(--radius);
    color: var(--code-str);
    font-family: var(--mono);
    font-size: 0.8125rem;
    line-height: 1.7;
}
.code + .code { margin-top: 0.75rem; }
.code .c { color: #8a94bf; }
.code .k { color: var(--code-key); }
.code .n { color: var(--code-num); }

@media (max-width: 960px) {
    .api-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Prezzi */
.plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.plan { display: flex; flex-direction: column; padding: 2rem 1.75rem; }
.plan + .plan { border-left: 1px solid var(--line); }
.plan h3 { font-size: 1.25rem; }
.plan .volume { margin-top: 0.3rem; color: var(--ink-soft); }
.plan .price { margin-top: 1.4rem; font-size: 2.75rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.plan .price small { font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--ink-soft); }
.plan .unit { margin-top: 0.5rem; color: var(--ink-faint); font-size: 0.9063rem; }
.plan .ticks { flex: 1; margin-bottom: 1.75rem; }
.plan .ticks li.no { color: var(--ink-faint); }
.plan .ticks li.no::before {
    width: 0.6rem; height: 0;
    top: 1.15rem;
    border-left: 0;
    border-bottom: 2px solid var(--ink-faint);
    transform: none;
}
.plan .btn { width: 100%; }

.plans-note {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    color: var(--ink-soft);
}

@media (max-width: 900px) {
    .plans { grid-template-columns: minmax(0, 1fr); }
    .plan + .plan { border-left: 0; border-top: 1px solid var(--line); }
}

/* FAQ */
.faq-grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}
.faq-grid .section-head { margin-bottom: 0; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
    position: relative;
    padding: 1.15rem 2.5rem 1.15rem 0;
    font-size: 1.0625rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "";
    position: absolute;
    right: 0.4rem;
    top: 1.45rem;
    width: 0.6rem; height: 0.6rem;
    border-right: 2px solid var(--blue);
    border-bottom: 2px solid var(--blue);
    transform: rotate(45deg);
    transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(0.25rem) rotate(-135deg); }
.faq summary:hover { color: var(--blue-deep); }
.faq .answer { padding: 0 0 1.3rem; max-width: 44rem; color: var(--ink-soft); }
.faq .answer p + p { margin-top: 0.75rem; }

@media (max-width: 860px) {
    .faq-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Contatti */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}
.contact-grid h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); margin-bottom: 1rem; }
.contact-grid .intro { color: var(--ink-soft); font-size: 1.125rem; }

.direct { margin: 2rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.direct li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.direct span { display: block; color: var(--ink-faint); font-size: 0.875rem; }
.direct a { color: var(--ink); font-weight: 600; text-decoration: none; }
.direct a:hover { color: var(--blue); }

.form {
    padding: clamp(1.4rem, 3vw, 2.25rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; margin-bottom: 0.35rem; font-size: 0.9375rem; font-weight: 600; }
.field .opt { color: var(--ink-faint); font-weight: 400; }
.field input, .field textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid #c4cce0;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8b94b8; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 113, 184, .2); }

.consent { display: flex; gap: 0.65rem; align-items: flex-start; margin: 0.4rem 0 1.4rem; color: var(--ink-soft); font-size: 0.9063rem; }
.consent input { width: 1.1rem; height: 1.1rem; margin-top: 0.2rem; flex-shrink: 0; accent-color: var(--blue); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-error {
    margin-bottom: 1.1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #f1c4bf;
    border-radius: var(--radius-sm);
    background: #fdf1f0;
    color: var(--danger);
    font-size: 0.9375rem;
}
.form-done { padding: 1rem 0; }
.form-done h3 { font-size: 1.375rem; color: var(--ok); margin-bottom: 0.5rem; }
.form-done p { color: var(--ink-soft); }

@media (max-width: 960px) {
    .contact-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .form-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* Piè di pagina */
.site-footer { padding: 3.5rem 0 2rem; border-top: 1px solid var(--line); background: var(--surface); font-size: 0.9375rem; }
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 3fr));
    gap: 2rem;
}
.footer-grid img { width: 9rem; height: auto; margin-bottom: 1rem; }
.footer-grid p, .footer-grid address { color: var(--ink-soft); font-style: normal; }
.footer-grid h2 { font-size: 0.9375rem; margin-bottom: 0.75rem; }
.footer-grid ul { margin: 0; padding: 0; list-style: none; }
.footer-grid li + li { margin-top: 0.45rem; }
.footer-grid a { color: var(--ink-soft); text-decoration: none; }
.footer-grid a:hover { color: var(--blue); text-decoration: underline; }
.footer-legal {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    color: var(--ink-faint);
    font-size: 0.875rem;
}

@media (max-width: 760px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reader.is-scanning .json li { opacity: 1; }
}

@media print {
    .site-header, .reader-tabs, .form, .menu-toggle { display: none; }
    body { background: #fff; }
}
