/* ─── DESIGN TOKENS ─────────────────────────────────── */
:root {
  /* Palette — canonical CC visual language (Quadrant-aligned) */
  --paper:            #f4eedb;
  --paper-deep:       #ece4cc;
  --ink:              #1a1612;
  --ink-soft:         #4d423a;
  --ink-muted:        #847565;
  --rule:             #d8cea9;
  --terracotta:       #ad4f52;   /* retained name for legacy refs; value = Quadrant alarm-pink */
  --terracotta-faint: rgba(173, 79, 82, 0.08);

  /* Legacy aliases (used by blog.css — do not remove) */
  --background:    var(--paper);
  --foreground:    var(--ink);
  --card:          #ffffff;
  --card-hover:    #f2ede0;
  --muted:         #cec8bc;
  --muted-fg:      var(--ink-muted);
  --accent:        var(--terracotta);
  --accent-bright: #9c4f30;
  --accent-faint:  var(--terracotta-faint);
  --border:        var(--rule);

  /* Typography — JetBrains Mono everywhere */
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
  --font-display: var(--font-mono);
  --font-body:    var(--font-mono);
  --font-ui:      var(--font-mono);

  /* Legacy font aliases (used by blog.css — do not remove) */
  --font-sans: var(--font-mono);
}

/* ─── RESET ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 18px;
  overflow-x: hidden;
  max-width: 100vw;
  scroll-behavior: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) var(--paper);
}

body {
  font-family: var(--font-mono);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

a { color: var(--terracotta); text-decoration: none; }
a:hover { color: var(--accent-bright); }

::selection {
  background: var(--terracotta);
  color: var(--paper);
}

/* Webkit scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-muted); }

h1 { margin: 0; padding: 0; line-height: 1; }

/* ─── FOCUS STATES ─────────────────────────────────── */
*:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

/* ─── REDUCED MOTION ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── UTILITIES ─────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
