/* BouftyBot V2 — base: reset, typography, focus, accessibility helpers. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-height) + var(--space-6)); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 500 1rem/1.55 var(--font-body);
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 750; letter-spacing: -.015em; color: var(--text); }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p, ul, ol, dl, figure { margin: 0; }
ul[class], ol[class], nav ul, .menu ul, .mobile-nav ul { padding: 0; list-style: none; }

a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-hover); }
code, kbd, pre { font-family: var(--font-mono); font-size: .875em; }
code { padding: .1em .35em; border-radius: 6px; background: var(--surface-sunken); }
kbd { display: inline-block; padding: .05em .45em; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-raised); color: var(--text-muted); font-size: .75rem; line-height: 1.5; white-space: nowrap; }

/* Focus is always visible (WCAG 2.4.7 / 2.4.11). */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: fixed; left: var(--space-4); top: var(--space-3); z-index: 2000;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.muted { color: var(--text-muted); }
.small { font-size: .875rem; }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.lead { font-size: 1.125rem; color: var(--text-muted); }

.icon {
  display: inline-block; flex: 0 0 auto; width: 20px; height: 20px;
  background-color: currentColor;
  mask-repeat: no-repeat; mask-position: center; mask-size: contain;
  -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain;
  vertical-align: middle;
}
.icon-sm { width: 16px; height: 16px; }
.icon-nav { width: 18px; height: 18px; }
.icon-lg { width: 28px; height: 28px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .icon { forced-color-adjust: auto; background-color: CanvasText; }
  .status::before { forced-color-adjust: none; }
}
