/* ============================================================
   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);
}

.calc-concordato .wz-stage {
    --wz-action-color: #F06543;
    --wz-action-hover: #D9502F;

    min-height: 620px;
    scroll-margin-top: calc(var(--header-height) + var(--space-xl) + env(safe-area-inset-top, 0px));
}

/* Keep the first card's footprint while Alpine initializes. */
.calc-concordato .wz-stage[x-cloak] {
    display: flex !important;
    visibility: hidden;
}
.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;
    scroll-margin-top: calc(68px + var(--space-md) + env(safe-area-inset-top, 0));
}
.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;
    min-height: 44px;
    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;
    align-items: stretch;
    gap: 6px;
    padding: 6px;
    background: var(--cream-dark);
    border-radius: var(--radius-full);
}
.wz-toggle-opt {
    flex: 1;
    min-width: 0;
    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;
    line-height: 1.2;
    transition: var(--transition-fast);
}
.wz-toggle-opt.is-active {
    background: var(--bg-surface);
    color: var(--olive-deep);
    box-shadow: var(--shadow-soft);
}
.calc-concordato .ccr-maint-block {
    grid-template-columns: minmax(0, 1fr);
}
.calc-concordato .ccr-maint-block .wz-toggle-opt {
    font-size: clamp(0.95rem, 4vw, 1rem);
    overflow-wrap: anywhere;
}

/* ============================================================
   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); }

/* Calculator shell: sticky context without overlaying the wizard. */
.calculator-shell-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: env(safe-area-inset-top, 0);
    background: var(--cream);
    border-bottom: 1px solid var(--cream-dark);
    box-shadow: 0 2px 14px rgb(20 26 15 / 10%);
}
.calculator-shell-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    min-height: 68px;
    max-width: 1180px;
    margin: 0 auto;
    padding: var(--space-sm) var(--space-xl);
}
.calculator-shell-logo {
    display: inline-flex;
    flex: 0 1 auto;
    min-width: 0;
}
.calculator-shell-logo img {
    display: block;
    width: auto;
    height: 44px;
}
.calculator-shell-logo:focus-visible {
    outline: 3px solid var(--terracotta);
    outline-offset: 3px;
}
.skip-link {
    position: absolute;
    top: 0;
    left: var(--space-md);
    z-index: 200;
    padding: var(--space-sm) var(--space-md);
    color: var(--cream);
    background: var(--olive-deep);
    transform: translateY(-120%);
}
.skip-link:focus {
    position: fixed;
    transform: translateY(env(safe-area-inset-top, 0));
}
/* Must out-rank the shared `.calc-page .calc-hero` block below (same file,
   later in source order): the wizard pages have a sticky shell header, so the
   fixed-header compensation there must not apply here. */
.calc-page.calc-concordato .calc-hero {
    min-height: auto;
    padding: var(--space-2xl) var(--space-lg);
}

.ccr-cta-secondary svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.ccr-semantic-groups {
    display: grid;
    gap: var(--space-md);
}
.ccr-semantic-group {
    min-width: 0;
    padding: var(--space-md);
    border: 1px solid var(--stone);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}
.ccr-semantic-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}
.ccr-known-total {
    flex: 0 1 auto;
    padding: 0.45rem 0.7rem;
    font-size: 0.76rem;
}

.ccr-semantic-note {
    margin: var(--space-sm) 0 0;
    color: var(--earth);
    font-size: 0.84rem;
    line-height: 1.45;
}

/* ============================================================
   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;
    /* The success handler focuses and scrolls this anchor. Keep its heading
       below the fixed solid header (96px on desktop) with a small reading gap. */
    scroll-margin-top: calc(var(--header-height) + var(--space-xl));
}
.ccr-primary-action {
    margin: 0 0 18px;
}
.ccr-cta-secondary svg {
    inline-size: 18px;
    block-size: 18px;
    flex: 0 0 18px;
}
.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);
}

