/* ============================================================
   Calcolatori — wizard template (production)
   Adattato da assets/_source/catalog.css (Claude Design 2026-06-03).
   Token: src/css/tokens.css (Overlock + Source Serif 4, olive/terracotta/cream).
   Regola: niente border-left come accento, niente gradient su testo.
   Tutte le classi prefissate .wz-  (wizard).
   ============================================================ */

/* Wizard stage — root container. Inherits brand-v2 body type.
   Use on the wrapping <div> of the wizard partial. */
.wz-stage {
    font-family: var(--font-body);
    color: var(--bark);
    max-width: 640px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md) var(--space-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.wz-stage,
.wz-stage *,
.wz-stage *::before,
.wz-stage *::after { box-sizing: border-box; }

/* ---- shell card --------------------------------------------- */
.wz-card {
    width: 100%;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    padding: var(--space-lg);
}
.wz-card--flush { padding: 0; overflow: hidden; }

/* shared question label */
.wz-q {
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    font-size: 1.3rem;
    line-height: 1.25;
    color: var(--olive-deep);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}
.wz-hint {
    font-size: 0.9rem;
    color: var(--earth);
    margin: 0 0 18px;
    line-height: 1.5;
}
.wz-hint--tight { margin-bottom: 14px; }

/* optional tag */
.wz-opt-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--olive);
    background: var(--sage-mist);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    vertical-align: middle;
    margin-left: 8px;
}

/* ============================================================
   1 · PROGRESS BAR
   ============================================================ */
.wz-progress { width: 100%; }
.wz-progress-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}
.wz-progress-step {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--earth);
}
.wz-progress-pct {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--olive);
}
.wz-progress-track {
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--cream-dark);
    overflow: hidden;
}
.wz-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--olive);
    transition: width 0.5s ease;
}

/* ============================================================
   2 · QUICK-PILLS + NUMERIC INPUT
   ============================================================ */
.wz-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.wz-pill {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--bark);
    background: var(--bg-surface);
    border: 1.5px solid var(--stone);
    border-radius: var(--radius-full);
    padding: 9px 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}
.wz-pill:hover {
    border-color: var(--olive);
    color: var(--olive-deep);
}
.wz-pill.is-active {
    background: var(--olive);
    border-color: var(--olive);
    color: var(--cream);
}

.wz-num {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--cream-dark);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
.wz-num:focus-within {
    border-color: var(--olive);
    background: var(--bg-surface);
}
.wz-num-cur {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.7rem;
    color: var(--olive-deep);
}
.wz-num-input {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.7rem;
    color: var(--olive-deep);
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    padding: 0;
    width: 100%;
}
.wz-num-input::-webkit-outer-spin-button,
.wz-num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wz-num-input[type="number"] { -moz-appearance: textfield; }
.wz-num-suffix {
    font-size: 0.9rem;
    color: var(--earth);
    white-space: nowrap;
}

/* ============================================================
   3 · COUNT-STEPPER
   ============================================================ */
.wz-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
}
.wz-step-btn {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-full);
    border: 2px solid var(--stone);
    background: var(--bg-surface);
    color: var(--olive-deep);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}
.wz-step-btn:hover:not([disabled]) {
    border-color: var(--olive);
    background: var(--sage-mist);
}
.wz-step-btn svg { width: 22px; height: 22px; }
.wz-step-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}
.wz-step-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 3.2rem;
    line-height: 1;
    color: var(--olive-deep);
    min-width: 64px;
    text-align: center;
}
.wz-step-unit {
    text-align: center;
    font-size: 0.85rem;
    color: var(--earth);
    margin-top: 10px;
}

/* ============================================================
   4 · OPTION CARDS (2-col)
   ============================================================ */
