/* ==========================================================================
   CENTAURI 0.5.0 — the nav layer (authored; copied through)
   GENERATED by scripts/generate.mjs from scripts/tokens.source.mjs. Do not edit.
   A local edit is not a disagreement to adjudicate; it is a build that no
   longer reproduces, and scripts/check.mjs will say so.
   ========================================================================== */
/* -----------------------------------------------------------------------------
   CENTAURI — the navigation layer. One <nav>, two presentations, for both systems.

   The rules it encodes (ADR-010 §8-9, references/navigation.md):

     - ONE list of destinations, rendered as a TAB BAR under 600px and as a
       SIDE RAIL above it. The same element, so the order is identical at every
       width by construction and parity_check.py has nothing to find.
     - 3 to 5 destinations in the bar. More is an information-architecture
       problem, and nav_lint.py says so.
     - The rail COLLAPSES to icons and the bar can HIDE; the product toggles
       `data-rail` / `data-bar` on the shell and nothing else. Collapsing takes
       the exit timing, expanding the enter timing.
     - No top navigation as the primary. A page title is a heading, not a bar.
     - The SELECTED destination carries the tick — the same tick-terminated rule
       the dimension line uses — so "you are here" and "this is measured" are
       one device.
     - One nested level at most, so no destination is more than two clicks deep.

   Markup:

     <div class="centauri-shell" data-rail="expanded">
       <nav class="centauri-nav" id="nav" aria-label="Main">
         <button class="centauri-nav__toggle" aria-expanded="true" aria-controls="nav">…</button>
         <ul>
           <li><a href="/" aria-current="page"><svg …/><span class="centauri-nav__label">Board</span></a></li>
           …
         </ul>
         <a class="centauri-nav__action centauri-button centauri-button--primary" href="/new">New</a>
       </nav>
       <main>…</main>
     </div>
   -------------------------------------------------------------------------- */

.centauri-shell {
  --centauri-rail-size: var(--centauri-static-rail-expanded);
  display: grid;
  grid-template-columns: var(--centauri-rail-size) minmax(0, 1fr);
  min-block-size: 100dvh;
  transition: grid-template-columns var(--centauri-static-enter-base) var(--ease-standard);
}
.centauri-shell[data-rail="collapsed"] {
  --centauri-rail-size: var(--centauri-static-rail-collapsed);
  transition-duration: var(--centauri-static-exit-base);
  transition-timing-function: var(--ease-in);
}

/* ---- the rail (>= 600px) ------------------------------------------------- */
.centauri-nav {
  position: sticky; inset-block-start: 0;
  block-size: 100dvh;
  display: flex; flex-direction: column;
  gap: var(--centauri-scaled-2);
  padding: var(--centauri-scaled-3) var(--centauri-scaled-2);
  background: var(--color-surface);
  border-inline-end: var(--centauri-static-stroke-hairline) solid var(--color-hairline);
  overflow: hidden;
}
.centauri-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--centauri-scaled-1); }
.centauri-nav ul ul { padding-inline-start: var(--centauri-scaled-6); }
/* one nested level is the depth limit; a third level is not styled on purpose */
.centauri-nav ul ul ul { display: none; }

.centauri-nav a {
  position: relative;
  display: flex; align-items: center;
  gap: var(--centauri-static-gap-icon);
  min-block-size: var(--centauri-scaled-row-height);
  padding-inline: calc(var(--centauri-scaled-control-x) - var(--centauri-scaled-2));
  border-radius: var(--radius-control);
  color: var(--color-prose);
  text-decoration: none;
  font-size: var(--text-datum); line-height: var(--text-datum--line-height);
  white-space: nowrap;
  isolation: isolate;
}
.centauri-nav a > svg { inline-size: 20px; block-size: 20px; flex: none; }
.centauri-nav a[aria-current="page"] { color: var(--color-strong); }

