/* Supporto Universitario · Calcolatore voto di laurea — stili (si appoggia a style.css) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nav a.is-active:not(.btn) { color: var(--ink); background: rgba(255, 255, 255, .06); }
[hidden] { display: none !important; }
code { font-family: var(--mono); font-size: .88em; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); padding: 2px 7px; border-radius: 7px; color: var(--ice); white-space: nowrap; }

/* ---------- hero ---------- */
.calc-hero { padding: clamp(120px, 14vw, 170px) 0 clamp(34px, 5vw, 60px); overflow: hidden; }
.calc-hero::before { content: ""; position: absolute; width: 60vw; height: 60vw; max-width: 800px; max-height: 800px; right: -16vw; top: -22vw; border-radius: 50%; background: radial-gradient(circle, rgba(216, 255, 101, .14), transparent 68%); pointer-events: none; }
.crumbs { display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 30px; position: relative; }
.crumbs a:hover { color: var(--lime); }
.calc-title { font-size: clamp(42px, 7.6vw, 108px); max-width: 14ch; position: relative; }
.calc-hero .lead { position: relative; }
.calc-hero .lead strong { color: var(--ink); font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; position: relative; }
.chip-row li { display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: rgba(13, 16, 24, .6); }
.chip-row svg { color: var(--lime); width: 15px; height: 15px; }

/* ---------- griglia strumento ---------- */
.calc-section { padding: 10px 0 clamp(70px, 9vw, 120px); }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, .9fr); gap: clamp(18px, 2.4vw, 32px); align-items: start; }
.calc-inputs { min-width: 0; }
.calc-result { position: sticky; top: 88px; display: grid; gap: 16px; min-width: 0; max-height: calc(100vh - 104px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; padding: 2px 4px 2px 0; margin-right: -4px; }

/* ---------- schede input ---------- */
.card { background: linear-gradient(165deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 2.4vw, 30px); margin: 0 0 16px; min-width: 0; }
.card-h { float: left; width: 100%; padding: 0; margin: 0 0 20px; font-size: clamp(20px, 2vw, 26px); font-weight: 700; letter-spacing: -.03em; color: var(--ink); display: flex; align-items: baseline; gap: 12px; }
.card-h + * { clear: both; }
.card-n { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .12em; color: var(--lime); }
.card--goal { border-color: rgba(216, 255, 101, .28); background: linear-gradient(165deg, #12190f, var(--card)); }
.card .field + .field, .card .field + .toggles, .card .toggles + .hint, .card .hint + .field, .card .field + .rules { margin-top: 18px; }
.lbl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.out { font-family: var(--mono); font-size: 13px; color: var(--ink); letter-spacing: .04em; }
.out--lime { color: var(--lime); font-weight: 500; }
.hint { font-size: 13.5px; line-height: 1.5; color: var(--muted); margin-top: 8px; }
.hint.is-err { color: #ff8a93; }
.field--inline { display: grid; grid-template-columns: auto auto 1fr; gap: 6px 14px; align-items: center; }
.field--inline .hint { margin: 0; grid-column: 1 / -1; }
.num-sm { width: 96px !important; text-align: center; }
.warn { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 18px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; background: rgba(185, 234, 242, .07); border: 1px solid rgba(185, 234, 242, .18); color: #cfe9ee; }
.warn svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--ice); }
.warn strong { color: var(--ink); }

/* segmented */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 5px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); border-radius: 14px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 46px; padding: 8px 10px; border-radius: 10px; font-weight: 700; font-size: 14.5px; color: var(--muted); transition: background .3s, color .3s, transform .3s var(--ease); }
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { background: var(--lime); color: #05060a; }
.seg input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }

/* select / input */
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--lime); border-bottom: 2px solid var(--lime); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.select-wrap--sm { width: 190px; }
.num-range { display: grid; grid-template-columns: 116px 1fr; gap: 18px; align-items: center; }
.num-range input[type=text] { font-family: var(--mono); font-size: 22px; font-weight: 500; text-align: center; padding: 12px 8px; color: var(--lime); }
.num-range input[aria-invalid="true"] { border-color: #ff6b76; }

/* range */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; padding: 0; border: 0; cursor: pointer; --p: 0%; }
input[type=range]:focus { box-shadow: none; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--lime) var(--p), rgba(255, 255, 255, .12) var(--p)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--lime); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--lime); border: 4px solid #05060a; box-shadow: 0 0 0 2px var(--lime), 0 6px 18px rgba(0, 0, 0, .5); margin-top: -9px; transition: transform .25s var(--ease); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--lime); border: 4px solid #05060a; box-shadow: 0 0 0 2px var(--lime); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type=range]:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 8px; }
input[type=range]:disabled { opacity: .4; cursor: not-allowed; }

