/* OAIT Design System 2.1.0 · reference/css/base.css
   The foundation layer. Load it right after tokens/oait.css and before every component file.

   Implements
   - Theme color scheme: :root follows the system, data-theme / class light and dark force it (D-COL-14, D-ARC-07).
   - Light reset and the document type base of canonical §3.9 (D-TYP-05, D-TYP-07, D-TYP-17, D-TYP-19); a product name in
     <bdi translate="no"> never breaks between its words (canonical §1.2, D-BCP-03).
   - The one focus ring and its documentation twin [data-demo-focus], the inset ring for containers that clip, and the
     surface halo over photos, video, and multi-stop art (D-SEM-11, D-ARC-06, D-BCP-26, D-CAI-20, D-COL-20, canonical §6.3).
   - Motion: [data-motion="paused"] for the Pause control, and the reduced-motion switch of canonical §7.7 (D-SEM-17, D-SEM-21).
   - Forced colors: transparent 1px borders are drawn by the browser; the ring turns Highlight (D-SEM-10, D-CAI-20, D-BCP-25).
   - Icons: Material Symbols Rounded box, sizes, FILL, and the RTL mirror (D-BCP-31, D-BCP-32, D-BCP-33, D-ARC-22, D-LAY-13).
   - Skip link and its target (D-CAI-08, D-CSN-49, D-ARC-20, D-ARC-26, C-2) and visually hidden text.
   - Safe-area and keyboard insets: --oa-safe-top, --oa-safe-bottom, --oa-safe-left, --oa-safe-right,
     the direction-following --oa-safe-start and --oa-safe-end, and --oa-keyboard-inset, read by every
     rule that pads an inset (D-LAY-17, D-APP-35, D-APP-36, D-APP-58, canonical §4.10).
   - Type-style utilities for the 28 styles, the app page title, supporting text, the eyebrow, and long-form prose (D-TYP-08
     to D-TYP-14, D-BCP-17, D-ARC-20, D-ARC-21, D-ARC-27, D-ARC-34, canonical §3.5).
   - Layout primitives: containers with their gutters inside, measure, stacks (the form's field stack among them), cluster,
     card and tile grids, lists that are layout primitives, the marketing split, the page frame with its section rhythm,
     and the full-bleed band (D-LAY-03 to D-LAY-08, D-LAY-10, D-LAY-11, D-LAY-17, D-ARC-24, D-ARC-25, C-5).

   Tokens read: --color-surface, --color-on-surface, --color-on-surface-variant, --color-primary, --color-primary-ink,
   --color-primary-container, --color-on-primary-container, --color-focus-ring, --color-surface-container-low; --font-sans,
   --font-mono, --font-weight-semibold; --text-<style> with --line-height, --letter-spacing, and --font-weight for all
   28 styles; --size-focus-ring, --size-focus-offset, --size-focus-inset, --size-icon-xs … --size-icon-4xl,
   --size-touch-target, --size-eyebrow-rule-inline, --size-eyebrow-rule-block; --space-* (--space-fields, --space-section
   and --space-section-expanded among them); --container-page, -wide, -reading, -form, -measure; --radius-full,
   --radius-8px; --z-skip-link. Context property read: --oa-link (CONTRIBUTING.md, reference CSS rules).

   Classes: .oa-focus-inset · .oa-focus-halo · .oa-icon (--xs --sm --md --lg --xl --2xl --3xl --4xl --filled --mirror) ·
   .oa-visually-hidden · .oa-honeypot · .oa-skip-link · .oa-num · .oa-mono · .oa-supporting · .oa-text-<style> (28) · .oa-page-title ·
   .oa-eyebrow (--rule) · .oa-prose · .oa-container (--wide --reading --form) · .oa-measure ·
   .oa-stack (--tight --loose --group --fields) · .oa-cluster · .oa-grid (--tiles) · .oa-split · .oa-page · .oa-band.
   Lists: :where(ul, ol).oa-grid, :where(ul, ol).oa-stack, :where(ul, ol).oa-cluster (no indent, no bullets).
   Custom properties defined here: --oa-safe-top, --oa-safe-bottom, --oa-safe-left, --oa-safe-right,
   --oa-safe-start, --oa-safe-end, --oa-keyboard-inset (section 1b).
   Attributes: [data-demo-focus] (documentation only) · [data-motion="paused"] · main[tabindex="-1"] (the skip
   link's target) · bdi[translate="no"] (kept on one line).

   Breakpoints are literal rem values (CSS cannot read a custom property inside @media):
   sm 40rem (640px), md 48rem (768px), lg 64rem (1024px). */


/* ---------------------------------------------------------------------------------------------
   1. Color scheme. The one place a theme selector appears, and only for color-scheme: native
   controls, scrollbars, and form pop-ups follow the active theme. The colors themselves switch in
   tokens/oait.css, which declares the same color-scheme values beside them; base.css carries the
   switch as well (canonical §0.5), so the two always agree (D-COL-14, D-ARC-07).
   --------------------------------------------------------------------------------------------- */

