/* BOYLE LAB · stile
   Blu oceano con accenti ciano, come il resto del sito. Niente effetti da videogioco:
   pannelli sobri, numeri leggibili, grafici con palette sicura per i deficit del colore. */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --l-bg: #020c1a; --l-text: #edf7ff; --l-muted: rgba(237,247,255,.74); --l-soft: rgba(237,247,255,.5);
  --l-cyan: #7be4ff; --l-cyan2: #a8eeff; --l-line: rgba(120,210,255,.18); --l-panel: rgba(5,18,46,.72);
  --l-r: 18px;
}
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--l-text); background: var(--l-bg);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif; line-height: 1.6; overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0; z-index: -3; background: url("../assets/ocean-desktop.jpg") center top / cover no-repeat; }
body::after { content: ""; position: fixed; inset: 0; z-index: -2; background: linear-gradient(180deg, rgba(2,12,26,.80), rgba(2,12,26,.93) 60%); }
@media (max-width: 600px) { body::before { background-image: url("../assets/ocean-mobile.jpg"); } }
a { color: inherit; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: #fff; color: #00131e; padding: 10px 14px; border-radius: 10px; z-index: 300; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--l-cyan); outline-offset: 2px; }
.container { width: min(1200px, 100%); padding: 0 28px; margin: 0 auto; }

/* ── header (stesso disegno di eventi e rete) ── */
.header { position: sticky; top: 0; z-index: 200; background: rgba(2,10,24,.78); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(120,210,255,.1); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; position: relative; }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand img { width: 50px; height: 50px; flex-shrink: 0; border-radius: 50%; filter: drop-shadow(0 0 10px rgba(123,228,255,.3)); }
.brand__text { display: grid; gap: 2px; min-width: 0; }
.brand__text strong { font-size: .94rem; font-weight: 700; white-space: nowrap; }
.brand__text em { font-style: normal; font-size: .63rem; color: var(--l-soft); line-height: 1.3; }
.nav--desktop { display: flex; align-items: center; gap: 2px; font-size: .86rem; }
.nav--desktop a { white-space: nowrap; color: var(--l-muted); padding: 6px 9px; border-radius: 9px; text-decoration: none; transition: color .2s, background .2s; }
.nav--desktop a:hover { color: var(--l-text); background: rgba(123,228,255,.08); }
.nav--desktop a.nav-active { color: var(--l-cyan); }
.lang-toggle { display: flex; align-items: center; gap: 2px; background: rgba(6,20,44,.7); border: 1px solid rgba(123,228,255,.22); border-radius: 999px; padding: 5px 13px; font: inherit; font-size: .78rem; color: var(--l-muted); cursor: pointer; white-space: nowrap; }
.lang-toggle:hover { background: rgba(123,228,255,.12); color: var(--l-cyan); }
.lang-sep { opacity: .4; }
.nav-mobile-btn { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px; background: rgba(6,20,44,.7); border: 1px solid rgba(123,228,255,.2); border-radius: 11px; padding: 0 11px; cursor: pointer; }
.nav-mobile-btn span { display: block; height: 2px; background: var(--l-text); border-radius: 2px; transition: transform .22s, opacity .22s; }
.nav-mobile-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-mobile-btn.is-open span:nth-child(2) { opacity: 0; }
.nav-mobile-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile-panel { display: none; position: absolute; top: calc(100% + 10px); right: 8px; z-index: 9000; background: rgba(3,14,32,.97); border: 1px solid rgba(123,228,255,.2); border-radius: 18px; padding: 10px; box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.nav-mobile-panel[aria-hidden="false"] { display: grid; gap: 2px; }
.nav-mobile-panel a { display: block; padding: 11px 16px; border-radius: 12px; font-size: .95rem; font-weight: 600; text-decoration: none; }
.nav-mobile-panel a:hover { background: rgba(123,228,255,.09); color: var(--l-cyan2); }
.lang-toggle--mobile { margin: 6px 0 2px; padding: 10px 16px; border-radius: 12px; font-size: .9rem; width: 100%; }
@media (max-width: 1180px) {
  .nav--desktop { display: none; }
  .nav-mobile-btn { display: flex; }
  .lang-toggle:not(.lang-toggle--mobile) { display: none; }
}

/* ── sotto-navigazione del laboratorio ── */
.lab-subnav { position: sticky; top: 72px; z-index: 150; background: rgba(2,12,28,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(120,210,255,.08); }
.lab-subnav .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 8px; padding-bottom: 8px; }
.lab-subnav a { white-space: nowrap; text-decoration: none; color: var(--l-muted); font-size: .86rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid transparent; }
.lab-subnav a:hover { color: var(--l-text); }
.lab-subnav a.is-on { color: var(--l-cyan); border-color: rgba(123,228,255,.3); background: rgba(123,228,255,.06); }
.lab-subnav .lab-brand { color: var(--l-text); font-weight: 800; letter-spacing: .02em; margin-right: 8px; }

/* ── pagina ── */
main { padding: 28px 0 90px; }
.lab-hero { padding: 26px 0 10px; }
.lab-title { margin: 0; font-size: clamp(3.2rem, 9vw, 7.6rem); line-height: .9; letter-spacing: -.05em; font-weight: 800; }
.lab-grad { background: linear-gradient(135deg, #a8eeff 0%, #7be4ff 40%, #c4b0ff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.lab-lead { max-width: 760px; color: var(--l-muted); font-size: clamp(1rem, 1.5vw, 1.18rem); margin: 18px 0 0; }
.lab-h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -.02em; margin: 46px 0 16px; }
.lab-h3 { font-size: 1rem; margin: 0 0 12px; letter-spacing: .02em; color: var(--l-cyan2); }
.lab-panel { background: var(--l-panel); border: 1px solid var(--l-line); border-radius: var(--l-r); padding: 18px 20px; }
.lab-disclaimer { margin: 26px 0 0; padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(230,159,0,.35); background: rgba(230,159,0,.08); color: rgba(255,236,200,.92); font-size: .88rem; }

/* percorsi */
.lab-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
.lab-path { display: block; text-decoration: none; padding: 28px 28px 24px; border-radius: 22px; border: 1px solid var(--l-line); background: var(--l-panel); position: relative; overflow: hidden; transition: border-color .25s, transform .25s; }
.lab-path::after { content: ""; position: absolute; inset: auto -20% -60% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(123,228,255,.16), transparent 70%); pointer-events: none; }
.lab-path--adv::after { background: radial-gradient(circle, rgba(196,176,255,.18), transparent 70%); }
.lab-path:hover { border-color: rgba(123,228,255,.45); transform: translateY(-2px); }
.lab-path h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 8px 0 8px; letter-spacing: -.03em; }
.lab-path p { color: var(--l-muted); margin: 0 0 18px; max-width: 46ch; }
.lab-path__k { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--l-cyan); font-weight: 700; }
.lab-path--adv .lab-path__k { color: #c4b0ff; }
.lab-path__go { font-weight: 700; }

.lab-areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lab-area { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--l-line); background: rgba(5,18,46,.55); text-decoration: none; }
.lab-area b { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(123,228,255,.1); color: var(--l-cyan); }
.lab-area em { font-style: normal; color: var(--l-soft); font-size: .85rem; }
.lab-area:hover { border-color: rgba(123,228,255,.4); }
.lab-foot-links { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 34px; }
.lab-foot-links a { color: var(--l-cyan); font-weight: 600; text-decoration: none; }

