:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --border: #262626;
  --text: #e5e5e5;
  --text-muted: #a3a3a3;
  --text-dim: #737373;
  --accent: #f59e0b;
  --accent-dim: #92400e;
  --green: #10b981;
  --red: #ef4444;
  --yellow: #f59e0b;
  --blue: #3b82f6;
  --purple: #8b5cf6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.wide-container { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }

/* Nav */
nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
nav .container {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
nav .logo {
  font-family: 'Courier New', monospace;
  font-weight: bold;
  font-size: 1rem;
  color: var(--accent);
  white-space: nowrap;
}
nav .links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
nav .links a {
  color: var(--text-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
nav .links a:hover { color: var(--accent); text-decoration: none; }
nav .links a.active { color: var(--accent); }

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: 2.8rem;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero .subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 700px;
}
.hero .simile {
  font-style: italic;
  color: var(--accent);
  margin-top: 1rem;
  font-size: 1.1rem;
}

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}
.stat {
  text-align: center;
}
.stat .number {
  font-family: 'Courier New', monospace;
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--accent);
}
.stat .label {
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Section */
section { padding: 3rem 0; }
section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}
section h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--accent-dim); }
.card-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Model showcase cards (homepage) */
.model-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.model-card:hover { border-color: var(--accent-dim); }
.model-card .mc-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
  border-right: 1px solid var(--border);
}
.model-card .mc-score .mc-num {
  font-family: 'Courier New', monospace;
  font-size: 1.6rem;
  font-weight: bold;
  line-height: 1;
}
.model-card .mc-score .mc-of {
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}
.model-card .mc-score .mc-sd {
  font-family: 'Courier New', monospace;
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 0.1rem;
}
.model-card .mc-body {
  padding: 1rem 1.25rem;
  min-width: 0;
}
.model-card .mc-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.model-card .mc-name {
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.model-card .mc-meta {
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.model-card .mc-quote {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 500px) {
  .model-card { grid-template-columns: 60px 1fr; }
  .model-card .mc-score .mc-num { font-size: 1.3rem; }
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.card-title {
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
}
.card-meta {
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
}

/* Consistency indicator */
.consistency {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  margin-left: 0.25rem;
}
.consistency.consistent { color: var(--green); }
.consistency.mixed { color: var(--yellow); }

/* Stdev */
.stdev {
  color: var(--text-dim);
  font-size: 0.75em;
}

/* Category distribution mini bar */
.cat-dist-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.cat-dist-bar {
  height: 8px;
  border-radius: 4px;
  min-width: 4px;
}
.cat-dist-label {
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Score bars */
.score-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
}
.score-label {
  width: 80px;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.score-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.score-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.score-value {
  width: 55px;
  text-align: right;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Run breakdown table */
.run-table {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  margin-top: 1rem;
}
.run-table th {
  text-align: center;
  padding: 0.4rem 0.3rem;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.run-table td {
  padding: 0.35rem 0.3rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
  font-family: 'Courier New', monospace;
}
.run-table .cat-cell {
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
}
th {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  user-select: none;
}
th:hover { color: var(--accent); }
td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
}
tr:hover td { background: var(--bg-card-hover); }
.score-cell {
  font-family: 'Courier New', monospace;
  text-align: center;
}

/* Quote */
blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: var(--text-muted);
}

/* Article view */
.article-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  line-height: 1.8;
  max-height: 600px;
  overflow-y: auto;
}
.article-box::-webkit-scrollbar { width: 6px; }
.article-box::-webkit-scrollbar-track { background: var(--bg-card); }
.article-box::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Comparison */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 768px) {
  .comparison-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  nav .links { gap: 0.75rem; }
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-dim);
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
}

/* Score colour scale */
.score-1 { background: #ef4444; }
.score-2 { background: #f97316; }
.score-3 { background: #f59e0b; }
.score-4 { background: #84cc16; }
.score-5 { background: #10b981; }

.total-excellent { color: #10b981; }
.total-good { color: #84cc16; }
.total-okay { color: #f59e0b; }
.total-poor { color: #f97316; }
.total-bad { color: #ef4444; }

/* Variance indicator */
.variance-low { color: var(--green); }
.variance-mid { color: var(--yellow); }
.variance-high { color: var(--red); }

/* Methodology note */
.method-note {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}