/* PersonalAgentEval
   Visual language follows matraix.ai: near-black base, Inter with light
   headings, one steel-blue accent, amber for small tags, thin blue-tinted lines. */

:root {
  color-scheme: dark;

  --bg: #0a0a0a;
  --bg-2: #1a1a1a;
  --bg-3: #262626;
  --ink: #f5f5f5;
  --ink-dim: #b0b0b0;
  --phos: #4a8fc2;
  --phos-deep: #365b8f;
  --amber: #d97706;
  --line: rgba(74, 143, 194, 0.2);
  --line-soft: rgba(74, 143, 194, 0.1);

  --disp: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(20px, 5vw, 64px);
  --pad: clamp(18px, 3vw, 28px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(70rem 34rem at 78% -10rem, rgba(54, 91, 143, 0.2), transparent 70%) no-repeat,
    var(--bg);
  color: var(--ink);
  font-family: var(--disp);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, ul, dl, dd, blockquote { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--phos);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: calc(77rem + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -999rem;
  top: 0.5rem;
  z-index: 30;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--bg);
}
.skip:focus { left: var(--gutter); }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
}

.brand {
  flex: none;
  color: var(--ink);
  font-family: "Orbitron", "Space Grotesk", var(--disp);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.brand em {
  font-style: normal;
  background: linear-gradient(90deg, #a855f7, #4a8fc2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 1.8vw, 26px);
}
.nav-links a {
  position: relative;
  color: var(--ink);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.25s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--phos);
  transition: width 0.25s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--phos); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }

.nav-out {
  flex: none;
  color: var(--ink-dim);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-out:hover { color: var(--phos); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(56px, 9vw, 116px) clamp(40px, 6vw, 72px); }

.hero h1 {
  max-width: 24ch;
  font-size: clamp(2.1rem, 4.6vw, 3.25rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lede {
  max-width: 44rem;
  margin-top: 22px;
  color: var(--ink-dim);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.hero-domain { padding-bottom: clamp(8px, 2vw, 20px); }
.hero-domain h1 { font-size: clamp(2.6rem, 6vw, 4rem); }

.bench {
  margin-bottom: 14px;
  color: var(--phos);
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.facts {
  margin-top: 18px;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.repo {
  display: inline-block;
  margin-top: 18px;
  color: var(--phos);
  text-decoration: none;
}
.repo:hover { text-decoration: underline; }

/* ---------- Domain picker and stage ---------- */

.picker {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.picker-tabs {
  display: grid;
  gap: 10px;
}

.ptab {
  appearance: none;
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid transparent;
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--ink-dim);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.ptab:hover {
  border-color: var(--line);
  border-left-color: transparent;
  color: var(--ink);
}
.ptab[aria-selected="true"] {
  border-color: var(--line);
  border-left-color: var(--phos);
  background: var(--bg-3);
  color: var(--ink);
}
.ptab-name {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
}
.ptab-bench {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.ptab[aria-selected="true"] .ptab-bench { color: var(--phos); }

.stage {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background:
    radial-gradient(120% 140% at 50% 0, rgba(80, 137, 184, 0.07), transparent 60%),
    var(--bg-2);
}
.stage-home { min-height: 22rem; }

.stage-main { padding: clamp(22px, 3.5vw, 44px); }

.request {
  max-width: 24ch;
  font-size: clamp(1.6rem, 3.1vw, 2.5rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px clamp(24px, 4vw, 56px);
  margin-top: clamp(28px, 4vw, 44px);
}

.person {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.who {
  color: var(--ink-dim);
  font-size: 0.93rem;
  line-height: 1.55;
}
.who strong {
  color: var(--ink);
  font-weight: 600;
}

.right {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.45;
}
.right svg {
  width: 1.1em;
  height: 1.1em;
  margin-top: 0.18em;
  color: var(--phos);
}

.stage-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 18px clamp(22px, 3.5vw, 44px);
  border-top: 1px solid var(--line-soft);
}

.note {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid rgba(93, 166, 214, 0.62);
  border-radius: 10px;
  background: linear-gradient(135deg, #1f5580 0%, #2c6f9d 58%, #3379a8 100%);
  box-shadow: 0 10px 28px rgba(8, 38, 61, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.13);
  color: #f7fbff;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.btn:hover {
  border-color: rgba(142, 208, 250, 0.75);
  box-shadow: 0 12px 30px rgba(32, 95, 143, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.btn .arr { transition: transform 0.25s; }
.btn:hover .arr { transform: translateX(5px); }

/* ---------- Home index ---------- */

.index { padding-block: clamp(64px, 9vw, 110px) clamp(24px, 4vw, 40px); }

h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.index-list {
  margin-top: 22px;
  padding: 0;
  border-bottom: 1px solid var(--line-soft);
  list-style: none;
}

.index-list a {
  display: grid;
  grid-template-columns: 9rem 13rem minmax(0, 1fr) auto;
  gap: 4px 24px;
  align-items: baseline;
  padding: 18px 14px;
  border-top: 1px solid var(--line-soft);
  text-decoration: none;
  transition: background 0.2s;
}
.index-list a:hover { background: var(--bg-2); }
.index-list a:hover .index-name { color: var(--phos); }

.index-name {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.index-bench {
  color: var(--phos);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.index-summary {
  color: var(--ink-dim);
  font-size: 0.95rem;
}
.index-status {
  color: var(--ink-dim);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* ---------- Domain page sections ---------- */

.section { padding-top: clamp(40px, 6vw, 72px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 18px;
}
.updated {
  color: var(--ink-dim);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--bg-2);
}

.empty {
  padding: 34px var(--pad);
  color: var(--ink-dim);
}

.sample-note {
  padding: 12px var(--pad);
  border-bottom: 1px solid var(--line-soft);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.table-scroll { overflow-x: auto; }

.board-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.board-table th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.board-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.board-table tbody tr:last-child td { border-bottom: 0; }

.board-table th:first-child,
.board-table td:first-child { padding-left: var(--pad); }
.board-table th:last-child,
.board-table td:last-child { padding-right: var(--pad); }

.board-table .num { text-align: right; }

.board-table td.rank {
  width: 4.5rem;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.agent-name {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
a.agent-name:hover { color: var(--phos); }
.agent-meta {
  display: block;
  color: var(--ink-dim);
  font-size: 0.85rem;
}

.sort {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.sort::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.5em;
  border-inline: 0.3em solid transparent;
  border-top: 0.4em solid transparent;
  vertical-align: 0.05em;
}
.sort:hover { color: var(--ink); }
[aria-sort] .sort { color: var(--phos); }
[aria-sort="descending"] .sort::after { border-top-color: currentColor; }
[aria-sort="ascending"] .sort::after {
  border-top: 0;
  border-bottom: 0.4em solid currentColor;
}

.primary-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}
.primary-value {
  flex: none;
  min-width: 3.6rem;
  font-weight: 600;
  text-align: right;
}
.bar {
  flex: 1 1 auto;
  min-width: 5rem;
  max-width: 15rem;
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--bg-3);
}
.bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--phos-deep), var(--phos));
}

.metric-notes {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 20px;
  padding: 18px var(--pad);
  border-top: 1px solid var(--line-soft);
  color: var(--ink-dim);
  font-size: 0.85rem;
}
.metric-notes dt {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Footer ---------- */

.foot {
  margin-top: clamp(56px, 8vw, 96px);
  padding: 26px var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 0.84rem;
}
.foot a {
  color: var(--ink-dim);
  transition: color 0.2s;
}
.foot a:hover { color: var(--phos); }

.lost .lede a { color: var(--phos); }

/* ---------- Small screens ---------- */

@media (max-width: 60rem) {
  .picker { grid-template-columns: minmax(0, 1fr); }
  .picker-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .ptab {
    padding: 10px 14px;
    border-left-width: 1px;
    border-left-color: var(--line-soft);
  }
  .ptab:hover { border-left-color: var(--line); }
  .ptab[aria-selected="true"] { border-color: var(--phos); }
  .ptab-bench { display: none; }

  .index-list a {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 0;
  }
  .index-status {
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 47.5rem) {
  .nav { flex-wrap: wrap; }
  .nav-links {
    order: 3;
    width: 100%;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 6px;
  }
}

@media (max-width: 40rem) {
  .picker-tabs { gap: 6px; }
  .ptab {
    flex: 1 1 auto;
    padding: 9px 6px;
    text-align: center;
  }
  .ptab-name { font-size: 0.92rem; }
  .people { grid-template-columns: minmax(0, 1fr); }
  .bar { display: none; }
  .board-table { min-width: 34rem; }
  .metric-notes { grid-template-columns: minmax(0, 1fr); }
  .metric-notes dd { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