:root {
  color-scheme: light dark; /* follows the system setting */
}

/* Scrollbars (canonical §4.10, D-LAY-20). One look and one place on every product: the thumb is
   outline on a clear track, so it reads on every surface in both themes (3.65:1 or more); the page
   scrollbar keeps its gutter at the inline end of the window whether or not the page scrolls, so
   nothing shifts between pages; scroll regions inside the page (menus, sheets, tables) draw the
   thin form. The shape, the arrows, and overlay behavior stay the platform's. */
:root {
  scrollbar-color: var(--color-outline) transparent;
  scrollbar-gutter: stable;
}

:where(:not(html)) {
  scrollbar-width: thin;
}

:root[data-theme="light"],
:root[class~="light"] {
  color-scheme: light;
}

:root[data-theme="dark"],
:root[class~="dark"] {
  color-scheme: dark;
}


/* ---------------------------------------------------------------------------------------------
   1b. Safe-area and keyboard insets (D-LAY-17, D-APP-35, D-APP-58, canonical §4.10). Every rule of
   the reference CSS that pads or offsets by an inset reads these properties, never env() itself, so
   a hybrid shell can supply the values where its web view does not (Android System WebView before
   140 reports wrong env() insets; Capacitor 8 injects correct ones as --safe-area-inset-*). The
   physical four come from env(); --oa-safe-start and --oa-safe-end follow the dir attribute of the
   nearest element that has one, so logical padding pads the right side: left in left-to-right,
   right in right-to-left. A shell overrides the physical four, on :root or in a style attribute on
   <html>, and start and end follow. The arithmetic stays "own padding plus inset", so a bar keeps
   its padding above the home indicator. --oa-keyboard-inset is the height an on-screen keyboard
   covers at the bottom of the layout viewport: 0 unless a product's script sets it from
   visualViewport (iOS, WKWebView, Capacitor with resize mode none); sheets lift by it (D-APP-36,
   D-APP-59). The rules have zero specificity, so any later rule wins.
   --------------------------------------------------------------------------------------------- */

:where(:root) {
  --oa-safe-top: env(safe-area-inset-top, 0px);
  --oa-safe-bottom: env(safe-area-inset-bottom, 0px);
  --oa-safe-left: env(safe-area-inset-left, 0px);
  --oa-safe-right: env(safe-area-inset-right, 0px);
  --oa-keyboard-inset: 0px;
}

:where(:root, [dir="ltr"]) {
  --oa-safe-start: var(--oa-safe-left);
  --oa-safe-end: var(--oa-safe-right);
}

:where([dir="rtl"]) {
  --oa-safe-start: var(--oa-safe-right);
  --oa-safe-end: var(--oa-safe-left);
}


/* ---------------------------------------------------------------------------------------------
   2. Light reset. Box sizing, margins, media defaults, form controls that inherit the type, and
   bare headings that carry no size until a type style is applied (as Tailwind's preflight does).
   The margin and heading resets have zero specificity (:where), so the prose rules of section 13,
   which have zero specificity too, still space and size the elements inside .oa-prose.
   --------------------------------------------------------------------------------------------- */

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

:where(body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, pre, hr,
dl, dd, ul, ol, menu) {
  margin: 0;
}

:where(h1, h2, h3, h4, h5, h6) {
  font-size: inherit;
  font-weight: inherit;
}

/* A product name never breaks between its words inside a wrapping label (canonical §1.2). */
:where(bdi[translate="no"]) {
  white-space: nowrap;
}

/* Emphasis is 600; there are no italics (D-TYP-07). */
b,
strong {
  font-weight: var(--font-weight-semibold);
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  vertical-align: middle;
}

img,
video {
  max-inline-size: 100%;
  block-size: auto;
}

fieldset {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
}

/* canonical §3.9: controls take the page type, never the browser's 13.33px system font. */
button, input, select, textarea {
  font: inherit;
  letter-spacing: inherit;
}

/* Placeholders stay at the full strength of the color the field gives them (D-COL-11). */
::placeholder {
  opacity: 1;
}

/* A hidden element stays hidden whatever display a class gives it. */
[hidden]:where(:not([hidden="until-found"])) {
  display: none !important; /* lint-ok: the hidden attribute must beat display set by component classes */
}


/* ---------------------------------------------------------------------------------------------
   3. Document type base (canonical §3.9, D-TYP-05, D-TYP-19). One literal stack for English,
   Arabic, and French; no optimizeLegibility; no synthesized italics.
   --------------------------------------------------------------------------------------------- */

html {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-style: none;
  font-optical-sizing: auto;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent; /* the state layer is the tap feedback, on every element alike */
}

body {
  background-color: var(--color-surface);
  color: var(--color-on-surface);
  font-size: var(--text-body-lg);
  line-height: var(--text-body-lg--line-height);
  letter-spacing: var(--text-body-lg--letter-spacing);
  font-weight: var(--text-body-lg--font-weight);
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
}