/* 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;
    max-width: 100%;
    text-align: left;
    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;
    min-height: 44px;
    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); }
.calc-concordato .wz-btn-primary {
    background: var(--wz-action-color);
    color: var(--cream);
}
.calc-concordato .wz-btn-primary:hover {
    background: var(--wz-action-hover);
    color: var(--cream);
}
.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; }

.calc-concordato :is(
    .wz-btn,
    .wz-pill,
    .wz-option,
    .wz-toggle-opt,
    .wz-step-btn,
    .wz-input-text,
    .ccr-info-btn,
    .ccr-address-suggest button
):focus-visible {
    outline: 3px solid var(--wz-action-color);
    outline-offset: 3px;
}

.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) {
    .calculator-shell-header-inner {
        min-height: 60px;
        padding: 8px var(--space-md);
    }
    .calculator-shell-logo img { height: 38px; }

    .ccr-semantic-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .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%;
    }
}

.calc-concordato .wz-nav--steps {
    align-items: stretch;
    flex-direction: column;
}
.calc-concordato .wz-nav--steps .wz-btn-primary {
    flex: none;
    width: 100%;
}
.calc-concordato .wz-nav--steps .wz-btn-link {
    align-self: center;
    color: var(--wz-action-color);
    min-height: 44px;
    padding: 8px 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
    width: auto;
}
.calc-concordato .wz-nav--steps .wz-btn-link:hover {
    color: var(--wz-action-hover);
}

.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;
  min-height: 300px;
  box-sizing: border-box;
}
.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: rgb(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;
}

/* ============================================================
   Wizard input-text component (text/email inputs in the wizard)
   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 rgb(122, 132, 89, 0.15);
}
.wz-input-text::placeholder {
    color: var(--earth);
    opacity: 0.7;
}

/* ============================================================
   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: optional;
  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: optional;
  unicode-range: U+0020, U+002C-002F, U+0030-0039, U+2013, U+20AC;
}

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

/* Sticky primary CTA — appears on the result when the real CTA scrolls off. */
.calc-concordato .ccr-sticky-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1090;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgb(250, 247, 242, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 22px rgb(20, 26, 15, 0.16);
    border-top: 1px solid var(--stone-200, #E7DED4);
}
.calc-concordato .ccr-sticky-cta .wz-btn-primary { width: 100%; margin: 0; }

/* Common-parking count stepper inside the accessories accordion. */
.calc-concordato .ccr-stepper-field { margin: 4px 0 8px; }
.calc-concordato .ccr-stepper-field .wz-stepper { margin-top: 6px; }

/* ---------------------------------------------------------------------
   Unanswered questions after a refused «Continua» (owner 2026-09-29).
   The calculator marks a question with aria-invalid="true" while it has no
   answer and takes the mark away the moment it is answered; the frame below
   only reads that mark. Same signal as the open question card of the app
   (terracotta 1.5px line and a light shadow). `wz-question` wraps the label
   and its control; a field with no label of its own carries the mark
   directly.
   The frame is an absolutely positioned line around the question, so a step
   does not change height, or push a button away from the finger, when a
   question is marked or answered. It stands 8px off the sides and 4px off the
   top and bottom: the label never touches it, the card padding (24px) leaves
   room at the sides, and the 12px between two stacked questions still leaves a
   gap between their frames. Side by side (two columns on wider screens) the
   sides need more room between cells, hence the wider column gap.
   --------------------------------------------------------------------- */
.calc-concordato .wz-question { position: relative; border-radius: var(--radius-md); }
.calc-concordato .ccr-row:has(> .wz-question) { column-gap: 24px; }
.calc-concordato .wz-question:has([aria-invalid="true"])::after {
    content: "";
    position: absolute;
    inset: -4px -8px;
    border: 1.5px solid var(--terracotta);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    pointer-events: none;
}
.calc-concordato .wz-input-text[aria-invalid="true"] {
    border-color: var(--terracotta);
    box-shadow: var(--shadow-soft);
}
/* A browser without :has() still shows which control is waiting. */
@supports not selector(:has(*)) {
    .calc-concordato .wz-question [aria-invalid="true"] {
        outline: 1.5px solid var(--terracotta);
        outline-offset: 3px;
    }
}

/* =====================================================================
   Risultato — variante B del redesign 2026-08-31 (task e6a3f57c).
   Il canone è coperto e si sblocca registrandosi; la scala dei quattro
   passaggi è la scena (handoff sito v1.1, 2026-09-25); la card di
   registrazione sta in colonna sticky da 900px e in coda su mobile.

   Solo layout: ogni colore, spaziatura, raggio e ombra viene dai token
   in src/css/tokens.css. Nessun token nuovo; l'unico valore derivato è
   il fondo di «Incluso», un color-mix di --city-torino.

   Contrasto (handoff §7): il testo secondario piccolo usa --bark e non
   --earth (3.57:1 su cream, sotto AA). La terracotta qui è un SEGNO —
   barretta, sottolineatura, riempimento dei pulsanti — mai il colore di
   un testo da leggere.
   ===================================================================== */
/* Con l'hero nascosto quella spaziatura non stacca piu' da niente: il
   risultato riparte dall'alto invece che da un vuoto di 88px. */
.calc-concordato .calc-content.is-result { padding-top: var(--space-xl); }
/* «Come si calcola…» distoglie dall'azione quando c'è il risultato; prima
   resta, serve alla SEO. Solo le sei pagine città portano is-result: gli
   altri calcolatori e la pagina nazionale tengono la sezione. */
/* «Come si calcola…» e «Approfondimenti correlati» distolgono dall'azione quando c'è il
   risultato; prima restano, servono alla SEO e a chi vuole leggere (owner 2026-10-02). */
.calc-concordato .calc-content.is-result .calc-howto,
.calc-concordato .calc-content.is-result .calc-crosslinks { display: none; }
/* Le card dei passi sono corte: mentre si compila, «Come si calcola» saliva
   nella schermata. I testi restano sempre visibili (SEO, owner 2026-10-07):
   li stacca dal calcolatore solo un margine più ampio. */
.calc-concordato .wz-stage ~ .calc-howto { margin-top: clamp(120px, 30vh, 280px); }

.calc-concordato .ccr-gate-hero {
    max-width: 760px;
    margin: 0 auto 30px;
    /* Il calcolo riuscito mette il fuoco qui: il titolo deve restare sotto
       l'header fisso, non finirci dietro. */
    scroll-margin-top: calc(var(--header-height) + var(--space-xl));
}

.calc-concordato .ccr-gate-eyebrow {
    display: flex; align-items: center; gap: 9px;
    margin: 0 0 var(--space-sm);
    font-family: var(--font-body);
    font-size: 12px; font-weight: var(--weight-bold);
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--olive-deep);
}
.calc-concordato .ccr-gate-eyebrow::before {
    content: ""; flex-shrink: 0;
    width: 22px; height: 2px; background: var(--terracotta);
}

