/* ==========================================================================
   Davide Gelatti — Digital Analytics Consultant
   Design tokens da design-style.md (dark tech / SaaS minimal-corporate)
   ========================================================================== */

:root {
  --bg: #181B1D;
  --surface: #1A232D;
  --surface-2: #263543;
  --text: #E6E9EE;
  --heading: #FFFFFF;
  --text-muted: #AAB3C2;
  --primary: #0F6FFF;
  --primary-hover: color-mix(in srgb, #000 10%, #0F6FFF);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.22);

  --accent-blue-bg: rgba(15, 111, 255, 0.15);
  --accent-blue-text: #7FB2FF;
  --accent-blue-border: rgba(15, 111, 255, 0.3);
  --accent-green-bg: rgba(11, 147, 93, 0.15);
  --accent-green-text: #6DD9A4;
  --accent-green-border: rgba(11, 147, 93, 0.3);
  --accent-red-bg: rgba(220, 38, 38, 0.14);
  --accent-red-text: #FF9B9B;
  --accent-red-border: rgba(220, 38, 38, 0.32);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --container: 1200px;
  --header-h: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-soft-2: 0 2px 2px rgba(0, 0, 0, 0.03);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, p { margin: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }
@media (max-width: 767px) {
  section { padding: 64px 0; }
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Type scale ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--accent-blue-text);
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--accent-blue-bg);
}
.eyebrow--green { color: var(--accent-green-text); }
.eyebrow--green::before {
  background: #0b935d;
  box-shadow: 0 0 0 3px var(--accent-green-bg);
}

h1, .h1 {
  font-size: clamp(40px, 4.6vw + 8px, 96px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--heading);
}

h2, .h2 {
  font-size: clamp(28px, 2.6vw + 8px, 40px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--heading);
}

h3, .h3 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--heading);
}

.section-head {
  max-width: 680px;
  margin-bottom: 48px;
}
.section-head p {
  margin-top: 16px;
  font-size: 18px;
  color: var(--text-muted);
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-cta { margin-top: 32px; }

p.lede {
  font-size: 21px;
  line-height: 1.5;
  color: var(--text-muted);
}

.text-muted { color: var(--text-muted); }

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px 13px;
  background: var(--primary);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
  white-space: nowrap;
}
.button:hover { background: var(--primary-hover); }
.button:active { transform: translateY(1px); }

.button--small {
  padding: 8px 20px 9px;
  font-size: 15px;
}

.button-ghost {
  background: transparent;
  color: var(--heading);
  border: 1px solid var(--border-strong);
}
.button-ghost:hover { background: var(--surface); }

.button--linkedin svg { width: 17px; height: 17px; flex-shrink: 0; }

.link-quiet {
  color: var(--text-muted);
  font-size: 15px;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.link-quiet:hover { color: var(--heading); border-color: var(--heading); }

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 14px;
  color: var(--text-muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--accent-blue-bg);
  color: var(--accent-blue-text);
  border: 1px solid var(--accent-blue-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.01em;
}

.tag--done {
  background: var(--accent-green-bg);
  color: var(--accent-green-text);
  border-color: var(--accent-green-border);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(24, 27, 29, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(24, 27, 29, 0.88);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  font-size: 16px;
  font-weight: 500;
  color: var(--heading);
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--accent-blue-bg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 15px;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--heading); }

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.nav-pill--live {
  background: var(--accent-green-bg);
  border: 1px solid var(--accent-green-border);
  color: var(--accent-green-text);
}
.nav-pill--live .dot { background: var(--accent-green-text); }
.nav-pill--live:hover { background: var(--accent-green-border); color: var(--heading); }

.nav-actions { display: flex; align-items: center; gap: 20px; }

.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  color: var(--heading);
  transition: background 0.2s var(--ease);
}
.nav-icon-btn:hover { background: var(--surface); }
.nav-icon-btn .icon-linkedin { width: 16px; height: 16px; }

@media (max-width: 480px) {
  .nav-actions .nav-icon-btn { display: none; }
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  color: var(--heading);
  cursor: pointer;
}

@media (max-width: 875px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

@media (max-width: 480px) {
  .nav-actions .button { display: none; }
  .logo { font-size: 15px; }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--header-h) + 96px);
  padding-bottom: 96px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -20%;
  width: 140%;
  height: 60%;
  transform: translateX(-50%);
  background: linear-gradient(to top, #1e3a8a, #2563eb 40%, transparent 75%);
  opacity: 0.28;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
}

