/* Hang Book — design system "carta VFR"
   Carta crema e inchiostro come un libretto di volo; arancio manica a vento per
   l'azione principale, magenta delle carte aeronautiche per "adesso" e per ciò
   che è selezionato, blu carta per i link. Angoli quasi vivi, righe sottili,
   numeri in monospazio come sugli strumenti. Tema "notte" opzionale. */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..900&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  color-scheme: light;
  --bg: #F2EDE1;
  --surface: #FBF9F3;
  --surface-2: #F5F1E7;
  --raised: #EAE3D3;
  --line: rgba(46,38,20,.13);
  --line-2: rgba(46,38,20,.26);
  --ink: #1C1A15;
  --ink-2: #4A4539;
  --mute: #6F685A;
  --primary: #1C1A15;          /* bottoni normali: inchiostro */
  --primary-ink: #FBF9F3;
  --accent: #C4410E;           /* arancio manica a vento: l'azione che conta */
  --accent-2: #A3350A;
  --accent-soft: rgba(196,65,14,.10);
  --mark: #A0195E;             /* magenta carta VFR: adesso / selezionato */
  --mark-soft: rgba(160,25,94,.09);
  --link: #1D4C8A;
  --link-soft: rgba(29,76,138,.09);
  --yellow: #9A6400;           /* avvisi */
  --yellow-soft: rgba(196,138,10,.14);
  --red: #B02417;
  --red-soft: rgba(176,36,23,.09);
  --green: #2A7432;
  --green-soft: rgba(42,116,50,.10);
  --rail-bg: #1C1A15;
  --rail-ink: #E9E3D3;
  --rail-mute: #A39B88;
  --display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Menlo, monospace;
  --rail: 236px;
  --r: 4px;
  --r-sm: 3px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #13120F;
  --surface: #1B1A16;
  --surface-2: #211F1A;
  --raised: #2B2922;
  --line: rgba(240,230,205,.10);
  --line-2: rgba(240,230,205,.21);
  --ink: #EEE8D9;
  --ink-2: #C3BBA9;
  --mute: #918977;
  --primary: #EEE8D9;
  --primary-ink: #13120F;
  --accent: #EE6B2F;
  --accent-2: #F5874F;
  --accent-soft: rgba(238,107,47,.14);
  --mark: #E46BA6;
  --mark-soft: rgba(228,107,166,.13);
  --link: #93B8EA;
  --link-soft: rgba(147,184,234,.12);
  --yellow: #E2AE45;
  --yellow-soft: rgba(226,174,69,.13);
  --red: #F06B5E;
  --red-soft: rgba(240,107,94,.12);
  --green: #6CC475;
  --green-soft: rgba(108,196,117,.12);
  --rail-bg: #0D0C0A;
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 400 15.5px/1.5 var(--sans); font-stretch: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0 0 .5rem; font-stretch: 82%; letter-spacing: -.005em; }
h1 { font-size: clamp(1.75rem, 2.7vw, 2.3rem); font-weight: 800; }
h2 { font-size: 1.22rem; font-weight: 750; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 .8rem; }
small, .muted { color: var(--mute); }
.muted { font-size: .9rem; }
strong { font-weight: 650; }
code { font: 500 .88em var(--mono); background: var(--raised); padding: .1em .35em; border-radius: 2px; }
:focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; }
::selection { background: var(--mark-soft); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Etichette in stile carta: maiuscoletto spaziato */
th, .l, legend, label.f, .lab { letter-spacing: .02em; }

/* ── Shell ───────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }
.shell > div { min-width: 0; }
.rail {
  background: var(--rail-bg); color: var(--rail-ink); padding: 1.1rem .8rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: .2rem;
}
.brand { display: flex; align-items: center; gap: .65rem; padding: .3rem .5rem 1.2rem; color: inherit; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand b { font: 850 1.3rem/1 var(--display); font-stretch: 75%; letter-spacing: .01em; text-transform: uppercase; }
.brand small { display: block; color: var(--rail-mute); font-size: .78rem; font-weight: 500; margin-top: .2rem; }
.rail nav a {
  display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border-radius: 2px;
  color: var(--rail-ink); font-weight: 500; font-size: .95rem; opacity: .82; transition: background .12s, opacity .12s;
}
.rail nav a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rail nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; opacity: 1; }
.rail nav a.on { opacity: 1; background: rgba(255,255,255,.08); box-shadow: inset 3px 0 0 var(--accent); font-weight: 650; }
html[data-theme="dark"] .rail nav a.on { box-shadow: inset 3px 0 0 var(--accent); }
.rail .sep { height: 1px; background: rgba(255,255,255,.12); margin: .6rem .4rem; }
.rail .me { margin-top: auto; padding: .8rem .5rem .2rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; gap: .6rem; align-items: center; }
.rail .me .av { background: var(--accent); color: #fff; }
.rail .me b { display: block; font-weight: 600; font-size: .92rem; }
.rail .me small, .rail .me small a { color: var(--rail-mute); font-size: .78rem; }
.rail .me > a { color: var(--rail-mute); font-size: .8rem; margin-left: auto; }
.main { padding: 1.7rem 2.2rem 4rem; min-width: 0; }
.wrap { max-width: 1200px; }

.av {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  background: var(--raised); color: var(--ink); font: 700 .78rem var(--mono);
}
.av.lg { width: 56px; height: 56px; font-size: 1.1rem; }

/* Mobile */
.topbar { display: none; }
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .topbar {
    display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; background: var(--rail-bg);
    color: var(--rail-ink); position: sticky; top: 0; z-index: 20;
  }
  .topbar b { font: 850 1.1rem var(--display); font-stretch: 75%; text-transform: uppercase; }
  .topbar .sp { margin-left: auto; }
  .topbar a, .topbar .muted { color: var(--rail-mute) !important; font-size: .9rem; }
  .main { padding: 1rem 1rem 5.5rem; }
  .tabs {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--surface);
    border-top: 1px solid var(--line-2); display: grid; grid-auto-flow: column; padding: .3rem 0 calc(.3rem + env(safe-area-inset-bottom));
  }
  .tabs a { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .35rem 0; font-size: .68rem; color: var(--mute); }
  .tabs a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabs a.on { color: var(--accent); font-weight: 650; }
}
@media (min-width: 881px) { .tabs { display: none; } }