.wz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.wz-options--single { grid-template-columns: 1fr; }
.wz-option {
    position: relative;
    text-align: left;
    background: var(--bg-surface);
    border: 2px solid var(--stone);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-body);
}
.wz-option:hover { border-color: var(--olive); }
.wz-option.is-active {
    border-color: var(--olive);
    background: var(--sage-mist);
}
.wz-option-ic {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--sage-mist);
    color: var(--olive);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
}
.wz-option.is-active .wz-option-ic {
    background: var(--olive);
    color: var(--cream);
}
.wz-option-ic svg { width: 22px; height: 22px; }
.wz-option-t {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--olive-deep);
}
.wz-option-s {
    font-size: 0.82rem;
    color: var(--earth);
    margin-top: 2px;
}
.wz-option-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: var(--olive);
    color: var(--cream);
    display: none;
    align-items: center;
    justify-content: center;
}
.wz-option.is-active .wz-option-check { display: flex; }
.wz-option-check svg { width: 13px; height: 13px; }

/* ============================================================
   5 · TOGGLE PILL (yes / no segmented)
   ============================================================ */
.wz-toggle {
    display: flex;
    gap: 6px;
    padding: 6px;
    background: var(--cream-dark);
    border-radius: var(--radius-full);
}
.wz-toggle-opt {
    flex: 1;
    text-align: center;
    cursor: pointer;
    padding: 13px 0;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    color: var(--earth);
    border: none;
    background: transparent;
    transition: var(--transition-fast);
}
.wz-toggle-opt.is-active {
    background: var(--bg-surface);
    color: var(--olive-deep);
    box-shadow: var(--shadow-soft);
}

/* ============================================================
   6 · SLIDER RANGE
   ============================================================ */
.wz-range-val {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    color: var(--olive-deep);
    text-align: center;
    margin: 4px 0 18px;
    font-variant-numeric: tabular-nums;
}
.wz-range-input {
    -webkit-appearance: none;
    appearance: none;
    width: calc(100% - 24px);
    margin: 0 12px;
    height: 6px;
    background: var(--cream-dark);
    border-radius: var(--radius-full);
    outline: none;
}
.wz-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 3px solid var(--olive);
    box-shadow: var(--shadow-soft);
    cursor: grab;
}
.wz-range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 3px solid var(--olive);
    cursor: grab;
}
.wz-range-input::-moz-range-progress {
    background: var(--olive);
    height: 6px;
    border-radius: var(--radius-full);
}
.wz-range-scale {
    display: flex;
    justify-content: space-between;
    margin: 14px 12px 0;
    font-size: 0.78rem;
    color: var(--earth);
}
.wz-skip {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 18px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--terracotta);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ============================================================
   7 · BENEFIT BOX   (full border + tint, NO border-left)
   ============================================================ */
.wz-benefit {
    background: var(--sage-mist);
    border: 1.5px solid var(--sage-pale);
    border-radius: var(--radius-md);
    padding: 20px;
}
.wz-benefit-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--olive);
    color: var(--cream);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}
.wz-benefit-badge svg { width: 12px; height: 12px; }
.wz-benefit-h {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--olive-deep);
    margin: 0 0 6px;
}
.wz-benefit-p {
    font-size: 0.92rem;
    color: var(--bark);
    line-height: 1.55;
    margin: 0;
}

/* ============================================================
   8 · HOOK BOX (Bonus Immobiliare contextual — full border + tint)
   ============================================================ */
.wz-hook {
    background: var(--gold-pale);
    border: 1.5px solid #E6DBC2;
    border-radius: var(--radius-md);
    padding: 20px;
}
.wz-hook-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin: 0 0 8px;
}
.wz-hook-p {
    font-size: 0.92rem;
    color: var(--bark);
    line-height: 1.55;
    margin: 0 0 14px;
}
.wz-hook-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--terracotta);
    cursor: pointer;
    text-decoration: none;
}
.wz-hook-cta:hover { color: var(--terracotta-light); }
.wz-hook-cta svg {
    width: 15px;
    height: 15px;
    transition: transform var(--transition-fast);
}
.wz-hook-cta:hover svg { transform: translateX(3px); }

/* ============================================================
   9 · LOADING SCREEN
   ============================================================ */
