/* =============================================================================
   app-nav.css · OAIT Design System 2.1.0 reference CSS · app navigation
   -----------------------------------------------------------------------------
   Components: app shell (member app, console, plain), top app bar, navigation
   bar, navigation rail, navigation drawer (with the console's phone "Menu"
   row), tabs (underline tabs and link tabs), stepper (in-app step header).

   Implements: D-CSN-13 (which navigation, shell grid), D-CSN-14 (navigation
   items and the current destination), D-CSN-16 (tabs), D-CSN-20 (stepper),
   D-CSN-31 (drawer group disclosures), D-LAY-09 (app and admin shells),
   D-LAY-14 (chrome sizes), D-LAY-17 (safe areas, dvh, keyboard), D-ARC-20
   (label styles), D-ARC-24 (indicator constants), D-ARC-28 (lock-up at 640px),
   D-COL-05 and D-ARC-02 (state layers, no focus layer), D-SEM-11 (inset ring),
   D-SEM-15 and D-SEM-16 (feedback and motion), D-BCP-33 (FILL 1 when current),
   D-SEM-10 (edges in forced colors), canonical 4.8, 4.10, 10.15, 10.17, 10.18.

   Tokens read: --color-surface, --color-surface-container,
   --color-surface-container-highest, --color-on-surface,
   --color-on-surface-variant, --color-primary-container,
   --color-on-primary-container, --color-primary-ink, --color-outline-variant;
   --size-header, --size-header-compact, --size-nav-bar, --size-nav-rail,
   --size-nav-drawer, --size-list-row, --size-touch-target, --size-focus-inset;
   --space-1, --space-2, --space-3, --space-4, --space-6, --space-12,
   --space-gutter, --space-gutter-medium, --space-stack-tight,
   --space-stack-loose, --space-stack-group; --container-page,
   --container-wide; --radius-full; --opacity-state-hover,
   --opacity-state-pressed; --duration-short-3, --duration-short-4,
   --ease-standard; --z-behind; --font-weight-medium, --font-weight-bold;
   type styles label-sm, label-md, headline-md (--text-<style> and its
   --line-height, --letter-spacing and --font-weight companions).
   Mixes with: .oa-lockup and .oa-lang (brand-kit.css), .oa-status-chip
   (chip.css), .oa-btn, .oa-icon-btn and .oa-actions--page (button.css),
   .oa-avatar (avatar-badge.css), .oa-side-sheet and .oa-dialog__* parts
   (overlay.css), .oa-snackbar-host--nav-bar (feedback.css).

   Classes: .oa-app-shell (--rail, --drawer; __nav, __main, __bar, __menu,
   __content) · .oa-top-app-bar (--compact; __start, __home, __context,
   __context-label, __end) · .oa-nav-bar, .oa-nav-rail (__list, __item,
   __indicator, __icon, __label) · .oa-nav-drawer (--sheet; __group,
   __group-btn, __group-label, __chevron, __list, __item, __icon, __label,
   __divider, __back) · .oa-tabs (--nav; __list, __tab, __icon, __panel) ·
   .oa-stepper (__header, __count, __title, __bar, __segment, __actions).

   Context properties: --oa-state (state-layer opacity, set on the hovered or
   pressed control and read by its layer), --oa-app-shell-height (the shell's
   block size; 100dvh unless a documentation frame sets it).

   md = 48rem (768px, --breakpoint-md), the navigation switch; sm = 40rem
   (640px, --breakpoint-sm). Media queries cannot read custom properties, so
   the breakpoints are written as their rem values (canonical 4.2).
   Safe-area insets are physical (left, right): the one place layout uses
   physical sides (canonical 4.10, D-LAY-17).
   ========================================================================== */