.calc-concordato .ccr-gate-title {
    margin: 0 0 14px;
    font-family: var(--font-display); font-weight: var(--weight-bold);
    font-size: clamp(2rem, 5.4vw, 3rem); line-height: 1.12;
    letter-spacing: -0.01em; color: var(--olive-deep);
}
/* L'enfasi la portano corsivo e peso; la terracotta resta accento come
   sottolineatura invece che come colore del testo (handoff §7b). */
.calc-concordato .ccr-gate-title em {
    font-style: italic; color: inherit;
    font-weight: var(--weight-bold);
    text-decoration: underline;
    text-decoration-color: var(--terracotta);
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
}

.calc-concordato .ccr-gate-recap {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: var(--space-sm) var(--space-md);
    font-size: 14px; color: var(--bark);
}
.calc-concordato .ccr-gate-recap span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.calc-concordato .ccr-gate-recap svg {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    color: var(--olive-light);
}
.calc-concordato .ccr-gate-recap-addr {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calc-concordato .ccr-gate-grid {
    display: grid;
    gap: 22px;
    align-items: start;
}
@media (min-width: 900px) {
    .calc-concordato .ccr-gate-grid { grid-template-columns: 1fr 400px; }
    /* Il wizard e' una colonna stretta (640px) perche' e' un modulo da
       compilare. Il risultato invece e' a due colonne e vuole la larghezza
       del design: esce dalla colonna del wizard restando centrato, senza
       toccare i passi che lo precedono. */
    .calc-concordato .ccr-gate {
        width: min(1120px, 100vw - 3rem);
        margin-left: 50%;
        transform: translateX(-50%);
    }
}

.calc-concordato .ccr-gate-card {
    /* Senza questo la card non scende sotto la larghezza minima del suo
       contenuto e allarga la pagina su telefono (learning 6a0c9973). */
    min-width: 0;
    background: var(--bg-surface, #fff);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: var(--space-xl);
}
@media (min-width: 720px) {
    .calc-concordato .ccr-gate-card { padding: var(--space-2xl); }
}

/* Anteprima coperta ------------------------------------------------- */
.calc-concordato .ccr-peek {
    display: flex; flex-wrap: wrap; align-items: center; gap: 20px;
    margin-bottom: 26px; padding: 20px 24px;
    background: var(--sage-mist); border-radius: var(--radius-lg);
}
/* 9px dopo quattro passaggi: a 4px la cifra era quasi decifrabile, a 11px
   illeggibile e muta. A 9px si legge come una cifra senza consegnarla. */
.calc-concordato .ccr-peek-val {
    /* Il mockup mostra una cifra sola ("1.040"); il motore restituisce un
       INTERVALLO, molto piu' largo. Su telefono cifra e pulsante si impilano
       e la scala parte piu' bassa, cosi' l'intervallo resta su una riga. */
    flex: 1 1 100%; min-width: 0; text-align: center;
    font-family: var(--font-display); font-weight: var(--weight-black);
    font-size: clamp(1.6rem, 5.2vw, 3.4rem); line-height: 1;
    color: var(--olive-deep);
    filter: blur(9px);
    user-select: none;
}
.calc-concordato .ccr-peek-unit {
    font-size: 0.4em;
    font-weight: var(--weight-bold);
    white-space: nowrap;
}

.calc-concordato .ccr-peek-unlock {
    display: inline-flex; flex-shrink: 0; align-items: center; gap: 8px;
    min-height: 44px; padding: 0 18px;
    /* Su telefono cifra e pulsante si impilano: il pulsante prende la riga
       intera, e torna accanto alla cifra appena c'e' spazio. */
    width: 100%; justify-content: center;
    border: none; border-radius: var(--radius-full);
    background: var(--terracotta);
    font-family: var(--font-body); font-size: 15px; font-weight: var(--weight-bold);
    color: var(--cream); white-space: nowrap; cursor: pointer;
    box-shadow: var(--shadow-cta);
    transition: transform var(--transition-base, 0.3s ease);
}
.calc-concordato .ccr-peek-unlock:hover { transform: translateY(-2px); }
@media (min-width: 560px) {
    .calc-concordato .ccr-peek-val { flex: 1 1 auto; }
    .calc-concordato .ccr-peek-unlock { width: auto; }
}
.calc-concordato .ccr-peek-unlock svg {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
}

/* Scala dei quattro passaggi ---------------------------------------- */
/* Passo attuale e passaggi successivi hanno la stessa geometria: pallino
   40px, titolo centrato sul pallino, riga sotto nel corpo del sito. Il
   passo attuale non ha riquadro: lo distinguono il pallino e il bollino. */
.calc-concordato .ccr-ladder-next {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}
.calc-concordato .ccr-ladder-step,
.calc-concordato .ccr-ladder-next li {
    display: flex;
    gap: var(--space-md);
}
@media (max-width: 479px) {
    .calc-concordato .ccr-ladder-step,
    .calc-concordato .ccr-ladder-next li { gap: 12px; }
}
/* Riga attuale e prossimi passaggi con lo stesso rientro: 16px, 12px sotto
   i 480px (handoff sito v1.1 §1). Sulla lista, non su ogni passo; dopo il
   reset `padding: 0` della lista. */
.calc-concordato .ccr-ladder-step,
.calc-concordato .ccr-ladder-next { padding-left: 16px; }
@media (max-width: 480px) {
    .calc-concordato .ccr-ladder-step,
    .calc-concordato .ccr-ladder-next { padding-left: 12px; }
}
.calc-concordato .ccr-ladder-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 40px;
}
/* Cifre in Source Serif: quelle di Overlock non sono allineate e il 3
   scende fuori centro. */
.calc-concordato .ccr-ladder-dot {
    display: flex; flex-shrink: 0; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--radius-full);
    font-family: var(--font-body); font-weight: var(--weight-bold); font-size: 17px;
    font-variant-numeric: lining-nums tabular-nums;
    line-height: 1;
}
.calc-concordato .ccr-ladder-dot--now {
    background: var(--terracotta);
    color: var(--cream);
    box-shadow: var(--shadow-cta-soft);
}
.calc-concordato .ccr-ladder-dot--next {
    background: var(--olive);
    color: var(--cream);
}
.calc-concordato .ccr-ladder-wire {
    flex: 1;
    width: 2px;
    min-height: 18px;
    margin: 4px 0;
    background: var(--stone);
}
.calc-concordato .ccr-ladder-body {
    flex: 1;
    min-width: 0;
    padding-bottom: var(--space-lg);
}
.calc-concordato .ccr-ladder-step .ccr-ladder-body,
.calc-concordato .ccr-ladder-next li:last-child .ccr-ladder-body { padding-bottom: 0; }
/* Alta quanto il pallino, così il titolo gli sta centrato; su telefono un
   titolo lungo va a capo e la riga cresce invece di traboccare. */