.hero h1 {
  font-size: clamp(36px, 3vw + 16px, 52px);
  line-height: 1.05;
  margin-bottom: 24px;
}
.hero .lede { margin-bottom: 32px; max-width: 560px; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Console signature element */
.console {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.console-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.console-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.console-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.console-body {
  padding: 24px 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.9;
  min-height: 220px;
}
.console-line {
  display: flex;
  gap: 10px;
  opacity: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.console-line.is-visible { opacity: 1; }
.console-prompt { color: var(--text-muted); flex-shrink: 0; }
.console-event { color: var(--accent-green-text); }
.console-var { color: var(--accent-blue-text); }
.console-caret {
  display: inline-block;
  width: 7px;
  height: 15px;
  background: var(--primary);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: -2px;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .console-line { opacity: 1; }
  .console-caret { animation: none; }
}

/* Analytics mockup (GA4-style report card) */
.analytics-body {
  padding: 24px 20px 20px;
}
.analytics-metric {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 20px;
}
.analytics-metric-label {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.analytics-metric-value {
  font-size: 28px;
  font-weight: 500;
  color: var(--heading);
  letter-spacing: -0.02em;
}
.analytics-metric-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}
.analytics-metric-delta svg { width: 10px; height: 10px; }
.analytics-mockup--up .analytics-metric-delta {
  color: var(--accent-green-text);
  background: var(--accent-green-bg);
  border: 1px solid var(--accent-green-border);
}
.analytics-mockup--down .analytics-metric-delta {
  color: var(--accent-red-text);
  background: var(--accent-red-bg);
  border: 1px solid var(--accent-red-border);
}
.analytics-chart {
  display: block;
  width: 100%;
  height: 130px;
  overflow: visible;
}
.analytics-grid { stroke: var(--border); stroke-width: 1; }
.analytics-area {
  opacity: 0;
  transition: opacity 0.8s var(--ease) 0.3s;
}
.analytics-line {
  fill: none;
  stroke-width: 2;
  stroke-dasharray: 700;
  stroke-dashoffset: 700;
  transition: stroke-dashoffset 1.2s var(--ease) 0.15s;
}
.analytics-mockup.is-visible .analytics-area { opacity: 1; }
.analytics-mockup.is-visible .analytics-line { stroke-dashoffset: 0; }
.analytics-mockup--up .analytics-area { fill: var(--accent-green-bg); }
.analytics-mockup--up .analytics-line { stroke: var(--primary); }
.analytics-mockup--down .analytics-area { fill: var(--accent-red-bg); }
.analytics-mockup--down .analytics-line { stroke: var(--accent-red-text); }
.analytics-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
@media (prefers-reduced-motion: reduce) {
  .analytics-area { opacity: 1; }
  .analytics-line { stroke-dashoffset: 0; }
}

/* ---------- Generic cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s var(--ease);
}
.card:hover { border-color: var(--border-strong); }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--text-muted); }

.grid {
  display: grid;
  gap: 24px;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 875px) {
  .grid--3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid--2, .grid--4 { grid-template-columns: 1fr; }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Problema ----------
#problema {
  position: relative;
  overflow: hidden;
}
#problema::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10%;
  width: 120%;
  height: 55%;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, #7f1d1d, #dc2626 40%, transparent 75%);
  opacity: 0.16;
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
} */
#problema .container { position: relative; z-index: 1; }
#problema .eyebrow { color: var(--accent-red-text); }
#problema .eyebrow::before {
  background: #dc2626;
  box-shadow: 0 0 0 3px var(--accent-red-bg);
}

.section-with-chart {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
  margin-bottom: 48px;
}
.section-with-chart .section-head { max-width: none; }
@media (max-width: 1024px) {
  .section-with-chart { grid-template-columns: 1fr; gap: 32px; }
}

.problem-card {
  background: linear-gradient(180deg, var(--accent-red-bg), transparent 130%), var(--surface);
  border-color: var(--accent-red-border);
}
.problem-card:hover { border-color: var(--accent-red-text); }
.problem-card .icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-red-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent-red-text);
}
.problem-card .icon svg { width: 20px; height: 20px; }

/* ---------- Metodo ---------- */
#metodo {
  position: relative;
  overflow: hidden;
}
#metodo::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14%;
  width: 120%;
  height: 55%;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, #1e3a8a, #2563eb 40%, transparent 75%);
  opacity: 0.14;
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}
#metodo .container { position: relative; z-index: 1; }
#metodo .eyebrow { color: var(--accent-green-text); }
#metodo .eyebrow::before {
  background: #0b935d;
  box-shadow: 0 0 0 3px var(--accent-green-bg);
}

.method-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) {
  .method-list { grid-template-columns: 1fr; }
}

.method-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 26px;
  background: linear-gradient(180deg, var(--accent-blue-bg), transparent 140%), var(--surface);
  border: 1px solid var(--accent-blue-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.method-content { display: flex; flex-direction: column; height: 100%; }
.method-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-blue-text);
}
.method-content h3 { font-size: 19px; font-weight: 500; margin-bottom: 10px; }
.method-content p { color: var(--text-muted); font-size: 15px; margin-bottom: 18px; }
/* I tag verdi si allineano in basso: con testi di lunghezza diversa le tre
   colonne restano visivamente pareggiate. */
.method-fab {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.method-fab span {
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--accent-green-text);
  background: var(--accent-green-bg);
  border: 1px solid var(--accent-green-border);
  border-radius: var(--radius-pill);
  padding: 5px 11px;
}

/* ---------- Case study (lista aperta, non carosello) ---------- */
.case-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.case-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
}
.case-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.case-meta strong { color: var(--heading); font-weight: 500; }
.case-serie {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-blue-text);
  background: var(--accent-blue-bg);
  border: 1px solid var(--accent-blue-border);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
}
.case-item h3 { font-size: 22px; font-weight: 500; margin-bottom: 14px; }
.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}
.case-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 24px;
}
@media (max-width: 875px) {
  .case-body { grid-template-columns: 1fr; gap: 22px; }
  .case-item { padding: 26px 22px; }
}

