/* ------------------------------------------------------------------
   Developer Tools
   60 / 30 / 10, light only, in the b:live palette (IBM Carbon greys).
   60% white   — the page, cards, dialogs.
   30% greys   — the menu, panels, table heads, rules, quiet text.
   10% accents — each always means one thing, everywhere:
     blue    actions, links, selection, focus
     green   done: approved, paid, money collected
     yellow  waiting: in review, partly paid, money owed
     red     needs someone: unresolved threads, overdue, errors
     purple  highlights and info: tags, annotations, the top tier
   ------------------------------------------------------------------ */

:root {
  /* 60 */
  --white: #ffffff;
  /* 30 */
  --grey-50: #fafafa;
  --grey-100: #f4f4f4;
  --grey-200: #e0e0e0;
  --grey-300: #c6c6c6;
  --grey-400: #a8a8a8;
  --grey-500: #6f6f6f;
  --grey-600: #525252;
  --grey-900: #161616;
  /* 10 */
  --blue: #0587c0;
  --blue-ink: #046a99;
  --blue-dark: #046a99;
  --blue-wash: #e1f1f8;
  --blue-soft: #cde8f4;
  --teal: #3ddbd9;
  --tab-mark: #f6af12;
  --green: #198038;
  --green-dark: #0e6027;
  --green-wash: #defbe6;
  --yellow: #f1c21b;
  --yellow-soft: #fddc69;
  --yellow-ink: #8e6a00;
  --yellow-wash: #fcf4d6;
  --red: #da1e28;
  --red-dark: #a2191f;
  --red-deep: #750e13;
  --red-wash: #fff1f1;
  --purple: #8a3ffc;
  --purple-wash: #f6f2ff;

  /* The board's original names, mapped onto the palette. */
  --paper: var(--white);
  --surface: var(--white);
  --surface-sunk: var(--grey-100);
  --ink: var(--grey-900);
  --ink-soft: var(--grey-600);
  --ink-faint: var(--grey-500);
  --rule: var(--grey-200);
  --rule-strong: var(--grey-300);
  --pencil: var(--red);
  --pencil-wash: var(--red-wash);
  --approve: var(--green-dark);
  --approve-wash: var(--green-wash);
  --review: var(--yellow-ink);
  --review-wash: var(--yellow-wash);
  --add-wash: #defbe6;
  --del-wash: #ffd7d9;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --serif: var(--sans);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(22, 22, 22, 0.05);
  --shadow-md: 0 4px 12px rgba(22, 22, 22, 0.08);
  --shadow-lg: 0 24px 48px rgba(22, 22, 22, 0.18);

  --code-size: 12.5px;
  --code-leading: 1.55;
  --shell: 1440px;

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------- *
   Masthead
   ---------------------------------------------------------------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 2px solid #0587c0;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}

.masthead__inner {
  padding: 0 14px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.masthead__logo {
  display: block;
  height: 28px;
  width: auto;
  flex: none;
}

.masthead__name {
  font-size: 14px;
  font-weight: 600;
  color: #525252;
  border-left: 1px solid #c6c6c6;
  padding-left: 12px;
  white-space: nowrap;
  flex: none;
}

/* The open page's own navigation (the dashboard's tabs and Sync). */
.masthead__slot {
  flex: 1 1 auto;
  min-width: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ---------------------------------------------------------------- *
   Shell
   ---------------------------------------------------------------- */
.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 20px 24px 64px;
}

/* ---------------------------------------------------------------- *
   Buttons
   ---------------------------------------------------------------- */
.btn {
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.btn:hover {
  background: var(--surface-sunk);
}

.btn--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn--primary:hover {
  background: var(--ink);
  opacity: 0.88;
}

.btn--quiet {
  border-color: transparent;
  background: none;
  color: var(--ink-soft);
  padding: 5px 8px;
}

.btn--quiet:hover {
  background: var(--surface-sunk);
  color: var(--ink);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------- *
   Filter bar
   ---------------------------------------------------------------- */
.filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2px;
}

.search {
  flex: 1;
  min-width: 220px;
  position: relative;
}

.search input {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
  padding: 8px 12px 8px 32px;
}

.search svg {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
  pointer-events: none;
}

.chip {
  border: none;
  background: none;
  border-radius: 3px;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* ---------------------------------------------------------------- *
   Document list
   ---------------------------------------------------------------- */

.doc {
  display: grid;
  grid-template-columns: 3px 1fr auto;
  gap: 0 18px;
  align-items: center;
  border-bottom: 1px solid var(--rule);
  background: none;
  text-decoration: none;
  color: inherit;
  padding: 0;
}

.doc:hover {
  background: var(--surface);
}

.tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1px 5px;
}

/* ---------------------------------------------------------------- *
   Empty + loading states
   ---------------------------------------------------------------- */
.empty {
  border: 1px dashed var(--rule-strong);
  border-radius: 6px;
  padding: 48px 32px;
  text-align: center;
  color: var(--ink-soft);
  background: var(--surface);
}

.empty h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  color: var(--ink);
  margin: 0 0 6px;
}

.empty p {
  margin: 0 auto 18px;
  max-width: 44ch;
  font-size: 14px;
}

.loading {
  color: var(--ink-faint);
  font-size: 14px;
  padding: 32px 0;
}

.error-banner {
  border: 1px solid var(--pencil);
  background: var(--pencil-wash);
  color: var(--pencil);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 16px;
}

/* ---------------------------------------------------------------- *
   Detail header
   ---------------------------------------------------------------- */
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  margin-bottom: 14px;
}

.back:hover {
  color: var(--ink);
}

/* Lives in the pane bar beside the tabs. */
.rail {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--rule);
  overflow-x: auto;
  max-width: 50%;
}

/* ---------------------------------------------------------------- *
   Work area
   ---------------------------------------------------------------- */
.work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 0;
  align-items: start;
}

.pane {
  min-width: 0;
  border-right: 1px solid var(--rule);
}

.viewer {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  overflow: hidden;
  margin-right: 20px;
}

/* ---------------------------------------------------------------- *
   Code
   ---------------------------------------------------------------- */
.code {
  font-family: var(--mono);
  font-size: var(--code-size);
  line-height: var(--code-leading);
  overflow-x: auto;
  max-height: 72vh;
  overflow-y: auto;
}

.code table {
  border-collapse: collapse;
  width: 100%;
}

.src {
  padding: 0 14px;
  white-space: pre;
  vertical-align: top;
}

.code tr:hover .src {
  background: var(--surface-sunk);
}

.code tr[data-flagged="true"] .src {
  background: var(--pencil-wash);
}

/* ---------------------------------------------------------------- *
   Preview
   ---------------------------------------------------------------- */

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
}

/* ---------------------------------------------------------------- *
   Annotations column
   ---------------------------------------------------------------- */
.margin {
  padding: 10px 0 0 20px;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.margin h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17px;
  margin: 0 0 2px;
}

.comment {
  margin-bottom: 10px;
}

.composer textarea {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
  padding: 8px 10px;
  font-size: 13.5px;
  resize: vertical;
  min-height: 62px;
}

/* ---------------------------------------------------------------- *
   Dialog
   ---------------------------------------------------------------- */
dialog {
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
}

dialog::backdrop {
  background: rgba(20, 18, 15, 0.42);
}

.dialog__head {
  padding: 20px 24px 0;
}

.dialog__head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  margin: 0 0 4px;
}

.dialog__head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.dialog__body {
  padding: 18px 24px;
  display: grid;
  gap: 14px;
  max-height: 68vh;
  overflow-y: auto;
}

