/* OL-UI-000061 — reset, typography, accessibility foundation */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  min-width: 0;
  background: var(--c-bg);
}
body {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--sp-3);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--c-text);
  overflow-wrap: anywhere;
}
h1 { font-size: clamp(1.75rem, 5vw, var(--fs-3xl)); }
h2 { font-size: clamp(1.45rem, 4vw, var(--fs-2xl)); }
h3 { font-size: clamp(1.2rem, 3vw, var(--fs-xl)); }
p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }
p, li, dd, dt, label, small, span, a { overflow-wrap: anywhere; }
a {
  color: var(--c-link);
  text-decoration-color: color-mix(in srgb, var(--c-link) 35%, transparent);
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--c-accent-text); }
code, kbd, pre, .mono { font-family: var(--font-mono); font-size: .9em; }
img, video, canvas, svg { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--c-border); margin: var(--sp-6) 0; }
button, input, select, textarea { font: inherit; }
:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}
::selection { background: var(--c-accent-soft); color: var(--c-text); }

/* Stable helpers shared by every shell. */
.ol-no-overflow { min-width: 0; max-width: 100%; }
.ol-break-anywhere { overflow-wrap: anywhere; word-break: break-word; }
.ol-scroll-region {
  max-width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea,
  .input,
  .select,
  .textarea { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* OL-UI-000090 — accessible visually-hidden alias.
   Some established templates use .sr-only; keep it semantically hidden rather than
   allowing screen-reader labels/output textareas to leak into the visual layout. */
.sr-only,
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* OL-UI-000122 — final overflow/accessibility guards (1.0.21). */
:where(.row, .grid, .admin-bar, .public-header-inner, .card-head, .ol-card__head, .ol-field-actions) > * {
  min-width: 0;
}
pre,
code,
kbd,
samp {
  max-width: 100%;
}
pre {
  overflow: auto;
  overscroll-behavior: contain;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
iframe,
object,
embed {
  max-width: 100%;
}
button,
.btn,
input,
select,
textarea {
  max-width: 100%;
}
[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important; /* Accessibility override: user-requested reduced motion. */
    animation-duration: .001ms !important; /* Accessibility override: suppress authored motion. */
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
