/*
 * site-nav.css — OAIT Design System 2.1.0 reference CSS, unit c-nav-site.
 *
 * Components: the site header of marketing and public pages (lock-up, main navigation from 1024px with
 * the current-page treatment, the end cluster, the 48px menu button), the phone menu sheet content that
 * sits inside the side sheet of overlay.css, the marketing footer (brand zone, link groups, the
 * Platforms group of oait.app, the legal bar with the endorsement line and the language switcher) and
 * the app footer row, the breadcrumb trail and the back link, pagination for data tables, and the
 * sticky action bar for phones.
 *
 * Implements: D-CSN-09, D-CSN-11, D-CSN-12, D-CSN-14 (sheet items), D-CSN-15, D-CSN-17, D-CSN-18,
 * D-CSN-50, D-LAY-03, D-LAY-04, D-LAY-14, D-LAY-15 (CLIENT CALL, default sticky), D-LAY-16, D-LAY-17,
 * D-BCP-09 and D-ARC-28 (the lock-up never hides; actions collapse first), D-BCP-13 (endorsement line),
 * D-BCP-29 (switcher placement), D-CAI-04 (CLIENT CALL, one extra filled md CTA in marketing headers),
 * D-ARC-05, D-ARC-10 (the glass recipe), D-ARC-20 (type), D-ARC-24, D-ARC-25, D-ARC-26, D-SEM-10,
 * D-SEM-11, D-SEM-12, D-SEM-15, D-COL-05, D-ARC-33.
 * Canonical: §1.4, §1.7, §2.5, §2.7, §4.3, §4.8, §4.9, §4.10, §6.2, §6.3, §6.4, §10.0, §10.13 (pagination),
 * §10.14, §10.16, §10.17 (breadcrumbs and back links), §10.29.
 *
 * Tokens read: --color-surface, --color-surface-container, --color-surface-container-high,
 *   --color-surface-container-highest, --color-on-surface, --color-on-surface-variant, --color-primary-container,
 * --color-on-primary-container, --color-primary-ink, --color-outline, --color-outline-variant;
 * --space-1, --space-2, --space-2-5, --space-3, --space-4, --space-6, --space-8, --space-10, --space-12,
 * --space-24, --space-gutter, --space-gutter-medium; --container-page; --size-header,
 * --size-touch-target, --size-list-row, --size-scroll-offset, --size-mark-xs; --radius-full,
 * --radius-8px; --z-header, --z-sticky, --z-behind; --font-weight-medium, --font-weight-semibold,
 * --font-weight-bold; --text-label-lg, --text-label-md, --text-title-md, --text-title-sm, --text-body-md
 * (each with its --line-height, --letter-spacing, and --font-weight); --opacity-state-hover,
 * --opacity-state-pressed; --duration-short-3, --ease-standard.
 *
 * Classes:
 *   .oa-site-header (+ __inner, __nav, __list, __link, __actions, __collapse (+ --md), __menu-btn)
 *   .oa-nav-sheet (+ __list, __item, __icon, __divider, __section)
 *   .oa-footer (+ --app; __inner, __brand, __about, __groups, __group, __group-title, __list, __link,
 *     __platforms, __legal, __legal-inner, __endorse, __legal-links, __legal-link, __lang)
 *   .oa-breadcrumb (+ __list, __item, __link, __sep, __current), .oa-back-link
 *   .oa-pagination (+ --more; __status, __controls, __btn, __page)
 *   .oa-action-bar (+ __summary, __title, __supporting)
 *   Documentation only, never in a product: .oa-site-header--demo, .oa-action-bar--demo.
 * States: [aria-current="page"], [aria-current="location"], [aria-disabled="true"], :hover (pointer
 * devices), :active, :focus-visible (base.css), [data-demo-focus] (documentation only).
 *
 * Relies on: base.css (reset, the focus ring, .oa-icon and --mirror, .oa-visually-hidden); button.css
 * (.oa-btn for the CTA, quiet actions, and "Show {count} more"; .oa-icon-btn for the menu button);
 * overlay.css (dialog.oa-side-sheet--end with .oa-dialog__header, __title, and __close around
 * .oa-nav-sheet; the .oa-menu classes a language list composes); brand-kit.css (.oa-lockup, .oa-lang,
 * and .oa-mark for the inline marks of the Platforms group).
 * Context property read: --oa-state (the state layer, CONTRIBUTING.md).
 * Recipes kept from canonical (not tokens): the glass, bg-surface/80 with Tailwind's backdrop-blur-xl
 * (24px) (canonical §2.5, §6.4, D-ARC-10); the 3px current-page bar with 3px top corners (canonical §6.2,
 * D-CSN-11); the 1.6fr brand column and the 448px sentence of the footer (D-CSN-15).
 * Safe-area insets are physical on purpose (canonical §4.10, D-LAY-17): those lines carry lint-ok.
 * Breakpoints are literal rem values: sm 40rem (640px), md 48rem (768px), lg 64rem (1024px); the short
 * viewport query is (max-height: 30rem) (D-LAY-17, D-ARC-30).
 */


