:root {
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --ink: #12263a;
  --ink-dim: #4b657a;
  --accent: #0f9d58;
  --accent-2: #f59e0b;
  --danger: #c62828;
  --line: rgba(15, 42, 67, 0.16);
  --card: rgba(255, 255, 255, 0.9);
  --shadow: 0 14px 35px rgba(13, 39, 66, 0.14);
  --hero-below-fold-offset: calc(100vh - 198px + clamp(4rem, 10vh, 8rem));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 52%, #f5f9ff 100%);
}

.btn-solver { background: #123f6b; color: #fff; border: 1px solid #123f6b; }
.mission-story-dialog.solver-dialog { position: absolute; width: min(1120px, calc(100vw - 3rem)); max-width: none; height: min(90vh, 920px); max-height: none; overflow: hidden; }

/* --- SOLVER: header con logo + dicitura, eyebrow DEMO --- */
.solver-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; flex: 0 0 auto; padding-right: 3.2rem; }
.solver-brand { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.solver-brand-logo { width: 30px; height: auto; display: block; flex: 0 0 auto; }
.solver-brand-name { font-family: "Lora", serif; font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; color: #12304d; }
.solver-eyebrow { margin: 0; flex: 0 0 auto; }

.solver-copy { display: flex; flex-direction: column; gap: .7rem; height: 100%; min-height: 0; position: relative; }
.solver-warning { flex: 0 0 auto; margin: 0; color: #8b3d00; font-weight: 700; font-size: .85rem; }

/* --- SOLVER: accordion (info sopra, risultati sotto), mai oltre i bordi della modale --- */
.solver-accordion { position: relative; flex: 0 0 auto; }
.solver-accordion--info { z-index: 6; }
.solver-accordion--results { z-index: 5; margin-top: auto; }
.solver-accordion-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .6rem; border: 1px solid var(--line); background: var(--bg-soft); border-radius: 10px; padding: .6rem .9rem; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.solver-accordion-toggle:disabled { cursor: default; opacity: .65; }
.solver-chevron { width: 16px; height: 16px; flex: 0 0 auto; transition: transform .2s ease; }
.solver-accordion-toggle[aria-expanded="true"] .solver-chevron { transform: rotate(180deg); }
.solver-accordion-panel { position: absolute; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(6, 22, 38, .22); overflow: hidden; }
.solver-accordion--info .solver-accordion-panel { top: calc(100% + .4rem); }
.solver-accordion--results .solver-accordion-panel { bottom: calc(100% + .4rem); }
.solver-accordion-scroll { max-height: min(46vh, 420px); overflow-y: auto; padding: 1rem 1.1rem; line-height: 1.55; }
.solver-accordion-scroll p { margin: 0; }
.solver-accordion-scroll p + p { margin-top: .7rem; }
.solver-accordion-chain { font-size: .82rem; letter-spacing: .01em; color: var(--ink-dim); text-align: center; font-style: italic; }

/* --- SOLVER: pannello fisso (pulsantiera + composizione), MAI scrollabile --- */
.solver-fixed-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: .6rem; overflow: hidden; }
.solver-presets { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin: 0; }
.solver-preset { text-align: left; border: 1px solid var(--line); background: var(--bg-soft); border-radius: 10px; padding: .65rem; color: var(--ink); cursor: pointer; }
.solver-compose { min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.solver-field { display: block; font-weight: 700; margin: 0; }
.solver-copy textarea { width: 100%; height: 130px; font: inherit; padding: .7rem; border: 1px solid var(--line); border-radius: 10px; resize: none; }
.solver-counter, .solver-status { color: var(--ink-dim); font-size: .9rem; margin: 0; }
.solver-answer { min-height: 0; margin: 0; padding: 0; line-height: 1.55; }

/* --- SOLVER: overlay di avanzamento durante l'analisi --- */
.solver-progress-overlay { position: absolute; inset: 0; border-radius: 28px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(3px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4rem; z-index: 30; }
.solver-progress-overlay[hidden] { display: none; }
.solver-progress-orb { position: relative; width: clamp(88px, 9vw, 112px); height: clamp(88px, 9vw, 112px); display: flex; align-items: center; justify-content: center; }
.solver-progress-ring { position: absolute; inset: 0; border-radius: 50%; border: 6px solid rgba(15, 107, 134, .16); border-top-color: var(--accent); animation: solverSpin 1.1s linear infinite; }
@keyframes solverSpin { to { transform: rotate(360deg); } }
.solver-progress-logo { position: relative; z-index: 1; width: 54%; height: auto; display: block; }
.solver-progress-caption { margin: 0; font-weight: 700; font-size: clamp(1rem, 1.4vw, 1.25rem); color: #12304d; text-align: center; min-height: 1.4em; animation: solverCaptionPulse 2.2s ease-in-out infinite; }
@keyframes solverCaptionPulse { 0%, 100% { opacity: 1; } 50% { opacity: .72; } }
@media (prefers-reduced-motion: reduce) {
  .solver-progress-ring { animation: none; border-top-color: rgba(15, 107, 134, .16); }
  .solver-progress-caption { animation: none; }
}

@media (max-width: 850px) {
  .mission-story-dialog.solver-dialog { width: min(760px, calc(100vw - 1.5rem)); height: min(92vh, 900px); overflow: hidden; }
  .solver-presets { grid-template-columns: 1fr; }
  .solver-accordion-scroll { max-height: min(38vh, 360px); }
  .solver-brand-name { font-size: .95rem; }
}

.sunrise-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #ffffff;
}

.sunrise-glow {
  display: none;
}

.sunrise-image {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(72vw, 780px);
  height: auto;
  transform: translate(-50%, 82vh) scale(0.78);
  opacity: 0.1;
  filter: none;
  animation:
    sunriseRiseMove 4.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s 1 forwards,
    sunriseFadeIn 4.8s linear 0.2s 1 forwards;
}

/* L'alba deve far avanzare insieme posizione e opacita. */
@keyframes sunriseRiseMove {
  0% {
    transform: translate(-50%, 82vh) scale(0.78);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes sunriseFadeIn {
  0% {
    opacity: 0.1;
  }
  100% {
    opacity: 1;
  }
}

.sunrise-image.is-settled {
  transform: translate(-50%, -50%) scale(1);
  animation: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  /* MRV-HARD: i chip workspace autenticati non devono mai sottrarre
     larghezza al blocco brand o cambiare la quota verticale storica. */
  grid-template-columns: minmax(520px, 1fr) minmax(420px, 680px) minmax(420px, 500px);
  align-items: center;
  gap: 0.8rem;
  min-height: 198px;
  padding: 0.7rem clamp(1rem, 3vw, 2.8rem);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: clamp(108px, 15vw, 180px);
  height: auto;
  display: block;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.brand-kicker {
  margin: 0;
  color: var(--accent);
  font-size: clamp(0.74rem, 1.4vw, 0.92rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-sub {
  margin: 0;
  color: var(--ink-dim);
  font-size: clamp(0.8rem, 1.55vw, 1rem);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  justify-self: end;
  justify-content: flex-end;
  align-content: center;
  flex-wrap: nowrap;
  max-width: 100%;
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  justify-content: flex-end;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  min-width: 0;
}

.workspace-actions[hidden] {
  display: none !important;
}

.workspace-chip[hidden] {
  display: none !important;
}

.workspace-chip {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  min-width: min(178px, calc(50% - 0.3rem));
  justify-content: center;
}

.workspace-chip-copy {
  display: grid;
  gap: 0.08rem;
  text-align: left;
}

.workspace-chip-label {
  display: block;
  font-size: 0.84rem;
  line-height: 1.1;
}

.workspace-chip-state {
  display: none;
}

.workspace-chip[data-workspace-state="ready"] .workspace-chip-state {
  color: #157347;
}

.workspace-chip[data-workspace-state="pending"] .workspace-chip-state {
  color: #b45309;
}

.workspace-chip[data-workspace-state="unavailable"] .workspace-chip-state {
  color: #b42318;
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.auth-chip-icon {
  font-size: 1rem;
  line-height: 1;
}

.auth-identity {
  display: grid;
  gap: 0.08rem;
  flex: 0 1 190px;
  min-width: 148px;
  max-width: min(230px, 100%);
  padding: 0.46rem 0.78rem;
  border: 1px solid rgba(16, 55, 88, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 252, 0.96));
  box-shadow: 0 8px 18px rgba(12, 44, 78, 0.08);
  color: #103758;
  line-height: 1.12;
}

.auth-identity[hidden] {
  display: none !important;
}

.auth-identity[data-empty="true"] {
  display: none !important;
}

.auth-identity-name,
.auth-identity-role {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-identity-name {
  font-size: 0.86rem;
  font-weight: 800;
}

.auth-identity-role {
  color: #4b657a;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  justify-items: center;
  gap: clamp(0.65rem, 1.8vw, 1.4rem);
  width: min(820px, 100%);
  height: 122px;
  justify-self: center;
  align-self: end;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.38s ease, transform 0.38s ease, visibility 0.38s ease;
}

.top-stats.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--ink-dim);
}

#languageSelect {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
}

.toolbar-chip {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.48rem 0.95rem;
  color: #103758;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.98));
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(12, 44, 78, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.toolbar-chip:hover,
.toolbar-chip:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(12, 44, 78, 0.14);
  border-color: rgba(16, 55, 88, 0.28);
  outline: none;
}

.toolbar-chip.is-disabled,
.toolbar-chip[aria-disabled="true"] {
  opacity: 0.58;
  pointer-events: none;
  box-shadow: none;
}

.audio-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.48rem 0.9rem;
  color: var(--ink);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.audio-btn .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.55);
}

.audio-btn[aria-pressed="true"] .dot {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(15, 157, 88, 0.55);
}

.overlay-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
}

.overlay-modal.is-open {
  display: block;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 25, 41, 0.56);
  backdrop-filter: blur(6px);
}

.overlay-dialog {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 98vw;
  height: 98vh;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-rows: auto 1fr;
  background: #ffffff;
  border: 1px solid rgba(17, 57, 92, 0.16);
  border-radius: 28px;
  box-shadow: 0 32px 90px rgba(6, 22, 38, 0.32);
  overflow: hidden;
  min-height: 0;
  max-width: none;
  max-height: none;
}

.overlay-dialog-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 0.78rem 1rem 0.68rem;
  border-bottom: 1px solid rgba(15, 42, 67, 0.12);
  background:
    radial-gradient(circle at top right, rgba(21, 115, 71, 0.12), transparent 34%),
    linear-gradient(180deg, #fbfdff 0%, #eff6fb 100%);
}

.overlay-heading {
  display: grid;
  gap: 0.38rem;
  flex: 1 1 auto;
  min-width: 0;
}

.overlay-eyebrow {
  margin: 0;
  color: #0f6b86;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.overlay-heading-copy {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.overlay-title-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.overlay-title {
  margin: 0;
  font-family: "Lora", serif;
  font-size: clamp(1.18rem, 2vw, 1.72rem);
  color: #12304d;
}

.overlay-lead {
  margin: 0;
  color: #35536a;
  line-height: 1.6;
  font-size: 0.94rem;
}

.overlay-close {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(17, 57, 92, 0.16);
  border-radius: 999px;
  background: #ffffff;
  color: #103758;
  font-size: 1.7rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(12, 44, 78, 0.08);
}

.overlay-close:hover,
.overlay-close:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(12, 44, 78, 0.12);
}

.auth-dialog {
  width: min(520px, calc(100vw - 1.25rem));
  height: auto;
  max-height: min(92vh, 720px);
}

.auth-panel {
  padding: 1.35rem 1.2rem 1.2rem;
  display: grid;
  gap: 1rem;
}

.auth-help {
  margin: 0;
  color: #35536a;
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 0.95rem;
}

.auth-field {
  display: grid;
  gap: 0.45rem;
  color: #17334d;
  font-weight: 600;
}

.auth-field input {
  border: 1px solid rgba(17, 57, 92, 0.18);
  border-radius: 16px;
  padding: 0.78rem 0.92rem;
  font: inherit;
  color: #102b43;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(17, 57, 92, 0.06);
}

.auth-field input:focus {
  outline: 2px solid rgba(17, 57, 92, 0.16);
  border-color: rgba(17, 57, 92, 0.28);
}

.auth-error {
  margin: 0;
  padding: 0.72rem 0.82rem;
  border-radius: 14px;
  background: rgba(184, 28, 28, 0.08);
  color: #9f1239;
  font-weight: 600;
}

.auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.auth-cancel {
  background: #ffffff;
}

.auth-submit {
  color: #ffffff;
  border-color: rgba(16, 55, 88, 0.4);
  background: linear-gradient(135deg, #103758, #1d618c);
  box-shadow: 0 12px 24px rgba(16, 55, 88, 0.18);
}

.auth-submit:hover,
.auth-submit:focus-visible {
  border-color: rgba(16, 55, 88, 0.52);
}

body.modal-open {
  overflow: hidden;
}

.mission-story-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
}

.mission-story-modal.is-open {
  display: block;
}

.mission-story-dialog {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(760px, calc(100vw - 1.5rem));
  max-height: min(88vh, 920px);
  transform: translate(-50%, -50%);
  padding: 1.45rem 1.4rem 1.3rem;
  border-radius: 28px;
  border: 1px solid rgba(17, 57, 92, 0.16);
  background:
    radial-gradient(circle at top right, rgba(15, 107, 134, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 250, 255, 0.97));
  box-shadow: 0 34px 90px rgba(6, 22, 38, 0.34);
  overflow-y: auto;
}

.mission-story-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.mission-story-brand {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  padding-top: 0.2rem;
}

.mission-story-logo {
  width: clamp(150px, 24vw, 220px);
  height: auto;
}

.mission-story-icon {
  width: clamp(96px, 15vw, 132px);
  height: clamp(96px, 15vw, 132px);
  object-fit: contain;
}

.mission-story-copy {
  margin-top: 0.4rem;
  display: grid;
  gap: 0.9rem;
}

.intro-longform-dialog {
  width: 86vw;
  min-height: 82vh;
  max-height: 88vh;
}

.intro-longform-brand {
  grid-template-columns: minmax(160px, 210px) minmax(0, 1fr);
  align-items: start;
  justify-items: start;
  gap: 1.25rem;
}

.intro-longform-copy {
  margin-top: 0.85rem;
  width: 100%;
}

.intro-longform-body {
  width: 100%;
  max-height: calc(80vh - 12rem);
  padding-right: 0.85rem;
  overflow-y: auto;
}

.mission-story-body.intro-longform-body p {
  margin: 0;
  font-family: "Lora", serif;
  color: #254760;
  font-size: clamp(1.95rem, 2vw, 2.15rem);
  line-height: 1.44;
}

.mission-story-body.intro-longform-body p + p {
  margin-top: 1.2rem;
}

.intro-longform-lead {
  font-family: "Lora", serif;
  font-size: clamp(2.7rem, 2.85vw, 3rem);
  line-height: 1.22;
  color: #12304d;
}

.intro-longform-closing {
  font-weight: 700;
  color: #173953;
}

.intro-longform-dialog .feature-detail-eyebrow,
.intro-longform-dialog .mission-story-title,
.intro-longform-dialog .overlay-close {
  font-family: "Lora", serif;
}

.intro-longform-dialog .feature-detail-eyebrow {
  font-size: 1rem;
  text-align: left;
  letter-spacing: 0.08em;
}

.intro-longform-dialog .mission-story-title {
  font-size: clamp(2.8rem, 3vw, 3.15rem);
  line-height: 1.12;
  text-align: left;
}

.intro-longform-dialog .feature-detail-heading {
  width: 100%;
}

.intro-longform-body::-webkit-scrollbar {
  width: 10px;
}

.intro-longform-body::-webkit-scrollbar-thumb {
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgba(18, 48, 77, 0.26);
}

.feature-detail-dialog {
  max-width: min(760px, calc(100vw - 2rem));
}

.feature-detail-brand {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 1rem;
}

.feature-detail-heading {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.feature-detail-eyebrow {
  margin: 0;
  color: #0f6b86;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-detail-copy {
  display: block;
}

.feature-detail-body p:first-child {
  font-weight: 600;
  color: #173953;
}

.legal-info-body ul {
  margin: 0.7rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.42rem;
}

.legal-info-body li {
  color: #244760;
  line-height: 1.58;
}

.mission-story-title {
  margin: 0;
  text-align: center;
  font-family: "Lora", serif;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  color: #12304d;
}

.mission-story-body {
  display: grid;
  gap: 0.88rem;
}

.mission-story-body p {
  margin: 0;
  color: #24455f;
  line-height: 1.72;
  font-size: 1rem;
}

.scroll-cue {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  border: 2px solid rgba(17, 57, 92, 0.32);
  background: rgba(255, 255, 255, 0.92);
  color: #11395c;
  display: grid;
  place-items: center;
  transform: translate(-50%, 12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 12px 22px rgba(17, 57, 92, 0.14);
}

.scroll-cue.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: cueBounce 1.28s ease-in-out infinite;
}

.scroll-cue-arrow {
  display: inline-block;
  font-size: 2.35rem;
  line-height: 1;
  transform: translateY(-2px);
}

@keyframes cueBounce {
  0% {
    transform: translate(-50%, 0) scale(1, 1);
  }
  18% {
    transform: translate(-50%, 8px) scale(1.06, 0.94);
  }
  42% {
    transform: translate(-50%, -16px) scale(0.98, 1.03);
  }
  62% {
    transform: translate(-50%, 0) scale(1, 1);
  }
  100% {
    transform: translate(-50%, 0) scale(1, 1);
  }
}

.free-strip {
  position: relative;
  z-index: 15;
  width: min(1220px, calc(100% - 2rem));
  margin: 0.75rem auto 0;
  padding: 0.95rem 1.05rem;
  border: 1px solid #8ca9c2;
  border-radius: 14px;
  background: linear-gradient(130deg, #f7fbff, #f2f8ff);
  box-shadow: 0 8px 18px rgba(13, 39, 66, 0.08);
  text-align: center;
}

.free-strip-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #1e3a56;
  font-size: clamp(1rem, 2vw, 1.3rem);
  text-transform: uppercase;
}

.free-strip-subtitle {
  margin: 0.35rem 0 0;
  color: #37546f;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}

main {
  position: relative;
  z-index: 10;
  padding: var(--hero-below-fold-offset) clamp(1rem, 3vw, 2.8rem) 4rem;
}

.hero {
  position: relative;
  min-height: calc(100vh - 120px);
  display: grid;
  align-items: end;
  grid-template-columns: 1fr;
  gap: 0;
  padding-block: clamp(2rem, 8vh, 5rem);
}

.hero-inner {
  position: relative;
  z-index: 12;
  max-width: min(940px, 92%);
  margin-inline: auto;
  text-align: center;
  opacity: 1;
}

.emblematic-intro {
  position: relative;
  width: min(80vw, 1380px);
  max-width: calc(100vw - 4rem);
  margin: 0 auto 3.15rem;
  padding: clamp(1.9rem, 3vw, 2.55rem);
  border: 1px solid rgba(17, 57, 92, 0.14);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.13), transparent 32%),
    radial-gradient(circle at bottom left, rgba(15, 157, 88, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.96));
  box-shadow: 0 22px 58px rgba(12, 44, 78, 0.14);
  box-sizing: border-box;
  overflow: hidden;
  text-align: left;
}

.emblematic-intro::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(180deg, rgba(15, 157, 88, 0.95), rgba(245, 158, 11, 0.82));
}

.emblematic-intro-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

.emblematic-intro-kicker {
  margin: 0;
  color: #0f6b86;
  font-family: "Lora", serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.emblematic-intro-rule {
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(15, 107, 134, 0.35), rgba(15, 107, 134, 0));
}

.emblematic-intro-body {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.82rem;
  width: 100%;
}

.emblematic-intro-body p {
  margin: 0;
  font-family: "Lora", serif;
  color: #284a61;
  font-size: clamp(1.7rem, 1.9vw, 1.9rem);
  line-height: 1.54;
}

.emblematic-intro-lead {
  font-family: "Lora", serif;
  font-size: clamp(2.45rem, 2.75vw, 2.7rem);
  line-height: 1.18;
  color: #12304d;
}

.emblematic-intro-closing {
  color: #173953;
  font-weight: 700;
}

.emblematic-intro-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 1.2rem;
  width: 100%;
}

.emblematic-intro-more {
  font-family: "Lora", serif;
  font-size: 1.1rem;
  color: #ffffff;
  background: linear-gradient(100deg, #123f63, #157347);
  border-color: rgba(18, 63, 99, 0.2);
  box-shadow: 0 14px 28px rgba(18, 63, 99, 0.18);
}

.emblematic-intro-more:hover,
.emblematic-intro-more:focus-visible {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(100deg, #157347, #0f6b86);
  box-shadow: 0 18px 32px rgba(21, 115, 71, 0.24);
}

body[data-intro-state="running"] .hero-inner {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body[data-intro-state="done"] .hero-inner {
  visibility: visible;
  pointer-events: auto;
}

.hero-inner h1 {
  margin: 0;
  font-family: "Lora", serif;
  line-height: 1.08;
  text-wrap: balance;
  font-size: clamp(2rem, 5vw, 4.1rem);
  color: #12304d;
  text-shadow: 0 10px 30px rgba(255, 255, 255, 0.92);
}

.hero-subtitle {
  margin-top: 1rem;
  color: #35536a;
  font-size: clamp(1rem, 1.7vw, 1.23rem);
  max-width: 70ch;
  line-height: 1.58;
  margin-inline: auto;
  text-align: center;
  text-shadow: 0 8px 24px rgba(255, 255, 255, 0.88);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.45rem;
  justify-content: center;
}

.hero-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 360px));
  gap: 1rem;
  width: fit-content;
  max-width: 100%;
  margin: 1.8rem auto 0;
  justify-items: stretch;
  place-content: start center;
  justify-content: center;
  text-align: center;
}

.hero-quick-card {
  width: min(360px, 100%);
  padding: 1.2rem 1.25rem 1.3rem;
  border: 1px solid rgba(15, 42, 67, 0.12);
  border-radius: 1.35rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(246, 250, 255, 0.95)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.09), transparent 38%);
  box-shadow: 0 16px 38px rgba(12, 44, 78, 0.08);
  justify-items: center;
  text-align: center;
}

