/* ===================================================================
   base.css — Reset, design tokens, typography baseline.
   No page-specific styles. No classes. No @import.
   =================================================================== */

/* --- Reset --- */

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

body {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5em;
}

p {
  margin-top: 0;
  margin-bottom: 1em;
}

button,
input {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Design tokens --- */

:root {
  --color-bg: #1a1a1a;
  --color-fg: #e8e8e8;
  --color-fg-muted: #999;
  --color-input-bg: #2c2d30;
  --color-input-border: #3a3b3e;
  --color-input-border-focus: #6b6c70;
  --color-input-placeholder: #7a7b7f;
  --color-btn-bg: #e8e8e8;
  --color-btn-fg: #1a1a1a;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 2rem;

  --font-stack: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-size-base: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-sm: 0.875rem;

  --line-height-base: 1.5;
  --line-height-tight: 1.2;
}

@media (prefers-color-scheme: light) {
  :root {
    --color-bg: #ffffff;
    --color-fg: #1a1a1a;
    --color-fg-muted: #666;
    --color-input-bg: #f0f0f0;
    --color-input-border: #ddd;
    --color-input-border-focus: #999;
    --color-input-placeholder: #888;
    --color-btn-bg: #1a1a1a;
    --color-btn-fg: #fff;
  }
}

/* --- Typography baseline --- */

body {
  font-family: var(--font-stack);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-fg);
  background-color: var(--color-bg);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
h5 { font-size: 0.875rem; }
h6 { font-size: 0.875rem; }

h1, h2, h3 {
  line-height: var(--line-height-tight);
}

h4, h5, h6 {
  line-height: var(--line-height-base);
}
