.factcheck-dashboard {
  --verdict-true: #2f9e5b;
  --verdict-false: #d1495b;
  --verdict-partial: #f59f00;
  --verdict-unknown: #3b82c4;
  --verdict-true-soft: rgba(47, 158, 91, 0.16);
  --verdict-false-soft: rgba(209, 73, 91, 0.16);
  --verdict-partial-soft: rgba(245, 159, 0, 0.18);
  --verdict-unknown-soft: rgba(59, 130, 196, 0.16);
}

html[data-theme="dark"] .factcheck-dashboard {
  --verdict-true: #63d487;
  --verdict-false: #ff7a88;
  --verdict-partial: #ffd166;
  --verdict-unknown: #6fb6ff;
  --verdict-true-soft: rgba(99, 212, 135, 0.18);
  --verdict-false-soft: rgba(255, 122, 136, 0.18);
  --verdict-partial-soft: rgba(255, 209, 102, 0.2);
  --verdict-unknown-soft: rgba(111, 182, 255, 0.18);
}

.dashboard-method-list,
.dashboard-source-list {
  margin: 0;
  padding-left: 1rem;
  color: var(--ink-soft);
}

.dashboard-method-list li + li,
.dashboard-source-list li + li {
  margin-top: 0.45rem;
}

.dashboard-kicker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.dashboard-hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.dashboard-mini-stat {
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.34));
  border: 1px solid rgba(91, 72, 54, 0.1);
}

.dashboard-mini-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
}

.dashboard-mini-stat-label {
  margin-top: 0.18rem;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

html[data-theme="dark"] .dashboard-mini-stat {
  background: rgba(39, 33, 28, 0.74);
  border-color: rgba(217, 197, 174, 0.12);
}

.dashboard-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

#factcheck-viewer .document-head > :first-child {
  flex: 1 1 100%;
}

#factcheck-viewer .document-head p {
  max-width: none;
}

#factcheck-viewer .section-kicker {
  margin-bottom: 0.35rem;
}

#factcheck-viewer .section-title {
  font-size: clamp(2rem, 3.2vw, 2.6rem);
  line-height: 0.98;
}

#factcheck-viewer .document-head p {
  margin-top: 0.45rem;
}

.dashboard-chart-card {
  padding: 1.15rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.dashboard-chart-card h3,
.dashboard-insight-card h3,
.dashboard-detail-card h3,
.dashboard-filter-card h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1;
}

.dashboard-card-note {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
}

.dashboard-donut-wrap {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.dashboard-donut-svg {
  width: min(100%, 220px);
  justify-self: center;
}

.dashboard-donut-track {
  fill: none;
  stroke: rgba(125, 92, 72, 0.12);
  stroke-width: 18;
}

.dashboard-donut-segment {
  fill: none;
  stroke-width: 18;
  stroke-linecap: butt;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.dashboard-donut-label {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  fill: var(--ink);
}

.dashboard-donut-sub {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--ink-faint);
}

.dashboard-legend {
  display: grid;
  gap: 0.7rem;
}

.dashboard-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(91, 72, 54, 0.08);
}

.dashboard-legend-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.dashboard-legend-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