.dialog__foot {
  padding: 14px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.field label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.field small {
  display: block;
  color: var(--ink-faint);
  font-size: 12px;
  margin-top: 4px;
}

.field input[type="text"], .field textarea {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
  padding: 8px 10px;
}

.field textarea {
  resize: vertical;
  min-height: 60px;
}

.drop {
  border: 1px dashed var(--rule-strong);
  border-radius: 5px;
  padding: 22px;
  text-align: center;
  background: var(--paper);
  cursor: pointer;
}

.drop[data-active="true"] {
  border-color: var(--blue);
  background: var(--blue-wash);
}

.drop[data-filled="true"] {
  border-style: solid;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
  padding: 9px 16px;
  font-size: 13.5px;
  z-index: 60;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

/* ---------------------------------------------------------------- *
   Narrow screens: the margin column drops below the source.
   ---------------------------------------------------------------- */
@media (max-width: 1080px) {
  .work {
    grid-template-columns: minmax(0, 1fr);
  }

  .pane {
    border-right: 0;
  }

  .viewer {
    margin-right: 0;
  }

  .margin {
    position: static;
    padding: 24px 0 0;
    max-height: none;
    border-top: 1px solid var(--rule);
    margin-top: 24px;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 16px 14px 64px;
  }

  .masthead__inner {
    padding: 0 14px;
    gap: 10px;
  }

  

  .rail {
    max-width: 100%;
  }

  .doc {
    grid-template-columns: 3px 1fr;
  }

  

  
}

/* ================================================================== *
   Enhancements
   Search palette, activity feed, reviewer assignment, side-by-side
   compare, and the list controls that go with them.
   ================================================================== */

kbd {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1;
  padding: 3px 5px;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- *
   Command palette
   ---------------------------------------------------------------- */
.palette {
  width: min(680px, calc(100vw - 32px));
  padding: 0;
  margin-top: 12vh;
  overflow: hidden;
}

/* ---------------------------------------------------------------- *
   List controls
   ---------------------------------------------------------------- */

.sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-faint);
}

/* Board = list beside the activity rail. */
.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1080px) {
  .board {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------------------------------------------------------------- *
   Reviewers
   ---------------------------------------------------------------- */

.reviewers {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.reviewer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  padding: 3px 4px 3px 4px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
}

.reviewer[data-me="true"] {
  border-color: var(--blue);
  color: var(--blue);
}

/* ---------------------------------------------------------------- *
   Activity feed
   ---------------------------------------------------------------- */
.panel {
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  overflow: hidden;
}

.margin .panel {
  margin-top: 22px;
}

.act {
  display: flex;
  gap: 10px;
  padding: 9px 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.act:last-child {
  border-bottom: none;
}

.act:hover {
  background: var(--paper);
}

/* ---------------------------------------------------------------- *
   Shortcuts sheet
   ---------------------------------------------------------------- */

.shortcuts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 18px;
  align-items: center;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- *
   Collapsible review column
   ---------------------------------------------------------------- */
.work[data-margin="collapsed"] {
  grid-template-columns: minmax(0, 1fr);
}

.work[data-margin="collapsed"] > .margin {
  display: none;
}

.work[data-margin="collapsed"] > .pane {
  border-right: none;
}

/* ---- the composer that opens from a selection ---- */

.pending {
  border: 1px solid var(--blue);
  border-radius: 5px;
  background: var(--blue-wash);
  padding: 10px 12px;
  margin-bottom: 16px;
}

.pending .composer textarea {
  background: var(--surface);
}

/* ================================================================== *
   Side navigation and sign-in
   ================================================================== */

.layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  min-height: calc(100vh - 50px);
}

.sidenav {
  width: 252px;
  flex: none;
  border-right: 1px solid var(--rule);
  background: var(--surface);
  padding: 14px 10px;
  position: sticky;
  top: 50px; /* under the sticky top bar (48px + its 2px rule) */
  /* An explicit height, not just a max: the grid row is only as tall as
     the content, so the rule would otherwise stop mid-page. */
  height: calc(100vh - 50px);
  overflow-y: auto;
  transition: width 0.14s ease;
}

.sidenav[data-rail="true"] {
  width: 56px;
  padding: 14px 6px;
}

.sidenav__head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 6px 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

.sidenav__toggle {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink-faint);
  display: grid;
  place-items: center;
  padding: 4px;
  border-radius: 4px;
}

.sidenav__toggle:hover {
  color: var(--ink);
  background: var(--surface-sunk);
}

.sidenav[data-rail="true"] .sidenav__toggle {
  margin: 0 auto;
}

.navgroup__head {
  display: flex;
  align-items: center;
  gap: 2px;
}

.navitem {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 5px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.navitem:hover {
  background: var(--paper);
  color: var(--ink);
}

.navitem[aria-current="page"] {
  background: var(--surface-sunk);
  color: var(--ink);
  font-weight: 600;
}

.navitem__icon {
  flex: none;
  display: grid;
  place-items: center;
  color: currentColor;
}

.navitem__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidenav[data-rail="true"] .navitem {
  justify-content: center;
  padding: 9px 0;
}

.sidenav[data-rail="true"] .navitem__label, .sidenav[data-rail="true"] .navitem__chevron, .sidenav[data-rail="true"] .sidenav__foot {
  display: none;
}

.navitem__chevron {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink-faint);
  display: grid;
  place-items: center;
  padding: 5px;
  border-radius: 4px;
  transition: transform 0.14s ease;
}

.navitem__chevron:hover {
  color: var(--ink);
  background: var(--surface-sunk);
}

.navitem__chevron[aria-expanded="false"] {
  transform: rotate(-90deg);
}

.navgroup__children {
  display: flex;
  flex-direction: column;
  margin: 2px 0 8px 18px;
  padding-left: 10px;
  border-left: 1px solid var(--rule);
}

.navchild {
  padding: 5px 8px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.navchild:hover {
  color: var(--ink);
  background: var(--paper);
}

.navchild[aria-current="page"] {
  color: var(--blue);
  font-weight: 600;
}

.sidenav__foot {
  margin: 14px 8px 0;
  font-size: 11px;
  color: var(--ink-faint);
}

/* The shell already pads itself; inside the layout it also needs room
   from the nav, and no longer needs to centre on the whole viewport. */
.layout > #app {
  min-width: 0;
}

.layout .shell {
  padding-left: 28px;
  padding-right: 28px;
}

@media (max-width: 880px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidenav {
    width: auto;
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .sidenav[data-rail="true"] {
    width: auto;
  }
  .sidenav__list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }
  .navgroup__children {
    display: none;
  }
}

/* ---------------------------------------------------------------- *
   Platform refresh
   The shared chrome and the TDD screens on the 60-30-10 palette:
   white surfaces, a grey menu and panels, and accents only where they
   carry meaning.
   ---------------------------------------------------------------- */
body {
  background: var(--white);
  font-size: 14.5px;
}

h1, h2, h3 {
  letter-spacing: -0.01em;
}

::selection {
  background: var(--blue-soft);
}

kbd {
  border-radius: 4px;
  background: var(--white);
  border-color: var(--grey-300);
}

/* Side menu: the 30% grey rail. */
.sidenav {
  background: var(--grey-100);
  border-right-color: var(--grey-200);
}

.navitem {
  border-radius: var(--radius);
  font-weight: 500;
}

.navitem:hover, .navchild:hover {
  background: var(--grey-200);
  color: var(--ink);
}

.navitem[aria-current="page"] {
  background: var(--white);
  color: var(--blue-dark);
  font-weight: 600;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--grey-200);
}

.navitem__icon {
  color: var(--grey-500);
}

.navitem[aria-current="page"] .navitem__icon {
  color: var(--blue);
}

.navgroup__children {
  border-left-color: var(--grey-300);
}

.navchild {
  border-radius: 6px;
  color: var(--ink-soft);
}

.navchild[aria-current="page"] {
  background: var(--blue-wash);
}