/* -----------------------------------------------------------------------------
   App shell: a 100dvh grid in which only <main> scrolls (D-LAY-09, D-CSN-13).
   Plain shell: header + main. --rail: the member app (navigation bar below
   md, rail from md). --drawer: a console (the "Menu" row below md, the 272px
   drawer column from md). Each row pads its own safe areas below md; from md
   the shell pads the side insets as a whole.
   -------------------------------------------------------------------------- */

.oa-app-shell {
  --oa-app-shell-height: 100dvh;
  display: grid;
  block-size: var(--oa-app-shell-height);
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--color-surface);
  color: var(--color-on-surface);
}

.oa-app-shell--rail {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.oa-app-shell--drawer {
  grid-template-rows: auto auto minmax(0, 1fr);
}

/* The rail or drawer column. Below md the member app has no column (the bar
   takes over); the console shows its "Menu" row here and keeps the drawer in
   a modal side sheet. */
.oa-app-shell__nav {
  display: none;
}

.oa-app-shell--drawer > .oa-app-shell__nav {
  display: block;
}

.oa-app-shell--drawer > .oa-app-shell__nav > .oa-nav-drawer {
  display: none;
}

/* The two regions that scroll are containing blocks, so an absolutely positioned child (a visually
   hidden legend, a stretched link) scrolls with them and never stretches the document under the
   shell: only <main> scrolls (canonical §4.8, D-LAY-09). */
.oa-app-shell__main,
.oa-app-shell__nav {
  position: relative;
}

.oa-app-shell__main {
  min-block-size: 0;
  min-inline-size: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-block: var(--space-1) var(--space-6);
  padding-inline: calc(var(--space-gutter) + var(--oa-safe-start)) calc(var(--space-gutter) + var(--oa-safe-end));
}

/* Without a bottom bar under it (consoles, plain shells) the main region is the row that meets
   the bottom edge, so it pads the bottom inset too; with the console's footer row now in flow at
   the end of main, nothing else does (canonical 4.10, D-CSN-13). */
.oa-app-shell:where(:not(.oa-app-shell--rail)) > .oa-app-shell__main {
  padding-block-end: calc(var(--space-6) + var(--oa-safe-bottom));
}

/* The app page inside <main>: capped at the page frame (consoles: wide),
   groups 24px apart, 32px from md (canonical 4.5, D-LAY-04). */
.oa-app-shell__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-stack-loose);
  inline-size: 100%;
  max-inline-size: var(--container-page);
  margin-inline: auto;
}

.oa-app-shell--drawer .oa-app-shell__content {
  max-inline-size: var(--container-wide);
}

/* The bottom bar's grid row (member app). Hidden from md. */
.oa-app-shell__bar {
  min-inline-size: 0;
}

/* The console's phone "Menu" row: 48px, full width, a bottom hairline; it
   opens the drawer as a modal side sheet from the inline start (D-CSN-13). */
.oa-app-shell__menu {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  inline-size: 100%;
  min-block-size: var(--size-touch-target);
  margin: 0;
  padding-block: 0;
  padding-inline: calc(var(--space-4) + var(--oa-safe-start)) calc(var(--space-4) + var(--oa-safe-end));
  border: 1px solid transparent;
  border-block-end-color: var(--color-outline-variant);
  border-radius: 0;
  background: var(--color-surface);
  color: var(--color-on-surface-variant);
  font-family: inherit;
  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);
  text-align: start;
  cursor: pointer;
}

/* Full-bleed row: the ring is drawn inside it (canonical 6.3). */
.oa-app-shell__menu:is(:focus-visible, [data-demo-focus]) {
  outline-offset: var(--size-focus-inset);
}