.case-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--heading);
  border-radius: var(--radius-pill);
  padding: 8px 18px 9px;
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.case-toggle:hover { background: var(--surface-2); }
.case-toggle .chevron { transition: transform 0.2s var(--ease); }
[data-case].is-open .case-toggle .chevron { transform: rotate(180deg); }

.case-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease);
}
[data-case].is-open .case-detail { grid-template-rows: 1fr; }
.case-detail-inner { overflow: hidden; }
.case-detail-note {
  margin-top: 14px;
  font-size: 14.5px;
  color: var(--text-muted);
}
.case-col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.case-col p { color: var(--text-muted); font-size: 15px; }
.case-col p strong { color: var(--text); font-weight: 500; }

.case-console {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: 16px;
  overflow: hidden;
}
.case-console .console-body {
  padding: 16px;
  font-size: 13px;
  line-height: 1.8;
  min-height: auto;
}
.case-console .console-line { opacity: 1; }

.case-cta-row {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

/* ---------- Credibilità ---------- */
#chi-sono {
  position: relative;
  overflow: hidden;
}
#chi-sono::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14%;
  width: 120%;
  height: 55%;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, #1e3a8a, #2563eb 40%, transparent 75%);
  opacity: 0.14;
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}
#chi-sono .container { position: relative; z-index: 1; }

.credibility {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 320px);
  gap: 144px;
  align-items: stretch;
}
@media (max-width: 860px) {
  .credibility { grid-template-columns: 1fr; gap: 32px; }
  .credibility-photo { max-width: 320px; order: -1; }
  .profile-photo { height: auto; }
}
.credibility-content { display: flex; flex-direction: column; }
.credibility-content .availability-note { margin-bottom: 50px; }
.credibility-content p { color: var(--text-muted); }
.credibility-content p + p { margin-top: 20px; }
.credibility-actions { margin-top: 50px; margin-bottom: 0; }

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}

.availability-note {
  margin-top: 0;
  margin-bottom: 20px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--accent-green-bg);
  border: 1px solid var(--accent-green-border);
  border-radius: var(--radius-pill);
  color: var(--accent-green-text);
  font-size: 14px;
}
.availability-note .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green-text);
}

/* ---------- Clienti ---------- */
.clients-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
}
.clients-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: clients-marquee 32s linear infinite;
}
.clients-marquee:hover .clients-track { animation-play-state: paused; }
@keyframes clients-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.client-card {
  flex: 0 0 auto;
  min-width: 200px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
}
.client-logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Trattamento monocromatico per il tema dark, prescritto da design-style.md §5:
   i riquadri bianchi precedenti rendevano invisibile il logo LimoLane (SVG già bianco). */
.client-logo {
  max-height: 30px;
  max-width: 132px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.62;
  transition: opacity 0.2s var(--ease);
}
.client-card:hover .client-logo { opacity: 1; }

/* PoliedroStudio, VEDA e ITS sono forniti con sfondo chiaro pieno invece che
   trasparente: brightness(0) invert(1) li trasformerebbe in rettangoli bianchi.
   invert + mix-blend-mode:screen porta il loro sfondo a quasi-nero, che il blend
   rende otticamente trasparente sulla superficie scura della card. */
.client-logo[src$="logo-poliedrostudio.png"],
.client-logo[src$="logo-its.png"],
.client-logo[src$="logo-veda.png"] {
  filter: invert(1) grayscale(1) contrast(1.2);
  mix-blend-mode: screen;
  opacity: 0.78;
}

/* Riequilibrio ottico: i loghi quasi quadrati hanno bisogno di più altezza
   dei wordmark orizzontali per avere lo stesso peso visivo. */
.client-logo[src$="logo-poliedrostudio.png"] { max-height: 54px; }
.client-logo[src$="logo-gellify.png"] { max-height: 40px; }
.client-logo[src$="logo-veda.png"] { max-height: 34px; }

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 4px;
  background: none;
  border: none;
  text-align: left;
  color: var(--heading);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  cursor: pointer;
}
.faq-question .chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s var(--ease);
}
.faq-item.is-open .faq-question .chevron { transform: rotate(180deg); }
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease);
}
.faq-item.is-open .faq-answer { grid-template-rows: 1fr; }
.faq-answer-inner { overflow: hidden; }
.faq-answer p {
  color: var(--text-muted);
  padding: 0 4px 24px;
  max-width: 680px;
}

/* ---------- CTA finale ---------- */
.final-cta {
  position: relative;
  overflow: hidden;
  text-align: center;
}
.final-cta::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -30%;
  width: 120%;
  height: 70%;
  transform: translateX(-50%);
  background: linear-gradient(to top, #1e3a8a, #2563eb 40%, transparent 75%);
  opacity: 0.22;
  filter: blur(50px);
  pointer-events: none;
}
.final-cta .container { position: relative; z-index: 1; }
.final-cta .section-head { margin: 0 auto 24px; }
.final-cta .lede { max-width: 640px; margin: 0 auto 40px; }
.final-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.final-cta .availability-note { margin-top: 8px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer p { color: var(--text-muted); font-size: 14px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-muted); font-size: 14px; transition: color 0.2s var(--ease); }
.footer-links a:hover { color: var(--heading); }

