:root {
  --brand-navy: #0b3a75;
  --brand-blue: #4f95d0;
  --surface-muted: #f5f7fa;
  --text-main: #17202a;
}

html,
body {
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  color: var(--text-main);
  background: var(--surface-muted);
}

main {
  flex: 1;
}

a {
  color: var(--brand-navy);
}

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

.status-indicator {
  cursor: help;
}

.status-indicator:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: white;
  background: var(--brand-navy);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-navbar {
  background: var(--brand-navy);
}

.app-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.4rem;
}

.synthetic-banner {
  padding: 0.45rem 1rem;
  color: #3f2d00;
  text-align: center;
  background: #fff3cd;
  border-bottom: 1px solid #e8c970;
}

.app-footer {
  color: #43505c;
  font-size: 0.875rem;
  background: white;
  border-top: 1px solid #d8dde3;
}

.institutional-marks img {
  width: auto;
  max-width: 10rem;
  height: 2rem;
  object-fit: contain;
}

.btn-primary {
  --bs-btn-bg: var(--brand-navy);
  --bs-btn-border-color: var(--brand-navy);
  --bs-btn-hover-bg: #082d5b;
  --bs-btn-hover-border-color: #082d5b;
}

.card,
.table-responsive {
  border-color: #d8dde3;
}

.schedule-config-form {
  max-width: 72rem;
  border: 1px solid #aeb8c2;
  box-shadow: 0 0.3rem 1rem rgb(23 32 42 / 8%);
}

.schedule-config-overview,
.schedule-current-summary {
  padding: 1.15rem 1.25rem;
  background: #edf4fa;
  border: 1px solid #a8bfd2;
  border-left: 0.35rem solid var(--brand-blue);
  border-radius: 0.5rem;
}

.schedule-config-flow {
  margin-top: 0.25rem;
}

.schedule-config-flow > div > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.schedule-config-flow strong {
  color: var(--brand-navy);
}

.schedule-config-panel {
  min-width: 0;
  padding: 1.1rem;
  background: #f2f5f8;
  border: 1px solid #aeb8c2;
  border-radius: 0.55rem;
}

