:root {
  /* TheBridge's own colours (BridgeRoads' palette: BR Slate, BR Turquoise), for its wordmark. */
  --thebridge-slate: #5a5b5d;
  --thebridge-turquoise: #00a995;
  --brand: #007b77;
  --brand-secondary: #4b4b4f;
  --brand-raw: #00aaa5;
  --brand-tint: #eaf8f7;
  --brand-line: #9bdedb;
  --accent: #ef7f1a;
  --nav: #343438;
  --nav-active: #007b77;
  --soft: #f4f7f7;
  --ink: #27272a;
  --tenant-font: Inter, "Segoe UI", system-ui, sans-serif;
  /* The product rail is one width for every page. Shells must spend this token on
     their first grid track rather than restating a number: the Documents register
     shipped a 216px rail because it copied the pre-unification value out of
     library.css into a stylesheet that loads after this one. */
  --bb-rail-w: 70px;
  /* A COLOUR FOR EACH STATUS (Bryan's review video, 2026-11-06), one pair a state: a tint behind dark words of the
     same hue, every pair at least 6:1 (WCAG AA asks 4.5:1 for small text). The documents register's badges, the
     Register tab's status and anything else naming where a document or task is up to read these, so a state
     wears the same colour on every page. TheBridge's pages are light only (tasks.html color-scheme: light), so
     there is no dark set to keep in step. */
  --status-draft-bg: #e7ebf1; --status-draft-fg: #3f4d63;
  --status-review-bg: #fff1d6; --status-review-fg: #7a4a00;
  --status-reviewing-bg: #ffe9dc; --status-reviewing-fg: #8a3a0c;
  --status-published-bg: #d9f3e4; --status-published-fg: #13603f;
  --status-archived-bg: #efe9e6; --status-archived-fg: #5e4d44;
  --status-withdrawn-bg: #fdecec; --status-withdrawn-fg: #8a1c1c;
  --status-imported-bg: #efe8fb; --status-imported-fg: #5b3a96;
  --status-planned-bg: #eaf8f7; --status-planned-fg: #00605c;
  --status-outside-bg: #eef0f2; --status-outside-fg: #475467;
}

@media (max-width: 1000px) { :root { --bb-rail-w: 68px; } }
@media (max-width: 640px) { :root { --bb-rail-w: 54px; } }

/* ─── The product rail — one rule, every page ──────────────────────────────────
   Home is the template; this is Home's rail as it actually renders (theme.css already
   re-themed every rail white). The ID wins over any page stylesheet, so a page cannot
   restyle it. It applies at EVERY width: the rail is a left column on a phone too (68px, then
   54px, from the token's breakpoints) — no page has a bottom bar or hides it. */
#bb-rail,
.bb-rail {
  box-sizing: border-box;
  background: #fff;
  background-image: none;
  color: var(--ink);
  border-right: 1px solid #dce5e4;
  box-shadow: none;
  z-index: 16;
}
#bb-rail,
.bb-rail {
  width: var(--bb-rail-w);
  min-width: var(--bb-rail-w);
  max-width: var(--bb-rail-w);
  /* 6px, not Home's old 8px: at 70px the compact label needs the 4px so "Documents" fits. */
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
}
.bb-header-brand { margin-right: 12px; }

/* Secondary authenticated workspaces use the same shell and rail as the main pages. */
body.bridgeconnect-detail-page.bridgeconnect-shared-shell-page {
  display: grid;
  grid-template-columns: var(--bb-rail-w) minmax(0, 1fr);
  grid-template-rows: 68px 72px minmax(0, 1fr);
  height: 100dvh;
  overflow: hidden;
}
.bridgeconnect-detail-page > .bridgeconnect-shell-topbar { grid-column: 1 / -1; grid-row: 1; }
.bridgeconnect-detail-page > .bridgeconnect-detail-navigation {
  grid-column: 1; grid-row: 2 / 4;
  min-height: 0;
}
.bridgeconnect-detail-page > .topbar {
  grid-column: 2; grid-row: 2;
  position: relative;
  top: auto;
  z-index: 10;
}
.bridgeconnect-detail-page > main {
  grid-column: 2; grid-row: 3;
  min-height: 0;
  overflow: auto;
}
.bridgeconnect-detail-title { font-size: 15px; font-weight: 700; }
body.bridgeconnect-report-page.bridgeconnect-shared-shell-page {
  display: grid;
  grid-template-columns: var(--bb-rail-w) minmax(0, 1fr);
  grid-template-rows: 68px minmax(0, 1fr);
  height: 100dvh;
}
.bridgeconnect-report-page > .bridgeconnect-shell-topbar { grid-column: 1 / -1; grid-row: 1; }
.bridgeconnect-report-page > .bridgeconnect-report-navigation { grid-column: 1; grid-row: 2; min-height: 0; }
.bridgeconnect-report-page > .studio {
  grid-column: 2; grid-row: 2;
  width: 100%; height: 100% !important; min-height: 0; min-width: 0;
}
@media (max-width: 900px) {
  body.bridgeconnect-detail-page.bridgeconnect-shared-shell-page { grid-template-rows: 60px 60px minmax(0, 1fr); }
  body.bridgeconnect-report-page.bridgeconnect-shared-shell-page { grid-template-rows: 60px minmax(0, 1fr); }
  .bridgeconnect-report-page > .studio { overflow: auto; }
}

body,
button,
input,
select,
textarea {
  font-family: var(--tenant-font);
}

/* Home is the canonical TheBridge product header. Authenticated process,
 * work and reporting surfaces use this exact shell above their local tools. */
.bridgeconnect-shared-shell-page {
  box-sizing: border-box;
  overflow: hidden;
}

.bridgeconnect-shared-shell-page > .library-shell,
.bridgeconnect-shared-shell-page > .app-shell,
.bridgeconnect-shared-shell-page > .runtime-shell,
.bridgeconnect-shared-shell-page > .case-shell,
.bridgeconnect-shared-shell-page > .review-shell,
.bridgeconnect-shared-shell-page > .shell,
.bridgeconnect-shared-shell-page > .studio {
  height: calc(100% - 68px) !important;
  min-height: 0;
}

.bridgeconnect-shell-topbar {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  height: 68px;
  padding: 0 28px;
  border-bottom: 1px solid #dce5e4;
  background: #fff;
}

.bridgeconnect-shell-brand {
  min-width: 270px;
}

/* The company this window works in, beside TheBridge's name on every page (onboarding video,
   2026-10-27). The brand gives up its reserved width so the two read as one line:
   "TheBridge | ABC Constructions". A long name is cut with an ellipsis, never the actions. */
