:root {
  /* Unified color system — Helo Echo dusk/tan */
  --paper: #e8dfd1;
  --paper-2: #ded3c2;
  --paper-3: #cbc4bf;
  --paper-soft: #f0eae0;
  --light-page-bg: #e8dfd1;
  --light-page-bg-muted: #ded3c2;
  --light-card-bg: #f8f4ec;
  --light-card-bg-strong: #fbf7ef;
  --light-card-bg-soft: rgba(248, 244, 236, 0.78);
  --light-field-bg: #fbf7ef;
  --ink: #202234;
  --ink-2: #313548;
  --ink-3: #5b6072;
  --ink-4: #8c8174;
  --line: #c6bba9;
  --line-2: #a99e90;
  --moss: #565d89;
  --moss-2: #202234;
  --moss-soft: #cfd2e3;
  --moss-wash: #e4e4ee;
  --ember: #a3653f;
  --ember-soft: #d2ad87;
  --amber-wash: #efe0ce;

  /* Riverbank accents */
  --stream: #3a6f85;
  --stream-2: #1f4a5d;
  --stream-soft: #cfe1e7;
  --sun: #d99526;
  --berry: #8a3d63;
  --bark: #4a3a28;
  --code-im: #8a6a3f;
  --code-nc: #a64a3a;
  --code-pc: #5f7a52;
  --code-sud: #8c5a6f;
  --code-em: #4a5a6e;
  --code-iw: #7a6b4a;
  --code-voc: #5f7a52;
  --code-bod: #a66f3a;
  --code-rtt: #6b5a7a;
  --dusk: #202234;

  /* Legacy aliases for compatibility */
  --bg: var(--paper);
  --panel: rgba(248, 244, 236, 0.78);
  --panel-strong: rgba(248, 244, 236, 0.9);
  --surface: rgba(248, 244, 236, 0.72);
  --surface-strong: rgba(248, 244, 236, 0.9);
  --muted: var(--ink-3);
  --accent: var(--moss);
  --accent-strong: var(--moss-2);
  --accent-soft: var(--moss-soft);
  --warn: var(--ember);
  --shadow: 7px 8px 0 rgba(32, 34, 52, 0.18), 0 24px 60px rgba(32, 34, 52, 0.12);

  /* Type scale (consistent across all pages) */
  --type-brand: 26px;
  --type-h1: 24px;
  --type-h2: 20px;
  --type-h3: 16px;
  --type-card-title: 14px;
  --type-body: 13px;
  --type-small: 12px;
  --type-label: 10px;
  --type-eyebrow: 9px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(95, 122, 82, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(193, 106, 58, 0.08), transparent 24%),
    linear-gradient(180deg, var(--paper) 0%, #f0eae0 100%);
}

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

button {
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

a {
  color: inherit;
}

button.primary {
  color: var(--ink);
  background: var(--paper-2);
  box-shadow: 3px 4px 0 var(--paper-3);
  border: 1.5px solid var(--ink);
}

button.ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(43, 38, 32, 0.08);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

textarea {
  resize: vertical;
  line-height: 1.3 !important;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.94rem;
  color: var(--muted);
  margin: 0;
}

small {
  color: var(--muted);
}

.app-shell {
  width: min(1580px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1.4rem 0 2rem;
}

.route-control {
  --script-dock-width: 388px;
  --script-dock-height: calc(100vh - 7.2rem);
  --nv-dock-width: 420px;
  --nv-dock-height: calc(100vh - 7.2rem);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 24px;
  backdrop-filter: blur(18px);
  background: rgba(246, 241, 232, 0.9);
  border: 1px solid rgba(217, 205, 180, 0.5);
  box-shadow: var(--shadow);
}

.brand {
  font-family: "Fraunces", serif;
  font-size: var(--type-brand);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.brand-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-3px);
  opacity: 0.7;
  flex-shrink: 0;
}
body:not(.route-public-home):not(.client-mode) .brand-dot {
  background: var(--moon, #f3e6c8);
  box-shadow: 0 0 10px rgba(243, 230, 200, 0.7);
  opacity: 1;
}

.topbar-copy {
  margin: 0;
  color: var(--muted);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.topnav a {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(43, 38, 32, 0.08);
}

.topnav a.is-current {
  color: var(--accent-strong);
  background: rgba(95, 122, 82, 0.12);
  border-color: rgba(95, 122, 82, 0.16);
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.account-menu {
  position: relative;
}

.account-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.7rem 0.45rem 0.45rem;
  border: 1px solid rgba(43, 38, 32, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  cursor: pointer;
}

.account-menu-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(95, 122, 82, 0.16);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.9rem;
}

.account-menu-copy {
  display: grid;
  gap: 0.08rem;
  text-align: left;
}

.account-menu-copy strong {
  font-size: 0.92rem;
  line-height: 1.1;
}

.account-menu-copy small {
  color: var(--muted);
  font-size: 0.74rem;
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 180px;
  padding: 0.4rem;
  border-radius: 14px;
  border: 1px solid rgba(43, 38, 32, 0.1);
  background: rgba(255, 251, 245, 0.98);
  box-shadow: 0 18px 32px rgba(32, 24, 18, 0.14);
  z-index: 80;
}

.account-menu-item {
  display: block;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}

.account-menu-item:hover {
  background: rgba(95, 122, 82, 0.1);
}

.selector-field {
  min-width: 220px;
}

.selector-field-compact {
  min-width: 190px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.button-link:hover {
  transform: translateY(-1px);
}

.button-link:disabled {
  transform: none;
  opacity: 0.6;
  cursor: default;
}

.button-link.primary {
  color: var(--ink);
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  box-shadow: 3px 4px 0 var(--paper-3);
}

.button-link.ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(43, 38, 32, 0.08);
}

.button-wide {
  width: 100%;
}

.button-link[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.55;
}

.hero-chip-grid,
.hero-action-group,
.action-stack {
  display: grid;
  gap: 0.75rem;
}

.action-stack {
  grid-template-columns: 1fr;
}

.tight-stack {
  margin-top: 1rem;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.preview-tile {
  display: grid;
  gap: 0.3rem;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(43, 38, 32, 0.08);
}

.preview-label {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-tile strong {
  color: var(--ink);
  line-height: 1.4;
}

.protocol-row.is-active {
  background: rgba(226, 244, 241, 0.92);
  border-color: rgba(95, 122, 82, 0.16);
}

.protocol-row.is-complete {
  background: rgba(233, 245, 232, 0.9);
  border-color: rgba(34, 94, 52, 0.12);
}

.protocol-index {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(43, 38, 32, 0.08);
  font-weight: 800;
}

.entry-code {
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  padding: 0.4rem 0.6rem;
  border-radius: 14px;
  background: rgba(95, 122, 82, 0.12);
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero,
.panel,
.client-banner {
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 32px;
}

.hero h1,
.panel h2,
.phase-card h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero h1 {
  font-size: clamp(1.9rem, 3.4vw, 3.5rem);
  max-width: 14ch;
}

.hero-copy,
.phase-description,
.support-copy {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--accent-strong);
  font-weight: 700;
}

.panel {
  border-radius: 28px;
  padding: 1.2rem;
}

.workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1.25fr) minmax(360px, 0.95fr);
  grid-template-rows: minmax(460px, auto) auto;
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
}

.phase-rail {
  grid-row: 1 / span 2;
  position: sticky;
  top: 1rem;
}

.client-stage {
  display: flex;
  flex-direction: column;
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.phase-button {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.8rem;
  align-items: center;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(43, 38, 32, 0.06);
  text-align: left;
}

.phase-button.is-active {
  background: linear-gradient(135deg, rgba(95, 122, 82, 0.16), rgba(255, 255, 255, 0.88));
  border-color: rgba(95, 122, 82, 0.22);
}

.phase-button.is-complete .phase-index {
  background: rgba(95, 122, 82, 0.12);
  color: var(--accent-strong);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: center;
}

.compact-head {
  margin-bottom: 0.75rem;
}

.phase-card {
  display: none;
  padding: 1.1rem;
  border-radius: 24px;
  background: var(--panel-strong);
  border: 1px solid rgba(43, 38, 32, 0.06);
}

.phase-card.is-active {
  display: block;
}

.step-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.step-grid.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-span {
  grid-column: 1 / -1;
}

.step-card,
.draft-card,
.summary-card,
.timeline-section,
.helper-strip,
.nudge-strip,
.checkbox-card {
  padding: 1rem;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid rgba(43, 38, 32, 0.06);
}

.checkbox-card {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.9rem;
  align-items: start;
}

.checkbox-card input {
  width: 18px;
  height: 18px;
  margin: 0.15rem 0 0;
}

.quick-action-row,
.transport-grid {
  display: grid;
  gap: 0.75rem;
}

.inline-field {
  gap: 0.25rem;
}

.inline-field input {
  margin-top: 0.2rem;
}

.phase-check-item {
  padding: 0.9rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(43, 38, 32, 0.08);
  background: rgba(255, 255, 255, 0.84);
}

.phase-check-item.is-complete {
  background: rgba(233, 245, 232, 0.84);
  border-color: rgba(34, 94, 52, 0.12);
}

.phase-check-item.is-pending {
  background: rgba(255, 249, 240, 0.88);
  border-color: rgba(180, 83, 9, 0.12);
}

.phase-check-head {
  display: grid;
  gap: 0.35rem;
}

.phase-check-head strong {
  color: var(--ink);
}

.phase-check-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(43, 38, 32, 0.08);
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.phase-check-item.is-complete .phase-check-badge {
  background: rgba(34, 94, 52, 0.12);
  color: #225e34;
}

.phase-check-item.is-pending .phase-check-badge {
  background: rgba(180, 83, 9, 0.14);
  color: #9a3412;
}

.phase-check-detail {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.helper-chip {
  width: 100%;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.85rem 0.9rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(43, 38, 32, 0.08);
  text-align: left;
}

.helper-chip:hover,
.timeline-main:hover,
.timeline-tool:hover {
  transform: none;
}

.helper-code {
  display: inline-grid;
  place-items: center;
  min-height: 46px;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  background: rgba(95, 122, 82, 0.12);
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.helper-copy {
  display: grid;
  gap: 0.2rem;
}

.helper-copy strong {
  color: var(--ink);
}

.nudge-card {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(43, 38, 32, 0.08);
  background: rgba(255, 255, 255, 0.84);
}

.nudge-card.nudge-attention {
  background: rgba(251, 236, 209, 0.88);
  border-color: rgba(180, 83, 9, 0.18);
}

.nudge-card.nudge-note {
  background: rgba(226, 244, 241, 0.9);
  border-color: rgba(95, 122, 82, 0.14);
}

.nudge-card.nudge-ready {
  background: rgba(233, 245, 232, 0.9);
  border-color: rgba(34, 94, 52, 0.12);
}

.nudge-title,
.nudge-copy {
  margin: 0;
}

.nudge-title {
  font-weight: 700;
  color: var(--ink);
}

.nudge-copy {
  margin-top: 0.3rem;
  color: var(--muted);
  line-height: 1.45;
}

.empty-state {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  border: 1px dashed rgba(43, 38, 32, 0.16);
}

.timeline-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(43, 38, 32, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.timeline-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.72);
  border: 0;
  border-top: 1px solid rgba(43, 38, 32, 0.08);
  text-align: left;
}

.timeline-row:first-child {
  border-top: 0;
}

.timeline-row.is-active {
  background: rgba(246, 255, 253, 0.96);
  box-shadow: inset 0 0 0 2px rgba(95, 122, 82, 0.18);
}

.timeline-row.is-dragging {
  opacity: 0.55;
}

.timeline-row.is-drag-target {
  background: rgba(239, 250, 248, 0.98);
}

.timeline-code-cell {
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0.8rem 0.65rem;
  border-right: 1px solid rgba(43, 38, 32, 0.08);
  background: linear-gradient(180deg, rgba(95, 122, 82, 0.08), rgba(95, 122, 82, 0.04));
  border-radius: 18px 0 0 18px;
}

.timeline-code {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.timeline-copy {
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem 1rem 0.95rem;
  background-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent 2.05rem,
    rgba(43, 38, 32, 0.05) 2.05rem,
    rgba(43, 38, 32, 0.05) 2.11rem
  );
  background-size: 100% 2.3rem;
  border-radius: 0 18px 18px 0;
}

.timeline-text {
  color: var(--ink);
  line-height: 1.45;
  min-height: 2.7rem;
  padding-bottom: 0.25rem;
}

.timeline-text.is-placeholder {
  color: var(--muted);
  font-style: italic;
}

.timeline-tool.is-danger {
  color: #8a2b1c;
}

.transport-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.route-control .transport-grid,
.route-control .control-grid {
  gap: 0.45rem;
}

.route-control .transport-grid button,
.route-control .control-toolbar-actions button {
  min-height: 36px;
  padding: 0.55rem 0.8rem;
  font-size: 0.83rem;
}

.route-control .control-grid label {
  gap: 0.12rem;
  font-size: 0.8rem;
}

.route-control .control-grid span,
.route-control .status-label {
  font-size: 0.74rem;
}

.route-control .control-toolbar {
  gap: 0.42rem;
}

.route-control .control-toolbar-actions {
  gap: 0.35rem;
}

.route-control .share-link-field-inline,
.route-control .share-link-field,
.route-control .control-toolbar-meta {
  font-size: 0.74rem;
}

.route-control .share-link-field input,
.route-control .control-grid input,
.route-control .control-grid select {
  margin-top: 0.22rem;
  padding: 0.58rem 0.72rem;
  border-radius: 14px;
  font-size: 0.82rem;
}

.route-control .status-strip {
  gap: 0.45rem;
}

.route-control .status-strip > div {
  padding: 0.55rem 0.7rem;
  border-radius: 16px;
}

.print-sheet {
  color: #1b2325;
}

.print-sheet-inner {
  padding: 1.25rem;
  background: white;
}

.print-sheet-title {
  margin-bottom: 0.4rem;
}

.print-kicker {
  margin: 0;
  font-size: 0.76rem;
  color: #1b2325;
  font-weight: 700;
}

.print-form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
  margin-bottom: 0.45rem;
  padding-bottom: 0.2rem;
  font-size: 0.74rem;
  color: #1b2325;
}

.print-form-inline.is-secondary {
  border-bottom: 1px solid rgba(43, 38, 32, 0.18);
  margin-bottom: 0.7rem;
  padding-bottom: 0.5rem;
  color: #51605e;
}

.print-nv-head {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.75rem;
  margin: 1rem 0 0.35rem;
  padding: 0 0.15rem;
  color: #667573;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.print-nv-body {
  border: 1px solid rgba(43, 38, 32, 0.12);
  border-radius: 18px;
  overflow: hidden;
}

.print-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  min-height: 52px;
  border-top: 1px solid rgba(43, 38, 32, 0.1);
}

.print-row:first-child {
  border-top: 0;
}

.print-code {
  display: grid;
  place-items: center;
  padding: 0.65rem;
  border-right: 1px solid rgba(43, 38, 32, 0.1);
  background: white;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #1b2325;
}

.print-response {
  padding: 0.45rem 0.75rem 0.55rem;
  background: white;
}

.print-row-meta {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #667573;
  margin-bottom: 0.18rem;
}

.print-row-text {
  line-height: 1.45;
  min-height: 1.5rem;
}

.print-row-text.is-pending {
  color: #7b8784;
  font-style: italic;
}

.print-row.is-blank .print-code {
  color: transparent;
  background: white;
}

.print-footer {
  margin-top: 0.55rem;
  text-align: center;
  font-size: 0.7rem;
  color: #687471;
}

.stage {
  position: relative;
  flex: 1;
  min-height: 420px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 45%),
    linear-gradient(135deg, rgba(95, 122, 82, 0.14), rgba(180, 83, 9, 0.1)),
    #fffaf3;
  border: 1px solid rgba(43, 38, 32, 0.08);
}

.track {
  position: absolute;
  background: rgba(43, 38, 32, 0.08);
}

.track-horizontal {
  inset: 50% 7% auto;
  height: 1px;
}

.track-vertical {
  inset: 7% auto 7% 50%;
  width: 1px;
}

.moving-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  margin-top: -17px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #73d8cf 20%, #0f766e 66%, #0a4d49 100%);
  box-shadow: 0 0 0 10px rgba(95, 122, 82, 0.08), 0 22px 40px rgba(95, 122, 82, 0.24);
}

.stage-overlay {
  position: absolute;
  inset: auto 1rem 1rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  width: fit-content;
  max-width: calc(100% - 2rem);
}

.client-banner {
  margin-bottom: 1rem;
  border-radius: 24px;
  padding: 1rem 1.2rem;
}

.client-only {
  display: none;
}

.route-control .workspace {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(300px, auto) auto;
  width: 100%;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  gap: 0.8rem;
}

.route-control .client-stage {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  padding: 0.7rem;
}

.route-control .control-panel {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  padding: 0.8rem;
  gap: 0.7rem;
}

.route-control .page-hero {
  display: none;
}

.route-control .app-shell {
  width: calc(100vw - 1rem);
  max-width: none;
  padding-left: 1rem;
  padding-right: 1rem;
}

.route-control .client-header,
.route-control .stage-overlay {
  display: none;
}

.route-control .stage {
  min-height: clamp(290px, 42vh, 420px);
}

.route-prep .workspace {
  grid-template-columns: 250px minmax(0, 1fr) 340px;
  grid-template-rows: auto;
}

.route-prep .phase-rail {
  position: sticky;
  top: 1rem;
  grid-row: 1;
}

.route-prep .session-panel {
  grid-row: 1;
}

.prep-packet-layout,
.folder-layout {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.prep-packet-layout {
  grid-template-columns: 260px minmax(0, 1fr) 320px;
}

.prep-rail,
.prep-handoff,
.folder-flap,
.folder-storage {
  position: sticky;
  top: 1rem;
}

.prep-rail {
  display: grid;
  gap: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 0.35rem;
}

.packet-card {
  display: grid;
  gap: 1rem;
}

.packet-nav-list,
.packet-table-stack,
.des-question-list,
.readiness-sheet,
.rdi-resource-stack {
  display: grid;
  gap: 0.75rem;
}

.packet-nav-button,
.packet-nav-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(43, 38, 32, 0.08);
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
  color: var(--ink);
}

.packet-nav-item {
  grid-template-columns: 1fr;
  padding: 0.75rem 0.9rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
}

.packet-nav-button:hover,
.packet-nav-button.is-active,
.packet-nav-item:hover,
.packet-nav-item.is-active {
  background: rgba(250, 245, 222, 0.92);
  border-color: rgba(180, 83, 9, 0.18);
}

.packet-nav-index {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(95, 122, 82, 0.12);
  color: var(--accent-strong);
  font-weight: 800;
}

.packet-nav-copy {
  display: grid;
  gap: 0.15rem;
}

.packet-nav-copy small,
.sheet-caption {
  color: var(--muted);
  line-height: 1.45;
}

.rail-title {
  margin: 0;
  font-family: "Fraunces", serif;
  letter-spacing: -0.02em;
  font-size: var(--type-h1);
}

.document-title {
  margin: 0;
  font-family: "Fraunces", serif;
  letter-spacing: -0.02em;
  font-size: var(--type-h2);
}

.prep-document-shell {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.prep-doc-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.doc-toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.doc-role-badge,
.mini-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(95, 122, 82, 0.12);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mini-chip {
  background: rgba(43, 38, 32, 0.08);
  color: var(--muted);
}

.prep-document {
  display: none;
}

.prep-document.is-active {
  display: grid;
}

.template-version-bar {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) auto minmax(14rem, 18rem) auto;
  gap: 0.75rem;
  align-items: end;
  padding: 0.25rem 0 1rem;
  border-bottom: 1px solid var(--line);
}

.template-version-bar .support-copy {
  grid-column: 1 / -1;
  min-height: 1.2em;
  margin: 0;
}

.template-title-field,
.compact-selector {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.template-title-field input,
.compact-selector select {
  width: 100%;
}

@media (max-width: 900px) {
  .template-version-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .template-version-bar .button-link {
    width: 100%;
  }
}

.form-callout {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.92);
  border: 1px solid rgba(180, 83, 9, 0.12);
}

.form-callout p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.packet-table-row,
.des-question,
.readiness-row {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 10px;
  background: rgba(235, 227, 212, 0.5);
  border: 1px solid var(--line);
}

.packet-table-row.is-current {
  background: rgba(250, 245, 222, 0.92);
  border-color: rgba(180, 83, 9, 0.18);
}

.packet-row-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.des-question {
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: start;
}

.des-question-copy {
  display: grid;
  gap: 0.25rem;
}

.des-question-copy p {
  margin: 0;
  line-height: 1.5;
  color: var(--ink);
}

.des-scale-picker {
  display: grid;
  gap: 0.35rem;
}

.readiness-row {
  grid-template-columns: 34px minmax(0, 1.2fr) 148px minmax(240px, 1fr);
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  align-items: start;
  border-radius: 14px;
  border: 1.5px solid rgba(32, 34, 52, 0.18);
  background: rgba(248, 244, 236, 0.72);
  box-shadow: 2px 3px 0 rgba(32, 34, 52, 0.12);
}

.readiness-seq {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--paper-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1;
  margin-top: 0.15rem;
}

.readiness-copy {
  display: grid;
  gap: 0.2rem;
}

.readiness-kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stream-2);
}

.readiness-copy strong {
  font-size: 0.95rem;
  line-height: 1.35;
}

.readiness-row label {
  gap: 0.28rem;
}

.readiness-status select {
  text-align: center;
  font-weight: 600;
  padding: 0.42rem 0.65rem;
}

.readiness-comment input {
  padding: 0.5rem 0.65rem;
}

.compact-preview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-metric-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.compact-metric-row label {
  min-width: 0;
}

.compact-metric-row input {
  width: 100%;
  text-align: center;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
}

.checkbox-inline input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.readiness-grid,
.tx-plan-checklist,
.resource-pill-list,
.info-table-list,
.target-sequence-list,
.prompt-list {
  display: grid;
  gap: 0.75rem;
}

.readiness-grid,
.tx-plan-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.prep-inline-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 1.1rem;
}

.compact-checkbox {
  min-height: 100%;
}

.exercise-script-list {
  display: grid;
  gap: 0.1rem;
}

.exercise-script-step {
  display: grid;
  gap: 0.3rem;
  padding: 0.3rem 0.2rem;
  border-radius: 22px;
  background: transparent;
  border: none;
  width: 100%;
}

.exercise-script-section {
  width: 100%;
  padding: 20px 0 4px;
}

.exercise-script-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.exercise-script-step--static {
  background: var(--color-surface-raised, #f9f9f7);
  border-radius: 8px;
  padding: 12px 16px;
}

.exercise-script-step--static .exercise-script-copy {
  font-style: italic;
  color: var(--muted);
}

.exercise-script-step label {
  width: 100%;
}

.exercise-script-step textarea,
.exercise-script-step input {
  width: 100% !important;
  box-sizing: border-box;
}

.exercise-script-head {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.exercise-script-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.exercise-script-copy {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.exercise-script-response {
  display: grid;
  gap: 0.5rem;
}

.packet-subsection {
  display: grid;
  gap: 0.2rem;
  padding-top: 0.2rem;
  border-top: 1px solid rgba(43, 38, 32, 0.08);
}

.target-event-table {
  display: grid;
  gap: 0.65rem;
}

.target-event-header,
.target-event-grid {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 96px 132px 84px;
  gap: 0.65rem;
  align-items: start;
}

.target-event-header {
  padding: 0 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.target-event-row {
  gap: 0.75rem;
  padding: 0.9rem;
}

.target-event-seq-cell,
.target-event-meta {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.target-event-main,
.target-event-age {
  display: grid;
  gap: 0.35rem;
}

.target-event-main textarea {
  min-height: 62px;
}

.target-event-age input {
  min-height: 48px;
}

.target-event-remove,
.target-event-remove-placeholder {
  align-self: start;
}

.target-event-details {
  display: grid;
  gap: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(43, 38, 32, 0.08);
}

.target-event-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.target-event-detail-head p {
  margin: 0.25rem 0 0;
}

.target-event-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.target-card,
.folder-target,
.storage-card,
.info-row,
.bundle-card,
.session-bundle {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(43, 38, 32, 0.08);
}

.target-card.is-current,
.folder-target.is-current,
.bundle-card.is-active {
  background: rgba(250, 245, 222, 0.9);
  border-color: rgba(180, 83, 9, 0.18);
}

.target-card p,
.folder-target p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.resource-pill small,
.storage-card small {
  color: var(--muted);
}

.portal-account-card,
.portal-linked-card {
  gap: 0.6rem;
}

.field-label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.portal-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.portal-provision-grid {
  display: grid;
  gap: 0.75rem;
}

.portal-linked-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.portal-linked-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.portal-linked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.button-link.compact {
  padding: 0.5rem 0.8rem;
  min-height: 0;
  font-size: 0.82rem;
}

.emdr-conflict-banner {
  position: fixed;
  right: 18px;
  bottom: 76px;
  z-index: 10020;
  width: min(420px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 248, 235, 0.96);
  border: 1px solid var(--line-2);
  box-shadow: 0 18px 36px rgba(43, 38, 32, 0.16);
  display: grid;
  gap: 10px;
}

.emdr-conflict-copy {
  display: grid;
  gap: 4px;
}

.emdr-conflict-copy p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.45;
}

.emdr-conflict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.emdr-no-client-toast {
  position: fixed;
  left: 50%;
  top: 72px;
  transform: translateX(-50%);
  z-index: 1200;
  width: min(400px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 248, 225, 0.97);
  border: 1px solid rgba(190, 145, 30, 0.35);
  box-shadow: 0 12px 32px rgba(43, 38, 32, 0.16);
  display: grid;
  gap: 10px;
}

.emdr-no-client-toast[hidden] {
  display: none;
}

.emdr-no-client-toast-copy {
  display: grid;
  gap: 4px;
}

.emdr-no-client-toast-copy strong {
  font-size: 0.9rem;
  color: var(--ink);
}

.emdr-no-client-toast-copy p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--ink-2);
  line-height: 1.45;
}

.emdr-no-client-toast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.emdr-operational-banner {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 1000;
  width: min(420px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(113, 28, 24, 0.96);
  border: 1px solid rgba(255, 223, 220, 0.35);
  box-shadow: 0 18px 36px rgba(43, 38, 32, 0.24);
  display: grid;
  gap: 10px;
}

.emdr-operational-copy {
  display: grid;
  gap: 4px;
}

.emdr-operational-copy strong,
.emdr-operational-copy p {
  color: #fff7f6;
}

.emdr-operational-copy p {
  margin: 0;
  line-height: 1.45;
}

.emdr-operational-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.coversheet {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 20px;
  background: #fffef8;
  border: 1px solid rgba(43, 38, 32, 0.08);
}

.script-dock {
  position: fixed;
  top: 6.2rem;
  left: 1rem;
  right: auto;
  width: var(--script-dock-width, 388px);
  height: var(--script-dock-height, calc(100vh - 7.2rem));
  min-width: 320px;
  min-height: 360px;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 6.8rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 26px;
  backdrop-filter: blur(18px);
  background: rgba(255, 252, 247, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 20;
  transition: transform 180ms ease, width 180ms ease, height 180ms ease;
}

.script-dock > * {
  min-width: 0;
}

.script-dock.is-collapsed {
  width: auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  max-width: none;
  max-height: none;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.script-dock.is-nav-collapsed .script-tab-row,
.script-dock.is-nav-collapsed .script-subtab-row {
  display: none;
}

.script-dock.is-collapsed .script-tab-row,
.script-dock.is-collapsed .script-subtab-row,
.script-dock.is-collapsed .script-panel-stack,
.script-dock.is-collapsed .script-dock-title,
.script-dock.is-collapsed #togglePacketNav {
  display: none;
}

.script-dock.is-collapsed .script-dock-head {
  gap: 0;
  cursor: default;
}

.script-dock.is-collapsed .script-dock-head-actions {
  flex-wrap: nowrap;
}

.script-dock.is-collapsed .script-dock-resizer {
  display: none;
}

.script-dock.is-collapsed #toggleScriptDock {
  padding-inline: 1rem;
  border-color: rgba(43, 38, 32, 0.08);
  background: rgba(255, 252, 247, 0.98);
  box-shadow: var(--shadow);
}

.script-dock-head h2,
.packet-sheet-head h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  letter-spacing: -0.02em;
}

.script-tab {
  display: block;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(43, 38, 32, 0.08);
  color: var(--muted);
  font-weight: 700;
  text-align: left;
}

.script-tab.is-active {
  color: var(--accent-strong);
  background: rgba(95, 122, 82, 0.12);
  border-color: rgba(95, 122, 82, 0.18);
}

.script-subtab {
  display: block;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 16px;
  background: rgba(248, 247, 240, 0.88);
  border: 1px solid rgba(43, 38, 32, 0.08);
  color: var(--muted);
  font: inherit;
  text-align: left;
}

.script-subtab.is-active {
  color: var(--ink);
  background: rgba(95, 122, 82, 0.12);
  border-color: rgba(95, 122, 82, 0.2);
}

.script-panel.is-active {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.packet-doc-body .step-grid,
.packet-doc-body .packet-section-stack,
.packet-doc-body .packet-line-list {
  align-content: start;
}

.script-dock.is-resizing,
.script-dock.is-dragging {
  user-select: none;
  transition: none;
}

.script-dock.is-dragging .script-dock-head {
  cursor: grabbing;
}

.nv-dock {
  position: fixed;
  top: 6.2rem;
  right: 1rem;
  width: var(--nv-dock-width, 420px);
  height: var(--nv-dock-height, calc(100vh - 7.2rem));
  min-width: 320px;
  min-height: 360px;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 6.8rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 26px;
  backdrop-filter: blur(18px);
  background: rgba(255, 252, 247, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 18;
  transition: transform 180ms ease, width 180ms ease, height 180ms ease;
}

.nv-dock.is-collapsed {
  width: auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  max-width: none;
  max-height: none;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.nv-dock.is-collapsed .nv-dock-title,
.nv-dock.is-collapsed .nv-dock-action-row,
.nv-dock.is-collapsed .nv-sheet,
.nv-dock.is-collapsed .nv-dictation-status,
.nv-dock.is-collapsed #toggleDictation {
  display: none;
}

.nv-dock.is-collapsed .nv-dock-head {
  justify-content: flex-end;
  gap: 0;
}

.nv-dock.is-collapsed .nv-dock-resizer {
  display: none;
}

.nv-dock.is-collapsed #toggleNvDock {
  padding-inline: 1rem;
  border-color: rgba(43, 38, 32, 0.08);
  background: rgba(255, 252, 247, 0.98);
  box-shadow: var(--shadow);
}

.nv-dock-title .eyebrow {
  margin-bottom: 0.15rem;
}

.nv-sheet-list .timeline-row {
  width: 100%;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  padding: 0;
  border-radius: 0;
  border: 0;
  border-top: 1px solid rgba(43, 38, 32, 0.18);
  background: rgba(255, 255, 255, 0.98);
}

.nv-sheet-list .timeline-row.is-active {
  background: rgba(246, 255, 253, 0.96);
  box-shadow: inset 0 0 0 1px rgba(95, 122, 82, 0.2);
}

.nv-sheet-list .timeline-code-cell {
  display: grid;
  gap: 0.18rem;
  align-content: start;
  padding: 0.35rem 0.35rem 0.25rem;
  border-right: 1px solid rgba(43, 38, 32, 0.2);
  background: rgba(255, 255, 255, 0.98);
}

.timeline-code-select {
  width: 100%;
  min-height: 34px;
  padding: 0.25rem 0.4rem;
  border-radius: 10px;
  border: 1px solid rgba(43, 38, 32, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.timeline-code-select.is-guessed {
  border-color: rgba(95, 122, 82, 0.3);
  background: rgba(240, 253, 250, 0.96);
}

.nv-sheet-list .timeline-copy {
  display: grid;
  gap: 0.22rem;
  padding: 0.15rem 0;
  background: transparent;
}

.timeline-textarea {
  margin-top: 0;
  min-height: 52px;
  resize: vertical;
  border: 0;
  border-radius: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 1.75rem,
      rgba(43, 38, 32, 0.12) 1.75rem,
      rgba(43, 38, 32, 0.12) 1.81rem
    );
  background-color: transparent;
  padding: 0.35rem 0.55rem 0.2rem;
  line-height: 1.45;
  box-shadow: none;
}

.nv-sheet-list .timeline-row.is-rtt {
  background: rgba(255, 247, 237, 0.98);
}

.nv-sheet-list .timeline-row.is-rtt .timeline-code-cell {
  background: rgba(255, 247, 237, 0.98);
}

.nv-sheet-list .timeline-row.is-rtt .timeline-code-note {
  color: rgba(180, 83, 9, 0.7);
}

.nv-sheet-list .timeline-row.is-blank {
  border-top: 1px solid rgba(43, 38, 32, 0.16);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.nv-sheet-list .timeline-row.is-blank .timeline-code-cell {
  background: rgba(255, 255, 255, 0.72);
}

.nv-sheet-list .timeline-row.is-blank .timeline-copy {
  min-height: 52px;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 1.75rem,
    rgba(43, 38, 32, 0.12) 1.75rem,
    rgba(43, 38, 32, 0.12) 1.81rem
  );
}

.nv-dock.is-resizing {
  user-select: none;
  transition: none;
}

.nv-dock.is-dragging {
  user-select: none;
  transition: none;
}

.nv-dock.is-dragging .nv-dock-head {
  cursor: grabbing;
}

.route-portal .therapist-only {
  display: none !important;
}

.client-session-only {
  display: none !important;
}

body[data-session-role="client"] .therapist-session-only {
  display: none !important;
}

body[data-session-role="client"] .client-session-only {
  display: revert !important;
}

body[data-session-role="client"] .topnav.client-session-only {
  display: flex !important;
}

.route-portal .prep-packet-layout {
  grid-template-columns: 240px minmax(0, 1fr) 360px;
}

.route-portal .prep-handoff {
  display: grid;
  gap: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 0.35rem;
}

.route-portal .portal-side-card {
  gap: 0.9rem;
}

.route-portal .portal-unlinked-state {
  min-height: 220px;
}

.route-portal #portalJournalField {
  min-height: 340px;
  resize: vertical;
}

.route-portal .portal-journal-shell {
  display: grid;
  grid-template-columns: minmax(170px, 0.34fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.route-portal .portal-journal-rail {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  padding-right: 12px;
  border-right: 1px dashed rgba(32, 34, 52, 0.22);
}

.route-portal .portal-tices-timeline {
  display: grid;
  gap: 8px;
}

.route-portal .portal-tices-timeline-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 0.8rem 0.85rem;
  border: 1px solid rgba(32, 34, 52, 0.18);
  border-radius: 10px;
  background: rgba(248, 244, 236, 0.72);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 2px 3px 0 rgba(32, 34, 52, 0.07);
}

.route-portal .portal-tices-timeline-item.is-active {
  border-color: rgba(165, 94, 52, 0.62);
  background: rgba(234, 213, 181, 0.72);
  box-shadow: 3px 4px 0 rgba(32, 34, 52, 0.12);
}

.route-portal .portal-tices-timeline-date {
  font-weight: 800;
}

.route-portal .portal-tices-timeline-item small,
.route-portal .portal-tices-timeline-empty small {
  color: var(--ink-3);
  line-height: 1.35;
}

.route-portal .portal-tices-timeline-empty {
  display: grid;
  gap: 4px;
  padding: 0.85rem;
  border: 1px dashed rgba(32, 34, 52, 0.22);
  border-radius: 10px;
  background: rgba(248, 244, 236, 0.48);
}

.route-portal .portal-tices-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.route-portal .portal-tices-entry,
.route-portal .portal-tices-empty {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(32, 34, 52, 0.18);
  border-radius: 10px;
  background: rgba(248, 244, 236, 0.72);
}

.route-portal .portal-tices-empty small {
  color: var(--ink-3);
}

.route-portal .portal-tices-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.route-portal .portal-tices-entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.route-portal .portal-tices-entry-head--actions-only {
  justify-content: flex-end;
}

.route-portal .portal-tices-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.route-portal .portal-tices-grid .full-span,
.route-portal .portal-journal-notes {
  grid-column: 1 / -1;
}

.route-portal .portal-tices-readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.route-portal .portal-tices-readonly-field {
  display: grid;
  gap: 4px;
  padding: 0.8rem;
  border: 1px solid rgba(32, 34, 52, 0.14);
  border-radius: 9px;
  background: rgba(255, 252, 246, 0.58);
}

.route-portal .portal-tices-readonly-field.full-span {
  grid-column: 1 / -1;
}

.route-portal .portal-tices-readonly-field span {
  color: var(--ink-3);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.route-portal .portal-tices-readonly-field p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.route-portal .portal-settings-stack {
  display: grid;
  gap: 14px;
}

.route-portal .portal-settings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
}

.route-portal .portal-settings-nav {
  position: sticky;
  top: 12px;
  align-self: start;
  display: grid;
  gap: 8px;
}

.route-portal .portal-settings-nav .packet-nav-item {
  width: 100%;
  text-align: left;
}

.route-portal .portal-settings-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(32, 34, 52, 0.18);
  border-radius: 10px;
  background: rgba(248, 244, 236, 0.72);
}

.route-portal .portal-settings-group h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.12rem;
}

.route-portal .portal-settings-group input[readonly] {
  color: var(--ink-2);
  background: rgba(245, 240, 231, 0.64);
}

.route-portal .portal-settings-group .portal-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.route-portal .portal-bls-layout {
  display: grid;
  gap: 12px;
}

/* Client BLS redesign */
.route-portal.route-redesign .prep-packet-layout.is-focused-section.is-bls-section {
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  padding: 0 6px 14px;
}

.route-portal .prep-handoff.is-bls-section > .panel-head {
  display: none;
}

.route-portal .prep-handoff.is-bls-section {
  gap: 0;
}

.route-portal .portal-bls-page {
  display: block;
}

.route-portal .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.route-portal .portal-bls-redesign {
  display: grid;
  grid-template-columns: 440px minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
}

.route-portal .portal-bls-dock,
.route-portal .portal-bls-room-card,
.route-portal .portal-bls-stage-card {
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 5px 6px 0 var(--paper-3);
}

.route-portal .portal-bls-dock {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.route-portal .portal-bls-dock-head {
  padding: 18px 20px 12px;
  border-bottom: 1.5px dashed var(--line-2);
  flex-shrink: 0;
}

.route-portal .portal-bls-dock-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0;
}

.route-portal .portal-bls-worksheet-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.route-portal .portal-bls-worksheet-group {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 12px 14px 4px;
}

.route-portal .portal-bls-worksheet-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  font-family: var(--font-sans);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.route-portal .portal-bls-worksheet-item:hover {
  background: var(--paper-2);
}

.route-portal .portal-bls-worksheet-item.is-active {
  border-color: var(--moss);
  border-style: dashed;
  background: var(--moss-wash);
}

.route-portal .portal-bls-ws-thumb {
  width: 28px;
  height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: white;
  position: relative;
  box-shadow: 1.5px 2px 0 rgba(32, 34, 52, 0.12);
  overflow: hidden;
}

.route-portal .portal-bls-ws-thumb::before,
.route-portal .portal-bls-ws-thumb::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 1.5px;
  background: var(--line-2);
  border-radius: 1px;
}

.route-portal .portal-bls-ws-thumb::before {
  top: 6px;
}

.route-portal .portal-bls-ws-thumb::after {
  top: 11px;
  box-shadow:
    0 4px 0 var(--line-2),
    0 8px 0 var(--line-2),
    0 12px 0 var(--line-2),
    0 16px 0 var(--line),
    0 20px 0 var(--line);
}

.route-portal .portal-bls-ws-thumb.accent-ember::before {
  background: var(--ember);
}

.route-portal .portal-bls-ws-thumb.accent-moss::before {
  background: var(--moss);
}

.route-portal .portal-bls-ws-thumb.accent-stream::before {
  background: var(--stream);
}

.route-portal .portal-bls-ws-thumb.accent-sun::before {
  background: var(--sun);
}

.route-portal .portal-bls-ws-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.route-portal .portal-bls-ws-title strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.route-portal .portal-bls-ws-title small {
  font-size: 10.5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.route-portal .portal-bls-ws-action {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.route-portal .portal-bls-main {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  min-height: 0;
}

.route-portal .portal-bls-room-card {
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.route-portal .portal-bls-room-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.route-portal .portal-bls-room-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
}

.route-portal .portal-bls-open-room,
.route-portal .portal-bls-link-action {
  font-family: var(--font-sans);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
}

.route-portal .portal-bls-open-room {
  padding: 12px 22px;
  font-size: 13px;
  background: var(--moss-wash);
  border: 1.5px dashed var(--moss);
  border-radius: 12px;
}

.route-portal .portal-bls-open-room:hover,
.route-portal .portal-bls-link-action:hover {
  background: #d8dded;
}

.route-portal .portal-bls-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1.5px dashed var(--line-2);
}

.route-portal .portal-bls-link-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.route-portal .portal-bls-link-row input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
}

.route-portal .portal-bls-link-action {
  font-size: 11.5px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-2);
  white-space: nowrap;
}

.route-portal .portal-bls-stage-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

.route-portal .portal-bls-stage-preview {
  grid-column: 1;
  grid-row: 1;
  padding: 12px 18px;
}

.route-portal .portal-bls-stage-color-divider {
  grid-column: 2;
  grid-row: 1;
  border-left: 1.5px dashed var(--line-2);
  margin: 18px 0;
}

.route-portal .portal-bls-stage-color {
  grid-column: 3;
  grid-row: 1;
  padding: 12px 18px;
}

.route-portal .portal-bls-stage-h-divider {
  grid-column: 1 / -1;
  grid-row: 2;
  border-top: 1.5px dashed var(--line-2);
  margin: 0 22px;
}

.route-portal .portal-bls-stage-bottom {
  grid-column: 1 / -1;
  grid-row: 3;
  padding: 18px 26px 20px;
}

.route-portal .portal-bls-stage-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.route-portal .portal-bls-stage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.route-portal .portal-bls-stage-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.route-portal .portal-bls-preview-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  background: #081514;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.route-portal .portal-bls-preview {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.route-portal .portal-bls-preview-foot {
  margin: 0;
  font-size: 11.5px;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.route-portal .portal-bls-mirror-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6aa56e;
  box-shadow: 0 0 0 3px rgba(106, 165, 110, 0.18);
}

.route-portal .wheels-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  position: relative;
}

.route-portal .wheel-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.route-portal .wheel-label-outer {
  position: relative;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: block;
  flex-shrink: 0;
}

.route-portal .wheel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #ff5b5b, #ffae3b, #f6e94e, #7ed957, #4ed1d1, #4d8df6, #8a6cf2, #f06ad3, #ff5b5b
  );
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.6),
    0 2px 6px rgba(32, 34, 52, 0.18);
}

.route-portal .wheel::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--paper);
}

.route-portal .wheel-current {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  z-index: 2;
  background: #081514;
}

.route-portal .wheel-caption {
  font-size: 11.5px;
  color: var(--ink-2);
  font-weight: 500;
  white-space: nowrap;
}

.route-portal .color-popover {
  position: absolute;
  top: 60px;
  left: 0;
  width: 280px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 6px 8px 0 var(--ink);
  padding: 16px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.route-portal .color-popover-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.route-portal .color-popover-head strong {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
}

.route-portal .color-popover-close {
  background: transparent;
  border: 0;
  font-size: 18px;
  color: var(--ink-2);
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.route-portal .color-popover-input {
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  background: #081514;
  box-shadow: inset 0 0 0 3px var(--paper);
  flex-shrink: 0;
}

.route-portal .color-popover-wheel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line-2);
  position: relative;
}

.route-portal .color-popover-wheel-row .meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.route-portal .color-popover-wheel-row .meta strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.route-portal .color-popover-wheel-row .meta span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}

.route-portal .color-popover-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.route-portal .color-popover-section-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.route-portal .color-popover-swatches {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}

.route-portal .color-popover-swatch {
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  padding: 0;
}

.route-portal .color-popover-swatch.is-active {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--moss);
}

.route-portal .color-popover-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.route-portal .color-popover-cancel {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
}

.route-portal .color-popover-apply {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  background: var(--moss-wash);
  border: 1.5px dashed var(--moss);
  color: var(--ink);
  cursor: pointer;
}

.route-portal .wheel-popover {
  position: absolute;
  top: 60px;
  left: 0;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: 5px 6px 0 var(--ink);
  padding: 14px;
  z-index: 40;
  display: none;
}

.route-portal .wheel-popover.is-open {
  display: block;
}

.route-portal .wheel-disc {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  position: relative;
  cursor: crosshair;
  border: 1.5px solid var(--ink);
  box-shadow: 0 2px 8px rgba(32, 34, 52, 0.18);
  background:
    radial-gradient(circle, #ffffff 0%, rgba(255, 255, 255, 0) 65%),
    conic-gradient(
      from 0deg,
      hsl(0, 100%, 50%), hsl(30, 100%, 50%), hsl(60, 100%, 50%),
      hsl(90, 100%, 50%), hsl(120, 100%, 50%), hsl(150, 100%, 50%),
      hsl(180, 100%, 50%), hsl(210, 100%, 50%), hsl(240, 100%, 50%),
      hsl(270, 100%, 50%), hsl(300, 100%, 50%), hsl(330, 100%, 50%),
      hsl(360, 100%, 50%)
    );
  touch-action: none;
}

.route-portal .wheel-disc-cursor {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1.5px var(--ink), 0 1px 3px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: #081514;
  top: 50%;
  left: 50%;
}

.route-portal .portal-bls-bottom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 14px;
}

.route-portal .portal-bls-slider-inline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.route-portal .portal-bls-slider-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-2);
  font-weight: 500;
}

.route-portal .portal-bls-slider-value {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

.route-portal .portal-bls-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  outline: none;
}

.route-portal .portal-bls-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  cursor: pointer;
}

.route-portal .portal-bls-sound-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.route-portal .portal-bls-sound-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.route-portal .portal-bls-sound-head > span {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.route-portal .portal-bls-pill-toggle {
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--paper-2);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-sans);
}

.route-portal .portal-bls-pill-toggle.is-on {
  background: var(--moss);
  color: white;
  border-color: var(--moss);
}

.route-portal .portal-bls-sound-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.route-portal .portal-bls-sound-btn {
  font-family: var(--font-sans);
  font-size: 11.5px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  text-align: center;
}

.route-portal .portal-bls-sound-btn.is-active {
  border-color: var(--moss);
  background: var(--moss-wash);
  color: var(--ink);
  font-weight: 600;
  border-style: dashed;
}

.route-portal #portalBlsOpenLink[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

/* ── Belief panel ── */
.route-portal .portal-bls-belief-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 40px;
  overflow-y: auto;
}

.route-portal .portal-bls-belief-panel {
  width: 100%;
  max-width: 880px;
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 5px 6px 0 var(--paper-3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.route-portal .portal-bls-belief-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 14px;
  border-bottom: 1.5px dashed var(--line-2);
  flex-shrink: 0;
}

.route-portal .portal-bls-belief-panel-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 3px;
}

.route-portal .portal-bls-belief-panel-sub {
  font-size: 11.5px;
  color: var(--ink-3);
  margin: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.route-portal .portal-bls-belief-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.route-portal .portal-bls-belief-print-wrap {
  position: relative;
}

.route-portal .portal-bls-belief-print-btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--paper-2);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}

.route-portal .portal-bls-belief-print-btn:hover {
  background: var(--paper-3);
}

.route-portal .portal-bls-belief-print-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 5px 0 var(--paper-3);
  min-width: 200px;
  overflow: hidden;
}

.route-portal .portal-bls-belief-print-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px dashed var(--line);
  font-family: var(--font-sans);
  color: var(--ink);
}

.route-portal .portal-bls-belief-print-option:last-child {
  border-bottom: none;
}

.route-portal .portal-bls-belief-print-option:hover {
  background: var(--paper-2);
}

.route-portal .portal-bls-belief-print-option strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.route-portal .portal-bls-belief-print-option small {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 1px;
}

.route-portal .portal-bls-belief-print-option-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

html[data-theme="dark"] .route-portal .portal-bls-belief-print-popover {
  background: rgba(23, 26, 43, 0.97);
  border-color: rgba(232, 223, 209, 0.2);
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .route-portal .portal-bls-belief-print-btn {
  background: rgba(232, 223, 209, 0.08);
  border-color: rgba(232, 223, 209, 0.3);
  color: var(--ink);
}

html[data-theme="dark"] .route-portal .portal-bls-belief-print-btn:hover {
  background: rgba(232, 223, 209, 0.15);
}

html[data-theme="dark"] .route-portal .portal-bls-belief-print-option:hover {
  background: rgba(232, 223, 209, 0.08);
}

.route-portal .portal-bls-belief-close {
  font-size: 18px;
  line-height: 1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--paper-2);
  color: var(--ink-2);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.route-portal .portal-bls-belief-close:hover {
  background: var(--paper-3);
}

.route-portal .portal-bls-belief-body {
  overflow-y: auto;
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.route-portal .portal-bls-belief-intro {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.route-portal .portal-bls-belief-intro-heading {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 8px 0 0;
}

.route-portal .portal-bls-belief-intro-heading:first-child {
  margin-top: 0;
}

.route-portal .portal-bls-belief-intro p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
}

.route-portal .portal-bls-belief-intro p em {
  font-style: italic;
  color: var(--ink);
}

html[data-theme="dark"] .route-portal .portal-bls-belief-intro {
  background: rgba(232, 223, 209, 0.05);
  border-color: rgba(232, 223, 209, 0.15);
}

.route-portal .portal-bls-belief-legend {
  display: grid;
  grid-template-columns: 1fr 20px 1fr;
  padding-bottom: 4px;
}

.route-portal .portal-bls-belief-legend-item {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 7px;
}

.route-portal .portal-bls-belief-legend-item::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.route-portal .portal-bls-belief-legend-item.ember { color: var(--ember); }
.route-portal .portal-bls-belief-legend-item.ember::before { background: var(--ember); }
.route-portal .portal-bls-belief-legend-item.moss { color: var(--moss); }
.route-portal .portal-bls-belief-legend-item.moss::before { background: var(--moss); }

.route-portal .portal-bls-belief-domain {
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
}

.route-portal .portal-bls-belief-domain-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px dashed var(--line-2);
}

.route-portal .portal-bls-belief-domain.worthiness .portal-bls-belief-domain-head  { background: rgba(163, 101, 63, 0.10); }
.route-portal .portal-bls-belief-domain.responsibility .portal-bls-belief-domain-head { background: var(--moss-wash); }
.route-portal .portal-bls-belief-domain.safety .portal-bls-belief-domain-head       { background: rgba(31, 74, 93, 0.09); }
.route-portal .portal-bls-belief-domain.control .portal-bls-belief-domain-head       { background: rgba(217, 149, 38, 0.12); }
.route-portal .portal-bls-belief-domain.connection .portal-bls-belief-domain-head    { background: rgba(58, 111, 133, 0.10); }

.route-portal .portal-bls-belief-domain-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}

.route-portal .portal-bls-belief-domain-head h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-style: italic;
  font-size: 17px;
  margin: 0;
  flex: 1;
  color: var(--ink);
}

.route-portal .portal-bls-belief-domain-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
}

.route-portal .portal-bls-belief-rows {
  display: flex;
  flex-direction: column;
}

.route-portal .portal-bls-belief-row {
  display: grid;
  grid-template-columns: 1fr 20px 1fr;
  align-items: center;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
  line-height: 1.4;
}

.route-portal .portal-bls-belief-row:last-child { border-bottom: none; }

.route-portal .portal-bls-belief-row .neg {
  padding: 10px 14px;
  color: var(--ember);
  font-weight: 500;
  border-right: 1px dashed var(--line);
}

.route-portal .portal-bls-belief-row .arr {
  text-align: center;
  color: var(--ink-3);
  font-size: 11px;
}

.route-portal .portal-bls-belief-row .pos {
  padding: 10px 14px;
  color: var(--moss);
  font-weight: 500;
  border-left: 1px dashed var(--line);
}

/* dark mode — panel card */
html[data-theme="dark"] .route-portal .portal-bls-belief-panel {
  background: rgba(23, 26, 43, 0.86);
  border-color: rgba(232, 223, 209, 0.2);
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .route-portal .portal-bls-belief-domain {
  border-color: rgba(232, 223, 209, 0.18);
}

html[data-theme="dark"] .route-portal .portal-bls-belief-panel-head {
  border-bottom-color: rgba(232, 223, 209, 0.15);
}

html[data-theme="dark"] .route-portal .portal-bls-belief-close {
  background: rgba(232, 223, 209, 0.08);
  border-color: rgba(232, 223, 209, 0.2);
  color: var(--ink);
}

html[data-theme="dark"] .route-portal .portal-bls-belief-close:hover {
  background: rgba(232, 223, 209, 0.15);
}

/* ── SUDS panel ── */
.route-portal .portal-suds-subtitle {
  font-size: 13px;
  color: var(--ink-3);
  margin: 0 0 14px;
  line-height: 1.5;
}

.route-portal .portal-suds-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.route-portal .portal-suds-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
}

.route-portal .portal-suds-chip.calm    { background: var(--stream); color: var(--paper); border-color: var(--stream); }
.route-portal .portal-suds-chip.notable { background: var(--moss); color: var(--paper); border-color: var(--moss); }
.route-portal .portal-suds-chip.high    { background: var(--sun); color: var(--ink); border-color: var(--sun); }
.route-portal .portal-suds-chip.crisis  { background: var(--ember); color: var(--paper); border-color: var(--ember); }

.route-portal .portal-suds-scale {
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
}

.route-portal .portal-suds-scale-head {
  display: grid;
  grid-template-columns: 52px 1fr;
  padding: 10px 16px;
  background: rgba(31, 74, 93, 0.08);
  border-bottom: 1.5px dashed var(--line-2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stream-2, #1f4a5d);
  gap: 0;
}

.route-portal .portal-suds-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: stretch;
  border-bottom: 1px dashed var(--line);
}

.route-portal .portal-suds-row:last-child { border-bottom: none; }

.route-portal .portal-suds-level {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-right: 1px dashed var(--line);
}

.route-portal .portal-suds-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 14px;
  background: var(--paper-2);
  color: var(--ink);
  flex-shrink: 0;
}

.route-portal .portal-suds-circle.calm    { background: var(--stream); color: var(--paper); border-color: var(--stream); }
.route-portal .portal-suds-circle.notable { background: var(--moss); color: var(--paper); border-color: var(--moss); }
.route-portal .portal-suds-circle.high    { background: var(--sun); color: var(--ink); border-color: var(--sun); }
.route-portal .portal-suds-circle.crisis  { background: var(--ember); color: var(--paper); border-color: var(--ember); }

.route-portal .portal-suds-desc {
  padding: 10px 13px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
}

.route-portal .portal-suds-input-cell {
  padding: 10px 13px;
  background: rgba(255,255,255,0.25);
}

.route-portal .portal-suds-input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--ink);
  padding: 0;
  resize: none;
  line-height: 1.5;
  min-height: 20px;
}

.route-portal .portal-suds-input::placeholder { color: var(--ink-3); font-style: italic; opacity: 0.65; }
.route-portal .portal-suds-input:focus { outline: none; }
.route-portal .portal-suds-input-cell:focus-within { background: rgba(255,255,255,0.7); }

.route-portal .portal-suds-open-note {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.route-portal .portal-suds-open-note p {
  font-size: 12px;
  color: var(--ink-3);
  margin: 0;
  line-height: 1.5;
}

.route-portal .portal-suds-note-input {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.5);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink);
  resize: vertical;
  line-height: 1.5;
}

.route-portal .portal-suds-note-input:focus {
  outline: none;
  border-color: var(--ember);
  background: white;
}

/* dark mode — SUDS */
html[data-theme="dark"] .route-portal .portal-suds-scale {
  border-color: rgba(232, 223, 209, 0.18);
}

html[data-theme="dark"] .route-portal .portal-suds-scale-head {
  background: rgba(31, 74, 93, 0.2);
  border-bottom-color: rgba(232, 223, 209, 0.15);
}

html[data-theme="dark"] .route-portal .portal-suds-row {
  border-bottom-color: rgba(232, 223, 209, 0.1);
}

html[data-theme="dark"] .route-portal .portal-suds-level,
html[data-theme="dark"] .route-portal .portal-suds-desc {
  border-color: rgba(232, 223, 209, 0.1);
}

html[data-theme="dark"] .route-portal .portal-suds-input-cell {
  background: rgba(255,255,255,0.04);
}

html[data-theme="dark"] .route-portal .portal-suds-input-cell:focus-within {
  background: rgba(255,255,255,0.08);
}

html[data-theme="dark"] .route-portal .portal-suds-open-note {
  background: rgba(232, 223, 209, 0.05);
  border-color: rgba(232, 223, 209, 0.15);
}

html[data-theme="dark"] .route-portal .portal-suds-note-input {
  background: rgba(255,255,255,0.05);
  border-color: rgba(232, 223, 209, 0.2);
  color: var(--ink);
}

html[data-theme="dark"] .route-portal .portal-suds-note-input:focus {
  background: rgba(255,255,255,0.08);
}

/* ── VOC PANELS ─────────────────────────────────────── */
.route-portal .portal-voc-subtitle {
  font-size: 13.5px;
  color: var(--ink-3);
  margin: 0 0 16px;
  line-height: 1.55;
}

.route-portal .portal-voc-explainer {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
  padding: 18px 20px;
  margin-bottom: 14px;
}

.route-portal .portal-voc-explainer-heading {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
}

.route-portal .portal-voc-explainer p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 10px;
}

.route-portal .portal-voc-explainer p:last-child { margin-bottom: 0; }

.route-portal .portal-voc-explainer em { font-style: italic; color: var(--ink); }

.route-portal .portal-voc-band-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 4px 4px 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.route-portal .portal-voc-band-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.route-portal .portal-voc-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  flex-shrink: 0;
}

.route-portal .portal-voc-swatch.false-end { background: var(--ember); }
.route-portal .portal-voc-swatch.middle    { background: var(--sun); }
.route-portal .portal-voc-swatch.true-end  { background: var(--stream); }

.route-portal .portal-voc-scale-card {
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
}

.route-portal .portal-voc-scale-head {
  display: grid;
  grid-template-columns: 80px 1fr;
  padding: 11px 20px;
  background: rgba(31, 74, 93, 0.08);
  border-bottom: 1.5px dashed var(--line-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stream-2);
}

.route-portal .portal-voc-col-level { text-align: center; }

.route-portal .portal-voc-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: stretch;
  border-bottom: 1px dashed var(--line);
}

.route-portal .portal-voc-row:last-child { border-bottom: none; }

.route-portal .portal-voc-level {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  border-right: 1px dashed var(--line);
}

.route-portal .portal-voc-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  background: var(--paper-2);
}

.route-portal .portal-voc-circle.false-end { background: var(--ember); color: var(--paper); border-color: var(--ember); }
.route-portal .portal-voc-circle.middle    { background: var(--sun);   color: var(--ink);   border-color: var(--sun); }
.route-portal .portal-voc-circle.true-end  { background: var(--stream); color: var(--paper); border-color: var(--stream); }

.route-portal .portal-voc-desc {
  padding: 16px 20px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

.route-portal .portal-voc-anchor-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 5px;
}

.route-portal .portal-voc-anchor-label.false-end { color: var(--ember); }
.route-portal .portal-voc-anchor-label.true-end  { color: var(--stream-2); }

html[data-theme="dark"] .route-portal .portal-voc-explainer {
  background: rgba(255,255,255,0.04);
  border-color: rgba(232,223,209,0.18);
}

html[data-theme="dark"] .route-portal .portal-voc-scale-card {
  border-color: rgba(232,223,209,0.25);
}

html[data-theme="dark"] .route-portal .portal-voc-scale-head {
  background: rgba(58,111,133,0.12);
  border-bottom-color: rgba(232,223,209,0.15);
}

html[data-theme="dark"] .route-portal .portal-voc-row {
  border-bottom-color: rgba(232,223,209,0.1);
}

html[data-theme="dark"] .route-portal .portal-voc-level,
html[data-theme="dark"] .route-portal .portal-voc-desc {
  border-color: rgba(232,223,209,0.1);
}

/* ── CONTAINER EXERCISE PANEL ───────────────────────── */
.route-portal .portal-container-phase {
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  padding: 18px 20px;
  margin-bottom: 14px;
}

.route-portal .portal-container-phase-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1.5px dashed var(--line-2);
}

.route-portal .portal-container-phase-number {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--stream);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 16px;
}

.route-portal .portal-container-phase-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.route-portal .portal-container-phase p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 10px;
}

.route-portal .portal-container-phase p:last-child { margin-bottom: 0; }

.route-portal .portal-container-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.route-portal .portal-container-list li {
  position: relative;
  padding: 8px 0 8px 24px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
  border-bottom: 1px dashed var(--line);
}

.route-portal .portal-container-list li:last-child { border-bottom: none; }

.route-portal .portal-container-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 18px;
  width: 10px;
  height: 1.5px;
  background: var(--stream);
}

html[data-theme="dark"] .route-portal .portal-container-phase {
  background: rgba(255,255,255,0.04);
  border-color: rgba(232,223,209,0.18);
}

html[data-theme="dark"] .route-portal .portal-container-phase-header {
  border-bottom-color: rgba(232,223,209,0.15);
}

html[data-theme="dark"] .route-portal .portal-container-list li {
  border-bottom-color: rgba(232,223,209,0.1);
}

body.route-portal.route-redesign.portal-bls-active {
  overflow: hidden;
}

body.route-portal.route-redesign.portal-bls-active .forms-main {
  height: calc(100dvh - var(--topbar-window-gap, 1.1rem) - 75px);
  min-height: 0;
  overflow: hidden;
}

body.route-portal.route-redesign.portal-bls-active .forms-tab-panel,
body.route-portal.route-redesign.portal-bls-active .forms-tab-panel.is-active {
  height: calc(100% - 44px);
  min-height: 0;
  overflow: hidden;
}

body.route-portal.route-redesign.portal-bls-active .prep-packet-layout.is-bls-section {
  height: 100%;
  min-height: 0;
}

@media (max-width: 980px) {
  .route-portal .portal-settings-layout {
    grid-template-columns: 1fr;
  }

  .route-portal .portal-bls-redesign {
    grid-template-columns: 1fr;
  }

  .route-portal .portal-bls-stage-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto;
  }

  .route-portal .portal-bls-stage-preview,
  .route-portal .portal-bls-stage-color,
  .route-portal .portal-bls-stage-bottom {
    grid-column: 1;
  }

  .route-portal .portal-bls-stage-preview {
    grid-row: 1;
  }

  .route-portal .portal-bls-stage-color-divider {
    grid-column: 1;
    grid-row: 2;
    border-left: 0;
    border-top: 1px dashed var(--line-2);
    margin: 0 22px;
  }

  .route-portal .portal-bls-stage-color {
    grid-row: 3;
  }

  .route-portal .portal-bls-stage-h-divider {
    grid-row: 4;
  }

  .route-portal .portal-bls-stage-bottom {
    grid-row: 5;
  }

  .route-portal .portal-bls-sound-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-portal .portal-settings-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.route-portal .portal-badge-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.route-portal .portal-badge-stat {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(32, 34, 52, 0.18);
  border-radius: 10px;
  background: rgba(248, 244, 236, 0.72);
}

.route-portal .portal-badge-stat span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-portal .portal-badge-stat strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1;
}

.route-portal .portal-badge-stat small {
  color: var(--ink-3);
  font-size: 12px;
}

.route-portal .portal-badge-list {
  display: grid;
  gap: 12px;
}

.route-portal .portal-badge-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(32, 34, 52, 0.18);
  border-radius: 10px;
  background: rgba(248, 244, 236, 0.72);
}

.route-portal .portal-badge-art {
  width: 92px;
  height: 108px;
  overflow: hidden;
}

.route-portal .portal-badge-art > div {
  transform: scale(0.255);
  transform-origin: top left;
}

.route-portal .portal-badge-item.is-locked .portal-badge-art {
  filter: grayscale(100%) opacity(0.5);
}

.route-portal .portal-badge-copy {
  display: grid;
  gap: 4px;
}

.route-portal .portal-badge-copy strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.1;
}

.route-portal .portal-badge-copy span {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-portal .portal-badge-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.route-portal #portalBlsLinkField {
  font-size: 0.95rem;
}

.packet-sheet-head {
  display: grid;
  gap: 0.25rem;
}

.packet-code {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  padding: 0.34rem 0.6rem;
  border-radius: 999px;
  background: rgba(95, 122, 82, 0.12);
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.08em;
}

body.client-mode {
  background: radial-gradient(circle at center, rgba(95, 122, 82, 0.18), transparent 36%), #081514;
}

body.client-mode .app-shell {
  width: 100vw;
  max-width: none;
  padding: 0;
}

body.client-mode .hero,
body.client-mode .therapist-only {
  display: none !important;
}

body.client-mode .workspace {
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  margin: 0;
  gap: 0;
}

body.client-mode .client-stage {
  min-height: 100vh;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: 0;
}

body.client-mode .stage {
  min-height: 100vh;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 48%),
    linear-gradient(160deg, rgba(18, 64, 66, 0.96), rgba(9, 18, 18, 0.98));
  border: 0;
  border-radius: 0;
}

body.client-mode .client-only {
  display: inline-flex;
}

body.client-mode .shared-packet-dock,
body.client-mode .nv-dock,
body.client-mode .client-header,
body.client-mode .client-banner,
body.client-mode .stage-overlay {
  display: none !important;
}

body.client-mode .client-header h2,
body.client-mode .client-header .eyebrow,
body.client-mode .client-banner p,
body.client-mode .stage-overlay {
  color: #e8f8f6;
}

body.client-mode .stage-overlay {
  background: rgba(10, 18, 18, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.client-mode .track {
  display: none;
}

/* ── Client display preferences ── */
.client-prefs-zone {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 88px;
  height: 88px;
  z-index: 200;
  pointer-events: none;
}

body.client-mode .client-prefs-zone {
  display: block;
  pointer-events: auto;
}

.client-fullscreen-btn {
  position: absolute;
  bottom: 58px;
  right: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(18, 28, 28, 0.78);
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.2s ease, color 0.2s ease;
  backdrop-filter: blur(10px);
}

.client-fullscreen-btn svg {
  display: block;
  width: 15px;
  height: 15px;
  margin: 0;
}

.client-prefs-zone:hover .client-fullscreen-btn {
  opacity: 0.6;
}

.client-fullscreen-btn:hover {
  opacity: 1 !important;
  background: rgba(30, 48, 48, 0.92);
  color: rgba(255, 255, 255, 0.95);
}

.client-logout-btn {
  position: absolute;
  bottom: 58px;
  right: 62px;
  padding: 7px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(18, 28, 28, 0.78);
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.3s ease, background 0.2s ease, color 0.2s ease;
  backdrop-filter: blur(10px);
}

.client-prefs-zone:hover .client-logout-btn {
  opacity: 0.6;
}

.client-logout-btn:hover {
  opacity: 1 !important;
  background: rgba(30, 48, 48, 0.92);
  color: rgba(255, 255, 255, 0.95);
}

.client-fullscreen-action {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 800;
}

.client-fullscreen-action:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.16);
}

.client-prefs-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(18, 28, 28, 0.78);
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.3s ease, background 0.2s ease, color 0.2s ease;
  backdrop-filter: blur(10px);
}

.client-prefs-zone:hover .client-prefs-btn,
.client-prefs-zone.is-open .client-prefs-btn {
  opacity: 0.6;
}

.client-prefs-btn:hover,
.client-prefs-zone.is-open .client-prefs-btn:hover {
  opacity: 1;
  background: rgba(30, 48, 48, 0.92);
  color: rgba(255, 255, 255, 0.95);
}

.client-prefs-zone.is-open .client-prefs-btn {
  opacity: 1;
  background: rgba(30, 48, 48, 0.92);
  color: rgba(200, 240, 235, 0.95);
}

.client-prefs-panel {
  position: fixed;
  bottom: 72px;
  right: 18px;
  width: 240px;
  background: rgba(12, 20, 20, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 14px;
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.48);
  z-index: 210;
  color: rgba(220, 240, 238, 0.88);
  font-family: var(--font-sans);
  font-size: 0.8rem;
}

.client-prefs-panel[hidden] {
  display: none;
}

.client-prefs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.client-prefs-title {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: rgba(200, 240, 235, 0.6);
}

.client-prefs-close {
  background: none;
  border: none;
  color: rgba(220, 240, 238, 0.5);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s;
}

.client-prefs-close:hover {
  color: rgba(220, 240, 238, 0.9);
}

.client-prefs-section {
  display: grid;
  gap: 8px;
}

.client-prefs-label {
  font-size: 0.74rem;
  color: rgba(200, 240, 235, 0.6);
  font-weight: 500;
  text-align: center;
  margin-top: 6px;
}

/* Color wheels row */
.client-prefs-wheels-row {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.client-prefs-wheel-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.client-prefs-wheel-label {
  position: relative;
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}

.client-prefs-wheel {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    hsl(0,100%,55%),
    hsl(30,100%,55%),
    hsl(60,100%,55%),
    hsl(90,100%,55%),
    hsl(120,100%,45%),
    hsl(150,100%,45%),
    hsl(180,100%,45%),
    hsl(210,100%,55%),
    hsl(240,100%,60%),
    hsl(270,100%,60%),
    hsl(300,100%,55%),
    hsl(330,100%,55%),
    hsl(360,100%,55%)
  );
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.client-prefs-wheel-label:hover .client-prefs-wheel {
  transform: scale(1.06);
  box-shadow: 0 4px 20px rgba(0,0,0,0.65);
}

/* Center dot showing current selected color */
.client-prefs-wheel-current {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  background: #081514;
  pointer-events: none;
  transition: background 0.2s ease;
}

/* Hidden native color input — covers the wheel area so click → opens picker */
.client-prefs-color-hidden {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
  border-radius: 50%;
}

.client-prefs-range {
  width: 100%;
  cursor: pointer;
  accent-color: rgba(120, 220, 210, 0.8);
}

.client-prefs-apply-row {
  margin-top: 12px;
  text-align: center;
}

.client-prefs-apply-btn {
  padding: 7px 20px;
  border-radius: 20px;
  border: 1px solid rgba(120, 220, 210, 0.35);
  background: rgba(120, 220, 210, 0.15);
  color: rgba(120, 220, 210, 0.9);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.client-prefs-apply-btn:hover {
  background: rgba(120, 220, 210, 0.28);
}

@media (max-width: 1340px) {
  .workspace {
    grid-template-columns: 220px 1fr;
    grid-template-rows: auto auto auto;
  }

  .phase-rail {
    grid-row: 1 / span 3;
  }

  .client-stage,
  .control-panel {
    grid-column: 2;
  }
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .phase-rail,
  .session-panel,
  .client-stage,
  .control-panel {
    grid-column: auto;
    grid-row: auto;
    position: static;
  }

  .control-grid,
  .step-grid,
  .step-grid.two-column,
  .phase-checklist,
  .helper-list,
  .status-strip,
  .transport-grid,
  .quick-action-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100vw - 1rem, 100%);
  }

  .hero,
  .panel {
    border-radius: 24px;
    padding: 1rem;
  }

  .panel-head,
  .panel-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .phase-button {
    grid-template-columns: 36px 1fr;
  }

  .timeline-row {
    grid-template-columns: 1fr;
  }

  .nv-sheet-head,
  .print-nv-head {
    grid-template-columns: 1fr;
  }

  .timeline-code {
    justify-self: start;
    min-width: 72px;
  }

  .timeline-row,
  .print-row {
    grid-template-columns: 1fr;
  }

  .timeline-code-cell,
  .print-code {
    border-right: 0;
    border-bottom: 1px solid rgba(43, 38, 32, 0.08);
    border-radius: 18px 18px 0 0;
  }

  .timeline-copy {
    border-radius: 0 0 18px 18px;
  }

  .print-form-inline {
    flex-direction: column;
    gap: 0.25rem;
  }

  .stage {
    min-height: 360px;
  }
}

@media (max-width: 1340px) {
  .route-control .app-shell,
  body.client-mode .app-shell {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .route-control .client-stage {
    grid-column: 1;
    grid-row: 1;
  }

  .route-control .control-panel {
    grid-column: 1;
    grid-row: 2;
  }

  .route-prep .workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .route-prep .page-overview {
    grid-column: 2;
    position: static;
  }

  .prep-packet-layout,
  .folder-layout {
    grid-template-columns: 1fr;
  }

  .prep-rail,
  .prep-handoff,
  .folder-flap,
  .folder-storage {
    position: static;
  }

  .prep-rail {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .script-dock {
    width: min(var(--script-dock-width, 388px), calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
  }

  .nv-dock {
    width: min(var(--nv-dock-width, 420px), calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
  }
}

@media (max-width: 1080px) {
  .route-control .app-shell,
  body.client-mode .app-shell {
    padding-left: 0;
    padding-right: 0;
  }

  .ehr-grid,
  .hero-chip-grid,
  .hero-action-group,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .route-control .workspace,
  .route-prep .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .three-column,
  .coversheet-grid,
  .info-row,
  .compact-preview-grid,
  .des-question,
  .readiness-row,
  .target-event-grid,
  .target-event-detail-grid {
    grid-template-columns: 1fr;
  }

  .target-event-header {
    display: none;
  }

  .target-event-remove,
  .target-event-remove-placeholder {
    justify-self: start;
  }

  .route-control .client-stage,
  .route-control .control-panel,
  .route-prep .phase-rail,
  .route-prep .session-panel,
  .route-prep .page-overview {
    grid-column: auto;
    grid-row: auto;
    position: static;
  }

  .prep-doc-toolbar,
  .packet-row-head {
    flex-direction: column;
    align-items: stretch;
  }

  .script-dock {
    left: 0.5rem;
    top: 0.5rem;
    width: min(var(--script-dock-width, 360px), calc(100vw - 1rem));
    max-width: calc(100vw - 1rem);
    height: min(var(--script-dock-height, calc(100vh - 1rem)), calc(100vh - 1rem));
    max-height: calc(100vh - 1rem);
  }

  .nv-dock {
    right: 0.5rem;
    top: 0.5rem;
    width: min(var(--nv-dock-width, 360px), calc(100vw - 1rem));
    max-width: calc(100vw - 1rem);
    height: min(var(--nv-dock-height, calc(100vh - 1rem)), calc(100vh - 1rem));
    max-height: calc(100vh - 1rem);
  }
}

@media (max-width: 720px) {
  .topbar,
  .topbar-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .topnav {
    width: 100%;
    justify-content: stretch;
  }

  .topnav a {
    flex: 1;
    text-align: center;
  }

  .selector-field,
  .selector-field-compact,
  .start-card {
    width: 100%;
    min-width: 0;
  }

  .account-menu-trigger {
    width: 100%;
    justify-content: flex-start;
  }

  .account-menu-panel {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .route-profile.route-redesign .profile-header,
  .route-profile.route-redesign .profile-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .route-profile.route-redesign .profile-form-grid,
  .route-profile.route-redesign .profile-tier-grid,
  .route-profile.route-redesign .profile-promo-row {
    grid-template-columns: 1fr;
  }

  .route-profile.route-redesign .profile-shell {
    padding: 16px;
    border-radius: 12px;
    gap: 14px;
  }

  .route-profile.route-redesign .profile-group-action-row {
    justify-content: stretch;
  }

  .route-profile.route-redesign .profile-group-action-row .button-link {
    width: 100%;
  }

  .route-profile.route-redesign .profile-group-pane-head {
    flex-direction: column;
    align-items: stretch;
  }

  .route-profile.route-redesign #profileSaveStatus {
    margin-right: 0;
  }
}

.route-auth {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse 800px 600px at 20% 0%, rgba(67, 73, 102, 0.06), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, #efe7d7 100%);
}

.route-auth .topbar {
  background: rgba(246, 241, 232, 0.9);
  border: 1px solid rgba(217, 205, 180, 0.5);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.route-auth .topbar .brand {
  color: var(--ink);
}

.route-auth .topbar .topbar-copy {
  color: var(--ink-3);
}

body.route-auth .auth-card {
  background: rgba(248, 244, 236, 0.92);
  border: 1px solid rgba(217, 205, 180, 0.5);
  box-shadow: 0 18px 48px rgba(32, 34, 52, 0.12), 0 2px 8px rgba(32, 34, 52, 0.06);
  padding: 2.6rem 2.4rem 2rem;
}

body.route-auth .auth-subcard,
body.route-auth .auth-choice-tile {
  background: rgba(255, 252, 247, 0.82);
  border: 1px solid rgba(32, 34, 52, 0.1);
  box-shadow: 0 4px 14px rgba(32, 34, 52, 0.07);
  border-radius: 12px;
}

.route-auth .button-link.primary {
  background: var(--paper-2);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: 3px 4px 0 var(--paper-3);
}

.route-auth .auth-card h1,
.route-auth .auth-card h2,
.route-auth .panel-head h1,
.route-auth .panel-head h2 {
  color: var(--ink);
}

.route-auth .auth-card .support-copy,
.route-auth .auth-card label {
  color: var(--ink-2);
}

.auth-shell {
  min-height: 100vh;
}

.auth-layout {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vw, 5rem) 1.5rem 3rem;
}

.auth-card {
  width: min(100%, 560px);
  gap: 1.25rem;
}

.auth-client-card {
  width: min(100%, 1020px);
}

.auth-subcard {
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
  border-radius: 12px;
  background: rgba(248, 244, 236, 0.82);
  border: 1px solid rgba(32, 34, 52, 0.18);
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-error {
  min-height: 1.2rem;
  margin: 0;
  color: #b91c1c;
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-success {
  min-height: 1.2rem;
  margin: 0;
  color: #0f766e;
  font-size: 0.92rem;
  font-weight: 600;
}

@media print {
  @page {
    margin: 0.45in;
  }

  body {
    background: white;
  }

  .app-shell {
    display: none !important;
  }

  .print-shell .print-sheet {
    display: block;
  }

  .print-sheet-inner {
    padding: 0;
    background: white;
  }

  .print-nv-body,
  .print-row,
  .print-code {
    break-inside: avoid;
  }
}

@media (max-width: 720px) {

}

/* =====================================================
   BLS CONTROL: ANCHORED VIEWPORT LAYOUT
   Topbar + workspace are fixed anchors filling the
   screen. Packet dock and NV dock float over them as
   true overlays — resizing/moving the docks has zero
   effect on the page structure.
   ===================================================== */

body.route-control {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Update dock height variables to match new top offset */
.route-control {
  --script-dock-height: calc(100vh - 5.4rem);
  --nv-dock-height: calc(100vh - 5.4rem);
}

/* App shell stays in normal page flow so the full page can scroll */
.route-control .app-shell {
  position: relative;
  width: calc(100vw - 1rem);
  max-width: none;
  margin: 0 auto;
  padding: 0.6rem 0.6rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow: visible;
}

/* Topbar anchored at top, above all floating panels */
.route-control .topbar {
  flex-shrink: 0;
  margin-bottom: 0;
  position: relative;
  z-index: 50;
}

/* Workspace fills all remaining vertical space */
.route-control .workspace.control-workspace {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding-bottom: 0.6rem;
  width: 100%;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  /* Grid properties have no effect under display:flex */
  grid-template-columns: none;
  grid-template-rows: none;
}

/* Client stage stays anchored at the top of the centered cockpit */
.route-control .client-stage {
  flex: 0 0 auto;
  min-height: auto;
  width: 100%;
  grid-column: unset;
  grid-row: unset;
  position: static;
}

/* Restore the visible client-view frame */
.route-control .client-header {
  display: flex;
}

.route-control .stage-wrap {
  min-height: auto;
  display: flex;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.route-control .stage {
  min-height: 0;
  height: 100%;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.route-control .stage-overlay {
  display: inline-flex;
}

.route-control .stage-overlay:empty,
.route-control .stage-overlay[hidden] {
  display: none;
}

/* Controls bar fixed-height at the bottom */
.route-control .control-panel {
  flex-shrink: 0;
  width: 100%;
  grid-column: unset;
  grid-row: unset;
  position: static;
}

/* Docks start just below the topbar (not at the old 6.2rem offset) */
.route-control .script-dock {
  top: 4.8rem;
  max-height: calc(100vh - 5rem);
}

.route-control .nv-dock {
  top: 4.8rem;
  max-height: calc(100vh - 5rem);
}

/* Client treatment link should use the full viewport width.
   This overrides the therapist cockpit width without changing
   the smaller therapist-side preview. */
body.route-control.client-mode .app-shell {
  width: 100vw;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
  min-height: 100vh;
}

body.route-control.client-mode .workspace.control-workspace {
  width: 100vw;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

body.route-control.client-mode .client-stage {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
}

body.route-control.client-mode .stage-wrap,
body.route-control.client-mode .stage {
  width: 100vw;
  aspect-ratio: auto;
}

body.route-control.client-mode .stage {
  min-height: 100vh;
  height: 100vh;
}

/* Public client BLS link should always render fullscreen stage only.
   Keep this override specific and forceful so later therapist layout
   selectors (actionbar/transport) cannot leak into client mode. */
body.route-control.client-mode .actionbar,
body.route-control.client-mode .actionbar-inner {
  width: 100vw !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.route-control.client-mode .actionbar-row {
  display: block !important;
  width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.route-control.client-mode .actionbar .ab-stage,
body.route-control.client-mode .actionbar .ab-stage .client-stage,
body.route-control.client-mode .actionbar .ab-stage .bls-client-stage,
body.route-control.client-mode .actionbar .ab-stage .bls-stage-frame,
body.route-control.client-mode .actionbar .ab-stage .stage {
  width: 100vw !important;
  min-width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Claude redesign integration — Riverbank facelift */
:root {
  --paper: #f6f1e8;
  --paper-2: #ebe3d4;
  --paper-3: #ddd0b8;
  --ink: #1c1f2e;
  --ink-2: #313548;
  --ink-3: #5b6072;
  --ink-4: #a89c89;
  --line: #cfc6b4;
  --line-2: #b9ad94;
  --moss: #6b73a0;
  --moss-2: #4f567f;
  --moss-soft: #cfd2e3;
  --moss-wash: #e6e8f1;
  --ember: #b25a32;
  --ember-soft: #e8c6a9;
  --amber-wash: #f2e3cc;
  --stream: #3a6f85;
  --stream-2: #1f4a5d;
  --stream-soft: #cfe1e7;
  --sun: #d99526;
  --berry: #8a3d63;
  --bark: #4a3a28;
  --code-im: #8a6a3f;
  --code-nc: #a64a3a;
  --code-pc: #5f7a52;
  --code-sud: #8c5a6f;
  --code-em: #4a5a6e;
  --code-iw: #7a6b4a;
  --code-voc: #5f7a52;
  --code-bod: #a66f3a;
  --code-rtt: #6b5a7a;
  --dusk: #1f1d18;
  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-hand: "Caveat", cursive;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

body.route-redesign {
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(ellipse 800px 600px at 20% 10%, rgba(193, 106, 58, 0.04), transparent),
    radial-gradient(ellipse 600px 800px at 100% 80%, rgba(95, 122, 82, 0.04), transparent),
    var(--paper);
  background-attachment: fixed;
}

.route-redesign .app-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  padding: 0;
  gap: 0;
}

.route-redesign .topbar {
  min-height: 75px;
  padding: 0 22px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 50;
}

.route-redesign .brand {
  font-family: var(--font-serif);
  font-size: var(--type-brand);
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--ink);
}

.route-redesign .topnav {
  margin-left: 24px;
  gap: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  border: none;
  align-self: stretch;
  border-bottom: 2px solid transparent;
}

.route-redesign .topnav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px 10px;
  border-radius: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.route-redesign .topnav a.is-active,
.route-redesign .topnav a[aria-current="page"] {
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--ember);
}

.route-redesign .topbar-tools {
  gap: 14px;
}

.route-redesign .account-menu-trigger {
  border-color: var(--line);
  background: rgba(255, 251, 245, 0.92);
  box-shadow: inset 0 0 0 1px rgba(205, 188, 158, 0.2);
}

.route-redesign .account-menu-panel {
  border-color: var(--line);
}

.route-profile.route-redesign {
  background: transparent;
}

.route-profile.route-redesign .app-shell {
  min-height: 100vh;
}

.route-profile.route-redesign .profile-layout {
  display: flex;
  justify-content: center;
  padding: 32px 20px 40px;
}

.route-profile.route-redesign .profile-shell {
  width: 100%;
  max-width: 1100px;
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1.5px solid rgba(32, 34, 52, 0.24);
  border-radius: 14px;
}

.route-profile.route-redesign .profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.route-profile.route-redesign .profile-header h1 {
  margin: 6px 0 0;
  font-family: var(--font-serif);
  font-size: var(--type-h1);
  font-weight: 600;
}

.route-profile.route-redesign .profile-card {
  padding: 22px;
  border-radius: 14px;
}

.route-profile.route-redesign .profile-card {
  display: grid;
  gap: 16px;
}

.route-profile.route-redesign .profile-section-divider {
  padding-top: 16px;
  border-top: 1.5px solid rgba(32, 34, 52, 0.18);
}

.route-profile.route-redesign .form-callout {
  border-radius: 14px;
  background: rgba(248, 244, 236, 0.72);
  border: 1px solid rgba(32, 34, 52, 0.18);
}

.route-profile.route-redesign .profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.route-profile.route-redesign .profile-tab {
  border: 1.5px solid rgba(32, 34, 52, 0.28);
  background: rgba(248, 244, 236, 0.78);
  color: #202234;
  border-radius: 999px;
  padding: 0.68rem 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 2px 3px 0 rgba(32, 34, 52, 0.12);
}

.route-profile.route-redesign .profile-tab.is-active {
  background: #202234;
  color: #f8f4ec;
  border-color: #202234;
  box-shadow: 3px 4px 0 rgba(32, 34, 52, 0.34);
}

.route-profile.route-redesign .profile-panel {
  display: none;
}

.route-profile.route-redesign .profile-panel.is-active {
  display: block;
}

.route-profile.route-redesign .profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.route-profile.route-redesign .profile-tier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.route-profile.route-redesign .profile-group-action-row {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 10px;
}

.route-profile.route-redesign .profile-group-action-row .button-link {
  font-size: 0.86rem;
  padding: 0.58rem 0.95rem;
}

.route-profile.route-redesign .profile-group-action-row .button-link.is-active {
  border-color: rgba(32, 34, 52, 0.36);
  background: rgba(32, 34, 52, 0.1);
}

.route-profile.route-redesign .profile-tier-card {
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 16px;
  border-radius: 14px;
  border: 1.5px solid rgba(32, 34, 52, 0.24);
  background: rgba(248, 244, 236, 0.78);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 3px 4px 0 rgba(32, 34, 52, 0.12);
}

.route-profile.route-redesign .profile-tier-card strong {
  font-family: var(--font-serif);
  font-size: 1.08rem;
}

.route-profile.route-redesign .profile-tier-card small {
  color: var(--ink-3);
  line-height: 1.45;
}

.route-profile.route-redesign .profile-tier-card.is-active {
  border-color: #202234;
  background: #202234;
  color: var(--paper);
  box-shadow: 4px 5px 0 rgba(32, 34, 52, 0.34);
}

.route-profile.route-redesign .profile-tier-card.is-active small,
.route-profile.route-redesign .profile-tier-card.is-active .preview-label {
  color: rgba(255, 248, 239, 0.82);
}

.route-profile.route-redesign .profile-usage-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1.5px solid rgba(32, 34, 52, 0.22);
  background: rgba(236, 228, 214, 0.56);
  box-shadow: 3px 4px 0 rgba(32, 34, 52, 0.10);
}

.route-profile.route-redesign .profile-usage-card strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 1.08rem;
}

.route-profile.route-redesign .profile-usage-card small {
  color: var(--ink-3);
}

.route-profile.route-redesign .profile-group-pane {
  gap: 14px;
}

.route-profile.route-redesign .profile-group-pane-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.route-profile.route-redesign .profile-group-pane-head > div {
  min-width: 0;
}

.route-profile.route-redesign .profile-group-pane-close {
  white-space: nowrap;
}

.route-profile.route-redesign .profile-promo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.route-profile.route-redesign .profile-group-form-grid {
  margin-top: 2px;
}

.route-profile.route-redesign .profile-group-form-grid input[readonly] {
  background: rgba(248, 244, 236, 0.86);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  letter-spacing: 0;
  text-transform: none;
}

.route-profile.route-redesign .profile-group-pricing-hint {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  line-height: 1.4;
}

.route-profile.route-redesign .profile-usage-meter {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(32, 34, 52, 0.10);
  overflow: hidden;
}

.route-profile.route-redesign .profile-usage-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--moss) 0%, var(--ember) 100%);
  transition: width 180ms ease;
}

.route-profile.route-redesign .profile-form-grid .field-label.full-span,
.route-profile.route-redesign .profile-form-grid .full-span {
  grid-column: 1 / -1;
}

.route-profile.route-redesign .checkbox-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  justify-self: stretch;
  column-gap: 10px;
  min-height: 34px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.35;
}

.route-profile.route-redesign .checkbox-row input {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  justify-self: start;
}

.route-profile.route-redesign .profile-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.route-profile.route-redesign #profileSaveStatus {
  margin-right: auto;
}

.route-redesign .topbar-client strong,
.route-redesign .topbar-client span {
  font-family: var(--font-serif);
  color: var(--ink);
}

.route-redesign .topbar-client span {
  font-family: var(--font-sans);
  font-size: var(--type-label);
}

.route-redesign .selector-field,
.route-redesign .field-label {
  font-size: var(--type-label);
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
}

.route-redesign .selector-field select,
.route-redesign .field-label input,
.route-redesign .field-label textarea,
.route-redesign input,
.route-redesign textarea,
.route-redesign select {
  font-family: var(--font-sans);
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 9px;
  box-shadow: none;
}

.route-redesign .button-link,
.route-redesign button {
  font-family: var(--font-sans);
}

.route-redesign .button-link,
.route-redesign .ghost,
.route-redesign .primary,
.route-redesign .share-menu-item,
.route-redesign .timeline-tool {
  border-radius: 8px;
}

.route-redesign .button-link.ghost,
.route-redesign .ghost,
.route-redesign .share-menu-item {
  background: #fff;
  border: 1px solid var(--line-2);
  color: var(--ink);
}

.route-redesign .button-link.primary,
.route-redesign .primary {
  background: var(--ink);
  border: 1px solid var(--ink);
  color: var(--paper);
}

.route-redesign .button-link.primary:hover,
.route-redesign .primary:hover {
  background: var(--ember);
  border-color: var(--ember);
}

.route-redesign .panel,
.route-redesign .packet-card,
.route-redesign .storage-card,
.route-redesign .bundle-card,
.route-redesign .session-bundle,
.route-redesign .preview-tile,
.route-redesign .folder-target,
.route-redesign .portal-linked-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(43, 38, 32, 0.06);
}

.route-redesign .panel-head h2,
.route-redesign .nv-dock-title h2,
.route-redesign .script-dock-title h2,
.route-redesign .packet-sheet-head h2 {
  font-family: var(--font-serif);
  color: var(--ink);
  letter-spacing: -0.02em;
  font-size: var(--type-h2);
}

.route-redesign .panel-head h3,
.route-redesign .packet-sheet-head h3 {
  font-family: var(--font-serif);
  color: var(--ink);
  letter-spacing: -0.02em;
  font-size: var(--type-h3);
}

.route-redesign .document-title {
  font-family: var(--font-serif);
  color: var(--ink);
  letter-spacing: -0.02em;
  font-size: var(--type-h2);
}

.route-redesign .eyebrow,
.route-redesign .preview-label {
  font-size: var(--type-eyebrow);
  letter-spacing: 1.3px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-3);
}

.route-redesign .support-copy,
.route-redesign .sheet-caption,
.route-redesign small {
  color: var(--ink-3);
}

.route-ehr.route-redesign .ehr-main-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  grid-template-rows: 1fr;
  height: calc(100vh - 75px);
  overflow: hidden;
}

.route-ehr.route-redesign .ehr-sidebar {
  grid-column: 1;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background: var(--paper);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.route-ehr.route-redesign .ehr-sidebar-records {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.route-ehr.route-redesign .ehr-sidebar-records-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  line-height: 1.05;
}

.route-ehr.route-redesign .ehr-sidebar-records-head .support-copy {
  margin-top: 6px;
}

.route-ehr.route-redesign .ehr-client-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.route-ehr.route-redesign .ehr-client-identity {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
}

.route-ehr.route-redesign .ehr-avatar-large {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: var(--ember-soft);
  color: var(--ember);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
}

.route-ehr.route-redesign .ehr-client-card-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.05;
  margin-bottom: 2px;
}

.route-ehr.route-redesign .ehr-client-card-meta {
  font-size: var(--type-small);
  color: var(--muted);
  margin: 0;
}

.route-ehr.route-redesign .ehr-client-info-button {
  justify-content: center;
  width: 100%;
}

.route-ehr.route-redesign .ehr-client-info-popover {
  width: 100%;
  padding: 14px 10px 10px;
  overflow: hidden;
  border-top: 1px solid var(--line-2);
  margin-top: 4px;
}

.route-ehr.route-redesign .ehr-client-details {
  display: flex;
  flex-direction: column;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(32, 34, 52, 0.12);
}

.route-ehr.route-redesign .ehr-detail-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: start;
  font-size: var(--type-body);
  padding: 8px 0;
  border-bottom: 1px solid var(--line-2);
}

.route-ehr.route-redesign .ehr-detail-label {
  font-size: var(--type-label);
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.route-ehr.route-redesign .ehr-detail-row strong {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}

.route-ehr.route-redesign .ehr-client-details-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.route-ehr.route-redesign .ehr-client-details-head h3 {
  margin: 3px 0 0;
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.1;
  color: var(--ink);
}

.route-ehr.route-redesign .ehr-detail-section-label {
  font-size: var(--type-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.route-profile.route-redesign .profile-actions-top {
  margin-bottom: 14px;
}

.route-ehr.route-redesign .ehr-client-details-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.route-ehr.route-redesign .ehr-detail-view {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  min-height: 17px;
  display: block;
  overflow-wrap: anywhere;
}

.route-ehr.route-redesign .ehr-detail-view:empty::before {
  content: "Not entered";
  color: var(--muted);
  font-weight: 400;
  font-style: italic;
}

.route-ehr.route-redesign .ehr-detail-input {
  width: 100%;
  font-size: 13px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-family: inherit;
  box-sizing: border-box;
}

.route-ehr.route-redesign .ehr-quick-stats {
  display: grid;
  gap: 8px;
}

.route-ehr.route-redesign .stat-compact {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
}

.route-ehr.route-redesign .stat-label {
  font-size: var(--type-label);
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.route-ehr.route-redesign .stat-compact strong {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
}

@media (max-width: 760px) {

  .route-ehr.route-redesign .ehr-detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.route-ehr.route-redesign .ehr-targets-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.route-ehr.route-redesign .ehr-badges-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid var(--line);
}

.route-ehr.route-redesign .ehr-badges-head {
  display: grid;
  gap: 4px;
}

.route-ehr.route-redesign .ehr-badges-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--type-label);
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.route-ehr.route-redesign .ehr-badges-head p {
  margin: 0;
}

.route-ehr.route-redesign .ehr-badge-list {
  display: grid;
  gap: 10px;
}

.route-ehr.route-redesign .ehr-badge-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
}

.route-ehr.route-redesign .ehr-badge-item.is-earned {
  background: linear-gradient(180deg, rgba(255, 247, 231, 0.96) 0%, rgba(252, 242, 218, 0.9) 100%);
  border-color: rgba(147, 102, 38, 0.26);
  box-shadow: 0 12px 24px -20px rgba(92, 66, 22, 0.4);
}

.route-ehr.route-redesign .ehr-badge-item.is-locked {
  opacity: 0.84;
}

.route-ehr.route-redesign .ehr-badge-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.route-ehr.route-redesign .ehr-badge-kicker {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.route-ehr.route-redesign .ehr-badge-title {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.2;
  color: var(--ink);
}

.route-ehr.route-redesign .ehr-badge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(130, 104, 44, 0.14);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-ehr.route-redesign .ehr-badge-item.is-earned .ehr-badge-status {
  background: rgba(147, 102, 38, 0.16);
  color: var(--ember);
}

.route-ehr.route-redesign .ehr-badge-copy {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-2);
}

.route-ehr.route-redesign .ehr-badge-progress {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.route-ehr.route-redesign .ehr-targets-list h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--type-label);
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.route-ehr.route-redesign .target-sequence-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.route-ehr.route-redesign .folder-target {
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--line);
  font-size: 12px;
}

.route-ehr.route-redesign .folder-target.is-current {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.route-ehr.route-redesign .ehr-content {
  grid-column: 2;
  padding: 28px 32px;
  overflow: auto;
  background: var(--paper);
  display: flex;
  flex-direction: column;
}

.route-ehr.route-redesign .ehr-content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-top: 28px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.route-ehr.route-redesign .ehr-content-header h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--type-h1);
  font-weight: 600;
  color: var(--ink);
}

.route-ehr.route-redesign .ehr-subtitle {
  margin: 6px 0 0 0;
  font-size: var(--type-label);
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.route-ehr.route-redesign .ehr-content-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.route-ehr.route-redesign .ehr-record-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  padding: 0;
  border: none;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.route-ehr.route-redesign .ehr-record-tab {
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -1.5px;
  background: transparent;
  color: var(--ink-2);
  padding: 8px 16px 10px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
}

.route-ehr.route-redesign .ehr-record-tab.is-active {
  background: transparent;
  border-bottom-color: var(--ember);
  color: var(--ink);
  font-weight: 600;
  box-shadow: none;
}

.route-ehr.route-redesign .ehr-record-panel {
  display: none;
}

.route-ehr.route-redesign .ehr-record-panel.is-active {
  display: block;
}

.route-ehr.route-redesign .ehr-session-list {
  display: grid;
  gap: 12px;
  margin-bottom: 0;
}

.route-ehr.route-redesign .ehr-session-nav-button {
  width: 100%;
  align-items: center;
  border-radius: 10px;
}

.route-ehr.route-redesign .ehr-session-nav-date {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(32, 34, 52, 0.28);
  background: rgba(232, 223, 209, 0.9);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  gap: 2px;
}

.route-ehr.route-redesign .ehr-session-nav-date span:first-child {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.route-ehr.route-redesign .ehr-session-nav-date span:last-child {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 700;
}

.route-ehr.route-redesign .ehr-session-nav-button.is-journal .ehr-session-nav-date {
  border-color: rgba(38, 96, 128, 0.42);
  background: rgba(207, 236, 255, 0.92);
  color: #1f3e57;
}

.route-ehr.route-redesign .ehr-session-nav-button .packet-nav-copy {
  gap: 0.2rem;
}

.route-ehr.route-redesign .ehr-session-nav-button .packet-nav-copy strong {
  font-size: 1.02rem;
  color: var(--ink);
}

.route-ehr.route-redesign .ehr-session-nav-button .packet-nav-copy small {
  color: var(--muted);
}

.route-ehr.route-redesign .ehr-session-nav-button .ehr-session-nav-meta {
  font-size: 11px;
}

.route-ehr.route-redesign .ehr-session-row {
  display: grid;
  grid-template-columns: 100px 1fr 80px 60px;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  font-size: var(--type-body);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.route-ehr.route-redesign .ehr-session-row:hover {
  transform: translateY(-1px);
  border-color: var(--line-2);
}

.route-ehr.route-redesign .ehr-session-row.is-selected {
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--accent);
}

.route-ehr.route-redesign .ehr-session-date {
  font-size: var(--type-small);
  color: var(--muted);
  font-weight: 500;
}

.route-ehr.route-redesign .ehr-session-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.route-ehr.route-redesign .ehr-session-title {
  font-weight: 600;
  color: var(--ink);
}

.route-ehr.route-redesign .ehr-session-desc {
  font-size: var(--type-small);
  color: var(--muted);
}

.route-ehr.route-redesign .ehr-session-status {
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--type-eyebrow);
  font-weight: 600;
  text-align: center;
  text-transform: capitalize;
}

.route-ehr.route-redesign .ehr-session-sud {
  font-weight: 600;
  color: var(--ink);
  text-align: center;
}

.route-ehr.route-redesign .ehr-session-detail-shell {
  display: grid;
  gap: 16px;
}

.route-ehr.route-redesign .ehr-session-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.route-ehr.route-redesign .ehr-note-tools {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.route-ehr.route-redesign .ehr-session-detail {
  display: grid;
}

.route-ehr.route-redesign .ehr-note-panel {
  padding: 18px;
}

.route-ehr.route-redesign .ehr-note-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.route-ehr.route-redesign .ehr-note-panel-head h3 {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-size: 30px;
}

.route-ehr.route-redesign .ehr-note-panel-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.route-ehr.route-redesign .ehr-note-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.route-ehr.route-redesign .ehr-note-summary-item {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.route-ehr.route-redesign .ehr-note-summary-item strong {
  font-size: 14px;
  line-height: 1.45;
}

.route-ehr.route-redesign .ehr-note-documents {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
}

.route-ehr.route-redesign .ehr-generated-note-card,
.route-ehr.route-redesign .ehr-nv-card {
  padding: 14px;
}

.route-ehr.route-redesign .ehr-generated-note-text {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  min-height: 360px;
}

.route-ehr.route-redesign .ehr-nv-list {
  display: grid;
  gap: 8px;
}

.route-ehr.route-redesign .ehr-nv-row {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.route-ehr.route-redesign .ehr-nv-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  background: var(--amber-wash);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.route-ehr.route-redesign .ehr-nv-text {
  white-space: pre-wrap;
  line-height: 1.6;
}

.route-ehr.route-redesign .ehr-artifact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.route-ehr.route-redesign .ehr-artifact-card,
.route-ehr.route-redesign .ehr-log-card {
  padding: 16px;
}

.route-ehr.route-redesign .ehr-artifact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 14px;
  color: var(--ink-3);
  font-size: 12px;
}

.route-ehr.route-redesign .ehr-artifact-list {
  display: grid;
  gap: 8px;
}

.route-ehr.route-redesign .ehr-artifact-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
}

.route-ehr.route-redesign .ehr-artifact-item strong,
.route-ehr.route-redesign .ehr-log-card strong {
  line-height: 1.5;
}

.route-ehr.route-redesign .ehr-prep-doc-workspace {
  display: grid;
  gap: 12px;
}

.route-ehr.route-redesign .ehr-prep-doc-list {
  display: grid;
  gap: 10px;
}

.route-ehr.route-redesign .ehr-prep-doc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.route-ehr.route-redesign .ehr-prep-doc-row.is-selected {
  border-color: var(--moss-soft);
  background: var(--moss-wash);
}

.route-ehr.route-redesign .ehr-prep-doc-row strong,
.route-ehr.route-redesign .ehr-prep-doc-row small {
  display: block;
}

.route-ehr.route-redesign .ehr-prep-doc-row strong {
  margin-top: 2px;
  font-size: 15px;
}

.route-ehr.route-redesign .ehr-prep-doc-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.route-ehr.route-redesign .ehr-prep-doc-status {
  min-width: 88px;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.route-ehr.route-redesign .ehr-prep-doc-status.is-complete {
  background: rgba(95, 122, 82, 0.18);
  color: var(--accent-strong);
}

.route-ehr.route-redesign .ehr-prep-doc-status.is-progress {
  background: rgba(199, 138, 42, 0.18);
  color: #8a5b13;
}

.route-ehr.route-redesign .ehr-prep-doc-status.is-empty {
  background: rgba(43, 38, 32, 0.08);
  color: var(--muted);
}

.route-ehr.route-redesign .ehr-prep-doc-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ehr-prep-preview-sheet {
  width: 8.5in;
  min-height: 11in;
  padding: 0.55in;
  background: #fff;
  color: #1f2522;
  border: 1px solid rgba(43, 38, 32, 0.12);
  box-shadow: 0 18px 42px rgba(32, 24, 18, 0.12);
}

.ehr-prep-preview-head {
  display: grid;
  gap: 5px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(43, 38, 32, 0.16);
}

.ehr-prep-preview-head p,
.ehr-prep-preview-head h1,
.ehr-prep-preview-head strong,
.ehr-prep-preview-head span {
  margin: 0;
}

.ehr-prep-preview-head p {
  color: #6f6a5f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ehr-prep-preview-head h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.1;
}

.ehr-prep-preview-head strong {
  font-size: 14px;
}

.ehr-prep-preview-head span {
  color: #6f6a5f;
  font-size: 12px;
}

.ehr-prep-preview-fields {
  display: grid;
  gap: 10px;
}

.ehr-prep-preview-field {
  display: grid;
  gap: 5px;
  break-inside: avoid;
  padding: 10px 0;
  border-bottom: 1px solid rgba(43, 38, 32, 0.1);
}

.ehr-prep-preview-field span {
  color: #6f6a5f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ehr-prep-preview-field p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
  font-size: 13px;
}

.route-ehr.route-redesign .ehr-log-copy {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.65;
}

.route-ehr.route-redesign .ehr-tices-list {
  display: grid;
  gap: 12px;
}

.route-ehr.route-redesign .ehr-tices-entry {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
}

.route-ehr.route-redesign .ehr-tices-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-2);
}

.route-ehr.route-redesign .ehr-tices-entry-head span {
  color: var(--ink-3);
  font-weight: 700;
}

.route-ehr.route-redesign .ehr-tices-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.route-ehr.route-redesign .ehr-tices-field {
  display: grid;
  gap: 4px;
}

.route-ehr.route-redesign .ehr-tices-field p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .route-portal .portal-journal-shell {
    grid-template-columns: 1fr;
  }

  .route-portal .portal-journal-rail {
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px dashed rgba(32, 34, 52, 0.22);
  }

  .route-portal .portal-tices-grid,
  .route-portal .portal-tices-readonly-grid,
  .route-ehr.route-redesign .ehr-tices-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .route-ehr.route-redesign .ehr-note-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-ehr.route-redesign .ehr-note-documents {
    grid-template-columns: 1fr;
  }

  .route-ehr.route-redesign .ehr-artifact-grid {
    grid-template-columns: 1fr;
  }

  .ehr-preview-pane {
    inset: 22px;
    width: min(920px, calc(100vw - 44px));
    max-width: calc(100vw - 44px);
    height: min(900px, calc(100vh - 44px));
    max-height: calc(100vh - 44px);
  }
}

@media (max-width: 720px) {
  .route-ehr.route-redesign .ehr-session-detail-head,
  .route-ehr.route-redesign .ehr-note-panel-head {
    flex-direction: column;
  }

  .route-ehr.route-redesign .ehr-note-summary-grid {
    grid-template-columns: 1fr;
  }

  .ehr-preview-pane-head,
  .ehr-preview-pane-tools {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ehr-preview-pane {
    inset: 12px;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
    border-radius: 18px;
  }

  .ehr-preview-pane-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .ehr-preview-pane-head-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.route-ehr.route-redesign .ehr-section {
  margin-bottom: 32px;
}

.route-ehr.route-redesign .ehr-section h2 {
  margin: 0 0 16px 0;
  font-family: var(--font-serif);
  font-size: var(--type-h2);
  font-weight: 600;
  color: var(--ink);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.route-ehr.route-redesign .ehr-log-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.route-ehr.route-redesign .ehr-profile-card,
.route-ehr.route-redesign .ehr-target-plan-card,
.route-ehr.route-redesign .ehr-utilities-card,
.route-ehr.route-redesign .ehr-history-card {
  padding: 18px;
}

.route-ehr.route-redesign .ehr-avatar {
  width: 72px;
  height: 72px;
  border-radius: 36px;
  background: var(--amber-wash);
  border: 2px solid var(--ember-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--ember);
}

.route-ehr.route-redesign .ehr-profile-card h1 {
  margin: 14px 0 0;
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: -0.03em;
}

.route-ehr.route-redesign .ehr-profile-card .support-copy {
  margin-top: 4px;
}

.route-ehr.route-redesign .ehr-quick-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.route-ehr.route-redesign .portal-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.route-ehr.route-redesign .portal-linked-list {
  display: grid;
  gap: 10px;
}

.route-ehr.route-redesign .portal-linked-card {
  padding: 12px 14px;
}

.route-ehr.route-redesign .portal-linked-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.route-ehr.route-redesign .portal-linked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.route-ehr.route-redesign .portal-linked-meta {
  margin-top: 8px;
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-3);
}

.route-ehr.route-redesign .folder-target-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.route-ehr.route-redesign .folder-target {
  padding: 12px;
}

.route-ehr.route-redesign .folder-target-head {
  display: flex;
  gap: 8px;
  align-items: center;
}

.route-ehr.route-redesign .folder-target-seq {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-4);
}

.route-ehr.route-redesign .folder-target p {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.5;
}

.route-ehr.route-redesign .folder-target-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 11px;
  color: var(--ink-3);
}

.route-ehr.route-redesign .storage-stack {
  display: grid;
  gap: 12px;
}

/* EHR document preview pane */
body.is-emdr-preview-open,
body.is-ehr-preview-open {
  overflow: hidden;
}

.emdr-preview-backdrop,
.ehr-preview-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(19, 24, 31, 0.3);
  backdrop-filter: blur(4px);
  z-index: 79;
}

.emdr-preview-backdrop[hidden],
.emdr-preview-pane[hidden],
.ehr-preview-backdrop[hidden],
.ehr-preview-pane[hidden] {
  display: none !important;
}

.emdr-preview-pane,
.ehr-preview-pane {
  position: fixed;
  inset: 28px;
  margin: auto;
  width: min(1120px, calc(100vw - 64px));
  max-width: calc(100vw - 64px);
  height: min(920px, calc(100vh - 56px));
  max-height: calc(100vh - 56px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(252, 248, 241, 0.98) 0%, rgba(246, 240, 230, 0.99) 100%);
  box-shadow: 0 32px 80px -18px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 80;
}

.route-ehr.route-redesign .ehr-preview-pane.ehr-preview-pane-inline {
  position: relative;
  inset: auto;
  margin: 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  min-height: 0;
  border-radius: 14px;
  box-shadow: 4px 6px 0 rgba(32, 34, 52, 0.12), 0 12px 30px -24px rgba(32, 34, 52, 0.35);
  z-index: 1;
}

.route-ehr.route-redesign .ehr-preview-pane.ehr-preview-pane-inline .ehr-document-dialog-text,
.route-ehr.route-redesign .ehr-preview-pane.ehr-preview-pane-inline .ehr-document-dialog-render {
  max-height: none;
  min-height: 0;
}

.emdr-preview-pane-head,
.ehr-preview-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.emdr-preview-pane-head p.eyebrow,
.ehr-preview-pane-head p.eyebrow {
  margin: 0 0 2px;
}

.emdr-preview-pane-head h2,
.ehr-preview-pane-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
}

.emdr-preview-pane-head-actions,
.ehr-preview-pane-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ehr-preview-pane-head-actions .button-link {
  min-height: 40px;
  min-width: 120px;
}

.emdr-new-client-pane {
  width: min(720px, calc(100vw - 64px));
  max-width: calc(100vw - 64px);
  height: auto;
  max-height: calc(100vh - 56px);
}

.emdr-new-client-pane-body {
  padding: 24px;
  overflow-y: auto;
  display: grid;
  gap: 16px;
}

.emdr-new-client-pane .storage-card {
  margin: 0;
}

.emdr-new-client-pane-status {
  display: block;
  margin-top: 12px;
}

#clientCreatePane [data-new-client-close] {
  min-width: 44px;
  min-height: 44px;
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(91, 118, 171, 0.5);
  background: rgba(255, 255, 255, 0.88);
  color: #223154;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}

#clientCreatePane [data-new-client-close]:hover,
#clientCreatePane [data-new-client-close]:focus-visible {
  border-color: #5b76ab;
  background: #ffffff;
  color: #152240;
}

.ehr-preview-doc-tabs {
  display: flex;
  gap: 0;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.ehr-preview-doc-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s;
}

.ehr-preview-doc-tab:hover {
  color: var(--ink-1);
}

.ehr-preview-doc-tab.is-active {
  color: var(--ink-1);
  border-bottom-color: var(--amber, #c78a2a);
}

.ehr-preview-pane-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.ehr-preview-pane-tools > [hidden] {
  display: none !important;
}

.ehr-preview-zoom-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.ehr-preview-zoom-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  min-width: 40px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.ehr-document-dialog-text {
  flex: 1;
  overflow-y: scroll;
  overflow-x: hidden;
  margin: 0;
  padding: 32px 28px 40px;
  white-space: pre-wrap;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  scrollbar-gutter: stable both-edges;
  overscroll-behavior: contain;
}

.ehr-document-dialog-render {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: scroll;
  overflow-x: hidden;
  padding: 32px 28px 40px;
  background: rgba(255, 255, 255, 0.5);
  scrollbar-gutter: stable both-edges;
  overscroll-behavior: contain;
}

.ehr-preview-stage {
  display: flex;
  justify-content: center;
  width: 100%;
}

.ehr-preview-canvas {
  width: min(calc(980px / var(--ehr-preview-zoom, 1)), calc(100% / var(--ehr-preview-zoom, 1)));
  zoom: var(--ehr-preview-zoom, 1);
}

.ehr-preview-stage.is-text .ehr-preview-canvas {
  width: min(calc(860px / var(--ehr-preview-zoom, 1)), calc(100% / var(--ehr-preview-zoom, 1)));
}

.ehr-preview-text-copy {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 32px rgba(32, 24, 18, 0.08);
  white-space: pre-wrap;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink);
}

.ehr-document-dialog-render > * {
  width: 100%;
  margin-inline: auto;
}

.ehr-document-dialog-text::-webkit-scrollbar,
.ehr-document-dialog-render::-webkit-scrollbar {
  width: 12px;
}

.ehr-document-dialog-text::-webkit-scrollbar-track,
.ehr-document-dialog-render::-webkit-scrollbar-track {
  background: rgba(43, 38, 32, 0.08);
  border-radius: 999px;
}

.ehr-document-dialog-text::-webkit-scrollbar-thumb,
.ehr-document-dialog-render::-webkit-scrollbar-thumb {
  background: rgba(95, 122, 82, 0.55);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.72);
}

.ehr-document-dialog-text::-webkit-scrollbar-thumb:hover,
.ehr-document-dialog-render::-webkit-scrollbar-thumb:hover {
  background: rgba(95, 122, 82, 0.75);
}

.ehr-pdf-export-sandbox {
  position: fixed;
  top: 0;
  left: -200vw;
  width: 8.5in;
  background: #fff;
  pointer-events: none;
  z-index: -1;
}

.ehr-pdf-export-sheet {
  background: #fff;
  color: #1b2325;
}

.ehr-pdf-export-head {
  padding: 20px 20px 8px;
  border-bottom: 1px solid rgba(43, 38, 32, 0.12);
}

.ehr-pdf-export-head p,
.ehr-pdf-export-head h1,
.ehr-pdf-export-head strong {
  margin: 0;
}

.ehr-pdf-export-head p {
  color: #5f6c6a;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ehr-pdf-export-head h1 {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.15;
}

.ehr-pdf-export-head strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
}

.ehr-pdf-export-text {
  margin: 0;
  padding: 20px;
  white-space: pre-wrap;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.7;
}

.session-document {
  color: #1b2325;
}

.session-document-page {
  max-width: 980px;
  margin: 0 auto;
}

.session-doc-form {
  border: 1px solid rgba(43, 38, 32, 0.18);
  background: #fff;
}

.session-doc-form-header {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-bottom: 1px solid rgba(43, 38, 32, 0.18);
}

.session-doc-brand,
.session-doc-title-block {
  min-height: 48px;
  display: grid;
  align-items: center;
  padding: 9px 20px;
}

.session-doc-brand {
  border-right: 1px solid rgba(43, 38, 32, 0.18);
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.session-doc-title-block {
  justify-items: end;
  text-align: right;
  gap: 0.18rem;
}

.session-doc-title-block strong {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 2vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
}

.session-doc-title-block span {
  color: #5f6c6a;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.session-doc-form-topline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(43, 38, 32, 0.18);
}

.session-doc-inline-field {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 30px;
  padding: 0.45rem 1rem;
}

.session-doc-inline-field + .session-doc-inline-field {
  border-left: 1px solid rgba(43, 38, 32, 0.18);
}

.session-doc-inline-label {
  font-weight: 700;
}

.session-doc-inline-value {
  flex: 1 1 auto;
  min-width: 0;
}

.session-doc-form-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  border-bottom: 1px solid rgba(43, 38, 32, 0.18);
}

.session-doc-form-row-large .session-doc-form-value {
  min-height: 0;
}

.session-doc-form-row-tall .session-doc-form-value {
  min-height: 85px;
}

.session-doc-form-label,
.session-doc-form-value {
  padding: 0.5rem 1rem;
}

.session-doc-form-label {
  border-right: 1px solid rgba(43, 38, 32, 0.18);
  background: rgba(248, 247, 240, 0.62);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.45;
}

.session-doc-form-value {
  white-space: pre-wrap;
  line-height: 1.5;
}

.session-doc-form-value.is-editable {
  padding: 0;
  white-space: normal;
}

.session-doc-section-kicker {
  margin-bottom: 0.2rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 600;
}

.session-doc-choice-list {
  display: grid;
  gap: 0.22rem;
}

.session-doc-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1.2rem;
}

.session-doc-choice {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.session-doc-choice-button {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.session-doc-checkbox {
  width: 1rem;
  height: 1rem;
  margin-top: 0.18rem;
  border: 1px solid rgba(43, 38, 32, 0.45);
  background: #fff;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.session-doc-checkbox.is-checked::after {
  content: "✓";
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.session-doc-form.is-editable .session-doc-choice-button:hover .session-doc-checkbox,
.session-doc-form.is-editable .session-doc-choice-button:focus-visible .session-doc-checkbox {
  border-color: rgba(43, 38, 32, 0.78);
}

.session-doc-form.is-editable .session-doc-choice-button:focus-visible {
  outline: 2px solid rgba(134, 113, 73, 0.45);
  outline-offset: 2px;
  border-radius: 0.35rem;
}

.session-doc-field-control {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  outline: none;
}

.session-doc-field-input {
  min-height: 1.4em;
}

.session-doc-field-textarea {
  display: block;
  min-height: calc(1.4em + 1rem);
  resize: none;
  overflow: hidden;
}

.session-doc-field-static.is-empty {
  min-height: 1.4em;
}

.session-doc-inline-control,
.session-doc-field-static.session-doc-inline-control {
  font-weight: 700;
}

.session-doc-inline-value .session-doc-field-control {
  padding: 0;
}

.session-doc-form-value.is-editable .session-doc-field-control {
  padding: 0.5rem 1rem;
}

.session-doc-form-row-large .session-doc-form-value.is-editable .session-doc-field-textarea {
  min-height: 6rem;
}

.session-doc-reevaluation-row .session-doc-form-label,
.session-doc-reevaluation-row .session-doc-form-value {
  padding-top: 0.04rem;
  padding-bottom: 0.04rem;
}

.session-doc-reevaluation-row .session-doc-form-label {
  font-size: 0.62rem;
  line-height: 1.05;
}

.session-doc-reevaluation-row .session-doc-form-value {
  font-size: 0.58rem;
  line-height: 1.04;
}

.session-doc-reevaluation-row .session-doc-section-kicker {
  margin-bottom: 0.02rem;
  font-size: 0.58rem;
  line-height: 1.02;
}

.session-doc-reevaluation-row .session-doc-choice-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.02rem 0.18rem;
}

.session-doc-reevaluation-row .session-doc-choice {
  gap: 0.12rem;
}

.session-doc-reevaluation-row .session-doc-checkbox {
  width: 0.46rem;
  height: 0.46rem;
  margin-top: 0.02rem;
}

.session-doc-reevaluation-row .session-doc-checkbox.is-checked::after {
  font-size: 0.34rem;
}

.session-doc-reevaluation-row .session-doc-subnote {
  margin-top: 0.02rem;
  padding-top: 0.02rem;
}

.session-doc-reevaluation-row .session-doc-field-textarea,
.session-doc-reevaluation-row .session-doc-field-static {
  min-height: 0.45rem;
}

.session-doc-form-row-large.session-doc-reevaluation-row .session-doc-form-value.is-editable .session-doc-field-textarea,
.session-doc-reevaluation-row .session-doc-subnote.is-editable .session-doc-field-textarea {
  min-height: 0.7rem;
}

.session-doc-form-row-tall .session-doc-form-value.is-editable .session-doc-field-textarea {
  min-height: 7rem;
}

.session-doc-subnote.is-editable .session-doc-field-control {
  padding: 0;
}

.session-doc-subnote.is-editable .session-doc-field-textarea {
  min-height: 2.1rem;
}

.session-doc-form.is-editable .session-doc-field-control:hover,
.session-doc-form.is-editable .session-doc-field-control:focus-visible {
  background: rgba(243, 239, 228, 0.55);
}

.session-doc-form.is-editable .session-doc-field-control:focus-visible {
  outline: 2px solid rgba(134, 113, 73, 0.35);
  outline-offset: -2px;
}

.session-doc-form-footer {
  padding: 0.4rem 1rem;
  text-align: center;
  font-size: 0.74rem;
  color: #687471;
}

@media (max-width: 900px) {
  .session-doc-form-header,
  .session-doc-form-topline,
  .session-doc-form-row,
  .session-doc-choice-grid {
    grid-template-columns: 1fr;
  }

  .session-doc-brand,
  .session-doc-title-block,
  .session-doc-form-label,
  .session-doc-inline-field {
    border-right: 0;
  }

  .session-doc-inline-field + .session-doc-inline-field,
  .session-doc-form-label {
    border-left: 0;
  }

  .session-doc-form-label {
    border-right: 0;
    border-bottom: 1px solid rgba(43, 38, 32, 0.18);
  }

  .session-doc-title-block {
    justify-items: start;
    text-align: left;
  }
}

/* Badges tab panel */
.route-ehr.route-redesign #ehrPanelBadges .ehr-section {
  padding: 20px 24px;
}

.route-ehr.route-redesign #ehrPanelBadges .ehr-badges-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 20px;
}

.route-ehr.route-redesign .ehr-badge-rep-controls {
  display: grid;
  gap: 8px;
  min-width: 260px;
  max-width: 320px;
}

.route-ehr.route-redesign .ehr-badge-rep-controls label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-ehr.route-redesign .ehr-badge-rep-controls-row {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto auto;
}

.route-ehr.route-redesign .ehr-badge-rep-controls-row:last-child {
  grid-template-columns: 1fr 1fr;
}

.route-ehr.route-redesign .ehr-badge-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 220px));
  gap: 12px;
  margin-bottom: 22px;
}

.route-ehr.route-redesign .ehr-badge-stat-card {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-2);
}

.route-ehr.route-redesign .ehr-badge-stat-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-ehr.route-redesign .ehr-badge-stat-card strong {
  color: var(--ink);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.route-ehr.route-redesign .ehr-badge-stat-card small {
  color: var(--ink-3);
  font-size: 12px;
}

.route-ehr.route-redesign #ehrPanelBadges h2 {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
}

.forms-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.forms-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border, #e5e7eb);
  padding: 0 28px;
  background: var(--color-surface, #fff);
}

.forms-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-muted, #6b7280);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.forms-tab:hover {
  color: var(--color-text, #111827);
}

.forms-tab.is-active {
  color: var(--color-amber, #d97706);
  border-bottom-color: var(--color-amber, #d97706);
}

.forms-tab-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.forms-tab-panel[hidden] {
  display: none;
}

.pdf-upload-form,
.uploaded-forms-list,
.uploaded-form-field-list {
  display: grid;
  gap: 0.75rem;
}

.uploaded-form-list-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: stretch;
}

.uploaded-form-list-item {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.75rem;
  border: 1.5px solid rgba(32, 34, 52, 0.16);
  border-radius: 8px;
  background: rgba(248, 244, 236, 0.62);
  color: var(--ink);
  text-align: left;
  box-shadow: 2px 3px 0 rgba(32, 34, 52, 0.08);
}

.uploaded-form-list-row:hover .uploaded-form-list-item,
.uploaded-form-list-row.is-active .uploaded-form-list-item {
  border-color: rgba(86, 93, 137, 0.45);
  background: rgba(86, 93, 137, 0.12);
}

.uploaded-form-list-delete {
  align-self: stretch;
  padding: 0 0.55rem;
  border: 1.5px solid rgba(156, 61, 47, 0.28);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.74);
  color: #8c382f;
  font-size: 0.72rem;
  font-weight: 800;
}

.uploaded-form-list-delete:hover {
  border-color: rgba(156, 61, 47, 0.5);
  background: rgba(156, 61, 47, 0.1);
}

.uploaded-form-list-item strong {
  font-size: 0.86rem;
}

.uploaded-form-list-item small {
  color: var(--muted);
  font-size: 0.72rem;
}

.uploaded-form-editor {
  display: grid;
  gap: 1rem;
}

.uploaded-form-empty {
  min-height: 22rem;
  align-content: center;
  display: grid;
  gap: 0.7rem;
  text-align: center;
}

.uploaded-form-dropzone {
  min-height: 34rem;
  place-items: center;
  padding: 2rem;
  border: 2px dashed rgba(86, 93, 137, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.66), rgba(248, 244, 236, 0.72));
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.uploaded-form-dropzone:hover,
.uploaded-form-dropzone:focus-visible,
.uploaded-form-dropzone.is-drag-over {
  border-color: rgba(58, 111, 133, 0.75);
  background:
    linear-gradient(180deg, rgba(207, 225, 231, 0.36), rgba(255, 252, 246, 0.82));
  box-shadow: inset 0 0 0 1px rgba(58, 111, 133, 0.22), 0 14px 28px rgba(32, 34, 52, 0.08);
  outline: none;
}

.uploaded-form-dropzone.is-drag-over {
  transform: translateY(-1px);
}

.uploaded-form-dropzone.is-uploading {
  cursor: progress;
  opacity: 0.72;
}

.uploaded-form-editor-head,
.uploaded-form-save-row,
.uploaded-pdf-script-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.uploaded-form-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.uploaded-form-actions .icon-button {
  width: 2.35rem;
  min-width: 2.35rem;
  padding-inline: 0;
  text-align: center;
}

.uploaded-form-setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.uploaded-form-field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  align-items: end;
  padding: 0.9rem;
  border: 1.5px solid rgba(32, 34, 52, 0.16);
  border-radius: 8px;
  background: rgba(248, 244, 236, 0.58);
}

.uploaded-form-field-row-main {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(120px, 0.35fr);
  gap: 0.75rem;
}

.uploaded-form-field-placement {
  grid-column: 1 / -1;
  margin: -0.2rem 0 0;
}

.uploaded-form-no-fields {
  padding: 1rem;
  border: 1.5px dashed rgba(32, 34, 52, 0.22);
  border-radius: 8px;
  background: rgba(248, 244, 236, 0.48);
}

.uploaded-form-advanced-fields .uploaded-form-field-list {
  padding: 0 0.9rem 0.9rem;
}

.uploaded-form-builder {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.uploaded-form-builder.is-expanded {
  position: fixed;
  inset: 24px;
  z-index: 60;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  padding: 1rem;
  border: 2px solid rgba(32, 34, 52, 0.32);
  border-radius: 8px;
  background: rgba(244, 240, 231, 0.98);
  box-shadow: 0 20px 70px rgba(32, 34, 52, 0.28);
}

.uploaded-pdf-viewfinder,
.uploaded-form-draft-pane {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
}

.uploaded-pdf-viewfinder-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.uploaded-pdf-pages {
  display: grid;
  gap: 1rem;
  max-height: 58vh;
  overflow: auto;
  padding: 1rem;
  border: 1.5px solid rgba(32, 34, 52, 0.18);
  border-radius: 8px;
  background: rgba(235, 231, 221, 0.45);
}

.uploaded-form-builder.is-expanded .uploaded-pdf-pages,
.uploaded-form-builder.is-expanded .uploaded-form-draft {
  max-height: calc(100vh - 150px);
}

.uploaded-pdf-zoom-label {
  align-self: center;
  min-width: 3.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.uploaded-form-draft {
  display: grid;
  gap: 0.8rem;
  max-height: 58vh;
  overflow: auto;
  padding: 1rem;
  border: 1.5px solid rgba(32, 34, 52, 0.18);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.82);
}

.uploaded-form-draft-sections,
.uploaded-form-draft-items,
.uploaded-form-draft-section {
  display: grid;
  gap: 0.75rem;
}

.uploaded-form-draft-section {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(32, 34, 52, 0.14);
}

.uploaded-form-draft-item {
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem;
  border: 1px solid rgba(32, 34, 52, 0.14);
  border-radius: 8px;
  background: rgba(248, 244, 236, 0.58);
}

.uploaded-pdf-page {
  position: relative;
  justify-self: center;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(32, 34, 52, 0.14);
}

.uploaded-pdf-page canvas,
.uploaded-pdf-text-layer,
.uploaded-pdf-field-layer {
  position: absolute;
  inset: 0;
}

.uploaded-pdf-page canvas {
  position: relative;
  display: block;
}

.uploaded-pdf-text-layer {
  color: transparent;
  line-height: 1;
  overflow: hidden;
  user-select: text;
}

.uploaded-pdf-text-layer span {
  position: absolute;
  transform-origin: 0 0;
  white-space: pre;
  cursor: text;
}

.uploaded-pdf-text-layer ::selection {
  color: transparent;
  background: rgba(178, 100, 61, 0.32);
}

.uploaded-pdf-field-layer {
  pointer-events: none;
}

.uploaded-pdf-field-box {
  position: absolute;
  display: grid;
  align-items: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0 0.35rem;
  border: 2px solid rgba(157, 81, 43, 0.9);
  border-radius: 6px;
  background: rgba(205, 119, 73, 0.18);
  color: #5b3326;
  font-size: 0.72rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uploaded-pdf-field-box.is-drawing {
  border-style: dashed;
  background: rgba(157, 81, 43, 0.12);
}

.uploaded-pdf-fallback {
  width: 100%;
  min-height: 58vh;
  border: 0;
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 1100px) {
  .uploaded-form-builder {
    grid-template-columns: 1fr;
  }
}

.uploaded-pdf-script {
  display: grid;
  gap: 1rem;
}

.uploaded-pdf-draft-section {
  display: grid;
  gap: 0.75rem;
}

.uploaded-pdf-draft-section h4 {
  margin: 0;
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  color: var(--ink);
}

.uploaded-pdf-script-head {
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(32, 34, 52, 0.14);
}

.uploaded-pdf-script-head h3 {
  margin: 0.15rem 0;
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  color: var(--ink);
}

.uploaded-pdf-field-grid {
  display: grid;
  gap: 0.8rem;
}

.uploaded-pdf-checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.uploaded-pdf-checkbox input {
  width: auto;
}

[data-tone="success"] {
  color: #496a43 !important;
}

[data-tone="error"] {
  color: #9c3d2f !important;
}

.route-prep.route-redesign .prep-packet-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  padding: 24px 28px 36px;
  box-sizing: border-box;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
}

.route-prep.route-redesign .prep-rail,
.route-prep.route-redesign .prep-document-shell {
  min-height: 0;
}

.route-prep.route-redesign .prep-rail {
  position: relative;
  top: auto;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-bottom: 96px;
}

.route-prep.route-redesign .prep-document-shell {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.route-prep.route-redesign .prep-handoff {
  display: none;
}

.route-prep.route-redesign .prep-rail,
.route-prep.route-redesign .prep-handoff,
.route-prep.route-redesign .packet-card,
.route-prep.route-redesign .prep-doc-toolbar {
  background: transparent;
  border: none;
  box-shadow: none;
}

.route-prep.route-redesign .prep-rail {
  padding: 18px;
}

.route-prep.route-redesign .prep-doc-toolbar {
  display: none;
}

.route-prep.route-redesign .packet-nav-list {
  gap: 8px;
}

.route-prep.route-redesign .packet-nav-button,
.route-prep.route-redesign .packet-nav-item {
  background: rgba(235, 227, 212, 0.55);
  border: 1px solid var(--line);
}

.route-prep.route-redesign .packet-nav-button:hover,
.route-prep.route-redesign .packet-nav-item:hover {
  background: rgba(221, 208, 184, 0.7);
  border-color: var(--line-2);
}

.route-prep.route-redesign .packet-nav-button.is-active,
.route-prep.route-redesign .packet-nav-item.is-active {
  background: var(--moss-wash);
  border-color: var(--moss-soft);
  color: var(--moss-2);
}

/* Uploaded forms injected into category sidebars */
.route-prep.route-redesign .uploaded-form-nav {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-top: 4px;
}

.route-prep.route-redesign .script-version-group {
  display: grid;
  gap: 0.35rem;
}

.route-prep.route-redesign .script-version-root {
  grid-template-columns: 1fr;
}

.route-prep.route-redesign .script-version-list {
  display: grid;
  gap: 0.3rem;
  padding-left: 0.65rem;
  border-left: 1.5px solid var(--line);
  margin-left: 0.55rem;
}

.route-prep.route-redesign .script-version-button {
  display: block;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(32, 34, 52, 0.16);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(248, 244, 236, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

.route-prep.route-redesign .script-version-button:hover,
.route-prep.route-redesign .script-version-button.is-active {
  border-color: var(--prep-box-border, #202234);
  background: var(--prep-box-bg, rgba(248, 244, 236, 0.8));
}

.route-prep.route-redesign .script-version-empty {
  margin: 0;
  padding: 0.35rem 0.1rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

/* Script token spans inside form prompts */
.script-token {
  font-style: italic;
  border-radius: 3px;
  padding: 0 3px;
}
.script-token.is-filled {
  background: rgba(93, 211, 176, 0.18);
  color: var(--moss-2, #2a7a5a);
}
.script-token.is-empty {
  background: rgba(32, 34, 52, 0.06);
  color: var(--ink-3, #888);
}

html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-list-item,
html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-list-delete,
html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-draft-item,
html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-field-row,
html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-draft-pane,
html[data-theme="dark"] .route-prep.route-redesign .uploaded-pdf-viewfinder,
html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-empty,
html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-dropzone {
  background: rgba(23, 26, 43, 0.88) !important;
  border-color: rgba(232, 223, 209, 0.22) !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-list-item small,
html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-field-placement,
html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-token-instructions,
html[data-theme="dark"] .route-prep.route-redesign .uploaded-pdf-zoom-label,
html[data-theme="dark"] .route-prep.route-redesign #uploadedPdfStatus,
html[data-theme="dark"] .route-prep.route-redesign #uploadedFormDraftStatus,
html[data-theme="dark"] .route-prep.route-redesign #uploadedFormSaveStatus {
  color: var(--ink-2) !important;
}

html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-list-row:hover .uploaded-form-list-item,
html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-list-row.is-active .uploaded-form-list-item {
  background: rgba(30, 34, 54, 0.94) !important;
  border-color: rgba(210, 173, 135, 0.52) !important;
}

html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-list-delete:hover {
  background: rgba(210, 173, 135, 0.18) !important;
  border-color: rgba(210, 173, 135, 0.52) !important;
}

html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-draft-item input,
html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-draft-item textarea,
html[data-theme="dark"] .route-prep.route-redesign .uploaded-form-draft-item select,
html[data-theme="dark"] .route-prep.route-redesign #uploadedFormLabel,
html[data-theme="dark"] .route-prep.route-redesign #uploadedFormCategory {
  background: rgba(14, 17, 31, 0.92) !important;
  border-color: rgba(232, 223, 209, 0.28) !important;
  color: var(--ink) !important;
}

/* Push to packet button — primary style in save row */
#uploadedFormPushToPacket {
  background: var(--moss-wash, #e8f5ef);
  border-color: var(--moss-soft, #a8d8be);
  color: var(--moss-2, #2a7a5a);
  font-weight: 600;
}
#uploadedFormPushToPacket:hover {
  background: var(--moss-soft, #a8d8be);
}

/* Rail box — named card inside the prep rail */
.route-prep.route-redesign .prep-rail .rail-box,
.route-portal.route-redesign .prep-rail .rail-box {
  margin-top: 0.75rem;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(235, 227, 212, 0.3);
}

.route-prep.route-redesign .prep-rail .rail-box-label,
.route-portal.route-redesign .prep-rail .rail-box-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.5rem;
}

/* Standard Template + Future Templates rail — compact action controls */
.route-prep.route-redesign .prep-rail .action-stack {
  gap: 0.5rem;
  margin-top: 0;
}

.route-prep.route-redesign .prep-rail .action-stack label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-2);
  gap: 0.25rem;
}

.route-prep.route-redesign .prep-rail .action-stack input {
  padding: 0.45rem 0.6rem;
  font-size: 0.82rem;
}

.route-prep.route-redesign .prep-rail .action-stack .button-link {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  background: rgba(235, 227, 212, 0.55) !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  color: var(--ink) !important;
}

.route-prep.route-redesign .prep-rail .action-stack .button-link:hover {
  background: rgba(221, 208, 184, 0.7) !important;
  border-color: var(--line-2) !important;
}

.route-prep.route-redesign .prep-document-shell {
  display: grid;
  gap: 14px;
}

.route-prep.route-redesign .prep-document {
  padding: 18px;
}

.route-prep.route-redesign .packet-sheet-head {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.route-prep.route-redesign .packet-sheet-head h3,
.route-prep.route-redesign .packet-subsection .compact-head h3,
.route-prep.route-redesign .packet-subsection > h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 1.25vw + 1.2rem, 2.25rem);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--ink);
}

.route-prep.route-redesign .packet-sheet-head .document-title,
.route-prep.route-redesign .prep-document-shell .document-title {
  font-size: clamp(1.95rem, 1.35vw + 1.25rem, 2.4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.route-prep.route-redesign .packet-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  align-items: center;
}

.route-prep.route-redesign .packet-sheet-actions .button-link.compact {
  white-space: nowrap;
}

.route-prep.route-redesign .packet-sheet-actions [aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.route-prep.route-redesign .reprocessing-rail-foot [aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.route-prep.route-redesign .portal-access-toggle {
  display: inline-flex;
  align-items: center;
  position: relative;
  min-width: min(100%, 256px);
  max-width: 100%;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
}

.route-prep.route-redesign .portal-access-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.route-prep.route-redesign .portal-access-toggle-track {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  width: 100%;
  min-height: 34px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-2);
  overflow: hidden;
}

.route-prep.route-redesign .portal-access-toggle-track::before {
  content: "";
  position: absolute;
  inset: 3px calc(45.1% + 1px) 3px 3px;
  border-radius: 6px;
  background: var(--ink);
  transition: inset 0.16s ease;
}

.route-prep.route-redesign .portal-access-toggle input:not(:checked) + .portal-access-toggle-track::before {
  inset: 3px 3px 3px calc(54.9% + 1px);
}

.route-prep.route-redesign .portal-access-toggle-track span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0.35rem 0.45rem;
  color: var(--muted);
  line-height: 1.1;
  text-align: center;
  white-space: normal;
}

.route-prep.route-redesign .portal-access-toggle input:checked + .portal-access-toggle-track span:first-child,
.route-prep.route-redesign .portal-access-toggle input:not(:checked) + .portal-access-toggle-track span:last-child {
  color: var(--paper);
}

.route-prep.route-redesign .portal-access-toggle:focus-within .portal-access-toggle-track {
  outline: 2px solid rgba(31, 74, 93, 0.36);
  outline-offset: 2px;
}

.route-prep.route-redesign .script-version-root .portal-access-toggle {
  margin-left: auto;
}

.route-prep.route-redesign .packet-subsection {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.route-prep.route-redesign .packet-table-stack,
.route-prep.route-redesign .rdi-resource-stack,
.route-prep.route-redesign .exercise-script-list,
.route-prep.route-redesign .prompt-list,
.route-prep.route-redesign .readiness-sheet {
  display: grid;
  gap: 10px;
}

.route-prep.route-redesign .exercise-script-step {
  background: rgba(235, 227, 212, 0.5);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.route-prep.route-redesign .packet-subsection {
  background: rgba(235, 227, 212, 0.5);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
  margin-top: 0;
  border-top: none;
}

.route-prep.route-redesign .rdi-resource-card {
  background: rgba(235, 227, 212, 0.5);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
}

.route-prep.route-redesign .form-callout {
  background: var(--amber-wash);
  border-left: 3px solid var(--ember);
  border-radius: 0 9px 9px 0;
  padding: 12px 14px;
}

.route-portal.route-redesign .prep-packet-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  padding: 24px 28px 36px;
}

.route-portal.route-redesign .prep-packet-layout.is-focused-section {
  grid-template-columns: minmax(0, 880px);
  justify-content: center;
}

.route-portal.route-redesign .prep-packet-layout.is-focused-section .prep-document-shell {
  min-height: auto;
}

.route-portal.route-redesign .prep-rail,
.route-portal.route-redesign .prep-handoff {
  position: sticky;
  top: 72px;
  align-self: start;
}

.route-portal.route-redesign .prep-rail {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: none;
  overflow: visible;
}

.route-portal.route-redesign .portal-unshared-rail-notice {
  margin: 0.65rem 0 0.85rem;
  max-width: 18rem;
  color: var(--ink-3);
}

.route-portal.route-redesign .prep-handoff {
  display: grid;
  gap: 16px;
  position: static;
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
  padding-right: 0;
}

.route-portal.route-redesign .portal-side-card {
  padding: 16px;
}

.route-portal.route-redesign .portal-unlinked-state {
  margin-bottom: 14px;
}

.route-portal.route-redesign #portalJournalField {
  min-height: 150px;
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.5;
}

.route-portal.route-redesign .client-session-only.topnav {
  margin-left: 12px;
}

/* ─────────────────────────────────────────────────────────────
   Utilities page — portal + BLS access management
   ───────────────────────────────────────────────────────────── */
.route-utilities.route-redesign main {
  display: flex;
  justify-content: center;
  padding: 32px 20px 40px;
  background: transparent;
  overflow: auto;
  min-height: calc(100vh - 75px);
}

.route-utilities.route-redesign .utilities-layout {
  width: 100%;
  max-width: 1100px;
}

.route-utilities.route-redesign .utilities-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.route-utilities.route-redesign .utilities-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1.5px solid rgba(32, 34, 52, 0.22);
}

.route-utilities.route-redesign .utilities-header h1 {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: var(--type-h1);
  font-weight: 600;
  letter-spacing: -0.3px;
}

.route-utilities.route-redesign .utilities-header .support-copy {
  margin-top: 4px;
}

.route-utilities.route-redesign .utilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
}

.route-utilities.route-redesign .utility-card {
  padding: 20px;
}

.route-utilities.route-redesign .utility-card.full-span {
  grid-column: 1 / -1;
}

.route-utilities.route-redesign .utility-card .storage-card {
  background: rgba(240, 233, 221, 0.48);
  border: 1px solid rgba(32, 34, 52, 0.14);
  box-shadow: none;
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
}

.route-utilities.route-redesign .portal-provision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.route-utilities.route-redesign .portal-provision-grid .field-label.full-span {
  grid-column: 1 / -1;
}

.route-utilities.route-redesign .checkbox-field {
  align-content: end;
}

.route-utilities.route-redesign .checkbox-field input {
  width: 18px;
  height: 18px;
}

.route-utilities.route-redesign .portal-empty-card {
  padding: 18px;
}

.route-utilities.route-redesign .portal-empty-card strong {
  display: block;
  margin-bottom: 4px;
}

.route-utilities.route-redesign .portal-system-list {
  margin-top: 16px;
}

.route-utilities.route-redesign .mini-chip {
  align-self: start;
}

@media (max-width: 1200px) {
  .route-ehr.route-redesign .ehr-redesign-layout,
  .route-prep.route-redesign .prep-packet-layout,
  .route-portal.route-redesign .prep-packet-layout {
    grid-template-columns: 1fr;
  }

  .route-prep.route-redesign .prep-rail,
  .route-prep.route-redesign .prep-handoff,
  .route-portal.route-redesign .prep-rail,
  .route-portal.route-redesign .prep-handoff {
    position: static;
  }
}

/* Override responsive rules that used to add dock-padding to the shell.
   Docks are now pure overlays — no shell padding needed at any breakpoint. */
@media (max-width: 1340px) {
  .route-control .app-shell {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  .route-control .client-stage,
  .route-control .control-panel {
    grid-column: unset;
    grid-row: unset;
    position: static;
  }
}

@media (max-width: 1080px) {
  .route-control .app-shell {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  .route-control .client-stage,
  .route-control .control-panel {
    grid-column: unset;
    grid-row: unset;
    position: static;
  }
}

/* BLS Workspace: flexbox row, columns in order */
.route-control.route-redesign .workspace.control-workspace.bls-design-workspace {
  display: flex !important;
  flex-direction: row;
  --bls-col-phase: 200px;
  --bls-col-script: 560px;
  --bls-col-nv: 760px;
  --bls-col-dock: 320px;
  --bls-min-phase: 140px;
  --bls-min-script: 200px;
  --bls-min-nv: 280px;
  --bls-min-dock: 280px;
  --bls-panel-height: max(1173px, calc(100dvh - 104px));
  --bls-panel-overhang: 240px;
  gap: 0;
  padding: 0;
  padding-top: 16px;
  width: 100%;
  max-width: none !important;
  margin: 0;
  border-top: 1px solid var(--line);
  align-items: flex-start;
}

.route-control.route-redesign .bls-phase-rail {
  flex: 0 1 var(--bls-col-phase);
  width: var(--bls-col-phase);
  min-width: var(--bls-min-phase);
  max-width: 100%;
  height: var(--bls-panel-height);
  max-height: var(--bls-panel-height);
  overflow-x: hidden;
  overflow-y: auto;
}

.route-control.route-redesign .bls-script-column {
  flex: 0 1 var(--bls-col-script);
  width: var(--bls-col-script);
  min-width: var(--bls-min-script);
  max-width: 100%;
  height: calc(var(--bls-panel-height) + var(--bls-panel-overhang, 0px));
  max-height: calc(var(--bls-panel-height) + var(--bls-panel-overhang, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  box-sizing: border-box;
  padding-right: 18px;
  margin-right: clamp(14px, 2.2vw, 40px);
}

.route-control.route-redesign #blsNvCenter {
  flex: 0 1 var(--bls-col-nv);
  width: var(--bls-col-nv);
  min-width: var(--bls-min-nv);
  max-width: 100%;
  height: calc(var(--bls-panel-height) + var(--bls-panel-overhang, 0px));
  max-height: calc(var(--bls-panel-height) + var(--bls-panel-overhang, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  margin-left: auto;
  box-sizing: border-box;
  padding-left: 18px;
}

.route-control.route-redesign .bls-dock {
  flex: 0 0 var(--bls-col-dock);
  width: var(--bls-col-dock);
  min-width: var(--bls-min-dock);
  min-height: var(--bls-panel-height);
  overflow: visible;
}

.route-control.route-redesign .bls-column-resizer {
  flex: 0 0 18px;
  width: 18px;
  height: var(--bls-panel-height);
}

.route-control.route-redesign .bls-column-resizer {
  position: relative;
  cursor: col-resize;
  background: rgba(174, 151, 115, 0.18);
  flex-shrink: 0;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
  pointer-events: auto;
}

.route-control.route-redesign .bls-column-resizer:hover {
  background: rgba(174, 151, 115, 0.32);
}

.route-control.route-redesign .bls-column-resizer::before {
  content: "⋮";
  position: relative;
  font-size: 1.4rem;
  color: rgba(174, 151, 115, 0.5);
  font-weight: 300;
  letter-spacing: 0.15em;
  line-height: 1;
  user-select: none;
  transition: color 0.15s ease;
  pointer-events: none;
}

.route-control.route-redesign .bls-column-resizer:hover::before {
  color: rgba(174, 151, 115, 0.8);
}

/* Dedicated script right-edge handle anchored to the script panel. */
.route-control.route-redesign #blsScriptColumn > .bls-column-resizer-script {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 100%;
  flex: none;
  z-index: 6;
}

.route-control.route-redesign #blsScriptColumn.is-collapsed > .bls-column-resizer-script {
  display: none;
}

/* Dedicated NV left-edge handle anchored to the NV panel. */
.route-control.route-redesign #blsNvCenter > .bls-column-resizer-nv {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 100%;
  flex: none;
  z-index: 6;
}

.route-control.route-redesign #blsNvCenter.is-collapsed > .bls-column-resizer-nv {
  display: none;
}

body.is-resizing-columns .bls-column-resizer {
  background: rgba(174, 151, 115, 0.4);
}

body.is-resizing-columns .bls-column-resizer::before {
  color: rgba(174, 151, 115, 1);
}

/* Keep drag motion direct (no easing lag) while column handles are active. */
body.is-resizing-columns .route-control.route-redesign #blsPhaseRail,
body.is-resizing-columns .route-control.route-redesign #blsScriptColumn,
body.is-resizing-columns .route-control.route-redesign #blsNvCenter {
  transition: none !important;
}

.route-control.route-redesign .bls-phase-rail {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 0.65rem;
  background: var(--paper);
  border-right: 1px solid var(--line);
  min-width: 0;
}

.route-control.route-redesign .bls-phase-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.15rem 0.35rem 0.8rem;
  border-bottom: 1px dotted var(--line-2);
}

.route-control.route-redesign .bls-phase-mark {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--ember);
  color: #fff;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
}

.route-control.route-redesign .bls-phase-brand-title {
  font-family: var(--font-serif);
  font-size: 0.84rem;
  font-weight: 600;
}

.route-control.route-redesign .bls-phase-brand-meta,
.route-control.route-redesign .bls-phase-label {
  padding: 0.34rem 0.8rem 0.6rem;
  display: flex;
  align-items: start;
  gap: 0.55rem;
  border-bottom: 1px solid var(--line);
  transition: all 200ms ease;
}

.route-control.route-redesign .bls-phase-label-main {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.14rem;
  flex: 1;
  min-width: 0;
}

.route-control.route-redesign .client-presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-left: auto;
  transition: background-color 400ms ease, box-shadow 400ms ease;
}

.route-control.route-redesign .client-presence-dot--online {
  background-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.route-control.route-redesign .client-presence-dot--offline {
  background-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.route-control.route-redesign .bls-collapse-toggle {
  background: rgba(248, 244, 236, 0.18);
  border: 1px solid rgba(232, 223, 209, 0.34);
  cursor: pointer;
  padding: 0;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  line-height: 1;
  color: var(--ink-3);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(32, 34, 52, 0.08);
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.route-control.route-redesign .bls-collapse-toggle:hover {
  color: var(--ink);
  background: rgba(248, 244, 236, 0.3);
  border-color: rgba(232, 223, 209, 0.52);
  box-shadow: inset 0 0 0 1px rgba(32, 34, 52, 0.14);
}

.route-control.route-redesign .bls-collapse-toggle:focus-visible {
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(32, 34, 52, 0.14),
    0 0 0 2px rgba(151, 129, 101, 0.3);
}

.route-control.route-redesign .bls-collapse-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 200ms ease;
}

.route-control.route-redesign .bls-nv-toggle .bls-collapse-toggle-icon,
.route-control.route-redesign .bls-dock-toggle .bls-collapse-toggle-icon {
  transform: rotate(180deg);
}

.route-control.route-redesign .bls-phase-toggle {
  margin-left: auto;
}

.route-control.route-redesign #blsPhaseRail {
  transition: all 200ms ease;
}

.route-control.route-redesign #blsPhaseRail.is-collapsed {
  width: 45px !important;
  min-width: 45px !important;
  max-width: 45px !important;
  flex: 0 0 45px !important;
  padding: 0.5rem 0.2rem;
}

.route-control.route-redesign #blsPhaseRail.is-collapsed .bls-phase-label {
  justify-content: center;
  padding: 0.4rem 0.1rem;
}

.route-control.route-redesign #blsPhaseRail.is-collapsed .bls-phase-label > span,
.route-control.route-redesign #blsPhaseRail.is-collapsed .bls-phase-label-main {
  display: none;
}

.route-control.route-redesign #blsPhaseRail.is-collapsed .bls-phase-toggle {
  margin-left: 0;
}

.route-control.route-redesign #blsPhaseRail.is-collapsed .bls-collapse-toggle-icon {
  transform: rotate(180deg);
}

.route-control.route-redesign #blsPhaseRail.is-collapsed .bls-category-list,
.route-control.route-redesign #blsPhaseRail.is-collapsed .bls-target-card,
.route-control.route-redesign #blsPhaseRail.is-collapsed .bls-phase-footnote {
  display: none;
}

/* Script column collapse toggle — collapses LEFT against phase rail */
.route-control.route-redesign .bls-script-toggle {
  margin-left: auto;
}

.route-control.route-redesign #blsScriptColumn {
  transition: all 200ms ease;
}

.route-control.route-redesign #blsScriptColumn.is-collapsed {
  width: 45px !important;
  min-width: 45px !important;
  max-width: 45px !important;
  flex: 0 0 45px !important;
  padding: 0.5rem 0.2rem;
}

.route-control.route-redesign #blsScriptColumn.is-collapsed .bls-script-head {
  display: flex;
  min-height: 48px;
  padding: 0.4rem 0.1rem;
  justify-content: center;
  align-items: center;
  background: transparent;
  border-bottom: none;
}

.route-control.route-redesign #blsScriptColumn.is-collapsed .bls-script-label,
.route-control.route-redesign #blsScriptColumn.is-collapsed .bls-script-title {
  display: none;
}

.route-control.route-redesign #blsScriptColumn.is-collapsed .bls-collapse-toggle-icon {
  transform: rotate(180deg);
}

.route-control.route-redesign #blsScriptColumn.is-collapsed .bls-script-toggle,
.route-control.route-redesign #blsNvCenter.is-collapsed .bls-nv-toggle {
  margin: 0;
}

.route-control.route-redesign #blsScriptColumn.is-collapsed .bls-script-body,
.route-control.route-redesign #blsScriptColumn.is-collapsed .bls-guide-panel {
  display: none;
}

/* NV center collapse toggle — collapses RIGHT against dock */
.route-control.route-redesign .bls-nv-toggle {
  margin-left: auto;
}

.route-control.route-redesign #blsNvCenter {
  transition: all 200ms ease;
}

.route-control.route-redesign #blsNvCenter.is-collapsed {
  flex: 0 0 45px !important;
  width: 45px !important;
  min-width: 45px !important;
  max-width: 45px !important;
  padding: 0.5rem 0.2rem;
  overflow: hidden;
}

.route-control.route-redesign #blsNvCenter.is-collapsed .bls-nv-head {
  display: flex;
  min-height: 48px;
  padding: 0.4rem 0.1rem;
  justify-content: center;
  align-items: center;
  background: transparent;
  border-bottom: none;
}

.route-control.route-redesign #blsNvCenter.is-collapsed .bls-nv-head-actions {
  display: flex;
  justify-content: center;
  margin: 0;
}

.route-control.route-redesign #blsNvCenter.is-collapsed .bls-nv-head > div,
.route-control.route-redesign #blsNvCenter.is-collapsed .bls-nv-head-actions > :not(.bls-nv-toggle) {
  display: none;
}

.route-control.route-redesign #blsNvCenter.is-collapsed .bls-collapse-toggle-icon {
  transform: rotate(0deg);
}

.route-control.route-redesign #blsNvCenter.is-collapsed .bls-nv-control-bar,
.route-control.route-redesign #blsNvCenter.is-collapsed .bls-nv-ledger,
.route-control.route-redesign #blsNvCenter.is-collapsed .bls-nv-foot,
.route-control.route-redesign #blsNvCenter.is-collapsed .bls-nv-source-bar,
.route-control.route-redesign #blsNvCenter.is-collapsed .bls-nv-action-bar,
.route-control.route-redesign #blsNvCenter.is-collapsed .bls-dictation-status,
.route-control.route-redesign #blsNvCenter.is-collapsed .bls-speech-picker {
  display: none;
}

.route-control.route-redesign .bls-phase-list {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.route-control.route-redesign .bls-phase-button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.5rem;
  border: none;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
}

.route-control.route-redesign .bls-phase-button:hover {
  background: rgba(0, 0, 0, 0.03);
}

.route-control.route-redesign .bls-phase-button.is-active {
  background: var(--moss-wash);
  color: var(--moss-2);
}

.route-control.route-redesign .bls-phase-number {
  width: 0.9rem;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-style: italic;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

/* Category Selector Styling */
.route-control.route-redesign .bls-category-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.route-control.route-redesign .bls-category-group {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line-2);
}

.route-control.route-redesign .bls-category-button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.5rem 0.5rem;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink-2);
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.route-control.route-redesign .bls-category-button:hover {
  background: rgba(0, 0, 0, 0.03);
}

.route-control.route-redesign .bls-category-chevron {
  display: inline-block;
  font-size: 0.6rem;
  transition: transform 0.2s ease;
  width: 0.6rem;
  height: 0.6rem;
}

.route-control.route-redesign .bls-category-button:not(.is-expanded) .bls-category-chevron {
  transform: rotate(-90deg);
}

.route-control.route-redesign .bls-category-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  max-height: 500px;
  transition: max-height 0.2s ease;
}

.route-control.route-redesign .bls-category-button:not(.is-expanded) ~ .bls-category-items {
  max-height: 0;
  overflow: hidden;
}

.route-control.route-redesign .bls-script-item {
  display: block;
  width: 100%;
  padding: 0.35rem 0.5rem 0.35rem 1.6rem;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink-3);
  text-align: left;
  font-size: 0.82rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  transition: background-color 0.15s ease;
}

.route-control.route-redesign .bls-script-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.route-control.route-redesign .bls-script-item.is-active {
  background: var(--moss-wash);
  color: var(--moss-2);
  font-weight: 600;
}

.route-control.route-redesign .bls-template-group {
  display: flex;
  flex-direction: column;
}

.route-control.route-redesign .bls-template-type {
  font-weight: 600;
  color: var(--ink-2);
}

.route-control.route-redesign .bls-template-type.is-current {
  background: var(--moss-wash);
  color: var(--moss-2);
  font-weight: 700;
}

.route-control.route-redesign .bls-version-list {
  display: flex;
  flex-direction: column;
}

.route-control.route-redesign .bls-version-item {
  padding-left: 2.4rem !important;
  font-size: 0.7rem !important;
  color: var(--ink-3);
}

.route-control.route-redesign .bls-version-item::before {
  content: "↳ ";
  opacity: 0.4;
  font-size: 0.65rem;
}

.route-control.route-redesign .bls-version-item.is-current {
  background: var(--moss-wash);
  color: var(--moss-2);
  font-weight: 600;
}

.route-control.route-redesign .bls-reprocessing-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.45rem 0.5rem 0.6rem 1.6rem;
}

.route-control.route-redesign .bls-script-action {
  min-height: 1.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink-3);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 600;
}

.route-control.route-redesign .bls-script-action:hover:not(:disabled) {
  background: var(--paper-2);
  color: var(--ink);
}

.uploaded-pdf-version-title {
  margin-bottom: 1rem;
}

.route-control.route-redesign .bls-script-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

/* Prep Script Display Styling */
.bls-prep-script-content {
  padding: 0.3rem 0.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  min-width: 0;
}

.bls-prep-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.bls-prep-form > * {
  width: 100%;
}

.bls-prep-form textarea,
.bls-prep-form input {
  width: 100% !important;
  box-sizing: border-box;
}

.bls-prep-script-content input,
.bls-prep-script-content textarea {
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  margin-top: 0.2rem !important;
  padding: 0.6rem 0.7rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.bls-prep-script-content .exercise-script-copy {
  line-height: 1.35;
  margin: 0 !important;
}

.bls-prep-script-content p,
.bls-prep-script-content h1,
.bls-prep-script-content h2,
.bls-prep-script-content h3,
.bls-prep-script-content h4 {
  margin: 0 !important;
}

.bls-protocol-event-title {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.bls-event-title-input {
  font-size: 1rem;
  font-weight: 600;
  border: none;
  background: transparent;
  outline: none;
  padding: 0 !important;
  margin: 0 !important;
  color: var(--ink);
}

.bls-event-title-input::placeholder {
  font-weight: 400;
  color: var(--ink-3);
}

.route-control.route-redesign .bls-target-card {
  display: none !important;
}

.route-control.route-redesign .bls-target-card::after {
  display: none !important;
}

.route-control.route-redesign .bls-target-card-label {
  display: none !important;
}

.route-control.route-redesign .bls-target-card-value {
  display: none !important;
}

.route-control.route-redesign .bls-phase-footnote {
  display: none !important;
}

.route-control.route-redesign .bls-script-column {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-right: 1px solid var(--line);
  min-width: 0;
}

.route-control.route-redesign .bls-script-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: start;
  padding: 0.45rem 0.8rem 0.6rem;
  border-bottom: 1px solid var(--line);
}

.route-control.route-redesign .bls-script-head-main {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.14rem;
  min-width: 0;
}

.route-control.route-redesign .bls-script-header-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.route-control.route-redesign .bls-script-header-actions[hidden],
.route-control.route-redesign #blsScriptColumn.is-collapsed .bls-script-header-actions {
  display: none !important;
}

.route-control.route-redesign .bls-script-label,
.route-control.route-redesign .bls-script-section-label,
.route-control.route-redesign .bls-nv-label,
.route-control.route-redesign .bls-dock-label,
.route-control.route-redesign .bls-control-label {
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}

.route-control.route-redesign .bls-script-title,
.route-control.route-redesign .bls-nv-title,
.route-control.route-redesign .bls-dock-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.route-control.route-redesign .bls-script-hint-card {
  margin-top: 0.5rem;
  padding: 0.4rem 0.55rem;
  border-left: 3px solid var(--ember);
  border-radius: 0.45rem;
  background: var(--amber-wash);
}

.route-control.route-redesign .bls-script-hint-card p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--ink-2);
  line-height: 1.45;
}

.route-control.route-redesign .bls-script-body {
  flex: 1;
  padding: 1.2rem 0.2rem 1.2rem;
  width: 100%;
  min-width: 0;
}

.route-control.route-redesign .bls-guide-panel {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0.8rem 1rem;
  background: linear-gradient(180deg, rgba(255, 251, 245, 0.92) 0%, rgba(250, 243, 233, 0.98) 100%);
}

.route-control.route-redesign .bls-guide-head {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.route-control.route-redesign .bls-guide-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-1);
}

.route-control.route-redesign .bls-guide-summary {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.78rem;
  line-height: 1.45;
}

.route-control.route-redesign .bls-guide-empty {
  padding: 0.8rem 0.9rem;
  border: 1px dashed var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink-2);
  font-size: 0.82rem;
}

.route-control.route-redesign .bls-guide-list {
  display: grid;
  gap: 0.7rem;
}

.route-control.route-redesign .bls-script-card {
  display: none;
}

.route-control.route-redesign .bls-script-card.is-active {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.route-control.route-redesign .bls-script-prompt-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.route-control.route-redesign .bls-script-prompt {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #fff;
}

.route-control.route-redesign .bls-script-prompt span {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.76rem;
  color: var(--moss-2);
}

.route-control.route-redesign .bls-script-prompt p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.87rem;
  line-height: 1.45;
}

.route-control.route-redesign .bls-script-check-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.route-control.route-redesign .bls-script-check-list label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.24rem 0.1rem;
}

.route-control.route-redesign .bls-script-check {
  width: 15px;
  height: 15px;
  border-radius: 3.5px;
  border: 1.5px solid var(--line-2);
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  color: #fff;
}

.route-control.route-redesign .bls-script-check.is-done {
  background: var(--moss);
  border-color: var(--moss);
}

.route-control.route-redesign .bls-script-check-list label span:last-child {
  font-size: 0.8rem;
}

.route-control.route-redesign .bls-nv-center {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-top: 2.5px solid var(--moss);
  border-radius: 18px;
  box-shadow: 5px 6px 0 var(--paper-3);
  overflow: auto;
}

html[data-theme="dark"] .route-control.route-redesign .bls-nv-center {
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.45);
}

.route-control.route-redesign .bls-nv-head {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 0.32rem 0.72rem 0.42rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  min-height: 1.85rem;
}

.route-control.route-redesign .bls-nv-head-main {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.08rem;
  flex: 1;
  min-width: 0;
  margin-left: 2rem;
}

.route-control.route-redesign .bls-nv-head .bls-nv-title {
  font-size: 1.06rem;
  line-height: 1.05;
}

.route-control.route-redesign .bls-nv-toggle {
  margin-left: 0;
  position: absolute;
  left: 0.72rem;
  top: 0.32rem;
}


.route-control.route-redesign .bls-nv-source-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.48rem;
  padding: 0.28rem 0.72rem;
  border-bottom: 1px solid var(--line-2);
  min-width: 0;
}

.route-control.route-redesign .bls-nv-action-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.32rem 0.72rem;
  border-bottom: 1px solid var(--line-2);
  min-width: 0;
}

.route-control.route-redesign .bls-dictation-source {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  color: var(--ink-3);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-control.route-redesign .bls-dictation-source select {
  width: auto !important;
  margin-top: 0 !important;
  min-height: 30px;
  max-width: min(190px, 100%);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.route-control.route-redesign .bls-dictation-status {
  min-height: 0.85rem;
  margin: 0;
  padding: 0.2rem 0.75rem 0;
  color: var(--ink-3);
  font-size: 0.72rem;
  font-weight: 600;
}

.route-control.route-redesign .bls-dictation-status[data-tone="error"] {
  color: #8a3428;
}

.route-control.route-redesign .bls-speech-picker {
  margin: 0.35rem 0.72rem 0.42rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-soft);
  overflow: hidden;
}

.route-control.route-redesign .bls-speech-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.34rem 0.5rem;
  border-bottom: 1px solid var(--line);
  min-width: 0;
  flex-wrap: wrap;
}

.route-control.route-redesign .bls-speech-picker-title {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
}

.route-control.route-redesign .bls-speech-picker-toggle {
  color: var(--ink-3);
}

.route-control.route-redesign .bls-speech-picker-toggle-icon {
  font-size: 0.78rem;
  line-height: 1;
  transition: transform 0.15s ease;
}

.route-control.route-redesign .bls-speech-picker .bls-speech-picker-toggle .bls-collapse-toggle-icon {
  transform: rotate(180deg);
}

.route-control.route-redesign .bls-speech-picker:not(.is-collapsed) .bls-speech-picker-toggle-icon {
  transform: rotate(270deg);
}

.route-control.route-redesign .bls-speech-picker.is-collapsed .bls-speech-picker-head {
  border-bottom: 0;
}

.route-control.route-redesign .bls-speech-picker.is-collapsed .bls-speech-ticker {
  display: none;
}

.route-control.route-redesign .bls-speech-picker-label {
  display: block;
  color: var(--ink-2);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.route-control.route-redesign .bls-speech-picker-status {
  display: block;
  margin-top: 0.1rem;
  color: var(--ink-4);
  font-size: 0.68rem;
  font-weight: 600;
}

.route-control.route-redesign .bls-speech-picker-popout {
  flex: 0 1 auto;
  min-height: 30px;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.route-control.route-redesign .bls-speech-ticker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 0.42rem;
  padding: 0.48rem;
  overflow: visible;
}

.route-control.route-redesign .bls-speech-empty {
  color: var(--ink-4);
  font-size: 0.76rem;
  font-style: italic;
  padding: 0.2rem 0.1rem;
}

.route-control.route-redesign .bls-voice-enroll {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: auto;
  min-width: 0;
}

.route-control.route-redesign .bls-voice-enroll-status {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-3);
}

.route-control.route-redesign .bls-voice-enroll-status[data-tone="ok"] {
  color: var(--accent-teal, #0f766e);
}

.route-control.route-redesign .bls-voice-enroll-status[data-tone="error"] {
  color: var(--danger, #b91c1c);
}

.route-control.route-redesign .bls-speech-omitted,
.route-control.route-redesign .nv-transcript-omitted {
  margin-top: 0.4rem;
  padding: 0.34rem 0.5rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--paper-2, rgba(0, 0, 0, 0.03));
  color: var(--ink-4);
  font-size: 0.72rem;
  font-style: italic;
}

.route-control.route-redesign .nv-transcript-omitted-label {
  display: block;
  font-style: normal;
  font-weight: 800;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.18rem;
}

.route-control.route-redesign .nv-transcript-turn.is-omitted {
  opacity: 0.6;
}

.route-control.route-redesign .bls-speech-lane {
  flex: 1 0 210px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--paper-3);
}

.route-control.route-redesign .bls-speech-lane.is-client {
  border-color: rgba(15, 118, 110, 0.34);
}

.route-control.route-redesign .bls-speech-lane.is-therapist {
  border-color: rgba(124, 58, 237, 0.3);
}

.route-control.route-redesign .bls-speech-lane-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.42rem 0.5rem 0.34rem;
}

.route-control.route-redesign .bls-speech-speaker {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-2);
  font-size: 0.72rem;
  font-weight: 800;
}

.route-control.route-redesign .bls-speech-role,
.route-control.route-redesign .bls-speech-role-button {
  flex: 0 0 auto;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.route-control.route-redesign .bls-speech-role {
  padding: 0.18rem 0.45rem;
}

.route-control.route-redesign .bls-speech-role.is-client {
  background: rgba(15, 118, 110, 0.12);
  color: #0f5d58;
}

.route-control.route-redesign .bls-speech-role.is-therapist {
  background: rgba(124, 58, 237, 0.1);
  color: #5b21b6;
}

.route-control.route-redesign .bls-speech-role-button {
  min-height: 24px;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--line-2);
  background: var(--paper-soft);
  color: var(--ink-2);
  cursor: pointer;
}

.route-control.route-redesign .bls-speech-snippet {
  display: block;
  width: 100%;
  padding: 0.45rem 0.5rem 0.5rem;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-serif);
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.route-control.route-redesign .nv-transcript-backdrop {
  position: fixed;
  inset: 0;
  z-index: 115;
  background: rgba(20, 23, 35, 0.18);
}

.route-control.route-redesign .nv-transcript-backdrop[hidden] {
  display: none;
}

.route-control.route-redesign .nv-transcript-pane {
  --ink-1: #1f2437;
  --ink-2: #283046;
  --ink-3: #5c6274;
  --ink-4: #8a877d;
  --paper: #f7f3ea;
  --line: #c9bdad;
  --line-2: #d8cec0;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100vw - 2.5rem));
  height: calc(100vh - 2.5rem);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink-2);
  box-shadow: 0 18px 42px rgba(20, 23, 35, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.99);
  transition: opacity 180ms ease, transform 180ms ease;
}

.route-control.route-redesign .nv-transcript-pane.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.route-control.route-redesign .nv-transcript-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem 0.75rem;
  border-bottom: 1px solid var(--line);
  cursor: move;
}

.route-control.route-redesign .nv-transcript-eyebrow {
  color: var(--ink-4);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-control.route-redesign .nv-transcript-head h2 {
  margin: 0.1rem 0 0;
  color: var(--ink-1);
  font-size: 1.2rem;
  line-height: 1.1;
}

.route-control.route-redesign .nv-transcript-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.route-control.route-redesign .nv-transcript-review-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(320px, 1.08fr);
  background: var(--paper);
}

.route-control.route-redesign .nv-transcript-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 22px;
  height: 22px;
  cursor: nwse-resize;
}

.route-control.route-redesign .nv-transcript-resize-handle::before {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  border-bottom-right-radius: 2px;
}

.route-control.route-redesign .nv-review-column {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line-2);
}

.route-control.route-redesign .nv-review-column-nv {
  min-width: 280px;
}

.route-control.route-redesign .nv-review-column-transcript {
  min-width: 320px;
}

.route-control.route-redesign .nv-review-column:first-child {
  border-left: none;
}

.route-control.route-redesign .nv-review-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line-2);
  background: #fbfbf7;
}

.route-control.route-redesign .nv-review-kicker {
  display: block;
  color: var(--ink-4);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-control.route-redesign .nv-review-column-head h3 {
  margin: 0.08rem 0 0;
  color: var(--ink-1);
  font-size: 1rem;
  line-height: 1.1;
}

.route-control.route-redesign .nv-review-nv-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.75rem 0.85rem 1rem;
}

.route-control.route-redesign .nv-review-empty {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem;
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  color: var(--ink-3);
  background: #fffdfa;
  font-size: 0.82rem;
}

.route-control.route-redesign .nv-review-empty span {
  color: var(--ink-4);
  font-family: var(--font-serif);
}

.route-control.route-redesign .nv-review-row {
  border: 1px solid var(--line-2);
  border-left: 4px solid #6b7280;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition:
    margin 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.route-control.route-redesign .nv-review-row + .nv-review-row {
  margin-top: 0.55rem;
}

.route-control.route-redesign .nv-review-row.is-active {
  border-left-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.11);
}

.route-control.route-redesign .nv-review-row.is-transcript-linked {
  border-color: rgba(15, 118, 110, 0.44);
}

.route-control.route-redesign .nv-review-row.is-preview {
  opacity: 0.92;
}

.route-control.route-redesign .nv-review-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line-2);
  background: #fbfbf7;
}

.route-control.route-redesign .nv-review-row-head-main {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}

.route-control.route-redesign .nv-review-code-select {
  max-width: 92px;
  min-height: 30px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
}

.route-control.route-redesign .nv-review-code-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
}

.route-control.route-redesign .nv-review-row.is-dragging {
  opacity: 0.62;
}

.route-control.route-redesign .nv-review-row.is-drag-target {
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.22);
}

.route-control.route-redesign .nv-review-row.is-drag-gap-before {
  margin-top: 44px;
}

.route-control.route-redesign .nv-review-row.is-drag-gap-after {
  margin-bottom: 44px;
}

.route-control.route-redesign .nv-review-row.is-drag-gap-before,
.route-control.route-redesign .nv-review-row.is-drag-gap-after {
  position: relative;
  overflow: visible;
}

.route-control.route-redesign .nv-review-row.is-drag-gap-before::before,
.route-control.route-redesign .nv-review-row.is-drag-gap-after::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(115, 216, 207, 0.92), rgba(126, 141, 231, 0.95));
  box-shadow:
    0 0 0 2px rgba(115, 216, 207, 0.18),
    0 4px 14px rgba(49, 79, 169, 0.28);
  pointer-events: none;
  z-index: 5;
}

.route-control.route-redesign .nv-review-row.is-drag-gap-before::before {
  top: -24px;
}

.route-control.route-redesign .nv-review-row.is-drag-gap-after::after {
  bottom: -24px;
}

html[data-theme="dark"] .route-control.route-redesign .nv-review-row.is-drag-gap-before::before,
html[data-theme="dark"] .route-control.route-redesign .nv-review-row.is-drag-gap-after::after {
  background: linear-gradient(90deg, rgba(118, 236, 224, 0.98), rgba(160, 175, 255, 0.98));
  box-shadow:
    0 0 0 2px rgba(118, 236, 224, 0.22),
    0 6px 16px rgba(37, 52, 112, 0.52);
}

.route-control.route-redesign .nv-review-row-drag-image {
  opacity: 0.96;
  transform: rotate(-1deg);
  box-shadow:
    0 14px 34px rgba(24, 28, 48, 0.28),
    0 0 0 1px rgba(169, 158, 144, 0.42);
}

.route-control.route-redesign .nv-review-textarea {
  width: 100%;
  min-height: 4.2rem;
  resize: none;
  border: 0;
  background: #fff;
  color: var(--ink-2);
  font-family: var(--font-serif);
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 0.6rem 0.65rem 0.7rem;
}

.route-control.route-redesign .nv-review-preview-text {
  min-height: 4.2rem;
  padding: 0.6rem 0.65rem 0.7rem;
  background: #fff;
  color: var(--ink-2);
  font-family: var(--font-serif);
  font-size: 0.9rem;
  line-height: 1.4;
}

.route-control.route-redesign .nv-review-textarea:disabled,
.route-control.route-redesign .nv-review-code-select:disabled {
  opacity: 1;
  cursor: default;
}

.route-control.route-redesign .nv-review-textarea:disabled {
  background: #fff;
  color: var(--ink-2);
  -webkit-text-fill-color: var(--ink-2);
}

.route-control.route-redesign .nv-review-code-select:disabled {
  background: #fff;
  color: var(--ink-2);
}

.route-control.route-redesign .nv-review-textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  outline-offset: -2px;
}

.route-control.route-redesign .nv-transcript-speakers {
  padding: 0.75rem 1rem 0.65rem;
  border-bottom: 1px solid var(--line-2);
  background: #fbfbf7;
}

.route-control.route-redesign .nv-transcript-speaker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 0.55rem;
}

.route-control.route-redesign .nv-transcript-speaker {
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid var(--line-2);
  border-left: 4px solid #6b7280;
  border-radius: 8px;
  background: #fff;
}

.route-control.route-redesign .nv-transcript-speaker.is-client {
  border-left-color: #0f766e;
}

.route-control.route-redesign .nv-transcript-speaker.is-therapist {
  border-left-color: #7c3aed;
}

.route-control.route-redesign .nv-transcript-speaker-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.route-control.route-redesign .nv-transcript-speaker strong {
  color: var(--ink-2);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.route-control.route-redesign .nv-transcript-speaker p {
  margin: 0.4rem 0 0;
  color: var(--ink-3);
  font-family: var(--font-serif);
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.route-control.route-redesign .nv-transcript-role,
.route-control.route-redesign .nv-transcript-role-button {
  flex: 0 0 auto;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.route-control.route-redesign .nv-transcript-role {
  padding: 0.18rem 0.45rem;
}

.route-control.route-redesign .nv-transcript-role.is-client {
  background: rgba(15, 118, 110, 0.12);
  color: #0f5d58;
}

.route-control.route-redesign .nv-transcript-role.is-therapist {
  background: rgba(124, 58, 237, 0.1);
  color: #5b21b6;
}

.route-control.route-redesign .nv-transcript-role-button,
.route-control.route-redesign .nv-transcript-soft-button {
  min-height: 26px;
  max-width: 100%;
  padding: 0.18rem 0.5rem;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 999px;
  background: #f2fbf8;
  color: #0f5d58;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
  cursor: pointer;
}

.route-control.route-redesign .nv-transcript-soft-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.route-control.route-redesign .nv-transcript-speaker-actions {
  margin-top: 0.55rem;
}

.route-control.route-redesign .nv-transcript-linkbar {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-4);
  font-size: 0.72rem;
  font-weight: 700;
}

.route-control.route-redesign .nv-transcript-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--line-2);
  background: #f2fbf8;
  color: #0f5d58;
  font-size: 0.72rem;
  font-weight: 800;
}

.route-control.route-redesign .nv-transcript-selection-bar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-control.route-redesign .nv-transcript-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.75rem 1rem 1rem;
}

.route-control.route-redesign .nv-transcript-empty {
  padding: 1rem 0;
  color: var(--ink-4);
  font-family: var(--font-serif);
  font-style: italic;
}

.route-control.route-redesign .nv-transcript-turn {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.7rem;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  user-select: text;
}

.route-control.route-redesign .nv-transcript-turn-main {
  min-width: 0;
}

.route-control.route-redesign .nv-transcript-turn + .nv-transcript-turn {
  margin-top: 0.55rem;
}

.route-control.route-redesign .nv-transcript-turn.is-active,
.route-control.route-redesign .nv-transcript-turn.is-linked-to-active {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.1);
}

.route-control.route-redesign .nv-transcript-turn.is-linked {
  background: #f6fbf8;
}

.route-control.route-redesign .nv-transcript-turn.is-client {
  background: #effaf6;
  border-left: 4px solid rgba(15, 118, 110, 0.62);
}

.route-control.route-redesign .nv-transcript-turn.is-therapist {
  background: #f5f2ff;
  border-left: 4px solid rgba(124, 58, 237, 0.56);
}

.route-control.route-redesign .nv-transcript-turn.is-preview {
  background: #fffdfa;
}

.route-control.route-redesign .nv-transcript-turn-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.route-control.route-redesign .nv-transcript-turn-speaker {
  border-radius: 999px;
  padding: 0.15rem 0.42rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.route-control.route-redesign .nv-transcript-turn-speaker.is-client {
  background: rgba(15, 118, 110, 0.12);
  color: #0f5d58;
}

.route-control.route-redesign .nv-transcript-turn-speaker.is-therapist {
  background: rgba(124, 58, 237, 0.1);
  color: #5b21b6;
}

.route-control.route-redesign .nv-transcript-turn-speaker.is-unassigned {
  background: rgba(107, 114, 128, 0.12);
  color: #4b5563;
}

.route-control.route-redesign .nv-transcript-turn time {
  color: var(--ink-4);
  font-size: 0.68rem;
  font-weight: 700;
}

.route-control.route-redesign .nv-transcript-turn p {
  margin: 0.4rem 0 0;
  color: var(--ink-2);
  font-family: var(--font-serif);
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.route-control.route-redesign .nv-transcript-turn-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.route-control.route-redesign .nv-transcript-turn-actions button {
  min-height: 28px;
  max-width: 100%;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
  cursor: pointer;
}

.route-control.route-redesign .nv-transcript-turn-actions button:disabled {
  opacity: 0.45;
  cursor: default;
}

.route-control.route-redesign .timeline-row.is-transcript-linked {
  box-shadow: inset 3px 0 0 #0f766e;
}

html[data-theme="dark"] .route-control.route-redesign .bls-speech-picker {
  border-color: rgba(232, 223, 209, 0.24);
  background: rgba(12, 15, 28, 0.86);
}

html[data-theme="dark"] .route-control.route-redesign .bls-speech-picker-head {
  border-bottom-color: rgba(232, 223, 209, 0.2);
}

html[data-theme="dark"] .route-control.route-redesign .bls-speech-picker-label {
  color: var(--dark-muted-readable, rgba(245, 239, 228, 0.82));
}

html[data-theme="dark"] .route-control.route-redesign .bls-speech-picker-status {
  color: var(--dark-muted-soft, rgba(245, 239, 228, 0.62));
}

html[data-theme="dark"] .route-control.route-redesign .bls-speech-picker-popout {
  border-color: rgba(245, 239, 228, 0.28);
  background: rgba(245, 239, 228, 0.08);
  color: var(--ink);
}

html[data-theme="dark"] .route-control.route-redesign .bls-speech-empty {
  color: var(--dark-muted-soft, rgba(245, 239, 228, 0.58));
}

html[data-theme="dark"] .route-control.route-redesign .bls-speech-lane {
  border-color: rgba(232, 223, 209, 0.22);
  background: rgba(22, 25, 41, 0.92);
}

html[data-theme="dark"] .route-control.route-redesign .bls-speech-speaker,
html[data-theme="dark"] .route-control.route-redesign .bls-speech-snippet {
  color: var(--ink);
}

html[data-theme="dark"] .route-control.route-redesign .bls-speech-role.is-client {
  background: rgba(64, 181, 166, 0.22);
  color: #bff7ef;
}

html[data-theme="dark"] .route-control.route-redesign .bls-speech-role.is-therapist {
  background: rgba(149, 118, 245, 0.24);
  color: #ddd1ff;
}

html[data-theme="dark"] .route-control.route-redesign .bls-speech-role-button {
  border-color: rgba(118, 220, 205, 0.34);
  background: rgba(64, 181, 166, 0.16);
  color: #d6fbf6;
}

html[data-theme="dark"] .route-control.route-redesign .nv-transcript-backdrop {
  background: rgba(0, 0, 0, 0.52);
}

html[data-theme="dark"] .route-control.route-redesign .nv-transcript-pane {
  --ink-1: #f7efe1;
  --ink-2: #efe5d4;
  --ink-3: #d2c6b0;
  --ink-4: #b7aa93;
  --paper: #0f1425;
  --line: rgba(232, 223, 209, 0.24);
  --line-2: rgba(232, 223, 209, 0.2);
  border-color: rgba(232, 223, 209, 0.24);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.62);
}

html[data-theme="dark"] .route-control.route-redesign .nv-transcript-close,
html[data-theme="dark"] .route-control.route-redesign .nv-transcript-role-button,
html[data-theme="dark"] .route-control.route-redesign .nv-transcript-soft-button,
html[data-theme="dark"] .route-control.route-redesign .nv-transcript-turn-actions button {
  border-color: rgba(232, 223, 209, 0.28);
  background: rgba(245, 239, 228, 0.08);
  color: var(--ink);
}

html[data-theme="dark"] .route-control.route-redesign .nv-review-column-head,
html[data-theme="dark"] .route-control.route-redesign .nv-review-row-head,
html[data-theme="dark"] .route-control.route-redesign .nv-transcript-speakers {
  background: rgba(18, 22, 37, 0.9);
}

html[data-theme="dark"] .route-control.route-redesign .nv-review-empty {
  border-color: rgba(232, 223, 209, 0.26);
  background: rgba(16, 20, 33, 0.84);
  color: var(--ink-3);
}

html[data-theme="dark"] .route-control.route-redesign .nv-review-row,
html[data-theme="dark"] .route-control.route-redesign .nv-transcript-speaker,
html[data-theme="dark"] .route-control.route-redesign .nv-transcript-turn {
  border-color: rgba(232, 223, 209, 0.24);
  background: rgba(22, 25, 41, 0.92);
}

html[data-theme="dark"] .route-control.route-redesign .nv-review-textarea,
html[data-theme="dark"] .route-control.route-redesign .nv-review-preview-text {
  background: rgba(22, 25, 41, 0.92);
  color: var(--ink-2);
}

html[data-theme="dark"] .route-control.route-redesign .nv-review-code-select,
html[data-theme="dark"] .route-control.route-redesign .nv-review-code-badge {
  border-color: rgba(232, 223, 209, 0.28);
  background: rgba(245, 239, 228, 0.08);
  color: var(--ink);
}

html[data-theme="dark"] .route-control.route-redesign .nv-review-textarea:disabled,
html[data-theme="dark"] .route-control.route-redesign .nv-review-code-select:disabled {
  background: rgba(245, 239, 228, 0.06);
  color: var(--ink-2);
  -webkit-text-fill-color: var(--ink-2);
}

html[data-theme="dark"] .route-control.route-redesign .nv-transcript-selection-bar {
  background: rgba(40, 104, 96, 0.26);
  color: #d6fbf6;
}

html[data-theme="dark"] .route-control.route-redesign .nv-transcript-turn.is-linked {
  background: rgba(26, 58, 52, 0.66);
}

html[data-theme="dark"] .route-control.route-redesign .nv-transcript-turn.is-client {
  background: rgba(20, 67, 61, 0.68);
  border-left-color: rgba(93, 236, 213, 0.64);
}

html[data-theme="dark"] .route-control.route-redesign .nv-transcript-turn.is-therapist {
  background: rgba(54, 42, 88, 0.72);
  border-left-color: rgba(182, 150, 255, 0.66);
}

html[data-theme="dark"] .route-control.route-redesign .nv-transcript-turn.is-preview {
  background: rgba(40, 35, 26, 0.62);
}

html[data-theme="dark"] .route-control.route-redesign .nv-transcript-turn-speaker.is-unassigned {
  background: rgba(150, 156, 173, 0.22);
  color: #d7dce8;
}

@media (max-width: 700px) {
  .route-control.route-redesign .nv-transcript-pane {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .route-control.route-redesign .nv-transcript-head {
    cursor: default;
  }

  .route-control.route-redesign .nv-transcript-resize-handle {
    display: none;
  }

  .route-control.route-redesign .nv-transcript-review-body {
    grid-template-columns: 1fr;
  }

  .route-control.route-redesign .nv-review-column-nv {
    max-height: 42vh;
    border-bottom: 1px solid var(--line-2);
  }

  .route-control.route-redesign .nv-transcript-speaker-grid,
  .route-control.route-redesign .nv-transcript-turn {
    grid-template-columns: 1fr;
  }

  .route-control.route-redesign .nv-transcript-turn-actions {
    justify-content: flex-start;
  }
}

.route-control.route-redesign .bls-manual-entry-bar {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem 0.5rem;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface-2);
}

.route-control.route-redesign .bls-manual-entry-text {
  flex: 1;
  resize: none;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--surface-1);
  color: var(--ink-1);
  font-size: 0.8rem;
  font-family: var(--font-sans);
  line-height: 1.45;
  min-height: 2.6rem;
  max-height: 8rem;
  overflow-y: auto;
}

.route-control.route-redesign .bls-manual-entry-text:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(115, 216, 207, 0.25);
}

.route-control.route-redesign .bls-manual-entry-submit {
  flex-shrink: 0;
  padding: 0.38rem 0.85rem;
  border: 1px solid var(--teal);
  border-radius: 999px;
  background: var(--teal);
  color: var(--teal-ink, #0b2e2c);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms, border-color 150ms;
}

.route-control.route-redesign .bls-manual-entry-submit:hover {
  background: var(--teal-dark, #5ec4bb);
  border-color: var(--teal-dark, #5ec4bb);
}

.route-control.route-redesign .bls-dictation-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex: 1 1 auto;
  max-width: 100%;
  padding: 0.34rem 0.68rem;
  min-height: 32px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--paper-3);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.route-control.route-redesign .bls-dictation-chip:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--paper-3);
  background: var(--paper-2);
}

.route-control.route-redesign .bls-timer-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 150ms, color 150ms, border-color 150ms;
}

.route-control.route-redesign .bls-timer-toggle.is-off {
  background: rgba(32, 34, 52, 0.08);
  color: var(--ink-3);
  border-color: transparent;
}

.route-control.route-redesign .bls-dictation-chip.is-active {
  background: var(--ember);
  border-color: var(--ink);
  color: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}

.route-control.route-redesign .bls-dictation-chip.is-danger {
  border-color: var(--code-nc, #a64a3a);
  background: var(--paper-soft);
  color: var(--code-nc, #a64a3a);
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--code-nc, #a64a3a) 38%, var(--paper-3));
}

.route-control.route-redesign .bls-dictation-chip.is-danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--code-nc, #a64a3a) 12%, var(--paper-soft));
  border-color: var(--code-nc, #a64a3a);
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--code-nc, #a64a3a) 38%, var(--paper-3));
  transform: translate(-1px, -1px);
}

.route-control.route-redesign .bls-dictation-chip:disabled {
  opacity: 0.55;
  cursor: default;
}

.route-control.route-redesign .bls-nv-control-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.34rem 0.72rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  min-width: 0;
}

.route-control.route-redesign .bls-nv-control-bar .bls-code-chip {
  min-width: auto;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.route-control.route-redesign .bls-nv-control-bar .bls-code-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="EM"] {
  background: #0f766e;
}

.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="IM"] {
  background: #1e40af;
}

.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="WP"] {
  background: #6b7280;
}

.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="NC"] {
  background: #991b1b;
}

.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="PC"] {
  background: #6d28d9;
}

.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="SUD"] {
  background: var(--ember);
}

.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="VOC"] {
  background: #0891b2;
}

.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="IW"] {
  background: #7c3aed;
}

.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="BOD"] {
  background: #831843;
}

.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="RTT"] {
  background: #059669;
}

.route-control.route-redesign .bls-nv-ledger {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 0.1rem 0.7rem 0.7rem;
}

.route-control.route-redesign .bls-ledger-head {
  display: grid;
  grid-template-columns: 52px 1fr;
  padding: 0.32rem 0 0.22rem;
  border-bottom: none;
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 600;
}

.route-control.route-redesign .bls-ledger-head > div:first-child {
  padding-left: 0.75rem;
}

.route-control.route-redesign .bls-ledger-head > div:last-child {
  padding-left: 0.75rem;
}

.route-control.route-redesign .bls-timeline-empty {
  padding: 0.9rem 0.75rem 0.35rem;
  color: var(--ink-4);
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 0.9rem;
}

.route-control.route-redesign .bls-timeline-list {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.route-control.route-redesign .timeline-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.5rem;
  padding: 0.2rem 0.5rem;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent !important;
  background-image: none !important;
  transition:
    background 0.12s ease,
    margin 140ms ease,
    box-shadow 140ms ease;
  align-items: start;
}

.route-control.route-redesign .timeline-row:last-child {
  border-bottom: none;
}

.route-control.route-redesign .timeline-row.is-continuation {
  border-bottom: none;
  padding-top: 0.1rem;
  padding-bottom: 0.1rem;
}

.route-control.route-redesign .timeline-row.is-starter {
  cursor: text;
}

.route-control.route-redesign .timeline-row.is-starter:hover,
.route-control.route-redesign .timeline-row.is-starter:focus-within {
  background: rgba(95, 122, 82, 0.05) !important;
}

.route-control.route-redesign .timeline-row.is-active {
  background: rgba(95, 122, 82, 0.04);
}

.route-control.route-redesign .timeline-row.is-dragging {
  opacity: 0.62;
}

.route-control.route-redesign .timeline-row.is-drag-target {
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.14);
}

.route-control.route-redesign .timeline-row.is-drag-gap-before {
  margin-top: 30px;
}

.route-control.route-redesign .timeline-row.is-drag-gap-after {
  margin-bottom: 30px;
}

.route-control.route-redesign .timeline-row.is-drag-gap-before,
.route-control.route-redesign .timeline-row.is-drag-gap-after {
  position: relative;
  overflow: visible;
}

.route-control.route-redesign .timeline-row.is-drag-gap-before::before,
.route-control.route-redesign .timeline-row.is-drag-gap-after::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  height: 3px;
  border-radius: 999px;
  background: #0f766e;
  box-shadow:
    0 0 0 2px rgba(15, 118, 110, 0.12),
    0 4px 12px rgba(15, 118, 110, 0.18);
  pointer-events: none;
  z-index: 4;
}

.route-control.route-redesign .timeline-row.is-drag-gap-before::before {
  top: -16px;
}

.route-control.route-redesign .timeline-row.is-drag-gap-after::after {
  bottom: -16px;
}

.route-control.route-redesign .timeline-code-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.18rem;
  padding-left: 0.2rem;
  padding-right: 0.4rem;
  border: none;
  background: transparent !important;
  background-image: none !important;
  min-width: 0;
}

.route-control.route-redesign .timeline-drag-handle {
  flex: 0 0 auto;
  color: var(--ink-4);
  cursor: grab;
  user-select: none;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.18rem 0.08rem;
  border-radius: 0.2rem;
}

.route-control.route-redesign .timeline-drag-handle:hover,
.route-control.route-redesign .timeline-drag-handle:focus-visible {
  color: var(--ink-2);
  background: rgba(43, 38, 32, 0.08);
  outline: none;
}

.route-control.route-redesign .timeline-drag-handle:active {
  cursor: grabbing;
}

.route-control.route-redesign .timeline-row.is-continuation .timeline-code-cell {
  visibility: hidden;
}

.route-control.route-redesign .timeline-row.is-starter .timeline-copy {
  min-height: 6rem;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 1.7rem,
      rgba(43, 38, 32, 0.12) 1.7rem,
      rgba(43, 38, 32, 0.12) 1.76rem
    );
}

.route-control.route-redesign .timeline-row.is-starter .timeline-code-select {
  color: var(--ink-3);
}

.route-control.route-redesign .timeline-row.is-starter .timeline-textarea::placeholder {
  color: var(--ink-4);
  font-style: italic;
}

.route-control.route-redesign .timeline-code-select {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0;
  appearance: none;
  color: var(--ink-2);
  cursor: pointer;
}

.route-control.route-redesign .timeline-code-note {
  display: none !important;
}

.route-control.route-redesign .timeline-copy {
  display: flex !important;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  background-image: none !important;
}

.route-control.route-redesign .timeline-meta-row {
  display: none !important;
}

.route-control.route-redesign .timeline-meta {
  display: none !important;
}

.route-control.route-redesign .timeline-response textarea {
  display: none !important;
}

.route-control.route-redesign .timeline-textarea {
  display: block !important;
  width: 100% !important;
  min-height: 3.6rem;
  padding: 0.4rem 0.6rem;
  margin: 0;
  background: transparent !important;
  background-image: none !important;
  border: 1px solid transparent;
  border-radius: 0.4rem;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
  resize: none;
  overflow: hidden;
  box-sizing: border-box;
  color: var(--ink);
  transition: background 0.12s ease, border-color 0.12s ease;
}

.route-control.route-redesign .timeline-textarea:hover {
  background: rgba(255, 255, 255, 0.5) !important;
  background-image: none !important;
  border-color: rgba(43, 38, 32, 0.08);
}

.route-control.route-redesign .timeline-textarea:focus {
  background: #ffffff !important;
  background-image: none !important;
  border-color: var(--line);
  outline: none;
  box-shadow: 0 0 0 2px rgba(95, 122, 82, 0.08);
}

.route-control.route-redesign .timeline-textarea::placeholder,
.route-control.route-redesign .timeline-response textarea::placeholder {
  color: rgba(82, 73, 61, 0.42);
}

.route-control.route-redesign .timeline-textarea:focus,
.route-control.route-redesign .timeline-response textarea:focus {
  outline: none;
}

.route-control.route-redesign .timeline-copy {
  position: relative;
}

.route-control.route-redesign .timeline-add-line-button {
  align-self: flex-start;
  min-height: 1.65rem;
  padding: 0.2rem 0.48rem;
  border: 1px solid rgba(43, 38, 32, 0.12);
  border-radius: 0.34rem;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink-3);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
}

.route-control.route-redesign .timeline-add-line-button:hover,
.route-control.route-redesign .timeline-add-line-button:focus-visible {
  background: #fff;
  color: var(--ink-2);
  border-color: rgba(15, 118, 110, 0.28);
  outline: none;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.08);
}

.route-control.route-redesign .timeline-tools {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  display: flex;
  gap: 0.2rem;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.route-control.route-redesign .timeline-row:hover .timeline-tools {
  opacity: 1;
  pointer-events: auto;
}

.route-control.route-redesign .timeline-tool.is-danger {
  background: transparent;
  border: none;
  color: rgba(43, 38, 32, 0.4);
  font-size: 1rem;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border-radius: 0.25rem;
  display: grid;
  place-items: center;
}

.route-control.route-redesign .timeline-tool.is-danger:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.route-control.route-redesign .timeline-tool {
  padding: 0.22rem 0.45rem;
  border-radius: 0.35rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-3);
  font-size: 0.68rem;
}

.route-control.route-redesign .timeline-rtt-note {
  color: var(--ink-4);
  font-style: italic;
  font-family: var(--font-serif);
  padding-top: 0.2rem;
}

.route-control.route-redesign .bls-add-row-label {
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}

.route-control.route-redesign .bls-add-row-actions {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.route-control.route-redesign .bls-code-chip {
  min-width: 2.25rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.34rem;
  background: #fff;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.route-control.route-redesign .bls-dock {
  display: flex;
  flex-direction: column;
  background: transparent;
  border-left: none;
  padding: 0 20px;
  align-self: flex-start;
}

.route-control.route-redesign .bls-dock-head {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem 0.6rem;
  position: relative;
  min-height: 2.1rem;
  border-bottom: 1px solid var(--line);
}

.route-control.route-redesign .bls-dock-toggle {
  margin-left: 0;
  position: absolute;
  left: 0.8rem;
  top: 0.45rem;
}

.route-control.route-redesign .bls-dock-head-main {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.14rem;
  min-width: 0;
  margin-left: 2.05rem;
}

.route-control.route-redesign .bls-dock-label {
  margin-left: 0;
}

.route-control.route-redesign .bls-dock-head .client-presence-dot {
  position: absolute;
  top: 0.75rem;
  right: 0.95rem;
  margin-left: 0;
}

.route-control.route-redesign .bls-dock.is-collapsed {
  flex-basis: 56px !important;
  width: 56px !important;
  min-width: 56px !important;
  padding-inline: 6px;
}

.route-control.route-redesign .bls-dock.is-collapsed .bls-client-stage,
.route-control.route-redesign .bls-dock.is-collapsed .client-presence-dot,
.route-control.route-redesign .bls-dock.is-collapsed .bls-dock-label {
  display: none;
}

.route-control.route-redesign .bls-dock.is-collapsed .bls-dock-head {
  display: flex;
  min-height: 48px;
  padding: 0.4rem 0.1rem;
  justify-content: center;
  align-items: center;
  border-bottom: none;
}

.route-control.route-redesign .bls-dock.is-collapsed .bls-dock-head-main {
  display: none;
}

.route-control.route-redesign .bls-dock.is-collapsed .bls-dock-toggle {
  position: static;
  margin: 0;
}

.route-control.route-redesign .bls-dock.is-collapsed .bls-dock-controls {
  display: block;
  margin: 0 !important;
  padding: 0 !important;
}

.route-control.route-redesign .bls-dock.is-collapsed .bls-dock-controls > :not(.bls-toolbar-head),
.route-control.route-redesign .bls-dock.is-collapsed .bls-toolbar-head > .bls-control-label,
.route-control.route-redesign .bls-dock.is-collapsed #popoutBlsToolbar {
  display: none;
}

.route-control.route-redesign .bls-dock.is-collapsed .bls-toolbar-head {
  justify-content: center;
  margin: 0;
}

.route-control.route-redesign .bls-dock.is-collapsed .bls-toolbar-actions {
  width: 100%;
  justify-content: center;
}

.route-control.route-redesign .bls-dock.is-collapsed .bls-dock-toggle {
  margin-left: 0;
}

.route-control.route-redesign .bls-dock.is-collapsed .bls-collapse-toggle-icon {
  transform: rotate(0deg);
}

.route-control.route-redesign .bls-client-stage {
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.route-control.route-redesign .bls-stage-frame {
  width: 100%;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.route-control.route-redesign .bls-stage-frame .stage,
.quickstart-mode .qs-preview-frame .stage {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--client-stage-bg, radial-gradient(circle at 50% 50%, rgba(255, 210, 126, 0.05), transparent 28%), #1f1a16) !important;
  border: none !important;
  box-shadow: none !important;
  position: relative;
}

.route-control.route-redesign .bls-stage-frame .track,
.quickstart-mode .qs-preview-frame .track {
  display: none;
}

.route-control.route-redesign .bls-stage-frame .moving-dot,
.quickstart-mode .qs-preview-frame .moving-dot {
  width: 34px;
  height: 34px;
  margin-left: -17px;
  margin-top: -17px;
  background: var(--client-dot-bg, radial-gradient(circle at 35% 35%, #fff7d6 0%, #f0d38a 22%, #c9a45b 56%, #6e5531 100%)) !important;
  box-shadow: var(--client-dot-shadow, 0 0 12px rgba(232, 191, 108, 0.22), 0 10px 24px rgba(0, 0, 0, 0.28)) !important;
}

.route-control.route-redesign .bls-stage-annotation {
  font-family: var(--font-hand);
  font-size: 0.96rem;
}

.route-control.route-redesign .bls-stage-frame .stage-overlay {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.875rem;
  text-align: center;
  margin: 0;
}

.route-control.route-redesign .bls-stage-frame .stage-overlay p {
  margin: 0;
  padding: 0;
  color: #fff;
}

.route-control.route-redesign .bls-dock-controls {
  padding: 0.7rem 0.8rem;
  margin-top: 0.55rem;
}

.route-control.route-redesign .bls-toolbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.route-control.route-redesign .bls-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.route-control.route-redesign .bls-popout-action {
  min-height: 30px;
  padding: 0.35rem 0.6rem;
  border: 1.5px solid rgba(32, 34, 52, 0.24);
  border-radius: 8px;
  color: #202234;
  background: rgba(248, 244, 236, 0.92);
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 2px 3px 0 rgba(32, 34, 52, 0.14);
}

.route-control.route-redesign .bls-transport-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.route-control.route-redesign .bls-transport-grid-secondary {
  margin-top: 0.45rem;
}

.route-control.route-redesign .bls-primary-action,
.route-control.route-redesign .bls-secondary-action,
.route-control.route-redesign .bls-link-action {
  border-radius: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.route-control.route-redesign .bls-primary-action {
  padding: 0.62rem 0;
  border: none;
  background: var(--moss);
  color: #fff;
}

.route-control.route-redesign .bls-secondary-action,
.route-control.route-redesign .bls-link-action {
  padding: 0.62rem 0;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
}

.route-control.route-redesign .bls-control-stack {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.route-control.route-redesign .bls-control-block {
  display: block;
}

.route-control.route-redesign .bls-control-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.route-control.route-redesign .bls-control-value {
  color: var(--ink-2);
  font-family: var(--font-hand);
  font-size: 1rem;
  font-weight: 600;
}

.route-control.route-redesign .bls-select {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 0.35rem;
  background: #fff;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
}

.route-control.route-redesign .bls-control-block input[type="range"] {
  width: 100%;
}

/* BLS tab strip (Motion / Audio) */
.route-control.route-redesign .bls-tab-strip {
  display: flex;
  gap: 0;
  margin-top: 1rem;
  margin-bottom: 0.6rem;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--line-2);
}

.route-control.route-redesign .bls-tab {
  flex: 1;
  padding: 0.3rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent;
  color: var(--ink-2);
  border: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.route-control.route-redesign .bls-tab + .bls-tab {
  border-left: 1px solid var(--line-2);
}

.route-control.route-redesign .bls-tab.is-active {
  background: var(--ink);
  color: var(--paper);
}

.route-control.route-redesign .bls-tab-panel[hidden] {
  display: none;
}

/* Sound selector grid */
.route-control.route-redesign .bls-audio-sound-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.route-control.route-redesign .bls-sound-btn {
  padding: 0.3rem 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid var(--line-2);
  border-radius: 0.4rem;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
  text-align: center;
}

.route-control.route-redesign .bls-sound-btn:hover {
  background: var(--line-1);
}

.route-control.route-redesign .bls-sound-btn.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Client prefs sound row */
.client-prefs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 2px 0;
}

/* Client prefs audio sound grid */
.client-audio-sound-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
}

.client-sound-btn {
  padding: 0.28rem 0.2rem;
  font-size: 0.66rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.4rem;
  background: transparent;
  color: rgba(200, 240, 235, 0.55);
  cursor: pointer;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
  text-align: center;
}

.client-sound-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(200, 240, 235, 0.9);
  border-color: rgba(255, 255, 255, 0.22);
}

.client-sound-btn.is-active {
  background: rgba(115, 216, 207, 0.22);
  border-color: rgba(115, 216, 207, 0.5);
  color: rgba(200, 240, 238, 1);
}

.route-control.route-redesign .bls-link-card {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px dotted var(--line-2);
}

.route-control.route-redesign .bls-link-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.route-control.route-redesign .bls-link-field {
  display: block;
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 0.45rem;
  background: #fff;
  padding: 0.45rem 0.55rem;
  font-size: 0.74rem;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

.route-control.route-redesign .bls-link-field:not(.is-empty):hover,
.route-control.route-redesign .bls-link-field:not(.is-empty):focus-visible {
  text-decoration: underline;
}

.route-control.route-redesign .bls-link-field.is-empty {
  color: var(--ink-3);
  pointer-events: none;
}

.route-control.route-redesign .bls-link-meta {
  margin: 0.35rem 0 0;
  color: var(--ink-3);
  font-size: 0.68rem;
  line-height: 1.35;
}

.route-control.route-redesign .bls-dock-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-top: 1px dotted var(--line-2);
  color: var(--ink-3);
  font-size: 0.72rem;
}

.route-control.route-redesign .bls-dock-foot-left {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.route-control.route-redesign .bls-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--moss);
  animation: breathe 2s ease-in-out infinite;
}

.route-control.route-redesign .bls-support-hidden {
  display: none !important;
}

body.route-control.client-mode.route-redesign {
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  background: var(--client-stage-bg, #1f1a16);
}

body.route-control.client-mode.route-redesign .topbar,
body.route-control.client-mode.route-redesign .bls-phase-rail,
body.route-control.client-mode.route-redesign .bls-script-column,
body.route-control.client-mode.route-redesign .bls-nv-center,
body.route-control.client-mode.route-redesign .bls-column-resizer,
body.route-control.client-mode.route-redesign .bls-dock-controls,
body.route-control.client-mode.route-redesign .bls-dock-foot {
  display: none !important;
}

body.route-control.client-mode.route-redesign .workspace.control-workspace.bls-design-workspace {
  display: block !important;
  min-height: 100vh;
  height: 100vh;
  width: 100vw;
  max-width: none;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: var(--client-stage-bg, #1f1a16) !important;
  overflow: hidden;
}

body.route-control.client-mode.route-redesign .bls-dock {
  flex: 1 1 auto;
  width: 100vw;
  min-width: 100vw;
  max-width: none;
  height: 100vh;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--client-stage-bg, #1f1a16);
  box-shadow: none !important;
}

body.route-control.client-mode.route-redesign .bls-dock-head {
  display: none;
}

body.route-control.client-mode.route-redesign .bls-client-stage {
  margin: 0 !important;
  padding: 0 !important;
  height: 100vh;
  width: 100vw;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--client-stage-bg, #1f1a16) !important;
  box-shadow: none !important;
}

body.route-control.client-mode.route-redesign .bls-stage-frame {
  width: 100vw;
  height: 100vh;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: var(--client-stage-bg, #1f1a16) !important;
  box-shadow: none !important;
}

body.route-control.client-mode.route-redesign .bls-stage-frame .stage {
  width: 100vw;
  min-width: 100vw;
  height: 100vh;
  min-height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0 !important;
  background: var(--client-stage-bg, #1f1a16) !important;
  box-shadow: none !important;
}

body.route-control.client-mode.route-redesign .app-shell {
  width: 100vw !important;
  max-width: none !important;
  min-height: 100vh;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--client-stage-bg, #1f1a16);
  gap: 0;
}

@media (max-width: 1500px) {
  .route-control.route-redesign .workspace.control-workspace.bls-design-workspace {
    --bls-col-phase: 180px;
    --bls-col-script: 460px;
    --bls-col-nv: 620px;
  }
}

@media (max-width: 1320px) {
  .route-control.route-redesign .workspace.control-workspace.bls-design-workspace {
    --bls-col-phase: 164px;
    --bls-col-script: 340px;
    --bls-col-nv: 500px;
  }

  .route-control.route-redesign .bls-script-column {
    padding-right: 14px;
  }

  .route-control.route-redesign #blsNvCenter {
    padding-left: 14px;
  }
}

@media (max-width: 1120px) {
  .route-control.route-redesign .workspace.control-workspace.bls-design-workspace {
    --bls-col-phase: 112px;
    --bls-col-script: 220px;
    --bls-col-nv: 430px;
  }

  .route-control.route-redesign .bls-script-column {
    margin-right: 12px;
    padding-right: 12px;
  }

  .route-control.route-redesign #blsNvCenter {
    padding-left: 12px;
  }
}

@media (max-width: 980px) {
  .route-control.route-redesign .workspace.control-workspace.bls-design-workspace {
    --bls-col-phase: 96px;
    --bls-col-script: 200px;
    --bls-col-nv: 360px;
  }
}

/* ─────────────────────────────────────────────────────────────
   Prep — unified consistent styling across all forms.
   Avoid white boxes (except client-response text inputs).
   Frame tan items so they're contained against the paper bg.
   ───────────────────────────────────────────────────────────── */

.route-prep.route-redesign .checkbox-card,
.route-prep.route-redesign .packet-table-row,
.route-prep.route-redesign .rdi-sheet,
.route-prep.route-redesign .rdi-resource-card,
.route-prep.route-redesign .des-question,
.route-prep.route-redesign .readiness-row,
.route-prep.route-redesign .exercise-script-step,
.route-prep.route-redesign .packet-subsection,
.route-prep.route-redesign .step-card,
.route-prep.route-redesign .draft-card,
.route-prep.route-redesign .summary-card,
.route-prep.route-redesign .helper-strip,
.route-prep.route-redesign .nudge-strip,
.route-prep.route-redesign .phase-progress-strip,
.route-prep.route-redesign .target-event-grid,
.route-prep.route-redesign .info-table-row {
  background: rgba(235, 227, 212, 0.55) !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

.route-prep.route-redesign .prompt-list {
  background: rgba(235, 227, 212, 0.55) !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  padding: 1rem !important;
}

.route-prep.route-redesign .packet-doc-body .packet-section,
.route-prep.route-redesign .packet-section-stack > .packet-section,
.route-prep.route-redesign .target-event-table {
  background: transparent;
  border: none;
}

.route-prep.route-redesign .packet-row-head {
  background: transparent !important;
  border: none !important;
  padding: 0 0 0.4rem 0;
}

.route-prep.route-redesign .packet-table-row.is-current {
  border-color: var(--moss-soft) !important;
  background: var(--moss-wash) !important;
}

.route-prep.route-redesign .tx-plan-presenting-issues {
  gap: 10px;
  padding: 12px 14px !important;
  background: transparent !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
}

.route-prep.route-redesign .tx-plan-presenting-issues .compact-head {
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.route-prep.route-redesign .tx-plan-presenting-issues .compact-head h3 {
  margin: 2px 0 0;
  font-size: 16px;
}

.route-prep.route-redesign .tx-plan-presenting-issues .compact-head .ghost {
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
}

.route-prep.route-redesign .tx-plan-presenting-issues .packet-table-stack {
  gap: 8px;
}

.route-prep.route-redesign .tx-plan-symptom-row {
  gap: 8px;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

.route-prep.route-redesign .tx-plan-symptom-row + .tx-plan-symptom-row {
  padding-top: 10px !important;
  border-top: 1px solid var(--line) !important;
}

.route-prep.route-redesign .tx-plan-symptom-row .packet-row-head {
  padding-bottom: 2px;
}

.route-prep.route-redesign .tx-plan-symptom-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px 104px;
  gap: 8px 10px;
  align-items: end;
}

.route-prep.route-redesign .tx-plan-symptom-row label {
  gap: 3px;
}

.route-prep.route-redesign .tx-plan-symptom-small input {
  min-width: 0;
  text-align: center;
}

.route-prep.route-redesign .tx-plan-symptom-notes {
  grid-column: 1 / -1;
}

.route-prep.route-redesign .tx-plan-symptom-row textarea {
  min-height: 72px;
}

@media (max-width: 900px) {
  .route-prep.route-redesign .tx-plan-symptom-fields {
    grid-template-columns: minmax(0, 1fr) 96px 96px;
  }
}

.route-prep.route-redesign .tx-plan-target-events {
  gap: 10px;
  padding: 12px 14px !important;
  background: transparent !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
}

.route-prep.route-redesign .tx-plan-target-events .compact-head {
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.route-prep.route-redesign .tx-plan-target-events .compact-head h3 {
  margin: 2px 0 0;
  font-size: 16px;
}

.route-prep.route-redesign .tx-plan-target-events .compact-head .ghost {
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
}

.route-prep.route-redesign .tx-plan-target-events .packet-table-stack,
.route-prep.route-redesign .tx-plan-target-events .target-event-table {
  gap: 8px;
}

.route-prep.route-redesign .tx-plan-target-events .target-event-header,
.route-prep.route-redesign .tx-plan-target-events .target-event-grid {
  grid-template-columns: 74px minmax(220px, 1fr) 96px 132px 84px;
  gap: 8px;
  align-items: start;
}

.route-prep.route-redesign .tx-plan-target-events .target-event-header {
  padding: 0 8px 2px;
}

.route-prep.route-redesign .tx-plan-target-events .target-event-row {
  gap: 8px;
  padding: 8px 10px !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.route-prep.route-redesign .tx-plan-target-events .target-event-row,
.route-prep.route-redesign .tx-plan-target-events .target-event-row.is-current,
.route-prep.route-redesign .tx-plan-target-events .target-event-row:not(.is-current) {
  background: transparent !important;
}

.route-prep.route-redesign .tx-plan-target-events .target-event-row + .target-event-row {
  border-top: 1px solid var(--line) !important;
  padding-top: 10px !important;
}

.route-prep.route-redesign .tx-plan-target-events .target-event-grid {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.route-prep.route-redesign .tx-plan-target-events .target-event-row.is-dragging {
  opacity: 0.55;
}

.route-prep.route-redesign .tx-plan-target-events .target-event-row.is-drag-target {
  box-shadow: inset 0 3px 0 var(--accent-strong);
}

.route-prep.route-redesign .tx-plan-target-events .target-event-row.is-drag-target.is-drag-after {
  box-shadow: inset 0 -3px 0 var(--accent-strong);
}

.route-prep.route-redesign .tx-plan-target-events .target-event-main textarea {
  min-height: 48px;
}

.route-prep.route-redesign .tx-plan-target-events .target-event-age input {
  min-height: 42px;
}

.route-prep.route-redesign .tx-plan-target-events .target-event-meta,
.route-prep.route-redesign .tx-plan-target-events .target-event-seq-cell {
  gap: 4px;
}

.route-prep.route-redesign .tx-plan-target-events .target-drag-handle {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 32px;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 8px;
  background: rgba(43, 38, 32, 0.08);
  color: var(--muted);
  cursor: grab;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
}

.route-prep.route-redesign .tx-plan-target-events .target-drag-handle:active {
  cursor: grabbing;
}

.route-prep.route-redesign .tx-plan-target-events .target-seq,
.route-prep.route-redesign .tx-plan-target-events .target-event-badge {
  border-radius: 8px;
}

.route-prep.route-redesign .tx-plan-target-events .target-event-meta .ghost,
.route-prep.route-redesign .tx-plan-target-events .target-event-remove {
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
}

.route-prep.route-redesign .tx-plan-target-events .target-event-details {
  gap: 8px;
  padding-top: 8px;
}

.route-prep.route-redesign .tx-plan-triggers {
  gap: 10px;
  padding: 12px 14px !important;
  background: transparent !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
}

.route-prep.route-redesign .tx-plan-triggers .compact-head {
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.route-prep.route-redesign .tx-plan-triggers .compact-head h3 {
  margin: 2px 0 0;
  font-size: 16px;
}

.route-prep.route-redesign .tx-plan-triggers .compact-head .ghost {
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
}

.route-prep.route-redesign .tx-plan-triggers .packet-table-stack {
  gap: 0;
}

.route-prep.route-redesign .tx-plan-trigger-row {
  gap: 7px;
  padding: 8px 10px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.route-prep.route-redesign .tx-plan-trigger-row + .tx-plan-trigger-row {
  border-top: 1px solid var(--line) !important;
  padding-top: 10px !important;
}

.route-prep.route-redesign .tx-plan-trigger-row .packet-row-head {
  padding-bottom: 0;
  align-items: center;
}

.route-prep.route-redesign .tx-plan-trigger-row .packet-row-head .ghost {
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
}

.route-prep.route-redesign .tx-plan-trigger-fields {
  gap: 7px 10px;
}

.route-prep.route-redesign .tx-plan-trigger-row label {
  gap: 3px;
}

.route-prep.route-redesign .tx-plan-trigger-row textarea {
  min-height: 54px;
}

.route-prep.route-redesign .tx-plan-trigger-row .full-span textarea {
  min-height: 44px;
}

.route-prep.route-redesign .tx-plan-resources {
  gap: 10px;
  padding: 12px 14px !important;
  background: transparent !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
}

.route-prep.route-redesign .tx-plan-resources .compact-head {
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.route-prep.route-redesign .tx-plan-resources .compact-head h3 {
  margin: 2px 0 0;
  font-size: 16px;
}

.route-prep.route-redesign .tx-plan-resources .packet-table-stack {
  gap: 0;
}

.route-prep.route-redesign .tx-plan-resources .resource-row {
  gap: 7px;
  padding: 8px 10px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.route-prep.route-redesign .tx-plan-resources .resource-row + .resource-row {
  border-top: 1px solid var(--line) !important;
  padding-top: 10px !important;
}

.route-prep.route-redesign .tx-plan-resources .resource-row .packet-row-head {
  padding-bottom: 0;
}

.route-prep.route-redesign .tx-plan-resources .resource-row .step-grid {
  gap: 7px 10px;
}

.route-prep.route-redesign .tx-plan-resources .resource-row label {
  gap: 3px;
}

.route-prep.route-redesign .tx-plan-resources .resource-row textarea {
  min-height: 54px;
}

/* CLIENT RESPONSE INPUTS — keep white so writing area stands out */
.route-prep.route-redesign textarea,
.route-prep.route-redesign input[type="text"],
.route-prep.route-redesign input[type="number"],
.route-prep.route-redesign input[type="email"],
.route-prep.route-redesign input[type="tel"],
.route-prep.route-redesign input[type="date"],
.route-prep.route-redesign input:not([type]),
.route-prep.route-redesign select {
  background: #ffffff !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.route-prep.route-redesign input[type="checkbox"],
.route-prep.route-redesign input[type="radio"] {
  background: initial !important;
  border: initial !important;
  border-radius: initial !important;
}

.route-prep.route-redesign .checkbox-card:has(input:checked) {
  background: var(--moss-wash) !important;
  border-color: var(--moss-soft) !important;
}

/* =====================================================
   HELO ECHO SITEWIDE DUSK/TAN THEME PASS
   Shared visual system applied after page-specific rules.
   ===================================================== */

body:not(.client-mode) {
  background:
    radial-gradient(ellipse 800px 600px at 20% 0%, rgba(67, 73, 102, 0.06), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, #efe7d7 100%);
}

body:not(.client-mode) .button-link.primary,
body:not(.client-mode) button.primary,
body:not(.client-mode) .bls-primary-action {
  border: 1.5px solid #202234;
  background: var(--paper-2);
  color: #202234;
  box-shadow: 4px 5px 0 var(--paper-3);
}

body:not(.client-mode) .button-link.ghost,
body:not(.client-mode) button.ghost,
body:not(.client-mode) .bls-secondary-action,
body:not(.client-mode) .bls-link-action {
  color: #202234;
  background: rgba(248, 244, 236, 0.78);
  border: 1.5px solid rgba(32, 34, 52, 0.28);
}

body:not(.client-mode) input,
body:not(.client-mode) textarea,
body:not(.client-mode) select {
  border: 1px solid #c6bba9;
  background: rgba(248, 244, 236, 0.92);
  color: #202234;
}

body:not(.client-mode) input:focus,
body:not(.client-mode) textarea:focus,
body:not(.client-mode) select:focus {
  outline: none;
  border-color: #565d89;
  box-shadow: 0 0 0 3px rgba(86, 93, 137, 0.14);
}

body:not(.client-mode) .hero,
body:not(.client-mode) .panel,
body:not(.client-mode) .client-banner,
body:not(.client-mode) .start-card,
body:not(.client-mode) .auth-card,
body:not(.client-mode) .page-overview,
body:not(.client-mode) .packet-card,
body:not(.client-mode) .target-card,
body:not(.client-mode) .storage-card,
body:not(.client-mode) .bundle-card,
body:not(.client-mode) .entry-card,
body:not(.client-mode) .session-artifact-card,
body:not(.client-mode) .portal-account-card,
body:not(.client-mode) .portal-linked-card,
body:not(.client-mode) .session-link-card,
body:not(.client-mode) .summary-card,
body:not(.client-mode) .draft-card,
body:not(.client-mode) .step-card,
body:not(.client-mode) .checkbox-card,
body:not(.client-mode) .nudge-card {
  border: 1.5px solid rgba(32, 34, 52, 0.42);
  background: rgba(248, 244, 236, 0.78);
  box-shadow:
    5px 6px 0 rgba(32, 34, 52, 0.16),
    0 18px 44px -36px rgba(32, 34, 52, 0.44);
}

body:not(.client-mode) .hero,
body:not(.client-mode) .panel {
  border-radius: 14px;
}

body:not(.client-mode) .eyebrow,
body:not(.client-mode) .phase-description,
body:not(.client-mode) .support-copy,
body:not(.client-mode) small,
body:not(.client-mode) .entry-meta {
  color: #5b6072;
}

.route-auth .auth-shell {
  width: min(1180px, calc(100vw - 2rem));
}

.route-auth .auth-card,
.route-auth .start-card {
  max-width: 520px;
  border-radius: 14px;
  background: rgba(248, 244, 236, 0.92);
  border: 1px solid rgba(217, 205, 180, 0.5);
  box-shadow: 0 18px 48px rgba(32, 34, 52, 0.12), 0 2px 8px rgba(32, 34, 52, 0.06);
}

.route-auth .auth-card h1,
.route-auth .start-card h1 {
  color: #202234;
}

.route-folder.route-redesign .redesign-shell,
.route-prep.route-redesign .redesign-shell,
.route-control.route-redesign .redesign-shell {
  width: min(1680px, calc(100vw - 2rem));
}

.route-folder.route-redesign .topbar,
.route-prep.route-redesign .topbar,
.route-control.route-redesign .topbar {
  margin-top: 0;
}

.route-ehr.route-redesign .ehr-main-layout,
.route-profile.route-redesign .profile-shell,
.route-utilities.route-redesign .utilities-shell,
.route-prep.route-redesign .workspace {
  border-color: rgba(32, 34, 52, 0.22);
}

.route-ehr.route-redesign .ehr-sidebar,
.route-ehr.route-redesign .ehr-content,
.route-prep.route-redesign .phase-rail,
.route-prep.route-redesign .session-panel,
.route-control.route-redesign .bls-dock {
  background: rgba(255, 252, 249, 0.96);
  border-color: rgba(32, 34, 52, 0.12);
}

.route-ehr.route-redesign .ehr-client-card,
.route-ehr.route-redesign .ehr-badges-card,
.route-ehr.route-redesign .ehr-badge-item,
.route-ehr.route-redesign .folder-target,
.route-ehr.route-redesign .ehr-session-row,
.route-ehr.route-redesign .prep-doc-card,
.route-profile.route-redesign .profile-card,
.route-profile.route-redesign .profile-summary-card,
.route-utilities.route-redesign .utility-card,
.route-prep.route-redesign .packet-nav-button,
.route-prep.route-redesign .packet-nav-item,
.route-prep.route-redesign .packet-section,
.route-prep.route-redesign .packet-subsection,
.route-prep.route-redesign .packet-doc-body,
.route-control.route-redesign .bls-guide-panel,
.route-control.route-redesign .bls-script-prompt,
.route-control.route-redesign .bls-link-card,
.route-control.route-redesign .bls-control-block {
  background: rgba(248, 244, 236, 0.76);
  border-color: rgba(32, 34, 52, 0.24);
}

.route-ehr.route-redesign .ehr-record-tab,
.route-prep.route-redesign .packet-nav-button,
.route-prep.route-redesign .packet-nav-item,
.route-control.route-redesign .bls-phase-button,
.route-control.route-redesign .bls-category-button,
.route-control.route-redesign .bls-script-item {
  color: #313548;
}

.route-ehr.route-redesign .ehr-record-tab.is-active,
.route-prep.route-redesign .packet-nav-button.is-active,
.route-prep.route-redesign .packet-nav-item.is-active,
.route-control.route-redesign .bls-phase-button.is-active,
.route-control.route-redesign .bls-script-item.is-active {
  background: rgba(86, 93, 137, 0.14);
  border-color: rgba(86, 93, 137, 0.28);
  color: #202234;
}

.route-prep.route-redesign textarea,
.route-prep.route-redesign input[type="text"],
.route-prep.route-redesign input[type="number"],
.route-prep.route-redesign input[type="email"],
.route-prep.route-redesign input[type="tel"],
.route-prep.route-redesign input[type="date"],
.route-prep.route-redesign input:not([type]),
.route-prep.route-redesign select {
  background: rgba(248, 244, 236, 0.96) !important;
  border-color: #c6bba9 !important;
}

.route-control.route-redesign .bls-stage-frame .stage,
body.route-control.client-mode.route-redesign .bls-stage-frame .stage {
  border-color: rgba(248, 244, 236, 0.18) !important;
}

.route-portal.route-redesign {
  background:
    radial-gradient(circle at 18% 12%, rgba(86, 93, 137, 0.16), transparent 34%),
    linear-gradient(180deg, #e8dfd1 0%, #cbc4bf 100%);
}

.route-portal.route-redesign .portal-side-card,
.route-portal.route-redesign .portal-badge-item {
  background: rgba(248, 244, 236, 0.78);
  border-color: rgba(32, 34, 52, 0.24);
}

.route-portal.route-redesign .portal-settings-group,
.route-portal.route-redesign .portal-badge-stat,
.route-portal.route-redesign .portal-tices-entry,
.route-portal.route-redesign .portal-tices-empty,
.route-portal.route-redesign .portal-tices-timeline-item,
.route-portal.route-redesign .portal-tices-timeline-empty,
.route-portal.route-redesign .portal-tices-readonly-field {
  background: rgba(248, 244, 236, 0.72);
  border: 1px solid rgba(32, 34, 52, 0.20);
  box-shadow: 2px 3px 0 rgba(32, 34, 52, 0.08);
}

/* Unified navigation treatment */
body:not(.route-public-home):not(.client-mode) .route-redesign .topbar,
body:not(.route-public-home):not(.client-mode).route-redesign .topbar {
  min-height: 72px;
  padding: 0 18px;
  gap: 1rem;
}

body:not(.route-public-home):not(.client-mode) .topbar-tools {
  gap: 0.75rem;
}

body:not(.route-public-home):not(.client-mode) .selector-field select {
  min-height: 32px;
  margin: 0;
  border-radius: 8px;
  border-color: rgba(32, 34, 52, 0.42);
  background: rgba(248, 244, 236, 0.92);
  color: #202234;
  box-shadow: 3px 3px 0 rgba(32, 34, 52, 0.18);
}

body:not(.route-public-home):not(.client-mode) .account-menu-trigger {
  min-height: 48px;
  border: 1.5px solid rgba(32, 34, 52, 0.56);
  background: rgba(248, 244, 236, 0.92);
  color: #202234;
  box-shadow: 4px 4px 0 rgba(32, 34, 52, 0.28);
}

body:not(.route-public-home):not(.client-mode) .account-menu-avatar {
  background: rgba(86, 93, 137, 0.18);
  color: #565d89;
}

body:not(.route-public-home):not(.client-mode) .account-menu-copy small {
  color: #5b6072;
}

.route-prep.route-redesign .forms-tab-bar {
  width: calc(100% - 28px - 28px - 280px - 18px);
  margin: 0.85rem 28px 0 calc(28px + 280px + 18px);
  padding: 0;
  gap: 0;
  border: none;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.route-prep.route-redesign .forms-tab {
  min-height: 36px;
  margin: 0;
  padding: 8px 16px 10px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -1.5px;
  background: transparent;
  color: var(--ink-2);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0;
  box-shadow: none;
}

.route-prep.route-redesign .forms-tab:hover {
  color: var(--ink);
  background: transparent;
  transform: none;
}

.route-prep.route-redesign .forms-tab.is-active {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--ember);
  background: transparent;
  box-shadow: none;
}

.route-prep.route-redesign .forms-tab-panel {
  min-height: 0;
}

.route-prep.route-redesign .forms-main {
  height: calc(100vh - var(--topbar-window-gap, 1.1rem) - 75px);
  min-height: 0;
  overflow: hidden;
}

.route-prep.route-redesign .forms-tab-panel.is-active {
  min-height: 0;
  overflow: hidden;
}

/* Client portal journal/doc pages must scroll to full form length */
body.route-portal.route-redesign .forms-main {
  height: auto;
  min-height: calc(100vh - var(--topbar-window-gap, 1.1rem) - 75px);
  overflow: visible;
}

body.route-portal.route-redesign .forms-tab-panel,
body.route-portal.route-redesign .forms-tab-panel.is-active {
  min-height: 0;
  overflow: visible;
}

.route-control.route-redesign .bls-column-resizer {
  background: rgba(32, 34, 52, 0.08);
}

.route-control.route-redesign .bls-column-resizer:hover {
  background: rgba(86, 93, 137, 0.22);
}

.route-control.route-redesign .bls-column-resizer::before {
  color: rgba(32, 34, 52, 0.42);
}

.route-control.route-redesign .bls-phase-label,
.route-control.route-redesign .bls-script-label,
.route-control.route-redesign .bls-script-section-label,
.route-control.route-redesign .bls-nv-label,
.route-control.route-redesign .bls-dock-label,
.route-control.route-redesign .bls-control-label,
.route-control.route-redesign .bls-add-row-label {
  color: #565d89;
}

.route-control.route-redesign .bls-category-group {
  border-bottom-color: rgba(32, 34, 52, 0.2);
}

.route-control.route-redesign .bls-category-button {
  border-radius: 8px;
  color: #202234;
}

.route-control.route-redesign .bls-category-button:hover {
  background: rgba(86, 93, 137, 0.1);
}

.route-control.route-redesign .bls-script-item {
  border-radius: 8px;
  color: #313548;
}

.route-control.route-redesign .bls-script-item:hover {
  background: rgba(86, 93, 137, 0.1);
}

.route-control.route-redesign .bls-script-item.is-active {
  background: rgba(86, 93, 137, 0.16);
  color: #202234;
  box-shadow: inset 3px 0 0 #565d89;
}

.route-control.route-redesign .bls-script-action {
  background: rgba(248, 244, 236, 0.9);
  border: 1.5px solid rgba(32, 34, 52, 0.22);
  color: #202234;
}

.route-control.route-redesign .bls-script-action:hover:not(:disabled) {
  background: #f8f4ec;
  border-color: rgba(86, 93, 137, 0.42);
}

.route-control.route-redesign .bls-script-head,
.route-control.route-redesign .bls-nv-head,
.route-control.route-redesign .bls-nv-control-bar {
  background: transparent;
  border-color: rgba(32, 34, 52, 0.1);
}

.route-control.route-redesign .bls-dock-head {
  background: transparent;
  border-color: rgba(32, 34, 52, 0.1);
}

.route-control.route-redesign .bls-script-title,
.route-control.route-redesign .bls-nv-title,
.route-control.route-redesign .bls-dock-title {
  color: #202234;
}

.route-control.route-redesign .bls-protocol-event-title {
  background: transparent !important;
  border-color: rgba(32, 34, 52, 0.10) !important;
}

.route-control.route-redesign .bls-guide-panel,
.route-control.route-redesign .bls-script-prompt,
.route-control.route-redesign .bls-prep-item {
  background: rgba(248, 244, 236, 0.72) !important;
  border-color: rgba(32, 34, 52, 0.22) !important;
}

.route-control.route-redesign .bls-prep-item {
  border-left-color: #565d89;
}

.route-control.route-redesign .bls-prep-script-content input,
.route-control.route-redesign .bls-prep-script-content textarea,
.route-control.route-redesign .timeline-textarea,
.route-control.route-redesign .timeline-code-select,
.route-control.route-redesign .bls-select,
.route-control.route-redesign .bls-link-field {
  background: rgba(248, 244, 236, 0.96) !important;
  border: 1px solid rgba(32, 34, 52, 0.22) !important;
  color: #202234 !important;
}

.route-control.route-redesign .timeline-row {
  border-bottom-color: rgba(32, 34, 52, 0.16);
}

.route-control.route-redesign .timeline-row.is-starter:hover,
.route-control.route-redesign .timeline-row.is-starter:focus-within,
.route-control.route-redesign .timeline-row.is-active {
  background: rgba(86, 93, 137, 0.08) !important;
}

.route-control.route-redesign .timeline-row.is-starter .timeline-copy {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 1.7rem,
      rgba(32, 34, 52, 0.14) 1.7rem,
      rgba(32, 34, 52, 0.14) 1.76rem
    );
}

.route-control.route-redesign .timeline-textarea:focus,
.route-control.route-redesign .bls-prep-script-content input:focus,
.route-control.route-redesign .bls-prep-script-content textarea:focus {
  background: #f8f4ec !important;
  border-color: #565d89 !important;
  box-shadow: 0 0 0 3px rgba(86, 93, 137, 0.14);
}

.route-control.route-redesign .bls-dictation-chip {
  background: rgba(248, 244, 236, 0.92);
  border: 1.5px solid rgba(32, 34, 52, 0.26);
  color: #202234;
}

.route-control.route-redesign .bls-dictation-chip.is-active {
  background: #565d89;
  border-color: #202234;
  color: #f8f4ec;
}

.route-control.route-redesign .bls-dictation-chip.is-danger {
  background: rgba(239, 224, 206, 0.78);
  color: #8a3428;
}

.route-control.route-redesign .bls-nv-control-bar .bls-code-chip {
  border: 1px solid rgba(32, 34, 52, 0.18);
  box-shadow: 2px 3px 0 rgba(32, 34, 52, 0.16);
}

.route-control.route-redesign .bls-dock {
  padding: 0 16px;
}

.route-control.route-redesign .bls-stage-frame {
  background: rgba(232, 224, 211, 0.64) !important;
  border: 1.5px solid rgba(32, 34, 52, 0.2) !important;
  border-radius: 12px;
}

.route-control.route-redesign .bls-stage-frame .stage {
  border: 1.5px solid rgba(248, 244, 236, 0.18) !important;
  box-shadow: 0 16px 32px -26px rgba(32, 34, 52, 0.72) !important;
}

.route-control.route-redesign .bls-control-value,
.route-control.route-redesign .bls-link-meta,
.route-control.route-redesign .bls-dock-foot,
.route-control.route-redesign .timeline-code {
  color: #5b6072;
}

.route-control.route-redesign .bls-dock-controls {
  background: rgba(248, 244, 236, 0.52);
  border: 1.5px solid rgba(32, 34, 52, 0.18);
  border-radius: 12px;
  margin: 0 0.8rem 0.8rem;
}

.route-control.route-redesign .bls-control-stack {
  gap: 0.55rem;
}

.route-control.route-redesign .bls-rep-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  margin: 0.5rem 0 0;
}

.route-control.route-redesign .bls-rep-stat {
  display: grid;
  gap: 0.15rem;
  align-content: center;
  min-height: 0;
  padding: 0.35rem 0.4rem;
  border: 1.5px solid rgba(32, 34, 52, 0.22);
  border-radius: 8px;
  background: rgba(248, 244, 236, 0.86);
  box-shadow: 2px 3px 0 rgba(32, 34, 52, 0.14);
}

.route-control.route-redesign .bls-rep-stat strong {
  color: #202234;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1;
}

.route-control.route-redesign .bls-control-block {
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(32, 34, 52, 0.16);
  border-radius: 10px;
  background: rgba(232, 224, 211, 0.48);
}

.route-control.route-redesign .bls-primary-action {
  background: var(--paper-2);
  border: 1.5px solid #202234;
  color: #202234;
  box-shadow: 3px 4px 0 var(--paper-3);
}

.route-control.route-redesign .bls-secondary-action,
.route-control.route-redesign .bls-link-action {
  background: rgba(248, 244, 236, 0.92);
  border: 1.5px solid rgba(32, 34, 52, 0.24);
  color: #202234;
}

.route-control.route-redesign .bls-secondary-action:disabled {
  color: rgba(32, 34, 52, 0.38);
}

.route-control.route-redesign .bls-link-card {
  margin: 0.8rem;
  padding: 0.8rem;
  border: 1.5px solid rgba(32, 34, 52, 0.18);
  border-radius: 12px;
  background: rgba(248, 244, 236, 0.52);
}

.route-control.route-redesign input[type="range"] {
  accent-color: #565d89;
}

/* EHR workspace dusk/tan color pass */
.route-ehr.route-redesign .ehr-main-layout {
  background:
    radial-gradient(circle at 42% 2%, rgba(86, 93, 137, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(232, 224, 211, 0.72), rgba(203, 196, 191, 0.72));
  border: 1.5px solid rgba(32, 34, 52, 0.22);
  box-shadow:
    6px 6px 0 rgba(32, 34, 52, 0.12),
    0 24px 52px -42px rgba(32, 34, 52, 0.52);
}

.route-ehr.route-redesign .ehr-sidebar,
.route-ehr.route-redesign .ehr-content {
  background: rgba(248, 244, 236, 0.68) !important;
  border-color: rgba(32, 34, 52, 0.24) !important;
}

.route-ehr.route-redesign .ehr-sidebar {
  box-shadow: inset -1px 0 0 rgba(32, 34, 52, 0.08);
}

.route-ehr.route-redesign .ehr-client-card,
.route-ehr.route-redesign .ehr-badges-card,
.route-ehr.route-redesign .ehr-badge-item,
.route-ehr.route-redesign .ehr-badge-stat-card,
.route-ehr.route-redesign .folder-target,
.route-ehr.route-redesign .ehr-session-row,
.route-ehr.route-redesign .ehr-artifact-card,
.route-ehr.route-redesign .ehr-log-card,
.route-ehr.route-redesign .ehr-artifact-item,
.route-ehr.route-redesign .ehr-prep-doc-row,
.route-ehr.route-redesign .ehr-tices-entry,
.route-ehr.route-redesign .ehr-note-summary-item,
.route-ehr.route-redesign .ehr-generated-note-card,
.route-ehr.route-redesign .ehr-nv-card,
.route-ehr.route-redesign .ehr-nv-row,
.route-ehr.route-redesign .ehr-client-details {
  background: rgba(248, 244, 236, 0.78) !important;
  border-color: rgba(32, 34, 52, 0.24) !important;
}

.route-ehr.route-redesign .ehr-client-card,
.route-ehr.route-redesign .ehr-session-row,
.route-ehr.route-redesign .ehr-artifact-card,
.route-ehr.route-redesign .ehr-log-card,
.route-ehr.route-redesign .ehr-prep-doc-row,
.route-ehr.route-redesign .ehr-tices-entry {
  box-shadow: 4px 5px 0 rgba(32, 34, 52, 0.1);
}

.route-ehr.route-redesign .ehr-client-card {
  border: 1.5px solid rgba(32, 34, 52, 0.24);
  border-radius: 12px;
}

.route-ehr.route-redesign .ehr-avatar-large,
.route-ehr.route-redesign .ehr-avatar {
  background: rgba(210, 173, 135, 0.58);
  border: 1.5px solid rgba(163, 101, 63, 0.24);
  color: #a3653f;
}

.route-ehr.route-redesign .ehr-client-card-name,
.route-ehr.route-redesign .ehr-content-header h1,
.route-ehr.route-redesign .ehr-section h2,
.route-ehr.route-redesign .ehr-session-title,
.route-ehr.route-redesign .ehr-artifact-item strong,
.route-ehr.route-redesign .ehr-log-card strong,
.route-ehr.route-redesign .ehr-prep-doc-row strong,
.route-ehr.route-redesign .ehr-badge-title {
  color: #202234;
}

.route-ehr.route-redesign .ehr-client-card-meta,
.route-ehr.route-redesign .ehr-subtitle,
.route-ehr.route-redesign .ehr-session-date,
.route-ehr.route-redesign .ehr-session-desc,
.route-ehr.route-redesign .ehr-artifact-meta,
.route-ehr.route-redesign .ehr-log-copy,
.route-ehr.route-redesign .ehr-prep-doc-row small,
.route-ehr.route-redesign .ehr-badge-copy,
.route-ehr.route-redesign .ehr-badge-progress,
.route-ehr.route-redesign .support-copy {
  color: #5b6072;
}

.route-ehr.route-redesign .ehr-content-header,
.route-ehr.route-redesign .ehr-section h2,
.route-ehr.route-redesign .ehr-detail-row,
.route-ehr.route-redesign .ehr-client-details-head {
  border-color: rgba(32, 34, 52, 0.2);
}

.route-ehr.route-redesign .ehr-content-actions .button-link.primary,
.route-ehr.route-redesign .ehr-client-details-actions .button-link.primary {
  background: var(--paper-2);
  border: 1.5px solid #202234;
  color: #202234;
  box-shadow: 3px 4px 0 var(--paper-3);
}

.route-ehr.route-redesign .ehr-client-info-button,
.route-ehr.route-redesign .button-link.ghost,
.route-ehr.route-redesign .ehr-preview-doc-tab {
  background: rgba(248, 244, 236, 0.9);
  border: 1.5px solid rgba(32, 34, 52, 0.24);
  color: #202234;
}

.route-ehr.route-redesign .ehr-client-info-button:hover,
.route-ehr.route-redesign .button-link.ghost:hover,
.route-ehr.route-redesign .ehr-preview-doc-tab:hover {
  background: #f8f4ec;
  border-color: rgba(86, 93, 137, 0.42);
}

.route-ehr.route-redesign .ehr-record-tabs {
  padding: 0;
  width: 100%;
  max-width: 100%;
  border: none;
  border-bottom: 1.5px solid rgba(32, 34, 52, 0.2);
  border-radius: 0;
  background: transparent;
}

.route-ehr.route-redesign .ehr-record-tab {
  min-height: 36px;
  padding: 8px 16px 10px;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  background: transparent;
  color: #5b6072;
}

.route-ehr.route-redesign .ehr-record-tab:hover {
  color: #202234;
  background: transparent;
  border-color: transparent;
  border-bottom-color: rgba(32, 34, 52, 0.2);
}

.route-ehr.route-redesign .ehr-record-tab.is-active {
  background: transparent;
  border-bottom-color: var(--ember);
  color: #202234;
  font-weight: 600;
}

.route-ehr.route-redesign .ehr-session-row:hover,
.route-ehr.route-redesign .ehr-prep-doc-row:hover,
.route-ehr.route-redesign .folder-target:hover {
  border-color: rgba(86, 93, 137, 0.42) !important;
  background: rgba(248, 244, 236, 0.92) !important;
}

.route-ehr.route-redesign .ehr-session-row.is-selected,
.route-ehr.route-redesign .ehr-prep-doc-row.is-selected,
.route-ehr.route-redesign .folder-target.is-current {
  background: rgba(86, 93, 137, 0.14) !important;
  border-color: rgba(86, 93, 137, 0.42) !important;
}

.route-ehr.route-redesign .ehr-session-status,
.route-ehr.route-redesign .ehr-prep-doc-status {
  background: rgba(86, 93, 137, 0.16);
  color: #565d89;
}

.route-ehr.route-redesign .ehr-session-status.is-complete,
.route-ehr.route-redesign .ehr-prep-doc-status.is-complete {
  background: rgba(86, 93, 137, 0.18);
  color: #202234;
}

.route-ehr.route-redesign .ehr-prep-doc-status.is-progress {
  background: rgba(210, 173, 135, 0.32);
  color: #a3653f;
}

.route-ehr.route-redesign .ehr-prep-doc-status.is-empty {
  background: rgba(32, 34, 52, 0.08);
  color: #5b6072;
}

.route-ehr.route-redesign .ehr-badge-item.is-earned,
.route-ehr.route-redesign .ehr-badge-stat-card {
  background: linear-gradient(180deg, rgba(248, 244, 236, 0.94), rgba(239, 224, 206, 0.82)) !important;
  border-color: rgba(163, 101, 63, 0.28) !important;
}

.route-ehr.route-redesign .ehr-badge-status,
.route-ehr.route-redesign .ehr-nv-code {
  background: rgba(86, 93, 137, 0.14);
  color: #202234;
}

.route-ehr.route-redesign .ehr-generated-note-text,
.route-ehr.route-redesign .ehr-detail-input,
.route-ehr.route-redesign input,
.route-ehr.route-redesign textarea,
.route-ehr.route-redesign select {
  background: rgba(248, 244, 236, 0.96) !important;
  border-color: rgba(32, 34, 52, 0.22) !important;
  color: #202234 !important;
}

.route-ehr.route-redesign .ehr-preview-pane {
  background:
    radial-gradient(circle at 20% 0%, rgba(86, 93, 137, 0.08), transparent 32%),
    rgba(232, 224, 211, 0.96);
  border: 1.5px solid rgba(32, 34, 52, 0.28);
  box-shadow:
    8px 8px 0 rgba(32, 34, 52, 0.18),
    0 26px 62px -36px rgba(32, 34, 52, 0.58);
}

.route-ehr.route-redesign .ehr-preview-pane-head,
.route-ehr.route-redesign .ehr-preview-pane-tools,
.route-ehr.route-redesign .ehr-preview-doc-tabs {
  background: rgba(248, 244, 236, 0.66);
  border-color: rgba(32, 34, 52, 0.2);
}

.route-ehr.route-redesign .ehr-preview-doc-tab.is-active {
  background: #565d89;
  border-color: #202234;
  color: #f8f4ec;
}

/* Align EHR workspace surface with scripts/forms */
.route-ehr.route-redesign .ehr-main-layout {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.route-ehr.route-redesign .ehr-sidebar,
.route-ehr.route-redesign .ehr-content {
  background: transparent !important;
}

.route-ehr.route-redesign .ehr-sidebar {
  border-right: 1.5px solid rgba(32, 34, 52, 0.22) !important;
  box-shadow: none;
  padding-top: 74px;
}

.route-ehr.route-redesign .ehr-content {
  padding-top: 32px;
}

@media (max-width: 900px) {
  .route-ehr.route-redesign .ehr-sidebar {
    padding-top: 22px;
  }
}

.route-ehr.route-redesign .ehr-client-card,
.route-ehr.route-redesign .ehr-session-row,
.route-ehr.route-redesign .ehr-artifact-card,
.route-ehr.route-redesign .ehr-log-card,
.route-ehr.route-redesign .ehr-prep-doc-row,
.route-ehr.route-redesign .ehr-tices-entry {
  background: rgba(248, 244, 236, 0.78) !important;
  box-shadow:
    4px 5px 0 rgba(32, 34, 52, 0.12),
    0 14px 28px -24px rgba(32, 34, 52, 0.38);
}

.route-ehr.route-redesign .ehr-record-tabs {
  background: transparent;
  border-color: rgba(32, 34, 52, 0.2);
}

.route-ehr.route-redesign .ehr-content-header {
  border-bottom-color: rgba(32, 34, 52, 0.2);
}

/* Scripts and forms structure pass: same colors, clearer work boxes */
.route-prep.route-redesign .prep-document {
  background: rgba(248, 244, 236, 0.58) !important;
  border: 1.5px solid rgba(32, 34, 52, 0.2) !important;
  border-radius: 12px;
  box-shadow:
    5px 6px 0 rgba(32, 34, 52, 0.12),
    0 18px 34px -28px rgba(32, 34, 52, 0.44) !important;
}

.route-prep.route-redesign .packet-card:not(.prep-document) {
  background: rgba(248, 244, 236, 0.5) !important;
  border: 1.5px solid rgba(32, 34, 52, 0.18) !important;
  border-radius: 12px;
  box-shadow:
    4px 5px 0 rgba(32, 34, 52, 0.1),
    0 16px 30px -28px rgba(32, 34, 52, 0.38) !important;
}

.route-prep.route-redesign .packet-doc-body {
  padding: 0.2rem;
}

.route-prep.route-redesign .packet-subsection,
.route-prep.route-redesign .packet-doc-body .packet-section,
.route-prep.route-redesign .packet-section-stack > .packet-section,
.route-prep.route-redesign .target-event-table,
.route-prep.route-redesign .exercise-script-step,
.route-prep.route-redesign .rdi-resource-card {
  border: 1.5px solid rgba(32, 34, 52, 0.18) !important;
  box-shadow:
    3px 4px 0 rgba(32, 34, 52, 0.09),
    0 12px 24px -22px rgba(32, 34, 52, 0.34);
}

.route-prep.route-redesign .packet-table-row,
.route-prep.route-redesign .tx-plan-target-events .target-event-row,
.route-prep.route-redesign .tx-plan-triggers .tx-plan-trigger-row,
.route-prep.route-redesign .tx-plan-resources .resource-row {
  box-shadow: 0 10px 20px -18px rgba(32, 34, 52, 0.34);
}

.route-prep.route-redesign .packet-doc-body textarea,
.route-prep.route-redesign .packet-doc-body input,
.route-prep.route-redesign .packet-doc-body select {
  box-shadow: inset 0 0 0 1px rgba(32, 34, 52, 0.03);
}

/* Treatment plan: keep the page open, box each section individually */
.route-prep.route-redesign .prep-document[data-prep-doc="tx-plan"] {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.route-prep.route-redesign .tx-plan-overview {
  display: grid;
  gap: 18px;
  margin-top: 0;
  background: rgba(248, 244, 236, 0.58) !important;
  border: 1.5px solid rgba(32, 34, 52, 0.18) !important;
  border-radius: 12px;
  padding: 1rem;
  box-shadow:
    3px 4px 0 rgba(32, 34, 52, 0.09),
    0 12px 24px -22px rgba(32, 34, 52, 0.34);
}

.route-prep.route-redesign .tx-plan-overview .packet-sheet-head {
  margin-bottom: 0;
}

/* Scripts/forms homepage-aligned box treatment */
.route-prep.route-redesign {
  --prep-box-bg: rgba(248, 244, 236, 0.8);
  --prep-box-border: #202234;
  --prep-box-shadow:
    6px 7px 0 rgba(32, 34, 52, 0.34),
    0 18px 42px -34px rgba(28, 31, 46, 0.46);
}

.route-prep.route-redesign .prep-document:not([data-prep-doc="tx-plan"]),
.route-prep.route-redesign .packet-card:not(.prep-document),
.route-prep.route-redesign .packet-nav-button,
.route-prep.route-redesign .packet-nav-item,
.route-prep.route-redesign .packet-subsection,
.route-prep.route-redesign .tx-plan-overview,
.route-prep.route-redesign .packet-doc-body .packet-section,
.route-prep.route-redesign .packet-section-stack > .packet-section,
.route-prep.route-redesign .target-event-table,
.route-prep.route-redesign .exercise-script-step,
.route-prep.route-redesign .rdi-resource-card,
.route-prep.route-redesign .prep-inline-checklist label,
.route-prep.route-redesign .readiness-sheet label,
.route-prep.route-redesign .packet-table-row,
.route-prep.route-redesign .target-event-row,
.route-prep.route-redesign .tx-plan-trigger-row,
.route-prep.route-redesign .resource-row {
  background: var(--prep-box-bg) !important;
  border: 1.5px solid var(--prep-box-border) !important;
  border-radius: 8px !important;
  box-shadow: var(--prep-box-shadow) !important;
}

.route-prep.route-redesign .prep-document[data-prep-doc="tx-plan"] {
  background: transparent !important;
  border: none !important;
}

.route-prep.route-redesign .packet-nav-button.is-active,
.route-prep.route-redesign .packet-nav-item.is-active {
  background: var(--prep-box-bg) !important;
  border-color: var(--prep-box-border) !important;
  box-shadow:
    5px 6px 0 rgba(86, 93, 137, 0.34),
    0 18px 42px -34px rgba(28, 31, 46, 0.46) !important;
}

.route-prep.route-redesign .forms-tab-bar {
  background: transparent;
  border-color: var(--line);
  border-radius: 0;
}

.route-prep.route-redesign .forms-tab.is-active {
  border-bottom-color: var(--ember);
}

.route-prep.route-redesign .packet-doc-body textarea,
.route-prep.route-redesign .packet-doc-body input,
.route-prep.route-redesign .packet-doc-body select {
  background: rgba(248, 244, 236, 0.92) !important;
  border: 1.5px solid rgba(32, 34, 52, 0.22) !important;
  border-radius: 8px !important;
  box-shadow: none;
}

.route-prep.route-redesign .client-bls-workspace-doc .client-bls-workspace-preview {
  margin-top: 12px;
}

.route-prep.route-redesign .client-bls-workspace-doc .client-bls-workspace-preview .portal-bls-belief-panel {
  width: 100%;
  max-width: none;
  box-shadow: none;
}

.route-prep.route-redesign .client-bls-workspace-doc .client-bls-workspace-preview .portal-bls-belief-body {
  max-height: none;
}

.route-prep.route-redesign .client-bls-workspace-doc .client-bls-fallback-panel .portal-bls-belief-body {
  min-height: 112px;
  justify-content: center;
}

/* Prep checklist: list treatment, not cards */
.route-prep.route-redesign .prep-inline-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.6rem;
  row-gap: 0.45rem;
  margin: 0 0 1rem;
}

.route-prep.route-redesign .prep-inline-checklist .checkbox-card,
.route-prep.route-redesign .prep-inline-checklist label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  min-height: 0;
  padding: 0.15rem 0;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.route-prep.route-redesign .prep-inline-checklist input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.route-prep.route-redesign .prep-inline-checklist strong {
  font-size: 0.9rem;
  line-height: 1.25;
  color: #5b6072;
}

@media (max-width: 760px) {
  .route-prep.route-redesign .prep-inline-checklist {
    grid-template-columns: 1fr;
  }
}

/* Scripts/forms: remove nested row boxes inside section cards */
.route-prep.route-redesign .packet-subsection .packet-table-row,
.route-prep.route-redesign .packet-subsection .target-event-row,
.route-prep.route-redesign .packet-subsection .tx-plan-trigger-row,
.route-prep.route-redesign .packet-subsection .resource-row,
.route-prep.route-redesign .packet-subsection .target-event-table {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.route-prep.route-redesign .packet-subsection .target-event-table {
  padding: 0 !important;
}

.route-prep.route-redesign .packet-subsection .packet-table-row + .packet-table-row,
.route-prep.route-redesign .packet-subsection .target-event-row + .target-event-row,
.route-prep.route-redesign .packet-subsection .tx-plan-trigger-row + .tx-plan-trigger-row,
.route-prep.route-redesign .packet-subsection .resource-row + .resource-row {
  border-top: 1px solid rgba(32, 34, 52, 0.18) !important;
}

/* Full-bleed nav with fixed-width page bodies */
:root {
  --page-max-width: 1680px;
  --page-edge-padding: 1rem;
  --topbar-window-gap: 1.1rem;
}

.route-folder.route-redesign .redesign-shell,
.route-prep.route-redesign .redesign-shell,
.route-control.route-redesign .redesign-shell {
  width: min(var(--page-max-width), calc(100vw - (var(--page-edge-padding) * 2)));
  max-width: var(--page-max-width);
  margin-inline: auto;
}

body:not(.route-public-home):not(.client-mode) .topbar {
  box-sizing: border-box;
  width: calc(100vw - (var(--page-edge-padding) * 2));
  max-width: none;
  margin-left: calc(50% - 50vw + var(--page-edge-padding));
  margin-right: 0;
  padding-left: clamp(18px, 2vw, 32px);
  padding-right: clamp(18px, 2vw, 32px);
}

body:not(.client-mode) .topbar {
  margin-top: 0;
}

body:not(.route-public-home):not(.client-mode) .app-shell {
  padding-top: var(--topbar-window-gap) !important;
}

body:not(.route-public-home):not(.client-mode).route-redesign .topbar,
body:not(.route-public-home):not(.client-mode) .route-redesign .topbar {
  top: var(--topbar-window-gap);
}

/* Client portal topbar: use the same placement system as therapist/login pages */
body.route-portal.client-mode .app-shell {
  padding-top: var(--topbar-window-gap) !important;
}

body.route-portal.client-mode .topbar {
  box-sizing: border-box;
  width: calc(100vw - (var(--page-edge-padding) * 2));
  max-width: none;
  margin-left: calc(50% - 50vw + var(--page-edge-padding));
  margin-right: 0;
  margin-bottom: 1rem !important;
  padding-left: clamp(18px, 2vw, 32px) !important;
  padding-right: clamp(18px, 2vw, 32px) !important;
}

/* Auth screens: match the main BLS page edge padding and topbar placement */
body.route-auth .auth-shell {
  width: min(var(--page-max-width), calc(100vw - (var(--page-edge-padding) * 2)));
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding-top: var(--topbar-window-gap) !important;
}

body.route-auth .topbar {
  min-height: 75px;
  margin: 0 0 1rem !important;
  position: relative !important;
  top: auto !important;
  z-index: 50;
}

body.route-auth .auth-layout {
  padding: 24px 28px 36px;
}

body.route-auth .auth-card,
body.route-auth .start-card {
  box-shadow: 0 18px 48px rgba(32, 34, 52, 0.12), 0 2px 8px rgba(32, 34, 52, 0.06);
}

/* BLS workspace: match the other app pages without an extra outer frame */
body.route-control:not(.client-mode).route-redesign .workspace.control-workspace.bls-design-workspace {
  box-sizing: border-box;
  width: 100%;
  max-width: none !important;
  margin: 0;
  padding: 24px 6px 36px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  min-height: calc(var(--bls-panel-height) + 60px);
  overflow: visible;
}

/* Client login: use homepage-style sibling cards without a wrapper frame */
.route-client-login .auth-layout {
  align-items: center;
  padding: 24px 28px 36px;
}

.route-client-login .auth-card.auth-client-card {
  width: min(1100px, calc(100vw - 44px));
  max-width: 1100px;
  padding: 0;
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  box-shadow: none !important;
}

.route-client-login .auth-card.auth-client-card > .panel-head {
  max-width: 1100px;
  margin: 0 0 0.85rem;
}

.route-client-login .auth-client-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  align-items: stretch;
}

.route-client-login .auth-subcard {
  align-content: start;
  min-height: 360px;
  padding: clamp(1.45rem, 2.5vw, 1.9rem);
  border: 1px solid rgba(217, 205, 180, 0.6) !important;
  border-radius: 12px;
  background: rgba(255, 252, 247, 0.9) !important;
  box-shadow: 0 8px 28px rgba(32, 34, 52, 0.1), 0 2px 6px rgba(32, 34, 52, 0.05) !important;
}

.route-client-login .auth-subcard h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.1vw, 2.45rem);
  line-height: 0.98;
}

.route-client-login .auth-form {
  gap: 0.85rem;
}

.route-client-login .auth-card.auth-client-card > .support-copy {
  margin: 1rem 0 0;
}

@media (max-width: 760px) {
  .route-client-login .auth-client-grid {
    grid-template-columns: 1fr;
  }
}

/* Homepage visual language shared with the app shell */
body:not(.client-mode) .topbar {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background:
    linear-gradient(135deg, #565d89 0%, #474d70 44%, #202234 118%) !important;
  border: 2px solid #202234 !important;
  box-shadow:
    7px 7px 0 rgba(32, 34, 52, 0.86),
    0 18px 40px -28px rgba(32, 34, 52, 0.72) !important;
}

body:not(.client-mode) .topbar.account-menu-open {
  overflow: visible;
  z-index: 120;
}

body:not(.client-mode) .topbar::after {
  content: "";
  position: absolute;
  left: clamp(210px, 18vw, 260px);
  top: 50%;
  width: 120px;
  height: 20px;
  opacity: 0.5;
  background:
    linear-gradient(135deg, transparent 0 10px, #f8f4ec 10px 12px, transparent 12px 22px) 0 0 / 22px 20px repeat-x;
  transform: translateY(-50%);
  pointer-events: none;
}

body:not(.client-mode) .topbar > * {
  position: relative;
  z-index: 1;
}

/* BLS page: bring panels closer to the homepage card style */
body.route-control:not(.client-mode).route-redesign .bls-phase-rail,
body.route-control:not(.client-mode).route-redesign .bls-script-column,
body.route-control:not(.client-mode).route-redesign #blsNvCenter,
body.route-control:not(.client-mode).route-redesign .bls-nv-center,
body.route-control:not(.client-mode).route-redesign .bls-dock {
  border: 1.5px solid #202234 !important;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(248, 244, 236, 0.92), rgba(232, 224, 211, 0.84)),
    linear-gradient(135deg, rgba(86, 93, 137, 0.08), transparent 56%) !important;
  box-shadow:
    7px 8px 0 rgba(32, 34, 52, 0.22),
    0 18px 48px -38px rgba(28, 31, 46, 0.52) !important;
}

body.route-control:not(.client-mode).route-redesign .bls-dock-controls,
body.route-control:not(.client-mode).route-redesign .bls-stage-frame,
body.route-control:not(.client-mode).route-redesign .bls-control-block,
body.route-control:not(.client-mode).route-redesign .bls-rep-stat,
body.route-control:not(.client-mode).route-redesign .bls-protocol-event-title,
body.route-control:not(.client-mode).route-redesign .bls-guide-panel,
body.route-control:not(.client-mode).route-redesign .bls-script-prompt,
body.route-control:not(.client-mode).route-redesign .bls-prep-item {
  border: 1.5px solid rgba(32, 34, 52, 0.42) !important;
  border-radius: 8px !important;
  background:
    linear-gradient(180deg, rgba(248, 244, 236, 0.92), rgba(232, 224, 211, 0.84)),
    linear-gradient(135deg, rgba(210, 173, 135, 0.12), transparent 58%) !important;
  box-shadow:
    4px 5px 0 rgba(32, 34, 52, 0.18),
    0 14px 32px -28px rgba(28, 31, 46, 0.48) !important;
}

/* Badges: reserve separate space for art and actions on therapist + client views */
.route-ehr.route-redesign .ehr-badge-list {
  align-items: stretch;
}

.route-ehr.route-redesign #ehrBadgeList .ehr-badge-item {
  display: grid !important;
  grid-template-rows: 150px auto;
  justify-items: center;
  align-items: start;
  width: 190px !important;
  min-height: 224px;
  padding: 10px 10px 14px !important;
  text-align: center;
  overflow: visible;
}

.route-ehr.route-redesign #ehrBadgeList .badge-art {
  width: 180px;
  height: 150px;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  filter: none;
}

.route-ehr.route-redesign #ehrBadgeList .badge-art > div {
  width: 360px;
  height: 420px;
  flex: 0 0 auto;
  transform: scale(0.36);
  transform-origin: top center;
}

.route-ehr.route-redesign #ehrBadgeList .badge-art.is-locked-art {
  filter: grayscale(100%) opacity(0.5);
}

.route-ehr.route-redesign #ehrBadgeList .ehr-badge-actions {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  min-height: 58px;
  padding-top: 4px;
}

.route-ehr.route-redesign #ehrBadgeList .ehr-badge-unlock {
  width: 100%;
  max-width: 150px;
  margin: 0;
  white-space: nowrap;
}

.route-portal .portal-badge-item {
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.route-portal .portal-badge-art {
  width: 108px;
  height: 126px;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.route-portal .portal-badge-art > div {
  width: 360px;
  height: 420px;
  flex: 0 0 auto;
  transform: scale(0.3);
  transform-origin: top center;
}

.route-portal .portal-badge-copy {
  min-width: 0;
}

/* BLS controls: keep labels contained inside narrow buttons/cards */
body.route-control:not(.client-mode).route-redesign .bls-dock-controls,
body.route-control:not(.client-mode).route-redesign .bls-dock-controls * {
  box-sizing: border-box;
}

body.route-control:not(.client-mode).route-redesign .bls-transport-grid,
body.route-control:not(.client-mode).route-redesign .bls-rep-panel,
body.route-control:not(.client-mode).route-redesign .bls-link-card-head {
  min-width: 0;
}

body.route-control:not(.client-mode).route-redesign .bls-primary-action,
body.route-control:not(.client-mode).route-redesign .bls-secondary-action,
body.route-control:not(.client-mode).route-redesign .bls-link-action,
body.route-control:not(.client-mode).route-redesign .bls-dictation-chip,
body.route-control:not(.client-mode).route-redesign .bls-code-chip {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.12;
  text-align: center;
}

body.route-control:not(.client-mode).route-redesign .bls-primary-action,
body.route-control:not(.client-mode).route-redesign .bls-secondary-action,
body.route-control:not(.client-mode).route-redesign .bls-link-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.58rem 0.42rem;
  font-size: clamp(0.68rem, 0.74vw, 0.78rem);
}

body.route-control:not(.client-mode).route-redesign .bls-rep-stat {
  min-width: 0;
  overflow: hidden;
  justify-items: center;
  text-align: center;
}

body.route-control:not(.client-mode).route-redesign .bls-rep-stat .bls-control-label {
  max-width: 100%;
  font-size: clamp(0.44rem, 0.52vw, 0.54rem);
  line-height: 1.1;
  letter-spacing: 0.06em;
  white-space: normal;
  word-break: break-word;
  text-align: center;
}

body.route-control:not(.client-mode).route-redesign .bls-rep-stat strong {
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(1.0rem, 1.6vw, 1.35rem);
  line-height: 1;
  text-align: center;
}

body.route-control:not(.client-mode).route-redesign .bls-link-card-head {
  align-items: stretch;
}

body.route-control:not(.client-mode).route-redesign .bls-link-card-head > div {
  min-width: 0;
}

body.route-control:not(.client-mode).route-redesign .bls-link-card-head .portal-account-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
}

body.route-control:not(.client-mode).route-redesign .bls-link-card-head .bls-link-action {
  flex: 0 0 auto;
  white-space: nowrap;
}

body.route-control:not(.client-mode).route-redesign #createClientLink {
  flex-basis: auto;
}

/* BLS right rail: avoid double-framing the preview and controls inside the dock */
body.route-control:not(.client-mode).route-redesign .bls-stage-frame,
body.route-control:not(.client-mode).route-redesign .bls-dock-controls {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.route-control:not(.client-mode).route-redesign .bls-stage-frame {
  padding: 0 !important;
}

body.route-control:not(.client-mode).route-redesign .bls-dock-controls {
  padding: 0 !important;
  margin-top: 0.9rem !important;
}

/* Therapist workspace pages: match the therapist login topbar placement */
body.route-redesign:not(.client-mode) .app-shell {
  padding-top: var(--topbar-window-gap) !important;
}

body.route-redesign:not(.client-mode) .topbar {
  position: relative !important;
  top: auto !important;
  margin-top: 0 !important;
  margin-bottom: 1rem !important;
}

/* User theme toggle */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-toggle {
  --theme-toggle-mask: #11132a;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  color: #f8f4ec;
  background: rgba(248, 244, 236, 0.12);
  border: 1.5px solid rgba(248, 244, 236, 0.34);
  box-shadow: none;
}

.theme-toggle:hover {
  background: rgba(248, 244, 236, 0.2);
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(210, 173, 135, 0.55);
  outline-offset: 2px;
}

.theme-toggle-icon {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle-icon-moon {
  fill: currentColor;
  stroke: none;
}

.theme-toggle-icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle-icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle-icon-sun {
  display: block;
}

:root[data-theme="dark"] {
  --paper: #11131f;
  --paper-2: #171a2b;
  --paper-3: #222640;
  --paper-soft: #20253c;
  --ink: #f5efe4;
  --ink-2: #e8dfd1;
  --ink-3: #d2ccdd;
  --ink-4: #c2bdd1;
  --line: rgba(218, 207, 190, 0.2);
  --line-2: rgba(218, 207, 190, 0.3);
  --moss: #9ca5d5;
  --moss-2: #c3c8ea;
  --moss-soft: rgba(156, 165, 213, 0.28);
  --moss-wash: rgba(156, 165, 213, 0.16);
  --ember: #e1a06e;
  --ember-soft: rgba(225, 160, 110, 0.28);
  --amber-wash: rgba(210, 173, 135, 0.16);
  --stream: #73b5c8;
  --stream-2: #9ecde0;
  --stream-soft: rgba(115, 181, 200, 0.22);
  --panel: rgba(23, 26, 43, 0.86);
  --panel-strong: rgba(28, 32, 52, 0.96);
  --surface: rgba(23, 26, 43, 0.82);
  --surface-strong: rgba(28, 32, 52, 0.94);
  --muted: var(--ink-3);
  --accent: var(--moss);
  --accent-strong: var(--moss-2);
  --accent-soft: var(--moss-soft);
  --shadow: 7px 8px 0 rgba(0, 0, 0, 0.36), 0 24px 60px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] body {
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 10%, rgba(156, 165, 213, 0.16), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(225, 160, 110, 0.1), transparent 28%),
    linear-gradient(180deg, #11131f 0%, #171a2b 54%, #10121d 100%) !important;
}

html[data-theme="dark"] body.route-portal.route-redesign {
  background:
    radial-gradient(circle at 18% 12%, rgba(156, 165, 213, 0.14), transparent 34%),
    linear-gradient(180deg, #11131f 0%, #171a2b 100%) !important;
}

html[data-theme="dark"] body:not(.client-mode) .topbar {
  background:
    linear-gradient(135deg, #252b4b 0%, #1a1f36 48%, #0d0f1a 118%) !important;
  border-color: rgba(232, 223, 209, 0.18) !important;
  color: var(--ink);
  box-shadow:
    7px 7px 0 rgba(0, 0, 0, 0.52),
    0 20px 48px -30px rgba(0, 0, 0, 0.72) !important;
}

html[data-theme="dark"] body:not(.client-mode) .topbar::after {
  background:
    linear-gradient(135deg, transparent 0 10px, rgba(248, 244, 236, 0.72) 10px 12px, transparent 12px 22px) 0 0 / 22px 20px repeat-x;
}

html[data-theme="dark"] body:not(.route-public-home):not(.client-mode) .topbar .brand,
html[data-theme="dark"] body:not(.route-public-home):not(.client-mode) .topbar .topbar-copy,
html[data-theme="dark"] body:not(.route-public-home):not(.client-mode) .topbar .topbar-client strong,
html[data-theme="dark"] body:not(.route-public-home):not(.client-mode) .topbar .topbar-client span,
html[data-theme="dark"] .route-redesign .brand,
html[data-theme="dark"] .route-redesign .topbar-client strong,
html[data-theme="dark"] .route-redesign .topbar-client span {
  color: var(--ink);
}

html[data-theme="dark"] body:not(.route-public-home):not(.client-mode) .topnav a,
html[data-theme="dark"] .route-redesign .topnav a {
  color: rgba(245, 239, 228, 0.72);
}

html[data-theme="dark"] body:not(.route-public-home):not(.client-mode) .topnav a.is-current,
html[data-theme="dark"] body:not(.route-public-home):not(.client-mode) .topnav a.is-active,
html[data-theme="dark"] body:not(.route-public-home):not(.client-mode) .topnav a[aria-current="page"],
html[data-theme="dark"] body:not(.route-public-home):not(.client-mode) .topnav a:hover,
html[data-theme="dark"] .route-redesign .topnav a.is-active,
html[data-theme="dark"] .route-redesign .topnav a[aria-current="page"] {
  color: #fffaf0;
  border-bottom-color: var(--ember);
}

html[data-theme="dark"] .theme-toggle {
  --theme-toggle-mask: #1a1f36;
  color: #f8f4ec;
  background: rgba(248, 244, 236, 0.14);
  border-color: rgba(248, 244, 236, 0.36);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] body:not(.client-mode) input,
html[data-theme="dark"] body:not(.client-mode) textarea,
html[data-theme="dark"] body:not(.client-mode) select,
html[data-theme="dark"] .route-redesign input,
html[data-theme="dark"] .route-redesign textarea,
html[data-theme="dark"] .route-redesign select,
html[data-theme="dark"] .route-ehr.route-redesign input,
html[data-theme="dark"] .route-ehr.route-redesign textarea,
html[data-theme="dark"] .route-ehr.route-redesign select,
html[data-theme="dark"] .route-prep.route-redesign textarea,
html[data-theme="dark"] .route-prep.route-redesign input[type="text"],
html[data-theme="dark"] .route-prep.route-redesign input[type="number"],
html[data-theme="dark"] .route-prep.route-redesign input[type="email"],
html[data-theme="dark"] .route-prep.route-redesign input[type="tel"],
html[data-theme="dark"] .route-prep.route-redesign input[type="date"],
html[data-theme="dark"] .route-prep.route-redesign input:not([type]),
html[data-theme="dark"] .route-prep.route-redesign select {
  background: rgba(12, 14, 24, 0.88) !important;
  border-color: rgba(232, 223, 209, 0.24) !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: rgba(245, 239, 228, 0.48);
}

html[data-theme="dark"] label,
html[data-theme="dark"] small,
html[data-theme="dark"] .support-copy,
html[data-theme="dark"] .sheet-caption,
html[data-theme="dark"] .phase-description,
html[data-theme="dark"] .entry-meta,
html[data-theme="dark"] .route-redesign .support-copy,
html[data-theme="dark"] .route-redesign .sheet-caption,
html[data-theme="dark"] .route-redesign small {
  color: var(--ink-3);
}

html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .route-redesign .eyebrow,
html[data-theme="dark"] .route-redesign .preview-label {
  color: #d2ad87;
}

html[data-theme="dark"] .hero,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .client-banner,
html[data-theme="dark"] .start-card,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .auth-subcard,
html[data-theme="dark"] .page-overview,
html[data-theme="dark"] .packet-card,
html[data-theme="dark"] .target-card,
html[data-theme="dark"] .storage-card,
html[data-theme="dark"] .bundle-card,
html[data-theme="dark"] .entry-card,
html[data-theme="dark"] .session-artifact-card,
html[data-theme="dark"] .portal-account-card,
html[data-theme="dark"] .portal-linked-card,
html[data-theme="dark"] .session-link-card,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .draft-card,
html[data-theme="dark"] .step-card,
html[data-theme="dark"] .checkbox-card,
html[data-theme="dark"] .nudge-card,
html[data-theme="dark"] .route-redesign .panel,
html[data-theme="dark"] .route-redesign .packet-card,
html[data-theme="dark"] .route-redesign .storage-card,
html[data-theme="dark"] .route-redesign .bundle-card,
html[data-theme="dark"] .route-redesign .session-bundle,
html[data-theme="dark"] .route-redesign .preview-tile,
html[data-theme="dark"] .route-redesign .folder-target,
html[data-theme="dark"] .route-redesign .portal-linked-card,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-client-card,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-badges-card,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-badge-item,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-badge-stat-card,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-session-row,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-artifact-card,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-log-card,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-artifact-item,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-prep-doc-row,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-tices-entry,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-note-summary-item,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-generated-note-card,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-nv-card,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-nv-row,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-client-details,
html[data-theme="dark"] .route-prep.route-redesign .portal-side-card,
html[data-theme="dark"] .route-prep.route-redesign .portal-badge-item,
html[data-theme="dark"] .route-prep.route-redesign .portal-settings-group,
html[data-theme="dark"] .route-prep.route-redesign .portal-badge-stat,
html[data-theme="dark"] .route-prep.route-redesign .portal-tices-entry,
html[data-theme="dark"] .route-prep.route-redesign .portal-tices-empty,
html[data-theme="dark"] .route-prep.route-redesign .portal-tices-timeline-item,
html[data-theme="dark"] .route-prep.route-redesign .portal-tices-timeline-empty,
html[data-theme="dark"] .route-prep.route-redesign .portal-tices-readonly-field,
html[data-theme="dark"] .route-portal.route-redesign .portal-tices-timeline-item,
html[data-theme="dark"] .route-portal.route-redesign .portal-tices-timeline-empty,
html[data-theme="dark"] .route-portal.route-redesign .portal-tices-readonly-field,
html[data-theme="dark"] .route-control.route-redesign .bls-phase-rail,
html[data-theme="dark"] .route-control.route-redesign .bls-script-column,
html[data-theme="dark"] .route-control.route-redesign #blsNvCenter,
html[data-theme="dark"] .route-control.route-redesign .bls-nv-center,
html[data-theme="dark"] .route-control.route-redesign .bls-dock,
html[data-theme="dark"] .route-control.route-redesign .bls-control-block,
html[data-theme="dark"] .route-control.route-redesign .bls-rep-stat,
html[data-theme="dark"] .route-control.route-redesign .bls-protocol-event-title,
html[data-theme="dark"] .route-control.route-redesign .bls-guide-panel,
html[data-theme="dark"] .route-control.route-redesign .bls-script-prompt,
html[data-theme="dark"] .route-control.route-redesign .bls-prep-item {
  background: rgba(23, 26, 43, 0.86) !important;
  border-color: rgba(232, 223, 209, 0.2) !important;
  color: var(--ink) !important;
  box-shadow:
    5px 6px 0 rgba(0, 0, 0, 0.28),
    0 18px 44px -30px rgba(0, 0, 0, 0.72) !important;
}

html[data-theme="dark"] .route-prep.route-redesign {
  --prep-box-bg: rgba(23, 26, 43, 0.88);
  --prep-box-border: rgba(232, 223, 209, 0.28);
  --prep-box-shadow:
    5px 6px 0 rgba(0, 0, 0, 0.3),
    0 18px 42px -30px rgba(0, 0, 0, 0.72);
}

html[data-theme="dark"] .route-prep.route-redesign .prep-document[data-prep-doc="tx-plan"] {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .route-prep.route-redesign .des-question,
html[data-theme="dark"] .route-prep.route-redesign .readiness-row {
  background: rgba(232, 223, 209, 0.06) !important;
  border-color: rgba(232, 223, 209, 0.14) !important;
}

html[data-theme="dark"] .route-redesign .panel-head h2,
html[data-theme="dark"] .route-redesign .panel-head h3,
html[data-theme="dark"] .route-redesign .nv-dock-title h2,
html[data-theme="dark"] .route-redesign .script-dock-title h2,
html[data-theme="dark"] .route-redesign .packet-sheet-head h2,
html[data-theme="dark"] .route-redesign .packet-sheet-head h3,
html[data-theme="dark"] .route-redesign .document-title,
html[data-theme="dark"] .route-profile.route-redesign .profile-header h1,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-client-card-name,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-content-header h1,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-section h2,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-session-title,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-artifact-item strong,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-log-card strong,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-prep-doc-row strong,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-badge-title,
html[data-theme="dark"] .route-auth .auth-card h1,
html[data-theme="dark"] .route-auth .start-card h1 {
  color: var(--ink) !important;
}

html[data-theme="dark"] .route-ehr.route-redesign .ehr-client-card-meta,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-subtitle,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-session-date,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-session-desc,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-artifact-meta,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-log-copy,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-prep-doc-row small,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-badge-copy,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-badge-progress {
  color: var(--ink-3) !important;
}

html[data-theme="dark"] .button-link.ghost,
html[data-theme="dark"] button.ghost,
html[data-theme="dark"] .route-redesign .button-link.ghost,
html[data-theme="dark"] .route-redesign .ghost,
html[data-theme="dark"] .route-redesign .share-menu-item,
html[data-theme="dark"] .route-control.route-redesign .bls-secondary-action,
html[data-theme="dark"] .route-control.route-redesign .bls-link-action,
html[data-theme="dark"] .route-control.route-redesign .bls-script-action {
  background: rgba(245, 239, 228, 0.08) !important;
  border-color: rgba(245, 239, 228, 0.24) !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] .button-link.primary,
html[data-theme="dark"] button.primary,
html[data-theme="dark"] .route-redesign .button-link.primary,
html[data-theme="dark"] .route-redesign .primary,
html[data-theme="dark"] .route-control.route-redesign .bls-primary-action {
  background: var(--paper-3) !important;
  border-color: rgba(245, 239, 228, 0.34) !important;
  color: var(--ink) !important;
  box-shadow: 4px 5px 0 rgba(245, 239, 228, 0.08) !important;
}

html[data-theme="dark"] .route-redesign .account-menu-trigger,
html[data-theme="dark"] body:not(.route-public-home):not(.client-mode) .account-menu-trigger,
html[data-theme="dark"] body:not(.route-public-home):not(.client-mode) .selector-field select {
  background: rgba(245, 239, 228, 0.1) !important;
  border-color: rgba(245, 239, 228, 0.3) !important;
  color: var(--ink) !important;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] .route-profile.route-redesign .profile-tab {
  background: rgba(245, 239, 228, 0.1) !important;
  border-color: rgba(245, 239, 228, 0.28) !important;
  color: var(--ink) !important;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.26) !important;
}

html[data-theme="dark"] .route-profile.route-redesign .profile-tab.is-active {
  background: rgba(156, 165, 213, 0.2) !important;
  border-color: rgba(156, 165, 213, 0.44) !important;
  color: var(--ink) !important;
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.34) !important;
}

html[data-theme="dark"] .route-profile.route-redesign .profile-tier-card,
html[data-theme="dark"] .route-profile.route-redesign .profile-usage-card,
html[data-theme="dark"] .route-profile.route-redesign .form-callout {
  background: rgba(22, 26, 43, 0.9) !important;
  border-color: rgba(232, 223, 209, 0.24) !important;
  color: var(--ink) !important;
  box-shadow:
    5px 6px 0 rgba(0, 0, 0, 0.28),
    0 18px 44px -30px rgba(0, 0, 0, 0.72) !important;
}

html[data-theme="dark"] .route-profile.route-redesign .profile-shell {
  background: rgba(22, 26, 43, 0.9) !important;
  border-color: rgba(232, 223, 209, 0.24) !important;
}

html[data-theme="dark"] .route-profile.route-redesign .profile-tier-card small,
html[data-theme="dark"] .route-profile.route-redesign .profile-usage-card small,
html[data-theme="dark"] .route-profile.route-redesign .form-callout p {
  color: var(--ink-3) !important;
}

html[data-theme="dark"] .route-profile.route-redesign .profile-group-action-row .button-link.is-active {
  background: rgba(156, 165, 213, 0.16) !important;
  border-color: rgba(156, 165, 213, 0.4) !important;
}

html[data-theme="dark"] .route-profile.route-redesign .profile-group-form-grid input[readonly] {
  background: rgba(245, 239, 228, 0.08) !important;
  border-color: rgba(245, 239, 228, 0.24) !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] .route-profile.route-redesign .profile-tier-card.is-active {
  background: rgba(156, 165, 213, 0.18) !important;
  border-color: rgba(156, 165, 213, 0.44) !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] .route-profile.route-redesign .profile-tier-card.is-active small,
html[data-theme="dark"] .route-profile.route-redesign .profile-tier-card.is-active .preview-label {
  color: var(--ink-3) !important;
}

html[data-theme="dark"] body:not(.route-public-home):not(.client-mode) .account-menu-avatar {
  background: #f8f4ec;
  color: #252b4b;
}

html[data-theme="dark"] .account-menu-panel,
html[data-theme="dark"] .route-redesign .account-menu-panel,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-preview-pane {
  background: rgba(17, 19, 31, 0.98) !important;
  border-color: rgba(245, 239, 228, 0.22) !important;
  color: var(--ink) !important;
  box-shadow:
    8px 8px 0 rgba(0, 0, 0, 0.34),
    0 26px 62px -36px rgba(0, 0, 0, 0.9) !important;
}

html[data-theme="dark"] .account-menu-item:hover,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-record-tab.is-active,
html[data-theme="dark"] .route-prep.route-redesign .packet-nav-button.is-active,
html[data-theme="dark"] .route-prep.route-redesign .packet-nav-item.is-active,
html[data-theme="dark"] .route-control.route-redesign .bls-phase-button.is-active,
html[data-theme="dark"] .route-control.route-redesign .bls-script-item.is-active,
html[data-theme="dark"] .route-prep.route-redesign .forms-tab.is-active {
  background: rgba(156, 165, 213, 0.18) !important;
  border-color: rgba(156, 165, 213, 0.38) !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] .route-prep.route-redesign .forms-tab-bar,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-record-tabs,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-content-header,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-sidebar {
  border-color: rgba(232, 223, 209, 0.18) !important;
}

/* Final dark-mode conformance pass for older light header rules */
html[data-theme="dark"] {
  --dark-panel-bg: rgba(23, 26, 43, 0.92);
  --dark-panel-bg-strong: rgba(28, 32, 52, 0.96);
  --dark-header-bg: rgba(18, 21, 38, 0.45);
  --dark-header-border: rgba(245, 239, 228, 0.09);
  --dark-muted-readable: #d8d2e2;
  --dark-muted-soft: #c8c2d3;
}

html[data-theme="dark"] .route-control.route-redesign .bls-script-head,
html[data-theme="dark"] .route-control.route-redesign .bls-nv-head,
html[data-theme="dark"] .route-control.route-redesign .bls-nv-control-bar,
html[data-theme="dark"] .route-control.route-redesign .bls-dock-head,
html[data-theme="dark"] .route-control.route-redesign .packet-sheet-head,
html[data-theme="dark"] .route-prep.route-redesign .packet-sheet-head,
html[data-theme="dark"] .route-redesign .panel-head,
html[data-theme="dark"] .session-doc-form-header {
  background: var(--dark-header-bg) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-color: var(--dark-header-border) !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-script-title,
html[data-theme="dark"] .route-control.route-redesign .bls-nv-title,
html[data-theme="dark"] .route-control.route-redesign .bls-dock-title,
html[data-theme="dark"] .route-control.route-redesign .bls-script-head h1,
html[data-theme="dark"] .route-control.route-redesign .bls-script-head h2,
html[data-theme="dark"] .route-control.route-redesign .bls-nv-head h1,
html[data-theme="dark"] .route-control.route-redesign .bls-nv-head h2,
html[data-theme="dark"] .route-control.route-redesign .bls-dock-head h1,
html[data-theme="dark"] .route-control.route-redesign .bls-dock-head h2,
html[data-theme="dark"] .route-control.route-redesign .packet-sheet-head h1,
html[data-theme="dark"] .route-control.route-redesign .packet-sheet-head h2,
html[data-theme="dark"] .route-control.route-redesign .packet-sheet-head h3,
html[data-theme="dark"] .route-prep.route-redesign .packet-sheet-head h1,
html[data-theme="dark"] .route-prep.route-redesign .packet-sheet-head h2,
html[data-theme="dark"] .route-prep.route-redesign .packet-sheet-head h3,
html[data-theme="dark"] .route-redesign .panel-head h1,
html[data-theme="dark"] .route-redesign .panel-head h2,
html[data-theme="dark"] .route-redesign .panel-head h3,
html[data-theme="dark"] .session-doc-form-header h1,
html[data-theme="dark"] .session-doc-form-header h2,
html[data-theme="dark"] .session-doc-form-header h3 {
  color: var(--ink) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-script-label,
html[data-theme="dark"] .route-control.route-redesign .bls-script-section-label,
html[data-theme="dark"] .route-control.route-redesign .bls-nv-label,
html[data-theme="dark"] .route-control.route-redesign .bls-dock-label,
html[data-theme="dark"] .route-control.route-redesign .bls-control-label,
html[data-theme="dark"] .route-control.route-redesign .bls-add-row-label,
html[data-theme="dark"] .route-control.route-redesign .bls-control-value,
html[data-theme="dark"] .route-control.route-redesign .bls-link-meta,
html[data-theme="dark"] .route-control.route-redesign .bls-dock-foot,
html[data-theme="dark"] .route-control.route-redesign .timeline-code,
html[data-theme="dark"] .route-control.route-redesign .timeline-code-note,
html[data-theme="dark"] .route-control.route-redesign .timeline-meta,
html[data-theme="dark"] .route-control.route-redesign .bls-category-button,
html[data-theme="dark"] .route-control.route-redesign .bls-script-item,
html[data-theme="dark"] .route-redesign .selector-field,
html[data-theme="dark"] .route-redesign .field-label,
html[data-theme="dark"] .route-redesign .eyebrow,
html[data-theme="dark"] .route-redesign .preview-label,
html[data-theme="dark"] .route-redesign .support-copy,
html[data-theme="dark"] .route-redesign .sheet-caption,
html[data-theme="dark"] .route-redesign small,
html[data-theme="dark"] .phase-description,
html[data-theme="dark"] .entry-meta {
  color: var(--dark-muted-readable) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-category-chevron,
html[data-theme="dark"] .route-control.route-redesign .bls-script-hint-card p,
html[data-theme="dark"] .route-control.route-redesign .helper-copy small,
html[data-theme="dark"] .route-control.route-redesign .nudge-copy,
html[data-theme="dark"] .route-control.route-redesign .nudge-why,
html[data-theme="dark"] .route-control.route-redesign .nudge-suggestion,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-client-card-meta,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-subtitle,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-session-date,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-session-desc,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-artifact-meta,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-log-copy,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-prep-doc-row small,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-badge-copy,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-badge-progress {
  color: var(--dark-muted-soft) !important;
}

html[data-theme="dark"] .route-ehr.route-redesign .ehr-session-nav-button {
  background: rgba(23, 26, 43, 0.9) !important;
  border-color: rgba(232, 223, 209, 0.24) !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] .route-ehr.route-redesign .ehr-session-nav-button:hover,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-session-nav-button.is-active {
  background: rgba(30, 34, 54, 0.96) !important;
  border-color: rgba(210, 173, 135, 0.58) !important;
}

html[data-theme="dark"] .route-ehr.route-redesign .ehr-session-nav-button .packet-nav-copy strong {
  color: var(--ink) !important;
}

html[data-theme="dark"] .route-ehr.route-redesign .ehr-session-nav-button .packet-nav-copy small,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-session-nav-button .ehr-session-nav-meta {
  color: var(--dark-muted-soft) !important;
}

html[data-theme="dark"] .route-ehr.route-redesign .ehr-session-nav-date {
  border-color: rgba(210, 173, 135, 0.34) !important;
  background: rgba(36, 40, 64, 0.96) !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] .route-ehr.route-redesign .ehr-session-nav-button.is-journal .ehr-session-nav-date {
  border-color: rgba(105, 179, 230, 0.46) !important;
  background: rgba(30, 56, 84, 0.92) !important;
  color: #d9efff !important;
}

html[data-theme="dark"] .route-ehr.route-redesign .ehr-client-info-button,
html[data-theme="dark"] .route-ehr.route-redesign .button-link.ghost,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-preview-doc-tab {
  background: rgba(245, 239, 228, 0.08) !important;
  border-color: rgba(245, 239, 228, 0.24) !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] .route-ehr.route-redesign .ehr-client-info-button:hover,
html[data-theme="dark"] .route-ehr.route-redesign .button-link.ghost:hover,
html[data-theme="dark"] .route-ehr.route-redesign .ehr-preview-doc-tab:hover {
  background: rgba(156, 165, 213, 0.16) !important;
  border-color: rgba(156, 165, 213, 0.42) !important;
  color: var(--ink) !important;
}

/* BLS script prompt text in dark mode */
html[data-theme="dark"] .route-control.route-redesign .bls-script-prompt p {
  color: var(--ink) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-collapse-toggle:hover {
  background: rgba(46, 52, 82, 0.9) !important;
  border-color: rgba(226, 230, 245, 0.4) !important;
  box-shadow: inset 0 0 0 1px rgba(226, 230, 245, 0.28) !important;
}

/* Exercise script dark mode */
html[data-theme="dark"] .exercise-script-step--static {
  background: rgba(23, 26, 43, 0.72) !important;
  border: 1px solid rgba(218, 207, 190, 0.12) !important;
}
html[data-theme="dark"] .exercise-script-step--static .exercise-script-copy {
  color: var(--ink-3) !important;
}
html[data-theme="dark"] .exercise-script-section-label {
  color: var(--ink-4) !important;
  border-bottom-color: var(--line) !important;
}
html[data-theme="dark"] .exercise-script-copy {
  color: var(--ink) !important;
}
html[data-theme="dark"] .exercise-script-step textarea,
html[data-theme="dark"] .exercise-script-step input[type="text"] {
  background: rgba(23, 26, 43, 0.6) !important;
  border-color: rgba(218, 207, 190, 0.22) !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-script-card,
html[data-theme="dark"] .route-control.route-redesign .bls-link-card,
html[data-theme="dark"] .route-control.route-redesign .bls-dock-controls,
html[data-theme="dark"] .route-control.route-redesign .bls-stage-frame,
html[data-theme="dark"] .route-control.route-redesign .timeline-row,
html[data-theme="dark"] .route-control.route-redesign .bls-nv-control-bar {
  background: var(--dark-panel-bg) !important;
  border-color: rgba(245, 239, 228, 0.18) !important;
}

html[data-theme="dark"] body.route-control.client-mode.route-redesign .bls-stage-frame {
  background: var(--client-stage-bg, #1f1a16) !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .route-control.route-redesign .timeline-row.is-starter:hover,
html[data-theme="dark"] .route-control.route-redesign .timeline-row.is-starter:focus-within,
html[data-theme="dark"] .route-control.route-redesign .timeline-row.is-active,
html[data-theme="dark"] .route-control.route-redesign .bls-script-item:hover,
html[data-theme="dark"] .route-control.route-redesign .bls-category-button:hover {
  background: rgba(156, 165, 213, 0.16) !important;
}

html[data-theme="dark"] .route-control.route-redesign .timeline-row.is-starter .timeline-copy {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 1.7rem,
      rgba(245, 239, 228, 0.13) 1.7rem,
      rgba(245, 239, 228, 0.13) 1.76rem
    ) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-dictation-source select,
html[data-theme="dark"] .route-control.route-redesign .bls-select,
html[data-theme="dark"] .route-control.route-redesign .bls-link-field,
html[data-theme="dark"] .route-control.route-redesign .timeline-code-select,
html[data-theme="dark"] .route-control.route-redesign .timeline-textarea,
html[data-theme="dark"] .route-control.route-redesign .bls-prep-script-content input,
html[data-theme="dark"] .route-control.route-redesign .bls-prep-script-content textarea {
  background: rgba(12, 14, 24, 0.9) !important;
  border-color: rgba(245, 239, 228, 0.28) !important;
  color: #fffaf0 !important;
}

html[data-theme="dark"] .route-control.route-redesign .timeline-textarea:focus,
html[data-theme="dark"] .route-control.route-redesign .bls-prep-script-content input:focus,
html[data-theme="dark"] .route-control.route-redesign .bls-prep-script-content textarea:focus {
  background: rgba(12, 14, 24, 0.96) !important;
  border-color: rgba(156, 165, 213, 0.82) !important;
}

html[data-theme="dark"] button:disabled,
html[data-theme="dark"] .button-link:disabled,
html[data-theme="dark"] .button-link[aria-disabled="true"] {
  opacity: 0.78;
}

html[data-theme="dark"] .route-control.route-redesign .bls-dictation-chip {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(245, 239, 228, 0.18) !important;
  color: rgba(245, 239, 228, 0.88) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-dictation-chip:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(245, 239, 228, 0.28) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-dictation-chip.is-active {
  background: rgba(116, 124, 196, 0.55) !important;
  border-color: rgba(116, 124, 196, 0.8) !important;
  color: #f2ecff !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-dictation-chip.is-danger {
  background: rgba(138, 52, 40, 0.35) !important;
  border-color: rgba(200, 100, 80, 0.35) !important;
  color: #f9c9c0 !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-timer-toggle {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(245, 239, 228, 0.18) !important;
  color: rgba(245, 239, 228, 0.75) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-tab-strip {
  border-color: rgba(245, 239, 228, 0.18) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-tab {
  color: rgba(245, 239, 228, 0.55) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-tab + .bls-tab {
  border-left-color: rgba(245, 239, 228, 0.18) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-tab.is-active {
  background: rgba(245, 239, 228, 0.18) !important;
  color: rgba(245, 239, 228, 0.92) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-sound-btn {
  border-color: rgba(245, 239, 228, 0.18) !important;
  color: rgba(245, 239, 228, 0.6) !important;
  background: transparent !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-sound-btn:hover {
  background: rgba(245, 239, 228, 0.1) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-sound-btn.is-active {
  background: rgba(245, 239, 228, 0.22) !important;
  border-color: rgba(245, 239, 228, 0.55) !important;
  color: rgba(245, 239, 228, 0.95) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-secondary-action:disabled,
html[data-theme="dark"] .route-control.route-redesign .bls-script-action:disabled,
html[data-theme="dark"] .route-control.route-redesign .bls-dictation-chip:disabled {
  color: var(--dark-muted-readable) !important;
  background: rgba(245, 239, 228, 0.08) !important;
  border-color: rgba(245, 239, 228, 0.24) !important;
  opacity: 0.82;
}

html[data-theme="dark"] .route-control.route-redesign .bls-rep-stat strong,
html[data-theme="dark"] body.route-control:not(.client-mode).route-redesign .bls-rep-stat strong {
  color: #f2ecff !important;
  opacity: 0.72;
}

html[data-theme="dark"] .route-control.route-redesign .bls-rep-stat .bls-control-label,
html[data-theme="dark"] body.route-control:not(.client-mode).route-redesign .bls-rep-stat .bls-control-label {
  color: var(--dark-muted-readable) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-popout-action {
  color: var(--ink) !important;
  background: rgba(245, 239, 228, 0.08) !important;
  border-color: rgba(245, 239, 228, 0.24) !important;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.24);
}

/* Topbar treatment shared across app pages */
body:not(.client-mode) .topbar {
  position: relative !important;
  z-index: 50;
  display: grid !important;
  grid-template-columns: minmax(170px, 1fr) minmax(260px, auto) minmax(360px, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 24px;
  width: 100% !important;
  max-width: none !important;
  min-height: 76px !important;
  margin: 0 0 1rem !important;
  padding: 0 40px !important;
  overflow: visible;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--light-card-bg) !important;
  box-shadow: none !important;
  color: var(--ink);
  backdrop-filter: none !important;
}

body:not(.client-mode) .topbar::after {
  display: none !important;
}

body:not(.client-mode) .topbar > * {
  position: relative;
  z-index: 1;
}

body:not(.client-mode) .topbar .brand {
  grid-column: 1;
  justify-self: start;
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.4px;
  color: var(--ink);
  text-decoration: none;
}

body:not(.client-mode) .topbar .brand-dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  box-shadow: none;
  opacity: 0.72;
}

body:not(.client-mode) .topbar .topbar-copy {
  grid-column: 2;
  justify-self: center;
  margin: 0;
  max-width: 320px;
  color: var(--ink-3);
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  font-size: 14px;
  font-style: italic;
  line-height: 1.4;
  text-align: center;
}

body:not(.client-mode) .topbar .topnav {
  grid-column: 2;
  justify-self: center;
  justify-content: center;
  align-self: center;
  margin-left: 0;
  gap: 1.35rem;
  border: 0;
}

body:not(.client-mode) .topbar .topnav a {
  padding: 0.2rem 0 0.38rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent !important;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 700;
}

body:not(.client-mode) .topbar .topnav a.is-current,
body:not(.client-mode) .topbar .topnav a.is-active,
body:not(.client-mode) .topbar .topnav a[aria-current="page"],
body:not(.client-mode) .topbar .topnav a:hover {
  color: var(--ink);
  border-bottom-color: var(--ember);
}

body:not(.client-mode) .topbar .topbar-tools {
  grid-column: 3;
  justify-self: end;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0.7rem;
  min-width: 0;
  max-width: 100%;
}

body:not(.client-mode) .topbar .selector-field,
body:not(.client-mode) .topbar .selector-field-compact {
  min-width: 0;
  width: min(210px, 18vw);
  flex: 0 1 210px;
}

body:not(.client-mode) .topbar .account-menu {
  min-width: 0;
  flex: 0 1 auto;
}

body:not(.client-mode) .topbar .account-menu-trigger {
  max-width: min(360px, 28vw);
  min-width: 0;
}

body:not(.client-mode) .topbar .account-menu-copy {
  min-width: 0;
}

body:not(.client-mode) .topbar .account-menu-copy strong,
body:not(.client-mode) .topbar .account-menu-copy small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.client-mode) .topbar .theme-toggle,
body:not(.client-mode) .topbar .account-menu-trigger,
body:not(.client-mode) .topbar .selector-field select,
body:not(.client-mode) .topbar .button-link.ghost {
  background: rgba(248, 244, 236, 0.12) !important;
  border-color: rgba(32, 34, 52, 0.22) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}

body:not(.client-mode) .topbar .account-menu-avatar {
  background: var(--ink);
  color: var(--paper);
}

html[data-theme="dark"] body:not(.client-mode) .topbar {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ink);
}

html[data-theme="dark"] body:not(.client-mode) .topbar .brand,
html[data-theme="dark"] body:not(.client-mode) .topbar .topbar-copy,
html[data-theme="dark"] body:not(.client-mode) .topbar .topbar-client strong,
html[data-theme="dark"] body:not(.client-mode) .topbar .topbar-client span {
  color: var(--ink) !important;
}

html[data-theme="dark"] body:not(.client-mode) .topbar .topbar-copy,
html[data-theme="dark"] body:not(.client-mode) .topbar .topnav a {
  color: var(--dark-muted-readable, var(--ink-3)) !important;
}

html[data-theme="dark"] body:not(.client-mode) .topbar .topnav a.is-current,
html[data-theme="dark"] body:not(.client-mode) .topbar .topnav a.is-active,
html[data-theme="dark"] body:not(.client-mode) .topbar .topnav a[aria-current="page"],
html[data-theme="dark"] body:not(.client-mode) .topbar .topnav a:hover {
  color: #fffaf0 !important;
  border-bottom-color: var(--ember);
}

html[data-theme="dark"] body:not(.client-mode) .topbar .theme-toggle,
html[data-theme="dark"] body:not(.client-mode) .topbar .account-menu-trigger,
html[data-theme="dark"] body:not(.client-mode) .topbar .selector-field select,
html[data-theme="dark"] body:not(.client-mode) .topbar .button-link.ghost {
  background: rgba(245, 239, 228, 0.08) !important;
  border-color: rgba(245, 239, 228, 0.28) !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] body:not(.client-mode) .topbar .account-menu-avatar {
  background: #f8f4ec;
  color: #252b4b;
}

body:not(.route-public-home):not(.client-mode) .topbar {
  overflow: hidden;
  border: 2px solid #202234 !important;
  border-radius: 14px !important;
  background: var(--light-card-bg) !important;
  box-shadow:
    7px 7px 0 rgba(32, 34, 52, 0.86),
    0 18px 40px -28px rgba(32, 34, 52, 0.72) !important;
}

body:not(.route-public-home):not(.client-mode) .topbar.account-menu-open {
  overflow: visible;
}

body:not(.route-public-home):not(.client-mode) .topbar::after {
  content: none !important;
  display: none !important;
}

body:not(.route-public-home):not(.client-mode) .topbar .brand,
body:not(.route-public-home):not(.client-mode) .topbar .topbar-copy,
body:not(.route-public-home):not(.client-mode) .topbar .topbar-client strong,
body:not(.route-public-home):not(.client-mode) .topbar .topbar-client span {
  color: #202234 !important;
}

body:not(.route-public-home):not(.client-mode) .topbar .topnav a {
  color: rgba(32, 34, 52, 0.72);
}

body:not(.route-public-home):not(.client-mode) .topbar .topnav a.is-current,
body:not(.route-public-home):not(.client-mode) .topbar .topnav a.is-active,
body:not(.route-public-home):not(.client-mode) .topbar .topnav a[aria-current="page"],
body:not(.route-public-home):not(.client-mode) .topbar .topnav a:hover {
  color: #202234;
}

html[data-theme="dark"] body:not(.route-public-home):not(.client-mode) .topbar {
  border-width: 2px !important;
  border-style: solid !important;
  border-color: rgba(245, 239, 228, 0.22) !important;
  background: transparent !important;
  box-shadow:
    7px 7px 0 rgba(0, 0, 0, 0.52),
    0 20px 48px -30px rgba(0, 0, 0, 0.72) !important;
}

html[data-theme="dark"] body:not(.route-public-home):not(.client-mode) .topbar::after {
  content: none !important;
  display: none !important;
}

@media (max-width: 900px) {
  body:not(.client-mode) .topbar {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 18px 24px !important;
    gap: 12px;
  }

  body:not(.client-mode) .topbar .brand,
  body:not(.client-mode) .topbar .topnav,
  body:not(.client-mode) .topbar .topbar-copy,
  body:not(.client-mode) .topbar .topbar-tools {
    grid-column: 1;
    justify-self: center;
  }

  body:not(.client-mode) .topbar .topnav {
    width: 100%;
    justify-content: center;
    gap: 1rem;
  }

  body:not(.client-mode) .topbar .topbar-tools {
    width: 100%;
    justify-content: center;
  }

  body:not(.client-mode) .topbar .topbar-copy {
    text-align: center;
  }
}

/* Light theme tan normalization.
   Page canvases use the darker tan; card and panel surfaces use the lighter tan. */
html:not([data-theme="dark"]) body:not(.client-mode) {
  background: var(--light-page-bg) !important;
}

html:not([data-theme="dark"]) body.route-auth,
html:not([data-theme="dark"]) body.route-redesign:not(.client-mode),
html:not([data-theme="dark"]) body.route-portal.route-redesign,
html:not([data-theme="dark"]) body.quickstart-mode {
  background: var(--light-page-bg) !important;
}

html:not([data-theme="dark"]) body:not(.client-mode) :is(
  .panel,
  .card,
  .start-card,
  .auth-card,
  .auth-subcard,
  .auth-choice-tile,
  .page-overview,
  .packet-card,
  .target-card,
  .storage-card,
  .bundle-card,
  .entry-card,
  .session-artifact-card,
  .portal-account-card,
  .portal-linked-card,
  .session-link-card,
  .summary-card,
  .draft-card,
  .step-card,
  .checkbox-card,
  .nudge-card
) {
  background: var(--light-card-bg) !important;
  border-color: rgba(32, 34, 52, 0.24) !important;
}

html:not([data-theme="dark"]) body.route-client-login .auth-card.auth-client-card {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) body.route-auth :is(.auth-card, .start-card) {
  background: var(--light-card-bg) !important;
  border-color: rgba(32, 34, 52, 0.24) !important;
}

html:not([data-theme="dark"]) body.route-auth :is(.auth-subcard, .auth-choice-tile) {
  background: var(--light-card-bg-strong) !important;
  border-color: rgba(32, 34, 52, 0.18) !important;
}

html:not([data-theme="dark"]) body.route-auth.route-client-login .auth-card.auth-client-card {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) body.route-redesign :is(
  .profile-shell,
  .utilities-shell,
  .packet-nav-button,
  .packet-nav-item,
  .ehr-client-card,
  .ehr-badges-card,
  .ehr-badge-item,
  .ehr-session-row,
  .prep-doc-card,
  .folder-target,
  .profile-card,
  .profile-summary-card,
  .utility-card
) {
  background: var(--light-card-bg) !important;
  border-color: rgba(32, 34, 52, 0.24) !important;
}

html:not([data-theme="dark"]) body.route-redesign :is(
  .workspace,
  .ehr-main-layout,
  .ehr-sidebar,
  .ehr-content,
  .prep-document-shell,
  .prep-rail,
  .prep-handoff,
  .phase-rail,
  .session-panel
) {
  background: transparent !important;
}

html:not([data-theme="dark"]) body.route-control:not(.client-mode).route-redesign :is(
  .bls-phase-rail,
  .bls-script-column,
  .bls-nv-center,
  .bls-dock,
  .bls-control-block,
  .bls-rep-stat,
  .bls-protocol-event-title,
  .bls-guide-panel,
  .bls-script-prompt,
  .bls-prep-item,
  .bls-link-card
) {
  background: var(--light-card-bg) !important;
  border-color: rgba(32, 34, 52, 0.28) !important;
}

html:not([data-theme="dark"]) body.route-control:not(.client-mode).route-redesign #blsNvCenter {
  background: var(--light-card-bg) !important;
  border-color: rgba(32, 34, 52, 0.28) !important;
}

html:not([data-theme="dark"]) body.route-control:not(.client-mode).route-redesign .workspace.control-workspace.bls-design-workspace {
  background: transparent !important;
}

html:not([data-theme="dark"]) body.route-portal.route-redesign :is(
  .packet-card,
  .portal-side-card,
  .portal-tices-entry,
  .portal-tices-empty,
  .portal-tices-timeline-item,
  .portal-tices-timeline-empty,
  .portal-tices-readonly-field,
  .portal-settings-group,
  .portal-badge-stat,
  .portal-badge-item,
  .rail-box
) {
  background: var(--light-card-bg) !important;
  border-color: rgba(32, 34, 52, 0.24) !important;
}

html:not([data-theme="dark"]) body.quickstart-mode :is(
  .qs-block,
  .qs-share-inner,
  .qs-share-url,
  .qs-feature-card
) {
  background: var(--light-card-bg) !important;
  border-color: rgba(32, 34, 52, 0.22) !important;
}

html:not([data-theme="dark"]) body.quickstart-mode .qs-feature-card {
  color: var(--ink);
  box-shadow:
    4px 5px 0 rgba(32, 34, 52, 0.16),
    0 14px 32px -28px rgba(28, 31, 46, 0.48) !important;
}

html:not([data-theme="dark"]) body.quickstart-mode :is(.qs-feature-title, .qs-feature-cta) {
  color: var(--ink) !important;
}

html:not([data-theme="dark"]) body.quickstart-mode .qs-feature-eyebrow {
  color: var(--ink-4) !important;
}

/* Light theme: remove hard offset backplates behind rounded cards. */
html:not([data-theme="dark"]) body:not(.client-mode) {
  --prep-box-shadow: 0 14px 30px -26px rgba(32, 34, 52, 0.36);
}

html:not([data-theme="dark"]) body:not(.client-mode) :is(
  .panel,
  .card,
  .start-card,
  .auth-card,
  .auth-subcard,
  .auth-choice-tile,
  .page-overview,
  .packet-card,
  .packet-nav-button,
  .packet-nav-item,
  .packet-section,
  .packet-subsection,
  .packet-doc-body,
  .prep-document,
  .target-card,
  .storage-card,
  .bundle-card,
  .entry-card,
  .session-artifact-card,
  .portal-account-card,
  .portal-side-card,
  .portal-linked-card,
  .portal-badge-item,
  .portal-settings-group,
  .portal-badge-stat,
  .portal-tices-entry,
  .portal-tices-empty,
  .portal-tices-timeline-item,
  .portal-tices-timeline-empty,
  .portal-tices-readonly-field,
  .session-link-card,
  .summary-card,
  .draft-card,
  .step-card,
  .checkbox-card,
  .nudge-card,
  .ehr-client-card,
  .ehr-badges-card,
  .ehr-badge-item,
  .ehr-session-row,
  .ehr-artifact-card,
  .ehr-log-card,
  .ehr-artifact-item,
  .ehr-prep-doc-row,
  .ehr-tices-entry,
  .ehr-note-summary-item,
  .ehr-generated-note-card,
  .ehr-nv-card,
  .ehr-nv-row,
  .ehr-client-details,
  .folder-target,
  .profile-card,
  .profile-summary-card,
  .utility-card,
  .bls-phase-rail,
  .bls-script-column,
  .bls-nv-center,
  .bls-dock,
  .bls-control-block,
  .bls-rep-stat,
  .bls-protocol-event-title,
  .bls-guide-panel,
  .bls-script-prompt,
  .bls-prep-item,
  .bls-link-card,
  .qs-block,
  .qs-share-inner,
  .qs-share-url,
  .qs-feature-card
) {
  box-shadow: 0 14px 30px -26px rgba(32, 34, 52, 0.36) !important;
}

html:not([data-theme="dark"]) body:not(.client-mode) :is(
  .packet-table-row,
  .target-event-row,
  .tx-plan-trigger-row,
  .resource-row,
  .target-event-table,
  .exercise-script-step,
  .rdi-resource-card,
  .prep-inline-checklist label,
  .readiness-sheet label
) {
  box-shadow: none !important;
}

html:not([data-theme="dark"]) body.quickstart-mode .qs-block select,
html:not([data-theme="dark"]) body:not(.client-mode) :is(input:not([type="range"]):not([type="color"]):not([type="checkbox"]):not([type="radio"]), textarea, select) {
  background: var(--light-field-bg) !important;
  border-color: rgba(32, 34, 52, 0.22) !important;
}

html:not([data-theme="dark"]) body.route-portal.route-redesign .prep-document[data-prep-doc="tx-plan"] {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Riverbank component pass 01: low-risk shared shape language. */
html:not([data-theme="dark"]) body:not(.client-mode) :is(
  .packet-nav-index,
  .phase-rail-number,
  .packet-step-index
) {
  border: 1.5px solid var(--ink) !important;
  border-radius: 50% !important;
  background: var(--paper-2) !important;
  color: var(--ink) !important;
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  font-weight: 700;
}

html:not([data-theme="dark"]) body:not(.client-mode) :is(
  .packet-nav-button.is-active .packet-nav-index,
  .packet-nav-button:hover .packet-nav-index,
  .packet-nav-item.is-active .packet-nav-index,
  .packet-step.is-active .packet-step-index,
  .phase-rail-button.is-active .phase-rail-number,
  .phase-rail-button:hover .phase-rail-number
) {
  background: var(--sun) !important;
  border-color: var(--ink) !important;
}

html:not([data-theme="dark"]) body:not(.client-mode) .route-ehr.route-redesign .ehr-session-nav-button.is-journal:is(:hover, .is-active) .ehr-session-nav-date {
  background: rgba(191, 228, 252, 0.98) !important;
  border-color: rgba(38, 96, 128, 0.52) !important;
  color: #1f3e57 !important;
}

html:not([data-theme="dark"]) body:not(.client-mode) :is(
  .forms-tab-bar,
  .ehr-record-tabs,
  .nav-underline
) {
  border-bottom: 1.5px dashed var(--line-2) !important;
}

html:not([data-theme="dark"]) body:not(.client-mode) :is(
  button.ghost,
  .button-link.ghost,
  .bls-secondary-action,
  .bls-link-action,
  .timeline-tool
) {
  border-style: dashed !important;
}

html:not([data-theme="dark"]) body:not(.client-mode) :is(
  .nudge-evidence-list,
  .ehr-artifact-list,
  .session-doc-choice-list
) {
  list-style: none;
  padding-left: 0;
}

html:not([data-theme="dark"]) body:not(.client-mode) :is(
  .nudge-evidence-list,
  .ehr-artifact-list,
  .session-doc-choice-list
) > li {
  position: relative;
  padding-left: 1.65rem;
}

html:not([data-theme="dark"]) body:not(.client-mode) :is(
  .nudge-evidence-list,
  .ehr-artifact-list,
  .session-doc-choice-list
) > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 1rem;
  height: 0.45rem;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 8'><path d='M1 4 Q 4 0 7 4 T 13 4 T 19 4 T 22 4' fill='none' stroke='%23a3653f' stroke-width='2' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
}

/* BLS script dock polish: borrow the Riverbank card, rail, dashed, and squiggle language. */
.route-control.route-redesign .bls-phase-rail,
.route-control.route-redesign .bls-script-column {
  position: relative;
  border: 1.5px solid var(--ink) !important;
  border-radius: 18px !important;
  background: var(--light-card-bg) !important;
  color: var(--ink);
  box-shadow: 4px 6px 0 var(--paper-3);
}

.route-control.route-redesign .bls-phase-rail {
  padding: 0 0.78rem 0.95rem;
}

.route-control.route-redesign .bls-script-column {
}

.route-control.route-redesign .bls-script-column::before {
  content: "";
  position: absolute;
  top: 0.65rem;
  left: 0.85rem;
  right: 0.85rem;
  height: 0.5rem;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14'><path d='M2 7 Q 12 -2 22 7 T 42 7 T 62 7 T 82 7 T 102 7 T 122 7 T 142 7 T 162 7 T 182 7 T 200 7' fill='none' stroke='%233a6f85' stroke-width='2.5' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
  opacity: 0.34;
  pointer-events: none;
}

.route-control.route-redesign #blsPhaseRail.is-collapsed::before,
.route-control.route-redesign #blsScriptColumn.is-collapsed::before {
  display: none;
}

.route-control.route-redesign .bls-script-head {
  padding: 0.45rem 0.9rem 0.82rem;
  border-bottom: 1.5px dashed var(--line-2);
  background: transparent !important;
}

.route-control.route-redesign .bls-script-label,
.route-control.route-redesign .bls-script-section-label {
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-size: var(--type-eyebrow, 9px);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink-3) !important;
}

.route-control.route-redesign .bls-script-title {
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: 0;
  color: var(--ink) !important;
}

.route-control.route-redesign .bls-script-header-actions {
  gap: 0.45rem;
  margin-top: 0.3rem;
}

.route-control.route-redesign .bls-category-list {
  gap: 0.48rem;
}

.route-control.route-redesign .bls-category-group {
  border: 0;
  border-bottom: 1.5px dashed var(--line-2);
  padding: 0 0 0.58rem;
}

.route-control.route-redesign .bls-category-group:last-child {
  border-bottom: 0;
}

.route-control.route-redesign .bls-category-group:has(.bls-script-item.is-active, .bls-script-item.is-current) .bls-category-button {
  color: var(--ink) !important;
}

.route-control.route-redesign .bls-category-button {
  min-height: 2rem;
  padding: 0.36rem 0.2rem;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: var(--ink-2) !important;
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  box-shadow: none !important;
  transform: none !important;
}

.route-control.route-redesign .bls-category-button:hover {
  color: var(--ink) !important;
  background: transparent !important;
}

.route-control.route-redesign .bls-category-chevron {
  color: var(--ember);
  font-size: 0.58rem;
}

.route-control.route-redesign .bls-category-items {
  gap: 0.14rem;
  padding: 0.05rem 0 0.05rem 0.7rem;
}

.route-control.route-redesign .bls-template-group {
  gap: 0.12rem;
}

.route-control.route-redesign .bls-script-item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.36rem 0.35rem 0.36rem 1.8rem;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: var(--ink-2) !important;
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-size: var(--type-body, 13px);
  font-weight: 650;
  box-shadow: none !important;
  transform: none !important;
}

.route-control.route-redesign .bls-script-item:hover {
  background: transparent !important;
  color: var(--ink) !important;
}

.route-control.route-redesign .bls-script-item.is-active,
.route-control.route-redesign .bls-script-item.is-current,
.route-control.route-redesign .bls-template-type.is-current,
.route-control.route-redesign .bls-version-item.is-current {
  background: transparent !important;
  color: var(--ink) !important;
  font-weight: 850;
  box-shadow: none !important;
}

.route-control.route-redesign .bls-script-item.is-active::before,
.route-control.route-redesign .bls-script-item.is-current::before,
.route-control.route-redesign .bls-template-type.is-current::before,
.route-control.route-redesign .bls-version-item.is-current::before {
  content: "";
  display: block;
  position: absolute;
  left: 0.24rem;
  top: 50%;
  width: 1.25rem;
  height: 0.45rem;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 8'><path d='M1 4 Q 4 0 7 4 T 13 4 T 19 4 T 22 4' fill='none' stroke='%23a3653f' stroke-width='2' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
  transform: translateY(-50%);
  pointer-events: none;
}

.route-control.route-redesign .bls-template-type {
  color: var(--ink) !important;
  font-weight: 800;
}

.route-control.route-redesign .bls-version-list {
  gap: 0.08rem;
  margin: 0.05rem 0 0.12rem 0.3rem;
  padding-left: 0.65rem;
}

.route-control.route-redesign .bls-version-item {
  min-height: 1.82rem;
  padding: 0.3rem 0.45rem 0.3rem 1.55rem !important;
  font-size: var(--type-small, 12px) !important;
  font-weight: 650;
  color: var(--ink-3) !important;
}

.route-control.route-redesign .bls-version-item::before {
  display: none;
}

.route-control.route-redesign .bls-reprocessing-actions {
  padding: 0.42rem 0 0.08rem 0.95rem;
}

.route-control.route-redesign .bls-script-action {
  min-height: 2rem;
  border: 1px dashed var(--moss) !important;
  border-radius: 10px;
  background: var(--moss-wash) !important;
  color: var(--ink) !important;
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-size: 0.69rem;
  font-weight: 850;
  box-shadow: none !important;
}

.route-control.route-redesign .bls-script-action:hover:not(:disabled) {
  border-color: var(--ember) !important;
  background: var(--light-card-bg-strong) !important;
  color: var(--ink) !important;
  transform: translateY(-1px);
}

.route-control.route-redesign .bls-script-body {
  padding: 0.82rem 0.62rem 1rem;
}

.route-control.route-redesign .bls-script-card.is-active {
  gap: 0.74rem;
}

.route-control.route-redesign .bls-prep-script-content {
  gap: 0.78rem;
  padding: 0;
  font-family: var(--font-sans, "Manrope", sans-serif);
}

.route-control.route-redesign .bls-protocol-event-title {
  margin: 0;
  padding: 0.72rem 0.78rem;
  border: 1.5px solid var(--ink) !important;
  border-radius: 14px !important;
  background: var(--light-card-bg-strong) !important;
  box-shadow: 3px 4px 0 var(--paper-3) !important;
}

.route-control.route-redesign .bls-event-title-input {
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-size: 0.92rem;
  font-weight: 750;
  color: var(--ink) !important;
}

.route-control.route-redesign .exercise-script-list {
  gap: 0.78rem;
}

.route-control.route-redesign .exercise-script-section {
  padding: 0.26rem 0 0;
}

.route-control.route-redesign .exercise-script-section-label {
  position: relative;
  padding-bottom: 0.5rem;
  font-family: var(--font-sans, "Manrope", sans-serif);
  color: var(--ink-3) !important;
  letter-spacing: 0.12em;
  border-bottom: 1.5px dashed var(--line-2);
}

.route-control.route-redesign .exercise-script-step,
.route-control.route-redesign .bls-prep-item,
.route-control.route-redesign .bls-script-prompt {
  border: 1.5px solid var(--ink) !important;
  border-radius: 14px !important;
  background: var(--light-card-bg-strong) !important;
  box-shadow: 3px 4px 0 var(--paper-3) !important;
}

.route-control.route-redesign .exercise-script-step {
  padding: 0.74rem 0.78rem;
}

.route-control.route-redesign .exercise-script-step--static {
  background: var(--light-card-bg) !important;
}

.route-control.route-redesign .exercise-script-head {
  align-items: center;
  gap: 0.58rem;
}

.route-control.route-redesign .exercise-script-meta strong,
.route-control.route-redesign .bls-prep-item strong {
  font-family: var(--font-sans, "Manrope", sans-serif);
  color: var(--ink);
  font-weight: 850;
}

.route-control.route-redesign .exercise-script-copy,
.route-control.route-redesign .bls-prep-script-content p {
  color: var(--ink-2);
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-size: 0.92rem;
  line-height: 1.46;
}

.route-control.route-redesign .exercise-script-response {
  color: var(--ink-3);
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.03em;
}

.route-control.route-redesign .bls-prep-script-content input,
.route-control.route-redesign .bls-prep-script-content textarea {
  border-radius: 10px !important;
  border: 1px solid var(--line-2) !important;
  background: rgba(255, 252, 249, 0.78) !important;
  color: var(--ink) !important;
}

.route-control.route-redesign .bls-prep-script-content input:focus,
.route-control.route-redesign .bls-prep-script-content textarea:focus {
  border-color: var(--ember) !important;
  box-shadow: 0 0 0 3px var(--amber-wash);
  outline: none;
}

.route-control.route-redesign .packet-code {
  min-width: 2.15rem;
  min-height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.16rem 0.45rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.route-control.route-redesign .mini-chip {
  border: 1px dashed var(--moss);
  border-radius: 10px;
  background: var(--moss-wash);
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

html[data-theme="dark"] .route-control.route-redesign .bls-phase-rail,
html[data-theme="dark"] .route-control.route-redesign .bls-script-column,
html[data-theme="dark"] .route-control.route-redesign .bls-protocol-event-title,
html[data-theme="dark"] .route-control.route-redesign .exercise-script-step,
html[data-theme="dark"] .route-control.route-redesign .bls-prep-item,
html[data-theme="dark"] .route-control.route-redesign .bls-script-prompt {
  background: var(--panel-strong, rgba(23, 26, 43, 0.9)) !important;
  border-color: rgba(245, 239, 228, 0.28) !important;
  box-shadow: 4px 6px 0 rgba(245, 239, 228, 0.08) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-script-head,
html[data-theme="dark"] .route-control.route-redesign .exercise-script-section-label,
html[data-theme="dark"] .route-control.route-redesign .bls-category-group {
  border-color: rgba(245, 239, 228, 0.26) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-script-column::before {
  opacity: 0.5;
}

html[data-theme="dark"] .route-control.route-redesign .bls-script-item,
html[data-theme="dark"] .route-control.route-redesign .bls-category-button,
html[data-theme="dark"] .route-control.route-redesign .bls-version-item {
  color: var(--ink-3) !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-script-item:hover,
html[data-theme="dark"] .route-control.route-redesign .bls-script-item.is-active,
html[data-theme="dark"] .route-control.route-redesign .bls-script-item.is-current,
html[data-theme="dark"] .route-control.route-redesign .bls-template-type.is-current,
html[data-theme="dark"] .route-control.route-redesign .bls-version-item.is-current {
  background: transparent !important;
  border-bottom-color: var(--ember) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .route-control.route-redesign .bls-script-action,
html[data-theme="dark"] .route-control.route-redesign .mini-chip {
  border-color: var(--moss) !important;
  background: var(--moss-wash) !important;
  color: var(--ink) !important;
}

/* Riverbank button reset: remove legacy gradients and align interactive controls. */
:is(
  button.primary,
  button.ghost,
  .button-link,
  .primary-btn,
  .secondary-btn,
  .route-redesign .button-link,
  .route-redesign button.ghost,
  .route-redesign button.primary,
  .route-redesign .primary,
  .route-control.route-redesign .bls-primary-action,
  .route-control.route-redesign .bls-secondary-action,
  .route-control.route-redesign .bls-link-action,
  .route-control.route-redesign .bls-popout-action,
  .route-control.route-redesign .bls-dock-toggle,
  .route-control.route-redesign .bls-dictation-chip,
  .route-control.route-redesign .bls-manual-entry-submit,
  .route-control.route-redesign .bls-script-action,
  .client-prefs-btn,
  .client-prefs-apply-btn,
  .client-fullscreen-btn,
  .account-menu-trigger,
  .theme-toggle,
  .nudge-review-button,
  .nudge-phase-button,
  .helper-chip
) {
  border: 1px dashed var(--moss) !important;
  border-radius: 10px !important;
  background: var(--moss-wash) !important;
  background-image: none !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

:is(
  button.primary,
  .button-link.primary,
  .primary-btn,
  .route-redesign .button-link.primary,
  .route-redesign button.primary,
  .route-redesign .primary,
  .route-control.route-redesign .bls-primary-action,
  .client-prefs-apply-btn,
  .nudge-phase-button
) {
  border-style: solid !important;
  border-color: var(--ink) !important;
  background: var(--paper-2) !important;
  color: var(--ink) !important;
  box-shadow: 3px 4px 0 var(--paper-3) !important;
}

:is(
  button.primary,
  button.ghost,
  .button-link,
  .primary-btn,
  .secondary-btn,
  .route-redesign .primary,
  .route-control.route-redesign .bls-primary-action,
  .route-control.route-redesign .bls-secondary-action,
  .route-control.route-redesign .bls-link-action,
  .route-control.route-redesign .bls-popout-action,
  .route-control.route-redesign .bls-dock-toggle,
  .route-control.route-redesign .bls-dictation-chip,
  .route-control.route-redesign .bls-manual-entry-submit,
  .route-control.route-redesign .bls-script-action,
  .client-prefs-btn,
  .client-prefs-apply-btn,
  .client-fullscreen-btn,
  .account-menu-trigger,
  .theme-toggle,
  .nudge-review-button,
  .nudge-phase-button,
  .helper-chip
):hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: var(--ember) !important;
  background: var(--light-card-bg-strong) !important;
  color: var(--ink) !important;
  transform: translateY(-1px);
}

:is(
  .button-link.compact,
  .route-redesign .button-link.compact,
  .route-control.route-redesign .bls-popout-action,
  .route-control.route-redesign .bls-dock-toggle,
  .route-control.route-redesign .bls-dictation-chip,
  .route-control.route-redesign .bls-manual-entry-submit,
  .route-control.route-redesign .bls-script-action,
  .client-prefs-btn,
  .client-fullscreen-btn,
  .theme-toggle,
  .account-menu-trigger,
  .nudge-review-button,
  .nudge-phase-button,
  .helper-chip
) {
  min-height: 32px;
  padding: 0.42rem 0.72rem;
  font-size: 0.74rem;
}

:is(
  .button-link.button-wide,
  .route-redesign .button-link.button-wide,
  .route-control.route-redesign .bls-primary-action,
  .route-control.route-redesign .bls-secondary-action,
  .route-control.route-redesign .bls-link-action
) {
  min-height: 42px;
}

:is(
  .button-link:disabled,
  .button-link[aria-disabled="true"],
  button:disabled,
  .route-control.route-redesign .bls-primary-action:disabled,
  .route-control.route-redesign .bls-secondary-action:disabled,
  .route-control.route-redesign .bls-dictation-chip:disabled
) {
  opacity: 0.48 !important;
  transform: none !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

:is(
  .forms-tab-bar,
  .ehr-record-tabs,
  .packet-nav,
  .packet-nav-list,
  .route-prep.route-redesign .forms-tab-bar,
  .route-ehr.route-redesign .ehr-record-tabs
) {
  border-bottom: 1.5px solid var(--line) !important;
}

:is(
  .forms-tab,
  .ehr-record-tab,
  .packet-nav-item,
  .route-prep.route-redesign .forms-tab,
  .route-prep.route-redesign .packet-nav-item,
  .route-ehr.route-redesign .ehr-record-tab,
  .route-control.route-redesign .bls-tab
) {
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--ink-2) !important;
  box-shadow: none !important;
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-weight: 700;
}

:is(
  .forms-tab:hover,
  .ehr-record-tab:hover,
  .packet-nav-item:hover,
  .route-control.route-redesign .bls-tab:hover
) {
  border-bottom-color: var(--line-2) !important;
  background: transparent !important;
  color: var(--ink) !important;
  transform: none;
}

:is(
  .forms-tab.is-active,
  .ehr-record-tab.is-active,
  .packet-nav-item.is-active,
  .route-prep.route-redesign .forms-tab.is-active,
  .route-prep.route-redesign .packet-nav-item.is-active,
  .route-ehr.route-redesign .ehr-record-tab.is-active,
  .route-control.route-redesign .bls-tab.is-active
) {
  border-bottom-color: var(--ember) !important;
  background: transparent !important;
  color: var(--ink) !important;
  font-weight: 850;
  box-shadow: none !important;
}

:is(
  .route-control.route-redesign .bls-sound-btn,
  .client-sound-btn,
  .sound-btn
) {
  border: 1px solid var(--moss) !important;
  border-radius: 10px !important;
  background: var(--moss-wash) !important;
  color: var(--ink-2) !important;
  box-shadow: none !important;
}

:is(
  .route-control.route-redesign .bls-sound-btn:hover,
  .client-sound-btn:hover,
  .sound-btn:hover,
  .route-control.route-redesign .bls-sound-btn.is-active,
  .client-sound-btn.is-active,
  .sound-btn.is-active
) {
  border-color: var(--ember) !important;
  background: var(--light-card-bg-strong) !important;
  color: var(--ink) !important;
}

:is(
  .route-control.route-redesign .bls-dictation-chip.is-danger,
  .button-link.is-danger,
  button.is-danger
) {
  border-color: var(--ember) !important;
  background: var(--amber-wash) !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] :is(
  button.primary,
  button.ghost,
  .button-link,
  .primary-btn,
  .secondary-btn,
  .route-redesign .button-link,
  .route-redesign button.ghost,
  .route-redesign button.primary,
  .route-redesign .primary,
  .route-control.route-redesign .bls-primary-action,
  .route-control.route-redesign .bls-secondary-action,
  .route-control.route-redesign .bls-link-action,
  .route-control.route-redesign .bls-popout-action,
  .route-control.route-redesign .bls-dock-toggle,
  .route-control.route-redesign .bls-dictation-chip,
  .route-control.route-redesign .bls-manual-entry-submit,
  .route-control.route-redesign .bls-script-action,
  .route-control.route-redesign .bls-sound-btn,
  .client-sound-btn,
  .sound-btn,
  .client-prefs-btn,
  .client-prefs-apply-btn,
  .client-fullscreen-btn,
  .account-menu-trigger,
  .theme-toggle,
  .nudge-review-button,
  .nudge-phase-button,
  .helper-chip
) {
  border-color: var(--moss) !important;
  background: var(--moss-wash) !important;
  background-image: none !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] :is(
  button.primary,
  .button-link.primary,
  .primary-btn,
  .route-redesign .button-link.primary,
  .route-redesign button.primary,
  .route-redesign .primary,
  .route-control.route-redesign .bls-primary-action,
  .client-prefs-apply-btn,
  .nudge-phase-button
) {
  border-color: rgba(245, 239, 228, 0.34) !important;
  background: var(--paper-3) !important;
  box-shadow: 3px 4px 0 rgba(245, 239, 228, 0.08) !important;
}

html[data-theme="dark"] :is(
  .forms-tab,
  .ehr-record-tab,
  .packet-nav-item,
  .route-control.route-redesign .bls-tab
) {
  background: transparent !important;
  color: var(--ink-3) !important;
}

html[data-theme="dark"] :is(
  .forms-tab.is-active,
  .ehr-record-tab.is-active,
  .packet-nav-item.is-active,
  .route-control.route-redesign .bls-tab.is-active
) {
  border-bottom-color: var(--ember) !important;
  color: var(--ink) !important;
}

/* Final collapse-toggle lock: keep all four panel triangles visually identical. */
.route-control.route-redesign .bls-collapse-toggle {
  width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 1px solid rgba(232, 223, 209, 0.34) !important;
  background: rgba(248, 244, 236, 0.18) !important;
  box-shadow: inset 0 0 0 1px rgba(32, 34, 52, 0.08) !important;
  color: var(--ink-3) !important;
}

.route-control.route-redesign .bls-collapse-toggle:hover {
  color: var(--ink) !important;
  background: rgba(248, 244, 236, 0.3) !important;
  border-color: rgba(232, 223, 209, 0.52) !important;
  box-shadow: inset 0 0 0 1px rgba(32, 34, 52, 0.14) !important;
}

.route-control.route-redesign .bls-collapse-toggle:focus-visible {
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(32, 34, 52, 0.14),
    0 0 0 2px rgba(151, 129, 101, 0.3) !important;
}

/* Mobile containment overrides for redesigned therapist/client workspaces.
   Keep phone layouts single-column and prevent fixed desktop rails from forcing horizontal overflow. */
@media (max-width: 900px), (max-device-width: 900px) {
  body.route-control:not(.client-mode).route-redesign .workspace.control-workspace.bls-design-workspace {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    min-height: auto !important;
    padding: 12px 10px 18px !important;
    gap: 10px !important;
    overflow-x: clip;
  }

  body.route-control:not(.client-mode).route-redesign .bls-phase-rail,
  body.route-control:not(.client-mode).route-redesign .bls-script-column,
  body.route-control:not(.client-mode).route-redesign #blsNvCenter,
  body.route-control:not(.client-mode).route-redesign .bls-dock {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
  }

  body.route-control:not(.client-mode).route-redesign .bls-column-resizer {
    display: none !important;
    width: 0 !important;
    flex: 0 0 0 !important;
  }

  body.route-control:not(.client-mode).route-redesign .bls-rep-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.route-portal.route-redesign .forms-main,
  body.route-portal.route-redesign .prep-packet-layout,
  body.route-portal.route-redesign .prep-document-shell,
  body.route-portal.route-redesign .prep-document {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: clip;
  }

  body.route-portal.route-redesign .prep-packet-layout {
    grid-template-columns: 1fr !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  body.route-portal.route-redesign :is(input, textarea, select, iframe) {
    max-width: 100%;
  }
}

/* ════════════════════════════════════════════════════════════
   BLS Control — top action bar (replaces the right-side dock)
   ════════════════════════════════════════════════════════════ */
.route-control .actionbar {
  position: sticky;
  top: 8px;
  z-index: 30;
  flex-shrink: 0;
  margin: 0;
  padding: 8px 6px 0;
}
.route-control .actionbar-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--paper, #e8dfd1);
  border: 1.5px solid var(--ink, #202234);
  border-top: 3px solid var(--sun, #d99526);
  border-radius: 18px;
  box-shadow: 4px 6px 0 var(--paper-3, #cbc4bf);
  padding: 12px 16px;
}
.route-control .actionbar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  flex-wrap: wrap;
}

/* Live preview (real #stage, shrunk to a glanceable mirror) */
.route-control .actionbar .ab-stage {
  flex: 0 0 auto;
}
.route-control.route-redesign .actionbar .ab-stage .client-stage,
.route-control.route-redesign .actionbar .ab-stage .bls-client-stage {
  width: 168px;
  min-width: 168px;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 12px;
  overflow: visible;
}
.route-control.route-redesign .actionbar .ab-stage .bls-stage-frame {
  width: 168px;
  height: 95px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
}
.route-control.route-redesign .actionbar .ab-stage .stage {
  width: 168px;
  height: 95px;
  min-height: 0;
  border-radius: 12px;
  border: 1.5px solid var(--ink, #202234);
}

/* Meta: live status + countdown + presence */
.route-control .actionbar .ab-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 92px;
}
.route-control .actionbar .ab-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3, #5b6072);
  font-weight: 700;
}
.route-control .actionbar .ab-live .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-2, #a99e90);
  display: inline-block;
}
.route-control .actionbar .ab-countdown {
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink, #202234);
}
.route-control .actionbar .ab-countdown small {
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3, #5b6072);
  margin-left: 4px;
}
.route-control .actionbar .ab-presence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3, #5b6072);
}
.route-control .actionbar .ab-presence .client-presence-dot {
  margin-left: 0;
}

/* Transport */
.route-control .actionbar .ab-transport {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 1;
  justify-content: center;
}
.route-control .actionbar .ab-btn-primary {
  font-family: var(--font-sans, "Inter", system-ui, sans-serif);
  font-weight: 700;
  font-size: 15px;
  padding: 16px 28px;
  border-radius: 16px;
  border: 1.5px solid var(--ink, #202234);
  background: var(--stream, #3a6f85);
  color: var(--paper, #e8dfd1);
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink, #202234);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
  justify-content: center;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.route-control .actionbar .ab-btn-primary:hover {
  background: var(--stream-2, #1f4a5d);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink, #202234);
}
.route-control .actionbar .ab-btn-primary:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--ink, #202234);
}
.route-control .actionbar .ab-sundot {
  display: inline-block;
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--sun, #d99526);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
}
.route-control .actionbar .ab-btn {
  font-family: var(--font-sans, "Inter", system-ui, sans-serif);
  font-weight: 600;
  font-size: 13px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--ink, #202234);
  background: var(--paper-soft, #f0eae0);
  color: var(--ink, #202234);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--paper-3, #cbc4bf);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.route-control .actionbar .ab-btn:hover {
  background: var(--paper-3, #cbc4bf);
  transform: translate(-1px, -1px);
}
.route-control .actionbar .ab-btn:active {
  transform: translate(1px, 1px);
}
.route-control .actionbar .ab-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.route-control .actionbar .ab-btn-ghost {
  font-size: 12px;
  padding: 9px 13px;
  box-shadow: 2px 2px 0 var(--paper-3, #cbc4bf);
  color: var(--ink-2, #313548);
}

/* Rep counters */
.route-control .actionbar .ab-reps {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 6px;
  margin-right: 28px;
}
.route-control .actionbar .ab-rep-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  width: 104px;
  min-width: 104px;
  padding: 4px 7px;
  background: var(--paper-soft, #f0eae0);
  border: 1px solid var(--line, #c6bba9);
  border-radius: 10px;
}
.route-control .actionbar .ab-rep-stat strong {
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink, #202234);
  line-height: 1;
}
.route-control .actionbar .ab-rep-label {
  display: block;
  max-width: 100%;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  color: var(--ink-3, #5b6072);
}

/* Tools */
.route-control .actionbar .ab-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.route-control .actionbar .ab-divider {
  width: 1px;
  height: 36px;
  background: var(--line, #c6bba9);
}
.route-control .actionbar .ab-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--ink, #202234);
  background: var(--paper-soft, #f0eae0);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0 var(--paper-3, #cbc4bf);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.route-control .actionbar .ab-icon-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--paper-3, #cbc4bf);
  background: var(--paper-3, #cbc4bf);
}
.route-control .actionbar .ab-icon-btn.is-active {
  background: var(--paper-3, #cbc4bf);
  border-color: var(--ink, #202234);
}
.route-control .actionbar .ab-icon-btn svg {
  display: block;
  width: 28px;
  height: 28px;
  color: var(--ink, #202234);
}
.route-control .actionbar .ab-icon-btn .ab-icon-glyph {
  display: block;
  font-size: 26px;
  line-height: 1;
  color: var(--ink, #202234);
}
.route-control .actionbar .ab-icon-btn.is-active svg {
  color: var(--ink, #202234);
}

/* Inline settings panel — hidden until the gear is clicked.
   Two columns: tabs + controls on the left, BLS link card on the right. */
.route-control .actionbar-settings {
  display: none;
  width: 100%;
  padding-top: 14px;
  margin-top: 12px;
  border-top: 1px solid var(--line, #c6bba9);
  gap: 12px 18px;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 380px;
  grid-template-rows: auto 152px;
  grid-template-areas:
    "tabs tabs"
    "panel link";
}
.route-control .actionbar-settings.is-open {
  display: grid;
}
.route-control .actionbar-settings .bls-tab-strip {
  grid-area: tabs;
}
.route-control .actionbar-settings .bls-link-card {
  grid-area: link;
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  justify-self: stretch;
  width: 100%;
  margin: 6px 0 0;
  padding: 0.8rem;
  border-top: 0;
}
.route-control .actionbar-settings #blsTabMotion,
.route-control .actionbar-settings #blsTabAudio {
  grid-area: panel;
  width: 100%;
  align-self: stretch;
  overflow: hidden;
}
/* Motion controls sit side-by-side like the design's settings grid */
.route-control .actionbar-settings #blsTabMotion .bls-control-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.route-control .actionbar-settings #blsTabMotion .bls-control-block {
  margin: 0;
}

/* Audio controls: toggles sit side-by-side; sound grid spans full width below.
   Future controls fill to the right before wrapping. */
.route-control .actionbar-settings #blsTabAudio .bls-control-stack {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: start;
  align-content: start;
}
.route-control .actionbar-settings #blsTabAudio .bls-audio-sound-grid {
  flex: 0 0 100%;
  margin-top: 0;
}

/* Workspace: 3 columns now that the dock is gone — let NV fill the row */
.route-control.route-redesign .workspace.control-workspace.bls-design-workspace {
  flex-wrap: nowrap;
  --bls-panel-height: max(560px, calc(100dvh - 260px));
  padding-top: 0 !important;
  border-top: 0 !important;
}

@media (min-width: 901px) {
  .route-control.route-redesign .workspace.control-workspace.bls-design-workspace {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Keep NV collapse pinned to the right edge of the workspace. */
.route-control.route-redesign #blsNvCenter.is-collapsed {
  margin-left: auto;
}

/* Ensure resize handles stay above neighboring panel shadows and remain draggable. */
.route-control.route-redesign .bls-column-resizer {
  z-index: 4;
}

@media (max-width: 1100px) {
  .route-control .actionbar-row {
    gap: 10px;
  }
  .route-control .actionbar .ab-btn-primary {
    min-width: 150px;
  }
}

/* Dark mode — action bar uses black hard-shadows (not the light --ink) */
html[data-theme="dark"] .route-control .actionbar-inner {
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .route-control .actionbar .ab-btn-primary {
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] .route-control .actionbar .ab-btn-primary:hover {
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] .route-control .actionbar .ab-btn-primary:active {
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] .route-control .actionbar .ab-btn,
html[data-theme="dark"] .route-control .actionbar .ab-btn-ghost {
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
}
html[data-theme="dark"] .route-control .actionbar .ab-btn:hover {
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
}
html[data-theme="dark"] .route-control .actionbar .ab-icon-btn,
html[data-theme="dark"] .route-control .actionbar .ab-icon-btn:hover {
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
}
html[data-theme="dark"] .route-control .actionbar .ab-rep-stat {
  border-color: var(--line, rgba(218, 207, 190, 0.2));
}

/* NV quick-add code chips — muted, per-code riverbank tones (keep feature + keep them distinguishable) */
.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code] {
  --chip: var(--ink-3);
  background: color-mix(in srgb, var(--chip) 12%, var(--paper));
  color: var(--chip);
  border: 1px solid color-mix(in srgb, var(--chip) 42%, var(--line));
  border-radius: 8px;
  padding: 0.24rem 0.56rem;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: none;
}
.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="EM"]  { --chip: var(--code-em); }
.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="IM"]  { --chip: var(--code-im); }
.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="WP"]  { --chip: var(--ink-3); }
.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="NC"]  { --chip: var(--code-nc); }
.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="PC"]  { --chip: var(--code-pc); }
.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="SUD"] { --chip: var(--code-sud); }
.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="VOC"] { --chip: var(--code-voc); }
.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="IW"]  { --chip: var(--code-iw); }
.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="BOD"] { --chip: var(--code-bod); }
.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code="RTT"] { --chip: var(--code-rtt); }
.route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code]:hover {
  background: var(--chip);
  color: var(--paper);
  border-color: var(--chip);
  transform: translateY(-1px);
  box-shadow: none;
}
/* Dark mode — lighten the per-code hue so chips stay legible on the dark surface */
html[data-theme="dark"] .route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code] {
  color: color-mix(in srgb, var(--chip) 58%, white);
  background: color-mix(in srgb, var(--chip) 20%, var(--paper));
  border-color: color-mix(in srgb, var(--chip) 45%, var(--line));
}
html[data-theme="dark"] .route-control.route-redesign .bls-nv-control-bar .bls-code-chip[data-add-code]:hover {
  color: var(--paper);
  background: color-mix(in srgb, var(--chip) 72%, white);
  border-color: color-mix(in srgb, var(--chip) 72%, white);
}

/* NV dictation chips — "Start dictation" is the primary (matches the control-bar Start button) */
.route-control.route-redesign .bls-dictation-chip.is-primary:not(.is-active) {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.route-control.route-redesign .bls-dictation-chip.is-primary:not(.is-active):hover:not(:disabled) {
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--paper);
}
/* Dark mode — hard shadows go black (not the light --ink) */
html[data-theme="dark"] .route-control.route-redesign .bls-dictation-chip.is-primary:not(.is-active),
html[data-theme="dark"] .route-control.route-redesign .bls-dictation-chip.is-active {
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] .route-control.route-redesign .bls-dictation-chip.is-primary:not(.is-active):hover:not(:disabled) {
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

/* ════════════════════════════════════════════════════════════════════
   AUTHORITATIVE NV dictation-chip sticker style.
   Earlier duplicate rules (line ~14880 light, ~16632 dark w/ !important)
   were overriding the chips, so these are last + !important to win.
   Matches the action-bar buttons (.ab-btn) so the NV buttons stop clashing.
   ════════════════════════════════════════════════════════════════════ */
.route-control.route-redesign .bls-dictation-chip {
  border: 1.5px solid var(--ink) !important;
  border-radius: 12px !important;
  background: var(--paper-soft) !important;
  background-image: none !important;
  color: var(--ink-2) !important;
  box-shadow: 2px 2px 0 var(--paper-3) !important;
  flex: 1 1 auto;
  max-width: 100%;
  min-height: 32px;
  padding: 0.34rem 0.68rem;
  font-size: 0.74rem;
  font-weight: 600;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.route-control.route-redesign .bls-dictation-chip:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: var(--ink) !important;
  background: var(--paper-2) !important;
  box-shadow: 3px 3px 0 var(--paper-3) !important;
  transform: translate(-1px, -1px);
}
.route-control.route-redesign .bls-dictation-chip.is-primary:not(.is-active) {
  background: var(--paper) !important;
  color: var(--ink) !important;
  border-color: var(--ink) !important;
  box-shadow: 3px 3px 0 var(--ink) !important;
}
.route-control.route-redesign .bls-dictation-chip.is-primary:not(.is-active):hover:not(:disabled) {
  box-shadow: 4px 4px 0 var(--ink) !important;
}
.route-control.route-redesign .bls-dictation-chip.is-active {
  background: var(--ember) !important;
  border-color: var(--ink) !important;
  color: var(--paper) !important;
  box-shadow: 3px 3px 0 var(--ink) !important;
}
.route-control.route-redesign .bls-dictation-chip.is-danger {
  background: var(--paper-soft) !important;
  border-color: var(--code-nc, #a64a3a) !important;
  color: var(--code-nc, #a64a3a) !important;
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--code-nc, #a64a3a) 38%, var(--paper-3)) !important;
}
.route-control.route-redesign .bls-dictation-chip.is-danger:hover:not(:disabled):not([aria-disabled="true"]) {
  background: color-mix(in srgb, var(--code-nc, #a64a3a) 12%, var(--paper-soft)) !important;
  border-color: var(--code-nc, #a64a3a) !important;
}

/* Dark mode — same sticker, black hard shadows (beats the !important block at ~16632) */
html[data-theme="dark"] .route-control.route-redesign .bls-dictation-chip {
  border: 1.5px solid var(--ink) !important;
  background: var(--paper-soft) !important;
  color: var(--ink-2) !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45) !important;
}
html[data-theme="dark"] .route-control.route-redesign .bls-dictation-chip:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--paper-3) !important;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45) !important;
}
html[data-theme="dark"] .route-control.route-redesign .bls-dictation-chip.is-primary:not(.is-active) {
  background: var(--paper-3) !important;
  color: var(--ink) !important;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5) !important;
}
html[data-theme="dark"] .route-control.route-redesign .bls-dictation-chip.is-active {
  background: var(--ember) !important;
  border-color: var(--ink) !important;
  color: #fff !important;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5) !important;
}
html[data-theme="dark"] .route-control.route-redesign .bls-dictation-chip.is-danger {
  background: rgba(166, 74, 58, 0.2) !important;
  border-color: var(--code-nc, #a64a3a) !important;
  color: #f0b9b0 !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45) !important;
}

/* ════ Colored top bands per panel + consistent framing ════
   Must match the specificity of the rule at ~line 15715
   (body.route-control:not(.client-mode).route-redesign … #blsNvCenter),
   which sets `border` + a heavy 7px/8px shadow !important on every column.
   action bar = sun · rail = stream · script = ember · NV = moss.
   Shadow normalized to the action bar's 4px/6px so all panels frame alike. */
/* Light — html:not([data-theme=dark]) prefix matches the 0,5,2 rule at ~17080 that forces border-color */
html:not([data-theme="dark"]) body.route-control:not(.client-mode).route-redesign .bls-phase-rail {
  border-top: 3px solid var(--stream) !important;
  box-shadow: 4px 6px 0 var(--paper-3) !important;
}
html:not([data-theme="dark"]) body.route-control:not(.client-mode).route-redesign .bls-script-column {
  border-top: 3px solid var(--ember) !important;
  box-shadow: 4px 6px 0 var(--paper-3) !important;
}
html:not([data-theme="dark"]) body.route-control:not(.client-mode).route-redesign .bls-nv-center,
html:not([data-theme="dark"]) body.route-control:not(.client-mode).route-redesign #blsNvCenter {
  border-top: 3px solid var(--moss) !important;
  box-shadow: 4px 6px 0 var(--paper-3) !important;
}
/* Dark — match the dark theme-prefixed rules */
html[data-theme="dark"] body.route-control:not(.client-mode).route-redesign .bls-phase-rail {
  border-top: 3px solid var(--stream) !important;
  box-shadow: 4px 6px 0 rgba(0, 0, 0, 0.4) !important;
}
html[data-theme="dark"] body.route-control:not(.client-mode).route-redesign .bls-script-column {
  border-top: 3px solid var(--ember) !important;
  box-shadow: 4px 6px 0 rgba(0, 0, 0, 0.4) !important;
}
html[data-theme="dark"] body.route-control:not(.client-mode).route-redesign .bls-nv-center,
html[data-theme="dark"] body.route-control:not(.client-mode).route-redesign #blsNvCenter {
  border-top: 3px solid var(--moss) !important;
  box-shadow: 4px 6px 0 rgba(0, 0, 0, 0.4) !important;
}

/* ════ Two-button system — remove the dashed/lavender style ════
   Save version · Delete version (.bls-script-action) and Copy · Generate new link
   (.bls-link-action) were dashed-moss (rule ~17519). Convert them to the secondary
   sticker style so the page has only: primary sticker + secondary sticker.
   `html body…` = 0,4,2, beats the 0,4,1 / 0,3,0 !important rules on these classes. */
html body.route-control:not(.client-mode).route-redesign .bls-script-action,
html body.route-control:not(.client-mode).route-redesign .bls-link-action {
  border: 1.5px solid var(--ink) !important;
  border-radius: 12px !important;
  background: var(--paper-soft) !important;
  background-image: none !important;
  color: var(--ink-2) !important;
  box-shadow: 2px 2px 0 var(--paper-3) !important;
  font-family: var(--font-sans, "Inter", system-ui, sans-serif) !important;
  font-weight: 600 !important;
  padding: 8px 14px !important;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
html body.route-control:not(.client-mode).route-redesign .bls-script-action:hover:not(:disabled),
html body.route-control:not(.client-mode).route-redesign .bls-link-action:hover:not(:disabled) {
  background: var(--paper-2) !important;
  border-color: var(--ink) !important;
  box-shadow: 3px 3px 0 var(--paper-3) !important;
  transform: translate(-1px, -1px) !important;
}
html[data-theme="dark"] body.route-control:not(.client-mode).route-redesign .bls-script-action,
html[data-theme="dark"] body.route-control:not(.client-mode).route-redesign .bls-link-action {
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45) !important;
}
html[data-theme="dark"] body.route-control:not(.client-mode).route-redesign .bls-script-action:hover:not(:disabled),
html[data-theme="dark"] body.route-control:not(.client-mode).route-redesign .bls-link-action:hover:not(:disabled) {
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45) !important;
}

/* Save version / Delete version — smaller than the other secondary buttons */
html body.route-control:not(.client-mode).route-redesign .bls-script-action {
  min-height: 0 !important;
  padding: 5px 11px !important;
  font-size: 0.72rem !important;
  border-radius: 10px !important;
}

/* ════════════════════════════════════════════════════════════
   Credits & thanks (therapist profile + client portal settings)
   ════════════════════════════════════════════════════════════ */
.credits-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 720px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-2, #313548);
}
.credits-body h3,
.credits-body h5 {
  margin: 0.4rem 0 0;
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  font-weight: 600;
  color: var(--ink, #202234);
}
.credits-body h3 { font-size: 1.05rem; }
.credits-body h5 { font-size: 0.95rem; }
.credits-body ul {
  margin: 0;
  padding-left: 1.2rem;
}
.credits-body li + li {
  margin-top: 0.3rem;
}
.credits-body a {
  color: var(--stream-2, #1f4a5d);
  text-decoration: underline;
}
.credits-body .support-copy {
  font-size: 0.82rem;
  color: var(--ink-3, #5b6072);
  font-style: italic;
}