/* ── Page head ───────────────────────────────────────────── */
.ph { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 2px solid var(--ink); }
.ph h1 { margin: 0; }
.ph .sub { color: var(--ink-2); margin: .25rem 0 0; }
.ph .acts { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── Buttons & forms ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--primary); color: var(--primary-ink); border: 1px solid var(--primary);
  font: 600 .92rem var(--sans); padding: .55rem 1rem; border-radius: var(--r-sm); cursor: pointer;
  transition: background .12s, color .12s, border-color .12s; white-space: nowrap;
}
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); text-decoration: none; color: var(--primary-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--ink); color: var(--ink); }
.btn.danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn.danger:hover { background: var(--red-soft); }
.btn.yellow { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.yellow:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn.sm { padding: .32rem .65rem; font-size: .84rem; }
.btn.lg { padding: .78rem 1.35rem; font-size: 1rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

label.f { display: block; font-weight: 600; font-size: .86rem; margin-bottom: .3rem; color: var(--ink-2); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=time],
input[type=email], input[type=tel], input[type=month], input[type=color], input[type=file], select, textarea {
  width: 100%; font: 400 .98rem var(--sans); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: .55rem .7rem;
}
input[type=color] { padding: .2rem; height: 40px; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: 2px solid var(--mark-soft); outline-offset: 0; }
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 1rem; }
.field .hint { font-size: .82rem; color: var(--mute); margin-top: .3rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: .55rem; font-size: .95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.form-acts { display: flex; gap: .6rem; margin-top: 1.4rem; align-items: center; flex-wrap: wrap; }
fieldset { border: 0; padding: 0; margin: 0 0 1.6rem; }
legend { font: 750 1.05rem var(--display); font-stretch: 82%; margin-bottom: .9rem; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips label { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line-2); border-radius: 2px; padding: .3rem .7rem .3rem .5rem; cursor: pointer; background: var(--surface); font-size: .9rem; }
.chips label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--primary-ink); font-weight: 600; }
.chips input { accent-color: var(--ink); }

