/* ============================================================
   Test results page (tests.html)
   Uses the tokens and nav/footer from styles.css; everything
   here is specific to this route.
   ============================================================ */

/* ---- Hero ---- */
.t-hero {
  padding: 76px 0 34px;
}
.t-hero h1 {
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.028em;
  text-wrap: balance;
  margin: 0 0 18px;
}
.t-hero-sub {
  font-size: 17.5px;
  line-height: 1.62;
  max-width: 60ch;
  margin: 0 0 34px;
}

.t-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 620px;
  box-shadow: var(--shadow-soft);
}
.t-stat {
  background: var(--surface);
  padding: 18px 20px;
}
.t-stat strong {
  display: block;
  font-family: "Manrope", sans-serif;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.t-stat span {
  display: block;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mute);
}
.t-stat.is-good strong {
  color: var(--green);
}

.t-runline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--text-mute);
}
.t-runline code {
  font-size: 12.5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--text-soft);
}
.t-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  border-radius: 999px;
  padding: 5px 12px;
}
.t-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

/* ---- Sticky toolbar ---- */
.t-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-block: 1px solid var(--border);
  padding: 12px 0;
  margin-top: 34px;
}
.t-toolbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.t-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 300px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 16px;
  height: 44px;
}
.t-search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}
.t-search svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--text-mute);
}
.t-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
}
.t-search input::placeholder {
  color: var(--text-mute);
}

.t-filters {
  display: flex;
  gap: 6px;
  flex: none;
}
.t-chip {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.t-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.t-chip.is-on {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ---- Jump links ---- */
.t-jump-wrap {
  padding-top: 26px;
}
.t-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.t-jump a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 8px 7px 14px;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.t-jump a:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.t-jump a span {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-mute);
  background: var(--bg);
  border-radius: 999px;
  padding: 2px 8px;
}

/* ---- Areas ---- */
.t-body {
  padding: 12px 0 40px;
}
.t-empty {
  text-align: center;
  padding: 48px 0;
  font-size: 16px;
  color: var(--text-mute);
}

.t-area {
  padding-top: 44px;
  scroll-margin-top: 84px;
}
.t-area-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.t-area-head h2 {
  font-size: clamp(21px, 2.5vw, 27px);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.t-area-head p {
  margin: 0;
  font-size: 15px;
  max-width: 62ch;
}
.t-area-stat {
  flex: none;
  text-align: right;
}
.t-area-stat strong {
  display: block;
  font-family: "Manrope", sans-serif;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--blue);
}
.t-area-stat span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mute);
  white-space: nowrap;
}

/* ---- Files ---- */
.t-files {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 16px;
  margin-top: 22px;
  align-items: start;
}
.t-file {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px 16px;
  box-shadow: var(--shadow-soft);
}
.t-file-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.t-file-head h3 {
  font-size: 16px;
  margin: 0;
  letter-spacing: -0.01em;
}
.t-file-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.t-file-meta code {
  font-size: 11.5px;
  color: var(--text-mute);
  overflow-wrap: anywhere;
}
.t-count {
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--blue);
  background: var(--blue-bg);
  border-radius: 999px;
  padding: 2px 9px;
}

.t-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.t-row {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid var(--bg);
}
.t-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.t-mark {
  position: relative;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--green-bg);
  flex: none;
}
.t-mark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 4px;
  height: 8px;
  border: solid var(--green);
  border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}
.t-row.is-fail .t-mark {
  background: var(--red-bg);
}
.t-row.is-fail .t-mark::after {
  left: 7px;
  top: 4px;
  width: 2px;
  height: 8px;
  border: 0;
  background: var(--red);
  transform: none;
  border-radius: 1px;
}
.t-name {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-soft);
}
.t-row.is-fail .t-name {
  color: var(--red);
  font-weight: 600;
}

/* ---- Closing note ---- */
.t-note {
  padding: 48px 0 84px;
}
.t-note > .container {
  max-width: 760px;
}
.t-note h2 {
  font-size: clamp(21px, 2.5vw, 27px);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.t-note p {
  font-size: 15.5px;
  line-height: 1.66;
}
.t-note p:last-child {
  margin-bottom: 0;
}

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .t-hero {
    padding: 48px 0 26px;
  }
  .t-area-head {
    flex-direction: column;
    gap: 12px;
  }
  .t-area-stat {
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 9px;
  }
  .t-area-stat span {
    margin-top: 0;
  }
  .t-files {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .t-filters {
    width: 100%;
  }
  .t-chip {
    flex: 1 1 auto;
  }
  .t-file {
    padding: 16px 16px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .t-chip,
  .t-jump a {
    transition: none;
  }
}