/* scorciatoie */
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quick button, .btn-s { font: inherit; font-size: 13.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--ink); transition: border-color .3s, background .3s, color .3s, transform .3s var(--ease); }
.quick button:hover, .btn-s:hover { border-color: var(--lime); color: var(--lime); }
.quick button:active, .btn-s:active { transform: scale(.97); }
.btn-s svg { width: 16px; height: 16px; }
.btn-s--ghost { background: transparent; color: var(--muted); }
.btn-s[disabled] { opacity: .45; pointer-events: none; }

/* interruttori */
.toggles { display: grid; gap: 8px; }
.toggle { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .025); cursor: pointer; transition: border-color .3s, background .3s; position: relative; }
.toggle:hover { border-color: var(--line-2); }
.toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sw { flex: none; width: 44px; height: 26px; border-radius: 26px; background: rgba(255, 255, 255, .14); position: relative; transition: background .3s; }
.sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease), background .3s; }
.toggle input:checked ~ .sw { background: var(--lime); }
.toggle input:checked ~ .sw::after { transform: translateX(18px); background: #05060a; }
.toggle input:focus-visible ~ .sw { outline: 2px solid var(--lime); outline-offset: 3px; }
.toggle:has(input:checked) { border-color: rgba(216, 255, 101, .45); background: rgba(216, 255, 101, .05); }
.toggle .tx { font-weight: 600; font-size: 15px; color: var(--ink); }
.toggle em { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--lime); margin-left: 6px; }
.toggle.is-shared .tx::after { content: "in alternativa al precedente"; margin-left: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* regole */
.rules { border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; background: rgba(255, 255, 255, .02); }
.rules summary { padding: 14px 0; font-size: 15px; }
.rules[open] { padding-bottom: 16px; }
.rules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; margin: 14px 0; }
.rules-grid label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rules-grid input { padding: 10px 12px; font-size: 15px; }

