/* Space Grotesk (SIL Open Font License 1.1, vedi /fonts/SpaceGrotesk-OFL.txt): ospitato sul sito, nessuna richiesta a terzi */
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/space-grotesk-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
:root {
  --bg: #07090d; --bg2: #0c1017; --card: #111722; --card2: #161e2c; --line: #1f2a3b;
  --text: #e6edf6; --muted: #8392a7; --dim: #5b6a80;
  --accent: #19e6a7; --accent2: #2fb8ff; --warn: #ffb547; --danger: #ff4d6a; --good: #19e6a7;
  --radius: 14px; --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent2); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 13px; } .tiny { font-size: 11.5px; }
.pos { color: var(--good); } .neg { color: var(--danger); } .warn-t { color: var(--warn); }
.row { display: flex; gap: 12px; align-items: center; } .wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.hidden { display: none !important; }

/* ---------- Bottoni / form ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); cursor: pointer; font-weight: 600; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: #2c3b52; background: #1b2536; }
.btn.primary { background: linear-gradient(135deg, var(--accent), #12c4d8); color: #04130d; border: 0; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: rgba(255,77,106,.12); color: var(--danger); border-color: rgba(255,77,106,.35); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 14px 26px; font-size: 16px; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
label.f { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input.in, select.in { width: 100%; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; outline: none; }
input.in:focus, select.in:focus { border-color: var(--accent2); }
.field { margin-bottom: 14px; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 26px; cursor: pointer; transition: .2s; }
.switch span:before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span:before { transform: translateX(20px); }

/* ---------- Card / badge ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 14px; font-size: 15px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; }
.b-SAFE { background: rgba(25,230,167,.12); color: var(--good); }
.b-CAUTION { background: rgba(255,181,71,.12); color: var(--warn); }
.b-DANGER { background: rgba(255,77,106,.13); color: var(--danger); }
.b-chain { background: var(--card2); color: var(--muted); border: 1px solid var(--line); }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.stat .v { font-size: 26px; font-weight: 700; font-family: var(--mono); margin-top: 4px; }
.score { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-family: var(--mono); font-size: 13px; flex: none; }
.tok-img { width: 30px; height: 30px; border-radius: 50%; background: var(--card2); object-fit: cover; flex: none; }

/* ---------- Tabelle ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--bg2); position: sticky; top: 0; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr.click { cursor: pointer; } tr.click:hover td { background: #141c29; }
tr:last-child td { border-bottom: 0; }

/* ---------- Landing ---------- */
.nav { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px); background: rgba(7,9,13,.75); border-bottom: 1px solid var(--line); padding-top: var(--safe-top); }
.nav-in { max-width: 1200px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 24px; }
/* ---------- Marchio "Candela D" ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: none; }
.brand:hover { color: var(--text); }
.brand-word { font-family: 'Space Grotesk', var(--sans); font-weight: 700; font-size: 19px; letter-spacing: -.01em; line-height: 1; white-space: nowrap; }
.brand-word b { color: var(--accent); font-weight: 700; }
.dyt-mark { display: block; flex: none; overflow: visible; }
.dyt-mark .dyt-trend { stroke-dasharray: 34; stroke-dashoffset: 0; }
.dyt-mark .dyt-dot { transform-origin: 46px 25.5px; }
.dyt-mark.is-anim .dyt-trend { animation: dytTrend 4.8s cubic-bezier(.6,0,.3,1) infinite; }
.dyt-mark.is-anim .dyt-dot { animation: dytDot 4.8s ease-out infinite; }
.brand:hover .dyt-mark.is-anim .dyt-trend, .brand:hover .dyt-mark.is-anim .dyt-dot { animation-duration: 2.4s; }
@keyframes dytTrend { 0% { stroke-dashoffset: 34; } 25% { stroke-dashoffset: 0; } 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes dytDot { 0%, 22% { transform: scale(0); opacity: 0; } 30% { transform: scale(1.35); opacity: 1; } 38%, 85% { transform: scale(1); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dyt-mark.is-anim .dyt-trend, .dyt-mark.is-anim .dyt-dot { animation: none; } }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot .brand-word { font-size: 26px; }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; animation: fade .6s ease both; }
.nav-links { display: flex; gap: 22px; } .nav-links a { color: var(--muted); font-size: 14px; } .nav-links a:hover { color: var(--text); }
@media (max-width: 760px) { .nav-links { display: none; } }
.section { max-width: 1200px; margin: 0 auto; padding: 90px 20px; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.04; letter-spacing: -2px; margin: 18px 0; font-weight: 800; }
.h2 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -1px; margin: 10px 0 14px; line-height: 1.1; }
.lead { font-size: 18.5px; color: var(--muted); max-width: 640px; }
.grad { background: linear-gradient(120deg, var(--accent), var(--accent2) 60%, #a98bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero { position: relative; overflow: hidden; }
.hero:before { content: ''; position: absolute; inset: -40% -20% auto; height: 900px; background: radial-gradient(circle at 30% 30%, rgba(25,230,167,.16), transparent 45%), radial-gradient(circle at 75% 20%, rgba(47,184,255,.14), transparent 40%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; position: relative; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(25,230,167,.6); animation: pulse 1.8s infinite; display: inline-block; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(25,230,167,0); } 100% { box-shadow: 0 0 0 0 rgba(25,230,167,0); } }
.terminal { background: linear-gradient(180deg, #0d131d, #0a0e15); border: 1px solid var(--line); border-radius: 18px; padding: 0; box-shadow: 0 40px 120px -40px rgba(25,230,167,.25); overflow: hidden; }
.terminal-h { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.feed { max-height: 430px; overflow: hidden; }
.feed-item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid rgba(31,42,59,.6); animation: slideIn .5s ease; font-size: 13px; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: 40px; }
.counters > div { background: var(--bg2); padding: 22px; }
.counters .v { font-size: 30px; font-weight: 800; font-family: var(--mono); }
@media (max-width: 760px) { .counters { grid-template-columns: repeat(2, 1fr); } }
.feature { padding: 26px; }
.feature .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: rgba(25,230,167,.1); color: var(--accent); font-size: 20px; margin-bottom: 14px; }
.feature h4 { margin: 0 0 8px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: step; }
@media (max-width: 960px) { .pipeline { grid-template-columns: 1fr 1fr; } }
.pipeline .card { position: relative; } .pipeline .card:before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--mono); color: var(--accent); font-weight: 700; font-size: 13px; }
.pipeline h4 { margin: 8px 0 6px; } .pipeline p { margin: 0; font-size: 13.5px; color: var(--muted); }
.checks { columns: 3; column-gap: 30px; font-size: 14px; } .checks div { break-inside: avoid; padding: 6px 0; color: var(--muted); } .checks div b { color: var(--good); margin-right: 8px; }
@media (max-width: 760px) { .checks { columns: 1; } }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr; } }
.plan { display: flex; flex-direction: column; padding: 28px; position: relative; }
.plan.hl { border-color: var(--accent); background: linear-gradient(180deg, rgba(25,230,167,.07), var(--card) 40%); }
.plan .tag { position: absolute; top: -12px; left: 28px; background: var(--accent); color: #04130d; font-weight: 800; font-size: 11.5px; padding: 3px 10px; border-radius: 99px; }
.plan .price { font-size: 44px; font-weight: 800; letter-spacing: -1px; margin: 10px 0 2px; font-family: var(--mono); }
.plan ul { list-style: none; padding: 0; margin: 20px 0 26px; flex: 1; } .plan li { padding: 7px 0; font-size: 14.5px; display: flex; gap: 10px; } .plan li:before { content: '✓'; color: var(--accent); font-weight: 800; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.seg button.on { background: var(--card2); color: var(--text); }
details.faq { border-bottom: 1px solid var(--line); padding: 18px 0; } details.faq summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; } details.faq p { color: var(--muted); margin: 12px 0 0; }
.disclaimer { font-size: 12.5px; color: var(--dim); border-top: 1px solid var(--line); }

/* ---------- App layout ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--bg2); border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding-top: calc(20px + var(--safe-top)); }
.side a.nl { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.side a.nl:hover { background: var(--card); color: var(--text); }
.side a.nl.on { background: var(--card2); color: var(--text); }
.side a.nl span { width: 20px; text-align: center; }
.main { padding: 26px 30px 60px; min-width: 0; padding-top: calc(26px + var(--safe-top)); }
.page-h { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-h h1 { margin: 0; font-size: 24px; letter-spacing: -.4px; }
.tabbar { display: none; }
.mtop { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { display: none; }
  .mtop { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 35; padding: calc(10px + var(--safe-top)) 14px 10px; background: rgba(7,9,13,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .main { padding: 18px 14px calc(90px + var(--safe-bottom)); }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: rgba(12,16,23,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); z-index: 40; padding-bottom: var(--safe-bottom); }
  .tabbar a { flex: 1; text-align: center; padding: 9px 0 8px; color: var(--muted); font-size: 10.5px; }
  .tabbar a.on { color: var(--accent); } .tabbar a span { display: block; font-size: 19px; }
}
.pill-bot { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }

/* ---------- Drawer / modal / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 60; display: flex; justify-content: flex-end; animation: fade .2s; }
.overlay.center { justify-content: center; align-items: center; padding: 16px; }
@keyframes fade { from { opacity: 0; } }
.drawer { width: min(560px, 100%); height: 100%; overflow-y: auto; background: var(--bg2); border-left: 1px solid var(--line); padding: 24px; padding-top: calc(24px + var(--safe-top)); animation: slideL .25s ease; }
@keyframes slideL { from { transform: translateX(30px); opacity: 0; } }
.modal { width: min(520px, 100%); max-height: 92vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.flag { display: flex; gap: 10px; padding: 9px 12px; border-radius: 9px; font-size: 13.5px; margin-bottom: 6px; }
.flag.danger { background: rgba(255,77,106,.08); color: #ff9aab; } .flag.warn { background: rgba(255,181,71,.08); color: #ffd08a; } .flag.good { background: rgba(25,230,167,.07); color: #8ff3d2; }
.bar { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; } .bar i { display: block; height: 100%; border-radius: 6px; }
#toast { position: fixed; bottom: calc(24px + var(--safe-bottom)); left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
#toast div { background: var(--card2); border: 1px solid var(--line); padding: 11px 18px; border-radius: 11px; font-size: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.5); animation: slideIn .25s; }
#toast div.err { border-color: rgba(255,77,106,.5); } #toast div.ok { border-color: rgba(25,230,167,.5); }
.auth-box { max-width: 420px; margin: 60px auto; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.log { font-family: var(--mono); font-size: 12.5px; max-height: 380px; overflow-y: auto; }
.log div { padding: 6px 0; border-bottom: 1px solid rgba(31,42,59,.6); }
.log .success { color: var(--good); } .log .error { color: var(--danger); } .log .warn { color: var(--warn); }
.spark { width: 100%; height: 120px; }
.addr { font-family: var(--mono); font-size: 12.5px; word-break: break-all; background: var(--bg); padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); }

/* ================= AI AGENTS LAB ================= */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flow { to { stroke-dashoffset: -2.8; } }
@keyframes agentPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent); } 70% { box-shadow: 0 0 0 16px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes blink { 50% { opacity: .2; } }
@keyframes scanY { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
@keyframes popIn { from { transform: translate(-50%,-50%) scale(.6); opacity: 0; } }
@keyframes glowText { 50% { text-shadow: 0 0 24px currentColor; } }
.ai-top { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 12.5px; cursor: default; }
.chip.click { cursor: pointer; transition: .15s; } .chip.click:hover { border-color: var(--accent); color: var(--accent); }
.chip img { width: 16px; height: 16px; border-radius: 50%; }
.ai-stage { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
@media (max-width: 1100px) { .ai-stage { grid-template-columns: 1fr; } }
.swarm-wrap { position: relative; background: radial-gradient(circle at 50% 50%, #0d1a20 0%, #080b11 65%); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; padding: 14px; }
.swarm-wrap:before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(47,184,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(47,184,255,.05) 1px, transparent 1px); background-size: 28px 28px; pointer-events: none; }
.swarm-wrap.running:after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 100%; background: linear-gradient(180deg, transparent, rgba(25,230,167,.06), transparent); animation: scanY 2.6s linear infinite; pointer-events: none; }
.swarm-hdr { position: relative; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); z-index: 2; }
.swarm { position: relative; width: 100%; max-width: 620px; aspect-ratio: 1; margin: 0 auto; }
.swarm canvas, .swarm svg.links { position: absolute; inset: 0; width: 100%; height: 100%; }
.link { stroke: #1d2a3c; stroke-width: .35; stroke-dasharray: 1.2 1.6; fill: none; transition: stroke .3s; }
.link.working { stroke: var(--c); animation: flow .55s linear infinite; stroke-width: .5; }
.link.done { stroke: var(--c); stroke-dasharray: none; opacity: .55; }
.link.error { stroke: var(--danger); opacity: .5; }
.packet { fill: var(--c); filter: drop-shadow(0 0 1.5px var(--c)); }
.agent { position: absolute; transform: translate(-50%, -50%); width: 25%; text-align: center; z-index: 3; cursor: pointer; }
.agent .orb { width: 66px; height: 66px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; font-size: 26px; background: radial-gradient(circle at 35% 30%, #1c2638, #0a0e15); border: 1px solid #243146; position: relative; transition: border-color .3s, box-shadow .3s, opacity .3s; opacity: .55; }
.agent.working .orb, .agent.done .orb, .agent.error .orb { opacity: 1; }
.agent.working .orb { animation: agentPulse 1.3s infinite; border-color: var(--c); }
.agent.working .orb:after { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 2px dashed var(--c); animation: spin 2.6s linear infinite; }
.agent.done .orb { border-color: var(--c); box-shadow: 0 0 26px -4px var(--c), inset 0 0 18px -8px var(--c); }
.agent.error .orb { border-color: var(--danger); }
.agent .nm { font-size: 12px; font-weight: 700; margin-top: 9px; white-space: nowrap; }
.agent .st { font-size: 10.5px; color: var(--muted); min-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent.working .st { color: var(--c); animation: blink 1.1s infinite; }
.agent .sc { position: absolute; top: -6px; right: -12px; background: var(--c); color: #04130d; font: 800 11px var(--mono); padding: 2px 7px; border-radius: 99px; animation: popSc .35s ease; }
@keyframes popSc { from { transform: scale(.3); opacity: 0; } }
.chief { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34%; aspect-ratio: 1; z-index: 4; }
.chief .ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 10%, var(--accent) 25%, transparent 40% 55%, var(--accent2) 75%, transparent 90%); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); animation: spin 7s linear infinite; opacity: .45; }
.chief .ring.r2 { inset: 8%; animation-duration: 11s; animation-direction: reverse; opacity: .3; }
.chief .ring.r3 { inset: 16%; animation-duration: 4s; opacity: .2; }
.chief.working .ring { animation-duration: 1.1s; opacity: 1; } .chief.working .ring.r2 { animation-duration: 1.6s; } .chief.working .ring.r3 { animation-duration: .8s; }
.chief .core { position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #183331, #070b10 72%); border: 1px solid #23404a; display: grid; place-items: center; text-align: center; padding: 6px; transition: box-shadow .4s; }
.chief .core .ic { font-size: 26px; line-height: 1; } .chief .core .lb { font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .5px; }
.chief .core .dv { font: 800 18px var(--mono); letter-spacing: 1px; animation: glowText 2s infinite; }
.chief.BUY .core { box-shadow: 0 0 70px -6px var(--good); } .chief.BUY .dv { color: var(--good); }
.chief.WATCH .core { box-shadow: 0 0 70px -6px var(--warn); } .chief.WATCH .dv { color: var(--warn); }
.chief.AVOID .core { box-shadow: 0 0 70px -6px var(--danger); } .chief.AVOID .dv { color: var(--danger); }
@media (max-width: 600px) { .agent .orb { width: 46px; height: 46px; font-size: 19px; } .agent .nm { font-size: 10.5px; } .agent .st { display: none; } .chief .core .dv { font-size: 13px; } }
.term { background: #05070b; border: 1px solid var(--line); border-radius: 14px; font: 12px/1.65 var(--mono); padding: 12px 14px; height: 250px; overflow-y: auto; }
.term div { animation: slideIn .25s ease; } .term .t { color: var(--dim); } .term .ok { color: var(--good); } .term .er { color: var(--danger); } .term .ag { color: var(--accent2); }
.decision { position: relative; overflow: hidden; }
.decision .big { font: 800 40px var(--mono); letter-spacing: 2px; line-height: 1; }
.gauge { width: 150px; height: 84px; flex: none; }
.gauge path { fill: none; stroke-width: 10; stroke-linecap: round; }
.gauge .val { transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); }
.reports { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
@media (max-width: 1100px) { .reports { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 640px) { .reports { grid-template-columns: 1fr; } }
.rep { border-left: 3px solid var(--c); position: relative; min-height: 120px; }
.rep.idle { opacity: .45; } .rep.working:after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--c), transparent); animation: scanX 1.2s linear infinite; }
@keyframes scanX { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.rep ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); } .rep li { margin-bottom: 4px; animation: slideIn .3s ease both; }
.rep .rf li { color: #ff9aab; }
.cand { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 8px; }
.cand .c { min-width: 170px; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: .2s; }
.cand .c.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cand .prog { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 8px; } .cand .prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .4s; }
.dec-BUY { color: var(--good); } .dec-WATCH { color: var(--warn); } .dec-AVOID { color: var(--danger); }

/* ================= DIAGNOSTICA ================= */
.diag-row { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.diag-row:first-child { border-top: 0; }
.diag-ic { width: 22px; flex: none; text-align: center; font-weight: 800; font-size: 16px; line-height: 1.4; }
.diag-fix { margin-top: 8px; font-size: 13px; line-height: 1.5; color: #cfe6ff; background: rgba(47,184,255,.07); border: 1px solid rgba(47,184,255,.25); border-radius: 8px; padding: 8px 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ================= RISULTATI & STRATEGY LAB ================= */
.chart { width: 100%; display: block; margin-top: 8px; }
.corr { position: relative; height: 8px; background: var(--line); border-radius: 6px; min-width: 120px; }
.corr i { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.corr:after { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--muted); }
.kpi { padding: 14px; } .kpi .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; } .kpi .v { font: 700 22px var(--mono); margin-top: 3px; } .kpi .s { font-size: 11.5px; color: var(--dim); }
.optrow td { vertical-align: top; } .optrow.base td { background: rgba(47,184,255,.05); } .optrow.best td { background: rgba(25,230,167,.06); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
.proof { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .proof { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 520px) { .proof { grid-template-columns: 1fr; } }
.proof .card .v { font: 800 30px var(--mono); margin: 6px 0 4px; }
@media (max-width: 860px) { .tabbar { overflow-x: auto; scrollbar-width: none; } .tabbar a { flex: 1 0 auto; min-width: 60px; padding-left: 4px; padding-right: 4px; } }
