:root {
  color-scheme: light;
  --page-fg: #1b1c1f;
  --page-bg: #f5f7fb;
  --surface-fg: #1b1c1f;
  --surface-bg: #ffffff;
  --muted-fg: #4a4f58;
  --muted-bg: #ffffff;
  --link-fg: #0b57d0;
  --link-bg: #ffffff;
  --primary-fg: #ffffff;
  --primary-bg: #0b57d0;
  --secondary-fg: #0842a0;
  --secondary-bg: #e2eafc;
  --confirmed-fg: #126b2c;
  --confirmed-bg: #e2f3e6;
  --false-fg: #b3261e;
  --false-bg: #fde7e5;
  --misleading-fg: #8a4600;
  --misleading-bg: #fff0d9;
  --insufficient-fg: #43474e;
  --insufficient-bg: #eaedf2;
  --not-verifiable-fg: #6136a6;
  --not-verifiable-bg: #f0e8fb;
  --official-fg: #0842a0;
  --official-bg: #d8e4fc;
  --checker-fg: #00616a;
  --checker-bg: #d2f0f1;
  --other-fg: #43474e;
  --other-bg: #e4e7ec;
  --mismatch-fg: #8c1d18;
  --mismatch-bg: #ffdad6;
  --notice-fg: #594100;
  --notice-bg: #fff2cc;
  --error-fg: #8c1d18;
  --error-bg: #fde7e5;
  --border: #737781;
  --outline: #c3c7cf;
  --divider: #e1e4ea;
  --focus: #0b57d0;
  --shadow-1: 0 1px 2px rgba(23, 32, 51, 0.06), 0 1px 4px rgba(23, 32, 51, 0.08);
  --shadow-2: 0 2px 6px rgba(23, 32, 51, 0.08), 0 10px 28px rgba(23, 32, 51, 0.1);
  --radius: 16px;
  --radius-s: 10px;
  --gutter: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page-fg: #e3e5ea;
    --page-bg: #111318;
    --surface-fg: #e3e5ea;
    --surface-bg: #1b1e25;
    --muted-fg: #b6bbc5;
    --muted-bg: #1b1e25;
    --link-fg: #a8c7fa;
    --link-bg: #1b1e25;
    --primary-fg: #062e6f;
    --primary-bg: #a8c7fa;
    --secondary-fg: #d3e3fd;
    --secondary-bg: #243251;
    --confirmed-fg: #8bd69c;
    --confirmed-bg: #12301b;
    --false-fg: #ffb4ab;
    --false-bg: #3e1613;
    --misleading-fg: #ffc47d;
    --misleading-bg: #37260c;
    --insufficient-fg: #c8ccd4;
    --insufficient-bg: #2a2e36;
    --not-verifiable-fg: #d3bdff;
    --not-verifiable-bg: #2e2443;
    --official-fg: #d3e3fd;
    --official-bg: #243251;
    --checker-fg: #a0e6e7;
    --checker-bg: #0f3538;
    --other-fg: #c8ccd4;
    --other-bg: #2a2e36;
    --mismatch-fg: #ffdad6;
    --mismatch-bg: #74211b;
    --notice-fg: #ffdf91;
    --notice-bg: #33290b;
    --error-fg: #ffb4ab;
    --error-bg: #3e1613;
    --border: #8d929c;
    --outline: #4a4f59;
    --divider: #2e323b;
    --focus: #a8c7fa;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.45);
  }
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--page-fg);
  background: var(--page-bg);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { line-height: 1.3; letter-spacing: -0.005em; }
h2 { font-size: 1.25rem; margin: 0 0 12px; }
h3 { font-size: 1.0625rem; margin: 20px 0 8px; }
h4 { font-size: 1rem; margin: 16px 0 6px; }
h5 { font-size: 0.875rem; margin: 8px 0 4px; }
p { margin: 0 0 8px; }