/* ------------------------------------------------------------------------------------------------
   1. Page scroll padding. A sticky header covers the top 72px of the window, so anchor targets and
   focused fields keep 96px clear of it (WCAG 2.4.11), plus the top inset of standalone apps
   (viewport-fit=cover), where the header grows by that inset; never also [id] { scroll-margin-top }:
   the two add up. Above a sticky action bar (81px plus the bottom inset) the bottom keeps the same
   --size-scroll-offset plus the inset, about the bar's height and 16px. Short windows turn both bars
   static, so the padding goes too (D-LAY-15, D-LAY-17, D-CSN-50, canonical §4.8, §4.10).
   ------------------------------------------------------------------------------------------------ */

html:has(.oa-site-header) {
  scroll-padding-block-start: calc(var(--size-scroll-offset) + var(--oa-safe-top));
}

@media (width < 64rem) {
  html:has(.oa-action-bar) {
    scroll-padding-block-end: calc(var(--size-scroll-offset) + var(--oa-safe-bottom));
  }
}

@media (max-height: 30rem) {
  html:has(.oa-site-header),
  html:has(.oa-action-bar) {
    scroll-padding-block: auto;
  }
}


/* ------------------------------------------------------------------------------------------------
   2. Site header (canonical §10.14, D-CSN-09, D-LAY-15). 72px at every width, sticky on the header
   layer, static on short windows, glass (bg-surface/80 with a 24px backdrop blur), no edge, no shadow.
   The header is the full-bleed parent: it pads the top and side safe-area insets; its inner row is the
   page frame (1280px with the gutters inside), so its edge lines up with the page below (D-LAY-04).
   ------------------------------------------------------------------------------------------------ */

.oa-site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-header);
  padding-block-start: var(--oa-safe-top);
  padding-inline: var(--oa-safe-start) var(--oa-safe-end);
  /* Glass on surface-container: the bar is one step darker than the page, which stays surface.
     90%, not the 80% of the glass recipe, so the "Sign in" label (primary-ink) keeps 4.88:1 when
     black content scrolls under the bar (canonical §10.14, D-CSN-54, D-CSN-55); backdrop-blur-xl
     is 24px. */
  background-color: color-mix(in srgb, var(--color-surface-container) 90%, transparent);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  color: var(--color-on-surface);
}

@media (max-height: 30rem) {
  .oa-site-header {
    position: static;
  }
}

.oa-site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  inline-size: 100%;
  min-block-size: var(--size-header);
  max-inline-size: var(--container-page);
  margin-inline: auto;
  padding-inline: var(--space-gutter);
}

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

/* The lock-up never shrinks or hides: header actions collapse first (canonical §1.4, D-BCP-09). */
.oa-site-header__inner > .oa-lockup {
  flex: none;
}