/* catalogo */
.lab-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; align-items: end; }
.lab-search { flex: 1 1 260px; }
.lab-search input, .lab-sel select, .lab-ctl select, .lab-num {
  width: 100%; font: inherit; color: var(--l-text); background: rgba(3,14,32,.85); border: 1px solid rgba(123,228,255,.25); border-radius: 12px; padding: 10px 12px;
}
.lab-sel { display: grid; gap: 4px; font-size: .78rem; color: var(--l-soft); min-width: 160px; }
.lab-count { color: var(--l-soft); font-size: .88rem; margin: 16px 0 10px; }
.lab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.lab-card { display: flex; flex-direction: column; text-decoration: none; padding: 18px 18px 16px; border-radius: 18px; border: 1px solid var(--l-line); background: var(--l-panel); transition: border-color .2s, transform .2s; }
.lab-card:hover { border-color: rgba(123,228,255,.45); transform: translateY(-2px); }
.lab-card h3 { margin: 10px 0 6px; font-size: 1.12rem; letter-spacing: -.01em; }
.lab-card p { margin: 0 0 12px; color: var(--l-muted); font-size: .92rem; flex: 1; }
.lab-card__meta { font-size: .76rem; color: var(--l-soft); }
.lab-card.is-pending { opacity: .72; border-style: dashed; }
.lab-card__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.lab-empty { color: var(--l-soft); }

