/* ─────────────────────────────────────────────
   Design system Methood / Disobey (estratto da Methood HUB, 13/10/26)
   Base comune per i siti Methood: stessi colori, caratteri, loghi e componenti.
   Identità Disobey: pittogramma "O" e lettering largo. Colori aziendali:
   nero #111115, bianco #FFFFFF, viola #916BCF (accento editoriale),
   verdino #20E8A6 (azioni e variazioni positive). Rosso solo per i cali.
   Caratteri: Saira (titoli e cifre), Geist (testo), Geist Mono (etichette dati).
   Raggi: pannelli 22px, elementi interni 12px, controlli a pillola.
   ───────────────────────────────────────────── */

@font-face { font-family: "Saira"; src: url("assets/fonts/saira-var.woff2") format("woff2"); font-weight: 100 900; font-stretch: 50% 125%; font-display: swap; }
@font-face { font-family: "Geist"; src: url("assets/fonts/geist-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("assets/fonts/geist-mono-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f4f4f6;
  --surface: #ffffff;
  --surface-2: #ececf0;
  --surface-3: #e2e2e8;
  --line: rgba(17, 17, 21, 0.09);
  --line-2: rgba(17, 17, 21, 0.17);
  --ink: #111115;
  --ink-2: #4c4c57;
  --ink-3: #696974;
  --accent: #7350b4;
  --accent-fill: #916bcf;
  --accent-soft: rgba(145, 107, 207, 0.13);
  --brand-green: #20e8a6;
  --on-green: #111115;
  --up: #06805a;
  --up-fill: #06805a;
  --up-soft: rgba(32, 232, 166, 0.16);
  --down: #c43a3f;
  --down-soft: rgba(196, 58, 63, 0.09);
  --warn: #9a5b0c;
  --warn-soft: rgba(154, 91, 12, 0.11);
  --logo-outer: #111115;
  --logo-inner: #ffffff;
  --cta: #111115;
  --on-cta: #ffffff;
  --knob: #20e8a6;
  --shadow-1: 0 1px 0 rgba(17, 17, 21, 0.03), 0 1px 3px rgba(17, 17, 21, 0.05);
  --shadow-2: 0 2px 6px rgba(17, 17, 21, 0.04), 0 18px 40px -18px rgba(17, 17, 21, 0.22);
  --grain: 0.03;

  --font-display: "Saira", "Geist", system-ui, sans-serif;
  --font-text: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-panel: 22px;
  --r-inner: 12px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-press: cubic-bezier(0.32, 0.72, 0, 1);

  --z-sticky: 20;
  --z-side: 30;
  --z-scrim: 40;
  --z-dialog: 50;
  --z-grain: 60;

  --wrap: 1240px;
  --side-w: 272px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #111115;
    --surface: #1a1a21;
    --surface-2: #24242c;
    --surface-3: #2e2e37;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.15);
    --ink: #f5f5f7;
    --ink-2: #b4b4bf;
    --ink-3: #8a8a96;
    --accent: #b39be4;
    --accent-fill: #916bcf;
    --accent-soft: rgba(145, 107, 207, 0.18);
    --brand-green: #20e8a6;
    --on-green: #111115;
    --up: #20e8a6;
    --up-fill: #20e8a6;
    --up-soft: rgba(32, 232, 166, 0.13);
    --down: #ff7183;
    --down-soft: rgba(255, 113, 131, 0.13);
    --warn: #f0b357;
    --warn-soft: rgba(240, 179, 87, 0.13);
    --logo-outer: #ffffff;
    --logo-inner: #111115;
    --cta: #20e8a6;
    --on-cta: #111115;
    --knob: rgba(17, 17, 21, 0.12);
    --shadow-1: 0 1px 0 rgba(0, 0, 0, 0.35);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.3), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    --grain: 0.045;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111115;
  --surface: #1a1a21;
  --surface-2: #24242c;
  --surface-3: #2e2e37;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --ink: #f5f5f7;
  --ink-2: #b4b4bf;
  --ink-3: #8a8a96;
  --accent: #b39be4;
  --accent-fill: #916bcf;
  --accent-soft: rgba(145, 107, 207, 0.18);
  --brand-green: #20e8a6;
  --on-green: #111115;
  --up: #20e8a6;
  --up-fill: #20e8a6;
  --up-soft: rgba(32, 232, 166, 0.13);
  --down: #ff7183;
  --down-soft: rgba(255, 113, 131, 0.13);
  --warn: #f0b357;
  --warn-soft: rgba(240, 179, 87, 0.13);
  --logo-outer: #ffffff;
  --logo-inner: #111115;
  --cta: #20e8a6;
  --on-cta: #111115;
  --knob: rgba(17, 17, 21, 0.12);
  --shadow-1: 0 1px 0 rgba(0, 0, 0, 0.35);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.3), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  --grain: 0.045;
}

