:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-soft: #f9fbfb;
  --line: #d7dee3;
  --text: #182026;
  --muted: #64717a;
  --accent: #1d6f72;
  --accent-2: #8a5a1f;
  --danger: #a33a3a;
  --shadow: 0 12px 32px rgba(24, 32, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
tr:focus-visible {
  outline: 3px solid rgba(29, 111, 114, 0.35);
  outline-offset: -2px;
}

.probe {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.masthead,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.masthead {
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
}

h2 {
  font-size: 16px;
}

.subtitle {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.nav-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.summary-grid article,
.analysis-panel,
.table-panel,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-grid article {
  padding: 14px;
}

.summary-grid strong {
  display: block;
  font-size: 14px;
}

.summary-grid span {
  display: block;
  margin-top: 7px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.summary-grid small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.analysis-panel,
.detail-panel {
  padding: 14px;
  margin-bottom: 14px;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
}

.analysis-wrap {
  max-height: none;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-panel {
  overflow: hidden;
  margin-bottom: 14px;
}

.table-panel .section-head {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

#itemCount {
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  max-height: 420px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}

#itemsBody tr {
  cursor: pointer;
}

#itemsBody tr:hover,
#itemsBody tr.active {
  background: #eef5f5;
}

.score-list {
  white-space: nowrap;
}

.hot {
  color: var(--danger);
  font-weight: 800;
}

.score-badges {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.score-badge.high {
  background: #dff0e7;
  color: #17633e;
}

.score-badge.mid {
  background: #f4ead8;
  color: #7a531a;
}

.score-badge.low {
  background: #f2dedf;
  color: #8e3030;
}

.score-badge.human {
  width: auto;
  min-width: 44px;
  padding: 0 7px;
  background: #dfe8f1;
  color: #365f80;
}

.analysis-note {
  color: var(--muted);
  font-size: 12px;
}

.read-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
}

.read-pill.hot {
  background: #f2dedf;
  color: #8e3030;
}

.read-pill.split {
  background: #f4ead8;
  color: #7a531a;
}

.read-pill.cool {
  background: #dfe8f1;
  color: #365f80;
}

.read-pill.mixed {
  background: #e8e4f2;
  color: #5d4f89;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  gap: 16px;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.gap-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  background: #f4ead8;
  color: #7a531a;
  font-size: 12px;
  font-weight: 800;
}

.detail-video {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  border-radius: 8px;
  background: #111;
}

.file-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.rating-card {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.rating-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.rating-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.human-rating {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  border-radius: 7px;
  padding: 8px 10px;
  background: #e8f0f6;
  color: #365f80;
  font-size: 13px;
}

.model-descriptions {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.model-descriptions h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.model-descriptions p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.rationale-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rationale-grid.three-models {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rationale-grid p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .summary-grid,
  .detail-grid,
  .rationale-grid,
  .rationale-grid.three-models {
    grid-template-columns: 1fr;
  }

  .masthead,
  .section-head,
  .detail-head {
    display: block;
  }

  .nav-link,
  .section-head span,
  .gap-pill {
    display: inline-flex;
    margin-top: 10px;
  }
}