.calc-concordato .ccr-ladder-h {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-height: 40px;
}
.calc-concordato .ccr-ladder-h b {
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    font-size: 22px;
    line-height: 1.2;
    color: var(--olive-deep);
}
.calc-concordato .ccr-ladder-sub {
    margin: 2px 0 0;
    font-size: 17px;
    line-height: 1.55;
    color: var(--bark);
}

/* Il divisore separa fisicamente il passo gratuito da quelli inclusi
   nella pratica. --bark e non --earth: contrasto (handoff §7). */
.calc-concordato .ccr-ladder-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    font-size: 12px;
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--bark);
}
.calc-concordato .ccr-ladder-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--stone);
}

.calc-concordato .ccr-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: var(--radius-full);
    font-size: 12.5px; font-weight: var(--weight-bold);
    letter-spacing: 0.02em; white-space: nowrap;
    background: var(--sage-mist); color: var(--olive-deep);
}
.calc-concordato .ccr-pill svg {
    width: 13px;
    height: 13px;
}
/* «Incluso» ha la forma di «Gratuito» ma non il colore né la spunta, così
   non si legge come gratis: aubergine su aubergine chiaro, circa 6:1
   misurato nel browser. Il colore resta questo in ogni città, Torino
   compresa. */
.calc-concordato .ccr-pill--included {
    background: color-mix(in oklch, var(--city-torino) 14%, var(--bg-surface));
    color: var(--city-torino);
}

