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

/* Remove default margins we never want */
html, body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }

/* Root */
html {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-fg);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { min-height: 100dvh; }

/* Lists */
ul, ol { padding: 0; margin: 0; list-style: none; }

/* Media */
img, svg, video, canvas { display: block; max-width: 100%; }

/* Buttons — kill browser defaults */
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
button:disabled { cursor: not-allowed; }

/* Inputs */
input, textarea, select {
  font: inherit;
  color: inherit;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-color: var(--color-accent);
}

/* Links */
a {
  color: var(--color-accent);
  text-decoration-color: rgba(139, 90, 60, 0.4);
  text-underline-offset: 3px;
}
a:hover { color: var(--color-accent-hover); }

/* Focus rings — visible for keyboard, suppressed for mouse */
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
