/* PolicyBench landing - academic-paper aesthetic, low-chrome.
   System fonts, monospace for code, one accent colour. */

:root {
  --text: #1a1a1a;
  --muted: #555;
  --soft: #777;
  --rule: #d8d8d8;
  --bg: #fdfdfc;
  --bg-soft: #f4f3f0;
  --accent: #2956b2;
  --accent-bg: #eaf0fb;
  --strong: #0f1f3d;
  --max-width: 56rem;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
header .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-top: 1rem;
  padding-bottom: 1rem;
  gap: 1rem;
}
.brand {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--strong);
  text-decoration: none;
  letter-spacing: -0.01em;
}
header nav {
  display: flex;
  gap: 1.4rem;
  font-size: 0.95rem;
  margin-left: auto;
}
header nav a {
  color: var(--muted);
  text-decoration: none;
}
header nav a:hover, header nav a.active {
  color: var(--accent);
}

/* Main */
main {
  padding: 2.5rem 1.5rem 4rem;
}

main section + section {
  margin-top: 3rem;
}

h1 {
  font-size: 1.9rem;
  margin: 0 0 0.6rem;
  letter-spacing: -0.015em;
  color: var(--strong);
}
h2 {
  font-size: 1.3rem;
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
  color: var(--strong);
}
h3 {
  font-size: 1.05rem;
  margin: 1.4rem 0 0.4rem;
  color: var(--strong);
}

p { margin: 0 0 0.9rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--strong); }

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--bg-soft);
  padding: 0.05em 0.35em;
  border-radius: 3px;
}
pre {
  background: var(--bg-soft);
  border-radius: 4px;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.45;
}
pre code { background: transparent; padding: 0; }

/* Hero */
.hero {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
}
.hero .lede {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 44rem;
}
.headline-note {
  margin-top: 1.2rem;
  padding: 0.85rem 1.05rem;
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  font-size: 0.95rem;
}
.headline-note strong { color: var(--strong); }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 0.6rem 0 1rem;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--rule);
}
thead th {
  border-bottom: 2px solid var(--text);
  font-weight: 600;
  color: var(--strong);
  background: transparent;
}
tbody tr:hover { background: var(--bg-soft); }

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.strong, th.strong { font-weight: 600; color: var(--strong); }

/* Leaderboard column treatment */
table.leaderboard td:nth-child(n+2),
table.leaderboard th:nth-child(n+2) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
table.leaderboard td:nth-child(3) {
  font-weight: 600;
  color: var(--strong);
}

/* Corpus table */
table.corpus { font-size: 0.9rem; }
table.corpus td.slug { white-space: nowrap; color: var(--muted); }
table.corpus td.nl { line-height: 1.45; }
table.corpus td { vertical-align: top; }

/* Vertical column headers for the per-model glyph columns */
table.corpus th.vert {
  width: 2.2rem;
  height: 8rem;
  padding: 0.4rem 0.2rem;
  white-space: nowrap;
  text-align: center;
  vertical-align: bottom;
  border-bottom: 2px solid var(--text);
}
table.corpus th.vert > span {
  display: inline-block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--strong);
}
table.corpus td.glyph {
  text-align: center;
  font-size: 1rem;
  width: 2.2rem;
  padding: 0.5rem 0;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

/* Glyph colours - same palette anywhere on the site */
.glyph-pass    { color: #1a7f37; }   /* green */
.glyph-partial { color: #b88200; }   /* amber */
.glyph-fail    { color: #b32418; }   /* red */
.glyph-none    { color: var(--soft); }

/* Reports - markdown rendered into a .report container */
.report h1 { font-size: 1.7rem; margin-top: 0; }
.report h2 { margin-top: 2rem; padding-top: 0.6rem; border-top: 1px solid var(--rule); }
.report table th, .report table td { font-size: 0.92rem; }
.report strong { color: var(--strong); }
.report blockquote {
  border-left: 3px solid var(--rule);
  margin: 0.6rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  color: var(--muted);
}

/* Breadcrumb / nav */
.breadcrumb {
  font-size: 0.9rem;
  color: var(--soft);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--soft); }
.breadcrumb a:hover { color: var(--accent); }

/* Per-model metadata pills - split key/value capsules under the page header */
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.5rem;
}
.meta-pill {
  display: inline-flex;
  align-items: stretch;
  border-radius: 4px;
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.6;
  border: 1px solid var(--rule);
}
.meta-pill .k {
  background: #2c2c54;
  color: #fff;
  padding: 0.15rem 0.6rem;
  font-weight: 600;
}
.meta-pill .v {
  background: #f4f3f0;
  color: var(--strong);
  padding: 0.15rem 0.6rem;
  font-variant-numeric: tabular-nums;
}

/* Tier tag pill */
.tier-tag {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  margin-left: 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
}
.tier-tag.tier-tool         { background: #2c5282; }
.tier-tag.tier-frontier-llm { background: #3a4858; }
.tier-tag.tier-cost-tier-llm{ background: #6b8a3f; }

/* Source links / other-models / badge / tool-homepage */
.source-links, .other-models, .badge-block, .tool-homepage {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
}
.source-links h2, .other-models h2, .badge-block h2 { font-size: 1rem; }
.badge-block h3 { font-size: 0.85rem; margin-top: 1.1rem; color: var(--soft); }
.badge-preview {
  margin: 0.6rem 0 1rem;
}
.badge-preview img {
  display: inline-block;
}
.source-links ul, .other-models ul.model-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.source-links li, .other-models li { margin-bottom: 0.35rem; }

.meta { color: var(--muted); font-size: 0.9rem; }

/* Footer */
footer {
  border-top: 1px solid var(--rule);
  padding: 1.6rem 0;
  font-size: 0.88rem;
  color: var(--muted);
  background: var(--bg);
}
footer p { margin: 0; }

/* Mobile */
@media (max-width: 36rem) {
  header .container {
    flex-direction: column;
    align-items: flex-start;
  }
  header nav { gap: 1rem; }
  h1 { font-size: 1.55rem; }
  table.corpus { font-size: 0.82rem; }
  table.corpus td, table.corpus th { padding: 0.4rem 0.4rem; }
}
