*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.6 var(--font-ui); color: var(--color-ink); background: var(--color-paper);
}
main { flex: 1; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--color-accent-strong); text-underline-offset: 0.18em; }
a:hover { color: var(--color-accent); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--space-3); letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 var(--space-4); }
code, kbd { font-family: var(--font-mono); font-size: 0.9em; }
kbd { border: 1px solid var(--color-line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 0.35em; background: var(--color-surface); }
hr { border: 0; border-top: 1px solid var(--color-line); margin: var(--space-6) 0; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--color-ink-faint); }
.small { font-size: 0.875rem; }
.nowrap { white-space: nowrap; }
.text-quran { font-family: var(--font-quran); font-size: 1.5em; line-height: 2.1; }
[dir="rtl"] .flip-in-rtl { transform: scaleX(-1); }