/* Buttons: blue for the main action, white for the rest. */
.btn {
  border-radius: var(--radius);
  border-color: var(--grey-300);
  background: var(--white);
  font-weight: 500;
  font-size: 13.5px;
  padding: 7px 14px;
  box-shadow: var(--shadow-sm);
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn:hover {
  background: var(--grey-50);
  border-color: var(--grey-400);
}

.btn--primary {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  opacity: 1;
}

.btn--quiet {
  box-shadow: none;
  border-color: transparent;
}

.btn--quiet:hover {
  background: var(--grey-100);
  border-color: transparent;
}

/* Segmented chips: selected is solid blue. */

.chip {
  border-radius: 6px;
  font-weight: 500;
}

.chip:not([aria-pressed="true"]):hover {
  color: var(--ink);
  background: var(--grey-200);
}

.chip[aria-pressed="true"] {
  background: var(--blue);
  color: var(--white);
  box-shadow: none;
}

/* ------------------------------------------------------------------ *
 * Dropdowns: one look across the Control Panel
 * ------------------------------------------------------------------ */
select:not([multiple]):not([size]) {
  -webkit-appearance: none; appearance: none; font: inherit; font-size: 13px; font-weight: 600; color: #161616;
  height: 32px; padding: 0 30px 0 10px; border: 1px solid #c6c6c6; border-radius: 8px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23525252' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 14px 14px;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden; max-width: 100%;
  transition: border-color .12s, box-shadow .12s;
}
select:not([multiple]):not([size]):hover { border-color: #8d8d8d; }
select:not([multiple]):not([size]):focus,
select:not([multiple]):not([size]):focus-visible { outline: none; border-color: #0587c0; box-shadow: 0 0 0 3px rgba(5, 135, 192, .2); }
select:disabled { opacity: .55; cursor: not-allowed; }
select option { font-weight: 500; }

/* Form controls */
.search input,
.field input[type="text"],
.field textarea,
input[type="search"],
input[type="date"] {
  border-radius: var(--radius);
  border-color: var(--grey-300);
}

.search input:focus,
.field input[type="text"]:focus,
.field textarea:focus,
input[type="search"]:focus,
input[type="date"]:focus {
  outline: 2px solid var(--blue);
  outline-offset: 0;
  border-color: var(--blue);
}

:focus-visible {
  outline-color: var(--blue);
}

/* The doc list as one white card with soft rows. */
.filters {
  border-bottom: none;
  padding-bottom: 14px;
}

.doc {
  transition: background 0.12s ease;
}

.doc:last-child {
  border-bottom: none;
}

.doc:hover {
  background: var(--grey-50);
}

/* Tags are information, so purple. */
.tag {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--purple);
  background: var(--purple-wash);
  border-color: transparent;
  border-radius: 999px;
  padding: 1px 8px;
}

/* Panels, the activity rail, empty and error states */
.panel {
  border-color: var(--grey-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.act:hover {
  background: var(--grey-50);
}

.empty {
  border: 1px dashed var(--grey-300);
  border-radius: var(--radius-lg);
  background: var(--grey-50);
}

.empty h2 {
  font-family: var(--sans);
  font-weight: 600;
}

.error-banner {
  border-color: #ffb3b8;
  background: var(--red-wash);
  color: var(--red-dark);
  border-radius: var(--radius);
}

/* Dialogs, the palette and toasts */
dialog {
  border-color: var(--grey-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

dialog::backdrop {
  background: rgba(22, 22, 22, 0.45);
  backdrop-filter: blur(2px);
}

.dialog__head h2 {
  font-family: var(--sans);
  font-weight: 600;
}

.dialog__foot {
  background: var(--grey-50);
  border-top: 1px solid var(--grey-200);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.toast {
  background: var(--grey-900);
  color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 10px 18px;
}

.toast::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 10px;
  vertical-align: middle;
}

.loading {
  color: var(--ink-faint);
}

/* menus.json: a turned-off section, and a warning when the file has a
   mistake (yellow: something is waiting on whoever edits the file). */
.empty--off {
  margin-top: 24px;
}

.config-banner {
  background: var(--yellow-wash);
  border-bottom: 1px solid var(--yellow-soft);
  color: var(--yellow-ink);
  font-size: 13px;
  padding: 8px 24px;
}

/* ---------------------------------------------------------------- *
   Fleet business: the Management Dashboard (public/js/fleet.js)
   Built to the "Management Dashboard – suggested design" canvas:
   IBM Plex Sans, 60% white / 30% light b:live colours / 10% red, amber and green for status only, always with a word, arrow or ⚠.
   ---------------------------------------------------------------- */
#dash-root {
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  color: #161616;
  background: #ffffff;
  min-height: 100vh;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
#dash-root button { font: inherit; color: inherit; }
#dash-root .sr { position: absolute; left: -9999px; }
#dash-root .d-block { display: block; }
#dash-root .d-muted { color: #525252; }
#dash-root .d-muted.s, #dash-root .d-note.s { font-size: 12px; }
#dash-root .d-muted.b { font-weight: 700; }
#dash-root .d-r { text-align: right; }
#dash-root .d-ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
#dash-root .d-sub { display: block; font-weight: 400; font-size: 11.5px; color: #4e5a66; }
#dash-root code { font-family: var(--mono); font-size: 12px; background: #f4f4f4; padding: 1px 4px; border-radius: 3px; word-break: break-word; }
#dash-root .d-code { font-family: var(--mono); font-size: 12px; background: #f4f4f4; padding: 12px; border-radius: 8px; overflow: auto; max-height: 26rem; white-space: pre; }
#dash-root .d-empty { padding: 40px 4px; color: #525252; }
#dash-root .error { color: #a2191f; }
#dash-root .d-link, #dash-root .d-see { background: none; border: 0; padding: 0; cursor: pointer; color: #046a99; font-weight: 700; white-space: nowrap; }
#dash-root .d-link { font-size: 12.5px; }
#dash-root .d-see { font-size: 11.5px; }
#dash-root .d-link:hover, #dash-root .d-see:hover { text-decoration: underline; }
#dash-root .d-link0 { background: none; border: 0; padding: 0; cursor: pointer; color: #046a99; text-decoration: underline; }

/* the dashboard's tabs and Sync, in the portal's top bar */
.masthead .d-tabs { display: flex; flex: 1 1 auto; min-width: 0; overflow-x: auto; align-self: stretch; scrollbar-width: none; }
.masthead .d-tabs a {
  display: flex; align-items: center; padding: 0 11px; font-size: 13px; font-weight: 600; color: #046a99; text-decoration: none;
  white-space: nowrap; border-bottom: 3px solid transparent; border-top: 3px solid transparent;
}
.masthead .d-tabs a[aria-current="page"] { font-weight: 700; color: #161616; border-bottom-color: #f6af12; }
.masthead .d-syncbox { display: flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; }
.masthead .d-synctext { font-size: 10.5px; color: #525252; text-align: right; line-height: 1.25; }
.masthead .d-synctext strong { color: #161616; font-weight: 600; }
.masthead .d-syncsub { display: block; font-size: 9.5px; }
.masthead .d-syncbtn {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border-radius: 8px;
  cursor: pointer; background: #fff; border: 1px solid #0587c0; color: #046a99;
}
.masthead .d-syncbtn[disabled] { border-color: #c6c6c6; color: #8d8d8d; opacity: 0.7; cursor: progress; }
.masthead .d-syncbtn[aria-busy="true"] svg { animation: d-spin 1s linear infinite; }
@keyframes d-spin { to { transform: rotate(360deg); } }
#dash-root .d-syncbar {
  margin: 12px 14px 0; border-radius: 10px; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center;
  background: #fff; box-shadow: inset 0 0 0 1px rgba(17, 146, 232, 0.35);
}
#dash-root .d-syncbar.done { background: #defbe6; box-shadow: inset 0 0 0 1px rgba(25, 128, 56, 0.45); }
#dash-root .d-syncbar.bad { background: #fff1f1; box-shadow: inset 0 0 0 1px rgba(218, 30, 40, 0.45); }
#dash-root .d-syncbar > strong { font-size: 13px; font-weight: 700; }
#dash-root .d-syncprog { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; }
#dash-root .d-prog { height: 8px; border-radius: 999px; background: rgba(22, 22, 22, 0.08); overflow: hidden; display: block; }
#dash-root .d-prog span { display: block; height: 100%; border-radius: 999px; background: #2b98cb; transition: width 0.4s; }
#dash-root .d-syncsteps { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; }
#dash-root .d-syncnote { font-size: 12px; color: #525252; }
#dash-root .d-x0 { border: 0; background: transparent; font-size: 16px; color: #525252; cursor: pointer; }

/* filter bar */
#dash-root .d-fbar {
  background: #f2f9fc; border-bottom: 1px solid #cde8f4; padding: 5px 14px; display: flex; flex-wrap: wrap; gap: 6px 12px;
  align-items: center; font-size: 13px;
}
#dash-root .d-fdiv { width: 1px; height: 20px; background: #e0e0e0; }
#dash-root .d-fl { display: flex; gap: 6px; align-items: center; color: #4e5a66; }
#dash-root .d-fright { margin-left: auto; color: #4e5a66; }
#dash-root .d-seg { display: flex; border: 1px solid #c6c6c6; border-radius: 8px; overflow: hidden; width: fit-content; flex-wrap: wrap; }
#dash-root .d-seg button { font-size: 13px; font-weight: 600; border: 0; border-left: 1px solid #c6c6c6; padding: 6px 12px; cursor: pointer; background: #fff; color: #161616; }
#dash-root .d-seg button:first-child { border-left: 0; }
#dash-root .d-seg button[aria-pressed="true"] { background: #e1f1f8; color: #04527a; }
#dash-root .d-seg.pill { border-radius: 999px; }
#dash-root .d-seg.pill button { padding: 7px 14px; }
#dash-root .d-seg.blue button { font-weight: 400; padding: 7px 12px; }
#dash-root .d-seg.blue button[aria-pressed="true"] { background: #2b98cb; color: #161616; font-weight: 600; }
#dash-root .d-seg.sq { font-size: 12.5px; }
#dash-root .d-seg.sq button { font-size: 12.5px; font-weight: 700; padding: 6px 11px; }

/* page */
#dash-root .d-main { padding: 8px 14px 16px; box-sizing: border-box; }
#dash-root .d-stackv { display: flex; flex-direction: column; gap: 10px; }
#dash-root .d-pagefoot { padding: 6px 14px 20px; font-size: 11.5px; color: #8d8d8d; }
#dash-root .d-h1 { margin: 0; font-weight: 600; font-size: 18px; line-height: 1.35; letter-spacing: -0.2px; max-width: 1050px; }
#dash-root .d-big { color: #161616; font-size: 18px; }

/* KPI strip */
#dash-root .d-kpis { display: flex; flex-wrap: wrap; gap: 10px; }
#dash-root .d-kpi {
  flex: 1 1 100px; background: #fff; border: 1px solid #e0e0e0; box-shadow: inset 0 3px 0 #0587c0; border-radius: 10px;
  padding: 7px 10px 5px; text-align: left; display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-width: 0;
}
#dash-root .d-kpi:hover { border-color: #2b98cb; }
#dash-root .d-kpi-n { font-size: 11px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; color: #525252; display: flex; justify-content: space-between; gap: 4px; }
#dash-root .d-kpi-n span { font-size: 10px; letter-spacing: 0.2px; color: #8d8d8d; white-space: nowrap; }
#dash-root .d-kpi-v { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.05; }
#dash-root .d-kpi-d { font-size: 12px; font-weight: 700; }
#dash-root .d-kpi-d span { font-weight: 500; color: #525252; }

/* overview sections and cards */
#dash-root .d-osec { display: flex; flex-direction: column; gap: 6px; }
#dash-root .d-osec-h { display: flex; justify-content: space-between; align-items: baseline; }
#dash-root .d-osec-h h2 { margin: 0; font-size: 15px; font-weight: 700; color: #046a99; border-left: 4px solid #f6af12; padding-left: 8px; }
#dash-root .d-osec-h > span { display: flex; gap: 14px; align-items: baseline; }
#dash-root .d-row { display: flex; flex-wrap: wrap; gap: 8px; }
#dash-root .d-row.nowrap { flex-wrap: nowrap; width: 100%; align-items: stretch; }
#dash-root .d-row.stretch { width: 100%; align-items: stretch; }
#dash-root .d-card {
  background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 9px 11px; color: #161616;
  display: flex; flex-direction: column; gap: 5px; box-sizing: border-box; min-width: 0;
}
#dash-root .d-card.go { cursor: pointer; }
#dash-root .d-card.go:hover { border-color: #2b98cb; }
#dash-root .d-card-h { display: flex; justify-content: space-between; gap: 8px; }
#dash-root .d-card-t { font-size: 13px; font-weight: 700; }
#dash-root .d-when { font-size: 10.5px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; color: #525252; background: #f4f4f4; border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
#dash-root .d-say { font-size: 12px; color: #525252; }
#dash-root .d-foot { font-size: 11.5px; color: #525252; }
#dash-root .d-legend { font-size: 11.5px; color: #525252; display: flex; gap: 4px 12px; flex-wrap: wrap; align-items: center; }
#dash-root .d-sw { white-space: nowrap; }
#dash-root .d-swb { display: inline-block; width: 9px; height: 9px; border-radius: 2px; vertical-align: -1px; }
#dash-root .d-swl { display: inline-block; width: 14px; vertical-align: middle; }
#dash-root .d-grad { display: inline-block; width: 90px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #dcefF8, #b3dcef, #7fc3e3, #3fa3d2); }
#dash-root .d-sublabel { font-size: 11.5px; font-weight: 700; color: #525252; }

/* chart pieces */
#dash-root .d-vcols { display: flex; align-items: flex-end; gap: 8px; border-bottom: 1px solid #e0e0e0; }
#dash-root .d-vcol { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 3px; min-width: 0; }
#dash-root .d-vv { font-size: 11px; font-weight: 700; white-space: nowrap; }
#dash-root .d-vb { width: 100%; border-radius: 4px 4px 0 0; }
#dash-root .d-vlabels { display: flex; gap: 8px; }
#dash-root .d-vlabels > span { flex: 1; text-align: center; font-size: 11px; color: #525252; min-width: 0; }
#dash-root .d-vlabels.small > span { font-size: 10.5px; }
#dash-root .d-xlabels { display: flex; justify-content: space-between; font-size: 10.5px; color: #525252; }
#dash-root .d-linechart + .d-xlabels { margin-left: 30px; }
#dash-root .d-bars { display: flex; flex-direction: column; gap: 6px; }
#dash-root .d-bar-row { display: grid; gap: 8px; align-items: center; font-size: 12px; background: none; border: 0; padding: 0; text-align: left; width: 100%; }
#dash-root button.d-bar-row { cursor: pointer; }
#dash-root button.d-bar-row:hover .d-ell { color: #046a99; text-decoration: underline; }
#dash-root .d-barv { display: block; border-radius: 3px; }
#dash-root .d-track { display: block; background: #edf5ff; border-radius: 4px; position: relative; overflow: hidden; }
#dash-root .d-track > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
#dash-root .d-twobars { display: flex; flex-direction: column; gap: 2px; }
#dash-root .d-twobars > span { display: block; height: 9px; border-radius: 3px; }
#dash-root .d-tag { font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 0 6px; }
#dash-root .d-stack { display: flex; overflow: hidden; width: 100%; }
#dash-root .d-stack > * { display: flex; align-items: center; justify-content: center; font-size: 11.5px; white-space: nowrap; overflow: hidden; border: 0; padding: 0 6px; }
#dash-root .d-stack.bold > * { font-weight: 700; font-size: 12px; }
#dash-root .d-stack.pill { border-radius: 999px !important; }
#dash-root .d-stack.pill > * { justify-content: flex-start; padding: 0 10px; font-size: 12.5px; font-weight: 600; }
#dash-root .d-stack.small > * { font-size: 11px; font-weight: 700; justify-content: flex-start; }
#dash-root .d-stack > button { cursor: pointer; }
#dash-root .d-minstack { display: flex; height: 12px; border-radius: 3px; overflow: hidden; }
#dash-root .d-minstack.track { background: #edf5ff; }
#dash-root .d-minstack > span { display: block; height: 100%; }
#dash-root .d-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
#dash-root .d-linechart { position: relative; height: 118px; margin-left: 30px; border-left: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; }
#dash-root .d-ax { position: absolute; left: -30px; font-size: 10.5px; color: #525252; }
#dash-root .d-axx { position: absolute; bottom: -17px; font-size: 10.5px; color: #525252; }
#dash-root .d-target { position: absolute; left: 0; right: 0; border-top: 1.5px dashed #da1e28; }
#dash-root .d-target-l { position: absolute; right: 4px; font-size: 10.5px; font-weight: 700; color: #da1e28; }
#dash-root .d-target-l.dark { color: #161616; font-weight: 400; font-size: 11.5px; }
#dash-root .d-revchart { position: relative; border-bottom: 1px solid #e0e0e0; }
#dash-root .d-revcols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 10px; padding: 0 6px; }
#dash-root .d-revcol { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 3px; }
#dash-root .d-revbar { width: 100%; max-width: 46px; display: flex; flex-direction: column; }
#dash-root .d-revchart + .d-vlabels { gap: 10px; padding: 0 6px; }
#dash-root .d-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; justify-content: center; flex: 1; }
#dash-root .d-pielist { display: flex; flex-direction: column; gap: 8px; min-width: 190px; }
#dash-root .d-pielist > span { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; font-size: 12.5px; }
#dash-root .d-pielist i { width: 12px; height: 12px; border-radius: 3px; display: block; }
#dash-root .d-pielist .d-muted { min-width: 58px; text-align: right; }
#dash-root .d-donut { display: flex; align-items: center; gap: 16px; }
#dash-root .d-donutlist { display: flex; flex-direction: column; gap: 5px; flex: 1; font-size: 12.5px; }
#dash-root .d-donutlist button { display: flex; align-items: center; gap: 7px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
#dash-root .d-donutlist i { width: 9px; height: 9px; border-radius: 2px; }
#dash-root .d-donutlist span:nth-child(2) { flex: 1; }
#dash-root .d-donutlist .d-muted { width: 34px; text-align: right; }
#dash-root .d-citycols { display: flex; align-items: flex-end; gap: 18px; height: 88px; padding: 0 6px; border-bottom: 1px solid #e0e0e0; position: relative; }
#dash-root .d-citycols + .d-vlabels { gap: 18px; padding: 0 6px; }
#dash-root .d-heat { display: grid; grid-template-columns: 110px repeat(8, minmax(0, 1fr)) 48px; gap: 3px; font-size: 11.5px; }
#dash-root .d-heat-w { text-align: center; color: #525252; }
#dash-root .d-heat-w.r, #dash-root .d-heat-now { text-align: right; align-self: center; }
#dash-root .d-heat-n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-self: center; }
#dash-root .d-heat-c { height: 22px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
#dash-root .d-tiles2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#dash-root .d-ctile { border: 0; border-radius: 10px; padding: 10px; text-align: left; font-size: 11.5px; cursor: pointer; }
#dash-root .d-ctile-v { font-size: 22px; font-weight: 700; }
#dash-root .d-diverge { display: flex; gap: 8px; height: 128px; }
#dash-root .d-dcol { flex: 1; display: flex; flex-direction: column; height: 100%; }
#dash-root .d-dtop { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
#dash-root .d-dmid { height: 1px; background: #2b98cb; }
#dash-root .d-dbot { flex: 1; display: flex; flex-direction: column; }
#dash-root .d-ridercol { width: 100%; max-width: 48px; background: #edf5ff; border-radius: 4px 4px 0 0; display: flex; align-items: flex-end; justify-content: center; }
#dash-root .d-ridercol > div { width: 58%; background: #3ddbd9; border-radius: 3px 3px 0 0; }
#dash-root .d-funnel { display: flex; flex-direction: column; gap: 5px; align-items: center; }
#dash-root .d-funnel > div { height: 24px; border-radius: 5px; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; box-sizing: border-box; }
#dash-root .d-cohort { display: grid; grid-template-columns: 90px repeat(3, 1fr) 70px; gap: 4px; font-size: 12px; align-items: center; }
#dash-root .d-cohort .c { text-align: center; }
#dash-root .d-cohort .r { text-align: right; }
#dash-root .d-cc { text-align: center; border-radius: 4px; padding: 4px 0; font-weight: 700; }
#dash-root .d-bands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
#dash-root .d-bands button { background: #f4f4f4; border: 0; border-radius: 8px; padding: 8px; text-align: left; cursor: pointer; font-size: 11px; }
#dash-root .d-band-n { font-size: 18px; font-weight: 700; }
#dash-root .d-band-bad { font-weight: 700; color: #da1e28; }
#dash-root .d-scatter { position: relative; margin: 4px 0 18px 30px; border-left: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; }
#dash-root .d-scatter-zone { position: absolute; right: 0; bottom: 0; background: rgba(218, 30, 40, 0.16); }
#dash-root .d-scatter-tag { position: absolute; right: 6px; bottom: 6px; font-size: 10.5px; font-weight: 700; color: #da1e28; }
#dash-root .d-dot { position: absolute; margin: -4px 0 0 -4px; border-radius: 50%; opacity: 0.85; border: 1px solid #fff; padding: 0; cursor: pointer; }
#dash-root .d-dot:hover { opacity: 1; outline: 2px solid #161616; }
#dash-root .d-rprwrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; }
#dash-root .d-rprmonths { flex: 2 1 300px; display: flex; flex-direction: column; gap: 4px; }
#dash-root .d-rprlines { flex: 1 1 180px; display: flex; flex-direction: column; gap: 8px; }
#dash-root .d-cmp { display: grid; grid-template-columns: 88px repeat(3, 1fr); gap: 6px; font-size: 12px; align-items: center; margin-top: 4px; }
#dash-root .d-cmp .c { text-align: center; }
#dash-root .d-cmpcell { display: flex; flex-direction: column; gap: 3px; align-items: center; }

/* tab pages */
#dash-root .d-panel { border: 1px solid #e0e0e0; border-radius: 12px; background: #fff; padding: 10px 12px; min-width: 0; }
#dash-root .d-panel-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 10px; }
#dash-root .d-panel h2 { margin: 0; font-size: 16px; font-weight: 600; color: #046a99; }
#dash-root .d-panel-h p, #dash-root .d-p { margin: 4px 0 0; font-size: 13px; color: #4e5a66; }
#dash-root .d-panel-h + * { margin-top: 10px; }
#dash-root .d-panel-f { margin: 10px 0 0; font-size: 13px; }
#dash-root .d-note { font-size: 12.5px; color: #4e5a66; }
#dash-root .d-flexcol { display: flex; flex-direction: column; }
#dash-root .d-grid2 { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(0, 1.9fr); gap: 8px; align-items: stretch; }
#dash-root .d-grid2.even { grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); }
#dash-root .d-splitcards { display: grid; gap: 8px; margin-top: 8px; }
#dash-root .d-splitcards button { border: 0; border-top: 3px solid; padding: 6px 0 0; background: none; text-align: left; cursor: pointer; }
#dash-root .d-sc-n { font-size: 13px; font-weight: 600; }
#dash-root .d-sc-v { font-weight: 700; letter-spacing: -0.5px; font-size: 22px; }
#dash-root .d-sc-s { font-size: 11.5px; color: #4e5a66; line-height: 1.35; }
#dash-root .d-cities { display: flex; flex-direction: column; justify-content: space-evenly; gap: 8px; flex: 1; margin-top: 6px; }
#dash-root .d-cityrow { display: grid; grid-template-columns: 96px 1fr 76px; gap: 10px; align-items: center; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
#dash-root .d-cityname { font-size: 14px; font-weight: 600; }
#dash-root .d-cityname .d-muted { font-size: 12px; font-weight: 400; }
#dash-root .d-citybar { position: relative; height: 26px; background: #edf5ff; border-radius: 4px; }
#dash-root .d-citybar > span:first-child { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
#dash-root .d-citytarget { position: absolute; top: -4px; bottom: -4px; border-left: 2px dashed #161616; }
#dash-root .d-citysum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; padding: 8px 0 0; border: 0; border-top: 1px solid #e0e0e0; background: none; text-align: left; cursor: pointer; }
#dash-root .d-citysum strong { font-size: 18px; }
#dash-root .d-ubar { display: flex; gap: 8px; align-items: center; }
#dash-root .d-ubar .d-track { flex: 1; }
#dash-root .d-ubar strong { width: 40px; text-align: right; }
#dash-root .d-idlegrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
#dash-root .d-dotted, #dash-root .d-num-link { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
#dash-root .d-name-link { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; color: #046a99; text-align: left; }
#dash-root .d-name-link:hover { text-decoration: underline; }
#dash-root .d-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
#dash-root .d-input { font: inherit; font-size: 13px; width: 230px; padding: 7px 10px; border: 1px solid #c6c6c6; border-radius: 999px; }
#dash-root .d-pbtn { font-size: 13px; border: 1px solid #c6c6c6; background: #fff; border-radius: 999px; padding: 5px 10px; color: #161616; cursor: pointer; }
#dash-root .d-pbtn[disabled] { color: #8d8d8d; cursor: default; }
#dash-root .d-fchip { font-size: 12.5px; border: 1px solid #c6c6c6; background: #fff; color: #4e5a66; border-radius: 999px; padding: 4px 11px; cursor: pointer; }
#dash-root .d-fchip.on { border-color: #2b98cb; color: #161616; font-weight: 600; }
#dash-root .d-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; color: #4e5a66; flex-wrap: wrap; }
#dash-root .d-pager-b { display: inline-flex; gap: 6px; margin-left: 10px; }
#dash-root .d-tbl { overflow-x: auto; }
#dash-root .d-table { border-collapse: collapse; width: 100%; font-size: 13px; }
#dash-root .d-table th { text-align: left; font-size: 12px; font-weight: 500; color: #4e5a66; padding: 7px 8px; border-bottom: 1px solid #c6c6c6; white-space: nowrap; background: #fff; }
#dash-root .d-table th.sortable { cursor: pointer; }
#dash-root .d-table th[aria-sort="ascending"]::after { content: " ▲"; font-size: 9px; }
#dash-root .d-table th[aria-sort="descending"]::after { content: " ▼"; font-size: 9px; }
#dash-root .d-table td { padding: 5px 8px; border-bottom: 1px solid #f4f4f4; vertical-align: middle; }
#dash-root .d-table .n { text-align: right; white-space: nowrap; }
#dash-root .d-table tr.go { cursor: pointer; }
#dash-root .d-table tr.go:hover td { background: #f2f9fc; }
#dash-root .d-table tr.tot td { font-weight: 600; padding: 7px 8px; border-bottom: 0; }
#dash-root .d-dotc { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
#dash-root .d-bigcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
#dash-root .d-bigcards.wide { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
#dash-root .d-bigcard {
  text-align: left; background: #fff; border: 1px solid #e0e0e0; box-shadow: inset 0 3px 0 #0587c0; border-radius: 10px; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 4px; cursor: pointer;
}
#dash-root .d-bigcard:hover { border-color: #2b98cb; }
#dash-root .d-bigcard.tall { border-radius: 12px; padding: 12px 14px; }
#dash-root .d-bc-n { font-size: 13px; font-weight: 600; }
#dash-root .d-bc-v { font-weight: 700; letter-spacing: -0.5px; font-size: 28px; line-height: 1.1; }
#dash-root .d-bc-v.big { font-size: 30px; }
#dash-root .d-bc-c { font-size: 12px; }
#dash-root .d-bc-cta { font-size: 11.5px; font-weight: 700; }
#dash-root .d-pill { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 8px; width: fit-content; white-space: nowrap; }
#dash-root .d-queues { display: flex; flex-direction: column; gap: 10px; }
#dash-root .d-queue { display: grid; grid-template-columns: minmax(150px, 220px) 1fr 140px; gap: 12px; align-items: center; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-size: 13px; }
#dash-root .d-q-n { font-size: 13.5px; font-weight: 600; }
#dash-root .d-q-n .d-muted { font-weight: 400; font-size: 12px; }
#dash-root .d-q-bar { display: flex; height: 18px; border-radius: 4px; overflow: hidden; }
#dash-root .d-wf { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: end; height: 150px; border-bottom: 1px solid #c6c6c6; }
#dash-root .d-wfcol { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 4px; align-items: center; font-size: 12px; font-weight: 600; }
#dash-root .d-wfbar { width: 100%; border-radius: 4px; display: block; }
#dash-root .d-wflabels { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; font-size: 12px; color: #4e5a66; text-align: center; padding-top: 6px; }
#dash-root .d-wffacts { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; font-size: 13px; }
#dash-root .d-wffacts strong { font-weight: 600; }
#dash-root .d-reasons { display: grid; grid-template-columns: 170px 1fr 60px; gap: 6px 10px; align-items: center; font-size: 13px; }
#dash-root .d-reasons .d-twobars > span { border-radius: 3px; }
#dash-root .d-ophead { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; }
#dash-root .d-rank, #dash-root .d-owed { list-style: none; margin: 8px 0 0; padding: 0; }
#dash-root .d-rank li { display: grid; grid-template-columns: 22px 1fr 90px 84px; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid #f4f4f4; font-size: 13px; }
#dash-root .d-owed li { display: grid; grid-template-columns: 1fr 110px 90px; gap: 8px; padding: 6px 0; border-top: 1px solid #f4f4f4; font-size: 13px; }
#dash-root .d-h3 { margin: 16px 0 6px; font-size: 14px; font-weight: 600; }
#dash-root .d-bridge { display: flex; flex-direction: column; gap: 8px; }
#dash-root .d-br-row { display: grid; grid-template-columns: 200px 1fr 80px; gap: 10px; align-items: center; font-size: 13px; }
#dash-root .d-br-track { position: relative; height: 18px; }
#dash-root .d-br-track > span { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
#dash-root .d-pend { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 8px; }
#dash-root .d-pend-t { display: flex; flex-direction: column; gap: 2px; text-align: left; background: #fff; border: 1px solid #e0e0e0; border-left: 3px solid #c6c6c6; border-radius: 8px; padding: 10px 12px; cursor: pointer; font-size: 12px; }
#dash-root .d-pend-t[aria-pressed="true"] { outline: 2px solid #2b98cb; outline-offset: -2px; background: #e1f1f8; }
#dash-root .d-pend-n { font-size: 13px; font-weight: 600; }
#dash-root .d-pend-t strong { font-size: 22px; font-weight: 700; }
#dash-root .d-defs { display: grid; grid-template-columns: 7rem 1fr; gap: 6px 12px; font-size: 12.5px; margin: 0; }
#dash-root .d-defs dt { color: #525252; }
#dash-root .d-defs dd { margin: 0; }
#dash-root .d-notes { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; }

/* side panel (the list behind a count) */
#dash-root .d-pwrap { position: fixed; inset: 0; background: rgba(22, 22, 22, 0.28); z-index: 60; display: flex; justify-content: flex-end; }
#dash-root .d-panel-side { width: min(860px, 100%); height: 100%; background: #fff; box-shadow: -12px 0 40px rgba(22, 22, 22, 0.18); display: flex; flex-direction: column; }
#dash-root .d-ph { padding: 10px 16px 8px; border-bottom: 1px solid #e0e0e0; display: flex; flex-direction: column; gap: 10px; }
#dash-root .d-ph-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
#dash-root .d-crumb { font-size: 12px; color: #525252; }
#dash-root .d-ph h1 { margin: 4px 0 0; font-size: 20px; font-weight: 700; letter-spacing: -0.3px; color: #525252; }
#dash-root .d-rule { font-size: 12.5px; color: #525252; margin-top: 2px; }
#dash-root .d-x { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #c6c6c6; background: #fff; font-size: 18px; cursor: pointer; flex: none; }
#dash-root .d-ph-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#dash-root .d-chip { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 10px; }
#dash-root .d-psearch { margin-left: auto; display: flex; align-items: center; gap: 6px; border: 1px solid #c6c6c6; border-radius: 8px; padding: 6px 10px; }
#dash-root .d-psearch input { font: inherit; font-size: 13px; border: 0; outline: none; width: 170px; }
#dash-root .d-csv { font-size: 13px; font-weight: 700; color: #161616; background: #2b98cb; border: 0; border-radius: 8px; padding: 7px 12px; text-decoration: none; cursor: pointer; }
#dash-root .d-pbody { flex: 1; overflow: auto; padding: 0 16px; }
#dash-root .d-ptable th { position: sticky; top: 0; font-size: 11.5px; font-weight: 700; color: #525252; padding: 10px 8px; border-bottom: 1px solid #e0e0e0; }
#dash-root .d-ptable td { padding: 6px 8px; }
#dash-root .d-rpill { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
#dash-root .d-pfoot { padding: 8px 16px; border-top: 1px solid #e0e0e0; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: #525252; flex-wrap: wrap; }
#dash-root .d-api { font-size: 12px; color: #8d8d8d; word-break: break-all; }

@media (max-width: 900px) {
  .masthead__inner { flex-wrap: wrap; }
  .masthead__slot { flex-basis: 100%; order: 3; }
  .masthead .d-synctext { display: none; }
  #dash-root .d-grid2, #dash-root .d-grid2.even { grid-template-columns: 1fr; }
  #dash-root .d-row.nowrap { flex-wrap: wrap; }
  #dash-root .d-idlegrid, #dash-root .d-splitcards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #dash-root .d-main, #dash-root .d-fbar { padding-left: 16px; padding-right: 16px; }
  #dash-root .d-fright { margin-left: 0; }
}

/* ------------------------------------------------------------------ *
 * Top bar: who is signed in
 * ------------------------------------------------------------------ */
.masthead__me { display: flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; }
.masthead__email { font-size: 12px; color: #525252; text-align: right; line-height: 1.25; }
.masthead__role { display: block; font-size: 10.5px; font-weight: 700; color: #04527a; background: #e1f1f8; border-radius: 4px; padding: 0 6px; width: fit-content; margin-left: auto; }
.masthead__signout, .masthead__signin { font: inherit; font-size: 12.5px; font-weight: 600; border: 1px solid #c6c6c6; background: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; color: #161616; text-decoration: none; flex: none; }
.masthead__signin { border-color: #0587c0; color: #046a99; }

/* ------------------------------------------------------------------ *
 * Operator Access (public/js/operators.js), to the prototype
 * ------------------------------------------------------------------ */
#opa-root { font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif; color: #161616; font-variant-numeric: tabular-nums; min-width: 0; }
#opa-root .o-tabs { display: flex; gap: 4px; border-bottom: 1px solid #e0e0e0; padding: 0 14px; }
#opa-root .o-tab { padding: 10px 11px 8px; font-size: 13px; font-weight: 500; color: #525252; text-decoration: none; border-bottom: 3px solid transparent; }
#opa-root .o-tab.on { color: #046a99; font-weight: 700; border-bottom-color: #f6af12; }
#opa-root .o-filters { background: #f2f9fc; border-bottom: 1px solid #cde8f4; padding: 6px 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; }
#opa-root .o-filters-t { font-weight: 700; }
#opa-root .o-sep { width: 1px; height: 20px; background: #e0e0e0; }
#opa-root .o-filters label { display: flex; gap: 6px; align-items: center; color: #525252; }
#opa-root .o-filters input { font: inherit; font-size: 13px; padding: 4px 8px; border: 1px solid #c6c6c6; border-radius: 8px; background: #fff; color: #161616; }
#opa-root .o-filters input { width: 200px; max-width: 100%; }
#opa-root .o-count { margin-left: auto; color: #525252; }
#opa-root .o-main { padding: 10px 14px 24px; display: flex; flex-direction: column; gap: 10px; }
#opa-root .o-section { display: flex; flex-direction: column; gap: 6px; }
#opa-root .o-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: #525252; }
#opa-root h2 { margin: 0; font-size: 15px; font-weight: 700; color: #046a99; border-left: 4px solid #f6af12; padding-left: 8px; }
#opa-root .o-tablebox { background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; overflow-x: auto; }
#opa-root .o-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 860px; }
#opa-root .o-table th { background: #f4f4f4; text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: #525252; padding: 8px 12px; }
#opa-root .o-table td { padding: 8px 12px; border-top: 1px solid #e0e0e0; vertical-align: middle; }
#opa-root .o-table .n { text-align: right; }
#opa-root .o-table tr.go { cursor: pointer; }
#opa-root .o-table tr.go:hover td, #opa-root .o-table tr.go:focus td { background: #f2f9fc; }
#opa-root .o-table tr.fresh td { background: #f2f9fc; }
#opa-root .o-sub { display: block; font-size: 11.5px; color: #525252; font-weight: 400; }
#opa-root .o-muted { color: #525252; }
#opa-root .small { font-size: 12px; }
#opa-root .nowrap { white-space: nowrap; }
#opa-root .mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; }
#opa-root .warnnum { color: #a2191f; font-weight: 700; }
#opa-root .o-empty { margin: 0; padding: 18px 12px; font-size: 13px; color: #525252; }
#opa-root .o-pill { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
#opa-root .o-pill.ok { background: color-mix(in srgb, #198038 30%, #fff); }
#opa-root .o-pill.warn { background: color-mix(in srgb, #f1c21b 30%, #fff); }
#opa-root .o-pill.info { background: #e1f1f8; color: #04527a; }
#opa-root .o-pill.grey { background: #f4f4f4; }
#opa-root .o-btn { font: inherit; font-size: 13.5px; font-weight: 600; border: 1px solid #c6c6c6; background: #fff; border-radius: 8px; padding: 0 14px; min-height: 40px; cursor: pointer; color: #161616; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; white-space: nowrap; }
#opa-root .o-btn.small { font-size: 12.5px; font-weight: 700; min-height: 32px; padding: 0 10px; border-color: #0587c0; color: #046a99; }
#opa-root .o-btn.dark { border-color: #161616; color: #161616; }
#opa-root .o-btn.primary { background: #046a99; border-color: #046a99; color: #fff; font-weight: 700; }
#opa-root .o-btn:disabled { opacity: .45; cursor: not-allowed; }
#opa-root .o-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#opa-root .o-alert { margin: 0; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
#opa-root .o-alert.bad { background: color-mix(in srgb, #da1e28 30%, #fff); border: 1px solid #da1e28; }
#opa-root .o-alert.warn { background: color-mix(in srgb, #f1c21b 30%, #fff); border: 1px solid #f1c21b; }
#opa-root .o-live { background: color-mix(in srgb, #f1c21b 30%, #fff); border: 1px solid #f1c21b; border-radius: 10px; padding: 8px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; }
#opa-root .o-live.inline { align-self: flex-start; }
#opa-root .o-live-t { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
#opa-root .o-live-t svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
#opa-root .o-live-r { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#opa-root .o-timer { font-weight: 700; background: #fff; border: 1px solid #8d8d8d; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
#opa-root .o-timer.low { background: color-mix(in srgb, #da1e28 30%, #fff); border-color: #da1e28; }
#opa-root .o-scrim { position: fixed; inset: 0; background: rgba(22, 22, 22, .45); display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; z-index: 60; overflow-y: auto; }
#opa-root .o-dialog { width: 100%; max-width: 520px; background: #fff; border-radius: 10px; box-shadow: inset 0 3px 0 #0587c0, 0 12px 32px rgba(22, 22, 22, .25); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
#opa-root .o-dialog h2 { border: 0; padding: 0; color: #161616; font-size: 19px; }
#opa-root .o-dlg-h { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
#opa-root .o-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #525252; }
#opa-root .o-cando { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-size: 12.5px; line-height: 1.4; }
#opa-root .o-cando > div { border-radius: 8px; padding: 8px 10px; }
#opa-root .o-cando strong { display: block; font-size: 12px; margin-bottom: 2px; }
#opa-root .o-cando .ok { background: color-mix(in srgb, #198038 30%, #fff); }
#opa-root .o-cando .bad { background: color-mix(in srgb, #da1e28 30%, #fff); }
#opa-root .o-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
#opa-root .o-field select { height: 40px; width: 100%; }
#opa-root .o-field input { font: inherit; font-size: 13.5px; font-weight: 500; padding: 8px 10px; border: 1px solid #c6c6c6; border-radius: 8px; background: #fff; color: #161616; min-height: 40px; }
#opa-root .o-req { color: #a2191f; font-weight: 400; }
#opa-root .o-seg { display: flex; border: 1px solid #c6c6c6; border-radius: 8px; overflow: hidden; align-self: flex-start; }
#opa-root .o-seg button { font: inherit; font-size: 13px; border: 0; border-left: 1px solid #c6c6c6; padding: 8px 16px; cursor: pointer; background: #fff; color: #161616; min-height: 40px; }
#opa-root .o-seg button:first-child { border-left: 0; }
#opa-root .o-seg button.on { background: #e1f1f8; color: #04527a; font-weight: 700; }
#opa-root .o-ack { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.4; cursor: pointer; }
#opa-root .o-ack input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: #0587c0; }
#opa-root .o-dlg-f { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid #e0e0e0; padding-top: 12px; }
#opa-root .o-hint { font-size: 12px; color: #525252; }
#opa-root .o-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
#opa-root .o-detail { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
#opa-root .o-summary { flex: 999 1 480px; min-width: 0; background: #fff; border: 1px solid #e0e0e0; box-shadow: inset 0 3px 0 #0587c0; border-radius: 10px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
#opa-root .o-summary h1 { margin: 0; font-size: 20px; }
#opa-root .o-summary p { margin: 0; font-size: 13.5px; }
#opa-root .o-summary dl { margin: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 12px; font-size: 13.5px; }
#opa-root .o-summary dt { color: #525252; }
#opa-root .o-summary dd { margin: 0; }
#opa-root .o-summary .o-actions { margin-left: 0; border-top: 1px solid #e0e0e0; padding-top: 12px; }
#opa-root .o-log { flex: 1 1 340px; min-width: 0; max-width: 520px; background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
#opa-root .o-log h2 { border: 0; padding: 0; color: #161616; font-size: 14px; }
#opa-root .o-log p { margin: 0; }
#opa-root .o-log ol { list-style: none; margin: 0; padding: 0; max-height: 560px; overflow-y: auto; }
#opa-root .o-log li { display: grid; grid-template-columns: 54px 50px minmax(0, 1fr); gap: 2px 8px; align-items: center; padding: 6px 0; border-top: 1px solid #e0e0e0; font-size: 12px; }
#opa-root .o-log .path { overflow-wrap: anywhere; }
#opa-root .o-log .when { grid-column: 3; font-size: 11px; }
#opa-root .o-m, #opa-root .o-code { font-weight: 700; font-size: 11px; text-align: center; border-radius: 4px; padding: 1px 0; background: #f4f4f4; }
#opa-root .o-m.post { background: #e1f1f8; }
#opa-root .o-code.ok { background: color-mix(in srgb, #198038 30%, #fff); }
#opa-root .o-code.warn { background: color-mix(in srgb, #f1c21b 30%, #fff); }
#opa-root .o-code.bad { background: color-mix(in srgb, #da1e28 30%, #fff); }
#opa-root .o-gate { min-height: calc(100vh - 120px); display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: #f2f9fc; }
#opa-root .o-gate-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid #e0e0e0; box-shadow: inset 0 3px 0 #0587c0; border-radius: 10px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
#opa-root .o-gate-card h1 { margin: 0; font-size: 22px; }
#opa-root .o-gate-card p { margin: 0; font-size: 14px; color: #525252; line-height: 1.45; }
#opa-root .o-brand { display: flex; align-items: center; gap: 10px; }
#opa-root .o-brand span { font-size: 13px; font-weight: 600; color: #525252; border-left: 1px solid #c6c6c6; padding-left: 10px; }
#opa-root .o-checks { margin: 0; padding: 12px 0 0 18px; border-top: 1px solid #e0e0e0; font-size: 12.5px; color: #525252; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 640px) {
  #opa-root .o-cando { grid-template-columns: 1fr; }
  #opa-root .o-summary dl { grid-template-columns: 1fr; }
  .masthead__email { display: none; }
}

/* ------------------------------------------------------------------ *
 * TDD Review (public/js/tdd-review.js), to the prototype
 * ------------------------------------------------------------------ */
#tdd-root {
  --t-line: #e0e0e0; --t-line2: #c6c6c6; --t-ink2: #525252; --t-ink3: #8d8d8d; --t-soft: #f4f4f4;
  --t-brand: #0587c0; --t-link: #046a99; --t-amber: #f6af12; --t-fbar: #f2f9fc; --t-fbarline: #cde8f4;
  --t-selbg: #e1f1f8; --t-selfg: #04527a; --t-ok: #198038; --t-err: #da1e28; --t-warn: #8e6a00;
  --t-mark: #f1c21b; --t-marksoft: #fcf4d6; --t-chip: #edf5ff;
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif; color: #161616; font-size: 14px; line-height: 1.5;
  font-variant-numeric: tabular-nums; display: flex; flex-direction: column; height: calc(100vh - 50px); min-width: 0;
}
#tdd-root[data-pane] { min-height: 0; }
#tdd-root .tr-btn, .tr-dialog .tr-btn { font: inherit; border: 1px solid #c6c6c6; background: #fff; padding: 5px 12px; border-radius: 8px; white-space: nowrap; font-size: 13px; font-weight: 600; color: #161616; text-decoration: none; display: inline-flex; align-items: center; cursor: pointer; }
#tdd-root .tr-btn:hover, .tr-dialog .tr-btn:hover { background: #f4f4f4; }
#tdd-root .tr-btn.primary, .tr-dialog .tr-btn.primary { background: #046a99; color: #fff; border-color: #046a99; }
#tdd-root .tr-btn.primary:hover, .tr-dialog .tr-btn.primary:hover { filter: brightness(1.08); }
#tdd-root .tr-btn.sm, .tr-dialog .tr-btn.sm { padding: 3px 9px; font-size: 12.5px; }
#tdd-root .tr-btn.link { border: 0; background: none; color: #046a99; padding: 2px 0; font-weight: 700; }
#tdd-root .tr-btn:disabled, .tr-dialog .tr-btn:disabled { opacity: .5; cursor: not-allowed; }
#tdd-root #tr-banner:empty { display: none; }
#tdd-root #tr-banner { padding: 6px 14px; background: var(--t-marksoft); font-size: 12.5px; border-bottom: 1px solid var(--t-line); }
#tdd-root .tr-shell { flex: 1; min-height: 0; display: flex; }
#tdd-root #tr-lib { flex: 0 0 250px; }
#tdd-root #tr-doc { flex: 1 1 auto; min-width: 0; }
#tdd-root #tr-side { flex: 0 0 370px; }
#tdd-root[data-lib="closed"] #tr-lib, #tdd-root[data-side="closed"] #tr-side { display: none; }
#tdd-root .tr-shell > * { min-height: 0; overflow: auto; }
#tdd-root #tr-lib { border-right: 1px solid var(--t-line); background: #fff; padding: 8px 0; }
#tdd-root #tr-side { border-left: 1px solid var(--t-line); background: #fff; }
#tdd-root #tr-doc { padding: 0 0 80px; background: var(--t-soft); }
#tdd-root .tr-lib-group { padding: 10px 14px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--t-ink2); }
#tdd-root .tr-lib-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 14px; border-left: 3px solid transparent; font: inherit; cursor: pointer; color: inherit; }
#tdd-root .tr-lib-item:hover { background: var(--t-soft); }
#tdd-root .tr-lib-item[aria-current="true"] { background: var(--t-selbg); border-left-color: var(--t-amber); }
#tdd-root .tr-lib-item[aria-current="true"] b { color: var(--t-selfg); }
#tdd-root .tr-lib-item b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tdd-root .tr-lib-item span { font-size: 12px; color: var(--t-ink2); }
#tdd-root .tr-empty { padding: 36px 22px; color: var(--t-ink2); text-align: center; }
#tdd-root .tr-empty h2 { color: #161616; font-weight: 700; font-size: 18px; margin: 0 0 6px; }
#tdd-root .tr-empty .tr-btn { margin-top: 12px; }
#tdd-root .tr-titlebar { position: sticky; top: 0; z-index: 6; background: var(--t-soft); padding: 8px 14px; border-bottom: 1px solid var(--t-line); box-shadow: 0 2px 6px rgba(22, 22, 22, .04); }
#tdd-root .tr-dochead { padding: 10px 14px 0; display: flex; flex-direction: column; gap: 10px; }
#tdd-root .tr-titlerow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
#tdd-root .tr-titlebar h1 { margin: 0; font-size: 15px; font-weight: 700; color: var(--t-link); border-left: 4px solid var(--t-amber); padding-left: 8px; line-height: 1.35; }
#tdd-root .tr-meta { display: inline-flex; flex-wrap: wrap; gap: 2px 16px; font-size: 12.5px; color: var(--t-ink2); }
#tdd-root .tr-meta b { color: #161616; font-weight: 600; }
#tdd-root .tr-acts-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#tdd-root .tr-titlerow { align-items: center; }
#tdd-root .tr-titlerow .tr-acts-top { margin-left: auto; gap: 4px; }
:is(#tdd-root, .tr-top) .tr-ibtn { display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-width: 32px; height: 32px; padding: 0 7px; border: 1px solid var(--t-line2); border-radius: 8px; background: #fff; color: #161616; cursor: pointer; text-decoration: none; font: inherit; }
:is(#tdd-root, .tr-top) .tr-ibtn:hover { background: var(--t-soft); }
:is(#tdd-root, .tr-top) .tr-ibtn.primary { background: #046a99; border-color: #046a99; color: #fff; }
:is(#tdd-root, .tr-top) .tr-ibtn.primary:hover { filter: brightness(1.08); background: #046a99; }
:is(#tdd-root, .tr-top) .tr-ibtn[aria-pressed="true"], :is(#tdd-root, .tr-top) .tr-ibtn[aria-expanded="true"] { background: var(--t-selbg); color: var(--t-selfg); border-color: var(--t-selfg); }
:is(#tdd-root, .tr-top) .tr-ibtn .tr-ic, #tdd-root .tr-viewswitch .tr-ic { width: 16px; height: 16px; margin: 0; }
:is(#tdd-root, .tr-top) .tr-ibtn .tr-badge { margin-left: 2px; }
#tdd-root .tr-viewswitch button { height: 30px; min-width: 32px; justify-content: center; padding: 0 7px; }
#tdd-root .tr-preview { margin: 10px 14px; }

:is(#tdd-root, .tr-top) .tr-ic { width: 14px; height: 14px; margin-right: 5px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
:is(#tdd-root, .tr-top) .tr-badge { margin-left: 6px; font-size: 11px; font-weight: 700; background: var(--t-marksoft); color: var(--t-warn); border-radius: 10px; padding: 0 7px; }
#tdd-root .tr-btn[aria-expanded="true"] { background: var(--t-selbg); color: var(--t-selfg); }
#tdd-root .tr-kpis { display: flex; flex-wrap: wrap; gap: 10px; }
#tdd-root .tr-kpi { flex: 1 1 96px; min-width: 0; background: #fff; border: 1px solid var(--t-line); box-shadow: inset 0 3px 0 var(--t-brand); border-radius: 10px; padding: 7px 10px 6px; text-align: left; display: flex; flex-direction: column; gap: 2px; color: #161616; font: inherit; }
#tdd-root button.tr-kpi { cursor: pointer; }
#tdd-root button.tr-kpi:hover { border-color: var(--t-line2); }
#tdd-root .tr-kpi .k { font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--t-ink2); }
#tdd-root .tr-kpi .v { font-size: 22px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
#tdd-root .tr-kpi .s { font-size: 12px; font-weight: 600; color: var(--t-ink2); }
#tdd-root .tr-kpi.open .v { color: var(--t-warn); }
#tdd-root .tr-kpi.done .v { color: var(--t-ok); }
#tdd-root .tr-diff { margin: 10px 14px 0; padding: 8px 12px; border: 1px solid var(--t-line); border-radius: 10px; background: #fff; font-size: 13px; }
#tdd-root .tr-diff ul { margin: 0; padding-left: 18px; }
#tdd-root .d-add { color: var(--t-ok); } #tdd-root .d-del { color: var(--t-err); } #tdd-root .d-chg { color: var(--t-warn); }
#tdd-root .tr-viewswitch { display: inline-flex; border: 1px solid var(--t-line2); border-radius: 8px; overflow: hidden; }
#tdd-root .tr-viewswitch button { font: inherit; border: 0; background: #fff; padding: 3px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; color: #161616; }
#tdd-root .tr-viewswitch button + button { border-left: 1px solid var(--t-line2); }
#tdd-root .tr-viewswitch button[aria-pressed="true"] { background: var(--t-selbg); color: var(--t-selfg); }
#tdd-root .tr-preview { margin: 8px 14px; }
#tdd-root .tr-previewframe { width: 100%; height: 72vh; border: 1px solid var(--t-line); border-radius: 10px; background: #fff; }
#tdd-root .tr-paper { max-width: 820px; margin: 10px 14px; background: #fff; border: 1px solid var(--t-line); border-radius: 10px; padding: 24px 32px; font-size: 15px; line-height: 1.65; }
#tdd-root .tr-paper h2, #tdd-root .tr-paper h3, #tdd-root .tr-paper h4 { line-height: 1.35; margin: 1.5em 0 .5em; position: relative; scroll-margin-top: 16px; }
#tdd-root .tr-paper h2 { font-size: 16px; font-weight: 700; color: var(--t-link); border-left: 4px solid var(--t-amber); padding-left: 8px; }
#tdd-root .tr-paper h3 { font-size: 15px; font-weight: 700; }
#tdd-root .tr-paper h4 { font-size: 14px; font-weight: 700; color: var(--t-ink2); }
#tdd-root .tr-paper h2:first-child, #tdd-root .tr-paper h3:first-child { margin-top: 0; }
#tdd-root .sec-tools { display: inline-flex; gap: 6px; margin-left: 10px; vertical-align: middle; user-select: none; }
#tdd-root .sec-count { font: inherit; font-size: 11.5px; font-weight: 700; color: var(--t-warn); background: var(--t-marksoft); border: 0; border-radius: 10px; padding: 1px 8px; cursor: pointer; }
#tdd-root .sec-add { font: inherit; font-size: 12px; font-weight: 600; opacity: 0; border: 1px solid var(--t-line2); background: #fff; border-radius: 8px; padding: 1px 8px; color: var(--t-link); cursor: pointer; }
#tdd-root .tr-paper h2:hover .sec-add, #tdd-root .tr-paper h3:hover .sec-add, #tdd-root .tr-paper h4:hover .sec-add, #tdd-root .sec-add:focus { opacity: 1; }
@media (hover: none) { #tdd-root .sec-add { opacity: 1; } }
#tdd-root .tr-paper p { margin: 0 0 .9em; }
#tdd-root .tr-paper .li { margin: 0 0 .3em 1.2em; display: list-item; list-style: disc; }
#tdd-root .tr-paper pre { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--t-soft); border: 1px solid var(--t-line); padding: 10px 12px; border-radius: 8px; overflow-x: auto; white-space: pre; }
#tdd-root .tr-paper .row { font-size: 13.5px; border-bottom: 1px solid var(--t-line); padding: 4px 0; margin: 0; }
#tdd-root .tr-paper .pg { font-size: 11.5px; color: var(--t-ink3); text-align: right; border-top: 1px dashed var(--t-line); margin: 1.4em 0 .8em; padding-top: 4px; }
#tdd-root mark.hl { background: var(--t-marksoft); border-bottom: 2px solid var(--t-mark); color: inherit; cursor: pointer; padding: 0 1px; }
#tdd-root mark.hl.resolved { background: none; border-bottom: 2px dotted var(--t-ok); }
#tdd-root mark.hl.flash { background: var(--t-mark); color: #161616; }
#tdd-root .tr-nocontent { font-size: 13.5px; color: var(--t-ink2); }
#tdd-root .tr-pdfframe { width: 100%; height: 70vh; border: 1px solid var(--t-line); border-radius: 8px; margin-top: 12px; }
#tdd-root .sidehead { position: sticky; top: 0; background: #fff; z-index: 2; padding: 10px 14px 8px; border-bottom: 1px solid var(--t-line); }
#tdd-root .sidehead h2, .tr-dialog h2 { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--t-link, #046a99); border-left: 4px solid #f6af12; padding-left: 8px; }
#tdd-root .seg, .tr-dialog .seg { display: inline-flex; border: 1px solid #c6c6c6; border-radius: 8px; overflow: hidden; }
#tdd-root .seg button, .tr-dialog .seg button { font: inherit; border: 0; background: #fff; padding: 4px 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
#tdd-root .seg button + button, .tr-dialog .seg button + button { border-left: 1px solid #c6c6c6; }
#tdd-root .seg button[aria-pressed="true"], .tr-dialog .seg button[aria-pressed="true"] { background: #e1f1f8; color: #04527a; }
#tdd-root .filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#tdd-root .filters label { font-size: 13px; color: var(--t-ink2); display: flex; gap: 4px; align-items: center; }
#tdd-root .threads { padding: 4px 12px 40px; }
#tdd-root .th { border: 1px solid var(--t-line); border-radius: 10px; padding: 9px 11px; margin: 8px 0; background: #fff; }
#tdd-root .th.open { box-shadow: inset 3px 0 0 var(--t-amber); }
#tdd-root .th.resolved { box-shadow: inset 3px 0 0 var(--t-ok); }
#tdd-root .th.active { border-color: var(--t-brand); }
#tdd-root .th-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--t-ink2); }
#tdd-root .th-sec { font-weight: 700; color: var(--t-link); cursor: pointer; }
#tdd-root .status { font-weight: 700; font-size: 11.5px; letter-spacing: .3px; text-transform: uppercase; }
#tdd-root .status.open { color: var(--t-warn); } #tdd-root .status.resolved { color: var(--t-ok); }
#tdd-root .quote { font-size: 13px; border-left: 3px solid var(--t-mark); padding: 2px 8px; margin: 6px 0; color: var(--t-ink2); cursor: pointer; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#tdd-root .body { white-space: pre-wrap; margin: 4px 0; font-size: 13.5px; }
#tdd-root .by, .tr-dialog .by { font-size: 12px; color: #525252; }
#tdd-root .chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
#tdd-root .chip, .tr-dialog .chip { background: #edf5ff; color: #04527a; border-radius: 10px; padding: 1px 9px; font-size: 12px; font-weight: 600; border: 1px solid transparent; }
#tdd-root button.chip { cursor: pointer; background: #fff; border-color: var(--t-line2); color: var(--t-ink2); font: inherit; font-size: 12px; }
#tdd-root .chip .x, #tdd-root .pchip .x, .tr-dialog .chip .x { border: 0; background: none; padding: 0 0 0 4px; color: inherit; cursor: pointer; font: inherit; }
#tdd-root .replies { border-top: 1px solid var(--t-line); margin-top: 8px; padding-top: 6px; }
#tdd-root .reply { margin: 6px 0 6px 10px; font-size: 13.5px; }
#tdd-root .reply.resolution { border-left: 3px solid var(--t-ok); padding-left: 8px; }
#tdd-root .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
#tdd-root .jira, #tdd-root .slack { font-size: 12px; font-weight: 600; }
#tdd-root .jira.sent, #tdd-root .slack.sent { color: var(--t-ok); }
#tdd-root .jira.failed, #tdd-root .slack.failed { color: var(--t-err); }
#tdd-root .inline { margin-top: 8px; }
#tdd-root .inline textarea { width: 100%; min-height: 60px; padding: 6px 8px; border: 1px solid var(--t-line2); border-radius: 8px; background: #fff; resize: vertical; font: inherit; box-sizing: border-box; }
#tdd-root .inline .row2 { display: flex; gap: 6px; justify-content: flex-end; align-items: center; margin-top: 6px; flex-wrap: wrap; }
#tdd-root .inline label { font-size: 12px; color: var(--t-ink2); margin-right: auto; display: flex; gap: 4px; align-items: center; }
#tdd-root .composer { padding: 12px 14px 40px; display: flex; flex-direction: column; gap: 12px; }
#tdd-root .people { position: relative; }
#tdd-root .pchip { background: var(--t-selbg); color: var(--t-selfg); border-radius: 10px; padding: 1px 9px; font-size: 12px; font-weight: 600; }
#tdd-root .pchip.cc { background: var(--t-soft); color: var(--t-ink2); border: 1px dashed var(--t-line2); }
#tdd-root .presults { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: #fff; border: 1px solid var(--t-line2); border-radius: 8px; margin-top: 2px; max-height: 220px; overflow: auto; box-shadow: 0 6px 18px rgba(22, 22, 22, .12); }
#tdd-root .presults button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
#tdd-root .presults button:hover, #tdd-root .presults button:focus { background: var(--t-selbg); }
#tdd-root .presults .note { padding: 6px 10px; font-size: 12.5px; color: var(--t-ink2); }
#tdd-root .mentions { font-size: 12px; color: var(--t-ink2); margin: 4px 0; }
#tdd-root .mentions b { color: var(--t-selfg); font-weight: 600; }
#tdd-root .hint, .tr-dialog .hint { font-size: 12.5px; color: #525252; margin: 0; }
#tdd-root .field, .tr-dialog .field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
#tdd-root .field > span, .tr-dialog .field > span { font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #525252; }
#tdd-root .field input, #tdd-root .field textarea,
.tr-dialog .field input, .tr-dialog .field textarea { font: inherit; padding: 6px 9px; border: 1px solid #c6c6c6; border-radius: 8px; background: #fff; }
#tdd-root .field textarea, .tr-dialog .field textarea { min-height: 90px; resize: vertical; }
#tdd-root .check, .tr-dialog .check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
#tdd-root .err, .tr-dialog .err { color: #da1e28; font-size: 12.5px; }
#tdd-root .err:empty, .tr-dialog .err:empty { display: none; }
#tdd-root .ok, .tr-dialog .ok { color: #198038; font-size: 12.5px; }
#tdd-root .dlg-foot, .tr-dialog .dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
#tdd-root .tagbox, .tr-dialog .tagbox { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; border: 1px solid #c6c6c6; border-radius: 8px; padding: 5px 6px; background: #fff; }
#tdd-root .tagbox input, .tr-dialog .tagbox input { border: 0; background: none; flex: 1; min-width: 120px; padding: 2px 4px; outline: none; font: inherit; }
#tdd-root .sugg { display: flex; flex-wrap: wrap; gap: 4px; }
#tdd-root .qprev { border-left: 3px solid var(--t-mark); padding: 4px 10px; background: var(--t-marksoft); font-size: 13px; max-height: 110px; overflow: auto; }
#tdd-root #tr-selbtn { position: fixed; z-index: 20; transform: translate(-50%, -110%); }
#tdd-root #tr-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #161616; color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 13.5px; z-index: 50; max-width: 90vw; }
#tdd-root #tr-toast:empty { display: none; }
#tdd-root .tr-mtabs { display: none; }
.tr-dialog { border: 1px solid #e0e0e0; border-radius: 10px; padding: 0; background: #fff; color: #161616; width: min(620px, 94vw); max-height: 90vh; font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif; font-size: 14px; }
.tr-dialog::backdrop { background: rgba(22, 22, 22, .45); }
.tr-dialog .dlg { padding: 0 0 16px; display: flex; flex-direction: column; gap: 12px; overflow: auto; max-height: 90vh; }
.tr-dialog .dlg > *:not(.dlg-head) { margin-left: 18px; margin-right: 18px; }
.tr-dialog .dlg-head { border-bottom: 2px solid #0587c0; padding: 12px 18px; }
.tr-dialog .dlg-head h2 { margin: 0; }
.tr-dialog .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tr-dialog .addrow { display: flex; gap: 6px; margin-top: 6px; }
.tr-dialog .addrow input { flex: 1; min-width: 0; }
.tr-dialog .field select { height: 36px; width: 100%; }
@media (max-width: 1100px) { #tdd-root #tr-lib { flex-basis: 210px; } #tdd-root #tr-side { flex-basis: 330px; } #tdd-root .tr-paper { padding: 20px 22px; } }
@media (max-width: 820px) {
  #tdd-root .tr-shell > * { display: none; flex: 1 1 auto; }
  #tdd-root[data-pane="lib"] #tr-lib, #tdd-root[data-pane="doc"] #tr-doc, #tdd-root[data-pane="side"] #tr-side { display: block; }
  #tdd-root #tr-lib, #tdd-root #tr-side { border: 0; }
  #tdd-root .tr-mtabs { display: flex; border-top: 1px solid var(--t-line); background: #fff; }
  #tdd-root .tr-mtabs button { flex: 1; border: 0; background: none; padding: 10px; font: inherit; font-size: 14px; border-top: 3px solid transparent; cursor: pointer; }
  #tdd-root .tr-mtabs button[aria-pressed="true"] { font-weight: 700; border-top-color: var(--t-amber); }
  #tdd-root .tr-paper { margin: 10px; padding: 18px 16px; }
  .tr-dialog .grid2 { grid-template-columns: 1fr; }
}

/* TDD: its controls in the Control Panel's top bar */
.tr-top { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; padding-left: 14px; }
.tr-top-filters { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 0 1 auto; overflow: hidden; }
.tr-top-filters select { width: 130px; flex: 0 1 auto; min-width: 90px; }
.tr-top-filters #tr-ver { width: 200px; }
.tr-top-filters #tr-jump { width: 180px; }
.tr-top-search { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.tr-top-search input { font: inherit; font-size: 13px; height: 32px; width: 200px; padding: 0 10px; border: 1px solid #c6c6c6; border-radius: 8px; box-sizing: border-box; }
.tr-top-search input:focus-visible { outline: none; border-color: #0587c0; box-shadow: 0 0 0 3px rgba(5, 135, 192, .2); }
.tr-top .tr-ibtn[aria-controls="tr-side"] { position: relative; }
#tdd-root .tr-titlecol { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
@media (max-width: 1200px) { .tr-top-filters #tr-ver { width: 160px; } .tr-top-filters #tr-jump { width: 140px; } .tr-top-filters select { width: 110px; } }
@media (max-width: 820px) {
  .tr-top #tr-libtoggle, .tr-top #tr-sidetoggle { display: none; }
  .tr-top-filters { display: none; }
}
#tdd-root .tr-titlefilters { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
#tdd-root .tr-titlefilters select { width: 140px; }
#tdd-root .tr-titlefilters #tr-jump { width: 190px; }
#tdd-root .tr-titlerow .tr-titlefilters + .tr-acts-top { margin-left: 8px; }
#tdd-root .tr-sidetitle { display: flex; align-items: center; gap: 8px; }
#tdd-root .tr-sidetitle h2 { margin: 0 auto 0 0; }
#tdd-root .tr-close { font: inherit; font-size: 20px; line-height: 1; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: #525252; cursor: pointer; }
#tdd-root .tr-close:hover { background: var(--t-soft); color: #161616; }
#tdd-root .sidehead .filters { margin-top: 8px; }
@media (max-width: 1200px) { #tdd-root .tr-titlefilters select { width: 120px; } #tdd-root .tr-titlefilters #tr-jump { width: 150px; } }
/* TDD full screen: the page without the library; the comments panel stays. */
#tdd-root:fullscreen, #tdd-root.tr-fullpage { height: 100vh; background: var(--t-soft); }
#tdd-root.tr-fullpage { position: fixed; inset: 0; z-index: 70; }
#tdd-root[data-full="on"] #tr-lib { display: none !important; }
#tdd-root[data-full="on"] .tr-paper { max-width: 960px; margin: 10px auto; }
#tdd-root[data-full="on"] .tr-previewframe { height: calc(100vh - 150px); }