/* esami */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.exam-head, .exam-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px 66px 64px 74px 38px; gap: 8px; align-items: center; }
.exam-head { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 2px 8px; }
.exam-list { display: grid; gap: 8px; max-height: 480px; overflow-y: auto; padding: 2px; margin: 0 -2px 18px; scrollbar-width: thin; }
.exam-row input[type=text], .exam-row input[type=number] { padding: 10px 12px; font-size: 15px; border-radius: 10px; }
.exam-row input[type=number] { text-align: center; -moz-appearance: textfield; }
.exam-row input[type=number]::-webkit-outer-spin-button, .exam-row input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.exam-row.is-bad input.ex-v, .exam-row.is-bad input.ex-c { border-color: #ff6b76; }
.exam-row.is-idon .ex-n { opacity: .7; }
.exam-row .chk { position: relative; cursor: pointer; }
.exam-row .chk input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.exam-row .chk span { display: flex; align-items: center; justify-content: center; height: 42px; border-radius: 10px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--muted); transition: all .25s; }
.exam-row .chk input:checked + span { background: var(--lime); border-color: var(--lime); color: #05060a; font-weight: 500; }
.exam-row .chk input:disabled + span { opacity: .35; cursor: not-allowed; }
.exam-row .chk input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }
.ex-del { width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); display: grid; place-items: center; transition: all .25s; }
.ex-del:hover { color: #ff8a93; border-color: rgba(255, 107, 118, .4); }
.ex-del svg { width: 18px; height: 18px; }
.exam-empty { padding: 22px; text-align: center; border: 1px dashed var(--line-2); border-radius: 14px; font-size: 14.5px; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.mini-stats div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .025); display: grid; gap: 4px; }
.mini-stats span { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mini-stats b { font-size: 22px; letter-spacing: -.03em; color: var(--ink); font-weight: 700; }
.mini-stats div:first-child b { color: var(--lime); }
#panelEsami .field--inline { margin-top: 16px; }

/* obiettivo */
.goal-out { margin-top: 18px; display: grid; gap: 10px; }
.goal-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); font-size: 14.5px; }
.goal-line b { font-size: 28px; letter-spacing: -.04em; color: var(--lime); line-height: 1; }
.goal-sub, .goal-empty { font-size: 13.5px; color: var(--muted); }
.goal-ok, .goal-no { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; }
.goal-ok { background: rgba(216, 255, 101, .09); border: 1px solid rgba(216, 255, 101, .35); color: var(--ink); }
.goal-no { background: rgba(255, 138, 147, .08); border: 1px solid rgba(255, 138, 147, .3); color: #ffd0d4; }
.goal-ok svg, .goal-no svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.goal-ok svg { color: var(--lime); } .goal-no svg { color: #ff8a93; }
.goal-ok strong, .goal-no strong { color: var(--ink); }

/* ---------- risultato ---------- */
.res-card { position: relative; background: linear-gradient(165deg, #151c27, var(--card) 70%); border: 1px solid var(--line-2); border-radius: 26px; padding: clamp(20px, 2.4vw, 30px); box-shadow: 0 40px 120px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08); overflow: hidden; }
.res-card::before { content: ""; position: absolute; width: 360px; height: 360px; right: -140px; top: -170px; border-radius: 50%; background: radial-gradient(circle, rgba(216, 255, 101, .16), transparent 68%); pointer-events: none; }
.calc-grid.has-lode .res-card::before { background: radial-gradient(circle, rgba(216, 255, 101, .32), transparent 68%); }
.res-top { display: flex; justify-content: space-between; align-items: center; position: relative; }
.res-top .eyebrow { margin: 0; }
.live { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); animation: blink 1.8s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.ring-wrap { position: relative; width: min(100%, 250px); aspect-ratio: 1; margin: 18px auto 8px; }
.ring { width: 100%; height: 100%; display: block; overflow: visible; }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, .09); stroke-width: 12; }
.ring-fg { fill: none; stroke: url(#rg); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease), filter .5s; filter: drop-shadow(0 0 10px rgba(216, 255, 101, .35)); }
.ring-fg.is-lode { filter: drop-shadow(0 0 18px rgba(216, 255, 101, .8)); }
.ring-in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px; }
.vote { display: flex; align-items: baseline; justify-content: center; gap: 4px; color: var(--ink); font-weight: 800; letter-spacing: -.06em; line-height: .9; }
.vote span { font-size: clamp(56px, 6.4vw, 72px); font-variant-numeric: tabular-nums; }
.vote small { font-size: 17px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.vote-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--lime); max-width: 14ch; margin: 0 auto; }
.tier { text-align: center; font-size: 15px; color: var(--ink); max-width: 34ch; margin: 6px auto 22px; line-height: 1.5; }
.break { margin: 0; display: grid; border-top: 1px solid var(--line-2); }
.break div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.break dt { color: var(--muted); }
.break dt small { color: var(--ice); font-family: var(--mono); font-size: 11px; margin-left: 4px; }
.break dd { margin: 0; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.break .tot dt { color: var(--ink); font-weight: 600; } .break .tot dd { color: var(--lime); }

.scen { display: grid; gap: 9px; margin: 20px 0 6px; }
.scen-row { display: grid; grid-template-columns: 124px 1fr 40px; gap: 12px; align-items: center; font-size: 12.5px; }
.scen-l { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.scen-bar { position: relative; height: 10px; border-radius: 10px; background: rgba(255, 255, 255, .07); overflow: visible; }
.scen-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 10px; background: rgba(185, 234, 242, .5); transition: width .8s var(--ease); }
.scen-bar u { position: absolute; top: -4px; bottom: -4px; width: 2px; background: rgba(255, 255, 255, .35); }
.scen-row.is-now .scen-bar i { background: linear-gradient(90deg, var(--lime), var(--ice)); }
.scen-row.is-now .scen-l { color: var(--lime); }
.scen-row b { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }

.lode { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .025); }
.lode-h { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lode-h b { color: var(--lime); font-weight: 500; }
.meter { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .08); overflow: hidden; margin: 10px 0 6px; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lime), var(--ice)); border-radius: 8px; transition: width .8s var(--ease); }
.lode .hint { margin: 0; }