/* Headings draw in the heading family: Inter for Latin letters and digits, Noto Kufi Arabic for
   Arabic through the same stack, so nothing switches by language (canonical §3.2, D-TYP-20). Zero
   specificity: a class on the heading still wins (a code style, the lock-up). */
:where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--font-heading);
}

h1, h2, h3 {
  text-wrap: balance;
}

p, li, dd {
  text-wrap: pretty;
}


/* ---------------------------------------------------------------------------------------------
   4. Focus. One ring for every focusable element: 3px solid --color-focus-ring, 2px outside the
   edge, following the border radius (D-SEM-11, D-ARC-06, D-BCP-26, D-CAI-20). Width, offset, and
   color are set at rest and repeated on focus, so only outline-style changes and no transition can
   animate the ring. Containers re-point --color-focus-ring (inverse-primary on inverse surfaces,
   on-primary for focusable content inside an orange fill, on-card-art on card art, and
   on-passport-jobs on the gold Jobs passport; D-COL-20, V-4). A filled button, a FAB, or any other
   orange-filled control keeps the default ring, which lies outside its fill on the page.
   .oa-focus-inset moves the ring 4px inside the edge, for containers that clip (tabs, segmented
   buttons, list rows, table cells, accordion rows); a component may set that offset itself, and no
   other. .oa-focus-halo fills the 2px gap between the edge and the ring with the surface color, for
   a control over photos, video, or multi-stop art that has no context color (canonical §6.3).
   [data-demo-focus] draws the same ring on a documentation example; never ship it in a product.
   The skip link's target, <main id="main" tabindex="-1">, takes focus by script and is not a
   control, so it draws no ring around the whole page (D-CAI-08, D-CSN-49); the first control
   after it shows the ring as usual. Controls never lose the ring.
   --------------------------------------------------------------------------------------------- */

:where(*) {
  outline-width: var(--size-focus-ring);
  outline-offset: var(--size-focus-offset);
  outline-color: var(--color-focus-ring);
}

:focus-visible,
[data-demo-focus] {
  outline: var(--size-focus-ring) solid var(--color-focus-ring);
  outline-offset: var(--size-focus-offset);
}

.oa-focus-inset:focus-visible,
.oa-focus-inset[data-demo-focus] {
  outline-offset: var(--size-focus-inset);
}

.oa-focus-halo:focus-visible,
.oa-focus-halo[data-demo-focus] {
  box-shadow: 0 0 0 2px var(--color-surface);
}

main[tabindex="-1"]:focus {
  outline-style: none;
}


/* ---------------------------------------------------------------------------------------------
   5. Selection: the family's selected fill (primary-container) and its text color (D-COL-04, D-CAI-14).
   --------------------------------------------------------------------------------------------- */

::selection {
  background-color: var(--color-primary-container);
  color: var(--color-on-primary-container);
}


/* ---------------------------------------------------------------------------------------------
   6. Motion. The Pause control sets data-motion="paused" on its region (the kitchen sink sets it
   on <html>); every animation inside stops where it is (D-SEM-17). Under reduced motion every
   animation and transition is off, in the base layer so that it wins over later layers and style
   attributes; the pseudo-elements older engines do not know sit in rules of their own (D-SEM-21,
   canonical §7.7). Never wait for transitionend or animationend.
   --------------------------------------------------------------------------------------------- */

[data-motion="paused"] *,
[data-motion="paused"] ::before,
[data-motion="paused"] ::after {
  animation-play-state: paused !important; /* lint-ok: the Pause control must beat every component animation (D-SEM-17) */
}

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

@layer base {
  @media (prefers-reduced-motion: reduce) {
    ::backdrop {
      animation: none !important;
      transition: none !important;
    }
  }
}

@layer base {
  @media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
      animation: none !important;
    }
  }
}


/* ---------------------------------------------------------------------------------------------
   7. Forced colors (Windows contrast themes). Every control and floating surface carries a 1px
   border, transparent unless shown; the browser draws it in a system color, and box-shadows
   disappear, so edges come from borders (D-SEM-10). The ring stays an outline and takes the
   system highlight color (D-CAI-20, D-BCP-25).
   --------------------------------------------------------------------------------------------- */

@media (forced-colors: active) {
  :focus-visible,
  [data-demo-focus] {
    outline-color: Highlight;
  }
}


/* ---------------------------------------------------------------------------------------------
   8. Icons: Material Symbols Rounded, one set (D-BCP-31). Products self-host the variable font
   instanced at wght 400, opsz 24, GRAD 0 with the FILL axis kept, subset to their glyphs, with
   font-display: block (D-BCP-32):
     @font-face { font-family: "Material Symbols Rounded"; font-style: normal; font-weight: 400;
                  font-display: block; src: url("/fonts/material-symbols-rounded-subset.woff2") format("woff2"); }
   Markup: <span class="oa-icon" aria-hidden="true" translate="no">arrow_forward</span>.
   The box clips the ligature name, so no word ever flashes while the font loads. It is one line
   high and wide (1lh at line-height 1, which is 1em until text is scaled): when a phone, a web
   view, or WCAG 1.4.12 text spacing scales text, the glyph grows and the box grows with it, so no
   icon is cut. 1em stays as the fallback for engines without lh.
   FILL 1 (--filled) only for the selected or current item, status icons, and icons in filled
   tonal tiles. Sizes are the icon tokens; 24px is the default (D-BCP-33, D-ARC-22, D-LAY-13).
   Directional glyphs of the registry (canonical §8.3) take --mirror and flip in right-to-left text;
   an icon inside a left-to-right island keeps its direction.
   --------------------------------------------------------------------------------------------- */