/* ── Panels & tables ─────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 1.15rem 1.3rem; margin-bottom: 1.2rem; }
.panel > h2:first-child, .panel .ph2 { margin-bottom: .9rem; }
.ph2 { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.ph2 h2 { margin: 0; }
.ph2 .acts { margin-left: auto; display: flex; gap: .4rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
.cols.w { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 900px) { .cols, .cols.w { grid-template-columns: 1fr; } }

table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font: 600 .7rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--mute); padding: .5rem .6rem; border-bottom: 1px solid var(--ink); }
td { padding: .58rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; }
td.n { font-family: var(--mono); font-size: .88rem; }
tbody tr:hover td { background: var(--surface-2); }
.tbl { overflow-x: auto; }
.row-link td a.cover { color: inherit; }
.row-link:hover td a.cover { text-decoration: none; }

.tag { display: inline-block; font: 600 .72rem/1.5 var(--sans); padding: .08rem .45rem; border-radius: 2px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2); white-space: nowrap; }
.tag[style*="border-color"] { font-family: var(--mono); border-left-width: 4px; }
.tag.blue { background: var(--link-soft); color: var(--link); border-color: transparent; }
.tag.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.tag.red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.tag.yellow { background: var(--yellow-soft); color: var(--yellow); border-color: transparent; }
.pos { color: var(--green); font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }

.notice { padding: .75rem 1rem; border-radius: var(--r-sm); margin-bottom: 1rem; border: 1px solid var(--line-2); border-left: 4px solid; font-size: .95rem; background: var(--surface); color: var(--ink); }
.notice.ok { border-left-color: var(--green); background: var(--green-soft); }
.notice.error { border-left-color: var(--red); background: var(--red-soft); }
.notice.warn { border-left-color: var(--yellow); background: var(--yellow-soft); }
.notice.info { border-left-color: var(--link); background: var(--link-soft); }
.notice ul { margin: .3rem 0 0 1.1rem; padding: 0; }

.empty { text-align: center; padding: 2rem 1rem; color: var(--ink-2); border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty b { display: block; font-family: var(--display); font-stretch: 82%; font-size: 1.05rem; color: var(--ink); margin-bottom: .3rem; }

/* ── Numbers row ─────────────────────────────────────────── */
.nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); margin-bottom: 1.2rem; overflow: hidden; }
.nums > div { padding: .85rem 1.1rem; border-right: 1px solid var(--line); }
.nums > div:last-child { border-right: 0; }
.nums .v { font: 600 1.45rem/1.15 var(--mono); letter-spacing: -.02em; }
.nums .l { font-size: .8rem; color: var(--mute); margin-top: .25rem; }
.nums .v.neg { color: var(--red); } .nums .v.pos { color: var(--green); }
@media (max-width: 700px) { .nums > div { border-right: 0; border-bottom: 1px solid var(--line); } .nums > div:last-child { border-bottom: 0; } }

