/* ============================================================
   EDITORIAL — Design system condiviso
   Classi .hd-* riusabili in tutte le pagine che vogliono il
   tono editoriale del redesign (serif + italic + pill neri).
   Carica DOPO style.css e prima dei CSS pagina-specifici.
   ============================================================ */

/* ───────────────────────────────────────────────
   Variabili — alias ai token del progetto
   ─────────────────────────────────────────────── */
:root {
  --hd-bg: var(--color-bg);
  --hd-bg-2: var(--color-bg-warm);
  --hd-ink: var(--color-text);
  --hd-ink-soft: var(--color-text-light);
  --hd-muted: var(--color-text-muted);
  --hd-line: var(--color-border);
  --hd-card: var(--color-bg-card);
  --hd-accent: var(--color-primary);
  --hd-accent-ink: var(--color-primary-dark);
  --hd-accent-wash: rgba(192, 68, 40, 0.1);
  --hd-radius: 14px;
  --hd-radius-lg: 22px;
  --hd-shadow-soft: 0 1px 0 rgba(20, 19, 15, 0.04), 0 20px 40px -24px rgba(20, 19, 15, 0.18);
  --hd-mono: 'SF Mono', ui-monospace, 'Segoe UI Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}
[data-theme='dark'] {
  --hd-accent-wash: rgba(212, 120, 95, 0.15);
  --hd-shadow-soft: 0 1px 0 rgba(0, 0, 0, 0.3), 0 20px 40px -24px rgba(0, 0, 0, 0.5);
}

/* Rispetta prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hd-reveal,
  .reveal-home {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hd-marquee-track {
    animation: none !important;
  }
  .hd-emg-dot,
  .hd-eyebrow .dot {
    animation: none !important;
  }
}

/* ───────────────────────────────────────────────
   EYEBROW — riga mono con dot pulsante
   ─────────────────────────────────────────────── */
.hd-eyebrow {
  font-family: var(--hd-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hd-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hd-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hd-accent);
  box-shadow: 0 0 0 0 var(--hd-accent);
  animation: hd-pulse 2.4s ease-out infinite;
}
@keyframes hd-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(192, 68, 40, 0.45);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(192, 68, 40, 0);
  }
}

/* ───────────────────────────────────────────────
   HERO — titolo editoriale riusabile
   ─────────────────────────────────────────────── */
.hd-hero {
  padding: 64px 0 40px;
  position: relative;
}
.hd-hero h1 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(40px, 6.8vw, 96px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--hd-ink);
  margin: 24px 0 28px;
  text-wrap: balance;
}
.hd-hero h1 em {
  font-style: italic;
  color: var(--hd-accent);
}
.hd-hero h1 .u {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
  text-decoration-color: var(--hd-accent);
}
.hd-hero-lead {
  font-size: 17px;
  color: var(--hd-ink-soft);
  max-width: 56ch;
  line-height: 1.55;
  margin: 0;
}
.hd-hero-lead strong {
  color: var(--hd-ink);
  font-weight: 600;
}
.hd-hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
@media (max-width: 640px) {
  .hd-hero {
    padding: 32px 0 24px;
  }
  .hd-hero h1 {
    margin: 18px 0 20px;
  }
}

/* ───────────────────────────────────────────────
   BUTTONS — pill editoriali
   ─────────────────────────────────────────────── */
.hd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  min-height: 44px;
  line-height: 1.2;
}
.hd-btn-primary {
  background: var(--hd-ink);
  color: var(--hd-bg);
}
.hd-btn-primary:hover {
  background: var(--hd-accent);
  color: #fff;
  transform: translateY(-1px);
}
.hd-btn-ghost {
  background: transparent;
  color: var(--hd-ink);
  border-color: var(--hd-line);
}
.hd-btn-ghost:hover {
  background: var(--hd-bg-2);
  color: var(--hd-ink);
}
.hd-btn-accent {
  background: var(--hd-accent);
  color: #fff;
}
.hd-btn-accent:hover {
  background: var(--hd-accent-ink);
  color: #fff;
  transform: translateY(-1px);
}

/* ───────────────────────────────────────────────
   SEC-HEAD — intestazione sezione numerata
   ─────────────────────────────────────────────── */
