/* GestioneAgricola — interfaccia mobile-first, colori e caratteri del manuale di identità visiva */
@font-face { font-family: "Manrope"; src: url("../fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* Palette del brand */
  --bosco: #063823;
  --campo: #2D711A;
  --germoglio: #65A630;
  --avorio: #F5F5EB;
  --inchiostro: #19251D;
  /* Ruoli */
  --bg: var(--avorio);
  --surface: #ffffff;
  --surface-2: #eeeee2;
  --ink: var(--inchiostro);
  --ink-2: #57614f;
  --line: #e0e0d0;
  --green: var(--bosco);       /* testo forte, titoli */
  --green-2: var(--campo);     /* link, valori positivi, pulsanti */
  --green-soft: #e4efd8;
  --nav-bg: var(--bosco);
  --nav-ink: rgba(245, 245, 235, .82);
  /* Colori funzionali (stati e dati), non di brand */
  --earth: #a65f2c;
  --earth-soft: #f6e7da;
  --warn: #8a6100;
  --warn-soft: #faefcf;
  --bad: #a3321f;
  --bad-soft: #f8e1db;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(6, 56, 35, .05), 0 6px 18px rgba(6, 56, 35, .05);
  --nav-w: 240px;
  --top-h: 62px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Manrope", "Inter", system-ui, sans-serif;
  font-size: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1611; --surface: #142019; --surface-2: #1c2a21; --ink: #ebefe2; --ink-2: #a7b19f;
    --line: #2a3a2f; --green: #e8efdc; --green-2: #86c254; --green-soft: #1f3322; --nav-bg: #0a2618;
    --earth: #dc8c55; --earth-soft: #3a2a1f; --warn: #e3b552; --warn-soft: #3a3120; --bad: #ec8a74; --bad-soft: #3d2420;
    --shadow: none;
  }
  .logo .w1 { color: var(--avorio) !important; }
  .logo .w2 { color: var(--germoglio) !important; }
  .logo-mark path:nth-child(1) { fill: var(--campo); }
  .logo-mark path:nth-child(2) { fill: #3f8a22; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-body); background: var(--bg); color: var(--ink); line-height: 1.55; -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-2); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 750; line-height: 1.2; letter-spacing: -.015em; color: var(--green); }
h2 { font-size: 1.2rem; margin: 1.7rem 0 .7rem; }
h3 { font-size: 1.02rem; margin: 1rem 0 .5rem; }
small, .muted { color: var(--ink-2); }
img { max-width: 100%; }
svg.i { width: 20px; height: 20px; flex: 0 0 auto; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; }
.logo-mark { width: 30px; height: 30px; flex: 0 0 auto; }
.logo-word { font-family: var(--font-head); font-weight: 800; font-size: 1.32rem; letter-spacing: -.035em; line-height: 1; white-space: nowrap; }
.logo .w1 { color: var(--bosco); }
.logo .w2 { color: var(--campo); }
.logo.big .logo-mark { width: 52px; height: 52px; }
.logo.big .logo-word { font-size: 2.3rem; }

/* ---------- Barra superiore e navigazione ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; gap: .8rem; padding: 0 1.2rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar .brand { text-decoration: none; display: flex; }
.farm-name { margin-left: auto; font-size: .9rem; color: var(--ink-2); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip {
  width: 36px; height: 36px; border-radius: 50%; background: var(--bosco); color: var(--avorio);
  display: grid; place-items: center; text-decoration: none; font-family: var(--font-head); font-weight: 700;
}
.menu-btn { display: none; background: none; border: 0; color: var(--green); padding: .3rem; cursor: pointer; }
.menu-btn svg.i { width: 26px; height: 26px; }

.shell { display: flex; min-height: calc(100vh - var(--top-h)); }
.sidenav {
  width: var(--nav-w); flex: 0 0 var(--nav-w); background: var(--nav-bg);
  padding: 1rem .7rem; position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
}
.sidenav a {
  display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 10px;
  color: var(--nav-ink); text-decoration: none; font-weight: 500; font-size: .94rem;
}
.sidenav a:hover { background: rgba(245, 245, 235, .08); color: #fff; }
.sidenav a.active { background: var(--campo); color: #fff; font-weight: 600; }
.sidenav a.active svg.i { color: #fff; }
.sidenav svg.i { color: var(--germoglio); }
.nav-foot { margin-top: auto; border-top: 1px solid rgba(245, 245, 235, .14); padding-top: .6rem; }
.nav-scrim { display: none; }
.content { flex: 1; min-width: 0; padding: 1.6rem 1.8rem 6rem; max-width: 1180px; }
.bottomnav { display: none; }

@media (max-width: 860px) {
  :root { --top-h: 56px; }
  .menu-btn { display: block; }
  .topbar { padding: 0 .8rem; gap: .5rem; }
  .logo-word { font-size: 1.12rem; }
  .logo-mark { width: 26px; height: 26px; }
  .user-chip { margin-left: auto; }
  .sidenav {
    position: fixed; left: 0; top: var(--top-h); bottom: 0; height: auto; z-index: 40;
    transform: translateX(-105%); transition: transform .2s ease;
  }
  body.nav-open .sidenav { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: var(--top-h) 0 0 0; background: rgba(6, 56, 35, .35); z-index: 35; }
  .content { padding: 1.1rem 1rem 6.5rem; }
  .bottomnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: .3rem .2rem calc(.3rem + env(safe-area-inset-bottom));
  }
  .bottomnav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: .15rem;
    color: var(--ink-2); text-decoration: none; font-size: .72rem; padding: .25rem 0;
  }
  .bottomnav a .ico { height: 24px; display: grid; place-items: center; }
  .bottomnav a svg.i { width: 23px; height: 23px; }
  .bottomnav a.active { color: var(--green-2); font-weight: 650; }
  .bottomnav a.cta .ico {
    background: var(--campo); color: #fff; width: 54px; height: 54px; border-radius: 50%;
    margin-top: -24px; box-shadow: 0 4px 14px rgba(45, 113, 26, .4); border: 3px solid var(--surface);
  }
  .farm-name { display: none; }
}

/* ---------- Intestazione pagina ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.65rem; margin: 0; letter-spacing: -.025em; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- Bottoni ---------- */
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--campo); color: #fff; border: 1px solid var(--campo); border-radius: 10px;
  padding: .62rem 1rem; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none;
  min-height: 44px; line-height: 1.2; font-family: var(--font-head); letter-spacing: -.005em;
}
.btn:hover { background: var(--bosco); border-color: var(--bosco); }
.btn.secondary { background: var(--surface); color: var(--green-2); border-color: var(--line); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.earth { background: var(--germoglio); border-color: var(--germoglio); color: var(--bosco); }
.btn.earth:hover { background: var(--campo); border-color: var(--campo); color: #fff; }
.btn.danger { background: var(--surface); color: var(--bad); border-color: var(--bad-soft); }
.btn.small { min-height: 34px; padding: .35rem .7rem; font-size: .85rem; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; color: var(--bad); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }

/* ---------- Schede ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 860px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.stat-label { font-size: .8rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-family: var(--font-head); font-size: 1.5rem; font-weight: 750; color: var(--green); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-hint { font-size: .8rem; color: var(--ink-2); }
.pos { color: var(--green-2); } .neg { color: var(--bad); }

/* ---------- Avvisi ---------- */
.alert { border-radius: 10px; padding: .75rem 1rem; margin: 0 0 1rem; border: 1px solid; }
.alert-ok { background: var(--green-soft); border-color: transparent; color: var(--green); }
.alert-err { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.alert-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.alert-info { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.badge { display: inline-block; font-size: .75rem; font-weight: 650; padding: .12rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--green-soft); color: var(--green); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.earth { background: var(--earth-soft); color: var(--earth); }
ul.notices { list-style: none; padding: 0; margin: 0; }
ul.notices li { padding: .55rem 0; border-bottom: 1px solid var(--line); display: flex; gap: .6rem; align-items: baseline; }
ul.notices li:last-child { border: 0; }

/* ---------- Tabelle ---------- */
.table-wrap { position: relative; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { padding: .62rem .8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); background: var(--surface-2); font-weight: 650; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.clickable { cursor: pointer; }
tfoot td { font-weight: 700; background: var(--surface-2); }

/* ---------- Moduli ---------- */
form.form { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.fld { flex: 1 1 100%; margin-bottom: .9rem; min-width: 0; }
.fld.half { flex: 1 1 calc(50% - .5rem); }
.fld.third { flex: 1 1 calc(33% - .7rem); }
@media (max-width: 600px) { .fld.half, .fld.third { flex-basis: 100%; } }
.fld label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; }
.fld.check label { display: flex; gap: .5rem; align-items: center; font-weight: 500; padding-top: 1.6rem; }
.fld.check input { width: 20px; height: 20px; }
.req { color: var(--bad); }
.help { display: block; margin-top: .25rem; font-size: .8rem; color: var(--ink-2); }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=search], input[type=file], select, textarea {
  width: 100%; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; min-height: 44px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--germoglio) 45%, transparent); border-color: var(--campo); }
.form-actions { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding-top: .4rem; }
.form-actions .spacer { flex: 1; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.filters input, .filters select { width: auto; min-width: 150px; flex: 1 1 160px; max-width: 280px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; margin: 0 0 1rem; flex: 1 1 100%; }
legend { font-weight: 650; padding: 0 .4rem; }

/* ---------- Righe prodotto (operazioni) ---------- */
.prod-row { display: grid; grid-template-columns: 1fr 120px 120px 36px; gap: .5rem; align-items: end; margin-bottom: .5rem; }
.prod-row label { font-size: .78rem; font-weight: 600; }
.prod-row .rm { background: none; border: 0; font-size: 1.2rem; color: var(--bad); cursor: pointer; height: 44px; }
@media (max-width: 600px) { .prod-row { grid-template-columns: 1fr 1fr 36px; } .prod-row > :first-child { grid-column: 1 / -1; } }
.warnings { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--warn); font-size: .88rem; }

/* ---------- Mappa ---------- */
.map { height: 420px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; z-index: 1; }
.map.tall { height: 60vh; min-height: 360px; }
.map.small { height: 220px; }

/* ---------- Scelte a tessere (onboarding) ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; }
.tile span {
  display: flex; flex-direction: column; gap: .2rem; padding: .9rem; border: 2px solid var(--line); border-radius: 12px;
  background: var(--surface); min-height: 92px; font-weight: 600;
}
.tile span em { font-style: normal; font-size: 1.6rem; }
.tile span small { font-weight: 400; }
.tile input:checked + span { border-color: var(--campo); background: var(--green-soft); }
.tile input:focus-visible + span { outline: 2px solid var(--green); }

/* ---------- AI ---------- */
.shot { display: block; border: 2px dashed color-mix(in srgb, var(--germoglio) 55%, var(--line)); border-radius: var(--radius); padding: 2rem 1rem; text-align: center; cursor: pointer; background: var(--surface); }
.shot strong { display: block; font-size: 1.1rem; }
.shot .big { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--green-soft); color: var(--campo); margin-bottom: .4rem; }
.shot .big svg.i { width: 30px; height: 30px; }
.shot img { max-height: 280px; border-radius: 10px; margin-top: .6rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 1rem; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: .6rem 1.1rem; font-weight: 600; }
.seg input:checked + span { background: var(--campo); color: #fff; }
.result-head { display: flex; gap: 1rem; align-items: flex-start; }
.result-head img { width: 140px; height: 140px; object-fit: cover; border-radius: 12px; flex: 0 0 auto; }
@media (max-width: 560px) { .result-head { flex-direction: column; } .result-head img { width: 100%; height: 200px; } }
.prob { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: .25rem; }
.prob i { display: block; height: 100%; background: var(--germoglio); }
.problem { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .8rem; }
.problem ul { margin: .3rem 0 .6rem; padding-left: 1.1rem; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.thumb { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; }
.thumb img { width: 100%; height: 120px; object-fit: cover; display: block; }
.thumb div { padding: .5rem .6rem; font-size: .85rem; }

/* ---------- Varie ---------- */
.empty { text-align: center; padding: 2.2rem 1rem; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
.kv dt { color: var(--ink-2); font-size: .88rem; }
.kv dd { margin: 0; font-weight: 500; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--green-2); border-color: var(--campo); }
.pager { display: flex; gap: .4rem; margin-top: 1rem; flex-wrap: wrap; }
.weather { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: .5rem; }
.weather div { background: var(--surface-2); border-radius: 10px; padding: .5rem; text-align: center; font-size: .85rem; }
.weather b { display: block; font-size: 1.3rem; }
.weather .good { outline: 2px solid var(--germoglio); }
.chart-box { position: relative; height: 280px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
code { background: var(--surface-2); padding: .1rem .35rem; border-radius: 5px; font-size: .9em; }

/* ---------- Accesso ---------- */
body.auth { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 1.5rem 1rem; background: var(--bg); }
.auth-box { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 2rem 1.7rem 1.6rem; box-shadow: var(--shadow); }
.auth-brand { display: inline-flex; text-decoration: none; }
.auth-brand .logo-word { font-size: 1.5rem; }
.auth-brand .logo-mark { width: 34px; height: 34px; }
.auth-box h1 { font-size: 1.4rem; margin: 1.3rem 0 1rem; }
.auth-foot { color: var(--ink-2); font-size: .9rem; margin-top: 1.2rem; text-align: center; }

/* ---------- Stampa (quaderno di campagna) ---------- */
@media print {
  .topbar, .sidenav, .bottomnav, .actions, .filters, .no-print { display: none !important; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; color: #000; font-size: 11px; }
  .table-wrap, .card { border: 0; box-shadow: none; }
  th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  th, td { padding: 4px 5px; border: 1px solid #999; }
  @page { size: A4 landscape; margin: 10mm; }
}

/* ---------- Pagina pubblica ---------- */
body.lp { background: var(--bg); }
.lp-head { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; }
.lp-head nav { display: flex; align-items: center; gap: 1.2rem; }
.lp-head nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.lp-head nav a:not(.btn):hover { color: var(--green-2); }
.lp .btn svg.i { width: 18px; height: 18px; }
.lp-hero { max-width: 1180px; margin: 0 auto; padding: 3rem 1.25rem 3.5rem; display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--campo); margin: 0 0 .8rem; }
.lp-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -.035em; margin: 0 0 1rem; line-height: 1.06; }
.lead { font-size: 1.14rem; color: var(--ink); max-width: 36rem; margin: 0 0 1.6rem; }
.lp-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: .9rem; }
.lp-cta .btn { min-height: 50px; padding: .8rem 1.3rem; font-size: 1rem; }
.small { font-size: .88rem; }

.lp-hero-visual { position: relative; min-height: 400px; }
.mock-laptop { position: absolute; inset: 0 96px 54px 0; background: var(--surface); border: 8px solid #1f2a22; border-bottom-width: 14px; border-radius: 16px; display: flex; overflow: hidden; box-shadow: 0 24px 50px rgba(6,56,35,.16); }
.mock-side { width: 32%; background: var(--bosco); padding: .8rem .5rem; display: flex; flex-direction: column; gap: .2rem; }
.mock-side .logo { margin: 0 .3rem .7rem; }
.mock-side .logo .w1 { color: var(--avorio); } .mock-side .logo .w2 { color: var(--germoglio); }
.mock-side i { font-style: normal; display: flex; align-items: center; gap: .4rem; color: rgba(245,245,235,.8); font-size: .72rem; padding: .35rem .45rem; border-radius: 7px; }
.mock-side i.on { background: var(--campo); color: #fff; }
.mock-side svg.i { width: 13px; height: 13px; color: var(--germoglio); }
.mock-side i.on svg.i { color: #fff; }
.mock-main { flex: 1; padding: .9rem; display: flex; flex-direction: column; gap: .6rem; background: var(--avorio); }
.mock-main b { font-family: var(--font-head); color: var(--bosco); font-size: .95rem; }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.mock-stats span { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: .45rem; font-size: .6rem; color: var(--ink-2); display: flex; flex-direction: column; gap: .1rem; }
.mock-stats svg.i { width: 15px; height: 15px; color: var(--campo); }
.mock-stats strong { font-family: var(--font-head); font-size: .95rem; color: var(--bosco); }
.mock-fields { flex: 1; border-radius: 9px; min-height: 90px;
  background: linear-gradient(115deg, #7aa64a 0 22%, #c7a75a 22% 38%, #4f8a2c 38% 60%, #a5bf5a 60% 78%, #d6b56a 78%),
              repeating-linear-gradient(115deg, rgba(0,0,0,.08) 0 2px, transparent 2px 9px); background-blend-mode: multiply; }
.mock-phone { position: absolute; right: 0; bottom: 0; width: 160px; background: #fff; border: 7px solid #1f2a22; border-radius: 26px; padding: 1.4rem .65rem .9rem; display: flex; flex-direction: column; gap: .45rem; box-shadow: 0 18px 40px rgba(6,56,35,.22); }
.mock-phone b { font-family: var(--font-head); color: var(--bosco); font-size: .85rem; margin: .3rem 0 .1rem; }
.mock-phone .row { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--line); border-radius: 9px; padding: .45rem .5rem; font-size: .68rem; font-weight: 600; color: var(--inchiostro); }
.mock-phone .row svg.i { width: 15px; height: 15px; color: var(--campo); }
.mock-phone .row em { margin-left: auto; font-style: normal; color: var(--ink-2); }
.logo.mini .logo-mark { width: 16px; height: 16px; }
.logo.mini .logo-word { font-size: .78rem; }
.mock-phone .logo.mini .logo-word { font-size: .74rem; }

.lp-band { background: var(--bosco); color: var(--avorio); }
.lp-band div { max-width: 1180px; margin: 0 auto; padding: 1.6rem 1.25rem; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: baseline; }
.lp-band strong { font-family: var(--font-head); font-size: 1.15rem; color: #fff; }
.lp-band span { color: rgba(245,245,235,.85); }
.lp-section { max-width: 1180px; margin: 0 auto; padding: 3.5rem 1.25rem 1rem; }
.lp-section h2, .lp-final h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; margin: 0 0 1.4rem; }
.lp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.lp-feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.lp-feature h3 { margin: .8rem 0 .35rem; font-size: 1.02rem; }
.lp-feature p { margin: 0; color: var(--ink-2); font-size: .93rem; }
.lp-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--green-soft); color: var(--campo); }
.lp-ico svg.i { width: 23px; height: 23px; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chips span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .45rem .9rem; font-weight: 500; font-size: .92rem; }
.lp-final { max-width: 1180px; margin: 3.5rem auto 0; padding: 2.6rem 1.25rem; text-align: center; background: var(--green-soft); border-radius: 22px; }
.lp-final p { color: var(--ink-2); margin: 0 auto 1.4rem; max-width: 34rem; }
.lp-final .btn { min-height: 50px; padding: .8rem 1.4rem; }
.lp-foot { max-width: 1180px; margin: 0 auto; padding: 2rem 1.25rem 2.5rem; display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; align-items: center; color: var(--ink-2); font-size: .9rem; }
.lp-foot a { margin-left: auto; color: var(--ink-2); }

@media (max-width: 980px) {
  .lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 1.6rem; }
  .lp-hero-visual { min-height: 320px; max-width: 560px; }
}
@media (max-width: 560px) {
  .lp-grid { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .lp-head { padding: .9rem 1rem; }
  .lp-head .logo-word { font-size: 1.05rem; }
  .lp-head nav { gap: .8rem; }
  .lp-hero-visual { min-height: 290px; }
  .mock-laptop { right: 56px; bottom: 40px; }
  .mock-phone { width: 140px; }
  .mock-stats span:nth-child(3) { display: none; }
  .mock-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-color-scheme: dark) {
  .mock-laptop, .mock-phone { border-color: #000; }
  .mock-main { background: #eeeee2; }
  .mock-phone, .mock-stats span { background: #fff; }
  .mock-phone .logo .w1, .mock-main .logo .w1 { color: var(--bosco) !important; }
  .lp-band { background: #0a2618; }
}
.mock-side .logo.mini .logo-word { font-size: .66rem; }
.mock-side .logo.mini .logo-mark { width: 14px; height: 14px; }

/* ---------- Configurazione iniziale e scelte compatte ---------- */
.auth-box.wide { max-width: 860px; padding: 1.8rem 1.8rem 0; }
.onb-step { margin: 1.2rem 0 1.6rem; }
.onb-step h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.1rem; margin: 0 0 .9rem; }
.onb-step h2 small { font-family: var(--font-body); font-weight: 400; font-size: .85rem; }
.step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--campo); color: #fff; font-size: .9rem; flex: 0 0 auto; }
.onb-group { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); font-weight: 650; margin: 1rem 0 .5rem; font-family: var(--font-body); }
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.pick { position: relative; cursor: pointer; display: block; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span {
  position: relative; display: flex; align-items: center; gap: .6rem; min-height: 52px; padding: .55rem 1rem .55rem .7rem;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .12s, background .12s;
}
.pick span:hover { border-color: color-mix(in srgb, var(--campo) 45%, var(--line)); }
.pick em { font-style: normal; font-size: 1.35rem; line-height: 1; width: 1.6rem; text-align: center; flex: 0 0 auto; }
.pick b { font-weight: 600; font-size: .93rem; line-height: 1.25; }
.pick .tick { position: absolute; top: 5px; right: 5px; color: var(--campo); opacity: 0; transition: opacity .12s; display: flex; }
.pick .tick svg.i { width: 16px; height: 16px; }
.pick input:checked + span { border-color: var(--campo); background: var(--green-soft); }
.pick input:checked + span .tick { opacity: 1; }
.pick input:focus-visible + span { outline: 2px solid var(--germoglio); outline-offset: 2px; }
.onb-bar {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 0 -1.8rem; padding: .9rem 1.8rem calc(.9rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(6px);
  border-top: 1px solid var(--line); border-radius: 0 0 18px 18px; font-weight: 600;
}
.onb-bar .btn { min-width: 160px; }
.onb-bar .btn:disabled { opacity: .45; cursor: not-allowed; }
.onb .form { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.mail-sent { text-align: center; margin-bottom: 1rem; }
.mail-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--green-soft); color: var(--campo); }
.mail-ico svg.i { width: 32px; height: 32px; }
.lp-closed { display: inline-block; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .9rem; color: var(--ink); font-weight: 500; margin: .2rem 0 .8rem; }
@media (max-width: 720px) {
  .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-box.wide { padding: 1.3rem 1rem 0; border-radius: 16px; }
  .onb-bar { margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; }
  body.auth:has(.wide) { padding: .6rem .5rem 1rem; justify-content: flex-start; }
}
@media (max-width: 720px) { .pick span { padding: .5rem .9rem .5rem .55rem; gap: .5rem; } .pick em { font-size: 1.2rem; width: 1.4rem; } .pick b { font-size: .88rem; } }
.geo-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; flex-basis: 100%; }
.geo-row .help { margin: 0; }
form.form fieldset { display: flex; flex-wrap: wrap; gap: 0 1rem; }

/* Tabella curve produttive (admin) */
.curve-table { min-width: 980px; }
.curve-table td { padding: .45rem .4rem; vertical-align: middle; }
.curve-table td.n { width: 76px; }
.curve-table td.n.w { width: 96px; }
.curve-table td.n input { text-align: right; padding: .55rem .6rem; font-variant-numeric: tabular-nums; min-width: 0; }
.curve-table th small { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* Admin fitosanitari */
ol.steps { margin: 0 0 1rem; padding-left: 1.3rem; }
ol.steps li { margin-bottom: .55rem; }
.url-input { display: flex; gap: .5rem; flex-wrap: wrap; }
.url-input input { flex: 1 1 320px; }
.url-input .btn { flex: 0 0 auto; }

/* Attribuzione dati Open Data (IODL 2.0) */
.attrib { display: flex; gap: .9rem; align-items: center; margin: 1.4rem 0 .4rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.attrib p { margin: 0; font-size: .82rem; color: var(--ink-2); line-height: 1.5; }
.attrib a { color: var(--ink-2); }
.attrib-logo { flex: 0 0 auto; display: block; }
.attrib-logo img { display: block; height: 44px; width: auto; }
.attrib.compact { margin: 0 0 1rem; padding: .55rem .8rem; }
.attrib.compact .attrib-logo img { height: 34px; }
@media (max-width: 560px) { .attrib { flex-direction: column; align-items: flex-start; } }
.check-inline { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--ink-2); }
.check-inline input { width: 18px; height: 18px; }
.help.err { color: var(--bad); font-weight: 600; }
[hidden] { display: none !important; }
.filters .check-inline input { flex: 0 0 auto; min-width: 0; width: 18px; max-width: none; }
.filters .check-inline { white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* Normative e notizie */
.tabs a { display: inline-flex; align-items: center; gap: .45rem; }
.tabs a svg { width: 18px; height: 18px; }
.chips .chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .85rem; font-weight: 500; font-size: .9rem; text-decoration: none; color: var(--ink-2); }
.chips .chip.active { background: var(--campo); border-color: var(--campo); color: #fff; }
.chips { margin: 0 0 1rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head a { font-weight: 600; font-size: .92rem; }
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.news-list > li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; }
.news-list .news-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .8rem; color: var(--ink-2); margin-bottom: .35rem; }
.news-list .news-title { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; line-height: 1.35; color: var(--ink); text-decoration: none; }
.news-list .news-title:hover { color: var(--campo); text-decoration: underline; }
.news-list p { margin: .45rem 0 .5rem; color: var(--ink-2); font-size: .93rem; line-height: 1.55; }
.news-list .news-more { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; font-weight: 600; }
.news-list .news-more svg, .link-list a svg { width: 14px; height: 14px; flex: 0 0 auto; }
.news-list.compact { gap: 0; padding: .3rem 1.1rem; }
.news-list.compact > li { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: .7rem 0; display: flex; flex-direction: column; gap: .15rem; }
.news-list.compact > li:last-child { border-bottom: 0; }
.news-list.compact a { font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.4; }
.news-list.compact a:hover { color: var(--campo); text-decoration: underline; }
.news-list.compact .news-meta { margin: 0; }
.news-attrib ul { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .82rem; color: var(--ink-2); }
.norm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; align-items: start; }
.norm-groups .card { margin: 0; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { padding: .6rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .15rem; }
.link-list li:last-child { border-bottom: 0; }
.link-list a { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; text-decoration: none; color: var(--green-2); }
.link-list a:hover { text-decoration: underline; }
.link-list span { font-size: .85rem; color: var(--ink-2); }
/* admin: righe link modificabili */
.link-row { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: .6rem 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.link-row:last-child { border-bottom: 0; }
.link-row .lr-main { display: grid; gap: .45rem; }
.link-row .lr-title { font-weight: 600; }
.link-row .lr-side { display: grid; gap: .45rem; align-content: start; }
.link-row .lr-lbl { display: grid; gap: .2rem; font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.link-row .lr-lbl input.n { width: 90px; }
.check-inline.danger { color: var(--bad); }
.sticky-save { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding: .8rem 1rem; margin: 0 -.25rem 1rem; background: var(--bg); border-top: 1px solid var(--line); }
.feed-flags { display: flex; gap: 1.5rem; flex-wrap: wrap; }
a.btn[aria-disabled] { opacity: .45; pointer-events: auto; cursor: not-allowed; }
@media (max-width: 760px) { .link-row { grid-template-columns: 1fr; } .norm-groups { grid-template-columns: 1fr; } }
form.form > .card, form.form > .grid, form.form > .sticky-save, form.form > .feed-flags { flex: 1 1 100%; min-width: 0; }
.link-row .url-input, .feed-card .url-input { flex-wrap: nowrap; }
.link-row .url-input input, .feed-card .url-input input { flex: 1 1 auto; min-width: 0; }
.card form.form .grid.two { flex: 1 1 100%; }
.plain-list { margin: .6rem 0 0; padding-left: 1.2rem; } .plain-list li { margin: .35rem 0; line-height: 1.55; }

/* Automazioni */
.card-warn { border-color: var(--warn); box-shadow: inset 4px 0 0 var(--warn); }
.card h3 svg { width: 18px; height: 18px; vertical-align: -3px; }
.auto-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.auto-head h3 { margin-bottom: .25rem; }
.auto-head p { margin: 0; }
.auto-status { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: .8rem 0 .4rem; font-size: .9rem; color: var(--ink-2); }
.auto-status span { display: inline-flex; align-items: center; gap: .35rem; }
.auto-status svg { width: 16px; height: 16px; }
.auto-msg { margin: .2rem 0 .6rem; padding: .5rem .75rem; border-radius: 10px; background: var(--surface-2); font-size: .85rem; color: var(--ink-2); }
.auto-msg.err { background: var(--bad-soft); color: var(--bad); }
.auto-card details, .card details { margin-top: .5rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.card details > summary { cursor: pointer; font-weight: 600; color: var(--green-2); padding: .25rem 0; }
.card details[open] > summary { margin-bottom: .6rem; }
.auto-sched { display: flex; flex-wrap: wrap; gap: 0 1rem; flex: 1 1 100%; }
.auto-sched .fld { flex: 0 1 200px; }
.auto-log td { font-size: .82rem; vertical-align: top; }
.auto-log td:last-child { white-space: normal; }
input.copy { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; margin-top: .3rem; }
.btn.danger { color: var(--bad); border-color: var(--bad-soft); }
@media (max-width: 600px) { .auto-head { flex-direction: column; } }
.auto-head .btn { white-space: nowrap; }

/* Ricerca fitosanitari nella pagina del trattamento */
.prod-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.prod-actions .btn svg { width: 16px; height: 16px; }
.fito-panel { margin-top: .8rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.fito-search { display: flex; gap: .5rem; }
.fito-search input { flex: 1 1 auto; min-width: 0; }
.fito-msg { font-size: .88rem; color: var(--ink-2); min-height: 1.2em; margin: .3rem 0; }
.fito-results { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; max-height: 420px; overflow-y: auto; }
.fito-results li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; }
.fito-results li small { line-height: 1.45; }
.fito-results .btn { white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 600px) { .fito-results li { flex-direction: column; align-items: stretch; } }

/* ---------- v11: accessibilità ---------- */
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: .6rem; top: -60px; z-index: 200; background: var(--bosco); color: #fff; padding: .6rem 1rem; border-radius: 8px; font-weight: 650; text-decoration: none; }
.skip-link:focus { top: .6rem; }
main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--germoglio); outline-offset: 2px; }

.a11y { position: fixed; right: 14px; bottom: 14px; z-index: 120; }
@media (max-width: 860px) { .bottomnav ~ .a11y { bottom: calc(78px + env(safe-area-inset-bottom)); right: 10px; } }
.a11y-btn { width: 48px; height: 48px; border-radius: 50%; border: 2px solid #fff; background: #0b4f8a; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.a11y-btn svg.i { width: 26px; height: 26px; }
.a11y-panel { position: absolute; right: 0; bottom: 58px; width: min(340px, calc(100vw - 24px)); max-height: min(80vh, 620px); overflow: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.25); padding: .9rem; }
.a11y-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; font-family: var(--font-head); font-size: 1.05rem; color: var(--green); }
.a11y-close { background: none; border: 0; color: var(--ink-2); cursor: pointer; padding: .3rem; }
.a11y-size { display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; }
.a11y-size span { flex: 1; font-weight: 600; }
.a11y-size button { min-width: 44px; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); font-weight: 700; cursor: pointer; }
.a11y-size output { min-width: 48px; text-align: center; font-weight: 650; }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.a11y-opt { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .7rem .4rem; min-height: 76px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: .84rem; text-align: center; cursor: pointer; }
.a11y-opt[aria-pressed="true"] { border-color: #0b4f8a; background: #e3eefa; color: #0b3a66; font-weight: 650; }
.a11y-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .8rem; font-size: .85rem; }
.a11y-note { font-size: .78rem; color: var(--ink-2); margin: .5rem 0 0; }
.a11y-guide-line { display: none; position: fixed; left: 0; right: 0; height: 44px; top: 40%; pointer-events: none; z-index: 110; background: rgba(255, 230, 80, .22); border-top: 2px solid #0b4f8a; border-bottom: 2px solid #0b4f8a; }
html.a11y-guide .a11y-guide-line { display: block; }
html.a11y-size-1 { font-size: 18px; } html.a11y-size-2 { font-size: 20px; } html.a11y-size-3 { font-size: 22.5px; } html.a11y-size-4 { font-size: 25.5px; }
html.a11y-font body, html.a11y-font h1, html.a11y-font h2, html.a11y-font h3, html.a11y-font .btn, html.a11y-font input, html.a11y-font select, html.a11y-font textarea, html.a11y-font button { font-family: "Atkinson Hyperlegible", Verdana, Tahoma, sans-serif !important; letter-spacing: .01em; }
html.a11y-spacing body { line-height: 1.8; letter-spacing: .12em; word-spacing: .16em; }
html.a11y-spacing p, html.a11y-spacing li { margin-bottom: 1em; }
html.a11y-links a:not(.btn) { text-decoration: underline !important; text-underline-offset: 3px; text-decoration-thickness: 2px; background: rgba(255, 230, 80, .35); }
html.a11y-links a.btn { outline: 2px dashed currentColor; outline-offset: 2px; }
html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-cursor, html.a11y-cursor * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 9-6.5 1.6L16 20l-3 1.5-3.4-7.4L4 18z' fill='%23000' stroke='%23fff' stroke-width='1.4'/%3E%3C/svg%3E") 4 2, auto !important; }
html.a11y-gray body > *:not(.a11y) { filter: grayscale(1); }
html.a11y-contrast { --bg: #ffffff; --surface: #ffffff; --surface-2: #f0f0f0; --ink: #000000; --ink-2: #1d1d1d; --line: #000000; --green: #002814; --green-2: #00451f; --green-soft: #dff0d0; --nav-bg: #000000; --nav-ink: #ffffff; --warn: #4d3400; --bad: #7a1300; --earth: #5c2c08; }
html.a11y-contrast a:not(.btn) { text-decoration: underline; }
html.a11y-contrast .card, html.a11y-contrast input, html.a11y-contrast select, html.a11y-contrast textarea, html.a11y-contrast .table-wrap { border-width: 2px; border-color: #000; }
html.a11y-contrast .muted, html.a11y-contrast small, html.a11y-contrast .help { color: #1d1d1d !important; }
html.a11y-contrast .btn.secondary { border: 2px solid #000; color: #000; }
@media print { .a11y, .skip-link { display: none !important; } }

/* ---------- v11: piè di pagina ---------- */
.site-foot { max-width: 1180px; margin: 2rem auto 0; padding: 1.5rem 1.25rem 2.4rem; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .86rem; }
.site-foot p { margin: 0 0 .5rem; }
.site-foot-links { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
.site-foot-links a { color: var(--ink-2); }
.site-foot-links a:hover { color: var(--green-2); }
.site-foot.compact { margin: 3rem 0 0; padding: 1rem 0 0; font-size: .8rem; }
body.auth .site-foot { width: 100%; max-width: 860px; text-align: center; border-top: 0; margin-top: .6rem; padding-bottom: 1rem; }
body.auth .site-foot-links { justify-content: center; }
.site-foot-extra { margin-top: .6rem !important; }

/* ---------- v11: avvisi AI, consensi, documenti legali ---------- */
.ai-disclaimer { display: flex; gap: .7rem; align-items: flex-start; background: var(--warn-soft); color: var(--ink); border: 1px solid rgba(138, 97, 0, .25); border-radius: 12px; padding: .75rem .95rem; margin: 0 0 1rem; }
.ai-disclaimer svg.i { flex: none; width: 22px; height: 22px; color: var(--warn); margin-top: .1rem; }
.ai-disclaimer p { margin: 0; font-size: .92rem; }
.lp-ai-note { max-width: 860px; margin: 1.6rem auto 0; }
.lp-note { text-align: center; max-width: 760px; margin: .8rem auto 0; }
.consent label { font-weight: 400; font-size: .9rem; line-height: 1.45; }
.consent input { margin-right: .35rem; }
.consent-note { margin: -.4rem 0 .6rem; }
mark.todo { background: #ffe58a; color: #3a2a00; padding: 0 .2rem; border-radius: 4px; }
.legal { max-width: 860px; margin: 0 auto; padding: 1rem 1.25rem 2rem; }
.legal h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 1rem 0 .3rem; }
.legal-meta { color: var(--ink-2); font-size: .9rem; margin: 0 0 1.4rem; display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; }
.legal-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.legal-tabs a { font-size: .85rem; padding: .35rem .7rem; border-radius: 999px; background: var(--surface-2); color: var(--ink); text-decoration: none; }
.legal-tabs a[aria-current="page"] { background: var(--campo); color: #fff; }
.legal-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.5rem; }
.legal-body h2 { font-size: 1.08rem; margin: 1.6rem 0 .5rem; }
.legal-body h2:first-child { margin-top: .2rem; }
.legal-body p, .legal-body li { line-height: 1.65; }
.legal-body table { font-size: .88rem; }
.legal-history { margin-top: 1.2rem; font-size: .9rem; }
@media print { .lp-head, .legal-tabs, .site-foot, .legal-history { display: none !important; } .legal-body { border: 0; padding: 0; } }
@media (max-width: 600px) { .legal-body { padding: 1rem; } }

/* ---------- v11: piani e crediti ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 1rem 0 1.4rem; }
.plan-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.3rem 1.3rem 1.2rem; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.plan-card.featured { border: 2px solid var(--campo); }
.plan-card.current { background: var(--green-soft); }
.plan-card h3 { margin: 0 0 .4rem; font-size: 1.2rem; letter-spacing: .02em; }
.plan-flag { position: absolute; top: -12px; right: 16px; background: var(--campo); color: #fff; font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.plan-price { font-family: var(--font-head); font-size: 1.9rem; font-weight: 800; color: var(--green); margin: .2rem 0 0; }
.plan-price small { font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.plan-billing { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin: .35rem 0 .2rem; min-height: 1.6rem; }
.badge.billed { display: inline-flex; align-items: center; gap: .3rem; background: var(--green-soft); color: var(--green); font-size: .74rem; padding: .2rem .6rem; }
.badge.billed svg.i { width: 13px; height: 13px; }
.plan-list { list-style: none; padding: 0; margin: .8rem 0 1rem; display: grid; gap: .35rem; font-size: .9rem; }
.plan-list li { display: flex; gap: .45rem; align-items: flex-start; }
.plan-list svg.i { width: 17px; height: 17px; flex: none; color: var(--campo); margin-top: .15rem; }
.plan-card .btn.block, .plan-actions { margin-top: auto; }
.plan-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; margin: .8rem 0 1.4rem; }
.pack { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; display: flex; flex-direction: column; gap: .3rem; }
.pack strong { font-family: var(--font-head); font-size: 1.15rem; color: var(--green); }
.pack .plan-price { font-size: 1.4rem; }
.pack .btn { margin-top: .4rem; align-self: flex-start; }
.credit-bar { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.credit-bar svg.i { width: 18px; height: 18px; vertical-align: -3px; color: var(--earth); }
table.compare td.c, table.compare th.c { text-align: center; }
table.compare tr.group th { background: var(--surface-2); text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.yes { color: var(--campo); font-weight: 800; } .no { color: var(--ink-2); }
.card.highlight { border: 2px solid var(--campo); }
.tile.locked span { opacity: .75; border-style: dashed; }
.tile small.lock { display: flex; gap: .3rem; align-items: center; color: var(--earth); font-weight: 600; margin-top: .3rem; }
.tile small.lock svg.i { width: 14px; height: 14px; }
.danger-zone { border-color: var(--bad-soft); }
.matrix td, .matrix th { text-align: center; } .matrix td:first-child, .matrix th:first-child { text-align: left; }
.matrix input[type=checkbox] { width: 22px; height: 22px; }

/* ---------- v11: quaderno e mappe ---------- */
.export-bar { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; margin: 0 0 1rem; font-size: .92rem; }
.export-bar svg.i { width: 16px; height: 16px; vertical-align: -3px; }
tr.row-warn td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
.small-table { font-size: .86rem; }
.leaflet-container.map-blank, .map-blank { background-color: #eef1e4; background-image: linear-gradient(rgba(6,56,35,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(6,56,35,.07) 1px, transparent 1px); background-size: 32px 32px; }
.map-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.map-tools label.btn { cursor: pointer; }
.map-ctl { width: 34px; height: 34px; line-height: 34px; text-align: center; background: #fff; font-size: 16px; text-decoration: none; }
@media (prefers-color-scheme: dark) { .leaflet-container.map-blank { background-color: #18241c; } .a11y-opt[aria-pressed="true"] { background: #16324d; color: #e3eefa; } }
.fld.check.consent label { display: block; }
.fld.check.consent label input { vertical-align: -2px; }

/* ---------- v13: sito pubblico (SEO/GEO) ---------- */
.pub-head { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 1rem; padding: .7rem max(1.25rem, calc((100vw - 1180px) / 2)); }
.pub-brand { display: inline-flex; text-decoration: none; margin-right: auto; }
.pub-toggle { display: none; align-items: center; gap: .35rem; background: none; border: 1px solid var(--line); border-radius: 10px; padding: .45rem .7rem; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }
.pub-toggle svg.i { width: 20px; height: 20px; }
.pub-nav { display: flex; align-items: center; gap: 1.2rem; }
.pub-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; }
.pub-menu > li { position: relative; }
.pub-menu > li > a { display: block; padding: .55rem .75rem; border-radius: 9px; color: var(--ink); text-decoration: none; font-weight: 550; }
.pub-menu > li > a:hover, .pub-menu > li.active > a { background: var(--green-soft); color: var(--green); }
.pub-menu .has-sub > a::after { content: ""; display: inline-block; width: .42em; height: .42em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); margin-left: .45rem; }
.pub-sub { list-style: none; margin: 0; padding: .5rem; position: absolute; top: 100%; left: 0; min-width: 290px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(6,56,35,.14); display: none; z-index: 70; }
.pub-menu .has-sub:hover > .pub-sub, .pub-menu .has-sub:focus-within > .pub-sub { display: block; }
.pub-sub a { display: flex; gap: .6rem; align-items: center; padding: .55rem .6rem; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: .93rem; }
.pub-sub a:hover { background: var(--surface-2); }
.pub-sub svg.i { width: 18px; height: 18px; color: var(--campo); flex: none; }
.pub-actions { display: flex; align-items: center; gap: .8rem; }
.pub-login { color: var(--ink); font-weight: 600; text-decoration: none; }
@media (max-width: 980px) {
  .pub-toggle { display: inline-flex; }
  .js .pub-nav { display: none; }
  .pub-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(6,56,35,.12);
    flex-direction: column; align-items: stretch; gap: .6rem; padding: .8rem 1rem 1.1rem; max-height: calc(100vh - 64px); overflow: auto; }
  .pub-head.open .pub-nav { display: flex; }
  .pub-menu { flex-direction: column; }
  .pub-sub { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 .3rem .4rem; min-width: 0; }
  .pub-menu .has-sub > a::after { display: none; }
  .pub-actions { justify-content: space-between; border-top: 1px solid var(--line); padding-top: .8rem; }
}
.crumbs { max-width: 1180px; margin: 0 auto; padding: 1rem 1.25rem 0; font-size: .86rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.crumbs li + li::before { content: "›"; margin-right: .3rem; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); }
.crumbs [aria-current] { color: var(--ink); }
.pub-section { max-width: 1180px; margin: 0 auto; padding: 2.4rem 1.25rem .6rem; }
.pub-section.narrow, .narrow-box { max-width: 860px; }
.pub-section h1, .topic-head h1, .guide-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 800; letter-spacing: -.03em; margin: .2rem 0 1rem; line-height: 1.1; }
.pub-section h2 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 1.1rem; }
.h3 { font-size: 1.05rem !important; margin: .8rem 0 .35rem !important; }
.answer { max-width: 50rem; }
.band-title { font-family: var(--font-head); font-size: 1.2rem; color: #fff; margin: 0 0 .3rem; }
.lp-band p { margin: 0; color: rgba(245,245,235,.88); }
.lp-band a { color: #cfe8b4; }
.linkcard { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.linkcard:hover { border-color: var(--campo); transform: translateY(-2px); }
.linkcard .more { margin-top: auto; padding-top: .8rem; color: var(--green-2); font-weight: 650; font-size: .9rem; display: inline-flex; align-items: center; gap: .3rem; }
.linkcard .more svg.i { width: 16px; height: 16px; }
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.sector-card { display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; text-decoration: none; color: var(--ink); font-weight: 600; }
.sector-card:hover { border-color: var(--campo); }
.sector-card svg.i { width: 24px; height: 24px; color: var(--campo); }
.plans.compact .plan-card { text-decoration: none; color: inherit; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.guide-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.guide-card h3 { margin: .2rem 0 .5rem; font-size: 1.08rem; line-height: 1.3; }
.guide-card h3 a { color: var(--green); text-decoration: none; }
.guide-card h3 a:hover { text-decoration: underline; }
.guide-card p { margin: 0 0 .6rem; color: var(--ink-2); font-size: .93rem; }
.guide-cat { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 700; color: var(--campo); margin: 0; }
.guide-meta { font-size: .82rem !important; color: var(--ink-2); margin: 0; }
.faq-list { display: grid; gap: .8rem; margin-bottom: 1rem; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; }
.faq-item h3 { margin: 0 0 .35rem; font-size: 1.02rem; }
.faq-item p { margin: 0; color: var(--ink); }
.topic, .guide { padding-bottom: 1rem; }
.topic-head { max-width: 1180px; margin: 0 auto; padding: 1.6rem 1.25rem .4rem; }
.topic-ico { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 15px; background: var(--green-soft); color: var(--campo); }
.topic-ico svg.i { width: 28px; height: 28px; }
.point-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.point { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; }
.point h3 { margin: 0 0 .35rem; font-size: 1.02rem; }
.point p { margin: 0; color: var(--ink-2); }
ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; max-width: 50rem; }
ol.steps li { counter-increment: s; position: relative; padding: .8rem 1rem .8rem 3.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
ol.steps li::before { content: counter(s); position: absolute; left: .9rem; top: .7rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--campo); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.link-list.cols { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.link-list a { font-weight: 600; }
.cta-box { max-width: 1132px; margin: 2.4rem auto 0; padding: 1.6rem 1.8rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; background: var(--bosco); color: var(--avorio); border-radius: 20px; }
.cta-box h2 { color: #fff; margin: 0 0 .3rem; font-size: 1.35rem; }
.cta-box p { margin: 0; color: rgba(245,245,235,.85); }
.cta-box .btn { background: var(--germoglio); color: #062312; }
@media (max-width: 1200px) { .cta-box { margin-left: 1.25rem; margin-right: 1.25rem; } }
.chips.filter a { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .85rem; font-size: .9rem; text-decoration: none; color: var(--ink); font-weight: 500; }
.chips.filter a[aria-current] { background: var(--campo); border-color: var(--campo); color: #fff; }
/* Guide */
.guide { max-width: 820px; margin: 0 auto; padding: 0 1.25rem; }
.guide-head { padding-top: 1.4rem; }
.in-breve { background: var(--green-soft); border-left: 5px solid var(--campo); border-radius: 12px; padding: 1rem 1.2rem; margin: 1.2rem 0; }
.in-breve h2 { font-size: .85rem !important; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 .35rem !important; color: var(--campo) !important; }
.in-breve p { margin: 0; font-size: 1.05rem; line-height: 1.6; }
.toc { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.2rem; background: var(--surface); margin: 1rem 0 1.4rem; }
.toc h2 { font-size: 1rem !important; margin: 0 0 .4rem !important; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin: .2rem 0; }
.guide-body { font-size: 1.06rem; line-height: 1.75; }
.guide-body h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin: 2.2rem 0 .7rem; scroll-margin-top: 90px; }
.guide-body h3 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; scroll-margin-top: 90px; }
.guide-body p, .guide-body li { max-width: 72ch; }
.guide-body li { margin: .3rem 0; }
.guide-body table { font-size: .95rem; }
.callout { background: var(--warn-soft); border-radius: 12px; padding: .8rem 1.1rem; margin: 1.2rem 0; }
.callout p { margin: .3rem 0; }
.guide-faq, .sources { margin-top: 2rem; }
.sources ul { padding-left: 1.2rem; }
.author-box { display: flex; gap: .9rem; align-items: flex-start; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.1rem 0; margin: 2rem 0 0; }
.author-box svg.i { width: 34px; height: 34px; color: var(--campo); flex: none; }
.author-box p { margin: .2rem 0 0; color: var(--ink-2); font-size: .93rem; }
.related-feat { margin: 1rem 0 0; }
.related-feat a { margin-right: .6rem; font-weight: 600; }
.guide .cta-box { margin-left: 0; margin-right: 0; }
.legal { max-width: 860px; }
/* Piè di pagina pubblico */
.pub-foot { background: var(--surface); border-top: 1px solid var(--line); margin-top: 3.5rem; }
.pub-foot-grid { max-width: 1180px; margin: 0 auto; padding: 2.4rem 1.25rem 1rem; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 1.5rem 2rem; }
.pub-foot-brand p { color: var(--ink-2); font-size: .9rem; margin: .7rem 0 0; max-width: 32ch; }
.pub-foot h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin: 0 0 .7rem; }
.pub-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.pub-foot ul a { color: var(--ink); text-decoration: none; font-size: .92rem; }
.pub-foot ul a:hover { color: var(--green-2); text-decoration: underline; }
.pub-foot .site-foot { margin-top: 0; }
@media (max-width: 860px) { .pub-foot-grid { grid-template-columns: 1fr 1fr; } .pub-foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .pub-foot-grid { grid-template-columns: 1fr; } .pub-section { padding-top: 1.8rem; } .cta-box { padding: 1.3rem; } }
@media print { .pub-head, .pub-foot, .cta-box, .crumbs { display: none !important; } }
/* admin SEO */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; font-size: .9rem; }
.checklist li.ok { color: var(--campo); } .checklist li.no { color: var(--bad); }
.serp { display: grid; gap: .15rem; font-family: Arial, sans-serif; }
.serp-url { color: #1a7f37; font-size: .82rem; word-break: break-all; } .serp-t { color: #1a0dab; font-size: 1.15rem; } .serp-d { color: #4d5156; font-size: .88rem; }
textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; line-height: 1.5; }
.seo-edit { align-items: start; }
/* Cosa fa / cosa non fa */
.scope-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.scope-col { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.25rem; }
.scope-col h3 { margin: 0 0 .7rem; font-size: 1.05rem; }
.scope-col.no { background: var(--surface-2); }
.scope-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.scope-list li { display: flex; gap: .55rem; align-items: flex-start; }
.scope-list svg.i { flex: none; width: 20px; height: 20px; margin-top: .15rem; }
.scope-col.yes svg.i { color: var(--green-2); }
.scope-col.no svg.i { color: var(--ink-2); }
@media (max-width: 760px) { .scope-grid { grid-template-columns: 1fr; } }
.scope-note-box { max-width: 1180px; margin: 1.6rem auto 0; padding: 0 1.25rem; }
.scope-note-box h2 { font-size: 1rem; margin: 0 0 .4rem; }
.scope-note-box ul { margin: 0; padding-left: 1.2rem; color: var(--ink-2); font-size: .93rem; display: grid; gap: .25rem; }
.site-foot-scope { font-size: .84rem; max-width: 80ch; }
.site-foot.compact .site-foot-scope { font-size: .78rem; }
.scope-note { margin: .2rem 0 .6rem; }
/* Statistiche */
.period { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 1rem; }
.period a { padding: .35rem .75rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .88rem; background: var(--surface); }
.period a.active { background: var(--green-soft); color: var(--green); border-color: var(--green-2); }
.period .spacer { flex: 1; }
.delta { display: block; font-size: .76rem; color: var(--ink-2); margin-top: .1rem; }
.delta.up::before { content: "▲ "; color: var(--green-2); } .delta.down::before { content: "▼ "; color: var(--bad); }
.stat-chart { margin: 0; }
.stat-chart .chart { width: 100%; height: auto; display: block; }
@media (max-width: 640px) { .chart-scroll { overflow-x: auto; } .stat-chart .chart { width: 560px; max-width: none; } }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--ink-2); font-size: 11px; font-family: var(--font-body); }
.chart polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart polyline.s1, .chart circle.s1, .chart .bar, .chart-legend i.s1 { --c: #2D711A; }
.chart polyline.s2, .chart circle.s2, .chart-legend i.s2 { --c: #2a78d6; }
.chart polyline { stroke: var(--c); }
.chart circle { fill: var(--c); stroke: var(--surface); stroke-width: 2; }
.chart .bar { fill: var(--c); }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.chart-legend { display: flex; gap: 1rem; margin: 0 0 .4rem; font-size: .85rem; color: var(--ink-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.chart-legend i.k { width: 14px; height: 3px; border-radius: 2px; background: var(--c); display: inline-block; }
.chart-data { margin-top: .4rem; font-size: .85rem; }
.chart-data summary { cursor: pointer; color: var(--green-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chart polyline.s1, :root:not([data-theme="light"]) .chart circle.s1, :root:not([data-theme="light"]) .chart .bar, :root:not([data-theme="light"]) .chart-legend i.s1 { --c: #65A630; }
  :root:not([data-theme="light"]) .chart polyline.s2, :root:not([data-theme="light"]) .chart circle.s2, :root:not([data-theme="light"]) .chart-legend i.s2 { --c: #3987e5; } }
table.rank td:first-child { position: relative; min-width: 12rem; }
.rank-bar { position: absolute; left: 0; top: 18%; bottom: 18%; width: var(--w); background: var(--green-soft); border-radius: 0 4px 4px 0; }
.rank-lab { position: relative; word-break: break-word; }
table.rank td.num { white-space: nowrap; width: 1%; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.stats-grid > .card { margin: 0; min-width: 0; }
.stats-grid > .card.wide { grid-column: 1 / -1; }
.stats-grid h3 { font-size: 1rem; margin: 0 0 .6rem; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.stats-grid h3 .csv { margin-left: auto; font-size: .8rem; font-weight: 600; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: 1fr; } }
.privacy-note { display: flex; gap: .7rem; align-items: flex-start; background: var(--green-soft); border-radius: 12px; padding: .75rem 1rem; margin: 0 0 1rem; font-size: .9rem; }
.privacy-note svg.i { flex: none; width: 20px; height: 20px; color: var(--green-2); margin-top: .1rem; }
.privacy-note p { margin: 0; }

/* =========================================================
   Admin: layout, form e card (v14)
   ========================================================= */
input[type=checkbox], input[type=radio] { accent-color: var(--campo); }
.d-block { display: block; }
.admin-tag { background: var(--inchiostro); color: var(--avorio); border-radius: 6px; padding: .15rem .5rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; font-family: var(--font-head); }
body.admin { --nav-bg: var(--inchiostro); }
body.admin .content { max-width: 1320px; padding: 1.8rem 2.2rem 5rem; }
@media (max-width: 860px) { body.admin .content { padding: 1.1rem 1rem 4rem; } }

/* barra superiore */
.top-actions { margin-left: auto; display: flex; align-items: center; gap: .9rem; }
.top-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 600; text-decoration: none; color: var(--green-2); }
.top-link svg.i { width: 17px; height: 17px; }
.top-version { font-size: .8rem; color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: .15rem .55rem; font-variant-numeric: tabular-nums; }
.top-version:hover { color: var(--green-2); border-color: var(--green-2); }
@media (max-width: 600px) { .top-link span, .top-version { display: none; } }

/* menu laterale raggruppato */
body.admin .sidenav { gap: 1px; }
.sidenav .nav-group { margin: .9rem 0 .25rem; padding: 0 .8rem; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(245, 245, 235, .45); }
.sidenav .nav-group:first-child { margin-top: .1rem; }
body.admin .sidenav a { padding: .5rem .8rem; font-size: .92rem; }
.sidenav a .count { margin-left: auto; min-width: 1.4rem; text-align: center; background: var(--germoglio); color: #10210f; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: .05rem .4rem; }
.sidenav a.active .count { background: #fff; color: var(--campo); }

/* intestazione di pagina e sezioni */
body.admin .page-head { margin-bottom: 1.1rem; }
.page-intro, body.admin .content > p.muted:first-of-type { max-width: 82ch; color: var(--ink-2); margin: -.3rem 0 1.2rem; }
.section-title { font-size: 1.2rem; margin: 2rem 0 .8rem; scroll-margin-top: calc(var(--top-h) + 1rem); }
.jump { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.4rem; }
.jump a { font-size: .85rem; font-weight: 600; padding: .3rem .75rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); }
.jump a:hover { color: var(--green-2); border-color: var(--green-2); }

/* card */
body.admin .card { padding: 1.2rem 1.35rem; }
body.admin .card > h3:first-child, body.admin .card > h2:first-child { font-size: 1.05rem; margin-bottom: .8rem; }
body.admin .card .table-wrap { box-shadow: none; }
body.admin .stats { gap: 1rem; }
body.admin .stat { padding: 1rem 1.1rem; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
body.admin a.stat:hover { border-color: var(--green-2); transform: translateY(-1px); }
body.admin h2 { font-size: 1.2rem; margin: 1.8rem 0 .8rem; }

/* form: ogni gruppo di campi è una card con titolo */
body.admin form.form { gap: 0 1rem; }
body.admin form.form > fieldset, body.admin form.form > .form-section {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.15rem 1.35rem .5rem; margin: 0 0 1.2rem; gap: 0 1rem; min-width: 0;
}
body.admin form.form > fieldset > legend {
  float: left; flex: 1 1 100%; width: 100%; padding: 0 0 .75rem; margin: 0 0 1rem; border-bottom: 1px solid var(--line);
  font-family: var(--font-head); font-size: 1.05rem; font-weight: 750; color: var(--green); letter-spacing: -.01em;
}
body.admin form.form fieldset > p, body.admin form.form fieldset > .help { flex: 1 1 100%; margin-top: 0; }
body.admin form.form fieldset > p.muted, body.admin form.form fieldset > p.help:first-of-type { margin: -.3rem 0 1rem; font-size: .9rem; }
body.admin form.form > p.help, body.admin form.form > p.muted { flex: 1 1 100%; }
/* righe con casella: niente spazio vuoto sopra quando occupano tutta la riga */
.fld.check:not(.half):not(.third) label { padding-top: 0; }
.fld.check label { line-height: 1.4; }
body.admin .fld.check { margin-bottom: .7rem; }
body.admin .fld label small { font-weight: 500; }
body.admin input, body.admin select, body.admin textarea { font-size: .95rem; }
body.admin input:hover:not(:focus):not([disabled]), body.admin select:hover:not(:focus), body.admin textarea:hover:not(:focus) { border-color: color-mix(in srgb, var(--ink-2) 40%, var(--line)); }
input[disabled], select[disabled], textarea[disabled] { background: var(--surface-2); color: var(--ink-2); cursor: not-allowed; }
/* pulsante di salvataggio sempre a portata di mano nei moduli lunghi */
body.admin .content > form.form:not(.card) > .form-actions:last-child {
  position: sticky; bottom: 0; z-index: 6; margin-top: .2rem; padding: .85rem 0;
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line);
}
.btn svg.i { width: 18px; height: 18px; }

/* interruttori (checkbox con aspetto a levetta) */
.switch { position: relative; display: inline-flex; flex: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 40px !important; height: 22px !important; margin: 0; border-radius: 999px; background: color-mix(in srgb, var(--ink-2) 35%, var(--line)); cursor: pointer; transition: background .15s; position: relative; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked { background: var(--campo); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 3px solid color-mix(in srgb, var(--germoglio) 55%, transparent); outline-offset: 2px; }
.switch input[disabled] { opacity: .55; cursor: not-allowed; }
.switch-row { display: flex !important; align-items: center; gap: .65rem; font-weight: 500 !important; cursor: pointer; padding: 0 !important; margin: 0 !important; }
.switch-row input[type=radio] { width: 20px; height: 20px; margin: 0 10px; flex: none; }

/* matrice funzionalità */
.matrix-card { padding: 0 !important; overflow: clip; }
.matrix-card .table-wrap { border: 0; border-radius: var(--radius) var(--radius) 0 0; }
.matrix td:first-child { min-width: 260px; }
.matrix td small { margin-top: .15rem; line-height: 1.4; }
.matrix tr.group th { background: var(--surface-2); text-align: left; font-size: .74rem; letter-spacing: .1em; color: var(--green); padding-top: .9rem; }
.matrix td, .matrix th { vertical-align: middle; }
.matrix th:not(:first-child) { width: 92px; }
.matrix-card .sticky-save { margin: 0; padding: .8rem 1.2rem; border-radius: 0 0 var(--radius) var(--radius); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(6px); }
@media (min-width: 900px) {
  .matrix-card { overflow: visible; }
  .matrix-wrap { overflow: visible !important; }
  .matrix thead th { position: sticky; top: var(--top-h); z-index: 3; box-shadow: inset 0 -1px 0 var(--line); }
  .matrix thead th:first-child { border-top-left-radius: var(--radius); }
  .matrix thead th:last-child { border-top-right-radius: var(--radius); }
}

/* editor dei piani: card affiancate */
.plan-editor { flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.1rem; margin: 0 0 1.2rem; min-width: 0; }
.plan-edit { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 1.1rem 1.25rem 1rem; display: flex; flex-wrap: wrap; gap: 0 .8rem; align-content: start; min-width: 0; }
.plan-edit.featured { border: 2px solid var(--campo); }
.plan-edit-head { flex: 1 1 100%; display: flex; align-items: center; gap: .5rem; padding-bottom: .8rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.plan-edit-head h3 { margin: 0 auto 0 0; font-size: 1.25rem; letter-spacing: .02em; }
.plan-edit-head a.badge { text-decoration: none; }
.plan-edit-head a.badge:hover { background: var(--green-soft); color: var(--green); }
.plan-edit .sub { flex: 1 1 100%; display: flex; justify-content: space-between; margin: .3rem 0 .55rem; font-size: .72rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.plan-edit .sub span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.plan-edit .fld.half { flex: 1 1 calc(50% - .4rem); }
.plan-edit .fld { margin-bottom: .75rem; }
.plan-edit-foot { flex: 1 1 100%; display: grid; gap: .7rem; padding-top: .9rem; margin-top: .3rem; border-top: 1px solid var(--line); font-size: .92rem; }

/* pagamento del piano: mensile / annuale / a scelta */
.seg { flex: 1 1 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; margin: 0 0 .85rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.seg label { position: relative; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: .5rem .3rem; border-radius: 9px; font-size: .88rem; font-weight: 650; color: var(--ink-2); transition: background .15s, color .15s; }
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { background: var(--surface); color: var(--green); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg input:focus-visible + span { outline: 2px solid var(--campo); outline-offset: 1px; }
.plan-edit:has(.seg input[value="anno"]:checked) .price-mese,
.plan-edit:has(.seg input[value="mese"]:checked) .price-anno { display: none; }
.plan-edit:has(.seg input[value="anno"]:checked) .price-anno,
.plan-edit:has(.seg input[value="mese"]:checked) .price-mese { flex-basis: 100%; }
.price-preview { flex: 1 1 100%; display: grid; gap: .1rem; padding: .7rem .9rem; margin: 0 0 1rem; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); }
.price-preview .plan-price { font-size: 1.45rem; margin: 0; }
.price-preview .plan-billing { margin: .1rem 0 0; }
.price-free { flex: 1 1 100%; display: flex; gap: .6rem; align-items: flex-start; padding: .8rem .9rem; margin: 0 0 1rem; border-radius: 12px; background: var(--green-soft); color: var(--green); }
.price-free strong { color: var(--green); }
.price-free svg.i { flex: 0 0 auto; margin-top: .15rem; }
.price-free small { color: var(--ink-2); line-height: 1.4; }

/* filtri degli elenchi */
body.admin .filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem; box-shadow: var(--shadow); }
body.admin .filters .btn svg.i { width: 16px; height: 16px; }
.filters-count { margin-left: auto; padding-right: .3rem; }

/* tabelle */
body.admin .table-wrap { box-shadow: var(--shadow); }
body.admin table th { white-space: nowrap; }
body.admin tbody tr[data-href] { cursor: pointer; }
body.admin tbody tr[data-href]:hover td:first-child strong { color: var(--green-2); text-decoration: underline; }

/* schede */
body.admin .tabs { margin-bottom: 1.3rem; }
body.admin .tabs a { padding: .65rem .85rem; }
.quick { display: flex; flex-wrap: wrap; gap: .5rem; margin: -.2rem 0 1.2rem; }
.quick a { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); }
.quick a:hover { border-color: var(--green-2); color: var(--green-2); }
.quick svg.i { width: 17px; height: 17px; color: var(--campo); }
/* nei moduli a griglia ogni blocco che non è un campo occupa tutta la riga (evita colonne strette come i piani uno sotto l'altro) */
form.form > :is(div, section, p, ul, ol, table, details, h2, h3, h4, nav, aside):not(.fld):not(.half):not(.third) { flex: 1 1 100%; min-width: 0; }
@media (min-width: 861px) { .tabs { flex-wrap: wrap; overflow-x: visible; } }

/* ---------- Admin › Email ---------- */
.btn.ghost { background: transparent; border-color: transparent; color: var(--green-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.icon-only { min-width: 34px; padding-inline: .45rem; justify-content: center; }
.btn.ghost.danger { color: var(--bad); }
.card-head { display: flex; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; margin: 0 0 .9rem; flex: 1 1 100%; }
.card-head h3 { margin: 0; }
.card-head > a.btn:last-child, .card-head > .btn:last-child { margin-left: auto; }
.input-unit { display: flex; align-items: stretch; }
.input-unit input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.input-unit span { display: inline-flex; align-items: center; padding: 0 .7rem; border: 1px solid var(--line); border-left: 0; border-radius: 0 10px 10px 0; background: var(--surface-2); color: var(--ink-2); font-size: .88rem; }
.range-in { display: flex; align-items: center; gap: .35rem; }
.range-in input { width: 4.2rem; }
.range-in span { color: var(--ink-2); font-size: .88rem; }
.form-actions-inline { display: flex; gap: .5rem; align-items: flex-end; }
.smtp-log { white-space: pre-wrap; font-size: .78rem; max-height: 320px; overflow: auto; background: var(--surface-2); padding: .8rem; border-radius: 10px; }
.table-wrap.flat { border: 0; border-radius: 0; background: transparent; }
.mail-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin: 0 0 1rem; }
.mail-box { margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.mail-box.is-off { opacity: .7; }
.mail-box header { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.mail-box h3 { margin: 0; font-size: 1.02rem; overflow-wrap: break-word; }
.mail-box header p { margin: .1rem 0 0; }
.mail-box p { margin: 0; }
.mail-use { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.mail-use strong { font-family: var(--font-head); font-size: 1.6rem; color: var(--green); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.mail-use .small { margin-left: auto; }
.meter { position: relative; height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: visible; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--campo); min-width: 0; }
.meter.hot > span { background: var(--warn); }
.meter.full > span { background: var(--bad); }
.meter > i { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink-2); border-radius: 2px; }
.mail-rhythm { display: flex; gap: .4rem; align-items: flex-start; color: var(--ink-2); }
.mail-rhythm svg { width: 15px; height: 15px; flex: none; margin-top: .15rem; }
.cat-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; padding-top: .2rem; }
.row-actions { display: flex; gap: .35rem; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.rhythm-table th { white-space: normal; vertical-align: bottom; }
.rhythm-table td { vertical-align: middle; }
.rhythm-table input { width: 4.6rem; padding-inline: .55rem; }
.rhythm-table .range-in input { width: 3.4rem; }
.rhythm-table .input-unit input { width: 3.6rem; }
.rhythm-table .input-unit span { padding: 0 .5rem; }
.rhythm-table td:first-child { max-width: 15rem; overflow-wrap: break-word; }
.assign-table select { min-width: 16rem; max-width: 100%; }
.log-table .err-detail { display: inline-block; max-width: 34ch; overflow-wrap: anywhere; }
form:has(#b-met option[value="mail"]:checked) .smtp-only { display: none; }
@media (max-width: 860px) {
  .rhythm-table, .assign-table, .mail-table { min-width: 720px; }
  .assign-table select { min-width: 12rem; }
}

/* ---------- Guide: copertina e trasparenza sull'uso dell'AI ---------- */
.ai-note { display: flex; align-items: flex-start; gap: .4rem; margin: .5rem 0 0; font-size: .86rem; color: var(--ink-2); }
.ai-note svg { width: 15px; height: 15px; flex: none; margin-top: .15rem; color: var(--campo); }
.guide-cover { margin: .4rem 0 1.6rem; }
.guide-cover img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.guide-cover figcaption { margin-top: .5rem; }
.guide-card.has-thumb { padding-top: 0; overflow: hidden; }
.guide-thumb { position: relative; margin: 0 -1.2rem .9rem; aspect-ratio: 16 / 9; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.guide-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ai-chip { position: absolute; left: .6rem; bottom: .6rem; display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 650; background: rgba(15, 23, 15, .78); color: #fff; }
.ai-chip svg { width: 12px; height: 12px; }
.cover-preview { margin: 0 0 1rem; flex: 1 1 100%; }
.cover-preview img { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.fld.check.ai-check label { display: flex; align-items: flex-start; gap: .6rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-weight: 400; }
.fld.check.ai-check input { margin-top: .2rem; flex: none; }
.fld.check.ai-check strong { display: block; }
.fld.check.ai-check .help { display: block; margin-top: .15rem; }

/* Login: "Ricordami su questo dispositivo" */
.fld.check.remember label { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.fld.check.remember .help { display: block; margin: .2rem 0 0 1.75rem; }

/* Blog: paginazione e collegamento al feed */
.pub-section .pager { justify-content: center; align-items: center; gap: 1rem; margin-top: 1.6rem; }
.feed-link { display: flex; align-items: center; gap: .4rem; justify-content: center; margin-top: 1.4rem; }
.feed-link svg { width: 15px; height: 15px; }

/* ---------- Admin › Articoli: sezioni e calendario editoriale ---------- */
:root { --sez-guida: #2D711A; --sez-guida-soft: #e4f1dc; --sez-blog: #1f5fae; --sez-blog-soft: #e3eefb; }
@media (prefers-color-scheme: dark) { :root { --sez-guida: #9fd473; --sez-guida-soft: #1f3322; --sez-blog: #8fbcf2; --sez-blog-soft: #1b2c42; } }
.badge.sez-guida { background: var(--sez-guida-soft); color: var(--sez-guida); }
.badge.sez-blog { background: var(--sez-blog-soft); color: var(--sez-blog); }
.chips.filter { align-items: center; margin: 0 0 1rem; }
.chips-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 .25rem; padding: 0 !important; border: 0 !important; }
.cal-head { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; flex-wrap: wrap; }
.cal-head h2 { margin: 0 .4rem; font-size: 1.3rem; min-width: 11rem; text-align: center; }
.cal-head .spacer { flex: 1; }
.cal-legend { margin: 0 0 .8rem; }
.cal-warn { color: var(--warn); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-wd { background: var(--surface-2); padding: .45rem .6rem; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.cal-day { background: var(--surface); min-height: 112px; padding: .4rem; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.cal-day.is-pad { background: var(--surface-2); }
.cal-day.is-past { background: color-mix(in srgb, var(--surface) 55%, var(--surface-2)); }
.cal-day.is-clash { box-shadow: inset 0 0 0 2px var(--warn); }
.cal-num { display: flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 650; color: var(--ink-2); min-height: 1.6rem; }
.cal-wd-inline { display: none; }
.cal-day.is-today .cal-num > span:first-child { background: var(--campo); color: #fff; border-radius: 999px; padding: .05rem .5rem; }
.cal-num .badge { font-size: .66rem; }
.cal-add { margin-left: auto; width: 1.5rem; height: 1.5rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; text-decoration: none; font-weight: 700; color: var(--ink-2); opacity: 0; }
.cal-day:hover .cal-add, .cal-add:focus-visible { opacity: 1; background: var(--surface-2); }
.cal-item { display: block; padding: .3rem .45rem; border-radius: 7px; font-size: .8rem; line-height: 1.25; font-weight: 600; text-decoration: none; border: 1.5px solid; overflow-wrap: anywhere; }
.cal-item.sez-guida { background: var(--sez-guida-soft); color: var(--sez-guida); border-color: var(--sez-guida); }
.cal-item.sez-blog { background: var(--sez-blog-soft); color: var(--sez-blog); border-color: var(--sez-blog); }
.cal-item.st-programmato { border-style: dashed; }
.cal-item.st-bozza { border-style: dotted; background: transparent; }
.cal-item:hover { filter: brightness(.96); }
.cal-time { display: block; font-size: .68rem; font-weight: 500; opacity: .85; }
@media (hover: none) { .cal-add { opacity: 1; } }
@media (max-width: 860px) {
  .cal { grid-template-columns: 1fr; }
  .cal-wd, .cal-day.is-pad { display: none; }
  .cal-day { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; padding: .5rem .6rem; }
  .cal-day.is-empty.is-past { display: none; }
  .cal-num { flex: 1 1 100%; }
  .cal-wd-inline { display: inline; font-weight: 500; }
  .cal-item { flex: 1 1 100%; }
  .cal-head h2 { min-width: 0; flex: 1; }
}

.cal-more { display: contents; }
.cal-more summary { cursor: pointer; font-size: .78rem; font-weight: 600; color: var(--ink-2); padding: .1rem .2rem; }
.cal-more[open] summary { margin-bottom: .1rem; }
.cal-more .cal-item { margin-top: .3rem; }

/* ---------- Verifiche automatiche dei contenuti ---------- */
.verify-card h3 { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.verify-card h3 svg { width: 18px; height: 18px; }
.verify-card form { margin: .8rem 0 .4rem; }
.verify-h { margin: .7rem 0 .25rem; }
.verify-list { margin: 0; padding-left: 1.1rem; font-size: .88rem; line-height: 1.45; }
.verify-list li { margin: .2rem 0; overflow-wrap: anywhere; }
.verify-card details { margin: .6rem 0; font-size: .9rem; }
.verify-card details .verify-list { list-style: none; padding-left: 0; }
.verify-table td { vertical-align: top; }
.verify-table td:nth-child(3) { min-width: 18rem; }
.verify-note { display: flex; align-items: center; gap: .35rem; margin-top: .6rem; }
.verify-note svg { width: 15px; height: 15px; color: var(--campo); flex: none; }
.report-box { margin: 1.4rem 0; }
.report-box summary { cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; font-size: .92rem; color: var(--ink-2); }
.report-box summary svg { width: 15px; height: 15px; }
.report-box details[open] summary { margin-bottom: .8rem; }
.report-box .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- v23: esperto, precisione, curve con fonte ---------- */
.expert-note { display: flex; align-items: flex-start; gap: .4rem; margin: .5rem 0 0; font-size: .92rem; color: var(--ink); }
.expert-note svg { width: 17px; height: 17px; flex: none; margin-top: .15rem; color: var(--campo); }
.radio-inline { display: inline-flex; align-items: center; gap: .3rem; margin-right: .8rem; font-weight: 500; white-space: nowrap; }
.accuracy-table td { vertical-align: top; }
.accuracy-table td:first-child { min-width: 18rem; }
.accuracy-table input[type=text] { min-width: 12rem; }
.curve-form .curve-row { display: flex; flex-wrap: wrap; gap: .6rem .8rem; margin-bottom: .9rem; }
.curve-row legend .badge { margin-left: .4rem; font-weight: 600; }
.curve-row .fld { margin: 0; flex: 1 1 100%; min-width: 0; }
.curve-row .c-sp { flex: 1 1 180px; } .curve-row .c-sin { flex: 2 1 260px; }
.curve-row .c-n { flex: 0 1 110px; } .curve-row .c-src { flex: 2 1 260px; } .curve-row .c-url { flex: 2 1 240px; } .curve-row .c-note { flex: 2 1 240px; }
.curve-row .c-act { flex: 1 1 100%; display: flex; gap: 1.2rem; }
.curve-row .c-act label { padding-top: 0; }

/* v24: modalità lancio */
.launch-card{border-left:4px solid var(--line,#dfe3d6)}
.launch-card.is-on{border-left-color:var(--green,#2d711a)}
.launch-card fieldset{margin-top:1.1rem}
.launch-main{padding:.9rem 1rem;border:1px solid var(--line,#dfe3d6);border-radius:12px;background:var(--surface-2,#f4f5ee)}
.launch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,17.5rem),1fr));gap:.6rem}
.launch-item{display:flex;gap:.65rem;align-items:flex-start;padding:.7rem .8rem;border:1px solid var(--line,#dfe3d6);border-radius:10px;cursor:pointer;min-width:0}
.launch-item input{margin-top:.2rem;flex:none}
.launch-item span{min-width:0}
.launch-item.adv{background:#fbf3dc;border-color:#ecd9a0}
.launch-card .switch-row{align-items:flex-start;margin:.5rem 0}
.launch-list{margin:.2rem 0 .8rem 3.6rem;font-size:.95rem}
.launch-list ul{margin:.4rem 0 0;padding-left:1.1rem}
.launch-list li{margin:.25rem 0}
@media (max-width:640px){.launch-list{margin-left:0}}

/* v25: video guide */
.vg-hint{margin:-.2rem 0 1rem;font-size:.95rem}
.vg-hint a{display:inline-flex;align-items:center;gap:.4rem;font-weight:600}
.vg-hint .i{width:1.15rem;height:1.15rem}
.vg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,21rem),1fr));gap:1rem;margin:1rem 0}
.vg-card{display:flex;gap:1rem;padding:.9rem;background:var(--surface,#fff);border:1px solid var(--line,#dfe3d6);border-radius:16px;text-decoration:none;color:inherit;min-width:0}
.vg-card:hover,.vg-card:focus-visible{border-color:var(--green,#2d711a)}
.vg-thumb{position:relative;flex:none;width:92px;aspect-ratio:9/16;border-radius:10px;overflow:hidden;background:#0c3524}
.vg-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.vg-play{position:absolute;inset:0;display:grid;place-items:center;color:#fff;background:rgba(12,53,36,.28)}
.vg-play .i{width:2.4rem;height:2.4rem}
.vg-info{display:flex;flex-direction:column;gap:.35rem;min-width:0}
.vg-info strong{font-size:1.12rem}
.vg-meta{display:inline-flex;align-items:center;gap:.35rem;font-size:.9rem;color:var(--ink-2,#57614f);margin-top:auto}
.vg-meta .i{width:1rem;height:1rem;flex:none}
.vg-layout{display:grid;grid-template-columns:minmax(0,360px) minmax(0,1fr);gap:1.6rem;align-items:start}
.vg-player{position:sticky;top:5rem}
.vg-player video{display:block;width:100%;height:auto;aspect-ratio:9/16;border-radius:16px;background:#0c3524}
.vg-player p{margin:.7rem 0 0}
.vg-steps h2{margin-top:0}
.vg-steps ol{list-style:none;margin:0 0 1rem;padding:0;display:grid;gap:.6rem}
.vg-steps li{display:flex;gap:.8rem;align-items:flex-start;padding:.8rem .9rem;background:var(--surface,#fff);border:1px solid var(--line,#dfe3d6);border-radius:14px}
.vg-steps li.now{border-color:var(--green,#2d711a);box-shadow:0 0 0 2px rgba(45,113,26,.18)}
.vg-steps li p{margin:.25rem 0 0}
.vg-seek{flex:none;display:inline-flex;flex-direction:column;align-items:center;gap:.1rem;min-width:3.2rem;padding:.35rem .3rem;border:1px solid var(--line,#dfe3d6);border-radius:10px;background:var(--surface-2,#f4f5ee);color:var(--green,#2d711a);font:inherit;font-size:.82rem;font-weight:600;cursor:pointer}
.vg-seek .i{width:1.5rem;height:1.5rem}
.vg-ex{font-size:.95rem;background:#fbf3dc;color:#3b2f05;border-radius:8px;padding:.35rem .6rem}
.vg-ex span{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;font-weight:700;color:#7a5a00;margin-right:.3rem}
@media (max-width:860px){.vg-layout{grid-template-columns:1fr}.vg-player{position:static;max-width:360px;margin:0 auto;width:100%}}

/* v26: video guide, nota per chi guarda da computer e pagina di amministrazione */
.vg-desk{display:none}
@media (min-width:861px){.vg-desk{display:block}}
.vga-list{display:grid;gap:.8rem;margin:1rem 0}
.vga-row{display:flex;gap:1rem;align-items:flex-start;margin:0}
.vga-row.is-off{opacity:.72}
.vga-thumb{flex:none;width:72px;aspect-ratio:9/16;border-radius:8px;overflow:hidden;background:#0c3524}
.vga-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.vga-info{flex:1;min-width:0;display:grid;gap:.25rem}
.vga-info details{margin-top:.3rem}
.vga-info ol{margin:.5rem 0 0;padding-left:1.2rem;display:grid;gap:.35rem;font-size:.93rem}
.vga-info a .i{width:1rem;height:1rem;vertical-align:-.15em}
.vga-switch{flex:none;margin:0}
@media (max-width:560px){.vga-thumb{width:54px}}
.vga-info>.badge{justify-self:start}

/* v27: prova gratuita nella scheda del piano */
.plan-trial{display:flex;gap:.45rem;align-items:flex-start;margin:.2rem 0 .9rem;padding:.55rem .7rem;border-radius:10px;background:var(--green-soft,#e6f0db);font-size:.93rem;font-weight:600}
.plan-trial .i{width:1.05rem;height:1.05rem;flex:none;margin-top:.15rem}

/* v28: scelta degli elementi attivi */
.pick-list{list-style:none;margin:1rem 0;padding:0;display:grid;gap:.4rem}
.pick-list label{display:flex;gap:.6rem;align-items:center;padding:.6rem .8rem;border:1px solid var(--line,#dfe3d6);border-radius:10px;cursor:pointer}
.pick-list label span:first-of-type{flex:1;min-width:0}
