/* Il sito come un foglio di carta geografica: mare chiaro sotto, terra bianca sopra, e la linea tratto-punto
   dei confini amministrativi come unico segno di divisione. Niente font ne' librerie da scaricare. */

:root {
  color-scheme: light;
  --ink: #0F3D66;
  --blue: #1D6FB8;
  --mid: #5BA4E0;
  --sky: #A9D0F2;
  --sea: #EEF4F9;
  --land: #FFFFFF;
  --text: #1B2B3A;
  --muted: #4E6274;
  --line: #D3DFEA;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  /* tratto, spazio, punto, spazio: il confine amministrativo delle carte */
  --boundary: repeating-linear-gradient(90deg, var(--ink) 0 12px, transparent 12px 18px, var(--ink) 18px 21px, transparent 21px 27px);
  --boundary-down: repeating-linear-gradient(180deg, var(--ink) 0 12px, transparent 12px 18px, var(--ink) 18px 21px, transparent 21px 27px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font: 1rem/1.6 var(--sans);
  color: var(--text);
  background: var(--sea);
}

img { max-width: 100%; height: auto; }

a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }

h1, h2, h3 { font-family: var(--display); color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 1.2rem + 4.6vw, 4.25rem); line-height: 1.03; letter-spacing: -.03em; font-weight: 700; margin: 0 0 1.25rem; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; margin: 0 0 .75rem; }
h3 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -.005em; margin: 2.75rem 0 .75rem; }

p { margin: 0 0 1rem; }

