:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #dde1e7;
  --text: #17202b;
  --muted: #5d6877;
  --brand: #0f6c74;
  --brand-ink: #ffffff;
  --brand-soft: #e2f1f2;
  --ok: #1e8a4c;
  --ok-soft: #dcf2e4;
  --warn: #a86a00;
  --warn-soft: #fbefd2;
  --bad: #c0362c;
  --bad-soft: #f9dcd9;
  --skip: #6b7480;
  --skip-soft: #eceef1;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141a; --surface: #161d25; --surface-2: #1d2630; --border: #2a3541; --text: #e6ebf0; --muted: #9aa6b2;
    --brand: #3fb3bb; --brand-ink: #071417; --brand-soft: #143238;
    --ok: #4cc27e; --ok-soft: #133524; --warn: #e3a93a; --warn-soft: #3a2c10; --bad: #f0766b; --bad-soft: #3d1b18;
    --skip: #8d97a3; --skip-soft: #232c36;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
code, pre, textarea.code { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* layout */
.topbar {
  display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 56px;
  background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .logo { width: 28px; height: 28px; border-radius: 7px; background: var(--brand); display: grid; place-items: center; color: var(--brand-ink); font-size: 13px; }
.topnav { display: flex; gap: 4px; }
.topnav a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.topnav a.active, .topnav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.topbar .spacer { flex: 1; }
.userbox { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .9rem; }
.projbar { position: sticky; top: 56px; z-index: 9; background: var(--surface); border-bottom: 1px solid var(--border); }
.projbar-in { max-width: 1280px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 18px; min-height: 46px; }
.projbar-name { font-weight: 700; color: var(--text); max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.projbar-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.projbar-tabs::-webkit-scrollbar { display: none; }
.projbar-tabs a { padding: 12px 12px 11px; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; font-size: .92rem; }
.projbar-tabs a:hover { color: var(--text); text-decoration: none; }
.projbar-tabs a.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
@media (max-width: 760px) {
  .projbar { position: static; }
  .projbar-in { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 0; }
  .projbar-tabs a { padding: 10px 10px 9px; }
}
.container { max-width: 1280px; margin: 0 auto; padding: 28px 24px 64px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .crumbs { color: var(--muted); font-size: .85rem; margin-bottom: 4px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }
footer.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 24px; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card h2 { margin-bottom: 12px; }
.card-link { display: block; color: inherit; transition: border-color .15s; }
.card-link:hover { border-color: var(--brand); text-decoration: none; }
.proj-cell { position: relative; }
.proj-cell > .card-link { height: 100%; padding-bottom: 52px; }
.proj-del { position: absolute; right: 16px; bottom: 14px; margin: 0; }

/* forms */
label { display: block; font-weight: 600; font-size: .85rem; margin: 0 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit;
}
textarea.code { min-height: 60vh; line-height: 1.45; tab-size: 2; white-space: pre; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
.field { margin-bottom: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: default; }
form.inline { display: inline; }
.checks-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 16px; margin: 8px 0 12px; }
.checks-pick label { font-weight: 400; display: flex; gap: 8px; align-items: center; margin: 0; }

/* alert */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; border: 1px solid; }
.flash.info { background: var(--brand-soft); border-color: transparent; }
.flash.success { background: var(--ok-soft); border-color: transparent; }
.flash.warning { background: var(--warn-soft); border-color: transparent; }
.flash.error { background: var(--bad-soft); border-color: transparent; }
.errors { margin: 0; padding-left: 18px; }

/* tables */
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: var(--surface-2); }
table.data tr.selected td { background: var(--brand-soft); }
.table-wrap { overflow-x: auto; }
#issues-area .table-wrap { max-height: 560px; overflow-y: auto; }
#issues-area table.data th { position: sticky; top: 0; z-index: 1; }

/* badges & status */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.s-passed, .s-done { background: var(--ok-soft); color: var(--ok); }
.s-warning, .s-queued, .s-running { background: var(--warn-soft); color: var(--warn); }
.s-failed, .s-error { background: var(--bad-soft); color: var(--bad); }
.s-skipped, .s-cancelled { background: var(--skip-soft); color: var(--skip); }
.sev-error { color: var(--bad); font-weight: 600; }
.sev-warning { color: var(--warn); font-weight: 600; }
.sev-info { color: var(--muted); }
.score { font-weight: 700; font-variant-numeric: tabular-nums; }
.score.good { color: var(--ok); } .score.mid { color: var(--warn); } .score.low { color: var(--bad); }

/* score ring */
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: var(--surface-2); }
.ring .value { transition: stroke-dashoffset .6s ease; }
.ring .label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .label b { font-size: 1.9rem; display: block; line-height: 1; }
.ring .label span { font-size: .75rem; color: var(--muted); }
.ring.good .value { stroke: var(--ok); } .ring.mid .value { stroke: var(--warn); } .ring.low .value { stroke: var(--bad); }
.ring.small { width: 56px; height: 56px; } .ring.small .label b { font-size: .95rem; }

/* check cards */
.check-card { display: flex; flex-direction: column; gap: 10px; }
.check-card .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.check-card .nums { display: flex; gap: 16px; font-size: .85rem; color: var(--muted); }
.check-card .nums b { color: var(--text); font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); }
.bar.good > i { background: var(--ok); } .bar.mid > i { background: var(--warn); } .bar.low > i { background: var(--bad); }
.breakdown { list-style: none; margin: 0; padding: 0; font-size: .82rem; }
.breakdown li { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 3px 0; border-top: 1px dashed var(--border); }
.breakdown li:first-child { border-top: 0; }
.check-card .msg { font-size: .85rem; color: var(--muted); background: var(--surface-2); padding: 8px 10px; border-radius: 6px; }
.check-card button.linkish { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font: inherit; font-size: .85rem; text-align: left; }

