/* Assetti PMI - foglio di stile principale */
:root {
  --ink: #16202b;
  --ink-2: #3d4a57;
  --muted: #6b7682;
  --line: #dde2e8;
  --line-2: #eef1f4;
  --bg: #f5f7f9;
  --surface: #ffffff;
  --brand: #1f4e79;
  --brand-2: #163a5b;
  --brand-soft: #e7eef6;
  --accent: #0f7b6c;
  --ok: #2e7d5b;
  --ok-soft: #e4f3ec;
  --warn: #a8700c;
  --warn-soft: #fbf1dc;
  --crit: #b23a3a;
  --crit-soft: #f9e5e5;
  --na: #8a939d;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 32, 43, .06), 0 4px 16px rgba(22, 32, 43, .05);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); }
a { color: var(--brand); }
a:hover { color: var(--brand-2); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: 1.65rem; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .82em; word-break: break-all; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: .5rem 1rem; z-index: 99; }
.skip-link:focus { left: 1rem; }
:focus-visible { outline: 3px solid #8ab4e0; outline-offset: 2px; }

/* Layout */
.topbar { background: var(--topbar-bg, var(--surface)); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--topbar-ink, var(--ink)); text-decoration: none; font-size: 1.05rem; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; color: var(--on-brand, #fff); font-size: .8rem; font-weight: 800; letter-spacing: .02em; }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.nav a { text-decoration: none; color: var(--topbar-ink, var(--ink-2)); padding: .45rem .75rem; border-radius: 8px; font-size: .92rem; font-weight: 500; }
.nav a:hover, .nav a.active { background: var(--brand-soft); color: var(--brand-2); }
.topbar .user { display: flex; align-items: center; gap: .75rem; font-size: .88rem; color: var(--muted); }
.container { max-width: 1200px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
.narrow { max-width: 760px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head p { margin: 0; }
.footer { border-top: 1px solid var(--line); color: var(--footer-ink, var(--muted)); background: var(--footer-bg, transparent); font-size: .82rem; }
.footer .container { padding: 1.25rem; display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; }
.footer a { color: var(--footer-ink, var(--muted)); }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }
@media (max-width: 960px) { .with-aside { grid-template-columns: minmax(0, 1fr); } }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1.25rem; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .9rem; }
.card-title h2, .card-title h3 { margin: 0; }
.stat { padding: 1.1rem 1.25rem; }
.stat .label { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 1.7rem; font-weight: 700; margin-top: .2rem; }

/* Steps (dashboard) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.step { display: grid; grid-template-columns: 40px 1fr auto; gap: 1rem; align-items: center; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step .num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--line-2); color: var(--ink-2); }
.step.done .num { background: var(--ok); color: #fff; }
.step.current { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.step.current .num { background: var(--brand); color: #fff; }
.step h3 { margin: 0 0 .15rem; font-size: 1rem; }
.step p { margin: 0; color: var(--muted); font-size: .88rem; }
@media (max-width: 600px) { .step { grid-template-columns: 36px 1fr; } .step .actions { grid-column: 1 / -1; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .62rem 1.05rem; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; background: var(--brand); color: var(--on-brand, #fff); line-height: 1.2; }
.btn:hover { background: var(--brand-2); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--line-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--brand); padding-left: .5rem; padding-right: .5rem; }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-2); }
.btn-danger { background: var(--crit); }
.btn-danger:hover { background: #8f2d2d; }
.btn-accent { background: var(--accent); color: var(--on-accent, #fff); }
.btn-accent:hover { background: #0b5f54; }
.btn-sm { padding: .38rem .7rem; font-size: .84rem; }
.btn-lg { padding: .85rem 1.4rem; font-size: 1rem; }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem 1.1rem; }
.col-12 { grid-column: span 12; } .col-8 { grid-column: span 8; } .col-6 { grid-column: span 6; } .col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; } .col-2 { grid-column: span 2; } .col-5 { grid-column: span 5; } .col-7 { grid-column: span 7; } .col-9 { grid-column: span 9; } .col-10 { grid-column: span 10; }
@media (max-width: 720px) { .form-grid > [class^="col-"] { grid-column: span 12; } }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem 1.25rem; margin: 0 0 1.25rem; background: var(--surface); }
legend { font-weight: 700; padding: 0 .4rem; color: var(--brand-2); }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; color: var(--ink-2); }
.req::after { content: " *"; color: var(--crit); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: .6rem .7rem; border: 1px solid #c8d0d8; border-radius: 8px; font: inherit; font-size: .95rem; color: var(--ink); background: #fff;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid var(--brand-soft); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--crit); }
.field-error { color: var(--crit); font-size: .82rem; margin: .3rem 0 0; }
.hint { color: var(--muted); font-size: .82rem; margin: .3rem 0 0; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .92rem; }
.check input { margin-top: .25rem; width: 18px; height: 18px; flex: none; }
.hp { position: absolute; left: -9999px; }

/* Alerts */
.alert { padding: .85rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; font-size: .93rem; }
.alert-success { background: var(--ok-soft); border-color: #b9dfcb; color: #1d5a40; }
.alert-error { background: var(--crit-soft); border-color: #eec2c2; color: #7d2323; }
.alert-warning { background: var(--warn-soft); border-color: #efd9a8; color: #6d4a07; }
.alert-info { background: var(--brand-soft); border-color: #c8d9ea; color: var(--brand-2); }
.alert ul { margin: .4rem 0 0; padding-left: 1.2rem; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: var(--warn); }
.b-critical { background: var(--crit-soft); color: var(--crit); }
.b-na, .b-info { background: var(--line-2); color: var(--na); }
.pill { display: inline-block; padding: .12rem .5rem; border-radius: 6px; font-size: .75rem; font-weight: 600; background: var(--line-2); color: var(--ink-2); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { background: #f8fafb; font-weight: 700; color: var(--ink-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.unmapped td { background: #fffaf0; }

/* Progress */
.progress { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
.score-ring { font-size: 2.4rem; font-weight: 800; line-height: 1; }

/* Questionnaire */
.q-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.q-nav { position: sticky; top: 76px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; }
.q-nav a { display: flex; justify-content: space-between; gap: .5rem; padding: .5rem .6rem; border-radius: 6px; text-decoration: none; color: var(--ink-2); font-size: .88rem; }
.q-nav a:hover { background: var(--line-2); }
.q-nav .count { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.q-nav .count.full { color: var(--ok); font-weight: 700; }
@media (max-width: 900px) { .q-layout { grid-template-columns: 1fr; } .q-nav { position: static; display: flex; flex-wrap: wrap; } }
.q-area { scroll-margin-top: 80px; }
.q-item { padding: 1rem 0; border-top: 1px solid var(--line-2); }
.q-item:first-of-type { border-top: 0; }
.q-item.hidden { display: none; }
.q-item .q-text { font-weight: 600; margin-bottom: .5rem; display: flex; gap: .6rem; }
.q-item .q-code { color: var(--muted); font-weight: 700; font-size: .78rem; min-width: 34px; padding-top: .15rem; }
.q-item .q-ref { font-size: .78rem; color: var(--muted); margin-top: .35rem; }
.q-item.missing .q-text { color: var(--crit); }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: inline-block; padding: .45rem .9rem; border: 1px solid #c8d0d8; border-radius: 999px; font-size: .88rem; cursor: pointer; background: #fff; font-weight: 500; }
.choice input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid #8ab4e0; }
.money { position: relative; max-width: 260px; }
.money input { padding-left: 1.8rem; text-align: right; }
.money::before { content: "€"; position: absolute; left: .7rem; top: .6rem; color: var(--muted); }
.savebar { position: sticky; bottom: 0; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); padding: .75rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; border-radius: 0 0 var(--radius) var(--radius); backdrop-filter: blur(4px); }
.save-status { font-size: .85rem; color: var(--muted); }
.save-status.error { color: var(--crit); }

/* Ads */
.ad { border: 1px dashed #c8d0d8; border-radius: var(--radius); padding: 1rem; background: #fcfdfd; }
.ad .ad-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: .6rem; }
.ad img { max-width: 100%; height: auto; border-radius: 6px; display: block; margin-bottom: .6rem; }
.ad h4 { margin: 0 0 .3rem; font-size: 1rem; }
.ad p { font-size: .88rem; color: var(--ink-2); margin-bottom: .7rem; }
.ad details { font-size: .78rem; color: var(--muted); margin-top: .6rem; }
.ad summary { cursor: pointer; }

/* Report (HTML) */
.report-doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 2.25rem; box-shadow: var(--shadow); }
.report-doc h2 { border-bottom: 2px solid var(--brand); padding-bottom: .35rem; margin-top: 2rem; color: var(--brand-2); }
.report-doc h2:first-of-type { margin-top: 0; }
.judgement { display: flex; gap: 1.25rem; align-items: center; padding: 1rem 1.25rem; border-radius: var(--radius); margin: 1rem 0; }
.judgement.ok { background: var(--ok-soft); } .judgement.warn { background: var(--warn-soft); } .judgement.critical { background: var(--crit-soft); }
.chart img, .chart svg { max-width: 100%; height: auto; }

/* Hero (public) */
.hero { background: linear-gradient(135deg, #163a5b 0%, #1f4e79 60%, #0f7b6c 100%); color: #fff; }
.hero .container { padding: 4rem 1.25rem; display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; }
.hero h1 { color: #fff; font-size: 2.3rem; }
.hero p { color: #dbe7f2; font-size: 1.08rem; }
.hero .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.hero-card { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; padding: 1.5rem; }
.hero-card li { margin-bottom: .5rem; color: #eef4fa; }
@media (max-width: 860px) { .hero .container { grid-template-columns: 1fr; padding: 2.5rem 1.25rem; } .hero h1 { font-size: 1.8rem; } }
.features .card h3 { color: var(--brand-2); }
.auth-box { max-width: 460px; margin: 2rem auto; }
.legal h2 { margin-top: 1.5rem; }

@media print {
  .topbar, .footer, .no-print, .ad, .savebar, .flash { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .container { padding: 0; max-width: none; }
  .report-doc { border: 0; box-shadow: none; padding: 0; }
  .card { box-shadow: none; }
  .report-doc h2 { page-break-after: avoid; }
  table { page-break-inside: auto; }
  tr { page-break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* Pagina di presentazione e pagine legali */
.kicker-light { color: #9fd9cf; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin-bottom: .6rem; }
.section-intro { max-width: 820px; margin: 2.25rem 0 1.5rem; }
.lead { font-size: 1.08rem; color: var(--ink-2); }
.how { counter-reset: how; list-style: none; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.how li { counter-increment: how; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem 1rem 3.2rem; position: relative; }
.how li::before { content: counter(how); position: absolute; left: 1rem; top: 1rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.refs li { margin-bottom: .4rem; }
.legal mark { background: var(--warn-soft); color: var(--warn); padding: 0 .2rem; border-radius: 3px; }
.legal table { margin: .5rem 0 1rem; }
.contract-text h3 { margin-top: 1.25rem; color: var(--brand-2); }
.contract-text p { text-align: justify; }
.footer nav a { white-space: nowrap; }
.grid > .card + .card { margin-top: 0; }
.grid-2fix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .grid-2fix { grid-template-columns: 1fr; } }

/* Menu su telefono */
.nav-toggle { display: none; margin-left: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .9rem; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; min-height: 44px; }
@media (max-width: 860px) {
  .topbar { position: static; }
  .topbar-inner { flex-wrap: wrap; gap: .6rem; padding: .6rem 1rem; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .topbar .nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; gap: 0; border-top: 1px solid var(--line); padding-top: .4rem; }
  .topbar.nav-open .nav { display: flex; }
  .nav a { padding: .75rem .5rem; font-size: 1rem; }
  .topbar .user, .topbar .btn-row { order: 4; flex-basis: 100%; justify-content: space-between; display: none; padding: .4rem 0 .2rem; }
  .topbar.nav-open .user, .topbar.nav-open .btn-row { display: flex; }
  .topbar .user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
}
/* Senza JavaScript il menu resta visibile */
.no-js .topbar .nav, .no-js .topbar .user, .no-js .topbar .btn-row { display: flex !important; }

/* Tabelle che su telefono diventano schede */
@media (max-width: 640px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border-bottom: 1px solid var(--line); padding: .6rem 0; }
  table.stack td { border: 0; padding: .25rem .8rem; text-align: left; white-space: normal; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 700; }
  table.stack td.num { text-align: left; }
  .report-doc { padding: 1.1rem; }
  .judgement { flex-direction: column; align-items: flex-start; }
  .footer nav a { display: inline-block; padding: .45rem .3rem; }
  .contract-scroll { max-height: none !important; overflow: visible !important; }
}
details.tech { margin-top: .75rem; font-size: .85rem; color: var(--muted); }
details.tech summary { cursor: pointer; font-weight: 600; }
.checklist li { margin-bottom: .35rem; }
.checklist .ok { color: var(--ok); font-weight: 700; }
.checklist .ko { color: var(--crit); font-weight: 700; }

/* Quesiti della check-list CNDCEC */
.how-to summary{cursor:pointer}
.how-to ul{margin:.6rem 0;padding-left:1.2rem}
.how-to li{margin-bottom:.35rem}
.q-body{padding-left:calc(34px + .6rem)}
@media (max-width:600px){.q-body{padding-left:0}}
.q-adeg{margin-top:.6rem;display:flex;flex-wrap:wrap;gap:.4rem .8rem;align-items:center;background:var(--line-2);border-radius:8px;padding:.5rem .7rem}
.q-adeg-label{font-size:.88rem;font-weight:600;color:var(--ink-2)}
.choice-sm span{padding:.3rem .8rem;font-size:.85rem}
.q-note{margin-top:.5rem;font-size:.9rem}
.q-note summary{cursor:pointer;color:var(--brand);font-weight:600;font-size:.85rem}
.q-note textarea{margin-top:.4rem;min-height:60px}
.q-note-req{color:var(--crit);font-weight:600}
.q-eval{margin-top:1rem;border-top:2px solid var(--line);padding-top:.8rem}
.q-eval h3{color:var(--brand-2)}
.choice input:disabled+span{opacity:.45;cursor:not-allowed}
.q-adeg.hidden,.q-note-req.hidden{display:none}
.ad-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.ad + .ad { margin-top: 1rem; }
.ad-row .ad + .ad { margin-top: 0; }
/* Back-office */
.filters { margin-bottom: 1rem; }
.pager { display: flex; gap: .75rem; align-items: center; justify-content: center; margin: 1rem 0; }
.subnav { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 1rem; position: sticky; top: 0; background: var(--bg, #f5f7f9); padding: .5rem 0; z-index: 5; }
.subnav a { padding: .35rem .7rem; border-radius: 999px; border: 1px solid #d5dce3; font-size: .85rem; text-decoration: none; background: #fff; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .88rem; }
.kv dd { margin: 0; }
.note-item { border-left: 3px solid #d5dce3; padding: .25rem .75rem; margin: .5rem 0; }
.danger-zone { border: 1px solid #e3b4b4; }
.check-ok { color: #1c7c3c; font-weight: 600; }
.check-ko { color: #b42318; font-weight: 600; }
.q-draft-row.inactive td { opacity: .55; }
@media (max-width: 760px) { .subnav { position: static; } .kv { grid-template-columns: 1fr; } }
.nav-more { position: relative; }
.nav-more > summary { list-style: none; cursor: pointer; color: var(--ink-2); padding: .45rem .75rem; border-radius: 8px; font-size: .92rem; font-weight: 500; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: " ▾"; font-size: .75rem; }
.nav-more > summary:hover, .nav-more > summary.active, .nav-more[open] > summary { background: var(--brand-soft); color: var(--brand-2); }
.nav-more-menu { position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.12); padding: .35rem; min-width: 190px; z-index: 30; display: flex; flex-direction: column; }
.nav-more-menu a { white-space: nowrap; }
@media (max-width: 760px) {
  .nav-more-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 .75rem; }
  .nav-more > summary { padding: .75rem .5rem; font-size: 1rem; }
}
@media (min-width: 961px) and (max-width: 1440px) { .nav a, .nav-more > summary { padding: .45rem .55rem; font-size: .88rem; } }
/* Banner leaderboard 728×90 (320×100 su smartphone) */
.lb-wrap { max-width: 1200px; margin: .75rem auto 0; padding: 0 16px; display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.lb { width: 728px; max-width: 100%; height: 90px; border: 1px solid var(--line, #d5dce3); border-radius: 8px; overflow: hidden; background: var(--surface, #fff); position: relative; }
.lb-img, .lb-img img { display: block; width: 100%; height: 90px; object-fit: cover; }
.lb-text { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; column-gap: 1rem; height: 100%; padding: .5rem .9rem; text-decoration: none; color: inherit; align-content: center; }
.lb-text-mobile { display: none; }
.lb-sponsor { grid-column: 1; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.lb-title { grid-column: 1; font-size: 1rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-body { grid-column: 1; font-size: .82rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-cta { grid-column: 2; grid-row: 1 / span 3; align-self: center; background: var(--brand, #1f4e79); color: #fff; border-radius: 8px; padding: .45rem .8rem; font-weight: 600; font-size: .85rem; white-space: nowrap; }
.lb-remove { font-size: .72rem; color: var(--muted); align-self: flex-end; margin-right: max(0px, calc((100% - 728px) / 2)); }
@media (max-width: 760px) {
  .lb { width: 320px; height: 100px; }
  .lb-img { display: none; }
  .lb-text, .lb-text-mobile { display: grid; grid-template-columns: 1fr; }
  .lb-cta { grid-column: 1; grid-row: auto; justify-self: start; padding: .25rem .6rem; font-size: .78rem; margin-top: .15rem; }
  .lb-body { display: none; }
  .lb-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .92rem; }
  .lb-remove { margin-right: calc((100% - 320px) / 2); }
}
@media print { .lb-wrap { display: none !important; } }
.nav-more > summary { color: var(--topbar-ink, var(--ink-2)); }
.brand-logo { max-height: 40px; max-width: 200px; width: auto; display: block; }
/* Personalizzazione grafica: avviso e blocchi per pagina */
.t-announce { background: var(--brand); color: var(--on-brand, #fff); text-align: center; font-size: .88rem; padding: .45rem 1rem; }
.t-blocks { margin-bottom: 1.25rem; }
.t-banner { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--radius); display: block; margin-bottom: 1rem; }
.t-intro { display: flex; gap: .9rem; align-items: flex-start; border-radius: var(--radius); padding: 1rem 1.2rem; border: 1px solid var(--line); background: var(--surface); }
.t-intro h2 { margin: 0 0 .25rem; font-size: 1.15rem; }
.t-intro p { margin: 0; white-space: pre-line; }
.t-intro .t-icon { flex: none; margin-top: .1rem; }
.t-tone-principale { background: var(--brand); border-color: var(--brand); color: var(--on-brand, #fff); }
.t-tone-evidenza { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.t-tone-info { background: #eaf3fb; border-color: #c5dcf0; color: #16324f; }
.t-tone-neutro .t-icon { color: var(--brand); }
.t-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.t-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.t-box .t-icon { color: var(--brand); }
.t-box h3 { margin: .4rem 0 .25rem; font-size: 1rem; }
.t-box p { margin: 0; font-size: .9rem; color: var(--ink-2); white-space: pre-line; }
.t-preview-bar { background: #fff3cd; color: #5c4400; border-bottom: 1px solid #f0d68a; padding: .5rem 1rem; font-size: .88rem; display: flex; gap: 1rem; justify-content: center; align-items: center; flex-wrap: wrap; }

/* Parole chiave delle imprese */
.kw-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .75rem; }
.kw { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; background: var(--brand-soft); color: var(--brand); border: 1px solid transparent; line-height: 1.4; }
.kw-dimensione { background: var(--ok-soft); color: var(--ink); }
.kw-fatturato { background: var(--warn-soft); color: var(--ink); }
.kw-forma { background: var(--line-2); color: var(--ink-2); }
.kw-manuale { background: var(--surface); border-color: var(--line); color: var(--ink); }
.ateco-sec { border-top: 1px solid var(--line-2); padding: .5rem 0; }
.ateco-sec summary { cursor: pointer; }

/* Visura camerale */
.visura-box { border: 1px solid var(--brand-soft); background: color-mix(in srgb, var(--brand-soft) 35%, var(--surface)); border-radius: var(--radius); padding: 1rem 1.1rem; }
.visura-box legend { padding: 0 .4rem; font-weight: 700; }