/* ---------- Mobile nav drawer ---------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: var(--bg);
  z-index: 90;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.mobile-nav.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.mobile-nav a {
  padding: 16px 4px;
  font-size: 20px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-nav .button { margin-top: 24px; align-self: flex-start; }
.mobile-nav .nav-pill {
  align-self: flex-start;
  margin: 8px 0;
  padding: 8px 16px;
  font-size: 16px;
  border-bottom: none;
}
.nav-linkedin-mobile {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-linkedin-mobile .icon-linkedin { width: 18px; height: 18px; flex-shrink: 0; }

@media (min-width: 876px) {
  .mobile-nav { display: none; }
}

/* ---------- Componenti v2 ---------- */

/* Didascalia sotto i mockup: dichiara che i dati sono illustrativi */
.mockup-caption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: right;
}

/* Segnaposto di lavorazione — rimuovere quando lo step 3b è completato */
.slot {
  margin-top: 40px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.02);
}
.slot--large { margin-top: 0; min-height: 260px; display: flex; flex-direction: column; justify-content: center; }
.slot-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-blue-text);
  background: var(--accent-blue-bg);
  border: 1px solid var(--accent-blue-border);
  border-radius: var(--radius-pill);
  padding: 3px 12px;
  margin-bottom: 14px;
}
.slot p { color: var(--text-muted); font-size: 15px; max-width: 820px; }
.slot p strong { color: var(--heading); font-weight: 500; }

/* Sotto-blocchi dentro una sezione (clienti e testimonianze dentro "Chi sono") */
.subsection { margin-top: 72px; }
.subsection-title {
  font-size: 21px;
  font-weight: 500;
  margin-bottom: 10px;
}
.subsection-lede {
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 32px;
}

/* Testimonianze */
.testimonial { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.testimonial p { color: var(--text); font-size: 15.5px; }
.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.testimonial-author strong { color: var(--heading); font-weight: 500; }
.testimonial-author span { color: var(--text-muted); }
/* Stato "in attesa": deve essere inequivocabilmente un segnaposto, mai
   scambiabile per una citazione reale. */
.testimonial--empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.02);
}
.testimonial--empty p {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

/* Coda per i recruiter in chiusura: presente, ma visivamente quieta */
.recruiter-note {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 14.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Calcolatore — "il costo del non sapere"
   ========================================================================== */
.calc {
  margin-top: 40px;
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
@media (max-width: 875px) {
  .calc { grid-template-columns: 1fr; }
}
.calc-inputs { padding: 30px 32px; border-right: 1px solid var(--border); }
@media (max-width: 875px) {
  .calc-inputs { border-right: 0; border-bottom: 1px solid var(--border); padding: 26px 22px; }
}
.calc-intro { margin-bottom: 24px; }
.calc-intro h3 { font-size: 19px; font-weight: 500; margin-bottom: 4px; }
.calc-intro p { color: var(--text-muted); font-size: 14.5px; }

.calc-field { display: block; margin-bottom: 20px; }
.calc-field:last-child { margin-bottom: 0; }
.calc-field > span {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.calc-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  transition: border-color 0.2s var(--ease);
}
.calc-input-wrap:focus-within { border-color: var(--primary); }
.calc-prefix { color: var(--text-muted); font-size: 17px; margin-right: 8px; }
.calc-input-wrap input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--heading);
  font-family: var(--font-sans);
  font-size: 20px;
  padding: 12px 0;
}
.calc-input-wrap input:focus { outline: none; }
.calc-field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--heading);
  font-family: var(--font-sans);
  font-size: 16px;
}
.calc-field select:focus { outline: none; border-color: var(--primary); }

.calc-output {
  padding: 30px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(to bottom, var(--surface-2), var(--surface));
}
@media (max-width: 875px) { .calc-output { padding: 26px 22px; } }
.calc-figure-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.calc-figure {
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--heading);
  margin: 6px 0 16px;
}
.calc-lead { color: var(--text); font-size: 16px; margin-bottom: 14px; }
.calc-lead b { color: var(--heading); font-weight: 500; }
.calc-note {
  color: var(--text-muted);
  font-size: 14.5px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Banco di prova
   ========================================================================== */
#banco-di-prova {
  position: relative;
  overflow: hidden;
}
#banco-di-prova::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14%;
  width: 120%;
  height: 55%;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, #065f46, #10b981 40%, transparent 75%);
  opacity: 0.1;
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}
#banco-di-prova::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -20%;
  width: 140%;
  height: 60%;
  transform: translateX(-50%);
  background: linear-gradient(to top, #065f46, #10b981 40%, transparent 75%);
  opacity: 0.1;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}
#banco-di-prova .container { position: relative; z-index: 1; }

