/* ============================================================================
   TOM SHAW — Authenticated App Shell
   Two-level navigation: a persistent product rail (level 1) and a collapsible
   section nav (level 2). Requires ts-tokens.css; pairs with ts-portal.css.

   Layout:
     ┌────┬──────────────────────────────────────┐
     │    │ topbar (60px, spans rest of viewport)│
     │rail├──────────┬───────────────────────────┤
     │56px│ nav 240px│ content (white)           │
     └────┴──────────┴───────────────────────────┘
   Collapsing the nav returns its 240px to content. The rail never collapses —
   losing it would strand the user between products.
   ========================================================================= */

/* --- Shell frame --------------------------------------------------------- */
.ts-shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  font-size: var(--ts-fs-ui);
  line-height: var(--ts-lh-ui);
  background: var(--ts-white);
  color: var(--ts-ink);
}
.ts-shell__main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.ts-shell__body { display: flex; flex: 1 1 auto; min-height: 0; }

/* ============================================================================
   LEVEL 1 — Product rail. Black, 56px, full height, always present.
   ========================================================================= */
.ts-rail {
  position: sticky;
  top: 0;
  align-self: flex-start;
  flex: 0 0 var(--ts-rail-w);
  width: var(--ts-rail-w);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--ts-space) * .5);
  padding: calc(var(--ts-space) * 1.5) 0;
  /**
   * THE RAIL IS ALWAYS BLACK — it does not follow the theme.
   *
   * Deliberate exception to the shell tokens. The rail is the brand's anchor
   * on every authenticated screen and the last of the black allocation that
   * survives the light theme; a near-white rail leaves an in-shell screen with
   * effectively no black on it at all. The section nav and topbar still flip.
   *
   * Everything inside the rail therefore uses the on-dark tokens
   * unconditionally, NOT --ts-shell-*, in both themes.
   */
  background: var(--ts-black);
  z-index: var(--ts-z-rail);
}
.ts-rail :focus-visible { outline-color: var(--ts-focus-dark); }   /* rail is always black */

.ts-rail__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: calc(var(--ts-space) * 2);
  border-radius: var(--ts-radius-ui);
  color: var(--ts-white);
  text-decoration: none;
  font-weight: var(--ts-fw-black);
  font-size: 17px;
  letter-spacing: .02em;
}
.ts-rail__logo em { font-style: normal; color: var(--ts-violet-300); }

/**
 * Stacked TS monogram — the rail mark.
 *
 * The REAL artwork, traced pixel-exact from assets/tomshaw-monogram.png on
 * 15 Aug 2026 (source 256x256, ink box 157x217). Not a sketch: the bitmap was
 * sampled on a 200x200 grid, the ink bounding box measured, and horizontal
 * runs merged into nine rectangles. It replaced a hand-drawn approximation
 * that was square and inset — the mark is PORTRAIT (aspect 0.724) and its
 * bars are full-bleed.
 *
 * Height is fixed and width follows, so the aspect cannot drift.
 *
 * Monochrome on purpose. The rail's violet is already spent on the active
 * product tile, which is the 8% allocation; a violet logo would compete with
 * the one thing in the rail that is meant to carry colour.
 *
 * Fill is currentColor, so it follows .ts-rail__logo and needs no dark variant.
 */
.ts-rail__mark {
  height: 26px;
  width: auto;
  fill: currentColor;
}

.ts-rail__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ts-on-dark-icon);
  border-radius: var(--ts-radius-ui);
  cursor: pointer;
  transition: background var(--ts-dur-fast) var(--ts-ease),
              color var(--ts-dur-fast) var(--ts-ease);
}
/* stroke-width is in VIEWBOX units and scales with the glyph. A 24-unit
   viewBox drawn at 20px scales by 20/24, so 1.7 rendered as 1.42px — thin
   enough to look soft at 1x. 2.04 is the value that actually renders 1.7px;
   2 is close enough and lands nearer the pixel grid. See 01 §5. */
.ts-rail__item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; vector-effect: non-scaling-stroke; }
.ts-rail__item:hover { background: var(--ts-wash-dark); color: var(--ts-white); }
/* Violet fill is the only saturated colour in the rail — it marks the one
   product you are in. This is the 8% violet allocation, spent deliberately. */