.wz-loading { text-align: center; padding: 18px 8px 8px; }
.wz-spinner {
    width: 54px;
    height: 54px;
    margin: 0 auto 22px;
    border-radius: var(--radius-full);
    border: 4px solid var(--cream-dark);
    border-top-color: var(--olive);
    animation: wz-spin 0.9s linear infinite;
}
@keyframes wz-spin { to { transform: rotate(360deg); } }
.wz-loading-h {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--olive-deep);
    margin: 0 0 20px;
}
.wz-load-track {
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--cream-dark);
    overflow: hidden;
    margin: 0 0 22px;
}
.wz-load-fill {
    height: 100%;
    width: 40%;
    border-radius: var(--radius-full);
    background: var(--terracotta);
    animation: wz-load 2.4s ease-in-out infinite;
}
@keyframes wz-load {
    0% { width: 8%; }
    50% { width: 72%; }
    100% { width: 96%; }
}
.wz-substeps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}
.wz-substep {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 0.92rem;
    color: var(--bark);
}
.wz-substep-ic {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wz-substep.done .wz-substep-ic {
    background: var(--olive);
    color: var(--cream);
}
.wz-substep.done .wz-substep-ic svg { width: 12px; height: 12px; }
.wz-substep.active .wz-substep-ic {
    border: 2px solid var(--terracotta);
    border-top-color: transparent;
    animation: wz-spin 0.8s linear infinite;
}
.wz-substep.pending .wz-substep-ic { border: 2px solid var(--stone); }
.wz-substep.pending { color: var(--earth); }

/* ============================================================
   10 · 11 · RESULT CARDS
   ============================================================ */
.wz-result { text-align: center; }
.wz-result-hero {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    border-radius: var(--radius-full);
    background: var(--sage-mist);
    color: var(--olive);
    display: flex;
    align-items: center;
    justify-content: center;
}
.wz-result-hero svg { width: 34px; height: 34px; }
.wz-result-hero.verdict-warn {
    background: var(--terracotta-pale);
    color: var(--terracotta);
}
.wz-result-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin: 0 0 8px;
}
.wz-result-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--olive-deep);
    margin: 0 0 18px;
}
.wz-result-title em {
    font-style: italic;
    color: var(--terracotta);
}
.ccr-partner-cta {
    display: grid;
    justify-items: center;
    gap: 4px;
    max-width: 31rem;
    margin: 26px auto 0;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
}
.ccr-partner-cta-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: var(--weight-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fg-muted);
}
.ccr-partner-cta a {
    color: var(--fg-link);
    font-size: 0.95rem;
    font-weight: var(--weight-semibold);
    text-decoration: none;
}
.ccr-partner-cta a:hover {
    color: var(--fg-link-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.ccr-partner-cta a:focus-visible {
    outline: 3px solid var(--terracotta);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

/* recap table */
.wz-recap { text-align: left; margin: 0 0 18px; }
.wz-recap-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 2px;
    border-bottom: 1px solid var(--cream-dark);
}
.wz-recap-row .k {
    font-size: 0.92rem;
    color: var(--earth);
}
.wz-recap-row .v {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--bark);
    font-variant-numeric: tabular-nums;
}
.wz-recap-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--sage-mist);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-top: 12px;
}
.wz-recap-total .k {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--olive-deep);
}
.wz-recap-total .v {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--olive-deep);
    font-variant-numeric: tabular-nums;
}

.wz-reco {
    font-size: 0.95rem;
    color: var(--bark);
    line-height: 1.55;
    margin: 0 0 20px;
}

/* verdict bullets */
.wz-verdict-sum {
    font-size: 0.95rem;
    color: var(--bark);
    line-height: 1.6;
    margin: 0 0 18px;
    text-align: left;
}
.wz-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.wz-bullets li {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    font-size: 0.92rem;
    color: var(--bark);
    line-height: 1.5;
}
.wz-bullets .bic {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    margin-top: 1px;
    background: var(--sage-mist);
    color: var(--olive);
    display: flex;
    align-items: center;
    justify-content: center;
}
.wz-bullets .bic svg { width: 11px; height: 11px; }

.wz-disclaimer {
    font-size: 0.76rem;
    color: var(--earth);
    line-height: 1.5;
    margin: 14px 0 0;
}

/* ============================================================
   12 · TRUST PILLS
   ============================================================ */
.wz-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: var(--space-md);
}
.wz-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--stone);
    border-radius: var(--radius-full);
    padding: 6px 13px;
    white-space: nowrap;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--bark);
}
.wz-trust-pill .dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--olive);
    flex-shrink: 0;
}