.formula { margin-top: 14px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.formula summary { padding: 14px 0; font-size: 14.5px; }
.formula ol { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; line-height: 1.55; }
.formula li::marker { color: var(--lime); font-family: var(--mono); }
.formula b { color: var(--ink); font-variant-numeric: tabular-nums; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.actions .btn { padding: 12px 20px; font-size: 14px; }
.actions .btn svg { width: 17px; height: 17px; }
.disc { display: flex; gap: 10px; margin-top: 16px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.disc svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.disc strong { color: var(--ink); }

.cta-card { padding: 24px; border-radius: 22px; border: 1px solid rgba(216, 255, 101, .35); background: linear-gradient(160deg, rgba(216, 255, 101, .09), transparent 70%); }
.cta-card h3 { font-size: clamp(20px, 2vw, 24px); letter-spacing: -.03em; color: var(--ink); line-height: 1.15; margin-bottom: 8px; }
.cta-card p { font-size: 14.5px; margin-bottom: 16px; }

/* ---------- contenuti ---------- */
.calc-learn { border-top: 1px solid var(--line); background: var(--bg-2); }
.calc-learn .h2 { max-width: 22ch; }
.learn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.learn-card { padding: 26px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); transition: border-color .4s, transform .5s var(--ease); }
.learn-card:hover { border-color: rgba(216, 255, 101, .45); transform: translateY(-4px); }
.learn-card .num { padding: 0; margin-bottom: 14px; }
.learn-card h3 { font-size: 24px; letter-spacing: -.03em; color: var(--ink); margin-bottom: 10px; }
.learn-card strong { color: var(--ink); }
.compare { margin-top: clamp(60px, 8vw, 110px); }
.compare-h { margin-bottom: 36px; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compare-card { padding: 26px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); }
.compare-card.good { border-color: rgba(216, 255, 101, .4); background: linear-gradient(160deg, rgba(216, 255, 101, .07), var(--card)); }
.compare-card strong { color: var(--ink); }
.tag-s { display: inline-block; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ice); }
.compare-card.good .tag-s { color: var(--lime); border-color: rgba(216, 255, 101, .5); }
.compare-ex { grid-column: 1 / -1; padding: 26px; border-radius: 20px; background: var(--card-2); border: 1px solid var(--line-2); display: grid; gap: 10px; }
.compare-ex .eyebrow { margin-bottom: 4px; }
.compare-ex b, .compare-ex strong { color: var(--ink); }
.calc-line code { white-space: normal; font-size: 1em; }
.compare-ex .btn-s { justify-self: start; margin-top: 6px; }
.table-wrap { margin-top: clamp(60px, 8vw, 110px); }
.sec-head--tight { margin-bottom: 30px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 20px; background: var(--card); }
.rules-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 15px; }
.rules-table th { text-align: left; padding: 16px 20px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--lime); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.rules-table td { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.rules-table tr:last-child td { border-bottom: 0; }
.rules-table td:first-child { color: var(--ink); font-weight: 700; }

.calc-faq { border-top: 1px solid var(--line); }
.calc-faq .faq-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.calc-final { text-align: center; border-top: 1px solid var(--line); background: radial-gradient(circle at 50% 100%, rgba(216, 255, 101, .12), transparent 60%), var(--bg-2); }
.calc-final .wrap { display: flex; flex-direction: column; align-items: center; gap: 34px; }
.final-line { font-size: clamp(34px, 6.4vw, 92px); line-height: .98; letter-spacing: -.045em; font-weight: 700; color: var(--ink); max-width: 16ch; }

/* ---------- mobile ---------- */
.mini-bar { display: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; z-index: 400; padding: 13px 20px; border-radius: 999px; background: var(--lime); color: #05060a; font-weight: 700; font-size: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); transition: opacity .3s, transform .4s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.dlg { border: 1px solid var(--line-2); border-radius: 24px; background: var(--card); color: var(--muted); padding: 0; width: min(94vw, 640px); max-height: 92vh; }
.dlg::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(6px); }
.dlg-box { padding: clamp(22px, 4vw, 36px); display: grid; gap: 14px; }
.dlg-box h3 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.035em; color: var(--ink); line-height: 1.1; }
.dlg-box textarea { min-height: 190px; font-family: var(--mono); font-size: 14px; }
.dlg-act { display: flex; justify-content: flex-end; gap: 10px; align-items: center; flex-wrap: wrap; }