.schedule-config-field {
  padding: 1rem;
  margin-bottom: 1rem;
  background: #fff;
  border: 1px solid #b4bec8;
  border-radius: 0.45rem;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.schedule-config-field:last-child {
  margin-bottom: 0;
}

.schedule-config-field:focus-within {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 0.18rem rgb(79 149 208 / 18%);
}

.schedule-config-form .form-control,
.schedule-config-form .form-select {
  color: #102235;
  background-color: #fff;
  border: 1.5px solid #5f6f7f;
  box-shadow: inset 0 1px 2px rgb(23 32 42 / 7%);
}

.schedule-config-form .form-control:hover,
.schedule-config-form .form-select:hover {
  border-color: #243f5a;
}

.schedule-config-form .form-control:focus,
.schedule-config-form .form-select:focus {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 0.22rem rgb(244 124 32 / 28%);
}

.schedule-config-form .form-control:disabled,
.schedule-config-form .form-select:disabled {
  color: #56616d;
  background-color: #dfe4e8;
  border-color: #98a3ad;
  opacity: 1;
  cursor: not-allowed;
}

.schedule-config-field-disabled {
  color: #58636e;
  background: #e7ebef;
  border-style: dashed;
}

.schedule-config-field-disabled:focus-within {
  border-color: #98a3ad;
  box-shadow: none;
}

.schedule-selection-help {
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  margin-top: 0.65rem;
  color: #24384b;
  background: #edf4fa;
  border-left: 0.25rem solid var(--brand-blue);
}

.schedule-inactive-note {
  padding: 0.65rem 0.75rem;
  margin-top: 0.65rem;
  color: #3f4b56;
  background: #f6f7f8;
  border: 1px dashed #8f9aa5;
  border-radius: 0.35rem;
}

.field-help-trigger {
  width: fit-content;
  text-decoration: underline dotted #5f6f7f;
  text-underline-offset: 0.2rem;
  cursor: help;
}

.field-help-trigger:hover,
.field-help-trigger:focus-visible {
  color: var(--brand-navy);
  text-decoration-color: var(--brand-navy);
}

.fixed-order-table th:first-child {
  width: 6rem;
}

.schedule-config-panel.schedule-config-field-disabled [data-fixed-order-controls],
.schedule-config-panel.schedule-config-field-disabled .schedule-fixed-review {
  display: none;
}

.schedule-fixed-review {
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #aeb8c2;
  border-radius: 0.35rem;
}

.schedule-method-guide {
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid #aeb8c2;
  border-radius: 0.45rem;
}

@media (max-width: 48rem) {
  .schedule-config-flow {
    grid-template-columns: 1fr;
  }
}

.page-heading {
  margin-bottom: 1.5rem;
}

.identifier {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-wrap: anywhere;
}

.login-shell {
  display: grid;
  min-height: 70vh;
  place-items: center;
}

.login-card {
  width: min(100%, 32rem);
}

.login-brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.login-brand-slot {
  display: grid;
  flex: 0 0 auto;
  width: 5rem;
  height: 5rem;
  place-items: center;
}

.login-brand-slot-wordmark {
  width: 9.25rem;
}

.login-brand-logo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.login-mark {
  border-radius: 0.75rem;
}

.login-form-content {
  width: min(100%, 28rem);
  margin-inline: auto;
}

@media (max-width: 420px) {
  .login-brand-lockup {
    gap: 0.6rem;
  }

  .login-brand-slot {
    width: 5.25rem;
    height: 3.75rem;
  }

  .login-brand-slot-wordmark {
    width: 6.25rem;
  }
}

.login-card input[type="text"],
.login-card input[type="password"] {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
}

.metric-number {
  color: var(--brand-navy);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.dashboard-metric-card {
  border-top: 0.25rem solid var(--brand-blue);
}

.dashboard-metric-label {
  margin: 0.45rem 0 0.25rem;
  color: #24384b;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.dashboard-attention-card {
  border-left: 0.3rem solid var(--brand-accent);
}

.dashboard-card-link {
  color: var(--brand-navy);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.operational-card {
  color: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.operational-card:hover {
  border-color: var(--brand-blue);
  box-shadow: 0 0.2rem 0.7rem rgb(23 32 42 / 10%);
  transform: translateY(-1px);
}

.operational-card:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 3px;
}

.current-condition {
  border-left: 0.4rem solid var(--brand-accent);
}

.non-blocking-panel {
  border-left: 0.3rem solid var(--brand-blue);
}

.action-note {
  display: block;
  margin-top: 0.3rem;
}

.table > tbody > tr.current-row > * {
  background: #fff8e8;
}

.empty-state {
  padding: 2rem;
  text-align: center;
  background: white;
  border: 1px dashed #aeb7c1;
  border-radius: 0.5rem;
}

@media (max-width: 61.998rem) {
  .navbar-collapse {
    padding-top: 1rem;
  }
}

.preview-banner {
  border-left: 0.4rem solid var(--brand-accent);
  font-size: 1.05rem;
}

.survey-page-shell {
  width: 100%;
  max-width: 90rem;
  margin-inline: auto;
}

.survey-heading {
  max-width: 68rem;
}

.survey-preview-form .form-control,
.survey-preview-form .form-select {
  color: var(--text-main);
  background-color: #fff;
  border: 1.5px solid #647281;
  box-shadow: inset 0 1px 2px rgb(23 32 42 / 6%);
}

.survey-preview-form .form-control:hover,
.survey-preview-form .form-select:hover {
  border-color: #34495e;
}

.survey-preview-form .form-control:focus,
.survey-preview-form .form-select:focus {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 0.22rem rgb(244 124 32 / 30%);
}

.survey-preview-form .form-control:disabled,
.survey-preview-form .form-select:disabled {
  color: #5c6670;
  background-color: #e9edf1;
  border-color: #9ca6af;
  opacity: 1;
}

.survey-preview-form .form-control.is-invalid,
.survey-preview-form .form-select.is-invalid,
.survey-preview-form [aria-invalid="true"] {
  border-color: #b02a37;
  box-shadow: 0 0 0 0.18rem rgb(176 42 55 / 16%);
}

input.survey-radio,
input.survey-checkbox {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  border: 1.5px solid #4e5b67;
  accent-color: var(--brand-navy);
  cursor: pointer;
}

input.survey-radio:focus-visible,
input.survey-checkbox:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 0.18rem #fff;
}

input.survey-radio:disabled,
input.survey-checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.survey-preview-context,
.survey-context {
  background: #f8fafc;
  border-left: 0.3rem solid var(--brand-blue);
}

.survey-layout {
  display: grid;
  grid-template-columns: minmax(13rem, 15rem) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}

.survey-navigator {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  background: white;
  border: 1px solid #bac3cc;
  border-radius: 0.6rem;
  box-shadow: 0 0.2rem 0.7rem rgb(23 32 42 / 7%);
}

.survey-navigator .nav-link {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
  color: var(--text-main);
}

.survey-navigator .nav-link.active {
  color: white;
  background: var(--brand-navy);
}

.survey-navigator .nav-link:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}

.survey-section {
  overflow: hidden;
  margin-bottom: 1.75rem;
  background: #fff;
  border: 1px solid #b8c2cc;
  border-radius: 0.65rem;
  box-shadow: 0 0.25rem 0.9rem rgb(23 32 42 / 6%);
  scroll-margin-top: 1rem;
}

.survey-section-header {
  padding: 1.35rem 1.5rem 1.25rem;
  color: #132f50;
  background: #edf4fa;
  border-bottom: 1px solid #aebdca;
}

.survey-section-header > .small {
  color: #526779;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.survey-section-header h2 {
  margin-bottom: 0.45rem;
  font-size: 1.55rem;
}

.survey-section-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.survey-item {
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.15rem;
  background: #fbfcfd;
  border: 1px solid #cbd3db;
  border-radius: 0.55rem;
  scroll-margin-top: 1rem;
}

.survey-item:last-of-type {
  margin-bottom: 0.85rem;
}

.survey-item:focus-within {
  border-color: #637b91;
  box-shadow: 0 0 0 0.2rem rgb(79 149 208 / 15%);
}

.survey-item-error {
  background: #fff8f8;
  border: 2px solid #b02a37;
  box-shadow: 0 0 0 0.18rem rgb(176 42 55 / 10%);
}

.survey-fieldset {
  min-width: 0;
}

.survey-prompt {
  max-width: 68rem;
  margin-bottom: 1rem;
  color: #172b3f;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.45;
}

.required-indicator {
  display: inline-block;
  padding: 0.14rem 0.35rem;
  margin-left: 0.45rem;
  color: #842029;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.1;
  background: #fce8ea;
  border: 1px solid #dca7ad;
  border-radius: 0.25rem;
  text-transform: uppercase;
  vertical-align: 0.12rem;
}

.choice-group {
  display: grid;
  gap: 0.7rem;
  width: 100%;
  max-width: 70rem;
}

.choice-layout-compact {
  grid-template-columns: repeat(var(--choice-columns), minmax(0, 1fr));
}

.choice-layout-wrapped {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
}

.choice-layout-wide {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr));
}

