.page-title {
  align-items: center;
  padding: 2px 4px 4px;
}

.page-title h2 {
  font-size: 24px;
  font-weight: 700;
}

.page-title .muted {
  max-width: 620px;
  font-size: 12px;
}

.page-title-status {
  min-height: 30px;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.page-title-status::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

#overview .kpi-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

#overview .kpi-card {
  min-height: 104px;
  padding: 15px 16px;
  border: 0;
  border-radius: 6px;
  background: #fafafa;
}

#overview a.kpi-card:hover,
#overview a.kpi-card:focus-visible {
  background: #f6f6f6;
  box-shadow: inset 0 0 0 1px var(--border);
}

#overview .kpi-score {
  background: #fafafa;
  box-shadow: inset 0 3px 0 var(--border-strong);
}

#overview .kpi-alert {
  background: linear-gradient(145deg, var(--red-soft), #fff 72%);
  box-shadow: inset 3px 0 0 var(--red-fill);
}

#overview .kpi-outcome {
  border-top: 0;
  box-shadow: inset 0 3px 0 var(--border-strong);
}

#overview .kpi-outcome-pass {
  background: linear-gradient(145deg, var(--green-soft), #fff 76%);
  box-shadow: inset 0 3px 0 var(--green-fill);
}
#overview .kpi-outcome-issue {
  background: linear-gradient(145deg, var(--red-soft), #fff 76%);
  box-shadow: inset 0 3px 0 var(--red-fill);
}
#overview .kpi-outcome-unable {
  background: linear-gradient(145deg, var(--unable-soft), #fff 76%);
  box-shadow: inset 0 3px 0 var(--unable-fill);
}
#overview .kpi-outcome-technical {
  background: linear-gradient(145deg, var(--technical-soft), #fff 76%);
  box-shadow: inset 0 3px 0 var(--technical-fill);
}
#overview .kpi-outcome-pass > span, #overview .kpi-outcome-pass strong { color: var(--green); }
#overview .kpi-outcome-issue > span, #overview .kpi-outcome-issue strong { color: var(--red); }
#overview .kpi-outcome-unable > span, #overview .kpi-outcome-unable strong { color: var(--unable); }
#overview .kpi-outcome-technical > span, #overview .kpi-outcome-technical strong { color: var(--technical); }
#overview .kpi-card strong { font-size: 28px; }

.overview-trend {
  margin-bottom: 12px;
  overflow: hidden;
}

.overview-trend .card-body {
  background-image: linear-gradient(to bottom, transparent 32%, #f2f2f2 33%, transparent 34%, transparent 65%, #f2f2f2 66%, transparent 67%);
}

.overview-trend .trend-chart {
  min-height: 220px;
  justify-content: space-evenly;
  gap: 18px;
}

.overview-trend .trend-day {
  min-width: 76px;
  max-width: 96px;
  flex: 0 0 88px;
}

.overview-trend .trend-track { min-height: 150px; }
.overview-trend .trend-bar {
  width: min(34px, 65%);
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  border: 1px solid rgba(75, 85, 109, 0.16);
  border-radius: 8px 8px 3px 3px;
  background: var(--technical-soft);
  box-shadow: 0 5px 14px rgba(47, 56, 80, 0.1);
}
.trend-segment { width: 100%; min-height: 1px; }
.trend-segment + .trend-segment { border-bottom: 1px solid rgba(255, 255, 255, 0.72); }
.trend-segment.outcome-pass { background: var(--green-fill); }
.trend-segment.outcome-issue { background: var(--red-fill); }
.trend-segment.outcome-insufficient_evidence { background: var(--unable-fill); }
.trend-segment.outcome-technical_failure { background: var(--technical-fill); }
.trend-score {
  justify-self: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--technical-soft);
  color: var(--technical);
}
.trend-score.trend-good { background: var(--green-soft); color: var(--green); }
.trend-score.trend-warning { background: var(--orange-soft); color: var(--orange); }
.trend-score.trend-bad { background: var(--red-soft); color: var(--red); }
.trend-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px 10px; }
.trend-legend > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.legend-swatch { width: 8px; height: 8px; border-radius: 3px; }
.legend-swatch.outcome-pass { background: var(--green-fill); }
.legend-swatch.outcome-issue { background: var(--red-fill); }
.legend-swatch.outcome-insufficient_evidence { background: var(--unable-fill); }
.legend-swatch.outcome-technical_failure { background: var(--technical-fill); }
.progress .problem-bar { background: linear-gradient(90deg, var(--red-fill), var(--red)); }

.overview-insights {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(520px, 2fr);
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}

.overview-insights > .card { margin: 0; }

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

.decision-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafafa;
}