@media (min-width: 48rem) {
  .oa-app-shell {
    padding-inline: var(--oa-safe-start) var(--oa-safe-end);
  }

  .oa-app-shell--rail {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .oa-app-shell--drawer {
    grid-template-columns: var(--size-nav-drawer) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .oa-app-shell > .oa-top-app-bar {
    grid-column: 1 / -1;
    padding-inline: 0;
  }

  /* The rail or drawer column scrolls on its own and, like main, meets the bottom edge. */
  .oa-app-shell__nav,
  .oa-app-shell--drawer > .oa-app-shell__nav {
    display: flex;
    flex-direction: column;
    min-block-size: 0;
    padding-block-end: var(--oa-safe-bottom);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .oa-app-shell--drawer > .oa-app-shell__nav > .oa-nav-drawer {
    display: flex;
  }

  .oa-app-shell__menu,
  .oa-app-shell__bar {
    display: none;
  }

  /* No shell has a bottom bar from md: main always meets the bottom edge. */
  .oa-app-shell > .oa-app-shell__main {
    padding-block: var(--space-2) calc(var(--space-12) + var(--oa-safe-bottom));
    padding-inline: var(--space-gutter-medium);
  }

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

/* The console shell's tones (D-CSN-58): the bar and the drawer take the grade of the site header
   and footer, surface-container, and the page is the lighter sheet on it, surface, with a card
   corner at its top inline-start from md, where it meets the bar and the drawer. The sheet starts
   24px under the bar's row so its first line never touches the corner. The member shell keeps the
   page color throughout. */
.oa-app-shell--drawer,
.oa-app-shell--drawer > .oa-top-app-bar {
  background: var(--color-surface-container);
}

.oa-app-shell--drawer > .oa-app-shell__nav > .oa-nav-drawer {
  background: transparent;
}

.oa-app-shell--drawer > .oa-app-shell__main {
  padding-block-start: var(--space-6);
  background: var(--color-surface);
}

@media (min-width: 48rem) {
  .oa-app-shell--drawer > .oa-app-shell__main {
    border-start-start-radius: var(--radius-card);
  }
}

/* A shell is as tall as the window and only its regions scroll, so the page itself never does.
   The gutter the base layer keeps for the page's scrollbar (D-LAY-20) would show as an empty
   strip beside the bar, so a page whose body holds a shell gives it up (D-LAY-21). A product that
   wraps the shell in another element sets scrollbar-gutter: auto on <html> itself. */
:root:has(> body > .oa-app-shell) {
  scrollbar-gutter: auto;
}


/* -----------------------------------------------------------------------------
   Top app bar: a grid row that never scrolls away, the page color, no edge
   (D-CSN-13, D-LAY-14). 72px; --compact (shells with a bottom bar) is 64px
   below md. Start: the home link (the lock-up) and an optional context chip
   that truncates first. End: language switcher and account control.
   -------------------------------------------------------------------------- */

.oa-top-app-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-block-size: calc(var(--size-header) + var(--oa-safe-top));
  padding-block-start: var(--oa-safe-top);
  padding-inline: var(--oa-safe-start) var(--oa-safe-end);
  background: var(--color-surface);
  color: var(--color-on-surface);
}

.oa-top-app-bar--compact {
  min-block-size: calc(var(--size-header-compact) + var(--oa-safe-top));
}

.oa-top-app-bar__start {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: var(--space-3);
  min-inline-size: 0;
  padding-inline-start: var(--space-4);
}

/* Mixed onto the lock-up (brand-kit.css), which owns its layout (mark, name and sub-line on a
   grid): this class only keeps the link home from shrinking, so the chip gives way first. It
   sets no display, so the result does not depend on which file loads last. */
.oa-top-app-bar__home {
  flex: 0 0 auto;
  min-block-size: var(--size-touch-target);
  color: var(--color-on-surface);
  text-decoration: none;
}

/* Mixed onto the status chip (chip.css): it may shrink and truncate. The parent in the selector
   outranks chip.css's flex-shrink: 0 whatever the load order. */
.oa-top-app-bar__start > .oa-top-app-bar__context {
  flex: 0 1 auto;
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow: hidden;
}

.oa-top-app-bar__context-label {
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oa-top-app-bar__end {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--space-2);
  margin-inline-start: auto;
  padding-inline-end: var(--space-1);
}

@media (min-width: 48rem) {
  .oa-top-app-bar--compact {
    min-block-size: calc(var(--size-header) + var(--oa-safe-top));
  }

  .oa-top-app-bar__start {
    padding-inline-start: var(--space-6);
  }

  .oa-top-app-bar__end {
    padding-inline-end: var(--space-4);
  }
}


/* -----------------------------------------------------------------------------
   Navigation bar (below md) and navigation rail (from md): destinations with
   an icon in an indicator pill above a label (D-CSN-14, D-ARC-20, D-ARC-24).
   Rest: label 500 on-surface-variant, outlined icon, no pill. Hover and press:
   the 8% / 12% layer on the indicator. Current (aria-current): primary-
   container pill, filled on-primary-container icon, on-surface label at 700.
   -------------------------------------------------------------------------- */

/* The bar hides while the on-screen keyboard is open: the script sets the
   hidden attribute, which base.css keeps hidden (D-LAY-17). */
.oa-nav-bar {
  display: block;
  min-block-size: calc(var(--size-nav-bar) + var(--oa-safe-bottom));
  padding-block: var(--space-3) calc(var(--space-4) + var(--oa-safe-bottom));
  padding-inline: calc(var(--space-2) + var(--oa-safe-start)) calc(var(--space-2) + var(--oa-safe-end));
  background: var(--color-surface-container);
  color: var(--color-on-surface-variant);
}

.oa-nav-rail {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  inline-size: var(--size-nav-rail);
  padding-block: var(--space-3) var(--space-6);
  background: var(--color-surface);
  color: var(--color-on-surface-variant);
}

.oa-nav-bar__list,
.oa-nav-rail__list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.oa-nav-bar__list > li {
  display: flex;
  flex: 1 1 0;
  min-inline-size: 0;
}

.oa-nav-rail__list {
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.oa-nav-bar__item,
.oa-nav-rail__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-block-size: var(--size-touch-target);
  border-radius: var(--radius-full);
  color: var(--color-on-surface-variant);
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.oa-nav-bar__item {
  flex: 1 1 auto;
  min-inline-size: 0;
}

/* Rail destinations: 80px wide, at least 56px tall (component constants). */
.oa-nav-rail__item {
  inline-size: 80px;
  min-block-size: 56px;
}

/* Indicator pills: 64x32 in the bar, 56x32 in the rail (D-ARC-24). */
.oa-nav-bar__indicator,
.oa-nav-rail__indicator {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  block-size: 32px;
  border-radius: var(--radius-full);
}

.oa-nav-bar__indicator {
  inline-size: 64px;
}

.oa-nav-rail__indicator {
  inline-size: 56px;
}

.oa-nav-bar__indicator::before,
.oa-nav-rail__indicator::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: var(--z-behind);
  border-radius: inherit;
  background: currentColor;
  opacity: var(--oa-state, 0);
  pointer-events: none;
  transition: opacity var(--duration-short-3) var(--ease-standard);
}

.oa-nav-bar__label,
.oa-nav-rail__label {
  max-inline-size: 100%;
  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);
  overflow-wrap: break-word;
}

.oa-nav-bar__item:is([aria-current="page"], [aria-current="true"]),
.oa-nav-rail__item:is([aria-current="page"], [aria-current="true"]) {
  color: var(--color-on-surface);
}

.oa-nav-bar__item:is([aria-current="page"], [aria-current="true"]) .oa-nav-bar__indicator,
.oa-nav-rail__item:is([aria-current="page"], [aria-current="true"]) .oa-nav-rail__indicator {
  background: var(--color-primary-container);
  color: var(--color-on-primary-container);
}

.oa-nav-bar__item:is([aria-current="page"], [aria-current="true"]) .oa-nav-bar__label,
.oa-nav-rail__item:is([aria-current="page"], [aria-current="true"]) .oa-nav-rail__label {
  font-weight: var(--font-weight-bold);
}


/* -----------------------------------------------------------------------------
   Navigation drawer (consoles, from md; inside the modal side sheet below md):
   padding 12px, 48px group disclosures, 56px pill items whose whole row is
   the indicator, a hairline, an outlined "Back to ..." button (D-CSN-13,
   D-CSN-14, D-CSN-31). The shell's column or the sheet sets its width.
   -------------------------------------------------------------------------- */

.oa-nav-drawer {
  display: flex;
  flex-direction: column;
  inline-size: 100%;
  padding: var(--space-3);
  background: var(--color-surface);
  color: var(--color-on-surface-variant);
}

/* Destinations that belong to no group, "Overview" first (D-CSN-58), sit in a list of their own
   above the groups. */
.oa-nav-drawer > .oa-nav-drawer__list {
  margin-block-end: var(--space-2);
}

/* A count on a destination (a badge after the label) keeps the row's inline end. */
.oa-nav-drawer__item > .oa-badge {
  flex: 0 0 auto;
}

/* Inside a modal side sheet: the sheet's surface and padding hold it. */
.oa-nav-drawer--sheet {
  padding: 0;
  background: transparent;
}

.oa-nav-drawer__group {
  display: flex;
  flex-direction: column;
}

.oa-nav-drawer__group + .oa-nav-drawer__group {
  margin-block-start: var(--space-1);
}

.oa-nav-drawer__group-btn {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  inline-size: 100%;
  min-block-size: var(--size-touch-target);
  margin: 0;
  padding: var(--space-2) var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-on-surface-variant);
  font-family: inherit;
  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);
  text-align: start;
  cursor: pointer;
}