.bench { margin-top: 8px; }
.panel-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* --- il sito simulato --- */
.site {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.site-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.site-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.site-url {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-body { padding: 26px 30px 30px; }
@media (max-width: 640px) { .site-body { padding: 22px 18px 24px; } }

.stepper { display: flex; gap: 6px; margin-bottom: 24px; }
.stepper span {
  height: 3px;
  flex: 1;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.10);
  transition: background 0.25s var(--ease);
}
.stepper span.done { background: var(--primary); }

.slick-slide { display: none; }
.slick-slide.slick-active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}
@media (max-width: 800px) {
  .slick-slide.slick-active { grid-template-columns: 1fr; gap: 26px; }
}
.slide-main { min-height: 210px; }
@media (max-width: 800px) { .slide-main { min-height: 0; } }
.slide-kicker { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); margin-bottom: 8px; }
.slide-title { font-size: 22px; font-weight: 500; color: var(--heading); letter-spacing: -0.01em; margin-bottom: 6px; }
.slide-sub { color: var(--text-muted); font-size: 14.5px; margin-bottom: 20px; }

.amounts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.amount {
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  font-family: var(--font-sans);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.amount:hover { background: var(--surface-2); }
.amount.is-selected { background: var(--primary); border-color: var(--primary); color: #fff; }

.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 560px) { .fields-2 { grid-template-columns: 1fr; } }
.field { display: block; margin-bottom: 14px; }
.field--narrow { max-width: 280px; }
.field > span { display: block; font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; }
.field input, .field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14.5px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); }

.recap {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  max-width: 420px;
}
.recap div { display: flex; justify-content: space-between; gap: 20px; font-size: 14px; padding: 4px 0; }
.recap div span:last-child { color: var(--heading); }

/* --- colonna azione --- */
.slide-action {
  border-left: 1px solid var(--border);
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
@media (max-width: 800px) {
  .slide-action { border-left: 0; border-top: 1px solid var(--border); padding-left: 0; padding-top: 22px; }
}
.action-hint { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--accent-green-text); }
.action-hint svg { flex: 0 0 auto; }
.bench.has-clicked .action-hint-first { display: none; }
.bench:not(.has-clicked) .action-hint-next { display: none; }

.btn {
  position: relative;
  background: var(--primary);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 13px 30px;
  font-family: var(--font-sans);
  font-size: 16.5px;
  cursor: pointer;
  transition: background 0.2s var(--ease);
  width: 100%;
  max-width: 280px;
}
.btn:hover { background: var(--primary-hover); }
/* Anello pulsante finché non arriva il primo click: senza quello il confronto
   non parte e la dimostrazione non si vede. */
.btn::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--primary);
  opacity: 0;
  pointer-events: none;
}
.bench:not(.has-clicked) .slick-active .btn::after { animation: bench-ring 1.9s var(--ease) infinite; }
@keyframes bench-ring {
  0% { opacity: 0.65; transform: scale(1); }
  70% { opacity: 0; transform: scale(1.13); }
  100% { opacity: 0; transform: scale(1.13); }
}
@media (prefers-reduced-motion: reduce) {
  .bench:not(.has-clicked) .slick-active .btn::after { animation: none; opacity: 0.5; }
}

.action-progress { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.action-progress b { color: var(--heading); font-weight: 500; }
.action-dots { display: flex; gap: 5px; margin-top: 7px; }
.action-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); transition: background 0.2s var(--ease); }
.action-dots i.on { background: var(--accent-green-text); }
.action-caption { font-size: 12.5px; color: rgba(170, 179, 194, 0.65); line-height: 1.45; }

.done-state { grid-column: 1 / -1; text-align: center; padding: 26px 0 10px; }
.done-state .check {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: var(--accent-green-bg);
  border: 1px solid var(--accent-green-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green-text);
  font-size: 22px;
}
.btn-reset {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.btn-reset:hover { background: var(--surface); color: var(--text); }

/* --- confronto a due colonne (desktop) --- */
.bench-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 30px;
  align-items: start;
}
.col-head { margin-bottom: 12px; }
.col-title { font-size: 17px; font-weight: 500; color: var(--heading); margin-bottom: 3px; }
.col-sub { font-size: 13.5px; color: var(--text-muted); }

