/* Reset + typography. Values come from tokens.css only. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
  height: 100%;
  overflow: hidden; /* screens own their scrolling, not the page */
  background: var(--ground);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

img, svg { display: block; max-width: 100%; }

/* Arabic — Tajawal with line-height ~10% above the Latin value at the
   same size (Latin body rhythm is 1.5); no Arabic UI copy exists in the
   reshell today, but the rule must be ready for it */
[lang="ar"], [lang^="ar-"] {
  font-family: 'Tajawal', sans-serif;
  line-height: 1.65;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
}

input, textarea, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* type scale utilities */
.t-display { font-size: var(--t-display); line-height: var(--lh-display); font-weight: 800; letter-spacing: -0.01em; }
.t-title   { font-size: var(--t-title);   line-height: var(--lh-title);   font-weight: 800; letter-spacing: -0.01em; }
.t-heading { font-size: var(--t-heading); line-height: var(--lh-heading); font-weight: 700; }
.t-body    { font-size: var(--t-body);    line-height: var(--lh-body);    font-weight: 500; }
.t-sub     { font-size: var(--t-sub);     line-height: var(--lh-sub);     font-weight: 500; color: var(--muted); }
.t-caption { font-size: var(--t-caption); line-height: var(--lh-caption); font-weight: 600; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none; animation: none; }
}

/* QA (Phase 4): the universal kill-switch above loses the cascade to any rule
   that sets its own transition/animation (* has zero specificity), so every
   animated selector is mirrored in the block at the end of screens.css — the
   last stylesheet — at equal specificity. The JS guards in learner.js/daee.js
   additionally skip celebration overlays entirely. */