.ts-rail__item.is-active { background: var(--ts-violet); color: var(--ts-white); }
.ts-rail__item.is-active:hover { background: var(--ts-violet-600); }

.ts-rail__spacer { flex: 1 1 auto; }

/* Unread / attention dot on a rail icon */
.ts-rail__item[data-badge]::after {
  content: "";
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ts-error);
  border: 2px solid var(--ts-black);   /* rail is always black */
}

/* ============================================================================
   TOPBAR — 60px. Toggle, breadcrumb, search, account actions.
   ========================================================================= */
.ts-topbar {
  position: sticky;
  top: 0;
  z-index: var(--ts-z-sticky);
  display: flex;
  align-items: center;
  gap: calc(var(--ts-space) * 1.5);
  height: var(--ts-topbar-h);
  flex: 0 0 var(--ts-topbar-h);
  padding: 0 calc(var(--ts-space) * 2);
  background: var(--ts-white);
  border-bottom: 1px solid var(--ts-grey-light);
}

.ts-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--ts-radius-ui);
  color: var(--ts-grey-text);
  cursor: pointer;
  transition: background var(--ts-dur-fast) var(--ts-ease), color var(--ts-dur-fast) var(--ts-ease);
}
.ts-iconbtn:hover { background: var(--ts-grey-card); color: var(--ts-ink); }
/* 2, not 1.7 — see the note on .ts-rail__item svg. */
.ts-iconbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; vector-effect: non-scaling-stroke; }

/* Theme toggle glyph: exactly one shows per theme. In light the moon invites
   dark; in dark the sun invites light. Default (no attribute) = light = moon. */
.ts-iconbtn__moon { display: block; }
.ts-iconbtn__sun  { display: none; }
[data-theme="dark"] .ts-iconbtn__moon { display: none; }
[data-theme="dark"] .ts-iconbtn__sun  { display: block; }
.ts-iconbtn__moon[hidden], .ts-iconbtn__sun[hidden] { display: none; }

/* --- Breadcrumb: the trail the two nav levels just walked ---------------- */
.ts-crumbs {
  display: flex;
  align-items: center;
  gap: calc(var(--ts-space) * 1);
  font-size: var(--ts-fs-crumb);
  min-width: 0;
}
.ts-crumbs a {
  color: var(--ts-grey-text);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 3px;
}
.ts-crumbs a:hover { color: var(--ts-purple); text-decoration: underline; text-underline-offset: 3px; }
.ts-crumbs__sep { color: var(--ts-grey-light); }
.ts-crumbs__current {
  font-weight: var(--ts-fw-bold);
  color: var(--ts-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Search: centred, 40px, pill ---------------------------------------- */
.ts-topbar__search { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }
.ts-search {
  position: relative;
  width: 100%;
  max-width: 360px;
}
.ts-search__icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; fill: none; stroke: var(--ts-grey-mid); stroke-width: 1.8; vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.ts-search__input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 40px;
  font-family: inherit;
  font-size: var(--ts-fs-ui);
  color: var(--ts-ink);
  background: var(--ts-white);
  border: 1px solid var(--ts-border-control);   /* 4.29:1 — 1.4.11 */
  /* Rectangle, following .ts-btn and .ts-input. After the primary button lost
     its pill on 15 Aug 2026 the topbar search was the only 100px control left
     in the shell, so it read as a different family from everything under it. */
  border-radius: var(--ts-radius-ui);
  transition: border-color var(--ts-dur-fast) var(--ts-ease), box-shadow var(--ts-dur-fast) var(--ts-ease);
}
.ts-search__input::placeholder { color: var(--ts-grey-mid); }
.ts-search__input:hover { border-color: var(--ts-ink); }
.ts-search__input:focus {
  outline: none;
  border-color: var(--ts-violet);
  box-shadow: 0 0 0 3px var(--ts-violet-100);
}

/* 8px, not 4px. At 4px the 36px hit areas touch, so the icons read as one
   crowded cluster rather than three controls. */
.ts-topbar__actions { display: flex; align-items: center; gap: var(--ts-space); }
/* The account control is a different category from the utility icons, so it
   gets its own breathing room rather than sitting flush against the bell. */
.ts-topbar__actions .ts-avatar { margin-left: calc(var(--ts-space) * 1.5); }

/**
 * The topbar avatar is CHROME, not an accent.
 *
 * It was a solid --ts-purple disc, which put the single heaviest, most
 * saturated element on every authenticated screen next to 20px outline icons —
 * a jump in visual weight that pulled the eye to the account button, of all
 * things. It also spent the violet allocation on furniture: rule 1 reserves
 * violet for meaning, and the rail's active tile is where that spend belongs.
 *
 * Violet-50 ground with violet-900 initials keeps it recognisably ours and
 * recognisably an account, at a weight that matches the icons beside it.
 * 13.9:1 — comfortably AAA.
 */
.ts-avatar {
  width: var(--ts-avatar-sm); height: var(--ts-avatar-sm);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--ts-violet-50);
  color: var(--ts-violet-900);
  font-size: var(--ts-fs-ui-sm);
  /* 700, not 800. When the primary button dropped to 700 on 15 Aug 2026 the
     avatar became the only 800 inside the shell — one screen, one stray
     weight. 01 §2 allows two weights per screen; the wordmark keeps 800. */
  font-weight: var(--ts-fw-bold);
  border: 0;
  cursor: pointer;
}

