:root {
  color-scheme: light;
  --bg: #f5f1e9;
  --surface: #fffdf8;
  --surface-2: #f1eee6;
  --ink: #171716;
  --muted: #65625a;
  --line: #d8d0c2;
  --red: #bd3f36;
  --red-soft: #f4ddd9;
  --green: #26745a;
  --green-soft: #dce9dd;
  --blue: #276e90;
  --blue-soft: #dcebf0;
  --amber: #a76410;
  --amber-soft: #f1dfbc;
  --purple: #6f5a8f;
  --max: 1220px;
  --radius: 4px;
}

.return-top-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 24px 42px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.return-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 44px;
  min-height: 44px;
  color: var(--green);
  font-weight: 800;
}

.return-top.is-enhanced {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(var(--return-top-bottom, 16px) + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 50%;
  background: rgba(38,116,90,.96);
  box-shadow: 0 10px 26px rgba(23,23,22,.2);
  color: #fff;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease;
}

.return-top.is-enhanced .return-top-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.return-top.is-enhanced.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
.return-top:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
@media (hover:hover) and (pointer:fine) { .return-top.is-enhanced:hover { background: var(--red); } }
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } .return-top.is-enhanced { transition:none; } }
@media (forced-colors:active) { .return-top.is-enhanced { border:1px solid ButtonText; background:ButtonFace; color:ButtonText; forced-color-adjust:auto; } }
@media print { .return-top-footer, .return-top { display:none!important; } }

* {
  box-sizing: border-box;
}

.top-anchor { position:absolute; top:0; left:0; width:1px; height:1px; overflow:hidden; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(90deg, rgba(23, 23, 22, 0.03), transparent 26%, rgba(189, 63, 54, 0.035)),
    var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.app {
  min-height: 100svh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(252, 250, 244, 0.94);
  backdrop-filter: blur(18px);
}

.topbar-inner,
main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.topbar-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #111;
  border-radius: 3px;
  background: #fff;
  box-shadow: inset 0 -4px 0 rgba(189, 63, 54, 0.18);
}

.brand-mark::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 3px solid var(--ink);
  border-right-color: var(--red);
  border-radius: 50%;
  transform: rotate(-24deg);
}

.brand h1 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  border-radius: 3px;
  padding: 8px 9px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  background: var(--surface-2);
  outline: none;
}

main {
  padding: 0 0 54px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.7fr);
  gap: clamp(26px, 5vw, 58px);
  align-items: start;
  padding: clamp(34px, 6vw, 64px) 0 28px;
  border-bottom: 1px solid var(--line);
}

