*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; overflow-x: hidden; background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button { color: inherit; }
img, svg { display: block; max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-8) 0; }
::selection { background: var(--accent-soft); color: var(--text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: var(--space-6); font-size: clamp(1.7rem, 5vw, 2rem); line-height: 1.18; letter-spacing: -.025em; }
h2 { margin-bottom: var(--space-4); font-size: 1.18rem; line-height: 1.3; letter-spacing: -.01em; }
h3 { margin-bottom: var(--space-3); font-size: 1rem; line-height: 1.35; }
p { margin-bottom: var(--space-4); }
.muted { color: var(--text-secondary); }
.subtle { color: var(--text-muted); }
.small { font-size: .875rem; }
.tiny { font-size: .8125rem; }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.sr-only { 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; }

.initial-loader { display: flex; align-items: center; gap: 12px; min-height: 40vh; color: var(--text-secondary); }
.spinner { width: 20px; height: 20px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
h1, h2, h3, p, li, td { overflow-wrap: anywhere; }