/* ── Flight-strip board (calendar) ───────────────────────── */
.board { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; margin-bottom: 1.2rem; }
.board-head { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.board-head h2 { margin: 0; }
.board-head .nav { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.board-head .nav a { padding: .35rem .7rem; color: var(--ink); font-weight: 600; font-size: .88rem; border-right: 1px solid var(--line-2); }
.board-head .nav a:last-child { border-right: 0; }
.board-head .nav a:hover { background: var(--surface-2); text-decoration: none; }
.board-head .seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 2px; }
.board-head .seg a { padding: .22rem .7rem; border-radius: 2px; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.board-head .seg a.on { background: var(--ink); color: var(--primary-ink); }
.board-head .acts { margin-left: auto; }
.board-scroll { overflow-x: auto; }
.day { border-bottom: 1px solid var(--line-2); }
.day:last-child { border-bottom: 0; }
.day-title { padding: .55rem 1rem .4rem; font: 700 .95rem var(--display); font-stretch: 82%; color: var(--ink-2); display: flex; gap: .6rem; align-items: baseline; }
.day-title.today { color: var(--mark); }
.day-title.today::before { content: ""; width: 8px; height: 8px; background: var(--mark); display: inline-block; transform: rotate(45deg); }
.strip { display: grid; grid-template-columns: 150px 1fr; border-top: 1px solid var(--line); min-height: 46px; }
.strip .ac { padding: .5rem .9rem; display: flex; align-items: center; gap: .5rem; border-right: 1px solid var(--line-2); background: var(--surface-2); }
.strip .ac i { width: 10px; height: 10px; border-radius: 1px; flex: none; }
.strip .ac b { font: 600 .82rem var(--mono); white-space: nowrap; }
.strip .ac small { color: var(--mute); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .lane { position: relative; min-width: 560px; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: calc(100% / var(--slots)) 100%; }
.strip .lane.free:hover { background-color: var(--mark-soft); }
.strip .lane .add { position: absolute; inset: 0; display: block; }
.slot {
  position: absolute; top: 5px; bottom: 5px; border-radius: 2px; padding: .25rem .5rem; overflow: hidden;
  color: #fff; font-size: .8rem; line-height: 1.2; white-space: nowrap; text-overflow: ellipsis;
  border-left: 3px solid rgba(0,0,0,.3);
}
.slot b { font-weight: 650; display: block; }
.slot small { color: inherit; opacity: .85; font-size: .72rem; }
.slot:hover { filter: brightness(1.08); text-decoration: none; color: #fff; }
.slot.mine { outline: 2px solid var(--ink); outline-offset: -2px; }
.slot.maint { background: repeating-linear-gradient(135deg, #8E877A 0 6px, #7A7366 6px 12px) !important; }
.hours-axis { display: grid; grid-template-columns: 150px 1fr; }
.hours-axis .lane { display: grid; grid-template-columns: repeat(var(--slots), 1fr); min-width: 560px; }
.hours-axis .lane span { font: 500 .7rem var(--mono); color: var(--mute); padding: .3rem 0 .2rem .3rem; border-left: 1px solid var(--line); }
.now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--mark); z-index: 2; pointer-events: none; }
.now-line::before { content: ""; position: absolute; top: -1px; left: -4px; border: 5px solid transparent; border-top-color: var(--mark); }

/* ── Timeline list (dashboard today) ─────────────────────── */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 56px 4px 1fr auto; gap: .8rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.tl li:last-child { border-bottom: 0; }
.tl .t { font: 600 .9rem var(--mono); }
.tl .bar { width: 4px; min-width: 0; height: 34px; border-radius: 1px; }
.tl .who b { display: block; font-weight: 600; }
.tl .who small { color: var(--mute); }
.tl li.past { opacity: .5; }

/* ── Alerts list ─────────────────────────────────────────── */
.alerts { list-style: none; margin: 0; padding: 0; }
.alerts li { display: flex; gap: .7rem; align-items: baseline; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.alerts li:last-child { border-bottom: 0; }
.alerts .dot { width: 8px; height: 8px; flex: none; position: relative; top: -1px; transform: rotate(45deg); }
.alerts .dot.danger { background: var(--red); } .alerts .dot.warn { background: var(--yellow); }
.alerts small { color: var(--mute); margin-left: auto; white-space: nowrap; }

/* ── Spark (14 days) ─────────────────────────────────────── */
.spark { display: flex; align-items: flex-end; gap: 3px; height: 44px; border-bottom: 1px solid var(--ink); margin-bottom: .3rem; }
.spark span { flex: 1; background: var(--ink); min-height: 2px; }
.spark span.zero { background: var(--line-2); }

/* ── Progress ────────────────────────────────────────────── */
.prog { height: 6px; background: var(--raised); overflow: hidden; }
.prog > i { display: block; height: 100%; background: var(--ink); }
.prog.warn > i { background: var(--yellow); } .prog.danger > i { background: var(--red); }

/* ── Password reveal ─────────────────────────────────────── */
.secret { background: var(--yellow-soft); border: 1px solid var(--line-2); border-left: 4px solid var(--yellow); border-radius: var(--r); padding: 1rem 1.2rem; margin-bottom: 1.2rem; }
.cred { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: .6rem 0; font-size: 1.05rem; }
.cred code { font-size: 1.1rem; padding: .25rem .6rem; background: var(--surface); border: 1px solid var(--ink); color: var(--ink); }

/* ── Login ───────────────────────────────────────────────── */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .art { background: var(--surface-2); color: var(--ink); padding: 2.6rem 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; border-right: 1px solid var(--line-2); }
.login .art > * { position: relative; z-index: 1; }
.login .art .chart { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .32; }
.login .art h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 850; font-stretch: 70%; text-transform: uppercase; line-height: .98; max-width: 12ch; }
.login .art p { color: var(--ink-2); max-width: 40ch; font-size: 1.05rem; }
.login .art small { color: var(--mute); }
.login .form { display: grid; place-items: center; padding: 2rem; background: var(--surface); }
.login .form > div { width: 100%; max-width: 380px; }
@media (max-width: 800px) { .login { grid-template-columns: 1fr; } .login .art { padding: 1.6rem 1.25rem; min-height: 0; gap: 1.4rem; border-right: 0; border-bottom: 1px solid var(--line-2); } }

/* ── Quiz ────────────────────────────────────────────────── */
.q { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 1.1rem 1.3rem; margin-bottom: .9rem; }
.q .qn { font: 600 .74rem var(--mono); color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.q .qt { font-size: 1.05rem; font-weight: 600; margin: .3rem 0 .8rem; }
.q label.opt { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem .7rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); margin-bottom: .4rem; cursor: pointer; }
.q label.opt:has(input:checked) { border-color: var(--ink); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--mark); }
.q label.opt.right { border-color: var(--green); background: var(--green-soft); }
.q label.opt.wrong { border-color: var(--red); background: var(--red-soft); }
.q label.opt input { margin-top: .25rem; accent-color: var(--ink); }
.q .k { font: 600 .95rem var(--mono); width: 1.2rem; flex: none; }
.score { font: 600 3rem/1 var(--mono); letter-spacing: -.04em; }

/* ── Misc ────────────────────────────────────────────────── */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.2rem; font-size: .93rem; }
.kv dt { color: var(--mute); } .kv dd { margin: 0; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.filters a, .filters button { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: 600 .84rem var(--sans); padding: .32rem .72rem; border-radius: 2px; cursor: pointer; }
.filters a.on { background: var(--ink); border-color: var(--ink); color: var(--primary-ink); }
.filters a:hover { text-decoration: none; border-color: var(--ink); }
.inline-form { display: inline; }
.stack > * + * { margin-top: .6rem; }
.hr { height: 1px; background: var(--line); margin: 1rem 0; }
.req { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .9rem; border-radius: var(--r-sm); background: var(--yellow-soft); border: 1px solid var(--line-2); border-left: 4px solid var(--yellow); font-size: .93rem; margin-bottom: 1rem; }

/* ── METAR della base ───────────────────────────────────── */
.metar { display: flex; align-items: center; gap: 1.3rem; flex-wrap: wrap; padding: .55rem 1rem; margin-bottom: 1.3rem; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); font-family: var(--mono); font-size: .9rem; }
.metar .ic { font: 600 1rem var(--mono); letter-spacing: .06em; color: var(--mark); }
.metar span small { display: block; font: 500 .66rem var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--mute); line-height: 1; margin-bottom: .2rem; }
.metar code { margin-left: auto; font-size: .74rem; color: var(--mute); background: transparent; max-width: 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) { .metar code { display: none; } }

/* ── Transizioni ─────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .main > .wrap { animation: rise .25s ease-out both; }
  .tl li { transition: background .12s ease; }
  .tl li:hover { background: var(--surface-2); }
}
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── Trascina per prenotare ─────────────────────────────── */
.strip .lane[data-drag] { cursor: crosshair; touch-action: none; }
.strip .lane[data-drag] .add { pointer-events: none; }
.slot.ghost { background: var(--mark-soft) !important; border: 2px dashed var(--mark); color: var(--mark); font-weight: 700; display: grid; place-items: center; pointer-events: none; z-index: 3; }
.drag-hint { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--primary-ink); font-weight: 600; padding: .6rem 1rem; border-radius: 2px; z-index: 50; font-size: .9rem; }
@media (max-width: 880px) { .drag-hint { bottom: 5.5rem; } }