/* Main navigation: hidden below 1024px (the menu sheet carries it), centered in the free space from
   1024px. Links sit 4px apart (D-CSN-09). A header with four or five links keeps the sheet up to
   1280px: with the switcher, the theme toggle and the sign-in pair, four links need 956px in English
   and about 982px in Arabic, and a 1024px window holds 961px beside a classic scrollbar (D-CSN-56).
   The rule counts the links, so a product sets nothing. */
.oa-site-header__nav {
  display: none;
}

.oa-site-header__list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 64rem) {
  .oa-site-header__nav:not(:has(.oa-site-header__list > :nth-child(4))) {
    display: block;
    margin-inline: auto;
  }

  .oa-site-header__nav:not(:has(.oa-site-header__list > :nth-child(4))) ~ .oa-site-header__actions {
    margin-inline-start: 0;
  }
}

@media (min-width: 80rem) {
  .oa-site-header__nav {
    display: block;
    margin-inline: auto;
  }

  .oa-site-header__nav ~ .oa-site-header__actions {
    margin-inline-start: 0;
  }
}

/* Navigation link: a 48px pill, label-lg in on-surface-variant, the state layer on hover and press
   (canonical §10.14, D-CSN-11, D-ARC-20). */
.oa-site-header__link {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  min-block-size: var(--size-touch-target);
  padding-inline: var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--color-on-surface-variant);
  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;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

/* Current page (aria-current="page"), or the section in view on a page that tracks its sections
   (aria-current="location"): the peach fill, on-surface text in bold, and a 3px primary-ink bar
   12px in from both ends and 4px above the bottom, with 3px top corners. The fill alone is 1.2:1
   against the header, so the bar and the weight carry the state (D-CSN-11, canonical §6.2). The bar
   is a border, so forced-colors mode keeps it. */
.oa-site-header__link:is([aria-current="page"], [aria-current="location"]) {
  background-color: var(--color-primary-container);
  color: var(--color-on-surface);
  font-weight: var(--font-weight-bold);
}

.oa-site-header__link:is([aria-current="page"], [aria-current="location"])::after {
  content: "";
  position: absolute;
  inset-inline: var(--space-3);
  inset-block-end: var(--space-1);
  border-block-end: 3px solid var(--color-primary-ink);
  border-start-start-radius: 3px; /* lint-ok: component constant, the indicator's 3px top corners (D-CSN-11) */
  border-start-end-radius: 3px; /* lint-ok: component constant, the indicator's 3px top corners (D-CSN-11) */
  pointer-events: none;
}

/* End cluster, 8px apart: the language switcher, the theme toggle where the product ships a dark
   theme (D-CSN-56), the sign-in pair, and the menu button while the navigation is in the sheet
   (canonical §10.14, D-CSN-09, D-CSN-55). It sits at the inline end. */
.oa-site-header__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--space-2);
  margin-inline-start: auto;
}

/* Below 640px the language switcher and quiet actions move into the menu sheet, and so does the CTA
   when its label does not fit on one line at 360px in every language the product ships (all three in
   a trilingual product; canonical §10.14). Give those items this class; the sheet holds their twins. */
@media (width < 40rem) {
  .oa-site-header .oa-site-header__collapse {
    display: none;
  }
}

/* An item the 640px bar cannot hold beside the M lock-up stays in the sheet up to 768px. Measure
   the bar at 640px in every language the product ships; header actions collapse before the lock-up
   shrinks (canonical §1.4). This second step is the system's reading of §1.4, which names only the
   640px step. Global Jobs' "Sign in" takes this class. */
@media (width < 48rem) {
  .oa-site-header .oa-site-header__collapse--md {
    display: none;
  }
}


/* ------------------------------------------------------------------------------------------------
   3. Menu button: a 48px standard icon button (.oa-icon-btn of button.css) with the 24px menu icon,
   last in the end cluster (canonical §10.2, §10.14, D-CSN-12). It shows below 1024px; from 1024px it
   hides when the header shows its main navigation, so a header never loses its way to the
   navigation (canonical §11). With four or five links the navigation shows from 1280px, so the
   button stays until then (D-CSN-56).
   ------------------------------------------------------------------------------------------------ */

