/* Resets, base elements, and layout helpers */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--color-ivory); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { max-width: 100%; display: block; }

/* Focus state — Design.md §10 (accessibility) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Layout helpers */
.container { width: min(var(--max-w), 92vw); margin: 0 auto; }
.container-tight { width: min(var(--reading-w), 90vw); margin: 0 auto; }

/* Dividers — Design.md §5.7 */
.hairline { height: 1px; background: var(--border-soft); border: 0; margin: 0; }
.vline { width: 1px; background: var(--border-soft); align-self: stretch; }
.divider { height: 1px; background: var(--accent); border: 0; opacity: 0.4; }
