:root {
  --bg-canvas: #f1ece0;
  --bg-sidebar: #e3dbc6;
  --surface-card: #f8f5ec;
  --ink: #2b2721;
  --ink-muted: #6b6354;
  --line: #d8cdb3;
  --accent: #3c4a27;
  --accent-hover: #4b5c33;
  --accent-contrast: #f7f3e7;
  --tag-notes: #57663d;
  --tag-video: #2f5e68;
  --tag-task: #9c4e2a;
  --tag-doc: #8c6a28;
  --danger: #b3261e;
  --danger-soft: rgba(179, 38, 30, 0.08);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  background: var(--bg-canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  padding: var(--space-3) var(--space-5);
  background: var(--accent);
  color: var(--accent-contrast);
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: transparent;
  border: none;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.btn-ghost:hover {
  color: var(--ink);
}

.plus-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1;
}

/* ---------- Form fields ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 13.5px;
  color: var(--ink-muted);
}

.field input,
.field select,
.field textarea {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-canvas);
  color: var(--ink);
  font-size: 14px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