/* ───────── base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; touch-action: manipulation; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01" on;
}
/* grana leggera, fissa e non interattiva */
body::after {
  content: ""; position: fixed; inset: 0; z-index: var(--z-grain); pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
img { max-width: 100%; }
kbd { font-family: var(--font-mono); }
.num, .tnum { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 3px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--accent-fill) 30%, transparent); }
.sr-only { position: absolute; 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: 16px; top: -60px; z-index: var(--z-dialog); padding: 10px 16px; border-radius: var(--r-pill); background: var(--cta); color: var(--on-cta); font-weight: 600; text-decoration: none; transition: top 0.2s var(--ease); }
.skip-link:focus { top: 12px; }

.ico { width: 1.15em; height: 1.15em; flex: none; display: block; }
.logo { display: block; height: 100%; width: auto; }
.logo .lo-outer { fill: var(--logo-outer); }
.logo .lo-inner { fill: var(--logo-inner); }

/* ───────── shell ───────── */
.app {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  transition: grid-template-columns 0.42s var(--ease);
  overflow-x: clip;
}
.app.side-collapsed { grid-template-columns: 0 minmax(0, 1fr); }

.sidebar {
  position: sticky; top: 0;
  height: 100vh; height: 100dvh;
  width: var(--side-w);
  overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 18px;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-right: 1px solid var(--line);
  transition: transform 0.42s var(--ease), visibility 0.42s;
  z-index: var(--z-side);
  scrollbar-width: thin;
}
.app.side-collapsed .sidebar { transform: translateX(-100%); visibility: hidden; }
.sidebar > * { flex-shrink: 0; }

.side-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 0; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); text-decoration: none; }
.brand-mark { height: 38px; flex: none; display: block; }
.brand-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.brand-name { font-family: var(--font-display); font-stretch: 108%; font-weight: 760; font-size: 19px; line-height: 1; letter-spacing: -0.01em; white-space: nowrap; }
.brand-by { display: flex; align-items: center; gap: 6px; height: 10px; color: var(--ink-3); }
.brand-by .by { font-size: 11px; line-height: 1; }
.brand-by [data-brand] { height: 10px; display: block; }
.sidebar .side-close { margin-left: auto; display: none; }

.side-edition {
  position: relative; overflow: hidden;
  display: grid; gap: 2px;
  padding: 14px 16px 15px; border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.side-edition:empty { display: none; }
.side-edition .lbl { font-size: 12px; color: var(--ink-3); }
.side-edition strong { font-family: var(--font-display); font-stretch: 104%; font-weight: 720; font-size: 20px; white-space: nowrap; line-height: 1.15; letter-spacing: -0.01em; }
.side-edition .vs { font-size: 12.5px; color: var(--ink-2); }
.side-edition { padding-right: 52px; }
.side-edition .wm { position: absolute; right: 14px; top: 14px; height: 26px; opacity: 0.14; pointer-events: none; }

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-group { display: flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 14px 10px 6px; }
.nav-group:first-child { padding-top: 2px; }
.nav-group b { font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--ink-3); opacity: 0.8; }
.nav a {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  min-height: 40px; padding: 0 10px;
  border-radius: var(--r-inner);
  color: var(--ink-2); text-decoration: none;
  font-weight: 500; font-size: 14.5px;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.nav a .ico { width: 19px; height: 19px; opacity: 0.85; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); font-weight: 600; }