/* ============================================================
   BUTTONS / NAV
   ============================================================ */
.wz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    padding: 14px 24px;
    transition: var(--transition-base);
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}
.wz-btn svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}
.wz-btn-primary {
    background: var(--terracotta);
    color: var(--cream);
    width: 100%;
}
.wz-btn-primary:hover {
    background: var(--terracotta-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-cta-soft);
    color: var(--cream);
}
.wz-btn-primary:hover svg { transform: translateX(3px); }
.wz-btn-ghost {
    background: transparent;
    color: var(--olive-deep);
    border: 2px solid var(--stone);
}
.wz-btn-ghost:hover {
    border-color: var(--olive);
    background: var(--sage-mist);
}
.wz-btn-link {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--terracotta);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: center;
    text-decoration: none;
}
.wz-btn-link:hover { color: var(--terracotta-light); }
.wz-btn-link svg { width: 14px; height: 14px; }

.wz-nav {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: var(--space-md);
    max-width: 100%;
    width: 100%;
}
.wz-nav .wz-btn {
    max-width: 100%;
    min-width: 0;
}
.wz-nav .wz-btn-primary {
    flex: 1 1 0;
    width: auto;
}

@media (max-width: 560px) {
    .wz-nav {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }
    .wz-nav > span { display: none; }
    .wz-nav .wz-btn,
    .wz-nav .wz-btn-primary,
    .wz-nav .wz-btn-ghost {
        flex: none;
        justify-content: center;
        line-height: 1.15;
        min-width: 0;
        white-space: normal;
        width: 100%;
    }
}

.wz-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ============================================================
   ALPINE — hide template fragments until JS boots (cloak)
   ============================================================ */
[x-cloak] { display: none !important; }

/* ============================================================
   FALLBACK — when JS is off, show a minimal message in place
   of the wizard. The fallback container is rendered server-side
   inside the partial; Alpine hides it on boot.
   ============================================================ */
.wz-nojs {
    background: var(--gold-pale);
    border: 1.5px solid #E6DBC2;
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    color: var(--bark);
}
.wz-nojs h2 {
    font-size: 1.2rem;
    margin: 0 0 8px;
    color: var(--olive-deep);
}
.wz-nojs p {
    margin: 0 0 12px;
    font-size: 0.95rem;
}

/* ============================================================
   HERO + CROSS-LINKS (page chrome around the wizard)
   Ported from src/css/pages/calcolatori.css so the new wizard
   pages keep the olive hero band (gives the transparent header
   its expected dark backdrop, prevents the cream logo from
   sitting illegible over a white page) and a styled
   "Approfondisci" cross-link list.
   ============================================================ */

.calc-page .calc-hero {
  background: linear-gradient(160deg, var(--olive-deep), var(--olive-light));
  color: var(--fg-on-dark);
  /* Compensate for fixed .header (80px) so eyebrow/h1 are not covered. */
  padding: calc(var(--header-height) + var(--space-3xl)) var(--space-lg) var(--space-3xl);
  text-align: center;
}
.calc-hero-inner { max-width: 760px; margin: 0 auto; }
.calc-page .calc-hero h1 {
  color: var(--fg-on-dark);
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  margin: 0 0 var(--space-md);
}
.calc-hero-intro {
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(250, 247, 242, 0.9);
  margin: 0;
}
.calc-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta-light);
  margin: 0 0 var(--space-md);
}
.calc-hero-eyebrow--link,
.calc-hero-eyebrow--link:link,
.calc-hero-eyebrow--link:visited {
  color: var(--terracotta-light);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
  padding-bottom: 1px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.calc-hero-eyebrow--link:hover,
.calc-hero-eyebrow--link:focus {
  color: var(--cream);
  border-bottom-color: var(--cream);
}

.calc-crosslinks {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: var(--space-sm);
}
.calc-crosslinks li a {
  display: block;
  padding: var(--space-md);
  background: var(--cream);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--fg-link);
  font-weight: 600;
  transition: var(--transition-fast);
}
.calc-crosslinks li a:hover { border-color: var(--olive); }