a { color: var(--link-fg); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[id] { scroll-margin-top: 88px; }

.sr-only {
  position: absolute !important;
  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: -999px; top: 8px; z-index: 50; padding: 10px 16px; border-radius: 999px; background: var(--primary-bg); color: var(--primary-fg); font-weight: 600; }
.skip-link:focus { left: 8px; }

.overline {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-fg);
}

.hint { margin: 0; color: var(--muted-fg); font-size: 0.875rem; }
.meta { margin: 4px 0; color: var(--muted-fg); font-size: 0.8125rem; }
.fine-print { margin: 16px 0 0; color: var(--muted-fg); font-size: 0.75rem; }
.loading { color: var(--muted-fg); }

/* ---------- header and footer ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface-bg);
  border-bottom: 1px solid var(--divider);
}

.header-inner, main, .footer-inner { max-width: 60rem; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--page-fg); text-decoration: none; border-radius: var(--radius-s); }
.brand-mark { width: 28px; height: 28px; flex: none; color: var(--primary-bg); }
.brand h1 { margin: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }

nav { display: flex; gap: 4px; }
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted-fg);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}
nav a[aria-current="page"] { color: var(--secondary-fg); background: var(--secondary-bg); }

.site-footer { margin-top: 56px; background: var(--surface-bg); border-top: 1px solid var(--divider); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 4px 16px; padding-top: 16px; padding-bottom: 28px; }

main { padding-bottom: 24px; }
main:focus { outline: none; }

/* ---------- buttons, chips, form ---------- */

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
button.primary { min-height: 48px; padding: 0 28px; color: var(--primary-fg); background: var(--primary-bg); box-shadow: var(--shadow-1); }
button.secondary { color: var(--secondary-fg); background: var(--secondary-bg); }
.text-button { padding: 0 12px; color: var(--link-fg); background: transparent; }
button:disabled { cursor: wait; opacity: 0.85; }
button.primary:disabled::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.chip {
  min-height: 44px;
  padding: 0 16px;
  color: var(--page-fg);
  background: var(--surface-bg);
  border: 1px solid var(--outline);
  border-radius: var(--radius-s);
  font-weight: 500;
}

@media (hover: hover) {
  nav a:hover { color: var(--secondary-fg); background: var(--secondary-bg); }
  button.primary:hover { box-shadow: var(--shadow-2); }
  button.secondary:hover, .text-button:hover, .chip:hover { color: var(--secondary-fg); background: var(--secondary-bg); border-color: transparent; }
  .open-link:hover { background: var(--secondary-bg); border-color: transparent; }
}

.card {
  padding: 24px;
  color: var(--surface-fg);
  background: var(--surface-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.hero { margin: 40px 0 20px; }
.hero-title { margin: 0 0 8px; font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.375rem); font-weight: 700; line-height: 1.18; letter-spacing: -0.02em; }
.hero-text { max-width: 42rem; margin: 0 0 8px; color: var(--muted-fg); font-size: 1.0625rem; }

.input-card { box-shadow: var(--shadow-2); }

.mode-toggle { display: inline-flex; margin: 0 0 16px; padding: 0; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.mode-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mode-toggle label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 20px;
  color: var(--muted-fg);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}
.mode-toggle label + input + label { border-left: 1px solid var(--border); }
.mode-toggle input:checked + label { color: var(--secondary-fg); background: var(--secondary-bg); }
.mode-toggle input:checked + label::before { content: "✓"; }
.mode-toggle input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: -3px; }

.field-label { display: block; margin: 0 0 8px; font-weight: 600; }
textarea {
  display: block;
  width: 100%;
  min-height: 3.5rem;
  padding: 14px 16px;
  font: inherit;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--page-fg);
  background: var(--surface-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  resize: vertical;
}
textarea::placeholder { color: var(--muted-fg); opacity: 1; }
textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }

.field-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 8px; }
.counter { flex: none; margin: 0; color: var(--muted-fg); font-size: 0.8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.counter.over { color: var(--error-fg); font-weight: 700; }
.form-error { margin: 8px 0 0; color: var(--error-fg); font-weight: 600; }
.form-error:empty { margin: 0; }

.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.examples-panel { margin: 20px 0 0; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- live progress ---------- */

.progress-card { position: relative; margin-top: 24px; overflow: hidden; }
.progress-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 35%;
  height: 3px;
  background: var(--primary-bg);
  animation: sweep 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.progress-head { display: flex; align-items: center; gap: 14px; }
.pulse { flex: none; width: 40px; height: 40px; border: 3px solid var(--secondary-bg); border-top-color: var(--primary-bg); border-radius: 50%; animation: spin 0.9s linear infinite; }
.progress-titles { flex: 1; min-width: 0; }
.progress-titles .overline { margin: 0; }
.phase { margin: 2px 0 0; font-size: 1.125rem; font-weight: 600; }
.retrying .phase { color: var(--notice-fg); }
.elapsed { flex: none; margin: 0; padding: 4px 12px; color: var(--secondary-fg); background: var(--secondary-bg); border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; }
.elapsed:empty { display: none; }

.stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 20px 0 20px; padding: 0; list-style: none; }
.step { color: var(--muted-fg); font-size: 0.75rem; line-height: 1.3; }
.step::before { content: ""; display: block; height: 6px; margin-bottom: 8px; background: var(--divider); border-radius: 999px; transition: background-color 0.3s ease; }
.step-running { color: var(--page-fg); font-weight: 700; }
.step-running::before { background: var(--primary-bg); animation: breathe 1.2s ease-in-out infinite; }
.step-done { color: var(--page-fg); }
.step-done::before { background: var(--primary-bg); }

.branches { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.branch {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  min-height: 56px;
  padding: 8px 14px;
  background: var(--page-bg);
  border: 1px solid var(--divider);
  border-radius: 12px;
  animation: rise 0.3s cubic-bezier(0.2, 0, 0, 1) both;
}
.branch > .spin, .branch > .mark { grid-row: 1 / span 2; }
.branch-label { font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.branch-status { color: var(--muted-fg); font-size: 0.8125rem; line-height: 1.3; }
.branch .spin { width: 20px; height: 20px; justify-self: center; border: 2.5px solid var(--outline); border-top-color: var(--primary-bg); border-radius: 50%; animation: spin 0.8s linear infinite; }
.branch .mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 0.8125rem; font-weight: 800; line-height: 1; }
.branch-ok .mark { color: var(--confirmed-bg); background: var(--confirmed-fg); }
.branch-empty .mark, .branch-skipped .mark { color: var(--insufficient-bg); background: var(--insufficient-fg); }
.branch-error .mark { color: var(--misleading-bg); background: var(--misleading-fg); }
.branch-ok .branch-status { color: var(--confirmed-fg); font-weight: 600; }

.live-claims { display: grid; gap: 10px; margin-top: 20px; }
.live-claims:empty { display: none; }
.live-claims .overline { margin: 0; }
.live-claim {
  padding: 14px 16px;
  background: var(--surface-bg);
  border: 1px solid var(--divider);
  border-left-width: 4px;
  border-radius: 12px;
  animation: rise 0.4s cubic-bezier(0.2, 0, 0, 1) both;
}
.live-claim-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.live-claim .claim-text { margin: 8px 0 4px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
@keyframes breathe { 50% { opacity: 0.45; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- verdicts ---------- */

.v-confirmed { --v-fg: var(--confirmed-fg); --v-bg: var(--confirmed-bg); }
.v-false { --v-fg: var(--false-fg); --v-bg: var(--false-bg); }
.v-misleading { --v-fg: var(--misleading-fg); --v-bg: var(--misleading-bg); }
.v-insufficient_evidence { --v-fg: var(--insufficient-fg); --v-bg: var(--insufficient-bg); }
.v-not_verifiable { --v-fg: var(--not-verifiable-fg); --v-bg: var(--not-verifiable-bg); }
.v-confirmed, .v-false, .v-misleading, .v-insufficient_evidence, .v-not_verifiable { color: var(--v-fg); background: var(--v-bg); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 12px 3px 5px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: normal;
}
.badge-icon { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; color: var(--v-bg); background: var(--v-fg); border-radius: 50%; font-size: 0.6875rem; }

.v-confirmed-card { border-left-color: var(--confirmed-fg); }
.v-false-card { border-left-color: var(--false-fg); }
.v-misleading-card { border-left-color: var(--misleading-fg); }
.v-insufficient_evidence-card { border-left-color: var(--insufficient-fg); }
.v-not_verifiable-card { border-left-color: var(--not-verifiable-fg); }

/* the underline style differs per verdict, so the mark never depends on colour alone */
a.mark { color: inherit; text-decoration-line: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; border-radius: 4px; }
.v-confirmed-mark { text-decoration-style: solid; text-decoration-color: var(--confirmed-fg); }
.v-false-mark { text-decoration-style: wavy; text-decoration-color: var(--false-fg); }
.v-misleading-mark { text-decoration-style: double; text-decoration-color: var(--misleading-fg); }
.v-insufficient_evidence-mark { text-decoration-style: dashed; text-decoration-color: var(--insufficient-fg); }
.v-not_verifiable-mark { text-decoration-style: dotted; text-decoration-color: var(--not-verifiable-fg); }
.mark-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.7;
  vertical-align: 1px;
}

/* ---------- result ---------- */

#result { display: block; margin-top: 24px; }
#result:focus { outline: none; }
.result { display: grid; gap: 16px; }
.result-section.plain h2 { margin: 8px 0 12px; }
.subhead { margin: 28px 0 12px; font-size: 1.0625rem; }

.summary-card h2 { margin: 0 0 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-fg); }
.summary { margin: 0 0 14px; font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.5rem); font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; }
.verdict-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

.submission { margin: 0; font-size: 1.0625rem; line-height: 2.1; }
.fragments { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; line-height: 1.9; }

.status-box, .notice, .case-note, .empty-note {
  position: relative;
  margin: 0;
  padding: 14px 16px 14px 50px;
  border-radius: 12px;
  line-height: 1.5;
}
.status-box::before, .notice::before, .case-note::before, .empty-note::before {
  position: absolute;
  left: 16px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1;
}
.status-box { color: var(--error-fg); background: var(--error-bg); }
.status-box::before { content: "!"; color: var(--error-bg); background: var(--error-fg); }
.notice { color: var(--notice-fg); background: var(--notice-bg); }
.notice::before { content: "i"; color: var(--notice-bg); background: var(--notice-fg); }
.case-note { color: var(--secondary-fg); background: var(--secondary-bg); }
.case-note::before { content: "i"; color: var(--secondary-bg); background: var(--secondary-fg); }
.empty-note { color: var(--insufficient-fg); background: var(--insufficient-bg); }
.empty-note::before { content: "?"; color: var(--insufficient-bg); background: var(--insufficient-fg); }

/* claims table */
.table-wrap { overflow-x: auto; background: var(--surface-bg); border: 1px solid var(--divider); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.table-wrap.card { padding: 0; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 12px 16px;
  text-align: left;
  color: var(--muted-fg);
  background: var(--page-bg);
  border-bottom: 1px solid var(--divider);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
td { padding: 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--divider); }
tbody tr:last-child td { border-bottom: 0; }
.claims-table td:nth-child(1) { width: 25%; }
.claims-table td:nth-child(2) { width: 19%; }
.claims-table td:nth-child(3) { width: 34%; }
.claim-link { color: var(--page-fg); font-weight: 600; text-decoration-color: var(--outline); text-decoration-thickness: 1px; }
.label { margin: 0 0 4px; font-weight: 600; }
.claims-table .label + .quote { margin-top: 6px; }
.source-ref { margin: 0 0 10px; }
.source-ref a { font-weight: 600; }
.source-ref .meta { display: block; margin: 2px 0 0; }
.attribution { margin: 6px 0 0; color: var(--muted-fg); font-size: 0.8125rem; font-weight: 600; }

/* quotes and compared elements */
.quote {
  margin: 8px 0;
  padding: 10px 14px;
  color: var(--page-fg);
  background: var(--page-bg);
  border-left: 3px solid var(--primary-bg);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.quote::before { content: "„"; }
.quote::after { content: "”"; }
mark.mismatch { padding: 0 3px; color: var(--mismatch-fg); background: var(--mismatch-bg); border-radius: 4px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; }
.mismatches { margin: 6px 0; padding: 0; list-style: none; font-size: 0.875rem; }
.mismatches li { margin: 4px 0; }
.mismatches .claimed { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.mismatches .claimed, .mismatches .found { white-space: nowrap; }
.mismatches .found { padding: 0 4px; color: var(--mismatch-fg); background: var(--mismatch-bg); border-radius: 4px; font-weight: 700; }

.role { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; line-height: 1.5; }
.role-supports { color: var(--confirmed-fg); background: var(--confirmed-bg); }
.role-refutes { color: var(--false-fg); background: var(--false-bg); }
.role-context, .role-none { color: var(--insufficient-fg); background: var(--insufficient-bg); }
.role-supports::before { content: "✓" / ""; }
.role-refutes::before { content: "✗" / ""; }

.checks { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; padding: 0; list-style: none; }
.check { display: inline-flex; gap: 4px; padding: 2px 8px; color: var(--muted-fg); background: var(--page-bg); border: 1px solid var(--divider); border-radius: 6px; font-size: 0.75rem; }
.check-ok > span:first-child { color: var(--confirmed-fg); font-weight: 800; }
.check-failed { color: var(--mismatch-fg); background: var(--mismatch-bg); border-color: transparent; font-weight: 700; }

/* claim cards */
.claim-card { margin-top: 12px; border-left-width: 4px; }
.claim-card h4 { margin: 20px 0 8px; color: var(--muted-fg); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.claim-card .claim-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--page-fg); font-size: 1.0625rem; letter-spacing: 0; text-transform: none; }
.claim-text { font-weight: 600; }
.interpretation { margin: 0 0 8px; }
.strength p { margin: 4px 0; }
.strength ul, .claim-card section > ul { margin: 4px 0; padding-left: 1.25rem; }
.evidence-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.evidence { padding: 14px 16px; background: var(--surface-bg); border: 1px solid var(--divider); border-radius: 12px; }
.evidence.rejected { border-style: dashed; border-color: var(--border); }
.evidence-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.evidence-source { margin: 6px 0 0; font-weight: 600; }
.tag { display: inline-block; padding: 1px 8px; color: var(--muted-fg); border: 1px solid var(--border); border-radius: 6px; font-size: 0.75rem; }
.tag-rejected { color: var(--error-fg); background: var(--error-bg); border-color: transparent; font-weight: 700; }
.plain-list { margin: 0; padding: 0; list-style: none; }
.plain-list li { margin: 6px 0; }

.conflict { margin: 16px 0; padding: 14px 16px; background: var(--misleading-bg); border-radius: 12px; }
.conflict > h4 { margin-top: 0; color: var(--misleading-fg); }
.conflict > p { color: var(--misleading-fg); }
.conflict-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.conflict-grid > div { padding: 10px 12px; background: var(--surface-bg); border-radius: var(--radius-s); }

/* correction */
.correction-card { border-left: 4px solid var(--primary-bg); }
.corrections { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.corrections li { display: grid; justify-items: start; gap: 6px; }
.correction-text { margin: 0; font-size: 1.0625rem; font-weight: 500; }

/* numbered source list */
.sources { margin: 0; padding: 0; list-style: none; }
.source-item { padding: 18px 0; border-top: 1px solid var(--divider); }
.source-item:first-child { padding-top: 4px; border-top: 0; }
.source-item:last-child { padding-bottom: 0; }
.source-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; gap: 4px 12px; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.02em; }
.avatar-official { color: var(--official-fg); background: var(--official-bg); }
.avatar-checker { color: var(--checker-fg); background: var(--checker-bg); }
.avatar-other { color: var(--other-fg); background: var(--other-bg); }
.source-publisher { margin: 0; color: var(--muted-fg); font-size: 0.8125rem; font-weight: 600; }
.source-no { color: var(--link-fg); font-weight: 800; font-variant-numeric: tabular-nums; }
.source-title { margin: 2px 0 0; font-size: 1rem; font-weight: 600; line-height: 1.35; }
.source-item > .meta, .source-item > .quote, .source-open { margin-left: 52px; }
.source-open { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 10px; margin-bottom: 0; }
.open-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  color: var(--link-fg);
  border: 1px solid var(--outline);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}
.open-link::after { content: "↗" / ""; }
.domain { color: var(--muted-fg); font-size: 0.8125rem; }
.no-link { color: var(--muted-fg); font-size: 0.875rem; }

/* how we checked */
details.method > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin: -8px 0; list-style: none; cursor: pointer; border-radius: var(--radius-s); }
details.method > summary::-webkit-details-marker { display: none; }
details.method > summary::after { content: ""; flex: none; width: 10px; height: 10px; margin-right: 8px; border-right: 2px solid var(--muted-fg); border-bottom: 2px solid var(--muted-fg); transform: rotate(45deg); transition: transform 0.2s ease; }
details.method[open] > summary { margin-bottom: 12px; }
details.method[open] > summary::after { transform: rotate(-135deg); }
details.method > summary h2 { margin: 0; }
.method h3 { margin: 20px 0 8px; color: var(--muted-fg); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.method ol { margin: 0; padding-left: 1.25rem; }
.branch-lines { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.branch-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.branch-name { font-weight: 600; }
.branch-line .meta { margin: 0; }
.state-chip { padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.branch-line-ok .state-chip { color: var(--confirmed-fg); background: var(--confirmed-bg); }
.branch-line-unavailable .state-chip { color: var(--misleading-fg); background: var(--misleading-bg); }
.branch-line-skipped .state-chip { color: var(--insufficient-fg); background: var(--insufficient-bg); }

/* sources and tests pages */
.page-title { margin: 40px 0 8px; font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.25rem); letter-spacing: -0.02em; }
.page h2:not(.page-title) { margin: 32px 0 12px; }

/* ---------- layout breakpoints ---------- */

@media (min-width: 721px) {
  .branches { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .card { padding: 18px 16px; }
  .hero { margin: 24px 0 16px; }
  .mode-toggle { display: flex; }
  .mode-toggle label { flex: 1; padding: 0 12px; }
  .actions button { flex: 1 1 auto; }
  .conflict-grid { grid-template-columns: 1fr; }
  .source-head { grid-template-columns: 40px minmax(0, 1fr); }
  .source-head > .role { grid-column: 2; justify-self: start; margin-top: 6px; }
  .source-item > .meta, .source-item > .quote, .source-open { margin-left: 0; }
  .field-meta { flex-direction: column; gap: 4px; }

  /* tables become stacked cards */
  .table-wrap, .table-wrap.card { overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; left: -999px; }
  tr { margin-bottom: 12px; background: var(--surface-bg); border: 1px solid var(--divider); border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden; }
  .claims-table tr { border-left-width: 4px; }
  .claims-table td:nth-child(n) { width: auto; }
  td { padding: 12px 16px; border-bottom: 1px solid var(--divider); }
  td:last-child { border-bottom: 0; }
  td::before { content: attr(data-label); display: block; margin-bottom: 6px; color: var(--muted-fg); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
}

@media (max-width: 560px) {
  .step-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .step::before { margin-bottom: 0; }
  .stepper { margin: 16px 0; }
}

@media (max-width: 400px) {
  .brand-mark { display: none; }
  .brand h1 { font-size: 1.125rem; }
  nav { gap: 2px; }
  nav a { padding: 0 10px; font-size: 0.875rem; }
}

.v-confirmed-row { border-left-color: var(--confirmed-fg); }
.v-false-row { border-left-color: var(--false-fg); }
.v-misleading-row { border-left-color: var(--misleading-fg); }
.v-insufficient_evidence-row { border-left-color: var(--insufficient-fg); }
.v-not_verifiable-row { border-left-color: var(--not-verifiable-fg); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .progress-card::before { width: 100%; opacity: 0.35; }
}
