/* Design tokens first; everything below uses them. Change the look here, not in components. */
:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1c1c1a;
  --muted: #6b6b66;
  --border: #deded8;
  --accent: #2f5bd3;
  --accent-text: #ffffff;
  --danger: #b3261e;
  --radius: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615;
    --surface: #1f1f1d;
    --text: #ececea;
    --muted: #a0a09a;
    --border: #34342f;
    --accent: #7c9cff;
    --accent-text: #0d0d0c;
    --danger: #ff8a80;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

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

h2 {
  font-size: 1rem;
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  color: var(--muted);
  font-size: 0.875rem;
}

input,
textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2);
}

.btn {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  background: var(--accent);
  color: var(--accent-text);
  align-self: flex-start;
}

.btn-quiet {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}

.list-item p {
  margin: var(--space-1) 0 0;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.empty {
  color: var(--muted);
  padding: var(--space-3) 0;
}

.muted {
  color: var(--muted);
}

.flash {
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
}
