:root {
  --bg: #0f1220;
  --surface: #191d31;
  --surface-2: #222742;
  --text: #e8eaf6;
  --text-dim: #a9aed0;
  --accent: #8ab4ff;
  --accent-strong: #c3a6ff;
  --line: #303654;
  --focus: #ffd479;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: var(--accent);
}

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

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

.site-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
}

h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin: 0 0 0.5rem;
}

.lede {
  color: var(--text-dim);
  max-width: 46rem;
  margin: 0.25rem 0;
}

.scope-badge {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.launch-note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--text-dim);
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
}

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

fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 1rem;
  padding: 0.75rem 1rem 1rem;
}

legend {
  font-weight: 600;
  padding: 0 0.4rem;
}

label.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.25rem 1rem 0.25rem 0;
  cursor: pointer;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

button,
.btn {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  font: inherit;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
}

#filter-status {
  font-weight: 600;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  list-style: none;
  padding: 0;
}

.class-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  scroll-margin-top: 1rem;
}

.class-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.identity {
  color: var(--accent-strong);
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

.badge {
  font-size: 0.75rem;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
}

.badge.mixed {
  border-color: var(--focus);
  color: var(--focus);
}

.note {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0.4rem 0 0;
}

.card-links {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
}

h2 {
  margin-top: 3rem;
  font-size: 1.5rem;
}

.compare-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
}

.compare-controls .field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

select {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem;
  font: inherit;
  min-width: 12rem;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 1rem;
}

table.compare {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
}

table.compare caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: 0.5rem;
}

table.compare th,
table.compare td {
  border: 1px solid var(--line);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

table.compare thead th {
  background: var(--surface-2);
}

table.compare tbody th {
  background: var(--surface);
  width: 10rem;
  min-width: 9rem;
}

.hint {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.hint.warn {
  color: var(--focus);
}

.shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.sources details,
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0;
}

.sources summary,
.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.sources h3 {
  font-size: 1rem;
  margin: 1rem 0 0.25rem;
}

.source-item {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin: 0.4rem 0;
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--focus);
  color: #1a1a1a;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
  z-index: 10;
}

@media (max-width: 30rem) {
  .compare-controls {
    align-items: stretch;
  }

  select {
    width: 100%;
    min-width: 0;
  }
}