/* THE TICK OF SELECTION. A short rule on the leading edge, in the accent,
   arriving with the enter timing and leaving with the exit timing. */
.centauri-nav a::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 50%;
  translate: 0 -50%;
  inline-size: 2px;
  block-size: 0;
  background: var(--color-accent);
  transition: block-size var(--centauri-static-exit-fast) var(--ease-in);
}
.centauri-nav a[aria-current="page"]::before {
  block-size: calc(var(--centauri-static-tick-length) * 2);
  transition-duration: var(--centauri-static-enter-fast);
  transition-timing-function: var(--ease-out);
}

/* the state layer on every destination */
.centauri-nav a::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: currentColor;
  opacity: 0; pointer-events: none;
  transition: opacity var(--centauri-static-exit-fast) var(--ease-in);
}
.centauri-nav a:hover::after { opacity: var(--centauri-static-state-hover); transition-duration: var(--centauri-static-enter-fast); transition-timing-function: var(--ease-standard); }
.centauri-nav a:active::after { opacity: var(--centauri-static-state-pressed); transition-duration: var(--centauri-static-duration-instant); }
.centauri-nav a[aria-current="page"]::after { opacity: var(--centauri-static-state-selected); }

.centauri-nav__toggle {
  align-self: flex-start;
  inline-size: calc(var(--centauri-static-rail-collapsed) - var(--centauri-scaled-2) * 2);
  block-size: var(--centauri-scaled-control-height);
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--color-muted);
  border-radius: var(--radius-control);
}
.centauri-nav__toggle > svg { inline-size: 20px; block-size: 20px; }

/* labels leave when the rail collapses; icons stay and the hit area does not
   shrink, so the collapsed rail is still 44px wide of target */
.centauri-nav__label {
  /* `text-overflow: ellipsis` does nothing without `white-space: nowrap` --
     the line wraps instead of being truncated, so a long destination name grew
     the rail item to two lines rather than ending in an ellipsis. The tab bar
     overrides this back to `normal` below, where a label has a whole column and
     two short lines are the intended shape. */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: opacity var(--centauri-static-enter-fast) var(--ease-out);
}
.centauri-shell[data-rail="collapsed"] .centauri-nav__label { opacity: 0; transition-duration: var(--centauri-static-exit-fast); transition-timing-function: var(--ease-in); }
.centauri-shell[data-rail="collapsed"] .centauri-nav ul ul { display: none; }

/* the ONE primary action: at the foot of the rail, full width when expanded.
   A button sized like every other button; the rail does not make it a monument. */
.centauri-nav__action {
  margin-block-start: auto;
  display: inline-flex; align-items: center; justify-content: flex-start;
  gap: var(--centauri-static-gap-icon);
  inline-size: 100%; min-block-size: var(--centauri-scaled-control-height);
  padding-inline: var(--centauri-scaled-3);
}
.centauri-nav__action > svg { flex: 0 0 auto; inline-size: 20px; block-size: 20px; }
.centauri-nav__action .centauri-nav__label { white-space: nowrap; }
/* the primary action keeps the button's own ink: `.centauri-nav a` outranks
   `.centauri-button--primary` by one class, and without this the dark theme's
   light accent carried prose-colored text at 1.4:1 (measured 2026-09-08) */
.centauri-nav a.centauri-nav__action.centauri-button--primary { color: light-dark(var(--color-card), var(--color-surface)); }

/* ---- the account block: the ways OUT, which are not destinations ---------
   Every console has two or three of these -- sign out, switch to the other
   app, the reader's own account -- and until 2026-09-15 the system named no
   home for them, so they became rows of the destination list. That is a real
   failure and nav_lint.py reports it as NAV002: a console with five
   destinations and three exits is an eight-item navigation, and a reader who
   tabs to "the navigation" gets the exits with the work.

   They sit at the foot, OUTSIDE the <ul>, under a rule. `top_level_links()`
   skips this subtree the way it skips the brand and the primary action.

     <nav class="centauri-nav" id="nav" aria-label="Main">
       <button class="centauri-nav__toggle" …>…</button>
       <ul>…3 to 5 destinations…</ul>
       <a class="centauri-nav__action …" href="/new">…</a>
       <div class="centauri-nav__account">
         <p class="centauri-nav__account-who">Signed in as …</p>
         <a href="/app">The field app</a>
         <a href="/account">Your account</a>
         <button type="submit">Sign out</button>
       </div>
     </nav>

   Under 600px it is not drawn: five destinations already own the bar, and a
   sixth seat for "Sign out" is the bar spending a fifth of a phone on the way
   out. The product renders the same block inside its account sheet, and names
   that sheet's trigger to parity_check.py with --allow. -------------------- */
.centauri-nav__account {
  margin-block-start: var(--centauri-scaled-2);
  padding-block-start: var(--centauri-scaled-2);
  border-block-start: var(--centauri-static-stroke-hairline) solid var(--color-hairline);
  display: flex; flex-direction: column; gap: var(--centauri-scaled-1);
  min-inline-size: 0;
}
/* Who is signed in is a statement, not a control, so it takes the micro label
   and never a row's hit area. */
.centauri-nav__account-who {
  margin: 0; padding-inline: var(--centauri-scaled-3);
  font-size: var(--text-micro); line-height: var(--text-micro--line-height);
  color: var(--color-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* An exit is a nav row's shape in the muted ink, because it is reached from
   here and is not where the work is. The <button> is included by tag: signing
   out is a POST, and a form's submit is the honest control for it. */
.centauri-nav__account a,
.centauri-nav__account button {
  display: flex; align-items: center; gap: var(--centauri-static-gap-icon);
  min-block-size: var(--centauri-scaled-control-height);
  padding-inline: var(--centauri-scaled-3);
  border: 0; background: transparent; text-align: start;
  color: var(--color-muted); text-decoration: none;
  font: inherit;
  border-radius: var(--radius-control);
  min-inline-size: 0;
}
.centauri-nav__account a > svg,
.centauri-nav__account button > svg { inline-size: 20px; block-size: 20px; flex: none; }
.centauri-nav__account a:hover,
.centauri-nav__account button:hover { color: var(--color-strong); }
/* Collapsed, the rail keeps the icons and drops the words -- the same rule the
   destinations take. The line about who is signed in has no icon to fall back
   to, so it goes rather than being clipped to three characters. */
.centauri-shell[data-rail="collapsed"] .centauri-nav__account-who { display: none; }
.centauri-shell[data-rail="collapsed"] .centauri-nav__account a,
.centauri-shell[data-rail="collapsed"] .centauri-nav__account button { justify-content: center; padding-inline: 0; }
@media (max-width: 599.98px) {
  .centauri-nav__account { display: none; }
}
.centauri-shell[data-rail="collapsed"] .centauri-nav__action { padding-inline: 0; justify-content: center; inline-size: var(--centauri-scaled-control-height); }
/* the label leaves the layout, never the accessible name: a "+" with no name
   is a button a screen reader announces as "button" */
.centauri-shell[data-rail="collapsed"] .centauri-nav__action .centauri-nav__label,
.centauri-nav__label--hidden {
  position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; opacity: 1 !important;
}

/* ---- the tab bar (< 600px) ----------------------------------------------- */
@media (max-width: 599.98px) {
  .centauri-shell { grid-template-columns: minmax(0, 1fr); }
  .centauri-shell > main, .centauri-shell > .centauri-main {
    /* room for the bar, plus the phone's own inset under it */
    padding-block-end: calc(var(--centauri-static-tabbar-height) + env(safe-area-inset-bottom, 0px));
  }
  .centauri-nav {
    position: fixed; inset-block-end: 0; inset-inline: 0; inset-block-start: auto;
    block-size: auto;
    flex-direction: row; align-items: stretch;
    gap: 0; padding: 0 0 env(safe-area-inset-bottom, 0px);
    background: var(--color-sheet);
    border-inline-end: 0;
    border-block-start: var(--centauri-static-stroke-hairline) solid var(--color-hairline);
    z-index: 10;
    transition: translate var(--centauri-static-enter-base) var(--ease-out);
  }
  /* the bar is collapsible too: the product hides it on a downward scroll or
     while the keyboard is up, and it leaves with the exit timing */
  .centauri-shell[data-bar="hidden"] .centauri-nav {
    translate: 0 100%;
    transition-duration: var(--centauri-static-exit-base);
    transition-timing-function: var(--ease-in);
  }
  /* WCAG 2.2 SC 2.4.11 Focus Not Obscured (Minimum), AA: "when a component
     receives keyboard focus, the component is not entirely hidden due to
     author-created content". Hiding the bar does not remove its links from the
     tab order, so a keyboard user could reach a link whose box sat entirely
     below the viewport -- focused, and invisible. Measured on 2026-09-09 at
     375x812: the focused link's box was y 813 to 869 with the viewport 812
     tall, and the bar stayed hidden.

     Focus inside the bar therefore overrides the hide. Higher specificity than
     the rule above, so source order does not decide it. It returns on the ENTER
     timing, because it is arriving. */
  .centauri-shell[data-bar="hidden"] .centauri-nav:focus-within {
    translate: none;
    transition-duration: var(--centauri-static-enter-base);
    transition-timing-function: var(--ease-out);
  }
  .centauri-nav__toggle { display: none; }
  /* `min-inline-size: 0` on every box between the bar and the text, not only
     on the item. A flex item takes its minimum from its content unless it is
     told otherwise, and one wrapper left at `auto` sizes the bar from its
     longest label. Measured 2026-09-15 at 320px, SC 1.4.10's floor: the item's
     own `min-inline-size: 0` below is already enough for the markup this layer
     ships -- five 54px shares, document exactly 320px, before and after -- so
     these two add nothing there and are here for the product that puts a
     wrapper in the chain, where they are the difference between truncating and
     not. */
  .centauri-nav ul { flex: 1; min-inline-size: 0; flex-direction: row; gap: 0; }
  .centauri-nav ul ul { display: none; }
  .centauri-nav li { flex: 1 1 0; min-inline-size: 0; }
  .centauri-nav a {
    min-inline-size: 0;
    flex-direction: column; justify-content: center;
    gap: var(--centauri-scaled-0);
    min-block-size: var(--centauri-static-tabbar-height);
    padding-inline: var(--centauri-scaled-1);
    border-radius: var(--radius-chip);
    font-size: var(--text-micro); line-height: var(--text-micro--line-height);
    letter-spacing: 0.02em;
  }
  /* The ring is drawn INSIDE the item here, and the reason is measured. The
     bar carries `overflow: hidden` (it clips the rail's labels when collapsed,
     and the bar inherits it), a tab item fills the bar's full 56px inside a
     57px box, and the standard 2px ring at a 2px offset therefore lands from
     4px above the item to 4px below it -- entirely outside the bar, clipped on
     every edge. Measured 2026-09-09 at 375x812: ring 752-816, bar 755-812, so
     all four destinations had NO visible focus indicator at all.

     Inset keeps the width and the color identical -- the invariant is one ring
     that never varies by state or severity, and a direction is neither -- and
     it still lands on `sheet`, the bar's own ground, which the gate measures at
     10.53:1. WCAG 2.2 SC 2.4.11. */
  .centauri-nav a:focus-visible { outline-offset: calc(-1 * var(--centauri-static-focus-offset)); }
  .centauri-nav a > svg { inline-size: 24px; block-size: 24px; }
  /* In the tab bar a label owns a whole column and two short lines are the
     intended shape, so wrapping is restored -- and the ellipsis is turned off
     with it, because `text-overflow` inherited from the rail rule would
     otherwise sit on a wrapping box, where it draws nothing and only muddles
     what the rule means. */
  .centauri-nav__label {
    opacity: 1 !important; max-inline-size: 100%;
    white-space: normal; text-overflow: clip;
    /* THIS is the line that was missing, and the defect was silent. Restoring
       `white-space: normal` above is not enough on its own, because a
       destination name is ONE WORD and a word does not wrap at its own middle:
       longer than its column it simply overflowed, and the bar's `overflow:
       hidden` cut it -- with no ellipsis, because the rule above turns
       `text-overflow` off here on purpose. So "Customers" was drawn as
       "Customer" and nothing on screen said a character had gone. Measured
       2026-09-15 at 320px with five destinations: 61px of text in a 50px box,
       one 11px line. With this it wraps to the two short lines the bar is
       shaped for -- 50px, 22px, nothing lost. ("Subscriptions", 77px, likewise.)

       `anywhere` rather than `break-word`: CSS Text 3 §5.4 counts only what
       `anywhere` introduces when computing min-content, and min-content is what
       the column is sized from. */
    overflow-wrap: anywhere;
  }
  /* the tick moves to the top edge and lies horizontal */
  .centauri-nav a::before {
    inset-inline-start: 50%; inset-block-start: 0;
    translate: -50% 0;
    inline-size: 0; block-size: 2px;
    transition: inline-size var(--centauri-static-exit-fast) var(--ease-in);
  }
  .centauri-nav a[aria-current="page"]::before { inline-size: calc(var(--centauri-static-tick-length) * 4); block-size: 2px; }
  /* the primary action is the last item of the bar, not a floating button */
  .centauri-nav__action {
    margin: 0; flex: 0 0 auto; align-self: center;
    margin-inline: var(--centauri-scaled-2);
    inline-size: var(--centauri-static-target-coarse); min-block-size: var(--centauri-static-target-coarse);
    padding: 0; justify-content: center;
  }
  .centauri-nav__action > svg { inline-size: 24px; block-size: 24px; }
  .centauri-nav__action .centauri-nav__label {
    position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
}

/* ---- the site variant: a top bar at and above 600px, the same tab bar below --
   For a public WEBSITE rather than a product: four or five pages a visitor
   reads once, no signed-in state, and a brand that has to be the first thing
   on the page. A side rail there reads as an application the visitor has not
   opened yet (found 2026-09-07 on the capabilities site, against the firm's
   own main site, which has a top bar). The ONE nav holds: under 600px it is
   the tab bar above, unchanged, so the phone rule still stands -- a thumb
   reaches the bottom edge, not the top; at and above 600px it lies along the
   top edge instead of the leading one. It hides on a downward scroll through
   the same data-bar attribute the tab bar uses, which is its collapse; there
   is no toggle, and nav_lint.py accepts that on this variant only.

     <div class="centauri-shell" data-nav="site" data-bar="shown">
       <nav class="centauri-nav centauri-nav--site" id="nav" aria-label="Main">
         <a class="centauri-nav__brand" href="/"><svg …/><span>The firm</span></a>
         <ul>…3 to 5 destinations, each with its icon for the bar…</ul>
         <a class="centauri-nav__action centauri-button centauri-button--primary" href="/contact">…</a>
       </nav>
       <main>…</main>
     </div>
   -------------------------------------------------------------------------- */
.centauri-shell[data-nav="site"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
}
.centauri-nav__brand {
  display: inline-flex; align-items: center;
  gap: var(--centauri-static-gap-icon);
  padding-inline: 0;
  color: var(--color-strong);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.centauri-nav .centauri-nav__brand > svg { inline-size: 24px; block-size: 24px; flex: none; }
@media (min-width: 600px) {
  .centauri-nav--site {
    position: sticky; inset-block-start: 0;
    block-size: auto;
    flex-direction: row; align-items: center;
    gap: var(--centauri-scaled-5);
    padding: var(--centauri-scaled-2) var(--centauri-scaled-5);
    border-inline-end: 0;
    border-block-end: var(--centauri-static-stroke-hairline) solid var(--color-hairline);
    z-index: 10;
    transition: translate var(--centauri-static-enter-base) var(--ease-out);
  }
  .centauri-shell[data-bar="hidden"] .centauri-nav--site {
    translate: 0 -100%;
    transition-duration: var(--centauri-static-exit-base);
    transition-timing-function: var(--ease-in);
  }
  .centauri-nav--site .centauri-nav__toggle { display: none; }
  .centauri-nav--site ul { flex-direction: row; gap: var(--centauri-scaled-1); margin-inline-start: auto; }
  .centauri-nav--site ul ul { display: none; }
  /* icons belong to the bar; in a row of words they are noise */
  .centauri-nav--site ul li a > svg { display: none; }
  /* the tick lies along the bottom edge, as it does under a tab */
  .centauri-nav--site ul a::before {
    inset-inline-start: 50%; inset-block-start: auto; inset-block-end: 0;
    translate: -50% 0;
    inline-size: 0; block-size: 2px;
    transition: inline-size var(--centauri-static-exit-fast) var(--ease-in);
  }
  .centauri-nav--site ul a[aria-current="page"]::before {
    inline-size: calc(var(--centauri-static-tick-length) * 4); block-size: 2px;
    transition-duration: var(--centauri-static-enter-fast);
    transition-timing-function: var(--ease-out);
  }
  .centauri-nav--site .centauri-nav__action { margin-block-start: 0; inline-size: auto; }
}
@media (max-width: 599.98px) {
  /* The brand has no seat in a tab bar; the page carries the name. This was
     scoped to `--site` until 2026-09-15, when the console demo put a wordmark
     in the rail: under 600px the brand took a sixth seat beside five
     destinations and the action, and Chrome at 390px rendered "Journeys" as
     "Journe" and "Account" as "Accour" while the wordmark itself wrapped onto
     two lines. Every variant's tab bar has the same three-to-five-seat budget,
     so the rule was never about the site.

     `.centauri-nav .centauri-nav__brand` and not `.centauri-nav__brand`: the
     layer sets `display: flex` on `.centauri-nav a` (0,1,1), which outranks a
     bare class (0,1,0) whatever the order, so the first de-scoped version of
     this rule changed nothing and the browser still reported `flex`. The
     `--site` rule it replaces was 0,2,0, which is why that one worked. */
  .centauri-nav .centauri-nav__brand { display: none; }
}

/* ---- in-page tabs -------------------------------------------------------- */
/* Within one destination. The same tick, under the selected tab. */
.centauri-tabs {
  display: flex; gap: var(--centauri-scaled-1);
  border-block-end: var(--centauri-static-stroke-hairline) solid var(--color-hairline);
  overflow-x: auto;
}
.centauri-tabs [role="tab"] {
  position: relative;
  min-block-size: var(--centauri-scaled-control-height);
  padding-inline: var(--centauri-scaled-control-x);
  border: 0; background: transparent;
  color: var(--color-muted);
  font: inherit; font-size: var(--text-datum);
  white-space: nowrap;
  isolation: isolate;
}
.centauri-tabs [role="tab"][aria-selected="true"] { color: var(--color-strong); }
.centauri-tabs [role="tab"]::before {
  content: "";
  position: absolute; inset-block-end: -1px; inset-inline-start: 50%;
  translate: -50% 0;
  inline-size: 0; block-size: 2px;
  background: var(--color-accent);
  transition: inline-size var(--centauri-static-exit-fast) var(--ease-in);
}
.centauri-tabs [role="tab"][aria-selected="true"]::before {
  inline-size: calc(100% - var(--centauri-scaled-control-x));
  transition-duration: var(--centauri-static-enter-fast);
  transition-timing-function: var(--ease-out);
}
[role="tabpanel"][hidden] { display: none; }