/* Card di registrazione --------------------------------------------- */
@media (min-width: 900px) {
    .calc-concordato .ccr-gate-side {
        position: sticky;
        top: 24px;
    }
}
.calc-concordato .ccr-gate-side.is-hi { box-shadow: 0 0 0 3px var(--terracotta), var(--shadow-medium); }
.calc-concordato .ccr-reg-title {
    margin: 0 0 var(--space-lg);
    font-size: 21px;
    line-height: 1.25;
}
/* Pulsante secondario della card: «Continua con Google» e, nel passo della
   posta, «Inserisci il codice». */
.calc-concordato .ccr-reg-google,
.calc-concordato .ccr-reg-secondary {
    display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px;
    /* Niente padding orizzontale: su telefono la card lascia ~200px utili e
       "Continua con Google" andava a capo spezzando il pulsante in due. */
    min-height: 52px; padding: 0 var(--space-sm);
    border: 2px solid var(--stone); border-radius: var(--radius-full);
    background: var(--bg-surface, #fff);
    font-family: var(--font-body); font-size: 16px; font-weight: var(--weight-semibold);
    color: var(--bark); cursor: pointer;
    transition: transform var(--transition-base, 0.3s ease), border-color var(--transition-base, 0.3s ease), box-shadow var(--transition-base, 0.3s ease);
}
.calc-concordato .ccr-reg-google:hover:not(:disabled),
.calc-concordato .ccr-reg-secondary:hover {
    border-color: var(--olive-light); transform: translateY(-2px); box-shadow: var(--shadow-medium);
}
.calc-concordato .ccr-reg-google:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}
.calc-concordato .ccr-reg-google svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.calc-concordato .ccr-reg-sep {
    display: flex; align-items: center; gap: var(--space-sm);
    margin: var(--space-md) 0; font-size: 13px; color: var(--bark);
}
.calc-concordato .ccr-reg-sep::before,
.calc-concordato .ccr-reg-sep::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--cream-dark);
}

