:root {
  --accent-dim: rgba(0, 255, 157, 0.35);
}

.loading-line {
  padding: 0 0 1rem;
  max-width: 1100px;
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.meta-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.meta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.meta-card h2 {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.meta-card p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

.grid-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 900px) {
  .grid-main {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}

.panel h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.chart-wrap {
  position: relative;
  height: 360px;
  margin-bottom: 1rem;
}

.model-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
}

.model-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text);
}

.model-toggles input {
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
}

.tradeoff-callout {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin-bottom: 1rem;
}

.tradeoff-callout strong { color: var(--text); }

.metrics-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

table.metrics {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.metrics th,
.metrics td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.metrics th {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface2);
}

.metrics tr:last-child td { border-bottom: none; }

.metrics td.num {
  font-variant-numeric: tabular-nums;
  font-family: 'DM Mono', monospace;
}

.metrics tr.dimmed {
  opacity: 0.35;
}

.model-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.model-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.model-card:hover { border-color: var(--accent-dim); }

.model-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.model-card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
}

.model-card ul.pick { margin-bottom: 0.75rem; }
.model-card ul.avoid li::marker { color: #f87171; }
.model-card ul.pick li::marker { color: var(--accent); }

.model-card .sub {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.limitations {
  background: rgba(25, 32, 48, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.limitations h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.limitations ul {
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.limitations li { margin-bottom: 0.4rem; }

footer.page-foot a {
  color: var(--accent);
  text-decoration: none;
}

footer.page-foot a:hover { text-decoration: underline; }

#glossary details {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

#glossary summary {
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

#glossary dl {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}

#glossary dt {
  color: var(--text);
  font-weight: 500;
  margin-top: 0.5rem;
}

#glossary dd { margin-left: 0; line-height: 1.5; }

#loadErr {
  background: rgba(127, 29, 29, 0.25);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fecaca;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

#loadErr code { font-size: 0.85em; }

#app[hidden] { display: none !important; }

.selected-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  nav {
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
  }
  .nav-links {
    gap: 1rem;
  }
  main {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}
