:root {
  --gtg-plum: #40002e;
  --gtg-pink: #e6818c;
  --gtg-mustard: #eba200;
  --gtg-coral: #e9715b;
  --gtg-coral-bright: #f86752;
  --gtg-sage: #c4dbb4;
  --gtg-sage-deep: #a6c089;
  --gtg-sage-inset: #9bb67d;
  --gtg-ink: #1a1014;
  --gtg-brown: #792c1a;
  --gtg-plum-input: #4b0236;
  --gtg-button-text: #470030;
  --gtg-font-display: "Barlow Condensed", Impact, sans-serif;
  --gtg-font-mono: "JetBrains Mono", ui-monospace, monospace;
  --gtg-row-alt: #f2f6ea;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  margin: 0;
  padding: 0;
  background: var(--gtg-plum);
  color: var(--gtg-ink);
  font-family: var(--gtg-font-display);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: underline; text-underline-offset: 0.18em; }
a:hover, a:focus-visible { text-decoration: none; }

/* ── HEADER (pink band, hero-style) ─────────────────────────── */
.results-hero {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--gtg-pink);
  padding: 40px 20px;
}

.results-hero__inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.results-hero__mark {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.results-hero__mark img { width: 100%; height: 100%; object-fit: contain; }

.results-hero__divider {
  width: 2px;
  align-self: stretch;
  min-height: 52px;
  background: var(--gtg-plum);
  opacity: 0.35;
  flex-shrink: 0;
}

.results-hero__text { flex: 1; min-width: 0; }

.results-hero__eyebrow {
  font-family: var(--gtg-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gtg-plum);
  opacity: 0.75;
  margin: 0 0 4px;
}

.results-hero__title {
  font-family: var(--gtg-font-display);
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gtg-plum);
  margin: 0;
}

.results-hero__subtitle {
  font-family: var(--gtg-font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: none;
  margin: 8px 0 0;
  color: var(--gtg-plum);
  opacity: 0.85;
  max-width: 46ch;
}

/* ── MAIN BAND (sage) ───────────────────────────────────────── */
.results-band {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--gtg-sage);
  min-height: calc(100vh - 160px);
}

.results-band__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 20px 64px;
  display: grid;
  gap: 32px;
}

/* ── RESULT SECTIONS ────────────────────────────────────────── */
.result-section {
  border: 2px solid var(--gtg-plum);
  border-radius: 3px;
  background: #fff;
  overflow: hidden;
}

.result-section__header {
  padding: 18px 20px 14px;
  border-bottom: 2px solid var(--gtg-plum);
  background: #fff;
}

.result-section__title {
  font-family: var(--gtg-font-display);
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gtg-plum);
  margin: 0;
}

.result-section__meta {
  font-family: var(--gtg-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gtg-brown);
  margin: 4px 0 0;
}

.result-section__empty {
  font-family: var(--gtg-font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--gtg-brown);
  padding: 28px 20px;
  margin: 0;
}

/* ── TABLE ──────────────────────────────────────────────────── */
.results-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.results-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 460px;
}

.results-table th,
.results-table td {
  padding: 10px 12px;
  text-align: right;
  white-space: nowrap;
}

.results-table th:first-child,
.results-table td:first-child { text-align: left; }

.results-table thead th {
  position: sticky;
  top: 0;
  background: var(--gtg-sage-deep);
  border-bottom: 2px solid var(--gtg-plum);
  font-family: var(--gtg-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gtg-plum);
}

.th-sort {
  all: unset;
  cursor: pointer;
  display: inline-block;
  padding: 4px 2px;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}
.th-sort:focus-visible { outline: 2px solid var(--gtg-coral); outline-offset: 2px; }

.th-sort[data-dir="1"]::after { content: " ▲"; font-size: 9px; }
.th-sort[data-dir="-1"]::after { content: " ▼"; font-size: 9px; }

.results-table tbody td {
  font-family: var(--gtg-font-mono);
  font-size: 13px;
  color: var(--gtg-ink);
  border-bottom: 1px solid rgba(26, 16, 20, 0.12);
}

.results-table tbody td:first-child {
  font-family: var(--gtg-font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--gtg-plum);
}

.results-table td.is-na { color: rgba(121, 44, 26, 0.45); font-size: 11px; }

.results-table td.total-col {
  font-weight: 700;
  color: var(--gtg-plum);
  border-left: 2px solid rgba(64, 0, 46, 0.2);
}

/* Sticky first column so names stay visible while scrolling segments */
.results-table thead th:first-child,
.results-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  box-shadow: 2px 0 0 rgba(64, 0, 46, 0.15);
}
.results-table tbody tr:nth-child(odd) td { background: #fff; }
.results-table tbody tr:nth-child(odd) td:first-child { background: #fff; }
.results-table tbody tr:nth-child(even) td { background: var(--gtg-row-alt); }
.results-table thead th:first-child { z-index: 2; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .results-hero { padding: 32px 16px; }
  .results-hero__mark { width: 52px; height: 52px; }
  .results-band__inner { padding: 36px 12px 48px; }
  .result-section__header { padding: 16px 14px 12px; }
  .results-table th, .results-table td { padding: 9px 8px; }
  .results-table tbody td:first-child { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .results-hero { display: none !important; }
  body { background: #fff; color: #000; }
}
