/* The page before any component: the box model, Arabic text with room
   between its lines, what focus looks like, and the helpers every view
   uses. Colours are the look's variables. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs);
  /* Cairo's dots and tails touch the next line at less than this. */
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

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

/* Keyboard focus is always drawn, the same everywhere. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Icons take the colour and size of the text they sit in. */
.i {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Phone numbers and amounts read left to right inside Arabic. */
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

/* For screen readers only. */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The first stop of the Tab key: past the menu, to the page. */
.skip {
  position: absolute;
  inset-inline-start: var(--s3);
  top: -4rem;
  z-index: 10;
  padding: var(--s2) var(--s4);
  border-radius: var(--r);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.skip:focus {
  top: var(--s3);
}

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