:root {
  color-scheme: light;
  --results-ink: #17211b;
  --results-muted: #647168;
  --results-line: #d8dfda;
  --results-paper: #f7f8f6;
  --results-panel: #ffffff;
  --results-green: #147849;
  --results-green-soft: #e6f4ec;
  --results-amber: #9a5b05;
  --results-amber-soft: #fff2d8;
  --results-blue: #215ea8;
  font-family: "Noto Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 0 !important;
  margin: 0;
  color: var(--results-ink);
  background: var(--results-paper);
}

button,
a,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.results-header {
  min-height: 92px;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) minmax(320px, auto);
  align-items: center;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--results-line);
  background: var(--results-panel);
}

.results-brand {
  color: var(--results-green);
  font-weight: 800;
  text-decoration: none;
}

.results-heading h1,
.results-heading p {
  margin: 0;
  letter-spacing: 0;
}

.results-heading h1 {
  margin-top: 2px;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.15;
}

.results-kicker {
  color: var(--results-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.results-picker {
  min-width: 320px;
}

.results-main {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 56px;
}

.results-toolbar {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid var(--results-line);
  border-radius: 8px;
  background: var(--results-panel);
}

.results-progress {
  display: flex;
  align-items: baseline;
  gap: 9px;
  white-space: nowrap;
}

.results-progress strong {
  font-size: 1.35rem;
}

.results-progress span,
.results-list-heading span {
  color: var(--results-muted);
  font-size: 0.86rem;
}

.results-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebe8;
}

.results-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--results-green);
  transition: width 220ms ease;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.results-segments {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--results-line);
  border-radius: 7px;
}

.results-segments button,
.results-refresh,
.results-coverage {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 0;
  color: var(--results-ink);
  background: var(--results-panel);
  cursor: pointer;
  text-decoration: none;
}

.results-segments button + button {
  border-left: 1px solid var(--results-line);
}

.results-segments button.is-active {
  color: #fff;
  background: var(--results-green);
}

.results-refresh,
.results-coverage {
  border: 1px solid var(--results-line);
  border-radius: 7px;
  font-weight: 700;
}

.results-refresh:disabled {
  cursor: wait;
  opacity: 0.6;
}

.results-segments button:focus-visible,
.results-refresh:focus-visible,
.results-coverage:focus-visible,
.result-open:focus-visible,
.results-brand:focus-visible {
  outline: 3px solid rgba(33, 94, 168, 0.35);
  outline-offset: 2px;
}

.results-list-section {
  margin-top: 24px;
}

.results-list-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 10px;
}

.results-list-heading h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.results-list {
  overflow: hidden;
  border: 1px solid var(--results-line);
  border-radius: 8px;
  background: var(--results-panel);
}

.result-row {
  min-height: 68px;
  display: grid;
  grid-template-columns: 34px 34px minmax(180px, 1fr) 54px 106px 82px;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}

.result-row + .result-row {
  border-top: 1px solid var(--results-line);
}

.result-row[hidden] {
  display: none;
}

.result-number {
  color: var(--results-muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.result-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #eef1ef;
  font-size: 1.05rem;
}

.result-copy {
  min-width: 0;
}

.result-copy h3,
.result-copy p {
  margin: 0;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

.result-copy h3 {
  font-size: 0.96rem;
  line-height: 1.3;
}

.result-copy p {
  margin-top: 3px;
  color: var(--results-muted);
  font-size: 0.78rem;
}

.result-level,
.result-status {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.result-level {
  color: #4d5851;
  background: #edf0ee;
}

.result-status {
  color: var(--results-amber);
  background: var(--results-amber-soft);
}

.result-row[data-status="complete"] .result-status {
  color: var(--results-green);
  background: var(--results-green-soft);
}

.result-row[data-status="error"] .result-status {
  color: #9b2626;
  background: #fde7e7;
}

.result-open {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bfc9c2;
  border-radius: 7px;
  color: var(--results-green);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.result-open:hover,
.results-refresh:hover {
  background: #f0f4f1;
}

.results-empty {
  margin: 0;
  padding: 32px 20px;
  color: var(--results-muted);
  text-align: center;
}

@media (max-width: 900px) {
  .results-header {
    grid-template-columns: auto 1fr;
  }

  .results-picker {
    min-width: 0;
    grid-column: 1 / -1;
  }

  .results-toolbar {
    grid-template-columns: 1fr;
  }

  .results-actions {
    justify-content: space-between;
  }
}

@media (max-width: 650px) {
  .results-header {
    gap: 14px;
    padding: 14px 16px;
  }

  .results-main {
    width: min(100% - 20px, 1180px);
    margin-top: 16px;
  }

  .results-toolbar {
    gap: 14px;
    padding: 14px;
  }

  .results-progress {
    white-space: normal;
  }

  .results-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .results-list-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .result-row {
    grid-template-columns: 28px 34px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px 10px;
  }

  .result-number {
    grid-row: 1 / span 2;
  }

  .result-icon {
    grid-row: 1 / span 2;
  }

  .result-copy {
    grid-column: 3;
  }

  .result-level {
    display: none;
  }

  .result-status {
    grid-column: 3;
  }

  .result-open {
    min-width: 70px;
    grid-column: 4;
    grid-row: 1 / span 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .results-meter span {
    transition: none;
  }
}