.headline {
  display: grid;
  gap: 18px;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 22px;
  padding: 0 16px 0 0;
  color: var(--muted);
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.headline h2 {
  margin: 0;
  max-width: 940px;
  font-size: clamp(2.35rem, 5.7vw, 4.9rem);
  line-height: 0.93;
  letter-spacing: 0;
}

.headline p {
  margin: 0;
  max-width: 720px;
  color: #393832;
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  line-height: 1.55;
}

.quick-verdict {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-self: stretch;
  border-top: 1px solid var(--line);
}

.verdict-tile {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.verdict-tile strong {
  font-size: 1rem;
  line-height: 1.15;
}

.verdict-tile span {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.4;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.stat-card {
  display: grid;
  align-content: space-between;
  min-height: 86px;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.58);
}

.stat-value {
  font-size: clamp(2.2rem, 4vw, 3.65rem);
  line-height: 0.9;
  font-weight: 850;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  max-width: 240px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.section {
  margin-top: clamp(34px, 5vw, 56px);
}

#grafic {
  margin-top: clamp(24px, 4vw, 42px);
}

.section-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-header h3 {
  margin: 0;
  font-size: clamp(1.65rem, 3.6vw, 3rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.section-header p {
  margin: 0;
  max-width: 600px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.45;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.chip,
.search,
.source-link {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--ink);
}

.chip {
  min-height: 34px;
  padding: 7px 10px;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.chip:hover,
.chip:focus-visible,
.source-link:hover,
.source-link:focus-visible {
  border-color: #928b7f;
  outline: none;
}

.chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.search {
  min-height: 38px;
  min-width: min(100%, 285px);
  padding: 8px 10px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.72fr);
  gap: 14px;
  align-items: stretch;
}

.panel,
.case-card,
.sources-card,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.88);
}

.panel {
  padding: 18px;
  overflow: hidden;
}

.detail {
  display: grid;
  gap: 14px;
  min-height: 0;
  border-left: 4px solid var(--ink);
}

.detail h4 {
  margin: 0;
  font-size: clamp(1.18rem, 2.4vw, 1.7rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chart-wrap {
  min-height: 330px;
  overflow-x: auto;
  padding-bottom: 4px;
}

svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.axis-text {
  fill: var(--muted);
  font-size: 12px;
}

.bar-label {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.bar-label.light {
  fill: #fff;
}

.chart-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--muted);
  font-size: 0.76rem;
}

.tag.red {
  border-color: #e8b4b0;
  background: #fff6f5;
  color: #8b1c18;
}

.tag.green {
  border-color: #badfca;
  background: #f4fbf7;
  color: #0f5e43;
}

.tag.blue {
  border-color: #c2dde8;
  background: #f3fbff;
  color: #19546f;
}

.tag.amber {
  border-color: #e7c88f;
  background: #fff8ea;
  color: #754500;
}

.mini-bars {
  display: grid;
  gap: 10px;
}

.mini-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.8fr) minmax(130px, 1.8fr) 66px;
  gap: 10px;
  align-items: center;
  min-height: 34px;
}

.mini-row b {
  font-size: 0.9rem;
  line-height: 1.15;
}

.bar-track {
  position: relative;
  height: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.bar-track span {
  position: absolute;
  top: 0;
  bottom: 0;
}

.poll-bar {
  left: 0;
}

.result-bar {
  left: 0;
  height: 48%;
  transform: translateY(52%);
  background: #111;
}

.mini-error {
  text-align: right;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.mini-error.pos {
  color: #8b1c18;
}

.mini-error.neg {
  color: #19546f;
}

.claim-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.claim-card {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.58);
}

.claim-card strong {
  font-size: 1rem;
  line-height: 1.18;
}

.claim-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.42;
}

.verdict-badge {
  width: max-content;
  max-width: 100%;
  border-radius: 3px;
  padding: 5px 7px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.verdict-badge.fact {
  background: var(--green-soft);
  color: #0f5e43;
}

.verdict-badge.mixed {
  background: var(--amber-soft);
  color: #754500;
}

.verdict-badge.false {
  background: var(--red-soft);
  color: #8b1c18;
}

.verdict-badge.open {
  background: var(--blue-soft);
  color: #19546f;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.case-card {
  display: grid;
  gap: 10px;
  min-height: 144px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.case-card:hover,
.case-card:focus-visible {
  border-color: #978e80;
  box-shadow: 0 10px 22px rgba(31, 28, 22, 0.09);
  outline: none;
  transform: translateY(-1px);
}

.case-card.active {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.case-title {
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.18;
}

.case-summary {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.38;
}

.case-foot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.83rem;
}

.error-number {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 850;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  max-height: 500px;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
  line-height: 1.35;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eee9df;
  color: #403f3a;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr:last-child td {
  border-bottom: 0;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sources-card {
  display: grid;
  gap: 10px;
  min-height: 148px;
  padding: 14px;
}

.sources-card h4 {
  margin: 0;
  line-height: 1.18;
}

.source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  text-decoration: none;
}

.footnote {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.62);
  color: var(--muted);
}

@media (max-width: 1040px) {
  .intro,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .claim-grid,
  .sources-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar-inner,
  main {
    width: min(100% - 20px, var(--max));
  }

  .topbar-inner {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    justify-content: center;
    padding: 9px 0 8px;
    gap: 8px;
  }

  .brand h1 {
    font-size: 0.95rem;
  }

  .nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 2px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav a {
    flex: 0 0 auto;
    padding: 8px;
  }

  .intro {
    padding: 20px 0 14px;
    gap: 14px;
  }

  .headline {
    gap: 12px;
  }

  .headline h2 {
    font-size: clamp(2.05rem, 9.4vw, 3rem);
    line-height: 0.98;
  }

  .headline p {
    font-size: 0.96rem;
    line-height: 1.42;
  }

  .eyebrow {
    display: grid;
    gap: 4px;
    font-size: 0.8rem;
  }

  .pill {
    padding-right: 0;
  }

  .quick-verdict {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border-top: 0;
  }

  .verdict-tile {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 253, 248, 0.58);
  }

  .verdict-tile strong {
    font-size: 0.92rem;
  }

  .verdict-tile span {
    font-size: 0.8rem;
    line-height: 1.32;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stat-card {
    min-height: 92px;
    padding: 10px;
  }

  .stat-value {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.78rem;
    line-height: 1.28;
  }

  .section-header {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    border-top: 0;
    padding-bottom: 4px;
  }

  .chip {
    flex: 0 0 auto;
  }

  .search {
    min-width: 100%;
  }

  .panel {
    padding: 12px;
  }

  .chart-wrap {
    min-height: 286px;
  }

  .mini-row {
    grid-template-columns: minmax(76px, 0.7fr) minmax(118px, 1fr) 56px;
    gap: 8px;
  }

  .mini-row b {
    font-size: 0.82rem;
  }

  .claim-grid,
  .case-grid,
  .sources-grid {
    grid-template-columns: 1fr;
  }

  .case-card {
    min-height: 126px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .return-top.is-enhanced { transition: none; }
}