/* --- Tooltip with keyboard hint ----------------------------------------- */
.ts-tip { position: relative; }
/**
 * The bubble is laid out whether or not it is visible — opacity: 0 keeps its
 * box — so a nowrap bubble on a trigger near the right edge widens the PAGE at
 * a narrow viewport, which rule 11 does not allow. Two changes:
 *
 *   width: max-content + max-width  — short labels ("Noble1", "Hide menu")
 *   still sit on one line; a sentence wraps at 34ch instead of running off.
 *   That is what .ts-tip--wrap used to be for; it is now the default and the
 *   modifier is a no-op kept for compatibility.
 *
 * Measured at 320px on 15 Aug 2026: gallery-display.html carried a 296px
 * bubble and scrolled the page 73px sideways.
 */
.ts-tip__bubble {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: var(--ts-z-float);
  display: flex;
  align-items: center;
  gap: calc(var(--ts-space) * 1);
  padding: 5px 10px;
  white-space: normal;
  width: max-content;
  max-width: min(34ch, calc(100vw - var(--ts-space) * 6));
  line-height: var(--ts-lh-ui);
  font-size: var(--ts-fs-ui-sm);
  color: var(--ts-white);
  background: var(--ts-ink);
  border-radius: var(--ts-radius-chip);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ts-dur-fast) var(--ts-ease);
}
.ts-tip:hover .ts-tip__bubble,
.ts-tip:focus-within .ts-tip__bubble { opacity: 1; }
.ts-tip--right .ts-tip__bubble { top: 50%; left: calc(100% + 10px); transform: translateY(-50%); }
.ts-kbd {
  font-family: var(--ts-mono);
  font-size: 10px;
  line-height: 1;
  padding: 3px 5px;
  color: var(--ts-on-dark-1);
  background: var(--ts-wash-dark-2);
  border-radius: 3px;
}

/* ============================================================================
   LEVEL 2 — Section nav. 240px, black, collapsible.
   ========================================================================= */
.ts-nav {
  flex: 0 0 var(--ts-nav-w);
  width: var(--ts-nav-w);
  display: flex;
  flex-direction: column;
  background: var(--ts-shell-bg-2);           /* white in light · #111 in dark (one step off rail) */
  color: var(--ts-shell-fg);
  border-right: 1px solid var(--ts-shell-hairline);
  overflow: hidden;
  transition: width var(--ts-dur-base) var(--ts-ease),
              flex-basis var(--ts-dur-base) var(--ts-ease);
}
.ts-nav :focus-visible { outline-color: var(--ts-shell-focus); }
.ts-nav__scroll { flex: 1 1 auto; overflow-y: auto; padding: calc(var(--ts-space) * 2) 0; }

/* Collapsed: width to zero, content stays in the DOM but leaves the tab order */
.ts-shell[data-nav="closed"] .ts-nav { flex-basis: 0; width: 0; border-right-width: 0; }