/* ── Primi passi ────────────────────────────────────────── */
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .7rem; }
.setup-steps li { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; padding: .75rem .9rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); }
.setup-steps li.done { opacity: .55; }
.setup-steps .chk { width: 28px; height: 28px; border: 1px solid var(--ink); display: grid; place-items: center; font: 600 .82rem var(--mono); color: var(--ink); }
.setup-steps li.done .chk { background: var(--ink); color: var(--primary-ink); }
.setup-steps b { display: block; font-size: .93rem; }
.setup-steps small { color: var(--mute); display: block; line-height: 1.3; }

/* ── Cassa: barre mensili ───────────────────────────────── */
.bars2 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 150px; border-bottom: 1px solid var(--ink); }
.bar2 { display: flex; flex-direction: column; align-items: center; height: 100%; }
.bar2 .cols2 { flex: 1; display: flex; align-items: flex-end; gap: 2px; width: 100%; }
.bar2 .cols2 span { flex: 1; min-height: 2px; }
.bar2 .i { background: var(--green); } .bar2 .o { background: var(--red); }
.bar2 small { font: 500 .68rem var(--mono); color: var(--mute); margin-top: .3rem; }
.legend { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--mute); }
.legend .sw { width: 10px; height: 10px; display: inline-block; }

/* Piattaforma: lista "da seguire" */
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { padding: .55rem 0; border-bottom: 1px solid var(--line); display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.todo li:last-child { border-bottom: 0; }
.todo li a { margin-left: auto; font-size: .85rem; }

/* Velivolo in manutenzione nel calendario */
.lane.maint-lane { background: repeating-linear-gradient(135deg, var(--line) 0 6px, transparent 6px 12px); opacity: .6; }
.maint-plan td { vertical-align: middle; }
.bar { height: 6px; background: var(--raised); overflow: hidden; min-width: 90px; }
.bar > i { display: block; height: 100%; background: var(--green); }
.bar.warn > i { background: var(--yellow); } .bar.due > i { background: var(--red); }

.hide { display: none !important; }

/* ── Licenze (una riga ciascuna) ────────────────────────── */
.lic-rows { display: grid; gap: .5rem; margin-bottom: .6rem; }
.lic-head, .lic-row { display: grid; grid-template-columns: 1.2fr 1fr 170px 38px; gap: .6rem; align-items: center; }
.lic-head span { font-weight: 600; font-size: .86rem; color: var(--ink-2); }
.lic-row .lic-del { padding: .35rem 0; }
@media (max-width: 700px) {
  .lic-head { display: none; }
  .lic-row { grid-template-columns: 1fr 1fr; padding: .6rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); }
  .lic-row input[type=date] { grid-column: 1; }
}

