/* Base: elements, prose, the two scripts. Logical properties only, so Arabic mirrors from this
   sheet; the build refuses left, right, translateX and unequal 3 or 4 value shorthands. */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--plate); color: var(--ink); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.menu-open { overflow: hidden; }
body {
  margin: 0; background: var(--plate); color: var(--ink);
  font-family: var(--f-text); font-size: var(--fs-body); line-height: var(--lh-body);
  font-optical-sizing: auto; font-kerning: normal; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
svg { height: auto; }
/* links: ink, and a heavier underline on hover. Fire is not a link colour. */
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
/* the focus ring: 2 px of ink, set off the element by 3 px of ground (BRAND.md) */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--slip); }
p { margin-block: 0 0.85em; }
/* no one word last lines in running text */
p, li, dd, figcaption, .head__lede, .hero__lede { text-wrap: pretty; }
b, strong { font-weight: 600; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
sup { font-family: var(--f-mono); font-size: 0.6em; color: var(--ink-2); line-height: 0; }
code, kbd, samp { font-family: var(--f-mono); font-size: 0.8em; }
hr { border: 0; border-block-start: var(--rule-1); margin-block: var(--s-6); margin-inline: 0; }
button { font: inherit; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; animation: none !important; scroll-behavior: auto !important; } }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: var(--s-4); inset-block-start: -60px; background: var(--ink); color: var(--slip); padding-block: var(--s-2); padding-inline: var(--s-4); z-index: 50; text-decoration: none; }
.skip:focus { inset-block-start: var(--s-2); }
.measure { max-width: 60ch; }

/* the small voices */
/* labels: the wide Archivo kicker voice, small. Mono is kept for hashes, references and record names. */
.label {
  font-family: var(--f-wide); font-stretch: var(--w-label); font-size: var(--fs-label); line-height: 1.45; letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 600;
}
.ref { font-family: var(--f-mono); font-size: var(--fs-label); line-height: 1.45; letter-spacing: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* a descriptive caption: plain words in the serif, not capitals */
.cap { font-family: var(--f-text); font-size: var(--fs-s); line-height: 1.4; color: var(--ink-2); text-wrap: pretty; }
:lang(ar) .cap { font-family: var(--f-ar-text); font-size: var(--fs-ar-fine); }
.kicker {
  font-family: var(--f-wide); font-stretch: var(--wide); font-weight: 650; font-size: var(--fs-kicker);
  letter-spacing: var(--track-kicker); text-transform: uppercase; line-height: 1.3;
}
.mono { font-family: var(--f-mono); }
/* a hash prints in groups of eight; a line breaks only between groups */
.hash { font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: 0; direction: ltr; unicode-bidi: isolate; text-align: start; }
.hash .g, code .g { display: inline-block; white-space: nowrap; }

/* the page code: the one solid punch (H, U1, CP). Section numerals are struck in outline, smaller. */
.pcode, .sref {
  display: inline-grid; place-items: center; justify-self: start; align-self: start;
  font-family: var(--f-mono); font-weight: 700; letter-spacing: var(--track-label); font-variant-numeric: tabular-nums; line-height: 1;
}
.pcode { background: var(--ink); color: var(--plate); clip-path: var(--punch); }
.pcode { font-size: var(--fs-s); min-width: 3.1em; padding-block: 7px 6px; padding-inline: 9px; }
.sref { font-family: var(--f-wide); font-stretch: var(--w-label); font-size: var(--fs-xs); min-width: 2.4em; padding-block: 3px 2px; padding-inline: 5px; color: var(--ink); border: 1px solid var(--ink); letter-spacing: 0; }
.touch .sref { color: var(--on-stone); border-color: var(--on-stone-2); }

/* prose */
.prose { max-width: none; }
.prose > :first-child { margin-block-start: 0; }
.prose > p, .prose > ul, .prose > ol:not(.steps), .prose > blockquote, .prose > h3, .prose > h4, .prose > pre, .prose > .etym, .prose li { max-width: var(--measure); }
.prose h3 { font-family: var(--f-text); font-weight: 600; font-size: var(--fs-h3); line-height: 1.25; margin-block: 1.6em 0.5em; }
.prose h4 { font-family: var(--f-wide); font-stretch: var(--w-label); font-weight: 650; font-size: var(--fs-m); margin-block: 1.4em 0.4em; }
.prose ul, .prose ol { margin-block: 0 1em; padding-inline-start: 1.3em; }
.prose li { margin-block-end: 0.4em; }
.prose li::marker { color: var(--ink-2); }
.prose ul > li::marker { content: "\25aa\00a0\00a0"; font-size: 0.8em; }
.prose ol > li::marker { font-family: var(--f-mono); font-size: 0.72em; }
.prose blockquote { margin-block: 1.2em; margin-inline: 0; padding-inline-start: var(--s-5); border-inline-start: var(--rule-2); font-style: italic; }
.prose pre { background: var(--slip); border: var(--rule-s); padding: var(--s-4); overflow-x: auto; font-size: var(--fs-s); line-height: 1.6; direction: ltr; text-align: start; }
.prose pre code { font-size: inherit; }
.prose :not(pre) > code { background: rgba(238, 236, 230, 0.7); padding-block: 0.08em; padding-inline: 0.3em; border: var(--rule-s); overflow-wrap: anywhere; }
.prose a { overflow-wrap: anywhere; }
.prose a.ext { unicode-bidi: isolate; }
[dir="rtl"] .prose a.ext::after { content: "\2196"; }
.prose a.ext::after { content: "\2197"; font-family: var(--f-mono); font-size: 0.65em; margin-inline-start: 0.15em; vertical-align: 0.4em; text-decoration: none; display: inline-block; }
.prose .dead { text-decoration: underline dotted var(--ink-2); text-underline-offset: 0.2em; }
.prose hr { margin-block: var(--s-6); border-block-start: var(--rule-s); }
/* a run of links is set as a short ruled list, one link to a row, in two columns where there is room */
.prose ul.links { list-style: none; padding: 0; margin-block: var(--s-4) var(--s-5); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--col-gap); border-block-start: var(--rule-1); max-width: var(--measure); }
.prose ul.links li { margin: 0; border-block-end: var(--rule-s); font-family: var(--f-text); font-weight: 600; font-size: var(--fs-l); }
.prose ul.links li::marker { content: none; }
.prose ul.links a { display: flex; align-items: center; min-height: 44px; padding-block: 8px; text-decoration: none; }
.prose ul.links a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
@media (max-width: 720px) { .prose ul.links { grid-template-columns: minmax(0, 1fr); } }