.oa-icon {
  display: inline-block;
  flex-shrink: 0;
  inline-size: 1em;
  inline-size: 1lh;
  block-size: 1em;
  block-size: 1lh;
  overflow: hidden;
  font-family: "Material Symbols Rounded";
  font-size: var(--size-icon-lg);
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  font-feature-settings: "liga";
  font-variation-settings: "FILL" 0;
  -webkit-font-smoothing: antialiased;
}

.oa-icon--xs { font-size: var(--size-icon-xs); }   /* 16px: field errors and helpers, dense meta */
.oa-icon--sm { font-size: var(--size-icon-sm); }   /* 18px: chips and 40px buttons */
.oa-icon--md { font-size: var(--size-icon-md); }   /* 20px: 48 and 56px buttons, menus, field adornments, beside 16px text */
.oa-icon--lg { font-size: var(--size-icon-lg); }   /* 24px, the default: icon buttons, navigation, app bars, lists */
.oa-icon--xl { font-size: var(--size-icon-xl); }   /* 28px: 56px tiles and step discs */
.oa-icon--2xl { font-size: var(--size-icon-2xl); } /* 32px: the empty-state disc */
.oa-icon--3xl { font-size: var(--size-icon-3xl); } /* 40px: the problem-state disc, station and stage controls */
.oa-icon--4xl { font-size: var(--size-icon-4xl); } /* 64px: full-page states */

.oa-icon--filled {
  font-variation-settings: "FILL" 1;
}

[dir="rtl"] .oa-icon--mirror {
  transform: scaleX(-1);
}

/* Each icon then follows its own direction where the browser knows it (:dir): a left-to-right island
   inside an Arabic page keeps its arrows, and right-to-left text inside such an island, or set by
   dir="auto" on user content, turns them. Browsers without :dir() keep the rule above. */
.oa-icon--mirror:dir(ltr) {
  transform: none;
}

.oa-icon--mirror:dir(rtl) {
  transform: scaleX(-1);
}


/* ---------------------------------------------------------------------------------------------
   9. Accessibility helpers.
   .oa-visually-hidden keeps text for screen readers only ("(opens in a new tab)", a figure's
   sentence). .oa-skip-link is the first focusable element of every page: "Skip to content" /
   "الانتقال إلى المحتوى" / "Aller au contenu", pointing to <main id="main" tabindex="-1">. It waits
   above the window and comes down when focused: fixed top-3 start-4 z-80 plus the top and start
   safe-area insets, a 48px on-surface pill
   with label-lg text in surface (D-CAI-08, D-CSN-49, D-ARC-20, D-ARC-26, C-2). The 1px transparent
   border is the forced-colors edge; the padding gives it back, so the pill keeps the recipe's outer box.
   --------------------------------------------------------------------------------------------- */

.oa-visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.oa-skip-link {
  position: fixed;
  inset-block-start: calc(var(--space-3) + var(--oa-safe-top));
  inset-inline-start: calc(var(--space-4) + var(--oa-safe-start));
  z-index: var(--z-skip-link);
  display: inline-flex;
  align-items: center;
  min-block-size: var(--size-touch-target);
  padding-block: calc(var(--space-3) - 1px);
  padding-inline: calc(var(--space-5) - 1px);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  background-color: var(--color-on-surface);
  color: var(--color-surface);
  font-size: var(--text-label-lg);
  line-height: var(--text-label-lg--line-height);
  letter-spacing: var(--text-label-lg--letter-spacing);
  font-weight: var(--text-label-lg--font-weight);
  text-decoration: none;
  transform: translateY(calc(-100% - var(--space-6) - var(--oa-safe-top))); /* parked above the window and its top inset until focused */
}

.oa-skip-link:focus {
  transform: none;
}

/* The honeypot field of a sign-in or contact form (patterns/authentication.md): compose it with
   .oa-visually-hidden on the field's wrapper, <div class="oa-visually-hidden oa-honeypot"
   aria-hidden="true">, with a label "Leave this empty" and an input with tabindex="-1" and
   autocomplete="off". It drops the field's browser border and fill, which the 1px clip would
   otherwise leave as stray paint; no person sees it or tabs to it (canonical §13). */
.oa-honeypot :where(input, textarea) {
  border: 0;
  background: none;
}

/* Documentation only: shows the focused skip link in place, inside the page flow. */
.oa-skip-link[data-demo-focus] {
  position: static;
  transform: none;
}