/* ── File (materiale di studio, documenti dei soci) ─────── */
.mats { display: grid; gap: .3rem; min-width: 220px; }
.mat { display: flex; align-items: center; gap: .45rem; font-size: .88rem; }
.mat a { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); min-width: 0; }
.mat a:hover { color: var(--link); }
.mat .x { background: none; border: 0; color: var(--mute); cursor: pointer; padding: 0 .2rem; font-size: .8rem; }
.mat .x:hover { color: var(--red); }
.ext { font: 600 .6rem var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: .1rem .3rem; border: 1px solid var(--line-2); color: var(--ink-2); flex: none; }
.ext.pdf { border-color: var(--red); color: var(--red); }
.ext.pptx, .ext.ppt { border-color: var(--accent); color: var(--accent); }
.ext.jpg, .ext.jpeg, .ext.png { border-color: var(--link); color: var(--link); }
.mat-up { margin-top: .2rem; }
.mat-up label { cursor: pointer; }
.mat-up .busy-txt { display: none; font-size: .82rem; }
.mat-up.busy label { display: none; } .mat-up.busy .busy-txt { display: inline; }
.docs { list-style: none; margin: 0; padding: 0; }
.docs li { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.docs li:last-child { border-bottom: 0; }
.docs b { display: block; font-weight: 600; font-size: .93rem; }
.docs small { color: var(--mute); }
.docs .acts { display: flex; gap: .3rem; }
.doc-up { display: grid; grid-template-columns: 1fr 160px; gap: .6rem; align-items: end; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line-2); }
.doc-up .wide { grid-column: 1 / -1; }
.doc-up .field { margin: 0; }
@media (max-width: 700px) { .doc-up { grid-template-columns: 1fr; } }
.quota { font: 500 .78rem var(--mono); color: var(--mute); }

/* ── Il club nel mese (home segreteria) ─────────────────── */
.club-month .nums { background: var(--surface-2); }
.nums .v.warn-v { color: var(--yellow); }
.dbar { position: relative; height: 14px; background: var(--raised); overflow: hidden; min-width: 120px; }
.dbar i { position: absolute; left: 0; }
.dbar i.b { top: 0; bottom: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--ink-2); background-image: repeating-linear-gradient(135deg, var(--line-2) 0 2px, transparent 2px 5px); }
.dbar i.f { top: 4px; bottom: 4px; background: var(--ink); }
.lg-b, .lg-f { display: inline-block; width: 12px; height: 8px; vertical-align: middle; }
.lg-b { box-shadow: inset 0 0 0 1px var(--ink-2); background-image: repeating-linear-gradient(135deg, var(--line-2) 0 2px, transparent 2px 5px); } .lg-f { background: var(--ink); }