.choice-option-label {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
  min-height: 3rem;
  padding: 0.6rem 0.8rem;
  background: #fff;
  border: 1.5px solid #7d8995;
  border-radius: 0.4rem;
  cursor: pointer;
  line-height: 1.3;
  overflow-wrap: anywhere;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.choice-option-label:hover {
  background: #f2f7fb;
  border-color: var(--brand-navy);
}

.choice-option-label:has(input:checked) {
  font-weight: 650;
  background: #e8f2fb;
  border: 2px solid var(--brand-navy);
  box-shadow: inset 0 -3px 0 var(--brand-navy);
}

.choice-option-label:has(input:focus-visible) {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}

.choice-option-label:has(input:disabled) {
  color: #606a74;
  background: #e9edf1;
  border-color: #9ca6af;
  cursor: not-allowed;
}

.choice-option-text {
  min-width: 0;
}

.scale-response {
  max-width: 70rem;
}

.scale-anchor-grid,
.scale-choice-grid {
  display: grid;
  grid-template-columns: repeat(var(--scale-columns), minmax(2.6rem, 1fr));
  gap: 0.35rem;
}

.scale-anchor-grid {
  align-items: end;
  margin: 0 0 0.55rem;
  color: #3f5060;
  font-size: 0.84rem;
}

.scale-anchor-grid > span {
  max-width: 11rem;
  line-height: 1.25;
}

.scale-anchor-grid > span:first-child {
  justify-self: start;
  text-align: left;
}

.scale-anchor-grid > span:not(:first-child):not(:last-child) {
  justify-self: center;
  text-align: center;
}

.scale-anchor-grid > span:last-child {
  justify-self: end;
  text-align: right;
}

.scale-anchor-ends {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.55rem;
  color: #3f5060;
  font-size: 0.86rem;
}

.scale-anchor-ends > span:last-child {
  text-align: right;
}

.scale-choice-label {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 3.55rem;
  padding: 0.45rem 0.25rem;
  color: #263746;
  background: #fff;
  border: 1.5px solid #778491;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.scale-choice-label:hover {
  background: #f2f7fb;
  border-color: var(--brand-navy);
}

.scale-choice-label:has(input:checked) {
  color: #071f3d;
  font-weight: 750;
  background: #e5f1fb;
  border: 2px solid var(--brand-navy);
  box-shadow: inset 0 -4px 0 var(--brand-navy);
}

.scale-choice-label:has(input:focus-visible) {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}

.scale-choice-label:has(input:disabled) {
  color: #606a74;
  background: #e9edf1;
  border-color: #9ca6af;
  cursor: not-allowed;
}

.scale-choice-number {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.scale-density-compact .scale-choice-grid {
  row-gap: 0.55rem;
}

.scale-density-compact .scale-choice-label {
  min-height: 2.9rem;
  padding-block: 0.3rem;
}

.survey-matrix-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #9eabb7;
  border-radius: 0.45rem;
}

.survey-matrix-scroll:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}

.survey-matrix-table {
  width: 100%;
  min-width: 43rem;
  margin: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.survey-matrix-table th,
.survey-matrix-table td {
  padding: 0.65rem 0.35rem;
  text-align: center;
  vertical-align: middle;
  border-right: 1px solid #c5ced6;
  border-bottom: 1px solid #c5ced6;
}

.survey-matrix-table th:last-child,
.survey-matrix-table td:last-child {
  border-right: 0;
}

.survey-matrix-table tbody tr:last-child > * {
  border-bottom: 0;
}

.survey-matrix-table thead th {
  color: #142c45;
  font-size: 0.86rem;
  font-weight: 750;
  background: #dfeaf3;
}

.survey-matrix-table .matrix-row-heading,
.survey-matrix-table tbody th {
  width: 14rem;
  padding-inline: 0.85rem;
  text-align: left;
}

.survey-matrix-table tbody th {
  color: #23384b;
  font-weight: 650;
  background: #f4f7f9;
}

.survey-matrix-table .matrix-response-row:nth-child(even) td,
.survey-matrix-table .matrix-response-row:nth-child(even) th {
  background: #eef3f7;
}

.matrix-column-value,
.matrix-column-anchor {
  display: block;
}

.matrix-column-value {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.matrix-column-anchor {
  margin-top: 0.15rem;
  color: #3e5265;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.15;
}

.matrix-choice-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  background: #fff;
  border: 1.5px solid #7b8894;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.matrix-choice-label:hover {
  background: #f0f6fb;
  border-color: var(--brand-navy);
}

.matrix-selection-indicator {
  position: absolute;
  right: -0.15rem;
  bottom: -0.15rem;
  display: none;
  width: 1rem;
  height: 1rem;
  color: #fff;
  background: var(--brand-navy);
  border: 2px solid #fff;
  border-radius: 50%;
}

.matrix-selection-indicator::after {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 0.64rem;
  font-weight: 900;
  content: "✓";
  transform: translate(-50%, -55%);
}

.matrix-choice-label:has(input:checked) {
  background: #dcecf9;
  border: 2px solid var(--brand-navy);
  box-shadow: 0 0 0 3px rgb(11 58 117 / 16%);
}

.matrix-choice-label:has(input:checked) .matrix-selection-indicator {
  display: block;
}

.matrix-choice-label:has(input:focus-visible) {
  outline: 3px solid var(--brand-accent);
  outline-offset: 3px;
}

.matrix-choice-label:has(input:disabled) {
  background: #e9edf1;
  border-color: #9ca6af;
  cursor: not-allowed;
}

.matrix-response-row-error > * {
  background: #fff1f2 !important;
  border-bottom-color: #b02a37;
}

.matrix-error-row td {
  padding: 0.45rem 0.85rem;
  text-align: left;
  background: #fff1f2;
}

.survey-display-value {
  padding: 1rem;
  color: #263746;
  background: #f1f5f8;
  border: 1px solid #9facb8;
  border-radius: 0.4rem;
}

.survey-error-summary {
  border: 2px solid #b02a37;
  box-shadow: 0 0.2rem 0.6rem rgb(176 42 55 / 12%);
}

.survey-error-summary a {
  font-weight: 650;
  text-decoration-thickness: 0.12em;
}

.invalid-feedback {
  margin-top: 0.6rem;
  color: #9f1c29;
  font-weight: 650;
}

.form-text {
  margin-top: 0.6rem;
  color: #4c5966;
}

.survey-back-to-top {
  display: inline-block;
  margin-top: 0.35rem;
}

.survey-preview-actions {
  max-width: calc(100% - 16.75rem);
  margin-left: auto;
  border-color: #aeb9c3;
}

.survey-number {
  max-width: 12rem;
}

.current-step-card {
  border-left-width: 0.45rem;
}

.session-runner-identity {
  padding-bottom: 1rem;
  border-bottom: 1px solid #d5dde5;
}

.session-runner-identity-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  color: #4c5966;
}

.workflow-stage-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(9.5rem, 1fr));
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.workflow-stage {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  min-width: 9.5rem;
  padding: 0.7rem;
  color: #263746;
  text-decoration: none;
  background: #fff;
  border: 1px solid #cbd5df;
  border-radius: 0.45rem;
}

