/* =====================================================================
   DCD 2026 — Modern reset
   Mobile-first. Box-sizing border-box. Smooth scroll. Image rules.
   ===================================================================== */

/* ── Horizontal-scroll prevention (client.md Section 2.1 baseline) ──
   Vertical scroll only. Nothing is allowed to push the document wider
   than the viewport. Loaded FIRST so every later rule inherits this. */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  width: 100%;
}

main, [role="main"] {
  max-width: 100%;
  overflow-x: clip;       /* preferred: clips without forcing overflow-y: auto */
  overflow-x: hidden;     /* fallback for older browsers */
}

table {
  max-width: 100%;
  overflow-x: auto;
  display: block;
}

pre, code {
  max-width: 100%;
  overflow-x: auto;
  word-wrap: break-word;
  white-space: pre-wrap;
}

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

* {
  margin: 0;
  padding: 0;
  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  font-size: 100%;
  scroll-padding-top: var(--header-height);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  line-height: var(--lh-default);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

img, picture, video, canvas, svg, iframe, embed, object {
  display: block;
  max-width: 100%;
  height: auto;
}

img { font-style: italic; background-repeat: no-repeat; background-size: cover; }

input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
}

button { cursor: pointer; background: transparent; border: 0; }

a {
  color: var(--color-link);
  text-decoration-skip-ink: auto;
  text-underline-offset: 0.2em;
}

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

ol, ul { list-style: none; }
ol[class], ul[class] { padding: 0; }

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

table { border-collapse: collapse; border-spacing: 0; }

::selection {
  background: var(--color-gold-soft);
  color: var(--color-ink);
}

/* Focus visible — global, gold, accessible */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

/* WP-required */
.alignleft   { float: left;  margin-right: var(--space-4); }
.alignright  { float: right; margin-left:  var(--space-4); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide,
.alignfull   { width: 100%; }
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); -webkit-clip-path: inset(50%); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: var(--color-cream); border-radius: var(--radius); clip: auto !important; -webkit-clip-path: none; clip-path: none;
  color: var(--color-ink); display: block; font-weight: 600; height: auto; left: var(--space-2); padding: var(--space-3) var(--space-4);
  position: absolute; top: var(--space-2); text-decoration: none; width: auto; z-index: var(--z-toast);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: var(--z-toast);
  background: var(--color-gold); color: var(--color-ink); font-weight: 600;
  padding: var(--space-3) var(--space-4); text-decoration: none;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }
