/* ============================================================
   CALCOLATORE.CSS - /calcolatore-pesi/. Dipende da tokens.css + main.css.
   ============================================================ */
.page-hero__title { margin-top: var(--space-md); max-width: 16ch; }
.page-lead { margin-top: var(--space-lg); color: var(--text-2); line-height: var(--lh-prose); max-width: 56ch; }
.c2-head { padding-block: clamp(2rem, 3.9vw, 2.375rem) clamp(1.5rem, 3.1vw, 2.125rem); }
.c2-head__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 3rem; }
.c2-title {
    font-family: var(--font-display); font-weight: 400;
    font-size: clamp(2rem, 3.2vw, 2.875rem); line-height: 1.1;
    letter-spacing: var(--ls-heading); color: var(--text-1); white-space: nowrap;
    margin-top: 0.625rem;
}
.c2-lead { max-width: 470px; font-size: 1rem; line-height: 1.55; color: var(--text-2); text-wrap: pretty; margin-bottom: 0.375rem; }

.c2-tool { border-top: 1px solid var(--border); padding-block: clamp(1.5rem, 2.8vw, 2rem) clamp(2rem, 3.5vw, 2.5rem); }
.c2-rows { display: flex; flex-direction: column; gap: 1rem; }

.c2-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); background: var(--bg); border: 1px solid var(--border); }
.c2-id {
    padding: 1.25rem 1.375rem; border-right: 1px solid var(--border);
    display: flex; flex-direction: column; justify-content: center; gap: 0.75rem;
}
.c2-shape-line { stroke: var(--bronze); }
.c2-shape-inner { stroke: var(--text-3); }
/* profilo che si disegna quando la riga entra (reveal .in); statico su reduced-motion */
.motion-ready .c2-row .c2-shape-line { stroke-dasharray: 200; stroke-dashoffset: 200; }
.motion-ready .c2-row.in .c2-shape-line { transition: stroke-dashoffset 1.4s var(--ease-expo) 0.2s; stroke-dashoffset: 0; }
.motion-failed .c2-row .c2-shape-line { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
    .motion-ready .c2-row .c2-shape-line { stroke-dashoffset: 0; transition: none; }
}
.c2-name { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; letter-spacing: -0.008em; color: var(--text-1); margin: 0; }

.c2-main { display: flex; flex-direction: column; min-width: 0; }
.c2-fields {
    flex: 1; padding: 1.125rem 1.375rem 1rem;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem; align-content: start;
}
.c2-field { display: block; }
.c2-field > span { display: block; font-size: var(--fs-small); color: var(--text-2); margin-bottom: 0.375rem; }
.c2-field input {
    width: 100%; box-sizing: border-box; height: 44px; padding: 0 0.75rem;
    font-size: 1rem; font-family: var(--font-ui); color: var(--text-1);
    background: var(--bg); border: 1px solid var(--border); border-radius: 4px;
    transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.c2-field input::placeholder { color: var(--text-3); opacity: 1; }
.c2-field input:focus { outline: none; border-color: var(--bronze); box-shadow: var(--focus-ring); }
.c2-field input.is-invalid { border-color: var(--err-text); }
.c2-err { display: block; font-size: var(--fs-small); color: var(--err-text); margin-top: 0.3rem; }

/* striscia risultati scura: label grigia, valore bold - grigio finché non c'è
   un risultato, bianco quando c'è (.is-ok) */
.c2-out-strip {
    background: var(--dark); margin: 0;
    padding: 0.875rem 1.375rem 1rem;
    display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr;
    gap: 1rem; align-items: end;
}
.c2-out dt { font-size: var(--fs-small); color: var(--on-dark-2); margin-bottom: 0.2rem; }
.c2-out dd { margin: 0; font-size: 1.3125rem; font-weight: 700; color: var(--on-dark-2); }
.c2-out.is-ok dd { color: var(--on-dark); }
.c2-out dd em { font-style: normal; font-size: var(--fs-small); font-weight: 400; color: var(--on-dark-2); }

.c2-note { margin-top: 1.375rem; font-size: var(--fs-small); color: var(--text-2); }

@media (max-width: 900px) {
    .c2-head__row { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .c2-title { white-space: normal; }
    .c2-row { grid-template-columns: 1fr; }
    .c2-id {
        flex-direction: row; align-items: center; gap: 0.75rem;
        border-right: none; border-bottom: 1px solid var(--border);
        padding: 0.75rem 1rem;
    }
    .c2-shape { width: 32px; height: 32px; }
    .c2-name { font-size: 1.3125rem; }
    .c2-fields { grid-template-columns: 1fr 1fr; padding: 0.875rem 1rem 1rem; gap: 0.75rem; }
    .c2-out-strip { grid-template-columns: 1fr 1fr; padding: 0.75rem 1rem 0.875rem; gap: 0.625rem 1rem; }
    /* ordine mobile del design: Sezione | Bronzo / Ottone | Brall */
    .c2-out--sez { order: 1; }
    .c2-out:not(.c2-out--sez) { order: 2; }
    .c2-out dd { font-size: 1.1875rem; }
}