@media (min-width: 64rem) {
  .oa-site-header:has(.oa-site-header__nav):not(:has(.oa-site-header__list > :nth-child(4))) .oa-site-header__menu-btn {
    display: none;
  }
}

@media (min-width: 80rem) {
  .oa-site-header:has(.oa-site-header__nav) .oa-site-header__menu-btn {
    display: none;
  }
}


/* ------------------------------------------------------------------------------------------------
   4. Phone menu sheet content (canonical §10.14, D-CSN-12, D-CSN-14). The side sheet of overlay.css
   (dialog.oa-side-sheet.oa-side-sheet--end) gives the surface, the corners, the shadow, the scrim,
   the 24px padding with the safe-area insets, the slide, and the header row (.oa-dialog__header with
   the title "Menu" in title-lg and the 48px close button). .oa-nav-sheet follows that header, its
   parts 16px apart: the navigation items as 56px pills, a divider, the language row, then the
   actions 8px apart, a CTA that left the bar first as a full-width filled md button and the quiet
   actions as full-width outlined buttons.
   ------------------------------------------------------------------------------------------------ */

.oa-nav-sheet {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  color: var(--color-on-surface);
}

.oa-nav-sheet__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Navigation item: the full 56px row is the indicator, as in the navigation drawer of app-nav.css.
   label-md at weight 500 in on-surface-variant at rest; current: the peach fill, on-surface at 700,
   and an optional 24px icon (.oa-nav-sheet__icon) that turns on-primary-container and FILL 1
   (canonical §8.2, §10.15, D-CSN-14, D-ARC-20, D-BCP-33). */
.oa-nav-sheet__item {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-block-size: var(--size-list-row);
  padding-inline: var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--color-on-surface-variant);
  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(--font-weight-medium);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.oa-nav-sheet__item:is([aria-current="page"], [aria-current="location"]) {
  background-color: var(--color-primary-container);
  color: var(--color-on-surface);
  font-weight: var(--font-weight-bold);
}

.oa-nav-sheet__icon {
  flex: none;
}

.oa-nav-sheet__item:is([aria-current="page"], [aria-current="location"]) .oa-nav-sheet__icon {
  color: var(--color-on-primary-container);
  font-variation-settings: "FILL" 1;
}

/* A 1px outline-variant hairline between the items and the language row. */
.oa-nav-sheet__divider {
  block-size: 0;
  margin: 0;
  border: 0;
  border-block-start: 1px solid var(--color-outline-variant);
  color: inherit; /* not the browser's gray rule color */
}

/* The language row and the quiet actions; buttons with .oa-btn--wide fill the width. */
.oa-nav-sheet__section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}


/* ------------------------------------------------------------------------------------------------
   5. Footer (canonical §10.16, §1.7, D-CSN-15, D-CSN-52, D-CSN-54, D-BCP-42). One footer for every
   product: the brand zone, one or two product link groups, the Platforms panel, and the legal bar.
   surface-container, one step darker than the page, with a 1px outline-variant top edge. Main zone
   32px above and below (48px from 640px): one column below 768px with 24px gaps; from 768px the
   brand zone on its own row and the groups beside the Platforms panel below it; from 1280px one row,
   40px apart. The footer is the full-bleed parent: it pads the side insets, and the legal bar adds
   the bottom inset.
   ------------------------------------------------------------------------------------------------ */

.oa-footer {
  padding-inline: var(--oa-safe-start) var(--oa-safe-end);
  border-block-start: 1px solid var(--color-outline-variant);
  /* One step darker than the page, as the header is (D-CSN-54). */
  background-color: var(--color-surface-container);
  color: var(--color-on-surface);
}

.oa-footer__inner {
  display: grid;
  gap: var(--space-6);
  inline-size: 100%;
  max-inline-size: var(--container-page);
  margin-inline: auto;
  padding-block: var(--space-8);
  padding-inline: var(--space-gutter);
}