.workflow-stage:hover,
.workflow-stage:focus-visible {
  color: #172b4d;
  border-color: #174a7c;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgb(23 74 124 / 20%);
}

.workflow-stage-marker {
  width: 0.75rem;
  height: 0.75rem;
  margin-top: 0.3rem;
  background: #77838f;
  border: 2px solid #77838f;
  border-radius: 50%;
}

.workflow-stage-content,
.workflow-stage-state {
  display: block;
}

.workflow-stage-content span,
.workflow-stage-state {
  font-size: 0.78rem;
  color: #4c5966;
}

.workflow-stage-content .workflow-stage-route {
  display: flex;
  gap: 0.22rem;
  align-items: center;
  margin-top: 0.45rem;
}

.workflow-stage-route i,
.workflow-stage-route b {
  display: inline-grid;
  place-items: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding-inline: 0.25rem;
  color: #29465f;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 750;
  line-height: 1;
  background: #edf4fa;
  border: 1px solid #a9c2d7;
  border-radius: 999px;
}

.workflow-stage-route em {
  color: #6b7c8b;
  font-style: normal;
}

.workflow-stage-route-block b,
.workflow-stage-route-survey b {
  color: #6d4300;
  background: #fff3cd;
  border-color: #e3bd62;
}

.workflow-stage-route-survey i,
.workflow-stage-route-closeout i {
  width: auto;
  padding-inline: 0.45rem;
}

.workflow-stage-route-closeout b {
  color: #fff;
  background: var(--brand-navy);
  border-color: var(--brand-navy);
}

.workflow-stage-state {
  grid-column: 2;
  font-weight: 700;
}

.workflow-stage-complete .workflow-stage-marker {
  background: #198754;
  border-color: #198754;
}

.workflow-stage-current_block {
  background: #eef6ff;
  border: 2px solid #174a7c;
}

.workflow-stage-current_block .workflow-stage-marker {
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.22rem;
  background: #174a7c;
  border-color: #174a7c;
  box-shadow: 0 0 0 0.18rem rgb(23 74 124 / 18%);
}

.workflow-stage-current_block .workflow-stage-state {
  color: #174a7c;
}

.workflow-stage-draft .workflow-stage-marker {
  background: #fff;
  border-color: #b7791f;
  border-style: dashed;
}

.workflow-stage-invalid {
  border-color: #b02a37;
}

.workflow-stage-invalid .workflow-stage-marker {
  background: #b02a37;
  border-color: #b02a37;
}

.session-command-center {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
  gap: 1rem;
}

.session-command-center-solo {
  grid-template-columns: minmax(0, 1fr);
}

.session-up-next-card {
  align-self: stretch;
  background: #f5f7f9;
  border-color: #cbd5df;
}