/* ---------------------------------------------------------------------------------------------
   10. Text utilities. .oa-num: tabular figures for columns, live values, and comparisons
   (D-TYP-12). .oa-mono: the mono family for IDs and codes outside a code style (D-TYP-13); inside
   Arabic text wrap the value in <bdi dir="ltr" translate="no">, which also keeps it on one line
   (section 2). .oa-supporting: secondary text in on-surface-variant, always at full strength:
   helper lines, meta, and the line under a title (canonical §2.4, D-COL-11).
   --------------------------------------------------------------------------------------------- */

.oa-num {
  font-variant-numeric: tabular-nums;
}

.oa-mono {
  font-family: var(--font-mono);
}

.oa-supporting {
  color: var(--color-on-surface-variant);
}


/* ---------------------------------------------------------------------------------------------
   11. Type styles. One class per style of tokens.md, setting size, line height, tracking, and
   weight together, like Tailwind's text-<style> (D-TYP-08, D-TYP-09, D-ARC-20, D-ARC-27).
   Arabic line heights and tracking switch by themselves through the :lang(ar) block of oait.css
   (D-TYP-14, D-ARC-29). Code styles also set the mono family (text-code-* with font-mono);
   numerals also set tabular figures (text-numeral-* with tabular-nums); the eyebrow style is
   uppercased by CSS on sentence-case source (D-TYP-11). The classes do not switch by themselves:
   below 640px a display or headline-lg text takes its compact size, which is the size of another
   style (display-lg 36/44 = display-sm, display-md 32/40 = headline-lg, display-sm and headline-lg
   28/36 = headline-md), so write that class there. .oa-page-title is the app page title of
   canonical §3.5: headline-sm, then display-sm from 768px. The lock-up styles are for the lock-up
   only (D-BCP-09).
   --------------------------------------------------------------------------------------------- */

.oa-text-hero-lg {
  font-size: var(--text-hero-lg);
  line-height: var(--text-hero-lg--line-height);
  letter-spacing: var(--text-hero-lg--letter-spacing);
  font-weight: var(--text-hero-lg--font-weight);
}

.oa-text-hero-md {
  font-size: var(--text-hero-md);
  line-height: var(--text-hero-md--line-height);
  letter-spacing: var(--text-hero-md--letter-spacing);
  font-weight: var(--text-hero-md--font-weight);
}

.oa-text-lead {
  font-size: var(--text-lead);
  line-height: var(--text-lead--line-height);
  letter-spacing: var(--text-lead--letter-spacing);
  font-weight: var(--text-lead--font-weight);
}

.oa-text-display-lg {
  font-size: var(--text-display-lg);
  line-height: var(--text-display-lg--line-height);
  letter-spacing: var(--text-display-lg--letter-spacing);
  font-weight: var(--text-display-lg--font-weight);
}

.oa-text-display-md {
  font-size: var(--text-display-md);
  line-height: var(--text-display-md--line-height);
  letter-spacing: var(--text-display-md--letter-spacing);
  font-weight: var(--text-display-md--font-weight);
}

.oa-text-display-sm {
  font-size: var(--text-display-sm);
  line-height: var(--text-display-sm--line-height);
  letter-spacing: var(--text-display-sm--letter-spacing);
  font-weight: var(--text-display-sm--font-weight);
}

.oa-text-headline-lg {
  font-size: var(--text-headline-lg);
  line-height: var(--text-headline-lg--line-height);
  letter-spacing: var(--text-headline-lg--letter-spacing);
  font-weight: var(--text-headline-lg--font-weight);
}

.oa-text-headline-md {
  font-size: var(--text-headline-md);
  line-height: var(--text-headline-md--line-height);
  letter-spacing: var(--text-headline-md--letter-spacing);
  font-weight: var(--text-headline-md--font-weight);
}

.oa-text-headline-sm {
  font-size: var(--text-headline-sm);
  line-height: var(--text-headline-sm--line-height);
  letter-spacing: var(--text-headline-sm--letter-spacing);
  font-weight: var(--text-headline-sm--font-weight);
}

.oa-text-title-lg {
  font-size: var(--text-title-lg);
  line-height: var(--text-title-lg--line-height);
  letter-spacing: var(--text-title-lg--letter-spacing);
  font-weight: var(--text-title-lg--font-weight);
}

.oa-text-title-md {
  font-size: var(--text-title-md);
  line-height: var(--text-title-md--line-height);
  letter-spacing: var(--text-title-md--letter-spacing);
  font-weight: var(--text-title-md--font-weight);
}

.oa-text-title-sm {
  font-size: var(--text-title-sm);
  line-height: var(--text-title-sm--line-height);
  letter-spacing: var(--text-title-sm--letter-spacing);
  font-weight: var(--text-title-sm--font-weight);
}

.oa-text-body-lg {
  font-size: var(--text-body-lg);
  line-height: var(--text-body-lg--line-height);
  letter-spacing: var(--text-body-lg--letter-spacing);
  font-weight: var(--text-body-lg--font-weight);
}