/**
 * The product name, not a masthead.
 *
 * Was --ts-fs-page (20px) sitting under a full TOM SHAW wordmark, which made
 * the nav open with two brand statements before a single navigable row — and
 * pushed the actual sections below the fold on a laptop. The rail already
 * carries the mark 56px to the left; repeating it here is redundant at best,
 * and the wordmark shipped was the WHITE asset, invisible on the light nav.
 *
 * 15px semibold reads as a section owner rather than a title card.
 */
.ts-nav__title {
  padding: calc(var(--ts-space) * 1.5) calc(var(--ts-space) * 2) calc(var(--ts-space) * 1);
  font-size: 15px;
  font-weight: var(--ts-fw-bold);
  letter-spacing: -.005em;
  white-space: nowrap;
}
.ts-nav__group {
  padding: calc(var(--ts-space) * 3) calc(var(--ts-space) * 2) var(--ts-space);
  font-family: var(--ts-mono);
  font-size: var(--ts-fs-ui-label);
  letter-spacing: var(--ts-tracking-label);
  text-transform: uppercase;
  color: var(--ts-shell-fg-dim);   /* light: grey-text 7.1:1 · dark: on-dark-3 5.3:1 (was .42, failed) */
  white-space: nowrap;
}
.ts-nav__group:first-child { padding-top: 0; }

.ts-nav__item {
  display: flex;
  align-items: center;
  gap: calc(var(--ts-space) * 1.5);
  height: 40px;
  padding: 0 calc(var(--ts-space) * 2);
  margin: 0 var(--ts-space) 2px;
  font-size: var(--ts-fs-ui);
  color: var(--ts-shell-fg-muted);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--ts-radius-ui);
  border-left: 3px solid transparent;
  transition: background var(--ts-dur-fast) var(--ts-ease), color var(--ts-dur-fast) var(--ts-ease);
}
.ts-nav__item svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.7; vector-effect: non-scaling-stroke; }
.ts-nav__item:hover { background: var(--ts-shell-wash); color: var(--ts-shell-fg); }
/* Active: violet-300 (8.0:1) on black · violet-700 (6.8:1) on the light wash.
   The left rule stays brand violet in both themes. */
.ts-nav__item.is-active {
  background: var(--ts-shell-wash-active);
  border-left-color: var(--ts-violet);
  color: var(--ts-shell-active-fg);
  font-weight: var(--ts-fw-bold);
}
.ts-nav__item .ts-badge { margin-left: auto; }

/* Fixed height for the same reason as .ts-chip — a count badge that changes
   size with the line-height of the row it sits in is not a component. */
.ts-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(var(--ts-space) * 2.5);    /* 20px */
  min-width: calc(var(--ts-space) * 2.5);
  font-family: var(--ts-mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 0 6px;
  border-radius: var(--ts-radius-pill);
  background: var(--ts-violet);
  color: var(--ts-white);
}
.ts-badge--count { background: var(--ts-shell-count-bg); color: var(--ts-shell-count-fg); }

.ts-nav__foot {
  flex: 0 0 auto;
  padding: calc(var(--ts-space) * 2);
  border-top: 1px solid var(--ts-shell-hairline);
  font-family: var(--ts-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ts-shell-fg-dim);    /* light: grey-text · dark: on-dark-3 5.3:1 (was .40, failed) */
  white-space: nowrap;
}

/* ============================================================================
   CONTENT
   ========================================================================= */
.ts-content {
  flex: 1 1 auto;
  min-width: 0;
  padding: calc(var(--ts-space) * 4) var(--ts-gutter) calc(var(--ts-space) * 8);
  background: var(--ts-white);
}
.ts-content__inner { max-width: var(--ts-content-max); margin: 0 auto; }
.ts-content--wide .ts-content__inner { max-width: none; }

.ts-pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(var(--ts-space) * 2);
  flex-wrap: wrap;
  margin-bottom: calc(var(--ts-space) * 3);
}
.ts-pagehead h1 {
  margin: 0;
  font-size: var(--ts-fs-page);
  line-height: var(--ts-lh-page);
  font-weight: var(--ts-fw-bold);
}
.ts-pagehead p {
  margin: 4px 0 0;
  font-size: var(--ts-fs-ui);
  color: var(--ts-grey-text);
  max-width: 68ch;
}
.ts-pagehead__actions { display: flex; gap: var(--ts-space); flex-wrap: wrap; }