.decision-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.decision-count { color: var(--text); font-size: 15px; font-weight: 750; }
.decision-verdict { justify-self: start; font-size: 10px; }
.decision-verdict.outcome-pass { color: var(--green); }
.decision-verdict.outcome-issue { color: var(--red); }
.decision-verdict.outcome-insufficient_evidence { color: var(--unable); }
.decision-verdict.outcome-technical_failure { color: var(--technical); }
.decision-meta { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }

.calibration-card { margin-bottom: 12px; }
.calibration-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--border);
}

.calibration-progress > div { padding: 15px 16px; background: var(--surface); }
.calibration-progress span { color: var(--muted); font-size: 11px; }
.calibration-progress strong { float: right; font-size: 12px; }
.learning-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--border);
  background: var(--border);
}
.learning-summary > div { padding: 12px 16px; background: var(--surface); }
.learning-summary span { color: var(--muted); font-size: 11px; }
.learning-summary strong { display: block; margin-top: 5px; font-size: 18px; }
.learning-gaps { padding: 14px 16px 16px; border-top: 1px solid var(--border); }
.learning-gaps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.learning-gaps-header h4 { margin: 0; font-size: 12px; }
.learning-gaps-header > span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.learning-gap-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.learning-gap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--technical-fill);
  border-radius: 5px;
  background: var(--surface);
}
.learning-gap-open {
  border-left-color: var(--orange-fill);
  background: linear-gradient(120deg, var(--orange-soft), var(--surface) 55%);
}
.learning-gap-in_review {
  border-left-color: var(--focus);
  background: linear-gradient(120deg, #eef6ff, var(--surface) 55%);
}
.learning-gap-unknown { border-left-color: var(--technical-fill); background: var(--technical-soft); }
.learning-gap-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.learning-gap-heading strong { overflow-wrap: anywhere; font-size: 12px; }
.learning-gap-status { white-space: nowrap; background: var(--orange-soft); color: var(--orange); }
.learning-gap-status.open { background: var(--orange-soft); color: var(--orange); }
.learning-gap-status.in_review { background: #e7f2ff; color: #075aaf; }
.learning-gap-status.unknown { background: var(--technical-soft); color: var(--technical); }
.learning-gap-reason { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 11px; }
.learning-gap-key { grid-column: 1 / -1; overflow-wrap: anywhere; color: var(--muted); font-size: 9px; }
.learning-gap-meta { align-self: center; color: var(--muted); font-size: 10px; }
.learning-gap-link { justify-self: end; white-space: nowrap; }
.calibration-track { height: 7px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: #eee; }
.calibration-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); }

.disclosure-card > summary {
  cursor: pointer;
  flex-wrap: wrap;
  list-style: none;
}

.summary-copy { min-width: 180px; flex: 1; }
.summary-copy strong { display: block; font-size: 14px; }
.summary-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }

.disclosure-card > summary::-webkit-details-marker { display: none; }
.disclosure-card > summary::after {
  color: var(--muted);
  content: "Rozbalit  +";
  font-size: 11px;
  font-weight: 650;
}

.disclosure-card[open] > summary::after { content: "Sbalit  −"; }
.disclosure-card > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.disclosure-card > summary .status-badge { margin-left: auto; }
.disclosure-card > summary::after { margin-left: 4px; }

