:root {
  color-scheme: light dark;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1f2419;
  --muted: #5b6358;
  --accent: #2f6b3c;
  --accent-hover: #24522e;
  --border: #dcd6c8;
}

* {
  box-sizing: border-box;
}

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

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

h1 {
  margin: 0 0 0.25rem;
  font-size: 2rem;
}

.subtitle {
  margin: 0 0 2rem;
  color: var(--muted);
}

.controls {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 180px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

select {
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
}

button#go-button {
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

button#go-button:hover:not(:disabled) {
  background: var(--accent-hover);
}

button#go-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  margin-top: 1rem;
  min-height: 1.2rem;
  color: var(--muted);
}

.status.error {
  color: #b3261e;
}

.results {
  margin-top: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.results h2 {
  margin-top: 0;
}

.category-list {
  margin: 0;
  display: grid;
  gap: 1rem;
}

.category dt {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.category dd {
  margin: 0;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14170f;
    --surface: #1c2118;
    --text: #ecefe5;
    --muted: #9aa392;
    --accent: #6fbf7a;
    --accent-hover: #85cf8f;
    --border: #333a2b;
  }
}