.session-step-position {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.session-position-cue {
  display: inline-flex;
  gap: 0.35rem;
  align-items: baseline;
  padding: 0.3rem 0.55rem;
  font-size: 0.88rem;
  border: 1px solid #cbd5df;
  border-radius: 999px;
}

.session-position-cue > span {
  color: #4c5966;
}

.session-position-cue-block {
  background: #eef6ff;
  border-color: #90b8df;
}

.session-position-cue-condition {
  background: #f3f7f4;
  border-color: #b1ccb9;
}

.session-position-cue-overall {
  background: #f5f7f9;
}

.session-task-identity {
  margin-bottom: 1rem;
}

.session-task-identity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.session-task-identity-item,
.session-geometry-order {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem;
  border: 1px solid #cbd5df;
  border-radius: 0.45rem;
}

.session-task-identity-item > span,
.session-geometry-order > span {
  color: #4c5966;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.session-task-identity-item strong {
  font-size: 1.1rem;
}

.session-task-identity-item small {
  color: #4c5966;
}

.session-task-identity-condition {
  background: #eef6ff;
  border-color: #90b8df;
}

.session-task-identity-interface {
  background: #f3f7f4;
  border-color: #b1ccb9;
}

.session-task-identity-camera {
  background: #f8f3fb;
  border-color: #cdb5dc;
}

.session-geometry-order {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
  margin-top: 0.6rem;
  background: #fff8e8;
  border-color: #e3c66d;
}

.session-geometry-order strong {
  display: inline-block !important;
  padding: 0.18rem 0.45rem;
  font-size: 0.92rem;
  background: rgb(255 255 255 / 68%);
  border: 1px solid rgb(178 133 24 / 28%);
  border-radius: 999px;
}

.session-geometry-order > div {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.current-step-next {
  padding-top: 0.75rem;
  color: #34495a;
  border-top: 1px solid #cbd5df;
}

.workflow-block {
  overflow: hidden;
}

.workflow-block-summary {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style-position: inside;
}

.workflow-block[open] > .workflow-block-summary {
  border-bottom: 1px solid rgb(0 0 0 / 12.5%);
}

.workflow-current-marker {
  display: inline-block;
  padding: 0.08rem 0.35rem;
  margin-right: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  vertical-align: middle;
  background: #174a7c;
  border-radius: 999px;
}

.workflow-table thead th,
.workflow-table tfoot th,
.workflow-table tfoot td {
  background: #f5f7f9;
}

.workflow-boundary {
  border-color: #aeb9c3;
}

.workflow-survey-boundary {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.workflow-gate-symbol {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 2.6rem;
  height: 2.6rem;
  padding-inline: 0.45rem;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  background: var(--brand-navy);
  border: 2px solid #fff;
  border-radius: 0.65rem;
  box-shadow: 0 0 0 1px #9bb4c9, 0 0.2rem 0.55rem rgb(11 58 117 / 16%);
}

.workflow-gate-symbol-post-interface {
  color: #6d4300;
  background: #ffd66f;
  box-shadow: 0 0 0 1px #d3a834, 0 0.2rem 0.55rem rgb(191 139 16 / 16%);
}

.workflow-gate-symbol-exit {
  background: #198754;
  box-shadow: 0 0 0 1px #76b78f, 0 0.2rem 0.55rem rgb(25 135 84 / 16%);
}

.workflow-gate-symbol-closeout {
  background: #59427c;
  box-shadow: 0 0 0 1px #a896c3, 0 0.2rem 0.55rem rgb(89 66 124 / 16%);
}

.workflow-post-interface-gate > * {
  background: #fff8e8 !important;
  border-top: 2px solid #e3bd62;
}

.legacy-workflow-notice {
  border-left: 0.35rem solid #d6961c;
}

.session-audit-details summary,
.session-operational-follow-up + .card summary {
  cursor: pointer;
}

.survey-completion-summary dt,
.survey-completion-summary dd {
  padding-block: 0.45rem;
  border-bottom: 1px solid #d5dde5;
}

.survey-completion-summary dt:last-of-type,
.survey-completion-summary dd:last-of-type {
  border-bottom: 0;
}

@media (max-width: 61.998rem) {
  .survey-layout {
    grid-template-columns: 1fr;
  }

  .survey-navigator {
    position: static;
  }

  .survey-preview-actions {
    max-width: none;
  }

  .survey-section-body,
  .survey-section-header {
    padding-inline: 1rem;
  }

  .session-command-center {
    grid-template-columns: 1fr;
  }

  .session-task-identity-grid {
    grid-template-columns: 1fr;
  }

  .workflow-stage-nav {
    display: flex;
  }

  .workflow-stage {
    flex: 0 0 10.5rem;
  }

  .survey-item {
    padding-inline: 1rem;
  }
}

/* Soft Academic Premium: shared visual refinement without changing page structure. */
:root {
  --surface-raised: #ffffff;
  --surface-soft: #f8fafc;
  --surface-blue: #edf4fa;
  --text-muted: #536273;
  --border-subtle: #d9e1e8;
  --border-strong: #aebdca;
  --shadow-card: 0 0.5rem 1.5rem rgb(23 32 42 / 7%);
  --shadow-card-hover: 0 0.75rem 2rem rgb(23 32 42 / 11%);
  --shadow-float: 0 1rem 2.5rem rgb(23 32 42 / 14%);
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --bs-body-color: var(--text-main);
  --bs-body-bg: var(--surface-muted);
  --bs-border-color: var(--border-subtle);
  --bs-primary: var(--brand-navy);
  --bs-primary-rgb: 11, 58, 117;
  --bs-link-color: var(--brand-navy);
  --bs-link-hover-color: #082d5b;
  --bs-focus-ring-color: rgb(244 124 32 / 30%);
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  background: linear-gradient(180deg, #f9fbfd 0, var(--surface-muted) 18rem);
}

h1,
.h1 {
  color: var(--brand-navy);
  font-weight: 750;
  letter-spacing: -0.025em;
}

h2,
.h2,
h3,
.h3 {
  letter-spacing: -0.015em;
}

.text-secondary,
.form-text {
  color: var(--text-muted) !important;
}

.app-navbar {
  background: linear-gradient(105deg, #082d5b, var(--brand-navy));
  border-bottom: 1px solid rgb(255 255 255 / 16%);
  box-shadow: 0 0.25rem 1rem rgb(8 45 91 / 18%);
}

.navbar {
  --bs-navbar-padding-y: 0.7rem;
}

.navbar-brand {
  font-weight: 650;
  letter-spacing: -0.01em;
}

.app-mark {
  border-radius: var(--radius-sm);
  box-shadow: 0 0.2rem 0.5rem rgb(0 0 0 / 18%);
}

.app-footer {
  color: var(--text-muted);
  background: rgb(255 255 255 / 88%);
  border-top-color: var(--border-subtle);
}

.page-heading {
  margin-bottom: 1.75rem;
}

.page-heading .lead {
  max-width: 70ch;
  color: var(--text-muted);
}

.card,
.table-responsive {
  border-color: var(--border-subtle);
  border-radius: var(--radius-md);
}

.card {
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

.card-header,
.card-footer {
  background-color: var(--surface-soft);
  border-color: var(--border-subtle);
}

.table-responsive {
  background: var(--surface-raised);
  box-shadow: 0 0.25rem 0.8rem rgb(23 32 42 / 4%);
}

.table > :not(caption) > * > * {
  border-bottom-color: var(--border-subtle);
}

.table > thead > tr > * {
  color: #24384b;
  font-size: 0.82rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  background: var(--surface-soft);
}

.table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: #f1f7fc;
}

.btn {
  --bs-btn-border-radius: var(--radius-sm);
  min-height: 2.55rem;
  padding: 0.5rem 0.9rem;
  font-weight: 650;
  letter-spacing: 0.005em;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease,
    border-color 140ms ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  --bs-btn-bg: var(--brand-navy);
  --bs-btn-border-color: var(--brand-navy);
  --bs-btn-hover-bg: #082d5b;
  --bs-btn-hover-border-color: #082d5b;
  --bs-btn-active-bg: #06264c;
  --bs-btn-active-border-color: #06264c;
  --bs-btn-focus-shadow-rgb: 244, 124, 32;
  box-shadow: 0 0.2rem 0.45rem rgb(11 58 117 / 18%);
}

.btn-primary:hover {
  box-shadow: 0 0.35rem 0.75rem rgb(11 58 117 / 24%);
}

.btn-outline-primary,
.btn-outline-secondary {
  --bs-btn-border-width: 1.5px;
}

.form-label,
.form-check-label {
  color: #263746;
  font-weight: 600;
}

.form-control,
.form-select {
  min-height: 2.7rem;
  color: var(--text-main);
  background-color: var(--surface-raised);
  border: 1.5px solid #9ba9b5;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 2px rgb(23 32 42 / 4%);
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.form-control:hover,
.form-select:hover {
  border-color: #647789;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 0.24rem rgb(244 124 32 / 24%);
}

.form-control:disabled,
.form-select:disabled {
  color: #64707c;
  background-color: #e9eef2;
  border-color: #c2ccd4;
  opacity: 1;
}

.form-check {
  min-height: 1.7rem;
  padding-block: 0.15rem;
}

.form-check-input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.16rem;
  background-color: #fff;
  border: 2px solid #647789;
  box-shadow: inset 0 1px 1px rgb(23 32 42 / 5%);
  cursor: pointer;
}

.form-check-input:hover {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 0.18rem rgb(79 149 208 / 16%);
}

.form-check-input:focus {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 0.24rem rgb(244 124 32 / 28%);
}

.form-check-input:checked,
.form-check-input[type="checkbox"]:indeterminate {
  background-color: var(--brand-navy);
  border-color: var(--brand-navy);
}

.form-check-input:disabled {
  background-color: #e1e7ec;
  border-color: #aeb9c3;
  box-shadow: none;
}

.form-check-input:disabled ~ .form-check-label {
  color: #687582;
}

input.survey-radio,
input.survey-checkbox {
  background-color: #fff;
  border-color: #516270;
}

input.survey-radio:checked,
input.survey-checkbox:checked {
  background-color: var(--brand-navy);
  border-color: var(--brand-navy);
}

/* Operational oversight forms use grouped choices instead of a single, collapsing checkbox field. */
.choice-fieldset {
  min-width: 0;
  padding: 1rem;
  margin: 0;
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.choice-fieldset > .form-text {
  max-width: 68ch;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.6rem;
}

.choice-grid > div {
  min-width: 0;
}

.choice-grid > .choice-widget {
  display: contents;
}

.choice-grid label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-height: 100%;
  padding: 0.72rem 0.8rem;
  color: var(--text-main);
  line-height: 1.35;
  background: var(--surface-raised);
  border: 1px solid #c5d0d9;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.choice-grid label:hover {
  border-color: var(--brand-blue);
  background: #f7fbff;
}

.choice-grid .form-check-input,
.choice-grid input.choice-widget {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.04rem 0 0;
  appearance: none;
  background-color: #fff;
  border: 2px solid #647789;
  border-radius: 0.25rem;
  box-shadow: inset 0 1px 1px rgb(23 32 42 / 5%);
  cursor: pointer;
}

.choice-grid input.choice-widget:hover {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 0.18rem rgb(79 149 208 / 16%);
}

.choice-grid input.choice-widget:focus-visible {
  outline: 3px solid rgb(244 124 32 / 32%);
  outline-offset: 2px;
}

.choice-grid input.choice-widget:checked {
  background-color: var(--brand-navy);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='m3 8 3 3 7-7'/%3E%3C/svg%3E");
  border-color: var(--brand-navy);
}

.choice-grid input.choice-widget:disabled {
  background-color: #e1e7ec;
  border-color: #aeb9c3;
  box-shadow: none;
  cursor: not-allowed;
}

.choice-grid input:focus-visible + label,
.choice-grid label:focus-within {
  outline: 3px solid rgb(244 124 32 / 32%);
  outline-offset: 2px;
}

.choice-grid input:checked + label,
.choice-grid label:has(input:checked) {
  background: #edf4fa;
  border-color: var(--brand-navy);
  box-shadow: inset 0 0 0 1px var(--brand-navy);
}

.choice-grid label:has(input:disabled) {
  color: #687582;
  background: #e9eef2;
  cursor: not-allowed;
}

.operational-form-card {
  min-height: 100%;
}

.operational-guidance-card {
  background: #edf4fa;
  border-color: #bfd0df;
}

.operational-guidance-card ul {
  padding-left: 1.2rem;
}

.operational-guidance-card li + li {
  margin-top: 0.55rem;
}

.operational-danger-card {
  border-color: #dc9ca2;
}

.operational-definition-list {
  display: grid;
  gap: 0.75rem;
}

.operational-definition-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #c6d4df;
}

.operational-definition-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.operational-definition-list dt {
  font-weight: 600;
}

.operational-definition-list dd {
  margin: 0;
  text-align: right;
}

.operational-disclosures {
  display: grid;
  gap: 1rem;
}

.operational-disclosures > h2 {
  margin: 0.5rem 0 0;
}

.operational-disclosure {
  overflow: hidden;
}

.operational-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
}

.operational-disclosure > summary::-webkit-details-marker {
  display: none;
}

.operational-disclosure > summary::after {
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  content: "";
  border-right: 2px solid var(--brand-navy);
  border-bottom: 2px solid var(--brand-navy);
  transform: rotate(45deg) translateY(-0.2rem);
  transition: transform 140ms ease;
}

.operational-disclosure[open] > summary::after {
  transform: rotate(225deg) translate(-0.1rem, -0.1rem);
}

.operational-disclosure > summary:focus-visible {
  outline: 3px solid rgb(244 124 32 / 36%);
  outline-offset: -3px;
}

.operational-disclosure small {
  display: block;
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.operational-disclosure-count,
.role-member-count {
  flex: 0 0 auto;
  padding: 0.25rem 0.55rem;
  color: #29465f;
  font-size: 0.8125rem;
  font-weight: 650;
  white-space: nowrap;
  background: var(--surface-blue);
  border: 1px solid #c3d5e4;
  border-radius: 999px;
}

.operational-filter-panel > summary {
  background: var(--surface-soft);
}

.role-summary-card {
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.role-summary-card:hover {
  border-color: #b7cbdc;
  box-shadow: var(--shadow-card-hover);
}

.role-capability-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.4rem 0.75rem;
}

.role-capability-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: #314557;
  font-size: 0.9rem;
}

.role-capability-list li::before {
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.38rem;
  content: "";
  background: var(--brand-blue);
  border-radius: 50%;
}

@media (max-width: 575.98px) {
  .choice-grid,
  .role-capability-list {
    grid-template-columns: 1fr;
  }

  .operational-definition-list div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .operational-definition-list dd {
    text-align: left;
  }
}

.alert {
  border-width: 1px;
  border-radius: var(--radius-md);
  box-shadow: 0 0.2rem 0.7rem rgb(23 32 42 / 5%);
}

.badge {
  padding: 0.42em 0.65em;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.modal-content {
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
}

.modal-header,
.modal-footer {
  border-color: var(--border-subtle);
}

.schedule-config-form,
.survey-navigator,
.survey-section {
  border-radius: var(--radius-lg);
}

.schedule-config-form {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

.schedule-config-panel {
  background: var(--surface-soft);
  border-color: var(--border-subtle);
  border-radius: var(--radius-md);
}

.schedule-config-field {
  border-color: var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 0.2rem 0.65rem rgb(23 32 42 / 3%);
}

.schedule-config-field:focus-within {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 0.22rem rgb(79 149 208 / 16%);
}

.survey-navigator {
  background: rgb(255 255 255 / 94%);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.survey-navigator .nav-link {
  border-radius: var(--radius-sm);
}

.survey-section {
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.survey-section-header {
  background: linear-gradient(120deg, #f3f8fc, var(--surface-blue));
  border-bottom-color: #cad9e5;
}

.survey-item {
  background: var(--surface-soft);
  border-color: var(--border-subtle);
  border-radius: var(--radius-md);
}

.survey-item:focus-within {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 0.24rem rgb(79 149 208 / 14%);
}

.choice-option-label,
.scale-choice-label {
  border-color: #8c9ba8;
  border-radius: var(--radius-sm);
  box-shadow: 0 0.1rem 0.3rem rgb(23 32 42 / 3%);
}

.choice-option-label:has(input:checked),
.scale-choice-label:has(input:checked) {
  box-shadow: inset 0 -3px 0 var(--brand-navy), 0 0.2rem 0.5rem rgb(11 58 117 / 10%);
}

.matrix-choice-label {
  border-color: #7f909e;
  box-shadow: 0 0.1rem 0.3rem rgb(23 32 42 / 4%);
}

.operational-card:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-card-hover);
}

.workflow-stage,
.session-task-identity-item,
.session-geometry-order {
  border-color: var(--border-subtle);
  border-radius: var(--radius-md);
}

/* Legacy sessions retain their frozen nine-condition workflow without implying plan stages. */
.legacy-condition-progress {
  padding: 1rem;
  background: linear-gradient(135deg, #edf4fa, #f9fbfd);
  border: 1px solid #bfd0df;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.legacy-condition-progress-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: baseline;
  margin: 0 0 0.8rem;
  color: #29465f;
}

.legacy-condition-progress-heading strong {
  color: var(--brand-navy);
}

.legacy-interface-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.legacy-interface-group {
  min-width: 0;
  padding: 0.7rem;
  background: rgb(255 255 255 / 74%);
  border: 1px solid #c8d7e3;
  border-radius: var(--radius-sm);
}

.legacy-interface-group > header {
  display: grid;
  gap: 0.1rem;
  margin-bottom: 0.55rem;
}

.legacy-interface-group > header > span {
  color: #597083;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.legacy-interface-group > header > strong {
  color: var(--brand-navy);
}

.legacy-interface-group > header > small {
  color: var(--text-muted);
}

.legacy-condition-progress-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.legacy-condition-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.3rem 0.55rem;
  align-items: center;
  min-width: 0;
  padding: 0.6rem;
  color: #24384b;
  text-decoration: none;
  background: #fff;
  border: 1px solid #c8d4de;
  border-radius: var(--radius-sm);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.legacy-condition-step:hover,
.legacy-condition-step:focus-visible {
  color: #172b4d;
  border-color: var(--brand-blue);
  outline: 0;
  box-shadow: 0 0 0 0.22rem rgb(79 149 208 / 18%);
  transform: translateY(-1px);
}

.legacy-condition-step-ordinal {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  color: #385269;
  font-weight: 750;
  background: #e8eff5;
  border: 1px solid #b9cad8;
  border-radius: 50%;
}

.legacy-condition-step-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.legacy-condition-step-copy strong,
.legacy-condition-step-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legacy-condition-step-copy small {
  margin-top: 0.15rem;
  color: var(--text-muted);
}

.legacy-condition-step-state {
  grid-column: 2;
}

.legacy-condition-step-complete {
  background: #f1f8f4;
  border-color: #a8cfb5;
}

.legacy-condition-step-complete .legacy-condition-step-ordinal {
  color: #fff;
  background: #198754;
  border-color: #198754;
}

.legacy-condition-step-current {
  background: #fff8e8;
  border: 2px solid #e09b24;
  box-shadow: 0 0.25rem 0.8rem rgb(224 155 36 / 16%);
}

.legacy-condition-step-current .legacy-condition-step-ordinal {
  color: #172b4d;
  background: #ffd26a;
  border-color: #e09b24;
}

.legacy-ledger-count {
  padding: 0.3rem 0.6rem;
  color: #29465f;
  font-size: 0.84rem;
  font-weight: 650;
  white-space: nowrap;
  background: #edf4fa;
  border: 1px solid #bfd0df;
  border-radius: 999px;
}

.legacy-execution-ledger {
  margin-top: 1rem;
}

.legacy-execution-ledger .current-row > * {
  background-color: #fff8e8;
}

@media (max-width: 61.998rem) {
  .legacy-interface-groups {
    grid-template-columns: 1fr;
  }

  .legacy-condition-progress-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 35.998rem) {
  .legacy-condition-progress {
    padding: 0.75rem;
  }

  .legacy-condition-progress-steps {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .btn:hover {
    transform: none;
  }
}

/* Researcher-first session runner: keep the live procedure visible without hiding frozen detail. */
.alert-compact {
  padding: 0.6rem 2.8rem 0.6rem 0.85rem;
  margin-bottom: 0.8rem;
  font-size: 0.92rem;
}

.alert-compact .btn-close {
  padding: 0.65rem;
}

.session-runner-identity {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.5rem;
  align-items: end;
  justify-content: space-between;
  padding: 0 0 0.75rem;
  margin-bottom: 0.65rem;
}

.session-runner-title .text-uppercase {
  font-size: 0.72rem;
  letter-spacing: 0.055em;
}

.session-runner-identity h1 {
  color: var(--brand-navy);
}

.session-runner-identity-details {
  justify-content: flex-end;
  gap: 0.2rem 0.85rem;
  font-size: 0.88rem;
}

.session-test-notice {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  margin: 0 0 0.75rem;
  color: #44515c;
  font-size: 0.84rem;
  background: #eef1f4;
  border: 1px solid #cbd3da;
  border-radius: 0.45rem;
}

.workflow-stage-nav {
  grid-template-columns: minmax(6.2rem, 0.7fr) repeat(3, minmax(10.8rem, 1.45fr)) minmax(6.4rem, 0.76fr) minmax(6.8rem, 0.82fr);
  gap: 0.4rem;
  overflow: visible;
  padding-bottom: 0;
}

.workflow-stage {
  display: block;
  min-width: 0;
  padding: 0.55rem;
  background: #fff;
  border: 1px solid #cbd5df;
  border-radius: 0.55rem;
}

.workflow-stage-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.4rem;
  align-items: start;
}

.workflow-stage-marker {
  width: 0.62rem;
  height: 0.62rem;
  margin-top: 0.25rem;
}

.workflow-stage-content strong {
  color: #263746;
  font-size: 0.9rem;
}

.workflow-stage-content > span {
  display: block;
  font-size: 0.7rem;
  line-height: 1.25;
}

.workflow-stage-nodes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.22rem;
  margin-top: 0.5rem;
}

.workflow-stage-route-pre .workflow-stage-nodes,
.workflow-stage-route-exit .workflow-stage-nodes,
.workflow-stage-route-closeout .workflow-stage-nodes {
  grid-template-columns: minmax(0, 1fr);
}

.workflow-progress-node {
  display: grid;
  min-width: 0;
  min-height: 1.7rem;
  place-items: center;
  padding: 0.15rem;
  color: #29465f;
  font-size: 0.69rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  background: #edf4fa;
  border: 1px solid #a9c2d7;
  border-radius: 999px;
}

.workflow-progress-node:hover,
.workflow-progress-node:focus-visible {
  color: #172b4d;
  border-color: #174a7c;
  outline: 0;
  box-shadow: 0 0 0 0.18rem rgb(23 74 124 / 18%);
}

.workflow-progress-node-complete {
  color: #fff;
  background: #198754;
  border-color: #198754;
}

.workflow-progress-node-current_survey {
  color: #fff;
  background: #174a7c;
  border-color: #174a7c;
  box-shadow: 0 0 0 0.16rem rgb(23 74 124 / 18%);
}

.workflow-progress-node-current_task {
  color: #174a7c;
  background: #eaf4ff;
  border: 2px solid #174a7c;
  box-shadow: 0 0 0 0.12rem rgb(23 74 124 / 12%);
}

.workflow-progress-node-draft {
  color: #79520f;
  background: #fff8e8;
  border-color: #b7791f;
  border-style: dashed;
}

.workflow-progress-node-attention {
  color: #fff;
  background: #b02a37;
  border-color: #b02a37;
}

.workflow-stage-state {
  display: block;
  min-height: 1.1rem;
  margin-top: 0.38rem;
  color: #4c5966;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.2;
}

.workflow-stage-current {
  background: #eef6ff;
  border: 2px solid #174a7c;
}

.workflow-stage-current .workflow-stage-state {
  color: #174a7c;
}

.workflow-stage-complete .workflow-stage-marker {
  background: #198754;
  border-color: #198754;
}

.workflow-stage-current .workflow-stage-marker {
  background: #174a7c;
  border-color: #174a7c;
}

.workflow-stage-attention {
  border-color: #b02a37;
}

.workflow-stage-attention .workflow-stage-marker {
  background: #b02a37;
  border-color: #b02a37;
}

.workflow-stage-draft .workflow-stage-marker {
  background: #fff;
  border-color: #b7791f;
  border-style: dashed;
}

.session-command-center {
  display: block;
}

.current-step-card {
  border-left-width: 0.4rem;
}

.session-survey-position {
  display: inline-block;
  padding: 0.22rem 0.5rem;
  color: #29465f;
  font-size: 0.83rem;
  font-weight: 700;
  background: #edf4fa;
  border: 1px solid #a9c2d7;
  border-radius: 999px;
}

.session-step-position {
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.session-position-cue {
  padding: 0.24rem 0.48rem;
  font-size: 0.8rem;
}

.session-task-identity {
  margin-bottom: 0.75rem;
}

.session-task-identity-grid {
  gap: 0.45rem;
}

.session-task-identity-item,
.session-geometry-order {
  padding: 0.6rem;
  border-radius: 0.5rem;
}

.session-task-identity-item strong {
  font-size: 1rem;
}

.session-geometry-order {
  display: block;
  margin-top: 0.45rem;
}

.session-geometry-order > span {
  display: block;
  margin-bottom: 0.35rem;
}

.session-geometry-order ol {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.28rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.session-geometry-order li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem;
  align-items: start;
  padding: 0.28rem 0.4rem;
  font-size: 0.8rem;
  line-height: 1.28;
  background: rgb(255 255 255 / 68%);
  border: 1px solid rgb(178 133 24 / 28%);
  border-radius: 0.35rem;
}

.session-geometry-order li b {
  display: inline-grid;
  width: 1.2rem;
  height: 1.2rem;
  place-items: center;
  color: #6d4300;
  font-size: 0.7rem;
  background: #fff3cd;
  border: 1px solid #e3bd62;
  border-radius: 999px;
}

.session-geometry-order li strong {
  display: block !important;
  padding: 0;
  font-size: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.current-step-next {
  position: relative;
  padding: 0.18rem 0 0.18rem 2rem;
  margin-bottom: 0;
  color: #42596b;
  font-size: 0.92rem;
  background: transparent;
  border: 0;
  border-left: 2px solid #a9c2d7;
  border-radius: 0;
}

.current-step-next::before {
  position: absolute;
  top: 0.15rem;
  left: 0.45rem;
  display: grid;
  width: 1.1rem;
  height: 1.1rem;
  place-items: center;
  color: #29465f;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  content: "→";
  background: #edf4fa;
  border: 1px solid #a9c2d7;
  border-radius: 50%;
}

.session-operational-follow-up > summary,
.workflow-configuration > summary {
  cursor: pointer;
}

.session-operational-follow-up > summary {
  list-style-position: inside;
}

.session-disposition-control {
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-subtle);
}

.workflow-configuration summary {
  color: #29465f;
  font-size: 0.82rem;
  font-weight: 700;
}

@media (max-width: 61.998rem) {
  .session-runner-identity {
    align-items: start;
  }

  .session-runner-identity-details {
    justify-content: flex-start;
  }

  .workflow-stage-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.35rem;
  }

  .workflow-stage {
    flex: 0 0 11rem;
  }
}

@media (max-width: 35.998rem) {
  .session-geometry-order ol {
    grid-template-columns: 1fr;
  }
}
