/* ═══════════════════════════════════════════
   BASE — reset, font, element defaults
   ═══════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  background: var(--page-bg, var(--bg));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition:
    background var(--dur-med) var(--ease-smooth),
    color      var(--dur-med) var(--ease-smooth);
}

/* Page frame. Its side insets follow the shared rails in site-rails.css. */
.pl-frame {
  background: var(--page-bg, transparent);
  min-height: 100vh;
  min-height: 100svh;
}
.pl-frame__inner {
  border-left:  1px solid var(--grid-line);
  border-right: 1px solid var(--grid-line);
  background: var(--bg);
  /* Horizontal overflow visible so row divider lines can extend past
     the frame's side borders into the outer page-padding area. */
  overflow: visible;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-smooth);
}

a:hover { color: var(--accent); }

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

ul, ol { list-style: none; }

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* ─────────────────────────────────────────
   ACCESSIBILITY
   ───────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--focus-ring, #1B1B1B);
  outline-offset: 2px;
}

::selection {
  background: var(--color-orange-300);
  color: var(--brand-on-orange);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