/* Compact button sizing inside the shell — 54px is a document-scale control */
.ts-shell .ts-btn { height: 40px; padding: 0 calc(var(--ts-space) * 2.5); font-size: var(--ts-fs-ui); }

/* --- Data table ---------------------------------------------------------- */
.ts-tablewrap {
  overflow-x: auto;
  border: 1px solid var(--ts-grey-light);
  border-radius: var(--ts-radius-card);
  background: var(--ts-white);
}
.ts-table { width: 100%; border-collapse: collapse; font-size: var(--ts-fs-ui); min-width: 720px; }
.ts-table th {
  position: sticky; top: 0;
  text-align: left;
  font-family: var(--ts-mono);
  font-size: var(--ts-fs-ui-label);
  font-weight: var(--ts-fw-bold);
  letter-spacing: var(--ts-tracking-label);
  text-transform: uppercase;
  /* Black band, not grey on grey. Puts the black allocation back into a
     data screen, and the column labels stop competing with the row text. */
  color: var(--ts-on-dark-1);
  background: var(--ts-ink);
  padding: 10px calc(var(--ts-space) * 1.5);
  white-space: nowrap;
}
/**
 * 8px / 12px, not 12px / 16px. Two reasons, both measured on data-table.html
 * at 1440px on 15 Aug 2026:
 *
 *   Density. With 12px of vertical padding a "comfortable" row rendered 49px,
 *   not the 44px --ts-row-h claims. The row-height tokens were decorative,
 *   because padding always beat them. At 8px the padded content is 37px, so
 *   the token becomes the thing that actually sets the height — and the
 *   compact / relaxed toggle finally means what it says.
 *
 *   Column width. 16px of side padding across eight columns spent 256px on
 *   air, which forced "Edge gateway", "Non-production" and "Network
 *   engineering" to wrap. Row heights alternated 67 / 49 / 67 / 49 down the
 *   table — the single worst thing on the screen for scanning. At 12px every
 *   row is one line and the table still fits without a scrollbar.
 */
.ts-table td {
  padding: var(--ts-space) calc(var(--ts-space) * 1.5);
  border-top: 1px solid var(--ts-grey-light);
  vertical-align: middle;
}
/**
 * A ROW header is a cell, not the header band.
 *
 * `<th scope="row">` is the correct markup for the first column of a data
 * table and doc 06 §6 asks for it — but every rule above was written for
 * column headers, so charts.html and calendar.html rendered their entire first
 * column as a black sticky bar with 11px uppercase mono in it. The band
 * belongs to <thead>; a row header keeps the cell's geometry and only takes
 * the bold weight that says "this names the row".
 */