/* ============================================================
   .calc-content — section wrapper around the wizard, FAQ and
   crosslinks. Centers the long-form content under the hero so it
   doesn't bleed full-width on desktop.
   ============================================================ */
.calc-content {
    max-width: 760px;
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-lg) var(--space-4xl);
}
.calc-content > section + section { margin-top: var(--space-3xl); }
.calc-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3.5vw, 1.9rem);
    margin: 0 0 var(--space-lg);
    color: var(--olive-deep);
}

/* ============================================================
   FAQ shim for native <details>/<summary>
   components.css scopes the FAQ to JS-toggled .open on a <div> +
   <button>; our markup uses native <details class="faq-item">
   <summary class="faq-question">…</summary><p>…</p></details>.
   Map [open] → open behaviour, restyle summary, and apply the
   answer padding directly to children paragraphs since we no
   longer wrap them in .faq-answer.
   ============================================================ */
.calc-page .calc-faq { margin-top: var(--space-2xl, 3rem); }
.calc-page .calc-faq h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    color: var(--olive-deep);
    margin: 0 0 var(--space-md, 1rem);
}
.calc-page .faq-item {
    background: var(--bg-surface, #fff);
    border: 1px solid var(--stone, #DAD7CD);
    border-radius: var(--radius-md, 1rem);
    margin-bottom: var(--space-sm, 0.5rem);
    overflow: hidden;
    transition: border-color var(--transition-fast, 0.2s ease);
}
.calc-page .faq-item[open] { border-color: var(--olive, #5C6B4A); }
.calc-page .faq-item > summary.faq-question {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md, 1rem);
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    font-family: var(--font-display);
    font-weight: var(--weight-medium, 600);
    font-size: 1.02rem;
    color: var(--olive-deep);
    transition: background var(--transition-fast, 0.2s ease);
}
.calc-page .faq-item > summary.faq-question::-webkit-details-marker { display: none; }
.calc-page .faq-item > summary.faq-question:hover { background: var(--cream, #FAF7F2); }
.calc-page .faq-item > summary.faq-question::after {
    content: '';
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--terracotta, #F06543);
    border-bottom: 2px solid var(--terracotta, #F06543);
    transform: rotate(45deg);
    transition: transform var(--transition-base, 0.3s ease);
    margin-bottom: 4px;
}
.calc-page .faq-item[open] > summary.faq-question::after {
    transform: rotate(-135deg);
    margin-top: 4px; margin-bottom: 0;
}
.calc-page .faq-item > p,
.calc-page .faq-item > .faq-answer {
    margin: 0;
    padding: 0 var(--space-lg, 1.5rem) var(--space-lg, 1.5rem);
    color: var(--bark, #4A3F35);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ============================================================
   .calc-embed-cta — "Vuoi questo calcolatore sul tuo sito?"
   Punta a /widget-info/ con uno snippet pronto. Full border +
   tinta sage, niente border-left stripe (anti AI-slop).
   ============================================================ */
.calc-embed-cta {
    background: var(--sage-mist);
    border: 1px solid var(--sage-pale);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-top: var(--space-xl);
}
.calc-embed-cta h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--olive-deep);
    margin: 0 0 var(--space-sm);
}
.calc-embed-cta p {
    font-size: 0.95rem;
    color: var(--bark);
    margin: 0 0 var(--space-md);
    line-height: 1.55;
}
.calc-embed-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--terracotta);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.calc-embed-link:hover { color: var(--terracotta-light); }

/* ============================================================
   .code-snippet — terminal-style copyable code block (widget-info)
   Dark bg, mono font, internal horizontal scroll (no page overflow),
   "Copia" button in top-right with brief "Copiato" feedback.
   ============================================================ */
.code-snippet {
    position: relative;
    background: #1a2014;
    color: #F0EBD8;
    border-radius: var(--radius-md);
    margin: var(--space-md) 0 var(--space-lg);
    overflow: hidden;
}
.code-snippet pre {
    margin: 0;
    padding: var(--space-lg) var(--space-lg) var(--space-md);
    padding-right: 110px; /* room for the copy button */
    overflow-x: auto;
    overflow-y: hidden;
    font-family: ui-monospace, SFMono-Regular, "Menlo", "Cascadia Code", monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    white-space: pre;
}
.code-snippet code {
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 0;
}
.code-snippet pre::-webkit-scrollbar { height: 6px; }
.code-snippet pre::-webkit-scrollbar-thumb { background: rgba(240, 235, 216, 0.25); border-radius: 3px; }
.code-snippet pre::-webkit-scrollbar-track { background: transparent; }

.code-snippet .copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(240, 235, 216, 0.10);
    color: #F0EBD8;
    border: 1px solid rgba(240, 235, 216, 0.25);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.78rem;
    padding: 6px 12px;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.code-snippet .copy-btn:hover {
    background: rgba(240, 235, 216, 0.18);
    border-color: rgba(240, 235, 216, 0.5);
}
.code-snippet .copy-btn.is-copied {
    background: var(--olive);
    color: var(--cream);
    border-color: var(--olive);
}

/* ============================================================
   .snippet-hint + .snippet-slugs — generic embed snippet section
   (widget-info page). Lightweight typography + bordered table.
   ============================================================ */
.snippet-hint {
    font-size: 0.92rem;
    font-style: italic;
    color: var(--earth);
    margin: var(--space-md) 0 var(--space-lg);
    line-height: 1.5;
}
.snippet-slugs {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-md) 0 var(--space-lg);
    font-size: 0.95rem;
}
.snippet-slugs thead th {
    text-align: left;
    background: var(--sage-mist);
    color: var(--olive-deep);
    font-family: var(--font-body);
    font-weight: 700;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--sage-pale);
}
.snippet-slugs tbody td {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--stone);
    vertical-align: top;
    color: var(--bark);
}
.snippet-slugs code {
    font-family: ui-monospace, SFMono-Regular, "Menlo", "Cascadia Code", monospace;
    font-size: 0.88rem;
    background: var(--cream-dark);
    color: var(--olive-deep);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}
@media (max-width: 640px) {
    .snippet-slugs { display: block; overflow-x: auto; }
}

/* ============================================================
   .widget-contact — partner contact form (widget-info only).
   Cream surface, full border (no border-left stripe). Inputs
   with focus on olive, terracotta submit button.
   ============================================================ */
.widget-contact {
    background: var(--cream);
    border: 1px solid var(--stone);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    margin-top: var(--space-xl);
}
.widget-contact h2 {
    font-family: var(--font-display);
    color: var(--olive-deep);
    margin: 0 0 var(--space-sm);
}
.widget-contact > p {
    color: var(--bark);
    margin: 0 0 var(--space-lg);
    line-height: 1.55;
}
.widget-form-row {
    margin-bottom: var(--space-md);
}
.widget-form-row label {
    display: block;
    font-weight: 600;
    color: var(--olive-deep);
    margin-bottom: 4px;
    font-size: 0.95rem;
}
.widget-form-row input,
.widget-form-row textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--bark);
    background: #fff;
    border: 1.5px solid var(--stone);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.widget-form-row input:focus,
.widget-form-row textarea:focus {
    outline: none;
    border-color: var(--olive);
    box-shadow: 0 0 0 3px rgba(122, 132, 89, 0.15);
}
.widget-form-row textarea {
    resize: vertical;
    min-height: 120px;
}
.widget-form-honey {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.widget-form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--terracotta);
    color: var(--cream);
    border: 1px solid var(--terracotta);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    padding: var(--space-sm) var(--space-xl);
    cursor: pointer;
    transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
    margin-top: var(--space-sm);
}
.widget-form-submit:hover {
    background: var(--terracotta-light);
    border-color: var(--terracotta-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(193, 102, 73, 0.25);
}
.widget-form-submit:disabled {
    background: var(--stone);
    border-color: var(--stone);
    color: var(--earth);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.widget-form-status {
    margin: var(--space-md) 0 0;
    font-size: 0.95rem;
    min-height: 1.4em;
}
.widget-form-status[data-state="idle"] { color: transparent; }
.widget-form-status[data-state="sending"] { color: var(--earth); }
.widget-form-status[data-state="ok"] { color: var(--olive); font-weight: 600; }
.widget-form-status[data-state="error"] { color: var(--terracotta); font-weight: 600; }

/* ============================================================
   Embed wizard additions — Phase 1.6 (2026-06-03)
   - input-text component (partner identifier + email)
   - option-cards-dynamic variant (single-column on mobile, 2-col on desktop)
   - snippet result wrapper + help-email status pill
   Full borders, no border-left/right colored stripes >1px.
   ============================================================ */
.wz-input-wrap {
    display: block;
    margin: var(--space-md) 0 var(--space-sm);
}
.wz-input-text {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--bark);
    background: #fff;
    border: 1.5px solid var(--stone);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.wz-input-text:focus {
    outline: none;
    border-color: var(--olive);
    box-shadow: 0 0 0 3px rgba(122, 132, 89, 0.15);
}
.wz-input-text::placeholder {
    color: var(--earth);
    opacity: 0.7;
}

/* Dynamic option list — stacks vertically on mobile, two columns on desktop.
   Visual continuity with .wz-options (same border + active state). */
.wz-options--dynamic {
    grid-template-columns: 1fr;
}
@media (min-width: 720px) {
    .wz-options--dynamic { grid-template-columns: 1fr 1fr; }
}
.wz-option--dynamic {
    text-align: left;
}

/* Snippet result — intro paragraph + note about slug/partner */
.wz-snippet-intro {
    color: var(--bark);
    margin: 0 0 var(--space-md);
    line-height: 1.55;
    font-size: 0.98rem;
}
.wz-snippet-note {
    color: var(--earth);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: var(--space-md) 0 var(--space-lg);
}
.wz-snippet-note code {
    font-family: ui-monospace, SFMono-Regular, "Menlo", "Cascadia Code", monospace;
    font-size: 0.86rem;
    background: var(--cream-dark);
    color: var(--olive-deep);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

/* Help-email status — full border tint, no stripe */
.wz-help-status {
    margin: var(--space-md) 0 var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.93rem;
    line-height: 1.4;
    border: 1px solid var(--stone);
    background: var(--cream);
    color: var(--bark);
}
.wz-help-status[data-state="sending"] {
    border-color: var(--stone);
    background: var(--cream);
    color: var(--earth);
}
.wz-help-status[data-state="ok"] {
    border-color: var(--olive);
    background: var(--sage-mist);
    color: var(--olive-deep);
    font-weight: 600;
}
.wz-help-status[data-state="error"] {
    border-color: var(--terracotta);
    background: #fbe9e2;
    color: var(--terracotta);
}

/* ============================================================
   RESTYLE BonusImmobiliare App (Claude Design, 2026-06-15)
   Numerali Exo 2 (subset solo-cifre, ~2KB, caricato solo qui via unicode-range)
   + selezione/slider terracotta opt-in (.wz-sel-terra sullo .wz-stage).
   ============================================================ */
@font-face {
  font-family: 'Exo 2 Num';
  src: url('/assets/fonts/Exo2-Bold-num.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0020, U+002C-002F, U+0030-0039, U+2013, U+20AC;
}
@font-face {
  font-family: 'Exo 2 Num';
  src: url('/assets/fonts/Exo2-ExtraBold-num.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
  unicode-range: U+0020, U+002C-002F, U+0030-0039, U+2013, U+20AC;
}

.wz-sel-terra .wz-pill.is-active { background: var(--terracotta); border-color: var(--terracotta); color: var(--cream); }
.wz-sel-terra .wz-option.is-active { border-color: var(--terracotta); background: var(--terracotta-pale); }
.wz-sel-terra .wz-option.is-active .wz-option-ic { background: var(--terracotta); color: var(--cream); }
.wz-sel-terra .wz-option-check { background: var(--terracotta); }
.wz-sel-terra .wz-progress-fill { background: var(--terracotta); }
.wz-sel-terra .wz-progress-pct { color: var(--terracotta); }
.wz-sel-terra .wz-range-fill { background: var(--terracotta); }
.wz-sel-terra .wz-range-thumb { border-color: var(--terracotta); }
.wz-sel-terra .wz-toggle-opt.is-active { color: var(--terracotta); }
.wz-sel-terra .wz-num.is-focus { border-color: var(--terracotta); }