@media (min-width: 40rem) {
  .oa-footer__inner {
    padding-block: var(--space-12);
    padding-inline: var(--space-gutter-medium);
  }
}

/* Below 768px the groups wrapper is transparent to the grid, so the brand zone and each group are
   rows. From 768px the wrapper is a row under the brand zone: the product groups share the room
   left by the Platforms panel, which keeps the width of its two columns. From 1280px the footer is
   one row: the brand zone (1.6 parts), the product groups (1 part each), then the panel
   (canonical §10.16, D-CSN-52, D-CSN-54). */
.oa-footer__groups {
  display: contents;
}

@media (min-width: 48rem) {
  .oa-footer__groups {
    display: flex;
    align-items: flex-start;
    gap: var(--space-10);
  }

  .oa-footer__group {
    flex: 1 1 0;
  }
}

@media (min-width: 80rem) {
  .oa-footer__inner {
    display: flex;
    align-items: flex-start;
    gap: var(--space-10);
  }

  .oa-footer__brand {
    flex: 1.6 1 0;
    min-inline-size: 0;
  }

  .oa-footer__groups {
    display: contents;
  }
}

/* Brand zone: the M lock-up, then one sentence 16px below it, at most 448px wide. */
.oa-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.oa-footer__about {
  max-inline-size: 28rem; /* 448px (D-CSN-15) */
  margin: 0;
  color: var(--color-on-surface-variant);
  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);
}

/* Link group: a nav named by its visible title (title-sm), the links 8px below it. */
.oa-footer__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-inline-size: 0;
}

.oa-footer__group-title {
  margin: 0;
  color: var(--color-on-surface);
  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-footer__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Footer link: 48px tall, label-lg in on-surface, no underline at rest, underlined on hover; the
   ring takes the text-link shape (8px) (canonical §10.16, §5.2). */
.oa-footer__link {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--size-touch-target);
  min-inline-size: var(--size-touch-target);
  border-radius: var(--radius-8px);
  color: var(--color-on-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-line: none;
  text-underline-offset: 4px;
}

/* Platforms group, the last group of every footer: a panel one step darker than the footer
   (surface-container-high on surface-container) with card corners and 16px padding. Each family
   product is a row with its 24px mark, the name and, when the link leaves the product, a 16px
   north_east (mirrored in RTL), 10px apart. One column below 640px, two balanced columns from
   640px. From 768px the panel is 392px wide: two 172px rows, the 16px gap, and the padding. The row
   of the product the page belongs to links to its home and has no arrow (canonical §10.16,
   D-CSN-52, D-CSN-54). */
.oa-footer__group:has(> .oa-footer__platforms) {
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background-color: var(--color-surface-container-high);
}

.oa-footer__platforms {
  display: block;
  column-gap: var(--space-4);
}

.oa-footer__platforms > li {
  break-inside: avoid;
}

@media (min-width: 40rem) {
  .oa-footer__platforms {
    column-count: 2;
  }
}

@media (min-width: 48rem) {
  .oa-footer__group:has(> .oa-footer__platforms) {
    flex: 0 0 24.5rem; /* 392px: two columns of a Platforms row (D-CSN-54) */
  }
}

.oa-footer__platforms .oa-footer__link {
  gap: var(--space-2-5);
}

.oa-footer__platforms :is(svg, img, picture) {
  flex: none;
  inline-size: var(--size-mark-xs);
  block-size: var(--size-mark-xs);
}

/* Legal bar: its own top edge, 24px above and below (plus the bottom inset), a wrapping row in
   body-md on-surface-variant: the endorsement line, the legal links that exist, and the controls
   (the language switcher and, where the product ships a dark theme, the theme button, both with
   their labels) at the inline end, also when they wrap onto a line of their own. Below 640px the
   bar is centered: the endorsement line takes a line of its own and the rest follows on the line
   below it (canonical §10.16, §1.7, D-CSN-57). */
.oa-footer__legal {
  border-block-start: 1px solid var(--color-outline-variant);
  /* The darkest grade of the footer: page, bars, Platforms panel, legal bar (D-CSN-55). */
  background-color: var(--color-surface-container-highest);
}

/* A footer reduced to its legal bar (demo and utility pages) draws one hairline: the footer's own. */
.oa-footer > .oa-footer__legal:first-child {
  border-block-start: 0;
}

.oa-footer__legal-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-6);
  row-gap: var(--space-2);
  inline-size: 100%;
  max-inline-size: var(--container-page);
  margin-inline: auto;
  padding-block: var(--space-6) calc(var(--space-6) + var(--oa-safe-bottom));
  padding-inline: var(--space-gutter);
  color: var(--color-on-surface-variant);
  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);
}

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