code, pre { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { background: #DDEAF6; color: var(--ink); padding: .1em .35em; border-radius: 3px; }

.wrap { max-width: 72rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--ink); color: #fff; padding: .75rem 1rem; border-radius: 0 0 6px 6px; }
.skip:focus { top: 0; color: #fff; }
.demo-banner { margin: 0; padding: .5rem 1rem; background: var(--ink); color: #fff; text-align: center; font-size: .925rem; }

.lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); line-height: 1.5; max-width: 38rem; }
.intro, .prose { max-width: 44rem; }
.intro { color: var(--muted); font-size: 1.075rem; margin-bottom: 2rem; }
.note { max-width: 38rem; padding-left: 1rem; border-left: 3px solid var(--mid); color: var(--muted); }
.caption { color: var(--muted); font-size: .925rem; margin-top: .75rem; }

main > section, main > .wrap > section { margin-block: clamp(3.5rem, 2rem + 6vw, 6.5rem); }

/* ---- testata e pie' di pagina ---- */

.site-header { background: var(--land); position: relative; }
.site-header::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--boundary); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: .5rem; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { display: block; }
.site-header ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; padding: 0; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .75rem; color: var(--ink); font-weight: 600; white-space: nowrap; text-decoration: none; border-radius: 6px; transition: background-color 150ms ease; }
.site-header nav a:active { background: var(--sky); }
/* il menu sta a destra, accanto alla lingua; la pagina aperta ha il fondo del blu piu' scuro dell'icona, per ogni voce */
.site-header nav { margin-left: auto; }
.site-header nav a[aria-current] { background: var(--blue); color: #fff; }
/* l'azzurro chiaro del logo, col testo scuro: il medio non regge il contrasto ne' col bianco ne' con l'inchiostro */
.site-header nav a.nav-cta { background: var(--sky); color: var(--ink); }
.site-header nav a.nav-cta[aria-current] { background: var(--blue); color: #fff; }
.site-header nav a.nav-cta:active { background: var(--mid); }
/* il selettore della lingua: un details di link, aperto sotto il codice della lingua */
.languages { position: relative; }
.languages summary { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .75rem; color: var(--ink); font-weight: 600; border-radius: 6px; cursor: pointer; list-style: none; transition: background-color 150ms ease; }
.languages summary::-webkit-details-marker { display: none; }
.languages summary::after { content: ""; width: .4em; height: .4em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.15em) rotate(45deg); }
.languages[open] summary::after { transform: translateY(.1em) rotate(-135deg); }
.languages abbr { text-decoration: none; }
.site-header .languages ul { position: absolute; right: 0; top: calc(100% + .25rem); z-index: 5; display: block; min-width: 11rem; padding: .35rem; background: var(--land); border-radius: 8px; box-shadow: 0 0 0 1px var(--line), 0 12px 24px -8px rgba(15, 61, 102, .35); }
.languages a { display: flex; align-items: center; gap: .5rem; min-height: 40px; padding: 0 .75rem; color: var(--ink); text-decoration: none; border-radius: 6px; }
.languages a[aria-current] { font-weight: 700; background: var(--sea); }

.site-footer { background: var(--ink); color: #D5E3F0; margin-top: clamp(4rem, 10vw, 8rem); padding-block: 0 1.5rem; font-size: .95rem; }
/* nazioni e lingue a tutta larghezza sopra le colonne, su un fondo solo: il blu dell'icona, poi l'inchiostro delle
   colonne. Le nazioni un continente per riga, bandiera e nome in una griglia che va a capo */
.footer-strip { background: var(--blue); color: #fff; padding-block: 2.25rem; }
.footer-strip .footer-band + .footer-band { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid rgb(255 255 255 / .25); }
.footer-columns { padding-top: 3rem; }
.footer-band > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .25rem 1.5rem; align-items: baseline; margin-top: .75rem; }
.footer-band h3 { margin: 0; font-size: .9rem; font-weight: 600; letter-spacing: .02em; color: #fff; }
.footer-band ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0 1.5rem; }
/* una fascia senza righe per continente (le lingue) parte dove partono i nomi delle nazioni */
.site-footer .footer-band > ul { margin-top: .75rem; padding-left: 10.5rem; }
.footer-band > p { margin: 1rem 0 0; max-width: none; }
.footer-band > p a { padding-block: .3rem; }
@media (max-width: 40rem) {
  .footer-band > div { grid-template-columns: minmax(0, 1fr); }
  .site-footer .footer-band > ul { padding-left: 0; }
}
.footer-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 2rem 2.5rem; }
.site-footer h2 { font-size: 1rem; letter-spacing: 0; color: #fff; margin-bottom: .5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-block; padding-block: .3rem; }
.site-footer li a.country-label { display: inline-flex; }
.site-footer a.icon-link { display: inline-flex; align-items: center; gap: .5rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--sky); }
.site-footer :focus-visible { outline-color: var(--sky); }
.site-footer address { font-style: normal; }
.site-footer p { margin-top: .75rem; max-width: 20rem; }
.site-footer .copyright { margin-top: 2.5rem; max-width: 72rem; color: #A9C0D6; }

/* ---- pagina iniziale: il titolo e il foglio con le nazioni ---- */

/* sotto la testata basta lo spazio di una sezione: niente margine in piu' */
main > .hero { margin-top: 0; padding-block: clamp(1.5rem, 4vw, 3rem) 0; }

/* le nazioni stanno su una riga che scorre in orizzontale: il foglio non cresce in altezza quando se ne aggiungono.
   La larghezza della voce lascia in vista un pezzo della successiva, che dice da sola che la riga continua. */
.plate { position: relative; margin-top: clamp(2rem, 5vw, 3.5rem); scroll-margin-top: 1rem; }
.plate ul { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: none; background: var(--land); border-radius: 4px; box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px rgba(15, 61, 102, .45); }
.plate li { position: relative; flex: 0 0 clamp(11.5rem, 21%, 14.5rem); scroll-snap-align: start; animation: arrive 520ms var(--ease-out) both; }
.plate li:nth-child(2) { animation-delay: 60ms; }
.plate li:nth-child(3) { animation-delay: 120ms; }
.plate li:nth-child(4) { animation-delay: 180ms; }
.plate li:nth-child(5) { animation-delay: 240ms; }
.plate li:nth-child(6) { animation-delay: 300ms; }
/* fra una nazione e l'altra passa un confine */
.plate li + li::after { content: ""; position: absolute; inset: 0 auto 0 -1px; width: 2px; background: var(--boundary-down); }
.plate a { display: block; height: 100%; padding: clamp(1rem, 2.5vw, 1.5rem); color: var(--text); text-decoration: none; transition: background-color 150ms ease, transform 140ms var(--ease-out); }
/* la riga taglia cio' che esce: il contorno del fuoco sta dentro la voce */
.plate a:focus-visible { outline-offset: -3px; }
.plate a:active { transform: scale(.98); }
.plate img:not(.country-flag) { display: block; width: 100%; height: clamp(6rem, 13vw, 8rem); object-fit: contain; margin-bottom: 1rem; transition: transform 320ms var(--ease-out); }
.plate h3 { margin: 0 0 .15rem; font-size: 1.2rem; }
.plate p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }

/* le copie che chiudono il cerchio (site.js) non rifanno l'ingresso */
.plate li[aria-hidden] { animation: none; }

/* le frecce le crea site.js e le nasconde quando la riga sta tutta nel foglio: stanno a cavallo dei due bordi del
   foglio, cosi' sotto tutte e due passa qualcosa e la trasparenza si vede anche su quella di sinistra */
.plate-nav { position: absolute; inset: 0 -.75rem; z-index: 2; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.plate-nav[hidden] { display: none; }
.plate-nav button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--land); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 6px 16px -4px rgba(15, 61, 102, .45); cursor: pointer; pointer-events: auto; opacity: .6; transition: opacity 150ms ease, transform 140ms var(--ease-out); }
.plate-nav button:focus-visible { opacity: 1; }
.plate-nav button:active { transform: scale(.94); }
.plate-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