.hd-sec-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 28px;
  margin-bottom: 32px;
  padding-top: 40px;
}
.hd-sec-num {
  font-family: var(--hd-mono);
  color: var(--hd-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hd-sec-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--hd-ink);
}
.hd-sec-title em {
  font-style: italic;
  color: var(--hd-accent);
}
.hd-sec-link {
  font-size: 13px;
  color: var(--hd-ink-soft);
  border-bottom: 1px solid var(--hd-line);
  padding-bottom: 4px;
  align-self: center;
  text-decoration: none;
}
.hd-sec-link:hover {
  color: var(--hd-accent);
  border-color: var(--hd-accent);
}
@media (max-width: 760px) {
  .hd-sec-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ───────────────────────────────────────────────
   CHIPS — pill selezionabili
   ─────────────────────────────────────────────── */
.hd-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.hd-chip {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid var(--hd-line);
  border-radius: 999px;
  color: var(--hd-ink-soft);
  background: var(--hd-card);
  cursor: pointer;
  transition: all 0.15s;
  min-height: 32px;
}
.hd-chip:hover,
.hd-chip:focus-visible {
  background: var(--hd-ink);
  color: var(--hd-bg);
  border-color: var(--hd-ink);
}

/* ───────────────────────────────────────────────
   EMERGENCY STRIP — fascia nera con bolla accento
   ─────────────────────────────────────────────── */
.hd-emg {
  margin: 40px 0;
  background: #14130f;
  color: var(--hd-bg);
  border-radius: var(--hd-radius-lg);
  padding: 24px 30px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  position: relative;
  overflow: hidden;
}
.hd-emg::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--hd-accent);
  opacity: 0.9;
  pointer-events: none;
}
/* Dark: #14130f hardcoded collassa sul body scuro. Forziamo surface + accent border. */
[data-theme='dark'] .hd-emg {
  background: var(--color-bg-card);
  border: 1px solid var(--hd-accent);
  color: var(--hd-ink);
}
.hd-emg-label {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--hd-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}
.hd-emg-label .hd-emg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hd-accent);
  box-shadow: 0 0 0 0 var(--hd-accent);
  animation: hd-emg-pulse 1.8s ease-out infinite;
}
@keyframes hd-emg-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(192, 68, 40, 0.6);
  }
  100% {
    box-shadow: 0 0 0 14px rgba(0, 0, 0, 0);
  }
}
.hd-emg-nums {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.hd-emg-nums a {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 400;
  padding: 4px 14px;
  border-radius: 999px;
  transition: background 0.15s;
  color: var(--hd-bg);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.hd-emg-nums a:hover,
.hd-emg-nums a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.hd-emg-more {
  position: relative;
  z-index: 2;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 2px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}
.hd-emg-more:hover {
  color: #fff;
  border-color: #fff;
}
@media (max-width: 760px) {
  .hd-emg {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px;
  }
  .hd-emg-nums {
    justify-content: flex-start;
  }
}

/* ───────────────────────────────────────────────
   PERSONAS — router tripartito
   ─────────────────────────────────────────────── */
.hd-personas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius-lg);
  overflow: hidden;
  background: var(--hd-card);
}
.hd-persona {
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid var(--hd-line);
  transition: background 0.2s ease;
  position: relative;
  min-height: 320px;
  text-decoration: none;
  color: inherit;
}
.hd-persona:last-child {
  border-right: 0;
}
.hd-persona:hover {
  background: var(--hd-bg);
}
.hd-persona-tag {
  font-family: var(--hd-mono);
  font-size: 11px;
  color: var(--hd-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hd-persona-tag .swatch {
  width: 10px;
  height: 10px;
  background: var(--hd-accent);
  border-radius: 2px;
}
.hd-persona h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 4px 0 0;
  color: var(--hd-ink);
}
.hd-persona-voice {
  color: var(--hd-ink-soft);
  font-size: 15px;
  font-style: italic;
  padding-left: 12px;
  border-left: 2px solid var(--hd-accent);
  margin: 8px 0 0;
}
.hd-persona-desc {
  color: var(--hd-muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}
.hd-persona-go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--hd-ink);
  padding-top: 8px;
}
.hd-persona-go .arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--hd-ink);
  color: var(--hd-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.25s ease,
    background 0.25s ease;
  font-size: 14px;
  line-height: 1;
}
.hd-persona:hover .hd-persona-go .arrow {
  transform: translateX(4px);
  background: var(--hd-accent);
}
@media (max-width: 860px) {
  .hd-personas {
    grid-template-columns: 1fr;
  }
  .hd-persona {
    border-right: 0;
    border-bottom: 1px solid var(--hd-line);
    min-height: 0;
  }
  .hd-persona:last-child {
    border-bottom: 0;
  }
}

/* ───────────────────────────────────────────────
   Q-GRID — card numerate con foto
   ─────────────────────────────────────────────── */
.hd-q-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1000px) {
  .hd-q-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 720px) {
  .hd-q-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.hd-q-card {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--hd-radius);
  overflow: hidden;
  background: var(--hd-bg-2);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  transition: transform 0.3s ease;
  border: 1px solid var(--hd-line);
  text-decoration: none;
  color: #fff;
}
.hd-q-card:hover {
  transform: translateY(-3px);
}
.hd-q-card-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.hd-q-card:hover .hd-q-card-img {
  transform: scale(1.06);
}
.hd-q-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.7) 100%);
}
.hd-q-num {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 2;
  font-family: var(--hd-mono);
  font-size: 11px;
  color: #fff;
  opacity: 0.85;
  letter-spacing: 0.04em;
}
.hd-q-label {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
}
.hd-q-label h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 22px;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.hd-q-count {
  font-family: var(--hd-mono);
  font-size: 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s ease;
  flex-shrink: 0;
}
.hd-q-count.is-visible,
.hd-q-card:hover .hd-q-count {
  opacity: 1;
}

/* ───────────────────────────────────────────────
   PROMO — card 2-colonne + mappa decorativa
   ─────────────────────────────────────────────── */