.hero-quick-card h2 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.1rem, 2vw, 1.38rem);
  line-height: 1.25;
}

.hero-quick-card p:last-of-type {
  margin-bottom: 0;
  color: #4a6175;
  line-height: 1.6;
}

.hero-quick-tag {
  margin: 0;
  color: #0f6b86;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-entrypoints {
  padding-top: 0.4rem;
}

.public-entry-card {
  width: min(360px, 100%);
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 0.65rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.94)),
    radial-gradient(circle at top right, rgba(21, 115, 71, 0.08), transparent 42%);
}

.public-entry-tag {
  margin: 0;
  color: #0f6b86;
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-entry-actions {
  margin-top: 0.25rem;
}

.btn {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.68rem 1.15rem;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition:
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(100deg, #157347, var(--accent));
}

.btn-ghost {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
}

.hero-quick-card .btn,
.hero > .hero-inner > .cta-row .btn,
.public-entry-card .btn {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
}

.hero > .hero-inner > .cta-row .btn:hover,
.hero > .hero-inner > .cta-row .btn:focus-visible,
.hero-quick-card .btn:hover,
.hero-quick-card .btn:focus-visible,
.public-entry-card .btn:hover,
.public-entry-card .btn:focus-visible {
  color: #ffffff;
  background: linear-gradient(100deg, #157347, var(--accent));
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(21, 115, 71, 0.22);
  transform: translateY(-1px);
  outline: none;
}

.stat-card {
  position: relative;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  width: fit-content;
  min-height: 0;
  user-select: none;
  pointer-events: auto;
  cursor: default;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.stat-card:hover,
.stat-card.is-active {
  z-index: 13;
}

.stat-card .value {
  margin: 0;
  font-weight: 800;
  font-size: clamp(1.35rem, 2.25vw, 2rem);
  color: #11395c;
  text-shadow: 0 4px 10px rgba(17, 57, 92, 0.13);
  text-align: center;
  display: inline-block;
  padding: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.stat-card .label {
  display: none;
}

.stat-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 24px);
  top: auto;
  width: clamp(320px, 30vw, 460px);
  min-height: 82px;
  overflow: visible;
  border: 1px solid rgba(16, 55, 88, 0.28);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(244, 251, 255, 0.97));
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(13, 39, 66, 0.14);
  padding: 0.68rem 0.86rem;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.stat-card:hover .stat-popover,
.stat-card.is-active .stat-popover {
  opacity: 1;
  transform: translate(-50%, 0);
}

.top-stats .stat-card:first-child .stat-popover {
  left: 0;
  transform: translate(0, 4px);
}

.top-stats .stat-card:first-child:hover .stat-popover,
.top-stats .stat-card:first-child.is-active .stat-popover {
  transform: translate(0, 0);
}

.top-stats .stat-card:last-child .stat-popover {
  left: auto;
  right: 0;
  transform: translate(0, 4px);
}

.top-stats .stat-card:last-child:hover .stat-popover,
.top-stats .stat-card:last-child.is-active .stat-popover {
  transform: translate(0, 0);
}

.stat-popover-title {
  margin: 0;
  font-weight: 800;
  font-size: 0.98rem;
  color: #143654;
}

.stat-popover-text {
  margin: 0.32rem 0 0;
  color: #2f4b63;
  line-height: 1.4;
  font-size: 0.92rem;
}

.section {
  padding-block: clamp(2rem, 7vw, 4rem);
  width: min(1220px, 100%);
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  margin: 0;
  font-family: "Lora", serif;
  font-size: clamp(1.45rem, 3.5vw, 2.6rem);
  text-align: center;
}

.section-head p {
  margin: 0.85rem 0 0;
  color: #2f4b63;
  font-size: clamp(1.05rem, 1.55vw, 1.22rem);
  max-width: 74ch;
  line-height: 1.66;
  text-align: center;
  margin-inline: auto;
}

.icon-ribbon {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  justify-content: center;
  align-items: stretch;
  gap: 0.95rem;
  width: min(980px, 100%);
  margin-inline: auto;
}

.icon-chip {
  display: grid;
  grid-template-rows: 132px auto;
  align-items: start;
  justify-items: center;
  width: 100%;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(14, 42, 68, 0.08);
  padding: 0.75rem 0.55rem 0.65rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  appearance: none;
  text-align: center;
}

.icon-chip:hover,
.icon-chip:focus-visible {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 24px rgba(14, 42, 68, 0.14);
  border-color: rgba(15, 42, 67, 0.26);
  outline: none;
}

.icon-chip img {
  max-width: 122px;
  max-height: 122px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.icon-caption {
  margin: 0.5rem 0 0;
  text-align: center;
  color: #25465f;
  font-size: 0.83rem;
  line-height: 1.32;
  font-weight: 600;
}

.cards-grid,
.standard-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
  width: min(1160px, 100%);
  margin-inline: auto;
}

.cards-grid.public-entrypoints-grid {
  margin-top: 1.35rem;
  grid-template-columns: repeat(2, minmax(280px, 360px));
  justify-items: stretch;
  place-content: start center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

.card,
.standard-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  min-height: 190px;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
}

button.card,
button.standard-card,
button.timeline-item {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: inherit;
  appearance: none;
  cursor: pointer;
}

.detail-trigger {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.detail-trigger:hover,
.detail-trigger:focus-visible {
  border-color: rgba(15, 107, 134, 0.32);
  box-shadow: 0 14px 28px rgba(11, 40, 68, 0.14);
  outline: none;
}

.block-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 0.72rem;
  align-items: center;
  justify-items: center;
}

.block-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: saturate(1.05) contrast(1.02);
}

.block-copy h3 {
  margin: 0;
  text-align: center;
}

.block-copy p {
  margin: 0.55rem 0 0;
  text-align: center;
}

.card h3,
.standard-card h3 {
  margin: 0;
  font-size: 1.03rem;
  color: #12304d;
  text-align: center;
}

.card p,
.standard-card p {
  margin: 0.55rem 0 0;
  color: var(--ink-dim);
  line-height: 1.52;
  text-align: center;
}

.timeline {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.85rem;
  width: min(980px, 100%);
  margin-inline: auto;
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  padding: 0.85rem;
  box-shadow: 0 8px 20px rgba(11, 40, 68, 0.08);
  justify-items: center;
  text-align: center;
}

.timeline-step {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(130deg, #22c55e, #86efac);
  color: #0b2a1f;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.timeline-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.timeline-content h3 {
  margin: 0;
  font-size: 1.05rem;
  text-align: center;
}

.timeline-content p {
  margin: 0.35rem 0 0;
  color: var(--ink-dim);
  line-height: 1.52;
  text-align: center;
}

.footer {
  position: relative;
  z-index: 10;
  margin-top: 1.4rem;
  padding: 2rem clamp(1rem, 3vw, 2.8rem) 2.3rem;
  border-top: 1px solid rgba(15, 42, 67, 0.14);
  background:
    radial-gradient(circle at top left, rgba(15, 157, 88, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.enterprise-footer {
  display: grid;
  gap: 1.45rem;
}

.footer-brand,
.footer-grid,
.footer-bottom {
  width: min(1220px, 100%);
  margin-inline: auto;
}

.footer-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  width: clamp(86px, 10vw, 126px);
  height: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.25fr 0.8fr;
  gap: 1rem;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 0.36rem;
  min-width: 0;
}

.footer-column h2 {
  margin: 0 0 0.15rem;
  color: #12304d;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer p,
.footer a,
.footer-channel-disabled {
  margin: 0;
  color: #466176;
  font-size: 0.9rem;
  line-height: 1.52;
}

.footer a,
.footer-channel-disabled {
  text-decoration: none;
  font-weight: 700;
}

.footer-channel-disabled {
  display: inline-block;
  cursor: default;
}

.footer a:hover,
.footer a:focus-visible {
  color: #0f6b86;
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(15, 42, 67, 0.12);
  flex-wrap: wrap;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
}

@media (max-width: 1080px) {
  .hero {
    align-items: start;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 0.58rem;
    min-height: 220px;
  }

  .top-actions {
    justify-self: center;
  }

  .top-stats {
    width: 100%;
    max-width: 680px;
    gap: 0.62rem;
    height: 126px;
  }

  .stat-card .value {
    font-size: clamp(1.2rem, 2.9vw, 1.58rem);
  }

  .stat-popover {
    width: clamp(280px, 48vw, 390px);
    min-height: 78px;
    bottom: calc(100% - 16px);
  }

  .cards-grid,
  .standard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards-grid.public-entrypoints-grid {
    grid-template-columns: repeat(2, minmax(240px, 360px));
    width: fit-content;
    max-width: 100%;
  }

  .block-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .block-icon {
    width: 42px;
    height: 42px;
  }

  .icon-ribbon {
    grid-template-columns: repeat(4, minmax(128px, 1fr));
    width: min(860px, 100%);
  }

}

@media (max-width: 760px) {
  .topbar {
    min-height: 252px;
    padding-inline: 0.72rem;
  }

  .top-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .auth-identity {
    max-width: min(360px, 100%);
  }

  .overlay-dialog {
    width: 98vw;
    height: 98vh;
    border-radius: 18px;
  }

  .overlay-dialog-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .overlay-heading {
    width: 100%;
  }

  .mission-story-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    padding: 1.15rem 1rem 1rem;
    border-radius: 20px;
  }

  .emblematic-intro {
    width: 100%;
    max-width: 100%;
    padding: 1.2rem 1rem 1.1rem 1.15rem;
    border-radius: 24px;
  }

  .emblematic-intro-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .emblematic-intro-rule {
    width: 100%;
  }

  .intro-longform-body {
    max-height: calc(100vh - 15rem);
  }

  .intro-longform-dialog {
    width: calc(100vw - 1rem);
    min-height: auto;
  }

  .mission-story-body.intro-longform-body p {
    font-size: clamp(1.15rem, 5vw, 1.6rem);
    line-height: 1.58;
  }

  .intro-longform-lead {
    font-size: clamp(1.7rem, 6vw, 2.2rem);
  }

  .intro-longform-dialog .mission-story-title {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
  }

  .emblematic-intro-body p {
    font-size: clamp(1.08rem, 4.6vw, 1.5rem);
    line-height: 1.62;
  }

  .emblematic-intro-lead {
    font-size: clamp(1.8rem, 6vw, 2.35rem);
  }

  .auth-dialog {
    height: auto;
  }

  .brand-copy {
    text-align: center;
  }

  .cards-grid,
  .standard-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid.public-entrypoints-grid {
    grid-template-columns: 1fr;
    width: min(460px, 100%);
  }

  .top-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: 132px;
    max-width: 420px;
    gap: 0.5rem 0.7rem;
  }

  .stat-card {
    width: fit-content;
    min-height: 0;
  }

  .stat-card .value {
    font-size: clamp(1.08rem, 5vw, 1.34rem);
  }

  .icon-chip {
    grid-template-rows: 114px auto;
  }

  .icon-ribbon {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    width: min(460px, 100%);
  }

  .icon-chip img {
    max-width: 102px;
    max-height: 102px;
  }

  .stat-popover {
    width: min(88vw, 360px);
    min-height: 72px;
    bottom: calc(100% - 12px);
    top: auto;
  }

  .scroll-cue {
    width: 68px;
    height: 68px;
    bottom: 18px;
  }

  .scroll-cue-arrow {
    font-size: 2.05rem;
  }

  .top-stats .stat-card:nth-child(odd) .stat-popover {
    left: 0;
    transform: translate(0, 4px);
  }

  .top-stats .stat-card:nth-child(odd):hover .stat-popover,
  .top-stats .stat-card:nth-child(odd).is-active .stat-popover {
    transform: translate(0, 0);
  }

  .top-stats .stat-card:nth-child(even) .stat-popover {
    left: auto;
    right: 0;
    transform: translate(0, 4px);
  }

  .top-stats .stat-card:nth-child(even):hover .stat-popover,
  .top-stats .stat-card:nth-child(even).is-active .stat-popover {
    transform: translate(0, 0);
  }

  .free-strip {
    margin-inline: 0.8rem;
  }

  .hero-quick-actions {
    grid-template-columns: 1fr;
    width: min(460px, 100%);
  }

  .footer-brand {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
}

/* ==========================================================
   Contenuto proprio di chisiamo.html (dossier tecnico), scoped
   sotto .page per non collidere con le classi omonime della home
   (.btn, .cta-row, section, h1, ecc.).
   ========================================================== */
 
  /*
    I token custom property qui sotto sono scoped a .page (il contenuto
    proprio di questa pagina), non a :root: cosi' l'header e il footer
    condivisi, importati da partials/ e stilizzati da styles.css, non
    ereditano i colori "ledger" di questa pagina e restano identici a
    quelli della home.
  */.page {
    --paper: #ffffff;
    --paper-raised: #f4f6f5;
    --ink: #16202b;
    --ink-soft: #45525f;
    --line: #c7d0cd;
    --accent: #8a6a12;
    --accent-strong: #6e5410;
    --accent-ink-on: #fff9ec;
    --mono-tint: #506273;
  }
  @media (prefers-color-scheme: dark) {:root:not([data-theme="light"]) .page {
      --paper: #10151d;
      --paper-raised: #161d27;
      --ink: #e9ece9;
      --ink-soft: #a3b0ba;
      --line: #2b3542;
      --accent: #d8ac3d;
      --accent-strong: #eec463;
      --accent-ink-on: #1a1305;
      --mono-tint: #8fa3b8;
    }
  }
:root[data-theme="dark"] .page {
    --paper: #10151d;
    --paper-raised: #161d27;
    --ink: #e9ece9;
    --ink-soft: #a3b0ba;
    --line: #2b3542;
    --accent: #d8ac3d;
    --accent-strong: #eec463;
    --accent-ink-on: #1a1305;
    --mono-tint: #8fa3b8;
  }
.page * { box-sizing: border-box; margin: 0; padding: 0; }
.page {
    background: #ffffff;
    color: var(--ink);
    font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(2rem, 3vw, 3rem) clamp(1.25rem, 4vw, 2.5rem) 4rem;
  }
.page .hero {
  animation: settle 700ms cubic-bezier(.2,.7,.3,1) both;
  margin-top: 1rem;
  min-height: auto;
  display: block;
  padding-block: 0;
}
  @media (prefers-reduced-motion: reduce) {.page .hero, .page .exhibit { animation: none !important; }
 }
  @keyframes settle {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
.page .eyebrow {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-strong);
    margin: 0 0 0.9rem;
  }
.page h1 {
    font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, "Times New Roman", serif;
    font-weight: 400;
    font-size: clamp(2.3rem, 5.2vw, 3.3rem);
    line-height: 1.12;
    letter-spacing: -0.01em;
    text-wrap: balance;
    margin: 0 0 1.2rem;
  }
.page h1 em { font-style: italic; color: var(--accent-strong); }
.page .lede {
    font-size: 1.18rem;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0 0 1.8rem;
  }
.page .cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.75rem;
  }
.page .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 3px;
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 160ms ease, background 160ms ease;
  }
.page .btn:hover { transform: translateY(-1px); }
.page .btn-primary { background: var(--accent); color: var(--accent-ink-on); }
.page .btn-primary:hover { background: var(--accent-strong); }
.page .btn-ghost { border-color: var(--line); color: var(--ink); }
.page .btn-ghost:hover { border-color: var(--ink-soft); }
.page .thesis {
    border-left: 3px solid var(--accent);
    padding: 0.2rem 0 0.2rem 1.5rem;
    margin: 0 0 2.75rem;
  }
.page .thesis p { font-size: 1.09rem; line-height: 1.65; color: var(--ink); margin: 0 0 1rem; }
.page .thesis p:last-child { margin-bottom: 0; }
.page .thesis .signed {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.85rem;
    color: var(--ink-soft);
    letter-spacing: 0.02em;
  }
.page .section-label { display: flex; align-items: baseline; gap: 0.7rem; margin: 0 0 1.4rem; }
.page .section-label .num { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 0.85rem; color: var(--accent-strong); }
.page .section-label h2 {
    font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif;
    font-weight: 400;
    font-size: 1.55rem;
  }
.page .section-label .rule { flex: 1; height: 1px; background: var(--line); }
.page section { margin-bottom: 2.75rem; }
.page .exhibits {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
  }
.page .exhibit {
    background: var(--paper-raised);
    padding: 1.4rem 1.5rem;
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 2rem;
    animation: settle 600ms cubic-bezier(.2,.7,.3,1) both;
  }
.page .exhibit:nth-child(2) { animation-delay: 60ms; }
.page .exhibit:nth-child(3) { animation-delay: 120ms; }
.page .exhibit:nth-child(4) { animation-delay: 180ms; }
.page .exhibit:nth-child(5) { animation-delay: 240ms; }
.page .exhibit:nth-child(6) { animation-delay: 300ms; }
  @media (max-width: 560px) {.page .exhibit { grid-template-columns: 1fr; }
 }
.page .exhibit .tag {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.8rem;
    color: var(--mono-tint);
    letter-spacing: 0.01em;
    padding-top: 0.15rem;
  }
.page .exhibit .tag .verified {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent-strong);
    border: 1px solid var(--accent);
    border-radius: 2px;
    padding: 0.12rem 0.4rem;
  }
.page .exhibit h3 { font-size: 1.08rem; font-weight: 600; margin: 0 0 0.4rem; }
.page .exhibit p { color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
.page .tailwind {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1.6rem 1.7rem;
  }
.page .tailwind .kicker {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-strong);
    margin: 0 0 0.6rem;
  }
.page .tailwind p { margin: 0 0 0.7rem; color: var(--ink); font-size: 1.03rem; line-height: 1.6; }
.page .tailwind p:last-child { margin-bottom: 0; }
.page .tailwind .figs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.1rem 0 1.2rem;
  }
.page .fig .n {
    font-family: Palatino, "Palatino Linotype", Georgia, serif;
    font-size: 1.7rem;
    color: var(--accent-strong);
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
.page .fig .l { font-size: 0.88rem; color: var(--ink-soft); margin-top: 0.25rem; }
.page .close {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    padding: clamp(1.6rem, 4vw, 2.2rem);
  }
.page .close h2 { font-family: Palatino, "Palatino Linotype", Georgia, serif; font-weight: 400; font-size: 1.6rem; margin: 0 0 0.7rem; color: var(--ink); }
.page .close p { color: var(--ink-soft); margin: 0 0 1.4rem; font-size: 1.03rem; line-height: 1.6; }
.page .close .cta-row { margin-bottom: 0; }
.page .close .btn-primary { background: var(--accent); color: var(--accent-ink-on); }
.page .close .btn-ghost { border-color: var(--line); color: var(--ink); }
.page footer {
    margin-top: 2.5rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.85rem;
    color: var(--ink-soft);
    letter-spacing: 0.01em;
  }
  /* ---------- audience chips ---------- */.page .audience {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.6rem;
  }
.page .audience span {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
  }
  /* ---------- accordion (dettaglio) ---------- */.page .dossier {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
  }
.page .dossier details {
    background: var(--paper-raised);
  }
.page .dossier summary {
    list-style: none;
    cursor: pointer;
    padding: 1.1rem 1.4rem;
    display: grid;
    grid-template-columns: 3.4rem 1fr auto;
    align-items: center;
    gap: 1rem;
    -webkit-tap-highlight-color: transparent;
  }
.page .dossier summary::-webkit-details-marker { display: none; }
.page .dossier summary .letter {
    font-family: Palatino, "Palatino Linotype", Georgia, serif;
    font-size: 1.5rem;
    color: var(--accent-strong);
    line-height: 1;
  }
.page .dossier summary .stitle {
    font-weight: 600;
    font-size: 1.06rem;
  }
.page .dossier summary .stitle small {
    display: block;
    font-weight: 400;
    color: var(--ink-soft);
    font-size: 0.92rem;
    margin-top: 0.2rem;
  }
.page .dossier summary .chev {
    font-family: ui-monospace, monospace;
    color: var(--mono-tint);
    transition: transform 200ms ease;
    font-size: 0.9rem;
  }
.page .dossier details[open] summary .chev { transform: rotate(90deg); }
.page .dossier .body {
    padding: 0 1.4rem 1.3rem calc(3.4rem + 1.4rem);
  }
  @media (max-width: 560px) {.page .dossier summary { grid-template-columns: 2.2rem 1fr auto; }
.page .dossier .body { padding-left: calc(2.2rem + 1.4rem); }
  }
.page .dossier.cv summary { grid-template-columns: 6.5rem 1fr auto; }
.page .dossier.cv summary .letter {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--mono-tint);
  }
.page .dossier.cv .body { padding: 0 1.4rem 1.3rem; }
  @media (max-width: 560px) {.page .dossier.cv summary { grid-template-columns: 4.5rem 1fr auto; }
  }
.page .continuity { display: flex; flex-direction: column; gap: 0.9rem; }
.page .cline {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px dashed var(--line);
  }
.page .cline:last-child { border-bottom: none; padding-bottom: 0; }
  @media (max-width: 560px) {.page .cline { grid-template-columns: 1fr; gap: 0.25rem; }
 }
.page .cline .yrs { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 0.88rem; color: var(--mono-tint); padding-top: 0.15rem; }
.page .cline p { font-size: 1rem; line-height: 1.6; color: var(--ink); }
.page .cline p b { color: var(--ink); }
.page .cline p a { color: var(--accent-strong); text-decoration: none; border-bottom: 1px solid var(--line); }
.page .cline p a:hover { border-bottom-color: var(--accent-strong); }
.page .dossier ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.page .dossier li {
    font-size: 1rem;
    line-height: 1.55;
    color: var(--ink-soft);
    padding-left: 1.1rem;
    position: relative;
  }
.page .dossier li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
  }