@keyframes arrive { from { opacity: 0; transform: translateY(10px); } }

@media (hover: hover) and (pointer: fine) {
  .site-header nav a:hover, .languages summary:hover, .languages a:hover { background: var(--sea); }
  /* un gradino fra il riposo (azzurro) e la voce aperta (blu), come le altre voci: il blu medio dell'icona */
  .site-header nav a.nav-cta:hover { background: var(--mid); }
  .site-header nav a[aria-current]:hover, .site-header nav a.nav-cta[aria-current]:hover { background: var(--blue); color: #fff; }
  .plate a:hover { background: #F6FAFD; }
  .plate a:hover img:not(.country-flag) { transform: scale(1.04); }
  .plate a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
  .plate-nav button:hover { opacity: 1; }
  .country-list a:hover { background: var(--land); }
}

/* ---- l'identificativo ---- */

.band { background: var(--land); position: relative; padding-block: clamp(3rem, 7vw, 5.5rem); scroll-margin-top: 0; }
.band::before, .band::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--boundary); }
.band::before { top: 0; }
.band::after { bottom: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }

.anatomy { margin: 2rem 0 0; }
.anatomy .id { display: flex; align-items: flex-start; gap: .35rem; margin: 0 0 1rem; font-family: var(--mono); color: var(--ink); }
.anatomy .id span { display: flex; flex-direction: column; }
.anatomy .id b { font-size: clamp(1.9rem, 1.2rem + 3vw, 3.25rem); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; border-bottom: 3px solid var(--blue); padding-bottom: .15rem; }
.anatomy .id i { font-style: normal; font-size: clamp(1.9rem, 1.2rem + 3vw, 3.25rem); line-height: 1.1; color: var(--mid); }
.anatomy .id small { font-family: var(--sans); font-size: .85rem; color: var(--muted); padding-top: .35rem; }
.anatomy figcaption { color: var(--muted); font-size: .925rem; }

.files { display: grid; gap: 1rem; }
.files figure { margin: 0; min-width: 0; }
.files figcaption { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-bottom: .3rem; overflow-wrap: anywhere; }
.files pre { margin: 0; padding: .9rem 1rem; background: var(--ink); color: #E3EEF8; border-radius: 6px; overflow-x: auto; line-height: 1.55; font-size: .85rem; }
.files mark { background: var(--sky); color: var(--ink); padding: .05em .25em; border-radius: 3px; }

/* ---- cosa c'e' nel pacchetto ---- */

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0 clamp(1.5rem, 4vw, 3rem); margin: 0; }
.facts > div { border-top: 1px solid var(--line); padding-block: 1.25rem 1.5rem; }
/* il titolo sottolineato come i pezzi dell'identificativo (.anatomy .id b) */
.facts dt { display: inline; font-family: var(--display); font-weight: 600; font-size: 1.15rem; line-height: 1.55; color: var(--ink); padding-bottom: .1rem; border-bottom: 3px solid var(--blue); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.facts dd { margin: .45rem 0 0; }

.example { display: block; width: 100%; height: 640px; background: var(--land); border: 1px solid var(--line); border-radius: 6px; }

/* ---- pagina di una nazione ---- */

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 1.25rem 0 0; font-size: .925rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-inline: .6rem; color: var(--mid); }
.crumbs a { display: inline-block; padding-block: .35rem; }
.crumbs [aria-current] { padding-block: .35rem; }