.hd-promo {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius-lg);
  overflow: hidden;
  background: var(--hd-card);
  margin-top: 48px;
}
.hd-promo-left {
  padding: 42px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hd-promo-left h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--hd-ink);
}
.hd-promo-left h3 em {
  font-style: italic;
  color: var(--hd-accent);
}
.hd-promo-left p {
  color: var(--hd-ink-soft);
  font-size: 15px;
  margin: 0;
  line-height: 1.6;
}
.hd-promo-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.hd-promo-right {
  background: var(--hd-bg-2);
  position: relative;
  min-height: 320px;
  border-left: 1px solid var(--hd-line);
  background-image:
    radial-gradient(circle at 22% 32%, rgba(192, 68, 40, 0.28) 0, transparent 22%),
    radial-gradient(circle at 70% 60%, rgba(192, 68, 40, 0.18) 0, transparent 18%),
    radial-gradient(circle at 45% 80%, rgba(192, 68, 40, 0.14) 0, transparent 15%);
}
.hd-promo-right svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hd-map-trail {
  stroke: var(--hd-accent);
  stroke-dasharray: 3 5;
  stroke-width: 1.4;
  fill: none;
  opacity: 0.7;
}
.hd-promo-pin {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  background: var(--hd-accent);
  transform: rotate(-45deg);
  box-shadow: 0 6px 18px -4px rgba(192, 68, 40, 0.45);
}
.hd-promo-pin::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
}
.hd-promo-pin--a {
  top: 36%;
  left: 20%;
}
.hd-promo-pin--b {
  top: 58%;
  left: 42%;
  transform: rotate(-45deg) scale(0.8);
}
.hd-promo-pin--c {
  top: 28%;
  left: 66%;
  transform: rotate(-45deg) scale(0.9);
}
.hd-promo-pin--d {
  top: 70%;
  left: 72%;
  transform: rotate(-45deg) scale(0.7);
}
@media (max-width: 860px) {
  .hd-promo {
    grid-template-columns: 1fr;
  }
  .hd-promo-right {
    border-left: 0;
    border-top: 1px solid var(--hd-line);
    min-height: 220px;
  }
  .hd-promo-left {
    padding: 32px 26px;
  }
}

/* ───────────────────────────────────────────────
   VOICES — card testimonianze con quote serif
   ─────────────────────────────────────────────── */
.hd-voices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.hd-voice-card {
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius);
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 200px;
}
.hd-voice-card .quote-mark {
  font-family: var(--font-heading);
  font-size: 72px;
  line-height: 0.5;
  color: var(--hd-accent);
  margin: 0 0 -4px;
  font-style: italic;
}
.hd-voice-card p {
  font-family: var(--font-heading);
  font-size: 21px;
  line-height: 1.3;
  margin: 0;
  color: var(--hd-ink);
  letter-spacing: -0.01em;
  font-weight: 400;
}
.hd-voice-who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}
.hd-voice-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--hd-ink);
  color: var(--hd-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--hd-mono);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}
.hd-voice-who-text {
  font-size: 13px;
  color: var(--hd-muted);
}
@media (max-width: 860px) {
  .hd-voices {
    grid-template-columns: 1fr;
  }
}

/* ───────────────────────────────────────────────
   FINAL CTA — bordo sopra/sotto + serif grande
   ─────────────────────────────────────────────── */
.hd-final-cta {
  margin: 80px 0 48px;
  padding: 56px 0;
  border-top: 1px solid var(--hd-line);
  border-bottom: 1px solid var(--hd-line);
  position: relative;
}
.hd-final-cta h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(34px, 5.8vw, 78px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 16px 0 22px;
  max-width: 18ch;
  color: var(--hd-ink);
}
.hd-final-cta h3 em {
  font-style: italic;
  color: var(--hd-accent);
}
.hd-final-cta p {
  max-width: 54ch;
  color: var(--hd-ink-soft);
  font-size: 16px;
  margin: 0 0 24px;
  line-height: 1.6;
}
.hd-final-cta .hd-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ───────────────────────────────────────────────
   REVEAL — entrata morbida
   ─────────────────────────────────────────────── */
.hd-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.hd-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ───────────────────────────────────────────────
   INFO GRID — griglia info/fatti riusabile
   ─────────────────────────────────────────────── */
.hd-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hd-line);
  border-bottom: 1px solid var(--hd-line);
}
.hd-stat-grid .hd-stat {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--hd-line);
}
.hd-stat-grid .hd-stat:first-child {
  padding-left: 0;
}
.hd-stat-grid .hd-stat:last-child {
  padding-right: 0;
  border-right: 0;
}
.hd-stat-grid .hd-stat .n {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--hd-ink);
}
.hd-stat-grid .hd-stat .n em {
  font-style: italic;
  color: var(--hd-accent);
}
.hd-stat-grid .hd-stat .l {
  font-family: var(--hd-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hd-muted);
}
@media (max-width: 640px) {
  .hd-stat-grid {
    grid-template-columns: 1fr;
  }
  .hd-stat-grid .hd-stat {
    border-right: 0;
    border-bottom: 1px solid var(--hd-line);
    padding: 14px 0;
  }
  .hd-stat-grid .hd-stat:last-child {
    border-bottom: 0;
  }
}

/* ───────────────────────────────────────────────
   CARD — generica editoriale
   ─────────────────────────────────────────────── */
.hd-card {
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius);
  padding: 28px 26px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.hd-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hd-shadow-soft);
}
.hd-card h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  color: var(--hd-ink);
}
.hd-card h3 em {
  font-style: italic;
  color: var(--hd-accent);
}
.hd-card p {
  color: var(--hd-ink-soft);
  font-size: 15px;
  margin: 0 0 12px;
  line-height: 1.55;
}

/* ============================================================
   SITE SHELL OVERRIDES — header, sidebar, footer editoriali
   Caricato globalmente da base.njk; vince su style.css grazie
   all'ordine di load (stessa specificità, ultimo nel cascade).
   ============================================================ */