.page .dossier li b { color: var(--ink); font-weight: 600; }
.page .dossier li .src {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.85rem;
    color: var(--mono-tint);
  }
.page .dossier .why {
    margin-top: 0.8rem;
    font-size: 0.95rem;
    font-style: italic;
    color: var(--ink-soft);
    border-left: 2px solid var(--line);
    padding-left: 0.8rem;
  }
.page .group-heading {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-strong);
    margin: 2.4rem 0 0.9rem;
  }
.page .group-heading:first-child { margin-top: 0; }
.page .dossier summary .stitle .badge {
    display: inline-block;
    margin-top: 0.4rem;
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-strong);
    border: 1px solid var(--accent);
    border-radius: 2px;
    padding: 0.1rem 0.4rem;
  }
  /* ---------- pillars ---------- */.page .pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
  }
.page .pillar { background: var(--paper-raised); padding: 1.5rem 1.4rem; }
.page .pillar .pnum {
    font-family: Palatino, "Palatino Linotype", Georgia, serif;
    font-size: 1.4rem;
    color: var(--accent-strong);
    margin-bottom: 0.5rem;
  }
.page .pillar h3 { font-size: 1.08rem; font-weight: 600; margin-bottom: 0.6rem; }
.page .pillar p { font-size: 0.97rem; line-height: 1.55; color: var(--ink-soft); margin-bottom: 0.7rem; }
.page .pillar ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.page .pillar li { font-size: 0.94rem; color: var(--ink-soft); padding-left: 0.9rem; position: relative; }
.page .pillar li::before { content: "\2013"; position: absolute; left: 0; color: var(--accent-strong); }
  /* ---------- bio close ---------- */.page .bio {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
.page .bio p { font-size: 1.05rem; line-height: 1.6; color: var(--ink); }
.page .bio .signature {
    font-size: 1rem;
    color: var(--ink-soft);
    line-height: 1.7;
  }
.page .bio .signature strong { color: var(--ink); font-size: 1.05rem; }
.page .bio .signature a { color: var(--accent-strong); text-decoration: none; border-bottom: 1px solid var(--line); }
.page .bio .signature a:hover { border-bottom-color: var(--accent-strong); }