.country { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding-block: clamp(1.5rem, 5vw, 3.5rem) 0; }
.country h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.5rem); }
.country img:not(.country-flag) { width: clamp(9rem, 22vw, 15rem); height: clamp(9rem, 22vw, 15rem); object-fit: contain; }
.country-label { display: flex; align-items: center; gap: .4em; }
/* riquadro fisso come fa-fw: le bandiere vanno da 1:1 (Svizzera) a 2:1 (Regno Unito) e i nomi accanto restano
   allineati; il bordino e' un drop-shadow perche' segua la bandiera, non il riquadro */
.country-flag { display: block; flex: none; width: 1.25em; height: .75em; object-fit: contain; filter: drop-shadow(0 0 .5px rgb(0 0 0 / .45)); }
.country-kind { display: block; margin-top: .2em; font-size: max(1.15rem, .5em); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; color: var(--muted); }

.counts { display: flex; flex-wrap: wrap; gap: 1rem clamp(1.5rem, 4vw, 3rem); margin: 2rem 0 0; }
.counts > div { display: flex; flex-direction: column-reverse; }
.counts dt { color: var(--muted); font-size: .925rem; }
.counts dd { margin: 0; font-family: var(--display); font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }

.scroll { overflow-x: auto; margin-bottom: 1rem; }
.data { border-collapse: collapse; font-size: .95rem; background: var(--land); border-radius: 6px; }
.data.wide { width: 100%; min-width: 38rem; }
.data th, .data td { text-align: left; vertical-align: top; padding: .6rem 1rem; border-bottom: 1px solid var(--line); }
.data tbody tr:last-child > * { border-bottom: 0; }
.data thead th { font-weight: 600; color: var(--muted); font-size: .875rem; white-space: nowrap; }
.data tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }
.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data .columns { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-top: .25rem; overflow-wrap: anywhere; }
.data code { background: none; padding: 0; }

ul.prose { padding-left: 1.2rem; }
ul.prose li { margin-bottom: .4rem; }


.others { margin-top: clamp(3.5rem, 8vw, 6rem); padding-top: 2.5rem; position: relative; }
.others::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--boundary); }
.others h2 { font-size: 1.4rem; }
.others .actions, .plate-all { margin-top: 1.5rem; }

/* l'indice delle nazioni: titolo come quello di una nazione, un continente per sezione */
.catalog { padding-top: clamp(1.5rem, 5vw, 3.5rem); }
.catalog h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.5rem); }
.catalog section { margin-top: clamp(2rem, 5vw, 3rem); }
.catalog h2 { font-size: 1.4rem; }
.country-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .5rem 1.5rem; }
.country-list a { display: flex; align-items: center; gap: 1rem; padding: .75rem; margin-inline: -.75rem; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: .9rem; line-height: 1.45; transition: background-color 150ms ease, transform 140ms var(--ease-out); }
.country-list a:active { transform: scale(.98); }
.country-list b { color: var(--ink); font-size: 1rem; }
.country-list img:not(.country-flag) { flex: none; width: 3.5rem; height: 3.5rem; object-fit: contain; }

/* ---- pagine di testo: privacy, cookie, errore ---- */