/* The endorsement line: "Powered by OAIT", one legal link to https://oait.app (the next rule's look,
   a 48px target), then "at" and "Global University", one legal link to https://gu.edu.lb (D-BCP-42). Its words sit in one span, so the
   link's flex box keeps the space before "OAIT"; "OAIT" sits in <bdi lang="en" translate="no">. */
.oa-footer__endorse {
  margin: 0;
}

/* Below 640px the legal bar is centered: the endorsement line takes a line of its own, and the legal
   links and the controls share the line below it when they fit; when they do not fit, the controls
   take the next line. Every line sits in the middle of the bar (D-CSN-57). */
@media (width < 40rem) {
  .oa-footer__legal-inner {
    justify-content: center;
    column-gap: var(--space-4);
    row-gap: 0;
    text-align: center;
  }

  .oa-footer__endorse {
    flex-basis: 100%;
  }

  .oa-footer__legal-links,
  .oa-footer__legal-inner > .oa-footer__lang {
    justify-content: center;
  }

  .oa-footer__legal-inner > .oa-footer__lang {
    margin-inline: 0;
  }
}

.oa-footer__endorse .oa-footer__legal-link bdi {
  font-weight: var(--font-weight-semibold); /* "OAIT" at 600, canonical §1.7 */
}

.oa-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Legal and app-footer links: body-md, on-surface-variant, underlined at rest (they sit with text),
   48px tall; the underline thickens on hover (canonical §2.7, §10.16). */
.oa-footer__legal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center; /* a short label keeps even spacing inside its 48px box */
  min-block-size: var(--size-touch-target);
  min-inline-size: var(--size-touch-target);
  border-radius: var(--radius-8px);
  color: var(--color-on-surface-variant);
  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);
  text-decoration-line: underline;
  text-underline-offset: 4px;
}

/* The controls: 8px apart, at the inline end. */
.oa-footer__lang {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-inline-start: auto;
}

/* App footer: one quiet in-flow row at the end of <main>, 32px after the content (40px from 768px);
   privacy and help links in body-md at weight 500. Never pinned (canonical §10.16). */
.oa-footer--app {
  margin-block-start: var(--space-8);
  padding: 0;
  border: 0;
  background-color: transparent;
}

.oa-footer--app .oa-footer__legal-link {
  font-weight: var(--font-weight-medium);
}

@media (min-width: 48rem) {
  .oa-footer--app {
    margin-block-start: var(--space-10);
  }
}


/* ------------------------------------------------------------------------------------------------
   6. Breadcrumbs and back links (canonical §10.17, D-CSN-17). Both sit in <nav aria-label=
   "Breadcrumb">. One level up: the back link, a mirrored 20px arrow_back and "Back to {place}" in
   label-lg primary-ink, 48px tall, underlined on hover. Two or more levels: an <ol> trail in body-md,
   links in on-surface-variant (48px targets), "/" separators 8px each side, the current page last as
   plain on-surface text; the trail wraps.
   ------------------------------------------------------------------------------------------------ */

/* 8px of padding at the inline end, taken back by the margin, so the focus ring clears the last
   letter and the label keeps its place. */