/* ── Interruttore tema ──────────────────────────────────── */
.theme-btn { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 1px solid rgba(255,255,255,.2); color: var(--rail-ink); border-radius: 2px; padding: .3rem .65rem; font: 500 .8rem var(--sans); cursor: pointer; opacity: .85; }
.theme-btn:hover { background: rgba(255,255,255,.08); opacity: 1; }
.theme-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rail .theme-btn { margin: .4rem .5rem .5rem; align-self: flex-start; }
.topbar .theme-btn { padding: .3rem .45rem; } .topbar .theme-btn span { display: none !important; }
.theme-btn .sun { display: none; }
html[data-theme="dark"] .theme-btn .sun { display: inline; } html[data-theme="dark"] .theme-btn .moon { display: none; }

/* ═══ Sito pubblico ═══════════════════════════════════════ */
.site { min-height: 100vh; display: flex; flex-direction: column; position: relative; }
.site-head { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 2rem; max-width: 1240px; width: 100%; margin: 0 auto; position: relative; z-index: 5; }
.site-head .brand { padding: 0; color: var(--ink); }
.site-head nav { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; }
.site-head nav a { color: var(--ink); font-weight: 500; font-size: .95rem; }
.site-head nav a.btn { color: #fff; }
.site-main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 2rem 3rem; }
.site-foot { border-top: 2px solid var(--ink); padding: 1.2rem 2rem; display: flex; gap: 1rem; flex-wrap: wrap; color: var(--mute); font-size: .88rem; max-width: 1240px; width: 100%; margin: 0 auto; }
.site-foot nav { margin-left: auto; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.site-foot a { color: var(--ink-2); }
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 52ch; }
.cta { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin: 1.6rem 0 .6rem; }
.cta .more { font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--ink); padding-bottom: 1px; }
.cta .more:hover { text-decoration: none; color: var(--accent); border-color: var(--accent); }
.kicker { display: inline-flex; align-items: center; gap: .6rem; font: 500 .78rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mark); margin-bottom: 1.2rem; }
.kicker::before { content: ""; width: 9px; height: 9px; border: 2px solid var(--mark); transform: rotate(45deg); }

/* Hero: una carta VFR dietro al titolo */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2rem; align-items: center; min-height: 600px; padding: 2.5rem 0 0; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 5.4rem); font-weight: 850; font-stretch: 66%; text-transform: uppercase; line-height: .93; letter-spacing: -.005em; margin-bottom: 1.4rem; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .chart { width: 100%; height: auto; display: block; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 2.6rem; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); grid-column: 1 / -1; }
.facts > div { padding: .8rem 1rem .9rem 0; border-right: 1px solid var(--line-2); }
.facts > div + div { padding-left: 1rem; }
.facts > div:last-child { border-right: 0; }
.facts b { display: block; font: 600 1.6rem/1.1 var(--mono); letter-spacing: -.03em; }
.facts span { font-size: .85rem; color: var(--ink-2); }

.sec { padding: 4.5rem 0; border-bottom: 1px solid var(--line-2); }
.sec-h { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; margin-bottom: 2.2rem; align-items: baseline; }
.sec-h .n { font: 500 .8rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.sec-h h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); font-weight: 850; font-stretch: 70%; text-transform: uppercase; line-height: 1; margin: 0; }
.sec-h p { grid-column: 2; color: var(--ink-2); font-size: 1.05rem; max-width: 60ch; margin: .8rem 0 0; }
.strips-demo .board { margin: 0 0 0 calc(220px + 2rem); }
.strips-demo .strip { min-height: 52px; }

/* Funzioni come una checklist pre-volo */
.checklist { list-style: none; margin: 0 0 0 calc(220px + 2rem); padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 3rem; counter-reset: c; }
.checklist li { counter-increment: c; display: grid; grid-template-columns: 2.6rem 1fr; padding: 1.1rem 0; border-top: 1px solid var(--line-2); }
.checklist li::before { content: counter(c, decimal-leading-zero); font: 500 .85rem var(--mono); color: var(--mark); padding-top: .2rem; }
.checklist h3 { font-size: 1.08rem; margin-bottom: .3rem; }
.checklist p { color: var(--ink-2); font-size: .95rem; margin: 0; }

.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 2.4rem calc(220px + 2rem); padding: 0; border-top: 2px solid var(--ink); }
.steps li { counter-increment: s; padding: 1.1rem 1.4rem 0 0; position: relative; }
.steps li::before { content: counter(s); display: block; font: 600 2.4rem/1 var(--mono); color: var(--accent); margin-bottom: .6rem; }
.steps b { display: block; font-family: var(--display); font-stretch: 82%; font-size: 1.1rem; margin-bottom: .25rem; }
.steps span { color: var(--ink-2); font-size: .94rem; }
.how .go { margin-left: calc(220px + 2rem); }