/* ─────────────── HEADER — translucent light ─────────────── */
.site-header {
  background: color-mix(in srgb, var(--color-bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--hd-line) 60%, transparent);
  box-shadow: none;
}
.site-header.scrolled {
  box-shadow: none;
  border-bottom-color: var(--hd-line);
}
[data-theme='dark'] .site-header {
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
}

/* Logo — serif display */
.site-header .logo-text {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--hd-ink);
  margin-bottom: 2px;
}
.site-header .logo-text small {
  font-family: var(--hd-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hd-muted);
  margin-top: 0;
  display: block;
}

/* Main nav — pill links */
.site-header .main-nav > a:not(.btn),
.site-header .main-nav > .nav-dropdown-wrap > .nav-dropdown-trigger {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--hd-ink-soft);
  background: transparent;
  transition:
    background 0.15s,
    color 0.15s;
  min-height: 36px;
}
.site-header .main-nav > a:not(.btn):hover,
.site-header .main-nav > .nav-dropdown-wrap > .nav-dropdown-trigger:hover {
  background: var(--hd-bg-2);
  color: var(--hd-ink);
}
.site-header .main-nav > a.active,
.site-header .main-nav > .nav-dropdown-wrap > .nav-dropdown-trigger.active {
  background: var(--hd-ink);
  color: var(--hd-bg);
}
.site-header .main-nav > a.active::after {
  display: none;
}
.site-header .main-nav .main-nav-emergency {
  color: var(--hd-accent);
}
.site-header .main-nav .main-nav-emergency:hover {
  background: var(--hd-accent-wash);
  color: var(--hd-accent);
}

/* Segnala button in main-nav */
.site-header .main-nav .btn.btn-primary,
.site-header .main-nav .btn.btn-sm.btn-primary {
  background: var(--hd-ink);
  color: var(--hd-bg);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 500;
  font-size: 14px;
  box-shadow: none;
  border: 1px solid transparent;
  text-transform: none;
  letter-spacing: 0;
}
.site-header .main-nav .btn.btn-primary:hover,
.site-header .main-nav .btn.btn-sm.btn-primary:hover {
  background: var(--hd-accent);
  color: #fff;
  transform: none;
  box-shadow: none;
}

/* Language dropdown trigger — pill mono */
.site-header .lang-dropdown-trigger {
  font-family: var(--hd-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  border: 1px solid var(--hd-line);
  border-radius: 999px;
  padding: 6px 12px;
  background: transparent;
  color: var(--hd-ink-soft);
}
.site-header .lang-dropdown-trigger:hover,
.site-header .lang-dropdown-trigger:focus-visible {
  background: var(--hd-bg-2);
  color: var(--hd-ink);
  border-color: var(--hd-line);
}
.site-header .theme-toggle,
.site-header .menu-toggle {
  color: var(--hd-ink-soft);
  background: transparent;
}
.site-header .theme-toggle:hover,
.site-header .menu-toggle:hover {
  color: var(--hd-ink);
  background: var(--hd-bg-2);
}

/* Global search bar — pill card */
.global-search-bar .global-search-inner {
  border-radius: 999px;
  border: 1px solid var(--hd-line);
  background: var(--hd-card);
  box-shadow: var(--hd-shadow-soft);
}
.global-search-bar .search-icon {
  color: var(--hd-muted);
}
.global-search-bar input {
  font-family: var(--font-body);
}

/* ─────────────── SIDEBAR RIMOSSA ─────────────── */
/* La sidebar desktop è stata rimossa dal markup. Regola di sicurezza
   per nascondere eventuali residui + azzerare offset layout. */
.site-sidebar {
  display: none !important;
}

/* ─────────────── MOBILE DRAWER ─────────────── */
.mobile-nav .mobile-nav-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.01em;
}
.mobile-nav .mobile-nav-group-label {
  font-family: var(--hd-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hd-muted);
}
.mobile-nav .mobile-nav-cta {
  background: var(--hd-ink);
  color: var(--hd-bg);
  border-radius: 999px;
}

/* ─────────────── FOOTER — dark ink editorial ─────────────── */
.site-footer {
  background: #14130f;
  color: color-mix(in srgb, var(--hd-bg) 90%, transparent);
  padding: 72px 0 28px;
}
[data-theme='dark'] .site-footer {
  background: #0a0a08;
}
.site-footer .footer-brand .logo-text {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 44px;
  letter-spacing: -0.02em;
  color: var(--hd-bg);
  line-height: 1;
  margin-bottom: 18px;
}
.site-footer .footer-brand .logo-text small {
  display: none;
}
.site-footer .footer-brand p {
  color: color-mix(in srgb, var(--hd-bg) 70%, transparent);
  font-size: 14px;
  line-height: 1.6;
  max-width: 42ch;
}
.site-footer .footer-links h4 {
  font-family: var(--hd-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--hd-bg) 50%, transparent);
  margin-bottom: 14px;
}
.site-footer .footer-links a {
  color: color-mix(in srgb, var(--hd-bg) 75%, transparent);
  font-size: 14px;
  padding: 5px 0;
  transition: color 0.15s;
}
.site-footer .footer-links a:hover {
  color: var(--hd-accent);
}
.site-footer .footer-bottom {
  border-top-color: rgba(255, 255, 255, 0.08);
  font-family: var(--hd-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--hd-bg) 55%, transparent);
  margin-top: 48px;
}
.site-footer .footer-bottom a {
  color: color-mix(in srgb, var(--hd-bg) 70%, transparent);
}
.site-footer .footer-bottom a:hover {
  color: var(--hd-accent);
}
.site-footer .footer-social a {
  color: color-mix(in srgb, var(--hd-bg) 75%, transparent);
  border: 1px solid color-mix(in srgb, var(--hd-bg) 20%, transparent);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  margin-right: 8px;
  display: inline-block;
  transition: all 0.15s;
}
.site-footer .footer-social a:hover {
  border-color: var(--hd-accent);
  color: var(--hd-accent);
}