/* badge di stato */
.lb { display: inline-block; font-size: .64rem; font-weight: 800; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.lb--base { color: #7be4ff; border-color: rgba(123,228,255,.5); background: rgba(123,228,255,.08); }
.lb--advanced { color: #c4b0ff; border-color: rgba(196,176,255,.5); background: rgba(196,176,255,.08); }
.lb--fisico { color: #8fd0ff; border-color: rgba(86,180,233,.5); background: rgba(86,180,233,.1); }
.lb--fisiologico { color: #6fe0bd; border-color: rgba(0,158,115,.6); background: rgba(0,158,115,.12); }
.lb--didattico { color: #ffcf73; border-color: rgba(230,159,0,.55); background: rgba(230,159,0,.1); }
.lb--davalidare { color: #ff9f80; border-color: rgba(213,94,0,.6); background: rgba(213,94,0,.12); }

/* esperimento */
.lab-back { display: inline-block; margin-top: 8px; color: var(--l-cyan); text-decoration: none; font-size: .9rem; font-weight: 600; }
.lab-exp-head { margin-top: 18px; }
.lab-exp-title { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: .95; letter-spacing: -.04em; margin: 14px 0 0; }
.lab-exp-meta { color: var(--l-soft); font-size: .82rem; margin: 10px 0 0; }
.lab-ctl { margin-bottom: 16px; }
.lab-ctl label { font-size: .88rem; font-weight: 600; }
.lab-ctl > label { display: block; margin-bottom: 6px; }
.lab-ctl__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.lab-num { width: 92px; flex: none; padding: 6px 8px; text-align: right; font-variant-numeric: tabular-nums; }
.lab-unit { color: var(--l-soft); font-weight: 400; }
.lab-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lab-btn { font: inherit; font-size: .84rem; font-weight: 700; color: var(--l-text); background: rgba(123,228,255,.08); border: 1px solid rgba(123,228,255,.32); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.lab-btn:hover { background: rgba(123,228,255,.16); }
.lab-btn[aria-pressed="true"] { background: rgba(123,228,255,.22); color: #fff; }
.lab-export { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; font-size: .78rem; color: var(--l-soft); }
.lab-chip { font: inherit; font-size: .76rem; font-weight: 700; color: var(--l-cyan2); background: transparent; border: 1px solid rgba(123,228,255,.28); border-radius: 8px; padding: 4px 9px; cursor: pointer; }
.lab-chip:hover { background: rgba(123,228,255,.1); }
.lab-toast { min-height: 1.4em; margin: 10px 0 0; font-size: .82rem; color: var(--l-cyan); word-break: break-all; }
.lab-chart { width: 100%; height: auto; display: block; border-radius: 12px; }
.lab-out { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lab-out th, .lab-out td { text-align: left; padding: 9px 8px; border-bottom: 1px solid rgba(120,210,255,.1); vertical-align: top; }
.lab-out th[scope=row] { font-weight: 500; color: var(--l-muted); width: 48%; }
.lab-out td { font-weight: 700; font-size: 1.04rem; }
.lab-out td small { display: block; font-weight: 400; font-size: .78rem; color: var(--l-soft); }
.lab-out thead th { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--l-soft); }
.lab-out .lab-b { color: var(--l-muted); font-weight: 600; }
.lab-out .lab-d { color: var(--l-cyan2); font-weight: 600; font-size: .9rem; }
.lab-cmp th[scope=row] { width: auto; }
.lab-scroll { overflow-x: auto; }
.lab-warn { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(213,94,0,.12); border: 1px solid rgba(213,94,0,.4); font-size: .88rem; }
.lab-note { margin: 12px 0 0; font-size: .86rem; color: var(--l-muted); }
.lab-exit { position: fixed; right: 18px; top: 16px; z-index: 10060; }

/* didattica */
.lab-learn__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lab-learn h3, .lab-model h3 { margin: 0 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--l-cyan); }
.lab-learn p { margin: 0; }
.lab-wide { grid-column: 1 / -1; }
.lab-formula { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.02rem; color: #fff; }
.lab-miscon { border-color: rgba(230,159,0,.35); }
.lab-miscon h3 { color: #ffcf73; }
.lab-quiz fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.lab-quiz legend { font-weight: 700; margin-bottom: 8px; }
.lab-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.lab-opt:hover { background: rgba(123,228,255,.06); }
.lab-opt input { margin-top: 5px; accent-color: var(--l-cyan); }
.lab-quiz__fb { margin: 12px 0 0 !important; font-weight: 600; }
.lab-quiz__fb.is-ok { color: #6fe0bd; }
.lab-quiz__fb.is-ko { color: #ffb08f; }
.lab-next { display: inline-block; margin-top: 16px; color: #c4b0ff; font-weight: 700; text-decoration: none; }

/* scheda scientifica */
.lab-sci { display: grid; gap: 10px; }
.lab-model summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lab-model summary::-webkit-details-marker { display: none; }
.lab-model summary::after { content: "+"; margin-left: auto; color: var(--l-cyan); font-weight: 700; }
.lab-model[open] summary::after { content: "−"; }
.lab-model dl { display: grid; grid-template-columns: 200px 1fr; gap: 8px 18px; margin: 16px 0 0; font-size: .9rem; }
.lab-model dt { color: var(--l-soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; padding-top: 2px; }
.lab-model dd { margin: 0; }
.lab-model ul { margin: 0; padding-left: 18px; }
.lab-model code, .lab-val code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86rem; color: #e6f7ff; }
.lab-vars td { padding: 2px 12px 2px 0; }
.lab-refs { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.lab-refs a { color: var(--l-cyan); text-decoration: none; }
.lab-refid { color: var(--l-soft); font-size: .8rem; }
.lab-pending { margin-top: 24px; padding: 22px; border-radius: var(--l-r); border: 1px dashed rgba(213,94,0,.55); background: rgba(213,94,0,.07); }
.lab-pending h2 { margin: 0 0 8px; color: #ff9f80; }
.lab-saved { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.lab-saved li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: rgba(5,18,46,.55); border: 1px solid var(--l-line); }
.lab-saved a { color: var(--l-cyan2); text-decoration: none; }
.lab-score { font-size: 1.3rem; font-weight: 800; }
.lab-score.is-ok, .lab-ok { color: #6fe0bd; }
.lab-score.is-ko, .lab-ko { color: #ff9f80; }
.lab-val td { font-size: .86rem; font-weight: 500; }
.lab-cats p { margin: 6px 0; font-size: .92rem; color: var(--l-muted); }
.lab-plain { padding-left: 18px; color: var(--l-muted); }

.lab-footer { border-top: 1px solid rgba(120,210,255,.1); padding: 26px 0 40px; color: var(--l-soft); font-size: .82rem; }
.lab-footer a { color: var(--l-muted); }

@media (max-width: 900px) {
  .lab-paths, .lab-learn__grid { grid-template-columns: 1fr; }
  .lab-areas { grid-template-columns: 1fr 1fr; }
  .lab-model dl { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .brand__text em { display: none; }
  .lab-areas { grid-template-columns: 1fr; }
  .lab-title { font-size: clamp(3rem, 17vw, 4.6rem); }
  .lab-out th[scope=row] { width: 55%; }
}

/* modalità presentazione: solo esperimento, caratteri grandi */
body.lab-present .header, body.lab-present .lab-subnav, body.lab-present .lab-back, body.lab-present .lab-disclaimer,
body.lab-present .lab-section, body.lab-present .lab-footer, body.lab-present #barometro, body.lab-present .bmx, body.lab-present .lab-toolbar, body.lab-present .lab-export { display: none !important; }
body.lab-present main { padding-top: 16px; }
body.lab-present .lab-exp-title { font-size: clamp(2.2rem, 4vw, 3.4rem); }
body.lab-present .lab-out td { font-size: 1.35rem; }
body.lab-present .lab-ctl label { font-size: 1.05rem; }
body.lab-present .container { width: min(1600px, 100%); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lab-card, .lab-path { transition: none; }
  .lab-card:hover, .lab-path:hover { transform: none; }
}
@media print {
  body::before, body::after, .header, .lab-subnav, .lab-toolbar, .lab-export { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ══════════════════════════════════════════════════════════════════════════
   LABORATORIO · strumenti, banco, letture (v2)
   ══════════════════════════════════════════════════════════════════════════ */
:root { --l-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; --l-led: #39e6c3; }
body::after { background:
  linear-gradient(180deg, rgba(2,12,26,.82), rgba(2,12,26,.94) 60%),
  repeating-linear-gradient(0deg, rgba(123,228,255,.028) 0 1px, transparent 1px 48px),
  repeating-linear-gradient(90deg, rgba(123,228,255,.028) 0 1px, transparent 1px 48px); }
#lab-app.is-wide { width: min(1480px, 100%); }

/* LED */
.lab-led { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--l-led); box-shadow: 0 0 0 3px rgba(57,230,195,.14), 0 0 10px rgba(57,230,195,.8); animation: labLed 2.4s ease-in-out infinite; flex: none; }
.lab-led--v { background: #c4b0ff; box-shadow: 0 0 0 3px rgba(196,176,255,.14), 0 0 10px rgba(196,176,255,.8); }
.lab-led--s { width: 6px; height: 6px; animation: none; }
.lab-led--off { background: #ff9f80; box-shadow: 0 0 8px rgba(213,94,0,.7); animation: none; }
@keyframes labLed { 50% { opacity: .45; } }

/* icone */
.lab-ic { width: 22px; height: 22px; display: block; }

/* intestazione dei pannelli, tipo targhetta incisa */
.lab-ph { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font: 700 .7rem/1 var(--l-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--l-cyan2); }
.lab-ph__r { margin-left: auto; color: var(--l-soft); letter-spacing: .1em; }

/* ── home ── */
.lab-hero--home { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center; padding: 34px 0 6px; }
.lab-hero__copy { position: relative; z-index: 2; }
.lab-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 6px 14px 6px 12px; border-radius: 999px; border: 1px solid rgba(57,230,195,.3); background: rgba(57,230,195,.06); font: 700 .72rem/1 var(--l-mono); letter-spacing: .12em; text-transform: uppercase; color: #8ff0d9; }
.lab-kicker { text-decoration: none; } a.lab-kicker:hover { background: rgba(57,230,195,.14); }
.lab-hero__pick { margin-top: 26px; max-width: 560px; }
.lab-hero__scope { position: relative; z-index: 2; }
.lab-scope-mini { border-radius: 20px; border: 1px solid rgba(123,228,255,.3); background: linear-gradient(180deg, rgba(6,26,51,.92), rgba(2,11,24,.96)); box-shadow: 0 30px 80px rgba(0,0,0,.5), inset 0 0 60px rgba(123,228,255,.06); padding: 14px 16px 16px; position: relative; overflow: hidden; }
.lab-scope-mini::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px); }
.lab-scope-mini__bar { display: flex; align-items: center; gap: 10px; font: 700 .7rem/1 var(--l-mono); letter-spacing: .14em; color: var(--l-cyan2); margin-bottom: 10px; }
.lab-scope-mini__bar span:last-child { margin-left: auto; color: var(--l-soft); }
.lab-scope-mini svg { width: 100%; height: auto; display: block; border-radius: 10px; background: #020b18; }
.lab-scope-mini__lcd { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.lab-scope-mini__lcd span { padding: 8px 10px; border-radius: 10px; background: #020b18; border: 1px solid rgba(123,228,255,.18); font: 600 .72rem/1.2 var(--l-mono); color: var(--l-soft); }
.lab-scope-mini__lcd b { color: #c9f6ff; font-size: 1.05rem; text-shadow: 0 0 10px rgba(123,228,255,.6); }
.home-trace { stroke-dasharray: 520; stroke-dashoffset: 520; filter: drop-shadow(0 0 6px rgba(123,228,255,.8)); animation: homeTrace 5s cubic-bezier(.33,1,.68,1) infinite; }
.home-dot { offset-distance: 0%; filter: drop-shadow(0 0 8px #7be4ff); animation: homeDot 5s cubic-bezier(.33,1,.68,1) infinite; }
@keyframes homeTrace { 0% { stroke-dashoffset: 520; } 55%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes homeDot { 0% { offset-distance: 0%; } 55%, 85% { offset-distance: 100%; opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
.lab-bubbles { position: absolute; inset: -40px 0 0; pointer-events: none; overflow: hidden; z-index: 1; }
.lab-bubbles i { position: absolute; left: var(--x); bottom: -20px; width: var(--s); height: var(--s); border-radius: 50%; border: 1px solid rgba(168,238,255,.45); background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.35), rgba(168,238,255,.05) 60%); animation: labBub var(--t) linear var(--d) infinite; opacity: 0; }
@keyframes labBub { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .8; } 50% { transform: translate(12px, -260px); } 90% { opacity: .5; } 100% { transform: translate(-6px, -520px); opacity: 0; } }

.lab-path { padding-top: 26px; }
.lab-path__ic { position: absolute; top: 22px; right: 22px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; border: 1px solid rgba(123,228,255,.3); background: rgba(123,228,255,.07); color: var(--l-cyan); }
.lab-path--adv .lab-path__ic { color: #c4b0ff; border-color: rgba(196,176,255,.35); background: rgba(196,176,255,.07); }
.lab-path__ic .lab-ic { width: 28px; height: 28px; }
.lab-path__k { display: inline-flex; align-items: center; gap: 10px; font-family: var(--l-mono); }
.lab-area b { width: 40px; height: 40px; color: var(--l-cyan); border: 1px solid rgba(123,228,255,.25); }
.lab-area span small { display: block; font: 700 .66rem/1 var(--l-mono); letter-spacing: .14em; color: var(--l-soft); margin-bottom: 4px; }
.lab-area:hover b { box-shadow: 0 0 18px rgba(123,228,255,.35); }

/* ── menu a cascata ── */
.lab-cx { position: relative; }
.lab-cx__btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; cursor: pointer; text-align: left;
  font: inherit; color: var(--l-text); background: linear-gradient(180deg, rgba(10,36,66,.95), rgba(4,18,38,.95)); border: 1px solid rgba(123,228,255,.38); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 30px rgba(0,0,0,.3); }
.lab-cx__btn:hover { border-color: rgba(123,228,255,.65); }
.lab-cx__btn .lab-ic { margin-left: auto; width: 18px; height: 18px; color: var(--l-cyan); transition: transform .25s; }
.lab-cx.is-open .lab-cx__btn .lab-ic { transform: rotate(180deg); }
.lab-cx__led { width: 8px; height: 8px; border-radius: 50%; background: var(--l-cyan); box-shadow: 0 0 10px var(--l-cyan); flex: none; }
.lab-cx__lab { font-weight: 700; }
.lab-cx__cur { color: var(--l-soft); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lab-cx__panel { position: absolute; z-index: 260; top: calc(100% + 8px); left: 0; width: min(760px, calc(100vw - 32px)); display: grid; grid-template-columns: 290px 1fr;
  border-radius: 18px; border: 1px solid rgba(123,228,255,.32); background: rgba(3,14,32,.98); box-shadow: 0 30px 80px rgba(0,0,0,.6); overflow: hidden; }
.lab-cx__panel[hidden] { display: none !important; }
.lab-cx--right .lab-cx__panel { left: auto; right: 0; }
.lab-cx__areas { list-style: none; margin: 0; padding: 8px; border-right: 1px solid rgba(123,228,255,.12); background: rgba(6,24,48,.6); }
.lab-cx__area { width: 100%; display: grid; grid-template-columns: 32px 1fr auto 14px; align-items: center; gap: 10px; padding: 10px 10px; border: 0; border-radius: 12px; background: none; color: var(--l-muted); font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
.lab-cx__area b { color: var(--l-cyan); font-family: var(--l-mono); margin-right: 4px; }
.lab-cx__area em { font-style: normal; font-size: .76rem; color: var(--l-soft); font-family: var(--l-mono); }
.lab-cx__area .lab-ic { width: 14px; height: 14px; opacity: .5; }
.lab-cx__ic { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(123,228,255,.08); color: var(--l-cyan); }
.lab-cx__ic .lab-ic { width: 18px !important; height: 18px !important; opacity: 1 !important; }
.lab-cx__area:hover, .lab-cx__area.is-on { background: rgba(123,228,255,.1); color: var(--l-text); }
.lab-cx__area.is-on .lab-ic { opacity: 1; }
.lab-cx__items { padding: 8px; max-height: 420px; overflow: auto; }
.lab-cx__items ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lab-cx__h { padding: 8px 10px 10px; font: 700 .68rem/1 var(--l-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--l-soft); }
.lab-cx__it { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 10px 10px; border-radius: 10px; text-decoration: none; color: var(--l-text); font-size: .93rem; }
.lab-cx__it code { font: 700 .74rem/1 var(--l-mono); color: var(--l-cyan); }
.lab-cx__it:hover, .lab-cx__it:focus-visible { background: rgba(123,228,255,.1); }
.lab-cx__it.is-cur { background: rgba(123,228,255,.14); box-shadow: inset 2px 0 0 var(--l-cyan); }
.lab-cx__it.is-pending { opacity: .6; }
.lab-cx__lv { font: 800 .6rem/1 var(--l-mono); letter-spacing: .1em; padding: 4px 7px; border-radius: 999px; border: 1px solid; font-style: normal; }
.lab-cx__lv--base { color: #7be4ff; border-color: rgba(123,228,255,.45); }
.lab-cx__lv--advanced { color: #c4b0ff; border-color: rgba(196,176,255,.45); }

/* ── catalogo ── */
.lab-filters { display: grid; grid-template-columns: 1fr; gap: 12px; }
.lab-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lab-search { grid-column: 1 / -1; position: relative; }
.lab-search input { padding: 14px 16px 14px 46px; font-size: 1rem; border-radius: 14px; }
.lab-search__ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--l-cyan); width: 20px !important; height: 20px !important; }
.lab-filters__pick { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; }
.lab-filters__pick .lab-cx { flex: 0 1 520px; }
.lab-filters__hint { color: var(--l-soft); font-size: .84rem; }
.lab-sel { min-width: 0; }
.lab-card { position: relative; overflow: hidden; }
.lab-card::after { content: ""; position: absolute; left: 0; right: 0; top: -40%; height: 40%; background: linear-gradient(180deg, transparent, rgba(123,228,255,.08), transparent); opacity: 0; pointer-events: none; }
.lab-card:hover::after { animation: labScan 1.1s ease-out; }
@keyframes labScan { 0% { top: -40%; opacity: 1; } 100% { top: 110%; opacity: 0; } }
.lab-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lab-card__ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; border: 1px solid rgba(123,228,255,.25); background: rgba(123,228,255,.07); color: var(--l-cyan); }
.lab-card__code { font: 700 .72rem/1 var(--l-mono); letter-spacing: .1em; color: var(--l-soft); }
.lab-card__meta { display: flex; align-items: center; justify-content: space-between; font-family: var(--l-mono); letter-spacing: .04em; }
.lab-card__go { color: var(--l-cyan); transition: transform .2s; }
.lab-card__go .lab-ic { width: 16px; height: 16px; }
.lab-card:hover .lab-card__go { transform: translateX(3px); }

/* ── pagina dell'esperimento ── */
.lab-exp-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lab-exp-top .lab-cx { flex: 0 1 460px; }
.lab-exp-top .lab-back { margin-top: 0; }
.lab-exp-title { font-size: clamp(2.2rem, 4.8vw, 4rem); }
.lab-bench { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: 22px 0 16px; padding: 10px 16px; border-radius: 12px; border: 1px solid rgba(123,228,255,.18); background: rgba(2,11,24,.8); font: 600 .74rem/1.2 var(--l-mono); letter-spacing: .06em; color: var(--l-muted); }
.lab-bench small { color: var(--l-soft); letter-spacing: .12em; text-transform: uppercase; margin-right: 4px; }
.lab-bench__on { display: inline-flex; align-items: center; gap: 9px; color: #8ff0d9; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
.lab-bench__area { display: inline-flex; align-items: center; gap: 8px; }
.lab-bench__area .lab-ic { width: 16px; height: 16px; color: var(--l-cyan); }
.lab-bench a { margin-left: auto; color: #8ff0d9; text-decoration: none; }
.lab-bench__motto { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lab-bench__motto b { font: 800 1rem/1.25 'DM Sans', system-ui, sans-serif; letter-spacing: -.01em; text-transform: none; color: #c9f6ff; text-shadow: 0 0 14px rgba(123,228,255,.35); }
.lab-bench__motto b i { font-style: normal; color: #f2b84b; text-shadow: 0 0 14px rgba(230,159,0,.35); white-space: nowrap; }
.lab-bench__ok { padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(57,230,195,.4); background: rgba(57,230,195,.08); color: #8ff0d9; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; }
.lab-bench__ok.is-ko { border-color: rgba(213,94,0,.5); color: #ff9f80; background: rgba(213,94,0,.1); }
.lab-bench__motto:hover .lab-bench__ok { background: rgba(57,230,195,.16); }
.lab-cx__veil, .lab-cx__sheet { display: none; }

.lab-work { display: grid; gap: 16px; align-items: start;
  grid-template-columns: 300px minmax(0, 1fr) 312px;
  grid-template-areas: "ctrl read read" "ctrl scope instr" "ctrl res res"; }
.lab-work.no-vis { grid-template-areas: "ctrl read read" "ctrl scope scope" "ctrl res res"; }
.lab-controls { grid-area: ctrl; position: sticky; top: 132px; max-height: calc(100vh - 148px); overflow: auto; align-self: start;
  background: linear-gradient(180deg, rgba(10,32,60,.92), rgba(4,16,34,.94)); border-color: rgba(123,228,255,.24); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.lab-readouts { grid-area: read; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.lab-scope { grid-area: scope; padding: 14px; background: linear-gradient(180deg, rgba(6,26,51,.95), rgba(2,11,24,.97)); border-color: rgba(123,228,255,.28); position: relative; box-shadow: inset 0 0 50px rgba(123,228,255,.05), 0 20px 50px rgba(0,0,0,.35); }
.lab-scope::before, .lab-scope::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid rgba(123,228,255,.55); pointer-events: none; }
.lab-scope::before { left: 8px; bottom: 8px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.lab-scope::after { right: 8px; top: 8px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.lab-instr { grid-area: instr; padding: 14px; background: linear-gradient(180deg, rgba(6,26,51,.95), rgba(2,11,24,.97)); border-color: rgba(123,228,255,.28); }
.lab-instr[hidden] { display: none; }
.lab-results { grid-area: res; }
#lab-chart svg { border-radius: 10px; }
.lab-visual { width: 100%; height: auto; display: block; max-width: 340px; margin: 0 auto; }

/* letture digitali */
.lab-lcd { position: relative; padding: 12px 14px 12px; border-radius: 14px; border: 1px solid rgba(123,228,255,.24); background: linear-gradient(180deg, #03142a, #020b18); box-shadow: inset 0 0 24px rgba(123,228,255,.06); overflow: hidden; }
.lab-lcd::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 3px); }
.lab-lcd__k { display: block; font-size: .72rem; color: var(--l-soft); line-height: 1.25; min-height: 1.8em; }
.lab-lcd__v { font: 700 clamp(1.4rem, 2.2vw, 1.9rem)/1.1 var(--l-mono); color: #c9f6ff; text-shadow: 0 0 14px rgba(123,228,255,.55); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.lab-lcd__u { margin-left: 6px; font: 600 .78rem var(--l-mono); color: var(--l-cyan); }
.lab-lcd.is-tick { animation: labTick .5s ease-out; }
@keyframes labTick { 0% { border-color: rgba(123,228,255,.7); box-shadow: inset 0 0 24px rgba(123,228,255,.2), 0 0 18px rgba(123,228,255,.2); } 100% { } }

/* comandi: cursori come fader, numeri come display */
.lab-ctl { padding: 10px 0 12px; border-bottom: 1px dashed rgba(123,228,255,.12); margin-bottom: 4px; }
.lab-num { font-family: var(--l-mono); color: #c9f6ff; background: #020b18; border-color: rgba(123,228,255,.3); text-shadow: 0 0 8px rgba(123,228,255,.4); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, rgba(123,228,255,.55), rgba(123,228,255,.18)), repeating-linear-gradient(90deg, rgba(255,255,255,.25) 0 1px, transparent 1px 10%); border: 1px solid rgba(123,228,255,.25); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 26px; margin-top: -11px; border-radius: 5px; background: linear-gradient(180deg, #e8f8ff, #8fb9d6); border: 1px solid #fff; box-shadow: 0 0 0 3px rgba(123,228,255,.25), 0 4px 10px rgba(0,0,0,.5); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(123,228,255,.3); border: 1px solid rgba(123,228,255,.25); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 6px; background: rgba(123,228,255,.65); }
input[type=range]::-moz-range-thumb { width: 16px; height: 26px; border-radius: 5px; background: linear-gradient(180deg, #e8f8ff, #8fb9d6); border: 1px solid #fff; box-shadow: 0 0 0 3px rgba(123,228,255,.25); }
input[type=range]:focus-visible { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(123,228,255,.6); }
input[type=range]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(123,228,255,.6); }

/* strumenti SVG: parti in movimento */
.lab-visual .iv-mv { transition: transform .55s cubic-bezier(.22,1,.36,1); }
.lab-visual .iv-fade { transition: opacity .45s ease, fill-opacity .45s ease; }
.lab-visual .iv-lcd { font-family: var(--l-mono); }
.lab-visual .iv-bub { fill: rgba(168,238,255,.5); animation: ivBub var(--t, 6s) linear var(--d, 0s) infinite; opacity: 0; }
@keyframes ivBub { 0% { transform: translate(0, 0); opacity: 0; } 8% { opacity: .9; } 50% { transform: translate(6px, -150px); } 100% { transform: translate(-4px, -300px); opacity: 0; } }
.lab-visual .iv-ray { animation: ivRay 6s ease-in-out infinite; }
.lab-visual .iv-ray--b { animation-delay: -3s; }
@keyframes ivRay { 50% { opacity: .35; } }
.lab-visual .iv-wave { animation: ivWave 4s linear infinite; }
@keyframes ivWave { to { transform: translateX(-60px); } }
.lab-visual .iv-drift { animation: ivDrift 3.2s ease-in-out var(--d) infinite alternate; }
@keyframes ivDrift { to { transform: translate(8px, -10px); opacity: .3; } }
.lab-visual .iv-jit { animation: ivJit 1.6s ease-in-out var(--d) infinite alternate; }
@keyframes ivJit { 0% { transform: translate(0, 0); } 50% { transform: translate(1.6px, -1.2px); } 100% { transform: translate(-1.2px, 1.4px); } }
.lab-visual .iv-pulse, #lab-chart .ct-halo { animation: ivPulse 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ivPulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }
.lab-visual .iv-arc { filter: drop-shadow(0 0 4px rgba(123,228,255,.8)); }
#lab-chart .ct-mk { transition: transform .45s cubic-bezier(.22,1,.36,1); }
#lab-chart .ct-line { filter: drop-shadow(0 0 3px currentColor); }

@media (max-width: 1240px) {
  .lab-work { grid-template-columns: 290px minmax(0, 1fr); grid-template-areas: "ctrl read" "ctrl scope" "ctrl instr" "ctrl res"; }
  .lab-work.no-vis { grid-template-areas: "ctrl read" "ctrl scope" "ctrl res"; }
}
@media (max-width: 900px) {
  .lab-hero--home { grid-template-columns: 1fr; }
  .lab-filters { grid-template-columns: 1fr 1fr; }
  .lab-filters__pick { flex-direction: column; align-items: stretch; gap: 6px; }
  .lab-filters__pick .lab-cx { flex: none; }
  .lab-work, .lab-work.no-vis { grid-template-columns: minmax(0, 1fr); grid-template-areas: "read" "instr" "ctrl" "scope" "res"; }
  .lab-work.no-vis { grid-template-areas: "read" "ctrl" "scope" "res"; }
  .lab-controls { position: static; max-height: none; }
  .lab-readouts { position: sticky; top: 128px; z-index: 120; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; margin: 0 -8px; border-radius: 16px; background: rgba(2,11,24,.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .lab-lcd { padding: 8px 10px; }
  .lab-lcd__k { min-height: 0; font-size: .66rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lab-lcd__v { font-size: 1.2rem; }
  /* su schermi piccoli il menu a cascata diventa un pannello dal basso, opaco e sopra tutto */
  html.lab-cx-lock, html.lab-cx-lock body { overflow: hidden; }
  .lab-cx__veil:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 10030; background: rgba(1,6,14,.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
  .lab-cx__panel, .lab-cx--right .lab-cx__panel { position: fixed; z-index: 10040; top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-height: 86vh; display: flex; flex-direction: column;
    border-radius: 22px 22px 0 0; border-bottom: 0; background: #03101f; box-shadow: 0 -24px 60px rgba(0,0,0,.7); padding-bottom: env(safe-area-inset-bottom); animation: labSheet .28s cubic-bezier(.22,1,.36,1); }
  @keyframes labSheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .lab-cx__sheet { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; font-weight: 800; color: var(--l-text); flex: none; }
  .lab-cx__x { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(123,228,255,.3); background: rgba(123,228,255,.08); color: var(--l-text); font-size: 1.4rem; line-height: 1; cursor: pointer; }
  .lab-cx__areas { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 12px; border-right: 0; border-bottom: 1px solid rgba(123,228,255,.12); background: none; scrollbar-width: none; }
  .lab-cx__areas li { flex: none; }
  .lab-cx__area { display: inline-flex; width: auto; gap: 8px; white-space: nowrap; font-size: .82rem; padding: 7px 12px 7px 7px; border: 1px solid rgba(123,228,255,.18); border-radius: 999px; }
  .lab-cx__area.is-on { border-color: rgba(123,228,255,.6); }
  .lab-cx__area > .lab-ic, .lab-cx__area em { display: none; }
  .lab-cx__ic { width: 24px; height: 24px; border-radius: 50%; }
  .lab-cx__items { flex: 1 1 auto; max-height: none; overflow: auto; overscroll-behavior: contain; padding: 6px 10px 16px; }
  .lab-cx__it { padding: 13px 10px; }
  .lab-bench a { margin-left: 0; }
}
@media (max-width: 600px) {
  .lab-filters { grid-template-columns: 1fr; }
  .lab-exp-top .lab-cx { flex: 1 1 100%; }
  .lab-cx__cur { display: none; }
}
body.lab-present .lab-bench, body.lab-present .lab-exp-top { display: none !important; }
body.lab-present #lab-app.is-wide { width: min(1680px, 100%); }
@media (prefers-reduced-motion: reduce) {
  .lab-led, .home-trace, .home-dot, .lab-bubbles i, .lab-visual *, #lab-chart *, .lab-card::after, .lab-lcd.is-tick { animation: none !important; transition: none !important; }
  .home-trace { stroke-dashoffset: 0; }
  .home-dot { offset-distance: 60%; }
  .lab-bubbles, .lab-visual .iv-bub { display: none; }
}
.lab-cx__items ul[hidden] { display: none; }

/* ── entrata del titolo: "Boyle" sale lettera per lettera, "Lab" si comprime come un gas ── */
.lab-title--fx { position: relative; display: inline-block; padding-bottom: .08em; }
.lab-title--fx .lt-w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: .04em .02em .12em; margin: -.04em -.02em -.12em; }
.lab-title--fx .lt-c { display: inline-block; transform: translateY(112%); animation: ltRise .95s cubic-bezier(.16,1,.3,1) forwards; animation-delay: calc(.08s + var(--i) * .055s); }
.lab-title--fx .lt-lab { display: inline-block; padding-right: .08em; margin-right: -.08em; opacity: 0; letter-spacing: -.05em; transform: scaleX(1.9); transform-origin: 0 50%; filter: blur(10px); background-size: 220% 100%; background-position: 100% 0;
  background-image: linear-gradient(110deg, #a8eeff 0%, #7be4ff 30%, #ffffff 45%, #7be4ff 60%, #c4b0ff 100%);
  animation: ltCompress 1.15s cubic-bezier(.22,1,.36,1) .55s forwards, ltShine 1.6s ease-in-out 1.55s forwards; }
.lab-title--fx .lt-line { position: absolute; left: 0; right: 0; bottom: -.02em; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, #7be4ff 30%, #c4b0ff 70%, transparent);
  box-shadow: 0 0 14px rgba(123,228,255,.8); transform: scaleX(0); transform-origin: 0 50%; opacity: 0; animation: ltLine 1.4s cubic-bezier(.22,1,.36,1) 1.1s forwards; }
@keyframes ltRise { to { transform: none; } }
/* la compressione usa transform, non letter-spacing: cosi' la riga non cambia larghezza e la pagina non salta */
@keyframes ltCompress { 0% { opacity: 0; transform: scaleX(1.9); filter: blur(10px); } 60% { opacity: 1; filter: blur(0); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes ltShine { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes ltLine { 0% { transform: scaleX(0); opacity: 1; } 60% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .lab-title--fx .lt-c, .lab-title--fx .lt-lab { animation: none !important; transform: none !important; opacity: 1; filter: none; letter-spacing: -.05em; }
  .lab-title--fx .lt-line { display: none; }
}

/* parametri non validi: grafico e strumento si spengono, cosi' non mostrano valori vecchi */
.lab-work.is-invalid #lab-chart, .lab-work.is-invalid .lab-visual, .lab-work.is-invalid .lab-readouts { opacity: .18; filter: grayscale(1); transition: opacity .2s; }
.lab-warn--big { font-weight: 700; }
@media (max-width: 600px) { .lab-kicker__more { display: none; } }

/* pagina «Perché puoi fidarti di questi numeri» */
.lab-vsteps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 8px 0 18px; }
.lab-vsteps .lab-panel { position: relative; padding-top: 22px; }
.lab-vsteps span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(123,228,255,.12); border: 1px solid rgba(123,228,255,.45); color: #7be4ff; font: 800 1rem/1 var(--l-mono); margin-bottom: 10px; }
.lab-vsteps h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--l-text); text-transform: none; letter-spacing: 0; }
.lab-vsteps p { margin: 0; color: var(--l-muted); font-size: .94rem; }
.lab-vstatus { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; font-weight: 700; font-size: 1.05rem; margin: 0 0 30px; }
.lab-vstatus.is-ok { color: #8ff0d9; background: rgba(57,230,195,.08); border: 1px solid rgba(57,230,195,.35); }
.lab-vstatus.is-ko { color: #ff9f80; background: rgba(213,94,0,.1); border: 1px solid rgba(213,94,0,.45); }
.lab-vgroups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.lab-vgroup header { display: grid; gap: 6px; margin-bottom: 8px; justify-items: start; }
.lab-vgroup h3 { margin: 0; font-size: 1.1rem; color: var(--l-text); text-transform: none; letter-spacing: 0; }
.lab-vgroup__use { margin: 0; font-size: .85rem; color: var(--l-soft); }
.lab-vgroup__use a { color: #7be4ff; text-decoration: none; }
.lab-vgroup__use a:hover { text-decoration: underline; }
.lab-chks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lab-chk { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 12px; border-radius: 12px; background: rgba(2,11,24,.6); border: 1px solid rgba(123,228,255,.12); }
.lab-chk.is-hl { border-color: rgba(123,228,255,.7); box-shadow: 0 0 0 3px rgba(123,228,255,.15); }
.lab-chk__mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(57,230,195,.14); color: #39e6c3; font-weight: 900; }
.lab-chk.is-ko .lab-chk__mark { background: rgba(213,94,0,.16); color: #ff9f80; }
.lab-chk__q { margin: 0 0 6px; font-weight: 700; color: var(--l-text); }
.lab-chk__n { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--l-soft); }
.lab-chk__n b { color: #c9f6ff; font-family: var(--l-mono); font-weight: 700; margin-left: 4px; }
.lab-chk__src { margin: 0; font-size: .8rem; color: var(--l-soft); }
.lab-chk__src code { margin-left: 6px; font-size: .72rem; opacity: .6; }
.lab-vpro > summary { list-style: none; cursor: pointer; padding: 16px 18px; border-radius: 14px; border: 1px dashed rgba(123,228,255,.35); }
.lab-vpro > summary::-webkit-details-marker { display: none; }
.lab-vpro > summary h2 { margin: 0 0 4px; }
.lab-vpro > summary h2::after { content: " ▾"; color: #7be4ff; }
.lab-vpro[open] > summary h2::after { content: " ▴"; }
.lab-vpro > summary p { margin: 0; color: var(--l-muted); }
.lab-vpro[open] > summary { margin-bottom: 14px; }
@media (max-width: 900px) { .lab-vsteps, .lab-vgroups { grid-template-columns: 1fr; } }
.lab-vgroup > summary { list-style: none; cursor: pointer; position: relative; padding-right: 60px; }
.lab-vgroup > summary::-webkit-details-marker { display: none; }
.lab-vgroup__ok { position: absolute; right: 0; top: 0; padding: 4px 10px; border-radius: 999px; background: rgba(57,230,195,.12); color: #8ff0d9; font: 800 .78rem/1 var(--l-mono); }
.lab-vgroup__ok::after { content: " ▾"; color: #7be4ff; }
.lab-vgroup[open] .lab-vgroup__ok::after { content: " ▴"; }
.lab-vgroup:not([open]) header { margin-bottom: 0; }

/* avvio senza scatti: lo spazio del laboratorio e' riservato subito, il contenuto appare quando il carattere e' pronto */
#lab-app { min-height: 100vh; }
html.lab-wait #lab-app, html.lab-wait .lab-footer { opacity: 0; }
#lab-app, .lab-footer { transition: opacity .25s ease-out; }
