/* Chiaro: stile di tutte le pagine pubbliche (home, termini, privacy, rimborsi, agenzie).
   Sorgente unico: la home è generata da proxy/landing/build.mjs, le altre da LegalPages::page(). */
:root {
  --paper: #eef1f4;
  --surface: #e1e7ee;
  --ink: #0f2238;
  --muted: #43546a;
  --blue: #366898;
  --blue-dark: #2a5479;
  --blue-ink: #ffffff;
  --light: #c9dcee;
  --light-dark: #b3cde6;
  --deep: #0f2238;
  --deep-dark: #08172a;
  --deep-ink: #eef1f4;
  --deep-muted: #a9b8ca;
  --bar: #3a7dbf;
  --bar-2: #a6c6e6;

  --font: "General Sans", system-ui, sans-serif;
  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.25rem, 1.3rem + 3.6vw, 4.5rem);
  --step-display: clamp(3.5rem, 7.9vw, 9.25rem);

  --margin: clamp(1.25rem, 2.2vw, 2rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(6rem, 13vw, 13rem);
  --radius: 0px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: var(--step-body); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure, ul, ol, dl, dd, pre { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 2rem; }
::selection { background: var(--blue); color: var(--blue-ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
h1, h2, h3 { font-weight: 700; text-wrap: balance; letter-spacing: -0.02em; }
p { max-width: 62ch; text-wrap: pretty; }
.nums, td.n, .price, .stat b { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { padding-inline: var(--margin); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.grid > * { grid-column: 1 / -1; }
.head { font-size: var(--step-head); line-height: 0.98; letter-spacing: -0.03em; }
.lead { font-size: var(--step-lead); line-height: 1.35; }
.small { font-size: var(--step-small); line-height: 1.45; }
@media (min-width: 64em) {
  .side-col { grid-column: 1 / 6; align-self: start; position: sticky; top: 2.5rem; }
  .main-col { grid-column: 6 / -1; margin-top: 0; }
  .axis { grid-column: 6 / -1; }
  .side { grid-column: 1 / 5; }
}

.button { display: inline-flex; align-items: center; min-height: 3.25rem; padding: 0 1.5rem; background: var(--blue); color: var(--blue-ink); font-weight: 500; text-decoration: none; border-radius: var(--radius); transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.button:active { transform: scale(0.97); }
.link { text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; text-decoration-color: transparent; transition: text-decoration-color var(--t-hover) ease; }
.link:focus-visible { text-decoration-color: currentColor; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--blue-dark); }
  .link:hover { text-decoration-color: currentColor; }
  .chooser button:hover,   .chooser button[aria-pressed="true"]:hover, .control button[aria-pressed="true"]:hover { background: var(--ink); }
      }

/* ---------- hero ---------- */
.hero { padding-top: var(--margin); row-gap: 2rem; }
.hero-side { display: flex; flex-direction: column; gap: 1.75rem; }
.hero-side .logo { width: 168px; }
.hero-side .lead { max-width: 24ch; }
.hero-side .button { align-self: flex-start; }
.hero-side .video-link { align-self: flex-start; margin-top: -0.75rem; font-weight: 500; text-decoration-color: currentColor; }
.video-card { display: block; max-width: 34rem; text-decoration: none; }
.video-frame { position: relative; display: block; }
.video-frame img { display: block; width: 100%; height: auto; }
.play { position: absolute; left: 50%; top: 50%; width: 4.5rem; height: 4.5rem; margin: -2.25rem 0 0 -2.25rem; border-radius: 50%; background: var(--blue); transition: transform var(--t-press) var(--ease-out); }
.play::after { content: ""; position: absolute; left: 1.85rem; top: 1.45rem; border-style: solid; border-width: 0.8rem 0 0.8rem 1.3rem; border-color: transparent transparent transparent var(--blue-ink); }
.video-card:active .play { transform: scale(0.94); }
.video-cap { display: block; margin-top: 0.6rem; font-size: var(--step-small); color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .video-card:hover .play { background: var(--blue-dark); }
}
.top-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-size: var(--step-small); font-weight: 500; }
.top-nav a { padding-block: 0.4rem; }
.hero h1 { font-size: var(--step-display); line-height: 0.86; letter-spacing: -0.045em; margin-top: 1.5rem; }
.lines .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.lines [data-line] { display: block; }
.hero-fig { margin-top: 2.5rem; }
.fifty { position: relative; z-index: 1; width: min(260px, 70%); background: var(--blue); color: var(--blue-ink); padding: 1.1rem 1.25rem 1.25rem; margin-bottom: -3.2rem; }
.hero-fig [data-ui].answer { padding-top: 4.5rem; }
.fifty b { display: block; font-size: var(--step-head); line-height: 0.9; letter-spacing: -0.03em; }
.fifty span { display: block; margin-top: 0.4rem; font-size: var(--step-small); }
@media (min-width: 64em) {
  .hero { min-height: 100svh; align-content: start; }
  .hero-side { grid-column: 1 / 6; grid-row: 1; padding-top: 0; position: sticky; top: var(--margin); align-self: start; }
  .hero-side .lead { margin-top: 22svh; }
  .hero-main { grid-column: 6 / -1; grid-row: 1; }
  .hero h1 { margin-top: 12svh; }
  .hero-fig { margin-top: 8svh; }
}
@media (max-width: 63.99em) {
  .hero { display: flex; flex-direction: column; row-gap: 1.25rem; }
  .hero-side { display: contents; }
  .hero-side .logo { order: -2; }
  .top-nav { order: -1; }
  .hero h1 { order: 0; }
  .hero-side .lead { order: 1; }
  .hero-side .button { order: 2; }
  .hero-side .video-link { order: 2; margin-top: 0; }
  .hero-fig { order: 3; }
  .hero-main { display: contents; }
  .hero h1 { margin-top: 0.5rem; font-size: min(12.5vw, 6rem); }
  .hero-fig { margin-inline: calc(var(--margin) * -1); }
  .fifty { margin-left: var(--margin); width: 60%; }
  .hero-fig [data-ui].answer { padding-top: 4.25rem; border-radius: 0; border-inline: 0; }
  .hero-fig .fig-cap { padding-inline: var(--margin); }
}

/* ---------- figure: answer + caption with the query ---------- */
.fig-cap { margin-top: 0.75rem; }
.fig-cap p { font-size: var(--step-small); color: var(--muted); margin-bottom: 0.4rem; }
.sql { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; /* taste-skill-ignore: only real SQL code */ font-size: 0.875rem; line-height: 1.55; background: var(--surface); color: var(--ink); padding: 1rem 1.15rem; overflow-x: auto; white-space: pre; tab-size: 2; }
.on-blue .sql { background: var(--blue-dark); color: var(--blue-ink); }

[data-ui].answer { background: #fff; border: 1px solid #dde2ea; border-radius: 8px; padding: 1.5rem 1.4rem 1.25rem; color: #1b2230; font-size: 0.9375rem; line-height: 1.4; }
[data-ui] .q-bubble { display: block; width: fit-content; max-width: 90%; margin: 0 0 1rem auto; background: #1d2327; color: #fff; padding: 0.55rem 0.9rem; border-radius: 14px 14px 2px 14px; font-size: 0.9375rem; }
[data-ui] .answer-sum { color: #50575e; margin-bottom: 1rem; max-width: none; }
[data-ui] .legend { display: flex; gap: 1rem; align-items: center; color: #50575e; font-size: 0.875rem; margin-bottom: 0.75rem; }
[data-ui] .key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 0.35rem; vertical-align: -1px; }
[data-ui] .key.s0, [data-ui] .bar.s0 { background: var(--bar); }
[data-ui] .key.s1, [data-ui] .bar.s1 { background: var(--bar-2); }
[data-ui] .bars li { display: grid; grid-template-columns: minmax(7rem, 34%) 1fr; gap: 0.75rem; align-items: center; padding: 0.3rem 0; }
[data-ui] .bar-k { color: #1b2230; }
[data-ui] .bar-vs { display: grid; gap: 4px; }
[data-ui] .bar-line { display: flex; align-items: center; gap: 0.5rem; }
[data-ui] .bar { display: block; height: 11px; width: var(--w); border-radius: 0 2px 2px 0; transform-origin: left; }
[data-ui] .bar-v { color: #50575e; font-size: 0.8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-ui] .columns { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; align-items: end; height: 200px; padding-top: 0.5rem; }
[data-ui] .columns li { display: grid; grid-template-rows: 1fr auto; height: 100%; align-items: end; text-align: center; }
[data-ui] .col { display: block; height: var(--h); background: var(--bar); border-radius: 2px 2px 0 0; transform-origin: bottom; }
[data-ui] .col-k { font-size: 0.75rem; color: #50575e; padding-top: 4px; }
[data-ui] table { width: 100%; border-collapse: collapse; margin-top: 1.25rem; border: 1px solid #c3c4c7; font-size: 0.875rem; }
[data-ui] th, [data-ui] td { text-align: left; padding: 0.55rem 0.7rem; }
[data-ui] th { font-weight: 400; color: #1b2230; border-bottom: 1px solid #c3c4c7; }
[data-ui] tbody tr:nth-child(odd) { background: #f6f7f7; }
[data-ui] .n { text-align: right; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  .js [data-ui] .bar { transition: transform 900ms var(--ease-out); }
  .js [data-ui] .col { transition: transform 900ms var(--ease-out); }
  .js .is-pending [data-ui] .bar, .js [data-ui].is-pending .bar { transform: scaleX(0); }
  .js .is-pending [data-ui] .col, .js [data-ui].is-pending .col { transform: scaleY(0); }
}

/* ---------- prova (showcase, live) ---------- */
.prova { padding-block: var(--section); }
.prova h2 { margin-bottom: 1.25rem; }
.side-text { margin-bottom: 2rem; max-width: 34ch; }
.chooser { display: none; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.js .chooser { display: flex; }
.chooser button { min-height: 2.9rem; padding: 0 1.1rem; background: var(--surface); font-weight: 500; border-radius: 999px; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.chooser button:active { transform: scale(0.97); }
.chooser button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.state + .state { margin-top: 2.75rem; }
.state-name { font-size: var(--step-small); font-weight: 500; color: var(--muted); margin-bottom: 0.6rem; }
[data-ui].ask { display: flex; gap: 0.6rem; background: #fff; border: 1px solid #8c8f94; border-radius: 4px; padding: 0.85rem 1rem; color: #1b2230; font-size: 1.0625rem; min-height: 3.5rem; align-items: center; }
[data-ui].ask .caret { width: 2px; height: 1.2em; background: #1b2230; }
@media (prefers-reduced-motion: no-preference) { .js [data-ui].ask .caret { animation: blink 1s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0; } }
.prova-note { grid-row: 5; } }
.prova-note { color: var(--muted); font-size: var(--step-small); max-width: 40ch; }
.main-col { margin-top: 3rem; min-width: 0; }

/* ---------- dati (colour page) ---------- */
.dati { background: var(--blue); color: var(--blue-ink); padding-block: var(--section); row-gap: 2.5rem; }
.dati .statement { font-size: var(--step-lead); max-width: 30ch; margin-top: 1.5rem; }
.dati-split { display: grid; gap: 2.5rem var(--gutter); }
.dati-split > div { min-width: 0; }
.dati-split h3 { font-size: var(--step-lead); margin-bottom: 1rem; }
.stays li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 1rem; font-size: var(--step-head); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; }
.stays li span { font-size: var(--step-small); font-weight: 400; letter-spacing: 0; color: #e3ecf5; }
.dati-split { gap: 3.5rem; }

/* ---------- funzioni (pinned output, live controls) ---------- */
.funzioni { padding-bottom: calc(var(--section) / 2); }
.out-field { background: var(--light); display: grid; place-items: center; padding: 2rem var(--margin); }
.out { width: min(440px, 100%); }
.out > [data-ui] { display: none; }
.out > [data-ui].on { display: block; }
.funzioni-h { padding-top: 4.5rem; }
.block { padding-block: 3rem; }
.block h3 { font-size: var(--step-lead); line-height: 1.2; margin-bottom: 0.75rem; }
.control { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.control button, .toggle { min-height: 2.9rem; padding: 0 1.1rem; background: var(--surface); font-weight: 500; border-radius: 999px; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.control button:hover, .toggle:hover { background: var(--light); }
.control button:active, .toggle:active { transform: scale(0.97); }
.control button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.toggle { display: inline-flex; align-items: center; gap: 0.7rem; cursor: pointer; }
.toggle input { width: 1.15rem; height: 1.15rem; accent-color: var(--blue); }
@media (min-width: 64em) {
  .funzioni { align-items: start; }
  .funzioni-h { grid-column: 8 / -1; grid-row: 1; }
  .out-col { grid-column: 1 / 7; grid-row: 1 / span 2; margin-left: calc(var(--margin) * -1); position: sticky; top: 0; height: 100svh; }
  .out-field { height: 100%; }
  .blocks { grid-column: 8 / -1; grid-row: 2; }
  .block { min-height: 50svh; padding-block: 4rem; }
  .block:last-child { min-height: 55svh; }
}
@media (max-width: 63.99em) {
  .out-col { position: sticky; top: 0; z-index: 2; margin-inline: calc(var(--margin) * -1); }
  .out-field { height: 46svh; overflow: hidden; align-items: start; padding-top: 1.25rem; }
  .funzioni-h { padding-block: 4rem 1.5rem; }
  .funzioni { padding-top: 0; }
}
[data-ui].panel { background: #fff; border: 1px solid #dde2ea; border-radius: 8px; padding: 1.1rem 1.1rem 1rem; color: #1b2230; font-size: 0.875rem; line-height: 1.4; }
[data-ui] .p-title { font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.8rem; }
[data-ui] .p-note { color: #50575e; font-size: 0.8125rem; margin-top: 0.8rem; }
[data-ui] .kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
[data-ui] .kpi { border: 1px solid #dde2ea; border-radius: 6px; padding: 0.6rem 0.7rem; }
[data-ui] .kpi small { display: block; color: #50575e; font-size: 0.75rem; }
[data-ui] .kpi b { display: block; font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
[data-ui] .kpi i { font-style: normal; font-size: 0.75rem; color: #1a7a2e; }
[data-ui] .kpi i.down { color: #b32d2e; }
[data-ui] .alert { display: grid; grid-template-columns: 8px 1fr; gap: 0.7rem; padding: 0.6rem 0; }
[data-ui] .alert + .alert { border-top: 1px solid #f0f0f1; }
[data-ui] .alert::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #d63638; margin-top: 0.4rem; }
[data-ui] .alert.warn::before { background: #dba617; }
[data-ui] .mailmeta { color: #50575e; font-size: 0.8125rem; border-bottom: 1px solid #f0f0f1; padding-bottom: 0.6rem; margin-bottom: 0.8rem; }
[data-ui] .mail-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.25rem 0; font-variant-numeric: tabular-nums; }
[data-ui] .mail h4 { font-size: 0.8125rem; margin: 0.9rem 0 0.3rem; color: #50575e; font-weight: 600; }
[data-ui] .mail ol { margin: 0; padding-left: 1.2rem; }
[data-ui] .chips { display: flex; gap: 6px; margin-top: 0.8rem; flex-wrap: wrap; }
[data-ui] .chips span { background: #f0f0f1; border-radius: 999px; padding: 0.25rem 0.7rem; font-size: 0.8125rem; }
[data-ui] .hidden { display: none; }

/* ---------- come (call and response) ---------- */
.come { padding-block: var(--section); background: var(--surface); }
.come .side-text { margin-top: 1.25rem; }
.ex { max-width: none; }
.ex + .ex { margin-top: 5.5rem; }
.ex-say { font-size: var(--step-body); font-weight: 500; margin-bottom: 1rem; }
.call { background: var(--paper); padding: 1.25rem; }
.call-label { font-size: var(--step-small); color: var(--muted); margin-bottom: 0.5rem; }
.resp { margin-top: 1rem; margin-left: 3.5rem; }
[data-ui].field { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; background: #fff; border: 1px solid #8c8f94; border-radius: 4px; padding: 0.7rem 0.9rem; color: #1b2230; }
[data-ui].field .btn { background: #2271b1; color: #fff; border-radius: 3px; padding: 0.35rem 0.8rem; font-size: 0.875rem; }
[data-ui].card { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; background: #fff; border: 1px solid #dcdcde; padding: 1rem; color: #1b2230; font-size: 0.875rem; }
[data-ui].card svg { width: 64px; height: 64px; }
[data-ui].card strong { display: block; font-size: 1rem; color: #2271b1; }
[data-ui].card .btn { display: inline-block; margin-top: 0.6rem; border: 1px solid #2271b1; color: #2271b1; border-radius: 3px; padding: 0.3rem 0.8rem; }
[data-ui].notice { background: #fff; border-left: 4px solid #00a32a; padding: 0.8rem 1rem; color: #1b2230; }
.shot img { width: 100%; }
.shot figcaption { font-size: var(--step-small); color: var(--muted); margin-top: 0.6rem; }
.ex-final { max-width: none; }
@media (max-width: 47.99em) { .resp { margin-left: 0; margin-top: 1.5rem; } }

/* ---------- prezzi (stepped tiles) ---------- */
.prezzi { padding-block: var(--section); row-gap: 8px; align-items: end; }
.prezzi h2 { align-self: start; }
.tile { display: flex; flex-direction: column; text-decoration: none; transition: transform var(--t-press) var(--ease-out); }
.tile:active { transform: scale(0.99); }
.tile-body { flex: 1; padding: 1.75rem; }
.tile h3 { font-size: var(--step-lead); line-height: 1.1; }
.price { display: block; font-size: var(--step-head); font-weight: 700; letter-spacing: -0.03em; line-height: 1; margin: 0.6rem 0 1.25rem; }
.tile ul { display: grid; gap: 0.3rem; }
.tile-btn { display: flex; align-items: center; height: 4rem; padding: 0 1.75rem; font-weight: 500; transition: background-color var(--t-hover) ease; }
.t1 { background: var(--light); color: var(--ink); }
.t1 .tile-btn { background: var(--light-dark); }
.t2 { background: var(--blue); color: var(--blue-ink); }
.t2 .tile-btn { background: var(--blue-dark); }
.t3 { background: var(--deep); color: var(--deep-ink); }
.t3 .tile-btn { background: var(--deep-dark); }
.tile:hover .tile-btn { text-decoration: underline; text-underline-offset: 0.2em; }
.price-notes { margin-top: 2.5rem; display: grid; gap: 1rem var(--gutter); }
.price-notes p { max-width: 46ch; }
@media (min-width: 64em) {
  .prezzi h2 { grid-column: 1 / 9; grid-row: 1; margin-bottom: 2rem; }
  .t1 { grid-column: 1 / 5; grid-row: 2; height: 360px; }
  .t2 { grid-column: 5 / 9; grid-row: 2; height: 480px; }
  .t3 { grid-column: 9 / -1; grid-row: 1 / 3; height: 600px; }
  .price-notes { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 63.99em) { .prezzi { row-gap: 2.5rem; } .prezzi h2 { margin-bottom: 0; } .t2 { min-height: 26rem; } .t3 { min-height: 32rem; } }

/* ---------- domande (bands) ---------- */
.faq-head { background: var(--blue); color: var(--blue-ink); min-height: 40svh; display: flex; align-items: flex-end; padding-block: 2.5rem; }
.faq-head h2 { font-size: var(--step-head); }
.band { padding-block: 3.5rem; row-gap: 1rem; }
.band:nth-child(even) { background: var(--surface); }
.band h3 { font-size: var(--step-lead); line-height: 1.2; }
.band p { line-height: 1.5; }
@media (min-width: 64em) {
  .band h3 { grid-column: 1 / 6; }
  .band div { grid-column: 7 / -1; }
}
@media (max-width: 63.99em) { .band { padding-block: 2rem; } .faq-head { min-height: 30svh; } }

/* ---------- chiusura ---------- */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); }
.strip figure { overflow: hidden; height: 40svh; background: var(--surface); }
.strip img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
@media (prefers-reduced-motion: no-preference) {
  .strip img { animation: drift 22s ease-in-out infinite alternate; }
  .strip figure:nth-child(2) img { animation-delay: -7s; }
  .strip figure:nth-child(3) img { animation-delay: -14s; }
}
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.08) translate(-1.5%, -1%); } }
@media (max-width: 47.99em) {
  .strip { grid-template-columns: 1fr 1fr; }
  .strip figure { height: auto; aspect-ratio: 4 / 3; }
  .strip figure:first-child { grid-column: 1 / -1; }
}
.close { background: var(--deep); color: var(--deep-ink); min-height: 44svh; padding-block: 3.5rem; align-content: center; }
.close .statement { font-size: var(--step-lead); line-height: 1.3; max-width: 30ch; }
.close .statement a { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; text-decoration-color: var(--bar-2); transition: color var(--t-hover) ease; }
.close .statement a:hover { color: var(--bar-2); }
.close .small { margin-top: 2rem; color: var(--deep-muted); }
@media (min-width: 64em) { .close > div { grid-column: 1 / 8; } }

/* ---------- footer ---------- */
main { position: relative; z-index: 1; background: var(--paper); }
.foot { position: sticky; bottom: 0; z-index: 0; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; background: var(--blue); color: var(--blue-ink); padding-block: 2.5rem 1.25rem; }
.foot-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem var(--gutter); font-size: var(--step-small); }
.foot-cols li:first-child { font-weight: 600; }
.foot-cols li:not(:first-child) { color: #e3ecf5; }
.foot-cols a { text-decoration: none; }
.foot-cols a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.wordmark { width: 100%; height: auto; fill: currentColor; margin-top: 2rem; }
.legal { font-size: var(--step-small); color: #e3ecf5; margin-top: 1.25rem; }
@media (min-width: 64em) { .foot-cols { grid-template-columns: repeat(4, 1fr); } }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .lines [data-line] { transform: translateY(105%); animation: line-up 900ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 110ms + 150ms); }
  .js [data-rise] { opacity: 0; transform: translateY(18px); animation: rise 800ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 420ms); }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 75ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .out > [data-ui].on, #q-answer > [data-ui], #q-sql > pre { transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out), filter 260ms var(--ease-out); }
  @starting-style {
    .out > [data-ui].on, #q-answer > [data-ui], #q-sql > pre { opacity: 0; transform: translateY(8px); filter: blur(2px); }
  }
}
@keyframes line-up { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- pagine di testo (termini, privacy, rimborsi, agenzie) ---------- */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding-block: var(--margin); }
.topbar-logo img { width: 150px; }
.topbar .top-nav { flex: 1; }
.doc { padding-block: clamp(2.5rem, 6vw, 5rem) var(--section); row-gap: 2.5rem; }
.doc-title { font-size: clamp(2.25rem, 1.4rem + 2.6vw, 3.5rem); line-height: 1; letter-spacing: -0.03em; }
.updated { margin-top: 1.25rem; color: var(--muted); font-size: var(--step-small); max-width: 36ch; }
.doc-nav { display: grid; gap: 0.35rem; margin-top: 2rem; font-weight: 500; }
.doc-nav [aria-current] { color: var(--blue); }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { font-size: var(--step-lead); line-height: 1.2; margin-top: 2.75rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--step-body); margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.4rem; }
.prose a { text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; }
.prose code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; /* taste-skill-ignore: literal code */ font-size: 0.9em; background: var(--surface); padding: 0.1em 0.35em; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--step-small); font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid #c9d3de; vertical-align: top; }
.prose th { font-weight: 600; }
.prose tbody tr:nth-child(odd) { background: var(--surface); }
@media (max-width: 47.99em) {
  .topbar .top-nav { order: 3; flex-basis: 100%; }
  .topbar .button { margin-left: auto; }
  .prose table { display: block; overflow-x: auto; }
}
.strip-4 { grid-template-columns: repeat(4, 1fr); }
.strip-4 figure { height: 30svh; }
.strip-4 figure:nth-child(4) img { animation-delay: -18s; }
@media (max-width: 47.99em) { .strip-4 { grid-template-columns: 1fr 1fr; } .strip-4 figure:first-child { grid-column: auto; } }
@media (prefers-reduced-motion: no-preference) {
  .js .prose > :nth-child(-n+6) { opacity: 0; transform: translateY(18px); animation: rise 800ms var(--ease-out) forwards; animation-delay: calc(var(--n, 0) * 70ms + 300ms); }
  .prose > :nth-child(2) { --n: 1; } .prose > :nth-child(3) { --n: 2; } .prose > :nth-child(4) { --n: 3; } .prose > :nth-child(5) { --n: 4; } .prose > :nth-child(6) { --n: 5; }
}
.sends { display: grid; gap: 1.1rem; }
.sends dt { font-weight: 600; font-size: var(--step-body); }
.sends dd { margin: 0.2rem 0 0; color: #e3ecf5; max-width: 46ch; }