.pricing { padding: 2.5rem 0; }
.pricing h1 { font-stretch: 70%; text-transform: uppercase; font-size: clamp(2rem, 4vw, 3rem); }
.pricing .lede { margin: 0 0 2rem; }
.price-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 1.2rem; margin: 1.5rem 0; }
.price-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 1.5rem; display: flex; flex-direction: column; gap: .4rem; }
.price-card.pick { border: 2px solid var(--ink); }
.price-card .amt { font: 600 2.4rem/1 var(--mono); letter-spacing: -.04em; margin: .3rem 0; }
.price-card .amt small { font: 500 1rem var(--sans); color: var(--mute); letter-spacing: 0; }
.price-card p { color: var(--ink-2); font-size: .93rem; flex: 1; }
.list { padding-left: 1.2rem; margin: .4rem 0 .8rem; }
.list li { margin-bottom: .35rem; }
.list.num { counter-reset: n; list-style: decimal; }
.signup { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; padding: 2.5rem 0; align-items: start; }
.install { max-width: 1100px; }
.install-now { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: space-between; border: 2px solid var(--ink); }
@media (max-width: 1000px) { .install-grid { grid-template-columns: 1fr; } }

.rv { opacity: 0; transform: translateY(14px); }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .site-head { padding: .8rem 1rem; flex-wrap: wrap; }
  .site-head nav { gap: .9rem; font-size: .9rem; width: 100%; margin: 0; flex-wrap: wrap; }
  .site-head nav a.btn { display: none; }
  .site-main { padding: 0 1rem 2rem; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 1rem; }
  .hero .chart { max-height: 300px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:nth-child(2) { border-right: 0; }
  .facts > div:nth-child(3) { padding-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .sec { padding: 3rem 0; }
  .sec-h { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
  .sec-h p { grid-column: 1; }
  .strips-demo .board, .checklist, .steps, .how .go { margin-left: 0; }
  .checklist { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .signup, .price-cards { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ── Carta VFR (SVG) ─────────────────────────────────────── */
.chart .contour { fill: none; stroke: #B9A77C; stroke-width: 1; opacity: .55; }
.chart .relief { fill: #E6DCC2; opacity: .55; }
.chart .water { fill: #C9DCE3; }
.chart .river { fill: none; stroke: #8FB3C2; stroke-width: 2; }
.chart .road { fill: none; stroke: #C4410E; stroke-width: 1.2; opacity: .55; }
.chart .ctr { fill: rgba(160,25,94,.05); stroke: #A0195E; stroke-width: 2; stroke-dasharray: 10 6; }
.chart .atz { fill: none; stroke: #1D4C8A; stroke-width: 1.4; }
.chart .route { fill: none; stroke: #1C1A15; stroke-width: 2.2; }
.chart .tick { stroke: #1C1A15; stroke-width: 1.5; }
.chart .lbl { font: 600 13px 'IBM Plex Mono', monospace; fill: #1C1A15; }
.chart .lbl.m { fill: #A0195E; }
.chart .lbl.b { fill: #1D4C8A; }
.chart .lbl.s { font-size: 11px; font-weight: 500; }
.chart .apt { fill: #1D4C8A; }
.chart .plane { fill: #C4410E; }
html[data-theme="dark"] .chart .relief { fill: #2A271F; }
html[data-theme="dark"] .chart .contour { stroke: #6B6047; }
html[data-theme="dark"] .chart .water { fill: #1F2B30; }
html[data-theme="dark"] .chart .route, html[data-theme="dark"] .chart .tick { stroke: #EEE8D9; }
html[data-theme="dark"] .chart .lbl { fill: #EEE8D9; }
html[data-theme="dark"] .chart .lbl.m { fill: #E46BA6; } html[data-theme="dark"] .chart .ctr { stroke: #E46BA6; }
html[data-theme="dark"] .chart .lbl.b, html[data-theme="dark"] .chart .apt { fill: #93B8EA; } html[data-theme="dark"] .chart .atz { stroke: #93B8EA; }
@media (prefers-reduced-motion: no-preference) {
  .chart .route { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.4s .3s ease-out forwards; }
  .chart .plane-g { opacity: 0; animation: appear .4s 2.5s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
