/* ============ Confronto preventivi – versione dimostrativa ============ */
:root {
  --bg: #f3f7fc; --surface: #ffffff; --surface-2: #e9f1fa; --surface-3: #dce9f6;
  --on: #0e1c2c; --muted: #53657a; --outline: #cbd8e6; --outline-soft: #e2eaf3;
  --primary: #0b5aa8; --on-primary: #ffffff; --primary-c: #d5e7fb; --on-primary-c: #06315f;
  --accent: #2a9df4;
  --ok: #17783f; --ok-c: #d8f2e2; --warn: #9a5b00; --warn-c: #fff0d1; --err: #b3261e; --err-c: #fde2df;
  --shadow: 0 1px 2px rgba(14, 40, 70, .08), 0 6px 18px rgba(14, 40, 70, .07);
  --r: 16px; --r-s: 10px;
  --rib: 28px; --top: 64px; --rail: 88px;
  --font: Roboto, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0b141e; --surface: #111c29; --surface-2: #182636; --surface-3: #213448;
  --on: #e5eef8; --muted: #9bb0c6; --outline: #2c3f54; --outline-soft: #1f2f41;
  --primary: #6db9ff; --on-primary: #00284a; --primary-c: #123a62; --on-primary-c: #d2e8ff;
  --accent: #4fb0ff;
  --ok: #67d391; --ok-c: #12351f; --warn: #f0b95a; --warn-c: #3a2a0a; --err: #ff9a92; --err-c: #43201d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--on); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; }
p { margin: 0 0 12px; }
a { color: var(--primary); }
code, kbd { font: 500 .85em ui-monospace, Consolas, monospace; background: var(--surface-2); border: 1px solid var(--outline-soft); border-radius: 6px; padding: 1px 6px; }
kbd { border-bottom-width: 2px; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 16px; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.ico { width: 24px; height: 24px; fill: currentColor; flex: none; vertical-align: middle; }
.ico.s18 { width: 18px; height: 18px; } .ico.s48 { width: 48px; height: 48px; } .ico.s64 { width: 64px; height: 64px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ---- struttura ---- */
.ribbon { position: sticky; top: 0; z-index: 60; height: var(--rib); display: flex; align-items: center; justify-content: center; padding: 0 12px; background: var(--on-primary-c); color: var(--primary-c); font-size: 12.5px; letter-spacing: .02em; text-align: center; }
:root[data-theme="dark"] .ribbon { background: #06101a; color: #9bb0c6; }
.topbar { position: sticky; top: var(--rib); z-index: 50; height: var(--top); display: flex; align-items: center; gap: 16px; padding: 0 20px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--outline-soft); }
.brand { display: flex; align-items: center; text-decoration: none; }
.logo-plate { display: flex; align-items: center; border-radius: 12px; padding: 4px 10px; background: transparent; }
:root[data-theme="dark"] .logo-plate { background: #fff; }
.logo-plate img { height: 46px; width: auto; display: block; }
.topbar-title { font-size: 20px; font-weight: 600; flex: 1; min-width: 0; padding-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.rail { position: fixed; z-index: 40; top: calc(var(--rib) + var(--top)); bottom: 0; left: 0; width: var(--rail); padding: 12px 6px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--outline-soft); }
.rail a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px 8px; border-radius: 14px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 500; text-align: center; }
.rail a .pill { display: grid; place-items: center; width: 56px; height: 32px; border-radius: 16px; transition: background .15s; }
.rail a:hover .pill { background: var(--surface-2); }
.rail a[aria-current="page"] { color: var(--on); font-weight: 700; }
.rail a[aria-current="page"] .pill { background: var(--primary-c); color: var(--on-primary-c); }
.content { margin-left: var(--rail); padding: 24px clamp(16px, 3vw, 40px) 120px; max-width: calc(1400px + var(--rail)); outline: none; min-height: calc(100vh - var(--rib) - var(--top)); }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h2 { font-size: 26px; flex: 1; min-width: 200px; }
.page-head p { margin: 4px 0 0; color: var(--muted); width: 100%; order: 3; }

/* ---- componenti ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 20px; border: 1px solid transparent; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; background: transparent; color: var(--primary); white-space: nowrap; transition: filter .15s, background .15s; }
.btn:hover { filter: brightness(.96); background: var(--surface-2); }
.btn.filled { background: var(--primary); color: var(--on-primary); } .btn.filled:hover { background: var(--primary); filter: brightness(1.1); }
.btn.tonal { background: var(--primary-c); color: var(--on-primary-c); } .btn.tonal:hover { background: var(--primary-c); filter: brightness(.95); }
.btn.outlined { border-color: var(--outline); } .btn.text.danger, .btn.danger { color: var(--err); }
.btn.filled.danger { background: #b3261e; color: #fff; }
.cat-bar { display: flex; flex-direction: column; gap: 8px; }
#catres { border-radius: 12px; background: var(--surface); }
#catres .list-item { padding: 8px 10px; }
.btn.sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--on); }
.fab { position: fixed; right: 24px; bottom: 24px; z-index: 45; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 22px 0 18px; border-radius: 18px; background: var(--primary-c); color: var(--on-primary-c); font-weight: 600; text-decoration: none; box-shadow: var(--shadow); }
.fab:hover { filter: brightness(.96); }
.card { background: var(--surface); border: 1px solid var(--outline-soft); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.card h3 { font-size: 17px; margin-bottom: 12px; }
.grid { display: grid; gap: 16px; }
.grid.k4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 1px solid var(--outline); border-radius: 10px; background: transparent; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--on); }
.chip:hover { background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--primary-c); color: var(--on-primary-c); border-color: transparent; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-c); color: var(--ok); } .badge.warn { background: var(--warn-c); color: var(--warn); } .badge.err { background: var(--err-c); color: var(--err); } .badge.pri { background: var(--primary-c); color: var(--on-primary-c); }
.stars { display: inline-flex; gap: 1px; color: #f2b01e; } .stars .off { color: var(--outline); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

/* campi */
.field { position: relative; display: block; }
.field > span.lbl { position: absolute; left: 14px; top: 8px; font-size: 12px; color: var(--muted); pointer-events: none; }
.field input, .field select, .field textarea { width: 100%; min-height: 56px; padding: 25px 14px 7px; border: 1px solid var(--outline); border-radius: 10px; background: var(--surface); color: var(--on); font: inherit; }
.field textarea { resize: vertical; min-height: 96px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 28px, calc(100% - 15px) 28px; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
.field.sm input { min-height: 44px; padding: 10px 14px 10px 40px; }
.field.sm .sico { position: absolute; left: 12px; top: 10px; color: var(--muted); pointer-events: none; }
.field .hint { display: block; margin: 4px 14px 0; font-size: 12px; color: var(--muted); }
.field .conf { position: absolute; right: 10px; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: #f2a516; box-shadow: 0 0 0 3px color-mix(in srgb, #f2a516 25%, transparent); }
.field .cat { position: absolute; right: 10px; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.frow { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
input[type="range"] { width: 100%; accent-color: var(--primary); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }

/* tabelle */
.table-wrap { overflow-x: auto; border: 1px solid var(--outline-soft); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
table.t { width: 100%; border-collapse: collapse; min-width: 760px; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; background: var(--surface-2); white-space: nowrap; }
table.t td { padding: 12px 14px; border-top: 1px solid var(--outline-soft); vertical-align: middle; }
table.t tbody tr { cursor: pointer; } table.t tbody tr:hover { background: color-mix(in srgb, var(--primary-c) 40%, transparent); }
table.t th.r, table.t td.r { text-align: right; }
.bar-select { position: sticky; bottom: 16px; z-index: 30; display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 10px 14px 10px 20px; border-radius: 16px; background: var(--on-primary-c); color: #fff; box-shadow: var(--shadow); }
:root[data-theme="dark"] .bar-select { background: var(--primary-c); color: var(--on-primary-c); }
.bar-select .btn.filled { background: #fff; color: #06315f; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar .field { flex: 1 1 260px; max-width: 420px; }
.toolbar select { height: 44px; padding: 0 36px 0 14px; border: 1px solid var(--outline); border-radius: 10px; background: var(--surface); color: var(--on); font: inherit; }

/* messaggi */
.msg, .callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); margin: 14px 0; }
.msg > div, .callout { font-size: 14.5px; }
.callout { display: block; border-left: 4px solid var(--accent); border-radius: 4px 12px 12px 4px; }
.callout.ok { border-color: var(--ok); background: var(--ok-c); } .callout.warn { border-color: #f2a516; background: var(--warn-c); } .callout.info { border-color: var(--accent); }
.msg.warn { background: var(--warn-c); color: var(--on); } .msg.warn .ico { color: var(--warn); }
.msg.ok { background: var(--ok-c); } .msg.ok .ico { color: var(--ok); }
.msg.info { background: var(--primary-c); color: var(--on-primary-c); }
.msg.cat { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }

/* dialog e toast */
.scrim { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(8, 18, 30, .55); animation: fade .15s; }
.dialog { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 24px; border-radius: 24px; background: var(--surface); box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.dialog.wide { width: min(820px, 100%); }
.dialog h3 { font-size: 21px; margin-bottom: 12px; }
.dialog .actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
#toasts { position: fixed; z-index: 100; left: 50%; bottom: 96px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { padding: 12px 20px; border-radius: 12px; background: #16283b; color: #fff; font-size: 14px; box-shadow: var(--shadow); animation: up .2s; max-width: min(520px, 92vw); }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { opacity: 0; transform: translateY(8px); } }

/* home */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; padding: 28px; border-radius: 28px; color: #fff; background: radial-gradient(900px 300px at 100% 0%, rgba(80, 175, 255, .55), transparent), linear-gradient(135deg, #0a3b78, #0b5aa8); box-shadow: var(--shadow); }
.hero h2 { font-size: clamp(24px, 3.2vw, 34px); margin-bottom: 10px; }
.hero p { color: #dcecff; max-width: 52ch; }
.hero .btn.filled { background: #fff; color: #08376f; } .hero .btn.outlined { border-color: rgba(255, 255, 255, .55); color: #fff; } .hero .btn:hover { background: rgba(255, 255, 255, .14); } .hero .btn.filled:hover { background: #fff; }
.hero-art { display: grid; gap: 10px; }
.hero-art .pane { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); font-size: 13px; }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .v { font-size: 30px; font-weight: 700; letter-spacing: -.01em; color: var(--primary); }
.kpi .l { color: var(--muted); font-size: 13px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--outline-soft); cursor: pointer; }
.list-item:first-of-type { border-top: 0; }
.list-item:hover { background: var(--surface-2); border-radius: 10px; }
.avatar { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--primary-c); color: var(--on-primary-c); font-weight: 700; }
.hbar { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; margin: 8px 0; font-size: 13px; }
.hbar .track { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), var(--accent)); }

/* carica + wizard */
.dropzone { display: grid; place-items: center; text-align: center; gap: 4px; padding: 40px 20px; border: 2px dashed var(--outline); border-radius: 24px; background: var(--surface); cursor: pointer; color: var(--muted); }
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-c); color: var(--on-primary-c); }
.dropzone h3 { color: var(--on); font-size: 20px; margin-top: 6px; }
.queue-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--outline-soft); border-radius: 14px; background: var(--surface); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--outline); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stepper { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 4px; }
.step { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; cursor: pointer; padding: 4px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.step .n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); font-size: 13px; font-weight: 700; }
.step.cur { color: var(--on); font-weight: 700; } .step.cur .n { background: var(--primary); color: var(--on-primary); }
.step.done .n { background: var(--primary-c); color: var(--on-primary-c); }
.step-line { flex: 1 1 24px; min-width: 20px; height: 1px; background: var(--outline); }
.split { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
.split.has-doc { grid-template-columns: minmax(280px, 5fr) minmax(0, 7fr); }
.doc-pane { position: sticky; top: calc(var(--rib) + var(--top) + 12px); max-height: calc(100vh - 140px); overflow: auto; border: 1px solid var(--outline); border-radius: var(--r); background: #e9edf2; padding: 14px; }
.paper { background: #fff; color: #1b2430; border-radius: 4px; padding: 22px 20px; font: 12px/1.5 Arial, sans-serif; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.paper h4 { font-size: 15px; letter-spacing: .04em; color: #0b3b6e; }
.paper .ph { display: flex; justify-content: space-between; gap: 10px; border-bottom: 2px solid #0b5aa8; padding-bottom: 8px; margin-bottom: 10px; }
.paper table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 11.5px; }
.paper th { background: #eef3f9; text-align: left; padding: 5px 6px; } .paper td { padding: 5px 6px; border-bottom: 1px solid #e3e9f0; }
.paper mark { background: #ffe79a; padding: 0 2px; border-radius: 2px; }
.paper .small { color: #5b6878; font-size: 10.5px; }
.item-card { border: 1px solid var(--outline); border-radius: var(--r); padding: 18px; margin-bottom: 16px; }
.wizard-nav { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.tier-table { width: 100%; border-spacing: 0 8px; } .tier-table td { padding: 0 6px 0 0; vertical-align: middle; }
.tot { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }

/* confronto */
.cmp-cols { display: grid; gap: 12px; }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 640px; }
.cmp th, .cmp td { padding: 12px 14px; border-top: 1px solid var(--outline-soft); text-align: left; vertical-align: top; }
.cmp thead th { border-top: 0; background: var(--surface-2); }
.cmp tbody th { width: 170px; color: var(--muted); font-size: 13px; font-weight: 500; background: var(--surface); position: sticky; left: 0; }
.cmp td.best { background: var(--ok-c); font-weight: 700; color: var(--ok); }
.cmp td.diff { background: color-mix(in srgb, var(--warn-c) 70%, transparent); }
.cmp .rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 13px; }
.score { display: flex; align-items: center; gap: 8px; }
.score .track { flex: 1; height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; min-width: 60px; } .score .fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.slider-row { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; font-size: 13.5px; }

/* grafico */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .grid-l { stroke: var(--outline-soft); } .chart .axis { stroke: var(--outline); }
.chart-tip { position: absolute; pointer-events: none; z-index: 5; padding: 8px 10px; border-radius: 8px; background: #16283b; color: #fff; font-size: 12px; box-shadow: var(--shadow); transform: translate(-50%, -110%); white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; }
.legend button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--outline); background: transparent; border-radius: 10px; padding: 4px 12px; cursor: pointer; font-size: 13px; }
.legend button[aria-pressed="false"] { opacity: .45; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* guida */
.guide { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
.toc { position: sticky; top: calc(var(--rib) + var(--top) + 16px); padding: 12px; }
.toc h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 10px 8px; }
.toc a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; text-decoration: none; color: var(--on); font-size: 14px; }
.toc a:hover { background: var(--surface-2); }
.toc a[aria-current="true"] { background: var(--primary-c); color: var(--on-primary-c); font-weight: 600; }
.toc .cn { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); font-size: 12px; font-weight: 700; flex: none; }
.toc a[aria-current="true"] .cn { background: var(--primary); color: var(--on-primary); }
.toc a.seen .cn { background: var(--ok-c); color: var(--ok); }
.progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin: 8px 10px 4px; } .progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .3s; }
.chapter { padding: clamp(20px, 3vw, 36px); }
.chapter .eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.chapter h2 { font-size: clamp(26px, 3vw, 34px); margin: 6px 0 4px; }
.chapter .meta { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.chapter .lead { font-size: 18px; line-height: 1.55; color: var(--on); }
.chapter h3 { font-size: 19px; margin: 26px 0 10px; }
.chapter ul.ticks { list-style: none; padding: 0; margin: 12px 0; } .chapter ul.ticks li { position: relative; padding: 6px 0 6px 30px; }
.chapter ul.ticks li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 14px; height: 8px; border-left: 3px solid var(--ok); border-bottom: 3px solid var(--ok); transform: rotate(-45deg); }
ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 14px 0; }
ol.steps li { counter-increment: s; position: relative; padding: 4px 0 18px 52px; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 700; }
ol.steps li::after { content: ""; position: absolute; left: 16px; top: 38px; bottom: 4px; width: 2px; background: var(--outline); }
ol.steps li:last-child::after { display: none; }
table.kv { width: 100%; border-collapse: collapse; margin: 14px 0; }
table.kv th { width: 170px; text-align: left; color: var(--muted); font-weight: 600; } table.kv th, table.kv td { padding: 11px 12px; border-top: 1px solid var(--outline-soft); vertical-align: top; }
.cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 18px 0; }
.mini { padding: 16px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; } .mini b { color: var(--primary); font-size: 16px; } .mini span { font-size: 14px; color: var(--muted); }
.faq details { border: 1px solid var(--outline); border-radius: 12px; padding: 0 16px; margin: 8px 0; background: var(--surface); }
.faq summary { padding: 14px 0; font-weight: 600; cursor: pointer; } .faq details[open] { background: var(--surface-2); }
.chapter-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--outline-soft); }