/* Newsletter */
.site-footer .footer-newsletter h4 {
  font-family: var(--hd-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-footer .newsletter-form input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--hd-bg);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: var(--font-body);
}
.site-footer .newsletter-form input::placeholder {
  color: color-mix(in srgb, var(--hd-bg) 45%, transparent);
}
.site-footer .newsletter-form button {
  background: var(--hd-accent);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 500;
  font-size: 14px;
  border: 0;
  cursor: pointer;
  transition: background 0.15s;
}
.site-footer .newsletter-form button:hover {
  background: var(--hd-accent-ink);
}

/* Italic "Soglia" brand accent — header, sidebar, drawer */
.site-header .logo-text em,
.site-sidebar .sidebar-tagline strong em,
.mobile-nav .mobile-nav-title em {
  font-style: italic;
  color: var(--hd-accent);
  font-weight: inherit;
}
/* Footer brand italic accent over dark ink */
.site-footer .footer-brand .logo-text em {
  font-style: italic;
  color: var(--hd-accent);
  font-weight: inherit;
}

/* ============================================================
   LEGACY LAYOUT — override editoriale per pagine non migrate
   .page-hero, .section-label, .q-cta, .btn ecc. assumono il
   tono editoriale senza toccare l'HTML.
   ============================================================ */

/* Page hero — translucent light, serif, lead */
.main-content .page-hero {
  background-color: var(--color-bg);
  background-image: none;
  border-bottom: 1px solid var(--hd-line);
  padding: 4.5rem 0 3rem;
}
.main-content .page-hero h1 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(40px, 6.8vw, 96px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--hd-ink);
  margin: 20px 0 24px;
  text-wrap: balance;
}
.main-content .page-hero h1 em {
  font-style: italic;
  color: var(--hd-accent);
  font-weight: inherit;
}
.main-content .page-hero-text > p,
.main-content .page-hero .page-hero-text > p {
  font-size: 17px;
  color: var(--hd-ink-soft);
  max-width: 56ch;
  line-height: 1.55;
  margin: 0 0 20px;
}
.main-content .page-hero .page-hero-text > p strong {
  color: var(--hd-ink);
  font-weight: 600;
}
.main-content .page-hero .container {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.main-content .page-hero-img {
  display: none;
}

/* Section label → eyebrow mono */
.main-content .section-label {
  font-family: var(--hd-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hd-muted);
  background: transparent;
  border: 0;
  padding: 0;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.main-content .section-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hd-accent);
  flex-shrink: 0;
}

/* Breadcrumb nel page-hero — allineato e discreto */
.main-content .page-hero .breadcrumb {
  font-family: var(--hd-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hd-muted);
  margin-bottom: 14px;
}
.main-content .page-hero .breadcrumb a {
  color: var(--hd-ink-soft);
  text-decoration: none;
}
.main-content .page-hero .breadcrumb a:hover {
  color: var(--hd-accent);
}

/* q-hero-stats — chip discreti */
.main-content .q-hero-stats {
  margin-top: 24px;
  gap: 8px;
}
.main-content .q-hero-stats .q-stat {
  font-family: var(--hd-mono);
  font-size: 11px;
  padding: 6px 12px;
  border: 1px solid var(--hd-line);
  border-radius: 999px;
  background: var(--hd-card);
  color: var(--hd-ink-soft);
  letter-spacing: 0.02em;
}

/* Detail-section h3 — tipografia editoriale */
.main-content .detail-section h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--hd-ink);
  margin-bottom: 20px;
}
.main-content .detail-section h3 em {
  font-style: italic;
  color: var(--hd-accent);
}
.main-content .detail-section h3 .icon {
  font-size: 0.85em;
  opacity: 0.6;
}
.main-content .detail-section h2 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--hd-ink);
  margin-bottom: 18px;
}
.main-content .detail-section h2 em {
  font-style: italic;
  color: var(--hd-accent);
}

/* q-cta → look editoriale (fallback per pagine non migrate) */
.main-content .q-cta {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--hd-line);
  border-bottom: 1px solid var(--hd-line);
  border-radius: 0;
  padding: 48px 0;
  margin: 56px 0 40px;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.main-content .q-cta-text h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(28px, 3.8vw, 52px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--hd-ink);
  margin-bottom: 12px;
  max-width: 18ch;
}
.main-content .q-cta-text h3 em {
  font-style: italic;
  color: var(--hd-accent);
}
.main-content .q-cta-text p {
  font-size: 16px;
  color: var(--hd-ink-soft);
  max-width: 54ch;
  line-height: 1.55;
}