.oa-text-body-md {
  font-size: var(--text-body-md);
  line-height: var(--text-body-md--line-height);
  letter-spacing: var(--text-body-md--letter-spacing);
  font-weight: var(--text-body-md--font-weight);
}

.oa-text-body-sm {
  font-size: var(--text-body-sm);
  line-height: var(--text-body-sm--line-height);
  letter-spacing: var(--text-body-sm--letter-spacing);
  font-weight: var(--text-body-sm--font-weight);
}

.oa-text-label-lg {
  font-size: var(--text-label-lg);
  line-height: var(--text-label-lg--line-height);
  letter-spacing: var(--text-label-lg--letter-spacing);
  font-weight: var(--text-label-lg--font-weight);
}

.oa-text-label-md {
  font-size: var(--text-label-md);
  line-height: var(--text-label-md--line-height);
  letter-spacing: var(--text-label-md--letter-spacing);
  font-weight: var(--text-label-md--font-weight);
}

.oa-text-label-sm {
  font-size: var(--text-label-sm);
  line-height: var(--text-label-sm--line-height);
  letter-spacing: var(--text-label-sm--letter-spacing);
  font-weight: var(--text-label-sm--font-weight);
}

.oa-text-eyebrow {
  font-size: var(--text-eyebrow);
  line-height: var(--text-eyebrow--line-height);
  letter-spacing: var(--text-eyebrow--letter-spacing);
  font-weight: var(--text-eyebrow--font-weight);
  text-transform: uppercase;
}

.oa-text-numeral-lg {
  font-size: var(--text-numeral-lg);
  line-height: var(--text-numeral-lg--line-height);
  letter-spacing: var(--text-numeral-lg--letter-spacing);
  font-weight: var(--text-numeral-lg--font-weight);
  font-variant-numeric: tabular-nums;
}

.oa-text-numeral-md {
  font-size: var(--text-numeral-md);
  line-height: var(--text-numeral-md--line-height);
  letter-spacing: var(--text-numeral-md--letter-spacing);
  font-weight: var(--text-numeral-md--font-weight);
  font-variant-numeric: tabular-nums;
}

.oa-text-code-lg {
  font-size: var(--text-code-lg);
  line-height: var(--text-code-lg--line-height);
  letter-spacing: var(--text-code-lg--letter-spacing);
  font-weight: var(--text-code-lg--font-weight);
  font-family: var(--font-mono);
}

.oa-text-code-md {
  font-size: var(--text-code-md);
  line-height: var(--text-code-md--line-height);
  letter-spacing: var(--text-code-md--letter-spacing);
  font-weight: var(--text-code-md--font-weight);
  font-family: var(--font-mono);
}

.oa-text-code-sm {
  font-size: var(--text-code-sm);
  line-height: var(--text-code-sm--line-height);
  letter-spacing: var(--text-code-sm--letter-spacing);
  font-weight: var(--text-code-sm--font-weight);
  font-family: var(--font-mono);
}

.oa-text-code-xs {
  font-size: var(--text-code-xs);
  line-height: var(--text-code-xs--line-height);
  letter-spacing: var(--text-code-xs--letter-spacing);
  font-weight: var(--text-code-xs--font-weight);
  font-family: var(--font-mono);
}

.oa-text-lockup-name {
  font-size: var(--text-lockup-name);
  line-height: var(--text-lockup-name--line-height);
  letter-spacing: var(--text-lockup-name--letter-spacing);
  font-weight: var(--text-lockup-name--font-weight);
}

.oa-text-lockup-name-compact {
  font-size: var(--text-lockup-name-compact);
  line-height: var(--text-lockup-name-compact--line-height);
  letter-spacing: var(--text-lockup-name-compact--letter-spacing);
  font-weight: var(--text-lockup-name-compact--font-weight);
}

.oa-text-lockup-name-stage {
  font-size: var(--text-lockup-name-stage);
  line-height: var(--text-lockup-name-stage--line-height);
  letter-spacing: var(--text-lockup-name-stage--letter-spacing);
  font-weight: var(--text-lockup-name-stage--font-weight);
}

.oa-page-title {
  font-size: var(--text-headline-sm);
  line-height: var(--text-headline-sm--line-height);
  letter-spacing: var(--text-headline-sm--letter-spacing);
  font-weight: var(--text-headline-sm--font-weight);
}

@media (min-width: 48rem) {
  .oa-page-title {
    font-size: var(--text-display-sm);
    line-height: var(--text-display-sm--line-height);
    letter-spacing: var(--text-display-sm--letter-spacing);
    font-weight: var(--text-display-sm--font-weight);
  }
}


