/* =========================================================
   Postzilla — Base
   Reset + element-level defaults. No component classes here.
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light dark;
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;

  /* The page itself never scrolls sideways. Anything genuinely
     wider than the viewport gets its own scroll box (.pz-scroll-x
     below) rather than dragging the whole document with it.

     clip, not hidden, and the difference matters: overflow:hidden
     makes the element a scroll container, which silently kills
     position:sticky on every descendant. The header is sticky, so
     hidden would trade a horizontal-scroll bug for a worse one.
     clip suppresses the overflow without creating that container. */
  overflow-x: clip;
  max-width: 100%;
}

/* Media never exceeds its container. An oversized image is the
   other classic cause of a page that drags sideways. */
img,
svg,
video,
canvas,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

body {
  background: var(--pz-bg);
  /* A long unbroken string (a URL, a support address, a pasted
     token) is the most common cause of a page that scrolls
     sideways. Breaking it is always better than the alternative. */
  overflow-wrap: break-word;
  color: var(--pz-text);
  font-family: var(--pz-font-body);
  font-size: var(--pz-text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--pz-slow) var(--pz-ease), color var(--pz-slow) var(--pz-ease);
}

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

h1, h2, h3, h4 {
  font-family: var(--pz-font-display);
  line-height: 1.15;
  margin: 0 0 var(--pz-space-3);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--pz-text-3xl); }
h2 { font-size: var(--pz-text-2xl); }
h3 { font-size: var(--pz-text-xl); }

p {
  margin: 0 0 var(--pz-space-4);
  color: var(--pz-text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

/* Accessible focus ring everywhere, only on keyboard nav */
:focus-visible {
  outline: 2px solid var(--pz-accent-2);
  outline-offset: 2px;
  border-radius: var(--pz-radius-sm);
}

.pz-container {
  width: 100%;
  max-width: var(--pz-container);
  margin-inline: auto;
  padding-inline: var(--pz-space-4);
}

.pz-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Anyone with motion sensitivity set at the OS level gets every
   transition/animation added across this file and components.css
   collapsed to effectively instant, plus the smooth-scroll above
   turned back off. One rule covers all of it, present or future. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