/* Buttons in page body — editorial pill */
.main-content .btn,
.main-content .btn.btn-sm {
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: 999px;
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 14px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}
.main-content .btn.btn-primary {
  background: var(--hd-ink);
  color: var(--hd-bg);
  border-color: transparent;
}
.main-content .btn.btn-primary:hover {
  background: var(--hd-accent);
  color: #fff;
  transform: none;
  box-shadow: none;
}
.main-content .btn.btn-outline {
  background: transparent;
  color: var(--hd-ink);
  border-color: var(--hd-line);
}
.main-content .btn.btn-outline:hover {
  background: var(--hd-bg-2);
  color: var(--hd-ink);
  border-color: var(--hd-line);
}
.main-content .btn.btn-white {
  background: var(--hd-card);
  color: var(--hd-ink);
  border-color: var(--hd-line);
}
.main-content .btn.btn-white:hover {
  background: var(--hd-bg-2);
  color: var(--hd-ink);
}
.main-content .btn.btn-sm {
  padding: 7px 14px;
  min-height: 36px;
  font-size: 13px;
}

/* Card links — soft accent hover */
.main-content .card-link {
  color: var(--hd-ink-soft);
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid var(--hd-line);
  padding-bottom: 3px;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.main-content .card-link:hover {
  color: var(--hd-accent);
  border-color: var(--hd-accent);
}

/* Skeleton di "loading" della homepage — più sobrio */
.main-content .reveal {
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

/* TOC — più lineare */
.main-content .q-toc-nav {
  border-top: 1px solid var(--hd-line);
  border-bottom: 1px solid var(--hd-line);
}
.main-content .q-toc-nav a {
  font-family: var(--hd-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--hd-ink-soft);
}
.main-content .q-toc-nav a:hover {
  color: var(--hd-accent);
}

/* ============================================================
   CHI SIAMO / LONGFORM — componenti editoriali dedicati
   Pattern: crumbs, about-hero, meta-card, layout+TOC rail,
   sec numerate, pull quote, team/pro/howto/contacts/fonti.
   ============================================================ */

/* Crumbs mono */
.hd-crumbs {
  padding-top: 32px;
  font-family: var(--hd-mono);
  font-size: 12px;
  color: var(--hd-muted);
  letter-spacing: 0.04em;
}
.hd-crumbs a {
  color: inherit;
  text-decoration: none;
}
.hd-crumbs a:hover {
  color: var(--hd-accent);
}
.hd-crumbs .sep {
  margin: 0 10px;
  opacity: 0.5;
}

/* About hero — h1 gigante + meta card */
.hd-about-hero {
  padding: 56px 0 30px;
  position: relative;
}
.hd-about-hero h1 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(56px, 10vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 0 0 32px;
  text-wrap: balance;
  color: var(--hd-ink);
}
.hd-about-hero h1 em {
  font-style: italic;
  color: var(--hd-accent);
  font-weight: inherit;
}
.hd-about-hero-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: start;
  margin-top: 8px;
}
.hd-about-hero-lead {
  font-size: 19px;
  color: var(--hd-ink-soft);
  max-width: 46ch;
  line-height: 1.55;
  margin: 0;
}
.hd-about-hero-lead strong {
  color: var(--hd-ink);
  font-weight: 500;
}
@media (max-width: 860px) {
  .hd-about-hero-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hd-about-hero {
    padding: 36px 0 24px;
  }
}

/* Meta card (hero right column) */
.hd-meta-card {
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius);
  padding: 0;
  overflow: hidden;
}
.hd-meta-row {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 16px 22px;
  gap: 16px;
  border-bottom: 1px solid var(--hd-line);
  align-items: center;
}
.hd-meta-row:last-child {
  border-bottom: 0;
}
.hd-meta-row .k {
  font-family: var(--hd-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hd-muted);
}
.hd-meta-row .v {
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--hd-ink);
}
.hd-meta-row .v em {
  font-style: italic;
  color: var(--hd-accent);
}

/* Layout — sticky TOC rail + content */
.hd-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 60px;
  padding: 60px 0;
  align-items: start;
}
@media (max-width: 960px) {
  .hd-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 40px 0;
  }
}
.hd-toc {
  position: sticky;
  top: calc(var(--nav-height) + 16px);
}
@media (max-width: 960px) {
  .hd-toc {
    position: static;
  }
}
.hd-toc-label {
  font-family: var(--hd-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hd-muted);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hd-line);
}
.hd-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: hdtocc;
  display: grid;
  gap: 4px;
}
.hd-toc ol li {
  counter-increment: hdtocc;
}
.hd-toc ol a {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 6px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--hd-ink-soft);
  transition: color 0.15s;
  text-decoration: none;
}
.hd-toc ol a::before {
  content: counter(hdtocc, decimal-leading-zero);
  font-family: var(--hd-mono);
  font-size: 10px;
  color: var(--hd-muted);
  padding-top: 2px;
}
.hd-toc ol a:hover {
  color: var(--hd-accent);
}
.hd-toc ol a.is-active {
  color: var(--hd-accent);
  font-weight: 500;
}
@media (max-width: 960px) {
  .hd-toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .hd-toc ol a {
    padding: 4px 10px;
    border: 1px solid var(--hd-line);
    border-radius: 999px;
    grid-template-columns: auto auto;
  }
}
.hd-content {
  min-width: 0;
}