.oa-nav-drawer__group-label {
  flex: 1 1 auto;
  min-inline-size: 0;
}

/* expand_more turns 180deg when open; never mirrored (canonical 10.25). */
.oa-nav-drawer__chevron {
  flex: 0 0 auto;
  transition: transform var(--duration-short-4) var(--ease-standard);
}

.oa-nav-drawer__group-btn[aria-expanded="true"] .oa-nav-drawer__chevron {
  transform: rotate(180deg);
}

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

.oa-nav-drawer__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-drawer__icon {
  flex: 0 0 auto;
}

.oa-nav-drawer__label {
  flex: 1 1 auto;
  min-inline-size: 0;
}

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

.oa-nav-drawer__item:is([aria-current="page"], [aria-current="true"]) .oa-nav-drawer__icon {
  color: var(--color-on-primary-container);
}

/* An <hr>: its color is reset too, so no browser gray remains. */
.oa-nav-drawer__divider {
  block-size: 0;
  margin: var(--space-4);
  border: 0;
  border-block-start: 1px solid currentColor;
  color: var(--color-outline-variant);
}

/* Mixed onto an outlined, wide button (button.css): the way out of the
   console, with a mirrored arrow_back. Its label may wrap to a second line,
   but never inside the product name: base.css keeps every
   bdi[translate="no"] on one line, so "Global ID" never splits or
   scrambles in Arabic (canonical 1.2). */