.nav a[aria-current="page"] .ico { opacity: 1; }
.nav .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.side-links { display: flex; flex-direction: column; gap: 2px; }
.side-links a {
  display: flex; align-items: center; gap: 10px;
  min-height: 36px; padding: 0 10px; border-radius: var(--r-inner);
  color: var(--ink-2); text-decoration: none; font-size: 13.5px; font-weight: 500;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.side-links a .ico { width: 17px; height: 17px; }
.side-links a .ext { margin-left: auto; width: 13px; height: 13px; opacity: 0.6; }
.side-links a:hover { background: var(--surface-2); color: var(--ink); }
.side-links a.feedback { margin-top: 4px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-links a.feedback:hover { background: color-mix(in srgb, var(--accent-fill) 24%, transparent); color: var(--accent); }

.theme-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 3px; gap: 2px; border-radius: var(--r-pill); background: var(--surface-2); }
.theme-switch button { border: 0; background: transparent; cursor: pointer; min-height: 30px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 500; color: var(--ink-3); transition: background-color 0.2s var(--ease), color 0.2s var(--ease); }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

.main { min-width: 0; display: flex; flex-direction: column; padding-inline: clamp(16px, 3.6vw, 52px); }
.top-sentinel { display: block; height: 1px; margin-bottom: -1px; }

.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: 12px;
  min-height: 64px;
  margin-inline: calc(-1 * clamp(16px, 3.6vw, 52px));
  padding: env(safe-area-inset-top, 0px) clamp(16px, 3.6vw, 52px) 0;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.topbar.scrolled { border-bottom-color: var(--line); }
.top-mark { display: none; height: 30px; flex: none; }
.crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.crumbs a { color: var(--ink-3); text-decoration: none; transition: color 0.2s var(--ease); }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { opacity: 0.5; }
.crumbs strong { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.crumbs .ed-badge { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); padding: 3px 8px; border-radius: 6px; background: var(--surface-2); }

.icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease-press);
}
.icon-btn .ico { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn:active { transform: scale(0.94); }

.search-trigger {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 38px; padding: 0 8px 0 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink-2); cursor: pointer;
  font-size: 13.5px; font-weight: 500;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease-press);
}
.search-trigger .ico { width: 17px; height: 17px; }
.search-trigger kbd { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 7px; background: var(--surface-2); font-size: 12px; color: var(--ink-3); }
.search-trigger:hover { border-color: var(--ink-3); color: var(--ink); }
.search-trigger:active { transform: scale(0.98); }

/* barra di lettura: animazione legata allo scroll, solo dove il browser la supporta */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; display: none; }
.progress i { display: block; height: 100%; background: var(--accent-fill); transform-origin: 0 50%; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  .reading-page .progress { display: block; }
  .reading-page .progress i { animation: grow linear both; animation-timeline: scroll(root block); }
  @keyframes grow { to { transform: scaleX(1); } }
}

#view { container-type: inline-size; container-name: view; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 8px 0 72px; outline: none; }
.view { display: flex; flex-direction: column; gap: 56px; }