.bench-console {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.bench-console--bad { border-color: var(--accent-red-border); }
.bench-console--good { border-color: var(--accent-green-border); }
.bench-console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.bench-console-name { font-family: var(--font-mono); font-size: 12px; color: var(--text); }
.bench-console-count { font-family: var(--font-mono); font-size: 11px; padding: 2px 9px; border-radius: var(--radius-pill); white-space: nowrap; }
.bench-console--bad .bench-console-count { background: var(--accent-red-bg); color: var(--accent-red-text); border: 1px solid var(--accent-red-border); }
.bench-console--good .bench-console-count { background: var(--accent-green-bg); color: var(--accent-green-text); border: 1px solid var(--accent-green-border); }
.bench-console-body {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 14px 15px;
  height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.bench-console-empty { color: rgba(170, 179, 194, 0.45); }
.bench-line { display: flex; gap: 9px; align-items: baseline; animation: bench-line-in 0.22s var(--ease); }
@keyframes bench-line-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}
.bench-prompt { color: rgba(170, 179, 194, 0.55); flex: 0 0 auto; min-width: 46px; }
.bench-event { color: var(--heading); }
.bench-console--bad .bench-event { color: var(--accent-red-text); }
.bench-console--good .bench-event { color: var(--accent-green-text); }
.bench-var { color: var(--accent-blue-text); }
.bench-val { color: var(--text); word-break: break-word; }

.bench-plain {
  padding: 13px 15px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  font-size: 13.5px;
  line-height: 1.45;
}
.bench-plain .lbl {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(170, 179, 194, 0.55);
  margin-bottom: 5px;
}
.bench-console--bad .bench-plain strong { color: var(--accent-red-text); font-weight: 500; }
.bench-console--good .bench-plain strong { color: var(--accent-green-text); font-weight: 500; }

.bench-vars {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  margin-top: 16px;
}
.bench-vars-head {
  padding: 10px 15px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}
.bench-vars-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 15px;
  font-family: var(--font-mono);
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.bench-vars-row .k { color: var(--text-muted); }
.bench-vars-row .v { color: var(--accent-blue-text); text-align: right; word-break: break-all; }
.bench-vars-row .v.undef { color: rgba(170, 179, 194, 0.4); }
.bench-vars-row .v.same { color: var(--accent-red-text); }
.bench-vars-note {
  padding: 10px 15px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* --- confronto fuso (mobile): due colonne affiancate diventerebbero due
       schermate diverse e il confronto simultaneo — che è tutto il punto —
       si perderebbe. Qui ogni click produce due righe nello stesso riquadro. --- */
.bench-feed { display: none; margin-top: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
@media (max-width: 900px) {
  .bench-columns { display: none; }
  .bench-feed { display: block; }
}
.bench-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}
.bench-feed-legend { display: flex; align-items: center; color: var(--text-muted); font-size: 11px; }
.bench-feed-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin: 0 5px 0 10px; }
.bench-feed-legend i.dot-bad { background: var(--accent-red-text); margin-left: 0; }
.bench-feed-legend i.dot-good { background: var(--accent-green-text); }
.bench-feed-body { padding: 4px 0; }
.bench-feed-empty { padding: 20px 16px; color: rgba(170, 179, 194, 0.5); font-size: 14px; }
.feed-pair { padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); animation: bench-line-in 0.22s var(--ease); }
.feed-pair:last-child { border-bottom: 0; }
.feed-step {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(170, 179, 194, 0.55);
  margin-bottom: 9px;
}
.feed-row { display: flex; gap: 10px; align-items: baseline; padding: 2px 0; }
.feed-row .who {
  flex: 0 0 58px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.feed-row .ev { font-family: var(--font-mono); font-size: 12.5px; word-break: break-all; }
.feed-row--bad .ev { color: var(--accent-red-text); }
.feed-row--good .ev { color: var(--accent-green-text); }
.feed-gloss { padding-left: 68px; font-size: 12.5px; color: var(--text-muted); line-height: 1.45; margin-top: 2px; }
.feed-gloss strong { color: var(--text); font-weight: 500; }

/* --- verdetto --- */
.verdict {
  margin-top: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 26px 30px;
}
@media (max-width: 640px) { .verdict { padding: 22px 20px; } }
.verdict.is-on { border-color: var(--accent-green-border); }
.verdict-wait { color: var(--text-muted); font-size: 15px; }
.verdict-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 20px; }
@media (max-width: 700px) { .verdict-grid { grid-template-columns: 1fr; gap: 18px; } }
.verdict-stat .n { font-size: 40px; line-height: 1.05; letter-spacing: -0.03em; color: var(--heading); }
.verdict-stat.bad .n { color: var(--accent-red-text); }
.verdict-stat.good .n { color: var(--accent-green-text); }
.verdict-stat .t { font-size: 14px; color: var(--text-muted); margin-top: 5px; }
.verdict-text { font-size: 15.5px; color: var(--text); }
.verdict-text b { color: var(--heading); font-weight: 500; }
.verdict-foot { margin-top: 18px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* Dichiarazione di onestà sulla colonna "standard" */
.bench-disclaimer {
  margin-top: 18px;
  font-size: 13px;
  color: rgba(170, 179, 194, 0.7);
  line-height: 1.5;
  max-width: 780px;
}

/* ==========================================================================
   Case study a passaggi — un solo progetto raccontato in tre atti.
   Sostituisce la lista di schede impilate: un pannello alla volta, con una
   barra di avanzamento che dichiara dove va a finire la storia.
   ========================================================================== */
.steps { margin-top: 8px; }

.steps-rail {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .steps-rail { flex-wrap: wrap; gap: 8px; }
  .steps-sep { display: none; }
}

.steps-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.steps-chip:hover { border-color: var(--border-strong); color: var(--text); }
.steps-chip.is-active {
  background: var(--accent-blue-bg);
  border-color: var(--accent-blue-border);
  color: var(--heading);
}
.steps-chip-n {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-blue-text);
}
.steps-chip.is-active .steps-chip-n { color: var(--accent-blue-text); }
@media (max-width: 560px) {
  .steps-chip { font-size: 14px; padding: 8px 14px; }
  .steps-chip-t { display: none; }
  .steps-chip.is-active .steps-chip-t { display: inline; }
}

