/* Sito di Cedolì: stessa palette dell'app (src/bp/report/templates/_stile.css). Nessun font o immagine esterna. */
:root {
  --bg: #f6f4ef; --surface: #ffffff; --text: #1c1f24; --muted: #5f6670; --line: #e2ded5;
  --accent: #23507a; --accent-2: #e0a43a; --on-accent: #ffffff; --soft: #e8eef4;
  --pos: #2e7650; --pos-bg: #e3f0e8;
  --brand: #23507a; --brand-2: #e0a43a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121417; --surface: #1b1e22; --text: #eceae4; --muted: #a3a7ae; --line: #2e3238;
    --accent: #8cb6e0; --accent-2: #ebc06e; --on-accent: #121417; --soft: #1e2833;
    --pos: #7cc79a; --pos-bg: #1d3327;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121417; --surface: #1b1e22; --text: #eceae4; --muted: #a3a7ae; --line: #2e3238;
  --accent: #8cb6e0; --accent-2: #ebc06e; --on-accent: #121417; --soft: #1e2833;
  --pos: #7cc79a; --pos-bg: #1d3327;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
code, pre { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88em; }
pre { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; line-height: 1.45; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Intestazione */
header.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 2; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
nav.menu { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; font-size: 15px; }
nav.menu a { color: var(--muted); text-decoration: none; }
nav.menu a:hover, nav.menu a[aria-current] { color: var(--text); }
.theme { font: inherit; font-size: 14px; padding: 5px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }

/* Sezioni */
section { padding: 56px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 16px; }
h2 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 12px; }
h3 { font-size: 18px; margin: 0 0 6px; }
.lead { font-size: 20px; color: var(--muted); max-width: 40em; margin: 0 0 24px; }
.intro { color: var(--muted); max-width: 42em; margin: 0 0 28px; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 600; color: var(--accent); background: var(--soft); border-radius: 999px; padding: 3px 12px; margin-bottom: 16px; }

.hero { padding-top: 64px; }
.hero .grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 12px; background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 650; border: 1px solid var(--accent); }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: transparent; color: var(--accent); }
.small { font-size: 14px; color: var(--muted); }
.shot { border-radius: 14px; border: 1px solid var(--line); overflow: hidden; background: var(--surface); box-shadow: 0 10px 30px rgba(20, 30, 45, .10); }
.shot figcaption { font-size: 13px; color: var(--muted); padding: 8px 12px; border-top: 1px solid var(--line); }

/* Immagini chiare o scure secondo il tema scelto */
.dark-only { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dark-only { display: block; }
  :root:not([data-theme="light"]) .light-only { display: none; }
}
:root[data-theme="dark"] .dark-only { display: block; }
:root[data-theme="dark"] .light-only { display: none; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 12px; font-weight: 700; }

.tour { display: grid; gap: 40px; }
.tour .step { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: center; }
.tour .step:nth-child(even) .text { order: 2; }
.tour .text p { color: var(--muted); margin: 0; }

.privacy .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li { padding: 8px 0 8px 32px; position: relative; border-bottom: 1px dashed var(--line); }
ul.checks li::before { content: "✓"; position: absolute; left: 4px; top: 8px; color: var(--pos); font-weight: 700; }

.download .box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; }
.download ol { padding-left: 20px; margin: 12px 0 0; }
.download ol li { margin-bottom: 6px; }
.hash code { word-break: break-all; }
.version { font-weight: 650; }