.oa-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: var(--size-touch-target);
  min-inline-size: var(--size-touch-target);
  padding-inline-end: var(--space-2);
  margin-inline-end: calc(var(--space-2) * -1);
  border-radius: var(--radius-8px);
  color: var(--color-primary-ink);
  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-line: none;
  text-underline-offset: 4px;
}

.oa-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--color-on-surface-variant);
  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-breadcrumb__item {
  display: inline-flex;
  align-items: center;
  min-inline-size: 0;
}

.oa-breadcrumb__link {
  display: inline-flex;
  align-items: center;
  justify-content: center; /* a short label keeps even spacing inside its 48px box */
  min-block-size: var(--size-touch-target);
  min-inline-size: var(--size-touch-target);
  border-radius: var(--radius-8px);
  color: var(--color-on-surface-variant);
  text-decoration-line: none;
  text-underline-offset: 4px;
}

.oa-breadcrumb__sep {
  margin-inline: var(--space-2);
  color: var(--color-on-surface-variant);
}

.oa-breadcrumb__current {
  color: var(--color-on-surface);
  overflow-wrap: anywhere;
}


/* Hover: links underline (no state layer on text links, canonical §2.7). */
@media (hover: hover) {
  .oa-footer__link:hover,
  .oa-back-link:hover,
  .oa-breadcrumb__link:hover {
    text-decoration-line: underline;
  }

  .oa-footer__legal-link:hover {
    text-decoration-thickness: 2px;
  }
}


/* ------------------------------------------------------------------------------------------------
   7. Pagination for data tables (canonical §10.13, D-CSN-18): a wrapping row with space between,
   "Showing {from}–{to} of {total}" at the start, and at the end a 48px previous circle, "Page {page} of
   {pages}" (at least 96px, centered, weight 500) and a 48px next circle. Circles: a 1px outline edge,
   a 24px mirrored chevron in on-surface-variant, the state layer. An unavailable direction is a span
   with aria-disabled="true": outline-variant edge, outline icon, no layer. Member lists use
   "Show {count} more" (an outlined md button, button.css) instead.
   ------------------------------------------------------------------------------------------------ */

.oa-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}

/* "Show {count} more" under a member list: the outlined md button at its own width, at the start. */
.oa-pagination--more {
  justify-content: flex-start;
}

.oa-pagination__status {
  margin: 0;
  color: var(--color-on-surface-variant);
  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-pagination__controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.oa-pagination__page {
  min-inline-size: var(--space-24); /* 96px, Tailwind min-w-24 (D-CSN-18) */
  color: var(--color-on-surface);
  text-align: center;
  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(--font-weight-medium);
}

.oa-pagination__btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  inline-size: var(--size-touch-target);
  block-size: var(--size-touch-target);
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-full);
  background-color: transparent;
  color: var(--color-on-surface-variant);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.oa-pagination__btn[aria-disabled="true"] {
  border-color: var(--color-outline-variant);
  color: var(--color-outline);
  cursor: default;
}


/* ------------------------------------------------------------------------------------------------
   8. Sticky action bar (canonical §10.29, D-CSN-50). Phones only (below 1024px), for a page's one main
   action when it has scrolled away or lives in an aside: sticky at the bottom on the sticky layer,
   static on short windows, the glass with a 1px outline-variant top edge and no shadow, 12px above,
   12px plus the bottom inset below, 16px at the sides. A one-line summary (title-md, truncated, and
   body-md supporting text) and one filled lg button. Never on a screen with a navigation bar.
   ------------------------------------------------------------------------------------------------ */

.oa-action-bar {
  position: sticky;
  inset-block-end: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-3) calc(var(--space-3) + var(--oa-safe-bottom));
  padding-inline: var(--space-4);
  border-block-start: 1px solid var(--color-outline-variant);
  /* The glass recipe bg-surface/80 with backdrop-blur-xl (canonical §2.5, §6.4, D-ARC-10). */
  background-color: color-mix(in srgb, var(--color-surface) 80%, transparent);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  color: var(--color-on-surface);
}