/* ---------------------------------------------------------------------------------------------
   12. Eyebrow: the overline above a section title or a value. 12/16 600 +0.12em, uppercased by
   CSS on sentence-case source, in primary-ink, 2 to 5 words (D-TYP-11, D-BCP-17). --rule leads it
   with the 32 × 2px rule in primary on marketing section headers (D-ARC-27), 12px before the
   words, as oait draws it. Arabic: 13px, no tracking (oait.css) and no uppercase on an eyebrow
   whose own language is Arabic (canonical §3.7's :lang(ar) .oa-eyebrow, read as the element's
   language, so an English or French eyebrow island inside an Arabic page keeps its capitals); Latin
   names inside an Arabic eyebrow stay as written (D-TYP-14, D-ARC-29). Eyebrows and links
   share the context's orange ink: the color reads --oa-link, so an inverse panel that sets
   --oa-link: var(--color-inverse-primary) gets inverse-primary eyebrows (canonical §10.11).
   --------------------------------------------------------------------------------------------- */

.oa-eyebrow {
  color: var(--oa-link, var(--color-primary-ink)); /* lint-ok: --oa-link is the shared context property for the orange ink (CONTRIBUTING.md, reference CSS rules) */
  font-size: var(--text-eyebrow);
  line-height: var(--text-eyebrow--line-height);
  letter-spacing: var(--text-eyebrow--letter-spacing);
  font-weight: var(--text-eyebrow--font-weight);
  text-transform: uppercase;
}

.oa-eyebrow:lang(ar),
.oa-text-eyebrow:lang(ar) {
  text-transform: none;
}

.oa-eyebrow--rule {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.oa-eyebrow--rule::before {
  content: "";
  flex-shrink: 0;
  inline-size: var(--size-eyebrow-rule-inline);
  block-size: var(--size-eyebrow-rule-block);
  border-radius: var(--radius-full);
  background-color: var(--color-primary);
}


/* ---------------------------------------------------------------------------------------------
   13. Prose: long-form pages (privacy, terms, help, accessibility) inside .oa-container--reading
   (canonical §11 template 8). Headings map onto the role table of canonical §3.5: h1 is the page
   title (headline-sm, display-sm from 768px), h2 a section heading (title-lg), h3 a group title
   (title-md), and h4 a small heading (title-sm). Paragraphs and lists stop at the measure
   (D-ARC-34). Spacing comes from the stack ladder: 16px between blocks, 8px under a heading, 24px
   above an h3 or h4, and 32px above an h2 (D-LAY-10). Bare links are inline links (primary-ink,
   600, underlined at offset 4, thicker on hover, 8px ring shape; D-CAI-08); links that carry a
   class keep their own component styles. Element rules have zero specificity
   (:where(.oa-prose) …), so a utility class or a component on the element wins (an h2 with
   .oa-text-title-sm keeps title-sm); block spacing is margin-block-start only.
   --------------------------------------------------------------------------------------------- */

.oa-prose {
  font-size: var(--text-body-lg);
  line-height: var(--text-body-lg--line-height);
  letter-spacing: var(--text-body-lg--letter-spacing);
  font-weight: var(--text-body-lg--font-weight);
}

:where(.oa-prose) > * + * {
  margin-block-start: var(--space-stack);
}

:where(.oa-prose) > :where(h1, h2, h3, h4) + * {
  margin-block-start: var(--space-stack-tight);
}

:where(.oa-prose) > * + :where(h2) {
  margin-block-start: var(--space-stack-group);
}

:where(.oa-prose) > * + :where(h3, h4) {
  margin-block-start: var(--space-stack-loose);
}

:where(.oa-prose) :where(h1) {
  font-size: var(--text-headline-sm);
  line-height: var(--text-headline-sm--line-height);
  letter-spacing: var(--text-headline-sm--letter-spacing);
  font-weight: var(--text-headline-sm--font-weight);
}

:where(.oa-prose) :where(h2) {
  font-size: var(--text-title-lg);
  line-height: var(--text-title-lg--line-height);
  letter-spacing: var(--text-title-lg--letter-spacing);
  font-weight: var(--text-title-lg--font-weight);
}

:where(.oa-prose) :where(h3) {
  font-size: var(--text-title-md);
  line-height: var(--text-title-md--line-height);
  letter-spacing: var(--text-title-md--letter-spacing);
  font-weight: var(--text-title-md--font-weight);
}

:where(.oa-prose) :where(h4) {
  font-size: var(--text-title-sm);
  line-height: var(--text-title-sm--line-height);
  letter-spacing: var(--text-title-sm--letter-spacing);
  font-weight: var(--text-title-sm--font-weight);
}

@media (min-width: 48rem) {
  :where(.oa-prose) :where(h1) {
    font-size: var(--text-display-sm);
    line-height: var(--text-display-sm--line-height);
    letter-spacing: var(--text-display-sm--letter-spacing);
    font-weight: var(--text-display-sm--font-weight);
  }
}

:where(.oa-prose) :where(p, ul, ol, dl, blockquote) {
  max-inline-size: var(--container-measure);
}

:where(.oa-prose) :where(ul, ol) {
  padding-inline-start: var(--space-6);
}

:where(.oa-prose) :where(li) + :where(li) {
  margin-block-start: var(--space-stack-tight);
}

:where(.oa-prose) :where(a:not([class])) {
  border-radius: var(--radius-8px); /* the ring's shape around a text link (D-SEM-11) */
  color: var(--oa-link, var(--color-primary-ink)); /* lint-ok: --oa-link is the shared link context property that inverse panels and banners set (CONTRIBUTING.md, reference CSS rules) */
  font-weight: var(--font-weight-semibold);
  text-decoration-line: underline;
  text-decoration-thickness: auto;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent; /* the same recipe as .oa-link in link.css */
}

@media (hover: hover) {
  :where(.oa-prose) :where(a:not([class])):hover {
    text-decoration-thickness: 2px;
  }
}

:where(.oa-prose) :where(code, kbd, samp) {
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}


/* ---------------------------------------------------------------------------------------------
   14. Layout primitives (D-LAY-03 to D-LAY-08, D-LAY-10, D-LAY-11, D-ARC-24, D-ARC-25, C-5).
   .oa-container is the page frame, gutters inside: 16px, 24px from 640px; 1280px wide by default,
   --wide 1408px (consoles, never reading), --reading 768px (legal and help pages, heading blocks),
   --form 460px (one-step forms, utility pages). One frame per page edge; never nest frames.
   .oa-measure caps paragraphs at 672px. .oa-stack spaces a column: 16px, --tight 8, --loose 24,
   --group 32, and --fields 20 between the fields of a form (canonical §4.5). .oa-cluster wraps a
   row of inline items 12px apart. .oa-grid lays cards out in one column, two from 640px, and three
   from 1024px; --tiles in two columns, four from 1024px; 16px gaps at every width. A ul or ol that
   is a grid, stack, or cluster drops the browser's indent and bullets.
   .oa-split is the marketing split: stacked 40px apart, then 1.05fr / 1fr 48px apart from 1024px,
   the text column first in the DOM and on screen. .oa-page is the page frame (max width, gutters,
   section rhythm: sections 80px apart, 112px from 1024px, and the same space after the last one;
   sections carry no vertical padding of their own). It may sit on <main> only when the page has no
   full-bleed band; with bands, <main> is the full-bleed parent and holds .oa-page frames and
   .oa-band siblings. .oa-band is a full-bleed tinted band, a sibling of the frames, holding an
   .oa-container; it pads itself 80px (112px from 1024px) and, as a full-bleed parent, the side
   safe-area insets (physical on purpose, D-LAY-17). A frame that follows a band starts one section
   below it, so the rhythm stays 80px (112px from 1024px). Full-bleed parents (header, main, footer,
   bands) pad the insets; the frames inside them do not.
   --------------------------------------------------------------------------------------------- */

.oa-container {
  inline-size: 100%;
  max-inline-size: var(--container-page);
  margin-inline: auto;
  padding-inline: var(--space-gutter);
}

.oa-container--wide {
  max-inline-size: var(--container-wide);
}

.oa-container--reading {
  max-inline-size: var(--container-reading);
}

.oa-container--form {
  max-inline-size: var(--container-form);
}

.oa-measure {
  max-inline-size: var(--container-measure);
}

.oa-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-stack);
}

