:root {
  --brand: #ff5a36;
  --brand-ink: #fff;
  --ink: #16161a;
  --ink-2: #55555f;
  --paper: #fafaf7;
  --line: #e6e4de;
  --night: #0b0b0f;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --top: calc(env(safe-area-inset-top, 0px) + 56px);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
.muted { color: var(--ink-2); }
.small { font-size: .86rem; }
.center { text-align: center; }

/* ---------- Logo e barra ---------- */
.logo { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 900; letter-spacing: -.02em; }
.logo-mark { background: var(--brand); color: var(--brand-ink); border-radius: 8px; padding: 3px 7px; font-size: .95rem; }
.logo-word { font-size: 1.1rem; }
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px; color: #fff;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0)); }
.topbar .logo { margin-right: auto; }
.topbar.light { position: sticky; top: 0; color: var(--ink); background: rgba(250,250,247,.92);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar.light .logo { margin-right: auto; }
.back { text-decoration: none; font-size: 1.4rem; padding: 0 6px 0 0; }
.icon-btn { background: rgba(255,255,255,.14); color: inherit; border: 0; border-radius: 50%; width: 40px; height: 40px;
  display: grid; place-items: center; backdrop-filter: blur(8px); }
.topbar.light .icon-btn { background: #efede7; }
.city-btn { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px; padding: 7px 14px; font-weight: 700; backdrop-filter: blur(8px); }

/* ---------- Feed verticale ---------- */
body.feed { background: var(--night); color: #fff; overflow: hidden; height: 100dvh; }
.stage { position: relative; height: 100dvh; width: 100%; max-width: 480px; margin: 0 auto; overflow: hidden; }
.stage .topbar { position: absolute; }
.stage-bg { display: none; }
.cats { position: absolute; top: var(--top); left: 0; right: 0; z-index: 25; display: flex; gap: 8px;
  padding: 4px 14px 10px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; text-decoration: none; font-size: .82rem; font-weight: 700; color: #fff; padding: 6px 12px;
  border-radius: 999px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(8px); }
.cat.on { background: var(--c, #fff); border-color: var(--c, #fff); color: #fff; }
.cat.on:not([style]) { background: #fff; color: var(--ink); }

.reel { height: 100dvh; overflow-y: scroll; scroll-snap-type: y mandatory; overscroll-behavior-y: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.reel::-webkit-scrollbar { display: none; }
.slide { position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden;
  display: flex; align-items: flex-end; background: #222; }
.slide .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide .shade { position: absolute; inset: 0; background:
  linear-gradient(to bottom, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 42%, rgba(0,0,0,.72) 70%, rgba(0,0,0,.92) 100%); }
.slide .content { position: relative; z-index: 2; padding: 0 76px calc(env(safe-area-inset-bottom, 0px) + 34px) 18px; width: 100%; }
.slide h2 { font-size: clamp(1.55rem, 6.4vw, 1.95rem); line-height: 1.12; margin: 10px 0 8px; font-weight: 850; letter-spacing: -.02em;
  text-wrap: balance; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.slide h2 a { text-decoration: none; }
.slide .sub { margin: 0 0 14px; font-size: .98rem; line-height: 1.4; color: rgba(255,255,255,.86);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: rgba(255,255,255,.8); }
.chip { display: inline-block; background: var(--c, var(--brand)); color: #fff; font-weight: 800; font-size: .72rem;
  letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; }
.chip.small { font-size: .64rem; padding: 3px 7px; }
.read { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 800;
  background: none; border: 0; padding: 0; font-size: 1rem; }
.read span { transition: transform .2s; }
.read:hover span { transform: translateX(4px); }
.actions { position: absolute; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 36px); z-index: 3;
  display: flex; flex-direction: column; gap: 14px; }
.act { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(10px); text-decoration: none; }
.act:active { transform: scale(.94); }
.slide-empty { background: radial-gradient(circle at 30% 20%, #3a2a6a, var(--night) 70%); }
.slide-end { background: radial-gradient(circle at 70% 30%, #6a2a1a, var(--night) 70%); }
.sentinel { height: 1px; }

@media (min-width: 700px) {
  .stage { border-left: 1px solid rgba(255,255,255,.08); border-right: 1px solid rgba(255,255,255,.08); box-shadow: 0 0 80px rgba(0,0,0,.6); }
  .stage-bg { display: block; position: fixed; inset: -40px; background-size: cover; background-position: center;
    filter: blur(40px) brightness(.45) saturate(1.2); transition: background-image .4s; }
}

/* ---------- Pagine chiare ---------- */
body.page { background: var(--paper); }
.article { max-width: 760px; margin: 0 auto; padding-bottom: 40px; }
.hero { margin: 0; }
.hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.hero figcaption { font-size: .75rem; color: var(--ink-2); padding: 6px 18px 0; }
.article-body { padding: 18px 18px 0; }
.article .meta { color: var(--ink-2); flex-wrap: wrap; }
.article h1 { font-size: clamp(1.7rem, 5.5vw, 2.5rem); line-height: 1.12; letter-spacing: -.025em; margin: 12px 0 10px; font-weight: 850; text-wrap: balance; }
.lead { font-size: 1.15rem; line-height: 1.5; color: #33333b; margin: 0 0 18px; }
.prose { font-size: 1.1rem; line-height: 1.7; font-family: Charter, "Iowan Old Style", Georgia, serif; }
.prose h2 { font-family: var(--font); font-size: 1.3rem; margin: 1.6em 0 .4em; letter-spacing: -.01em; }
.prose p { margin: 0 0 1.05em; }
.prose blockquote { margin: 1.2em 0; padding-left: 16px; border-left: 4px solid var(--brand); font-style: italic; }
.sources { margin-top: 28px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.sources h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 8px; color: var(--ink-2); }
.sources ul { margin: 0; padding-left: 18px; line-height: 1.6; font-size: .95rem; }
.ai-note { font-size: .88rem; color: var(--ink-2); background: #f1efe9; border-radius: 10px; padding: 12px 14px; margin-top: 16px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 8px; }
.more { padding: 26px 18px 0; }
.more h2 { font-size: 1.2rem; }
.more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.more-card { text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.more-card img { aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; }
.more-card .chip { align-self: flex-start; }
.more-card strong { line-height: 1.25; }
.more-card small { color: var(--ink-2); }
.narrow { max-width: 680px; margin: 0 auto; padding: 24px 18px 40px; }
.narrow h1 { font-size: 2rem; letter-spacing: -.02em; }
.prose-page { line-height: 1.65; }
.prose-page h2 { font-size: 1.15rem; margin-top: 1.6em; }
.site-footer { text-align: center; font-size: .85rem; color: var(--ink-2); padding: 26px 18px 40px; border-top: 1px solid var(--line); margin-top: 20px; }
.site-footer a { color: var(--ink-2); }
.status-list { display: grid; gap: 12px; margin: 16px 0 26px; }
.status-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.status-item strong { min-width: 110px; }
.badge { font-size: .75rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.badge.ok { background: #dcf5e7; color: #0b6b3a; }
.badge.warn { background: #fff1d6; color: #8a5800; }

/* ---------- Bottoni e form ---------- */
.btn-primary { display: inline-flex; justify-content: center; align-items: center; background: var(--brand); color: #fff; border: 0;
  border-radius: 12px; padding: 12px 18px; font-weight: 800; text-decoration: none; }
.btn-primary.small { padding: 7px 12px; font-size: .85rem; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 12px; padding: 11px 16px; font-weight: 700; text-decoration: none; }
.btn-ghost.dark { color: var(--ink); border-color: var(--line); background: #fff; }
.btn-danger { background: #fff; color: #b3261e; border: 1px solid #f0c9c6; border-radius: 12px; padding: 11px 16px; font-weight: 700; }
input[type=email], input[type=tel], input[type=text], select { font: inherit; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; background: #fff; color: var(--ink); min-width: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 800; margin-bottom: 6px; padding: 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row input { flex: 1 1 180px; }
.stack { display: grid; gap: 6px; }
.stack label { display: grid; gap: 4px; font-weight: 700; }
.inline { display: flex !important; align-items: center; gap: 8px; font-weight: 600 !important; margin-bottom: 8px; }
.chips-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line);
  font-weight: 700; font-size: .88rem; cursor: pointer; user-select: none; background: #fff; }
.chip-check input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }
.chip-check input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--ink-2); margin: 4px 0 16px; }
.consent input { margin-top: 3px; }
.form-result { margin-top: 12px; font-size: .95rem; line-height: 1.45; }
.form-result .ok { background: #dcf5e7; color: #0b4a2a; padding: 12px 14px; border-radius: 10px; }
.form-result .err { background: #fde2e0; color: #8c1d18; padding: 12px 14px; border-radius: 10px; }
.form-result a.btn-primary { margin-top: 10px; }

/* ---------- Sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; display: none; }
.sheet.open { display: block; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); animation: fade .2s; }
.sheet-panel { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100%);
  max-height: 92dvh; overflow-y: auto; background: var(--paper); color: var(--ink); border-radius: 22px 22px 0 0;
  padding: 22px 18px calc(env(safe-area-inset-bottom, 0px) + 22px); animation: up .25s ease-out; }
.sheet-panel h2 { margin: 0 34px 6px 0; font-size: 1.35rem; letter-spacing: -.01em; }
.sheet-panel form { margin-top: 16px; }
.sheet-panel .btn-primary[type=submit] { width: 100%; padding: 14px; font-size: 1.05rem; }
.sheet-x { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #ebe9e3; color: var(--ink); }
.city-list { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.city-list a { display: flex; justify-content: space-between; align-items: center; text-decoration: none; padding: 14px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; font-weight: 800; font-size: 1.05rem; }
.city-list a.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }
.city-list small { color: var(--ink-2); font-weight: 600; }
@keyframes up { from { transform: translate(-50%, 40px); opacity: .4; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Cookie ---------- */
.cookie { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  width: min(560px, calc(100% - 24px)); background: #1b1b22; color: #fff; border-radius: 16px; padding: 14px 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.4); font-size: .88rem; line-height: 1.4; }
.cookie p { margin: 0 0 10px; }
.cookie a { color: #fff; }
.cookie-actions { display: flex; gap: 8px; justify-content: flex-end; }
.cookie .btn-primary, .cookie .btn-ghost { padding: 9px 14px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