/* Arabic: the same sheet, other faces */
body:lang(ar), [lang="ar"] { font-family: var(--f-ar-text); }
body:lang(ar) { font-size: var(--fs-ar-body); line-height: 1.7; }
:lang(ar) .offer__terms b, :lang(ar) .unit-price dd, :lang(ar) .units-list .price-s { font-family: var(--f-ar-display); }
/* an Arabic price reads right to left, the number then its counted noun, the noun in the Arabic face untracked */
:lang(ar) .offer__price .num, :lang(ar) .offer__fullnum, :lang(ar) .unit-price__num, :lang(ar) .aoffer__price .num { direction: rtl; }
:lang(ar) .offer__price .num small, :lang(ar) .offer__fullnum small, :lang(ar) .unit-price__num small, :lang(ar) .aoffer__price .num small { font-family: var(--f-ar-display); letter-spacing: 0; }
:lang(ar) .nav__meta { direction: rtl; }
/* a Latin path, address or code inside an Arabic line keeps its own order */
:lang(ar) code { direction: ltr; unicode-bidi: isolate; }
:lang(ar) .label, :lang(ar) .ref { font-family: var(--f-ar-display); letter-spacing: 0; text-transform: none; font-size: var(--fs-s); }
:lang(ar) .kicker { font-family: var(--f-ar-display); letter-spacing: 0; font-weight: 700; font-size: var(--fs-m); }
:lang(ar) .prose h3 { font-family: var(--f-ar-display); font-weight: 700; font-size: var(--fs-ar-fine); line-height: 1.6; }
:lang(ar) .prose ul.links li { font-family: var(--f-ar-display); font-stretch: normal; font-weight: 600; font-size: var(--fs-l); }
:lang(ar) .prose ul > li::marker { content: "\25aa\00a0\00a0"; }
[lang="en"] { font-family: var(--f-text); unicode-bidi: isolate; }
:is(span, bdi, i, b, em, strong, code, abbr, cite, q, small)[lang="en"] { direction: ltr; }
.ltr { direction: ltr; unicode-bidi: isolate; }