.bridgeconnect-shell-brand:has(+ .bridgeconnect-shell-company:not([hidden])) { min-width: 0; }
.bridgeconnect-shell-company {
  flex: 0 1 auto;
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid #dce5e4;
  color: var(--ink);
  font-family: var(--tenant-font);
  font-size: 16px;
  font-weight: 650;
  line-height: 28px;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bridgeconnect-shell-company[hidden] { display: none; }

/* ONE SEARCH ACROSS THE COMPANY'S RECORDS (record-search.js, NRQ-UIX-017): between the company and the actions. */
.bridgeconnect-shell-search { position: relative; flex: 1 1 320px; min-width: 0; max-width: 460px; margin-left: auto; }
.bridgeconnect-shell-search[hidden] { display: none; }
.bridgeconnect-shell-search:not([hidden]) + .bridgeconnect-shell-actions { margin-left: 10px; }
.record-search-form { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid #d0d5dd; border-radius: 10px; background: #fff; }
.record-search-form:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.record-search-icon { color: #667085; font-size: 18px; line-height: 1; }
.record-search-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 15px var(--tenant-font); }
.record-search-panel { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: min(560px, 92vw); max-height: min(70vh, 640px); overflow: auto; padding: 12px; border: 1px solid #dce5e4; border-radius: 12px; background: #fff; box-shadow: 0 16px 40px rgba(16, 24, 40, .16); z-index: 60; }
.record-search-panel[hidden] { display: none; }
.record-search-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; padding-bottom: 10px; border-bottom: 1px solid #eef2f2; }
.record-search-filter { display: grid; gap: 2px; color: #475467; font: 600 12px var(--tenant-font); }
.record-search-filter select, .record-search-filter input[type="date"] { min-height: 32px; padding: 0 8px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: var(--ink); font: 13px var(--tenant-font); }
.record-search-archived { display: flex; align-items: center; gap: 6px; align-self: end; min-height: 32px; }
.record-search-summary { margin: 10px 2px 6px; color: #475467; font: 13px var(--tenant-font); }
.record-search-list { margin: 0; padding: 0; list-style: none; }
.record-search-link { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 8px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.record-search-link:hover, .record-search-link:focus-visible { background: #f2f6f6; outline: none; }
.record-search-kind { grid-row: span 2; align-self: start; padding: 2px 8px; border-radius: 999px; background: #eef2f2; color: #344054; font: 600 11px var(--tenant-font); }
.record-search-title { font: 600 14px var(--tenant-font); overflow-wrap: anywhere; }
.record-search-meta { color: #667085; font: 12px var(--tenant-font); overflow-wrap: anywhere; }
.record-search-more { margin: 8px 2px 2px; min-height: 34px; padding: 0 14px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: var(--ink); font: 600 13px var(--tenant-font); cursor: pointer; }
@media (max-width: 900px) {
  .bridgeconnect-shell-search { flex-basis: 40px; }
  .record-search-panel { position: fixed; top: 64px; left: 12px; right: 12px; min-width: 0; }
}
/* On a phone the search is its ⌕, 44px square, and opens across the header while it is in use. Squeezed to its
   share of the header it was a 4px field: results came, but nobody could see what they had typed (phone sweep,
   25 Nov). The field itself lies over the ⌕, unseen, so the tap that opens it is the tap that focuses it. */
@media (max-width: 640px) {
  .bridgeconnect-shell-search { flex: 0 0 44px; margin-left: auto; }
  .bridgeconnect-shell-search .record-search-form { position: relative; width: 44px; height: 44px; padding: 0; justify-content: center; }
  .bridgeconnect-shell-search .record-search-input { position: absolute; inset: 0; width: 100%; opacity: 0; font-size: 16px; }
  .bridgeconnect-shell-search:focus-within { position: fixed; top: 8px; left: 12px; right: 12px; z-index: 1150; max-width: none; }
  .bridgeconnect-shell-search:focus-within .record-search-form { width: auto; padding: 0 12px; justify-content: flex-start; box-shadow: 0 8px 24px rgba(16, 24, 40, .16); }
  .bridgeconnect-shell-search:focus-within .record-search-input { position: static; opacity: 1; }
  .bridgeconnect-shell-search:focus-within .record-search-panel { top: 60px; }
  .record-search-filter select, .record-search-filter input[type="date"] { min-height: 44px; font-size: 16px; }
}
.bridgeconnect-shell-actions { flex: none; }

.bridgeconnect-shell-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  letter-spacing: normal;
}

.bridgeconnect-shell-actions a {
  color: var(--ink);
  font-family: var(--tenant-font);
  text-decoration: none;
}

.bridgeconnect-shell-signout {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  color: var(--ink) !important;
  font-family: var(--tenant-font);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.bridgeconnect-shell-signout:hover { border-color: var(--brand); color: var(--brand) !important; }
.bridgeconnect-shell-signout:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.bridgeconnect-shell-dashboard {
  margin-right: 4px;
  color: #667085 !important;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.bridgeconnect-shell-alerts {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #dce5e4;
  border-radius: 10px;
  background: #fff;
}

.bridgeconnect-shell-alerts span {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 9px;
  background: #d92d20;
  color: #fff;
  font-size: 8px;
  font-weight: 850;
}

.bridgeconnect-shell-alerts span[hidden] {
  display: none;
}

.bridgeconnect-shell-alerts svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bridgeconnect-shell-work,
.bridgeconnect-shell-role {
  min-height: 40px;
  border: 1px solid #dce5e4;
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
}

.bridgeconnect-shell-work {
  display: flex;
  align-items: center;
  padding: 0 13px;
}

/* On My tasks itself the bell is the current page, as a side-bar item would be. */
.bridgeconnect-shell-work.active {
  border-color: var(--brand);
  background: var(--brand-tint, #e8f6f4);
}

/* Held until the person is known (theme.js holdForIdentity): never a placeholder role, side
   bar or count that then jumps. The frame itself draws at once. */
html[data-shell-identity="pending"] [data-process-navigation] .process-navigation-list,
html[data-shell-identity="pending"] [data-shell-role-label],
/* The header's shortcuts too: "Traditional dashboard" is offered only where the organisation has
   it, so drawn first it flashed and vanished on Processes, Documents and Reports (the customer's
   review, 2026-10-27). */
html[data-shell-identity="pending"] .bridgeconnect-shell-actions {
  visibility: hidden;
}
[data-shell-work-count][data-pending] { visibility: hidden; }

/* The count reads as an alert: a bell, then "My tasks", then the number. */
.bridgeconnect-shell-work .bridgeconnect-shell-bell {
  flex: none; width: 16px; height: 16px; margin-right: 6px;
  fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}

.bridgeconnect-shell-work strong {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  place-items: center;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
}

.bridgeconnect-shell-role {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 11px;
}

.bridgeconnect-shell-role strong {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 10px;
}

/* The organisation pill: the same shape as My work and the role pill, and it is the
   switcher — the native select sits invisibly over it. Absent for one organisation. */
.bridgeconnect-shell-org, .bridgeconnect-shell-language { position: relative; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 11px 0 13px; border: 1px solid #dce5e4; border-radius: 10px; background: #fff; color: var(--ink); font-family: var(--tenant-font); font-size: 12px; font-weight: 750; white-space: nowrap; cursor: pointer; }
.bridgeconnect-shell-org svg, .bridgeconnect-shell-language svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bridgeconnect-shell-org .bridgeconnect-rail-org-mark { display: none; }
.bridgeconnect-shell-org select, .bridgeconnect-shell-language select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font: inherit; }
.bridgeconnect-shell-org:focus-within, .bridgeconnect-shell-language:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.bridgeconnect-shell-language[aria-busy="true"] { opacity: .6; cursor: progress; }

@media (max-width: 900px) {
  .bridgeconnect-shell-topbar {
    gap: 8px;
    height: 60px;
    padding: 0 12px;
  }

  .bridgeconnect-shared-shell-page > .library-shell,
  .bridgeconnect-shared-shell-page > .app-shell,
  .bridgeconnect-shared-shell-page > .runtime-shell,
  .bridgeconnect-shared-shell-page > .case-shell,
  .bridgeconnect-shared-shell-page > .review-shell,
  .bridgeconnect-shared-shell-page > .shell,
  .bridgeconnect-shared-shell-page > .studio {
    height: calc(100% - 60px) !important;
  }

  .bridgeconnect-shell-brand {
    min-width: 0;
  }

  .bridgeconnect-shell-company { padding-left: 9px; font-size: 13px; }
  .bridgeconnect-shell-brand { flex: none; }

  .bridgeconnect-shell-dashboard,
  .bridgeconnect-shell-role > span {
    display: none;
  }

  /* My tasks stays on a phone: it is the only door to it (the side bar has no My tasks item),
     drawn as the bell and its count. The words stay for a screen reader, not the eye. */
  .bridgeconnect-shell-work { padding: 0 10px; }
  .bridgeconnect-shell-work [data-shell-work-label] {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .bridgeconnect-shell-work .bridgeconnect-shell-bell { margin-right: 0; }

  /* The globe alone on a phone: it is the sign for "language" in every language. */
  .bridgeconnect-shell-language > span {
    display: none;
  }

  .bridgeconnect-shell-actions {
    margin-left: auto;
  }
}

.bridgeconnect-shared-shell-page > .app-shell > .topbar {
  height: 56px;
  grid-template-columns: minmax(280px, 1fr) auto;
  padding-inline: 10px 22px;
}

.bridgeconnect-shared-shell-page > .app-shell > .topbar .brand {
  gap: 7px;
}

.designer-tool-label {
  color: #667085;
  font-size: 11px;
  font-weight: 750;
}

@media (max-width: 1100px) {
  .bridgeconnect-shared-shell-page > .app-shell > .topbar {
    grid-template-columns: minmax(190px, 1fr) auto;
    padding-inline: 6px 10px;
  }

  .designer-tool-label {
    display: none;
  }
}

/* One information architecture on every authenticated process surface. */
[data-process-navigation] {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.process-navigation-list {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 4px;
  width: 100%;
}

.process-navigation-list a,
.process-navigation-ai {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border-radius: 8px;
  color: #d5dce7;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .14s, color .14s, transform .14s;
}

.process-navigation-list a:hover,
.process-navigation-list a.active,
.process-navigation-list a[aria-current="page"] {
  background: var(--brand-tint);
  color: var(--brand);
}

.process-navigation-list a:hover {
  transform: translateX(2px);
}

.process-navigation-list svg,
.process-navigation-ai svg {
  width: 19px;
  min-width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.process-navigation-ai {
  margin-top: 14px;
  border: 1px solid color-mix(in srgb, var(--brand-raw) 45%, white);
  background: color-mix(in srgb, var(--brand-raw) 14%, transparent);
  color: #fff;
  font-weight: 700;
}

.process-navigation-ai:hover {
  border-color: color-mix(in srgb, var(--brand-raw) 70%, white);
  background: color-mix(in srgb, var(--brand-raw) 26%, transparent);
}

/* The shared shell is light on every surface; keep labels AA-readable. */
.process-navigation-list a {
  color: #475467;
}

/* One account and organisation footer on the shared rail of every main workspace. */
#bb-rail .bridgeconnect-rail-footer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; width: 100%; min-width: 0; margin-top: auto; }
#bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-role,
#bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-org {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: 58px; gap: 3px; padding: 7px 2px;
  border: 0; border-radius: 7px;
  background: #fff; color: #475467; font-family: var(--tenant-font);
  font-size: 12px; font-weight: 560; line-height: 1.2; text-align: center;
  text-decoration: none;
}
#bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-role:hover,
#bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-org:hover { background: var(--brand-tint); color: var(--brand); }
#bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-role > span,
#bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-org > span { display: block; width: 100%; min-width: 0; max-width: 100%; overflow: hidden; font-size: 9px; font-weight: 560; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
/* "Company" whole at every rail width and in every font (Home video, 2026-10-27: "it's cut off… just
   have company there"): the caret sits up beside the building, off the word. */
#bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-org > span { box-sizing: border-box; padding-inline-end: 0; }
#bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-role strong { order: -1; width: 19px; height: 19px; font-size: 9px; }
#bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-org .bridgeconnect-rail-org-mark { display: block; width: 19px; height: 19px; flex: none; stroke-width: 1.7; }
#bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-org .bridgeconnect-shell-org-caret { position: absolute; inset-inline-end: 3px; top: 9px; width: 8px; height: 8px; stroke-width: 1.7; }
#bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-switch { inset: 0; }
#bb-rail .bridgeconnect-account-menu { position: fixed; z-index: 90; left: calc(var(--bb-rail-w) + 8px); bottom: 72px; width: 200px; padding: 6px; border: 1px solid #dce5e4; border-radius: 9px; background: #fff; box-shadow: 0 12px 32px #1e35342b; }
#bb-rail .bridgeconnect-account-menu[hidden] { display: none; }
#bb-rail .bridgeconnect-account-menu a { display: flex; align-items: center; min-height: 37px; padding: 0 10px; border-radius: 5px; color: #26354c; text-decoration: none; font-size: 12px; }
#bb-rail .bridgeconnect-account-menu a:hover, #bb-rail .bridgeconnect-account-menu a:focus-visible { background: var(--brand-tint); color: var(--brand); }

.process-navigation-ai {
  border-color: var(--brand-line);
  background: var(--brand-tint);
  color: #005f5b;
}

.process-navigation-ai:hover {
  border-color: var(--brand);
  background: #d8f1ef;
  color: #004f4c;
}

[data-navigation-compact] .process-navigation-list a,
[data-navigation-compact] .process-navigation-ai {
  min-height: 58px;
  justify-content: center;
  gap: 3px;
  padding: 7px 2px;
  flex-direction: column;
  text-align: center;
}

[data-navigation-compact] .process-navigation-list a:hover {
  transform: none;
}

[data-navigation-compact] .process-navigation-list span,
[data-navigation-compact] .process-navigation-ai span {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-navigation-compact] .process-navigation-ai {
  margin-top: auto;
}

.process-section-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.process-section-tabs a {
  min-height: 34px;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--muted, #667085);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

.process-section-tabs a:hover {
  background: var(--brand-tint);
  color: var(--brand);
}

.process-section-tabs a.active,
.process-section-tabs a[aria-current="page"] {
  background: var(--brand-tint);
  color: var(--brand);
}

@media (max-width: 1100px) {
  [data-process-navigation]:not([data-navigation-compact]) .process-navigation-list a,
  [data-process-navigation]:not([data-navigation-compact]) .process-navigation-ai {
    min-height: 52px;
    justify-content: center;
    gap: 3px;
    padding: 7px 4px;
    flex-direction: column;
    text-align: center;
  }

  [data-process-navigation]:not([data-navigation-compact]) .process-navigation-list span,
  [data-process-navigation]:not([data-navigation-compact]) .process-navigation-ai span {
    font-size: 0;
  }

  [data-process-navigation]:not([data-navigation-compact]) .process-navigation-ai {
    margin-top: auto;
  }
}

[data-theme-mark] {
  overflow: hidden;
}

[data-theme-mark].has-tenant-logo {
  width: 132px;
  min-width: 132px;
  padding: 4px 7px;
  border-radius: 8px;
  background: #fff;
}

[data-theme-mark].has-tenant-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tenant-theme-swatch {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid rgb(23 32 51 / 18%);
  border-radius: 9px;
  box-shadow: inset 0 0 0 3px #fff;
}

.brand [data-theme-mark].has-tenant-logo,
.runtime-brand[data-theme-mark].has-tenant-logo,
.case-nav [data-theme-mark].has-tenant-logo {
  width: 44px;
  min-width: 44px;
  padding: 4px;
}

.primary,
.button.primary,
button.primary {
  background-color: var(--brand);
  border-color: var(--brand);
}

.brand-mark {
  background: var(--brand);
  color: #fff;
}

.library-nav,
.nav,
.review-shell > nav {
  background: var(--nav);
}

.library-nav,
.nav,
.review-shell > nav,
.side-nav,
.runtime-nav,
.case-nav {
  background-image: none;
}

.library-nav nav a.active,
.library-nav nav a:hover,
.nav nav a.active,
.nav nav a:hover,
.review-shell > nav a.active,
.review-shell > nav a:hover,
.runtime-nav .active {
  background: var(--nav-active);
}

.ai-strip,
.form-ai-bar,
.create-panel .ai-create-intro,
.collaboration-card.proposal {
  border-color: var(--brand-line);
  background: var(--brand-tint);
}

.ai-strip .spark,
.form-ai-mark,
.eyebrow,
.breadcrumb,
.tabs .active,
.library-tabs .active,
.connector-actions .test {
  color: var(--brand);
}

.form-studio-dialog .form-field-card.selected,
.form-studio-dialog .form-section-card.selected,
.task-row.selected {
  border-color: var(--brand-line);
  box-shadow: inset 3px 0 var(--brand);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--brand-line);
  outline-offset: 2px;
}

/* One product lockup across every TheBridge process surface. */
.bridgeconnect-product-brand {
  display: inline-flex;
  align-items: center;
  direction: ltr;
  gap: 9px;
  min-width: 0;
  color: #34343b;
  text-decoration: none;
  unicode-bidi: isolate;
}

.bridgeconnect-product-symbol {
  display: block;
  width: 34px;
  min-width: 34px;
  height: 31px;
  overflow: hidden;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.bridgeconnect-product-symbol img {
  display: block;
  width: auto;
  max-width: none;
  height: 31px;
}

.bridgeconnect-product-wordmark {
  display: inline-flex;
  /* The product is ONE word: TheBridge. "Bridge" and "Connect" stay separate flex
     items so "Connect" can carry its own colour, and the gap is what decides whether
     they read as one name or two — a flex container drops the whitespace between its
     items, so the markup has no say in it either way. Zero closes them up.

     This was .26em, which is the entire reason the header used to read as two words.
     A non-zero value here splits the name again on every surface at once. */
  gap: 0;
  align-items: baseline;
  /* TheBridge's own mark, the same in every organisation (customer, 2026-10-23): BridgeRoads' logotype
     colours — "The" in BR Slate, "Bridge" in BR Turquoise, as the grid symbol beside it and the
     BridgeRoads logo — at the logo's medium weight, not a heavy black. A brand name has no contrast
     minimum (WCAG 1.4.3 logotypes), so the turquoise is the brand's own, not darkened. The
     organisation's colours theme everything else (--brand, --nav-active …), never the product's name.
     Customer review c11 had it wear each organisation's colours: "Bridge" turned slate on ABC. */
  color: var(--thebridge-slate);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1;
}

.bridgeconnect-product-wordmark b {
  color: inherit;
  font: inherit;
}

.bridgeconnect-product-wordmark b:last-child {
  color: var(--thebridge-turquoise);
}

.bridgeconnect-product-brand.compact {
  justify-content: center;
  gap: 0;
}

.runtime-brand.bridgeconnect-product-brand,
.case-nav .brand.bridgeconnect-product-brand {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 10px;
  background: #fff !important;
}

.library-brand.bridgeconnect-product-brand,
.nav .brand.bridgeconnect-product-brand,
.review-shell > nav .brand.bridgeconnect-product-brand {
  color: #34343b;
}

.brand div span.bridgeconnect-product-symbol,
.brand div span.bridgeconnect-product-wordmark {
  display: inline-flex;
}

@media (max-width: 1200px) {
  .library-brand .bridgeconnect-product-wordmark {
    display: none;
  }

  .library-brand.bridgeconnect-product-brand {
    justify-content: center;
  }
}

@media (max-width: 1000px) {
  .review-shell > nav .bridgeconnect-product-wordmark {
    display: none;
  }
}

/* TheBridge product shell -------------------------------------------------
 * Every authenticated process surface keeps its own information architecture,
 * but shares the same quiet, light navigation and interaction language.
 */
html,
body {
  background: var(--soft);
  color: var(--ink);
}

.library-nav,
.nav,
.review-shell > nav,
.runtime-nav,
.case-nav,
.product-nav,
.side-nav {
  background: #fff;
  color: var(--ink);
  border-right: 1px solid #dce5e4;
  box-shadow: none;
}

.library-brand,
.nav .brand,
.review-shell > nav .brand,
.side-nav .brand {
  color: var(--ink);
}

.library-brand > span,
.brand-mark,
.runtime-brand,
.case-nav .brand,
.workspace-brand-mark {
  background: var(--brand);
  color: #fff;
  border-radius: 10px;
  box-shadow: none;
}

.library-brand > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  font-size: 11px;
  font-weight: 850;
}

.review-shell > nav .brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.review-shell > nav .brand [data-theme-mark] {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
}

.library-nav nav a,
.nav nav a,
.review-shell > nav a,
.runtime-nav > a,
.runtime-nav > button,
.case-nav a,
.nav-item,
.side-nav nav a {
  color: #525c66;
}

.library-nav nav a.active,
.library-nav nav a:hover,
.nav nav a.active,
.nav nav a:hover,
.review-shell > nav a.active,
.review-shell > nav a:hover,
.runtime-nav .active,
.runtime-nav > a:hover,
.runtime-nav > button:hover,
.case-nav .active,
.case-nav a:hover,
.nav-item.active,
.nav-item:hover,
.side-nav nav a.active,
.side-nav nav a:hover {
  background: var(--brand-tint);
  color: var(--brand);
  box-shadow: none;
  transform: none;
}

.library-user,
.nav-foot,
.side-footer {
  border-top-color: #dce5e4;
}

.library-user > span,
.ai-orb {
  background: var(--brand-tint);
  color: var(--brand);
  border-color: var(--brand-line);
}

.library-user b,
.nav-foot b,
.side-footer b,
.brand b {
  color: var(--ink);
}

.library-user small,
.nav-foot small,
.side-footer small,
.brand small {
  color: var(--muted);
}

.library-shell:has(.create-panel.closed) {
  grid-template-columns: var(--bb-rail-w) minmax(650px, 1fr);
}

.library-shell main,
.case-shell main,
.review-shell main,
.shell main {
  background: var(--soft);
}

.library-head h1,
.topbar h1,
.work-head h1,
.review-shell h1 {
  letter-spacing: -.035em;
}

.process-table,
.metric,
.panel,
.data-table,
.review-grid,
.case-card,
.task-inbox,
.task-work,
.task-context,
.create-panel {
  box-shadow: 0 8px 30px rgb(39 39 42 / 5%);
}

.process-table,
.metric,
.panel,
.data-table,
.review-grid {
  border-color: #dce5e4;
}

.process-row:hover,
.task-row:hover,
.task-row.selected {
  background: var(--brand-tint);
}

.create-panel {
  background: #fff;
  border-left-color: #dce5e4;
}

.create-panel header:not(:where(.conform-ai *)),
.create-panel .library-ai-composer-actions span,
.create-panel .safety {
  color: var(--muted);
}

.create-panel header b {
  color: var(--ink);
}

.library-ai-message,
.ai-strip,
.form-ai-bar {
  border-color: var(--brand-line);
  background: var(--brand-tint);
}

.canvas-shell,
.canvas-shell.engine-intent,
.intent-canvas,
.review-diagram {
  background-color: var(--soft);
  background-image: none;
}

.canvas-viewport,
.intent-workspace,
.form-design-canvas {
  border-color: #dce5e4;
  background: #fff;
}

.node.task .node-card,
.node:hover .node-card,
.node.selected .node-card {
  border-color: var(--brand);
}

.node.selected .node-card {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent), 0 8px 20px rgb(39 39 42 / 10%);
}

.quick-add,
.palette-item:hover,
.connector-actions .test {
  color: var(--brand);
  border-color: var(--brand-line);
  background: var(--brand-tint);
}

@media (max-width: 1200px) {
  .library-shell:has(.create-panel.closed) {
    grid-template-columns: var(--bb-rail-w) minmax(620px, 1fr);
  }
}

@media (max-width: 640px) {
  .library-shell:has(.create-panel.closed) {
    grid-template-columns: var(--bb-rail-w) minmax(0, 1fr);
  }
}

/* Compact product rail ------------------------------------------------------
 * Home and every Process Studio surface use one predictable navigation rail.
 * Page-specific navigation remains inside the page, never in this rail.
 */
@media (min-width: 901px) {
  .library-shell {
    grid-template-columns: var(--bb-rail-w) minmax(650px, 1fr) 300px;
  }

  .library-shell:has(.create-panel.closed),
  .shell {
    grid-template-columns: var(--bb-rail-w) minmax(650px, 1fr);
  }

  .review-shell {
    grid-template-columns: var(--bb-rail-w) minmax(0, 1fr);
  }
}

.library-nav,
.nav,
.review-shell > nav {
  padding: 12px 6px;
}

.library-brand.bridgeconnect-product-brand,
.nav .brand.bridgeconnect-product-brand,
.review-shell > nav .brand.bridgeconnect-product-brand {
  width: 60px;
  min-width: 60px;
  height: 44px;
  justify-content: center;
  padding: 0;
  margin: 0 0 8px;
}

.library-brand .bridgeconnect-product-wordmark,
.nav .brand .bridgeconnect-product-wordmark,
.review-shell > nav .brand .bridgeconnect-product-wordmark {
  display: none !important;
}

.library-nav nav,
.nav nav {
  margin-top: 0;
}

.library-user,
.nav-foot {
  justify-content: center;
  padding: 12px 0 0;
}

.library-user div,
.nav-foot div {
  display: none;
}

.library-user > span {
  width: 32px;
  height: 32px;
}

.process-navigation-list a,
.process-navigation-ai {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

/* Process designer and form designer use the same tenant colour tokens. */
.workspace .brand-mark,
.assistant-send,
.landing-send,
.presence-avatar,
.collaboration-pin,
.form-studio-actions .primary {
  background: var(--brand);
  border-color: var(--brand);
}

.palette-item:hover,
.template-overlap a,
.intent-action,
.intent-empty-state strong,
.segmented-control button.active,
.form-ai-mark,
.form-field-type span:first-child,
.outline-field:hover,
.outline-field.selected,
.property-card-title > span,
.inspector-form-icon,
.collaboration-anchor,
.collaboration-form button,
.form-ai-result-actions button {
  color: var(--brand);
}

.form-ai-bar,
.form-ai-result,
.collaboration-card.proposal,
.collaboration-preview,
.segmented-control button.active,
.preview-field-card.selected,
.outline-field:hover,
.outline-field.selected {
  background: var(--brand-tint);
  border-color: var(--brand-line);
}

.form-ai-bar label,
.form-ai-result strong {
  color: var(--ink);
}

.form-ai-bar input,
.form-field-type:hover,
.form-field-type:focus-visible,
.preview-section.selected,
.preview-field-card.selected,
.field-block.current,
.governed-field:focus-within {
  border-color: var(--brand);
}

.form-ai-bar,
.form-design-canvas,
.canvas-shell {
  background-image: none;
}

.form-design-canvas {
  background-color: var(--soft);
}

.edge-selected,
.edge-hit-area:hover + .edge-line,
.alignment-guide,
.drop-preview,
.connection-preview {
  stroke: var(--brand);
}

/* Keep the canonical product lockup above legacy page-specific span rules. */
.library-brand > span.bridgeconnect-product-symbol {
  display: block;
  width: 34px;
  min-width: 34px;
  height: 31px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  place-items: initial;
}

.library-brand > span.bridgeconnect-product-wordmark {
  display: inline-flex;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--thebridge-slate);
  font-size: 18px;
  font-weight: 600;
}

.brand div span.bridgeconnect-product-symbol {
  display: block;
}

.brand div span.bridgeconnect-product-wordmark {
  display: inline-flex;
  color: var(--thebridge-slate);
  font-size: 18px;
  font-weight: 600;
}

@media (max-width: 1200px) {
  .library-brand > span.bridgeconnect-product-wordmark {
    display: none;
  }
}
html body,html .bridgeconnect-shell-topbar,html .process-navigation-list,html .workspace-content{transition:color .16s ease,background-color .16s ease,border-color .16s ease,opacity .16s ease}
html.bridgeconnect-localising body{opacity:.88}

@media (max-width: 640px) {
  /* The 54px rail: one step down on the label so every item still fits on one line. */
  #bb-rail,
  .bb-rail { padding: 8px 3px; }
  [data-navigation-compact] .process-navigation-list span,
  [data-navigation-compact] .process-navigation-ai span { font-size: 8px; }

}

/*
 * Touch targets.
 *
 * TheBridge is a website now, and everything outside the process canvas is expected
 * to work on a phone. Measured at 390px before this existed: the filter buttons on the
 * work list were 29px tall, the tab buttons on manage 17-30px, the register toggles 30px
 * and the shell breadcrumb 31px. The usual floor is 44px, and a 29px control is a control
 * people miss and re-tap.
 *
 * Gated on the pointer, not the width: `(hover: none) and (pointer: coarse)` is true on a
 * phone and false in a narrow desktop window, so this cannot change a mouse layout that
 * someone has already tuned. Deliberately not applied to checkboxes and radios, whose
 * hit area comes from their label, nor to the skip link, which is 1x1 until focused by
 * design.
 */
@media (hover: none) and (pointer: coarse) {
  button,
  [role="button"],
  a.button,
  select,
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    min-height: 44px !important;
  }
  /*
   * The shell links are plain <a> elements, and min-height does nothing on an inline box —
   * it is silently ignored, which is why an earlier pass "set" 44px and measured 31.
   * inline-flex gives them a box that can actually have a height. Scoped to the shell's
   * own controls rather than every anchor, so prose links inside a page are untouched.
   */
  a.bridgeconnect-shell-brand,
  a.bridgeconnect-shell-alerts,
  a.bridgeconnect-shell-role,
  a.bridgeconnect-shell-work,
  a.bridgeconnect-shell-dashboard,
  a.button,
  .bridgeconnect-shell-topbar a,
  .bridgeconnect-shell-actions a {
    min-height: 44px !important;
    display: inline-flex;
    align-items: center;
  }
  /* A shell control the tenant switched off stays off: the touch-target box above must
     not out-rank the hidden attribute (the Traditional dashboard link on a wide tablet). */
  a.bridgeconnect-shell-dashboard[hidden] {
    display: none;
  }
  /*
   * Page-level navigation anchors: the section tabs on cases and tasks, and the back and
   * brand links in a page topbar. Named by their container rather than by matching every
   * <a>, so a link inside prose keeps its line height and only things people tap as
   * controls get a control-sized box.
   */
  .process-section-tabs a,
  header.topbar a,
  a.back {
    min-height: 44px !important;
    display: inline-flex;
    align-items: center;
  }
  button, [role="button"], select {
    min-height: 44px !important;
  }
  a.skip-link { min-height: 0 !important; }
}

/*
 * A phone is BOTH narrow and coarse-pointed. The 900px rule above hides the two shell
 * links there is no room for; the coarse-pointer block below it then gives every shell
 * link `display: inline-flex` for a 44px tap target — with a higher specificity
 * (a.class beats .class) — which re-showed "Traditional dashboard" and "My work" on real
 * phones, drawn over the wordmark. Seen at 390px on a touch device; the desktop
 * breakpoint alone never showed it. My tasks is NOT hidden here any more: it is the bell
 * and its count on a phone (the 900px rule), and the only door to it.
 */
@media (hover: none) and (pointer: coarse) and (max-width: 900px) {
  a.bridgeconnect-shell-dashboard {
    display: none;
  }
}

/* ANOTHER WINDOW SWITCHED ORGANISATION (theme.js showOrganisationElsewhere): this window keeps
   its own, and says so in one line above the page. */
.bridgeconnect-org-elsewhere {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 16px; background: #fff7e6; border-bottom: 1px solid #f0c36d;
  color: #5c3d00; font-size: 13px;
}
.bridgeconnect-org-elsewhere button {
  border: 1px solid #c98a00; border-radius: 8px; background: #fff; color: #5c3d00;
  padding: 4px 10px; font: inherit; font-weight: 700; cursor: pointer;
}
.bridgeconnect-org-elsewhere .bridgeconnect-org-elsewhere-dismiss {
  margin-left: auto; border: 0; background: transparent; font-size: 18px; line-height: 1; padding: 0 4px;
}

/* YOUR AI, CLOSED (theme.js registerAiDock): one small ✦ Ask AI in the corner of every page
   brings it back. Above the page, below a dialog. */
.bb-ai-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 45;
  display: inline-flex; align-items: center; gap: 7px;
  height: 44px; padding: 0 16px 0 13px; border: 0; border-radius: 999px;
  background: var(--brand, #007b77); color: #fff;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 22px rgba(16, 24, 40, .18);
}
.bb-ai-fab[hidden] { display: none; }
.bb-ai-fab:hover { filter: brightness(1.06); }
.bb-ai-fab:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand, #007b77) 40%, #fff); outline-offset: 2px; }
.bb-ai-fab-mark { font-size: 16px; line-height: 1; }
@media (max-width: 600px) {
  .bb-ai-fab { right: 16px; bottom: 16px; padding: 0 14px 0 12px; }
}
@media print { .bb-ai-fab { display: none; } }
/* An open menu on a report widget is the person's focus: the ✦ in the corner steps aside so it never
   covers the menu's last items (a collapsed Reports AI column leaves the ✦ showing, 2026-10-30). */
body:has(.bc-widget.menu-open) .bb-ai-fab { visibility: hidden; }
/* NO AI FOR THIS PERSON (identity.ai false — the organisation keeps the AI to its administrators,
   services/bridgeConnect/companyRules.ts): every way to it leaves the page. The chat socket refuses
   them too, so this is what is offered, not what is allowed. */
html[data-ai-access="off"] .bb-ai-fab,
html[data-ai-access="off"] #process-ai-tab,
html[data-ai-access="off"] #process-ai-panel,
html[data-ai-access="off"] #toggle-ai-panel,
html[data-ai-access="off"] .conform-ai,
html[data-ai-access="off"] .reports-shell > .reports-chat,
html[data-ai-access="off"] .work-ai-toggle,
html[data-ai-access="off"] #editor-ask-ai,
html[data-ai-access="off"] #editor-ai-panel,
html[data-ai-access="off"] #landing-form,
html[data-ai-access="off"] .assistant-pane,
html[data-ai-access="off"] [data-bridgeconnect-i18n="helpToday"],
html[data-ai-access="off"] .bb-mic,
html[data-ai-access="off"] .bb-mic-status { display: none !important; }
html[data-ai-access="off"] .reports-shell { grid-template-columns: var(--bb-rail-w) minmax(0, 1fr); }
/* WHERE THE AI IS HIDDEN, ON PROCESSES AND IN A DOCUMENT'S MORE MENU (live E2E 2026-11-29, Fluence's journey copy):
   - New Process offers "Create with AI" only once the identity says yes, so it never flashes, and what is left stands
     on its own line (library.js puts focus on the first choice that is there);
   - Your AI beside the list leaves with its column, as the Reports column does above (the library's own shell: every
     page's shell is a .library-shell, and only the library's holds #create-panel);
   - a document's More menu offers what the AI does for it (Update with AI, Suggest Metadata, Build the Process: their
     routes refuse without the AI) only once the identity says yes (documents.js marks them documents-menu-ai). */
html:not([data-ai-access="on"]) #new-process-ai,
html:not([data-ai-access="on"]) .documents-menu-items > .documents-menu-ai { display: none !important; }
html:not([data-ai-access="on"]) #new-process-choices { grid-template-columns: minmax(0, 1fr); }
html:not([data-ai-access="on"]) #new-process-choices > .documents-create-choice { min-height: 0; }
html[data-ai-access="off"] #create-panel { display: none !important; }
html[data-ai-access="off"] .library-shell:has(> #create-panel) { grid-template-columns: var(--bb-rail-w) minmax(0, 1fr); }
/* OFFERED ONLY ONCE THE IDENTITY SAYS YES: these stay hidden until html[data-ai-access="on"], so a
   company that hides the AI (hide_ai_button) never sees them flash while the page loads (My Tasks'
   Ask AI showed for a moment before the identity answered), and a sentence that sends the reader
   to the AI is never read where there is none (the register's "Ask the AI to give it one"). New Document's
   "Create with AI" too (live check 2026-11-26: it still showed for a company that hides the AI). */
html:not([data-ai-access="on"]) .work-ai-toggle,
html:not([data-ai-access="on"]) .documents-level-gap-ai,
html:not([data-ai-access="on"]) #create-choose-ai { display: none !important; }

/* The × that closes a panel the page opened by itself. */
.bb-ai-close {
  flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted, #667085);
  font: inherit; font-size: 20px; line-height: 1; cursor: pointer;
}
.bb-ai-close:hover { background: color-mix(in srgb, var(--brand, #007b77) 8%, #fff); color: var(--ink, #171b26); }
.bb-ai-close:focus-visible { outline: 2px solid var(--brand, #007b77); outline-offset: 1px; }

/* Speak instead of type (theme.js micButton): Home's microphone, beside every Send. */
.bb-mic {
  flex: none; display: inline-grid; place-items: center;
  width: 34px; height: 34px; padding: 0; border: 1px solid var(--line, #e4e7ec); border-radius: 9px;
  background: #fff; color: var(--muted, #667085); cursor: pointer;
}
.bb-mic[hidden] { display: none; }
.bb-mic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bb-mic:hover { color: var(--brand, #007b77); border-color: color-mix(in srgb, var(--brand, #007b77) 45%, #fff); }
.bb-mic.listening { color: #fff; background: #d92d20; border-color: #d92d20; animation: bb-mic-pulse 1.2s ease-in-out infinite; }
.bb-mic:focus-visible { outline: 2px solid var(--brand, #007b77); outline-offset: 1px; }
@keyframes bb-mic-pulse { 50% { box-shadow: 0 0 0 5px rgba(217, 45, 32, .18); } }
/* What the microphone heard, under it (theme.js sayMic): listening, or why nothing came. */
.bb-mic-status {
  position: fixed; z-index: 2147483000; top: 16px; left: 16px;
  max-width: min(340px, calc(100vw - 16px)); padding: 8px 11px; border-radius: 10px;
  background: #1d2939; color: #fff; font: 500 13px/1.4 var(--font, system-ui, sans-serif);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .18);
}
.bb-mic-status[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .bb-mic.listening { animation: none; } }

/* REPORTS (public/reports/index.html, docked from theme.js dockReportsPanel): the × sits in
   the panel's header, the composer keeps the microphone beside Send, and closed, the report
   grid takes the whole width. Styled here so the Reports page itself is unchanged. */
.reports-chat > header { position: relative; }
.reports-chat > header > .bb-ai-close { position: absolute; top: 14px; right: 12px; }
.reports-chat > header:has(> .bb-ai-close) { padding-right: 48px; }
#reports-chat-form:has(> .bb-mic) { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
#reports-chat-form:has(> .bb-mic) > textarea,
#reports-chat-form:has(> .bb-mic) > label { grid-column: 1 / -1; }
#reports-chat-form > .bb-mic { grid-column: 2; }
#reports-chat-form:has(> .bb-mic) > #reports-chat-send { grid-column: 3; }
body.bb-ai-closed .reports-shell { grid-template-columns: var(--bb-rail-w) minmax(0, 1fr); }
body.bb-ai-closed .reports-shell > .reports-chat { display: none; }
/* Process performance is a tab beside Overview / My dashboards / Pinned reports (Bryan, 27 Oct). It opens
   its own page, so it is a link dressed as the tab buttons beside it (documents.css .documents-status-tabs). */
.documents-status-tabs .reports-tab-link { display: inline-flex; align-items: center; justify-content: center; min-width: 95px; padding: 11px 9px 13px; border-bottom: 3px solid transparent; color: #475467; font-size: 13px; text-decoration: none; white-space: nowrap; }
.documents-status-tabs .reports-tab-link:hover { color: var(--brand, #007b77); }
@media (max-width: 700px) { .documents-status-tabs .reports-tab-link { min-width: 70px; padding-inline: 4px; font-size: 11px; white-space: normal; text-align: center; } }


/* An AI panel that opens OVER the page on a narrow screen (the process library's, Documents')
   sits under the shell's header and over the rail, so its own × is always on screen. */
:root { --bb-topbar-h: 68px; }
@media (max-width: 900px) { :root { --bb-topbar-h: 60px; } }
@media (max-width: 1000px) {
  body.bridgeconnect-shared-shell-page .create-panel { top: var(--bb-topbar-h); z-index: 40; }
}
@media (max-width: 1199px) {
  body.bridgeconnect-shared-shell-page .documents-ai { top: var(--bb-topbar-h); }
}

/* THE QUIET BUTTONS of the process landscape's placement controls and the Work page's "Places
   to confirm". No page there styles .secondary or .quiet-button, so they were the browser's
   default buttons and wrapped awkwardly (DMS e2e round 4). The shell's look, scoped to them. */
:is(.landscape, .work-reading) :is(button.secondary, .quiet-button) {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid var(--line, #d0d5dd);
  border-radius: 8px;
  background: #fff;
  color: var(--ink, #171b26);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
:is(.landscape, .work-reading) .quiet-button {
  border-color: transparent;
  background: transparent;
  color: var(--muted, #667085);
}
:is(.landscape, .work-reading) :is(button.secondary, .quiet-button):hover { background: var(--soft, #f2f4f7); }
:is(.landscape, .work-reading) :is(button.secondary, .quiet-button):disabled { opacity: 0.5; cursor: not-allowed; }
.work-reading li[data-placement] { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 4px 0; }
.work-reading li[data-placement] > span { flex: 1 1 100%; overflow-wrap: anywhere; }

/* "Why am I asked to confirm this?" (documents/read-why.js): a round "?" beside "I have read
   and understood this", opening a short note in the flow under it, so it never covers the
   document on a phone. */
.bc-read-why-button {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 28px; height: 28px; padding: 0; border: 1px solid var(--line, #d0d5dd); border-radius: 999px;
  background: #fff; color: var(--brand, #007b77); font: inherit; font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer;
}
.bc-read-why-button[aria-expanded="true"] { border-color: var(--brand, #007b77); background: var(--brand-tint, #eaf8f7); }
.bc-read-why-button:focus-visible { outline: 2px solid var(--brand, #007b77); outline-offset: 2px; }
.bc-read-why {
  margin: 6px 0 0; padding: 10px 12px; border: 1px solid var(--brand-line, #9bdedb); border-radius: 10px;
  background: var(--brand-tint, #eaf8f7); color: var(--ink, #344054); font-size: 13px; line-height: 1.45; font-weight: 400;
}
.bc-read-why[hidden] { display: none; }
.bc-read-why-title { display: block; margin: 0 0 4px; font-size: 13px; }
.bc-read-why p { margin: 0 0 6px; overflow-wrap: anywhere; }
.bc-read-why ul { margin: 0; padding-left: 18px; display: grid; gap: 2px; list-style: disc; }
.bc-read-why li { overflow-wrap: anywhere; }

/* TheBridge trial banner and tour (trial-banner.js). */
.bc-trial-banner { box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px;
  padding: 8px 16px; background: var(--bc-accent-soft, #e6f6f3); color: var(--bc-text, #172033); font-size: 14px;
  border-bottom: 1px solid var(--bc-border, #d5dde6); }
.bc-trial-banner[data-trial-banner="read_only"] { background: #fff4e5; }
.bc-trial-buy { border: 0; border-radius: 6px; padding: 6px 12px; background: var(--bc-accent, #00796b); color: #fff; font: inherit; cursor: pointer; }
.bc-trial-buy[disabled] { opacity: 0.7; cursor: default; }
.bc-trial-tour { position: fixed; right: 16px; bottom: 16px; z-index: 60; box-sizing: border-box; width: min(360px, calc(100vw - 32px));
  padding: 16px 18px; background: var(--bc-surface, #fff); color: var(--bc-text, #172033); border: 1px solid var(--bc-border, #d5dde6);
  border-radius: 10px; box-shadow: 0 8px 28px rgba(23, 32, 51, 0.18); }
.bc-trial-tour h2 { margin: 0 24px 6px 0; font-size: 16px; }
.bc-trial-tour p { margin: 0 0 12px; font-size: 14px; line-height: 1.45; }
.bc-trial-tour-close { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 20px; cursor: pointer; color: inherit; }
.bc-trial-tour-foot { display: flex; align-items: center; justify-content: space-between; }
.bc-trial-tour-step { font-size: 12px; opacity: 0.7; }
.bc-trial-tour-next { border: 0; border-radius: 6px; padding: 6px 14px; background: var(--bc-accent, #00796b); color: #fff; font: inherit; cursor: pointer; }

/* On a phone the company's name needs the room: TheBridge's mark stays, its words give way
   (the company is what tells a person which environment they are in; onboarding video, 2026-10-27). */
@media (max-width: 640px) {
  .bridgeconnect-shell-brand:has(+ .bridgeconnect-shell-company:not([hidden])) .bridgeconnect-product-wordmark { display: none; }
  .bridgeconnect-shell-signout { padding: 0 10px; }
  /* "Company" whole in the 54px rail in a wide font too: the footer takes the rail's side padding. */
  #bb-rail .bridgeconnect-rail-footer { margin-inline: -4px; width: calc(100% + 8px); }
  #bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-org { padding-inline: 0; }
  #bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-org > span { font-size: 8.5px; }
}

/* ─── Phones: the rail is a drawer behind ☰ (Sam's approved mobile design, 2026-11-21) ─────────
   Below 640px, and only on a page that has both the shared top bar and the rail (theme.js sets
   html.bb-has-drawer), the rail leaves the page and opens from the left as a 300px drawer over a
   scrim: the rail's items in the rail's order, then the user button, the Company picker and
   Log Out. The page gets the full width (the rail token is 0). Tablet and desktop are untouched:
   the ☰, the drawer head, its Log Out row, the scrim and the rail's place-holder are hidden there. */
.bridgeconnect-shell-menu,
.bb-drawer-head,
.bb-drawer-signout,
.bb-drawer-scrim,
.bb-rail-slot { display: none; }

@media (max-width: 640px) {
  html.bb-has-drawer { --bb-rail-w: 0px; }
  html.bb-has-drawer .bb-rail-slot { display: block; width: 0; min-width: 0; height: 0; overflow: hidden; }

  /* Top bar: ☰, logo, company (cut short), bell with count, language; 44px targets. */
  html.bb-has-drawer .bridgeconnect-shell-topbar { gap: 6px; padding: 0 8px 0 4px; }
  html.bb-has-drawer .bridgeconnect-shell-menu {
    display: inline-grid; place-items: center; flex: none;
    width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px;
    background: transparent; color: var(--ink); cursor: pointer;
  }
  html.bb-has-drawer .bridgeconnect-shell-menu svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  html.bb-has-drawer .bridgeconnect-shell-menu:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
  html.bb-has-drawer .bridgeconnect-shell-company { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.bb-has-drawer .bridgeconnect-shell-actions { gap: 2px; }
  html.bb-has-drawer .bridgeconnect-shell-actions > .bridgeconnect-shell-signout { display: none; }
  html.bb-has-drawer .bridgeconnect-shell-work,
  html.bb-has-drawer .bridgeconnect-shell-language { min-height: 44px; min-width: 44px; }

  /* The drawer. */
  html.bb-has-drawer #bb-rail {
    position: fixed; z-index: 1200; inset: 0 auto 0 0;
    width: min(300px, 86vw); min-width: 0; max-width: none; height: 100dvh;
    /* Log Out clear of an iPhone's home bar, on the pages drawn edge to edge (viewport-fit=cover). */
    padding: 0 0 calc(14px + env(safe-area-inset-bottom)); gap: 0; border-right: 0;
    box-shadow: 10px 0 30px rgba(16, 24, 40, .18);
    transform: translateX(-105%); visibility: hidden;
    overflow-y: auto; overscroll-behavior: contain;
  }
  /* Animated only after the first frames (theme.js adds bb-drawer-animate), so a load never slides. */
  html.bb-has-drawer.bb-drawer-animate #bb-rail { transition: transform .2s ease, visibility 0s linear .2s; }
  html.bb-has-drawer .bb-rail:not(#bb-rail) { display: none !important; }
  html.bb-has-drawer.bb-drawer-open #bb-rail { transform: none; visibility: visible; }
  html.bb-has-drawer.bb-drawer-animate.bb-drawer-open #bb-rail { transition: transform .2s ease; }
  html.bb-has-drawer.bb-drawer-open .bb-drawer-scrim {
    display: block; position: fixed; inset: 0; z-index: 1199; background: rgba(16, 24, 40, .38);
  }
  html.bb-has-drawer.bb-drawer-open body { overflow: hidden; }

  html.bb-has-drawer #bb-rail .bb-drawer-head {
    display: flex; align-items: center; gap: 10px; flex: none;
    height: 60px; padding: 0 8px 0 16px; border-bottom: 1px solid #dce5e4;
  }
  html.bb-has-drawer #bb-rail .bb-drawer-head .bridgeconnect-shell-brand { flex: 1; min-width: 0; }
  html.bb-has-drawer #bb-rail .bb-drawer-close {
    display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer;
  }
  html.bb-has-drawer #bb-rail .bb-drawer-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

  html.bb-has-drawer #bb-rail [data-process-navigation] { padding: 8px; }
  html.bb-has-drawer #bb-rail .process-navigation-list { display: flex; flex-direction: column; gap: 2px; }
  html.bb-has-drawer #bb-rail .process-navigation-list a {
    flex-direction: row; justify-content: flex-start; gap: 14px;
    width: 100%; min-height: 52px; height: auto; padding: 0 14px; border-radius: 10px;
    font-size: 16px; font-weight: 600; color: #3f4652;
  }
  html.bb-has-drawer #bb-rail .process-navigation-list a svg { width: 22px; height: 22px; flex: none; }
  html.bb-has-drawer #bb-rail .process-navigation-list a span { font-size: 16px; line-height: 1.2; white-space: nowrap; overflow: visible; }
  html.bb-has-drawer #bb-rail .process-navigation-list a.active,
  html.bb-has-drawer #bb-rail .process-navigation-list a[aria-current="page"] { background: #eef1f1; color: var(--ink); font-weight: 750; }

  /* Foot: the user button, the Company picker, then Log Out set apart by a line. */
  html.bb-has-drawer #bb-rail .bridgeconnect-rail-footer {
    margin: auto 0 0; width: auto; padding: 10px 8px 0; gap: 6px; border-top: 1px solid #dce5e4;
  }
  html.bb-has-drawer #bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-role,
  html.bb-has-drawer #bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-org {
    flex-direction: row; justify-content: flex-start; gap: 12px; height: 52px; padding: 0 14px; border-radius: 10px;
    /* A height, not a min-height: the coarse-pointer rule above pins min-height at 44px !important. */
  }
  html.bb-has-drawer #bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-org { position: relative; }
  html.bb-has-drawer #bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-role > span,
  html.bb-has-drawer #bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-org > span { display: block; width: auto; font-size: 15px; text-align: start; }
  html.bb-has-drawer #bb-rail .bridgeconnect-rail-footer .bridgeconnect-shell-role strong { order: -1; width: 32px; height: 32px; font-size: 12px; }
  html.bb-has-drawer #bb-rail .bridgeconnect-account-menu { left: 16px; right: 16px; width: auto; bottom: 150px; z-index: 1201; }
  /* Last whatever order the footer's parts were placed in (the picker can be re-placed later). */
  html.bb-has-drawer #bb-rail .bb-drawer-signout { order: 99; display: block; margin-top: 6px; padding-top: 10px; border-top: 1px solid #dce5e4; }
  html.bb-has-drawer #bb-rail .bb-drawer-signout .bridgeconnect-shell-signout {
    display: flex; justify-content: center; width: 100%; min-height: 52px; font-size: 14px;
  }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  html.bb-has-drawer.bb-drawer-animate #bb-rail { transition: none; }
}

/* ─── Shared phone primitives (the mobile design system; pages opt in by class) ──────────────────
   Each applies only below 640px; above it they are plain blocks, so a page can carry the class
   without changing its desktop look.
     .bb-m-page       16px gutters, nothing scrolls sideways
     .bb-m-title      24px page title
     .bb-m-pills      tab pills that wrap (selected: [aria-selected=true] / .active)
     .bb-m-cards      a table drawn as cards
     .bb-m-sheet      a bottom sheet over .bb-m-scrim, with a grab handle and 44px ✕
     .bb-m-actionbar  the sticky bottom action bar (main action + ⋯)
     .bb-m-form       one-column form, 48px fields
     .bb-m-tap        any control raised to a 44px tap target */
@media (max-width: 640px) {
  .bb-m-page { box-sizing: border-box; max-width: 100vw; padding-inline: 16px; overflow-x: clip; }
  .bb-m-title { margin: 16px 0 8px; font-size: 24px; font-weight: 800; line-height: 1.2; color: var(--ink); }
  .bb-m-pills { display: flex; flex-wrap: wrap; gap: 8px; overflow: visible; border: 0; }
  .bb-m-pills > * {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
    border: 1px solid #dce5e4; border-radius: 999px; background: #fff; color: var(--ink);
    font: 600 14px/1 var(--tenant-font); white-space: nowrap; text-decoration: none;
  }
  .bb-m-pills > [aria-selected="true"], .bb-m-pills > .active { background: var(--nav); border-color: var(--nav); color: #fff; }
  .bb-m-cards { display: flex; flex-direction: column; gap: 10px; }
  .bb-m-cards thead { display: none; }
  .bb-m-cards tbody, .bb-m-cards tr { display: block; }
  .bb-m-cards tr, .bb-m-cards > .bb-m-card {
    box-sizing: border-box; width: 100%; padding: 14px 16px; border: 1px solid #dce5e4; border-radius: 12px; background: #fff;
  }
  .bb-m-cards td { display: block; padding: 2px 0; border: 0; }
  .bb-m-scrim { position: fixed; inset: 0; z-index: 1100; background: rgba(16, 24, 40, .38); }
  .bb-m-sheet {
    position: fixed; z-index: 1101; inset: auto 0 0 0; box-sizing: border-box;
    max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
    padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0;
    background: #fff; box-shadow: 0 -12px 32px rgba(16, 24, 40, .18);
  }
  .bb-m-sheet::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto 8px; border-radius: 999px; background: #d0d5dd; }
  .bb-m-sheet-close { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; }
  .bb-m-actionbar {
    position: fixed; z-index: 1000; inset: auto 0 0 0; box-sizing: border-box;
    display: flex; gap: 8px; align-items: center;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #dce5e4; background: #fff;
  }
  .bb-m-actionbar > :first-child { flex: 1; min-height: 48px; }
  .bb-m-actionbar > :not(:first-child) { min-width: 48px; min-height: 48px; }
  body:has(.bb-m-actionbar) { padding-bottom: 80px; }
  .bb-m-form { display: flex; flex-direction: column; gap: 14px; }
  .bb-m-form label { display: block; margin-bottom: 6px; font-weight: 650; }
  .bb-m-form input:not([type="checkbox"]):not([type="radio"]), .bb-m-form select, .bb-m-form textarea { box-sizing: border-box; width: 100%; min-height: 48px; font-size: 16px; }
  .bb-m-tap { min-width: 44px; min-height: 44px; }
}

/* On a phone, a chat box marked data-bb-keyboard-fit (every Your AI panel, Reports' column) is
   laid over exactly the part of the screen the keyboard leaves while someone types in it:
   theme.js fitToKeyboard sets the two variables from the visual viewport. Before, the keyboard
   left only the message box and an empty strip on screen — the header, its × and every reply
   were above the screen (25 Nov 2026). !important: each page places its panel with its own,
   more specific rules (#work-ai, .documents-ai, .reports-shell > .reports-chat…). */
@media (max-width: 640px) {
  .bb-keyboard-fit {
    position: fixed !important; z-index: 1150 !important; left: 0 !important; right: 0 !important; bottom: auto !important;
    top: var(--bb-keyboard-top, 0px) !important; height: var(--bb-keyboard-height, 100dvh) !important;
    width: auto !important; min-height: 0 !important; max-height: none !important; margin: 0 !important;
    transform: none !important; border-radius: 0 !important; box-sizing: border-box !important;
  }
  /* Reports' column keeps a short thread on a phone (reports.css); typing, it fills the box. */
  .bb-keyboard-fit .reports-chat-thread { max-height: none; min-height: 0; }
}
/* A chat box's own fields are 16px on a touch screen: below that, iOS Safari zooms the page in when one is tapped
   and leaves it zoomed. Reports' column kept a 13px box (#reports-chat-form), so on an iPhone the page zoomed to
   about 1.23x, the column ran past the screen's edge and Send was off it (iPhone 17 simulator, 2026-11-25).
   !important: each page sizes its own box with more specific rules. */
@media (pointer: coarse) {
  [data-bb-keyboard-fit] :is(textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"])) { font-size: 16px !important; }
}