.site-foot { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 28px 0 calc(32px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; color: var(--ink-3); font-size: 13px; }
.site-foot:empty { display: none; }
.site-foot .foot-logo { height: 26px; display: block; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-left: auto; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }

/* ───────── controlli ───────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  height: 44px; padding: 0 6px 0 20px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink);
  font-size: 14.5px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease-press);
}
.btn .knob { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); transition: transform 0.35s var(--ease); }
.btn .knob .ico { width: 16px; height: 16px; }
.btn:hover { border-color: var(--ink-3); }
.btn:hover .knob { transform: translateX(3px); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--cta); border-color: var(--cta); color: var(--on-cta); }
.btn.primary .knob { background: var(--knob); color: var(--on-green); }
.btn.primary:hover { border-color: var(--cta); background: color-mix(in srgb, var(--cta) 90%, var(--accent-fill)); }
.btn.plain { padding: 0 18px; }
.btn.small { height: 36px; font-size: 13.5px; padding: 0 14px; }

.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; text-decoration: none; }
.text-link .ico { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.text-link:hover .ico { transform: translateX(3px); }

/* variazioni: segno + freccia + colore, mai solo colore */
.delta {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px 2px 6px; border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2);
}
.delta .ico { width: 13px; height: 13px; }
.delta.up { background: var(--up-soft); color: var(--up); }
.delta.down { background: var(--down-soft); color: var(--down); }
.delta.flat { padding-left: 8px; }
.pos { color: var(--up); font-weight: 600; white-space: nowrap; }
.neg { color: var(--down); font-weight: 600; white-space: nowrap; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 7px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2);
  vertical-align: 2px;
}
.tag.hot { background: var(--ink); color: var(--paper); }
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.teal { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.tag.down { background: var(--down-soft); color: var(--down); }
.tag.up { background: var(--up-soft); color: var(--up); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }

.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.kicker .ico { width: 16px; height: 16px; }
a.kicker:hover { text-decoration: underline; }
.label { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }

/* ───────── movimento ───────── */
.motion .view { animation: view-in 0.6s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }
.motion .rv { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.motion .rv.in { opacity: 1; transform: none; }
.flash { animation: flash 2.2s ease; border-radius: 10px; }
@keyframes flash { 0%, 40% { background: var(--accent-soft); box-shadow: 0 0 0 8px var(--accent-soft); } }

/* ───────── componenti editoriali ───────── */
.edition-line {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  padding-top: 14px; border-top: 3px solid var(--ink);
  font-size: 13.5px; color: var(--ink-2);
}
.edition-line strong { font-family: var(--font-display); font-stretch: 108%; font-weight: 700; font-size: 17px; color: var(--ink); letter-spacing: -0.005em; }
.edition-line .rest { margin-left: auto; color: var(--ink-3); }
.second { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; }
.second-col { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; min-width: 0; }
.block-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.block-head h2 { font-family: var(--font-display); font-stretch: 106%; font-weight: 740; font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.3rem); line-height: 1.02; letter-spacing: -0.015em; }
.block-head p { color: var(--ink-2); font-size: 15px; max-width: 60ch; }
details.more { border-top: 1px solid var(--line); }
details.more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 46px; font-size: 14.5px; font-weight: 600; color: var(--ink); transition: color 0.2s var(--ease); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .plus { position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); flex: none; transition: background-color 0.2s var(--ease), transform 0.4s var(--ease); }
details.more > summary .plus::before, details.more > summary .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -0.75px 0 0 -5px; background: currentColor; border-radius: 2px; transition: transform 0.4s var(--ease); }
details.more > summary .plus::after { transform: rotate(90deg); }
details.more[open] > summary .plus::after { transform: rotate(0deg); }
details.more > summary:hover { color: var(--accent); }
details.more > summary:hover .plus { background: var(--accent-soft); }
details.more > summary small { margin-left: auto; font-weight: 500; font-size: 12.5px; color: var(--ink-3); }
details.more > .more-body { padding: 4px 0 20px 32px; }
.panel { border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); padding: clamp(22px, 2.6vw, 34px); min-width: 0; }
.panel > h2 { font-family: var(--font-display); font-stretch: 106%; font-weight: 740; font-size: clamp(1.45rem, 1.15rem + 0.8vw, 1.85rem); line-height: 1.05; letter-spacing: -0.012em; }
.panel > .sub { margin-top: 6px; color: var(--ink-3); font-size: 14px; }
.prose { font-size: 17px; line-height: 1.68; max-width: 68ch; }
.prose p { margin: 0 0 1em; text-wrap: pretty; hanging-punctuation: first; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 650; }
.prose a { font-weight: 500; }
.lead-prose { font-size: 18.5px; line-height: 1.62; }
.dropcap > p:first-of-type::first-letter { float: left; font-family: var(--font-display); font-stretch: 108%; font-weight: 800; font-size: 4.1em; line-height: 0.8; margin: 0.08em 0.1em 0 -0.02em; color: var(--accent-fill); }
.prose h3.cross { font-family: var(--font-display); font-stretch: 106%; font-weight: 720; font-size: 1.4rem; line-height: 1.1; letter-spacing: -0.01em; margin: 2em 0 0.7em; }
.prose > h3.cross:first-child { margin-top: 0; }
blockquote.pull { margin: 1.6em 0; padding: 0 0 0 22px; border-left: 3px solid var(--accent-fill); font-family: var(--font-display); font-stretch: 104%; font-weight: 680; font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem); line-height: 1.2; letter-spacing: -0.01em; max-width: 30ch; text-wrap: balance; }
.facts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15.5px; line-height: 1.6; max-width: 70ch; }
.facts li { position: relative; padding-left: 20px; text-wrap: pretty; }
.facts li::before { content: ""; position: absolute; left: 2px; top: 0.66em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent-fill); }
.facts li.sub { padding-left: 0; font-weight: 700; margin-top: 8px; }
.facts li.sub::before { display: none; }
.facts.small { font-size: 14.5px; gap: 8px; }
.prose .facts { margin: 0.4em 0 1.2em; }
.sec { display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 88px; }
.sec > h2 { font-family: var(--font-display); font-stretch: 106%; font-weight: 740; font-size: clamp(1.55rem, 1.2rem + 1vw, 2.15rem); line-height: 1.04; letter-spacing: -0.014em; padding-top: 18px; border-top: 1px solid var(--line-2); }
.sec-intro { font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 66ch; }
.panel-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.panel-head h2, .panel-head h3 { font-family: var(--font-display); font-stretch: 106%; font-weight: 730; font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem); line-height: 1.1; letter-spacing: -0.01em; }
.panel-head p { font-size: 13.5px; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.q { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.q::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: currentColor; }
.q.ok { background: var(--up-soft); color: var(--up); }
.q.warn { background: var(--warn-soft); color: var(--warn); }
.q.bad { background: var(--down-soft); color: var(--down); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 12.5px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: currentColor; }
.legend .ok { color: var(--up); } .legend .warn { color: var(--warn); } .legend .bad { color: var(--down); }
.legend .ok + *, .legend span { color: var(--ink-3); }
.legend span i.ok { background: var(--up); } .legend span i.warn { background: var(--warn); } .legend span i.bad { background: var(--down); }
.board-note { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); line-height: 1.6; text-wrap: pretty; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px 20px 20px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); min-width: 0; overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--tc, var(--line-2)); }
.card.ok { --tc: var(--up); } .card.warn { --tc: var(--warn); } .card.bad { --tc: var(--down); } .card.accent { --tc: var(--accent-fill); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.card-head strong { font-size: 16px; font-weight: 700; margin-right: auto; }
.card-val { font-family: var(--font-display); font-stretch: 104%; font-weight: 680; font-size: 1.15rem; line-height: 1.2; letter-spacing: -0.005em; }
.card p { font-size: 14.5px; line-height: 1.58; color: var(--ink-2); text-wrap: pretty; }
.legend.cards-legend { margin-top: 0; }
.correction { display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 2.6vw, 32px); border-radius: var(--r-panel); background: color-mix(in srgb, var(--warn) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 22%, transparent); scroll-margin-top: 88px; }
.correction .c-lbl { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--warn); }
.correction .c-lbl .ico { width: 18px; height: 18px; }
.correction h2 { font-family: var(--font-display); font-stretch: 106%; font-weight: 730; font-size: clamp(1.35rem, 1.1rem + 0.7vw, 1.7rem); line-height: 1.08; letter-spacing: -0.01em; }
.correction p { font-size: 16px; line-height: 1.62; max-width: 66ch; }
.correction .facts li::before { background: var(--warn); }
.note-inline { padding: 14px 16px; border-radius: 14px; background: var(--warn-soft); font-size: 14.5px; line-height: 1.55; }
.note-inline .lbl { display: block; font-size: 12px; font-weight: 700; color: var(--warn); margin-bottom: 2px; }
details.sources { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
details.sources > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 16px 20px; font-weight: 600; font-size: 14.5px; }
details.sources > summary::-webkit-details-marker { display: none; }
details.sources > summary .ico { width: 18px; height: 18px; color: var(--ink-3); }
details.sources > summary small { margin-left: auto; font-weight: 500; color: var(--ink-3); font-size: 12.5px; }
details.sources[open] > summary { border-bottom: 1px solid var(--line); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding: 18px 20px 20px; }
figure.shot { margin: 0; display: flex; flex-direction: column; gap: 8px; }
figure.shot button { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; cursor: zoom-in; }
figure.shot img { display: block; width: 100%; height: auto; transition: transform 0.6s var(--ease); }
figure.shot button:hover img { transform: scale(1.02); }
figure.shot button .zoom { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(28, 27, 26, 0.72); color: #fff; opacity: 0; transition: opacity 0.2s var(--ease); }
figure.shot button .zoom .ico { width: 17px; height: 17px; }
figure.shot button:hover .zoom, figure.shot button:focus-visible .zoom { opacity: 1; }
figcaption.shot-note { font-size: 12.5px; color: var(--ink-3); }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pager a { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; transition: border-color 0.25s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.pager a:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.pager a .knob { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); flex: none; transition: background-color 0.25s var(--ease), color 0.25s var(--ease); }
.pager a:hover .knob { background: var(--ink); color: var(--paper); }
.pager a .knob .ico { width: 18px; height: 18px; }
.pager a .t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pager a .t small { font-size: 12.5px; color: var(--ink-3); }
.pager a .t strong { font-family: var(--font-display); font-stretch: 106%; font-weight: 720; font-size: 1.35rem; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager a.next { grid-column: 2; justify-content: flex-end; text-align: right; }
/* ───────── ricerca (palette) e lightbox ───────── */
.scrim { position: fixed; inset: 0; z-index: var(--z-scrim); background: color-mix(in srgb, var(--paper) 40%, rgba(10, 10, 10, 0.45)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade 0.25s var(--ease); }
.side-scrim { z-index: calc(var(--z-side) - 1); }
@keyframes fade { from { opacity: 0; } }
.palette {
  position: fixed; z-index: var(--z-dialog); left: 50%; top: max(8vh, 24px);
  width: min(680px, calc(100vw - 24px)); max-height: min(78vh, 720px);
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-2), 0 40px 80px -30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: pop 0.35s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(0.985); } }
.palette .search-row { display: flex; align-items: center; gap: 12px; padding: 0 12px 0 20px; border-bottom: 1px solid var(--line); transition: box-shadow 0.2s var(--ease); }
.palette .search-row:focus-within { box-shadow: inset 0 -2px 0 var(--accent-fill); }
.palette .search-row .ico { width: 20px; height: 20px; color: var(--ink-3); }
.palette input { flex: 1; min-width: 0; height: 62px; border: 0; background: transparent; font-size: 18px; outline: none; }
.palette input::placeholder { color: var(--ink-3); }
.palette .esc { font-family: var(--font-mono); font-size: 11.5px; padding: 4px 8px; border-radius: 7px; background: var(--surface-2); color: var(--ink-3); border: 0; cursor: pointer; }
.results { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain; }
.result { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 12px; text-align: left; border: 0; background: transparent; border-radius: 14px; padding: 10px 12px; cursor: pointer; transition: background-color 0.15s var(--ease); }
.result:hover, .result:focus-visible, .result.active { background: var(--surface-2); outline: none; }
.result .ri { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--paper); color: var(--ink-2); }
.result .ri .ico { width: 17px; height: 17px; }
.result .where { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.result .snip { font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.search-hint { padding: 14px 14px 16px; color: var(--ink-3); font-size: 14px; }
mark { background: color-mix(in srgb, var(--accent-fill) 26%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; }

.lightbox { position: fixed; inset: 0; z-index: var(--z-dialog); display: grid; place-items: center; padding: 24px; background: rgba(12, 12, 11, 0.9); cursor: zoom-out; animation: fade 0.25s var(--ease); }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 14px; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.lightbox .icon-btn { position: fixed; top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; background: rgba(255, 255, 255, 0.12); color: #fff; }

/* stati */
.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 14px 18px; border-radius: 16px; background: var(--down-soft); color: var(--down); font-size: 14.5px; font-weight: 500; }
.banner .btn { margin-left: auto; }
.skeleton { border-radius: var(--r-panel); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.skel-line { height: 14px; border-radius: 7px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { padding: 48px 24px; text-align: center; color: var(--ink-3); }

/* ───────── responsive (finestra) ───────── */
@media (max-width: 960px) {
  .app, .app.side-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: min(320px, 88vw);
    box-shadow: var(--shadow-2);
    transform: translateX(-100%); visibility: hidden;
  }
  .app.side-open .sidebar { transform: none; visibility: visible; }
  .sidebar .side-close { display: inline-grid; }
  .top-mark { display: block; }
  .crumbs .sep, .crumbs a.home { display: none; }
}
@media (max-width: 600px) {
  .search-trigger { width: 38px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .search-trigger .lbl, .search-trigger kbd { display: none; }
  .crumbs .ed-badge { display: none; }
  .topbar { min-height: 58px; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .scrim { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media print {
  .sidebar, .topbar, .pager, .art-rail, .site-foot nav, body::after { display: none !important; }
  .app { display: block; }
  .rv { opacity: 1 !important; transform: none !important; }
  .bar i, .div-bar i, .bucket-bar i { transform: none !important; }
}
