/* Foglio di base: la veste comune a tutte le pagine. Va caricato dopo gettoni.css.
   Regole della direzione: raggio 0, filo da 1 px, nessuna ombra, nessuna sfumatura, nessuna sfocatura.
   Le classi di base non hanno prefisso; le pagine di contenuto usano il prefisso pg-. */

/* ---- Caratteri: sei tagli, tutti precaricati dallo scheletro ---- */
@font-face { font-family: "Besley"; src: url(/caratteri/besley-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: fallback;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Besley"; src: url(/caratteri/besley-latin-500-italic.woff2) format("woff2"); font-weight: 500; font-style: italic; font-display: fallback;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "B612"; src: url(/caratteri/b612-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: fallback;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "B612"; src: url(/caratteri/b612-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: fallback;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "B612 Mono"; src: url(/caratteri/b612-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: fallback;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "B612 Mono"; src: url(/caratteri/b612-mono-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: fallback;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---- Reset minimo ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 20px; font-synthesis: none; }
body { margin: 0; background: var(--carta); color: var(--inchiostro); font-family: var(--testi); font-size: var(--c-testo); line-height: 1.5; overflow-wrap: break-word; }
img, svg, video, canvas { max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; border-radius: 0; }
[hidden] { display: none !important; }
/* quello che ha senso solo con JavaScript acceso (comune.js mette la classe js su <html> prima del primo disegno) */
html:not(.js) .solo-js { display: none !important; }

/* ---- Tipografia ---- */
h1, h2, h3 { font-family: var(--titoli); font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: var(--c-titolo); line-height: 1; letter-spacing: -.015em; margin-bottom: 16px; }
h2 { font-size: var(--c-sezione); line-height: 1.08; letter-spacing: -.01em; margin-bottom: 14px; }
h3 { font-size: var(--c-voce); line-height: 1.2; margin-bottom: 8px; }
p, ul, ol, dl, figure, blockquote, table { margin: 0 0 1em; }
/* Besley ha solo il corsivo 500 e il tondo 700: il corsivo è la voce dell'acqua e della seconda riga dei titoli. */
em, i, cite, dfn, .acqua { font-family: var(--titoli); font-style: italic; font-weight: 500; }
b, strong { font-weight: 700; }
small { font-size: var(--c-nota); }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.cifra, time, code, kbd { font-family: var(--cifre); font-variant-numeric: tabular-nums; }
.sotto { font-size: var(--c-lettura); max-width: 31em; margin: 0 0 22px; }
.nota { font-size: var(--c-nota); line-height: 1.4; margin: 18px 0 0; padding-top: 12px; border-top: var(--filo) solid var(--inchiostro); }
.solo-lettori { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---- Il fuoco visibile ---- */
:focus-visible { outline: 3px solid var(--rosso); outline-offset: 3px; }
/* sul rosso il contorno è carta, e sta dentro il comando: fuori si confonderebbe col fondo */
.principale:focus-visible { outline: 3px solid var(--carta); outline-offset: -7px; }

/* ---- Il salto al contenuto ---- */
.salto { position: absolute; left: var(--margine); top: 0; z-index: 10; transform: translateY(-120%); background: var(--carta); color: var(--inchiostro); border: var(--filo) solid var(--inchiostro); padding: 11px 16px; font-weight: 700; }
.salto:focus { transform: translateY(6px); }

/* ---- La banda della dichiarazione ---- */
.avviso { margin: 0; padding: 10px var(--margine); background: var(--inchiostro); color: var(--carta); font-size: var(--c-nota); line-height: 1.4; }

/* ---- La testata ---- */
.testa { display: flex; align-items: center; gap: 0 28px; padding: 8px var(--margine); max-width: calc(var(--foglio-max) + 2 * var(--margine)); margin: 0 auto; }
.marchio { font-family: var(--titoli); font-weight: 700; font-size: 26px; line-height: 1; text-decoration: none; padding: 10px 0; min-height: var(--bersaglio); display: inline-flex; align-items: center; white-space: nowrap; }
.coord { font-family: var(--cifre); font-size: var(--c-nota); margin-right: auto; white-space: nowrap; }
.menu { display: flex; align-items: center; gap: 0 26px; }
.menu a { display: inline-flex; align-items: center; justify-content: center; min-width: var(--bersaglio); min-height: var(--bersaglio); padding: 10px 0 8px; border-bottom: var(--filo-forte) solid transparent; font-size: var(--c-menu); text-decoration: none; white-space: nowrap; }
.menu a[aria-current="page"] { border-bottom-color: var(--inchiostro); font-weight: 700; }

/* ---- Il foglio e la colonna ---- */
.foglio { display: block; padding: 0 var(--margine) 40px; max-width: calc(var(--foglio-max) + 2 * var(--margine)); margin: 0 auto; }
.colonna { max-width: var(--colonna); }
.colonna p, .colonna li { font-size: var(--c-lettura); }
.sezione { padding: 44px 0 8px; }

/* ---- Il righello: l'unico passaggio fra due zone ---- */
.righello { display: block; height: var(--righello); border: 0; border-bottom: var(--filo) solid var(--inchiostro); margin: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='14'%3E%3Cpath d='M.5 0v14M10.5 7v7M20.5 7v7M30.5 7v7M40.5 7v7' stroke='%2322271F'/%3E%3C/svg%3E") left bottom repeat-x; }

/* ---- Il cartiglio: rettangolo pieno color carta col righello in testa ---- */
.cartiglio { background: var(--carta); color: var(--inchiostro); border: var(--filo) solid var(--inchiostro); padding: 0 var(--aria) var(--aria); }
.cartiglio > .righello:first-child { margin: 0 calc(-1 * var(--aria)) 20px; }
.cartiglio > :last-child { margin-bottom: 0; }

/* ---- La cornice graduata: il bordo della carta nautica, tacche piene e vuote da 32 px ---- */
.cornice { position: relative; border: var(--filo) solid var(--inchiostro); padding: calc(var(--scala) + 1px); }
.cornice::before, .cornice::after { content: ""; position: absolute; pointer-events: none; }
.cornice::before { left: 0; right: 0; top: 0; bottom: 0; border-style: solid; border-color: transparent; border-width: var(--scala) 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='8'%3E%3Crect width='32' height='8' fill='%2322271F'/%3E%3C/svg%3E") left top / 64px 8px repeat-x border-box,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='8'%3E%3Crect x='32' width='32' height='8' fill='%2322271F'/%3E%3C/svg%3E") left bottom / 64px 8px repeat-x border-box; }
.cornice::after { left: 0; right: 0; top: var(--scala); bottom: var(--scala);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='64'%3E%3Crect y='32' width='8' height='32' fill='%2322271F'/%3E%3C/svg%3E") left top / 8px 64px repeat-y,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='64'%3E%3Crect width='8' height='32' fill='%2322271F'/%3E%3C/svg%3E") right top / 8px 64px repeat-y; }
/* la finestra dentro la cornice: la scena, una foto, una mappa */
.vista { position: relative; border: var(--filo) solid var(--inchiostro); overflow: hidden; background: var(--golfo); }
.vista > img, .vista > picture > img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---- I comandi ---- */
.comando { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: var(--bersaglio); padding: 0 22px; border: var(--filo) solid var(--inchiostro); background: var(--carta); color: var(--inchiostro); font-family: var(--testi); font-weight: 700; font-size: var(--c-testo); line-height: 1.1; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }
/* principale: rosso pieno, testo bianco in Besley, a sinistra l'ago */
.comando.principale { border-color: var(--rosso); background: var(--rosso); color: var(--bianco); font-family: var(--titoli); font-size: 20px; line-height: 1; padding: 0 22px 0 16px; white-space: nowrap; }
.comando.grande { min-height: var(--comando); padding: 0 34px; font-size: 18px; }
.comando.principale.grande { gap: 16px; padding: 0 44px 0 28px; font-size: var(--c-comando); }
.comando .ago { flex: none; display: block; }
.comando[disabled], .comando[aria-disabled="true"] { background: var(--golfo); border-color: var(--golfo); color: var(--carta); cursor: default; }
/* collegamento: sottolineato, staccato di 4 px, alto quanto un bersaglio */
.collegamento { display: inline-flex; align-items: center; min-height: var(--bersaglio); padding: 10px 0; font-size: var(--c-menu); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
/* una fila di comandi che va a capo restando staccata */
.azione { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 26px; }

/* ---- Le righe di registro: tabelle ed elenchi ---- */
.registro { width: 100%; border-collapse: collapse; border-spacing: 0; list-style: none; padding: 0; border-top: var(--filo-forte) solid var(--inchiostro); }
.registro caption { caption-side: top; text-align: left; font-size: var(--c-nota); padding: 0 0 8px; }
.registro th, .registro td { padding: 11px 16px 10px 0; border-bottom: var(--filo) solid var(--inchiostro); text-align: left; vertical-align: baseline; height: 48px; }
.registro th:last-child, .registro td:last-child { padding-right: 0; }
.registro thead th { font-size: var(--c-nota); font-weight: 700; height: 40px; }
.registro tbody th { font-family: var(--titoli); font-weight: 700; font-size: 18px; }
.registro .cifra { text-align: right; white-space: nowrap; }
.registro > li, .registro > div { display: flex; align-items: baseline; gap: 6px 16px; min-height: 48px; padding: 11px 0 10px; border-bottom: var(--filo) solid var(--inchiostro); margin: 0; }
/* un collegamento solo dentro la riga prende tutta la riga: il bersaglio è alto quanto lei */
.registro > li > a:only-child { flex: 1; display: flex; align-items: center; min-height: 48px; margin: -11px 0 -10px; padding: 11px 0 10px; text-decoration: none; }
/* la riga segnata dal rombo (la propria in classifica, la tappa attiva) */
.registro .segnata { font-weight: 700; }
/* riga scheletro: alta quanto la riga vera, una barra piatta color golfo al posto del dato */
.attesa { display: inline-block; width: 7ch; max-width: 100%; height: .72em; background: var(--golfo); vertical-align: baseline; }
.attesa.lunga { width: 12ch; }
.attesa.corta { width: 3ch; }

/* ---- L'etichetta piena sulla scena ---- */
.etichetta { display: inline-block; margin: 0; background: var(--carta); color: var(--inchiostro); padding: 3px 9px 4px; font-family: var(--titoli); font-weight: 700; font-style: normal; font-size: 16px; line-height: 1.25; white-space: nowrap; }
.etichetta.acqua { font-style: italic; font-weight: 500; font-size: 19px; }
.etichetta b { font-family: var(--cifre); font-weight: 700; font-size: var(--c-nota); margin-right: 7px; color: var(--rosso); }

/* ---- Il rombo ---- */
.rombo { display: inline-block; flex: none; width: var(--rombo); height: var(--rombo); background: var(--rosso); border: 2px solid var(--carta); transform: rotate(45deg); }
.rombo.spento { background: var(--golfo); }
.rombo.vuoto { background: var(--carta); border-color: var(--inchiostro); border-width: 1px; }
.rombo.piccolo { width: 10px; height: 10px; border-width: 0; }

/* ---- La rosa dei venti con l'ago ---- */
.rosa { display: block; width: 74px; height: 74px; overflow: visible; }
.rosa .ago { transform-box: view-box; transform-origin: 50% 50%; }

/* ---- Il piede ---- */
.piede { margin-top: 24px; }
.piede-dentro { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 40px; padding: 18px var(--margine) 36px; max-width: calc(var(--foglio-max) + 2 * var(--margine)); margin: 0 auto; }
.piede-nome { margin: 0 auto 0 0; font-size: var(--c-nota); line-height: 1.5; max-width: 30em; padding: 10px 0; }
.piede-nome b { display: block; font-family: var(--titoli); font-size: 20px; line-height: 1.2; }
.piede-voci { display: flex; flex-wrap: wrap; gap: 0 26px; margin: 0; padding: 0; list-style: none; max-width: 34em; }
.piede-voci a { display: inline-flex; align-items: center; min-width: var(--bersaglio); min-height: var(--bersaglio); font-size: var(--c-menu); text-decoration: none; white-space: nowrap; }

/* ---- Micro-interazioni ---- */
/* premuto: il comando scende di 2 px (vale anche col dito) */
.comando:active, .collegamento:active, .menu a:active, .marchio:active, .piede-voci a:active { transform: translateY(var(--premuto)); }
.comando[disabled]:active, .comando[aria-disabled="true"]:active { transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .comando, .collegamento, .menu a, .marchio, .piede-voci a { transition: transform var(--secco-durata) var(--secco); }
  .comando .ago { transition: transform var(--ago-comando) var(--ago); }
  /* l'ago della bussola: 0,9 s quando punta una tappa, 1,6 s quando entra e cerca la via di casa */
  .rosa .ago { transition: transform var(--ago-comando) var(--ago); }
  .rosa[data-ago-verso] .ago { transition-duration: var(--ago-ingresso); }
  .salto { transition: transform var(--secco-durata) var(--secco); }
}
@media (hover: hover) and (pointer: fine) {
  .comando.principale:hover .ago { transform: rotate(90deg); }
  .comando:not(.principale):not([disabled]):not([aria-disabled="true"]):hover { background: var(--inchiostro); color: var(--carta); }
  .collegamento:hover, .colonna a:hover { text-decoration-thickness: 2px; }
  .menu a:hover, .piede-voci a:hover { border-bottom-color: var(--inchiostro); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
  .menu a:hover { text-decoration: none; }
  .marchio:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
}

/* ---- Meno movimento: tutto fermo nello stato finale ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---- Schermi stretti ---- */
@media (max-width: 1040px) {
  .coord { display: none; }
  .marchio { margin-right: auto; }
}
@media (max-width: 860px) {
  .avviso { padding-top: 9px; padding-bottom: 9px; }
  .testa { padding-top: 4px; padding-bottom: 4px; gap: 0 18px; }
  .marchio { font-size: 23px; }
  .menu { gap: 0 18px; }
  .foglio { padding-bottom: 32px; }
  .cartiglio > .righello:first-child { margin-bottom: 16px; }
  .azione { gap: 8px 20px; }
  .sezione { padding-top: 32px; }
}
/* sul telefono la testata va su due righe: nome e «Vola» sopra, le quattro voci sotto, larghe quanto il foglio */
@media (max-width: 640px) {
  .testa { flex-wrap: wrap; }
  .testa .comando { order: 2; }
  .menu { order: 3; flex: 1 0 100%; justify-content: space-between; gap: 0 8px; border-top: var(--filo) solid var(--inchiostro); }
  .menu a { padding: 10px 0 8px; }
  .piede-dentro { gap: 6px 24px; }
}
/* le colonne e le voci che sul telefono non ci stanno */
@media (max-width: 520px) {
  .solo-largo { display: none !important; }
  .registro th, .registro td { padding-right: 10px; }
}
@media (max-width: 359px) {
  .menu a { font-size: var(--c-nota); }
}