.legal { max-width: 46rem; margin-inline: auto; padding-top: clamp(2rem, 6vw, 4rem); }
.legal h1 { font-size: clamp(2rem, 1.4rem + 2.5vw, 3rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2.25rem; }

@media (max-width: 52rem) {
  .split, .country { grid-template-columns: minmax(0, 1fr); }
  .country img:not(.country-flag) { order: -1; width: 8rem; height: 8rem; }
}

/* stretto: logo e lingua sulla prima riga, il menu sotto allineato al logo */
@media (max-width: 40rem) {
  .site-header .wrap { row-gap: 0; }
  .site-header nav { order: 3; flex-basis: 100%; margin-left: 0; }
  .site-header nav ul { margin-left: -.75rem; }
  /* accesso e carrello solo con l'icona (il testo resta per gli screen reader): il campione lo tiene */
  .site-header nav a:not(.nav-cta) { min-width: 44px; justify-content: center; padding-inline: .6rem; }
  .site-header nav a:not(.nav-cta) .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .site-header nav .icon { width: 1.3em; height: 1.3em; }
  .site-header nav a.nav-cta .icon { width: 1.15em; height: 1.15em; }
  .languages { margin-left: auto; }
  .site-header .languages ul { right: -.5rem; }
}

@media (max-width: 26rem) {
  .site-header nav a { padding-inline: .5rem; font-size: .95rem; }
  .site-header nav ul { margin-left: -.5rem; }
  .plate p { font-size: .825rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* resta la dissolvenza, senza spostamenti */
  @keyframes arrive { from { opacity: 0; } }
  .plate a, .plate img, .country-list a { transition: background-color 150ms ease; }
  .plate-nav button { transition: opacity 150ms ease; }
  .plate a:active, .country-list a:active, .plate a:hover img, .plate-nav button:active { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --muted: #2E4254; --line: #7C93A8; }
}

/* ---- schede: i pulsanti li crea site.js, senza JavaScript i pannelli restano uno sotto l'altro ---- */

.tablist { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; margin: 1.5rem 0 0; padding: 3px 3px 0; }
.tablist button { flex: none; min-height: 44px; padding: 0 1rem; border: 0; border-radius: 6px 6px 0 0; background: none; font: 600 1rem var(--sans); color: var(--muted); cursor: pointer; transition: background-color 150ms ease, color 150ms ease; }
.tablist button[aria-selected="true"] { background: var(--land); color: var(--ink); position: relative; z-index: 1; }
.tablist button:focus-visible { outline-offset: -3px; }
.tabs.ready .panel { background: var(--land); padding: 1.5rem clamp(1rem, 3vw, 1.75rem); border-radius: 0 0 6px 6px; }
.tabs.ready .panel > :last-child { margin-bottom: 0; }
.tabs { margin-bottom: 2rem; }
.tabs.ready .data { background: none; }
.tabs.ready .data th:first-child, .tabs.ready .data td:first-child { padding-left: 0; }

@media (hover: hover) and (pointer: fine) {
  .tablist button:not([aria-selected="true"]):hover { background: #E3EDF6; color: var(--ink); }
}

/* su uno schermo stretto le schede non stanno in una riga: vanno a capo come pulsanti, tutte in vista */
@media (max-width: 52rem) {
  .tablist { flex-wrap: wrap; gap: .5rem; overflow: visible; padding: 0; margin-bottom: .75rem; }
  .tablist button { border-radius: 6px; background: var(--land); padding: 0 .9rem; }
  .tablist button[aria-selected="true"] { background: var(--ink); color: #fff; }
  .tabs.ready .panel { border-radius: 6px; }
}

/* ---- pulsante e modulo del campione ---- */

/* account, ordini e carrello: titolo come le pagine di testo, schede bianche come il foglio delle nazioni */
.account { max-width: 62rem; padding-block: clamp(2rem, 6vw, 4rem); }
.account h1 { font-size: clamp(2rem, 1.4rem + 2.5vw, 3rem); }
.account-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem; }
.account-head h1 { margin-bottom: .5rem; }
.account-head p { margin: 0; color: var(--muted); }
.account-head .lead { color: var(--ink); font-weight: 600; }
.account-head .actions { margin: 0; }
.purchase-card { margin-block: 1.25rem; padding: clamp(1.25rem, 4vw, 2rem); background: var(--land); border-radius: 8px; box-shadow: 0 1px 0 var(--line), 0 16px 32px -24px rgba(15, 61, 102, .4); }
.purchase-card > :last-child { margin-bottom: 0; }
.purchase-card h2 { margin-top: 0; margin-bottom: .5rem; font-size: 1.5rem; }
.purchase-card[data-state] { border-left: 4px solid var(--mid); }
.purchase-card[data-state="done"] { border-left-color: #2E7D4F; }
.purchase-card[data-state="failed"] { border-left-color: #B3261E; }
.purchase-card .actions { margin-top: 1rem; }
.order-meta { color: var(--muted); }
.order-lines { margin: 0 0 1rem; padding-left: 1.2rem; }
.cart-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.cart-line p { margin: 0; color: var(--muted); }
.total { margin-top: 2rem; font-family: var(--display); font-size: 1.35rem; font-weight: 700; color: var(--ink); }
.purchase-dates { display: flex; flex-wrap: wrap; gap: 1rem 3rem; margin: 1rem 0 1.25rem; padding-block: 1rem; border-block: 1px solid var(--line); }
.purchase-dates dt { color: var(--muted); font-size: .875rem; }
.purchase-dates dd { margin: .25rem 0 0; font-weight: 600; }
.purchase-card details { margin-top: 1.5rem; }
.purchase-card summary { cursor: pointer; }
.release-list { list-style: none; padding: 0; }
.release-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.release-list small { display: block; color: var(--muted); overflow-wrap: anywhere; }

.button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.25rem; border: 0; border-radius: 6px; background: var(--blue); color: #fff; font: 600 1rem var(--sans); text-decoration: none; cursor: pointer; transition: background-color 150ms ease, transform 140ms var(--ease-out); }
.button:hover { background: var(--ink); color: #fff; }
.button:active { transform: scale(.98); }
.button.secondary { background: var(--land); color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.button.secondary:hover { background: var(--land); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
/* icone dello sprite (Font Awesome light): alte quanto il testo, del suo colore, a sinistra con lo stesso spazio */
.icon { flex: none; width: 1.15em; height: 1.15em; fill: currentColor; }
.button, .site-header nav a { gap: .5rem; }
.button.small { min-height: 36px; padding: 0 .9rem; font-size: .925rem; }
/* togliere o cancellare: il rosso degli errori, pieno solo al passaggio */
.button.danger { background: var(--land); color: #B3261E; box-shadow: inset 0 0 0 2px #B3261E; }
.button.danger:hover, .button.danger:active { background: #B3261E; color: #fff; }
/* la casella col testo accanto, allineata alla prima riga */
.check label { display: flex; align-items: flex-start; gap: .6rem; }
.check input { flex: none; width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; accent-color: var(--blue); }
/* i pulsanti di una pagina in fila, anche quando uno e' il submit di un form */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0 0 1rem; }
.actions form { margin: 0; }
.hero .actions { margin-top: 1.75rem; }
/* nella testata della home il testo prende tutta la larghezza, come il titolo e le nazioni sotto */
.hero .lead, .hero .note { max-width: none; }

.form { max-width: 34rem; margin-top: 2rem; padding: clamp(1.25rem, 4vw, 2rem); background: var(--land); border-radius: 6px; box-shadow: 0 1px 0 var(--line); }
.field { margin-bottom: 1.25rem; }
.field label { display: block; margin-bottom: .35rem; font-weight: 600; color: var(--ink); }
.field label span { font-weight: 400; color: var(--muted); font-size: .875rem; }
.field input, .field select, .field textarea { display: block; width: 100%; min-height: 44px; padding: .55rem .75rem; border: 1px solid #8FA5B8; border-radius: 6px; background: #fff; color: var(--text); font: 1rem/1.4 var(--sans); }
.field textarea { resize: vertical; }
.hint { margin: .4rem 0 0; color: var(--muted); font-size: .875rem; }
.form > .hint { margin-top: 1rem; }

/* indirizzo di fatturazione con le proposte (js/address.js) */
.address-search { position: relative; }
.address-search input { width: min(100%, 34rem); }
.address-search .hint { display: block; }
.address-search [role="listbox"] { position: absolute; z-index: 10; left: 0; top: calc(100% - 1.4rem); width: min(100%, 34rem); max-height: 18rem; overflow-y: auto; margin: 0; padding: .25rem 0; list-style: none; background: var(--land); border: 1px solid #8FA5B8; border-radius: 6px; box-shadow: 0 6px 18px rgb(15 61 102 / .14); }
.address-search [role="option"] { padding: .5rem .75rem; cursor: pointer; }
.address-search [role="option"]:hover, .address-search [role="option"][aria-selected="true"] { background: var(--sea); color: var(--ink); }
.error { margin: 0 0 1.25rem; padding: .75rem 1rem; border-left: 3px solid #B3261E; background: #FCEEED; color: #7A1712; border-radius: 0 6px 6px 0; }

@media (prefers-reduced-motion: reduce) {
  .button:active { transform: none; }
}
