:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #14181f;
  --muted: #5b6b7a;
  --border: #d8dee5;
  --accent: #0f766e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1419;
    --surface: #1c2530;
    --text: #f3f5f7;
    --muted: #99a6b3;
    --border: #2c3746;
    --accent: #14b8a6;
  }
}

* {
  box-sizing: border-box;
}

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

header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

header h1 {
  margin: 0;
  font-size: 1.25rem;
}

#status {
  color: var(--muted);
  margin: 0;
  flex: 1;
}

main {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
}

.chip-sev1 {
  background: #dc2626;
}

.chip-sev2 {
  background: #ea580c;
}

.chip-sev3 {
  background: #ca8a04;
}

.chip-sev4 {
  background: #2563eb;
}

.teach-form {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 12rem;
}

.teach-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  color: var(--muted);
}

.teach-form input {
  padding: 0.25rem;
}

.known-issue {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
}

.known-issue .pattern {
  font-weight: 600;
  margin: 0;
}

.known-issue .explanation {
  color: var(--muted);
  margin: 0.25rem 0;
}

button {
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}

dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

dialog form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

dialog input {
  padding: 0.4rem;
}