/* Section numerata */
.hd-sec {
  padding: 40px 0;
  border-top: 1px solid var(--hd-line);
  scroll-margin-top: calc(var(--nav-height) + 24px);
}
.hd-sec:first-child {
  border-top: 0;
  padding-top: 0;
}
.hd-sec h2 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 14px 0 28px;
  max-width: 18ch;
  text-wrap: balance;
  color: var(--hd-ink);
}
.hd-sec h2 em {
  font-style: italic;
  color: var(--hd-accent);
  font-weight: inherit;
}
.hd-sec p {
  font-size: 17px;
  color: var(--hd-ink-soft);
  max-width: 64ch;
  margin: 0 0 18px;
  line-height: 1.65;
}
.hd-sec p strong {
  color: var(--hd-ink);
  font-weight: 500;
}
.hd-sec p a {
  color: var(--hd-accent);
  border-bottom: 1px solid currentColor;
  text-decoration: none;
}

/* Drop cap */
.hd-lede::first-letter {
  font-family: var(--font-heading);
  font-size: 5em;
  float: left;
  line-height: 0.85;
  padding: 6px 10px 0 0;
  color: var(--hd-ink);
  font-weight: 400;
}

/* Pull quote */
.hd-pull {
  margin: 32px 0;
  padding: 20px 0 20px 26px;
  border-left: 3px solid var(--hd-accent);
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--hd-ink);
  max-width: 28ch;
  text-wrap: balance;
}
.hd-pull em {
  font-style: italic;
  color: var(--hd-accent);
  font-weight: inherit;
}

/* Team cards */
.hd-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}
@media (max-width: 860px) {
  .hd-team-grid {
    grid-template-columns: 1fr;
  }
}
.hd-team-card {
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hd-team-sigla {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: var(--hd-accent-wash);
  color: var(--hd-accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.hd-team-card h3 {
  font-family: var(--font-heading);
  font-size: 26px;
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--hd-ink);
}
.hd-team-card p {
  margin: 0;
  color: var(--hd-muted);
  font-size: 14.5px;
  line-height: 1.55;
}
.hd-team-note {
  margin-top: 20px;
  padding: 18px 22px;
  background: var(--hd-bg-2);
  border-radius: var(--hd-radius);
  font-size: 14px;
  color: var(--hd-ink-soft);
  line-height: 1.6;
  border: 1px solid var(--hd-line);
}
.hd-team-note a {
  color: var(--hd-accent);
  border-bottom: 1px solid currentColor;
  text-decoration: none;
}

/* Pro grid */
.hd-pro-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius-lg);
  overflow: hidden;
  background: var(--hd-card);
  margin-top: 28px;
}
@media (max-width: 760px) {
  .hd-pro-grid {
    grid-template-columns: 1fr;
  }
}
.hd-pro {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid var(--hd-line);
  border-bottom: 1px solid var(--hd-line);
  transition: background 0.15s;
  min-height: 220px;
  text-decoration: none;
  color: inherit;
}
.hd-pro-grid .hd-pro:nth-child(2n) {
  border-right: 0;
}
.hd-pro-grid .hd-pro:nth-last-child(-n + 2) {
  border-bottom: 0;
}
@media (max-width: 760px) {
  .hd-pro {
    border-right: 0;
  }
  .hd-pro-grid .hd-pro:nth-last-child(2) {
    border-bottom: 1px solid var(--hd-line);
  }
}
.hd-pro:hover {
  background: var(--hd-bg);
}
.hd-pro-tag {
  font-family: var(--hd-mono);
  font-size: 11px;
  color: var(--hd-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hd-pro-tag .swatch {
  width: 10px;
  height: 10px;
  background: var(--hd-accent);
  border-radius: 2px;
}
.hd-pro-tag .swatch--olive {
  background: #4f6b2e;
}
.hd-pro-tag .swatch--red {
  background: #c23a1e;
}
.hd-pro-tag .swatch--sage {
  background: #6b7f5e;
}
.hd-pro h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 4px 0 0;
  color: var(--hd-ink);
}
.hd-pro p {
  color: var(--hd-muted);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0;
}
.hd-pro .go {
  margin-top: auto;
  font-size: 13px;
  color: var(--hd-accent);
  font-weight: 500;
  border-bottom: 1px solid currentColor;
  align-self: flex-start;
  padding-bottom: 2px;
}

/* 3-col variant */
.hd-pro-grid--3col {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 760px) {
  .hd-pro-grid--3col {
    grid-template-columns: 1fr;
  }
}
.hd-pro-grid--3col .hd-pro {
  border-bottom: 0;
}
.hd-pro-grid--3col .hd-pro:nth-child(2n) {
  border-right: 1px solid var(--hd-line);
}
.hd-pro-grid--3col .hd-pro:nth-child(3n) {
  border-right: 0;
}

/* Howto numbered list */
.hd-howto {
  background: var(--hd-bg-2);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius);
  padding: 28px 32px;
  margin-top: 28px;
}
.hd-howto h4 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: var(--hd-ink);
}
.hd-howto ol {
  list-style: none;
  counter-reset: hdhc;
  margin: 0;
  padding: 0;
}
.hd-howto li {
  counter-increment: hdhc;
  padding: 10px 0 10px 38px;
  position: relative;
  font-size: 14.5px;
  color: var(--hd-ink-soft);
  line-height: 1.55;
  border-bottom: 1px dashed var(--hd-line);
}
.hd-howto li:last-child {
  border-bottom: 0;
}
.hd-howto li::before {
  content: counter(hdhc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 12px;
  font-family: var(--hd-mono);
  font-size: 11px;
  color: var(--hd-accent);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.hd-howto li strong {
  color: var(--hd-ink);
  font-weight: 500;
}

/* Contacts grid */
.hd-contacts {
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius-lg);
  overflow: hidden;
  margin-top: 10px;
}
.hd-c-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--hd-line);
  align-items: center;
}
.hd-c-row:last-child {
  border-bottom: 0;
}
.hd-c-row .k {
  font-family: var(--hd-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hd-muted);
}
.hd-c-row .v {
  font-size: 16px;
  color: var(--hd-ink);
}
.hd-c-row .v a {
  color: var(--hd-accent);
  border-bottom: 1px solid currentColor;
  text-decoration: none;
  padding-bottom: 1px;
}
@media (max-width: 640px) {
  .hd-c-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 18px;
  }
}

