/* ==========================================================================
   Il concetto di limite — foglio di stile comune
   ========================================================================== */

:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface2: #eceff6;
  --text: #1b2333;
  --muted: #5a6478;
  --border: #d8dde9;
  --accent: #2f5bea;
  --accent-ink: #ffffff;
  --accent2: #d9480f;
  --ok: #1f9d55;
  --ok-bg: #e5f6ec;
  --warn: #c98a00;
  --warn-bg: #fdf3d8;
  --err: #d64545;
  --err-bg: #fbe7e7;
  --fn: #2f5bea;
  --fn2: #e8590c;
  --fn3: #7c3aed;
  --grid: #e7eaf2;
  --axis: #687186;
  --plot-bg: #ffffff;
  --band-y: rgba(31, 157, 85, 0.16);
  --band-x: rgba(47, 91, 234, 0.13);
  --shadow: 0 2px 12px rgba(20, 30, 60, 0.09);
  --radius: 14px;
  --font: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1420;
    --surface: #171d2b;
    --surface2: #222a3c;
    --text: #e7ebf3;
    --muted: #9aa4b8;
    --border: #2e374b;
    --accent: #6f8fff;
    --accent-ink: #0f1420;
    --accent2: #ff8a4c;
    --ok: #3ecf7a;
    --ok-bg: #163324;
    --warn: #f5c04a;
    --warn-bg: #3a3017;
    --err: #ff6b6b;
    --err-bg: #3b1d22;
    --fn: #7a9bff;
    --fn2: #ff8a4c;
    --fn3: #b48cff;
    --grid: #232b3d;
    --axis: #8a93a8;
    --plot-bg: #131926;
    --band-y: rgba(62, 207, 122, 0.17);
    --band-x: rgba(122, 155, 255, 0.16);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1420;
  --surface: #171d2b;
  --surface2: #222a3c;
  --text: #e7ebf3;
  --muted: #9aa4b8;
  --border: #2e374b;
  --accent: #6f8fff;
  --accent-ink: #0f1420;
  --accent2: #ff8a4c;
  --ok: #3ecf7a;
  --ok-bg: #163324;
  --warn: #f5c04a;
  --warn-bg: #3a3017;
  --err: #ff6b6b;
  --err-bg: #3b1d22;
  --fn: #7a9bff;
  --fn2: #ff8a4c;
  --fn3: #b48cff;
  --grid: #232b3d;
  --axis: #8a93a8;
  --plot-bg: #131926;
  --band-y: rgba(62, 207, 122, 0.17);
  --band-x: rgba(122, 155, 255, 0.16);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* --- Base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  font-size: clamp(16px, 0.55vw + 12px, 24px);
  -webkit-text-size-adjust: 100%;
}
/* Modalità LIM: testo e controlli più grandi */
html.lim { font-size: clamp(19px, 1vw + 13px, 34px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3.2rem); }
h2 { font-size: 1.65rem; color: var(--accent); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 .8em; }
a { color: var(--accent); }
ul, ol { padding-left: 1.4em; margin: 0 0 .8em; }
li { margin: .25em 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.big { font-size: 1.25rem; }
.small { font-size: .85rem; }
.hl { color: var(--accent2); font-weight: 700; }
.ok-t { color: var(--ok); font-weight: 700; }
.err-t { color: var(--err); font-weight: 700; }

.ico {
  width: 1.3em; height: 1.3em;
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}

.katex { font-size: 1.12em; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: .15em 0; margin: .6em 0; }

/* --- Barra superiore ----------------------------------------------------- */

.topbar {
  display: flex; align-items: center; gap: .4rem;
  padding: .3rem max(.6rem, env(safe-area-inset-left));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex: none;
  position: relative; z-index: 30;
}
.tb-title {
  flex: 1; min-width: 0;
  font-weight: 700; font-size: .95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-tools { display: flex; align-items: center; gap: .2rem; }
.tb-btn {
  min-width: 2.5rem; height: 2.5rem;
  display: inline-grid; place-items: center;
  padding: 0 .45rem;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--text);
  font: inherit; font-weight: 700; font-size: .95rem;
  cursor: pointer; text-decoration: none;
}
.tb-btn:hover, .tb-btn:focus-visible { background: var(--surface2); }
.tb-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.tb-count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; padding: 0 .3rem; white-space: nowrap; }

/* --- Presentazione a slide ------------------------------------------------ */

.deck-page {
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.deck-progress { height: 5px; background: var(--surface2); flex: none; }
.deck-progress > div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }

.deck { position: relative; flex: 1; overflow: hidden; }