.ts-table tbody th {
  position: static;
  padding: var(--ts-space) calc(var(--ts-space) * 1.5);
  border-top: 1px solid var(--ts-grey-light);
  vertical-align: middle;
  font-family: var(--ts-font);
  font-size: var(--ts-fs-ui);
  font-weight: var(--ts-fw-bold);
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
  color: var(--ts-ink);
  background: transparent;
}
.ts-table tbody tr:hover { background: var(--ts-violet-50); }
.ts-table .ts-num { font-family: var(--ts-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ts-table a { color: var(--ts-purple); text-decoration: none; font-weight: var(--ts-fw-bold); }
.ts-table a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --- Status chip: shape as well as colour -------------------------------
   Height and line-height are declared, not inherited. Without them the chip
   was 24px inside a .ts-card (line-height 1.5) and 20px in a table cell that
   had not set one — the same block, two sizes, on two screens. A label that
   changes size with its container is not a component. */
.ts-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: calc(var(--ts-space) * 3);      /* 24px */
  padding: 0 10px 0 8px;
  font-size: var(--ts-fs-ui-sm);
  line-height: 1;
  font-weight: var(--ts-fw-bold);
  border-radius: var(--ts-radius-pill);
  white-space: nowrap;
}
/**
 * A chip carries severity, and severity is never colour alone (06 §4). Every
 * variant therefore has its OWN shape, and no two shapes repeat:
 *
 *   critical  diamond        high  square       medium  disc
 *   low       dash           resolved  hollow ring
 *
 * This was wrong until 14 Aug 2026: --medium inherited the default disc and
 * --resolved explicitly set one, so the two were identical in greyscale and
 * only colour separated "still a problem" from "fixed". --low did not exist
 * at all, so screens either invented one or dropped the row.
 */
.ts-chip::before {
  content: "";
  flex: 0 0 auto;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.ts-chip--critical { color: var(--ts-error-ink);   background: var(--ts-error-50); }
.ts-chip--high     { color: var(--ts-warning-ink); background: var(--ts-warning-50); }
.ts-chip--medium   { color: var(--ts-violet-900);  background: var(--ts-violet-50); }
.ts-chip--low      { color: var(--ts-grey-text);   background: var(--ts-grey-card); }
.ts-chip--resolved { color: var(--ts-success-ink); background: var(--ts-success-50); }

.ts-chip--critical::before { border-radius: 2px; transform: rotate(45deg); }  /* diamond     */
.ts-chip--high::before     { border-radius: 1px; }                            /* square      */
.ts-chip--medium::before   { border-radius: 50%; }                            /* disc        */
.ts-chip--low::before      { height: 3px; border-radius: 1px; }               /* dash        */
.ts-chip--resolved::before {                                                  /* hollow ring */
  background: transparent;
  box-shadow: inset 0 0 0 2px currentColor;
}

/* --- Empty state --------------------------------------------------------- */
.ts-empty {
  max-width: 520px;
  margin: calc(var(--ts-space) * 8) auto;
  text-align: center;
}
.ts-empty h2 { margin: 0 0 var(--ts-space); font-size: var(--ts-fs-h3); font-weight: var(--ts-fw-bold); }
.ts-empty p { margin: 0 0 calc(var(--ts-space) * 3); font-size: var(--ts-fs-ui); color: var(--ts-grey-text); }

/* ============================================================================
   RESPONSIVE — below 900px the nav becomes an overlay, not a column.
   ========================================================================= */
@media (max-width: 900px) {
  .ts-nav {
    position: fixed;
    top: var(--ts-topbar-h);
    left: var(--ts-rail-w);
    bottom: 0;
    z-index: var(--ts-z-nav);
    box-shadow: var(--ts-shell-elevation);
  }
  .ts-shell[data-nav="closed"] .ts-nav { box-shadow: none; }
  .ts-topbar__search { justify-content: flex-end; }
  .ts-search { max-width: 220px; }
  .ts-content { padding-left: calc(var(--ts-space) * 2); padding-right: calc(var(--ts-space) * 2); }
}
@media (max-width: 620px) {
  .ts-crumbs__sep, .ts-crumbs a { display: none; }   /* keep only where you are */
  .ts-topbar__search { display: none; }
  /* Three 36px icon buttons, an avatar and their gaps do not fit a 320px
     viewport beside the 56px rail: the row overflowed by 3px, which is 3px of
     page scroll (rule 11). The gutter and the account control's extra breathing
     room are the two things that can give without shrinking a tap target. */
  .ts-topbar { gap: var(--ts-space); padding: 0 var(--ts-space); }
  .ts-topbar__actions .ts-avatar { margin-left: 4px; }
  .ts-crumbs__current { min-width: 0; }
  /* A 154px wordmark in a 249px topbar is 53px of page scroll at 320px
     (measured on form-layouts.html). The rail carries the mark 56px to the
     left and links home, so the second one is the redundant one. */
  .ts-topbar .ts-wordmark--asset { display: none; }
}

/* --- Nav scrim ------------------------------------------------------------
   Only exists below 900px, where .ts-nav becomes an overlay. Built by
   ts-app-shell.js rather than authored into 18 pages.

   display is set here, so [hidden] has to be restated — an author declaration
   beats the user-agent rule regardless of specificity (contract §8.5). */
.ts-nav__scrim {
  position: fixed;
  inset: var(--ts-topbar-h) 0 0 var(--ts-rail-w);
  z-index: calc(var(--ts-z-nav) - 1);
  display: block;
  background: var(--ts-backdrop);
}
.ts-nav__scrim[hidden] { display: none; }
@media (min-width: 901px) {
  /* Belt and braces: above the breakpoint the nav is layout, never an overlay. */
  .ts-nav__scrim { display: none; }
}