/* Warn callout */
.hd-note-warn {
  background: var(--hd-accent-wash);
  border: 1px solid color-mix(in srgb, var(--hd-accent) 30%, var(--hd-line));
  border-radius: var(--hd-radius);
  padding: 18px 22px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--hd-ink-soft);
  margin: 10px 0 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.hd-note-warn .icon-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--hd-accent);
}
.hd-note-warn strong {
  color: var(--hd-ink);
  font-weight: 500;
}

/* Src list (↳) */
.hd-src-list {
  list-style: none;
  margin: 14px 0;
  padding: 0;
}
.hd-src-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--hd-line);
  font-size: 15px;
  color: var(--hd-ink-soft);
  line-height: 1.55;
}
.hd-src-list li::before {
  content: '↳';
  color: var(--hd-accent);
  font-family: var(--hd-mono);
  font-size: 14px;
}
.hd-src-list li strong {
  color: var(--hd-ink);
  font-weight: 500;
}

/* Steps (numbered long) */
.hd-steps {
  counter-reset: hdst;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.hd-steps li {
  counter-increment: hdst;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hd-line);
  font-size: 15px;
  color: var(--hd-ink-soft);
  line-height: 1.55;
}
.hd-steps li::before {
  content: counter(hdst, decimal-leading-zero);
  font-family: var(--hd-mono);
  font-size: 11px;
  color: var(--hd-accent);
  padding-top: 4px;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.hd-steps li strong {
  color: var(--hd-ink);
  font-weight: 500;
  display: block;
  margin-bottom: 2px;
}

/* h3 helper */
.hd-h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 28px;
  margin: 32px 0 12px;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--hd-ink);
}
.hd-h3 em {
  font-style: italic;
  color: var(--hd-accent);
  font-weight: inherit;
}

/* Meta timestamp (mono uppercase) */
.hd-meta-stamp {
  font-family: var(--hd-mono);
  font-size: 12px;
  color: var(--hd-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 24px;
}

/* TOC-spy — evidenziazione link attivo per q-toc-nav orizzontale */
.main-content .q-toc-nav a.is-active {
  color: var(--hd-accent);
  font-weight: 500;
}
.main-content .q-toc-nav a {
  transition: color 0.15s;
}

/* ─────────────── TOP-ACTIONS container ─────────────── */
.site-header .top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─────────────── EMERGENCY button (angolo destro) ─────────────── */
.site-header .btn-emergency {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--hd-accent);
  color: #fff;
  border: 1px solid transparent;
  transition:
    background 0.15s,
    transform 0.15s;
  white-space: nowrap;
  text-decoration: none;
  min-height: 36px;
  line-height: 1;
}
.site-header .btn-emergency:hover,
.site-header .btn-emergency:focus-visible {
  background: var(--hd-accent-ink);
  color: #fff;
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .site-header .btn-emergency {
    font-size: 0;
    padding: 8px;
    min-width: 36px;
    justify-content: center;
  }
  .site-header .btn-emergency > span[aria-hidden] {
    font-size: 16px;
  }
}
/* Dark: il tema sbianca --hd-accent (contrasto 2.97:1 su #fff). Usiamo accent-ink piu scuro. */
[data-theme='dark'] .site-header .btn-emergency {
  background: var(--hd-accent-ink);
  color: #fff;
}
[data-theme='dark'] .site-header .btn-emergency:hover,
[data-theme='dark'] .site-header .btn-emergency:focus-visible {
  background: var(--hd-accent);
  color: #fff;
}

/* ─────────────── NAV DROPDOWN override tema light ─────────────── */
.site-header .nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--hd-ink-soft);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
  min-height: 36px;
}
.site-header .nav-dropdown-trigger:hover,
.site-header .nav-dropdown-trigger:focus-visible,
.site-header .nav-dropdown-wrap:focus-within .nav-dropdown-trigger {
  background: var(--hd-bg-2);
  color: var(--hd-ink);
}
.site-header .nav-dropdown {
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  box-shadow: var(--hd-shadow-soft);
  border-radius: var(--hd-radius);
  padding: 6px;
  min-width: 220px;
}
.site-header .nav-dropdown a {
  color: var(--hd-ink-soft);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  transition:
    background 0.15s,
    color 0.15s;
}
.site-header .nav-dropdown a:hover,
.site-header .nav-dropdown a:focus-visible {
  background: var(--hd-bg-2);
  color: var(--hd-ink);
}

/* Lang dropdown mantenuto con il suo styling; i soli trigger mono già gestiti sopra */

/* Responsive: dropdown trigger nascosto su mobile piccolo come la main-nav */
@media (max-width: 1040px) {
  .site-header .nav-dropdown-wrap {
    display: none;
  }
}