.dashboard-legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.dashboard-legend-value {
  text-align: right;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.dashboard-reel-chart-wrap {
  margin-top: 1rem;
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
}

.dashboard-reel-chart {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dashboard-reel-chart-axis {
  stroke: rgba(91, 72, 54, 0.12);
  stroke-width: 1;
}

.dashboard-reel-chart-label {
  font-size: 10px;
  fill: var(--ink-faint);
}

.dashboard-reel-hover-label {
  font-size: 18px;
  font-weight: 700;
  fill: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.dashboard-reel-chart-button {
  cursor: pointer;
}

.dashboard-reel-chart-button rect {
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.dashboard-reel-chart-button:hover rect,
.dashboard-reel-chart-button:focus-visible rect {
  opacity: 0.85;
}

.dashboard-reel-chart-button:hover .dashboard-reel-hover-label,
.dashboard-reel-chart-button:focus-visible .dashboard-reel-hover-label {
  opacity: 1;
}

.dashboard-reel-chart-button.is-selected .dashboard-reel-hover-label {
  opacity: 1;
}

.dashboard-reel-chart-outline {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  rx: 9;
  opacity: 0.86;
}

.dashboard-filter-card {
  padding: 1.15rem;
}

.dashboard-filter-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.dashboard-viewer-controls {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(230px, 320px);
  gap: 0.8rem;
  margin-top: 1rem;
  align-items: end;
}

.dashboard-field {
  display: grid;
  gap: 0.4rem;
}

.dashboard-field label {
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.dashboard-input,
.dashboard-select {
  width: 100%;
  min-height: 52px;
  height: 52px;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(91, 72, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
}

html[data-theme="dark"] .dashboard-input,
html[data-theme="dark"] .dashboard-select {
  background: rgba(39, 33, 28, 0.88);
  border-color: rgba(217, 197, 174, 0.12);
  color: var(--ink);
}

.dashboard-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 52px;
  height: 52px;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(91, 72, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
}

.dashboard-toggle input {
  accent-color: var(--accent);
}

html[data-theme="dark"] .dashboard-toggle {
  background: rgba(39, 33, 28, 0.88);
  border-color: rgba(217, 197, 174, 0.12);
}

.dashboard-verdict-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.dashboard-filter-chip {
  border: 1px solid rgba(91, 72, 54, 0.12);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.56rem 0.9rem;
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.dashboard-filter-chip:hover,
.dashboard-filter-chip:focus-visible,
.dashboard-filter-chip.is-active {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(125, 92, 72, 0.2);
  color: var(--ink);
}

html[data-theme="dark"] .dashboard-filter-chip {
  background: rgba(39, 33, 28, 0.8);
  border-color: rgba(217, 197, 174, 0.12);
  color: var(--ink-soft);
}

html[data-theme="dark"] .dashboard-filter-chip:hover,
html[data-theme="dark"] .dashboard-filter-chip:focus-visible,
html[data-theme="dark"] .dashboard-filter-chip.is-active {
  background: rgba(53, 45, 38, 0.98);
  border-color: rgba(211, 162, 121, 0.24);
  color: var(--ink);
}

.dashboard-results-summary {
  margin-top: 0.85rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.dashboard-compact-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.dashboard-overview-cell {
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(91, 72, 54, 0.08);
  background: rgba(255, 255, 255, 0.42);
}

html[data-theme="dark"] .dashboard-overview-cell {
  border-color: rgba(217, 197, 174, 0.1);
  background: rgba(39, 33, 28, 0.5);
}

.dashboard-single-viewer {
  margin-top: 1rem;
}

.dashboard-legend--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  margin-top: 0.9rem;
}

.dashboard-legend--inline .dashboard-legend-item {
  padding-bottom: 0;
  border-bottom: 0;
  justify-content: flex-start;
  gap: 0.5rem;
}

.dashboard-legend--inline .dashboard-legend-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.dashboard-reel-topline,
.dashboard-detail-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dashboard-reel-title {
  margin: 0.35rem 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.75rem;
  line-height: 0.95;
}

.dashboard-detail-summary,
.dashboard-detail-note,
.dashboard-empty-state {
  margin: 0.6rem 0 0;
  color: var(--ink-soft);
}

.dashboard-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.44rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(91, 72, 54, 0.1);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  color: var(--ink-soft);
}

html[data-theme="dark"] .dashboard-chip {
  background: rgba(39, 33, 28, 0.88);
  border-color: rgba(217, 197, 174, 0.12);
}

.dashboard-detail-card {
  padding: 1.15rem;
}

.dashboard-detail-body {
  display: grid;
  gap: 1rem;
}

.dashboard-detail-callout {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(125, 92, 72, 0.08);
  border: 1px solid rgba(125, 92, 72, 0.12);
  color: var(--ink-soft);
}

html[data-theme="dark"] .dashboard-detail-callout {
  background: rgba(211, 162, 121, 0.08);
  border-color: rgba(211, 162, 121, 0.14);
}

.dashboard-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dashboard-detail-panel {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(91, 72, 54, 0.08);
  background: rgba(255, 255, 255, 0.4);
}

html[data-theme="dark"] .dashboard-detail-panel {
  border-color: rgba(217, 197, 174, 0.1);
  background: rgba(39, 33, 28, 0.5);
}

.dashboard-detail-label {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.dashboard-detail-value {
  margin-top: 0.3rem;
  color: var(--ink);
}

.dashboard-mix-list {
  display: grid;
  gap: 0.6rem;
}

.dashboard-mix-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.dashboard-mix-label {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.dashboard-mix-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(91, 72, 54, 0.08);
  overflow: hidden;
}

.dashboard-mix-fill {
  height: 100%;
  border-radius: 999px;
}

.dashboard-mix-value {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.dashboard-claim-list {
  display: grid;
  gap: 0.8rem;
}

.dashboard-claim-card {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(91, 72, 54, 0.08);
  background: rgba(255, 255, 255, 0.42);
}

html[data-theme="dark"] .dashboard-claim-card {
  background: rgba(39, 33, 28, 0.54);
  border-color: rgba(217, 197, 174, 0.1);
}

.dashboard-claim-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-claim-number {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.dashboard-claim-text {
  margin: 0.28rem 0 0;
  color: var(--ink);
}

.dashboard-claim-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.dashboard-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 0.42rem 0.65rem;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.dashboard-badge.is-true {
  background: var(--verdict-true-soft);
  color: var(--verdict-true);
  border-color: rgba(95, 127, 111, 0.18);
}

.dashboard-badge.is-false {
  background: var(--verdict-false-soft);
  color: var(--verdict-false);
  border-color: rgba(169, 107, 95, 0.2);
}

.dashboard-badge.is-partial {
  background: var(--verdict-partial-soft);
  color: var(--verdict-partial);
  border-color: rgba(168, 133, 77, 0.2);
}

.dashboard-badge.is-unknown {
  background: var(--verdict-unknown-soft);
  color: var(--verdict-unknown);
  border-color: rgba(111, 120, 134, 0.2);
}

.dashboard-badge.is-confidence {
  min-width: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink-soft);
  background: rgba(125, 92, 72, 0.08);
  border-color: rgba(125, 92, 72, 0.12);
}

html[data-theme="dark"] .dashboard-badge.is-confidence {
  background: rgba(211, 162, 121, 0.08);
  border-color: rgba(211, 162, 121, 0.14);
}

.dashboard-claim-details {
  margin-top: 0.75rem;
  border-top: 1px solid rgba(91, 72, 54, 0.08);
  padding-top: 0.68rem;
}

.dashboard-claim-details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}

.dashboard-claim-details p {
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
}

.dashboard-claim-sources {
  margin-top: 0.75rem;
  border-top: 1px solid rgba(91, 72, 54, 0.08);
  padding-top: 0.68rem;
}

.dashboard-claim-sources-title {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.dashboard-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.dashboard-source-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.44rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(91, 72, 54, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.84rem;
}

.dashboard-source-link:hover,
.dashboard-source-link:focus-visible {
  color: var(--ink);
  border-color: rgba(125, 92, 72, 0.2);
  background: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .dashboard-source-link {
  background: rgba(39, 33, 28, 0.86);
  border-color: rgba(217, 197, 174, 0.12);
  color: var(--ink-soft);
}

html[data-theme="dark"] .dashboard-source-link:hover,
html[data-theme="dark"] .dashboard-source-link:focus-visible {
  color: var(--ink);
  border-color: rgba(211, 162, 121, 0.24);
  background: rgba(53, 45, 38, 0.98);
}

.dashboard-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-insight-card {
  padding: 1rem;
}

.dashboard-insight-card p {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
}

.dashboard-insight-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.dashboard-empty-state {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(125, 92, 72, 0.08);
  border: 1px dashed rgba(125, 92, 72, 0.2);
}

.dashboard-link-note {
  color: var(--ink-soft);
}

.dashboard-source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

@media (max-width: 980px) {
  .dashboard-chart-grid,
  .dashboard-insight-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-compact-overview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dashboard-hero-meta,
  .dashboard-viewer-controls,
  .dashboard-donut-wrap,
  .dashboard-detail-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-mix-row {
    grid-template-columns: 1fr;
  }

  .dashboard-claim-head,
  .dashboard-filter-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-claim-badges {
    justify-content: flex-start;
  }

  .dashboard-legend--inline {
    gap: 0.45rem 0.75rem;
  }
}