.steps-sep {
  flex: 1 1 auto;
  min-width: 12px;
  height: 1px;
  background: var(--border-strong);
  opacity: 0.5;
}
.steps-sep--end { max-width: 40px; }

/* Dichiara in anticipo dove arriva il racconto: è la ragione per proseguire. */
.steps-outcome {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--accent-green-bg);
  border: 1px dashed var(--accent-green-border);
  color: var(--accent-green-text);
  font-size: 14px;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .steps-outcome { font-size: 13px; padding: 7px 14px; }
}

.steps-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
}
@media (max-width: 875px) {
  .steps-panel { padding: 26px 22px; }
}
.steps-panel[hidden] { display: none; }
.steps-panel h3 { font-size: 22px; font-weight: 500; margin-bottom: 14px; }

.steps-thread {
  display: flex;
  gap: 18px;
  align-items: baseline;
  margin-top: 22px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--accent-blue-bg);
  border: 1px solid var(--accent-blue-border);
}
@media (max-width: 640px) {
  .steps-thread { flex-direction: column; gap: 8px; padding: 14px 16px; }
}
.steps-thread-label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-blue-text);
}
.steps-thread p { font-size: 14.5px; color: var(--text); }
.steps-thread--final {
  background: var(--accent-green-bg);
  border-color: var(--accent-green-border);
}
.steps-thread--final .steps-thread-label { color: var(--accent-green-text); }

.steps-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.steps-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-blue-bg);
  border: 1px solid var(--accent-blue-border);
  color: var(--heading);
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  font-family: var(--font-sans);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.steps-next:hover { background: var(--accent-blue-border); }
.steps-next--restart { border-color: var(--border-strong); color: var(--text-muted); }
.steps-next--restart:hover { background: var(--surface-2); color: var(--text); }

/* Il dettaglio tecnico apre sotto al piede del pannello. */
.steps-panel.is-open .case-detail-inner { padding-top: 22px; }

/* ==========================================================================
   Cookie banner
   --------------------------------------------------------------------------
   Le variabili --cb-* qui sotto sono l'unico punto di restyling: puntano ai
   token del design system invece di colori propri, così il banner resta
   coerente se la palette cambia. Nomi di classi/id INVARIATI rispetto al
   template — li usa js/cookie-banner.js per agganciarsi al DOM.
   ========================================================================== */
:root {
  --cb-bg:           var(--surface);
  --cb-bg-panel:     var(--surface-2);
  --cb-text:         var(--text);
  --cb-text-muted:   var(--text-muted);
  --cb-accent:       var(--primary);
  --cb-accent-hover: var(--primary-hover);
  --cb-border:       var(--border);
  --cb-border-strong: var(--border-strong);
  --cb-radius:       var(--radius-lg);
  --cb-radius-sm:    var(--radius-sm);
  --cb-transition:   0.2s var(--ease);
  --cb-z:            210;
}

#cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--cb-z);
  width: min(720px, calc(100vw - 2rem));
  background: var(--cb-bg);
  border: 1px solid var(--cb-border-strong);
  border-radius: var(--cb-radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--cb-text);
  opacity: 0;
  translate: 0 1rem;
  transition: opacity var(--cb-transition), translate var(--cb-transition);
  pointer-events: none;
}
#cookie-banner[hidden] { display: none; }
#cookie-banner.is-mounted { display: block; }
#cookie-banner.is-visible { opacity: 1; translate: 0 0; pointer-events: auto; }
@media (max-width: 640px) {
  #cookie-banner { bottom: 0.75rem; width: calc(100vw - 1.5rem); }
}

.cookie-banner__inner { padding: 0rem 3.5rem; }

/* Sempre a colonna singola: testo sopra, i tre pulsanti sotto — su ogni
   larghezza, non solo sotto i 640px come nel template originale. */
.cookie-banner__summary {
  display: flex;
  flex-direction: column;
  gap: 5rem;
  align-items: stretch;
}

.cookie-banner__title {
  font-size: 1.0625rem;
  font-weight: 500;
  margin: 0 0 0.4rem;
  color: var(--heading);
  letter-spacing: -0.01em;
}
.cookie-banner__description {
  margin: 0;
  font-size: 0.875rem;
  color: var(--cb-text-muted);
  line-height: 1.55;
  max-width: 60ch;
}
.cookie-banner__description a { color: var(--accent-blue-text); text-decoration: underline; text-underline-offset: 2px; }

.cookie-banner__actions {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}
@media (max-width: 640px) {
  .cookie-banner__actions { justify-content: stretch; }
  .cookie-banner__actions .cb-btn { flex: 1; justify-content: center; }
}