@media (max-width: 1020px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-result { position: static; max-height: none; overflow: visible; padding: 0; margin: 0; }
  .learn-grid { grid-template-columns: 1fr; }
  .calc-faq .faq-grid { grid-template-columns: 1fr; }
  .mini-bar { position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 95; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-radius: 999px; background: var(--lime); color: #05060a; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); transform: translateY(160%); transition: transform .5s var(--ease); }
  .mini-bar span { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; }
  .mini-bar b { font-size: 26px; letter-spacing: -.04em; margin-left: auto; line-height: 1; }
  .mini-bar svg { width: 20px; height: 20px; }
  .mini-bar.show { transform: none; }
  .toast { bottom: 84px; }
}
@media (max-width: 640px) {
  .seg span { font-size: 13px; padding: 8px 4px; min-height: 44px; }
  .field--inline { grid-template-columns: 1fr auto; }
  .field--inline .hint { grid-column: 1 / -1; }
  .exam-head { display: none; }
  .exam-row { grid-template-columns: 1fr 1fr auto auto auto; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .025); gap: 8px; }
  .exam-row .ex-n { grid-column: 1 / -1; }
  .exam-row .ex-v, .exam-row .ex-c { width: 100%; }
  .exam-row .chk span { padding: 0 12px; }
  .mini-stats { grid-template-columns: 1fr 1fr; }
  .num-range { grid-template-columns: 100px 1fr; gap: 14px; }
  .scen-row { grid-template-columns: 112px 1fr 38px; gap: 10px; }
  .compare-grid { grid-template-columns: 1fr; }
  .actions .btn, .actions .btn-s { flex: 1 1 auto; justify-content: center; }
  .calc-title { font-size: clamp(38px, 12vw, 60px); }
}

/* ---------- stampa ---------- */
.print-sheet { display: none; }
@media print {
  @page { margin: 18mm; }
  body.calc-page { background: #fff !important; color: #111 !important; }
  body.calc-page > *:not(.print-sheet):not(script) { display: none !important; }
  .print-sheet { display: block !important; font-family: "Manrope", Arial, sans-serif; color: #111; }
  .print-sheet h1 { font-size: 28px; margin: 0 0 4px; letter-spacing: -.02em; }
  .print-sheet h2 { font-size: 18px; margin: 26px 0 8px; }
  .ps-meta { color: #555; margin: 0 0 22px; font-size: 13px; }
  .ps-vote { display: flex; align-items: baseline; gap: 6px; margin: 0 0 18px; padding: 18px 22px; border: 2px solid #111; border-radius: 14px; width: fit-content; }
  .ps-vote span { font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
  .ps-vote small { font-size: 20px; color: #555; }
  .ps-table { width: 100%; border-collapse: collapse; font-size: 14px; }
  .ps-table td, .ps-table th { padding: 9px 10px; border-bottom: 1px solid #ddd; text-align: left; }
  .ps-table td:last-child, .ps-table th:last-child { text-align: right; }
  .ps-tot td { font-weight: 800; border-top: 2px solid #111; }
  .ps-note { margin-top: 28px; font-size: 12px; color: #555; }
}
@media (prefers-reduced-motion: reduce) {
  .live::before { animation: none; }
  .ring-fg, .scen-bar i, .meter i { transition: none; }
}
