:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1c2733;
  --muted: #5c6b7a;
  --border: #dde3ea;
  --accent: #425cc7;
  --accent-soft: #e8ecfa;
  --stable: #1a7f4b;
  --stable-bg: #e2f4ea;
  --dev: #8a6100;
  --dev-bg: #fdf1d4;
  --deprecated: #b3261e;
  --deprecated-bg: #fbe4e2;
}

* { box-sizing: border-box; }

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

header, main, footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

header { padding-top: 2rem; }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
.subtitle { color: var(--muted); margin: 0 0 1.25rem; font-size: .95rem; }
#meta { white-space: nowrap; }

.search-bar input {
  width: 100%;
  font-size: 1.15rem;
  padding: .75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  outline: none;
}
.search-bar input:focus { border-color: var(--accent); }

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: .75rem 0 1rem;
}
fieldset {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  padding: .35rem .75rem .55rem;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .9rem;
  margin: 0;
}
legend { font-size: .75rem; color: var(--muted); padding: 0 .3rem; }
fieldset label {
  font-size: .875rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  user-select: none;
}

.status { color: var(--muted); font-size: .875rem; margin-bottom: .75rem; }

.result {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .8rem 1rem;
  margin-bottom: .6rem;
}
.result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.result-name {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 1rem;
  font-weight: 600;
  word-break: break-all;
}
.result-name mark, .result-brief mark {
  background: #fff3a3;
  border-radius: 3px;
  padding: 0 1px;
}

.badge {
  font-size: .7rem;
  font-weight: 600;
  padding: .1rem .5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.badge.kind { background: var(--accent-soft); color: var(--accent); }
.badge.stable { background: var(--stable-bg); color: var(--stable); }
.badge.development { background: var(--dev-bg); color: var(--dev); }
.badge.deprecated { background: var(--deprecated-bg); color: var(--deprecated); }
.badge.type { background: #eef1f4; color: var(--muted); text-transform: none; }

.score {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .4rem;
  color: var(--muted);
  font-size: .75rem;
}
.score-track {
  width: 64px;
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.score-fill { height: 100%; background: var(--accent); border-radius: 999px; }

.result-brief { margin: .35rem 0 0; font-size: .9rem; color: var(--text); }
.deprecated-note {
  margin: .35rem 0 0;
  font-size: .85rem;
  color: var(--deprecated);
}
.deprecated-note code, .result-brief code {
  font-family: ui-monospace, Consolas, monospace;
  background: #eef1f4;
  border-radius: 4px;
  padding: 0 .25rem;
  font-size: .85em;
}

.result-extra {
  margin-top: .35rem;
  font-size: .8rem;
  color: var(--muted);
  overflow-x: auto;
  white-space: nowrap;
}
.result-extra code {
  font-family: ui-monospace, Consolas, monospace;
  background: #eef1f4;
  border-radius: 4px;
  padding: 0 .3rem;
  margin-right: .3rem;
}

.result-links {
  margin-top: .45rem;
  display: flex;
  gap: 1rem;
  font-size: .85rem;
}
.result-links a { color: var(--accent); text-decoration: none; }
.result-links a:hover { text-decoration: underline; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 2.5rem 0;
}

.about {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .9rem;
}
.about h2 { font-size: 1.05rem; color: var(--text); margin: 1.25rem 0 .35rem; }
.about h3 { font-size: .95rem; color: var(--text); margin: 1rem 0 .25rem; }
.about p { margin: .25rem 0 .5rem; }
.about a { color: var(--accent); }
.about code { background: #eef1f4; border-radius: 4px; padding: 0 .3rem; font-size: .85em; }

footer {
  padding: 1.5rem 1.25rem 2.5rem;
  color: var(--muted);
  font-size: .8rem;
}
footer code { background: #eef1f4; border-radius: 4px; padding: 0 .3rem; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --card: #1a2029;
    --text: #e4e9ef;
    --muted: #94a3b3;
    --border: #2b3441;
    --accent: #7d95f0;
    --accent-soft: #253052;
    --stable: #5ecf95;
    --stable-bg: #16321f;
    --dev: #e5c25b;
    --dev-bg: #35290a;
    --deprecated: #f28b82;
    --deprecated-bg: #3a1512;
  }
  .result-name mark, .result-brief mark { background: #6b5d00; color: inherit; }
  .badge.type, .result-extra code, .deprecated-note code,
  .result-brief code, footer code, .about code { background: #2b3441; }
}
