/* Mobile App Trust — console per progetti. Asset locale: nessun font o servizio esterno. */
:root {
  --ink: #18232f; --ink-2: #3d4d5c; --muted: #5a6978; --line: #d7dee6; --line-2: #e8edf2;
  --canvas: #f3f5f8; --surface: #ffffff; --surface-2: #f8fafc;
  --primary: #1452c4; --primary-ink: #0d3a8f; --primary-soft: #e7effc;
  --ok: #17673a; --ok-soft: #e3f4e9; --warn: #8a5300; --warn-soft: #fdf1d8;
  --bad: #a32020; --bad-soft: #fde8e6; --info: #0e5a78; --info-soft: #e2f1f7;
  --violet: #5a3fa0; --violet-soft: #eeeafa; --slate-soft: #e9edf2;
  --radius: 10px; --radius-s: 6px; --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 2px 8px rgba(16, 32, 48, .05);
  --focus: 0 0 0 3px #fff, 0 0 0 6px #1452c4;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 1rem/1.55 var(--font); color: var(--ink); background: var(--canvas); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; font-weight: 650; letter-spacing: -.005em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.22rem; } h3 { font-size: 1.04rem; } h4 { font-size: .95rem; }
p { margin: 0 0 .75rem; } p:last-child { margin-bottom: 0; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-ink); }
code, .mono { font-family: var(--mono); font-size: .88em; overflow-wrap: anywhere; }
code { background: var(--slate-soft); padding: .08em .35em; border-radius: 4px; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
h1[tabindex="-1"]:focus-visible, main:focus-visible { box-shadow: none; }
.skip { position: absolute; left: .5rem; top: -4rem; z-index: 50; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-s); }
.skip:focus { top: .5rem; color: #fff; }
svg.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }

