@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/site/fonts/space-grotesk-600.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/site/fonts/space-grotesk-700.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/site/fonts/dm-sans-400.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/site/fonts/dm-sans-500.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/site/fonts/dm-sans-600.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/site/fonts/dm-sans-700.woff2) format("woff2"); }

:root {
  --bg: #f7f7f4; --surface: #ffffff; --band: #ecece7; --border: #deded8; --hair: #e8e8e3; --sel: #e4e4de;
  --text: #141416; --secondary: #3a3a40; --quote: #55555c; --muted: #66666d;
  --link: #4a5c00; --logo: #141416; --logo-bg: #cfff04;
  --v-vero: #2bc46e; --v-parziale: #f2b200; --v-fuorviante: #f27b2a; --v-falso: #f04a68;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a0a0f; --surface: #111117; --band: #16161d; --border: #26262b; --hair: #1c1c1e; --sel: #26262b;
  --text: #f5f5f7; --secondary: #c7c7cc; --quote: #a1a1a8; --muted: #8e8e93;
  --link: #cfff04; --logo: #cfff04; --logo-bg: transparent;
  --v-vero: #00ff88; --v-parziale: #ffb800; --v-fuorviante: #ff8c2b; --v-falso: #ff3366;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0a0a0f; --surface: #111117; --band: #16161d; --border: #26262b; --hair: #1c1c1e; --sel: #26262b;
    --text: #f5f5f7; --secondary: #c7c7cc; --quote: #a1a1a8; --muted: #8e8e93;
    --link: #cfff04; --logo: #cfff04; --logo-bg: transparent;
    --v-vero: #00ff88; --v-parziale: #ffb800; --v-fuorviante: #ff8c2b; --v-falso: #ff3366;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.site-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 16px; padding-bottom: 16px; }

.site-logo {
  display: flex; align-items: center; gap: 0.3em;
  font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.5px;
  text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.site-logo .logo-hl { color: var(--logo); background: var(--logo-bg); padding: 0 2px; }
.site-logo .logo-rest { color: var(--muted); }

.site-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.site-nav a {
  padding: 8px 12px; border-radius: 8px; color: var(--secondary);
  font-size: 15px; font-weight: 600; text-decoration: none;
}
.site-nav a:hover { background: var(--sel); color: var(--text); }
.site-nav a[aria-current="page"] { background: var(--sel); color: var(--text); }

.theme-toggle {
  margin-left: auto; height: 40px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.header-account { display: flex; align-items: center; gap: 12px; }
.header-account:not(:has(> :not([hidden]):not(:empty))) { display: none; }
.header-btn {
  height: 40px; padding: 0 16px; display: inline-flex; align-items: center;
  background: var(--text); color: var(--bg); border: 0; border-radius: 8px;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.header-btn[hidden] { display: none; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme]) .theme-toggle .icon-moon { display: inline; }
}

/* ---------- Page ---------- */

.site-main { flex: 1; padding-top: 48px; padding-bottom: 64px; }
.site-main h1 { font-family: var(--font-display); font-size: clamp(28px, 5vw, 44px); line-height: 1.1; letter-spacing: -0.5px; }
.lede { margin-top: 12px; max-width: 60ch; color: var(--secondary); font-size: 18px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  background: #cfff04; color: #0a0a0f; border: 1px solid #cfff04; border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }

/* ---------- Verdict pills: colour only for verdicts, icon + label always ---------- */

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  color: #0a0a0f; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.v-vero { background: var(--v-vero); }
.v-parziale { background: var(--v-parziale); }
.v-fuorviante { background: var(--v-fuorviante); }
.v-falso { background: var(--v-falso); }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--border); padding: 20px 0; color: var(--muted); font-size: 13px; }

@media (max-width: 600px) {
  .site-wrap { padding: 0 16px; }
  .site-logo { font-size: 18px; }
  .site-main { padding-top: 32px; }
}

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

/* ---------- News front page ---------- */

.muted { color: var(--muted); }
.small { font-size: 13px; }
.section-nav { display: flex; flex-wrap: wrap; gap: 2px; padding-top: 4px; padding-bottom: 0; }
.section-nav a { padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.section-nav a:hover { color: var(--text); }
.section-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 #cfff04; }

.news-layout { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 28px; }
.news-col { flex: 999 1 620px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.news-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.news-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.site-main .news-head h1 { font-size: 22px; letter-spacing: 0; }

.seg { display: flex; flex-wrap: wrap; gap: 2px; }
.seg a, .seg button {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.seg a[aria-current="true"], .seg button[aria-pressed="true"] { background: var(--sel); color: var(--text); }


.filters { display: flex; flex-direction: column; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-row > .muted { margin-right: 4px; }
.chip {
  min-height: 40px; padding: 0 14px 0 10px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
  border: 2px solid var(--border); background: transparent; color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none;
}
.chip[aria-current="true"] { background: var(--sel); border-color: var(--text); }
.chip-dot { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #0a0a0f; }
.chip-n { color: var(--muted); font-weight: 500; }

.empty { padding: 24px; text-align: center; color: var(--muted); }

/* Group heading: a coloured band (the topic's hue; neutral when grouped by person) that stays on top while scrolling. */
.group-head {
  --t: #64748b;
  position: sticky; top: 0; z-index: 1;
  margin-bottom: 4px; padding: 10px 14px; border-radius: 8px;
  border-left: 4px solid var(--t);
  background: color-mix(in srgb, var(--t) 14%, var(--bg));
}
.group-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: color-mix(in srgb, var(--t) 70%, var(--text)); }
:root[data-theme="dark"] .group-title { color: color-mix(in srgb, var(--t) 45%, #fff); }
.group-sub { text-transform: none; letter-spacing: 0; }
.group-title a { color: var(--text); text-decoration: none; }
.group-title a:hover { text-decoration: underline; }
.group-sub { font-family: var(--font-body); font-size: 13px; font-weight: 400; color: var(--muted); }
.claim-list { list-style: none; }
.claim-row { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-top: 1px solid var(--hair); min-width: 0; }
.claim-line1 { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.claim-line1 > * { flex: none; }
.claim-line1 .pill { font-size: 12px; padding: 2px 9px; }
.claim-person-name { font-size: 15px; font-weight: 700; color: var(--text); text-decoration: none; }
.claim-person-name:hover { text-decoration: underline; }
.claim-person-role { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; color: var(--muted); }
.claim-date { margin-left: auto; font-size: 13px; color: var(--muted); }
/* Topic tags: one hue per topic, kept away from the four verdict colours (green, amber, orange, red). */
.tag {
  --t: #64748b;
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--t) 45%, transparent);
  background: color-mix(in srgb, var(--t) 14%, transparent);
  color: color-mix(in srgb, var(--t) 85%, var(--text));
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--t); }
:root[data-theme="dark"] .tag { color: color-mix(in srgb, var(--t) 55%, #fff); }
.topic-economia { --t: #2563eb; }
.topic-politica { --t: #7c3aed; }
.topic-esteri { --t: #0d9488; }
.topic-giustizia { --t: #475569; }
.topic-salute { --t: #0891b2; }
.topic-lavoro { --t: #4f46e5; }
.topic-immigrazione { --t: #a21caf; }
.topic-scuola_universita { --t: #0369a1; }
.topic-altro { --t: #78716c; }
.search { display: flex; gap: 8px; }
.search input[type="search"] { flex: 1; min-width: 0; padding: 10px 14px; border: 2px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; }
.search-note { font-size: 14px; color: var(--secondary); overflow-wrap: anywhere; }
.search-note a { font-weight: 600; }
.claim-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.claim-title, .claim-quote { overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.claim-title { -webkit-line-clamp: 2; line-clamp: 2; font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--text); }
.claim-quote { -webkit-line-clamp: 1; line-clamp: 1; font-size: 14px; font-style: italic; color: var(--quote); }
.nv-row .claim-title, .nv-row .claim-quote { display: block; }
.claim-meta { font-size: 13px; color: var(--muted); }
.claim-meta a { color: var(--secondary); font-weight: 600; }
.more { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.list-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pager { display: flex; align-items: center; gap: 4px; }
.pager-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 18px; line-height: 1; text-decoration: none; }
a.pager-btn:hover { border-color: var(--text); }
span.pager-btn { opacity: 0.35; }
.pager-n { padding: 0 4px; color: var(--muted); font-size: 13px; white-space: nowrap; }

.box { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.box-title { margin-bottom: 12px; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.rank-tabs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.rank-tabs[hidden], .rank-list[hidden], .rank-heading[hidden] { display: none; }
.rank-heading { margin: 12px 0 4px; font-size: 14px; font-weight: 700; }
.rank-ol { list-style: none; }
.rank-ol li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.rank-n { width: 16px; color: var(--muted); }
.rank-name { flex: 1; min-width: 0; }
.rank-name a { color: var(--text); text-decoration: none; }
.rank-pct { font-weight: 700; }
.rank-foot { margin-top: 10px; }
.rank-foot a { color: var(--secondary); }

@media (max-width: 600px) {
  .claim-line1 { flex-wrap: wrap; white-space: normal; row-gap: 2px; }
  .claim-person-role { flex-basis: 100%; order: 5; white-space: nowrap; }
  .claim-date { order: 4; }
  .news-layout { gap: 24px; }
}

/* ---------- Claim page ---------- */

.pill.v-neutral { background: var(--band); color: var(--text); border: 1px solid var(--border); }
.claim-page .back-link { margin-bottom: 16px; }
.claim-page h1 { margin: 12px 0; overflow-wrap: anywhere; }
.claim-kicker { margin-top: 20px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.claim-kicker + h1 { margin-top: 4px; }
.claim-kicker + .pill { margin-top: 8px; }
.claim-main, .claim-side { min-width: 0; }
.claim-side h2 { font-size: 18px; margin-bottom: 8px; }
/* Desktop: claim on the left, quote and sources on the right, so the page fits one screen. */
@media (min-width: 960px) {
  .claim-page { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 32px; padding-bottom: 32px; }
  .claim-page h1 { font-size: clamp(28px, 2.6vw, 36px); }
  .claim-page .lede { font-size: 17px; }
  .claim-page .cta-row { margin-top: 20px; }
  .claim-side .claim-blockquote { margin-top: 0; }
  .claim-side .claim-blockquote p { font-size: 16px; }
}
.claim-blockquote { margin: 20px 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--border); color: var(--quote); overflow-wrap: anywhere; }
.claim-blockquote p { margin: 0 0 8px; font-size: 18px; }
.claim-blockquote footer { font-size: 14px; color: var(--muted); }
.source-list { padding-left: 20px; overflow-wrap: anywhere; }
.score strong { font-family: var(--font-display); font-size: 40px; font-weight: 700; }
.count-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.count-list li { display: flex; align-items: center; gap: 8px; }
.count-list li .chip-n { margin-left: auto; }
.nv-row { grid-template-columns: minmax(0, 1fr); }

/* ---------- Home on desktop: the page stays still, only the fact-check list scrolls ---------- */

@media (min-width: 960px) {
  /* Scoped to the home: other .news-layout pages (person) scroll normally, so the footer stays after the content. */
  body:has(.news-home) { height: 100dvh; overflow: hidden; }
  .news-home { flex: 1 1 0; min-height: 0; flex-wrap: nowrap; padding-bottom: 0; }
  .news-home .news-col { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
  .news-home .news-scroll { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 8px; padding-bottom: 24px; scrollbar-gutter: stable; }
}

/* ---------- Compact toolbar above the list: sections, period, search, grouping and verdicts in three short rows ---------- */

.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; }
.news-layout { padding-top: 12px; }
.news-col { gap: 12px; }
.toolbar { display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.toolbar .section-nav { padding: 0; }
.toolbar .section-nav a { padding: 6px 10px; }
.toolbar .search { flex: 1 1 260px; max-width: 420px; }
.toolbar .search input[type="search"] { padding: 6px 12px; font-size: 14px; border-width: 1px; }
.toolbar .search .btn { min-height: 34px; padding: 0 14px; }
.toolbar .chip { padding-top: 3px; padding-bottom: 3px; font-size: 13px; }
.group-head { padding: 6px 12px; }
.group-title { font-size: 17px; }

/* ---------- Home: single centred column, one-row toolbar with a Filtri menu ---------- */

.news-home { justify-content: center; }
.news-home .news-col { flex: 0 1 760px; max-width: 760px; margin: 0 auto; }
.toolbar-tools { display: flex; align-items: center; gap: 8px; }
.toolbar .search { flex: 0 0 auto; max-width: none; }
.toolbar .search input[type="search"] { width: 200px; }
.filters-menu { position: relative; }
.filters-menu summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600;
}
.filters-menu summary::-webkit-details-marker { display: none; }
.filters-menu[open] summary { background: var(--sel); }
.filters-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 360px; max-width: calc(100vw - 32px);
  display: flex; flex-direction: column; gap: 12px; padding: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
}
.filters-group { display: flex; flex-direction: column; gap: 4px; }
.active-filters { margin: 0; }
@media (max-width: 600px) {
  .toolbar-tools { flex-wrap: wrap; width: 100%; }
  .toolbar .search { flex: 1 1 auto; }
  .toolbar .search input[type="search"] { width: 100%; }
  .toolbar .search { flex: 1 1 160px; }
  .filters-menu { position: static; }
  .filters-menu summary { min-height: 34px; }
  .filters-panel { position: static; width: 100%; max-width: none; margin-top: 8px; box-shadow: none; }
  .toolbar-tools:has(.filters-menu[open]) .filters-menu { flex: 1 0 100%; }
}

/* ---------- Rankings page ---------- */

.rank-page { max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.rank-page h1 { font-size: clamp(26px, 4vw, 36px); }

/* ---------- Legal pages: plain scrolling prose ---------- */

.footer-line { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 0.4em; row-gap: 2px; text-align: center; }
.footer-links a { color: inherit; }

.legal { max-width: 72ch; margin: 0 auto; font-size: 16px; line-height: 1.65; color: var(--secondary); overflow-wrap: anywhere; }
.legal h1 { color: var(--text); margin-bottom: 20px; }
.legal h2 { margin: 36px 0 8px; font-family: var(--font-display); font-size: 22px; line-height: 1.25; color: var(--text); }
.legal h3 { margin: 24px 0 6px; font-size: 17px; color: var(--text); scroll-margin-top: 16px; }
.legal p, .legal ul { margin: 0 0 14px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal code { font-size: 0.9em; padding: 1px 5px; background: var(--band); border-radius: 4px; }
.legal-table-wrap { overflow-x: auto; margin: 0 0 14px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legal th, .legal td { padding: 10px 12px; text-align: left; vertical-align: top; border: 1px solid var(--border); }
.legal th { background: var(--band); color: var(--text); }
.legal-updated { margin-top: 40px; font-size: 14px; color: var(--muted); }

.report-line { margin: .75rem 0 0; font-size: .8125rem; }
.report-link { color: inherit; text-decoration: underline; }

/* ---------- Topic menu (one scrolling line) and the chosen topic's subtopics ---------- */

/* The topics take a full row under search and Filtri, so none is ever hidden behind them. */
.toolbar .topic-nav { order: 2; flex: 1 0 100%; min-width: 0; }
.toolbar .topic-nav a { white-space: nowrap; }
.toolbar .toolbar-tools { margin-left: auto; }
@media (max-width: 600px) {
  .toolbar .topic-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .toolbar .topic-nav::-webkit-scrollbar { display: none; }
  .toolbar .topic-nav a { flex: 0 0 auto; }
}
.subtopic-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.subtopic-nav::-webkit-scrollbar { display: none; }
.subtopic-nav .chip { flex: 0 0 auto; white-space: nowrap; min-height: 32px; padding: 0 12px; font-size: 13px; }
.subtopic-nav .chip[aria-current="true"] { border-color: var(--t, var(--text)); }
.chip-dot.v-neutral { background: var(--band); color: var(--text); border: 1px solid var(--border); }