.oa-nav-drawer__back {
  flex: 0 0 auto;
}


/* -----------------------------------------------------------------------------
   Tabs: underline tabs (D-CSN-16). 48px, 16px inline padding, label-md; rest
   on-surface-variant with the hover layer; selected primary-ink with a 3px
   primary-ink indicator inset 12px (3px top corners); the list scrolls
   sideways over a 1px outline-variant edge, so the ring is inset. --nav:
   tabs that change the address are a <nav> of links, drawn the same way.
   -------------------------------------------------------------------------- */

.oa-tabs {
  display: flex;
  flex-direction: column;
  gap: var(--space-stack-loose);
  min-inline-size: 0;
}

.oa-tabs__list {
  display: flex;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-block-end: 1px solid var(--color-outline-variant);
  list-style: none;
}

.oa-tabs__list > li {
  display: flex;
  flex: 0 0 auto;
}

.oa-tabs__tab {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-block-size: var(--size-touch-target);
  margin: 0;
  padding-block: 0;
  padding-inline: var(--space-4);
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--color-on-surface-variant);
  font-family: inherit;
  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);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--duration-short-3) var(--ease-standard);
}

/* The list scrolls, so it clips: the ring is drawn inside the tab. */
.oa-tabs__tab:is(:focus-visible, [data-demo-focus]) {
  outline-offset: var(--size-focus-inset);
}