.formats table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.formats th, .formats td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.formats th { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.formats tr:last-child td { border-bottom: 0; }
.scroll { overflow-x: auto; }

.support { background: var(--soft); }
/* Pulsante Ko-fi disegnato qui, come nell'app: l'immagine originale verrebbe scaricata da Internet. */
a.kofi { display: inline-flex; align-items: center; gap: 8px; background: #72a4f2; color: #fff; border-radius: 12px; padding: 0 16px 0 12px; height: 44px; font-size: 16px; font-weight: 700; text-decoration: none; white-space: nowrap; }
a.kofi:hover { filter: brightness(1.06); }

/* Pagina verifica */
.steps { counter-reset: s; display: grid; gap: 16px; }
.steps .card { position: relative; padding-left: 64px; }
.steps .card::before { counter-increment: s; content: counter(s); position: absolute; left: 20px; top: 20px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.steps .card p { color: var(--text); margin: 0 0 8px; }
.steps .card p:last-child { margin-bottom: 0; }
.note { border-left: 4px solid var(--accent-2); padding: 4px 0 4px 16px; color: var(--muted); }

footer { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: grid; gap: 8px; }

@media (max-width: 820px) {
  .hero .grid, .tour .step, .privacy .grid, .download .box { grid-template-columns: 1fr; }
  .tour .step:nth-child(even) .text { order: 0; }
  section { padding: 40px 0; }
  body { font-size: 16px; }
  .lead { font-size: 18px; }
  nav.menu .hide-sm { display: none; }
}
.logo .b { fill: var(--brand); } .logo .o { fill: var(--brand-2); } .logo .s { stroke: var(--brand); }
.hero .grid > *, .tour .step > *, .privacy .grid > *, .download .box > * { min-width: 0; }
/* Gli screenshot sono lunghi: si mostra la parte alta, la più significativa. */
.hero .shot img { max-height: 520px; object-fit: cover; object-position: top; width: 100%; }
.tour .shot img { max-height: 440px; object-fit: cover; object-position: top; width: 100%; }

/* Pagina note legali */
.wrap.narrow { max-width: 820px; }
.legal .hero { padding-top: 48px; }
.legal section ul { padding-left: 20px; }
.legal section li { margin-bottom: 6px; }
.legal h3 { margin-top: 24px; }
h3.sub { margin: 40px 0 14px; font-size: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { text-decoration: none; font-size: 15px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.ic { width: 28px; height: 28px; color: var(--accent); flex: none; }

/* Schema del percorso dei dati */
.flow { display: flex; align-items: stretch; gap: 12px; }
.flow .node { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-width: 0; }
.flow > .node { flex: 0 0 170px; justify-content: center; }
.flow .node span { font-size: 14px; color: var(--muted); line-height: 1.4; }
.flow .arrow { align-self: center; font-size: 26px; font-weight: 700; color: var(--accent-2); }
.flow .arrow.cut { color: #c0392b; }
.flow .pc { flex: 1; min-width: 0; border: 2px dashed var(--accent); border-radius: 18px; padding: 12px; background: var(--soft); }
.flow .pc-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); margin: 0 0 10px 4px; }
.flow .pc-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.flow .net { opacity: .75; border-style: dashed; }
.flow .net .ic { color: #c0392b; }

/* Tabella di confronto */
table.vs { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 15px; }
table.vs th, table.vs td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.vs th { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
table.vs th:last-child, table.vs td:last-child { background: var(--pos-bg); }
table.vs tr:last-child td { border-bottom: 0; }
.mk { display: inline-block; font-weight: 700; font-size: 13px; padding: 1px 8px; border-radius: 999px; margin-right: 4px; }
.mk.ok { color: var(--pos); background: var(--pos-bg); border: 1px solid var(--pos); }
.mk.bad { color: #a8322a; background: #fbe9e7; }

/* Cosa non è, a chi chiedere */
.nots .ico.x { background: #fbe9e7; color: #a8322a; }
.ask { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.ask > div { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.ask span { font-size: 14px; color: var(--muted); line-height: 1.4; }

/* Voci una per una */
dl.rows { margin: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
dl.rows > div { display: grid; grid-template-columns: 210px 1fr; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
dl.rows > div:last-child { border-bottom: 0; }
dl.rows dt { font-weight: 650; }
dl.rows dd { margin: 0; color: var(--muted); font-size: 16px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 9px; border-radius: 999px; margin-right: 6px; vertical-align: 1px; }
.pill.na { background: var(--soft); color: var(--accent); border: 1px solid var(--accent); }
.pill.none { background: var(--pos-bg); color: var(--pos); border: 1px solid var(--pos); }
.pill.local { background: var(--accent-2); color: #1c1f24; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mk.bad, :root:not([data-theme="light"]) .nots .ico.x { background: #3a1f1c; color: #f0a59c; }
}
:root[data-theme="dark"] .mk.bad, :root[data-theme="dark"] .nots .ico.x { background: #3a1f1c; color: #f0a59c; }

@media (max-width: 820px) {
  .flow { flex-direction: column; }
  .flow > .node { flex: none; }
  .flow .arrow { transform: rotate(90deg); }
  .flow .pc-steps { grid-template-columns: 1fr; }
  dl.rows > div { grid-template-columns: 1fr; gap: 4px; }
}

/* Video dimostrativo della home */
.demo .shot { max-width: 960px; }
.demo video { display: block; width: 100%; height: auto; background: var(--bg); }

/* Sito su più pagine */
section.first { padding-top: 48px; }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
a.card.link { display: flex; flex-direction: column; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
a.card.link:hover { border-color: var(--accent); transform: translateY(-2px); }
a.card.link p { flex: 1; }
.card .more { margin-top: 14px; font-weight: 650; color: var(--accent); font-size: 15px; }
.cta-band { background: var(--soft); text-align: center; }
.cta-band .intro { margin-left: auto; margin-right: auto; }
.cta-band .cta { justify-content: center; }
p.next { margin-top: 40px; display: flex; gap: 12px; flex-wrap: wrap; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; font-weight: 600; }
.foot-nav a { color: var(--text); text-decoration: none; }
.foot-nav a:hover { color: var(--accent); }
.steps { grid-template-columns: minmax(0, 1fr); }

/* Invito discreto a sostenere il progetto, in fondo a ogni pagina */
.foot-support { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 15px; }
a.btn-cafe { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); text-decoration: none; font-weight: 650; font-size: 15px; white-space: nowrap; }
a.btn-cafe:hover { background: var(--accent); color: var(--on-accent); }