/* progress */
.progress { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .4s; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs button, .tabs a { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs .active { color: var(--text); border-bottom-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--text); }

/* upload */
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); transition: all .15s; cursor: pointer; }
.dropzone.over { border-color: var(--brand); background: var(--brand-soft); color: var(--text); }
.dropzone strong { color: var(--text); }

/* l'attributo hidden deve vincere sulle regole display dei componenti (es. overlay del viewer) */
[hidden] { display: none !important; }

/* viewer */
.viewer { position: relative; height: 560px; background: radial-gradient(circle at 50% 30%, #2b3644, #121820); border-radius: var(--radius); overflow: hidden; }
.viewer canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.viewer .overlay { position: absolute; inset: 0; display: grid; place-items: center; color: #dfe6ee; text-align: center; padding: 20px; }
.viewer .tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.viewer .tools .btn { background: rgba(20, 28, 38, .8); color: #e6ebf0; border-color: rgba(255,255,255,.15); }
.viewer .legend { position: absolute; left: 10px; bottom: 10px; color: #dfe6ee; font-size: .8rem; background: rgba(20, 28, 38, .75); padding: 6px 10px; border-radius: 6px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr !important; } }
.split > *, .grid > * { min-width: 0; }
pre { overflow-x: auto; max-width: 100%; }

/* trend chart */
.trend svg { width: 100%; height: 160px; }
.trend .line { fill: none; stroke: var(--brand); stroke-width: 2.5; }
.trend .pt { fill: var(--surface); stroke: var(--brand); stroke-width: 2; }
.trend .grid { stroke: var(--border); stroke-dasharray: 3 4; }
.trend text { fill: var(--muted); font-size: 11px; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth .card { width: 100%; max-width: 420px; padding: 32px; }
.auth .brand { margin-bottom: 20px; font-size: 1.15rem; }

/* misc */
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
details summary { cursor: pointer; font-weight: 600; }
.pill-tokens { display: flex; flex-wrap: wrap; gap: 4px; }
.pill-tokens span { font-family: var(--mono); font-size: .78rem; padding: 2px 6px; border-radius: 4px; background: var(--surface-2); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 10px 12px; border-top: 1px solid var(--border); font-size: .85rem; }

@media (max-width: 700px) {
  .topbar { padding: 0 12px; gap: 12px; }
  .userbox .who { display: none; }
  .brand span:not(.logo) { display: none; }
  .topnav a { padding: 6px 8px; }
  .topnav a[href="/api/docs"] { display: none; }
  .topbar { gap: 8px; }
  .userbox { gap: 6px; }
  .brand .logo { display: none; }
  .topnav a { font-size: .85rem; padding: 6px 6px; }
  .userbox .btn.small { padding: 4px 8px; }
  .lang-switch select { width: auto; max-width: 76px; padding: 4px 6px; font-size: .8rem; }
  .container { padding: 20px 16px 48px; }
}

/* stampa del report */
@media print {
  .no-print, .topbar { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ------------------------------------------------------------------ cockpit dei risultati */
.cockpit {
  --ck-bg: #070b14; --ck-panel: rgba(18, 28, 46, .62); --ck-line: rgba(120, 170, 255, .14);
  --ck-text: #e8f0ff; --ck-muted: #8b9bb8; --ck-a: #22d3ee; --ck-b: #a78bfa;
  --ck-ok: #34d399; --ck-warn: #fbbf24; --ck-bad: #fb7185; --ck-skip: #64748b;
  position: relative; overflow: hidden; margin: 0 0 24px; padding: 28px; border-radius: 18px; color: var(--ck-text);
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(34, 211, 238, .16), transparent 60%),
    radial-gradient(800px 480px at 105% 0%, rgba(167, 139, 250, .18), transparent 60%),
    linear-gradient(180deg, #0a1020, var(--ck-bg));
  box-shadow: 0 20px 60px -20px rgba(8, 15, 40, .7), inset 0 0 0 1px rgba(140, 180, 255, .12);
}
.cockpit::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--ck-line) 1px, transparent 1px), linear-gradient(90deg, var(--ck-line) 1px, transparent 1px);
  background-size: 34px 34px; mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}
.cockpit > * { position: relative; }
.cockpit a { color: var(--ck-a); }
.ck-hero { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.ck-gauge { width: 230px; flex: none; }
.ck-gauge-svg { width: 100%; height: auto; overflow: visible; }
.ck-track { fill: none; stroke: rgba(148, 163, 184, .14); stroke-width: 14; stroke-linecap: round; }
.ck-arc { fill: none; stroke-width: 14; stroke-linecap: round; transition: stroke-dasharray 1.3s cubic-bezier(.2, .8, .2, 1); }
.ck-tick { stroke: rgba(148, 163, 184, .35); stroke-width: 1.5; }
.ck-threshold { fill: #fff; filter: drop-shadow(0 0 6px #fff); }
.ck-gauge-num { fill: #fff; font-size: 46px; font-weight: 800; text-anchor: middle; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.ck-gauge-sub { fill: var(--ck-muted); font-size: 12px; text-anchor: middle; text-transform: uppercase; letter-spacing: 2px; }
.ck-gauge-delta { font-size: 13px; font-weight: 700; text-anchor: middle; }
.ck-gauge-delta.up { fill: var(--ck-ok); } .ck-gauge-delta.down { fill: var(--ck-bad); }
.ck-verdict { flex: 1; min-width: 280px; }
.ck-verdict h2 { font-size: 1.7rem; margin: 2px 0 6px; letter-spacing: -.3px;
  background: linear-gradient(90deg, #fff, #c7d2fe); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ck-verdict p { color: var(--ck-muted); margin-bottom: 16px; }
.ck-eyebrow { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--ck-a); font-weight: 700; }
.ck-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(128px, 100%), 1fr)); gap: 10px; }
.ck-kpi { padding: 12px 14px; border-radius: 12px; background: var(--ck-panel); backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .14); position: relative; overflow: hidden;
  opacity: 0; transform: translateY(8px); transition: .5s ease var(--d, 0ms); }
.ck-kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--ck-a)); box-shadow: 0 0 12px var(--c, var(--ck-a)); }
.ck-kpi.ck-cyan { --c: var(--ck-a); } .ck-kpi.ck-violet { --c: var(--ck-b); } .ck-kpi.ck-bad { --c: var(--ck-bad); } .ck-kpi.ck-warn { --c: var(--ck-warn); }
.ck-kpi-val { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.ck-kpi-label { font-size: .78rem; color: var(--ck-muted); }
.ck-kpi-sub { font-size: .7rem; color: var(--c); margin-top: 2px; }
.ck-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ck-span2 { grid-column: span 3; }
.ck-panel { padding: 16px 18px; border-radius: 14px; background: var(--ck-panel); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .13); opacity: 0; transform: translateY(10px); transition: .6s ease; }
.ck-ready .ck-panel, .ck-ready .ck-kpi, .ck-ready .ck-risk { opacity: 1; transform: none; }
.ck-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.ck-title span { font-weight: 700; font-size: .95rem; }
.ck-title small { color: var(--ck-muted); font-size: .72rem; }
.ck-chart svg { width: 100%; height: auto; display: block; }
.ck-empty { color: var(--ck-muted); font-size: .85rem; padding: 24px 0; text-align: center; }
.ck-grid-line { fill: none; stroke: rgba(148, 163, 184, .16); stroke-width: 1; }
.ck-axis { fill: var(--ck-muted); font-size: 10px; }
.ck-radar-area { stroke: var(--ck-a); stroke-width: 2; filter: drop-shadow(0 0 8px rgba(34, 211, 238, .6)); }
.ck-dot { stroke: #0b1222; stroke-width: 2; }
.ck-dot.ck-ok, i.ck-ok, .ck-arc.ck-ok { fill: var(--ck-ok); } .ck-dot.ck-warn { fill: var(--ck-warn); } .ck-dot.ck-bad { fill: var(--ck-bad); } .ck-dot.ck-skip { fill: var(--ck-skip); }
.ck-line { fill: none; stroke: var(--ck-b); stroke-width: 2.5; filter: drop-shadow(0 0 6px rgba(167, 139, 250, .8)); }
.ck-th-line { stroke: rgba(255, 255, 255, .35); stroke-dasharray: 4 4; }
.ck-bar-row, .ck-hrow { display: grid; grid-template-columns: minmax(0, 1.2fr) 1.4fr 46px; align-items: center; gap: 10px;
  width: 100%; padding: 5px 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; }
.ck-bar-row { cursor: pointer; border-radius: 8px; }
.ck-bar-row:hover .ck-bar-name { color: #fff; }
.ck-bar-name { font-size: .8rem; color: var(--ck-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-bar { height: 8px; border-radius: 99px; background: rgba(148, 163, 184, .14); overflow: hidden; }
.ck-bar i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width 1s cubic-bezier(.2, .8, .2, 1) var(--d, 0ms); }
.ck-ready .ck-bar i { width: var(--w); }
.ck-bar i.ck-ok { background: linear-gradient(90deg, #059669, var(--ck-ok)); box-shadow: 0 0 10px rgba(52, 211, 153, .6); }
.ck-bar i.ck-warn { background: linear-gradient(90deg, #d97706, var(--ck-warn)); box-shadow: 0 0 10px rgba(251, 191, 36, .5); }
.ck-bar i.ck-bad { background: linear-gradient(90deg, #e11d48, var(--ck-bad)); box-shadow: 0 0 10px rgba(251, 113, 133, .6); }
.ck-bar i.ck-skip { background: var(--ck-skip); }
.ck-bar i.ck-heat { background: linear-gradient(90deg, var(--ck-a), var(--ck-b)); box-shadow: 0 0 10px rgba(167, 139, 250, .5); }
.ck-bar-val { font-size: .8rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.ck-donut-wrap { display: flex; align-items: center; gap: 14px; }
.ck-donut-wrap svg { width: 150px; flex: none; }
.ck-seg { fill: none; stroke-width: 18; }
.seg-error { stroke: var(--ck-bad); background: var(--ck-bad); filter: drop-shadow(0 0 6px rgba(251, 113, 133, .7)); }
.seg-warning { stroke: var(--ck-warn); background: var(--ck-warn); }
.seg-info { stroke: var(--ck-a); background: var(--ck-a); }
.ck-donut-num { fill: #fff; font-size: 30px; font-weight: 800; text-anchor: middle; }
.ck-legend { list-style: none; margin: 0; padding: 0; flex: 1; font-size: .82rem; }
.ck-legend li { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--ck-muted); }
.ck-legend li b { margin-left: auto; color: #fff; }
.ck-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ck-allgood { display: grid; place-items: center; font-size: 46px; color: var(--ck-ok); padding: 26px 0; text-shadow: 0 0 20px var(--ck-ok); }
.ck-allgood span { font-size: .85rem; color: var(--ck-muted); text-shadow: none; }
.ck-risks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.ck-risk { --c: var(--ck-a); padding: 14px 16px; border-radius: 12px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, transparent), rgba(15, 23, 42, .5) 55%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent), 0 0 24px -12px var(--c);
  opacity: 0; transform: translateY(10px); transition: .5s ease var(--d, 0ms); }
.ck-risk.lvl-critical { --c: #f43f5e; } .ck-risk.lvl-high { --c: #fb923c; } .ck-risk.lvl-medium { --c: #fbbf24; }
.ck-risk.lvl-low { --c: #38bdf8; } .ck-risk.lvl-positive { --c: #34d399; }
.ck-risk.lvl-critical::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--c); animation: ck-pulse 2.4s ease-in-out infinite; }
@keyframes ck-pulse { 50% { box-shadow: inset 0 0 0 1px transparent, 0 0 0 0 transparent; opacity: .35; } }
.ck-risk-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ck-badge { font-size: .66rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--c);
  padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c) 16%, transparent); }
.ck-risk-metric { font-size: 1.25rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.ck-risk h4 { margin: 0 0 6px; font-size: .98rem; color: #fff; }
.ck-risk p { margin: 0 0 8px; font-size: .83rem; color: #b8c4dc; line-height: 1.45; }
.ck-link { background: none; border: 0; padding: 0; color: var(--c); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.checks-details > summary { cursor: pointer; list-style: none; margin-bottom: 12px; }
.checks-details > summary::-webkit-details-marker { display: none; }
.checks-details > summary::before { content: "▸ "; color: var(--muted); }
.checks-details[open] > summary::before { content: "▾ "; }
@media (max-width: 980px) { .ck-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ck-span2 { grid-column: span 2; } }
@media (max-width: 640px) {
  .cockpit { padding: 18px 16px; border-radius: 14px; }
  .ck-grid { grid-template-columns: minmax(0, 1fr); } .ck-span2 { grid-column: span 1; }
  .ck-gauge { width: 190px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ck-panel, .ck-kpi, .ck-risk, .ck-bar i, .ck-arc, .ck-stack i { transition: none; } .ck-grow, .ck-fade, .ck-seg-in { animation: none; } .ck-risk.lvl-critical::before { animation: none; }
}
@media print {
  .cockpit { background: #0a1020 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.report-risks { display: grid; gap: 8px; margin-bottom: 24px; }
.report-risk { padding: 10px 12px; border-left: 4px solid var(--skip); background: var(--surface-2); border-radius: 6px; font-size: .88rem; }
.report-risk.lvl-critical { border-color: #e11d48; } .report-risk.lvl-high { border-color: #ea580c; }
.report-risk.lvl-medium { border-color: #d97706; } .report-risk.lvl-low { border-color: #0284c7; } .report-risk.lvl-positive { border-color: #059669; }

/* selettore della lingua (barra in alto e pagine di accesso) */
.lang-switch select { width: auto; padding: 4px 8px; font-size: .85rem; color: var(--muted); background: var(--surface); }
.auth .lang-switch { display: flex; justify-content: center; margin-top: 20px; }

/* ------------------------------------------------------------------ clash detection */
.ck-bignum { min-width: 220px; }
.ck-bignum-val { font-size: 4.2rem; font-weight: 800; line-height: 1; letter-spacing: -2px; color: #fff;
  text-shadow: 0 0 30px rgba(34, 211, 238, .45); font-variant-numeric: tabular-nums; margin: 6px 0; }
.ck-bignum-delta { color: var(--ck-muted); font-size: .9rem; }
.ck-bignum-delta b.down { color: var(--ck-bad); } .ck-bignum-delta b.up { color: var(--ck-ok); }
.ck-kpi.ck-ok { --c: var(--ck-ok); }
.ck-axis-on { fill: #fff; font-weight: 700; }
.ck-bar-top { fill: #fff; font-size: 11px; font-weight: 700; }
.fl-new { fill: var(--ck-b); } .fl-persisting { fill: #f59e0b; } .fl-reopened { fill: var(--ck-bad); }
.ck-flow rect, #ck-flow rect { filter: drop-shadow(0 0 6px rgba(167, 139, 250, .35)); }
.fl-resolved-line { fill: none; stroke: var(--ck-ok); stroke-width: 2.5; stroke-dasharray: 5 4; filter: drop-shadow(0 0 5px rgba(52, 211, 153, .8)); }
.fl-resolved-dot { fill: var(--ck-ok); stroke: #0b1222; stroke-width: 2; }
.ck-tip { position: absolute; z-index: 20; pointer-events: none; max-width: 300px; padding: 8px 11px; border-radius: 10px;
  background: rgba(8, 13, 26, .96); border: 1px solid rgba(120, 170, 255, .25); color: var(--ck-text); font-size: .78rem; line-height: 1.5;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.ck-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.ck-hit { fill: transparent; cursor: pointer; }
.ck-col-on { fill: rgba(34, 211, 238, .06); stroke: rgba(34, 211, 238, .22); stroke-dasharray: 3 4; }
.ck-zero { stroke: rgba(226, 232, 240, .35); }
.ck-bar-low { fill: var(--ck-ok); font-size: 11px; font-weight: 700; }
.fl-open-line { fill: none; stroke: var(--ck-a); stroke-width: 2.5; filter: drop-shadow(0 0 6px rgba(34, 211, 238, .8)); }
.fl-open-dot { fill: #0b1222; stroke: var(--ck-a); stroke-width: 2.5; }
.lg-open { background: var(--ck-a); }
.ck-grow { transform-box: fill-box; transform-origin: 50% 100%; animation: ck-grow .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0ms); }
.ck-grow-down { transform-origin: 50% 0%; }
@keyframes ck-grow { from { transform: scaleY(0); } }
.ck-fade { animation: ck-fade 1.2s ease both .3s; }
@keyframes ck-fade { from { opacity: 0; } }
.ck-seg-in { animation: ck-fade .8s ease both; animation-delay: var(--d, 0ms); cursor: pointer; pointer-events: stroke; }
.ck-donut-num, .ck-donut-sub { pointer-events: none; }
.ck-seg-in:hover { stroke-width: 22; }
.ck-donut-sub { fill: var(--ck-muted); font-size: 10px; text-anchor: middle; text-transform: uppercase; letter-spacing: 2px; }
.ck-donut-wrap svg { width: 140px; }
.ck-donut-col { flex-direction: column; align-items: stretch; }
.ck-donut-col svg { align-self: center; width: 150px; }
.ck-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 36px; }
.ck-legend li small { color: var(--ck-muted); text-align: right; font-variant-numeric: tabular-nums; }
.ck-legend li b { font-variant-numeric: tabular-nums; }
.ck-leg-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-legend li.ck-click { cursor: pointer; border-radius: 6px; }
.ck-legend li.ck-click:hover { color: #fff; background: rgba(148, 163, 184, .08); }
.ck-leg-total { border-top: 1px solid rgba(148, 163, 184, .15); margin-top: 4px; color: #fff !important; }
.ck-leg-total .ck-leg-name { grid-column: 2; }
.ck-stack { display: flex; height: 16px; border-radius: 99px; overflow: hidden; background: rgba(148, 163, 184, .12); margin: 6px 0 14px; gap: 2px; }
.ck-stack i { display: block; height: 100%; width: 0; transition: width 1s cubic-bezier(.2, .8, .2, 1) var(--d, 0ms); }
.ck-ready .ck-stack i { width: var(--w); }
.ck-note { margin: 6px 0 0; font-size: .78rem; color: var(--ck-muted); }
.ck-note-bad { color: var(--ck-bad); }
.hm-tot { position: relative; min-width: 70px; padding: 0 8px; text-align: right; }
.hm-tot span { position: absolute; right: 8px; bottom: 5px; height: 3px; width: calc((100% - 16px) * var(--k));
  border-radius: 99px; background: linear-gradient(90deg, var(--ck-a), var(--ck-b)); opacity: .55; }
.hm-tot b { position: relative; color: #fff; font-size: .82rem; }
.hm-tot-h span { text-align: right; }
.hm-foot th, .hm-foot td { color: var(--ck-muted); font-size: .75rem; font-weight: 700; text-align: center; padding-top: 4px; }
.hm-foot td:last-child { text-align: right; padding-right: 8px; } .hm-foot b { color: #fff; }
.ck-spark polygon { fill: rgba(34, 211, 238, .12); stroke: none; }
.tr-worsening .ck-spark polygon, .tr-new_hotspot .ck-spark polygon { fill: rgba(251, 113, 133, .14); }
.tr-improving .ck-spark polygon, .tr-cleared .ck-spark polygon, .tr-good .ck-spark polygon { fill: rgba(52, 211, 153, .12); }
.tr-persistent .ck-spark polygon { fill: rgba(251, 191, 36, .12); }
.ck-flow-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .78rem; color: var(--ck-muted); margin-top: 6px; }
.ck-flow-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-new { background: var(--ck-b); } .lg-persisting { background: #f59e0b; } .lg-reopened { background: var(--ck-bad); }
.lg-resolved { background: var(--ck-ok); }
.ck-heat-wrap { overflow-x: auto; }
.ck-heatmap { border-collapse: separate; border-spacing: 4px; min-width: 100%; }
.ck-heatmap th { color: var(--ck-muted); font-size: .72rem; font-weight: 600; text-align: left; max-width: 180px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 2px 6px; }
.ck-heatmap thead th, .ck-heatmap tr:first-child th { vertical-align: bottom; }
.ck-heatmap tr:first-child th span { display: block; max-width: 120px; white-space: normal; line-height: 1.2; }
.hm-cell { width: 100%; min-width: 64px; height: 38px; border: 0; border-radius: 8px; color: #fff; font: inherit;
  font-size: .82rem; font-weight: 700; cursor: pointer; transition: transform .15s;
  background: color-mix(in srgb, #f43f5e calc(var(--k) * 100%), rgba(34, 211, 238, .12));
  box-shadow: 0 0 calc(var(--k) * 22px) color-mix(in srgb, #f43f5e calc(var(--k) * 80%), transparent); }
.hm-cell:hover:not(:disabled) { transform: scale(1.06); }
.hm-cell:disabled { cursor: default; background: rgba(148, 163, 184, .06); box-shadow: none; }
.ck-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ck-tab { background: rgba(148, 163, 184, .1); border: 0; color: var(--ck-muted); padding: 6px 12px; border-radius: 99px;
  font: inherit; font-size: .8rem; cursor: pointer; }
.ck-tab.on { background: linear-gradient(90deg, var(--ck-a), var(--ck-b)); color: #06101f; font-weight: 700; }
.ck-trend-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.ck-trend-table th { color: var(--ck-muted); font-weight: 600; text-align: left; padding: 6px 8px; font-size: .74rem;
  border-bottom: 1px solid rgba(148, 163, 184, .15); }
.ck-trend-table td { padding: 6px 8px; border-bottom: 1px solid rgba(148, 163, 184, .08); }
.ck-trend-table tbody tr { cursor: pointer; }
.ck-trend-table tbody tr:hover { background: rgba(148, 163, 184, .07); }
.ck-trend-label { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.ck-spark { width: 120px; height: 30px; display: block; }
.ck-spark polyline { fill: none; stroke: var(--ck-a); stroke-width: 2; }
.ck-spark circle { fill: var(--ck-a); }
.tr-worsening .ck-spark polyline, .tr-new_hotspot .ck-spark polyline { stroke: var(--ck-bad); }
.tr-worsening .ck-spark circle, .tr-new_hotspot .ck-spark circle { fill: var(--ck-bad); }
.tr-improving .ck-spark polyline, .tr-cleared .ck-spark polyline, .tr-good .ck-spark polyline { stroke: var(--ck-ok); }
.tr-improving .ck-spark circle, .tr-cleared .ck-spark circle, .tr-good .ck-spark circle { fill: var(--ck-ok); }
.tr-persistent .ck-spark polyline { stroke: var(--ck-warn); } .tr-persistent .ck-spark circle { fill: var(--ck-warn); }
.delta-up { color: var(--ck-bad); font-weight: 700; } .delta-down { color: var(--ck-ok); font-weight: 700; }
.trend-badge { font-size: .68rem; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; padding: 2px 8px;
  border-radius: 99px; white-space: nowrap; --c: var(--ck-muted); color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.tb-new_hotspot { --c: #f43f5e; box-shadow: 0 0 12px rgba(244, 63, 94, .5); } .tb-worsening { --c: #fb7185; }
.tb-persistent { --c: #fbbf24; } .tb-improving, .tb-cleared { --c: #34d399; } .tb-good { --c: #22d3ee; }
.tb-hotspot { --c: #fb923c; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--brand-soft); color: var(--text); border-radius: 99px;
  padding: 3px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.lc { font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--skip-soft); color: var(--skip); }
.lc-new { background: #ede9fe; color: #6d28d9; } .lc-persisting { background: var(--warn-soft); color: var(--warn); }
.lc-reopened { background: var(--bad-soft); color: var(--bad); } .lc-closed { background: var(--ok-soft); color: var(--ok); }
.clash-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: end; }
.clash-form .field { margin: 0; }
.empty-state { text-align: center; padding: 40px 20px; }
@media (max-width: 800px) { .clash-form { grid-template-columns: 1fr; } .ck-bignum-val { font-size: 3.2rem; } }
#clash-items-area .table-wrap { max-height: 620px; overflow: auto; }
#clash-items-area thead th { position: sticky; top: 0; z-index: 1; }
.naming-table tr.bad td { background: var(--bad-soft); }
.checks-pick-upload { margin-top: 12px; }
.checks-pick-upload summary { cursor: pointer; }

a.ck-kpi { color: inherit; text-decoration: none; display: block; }
a.ck-kpi:hover { outline: 1px solid var(--c, var(--ck-a)); }
.clash-note { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.clash-note b { color: var(--text); }
.clash-missing { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  margin-bottom: 16px; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border); border-left: 4px solid var(--warn); background: var(--warn-soft); }
.clash-missing .small { color: var(--muted); margin-top: 2px; }

.naming-preview { margin-top: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.naming-preview.bad { border-left: 4px solid var(--bad); }
.naming-preview.ok { border-left: 4px solid var(--ok); }
.naming-preview summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.naming-preview summary code { word-break: break-all; }
.naming-preview .table-wrap { margin-top: 8px; }

/* percorso del progetto: naming, workset, controllo IFC (All In), Clash Detection */
.setup-card { margin-bottom: 16px; }
.setup-card-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.setup-card-head h2 { margin: 0; }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.setup-card .steps { margin-bottom: 10px; }
.step { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); text-decoration: none; position: relative; min-width: 0; }
.step:hover { border-color: var(--brand); }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: var(--surface-2); color: var(--muted); }
.step-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.step-body small { color: var(--muted); font-size: .8rem; }
.step.todo { border-color: var(--warn); background: var(--warn-soft); }
.step.todo .step-n { background: var(--warn); color: #fff; }
.step.done .step-n { background: var(--ok); color: #fff; }
.step.current { box-shadow: 0 0 0 2px var(--brand); }
.step.separate { border-style: dashed; }
.step.separate::before { content: ""; position: absolute; left: -7px; top: 18%; bottom: 18%; border-left: 2px dotted var(--border); }
@media (max-width: 1100px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .step.separate::before { display: none; } }
@media (max-width: 420px) { .steps { grid-template-columns: 1fr; } }

/* pagine naming e workset */
.setup-form .card { margin-bottom: 16px; }
#name-tester { margin-bottom: 16px; }
.setup-inline { gap: 16px; margin: 8px 0 12px; align-items: center; }
.setup-inline label { display: inline-flex; gap: 6px; align-items: center; }
.setup-inline input[type=checkbox], .setup-dialog input[type=checkbox] { width: auto; }
.setup-block { display: block; margin-top: 12px; }
.setup-block input { margin-top: 4px; }
.setup-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 4px 0 16px; }
.token-table td, .rows-table td { vertical-align: top; }
.rows-table tr.warn-row td { background: var(--warn-soft); }
.token-table .tok-name { width: 9em; font-family: var(--mono); }
.token-table .tok-rule { min-width: 260px; }
.token-table .tok-rule > * + * { margin-top: 6px; }
.token-table .m-format { gap: 8px; flex-wrap: nowrap; align-items: center; }
.token-table .m-format select { width: auto; }
.token-table .m-format input { width: 4.5em; }
.token-table .m-format label { display: inline-flex; gap: 4px; align-items: center; }
.token-table tr[data-mode=allowed] .m-format, .token-table tr[data-mode=allowed] .m-regex,
.token-table tr[data-mode=format] .m-allowed, .token-table tr[data-mode=format] .m-regex,
.token-table tr[data-mode=regex] .m-allowed, .token-table tr[data-mode=regex] .m-format,
.token-table tr[data-mode=any] .m-allowed, .token-table tr[data-mode=any] .m-format, .token-table tr[data-mode=any] .m-regex { display: none; }
.tok-actions .btn, .rows-table .btn { padding-left: 8px; padding-right: 8px; }
.mono { font-family: var(--mono); }

/* popup prima dell'All In */
.setup-dialog { max-width: min(560px, calc(100vw - 32px)); border: 1px solid var(--border); border-radius: 12px; padding: 22px;
  background: var(--surface); color: var(--text); box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.setup-dialog::backdrop { background: rgba(15, 23, 32, .55); }
.setup-dialog h2 { margin-top: 0; }
.setup-dialog-steps { padding-left: 0; list-style: none; margin: 12px 0; display: grid; gap: 8px; }
.setup-dialog-steps li { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); }
.setup-dialog-steps li.todo { background: var(--warn-soft); border-color: var(--warn); }
.setup-dialog-steps li.done { background: var(--ok-soft); border-color: transparent; }
.setup-dialog-clash { padding: 10px 12px; border-radius: 8px; border: 1px dashed var(--border); color: var(--muted); }
.setup-dialog-clash b { color: var(--text); }

.codes-found { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.code-chip { display: inline-flex; gap: 6px; align-items: center; padding: 2px 4px 2px 8px; border-radius: 6px; background: var(--surface); }
table.data.compact td, table.data.compact th { padding: 4px 8px; }

/* revisione del modello con il BEP */
.review-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 8px; }
.review-counts .rc { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 8px; }
.review-counts .rc b { font-size: 1.5rem; line-height: 1; min-width: 1.6em; text-align: center; }
.review-counts .ok { background: var(--ok-soft); color: var(--ok); }
.review-counts .todo { background: var(--warn-soft); color: var(--warn); }
.review-counts .bad { background: var(--bad-soft); color: var(--bad); }
.review-counts .rc span { color: var(--text); font-size: .9rem; }
table.data tr.todo td { background: var(--warn-soft); }
table.data tr.bad td { background: var(--bad-soft); }
.inline-form { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 0 6px; }
.inline-form .small-select, .inline-form .small-input { width: auto; min-width: 9em; padding: 3px 6px; font-size: .85rem; }
.inline-form .small-input { min-width: 14em; }
.code-chip.cat-flagged { background: var(--warn-soft); }
.code-chip.cat-unknown { background: var(--skip-soft); }
.codes-found .code-chip { border: 1px solid var(--border); }
.review-launch { position: sticky; bottom: 12px; z-index: 4; border: 2px solid var(--brand); }
.review-launch p { margin: 0 0 10px; }
.btn.big { font-size: 1.05rem; padding: 10px 20px; }
.progress.indeterminate { overflow: hidden; position: relative; }
.progress.indeterminate > i { position: absolute; width: 35%; animation: qa-slide 1.4s ease-in-out infinite; }
@keyframes qa-slide { from { left: -35%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .progress.indeterminate > i { animation: none; width: 100%; opacity: .5; } }

/* BEP di progetto */
.bep-verdict.compliant { border-left: 6px solid var(--ok); }
.bep-verdict.to_fix { border-left: 6px solid var(--bad); }
.bep-verdict.compliant h2 { color: var(--ok); }
.bep-verdict.to_fix h2 { color: var(--bad); }
.bep-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.bep-rule { border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.bep-rule h3 { font-size: 1rem; }
.bep-rule code { word-break: break-word; }
.step.bep { border-style: solid; }

/* stato del progetto: BEP, modelli, clash */
.overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ov-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); border-left: 6px solid var(--skip); color: var(--text); box-shadow: var(--shadow); }
.ov-tile:hover { text-decoration: none; border-color: var(--brand); }
.ov-tile b { font-size: 1.25rem; line-height: 1.3; }
.ov-tile small { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.ov-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.ov-tile.ok { border-left-color: var(--ok); } .ov-tile.ok b { color: var(--ok); }
.ov-tile.warn { border-left-color: var(--warn); } .ov-tile.warn b { color: var(--warn); }
.ov-tile.bad { border-left-color: var(--bad); } .ov-tile.bad b { color: var(--bad); }
@media (max-width: 760px) { .overview { grid-template-columns: 1fr; } }
.rules-strip { padding: 12px 16px; margin-bottom: 16px; }
.rules-strip-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.rules-strip-title { font-weight: 700; margin-right: 4px; }
.rules-strip .spacer { flex: 1; }
.rs-item { font-size: .85rem; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
a.rs-item:hover { text-decoration: none; filter: brightness(.96); }
.rs-item.ok { background: var(--ok-soft); color: var(--ok); } .rs-item.todo { background: var(--warn-soft); color: var(--warn); }
#setup-steps-box { margin-top: 12px; }
.upload-reveal { margin-bottom: 16px; }
.run-main { display: inline-flex; align-items: baseline; gap: 8px; font-weight: 600; }
.run-main .score { font-size: 1.05rem; }
.run-partial { color: var(--muted); margin-top: 4px; white-space: normal; max-width: 320px; }
.clash-sum-row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.clash-sum-num { font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.clash-sum-top { list-style: none; padding: 0; margin: 0 0 12px; }
.clash-sum-top li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.clash-sum-top li:last-child { border-bottom: 0; }
.bep-decision { border: 2px solid var(--brand); margin-bottom: 16px; }
.bep-decision.to_fix { border-color: var(--warn); }
.bep-decision .row form { margin: 0; }