/* Barra superiore: marchio, progetto corrente, aree globali, account */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; padding: .55rem 1.25rem; max-width: 1480px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-mark { width: 1.9rem; height: 1.9rem; border-radius: 8px; background: linear-gradient(140deg, #1452c4, #0e8a8a); display: grid; place-items: center; color: #fff; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; line-height: 1.1; }
.switcher { position: relative; }
.switcher > summary { list-style: none; display: flex; align-items: center; gap: .55rem; cursor: pointer; border: 1px solid var(--line); background: var(--surface-2); padding: .38rem .7rem; border-radius: 999px; max-width: min(22rem, 78vw); }
.switcher > summary::-webkit-details-marker { display: none; }
.switcher > summary:hover { border-color: #b8c4d0; }
.switcher .label { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; line-height: 1; display: block; }
.switcher .name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: 1.25; }
.switcher-menu { position: absolute; left: 0; top: calc(100% + .4rem); width: min(24rem, 92vw); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(16, 32, 48, .16); padding: .5rem; z-index: 40; }
.switcher-menu h2 { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .45rem .6rem .3rem; font-weight: 600; }
.switcher-menu a { display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border-radius: var(--radius-s); color: var(--ink); text-decoration: none; }
.switcher-menu a:hover, .switcher-menu a[aria-current] { background: var(--primary-soft); }
.switcher-menu a small { color: var(--muted); display: block; }
.switcher-menu hr { border: 0; border-top: 1px solid var(--line-2); margin: .4rem 0; }
.avatar { width: 1.9rem; height: 1.9rem; border-radius: 8px; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .85rem; background: var(--primary); }
.avatar.h1 { background: #0e7c7c; } .avatar.h2 { background: #7a4bb0; } .avatar.h3 { background: #b0562a; } .avatar.h4 { background: #2f6f3e; } .avatar.h5 { background: #9c2f62; } .avatar.h0 { background: #5a6978; }
.topnav { display: flex; align-items: center; gap: .15rem; margin-left: auto; flex-wrap: wrap; }
.topnav a, .topnav button { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .7rem; border-radius: var(--radius-s); color: var(--ink-2); text-decoration: none; font: inherit; font-size: .93rem; background: none; border: 0; cursor: pointer; }
.topnav a:hover, .topnav button:hover { background: var(--slate-soft); color: var(--ink); }
.topnav a[aria-current="page"] { color: var(--primary-ink); background: var(--primary-soft); font-weight: 600; }
.badge { display: inline-block; min-width: 1.35rem; padding: 0 .4rem; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: .76rem; font-weight: 700; text-align: center; line-height: 1.35rem; }

/* Struttura: navigazione contestuale del progetto + contenuto */
.shell { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); max-width: 1480px; margin: 0 auto; min-height: calc(100vh - 3.6rem); }
.shell.plain { grid-template-columns: minmax(0, 1fr); }
.sidenav { border-right: 1px solid var(--line); background: var(--surface); padding: 1rem .75rem 2rem; }
.sidenav h2 { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: .9rem .65rem .35rem; font-weight: 600; }
.sidenav ul { list-style: none; margin: 0; padding: 0; }
.sidenav a { display: flex; align-items: center; gap: .6rem; padding: .5rem .65rem; border-radius: var(--radius-s); color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.sidenav a:hover { background: var(--slate-soft); color: var(--ink); }
.sidenav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; }
.sidenav .proj { display: flex; gap: .6rem; align-items: center; padding: .4rem .65rem .8rem; border-bottom: 1px solid var(--line-2); margin-bottom: .3rem; }
.sidenav .proj strong { display: block; line-height: 1.2; overflow-wrap: anywhere; }
main { padding: 1.6rem 2rem 4rem; min-width: 0; }
.wrap { max-width: 68rem; }
.wrap.narrow { max-width: 46rem; }
.crumbs { font-size: .875rem; color: var(--muted); margin-bottom: .55rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.crumbs a { color: var(--muted); }
.page-head { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: flex-start; justify-content: space-between; margin-bottom: 1.4rem; }
.page-head .lead { color: var(--ink-2); max-width: 46rem; margin-top: .4rem; font-size: 1.03rem; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.stack > * + * { margin-top: 1.1rem; }
.grid { display: grid; gap: 1.1rem; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.grow { flex: 1 1 14rem; min-width: 0; }

/* Schede */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .card-head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; }
.card > .card-head p { color: var(--muted); font-size: .92rem; margin: .2rem 0 0; }
.card > .card-body { padding: 1.15rem 1.25rem; }
.card > .card-foot { padding: .85rem 1.25rem; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }
a.card.link { display: block; color: inherit; text-decoration: none; transition: border-color .12s, box-shadow .12s; }
a.card.link:hover { border-color: #9db4d8; box-shadow: 0 2px 4px rgba(16, 32, 48, .08), 0 6px 18px rgba(16, 32, 48, .09); }
.card.dashed { border-style: dashed; box-shadow: none; background: transparent; }
.card.future { background: var(--surface-2); box-shadow: none; }
.card.future h3 { color: var(--ink-2); }

/* Etichette di stato: testo + icona, mai solo colore */
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .16rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 600; line-height: 1.5; max-width: 100%; border: 1px solid transparent; }
.chip::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; flex: none; }
.chip.config { background: var(--slate-soft); color: #3d4d5c; }
.chip.verify { background: var(--warn-soft); color: var(--warn); }
.chip.verified { background: var(--info-soft); color: var(--info); }
.chip.active { background: var(--ok-soft); color: var(--ok); }
.chip.suspended { background: var(--bad-soft); color: var(--bad); }
.chip.suspended::before { border-radius: 2px; }
.chip.neutral { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.chip.neutral::before { display: none; }
.chip.future { background: var(--violet-soft); color: var(--violet); }
.chip.future::before { background: none; border: 1.5px solid currentColor; }
.chip.draft { background: #fff; color: var(--warn); border-color: #e2c27d; border-style: dashed; }
.plat { display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; }

/* Avvisi contestuali */
.callout { display: flex; gap: .75rem; padding: .85rem 1rem; border-radius: var(--radius-s); border: 1px solid; border-left-width: 4px; background: var(--info-soft); border-color: #a9d3e3; color: #0b3c50; }
.callout > svg.i { margin-top: .15rem; width: 1.3em; height: 1.3em; }
.callout strong { display: block; }
.callout.warn { background: var(--warn-soft); border-color: #e9c877; color: #5c3800; }
.callout.bad { background: var(--bad-soft); border-color: #eba8a2; color: #6e1414; }
.callout.ok { background: var(--ok-soft); border-color: #9fd3b3; color: #0f4a28; }
.callout.plain { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }
.callout a { color: inherit; font-weight: 600; }
.callout .row { margin-top: .5rem; }

/* Moduli: etichetta visibile, spiegazione, esempio, errore associato */
form { margin: 0; }
.field { margin-bottom: 1.15rem; max-width: 40rem; }
.field > label, .field > .label, legend.label { display: block; font-weight: 600; margin-bottom: .15rem; }
.field .req { color: var(--bad); font-weight: 600; font-size: .82rem; margin-left: .35rem; }
.field .opt { color: var(--muted); font-weight: 400; font-size: .82rem; margin-left: .35rem; }
.field .hint { color: var(--ink-2); font-size: .9rem; margin: 0 0 .4rem; }
.field .ex { color: var(--muted); font-size: .86rem; margin: .3rem 0 0; }
.field .ex code { background: none; padding: 0; color: var(--ink-2); }
.field .err, .field-validation-error { color: var(--bad); font-size: .9rem; font-weight: 600; margin: .35rem 0 0; display: block; }
.field-validation-valid { display: none; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], select, textarea {
  font: inherit; color: var(--ink); width: 100%; padding: .55rem .7rem; border: 1px solid #8494a5; border-radius: var(--radius-s); background: #fff; min-height: 2.6rem; }
textarea { min-height: 5.5rem; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #5a6978; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 82, 196, .28); }
input[readonly], input:disabled, select:disabled, textarea:disabled { background: var(--slate-soft); color: var(--ink-2); border-color: var(--line); }
input.input-validation-error, select.input-validation-error, textarea.input-validation-error, .invalid input, .invalid select, .invalid textarea { border-color: var(--bad); border-width: 2px; }
input.short { max-width: 12rem; } input.mid { max-width: 22rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; padding: .35rem 0; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; flex: none; accent-color: var(--primary); }
.check label { font-weight: 500; }
.check small { display: block; color: var(--muted); font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0 0 1.15rem; min-width: 0; }
.choices { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.choice { position: relative; display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem .85rem 2.7rem; background: #fff; cursor: pointer; }
.choice input { position: absolute; left: .95rem; top: 1rem; width: 1.15rem; height: 1.15rem; accent-color: var(--primary); }
.choice strong { display: block; }
.choice small { color: var(--muted); display: block; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice:has(input:focus-visible) { box-shadow: var(--focus); }
.choice:has(input:disabled) { background: var(--surface-2); cursor: not-allowed; color: var(--muted); }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid var(--line-2); }
.validation-summary-errors { background: var(--bad-soft); border: 1px solid #eba8a2; border-left-width: 4px; color: #6e1414; border-radius: var(--radius-s); padding: .8rem 1rem; margin-bottom: 1rem; }
.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }
.validation-summary-valid { display: none; }

/* Pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: inherit; font-weight: 600; padding: .55rem 1.05rem; min-height: 2.6rem; border-radius: var(--radius-s); border: 1px solid #8494a5; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--slate-soft); color: var(--ink); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-ink); border-color: var(--primary-ink); color: #fff; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.quiet { border-color: transparent; background: none; color: var(--primary); padding-inline: .6rem; }
.btn.quiet:hover { background: var(--primary-soft); }
.btn.small { min-height: 2.1rem; padding: .3rem .75rem; font-size: .9rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* Aiuto contestuale e dettagli tecnici progressivi */
details.help { margin: .35rem 0 0; }
details.help > summary { cursor: pointer; color: var(--primary); font-size: .9rem; font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; list-style: none; border-radius: 4px; }
details.help > summary::-webkit-details-marker { display: none; }
details.help > summary::before { content: "?"; display: inline-grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 1.5px solid currentColor; font-size: .72rem; font-weight: 700; }
details.help[open] > summary::before { content: "–"; }
details.help > div { margin-top: .5rem; padding: .75rem .9rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); font-size: .92rem; color: var(--ink-2); }
details.tech { border-top: 1px solid var(--line-2); margin-top: 1rem; padding-top: .8rem; }
details.tech > summary { cursor: pointer; font-weight: 600; color: var(--ink-2); font-size: .93rem; border-radius: 4px; }
details.tech > div { margin-top: .75rem; }
details.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.panel > summary { cursor: pointer; padding: .9rem 1.25rem; font-weight: 650; border-radius: var(--radius); }
details.panel > div { padding: 0 1.25rem 1.15rem; }

/* Elenchi chiave/valore e tabelle che si impilano */
dl.kv { display: grid; grid-template-columns: minmax(6.5rem, 11rem) minmax(0, 1fr); gap: .45rem 1rem; margin: 0; }
dl.kv dt { color: var(--muted); font-size: .92rem; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: .55rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: .7rem .8rem; border-bottom: 1px solid var(--line-2); vertical-align: top; overflow-wrap: anywhere; }
table.t tr:last-child td { border-bottom: 0; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.rows > li { padding: .8rem 0; border-bottom: 1px solid var(--line-2); }
ul.rows > li:first-child { padding-top: 0; } ul.rows > li:last-child { border-bottom: 0; padding-bottom: 0; }
ul.ticks { list-style: none; margin: 0; padding: 0; }
ul.ticks li { padding-left: 1.7rem; position: relative; margin: .35rem 0; }
ul.ticks li::before { content: ""; position: absolute; left: .15rem; top: .32rem; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid #9aa8b6; }
ul.ticks li.done::before { background: var(--ok); border-color: var(--ok); }
ul.ticks li.done::after { content: ""; position: absolute; left: .47rem; top: .5rem; width: .3rem; height: .55rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
ul.ticks li.wait::before { border-color: var(--warn); border-style: dashed; }
ul.ticks li.na { color: var(--muted); }

ul.points { margin: 0; padding-left: 1.2rem; } ul.points li { margin: .35rem 0; }
h3.group { display: flex; align-items: center; gap: .55rem; margin: .6rem 0 .2rem; } h3.group .avatar { width: 1.6rem; height: 1.6rem; font-size: .72rem; }
/* Percorso guidato */
ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
ol.steps > li { position: relative; padding: 0 0 1.4rem 3.1rem; counter-increment: s; }
ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #fff; border: 2px solid #9aa8b6; color: var(--ink-2); z-index: 1; }
ol.steps > li::after { content: ""; position: absolute; left: 1.02rem; top: 2.1rem; bottom: 0; width: 2px; background: var(--line); }
ol.steps > li:last-child { padding-bottom: 0; } ol.steps > li:last-child::after { display: none; }
ol.steps > li.done::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: #fff; }
ol.steps > li.current::before { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--primary-soft); }
ol.steps > li.wait::before { border-style: dashed; border-color: var(--warn); color: var(--warn); }
ol.steps > li.na::before { color: #9aa8b6; }
ol.steps h3 { padding-top: .25rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
ol.steps p { color: var(--ink-2); margin: .3rem 0 .55rem; }
ol.steps .state { font-size: .8rem; font-weight: 600; color: var(--muted); }
ol.steps li.done .state { color: var(--ok); } ol.steps li.current .state { color: var(--primary-ink); } ol.steps li.wait .state { color: var(--warn); }
.meter { height: .5rem; background: var(--slate-soft); border-radius: 999px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

/* Avanzamento dell'applicazione */
ol.flow { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; margin: 0; padding: 0; }
ol.flow li { border-top: 4px solid var(--line); padding: .5rem .2rem 0; font-size: .86rem; color: var(--muted); }
ol.flow li strong { display: block; color: inherit; font-size: .84rem; line-height: 1.25; }
ol.flow li.done { border-color: var(--ok); color: var(--ok); }
ol.flow li.now { border-color: var(--primary); color: var(--primary-ink); }
ol.flow li.now strong::after { content: " …"; }
ol.flow li.fail { border-color: var(--bad); color: var(--bad); }
.spinner { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2.5px solid var(--primary-soft); border-top-color: var(--primary); display: inline-block; animation: spin .9s linear infinite; vertical-align: -.2em; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Differenze bozza / applicato */
ul.diff { list-style: none; margin: 0; padding: 0; }
ul.diff li { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); gap: .25rem .9rem; padding: .6rem 0; border-bottom: 1px solid var(--line-2); align-items: baseline; }
ul.diff li:last-child { border-bottom: 0; }
ul.diff .op { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
ul.diff .add .op { color: var(--ok); } ul.diff .chg .op { color: var(--warn); } ul.diff .del .op { color: var(--bad); }
ul.diff .was { color: var(--muted); text-decoration: line-through; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.compare > div { padding: .7rem .9rem; min-width: 0; }
.compare > div + div { border-left: 1px solid var(--line); background: #fffdf5; }
.compare h4 { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .3rem; }

/* Stato vuoto, accesso, QR */
.empty { text-align: center; padding: 2.6rem 1.5rem; }
.empty .art { width: 4.2rem; height: 4.2rem; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin: 0 auto 1rem; }
.empty .art svg.i { width: 2rem; height: 2rem; }
.empty p { max-width: 34rem; margin-inline: auto; color: var(--ink-2); }
.auth { min-height: 100vh; display: grid; place-items: start center; padding: 6vh 1rem 3rem; }
.auth > div { width: min(100%, 30rem); }
.auth .card { width: 100%; }
.auth .brand { justify-content: center; margin-bottom: 1.3rem; font-size: 1.1rem; }
.qr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.qr svg { width: 11.5rem; height: 11.5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); padding: .5rem; }
.secret { font-family: var(--mono); letter-spacing: .08em; font-size: 1.02rem; background: var(--slate-soft); padding: .55rem .7rem; border-radius: var(--radius-s); overflow-wrap: anywhere; user-select: all; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem 1.2rem; font-family: var(--mono); font-size: 1.02rem; background: var(--slate-soft); padding: .9rem 1rem; border-radius: var(--radius-s); margin: 0; white-space: pre-wrap; }
.sensitive { border: 1px dashed #b98a1f; border-radius: var(--radius-s); padding: 1rem; background: #fffdf5; }
.tag { display: inline-block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .08rem .45rem; border-radius: 4px; background: var(--slate-soft); color: var(--ink-2); }
.tag.fact { background: var(--info-soft); color: var(--info); } .tag.cmd { background: var(--violet-soft); color: var(--violet); } .tag.proto { background: #ffe9a8; color: #5c3800; }
.proto-bar { background: #ffe9a8; color: #4a2e00; text-align: center; font-size: .86rem; padding: .3rem 1rem; font-weight: 600; }
hr.sep { border: 0; border-top: 1px solid var(--line-2); margin: 1.2rem 0; }
.toast { position: fixed; right: 1rem; bottom: 1rem; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-s); box-shadow: var(--shadow); z-index: 60; }
[hidden] { display: none !important; }

/* Viewport stretto e zoom elevato: la navigazione va sopra il contenuto, le griglie si impilano */
@media (max-width: 62rem) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidenav { border-right: 0; border-bottom: 1px solid var(--line); padding: .5rem .75rem; }
  .sidenav .proj { display: none; }
  .sidenav h2 { display: none; }
  .sidenav ul { display: flex; gap: .25rem; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: thin; }
  .sidenav li { flex: none; }
  main { padding: 1.2rem 1rem 3rem; }
  .topnav { margin-left: 0; width: 100%; }
  .topbar-in { padding: .5rem .9rem; }
}
@media (max-width: 40rem) {
  h1 { font-size: 1.42rem; }
  dl.kv { grid-template-columns: minmax(0, 1fr); gap: .1rem; } dl.kv dd { margin-bottom: .6rem; }
  table.t, table.t tbody, table.t tr, table.t td { display: block; width: 100%; }
  table.t thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  table.t tr { border-bottom: 1px solid var(--line); padding: .5rem 0; }
  table.t td { border: 0; padding: .2rem .2rem; }
  table.t td[data-th]::before { content: attr(data-th); display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
  ul.diff li { grid-template-columns: minmax(0, 1fr); }
  ol.flow { grid-template-columns: repeat(auto-fit, minmax(6.2rem, 1fr)); }
  .compare { grid-template-columns: minmax(0, 1fr); } .compare > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .qr { grid-template-columns: minmax(0, 1fr); }
  .codes { grid-template-columns: minmax(0, 1fr); }
  .card > .card-head, .card > .card-body, .card > .card-foot { padding-inline: 1rem; }
  ol.steps > li { padding-left: 2.7rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition: none !important; } }
@media print { .topbar, .sidenav, .btn, .proto-bar { display: none !important; } .shell { display: block; } body { background: #fff; } }
.secret code { background: none; padding: 0; font-size: 1em; }
.codes pre { margin: 0; font: inherit; white-space: pre-wrap; column-count: 2; column-gap: 1.2rem; }
div.codes { display: block; }
@media (max-width: 40rem) { .codes pre { column-count: 1; } }
.topnav form { display: inline-flex; }