/* The indicator covers the tab's transparent bottom border, so it sits on
   the list's hairline (1px layout maths). */
.oa-tabs__tab::after {
  content: "";
  position: absolute;
  inset-inline: var(--space-3);
  inset-block-end: -1px;
  block-size: 3px; /* the 3px indicator (canonical 6.2) */
  border-start-start-radius: 3px; /* lint-ok: 3px top corners, canonical 10.17 component constant */
  border-start-end-radius: 3px; /* lint-ok: 3px top corners, canonical 10.17 component constant */
  background: transparent;
  pointer-events: none;
  transition: background-color var(--duration-short-4) var(--ease-standard);
}

.oa-tabs__icon {
  flex: 0 0 auto;
}

.oa-tabs__tab[aria-selected="true"],
.oa-tabs--nav .oa-tabs__tab[aria-current="page"] {
  color: var(--color-primary-ink);
}

.oa-tabs__tab[aria-selected="true"]::after,
.oa-tabs--nav .oa-tabs__tab[aria-current="page"]::after {
  background: var(--color-primary-ink);
}

.oa-tabs__panel {
  min-inline-size: 0;
}


/* -----------------------------------------------------------------------------
   Stepper: the step header of flows of three or more steps (D-CSN-20).
   "Step 2 of 4" (label-md, on-surface-variant), the step heading (headline-md,
   focused when the step changes), a 4px segmented bar (done and current
   primary-ink, upcoming surface-container-highest, aria-hidden), then the
   step and its actions: Continue (filled lg) first, Back (text or outlined
   md); stacked full width below 640px (through .oa-actions--page).
   -------------------------------------------------------------------------- */

.oa-stepper {
  display: flex;
  flex-direction: column;
  gap: var(--space-stack-loose);
  min-inline-size: 0;
}

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

.oa-stepper__count {
  margin: 0;
  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(--text-label-md--font-weight);
}

.oa-stepper__title {
  margin: 0;
  color: var(--color-on-surface);
  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);
  text-wrap: balance;
}

.oa-stepper__bar {
  display: flex;
  gap: var(--space-1);
  margin-block-start: var(--space-2);
}

/* One segment per step: 4px tall, full corners (component constant). */
.oa-stepper__segment {
  flex: 1 1 0;
  block-size: 4px;
  border-radius: var(--radius-full);
  background: var(--color-surface-container-highest);
}

.oa-stepper__segment[aria-current="step"],
.oa-stepper__segment:has(~ .oa-stepper__segment[aria-current="step"]) {
  background: var(--color-primary-ink);
}

/* Mixed onto .oa-actions.oa-actions--page (button.css), which lays the
   buttons out: Continue first, full width and stacked below 640px; in a row
   from 640px, 12px apart, in reading order (canonical 10.1, 10.18). */
.oa-stepper__actions {
  min-inline-size: 0;
}


/* -----------------------------------------------------------------------------
   State layers (canonical 2.7): hover only under (hover: hover), press at
   once, nothing moves. Bar and rail destinations draw the layer on their
   indicator; drawer items, group buttons, the Menu row and tabs on themselves.
   -------------------------------------------------------------------------- */

.oa-app-shell__menu::before,
.oa-nav-drawer__group-btn::before,
.oa-nav-drawer__item::before,
.oa-tabs__tab::before {
  content: "";
  position: absolute;
  inset: -1px; /* over the 1px transparent edge as well */
  z-index: var(--z-behind);
  border-radius: inherit;
  background: currentColor;
  opacity: var(--oa-state, 0);
  pointer-events: none;
  transition: opacity var(--duration-short-3) var(--ease-standard);
}

