@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-var-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #15212b;
  --ink-2: #3b4b56;
  --plain: #e3ead3;
  --plain-2: #d5dfc0;
  --paper: #fbfcf7;
  --blue: #1f4e8c;
  --water: #245f8c;
  --magenta: #a3157a;
  --magenta-ink: #7d0f5d;
  --ok: #2d6a3e;
  --err: #b0261b;
  --rule: 1.5px solid var(--ink);
  --hair: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
  --gut: clamp(16px, 3vw, 40px);
  --label: 600 0.72rem/1.2 "Archivo", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--plain);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--magenta); color: #fff; }
a { color: var(--blue); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--magenta); }
:focus-visible { outline: 2.5px solid var(--magenta); outline-offset: 3px; }
img, svg, canvas { display: block; max-width: 100%; }
html { scrollbar-color: var(--ink-2) var(--plain-2); }

.label {
  font: var(--label);
  font-stretch: 72%;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- bordo carta / navigazione ---------- */
.edge {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: stretch;
  background: var(--paper);
  border-bottom: var(--rule);
  min-height: 56px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 0 var(--gut);
  border-right: var(--rule);
  text-decoration: none; color: var(--ink);
}
.brand b {
  font-weight: 850; font-stretch: 118%; font-size: 1.35rem; letter-spacing: -0.01em;
}
.brand span { font: 600 0.8rem/1.15 "Archivo", sans-serif; font-stretch: 80%; color: var(--ink-2); max-width: 22ch; }
.edge nav { display: flex; flex: 1; }
.edge nav a {
  display: flex; align-items: center; padding: 0 18px;
  font-weight: 600; font-stretch: 85%; font-size: 0.95rem;
  color: var(--ink); text-decoration: none;
  border-right: var(--hair);
}
.edge nav a:hover { background: var(--plain); color: var(--ink); }
.edge .cta {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  padding: 0 24px; background: var(--magenta); color: #fff;
  font-weight: 700; font-stretch: 90%; text-decoration: none; border-left: var(--rule);
}
.edge .cta:hover { background: var(--magenta-ink); color: #fff; }
.menu-btn { display: none; }

/* ---------- carta ---------- */
.hero { position: relative; height: calc((100svh - 56px) / 2); min-height: 420px; max-height: 560px; overflow: hidden; border-bottom: var(--rule); }
.map { position: absolute; inset: 0; }
.map img, .map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map img { object-fit: cover; object-position: 50% 50%; }
.map svg { overflow: visible; }

.m-grat path { stroke: var(--blue); stroke-width: 1.4; opacity: 0.32; fill: none; }
.m-coast path { stroke: var(--water); stroke-width: 2; fill: none; }
.m-lakes path { fill: #b9d6e4; stroke: var(--water); stroke-width: 2; }
.m-rivers path { stroke: #4f8db6; stroke-width: 2.2; fill: none; opacity: 0.85; }
.m-border path { stroke: var(--ink); stroke-width: 3; stroke-dasharray: 16 6 3 6; fill: none; opacity: 0.8; }
.m-rings path { stroke: var(--magenta); stroke-width: 2.6; stroke-dasharray: 14 9; fill: none; }
.m-ringlabels text { fill: var(--magenta); font: 700 26px "Archivo"; font-stretch: 75%; paint-order: stroke; stroke: var(--plain); stroke-width: 6px; }
.m-regions text { fill: var(--ink); font: 700 40px "Archivo"; font-stretch: 125%; letter-spacing: 0.32em; opacity: 0.55; text-anchor: middle; }
.m-water text { fill: var(--water); font: italic 500 27px "Archivo"; font-stretch: 85%; text-anchor: middle; paint-order: stroke; stroke: #c9dfe9; stroke-width: 5px; }
.m-cities circle { fill: var(--paper); stroke: var(--ink); stroke-width: 3; }
.m-cities text { fill: var(--ink); font: 600 26px "Archivo"; font-stretch: 85%; paint-order: stroke; stroke: rgba(251, 252, 247, 0.85); stroke-width: 6px; }
.m-base .sym { fill: none; stroke: var(--magenta); stroke-width: 5; }
.m-base .dot { fill: var(--magenta); }
.m-base text { fill: var(--magenta-ink); font: 800 34px "Archivo"; font-stretch: 100%; paint-order: stroke; stroke: var(--paper); stroke-width: 8px; }
.m-base .coord { font: 700 28px "Archivo"; font-stretch: 75%; letter-spacing: 0.04em; }
.m-zone path { fill: var(--magenta); fill-opacity: 0.05; }

@media (prefers-reduced-motion: no-preference) {
  .js .m-rings path { stroke-dashoffset: 0; animation: ring 1.6s cubic-bezier(0.16, 1, 0.3, 1) both; transform-box: fill-box; transform-origin: center; }
  .js .m-rings path:nth-child(2) { animation-delay: 0.12s; }
  .js .m-rings path:nth-child(3) { animation-delay: 0.24s; }
  .js .m-rings path:nth-child(4) { animation-delay: 0.36s; }
  @keyframes ring { from { transform: scale(0.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
}

/* tacche del reticolo sul bordo */
.ticks { position: absolute; pointer-events: none; font: var(--label); font-stretch: 72%; color: var(--blue); }
.ticks.top { top: 0; left: 0; right: 0; height: 22px; background: color-mix(in srgb, var(--paper) 78%, transparent); border-bottom: 1px solid var(--blue); }
.ticks.left { top: 22px; left: 0; bottom: 0; width: 22px; background: color-mix(in srgb, var(--paper) 78%, transparent); border-right: 1px solid var(--blue); }
.ticks span { position: absolute; white-space: nowrap; }
.ticks.top span { top: 5px; transform: translateX(-50%); }
.ticks.top span::after { content: ""; position: absolute; left: 50%; top: 14px; height: 4px; border-left: 1px solid var(--blue); }
.ticks.left span { left: 3px; transform: translateY(-50%) rotate(-90deg); transform-origin: 8px 50%; }

/* legenda */
.legend {
  position: absolute; top: 46px; right: var(--gut);
  width: 236px; background: var(--paper); border: var(--rule);
  font-size: 0.82rem; line-height: 1.3;
}
.legend h2 { margin: 0; padding: 7px 12px; border-bottom: var(--rule); }
.legend ul { list-style: none; margin: 0; padding: 8px 12px 10px; display: grid; gap: 7px; }
.legend li { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 8px; }
.legend svg { width: 30px; height: 16px; }
.legend .tints { display: flex; height: 10px; border: 1px solid var(--ink); }
.legend .tints i { flex: 1; }
.legend .scale-row { display: none; }
.legend .scale-row div:last-child { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 0.7rem; margin-top: 3px; }

/* riquadro titolo */
.titleblock {
  position: absolute; left: calc(var(--gut) + 22px); bottom: var(--gut);
  width: min(560px, calc(100% - 2 * var(--gut)));
  background: var(--paper); border: var(--rule);
  box-shadow: 0 18px 40px -18px rgba(21, 33, 43, 0.45);
}
.titleblock h1 {
  margin: 0; padding: 18px 22px 16px;
  font-size: clamp(1.8rem, 1.1rem + 1.7vw, 2.55rem);
  line-height: 0.98; font-weight: 820; font-stretch: 112%; letter-spacing: -0.025em;
  text-wrap: balance;
}
.titleblock h1 em { font-style: normal; color: var(--magenta); }
.facts { display: grid; grid-template-columns: 1.3fr 1fr 1fr; border-top: var(--rule); border-bottom: var(--rule); }
.facts div { padding: 9px 12px 10px; border-right: var(--hair); }
.facts div:last-child { border-right: 0; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 3px 0 0; font-weight: 650; font-stretch: 88%; font-size: 0.9rem; line-height: 1.2; }

.plan { padding: 14px 24px 20px; }
.plan legend, .plan > .label { display: block; margin-bottom: 10px; color: var(--magenta-ink); }
.plan .row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 10px; }
.plan .row + .row { margin-top: 10px; }
.plan .row.send { grid-template-columns: 1fr auto; }

/* campi */
.field { display: grid; gap: 4px; min-width: 0; }
.field > span { font: var(--label); font-stretch: 72%; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  width: 100%; min-height: 44px; padding: 9px 11px;
  background: #fff; border: 1.5px solid var(--ink); border-radius: 0;
  caret-color: var(--magenta);
}
textarea { min-height: 120px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input::placeholder, textarea::placeholder { color: #66737c; }
input:hover, select:hover, textarea:hover { border-color: var(--blue); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 0 2px var(--magenta); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--err); }
.field .err { color: var(--err); font-size: 0.8rem; font-weight: 600; min-height: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 22px;
  font: inherit; font-weight: 750; font-stretch: 92%; font-size: 1rem;
  color: #fff; background: var(--magenta); border: 1.5px solid var(--magenta-ink); cursor: pointer;
  text-decoration: none; transition: background 0.2s;
}
.btn:hover { background: var(--magenta-ink); color: #fff; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn svg { width: 18px; height: 18px; }

/* campo trappola per i bot: fuori schermo, mai visibile */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sent { padding: 18px 24px 22px; display: grid; gap: 6px; }
.sent strong { font-size: 1.15rem; font-stretch: 105%; }
.sent p { margin: 0; color: var(--ink-2); }

/* intestazione servizi con foto */
.sheet > header.tb.tb-photo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.tb-photo .tb-main { padding: 28px 30px 26px; border-right: var(--rule); display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.sheet > header.tb.tb-photo h2 { padding: 0; border-right: 0; }
.sheet > header.tb.tb-photo p { padding: 0; align-self: auto; }
.tb-photo figure { position: relative; margin: 0; min-height: 280px; overflow: hidden; }
.tb-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 78%; }
.tb-photo figcaption { position: absolute; left: 10px; bottom: 10px; padding: 2px 8px; background: rgba(251, 252, 247, 0.92); border: 1px solid var(--ink); font-size: 0.75rem; font-weight: 600; }

/* fascia del piano di volo, sotto la carta */
.planbar { background: var(--paper); border-bottom: var(--rule); }
.wrapbar { max-width: 1440px; margin: 0 auto; padding: 16px var(--gut) 18px; display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 12px 14px; align-items: start; }
.wrapbar > .label { align-self: center; margin: 0; padding-right: 12px; border-right: var(--hair); line-height: 1.25; max-width: 11ch; }
.wrapbar .row, .wrapbar .row.send { display: contents; }
.wrapbar .btn { margin-top: 21px !important; align-self: start; }

/* scala grafica */
.scalebar { position: absolute; right: var(--gut); bottom: var(--gut); background: var(--paper); border: var(--rule); padding: 8px 12px 6px; font: var(--label); font-stretch: 72%; }
.scalebar .bar { display: flex; height: 7px; border: 1px solid var(--ink); margin: 4px 0 3px; }
.scalebar .bar i { flex: 1; } .scalebar .bar i:nth-child(odd) { background: var(--ink); }
.scalebar .nums { display: flex; justify-content: space-between; gap: 30px; }
.scalebar small { display: block; color: var(--ink-2); font-weight: 500; text-transform: none; letter-spacing: 0; margin-top: 2px; }

/* ---------- sezioni ---------- */
.sheet { position: relative; padding: clamp(64px, 9vw, 128px) var(--gut); border-bottom: var(--rule); }
/* spazio sopra la sezione servizi, subito dopo la fascia del piano di volo */
.planbar + .sheet { padding-top: 40px; }
/* righello del bordo carta: tacche ogni minuto, tacche lunghe ogni cinque */
.sheet::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px;
  background:
    repeating-linear-gradient(90deg, var(--blue) 0 1px, transparent 1px 60px) top left / 100% 14px no-repeat,
    repeating-linear-gradient(90deg, var(--blue) 0 1px, transparent 1px 12px) top left / 100% 7px no-repeat;
  opacity: 0.55;
}
.sheet > header { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 48px; align-items: end; max-width: 1360px; margin: 0 auto clamp(32px, 4vw, 56px); }
.sheet h2 {
  margin: 0; font-size: clamp(2rem, 1.1rem + 3vw, 4rem); line-height: 1; font-weight: 820; font-stretch: 110%; letter-spacing: -0.028em; text-wrap: balance;
}
.sheet header p { margin: 0; color: var(--ink-2); max-width: 52ch; }
/* foto nell'intestazione di sezione (strumenti) */
.head-photo { margin: 0; align-self: end; border: var(--rule); background: var(--paper); }
.head-photo img { width: 100%; height: auto; aspect-ratio: 860 / 360; object-fit: cover; object-position: 50% 45%; }
.head-photo figcaption { padding: 6px 10px; border-top: var(--hair); font-size: 0.75rem; color: var(--ink-2); }
.head-photo figcaption a { color: inherit; }
/* intestazione a riquadro titolo, come il cartiglio della carta */
.sheet > header.tb { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--paper); border: var(--rule); gap: 0; align-items: stretch; box-shadow: 0 14px 30px -20px rgba(21, 33, 43, 0.4); }
.sheet > header.tb h2 { padding: 26px 28px 24px; border-right: var(--rule); }
.sheet > header.tb p { padding: 26px 28px; align-self: center; }
/* il rilievo torna come fondo della sezione metodo */
.sheet.relief { background: linear-gradient(rgba(227, 234, 211, 0.8), rgba(227, 234, 211, 0.86)), url("../carta/assets/rilievo-1400.webp") 38% 30% / cover; }
.inner { max-width: 1360px; margin: 0 auto; }

/* carta di rotta (servizi) */
.route { border: var(--rule); background: var(--paper); }
.route-head, .leg { display: grid; grid-template-columns: minmax(200px, 0.9fr) minmax(0, 1.3fr) minmax(0, 1.1fr); }
/* colonna "Vedi un esempio" nascosta per ora: togliere hidden dai .go e rimettere 180px qui sopra */
.leg .go[hidden] { display: none; }
.leg > ul { border-right: 0; }
.route-head > * { padding: 8px 16px; border-right: var(--hair); color: var(--ink-2); }
.route-head > *:last-child { border-right: 0; }
.route-head { border-bottom: var(--rule); background: var(--plain); }
.leg { border-bottom: var(--hair); position: relative; }
.leg:last-child { border-bottom: 0; }
.leg > * { padding: 22px 16px; border-right: var(--hair); }
.leg > *:last-child { border-right: 0; }
/* cella foto: segnaposto finché non arriva la foto del servizio */
.leg .thumb { position: relative; padding: 0; min-height: 170px; display: grid; place-items: center; align-content: center; gap: 10px; background: var(--plain); color: var(--ink-2); font-size: 0.8rem; font-weight: 600; }
.leg .thumb::after { content: ""; position: absolute; inset: 12px; border: 1px dashed color-mix(in srgb, var(--ink) 35%, transparent); pointer-events: none; }
.leg .thumb svg { width: 34px; height: 34px; opacity: 0.75; }
.leg .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.leg h3 { margin: 0 0 6px; font-size: 1.45rem; line-height: 1.08; font-weight: 780; font-stretch: 100%; letter-spacing: -0.012em; }
.leg p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }
.leg ul { margin: 0; padding: 22px 16px; list-style: none; display: grid; align-content: start; gap: 6px; font-size: 0.95rem; }
.leg ul li { padding-left: 16px; position: relative; }
.leg ul li::before { content: ""; position: absolute; left: 0; top: 0.44em; width: 7px; height: 7px; border: 1.5px solid var(--magenta); transform: rotate(45deg); }
.leg .who { font-size: 0.92rem; color: var(--ink-2); }
.leg .go { display: flex; align-items: center; }
.leg .go a { font-weight: 700; font-stretch: 90%; text-decoration: none; color: var(--magenta-ink); display: inline-flex; gap: 8px; align-items: center; }
.leg .go a:hover { text-decoration: underline; }
.leg.tech h3 { font-size: 1.75rem; }

/* tre letture */
.readings { display: grid; grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr); gap: 0; border: var(--rule); background: var(--paper); }
.figure { position: relative; border-right: var(--rule); background: #0b0712; }
.figure .tabs { position: absolute; top: 14px; left: 14px; z-index: 3; display: flex; background: var(--paper); border: var(--rule); }
.tabs button {
  font: inherit; font-weight: 700; font-stretch: 85%; font-size: 0.95rem;
  min-height: 42px; padding: 0 16px; border: 0; border-right: var(--hair); background: none; color: var(--ink); cursor: pointer;
}
.tabs button:last-child { border-right: 0; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tabs button:hover:not([aria-selected="true"]) { background: var(--plain); }
.stage { position: relative; aspect-ratio: 640 / 512; overflow: hidden; touch-action: none; }
.stage > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage canvas { image-rendering: auto; }
.layer { transition: clip-path 0.9s cubic-bezier(0.16, 1, 0.3, 1); clip-path: inset(0 0 0 0); }
.layer[data-hidden] { clip-path: inset(0 0 0 100%); }
.scan { pointer-events: none; width: 2px !important; left: 0; background: var(--magenta); box-shadow: 0 0 0 1px rgba(255,255,255,0.4); opacity: 0; }
.scan.run { animation: scan 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes scan { from { left: 0; opacity: 1; } 90% { opacity: 1; } to { left: 100%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .layer { transition: none; } .scan.run { animation: none; } }
.crosshair { pointer-events: none; }
/* spot, mirino e scansione restano sempre sopra gli strati, che cambiano z-index quando si passa da una lettura all'altra */
.stage .spots, .stage .crosshair { z-index: 4; pointer-events: none; }
.figure .tabs { z-index: 6; }
/* rilievo: guide, misura trascinata, pannello misure */
.stage { user-select: none; -webkit-user-select: none; }
.crosshair .m-guide { stroke: var(--blue); stroke-width: 0.8; stroke-dasharray: 4 4; opacity: 0.7; }
.crosshair .m-line { stroke: var(--magenta); stroke-width: 2; }
.crosshair .m-end { fill: var(--paper); stroke: var(--magenta); stroke-width: 2; }
.crosshair .m-tag { fill: var(--magenta); }
.crosshair .m-txt { fill: #fff; font: 700 13px "Archivo"; font-stretch: 85%; }
[data-panel="dim"] .readout output small, [data-panel="dim"] .readout output { font-size: 1.9rem; }
[data-panel="dim"] .readout output small { font-size: 0.9rem; color: var(--ink-2); margin-left: 6px; }
.measure { margin: 14px 0 0; border-top: var(--hair); }
.measure div { display: grid; grid-template-columns: 1fr auto; padding: 8px 0; border-bottom: var(--hair); }
.measure dt { color: var(--ink-2); font-size: 0.92rem; }
.measure dd { margin: 0; font-weight: 700; }
/* spot dei difetti visibili: inchiostro scuro su facciata chiara */
.stage .spot.spot-v circle { stroke: var(--ink); stroke-width: 2.2; fill: rgba(251, 252, 247, 0.35); }
.stage .spot.spot-v path { stroke: var(--ink); stroke-width: 2; }
.stage .spot.spot-v text { fill: var(--ink); stroke: var(--paper); stroke-width: 4px; }
[data-panel="vis"] > .label { display: block; color: var(--ink-2); margin-bottom: 4px; }
.stage .scan { z-index: 5; }
.crosshair line { stroke: #fff; stroke-width: 1.5; }
.crosshair rect { fill: rgba(11, 7, 18, 0.82); }
.crosshair text { fill: #fff; font: 700 15px "Archivo"; font-stretch: 85%; }
.spot circle { fill: none; stroke: #fff; stroke-width: 2; }
.spot text { fill: #fff; font: 700 14px "Archivo"; font-stretch: 80%; paint-order: stroke; stroke: rgba(0,0,0,0.6); stroke-width: 3px; }
.demo { position: absolute; left: 14px; bottom: 12px; z-index: 3; padding: 4px 8px; font-size: 0.8rem; font-weight: 600; background: rgba(251, 252, 247, 0.92); border: 1px solid var(--ink); color: var(--ink); }

.notes { display: flex; flex-direction: column; }
.notes > div { padding: 22px 24px; border-bottom: var(--hair); }
.notes > div:last-child { border-bottom: 0; flex: 1; }
.notes h3 { margin: 6px 0 8px; font-size: 1.5rem; line-height: 1.1; font-weight: 780; font-stretch: 104%; }
.notes p { margin: 0; color: var(--ink-2); }
.readout { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 12px; }
.readout output { min-height: 2.6rem; font-size: 2.6rem; font-weight: 800; font-stretch: 92%; line-height: 1; letter-spacing: -0.02em; }
.readout output small { font-size: 1rem; font-weight: 600; }
.readout .hint { grid-column: 1 / -1; color: var(--ink-2); font-size: 0.88rem; }
.iron { height: 12px; border: 1px solid var(--ink); margin-top: 12px; }
.iron-nums { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--ink-2); margin-top: 3px; }
.spots-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 0; font-size: 0.92rem; }
.spots-list li { display: grid; grid-template-columns: 38px 1fr auto; gap: 8px; padding: 6px 0; border-top: var(--hair); }
.spots-list li b { font-stretch: 80%; }
.spots-list .m { font-weight: 700; }
.spots-list .i { color: var(--ink-2); font-weight: 300; font-style: italic; }
.dim line, .dim path { stroke: var(--blue); stroke-width: 1.2; fill: none; }
.dim text { fill: var(--blue); font: 600 13px "Archivo"; font-stretch: 78%; }
.dim .tick { stroke-width: 1.6; }

/* profilo di volo */
.profile { border: var(--rule); background: var(--paper); }
.profile svg { width: 100%; height: 150px; border-bottom: var(--rule); background: linear-gradient(var(--paper), var(--plain)); }
.profile svg path.track { fill: none; stroke: var(--magenta); stroke-width: 3; }
.profile svg path.ground { fill: var(--plain-2); stroke: var(--ink); stroke-width: 1.5; }
.profile svg .wp { fill: var(--paper); stroke: var(--magenta); stroke-width: 3; }
.profile svg text { font: 600 12px "Archivo"; font-stretch: 75%; fill: var(--ink-2); letter-spacing: 0.08em; }
.profile ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.profile li { padding: 20px 18px 24px; border-right: var(--hair); }
.profile li:last-child { border-right: 0; }
.profile li .label { color: var(--magenta-ink); }
.profile h3 { margin: 6px 0 6px; font-size: 1.25rem; font-weight: 780; font-stretch: 100%; line-height: 1.1; }
.profile p { margin: 0; font-size: 0.95rem; color: var(--ink-2); }

/* strumenti */
.kit { display: grid; grid-template-columns: 1fr 1fr; border: var(--rule); background: var(--paper); }
.kit > section { padding: 28px clamp(20px, 3vw, 40px) 32px; }
.kit > section + section { border-left: var(--rule); }
.kit h3 { margin: 6px 0 14px; font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.3rem); line-height: 1.02; font-weight: 820; font-stretch: 108%; letter-spacing: -0.02em; }
.kit dl { margin: 0; display: grid; grid-template-columns: minmax(120px, 0.6fr) 1fr; border-top: var(--rule); }
.kit dt, .kit dd { margin: 0; padding: 10px 0; border-bottom: var(--hair); }
.kit dt { color: var(--ink-2); padding-right: 16px; }
.kit dd { font-weight: 600; }
.kit p { color: var(--ink-2); max-width: 54ch; margin: 16px 0 0; }

/* chi sono */
.bio { display: grid; grid-template-columns: minmax(220px, 4fr) minmax(0, 8fr); border: var(--rule); background: var(--paper); }
.portrait { border-right: var(--rule); min-height: 340px; display: grid; place-items: center; background: var(--plain); outline: 1.5px dashed var(--ink-2); outline-offset: -14px; color: var(--ink-2); text-align: center; padding: 20px; }
.bio-text { padding: clamp(24px, 4vw, 48px); }
.bio-text h3 { margin: 0 0 16px; padding-bottom: 16px; border-bottom: var(--hair); max-width: 62ch; font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem); line-height: 1; font-weight: 820; font-stretch: 110%; letter-spacing: -0.02em; }
.bio-text p { max-width: 62ch; margin: 0 0 14px; }
.bio-text .small { font-size: 0.9rem; color: var(--ink-2); border-top: var(--hair); padding-top: 14px; margin-top: 22px; }
.todo { display: inline-block; padding: 1px 6px; border: 1px dashed var(--magenta); color: var(--magenta-ink); font-size: 0.85em; font-weight: 600; }

/* contatti */
.contact { display: grid; grid-template-columns: minmax(0, 8fr) minmax(260px, 4fr); border: var(--rule); background: var(--paper); }
.contact form { padding: clamp(20px, 3vw, 36px); display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; border-right: var(--rule); }
.contact .wide { grid-column: 1 / -1; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 0.9rem; color: var(--ink-2); }
.check input { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--magenta); margin-top: 2px; }
.direct { padding: clamp(20px, 3vw, 36px); display: grid; align-content: start; gap: 0; }
.direct div { padding: 12px 0; border-bottom: var(--hair); }
.direct dt { color: var(--ink-2); }
.direct dd { margin: 4px 0 0; font-weight: 650; font-size: 1.05rem; }
.direct dl { margin: 0; }

footer.margin { padding: 22px var(--gut) 34px; display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; color: var(--ink-2); font-size: 0.82rem; }
footer.margin b { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .wrapbar { grid-template-columns: 1fr 1fr; }
  .wrapbar > .label { grid-column: 1 / -1; border-right: 0; max-width: none; }
  .wrapbar .btn { margin-top: 0 !important; }
  .edge nav a { padding: 0 12px; }
  .route-head { display: none; }
  .leg { grid-template-columns: 200px 1fr 1fr; }
  .leg > * { border-right: 0; }
  .leg .thumb { grid-row: 1 / span 2; border-right: var(--hair); }
  .leg .go { grid-column: 3 / 4; padding-top: 0; }
  .leg ul { grid-column: 3; grid-row: 1 / span 2; }
  .profile ol { grid-template-columns: 1fr 1fr; }
  .profile li { border-bottom: var(--hair); }
}
@media (max-width: 960px) {
  .edge nav { display: none; }
  .edge nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: var(--rule); }
  .edge nav.open a { padding: 14px var(--gut); border-right: 0; border-bottom: var(--hair); }
  .menu-btn { display: flex; align-items: center; gap: 8px; margin-left: auto; padding: 0 16px; background: none; border: 0; border-left: var(--rule); font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
  .edge .cta { margin-left: 0; padding: 0 16px; }
  .sheet > header, .sheet > header.tb { grid-template-columns: 1fr; }
  .readings, .kit, .bio, .contact { grid-template-columns: 1fr; }
  .figure { border-right: 0; border-bottom: var(--rule); }
  .kit > section + section { border-left: 0; border-top: var(--rule); }
  .portrait { border-right: 0; border-bottom: var(--rule); min-height: 200px; }
  .contact form { border-right: 0; border-bottom: var(--rule); }
}
@media (max-width: 720px) {
  .brand span { display: none; }
  .edge .cta span { display: none; }
  .hero { height: auto; max-height: none; min-height: 0; display: flex; flex-direction: column; }
  .map { position: relative; height: 34svh; min-height: 260px; }
  .wrapbar { grid-template-columns: 1fr; }
  .wrapbar .btn { width: 100%; }
  .sheet > header.tb.tb-photo { grid-template-columns: 1fr; }
  .tb-photo .tb-main { border-right: 0; border-bottom: var(--rule); padding: 20px 18px; }
  .tb-photo figure { min-height: 220px; }
  .sheet > header.tb.tb-photo h2, .sheet > header.tb.tb-photo p { border: 0; padding: 0; }
  .scalebar { display: none; }
  .m-hide { display: none; }
  .titleblock { display: flex; flex-direction: column; }
  .titleblock .facts { order: 3; border-bottom: 0; }
  .titleblock h1 { font-size: 1.9rem; }
  .demo { position: static; display: block; margin: 0; border: 0; border-top: 1px solid var(--ink); }
  .sheet > header.tb h2 { border-right: 0; border-bottom: var(--hair); padding: 20px 18px; }
  .sheet > header.tb p { padding: 16px 18px 20px; }
  .m-cities text, .m-ringlabels text { font-size: 58px; }
  .m-water text { font-size: 56px; }
  .m-regions text { font-size: 70px; }
  .m-base text { font-size: 70px; }
  .m-base .b-in { transform: scale(1.9); }
  .legend { display: none; }
  .scalebar { top: auto; bottom: 76px; right: 12px; }
  .m-ringlabels text:last-child { display: none; }
  .titleblock { position: relative; left: auto; bottom: auto; width: auto; margin: -64px 12px 16px; }
  .facts { grid-template-columns: 1fr; }
  .facts div { border-right: 0; border-bottom: var(--hair); display: flex; justify-content: space-between; gap: 12px; }
  .facts div:last-child { border-bottom: 0; }
  .facts dd { margin: 0; text-align: right; }
  .plan { padding: 14px 16px 18px; }
  .plan .row, .plan .row.send { grid-template-columns: 1fr; }
  .titleblock h1 { padding: 18px 16px 14px; }
  .leg { grid-template-columns: 1fr; }
  .leg > * { padding: 14px 14px; }
  .leg .thumb { grid-row: auto; border-right: 0; min-height: 0; aspect-ratio: 16 / 9; padding: 0; }
  .leg ul, .leg .go { grid-column: 1; grid-row: auto; padding-top: 0; }
  .leg.tech h3 { font-size: 1.45rem; }
  .profile ol { grid-template-columns: 1fr; }
  .contact form { grid-template-columns: 1fr; }
  .figure .tabs { left: 8px; right: 8px; top: 8px; }
  .tabs button { flex: 1; padding: 0 8px; }
}
/* miniatura con immagine vera: niente cornice tratteggiata */
.leg .thumb-img { background: #5a90b0; }
.leg .thumb-img::after { display: none; }
.leg .thumb-img { overflow: hidden; }
.leg .thumb-img img { object-fit: contain; padding: 0; transition: transform 0.4s; }
.leg .thumb-img:hover img { transform: scale(1.05); }
.leg h3 .h-link { color: inherit; text-decoration: none; }
.leg h3 .h-link:hover { color: var(--magenta); }

/* ---------- prova: carta in palette iron (?mappa=iron) ---------- */
.quota-row { display: none; }
.iron .quota-row { display: block; margin: 8px 0 6px; padding-top: 2px; border-top: var(--hair); }
.iron .quota-row .label { display: block; margin: 6px 0 6px; color: var(--ink-2); }
/* scala non lineare come nel raster: da 0 m (t = 0,16) a 4000 m (t = 1) */
.quota-bar { height: 10px; border: 1px solid var(--ink); background: linear-gradient(90deg, rgb(56 10 100) 0%, rgb(106 12 136) 17%, rgb(176 26 112) 36%, rgb(222 64 52) 52%, rgb(246 132 30) 69%, rgb(251 206 62) 85%, rgb(255 250 222) 100%); }
.quota-nums { position: relative; height: 1.1em; margin-top: 3px; color: var(--ink-2); font-size: 0.7rem; }
.quota-nums span { position: absolute; white-space: nowrap; }
.quota-nums span:not(:first-child) { transform: translateX(-50%); }
.quota-nums span:last-child { transform: translateX(-100%); }
.iron .legend svg [stroke="#a3157a"] { stroke: var(--ink); }
.iron .legend svg [fill="#a3157a"] { fill: var(--ink); }

.iron .m-grat path { stroke: #fff; opacity: 0.16; }
.iron .m-coast path { stroke: rgba(255, 250, 222, 0.55); stroke-width: 1.6; }
.iron .m-lakes path { fill: #060212; stroke: rgba(255, 250, 222, 0.7); stroke-width: 1.6; }
.iron .m-rivers path { stroke: rgba(255, 250, 222, 0.45); stroke-width: 1.8; }
.iron .m-border path { stroke: #fff; opacity: 0.85; }
.iron .m-rings path { stroke: #fff; stroke-width: 2.4; opacity: 0.75; }
.iron .m-ringlabels text { fill: #fff; stroke: #060212; stroke-width: 6px; }
.iron .m-regions text { fill: #fff; opacity: 0.5; }
.iron .m-water text { fill: rgba(255, 250, 222, 0.85); stroke: #060212; stroke-width: 5px; }
.iron .m-cities circle { fill: #060212; stroke: #fff; }
.iron .m-cities text { fill: #fff; stroke: rgba(6, 2, 18, 0.85); }
/* la base come il mirino della termocamera */
.iron .m-base .sym { stroke: #fff; }
.iron .m-base .dot { fill: #fff; }
.iron .m-base text { fill: #fff; stroke: #060212; }

/* ---------- perché il drone ---------- */
.why-list { list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); border: var(--rule); background: var(--paper); }
.why-list li { padding: 26px clamp(20px, 2.4vw, 32px) 30px; }
.why-list li + li { border-left: var(--rule); }
.why-list svg { width: 40px; height: 40px; margin-bottom: 16px; }
.why-list h3 { margin: 0 0 8px; font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.65rem); line-height: 1.05; font-weight: 800; font-stretch: 106%; letter-spacing: -0.015em; }
.why-list p { margin: 0; color: var(--ink-2); }
@media (max-width: 960px) {
  .why-list { grid-template-columns: 1fr; }
  .why-list li + li { border-left: 0; border-top: var(--rule); }
}
/* fascia "perché il drone": più compatta, e meno vuoto dopo la tabella servizi */
#servizi { padding-bottom: clamp(40px, 5vw, 64px); }
.sheet.why { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(40px, 5vw, 64px); }
.sheet.why > header { margin-bottom: clamp(20px, 2.4vw, 32px); }
.why-list li { padding-top: 22px; padding-bottom: 24px; }
.why-list svg { margin-bottom: 12px; }
/* bio: nome, riga e testo sulla stessa larghezza, a capo bilanciati */
.bio-text h3, .bio-text p { max-width: 38rem; }
.bio-text p { text-wrap: pretty; hyphens: manual; }
.bio-text p { margin-bottom: 10px; }
.leg[hidden] { display: none; }