.slide {
  position: absolute; inset: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 1.6rem max(1rem, calc((100% - 74rem) / 2)) 6.5rem;
  opacity: 0; visibility: hidden;
  transform: translateX(3%);
  transition: opacity .35s, transform .35s, visibility 0s .35s;
}
.slide.past { transform: translateX(-3%); }
.slide.active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .35s, transform .35s;
}

.slide.title-slide {
  display: flex; flex-direction: column; justify-content: center;
}
.kicker {
  display: inline-block;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  font-size: .85rem; color: var(--accent2);
  margin-bottom: .6rem;
}
.lead { font-size: 1.3rem; color: var(--muted); max-width: 46rem; }

.nav-btn {
  position: fixed; z-index: 25;
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: 3.5rem; height: 3.5rem;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--accent);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.nav-btn .ico { width: 1.6rem; height: 1.6rem; stroke-width: 2.6; }
.nav-btn:disabled { opacity: .35; cursor: default; }
.nav-prev { left: max(1rem, env(safe-area-inset-left)); }
.nav-next { right: max(1rem, env(safe-area-inset-right)); background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.step:not(.shown) { display: none; }
.step.shown { animation: fadeUp .45s ease both; }
.step-btn { margin-top: 1rem; }
/* lo scorrimento automatico non deve finire sotto i pulsanti rotondi */
.step, .step-btn { scroll-margin-bottom: 6rem; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Elenco slide */
.menu {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(10, 14, 25, .45);
  display: none; justify-content: flex-end;
}
.menu.open { display: flex; }
.menu-panel {
  background: var(--surface);
  width: min(26rem, 92vw); height: 100%;
  overflow-y: auto; padding: 1rem;
  box-shadow: var(--shadow);
}
.menu-panel h3 { margin: .2rem 0 .8rem; }
.menu-panel ol { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.menu-panel li { margin: 0; }
.menu-panel button {
  width: 100%; text-align: left;
  display: flex; gap: .6rem; align-items: baseline;
  padding: .55rem .6rem; border: 0; border-radius: 8px;
  background: transparent; color: var(--text);
  font: inherit; cursor: pointer;
}
.menu-panel button:hover { background: var(--surface2); }
.menu-panel button.cur { background: var(--accent); color: var(--accent-ink); }
.menu-panel .n { min-width: 1.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.menu-panel button.cur .n { color: inherit; }

/* Avviso "riprendi" */
.toast {
  position: fixed; left: 1rem; right: 1rem; bottom: 5.5rem; z-index: 40;
  width: fit-content; margin: 0 auto;
  display: flex; gap: .8rem; align-items: center;
  padding: .55rem .6rem .55rem 1.1rem;
  border-radius: 999px;
  background: var(--text); color: var(--bg);
  box-shadow: var(--shadow);
  animation: fadeUp .3s ease both;
}
.toast .btn { min-height: 2.3rem; padding: .3rem .9rem; }

/* --- Layout del contenuto ------------------------------------------------- */

.cols { display: grid; gap: 1.4rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
.grid2, .grid3, .grid4 { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }

@media (min-width: 860px) {
  .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cols.r3 { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .grid2, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 560px) and (max-width: 859px) {
  .grid3, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

figure { margin: 0; }
figcaption { text-align: center; color: var(--muted); margin-top: .4rem; font-size: .95rem; }

/* --- Riquadri ------------------------------------------------------------- */

.box {
  margin: 1rem 0;
  padding: .9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius);
}
.box[data-label]::before {
  content: attr(data-label);
  display: block; margin-bottom: .3rem;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent);
}
.box.thm { border-left-color: var(--fn3); }
.box.thm[data-label]::before { color: var(--fn3); }
.box.note { border-left-color: var(--ok); }
.box.note[data-label]::before { color: var(--ok); }
.box.warn { border-left-color: var(--warn); }
.box.warn[data-label]::before { color: var(--warn); }
.box > :last-child { margin-bottom: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

/* --- Pulsanti e controlli ------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 2.8rem; padding: .45rem 1.15rem;
  border: 2px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 700; line-height: 1.2;
  cursor: pointer; text-decoration: none;
  touch-action: manipulation;
}
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger { background: transparent; color: var(--err); border-color: var(--err); }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, .tb-btn:focus-visible, .nav-btn:focus-visible, .opt:focus-visible {
  outline: 3px solid var(--accent2); outline-offset: 2px;
}
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: .7rem 0; }

.slider { display: flex; align-items: center; gap: .8rem; margin: .5rem 0; }
.slider label { min-width: 3rem; font-weight: 700; white-space: nowrap; }
.slider output { min-width: 3.5rem; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent2); white-space: nowrap; }
.slider input { flex: 1; min-width: 0; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 2.2rem; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: var(--surface2); border: 1px solid var(--border); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 1.6rem; height: 1.6rem; margin-top: calc(-0.8rem + 3px);
  border-radius: 50%; background: var(--accent); border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--accent);
}
input[type="range"]::-moz-range-track { height: 8px; border-radius: 4px; background: var(--surface2); border: 1px solid var(--border); }
input[type="range"]::-moz-range-thumb {
  width: 1.4rem; height: 1.4rem;
  border-radius: 50%; background: var(--accent); border: 3px solid var(--surface);
}

.readout {
  display: flex; flex-wrap: wrap; gap: .3rem 1.2rem;
  margin: .6rem 0; font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.readout b { color: var(--accent2); }
.msg { font-weight: 700; margin: .5rem 0; min-height: 1.5em; }
.msg.good { color: var(--ok); }
.msg.bad { color: var(--err); }

/* --- Grafici -------------------------------------------------------------- */

.plot {
  position: relative; width: 100%;
  aspect-ratio: 4 / 3; max-height: 64vh;
  background: var(--plot-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.plot.wide { aspect-ratio: 16 / 9; }
.plot.square { aspect-ratio: 1 / 1; }
.plot.strip { aspect-ratio: 5 / 1; min-height: 7rem; }
.plot canvas { display: block; width: 100%; height: 100%; }
.plot canvas.interactive { cursor: grab; touch-action: none; }
.plot canvas.interactive:active { cursor: grabbing; }
.plot-hint { font-size: .85rem; color: var(--muted); margin: .3rem 0 0; }

/* --- Tabelle -------------------------------------------------------------- */

.tables { display: flex; gap: 1rem; flex-wrap: wrap; }
.tables > div { flex: 1; min-width: 9rem; }
.tables h3 { font-size: 1rem; margin: 0 0 .4rem; color: var(--muted); }

table.values, table.summary {
  width: 100%; border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border);
}
table.values th, table.values td, table.summary th, table.summary td {
  padding: .4rem .7rem; text-align: center;
  border-bottom: 1px solid var(--border);
}
table.values th, table.summary th { background: var(--surface2); }
table.values tr.new { animation: fadeUp .4s ease both; }
table.values td:last-child { color: var(--accent2); font-weight: 700; }
table.summary td, table.summary th { text-align: left; }
.table-scroll { overflow-x: auto; }

/* --- Domande con risposta nascosta (details) ------------------------------ */

details.qa {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .45rem .9rem;
  margin: .45rem 0;
}
details.qa summary { cursor: pointer; font-weight: 700; padding: .2rem 0; }
details.qa[open] summary { margin-bottom: .3rem; }

/* --- Pagina indice -------------------------------------------------------- */

.home main {
  max-width: 74rem; margin: 0 auto;
  padding: 2rem max(1rem, env(safe-area-inset-left)) 3rem;
}
.home .hero { margin-bottom: 2rem; }
.home .hero p { font-size: 1.15rem; color: var(--muted); max-width: 48rem; }
.cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.sec-card { display: flex; flex-direction: column; gap: .5rem; }
.sec-card .num {
  width: 2.6rem; height: 2.6rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 1.2rem;
}
.sec-card h2 { font-size: 1.3rem; margin: .2rem 0 0; color: var(--text); }
.sec-card p { color: var(--muted); flex: 1; margin: 0; }
.sec-card .btn { align-self: flex-start; margin-top: .4rem; }
.meter { height: 8px; border-radius: 4px; background: var(--surface2); overflow: hidden; }
.meter > div { height: 100%; width: 0; background: var(--ok); transition: width .5s; }
.meter-label { font-size: .85rem; color: var(--muted); }
.tips { margin-top: 2rem; }
.tips ul { columns: 2 18rem; }

/* --- Home generale: schede degli argomenti ------------------------------- */

.topic-card { position: relative; display: flex; flex-direction: column; gap: .5rem; overflow: hidden; }
.topic-card h2 { font-size: 1.35rem; margin: .3rem 0 0; color: var(--text); }
.topic-card p { color: var(--muted); flex: 1; margin: 0; }
.topic-card .btn { align-self: flex-start; margin-top: .4rem; }
.topic-card .tag { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent2); }
.thumb {
  height: 7.5rem; margin: -.2rem -.3rem .2rem;
  border-radius: calc(var(--radius) - 4px); background: var(--surface2);
}
.thumb svg { display: block; width: 100%; height: 100%; }
.thumb .ax { stroke: var(--axis); stroke-width: 1.5; fill: none; }
.thumb .f1 { stroke: var(--fn); stroke-width: 3; fill: none; stroke-linecap: round; }
.thumb .f2 { stroke: var(--fn2); stroke-width: 2.5; fill: none; stroke-linecap: round; }
.thumb .area { fill: var(--band-x); stroke: none; }
.thumb .dot { fill: var(--fn2); }
.thumb .hole { fill: var(--plot-bg); stroke: var(--fn); stroke-width: 2.5; }

/* Argomenti non ancora pubblicati: contenuto sfocato con l'etichetta «In arrivo» */
.topic-card.soon { border-style: dashed; box-shadow: none; background: transparent; }
.topic-card.soon .soon-body {
  display: flex; flex-direction: column; gap: .5rem; flex: 1;
  filter: blur(5px); opacity: .55; user-select: none; pointer-events: none;
}
.soon-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  padding: .35rem 1rem; border-radius: 999px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-weight: 700; color: var(--muted);
}
.soon-badge::before { content: ''; display: inline-block; width: .55em; height: .55em; margin-right: .5em; border-radius: 50%; background: var(--warn); vertical-align: .08em; }
.home .footnote { margin-top: 2.5rem; text-align: center; color: var(--muted); font-size: .9rem; }
kbd {
  display: inline-block; padding: 0 .4em; min-width: 1.6em; text-align: center;
  border: 1px solid var(--border); border-bottom-width: 3px; border-radius: 6px;
  background: var(--surface); font: inherit; font-size: .85em;
}

/* --- Quiz ----------------------------------------------------------------- */

.app-page main.quiz-wrap {
  max-width: 62rem; margin: 0 auto;
  padding: 1.5rem max(1rem, env(safe-area-inset-left)) 3rem;
}
.summary-row { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center; margin: .6rem 0 1rem; }
.summary-row .meter { flex: 1; min-width: 10rem; height: 12px; border-radius: 6px; }
.stat b { font-size: 1.3rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0; }
.chip {
  padding: .4rem .9rem; min-height: 2.4rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: .92rem; cursor: pointer;
}
.chip .c { color: var(--muted); margin-left: .3rem; font-variant-numeric: tabular-nums; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.on .c { color: inherit; opacity: .85; }
.dots { display: flex; flex-wrap: wrap; gap: .35rem; margin: .8rem 0 1.2rem; }
.dot {
  width: 2.3rem; height: 2.3rem;
  display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: .85rem; font-variant-numeric: tabular-nums; cursor: pointer;
}
.dot.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.dot.retry { background: var(--warn); border-color: var(--warn); color: #1b2333; }
.dot.ko { background: var(--err); border-color: var(--err); color: #fff; }
.dot.cur { outline: 3px solid var(--accent); outline-offset: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .85rem; color: var(--muted); }
.legend span::before {
  content: ''; display: inline-block; width: .8em; height: .8em; border-radius: 3px;
  margin-right: .35em; vertical-align: -.05em; background: var(--surface2); border: 1px solid var(--border);
}
.legend .l-ok::before { background: var(--ok); border-color: var(--ok); }
.legend .l-retry::before { background: var(--warn); border-color: var(--warn); }
.legend .l-ko::before { background: var(--err); border-color: var(--err); }

.qcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); }
.qmeta { font-size: .88rem; color: var(--muted); margin-bottom: .6rem; }
.qmeta .lvl { color: var(--warn); letter-spacing: .1em; }
.qtext { font-size: 1.2rem; margin-bottom: 1rem; }
.qplot { max-width: 34rem; margin: 0 auto 1rem; }
.opts { display: grid; gap: .6rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.opt {
  display: flex; gap: .8rem; align-items: center;
  min-height: 3.4rem; padding: .6rem .9rem;
  text-align: left;
  border: 2px solid var(--border); border-radius: 12px;
  background: var(--bg); color: var(--text);
  font: inherit; font-size: 1.05rem; cursor: pointer;
  touch-action: manipulation;
}
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt .k {
  flex: none; width: 2rem; height: 2rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface2); font-weight: 700;
}
.opt:disabled { cursor: default; }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.right .k { background: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--err); background: var(--err-bg); }
.opt.wrong .k { background: var(--err); color: #fff; }
.opt.dim { opacity: .55; }
.feedback:empty { display: none; }
.feedback { margin-top: 1rem; padding: .9rem 1.1rem; border-radius: 12px; background: var(--surface2); }
.feedback.good { background: var(--ok-bg); }
.feedback.hint { background: var(--warn-bg); }
.feedback.bad { background: var(--err-bg); }
.feedback h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.feedback > :last-child { margin-bottom: 0; }
.qnav { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.2rem; flex-wrap: wrap; }
.empty { text-align: center; padding: 2rem 1rem; }

/* --- Movimento ridotto ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .slide, .slide.active { transition: opacity .2s, visibility 0s; transform: none; }
  .step.shown, table.values tr.new, .toast { animation: none; }
}
