:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --text: #1c1c1e;
  --muted: #6b6b70;
  --border: #e2e2de;
  --accent: #e8a200;
  --accent-text: #1c1c1e;
  --unmapped: #c9c9c4;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214;
    --surface: #1c1c1f;
    --text: #ececee;
    --muted: #9a9aa0;
    --border: #2c2c30;
    --accent: #f5b82e;
    --accent-text: #121214;
    --unmapped: #4a4a50;
  }
}

* { box-sizing: border-box; }

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

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

h1 {
  margin: 0;
  font-size: 1.75rem;
}

.subtitle {
  margin: 4px 0 20px;
  color: var(--muted);
}

#search {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
}

#search:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.breaker-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.breaker {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.breaker-number {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.breaker-items {
  margin: 0;
  padding: 0;
  list-style: none;
  align-self: center;
}

.breaker-items li + li {
  margin-top: 2px;
}

.breaker.unmapped .breaker-number {
  background: var(--unmapped);
  color: var(--text);
}

.breaker.unmapped .breaker-items {
  color: var(--muted);
  font-style: italic;
}

.empty {
  color: var(--muted);
  text-align: center;
  margin-top: 24px;
}
