*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  /* التركيز والتمرير لا يختفيان تحت الشريط السفلي اللاصق (زرّان ≈150px) ولا شريط التبويب (64px). */
  scroll-padding-block-start: 16px;
  scroll-padding-block-end: 190px;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.75rem; line-height: 1.35; font-weight: 700; }
h2 { font-size: 1.125rem; line-height: 1.45; font-weight: 700; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
bdi { unicode-bidi: isolate; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1:focus, h1:focus-visible { outline: none; }
[hidden] { display: none !important; }

.app {
  max-width: var(--shell);
  min-height: 100dvh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  background: var(--white);
}
.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.screen { flex: 1; display: flex; flex-direction: column; padding: var(--s-4); gap: var(--s-4); min-width: 0; }
.screen.with-tabs { padding-block-end: calc(var(--tab-h) + var(--s-5)); }
.screen.with-footer { padding-block-end: 140px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