/* presentazione guidata */
.tour { position: fixed; z-index: 95; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(640px, calc(100vw - 24px)); padding: 18px 20px 14px; border-radius: 22px; background: #0d2a4a; color: #eaf3ff; box-shadow: 0 16px 50px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .15); animation: up .25s; }
.tour h4 { font-size: 17px; margin-bottom: 4px; } .tour p { color: #c7dcf3; margin: 0 0 12px; font-size: 14.5px; }
.tour .tf { display: flex; align-items: center; gap: 8px; } .tour .dots { display: flex; gap: 5px; flex: 1; flex-wrap: wrap; }
.tour .dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .3); } .tour .dots i.on { background: #5fb8ff; width: 22px; border-radius: 4px; }
.tour .btn { color: #cfe6ff; } .tour .btn.filled { background: #fff; color: #08376f; } .tour .btn:hover { background: rgba(255, 255, 255, .12); } .tour .btn.filled:hover { background: #fff; }
.tour-on .fab { bottom: 180px; }
.hl { animation: pulse 1.4s ease-out 2; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 16px transparent; } }

/* ---- adattamento ---- */
@media (max-width: 1100px) { .guide { grid-template-columns: minmax(0, 1fr); } .toc { position: static; } .toc nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; } .toc a { white-space: nowrap; flex: none; } .split.has-doc { grid-template-columns: 1fr; } .doc-pane { position: static; max-height: 420px; } .hero { grid-template-columns: 1fr; } }
@media (max-width: 839px) {
  :root { --rail: 0px; --top: 58px; }
  .rail { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 68px; flex-direction: row; padding: 4px 6px; gap: 2px; border-right: 0; border-top: 1px solid var(--outline-soft); overflow-x: auto; overflow-y: hidden; }
  .rail a { flex: 1 0 68px; padding-top: 4px; } .rail a .pill { width: 52px; height: 28px; }
  .content { padding-bottom: 150px; }
  .fab { right: 14px; bottom: 82px; height: 50px; } .fab span { display: none; } .fab { padding: 0 14px; }
  #toasts { bottom: 150px; }
  .logo-plate img { height: 36px; } .topbar { padding: 0 10px; gap: 6px; } .topbar-title { font-size: 16px; }
  .hide-s { display: none; } .tour { bottom: 78px; } .tour-on .fab { display: none; }
  .hbar { grid-template-columns: 92px 1fr auto; }
}
@media (max-width: 520px) { .topbar-title { display: none; } .topbar .btn.filled { padding: 0 14px; } .page-head h2 { font-size: 22px; } .ribbon { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto !important; transition: none !important; } }
@media print { .ribbon, .topbar, .rail, .fab, .tour { display: none !important; } .content { margin: 0; } }

@font-face{font-family:'Bricolage Grotesque';src:url(/assets/fonts/bricolage-grotesque.woff2) format('woff2');font-weight:200 800;font-display:swap}.site-back{display:inline-flex;align-items:center;gap:10px;flex-shrink:0;margin-left:auto;height:48px;padding:0 8px 0 22px;border-radius:999px;background:#FFC400;color:#241A00!important;font:700 16px/1 'Bricolage Grotesque',system-ui,sans-serif;text-decoration:none!important;white-space:nowrap;transition:border-radius .4s cubic-bezier(.2,0,0,1),background .2s,box-shadow .2s}.site-back i{font-style:normal;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:#241A00;color:#FFC400;font-size:18px;transition:transform .45s cubic-bezier(.22,1,.36,1)}.site-back:hover,.site-back:focus-visible{border-radius:16px;background:#ffd13d;box-shadow:0 6px 18px rgba(255,196,0,.35)}.site-back:hover i,.site-back:focus-visible i{transform:translateX(-3px)}.site-back:focus-visible{outline:3px solid #FFC400;outline-offset:3px}@media(max-width:600px){.site-back{height:44px;padding:0 6px 0 16px;font-size:14px;gap:8px}.site-back i{width:28px;height:28px}}