.cb-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--cb-transition), color var(--cb-transition), border-color var(--cb-transition);
  white-space: nowrap;
  line-height: 1;
  min-height: 42px;
}
.cb-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.cb-btn--primary { background: var(--primary); color: #fff; border-color: rgba(255, 255, 255, 0.08); }
.cb-btn--primary:hover { background: var(--primary-hover); }
.cb-btn--primary:active { opacity: 0.85; }

.cb-btn--outline { background: transparent; color: var(--heading); border-color: var(--cb-border-strong); }
.cb-btn--outline:hover { background: var(--surface-2); }

.cb-btn--ghost { background: transparent; color: var(--cb-text-muted); border-color: transparent; padding-inline: 0.5rem; }
.cb-btn--ghost:hover { color: var(--heading); background: rgba(255, 255, 255, 0.05); }

/* ---------- Pannello preferenze granulari ---------- */
#cookie-banner-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.26s var(--ease), opacity var(--cb-transition);
  border-top: 1px solid var(--cb-border);
}
.cookie-banner__panel-inner {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cb-category { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cb-category__info { flex: 1; }
.cb-category__label { font-size: 0.875rem; font-weight: 500; color: var(--heading); }
.cb-category__desc { font-size: 0.8125rem; color: var(--cb-text-muted); margin-top: 0.2rem; line-height: 1.45; }

.cb-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.cb-switch input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.cb-switch__track {
  width: 40px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--cb-border);
  transition: background var(--cb-transition), border-color var(--cb-transition);
  position: relative;
}
.cb-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: translate var(--cb-transition);
}
.cb-switch input:checked + .cb-switch__track { background: var(--primary); border-color: var(--primary); }
.cb-switch input:checked + .cb-switch__track::after { translate: 16px 0; }
.cb-switch input:disabled + .cb-switch__track { opacity: 0.5; cursor: not-allowed; }
.cb-switch:focus-within .cb-switch__track { outline: 2px solid var(--primary); outline-offset: 2px; }

.cookie-banner__panel-actions {
  display: flex;
  gap: 0.625rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 1rem 1.5rem 1.3rem;
  border-top: 1px solid var(--cb-border);
}
@media (max-width: 640px) {
  .cookie-banner__panel-actions { flex-direction: column; }
  .cookie-banner__panel-actions .cb-btn { width: 100%; justify-content: center; }
}

/* ---------- Riapertura: link in footer + pillola flottante ---------- */
.footer-link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.footer-link-btn:hover { color: var(--heading); }

.cookie-reopen {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px 9px 13px;
  background: rgba(26, 35, 45, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.cookie-reopen:hover { border-color: var(--text-muted); color: var(--heading); }
@media (max-width: 640px) {
  .cookie-reopen { left: 14px; bottom: 14px; padding: 8px 12px; }
}
/* Il banner e la pillola non devono mai stare in scena insieme. */
body:has(#cookie-banner.is-visible) .cookie-reopen { display: none; }

/* ==========================================================================
   Pannello di misurazione live
   ========================================================================== */
.dg-dock {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 14px;
  background: rgba(26, 35, 45, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--accent-green-border);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.dg-dock:hover { border-color: var(--accent-green-text); }
.dg-dock-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green-text);
  box-shadow: 0 0 0 0 rgba(109, 217, 164, 0.5);
  animation: dg-pulse 2.4s var(--ease) infinite;
}
@keyframes dg-pulse {
  0% { box-shadow: 0 0 0 0 rgba(109, 217, 164, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(109, 217, 164, 0); }
  100% { box-shadow: 0 0 0 0 rgba(109, 217, 164, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .dg-dock-pulse { animation: none; }
}
.dg-dock-count {
  background: var(--accent-green-bg);
  border: 1px solid var(--accent-green-border);
  color: var(--accent-green-text);
  border-radius: var(--radius-pill);
  padding: 1px 8px;
}
/* Su schermo stretto resta solo il pallino e il contatore: la CTA della pagina
   non deve mai finire coperta da un elemento decorativo. */
@media (max-width: 640px) {
  .dg-dock { right: 14px; bottom: 14px; padding: 8px 12px; }
  .dg-dock-label { display: none; }
}

.dg-panel {
  position: fixed;
  right: 20px;
  bottom: 70px;
  z-index: 151;
  width: min(440px, calc(100vw - 40px));
  background: var(--surface);
  border: 1px solid var(--accent-green-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.dg-panel[hidden] { display: none; }
.dg-panel.is-expanded {
  width: min(760px, calc(100vw - 40px));
  bottom: 20px;
  top: 90px;
  display: flex;
  flex-direction: column;
}
.dg-panel.is-expanded .dg-panel-body { flex: 1; max-height: none; }
@media (max-width: 640px) {
  .dg-panel { right: 14px; left: 14px; width: auto; bottom: 62px; }
}

.dg-panel-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.dg-panel-title {
  flex: 1;
  font-size: 13.5px;
  color: var(--heading);
}
.dg-panel-count { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); }
.dg-panel-count b { color: var(--accent-green-text); font-weight: 400; }
.dg-panel-close {
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}
.dg-panel-close:hover { color: var(--heading); }

.dg-panel-body {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px 14px;
  max-height: 260px;
  overflow-y: auto;
}
.dg-empty { color: rgba(170, 179, 194, 0.45); }
.dg-line {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  animation: bench-line-in 0.22s var(--ease);
}
.dg-line:last-child { border-bottom: 0; }
.dg-ev { color: var(--accent-green-text); }
.dg-params { color: var(--accent-blue-text); word-break: break-word; }

.dg-panel-foot {
  padding: 11px 14px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Blocco tenuto nel markup ma fuori dalla pagina pubblicata
   (testimonianze in attesa delle citazioni reali). */
.is-hidden { display: none !important; }