.calc-concordato .ccr-reg-input {
    width: 100%; min-height: 52px;
    padding: 0 var(--space-lg);
    border: 2px solid var(--stone); border-radius: var(--radius-full);
    background: var(--bg-surface, #fff);
    font-family: var(--font-body); font-size: 16px; color: var(--bark);
    outline: none;
    transition: border-color var(--transition-fast, 0.15s ease), box-shadow var(--transition-fast, 0.15s ease);
}
.calc-concordato .ccr-reg-input::placeholder {
    color: var(--bark);
    opacity: 0.75;
}
.calc-concordato .ccr-reg-input:focus {
    border-color: var(--terracotta);
    box-shadow: 0 0 0 4px var(--terracotta-pale);
}

.calc-concordato .ccr-reg-cta {
    display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px;
    min-height: 56px; margin-top: 12px;
    border: none; border-radius: var(--radius-full);
    background: var(--terracotta);
    font-family: var(--font-body); font-size: 17px; font-weight: var(--weight-bold);
    color: var(--cream); cursor: pointer;
    transition: transform var(--transition-base, 0.3s ease), box-shadow var(--transition-base, 0.3s ease);
}
.calc-concordato .ccr-reg-cta:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-cta);
}
.calc-concordato .ccr-reg-cta:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}
.calc-concordato .ccr-reg-cta svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

/* Riga finale: informazione dovuta, non rassicurazione. */
.calc-concordato .ccr-reg-fine {
    margin: var(--space-md) 0 0; font-size: 13.5px; line-height: 1.5;
    color: var(--bark); text-align: center;
}

/* L'assistenza condivisa e' pensata per il fondo scuro dell'overlay: dentro
   la card bianca quel cream e' invisibile. Stesso anchor, colore leggibile. */
.calc-concordato .ccr-gate-side .fc-support {
    margin-top: var(--space-lg);
    color: var(--bark);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.calc-concordato .ccr-gate-side .fc-support:hover { color: var(--terracotta); }
.calc-concordato .ccr-reg-err {
    margin: var(--space-sm) 0 0;
    font-size: 14px;
    color: #B23E22;
}
.calc-concordato .ccr-reg-ts {
    display: flex;
    justify-content: center;
    min-height: 0;
}
.calc-concordato .ccr-reg-ts:not(:empty) { margin-bottom: var(--space-md); }

/* Passo "controlla la posta", stessa card. */
.calc-concordato .ccr-reg-inbox { text-align: center; }
.calc-concordato .ccr-reg-inbox-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; margin-bottom: var(--space-md);
    border-radius: var(--radius-full); background: var(--sage-mist); color: var(--olive-deep);
}
.calc-concordato .ccr-reg-inbox-badge svg {
    width: 26px;
    height: 26px;
}
.calc-concordato .ccr-reg-inbox p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--bark);
}
.calc-concordato .ccr-reg-inbox-mail {
    word-break: break-all;
    color: var(--olive-deep);
}
.calc-concordato .ccr-reg-actions {
    display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-md);
    margin-top: var(--space-md);
}
.calc-concordato .ccr-reg-link {
    padding: 0; border: none; background: none;
    font-family: var(--font-body); font-size: 15px; font-weight: var(--weight-semibold);
    color: var(--terracotta); text-decoration: underline; text-underline-offset: 3px;
    cursor: pointer;
}
.calc-concordato .ccr-reg-link:disabled {
    color: var(--bark);
    cursor: not-allowed;
    opacity: 0.6;
}
.calc-concordato .ccr-reg-code { margin-top: var(--space-lg); }
.calc-concordato .ccr-reg-code p { margin: 0 0 var(--space-sm); }
.calc-concordato .ccr-reg-secondary { text-decoration: none; }

/* Testo per la sola lettura assistiva. */
.calc-concordato .wz-a11y-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Verifica silenziosa: la challenge gestita di norma passa da sola, quindi il
   box anti-bot resta compresso (nessun salto di layout). Si mostra solo quando
   serve il visitatore — nessun token in tempo, errore o scadenza — via classe
   is-revealed aggiunta da calc.js. */
.calc-concordato .cf-turnstile.cc-quiet {
    max-height: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
}