@media (hover: hover) {
  .oa-nav-bar__item:hover,
  .oa-nav-rail__item:hover,
  .oa-nav-drawer__item:hover,
  .oa-nav-drawer__group-btn:hover,
  .oa-app-shell__menu:hover,
  .oa-tabs__tab:hover {
    --oa-state: var(--opacity-state-hover);
  }
}

.oa-nav-bar__item:active,
.oa-nav-rail__item:active,
.oa-nav-drawer__item:active,
.oa-nav-drawer__group-btn:active,
.oa-app-shell__menu:active,
.oa-tabs__tab:active {
  --oa-state: var(--opacity-state-pressed);
}

.oa-nav-bar__item:active .oa-nav-bar__indicator::before,
.oa-nav-rail__item:active .oa-nav-rail__indicator::before,
.oa-nav-drawer__item:active::before,
.oa-nav-drawer__group-btn:active::before,
.oa-app-shell__menu:active::before,
.oa-tabs__tab:active::before {
  transition-duration: 0ms; /* lint-ok: press shows at once (canonical 2.7) */
}


/* -----------------------------------------------------------------------------
   The current destination draws its icon filled (FILL 1, D-BCP-33), from the
   ARIA state, never a state class: the same axis setting as .oa-icon--filled
   in base.css. (base.css also keeps [hidden] hidden whatever display a class
   sets, which the bar, the drawer groups and the tab panels rely on.)
   -------------------------------------------------------------------------- */

.oa-nav-bar__item:is([aria-current="page"], [aria-current="true"]) .oa-nav-bar__icon,
.oa-nav-rail__item:is([aria-current="page"], [aria-current="true"]) .oa-nav-rail__icon,
.oa-nav-drawer__item:is([aria-current="page"], [aria-current="true"]) .oa-nav-drawer__icon,
.oa-tabs__tab[aria-selected="true"] .oa-tabs__icon,
.oa-tabs--nav .oa-tabs__tab[aria-current="page"] .oa-tabs__icon {
  font-variation-settings: "FILL" 1;
}


/* -----------------------------------------------------------------------------
   Forced colors (D-SEM-10): fills disappear, so the current destination,
   the selected tab and the step bar draw in system colors.
   -------------------------------------------------------------------------- */

@media (forced-colors: active) {
  .oa-nav-bar__item:is([aria-current="page"], [aria-current="true"]) .oa-nav-bar__indicator,
  .oa-nav-rail__item:is([aria-current="page"], [aria-current="true"]) .oa-nav-rail__indicator,
  .oa-nav-drawer__item:is([aria-current="page"], [aria-current="true"]) {
    border: 2px solid Highlight;
  }

  .oa-tabs__tab[aria-selected="true"]::after,
  .oa-tabs--nav .oa-tabs__tab[aria-current="page"]::after {
    forced-color-adjust: none;
    background: Highlight;
  }

  .oa-stepper__segment {
    forced-color-adjust: none;
    background: GrayText;
  }

  .oa-stepper__segment[aria-current="step"],
  .oa-stepper__segment:has(~ .oa-stepper__segment[aria-current="step"]) {
    background: Highlight;
  }
}


/* -----------------------------------------------------------------------------
   Print: navigation chrome is hidden and the shell becomes a document.
   -------------------------------------------------------------------------- */

@media print {
  .oa-app-shell {
    display: block;
    block-size: auto;
  }

  .oa-app-shell__main {
    overflow: visible;
  }

  .oa-app-shell__nav,
  .oa-app-shell__bar,
  .oa-app-shell__menu,
  .oa-nav-bar,
  .oa-nav-rail,
  .oa-nav-drawer,
  .oa-top-app-bar__end {
    display: none;
  }
}