@media (min-width: 64rem) {
  .oa-action-bar:not(.oa-action-bar--demo) {
    display: none;
  }
}

@media (max-height: 30rem) {
  .oa-action-bar {
    position: static;
  }
}

.oa-action-bar__summary {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-inline-size: 0;
}

/* The summary is user content (a job title, a company): dir="auto" in the markup lets the ellipsis
   fall at the end of the text in either direction, and match-parent keeps it aligned with the page
   (canonical §14.2). */
.oa-action-bar__title,
.oa-action-bar__supporting {
  margin: 0;
  overflow: hidden;
  text-align: match-parent;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oa-action-bar__title {
  color: var(--color-on-surface);
  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-action-bar__supporting {
  color: var(--color-on-surface-variant);
  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);
}


/* ------------------------------------------------------------------------------------------------
   9. State layers (canonical §2.7, D-COL-05, D-SEM-15): a ::before of currentColor under the label at
   --oa-state, 8% on hover (pointer devices only), 12% pressed and shown at once, faded back over
   short-3. No focus layer: the base ring shows focus. Nothing moves, lifts, or casts a shadow.
   ------------------------------------------------------------------------------------------------ */

/* All three hosts carry a 1px border (transparent on the links and sheet items, outline on the
   circles), so the layer covers the border box: no lighter rim on hover. */
.oa-site-header__link::before,
.oa-nav-sheet__item::before,
.oa-pagination__btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: var(--z-behind); /* under the label, inside the isolated control */
  border-radius: inherit;
  background-color: currentColor;
  opacity: var(--oa-state, 0);
  pointer-events: none;
  transition: opacity var(--duration-short-3) var(--ease-standard);
}

@media (hover: hover) {
  .oa-site-header__link:hover,
  .oa-nav-sheet__item:hover,
  .oa-pagination__btn:not([aria-disabled="true"]):hover {
    --oa-state: var(--opacity-state-hover);
  }
}

.oa-site-header__link:active,
.oa-nav-sheet__item:active,
.oa-pagination__btn:not([aria-disabled="true"]):active {
  --oa-state: var(--opacity-state-pressed);
}

/* Press shows at once; release fades back over short-3. */
.oa-site-header__link:active::before,
.oa-nav-sheet__item:active::before,
.oa-pagination__btn:active::before {
  transition: none;
}


/* ------------------------------------------------------------------------------------------------
   10. Glass fallbacks: opaque surface under reduced transparency, without backdrop-filter, and in
   forced colors, where the system Canvas replaces the fill and keeps no translucency (canonical §6.4,
   D-SEM-12). Print keeps the lock-up and the footer and drops the navigation chrome.
   ------------------------------------------------------------------------------------------------ */

@media (prefers-reduced-transparency: reduce) {
  .oa-site-header,
  .oa-action-bar {
    background-color: var(--color-surface);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .oa-site-header {
    background-color: var(--color-surface-container);
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .oa-site-header,
  .oa-action-bar {
    background-color: var(--color-surface);
  }

  .oa-site-header {
    background-color: var(--color-surface-container);
  }
}

@media (forced-colors: active) {
  .oa-site-header,
  .oa-action-bar {
    background-color: Canvas;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media print {
  .oa-site-header {
    position: static;
    background-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .oa-site-header__nav,
  .oa-site-header__actions,
  .oa-action-bar,
  .oa-pagination__controls {
    display: none;
  }
}


/* ------------------------------------------------------------------------------------------------
   11. Documentation only, never in a product. --demo keeps a site header or a sticky action bar in
   the page flow (neither sticks nor rises above the documentation page's own chrome), and keeps the
   action bar visible from 1024px, so a documentation page can show several of each.
   ------------------------------------------------------------------------------------------------ */

.oa-site-header--demo,
.oa-action-bar--demo {
  position: relative;
  z-index: auto;
}