.oa-stack--tight {
  gap: var(--space-stack-tight);
}

.oa-stack--loose {
  gap: var(--space-stack-loose);
}

.oa-stack--group {
  gap: var(--space-stack-group);
}

.oa-stack--fields {
  gap: var(--space-fields);
}

.oa-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

/* Lists that are layout primitives drop the browser's indent and bullets; keep role="list" in the
   markup (Safari drops list semantics with list-style: none). */
:where(ul, ol).oa-grid,
:where(ul, ol).oa-stack,
:where(ul, ol).oa-cluster {
  padding: 0;
  list-style: none;
}

.oa-grid {
  display: grid;
  gap: var(--space-grid);
}

.oa-grid--tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.oa-split {
  display: grid;
  align-items: center;
  gap: var(--space-split);
}

.oa-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-section);
  inline-size: 100%;
  max-inline-size: var(--container-page);
  margin-inline: auto;
  padding-inline: var(--space-gutter);
  padding-block-end: var(--space-section);
}

.oa-band {
  padding-block: var(--space-section);
  padding-inline: var(--oa-safe-start) var(--oa-safe-end);
  background-color: var(--color-surface-container-low);
}

.oa-band + .oa-page {
  padding-block-start: var(--space-section);
}

@media (min-width: 40rem) {
  .oa-container,
  .oa-page {
    padding-inline: var(--space-gutter-medium);
  }

  .oa-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .oa-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .oa-grid--tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .oa-split {
    grid-template-columns: 1.05fr 1fr;
    gap: var(--space-split-expanded);
  }

  .oa-page {
    gap: var(--space-section-expanded);
    padding-block-end: var(--space-section-expanded);
  }

  .oa-band {
    padding-block: var(--space-section-expanded);
  }

  .oa-band + .oa-page {
    padding-block-start: var(--space-section-expanded);
  }
}