.calc-concordato .cf-turnstile.cc-quiet.is-revealed {
    max-height: 80px;
    margin: 16px 0 20px;
    opacity: 1;
    overflow: visible;
    visibility: visible;
}

/* Inline description content also works inside labels. */
.calc-concordato .ccr-help-title {
    display: block;
    margin-bottom: 6px;
    color: var(--olive-deep);
}

.calc-concordato .ccr-help-text {
    display: block;
    font-size: 0.85rem;
    line-height: 1.5;
    font-weight: 400;
    color: var(--bark);
}

/* Description help is shared by all city calculators. */
  .calc-concordato .ccr-label-row { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
  .calc-concordato .ccr-label-row .ccr-field-label { margin: 0; }
  .calc-concordato .ccr-search-row { margin-bottom: 16px; }
  .calc-concordato .ccr-empty-search { padding: 14px 0; color: var(--earth, #8B8178); font-size: 0.9rem; }
  .calc-concordato .ccr-accordion { margin-top: 18px; }
  .calc-concordato .ccr-accordion[open] .ccr-accordion-toggle { background: var(--sage-mist, #E8EEE0); }
  .calc-concordato .ccr-accordion[open] .ccr-accordion-chevron { transform: rotate(90deg); }
  .calc-concordato .ccr-accordion-toggle {
    display: flex; align-items: center; gap: 12px;
    width: 100%; cursor: pointer;
    padding: 14px 18px;
    background: var(--cream-dark, #F2EDE4);
    border: 1.5px solid var(--stone, #DAD7CD);
    border-radius: var(--radius-md, 1rem);
    font-family: var(--font-display, Georgia, serif);
    font-weight: 700; font-size: 1rem;
    color: var(--olive-deep, #3D4832);
    list-style: none;
    transition: background 0.2s ease;
  }
  .calc-concordato .ccr-accordion-toggle:hover { background: var(--sage-mist, #E8EEE0); }
  .calc-concordato .ccr-accordion-toggle::-webkit-details-marker { display: none; }
  .calc-concordato .ccr-accordion-chevron {
    width: 18px; height: 18px; flex-shrink: 0;
    color: var(--olive, #5C6B4A);
    transition: transform 0.2s ease;
  }
  .calc-concordato .ccr-accordion-body { padding: 16px 4px 4px; }
  [x-cloak] { display: none !important; }
  .calc-concordato .ccr-label-row { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
  .calc-concordato .ccr-label-row .ccr-field-label { margin: 0; }
  .calc-concordato .ccr-info-wrap { position: relative; display: inline-flex; }
  .calc-concordato .ccr-info-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; border: 0; cursor: pointer;
    background: transparent; color: var(--olive, #5C6B4A);
    border-radius: 50%;
  }
  .calc-concordato .ccr-info-btn:hover { background: var(--sage-mist, #E8EEE0); }
  .calc-concordato .ccr-info-btn svg { width: 24px; height: 24px; }
  .calc-concordato .ccr-popover {
    position: absolute; top: calc(100% + 8px); left: -8px;
    min-width: 240px; max-width: 320px;
    background: var(--bg-surface, #fff);
    border: 1px solid var(--stone, #DAD7CD);
    border-radius: var(--radius-md, 1rem);
    box-shadow: 0 6px 24px rgb(74 63 53 / 10%);
    padding: 12px 14px; z-index: 30;
    text-align: left;
  }
  .calc-concordato .ccr-popover .ccr-popover-title {
    margin: 0 0 6px; font-family: var(--font-display, Georgia, serif);
    font-weight: 700; font-size: 0.95rem; color: var(--olive-deep, #3D4832);
    line-height: var(--leading-snug); letter-spacing: -0.005em;
  }
  .calc-concordato .ccr-popover p {
    margin: 0; font-size: 0.85rem; line-height: 1.5; color: var(--bark, #4A3F35);
  }
  /* On narrow screens help expands in the row instead of covering the
     question controls or the primary action. */
  @media (max-width: 640px) {
    .calc-concordato .ccr-label-row { flex-wrap: wrap; }
    .calc-concordato .ccr-info-wrap { display: contents; }
    .calc-concordato .ccr-popover {
      position: static;
      flex: 0 0 100%;
      margin-top: 6px;
      min-width: 0;
      max-width: none;
      width: 100%;
    }
  }