.diagnostics-card { border-left: 1px solid var(--border); }
.diagnostic-events { background: #fcfcfc; }
.diagnostic-event {
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
}

.diagnostic-marker { width: 7px; height: 7px; border-radius: 50%; background: var(--orange-fill); }
.diagnostic-copy strong { display: block; margin-bottom: 2px; font-size: 11px; }
.diagnostic-copy span { color: var(--muted); font-size: 11px; }
.diagnostic-event code { color: #999; font-size: 9px; }
.diagnostic-info .diagnostic-marker { background: var(--green-fill); }
.diagnostic-info code { color: var(--green); }

.calibration-table { min-width: 720px; table-layout: fixed; }
.calibration-table th:nth-child(1) { width: 17%; }
.calibration-table th:nth-child(2) { width: 16%; }
.calibration-table th:nth-child(3) { width: 48%; }
.calibration-table th:nth-child(4) { width: 10%; }
.calibration-table th:nth-child(5) { width: 9%; }
.calibration-table .finding-summary {
  display: -webkit-box;
  max-width: none;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 1050px) {
  #overview .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-insights { grid-template-columns: 1fr; }
  .learning-gap-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .page-title { align-items: flex-start; flex-direction: column; }
  #overview .kpi-grid { grid-template-columns: 1fr; }
  .decision-grid, .calibration-progress, .learning-summary { grid-template-columns: 1fr; }
  .overview-trend .trend-day { min-width: 66px; }
  .disclosure-card > summary .status-badge { margin-left: 0; white-space: normal; }
  .disclosure-card > summary::after { margin-left: auto; }
}

.presentation-page { min-width: 320px; overflow-x: hidden; background: #f3f5f7; }
.presentation-topbar {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px max(20px, calc((100vw - 1500px) / 2));
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.presentation-brand {
  color: var(--text);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.06em;
  text-decoration: none;
}
.presentation-brand span { color: var(--accent); }
.presentation-title { display: grid; gap: 2px; }
.presentation-title span { color: var(--muted); font-size: 10px; }
.presentation-content { width: 100%; max-width: 1540px; margin: 0 auto; padding: 28px 20px 42px; }
.presentation-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 28px;
  border: 1px solid #dce5e2;
  border-radius: 10px;
  background: linear-gradient(125deg, #fff 25%, var(--green-soft));
  box-shadow: 0 10px 30px rgba(22, 79, 70, 0.06);
}
.presentation-hero h1 { margin: 3px 0 8px; font-size: clamp(25px, 3vw, 36px); letter-spacing: -0.035em; }
.presentation-hero p:not(.eyebrow) { max-width: 820px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.presentation-verified {
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 1px solid #a7dacd;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-weight: 750;
}
.presentation-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.presentation-metrics article {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--technical-fill);
  border-radius: 7px;
  background: var(--surface);
}
.presentation-metrics .metric-pass { border-top-color: var(--green-fill); background: linear-gradient(145deg, var(--green-soft), #fff 72%); }
.presentation-metrics .metric-partial { border-top-color: var(--orange-fill); background: linear-gradient(145deg, var(--orange-soft), #fff 72%); }
.presentation-metrics span, .presentation-metrics small { display: block; color: var(--muted); font-size: 10px; }
.presentation-metrics strong { display: block; margin: 9px 0 6px; font-size: 26px; line-height: 1; }
.presentation-metrics .metric-pass strong { color: var(--green); }
.presentation-metrics .metric-partial strong { color: var(--orange); }
.presentation-gold {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}
.presentation-gold > strong { margin-right: 4px; font-size: 11px; }
.presentation-disclaimer {
  margin: 0 0 12px;
  padding: 11px 14px;
  border: 1px solid #d7e2ec;
  border-left: 4px solid var(--focus);
  border-radius: 6px;
  background: #f6faff;
  color: #405369;
}
.presentation-card-header h2 { margin: 0; font-size: 16px; }
.presentation-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.presentation-audit { min-width: 0; overflow: hidden; }
.presentation-audit .table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
.audit-match { display: inline-flex; padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.audit-match-full { background: var(--green-soft); color: var(--green); }
.audit-match-partial { background: var(--orange-soft); color: var(--orange); }
.audit-match-wrong { background: var(--red-soft); color: var(--red); }
.presentation-table { min-width: 1340px; table-layout: fixed; }
.presentation-table th:nth-child(1) { width: 64px; }
.presentation-table th:nth-child(2) { width: 190px; }
.presentation-table th:nth-child(3), .presentation-table th:nth-child(4) { width: 185px; }
.presentation-table th:nth-child(5) { width: 120px; }
.presentation-table th:nth-child(7) { width: 100px; }
.presentation-table td { line-height: 1.4; }
.presentation-table td:first-child { border-left: 4px solid transparent; }
.presentation-table .audit-row-full td:first-child { border-left-color: var(--green-fill); }
.presentation-table .audit-row-partial td:first-child { border-left-color: var(--orange-fill); }
.presentation-table .audit-row-wrong td:first-child { border-left-color: var(--red-fill); }
.presentation-table td:nth-child(3) small, .presentation-table td:nth-child(4) small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.presentation-table .row-action { white-space: nowrap; }
.presentation-footer { padding: 18px 4px 0; color: var(--muted); font-size: 10px; text-align: center; }

@media (max-width: 1050px) {
  .presentation-metrics { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
}

@media (max-width: 620px) {
  .presentation-content { padding: 14px 10px 28px; }
  .presentation-hero { align-items: flex-start; flex-direction: column; padding: 20px; }
  .presentation-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .presentation-metrics article:last-child { grid-column: 1 / -1; }
  .presentation-card-header { align-items: flex-start; flex-direction: column; }
  .presentation-legend { justify-content: flex-start; }
}
.qa-review-access { padding: 18px 20px; }
.qa-review-access h3 { margin: 0; }
.qa-review-access p { color: var(--muted); line-height: 1.5; }
.qa-review-access form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qa-review-access input { min-height: 36px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; }

/* Compact evidence status keeps source freshness visible beside human review. */
.qa-evidence-notice { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.qa-evidence-notice strong { color: var(--text); font-size: inherit; font-weight: 600; }
.qa-evidence-notice.needs-human-review strong { color: var(--orange); }
#overview .kpi-score #kpi-quality { color: var(--muted); }
#overview .overview-insights { grid-template-columns: 1fr; }
