/* Web fonts removed from critical path for offline use; body uses system UI stack below. */

/* ALManac Share mode banner */
.almanac-share-banner {
  background: #1565c0;
  color: #fff;
  padding: 0.35rem 1rem;
  font-weight: bold;
  font-size: 0.9rem;
  text-align: center;
}

.project-dictionaries-root {
  padding: 0.85rem;
}

.project-dictionaries-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.project-dictionaries-header h3 {
  margin: 0 0 0.25rem 0;
}

.project-dictionaries-header p,
.project-dictionary-help {
  margin: 0;
  color: #52606d;
  line-height: 1.4;
}

.project-dictionaries-system-note {
  border: 1px solid #d8dee9;
  background: #f7f9fc;
  border-radius: 6px;
  color: #44546a;
  font-size: 0.84rem;
  padding: 0.45rem 0.6rem;
  white-space: nowrap;
}

.project-dictionaries-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.project-dictionaries-search {
  min-width: 240px;
  max-width: 420px;
  flex: 1 1 260px;
  padding: 0.42rem 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.project-dictionaries-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #44546a;
  font-size: 0.9rem;
}

.project-dictionaries-table-scroll {
  max-height: calc(100vh - 280px);
  overflow: auto;
}

.project-dictionaries-table {
  min-width: 920px;
  width: 100%;
}

.project-dictionaries-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.project-dictionaries-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: #334155;
}

.project-dictionaries-inline {
  width: 100%;
  box-sizing: border-box;
  min-width: 90px;
  padding: 0.28rem 0.4rem;
}

.project-dictionaries-order {
  min-width: 72px;
}

.project-dictionaries-used {
  min-width: 46px;
}

.project-dictionaries-empty {
  color: #52606d;
  padding: 0.85rem;
  text-align: center;
}

.project-dictionaries-row-archived {
  color: #64748b;
  background: #f8fafc;
}

.modal-content.project-dictionary-modal-content {
  box-sizing: border-box;
  max-width: 980px;
  width: min(94vw, 980px);
}

.project-dictionary-release-form-grid {
  align-items: end;
  column-gap: 1rem;
  row-gap: 0.85rem;
  margin-top: 1rem;
}

.project-dictionary-release-form-grid .form-group {
  margin-bottom: 0;
  min-width: 0;
}

.project-dictionary-release-form-grid .form-group label {
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.project-dictionary-release-form-grid .form-control {
  min-height: 2.6rem;
}

.project-dictionary-release-field-id {
  grid-column: span 2;
}

.project-dictionary-release-field-label {
  grid-column: span 4;
}

.project-dictionary-release-field-date,
.project-dictionary-release-field-author {
  grid-column: span 3;
}

.project-dictionary-release-field-link {
  grid-column: span 7;
}

.project-dictionary-release-field-status {
  grid-column: span 3;
}

.project-dictionary-release-field-order {
  grid-column: span 2;
}

.project-dictionary-release-field-notes {
  grid-column: 1 / -1;
  align-self: stretch;
}

.project-dictionary-modal-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
  margin-top: 0.85rem;
}

.project-dictionary-modal-actions .toolbar-btn {
  min-height: 2.4rem;
  min-width: 8rem;
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

.project-dictionary-linked-list {
  margin-top: 0.75rem;
  border: 1px solid #d8dee9;
  border-radius: 6px;
  padding: 0.65rem;
  background: #f8fafc;
}

.project-dictionary-linked-list h3 {
  margin: 0 0 0.35rem 0;
  font-size: 1rem;
}

.project-dictionary-link-button {
  border: 0;
  background: transparent;
  color: #1d4ed8;
  padding: 0.12rem 0;
  text-align: left;
  cursor: pointer;
}

.requirement-release-empty-action {
  margin-top: 0.35rem;
  width: 100%;
}

@media (max-width: 900px) {
  .project-dictionary-release-field-id,
  .project-dictionary-release-field-status,
  .project-dictionary-release-field-order {
    grid-column: span 3;
  }

  .project-dictionary-release-field-label,
  .project-dictionary-release-field-date,
  .project-dictionary-release-field-author,
  .project-dictionary-release-field-link {
    grid-column: span 6;
  }
}

@media (max-width: 640px) {
  .modal-content.project-dictionary-modal-content {
    width: 94vw;
  }

  .project-dictionary-release-field-id,
  .project-dictionary-release-field-label,
  .project-dictionary-release-field-date,
  .project-dictionary-release-field-author,
  .project-dictionary-release-field-link,
  .project-dictionary-release-field-status,
  .project-dictionary-release-field-order {
    grid-column: 1 / -1;
  }

  .project-dictionary-modal-actions .toolbar-btn {
    flex: 1 1 100%;
  }
}

body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; padding: 0; display: flex; flex-direction: column; height: 100vh; background: #f5f5f5; }
/* Stack breadcrumb chrome above sidebar+content (body was row-only, which turned the chrome row into a left column). */
.almanac-app-shell { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.almanac-main-columns { flex: 1; display: flex; flex-direction: row; min-height: 0; min-width: 0; }
.sidebar { width: min(32vw, 560px); min-width: 260px; max-width: 640px; background: #fff; padding: 1rem; border-right: 1px solid #ccc; overflow-y: auto; transition: all 0.3s ease; flex-shrink: 0; }
.sidebar.collapsed { width: 0 !important; min-width: 0 !important; max-width: 0 !important; padding: 0 !important; overflow: hidden; border-right: none; flex-shrink: 0; }
.filter-section { margin-bottom: 1rem; }
.filter-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.filter-table th { background: #eee; padding: 0.5rem; text-align: left; font-weight: bold; border: 1px solid #ddd; }
.filter-table td { padding: 0.25rem; border: 1px solid #ddd; vertical-align: middle; }
.filter-table .filter-label-col { width: auto; }
.filter-table .filter-dropdown-col { width: 15ch; max-width: 15ch; }
/* Narrower, more compact layout for Attribute Values in Scenario tab */
.attr-values-table { max-width: 900px; }
.attr-values-table .filter-label-col { width: 55%; }
/* Constrain Initial State and Action columns to around 15 characters */
.filter-table th.filter-dropdown-col,
.filter-table td:nth-child(2),
.filter-table td:nth-child(3) {
  width: 15ch;
  max-width: 15ch;
}
.filter-table .filter-group-header { background: #f5f5f5; font-weight: bold; font-size: 0.85rem; color: #555; }
.filter-table .filter-attribute-label { font-size: 0.75rem; padding-left: 1rem; }
.attr-code-in-brackets { color: #c00; font-weight: bold; }
.filter-table select { width: 100%; padding: 0.25rem; font-size: 0.75rem; border: 1px solid #ccc; }
.enre-subnav-bar { display: flex; align-items: center; justify-content: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
#enre-subnav { display: flex; gap: 0.5rem; flex-wrap: wrap; min-width: 0; }
.enre-subnav-controls { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--alm-text, #222); font-size: 0.92rem; }
.enre-subnav-controls input[type="checkbox"] { margin: 0; }
.enre-subnav-controls label { cursor: pointer; user-select: none; }
.reset-buttons { margin-top: 1rem; display: flex; gap: 0.5rem; }
.reset-btn { flex: 1; padding: 0.5rem; font-size: 0.75rem; cursor: pointer; }
/* Main column: flex so active view can fill height and scroll internally (sticky table headers). */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  padding: 1rem;
  overflow: hidden;
}
#main-menu.toolbar {
  flex-shrink: 0;
}
.view-container.active {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  margin-bottom: 0;
}
#publication-view.view-container.active,
#license-view.view-container.active {
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  scroll-padding-bottom: 2rem;
}

.almanac-publication-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--alm-border, #d7dbe2);
  background: #f8fafc;
  color: var(--alm-text-muted, #52606d);
  font-size: 0.82rem;
  line-height: 1.45;
  min-width: 0;
}
.almanac-publication-footer--hidden {
  display: none !important;
}
.almanac-publication-footer-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}
.almanac-publication-footer-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin: -0.15rem -0.2rem 0 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--alm-text-muted, #52606d);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.almanac-publication-footer-close:hover,
.almanac-publication-footer-close:focus-visible {
  border-color: var(--alm-border, #d7dbe2);
  background: #eef2f7;
  color: var(--alm-text, #222);
}
.almanac-publication-footer a {
  color: #164c8f;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
@media (max-width: 640px) {
  .almanac-publication-footer {
    padding: 0.55rem 0.7rem;
    gap: 0.45rem;
    font-size: 0.78rem;
  }
  .almanac-publication-footer-close {
    width: 1.55rem;
    height: 1.55rem;
  }
}
.publication-view-root {
  gap: 1rem;
  min-width: 0;
}
.publication-hero,
.publication-panel,
.publication-metadata {
  box-sizing: border-box;
  width: 100%;
  max-width: 56rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.publication-hero {
  padding: 1rem;
  border: 1px solid var(--alm-border, #d7dbe2);
  border-radius: 8px;
  background: #f8fbff;
}
.publication-eyebrow {
  margin-bottom: 0.35rem;
  color: #3559c7;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.publication-hero h2,
.publication-panel h3 {
  margin: 0 0 0.5rem;
  overflow-wrap: anywhere;
}
.publication-hero p,
.publication-panel p {
  margin: 0.35rem 0 0;
  color: var(--alm-text-muted, #52606d);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.publication-metadata {
  display: grid;
  grid-template-columns: minmax(10rem, max-content) minmax(0, 1fr);
  gap: 0;
  margin: 0;
  border: 1px solid var(--alm-border, #d7dbe2);
  border-radius: 8px;
  overflow: hidden;
}
.publication-metadata dt,
.publication-metadata dd {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--alm-border, #d7dbe2);
}
.publication-metadata dt {
  background: #f1f5f9;
  font-weight: 700;
  color: #314054;
}
.publication-metadata dd {
  background: #fff;
  min-width: 0;
  overflow-wrap: anywhere;
}
.publication-metadata dt:last-of-type,
.publication-metadata dd:last-of-type {
  border-bottom: 0;
}
.publication-panel {
  padding: 1rem;
  border: 1px solid var(--alm-border, #d7dbe2);
  border-radius: 8px;
  background: #fff;
}
.publication-panel ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}
.publication-panel li + li {
  margin-top: 0.3rem;
}
.publication-panel a {
  color: #164c8f;
  overflow-wrap: anywhere;
}
.almanac-public-banner {
  background: #334155;
}
body.almanac-public-mode #almanac-file-toolbar-group,
body.almanac-public-mode #almanac-settings-toolbar-group,
body.almanac-public-mode #almanac-flow-toolbar-group,
body.almanac-public-mode #almanac-source-update-chip,
body.almanac-public-mode #almanac-local-ai-health-chip,
body.almanac-public-mode #btn-spec,
body.almanac-public-mode #btn-codex,
body.almanac-public-mode #btn-service {
  display: none !important;
}
/* Inner scrollport for sticky headers; do not scroll the whole tab. */
#glossary-view.view-container.active,
#requirements-view.view-container.active,
#bpmn-view.view-container.active,
#data-model-view.view-container.active,
#scenario-view.view-container.active,
#rules-view.view-container.active {
  overflow: hidden;
}
/* Scenario workspace panels host the sticky-table scroll areas. */
#scenario-matrix-panel,
#scenario-gherkin-panel,
#scenario-model-panel,
#scenario-gherkin-rules-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
/* Matrix/Gherkin wrappers must not clip sticky headers in Chromium. */
#scenario-matrix-panel .alm-table-horizontal-scroll,
#scenario-gherkin-panel .alm-table-horizontal-scroll {
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-height: 0;
}
/* View tabs: defaults; themed overrides in "ALManac visual refresh" (~4058). */
.view-buttons { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 2px solid #ccc; }
.view-buttons button { padding: 0.5rem 1rem; margin-right: 0.5rem; cursor: pointer; font-size: 1rem; }
.view-buttons .menu-button { font-weight: bold; }
/* Toolbar: compact actions - single horizontal row, no dropdowns */
.toolbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 0.35rem; margin-bottom: 0.5rem; padding: 0.25rem 0; overflow-x: auto; min-width: 0; }
.toolbar > .toolbar-btn, .toolbar > .toolbar-sep, .toolbar > .toolbar-feedback-group { flex: 0 0 auto; }
.toolbar > .almanac-toolbar-brand,
.toolbar > .almanac-toolbar-brand-slot { flex: 0 0 auto; }
/* View tabs share the top row with File (see #main-menu > .view-buttons themed overrides below). */
.toolbar > .view-buttons { flex: 1 1 auto; min-width: 0; }
.almanac-toolbar-brand {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.15rem 0.3rem 0;
  color: #12385a;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}
.almanac-toolbar-brand-slot {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  position: relative;
  overflow: visible;
}
.toolbar-feedback-group { position: relative; display: inline-flex; align-items: center; }
/* position: fixed set in JS so the panel is not clipped by .toolbar overflow */
.almanac-feedback-toolbar-panel {
  z-index: 1200;
  padding: 0.35rem;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: max-content;
  max-width: min(90vw, 640px);
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.almanac-feedback-toolbar-panel[hidden] { display: none !important; }
/* Unified File menu: compact density + 2-column action grids to reduce vertical scroll */
#almanac-file-toolbar-panel.almanac-file-toolbar-panel--sections.almanac-feedback-toolbar-panel {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  max-width: min(90vw, 34rem);
  gap: 0.35rem;
  padding: 0.25rem;
}
.almanac-file-menu-section {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
}
.almanac-file-menu-section-title {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
  line-height: 1.2;
}
.almanac-file-menu-section-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem;
  align-items: stretch;
}
.almanac-file-menu-section-actions .almanac-file-menu-btn-span-full {
  grid-column: 1 / -1;
}
.almanac-file-working-card {
  padding: 0.55rem 0.65rem;
  border: 1px solid #c8d7ea;
  border-radius: 6px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
  box-sizing: border-box;
}
.almanac-source-watch-card {
  padding: 0.55rem 0.65rem;
  border: 1px solid #b7d5f4;
  border-radius: 6px;
  background: #f2f8ff;
  box-sizing: border-box;
}
.almanac-file-working-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #12385a;
  line-height: 1.25;
}
.almanac-source-watch-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f4f8f;
  line-height: 1.25;
}
.almanac-file-working-detail {
  margin-top: 0.22rem;
  font-size: 0.7rem;
  line-height: 1.35;
  color: #4b6279;
}
.almanac-source-watch-detail {
  margin-top: 0.22rem;
  font-size: 0.7rem;
  line-height: 1.35;
  color: #345d85;
}
@media (max-width: 380px) {
  .almanac-file-menu-section-actions {
    grid-template-columns: 1fr;
  }
}
.almanac-settings-toolbar-panel.almanac-feedback-toolbar-panel {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  max-width: min(90vw, 28rem);
  gap: 0.4rem;
  padding: 0.3rem;
}
.almanac-settings-toolbar-section {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.almanac-settings-toolbar-section--danger {
  padding-top: 0.1rem;
  border-top: 1px solid var(--alm-border, #d7dce2);
}
.almanac-settings-toolbar-section-title {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
  line-height: 1.2;
}
.almanac-settings-toolbar-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.32rem;
  align-items: stretch;
}
.almanac-settings-toolbar-btn-span-full {
  grid-column: 1 / -1;
}
@media (max-width: 380px) {
  .almanac-settings-toolbar-actions {
    grid-template-columns: 1fr;
  }
}


/* Flow panel: readable workflow guide (next to File menu) */
#almanac-flow-toolbar-panel.almanac-flow-toolbar-panel.almanac-feedback-toolbar-panel {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  max-width: min(92vw, 36rem);
  /* Tall enough to show the full workflow on typical screens; still capped by viewport */
  max-height: min(92vh, 56rem);
  overflow-y: auto;
  scroll-padding-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
  gap: 0;
}
.almanac-flow-panel-inner {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #263238;
  padding-bottom: 0.35rem;
}
.almanac-flow-panel-title {
  margin: 0 0 0.35rem 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1565c0;
}
.almanac-flow-panel-lead {
  margin: 0 0 0.65rem 0;
  font-size: 0.86rem;
  color: #455a64;
}
.almanac-flow-section {
  margin: 0 0 0.75rem 0;
}
.almanac-flow-section h3 {
  margin: 0 0 0.35rem 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #37474f;
}
.almanac-flow-section ul {
  margin: 0.25rem 0 0 1.1rem;
  padding: 0;
  max-width: 100%;
}
.almanac-flow-panel-inner .almanac-flow-section li {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.almanac-flow-section p {
  margin: 0.25rem 0 0.35rem 0;
}
.almanac-flow-next {
  margin: 0.35rem 0 0.5rem 0;
  font-size: 0.8rem;
  font-style: italic;
  color: #546e7a;
}
.almanac-flow-note {
  margin: 0.4rem 0 0 0;
  padding: 0.45rem 0.5rem;
  background: #eceff1;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #455a64;
}
.almanac-flow-panel-more {
  margin: 0.35rem 0 0 0;
  font-size: 0.8rem;
  color: #546e7a;
}
.almanac-flow-panel-inner a {
  color: #1565c0;
}
.almanac-flow-nav-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  line-height: inherit;
  color: #1565c0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.08em;
}
.almanac-flow-nav-btn:hover,
.almanac-flow-nav-btn:focus-visible {
  color: #0d47a1;
}
.almanac-flow-nav-btn:focus-visible {
  outline: 2px solid rgba(21, 101, 192, 0.22);
  outline-offset: 2px;
  border-radius: 3px;
}

#almanac-file-toolbar-panel.almanac-feedback-toolbar-panel .toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  font-size: 0.8rem;
  line-height: 1.25;
  padding: 0.28rem 0.45rem;
  font-weight: 600;
  min-height: 0;
  white-space: normal;
  word-break: break-word;
  hyphens: auto;
}
#almanac-settings-toolbar-panel.almanac-feedback-toolbar-panel .toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  font-size: 0.8rem;
  line-height: 1.25;
  padding: 0.34rem 0.5rem;
  font-weight: 600;
  min-height: 0;
  white-space: normal;
  word-break: break-word;
  hyphens: auto;
}
.toolbar-btn { padding: 0.25rem 0.5rem; margin: 0; cursor: pointer; font-size: 0.9rem; border: none; border-radius: 4px; white-space: nowrap; }
.toolbar-btn.toolbar-btn-primary { background: #2196F3; color: white; }
.toolbar-btn.toolbar-btn-load { background: #4CAF50; color: white; }
.toolbar-btn.toolbar-btn-secondary { background: #eef2f5; color: #2f4a5f; border: 1px solid #c8d1da; }
.toolbar-btn.toolbar-btn-ie { background: #607D8B; color: white; }
.toolbar-btn.toolbar-btn-html { background: #FF9800; color: white; }
.toolbar-btn.toolbar-btn-settings { background: #eef2f5; color: #2f4a5f; border: 1px solid #c8d1da; }
.toolbar-btn.toolbar-btn-view-tab { background: #f0f0f0; color: #333; border: 1px solid #ccc; }
.toolbar-btn.toolbar-btn-view-tab.active { background: #4CAF50 !important; color: #fff !important; border-color: #4CAF50 !important; }
.toolbar-btn.toolbar-btn-changelog { background: #9C27B0; color: white; }
.toolbar-btn.toolbar-btn-danger { background: #c62828; color: white; }
.toolbar-btn.toolbar-btn-danger:hover { background: #b71c1c; }
.toolbar-sep { width: 1px; align-self: stretch; background: #ccc; margin: 0 0.15rem; }
.export-buttons { margin-bottom: 1rem; }
.export-buttons button { padding: 0.5rem 1rem; margin-right: 0.5rem; cursor: pointer; }
.view-container { display: none; }
/* Requirements tab: title in header; +Add flyout + Set ID as No. sit in the list filter row before "Filter:" */
.requirements-view-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 0.5rem; margin-bottom: 0.5rem; }
.requirements-view-header h3 { margin: 0; }
.requirements-view-header-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
/* Requirements view: single scroll region so content does not spill below main window */
#requirements-view-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#requirements-subview-container { flex: 1; min-height: 0; overflow-y: auto; overflow-x: auto; }
/* Requirements List: filters stay fixed; vertical scroll only in .requirements-list-body-scroll (below filter rows; sticky thead) */
#requirements-subview-container.requirements-subview-list-layout {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#requirements-subview-container.requirements-subview-user-intents-layout {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#requirements-subview-container.requirements-subview-parser-layout {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
}
/* Requirements → Sources: toolbar fixed; table scrolls with sticky thead */
#requirements-subview-container.requirements-subview-sources-layout {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-root {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 0.5rem;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-title {
  margin: 0 0 0.5rem 0;
  flex-shrink: 0;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-copy {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  color: #444;
  flex-shrink: 0;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-filter-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.65rem 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid #d7e3ee;
  border-radius: 6px;
  background: #f8fbff;
  color: #26394a;
  font-size: 0.86rem;
  flex-shrink: 0;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-resize-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid #d7dce2;
  border-radius: 999px;
  background: #f8fafc;
  color: #29465d;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-resize-toggle input {
  margin: 0;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-scroll {
  width: 100%;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-table-wrap {
  width: max-content;
  min-width: 100%;
}
#requirements-subview-container.requirements-subview-journey-layout {
  display: flex;
  flex-direction: column;
  overflow: auto;
}
#requirements-subview-container.requirements-subview-story-map-layout {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#requirements-subview-container.requirements-subview-capability-map-layout {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#requirements-list-story-map-host,
#usecase-roles-story-map-host,
.journey-detail-story-map-host {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.capability-map-view {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.5rem;
  box-sizing: border-box;
}
.capability-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem;
}
.capability-map-toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem;
}
.capability-map-toolbar-summary {
  font-size: 0.82rem;
  color: #54606c;
}
.capability-map-toolbar-btn {
  appearance: none;
  border: 1px solid #cfd8df;
  border-radius: 5px;
  background: #fff;
  color: #243746;
  min-height: 2.1rem;
  padding: 0.35rem 0.7rem;
  font-weight: 600;
  cursor: pointer;
}
.capability-map-toolbar-btn:hover,
.capability-map-toolbar-btn:focus-visible {
  border-color: #1f5f9c;
  outline: 2px solid rgba(31, 95, 156, 0.18);
  outline-offset: 1px;
}
.capability-map-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 0.75rem;
  align-items: stretch;
}
.capability-map-main,
.capability-map-details {
  min-height: 0;
  overflow: auto;
}
.capability-map-main {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.capability-map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
}
.capability-map-legend-title {
  margin: 0;
  font-size: 0.9rem;
}
.capability-map-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.capability-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: #44515c;
}
.capability-map-legend-swatch {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 3px;
  border: 1px solid currentColor;
}
.capability-map-groups {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.capability-map-group {
  border: 1px solid #d9e0e7;
  border-radius: 6px;
  background: #fff;
}
.capability-map-group-header {
  width: 100%;
  appearance: none;
  border: 0;
  border-bottom: 1px solid #e4e9ee;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  text-align: left;
}
.capability-map-group-title {
  font-weight: 700;
  color: #243746;
}
.capability-map-group-count,
.capability-map-group-collapsed-note {
  font-size: 0.78rem;
  color: #65727d;
}
.capability-map-group-collapsed-note {
  margin: 0;
  padding: 0.55rem 0.65rem;
}
.capability-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.5rem;
  padding: 0.6rem;
}
.capability-map-tile {
  min-height: 118px;
  appearance: none;
  border: 1px solid #cfd8df;
  border-left-width: 5px;
  border-radius: 6px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  padding: 0.55rem;
  text-align: left;
}
.capability-map-tile:hover,
.capability-map-tile:focus-within,
.capability-map-tile[data-selected="true"] {
  outline: 2px solid rgba(25, 118, 210, 0.24);
  outline-offset: 1px;
}
.capability-map-tile-title {
  font-weight: 700;
  color: #243746;
  line-height: 1.2;
}
.capability-map-tile-title-btn {
  appearance: none;
  border: 0;
  background: transparent;
  align-self: flex-start;
  max-width: 100%;
  padding: 0;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.capability-map-tile-title-btn:hover,
.capability-map-tile-title-btn:focus-visible {
  color: #1f5f9c;
  text-decoration: underline;
}
.capability-map-tile-title-btn:focus-visible {
  outline: 2px solid rgba(31, 95, 156, 0.24);
  outline-offset: 2px;
  border-radius: 4px;
}
.capability-map-tile-select {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.capability-map-tile-select:focus-visible {
  outline: 2px solid rgba(31, 95, 156, 0.24);
  outline-offset: 2px;
  border-radius: 4px;
}
.capability-map-tile-status,
.capability-map-tile-score,
.capability-map-tile-reason,
.capability-map-chip {
  font-size: 0.76rem;
  line-height: 1.25;
}
.capability-map-tile-status {
  font-weight: 700;
}
.capability-map-tile-score {
  color: #586673;
}
.capability-map-tile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.capability-map-chip {
  border: 1px solid #d7dee5;
  border-radius: 4px;
  padding: 0.08rem 0.28rem;
  background: #f7f9fb;
  color: #44515c;
}
.capability-map-tile-reason {
  color: #596774;
  overflow-wrap: anywhere;
}
.capability-map-tone-green {
  border-color: #2e7d32;
  color: #2e7d32;
}
.capability-map-tone-yellow {
  border-color: #a66f00;
  color: #815400;
}
.capability-map-tone-red {
  border-color: #b3261e;
  color: #9f1d18;
}
.capability-map-tone-gray {
  border-color: #7a858f;
  color: #5f6b75;
}
.capability-map-tile.capability-map-tone-green { background: #f2faf3; }
.capability-map-tile.capability-map-tone-yellow { background: #fff8e5; }
.capability-map-tile.capability-map-tone-red { background: #fff4f2; }
.capability-map-tile.capability-map-tone-gray { background: #f7f8f9; }
.capability-map-details {
  padding: 0.75rem;
}
.capability-map-details-title {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
}
.capability-map-details-status {
  margin: 0 0 0.55rem 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: #44515c;
}
.capability-map-reason-list,
.capability-map-detail-list {
  margin: 0.25rem 0 0 0;
  padding-left: 1.1rem;
}
.capability-map-detail-list-item {
  overflow-wrap: anywhere;
}
.capability-map-detail-list-item + .capability-map-detail-list-item {
  margin-top: 0.25rem;
}
.capability-map-detail-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: #1f5f9c;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
  padding: 0;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.capability-map-detail-link:hover .capability-map-detail-item-label,
.capability-map-detail-link:focus-visible .capability-map-detail-item-label {
  text-decoration: underline;
}
.capability-map-detail-link:focus-visible {
  outline: 2px solid rgba(31, 95, 156, 0.24);
  outline-offset: 2px;
  border-radius: 4px;
}
.capability-map-detail-item-label {
  font-weight: 600;
  line-height: 1.25;
}
.capability-map-detail-item-meta {
  color: #65727d;
  font-size: 0.75rem;
  line-height: 1.25;
}
.capability-map-reason-list {
  margin-bottom: 0.65rem;
}
.capability-map-detail-section {
  border-top: 1px solid #e3e8ee;
  padding-top: 0.55rem;
  margin-top: 0.55rem;
}
.capability-map-detail-heading {
  margin: 0;
  font-size: 0.86rem;
  color: #243746;
}
.capability-map-detail-empty,
.capability-map-detail-more {
  margin: 0.25rem 0 0 0;
  font-size: 0.78rem;
  color: #65727d;
}
.capability-map-empty {
  align-self: start;
}
.capability-map-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.capability-map-detail-action {
  border: 1px solid #cfd7df;
  background: #fff;
  color: #27313b;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
  cursor: pointer;
}
.capability-map-detail-action:hover,
.capability-map-detail-action:focus-visible {
  border-color: #8aa2b8;
  box-shadow: 0 0 0 2px rgba(81, 118, 151, 0.14);
}
.capability-map-executive-overview {
  margin-bottom: 0.75rem;
}
.capability-map-executive-title {
  margin: 0 0 0.25rem 0;
  font-size: 0.98rem;
}
.capability-map-executive-copy {
  margin: 0 0 0.65rem 0;
  color: #566473;
  font-size: 0.86rem;
  line-height: 1.45;
}
.capability-map-executive-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}
.capability-map-executive-stat {
  border: 1px solid #e4e8ec;
  border-radius: 6px;
  padding: 0.55rem;
  background: #fff;
}
.capability-map-executive-stat-value {
  display: block;
  font-weight: 700;
  color: #1f2933;
}
.capability-map-executive-stat-label {
  display: block;
  color: #65717f;
  font-size: 0.78rem;
}
.capability-map-executive-focus {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.5rem;
}
.capability-map-executive-item {
  border: 1px solid #e1e6eb;
  border-radius: 6px;
  padding: 0.6rem;
  text-align: left;
  cursor: pointer;
  min-height: 5.2rem;
}
.capability-map-executive-item-title,
.capability-map-executive-item-reason {
  display: block;
}
.capability-map-executive-item-title {
  font-weight: 650;
  color: #25313d;
  margin-bottom: 0.3rem;
}
.capability-map-executive-item-reason {
  color: #52606d;
  font-size: 0.8rem;
  line-height: 1.35;
}
@media (max-width: 980px) {
  .capability-map-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .capability-map-details {
    max-height: 48vh;
  }
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-table {
  width: 100%;
  min-width: 1380px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.88rem;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-table thead th {
  position: sticky;
  top: 0;
  background: #eee;
  z-index: 2;
  box-shadow: 0 1px 0 #ccc;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-table th,
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-table td {
  box-sizing: border-box;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-table td {
  vertical-align: top;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-table td:not([data-dm-spacer="1"]) {
  padding: 0.15rem 0.25rem;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-cell-center {
  text-align: center;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-empty {
  padding: 1rem;
  color: #60727e;
  text-align: center;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-src-external-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.75rem;
  padding: 0 0.45rem;
  border: 1px solid #c8d8e8;
  border-radius: 4px;
  background: #f6fbff;
  color: #1f5f90;
  font-weight: 700;
  text-decoration: none;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-src-external-link:hover,
#requirements-subview-container.requirements-subview-sources-layout .alm-src-external-link:focus-visible {
  border-color: #8fbadd;
  background: #eef7ff;
  text-decoration: underline;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-table .toolbar-btn-small {
  white-space: nowrap;
}
/* Source registry: read-only text until double-click; multiline wrap */
#requirements-subview-container.requirements-subview-sources-layout .alm-source-registry-table td.alm-src-td--editable-text {
  vertical-align: top;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-src-display {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 0.2rem 0.15rem;
  border-radius: 3px;
  cursor: text;
  min-height: 1.5em;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-src-display:hover {
  background: #fafafa;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-src-display--single {
  white-space: pre-wrap;
  word-break: break-word;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-src-url-view {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  flex-wrap: wrap;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-src-url-view .alm-src-display--url {
  flex: 1;
  min-width: 6rem;
}
#requirements-subview-container.requirements-subview-sources-layout .alm-src-open-link--empty {
  opacity: 0.45;
  font-size: 0.8rem;
  flex-shrink: 0;
}
#requirements-subview-container.requirements-subview-sources-layout textarea.alm-src-edit-active,
#requirements-subview-container.requirements-subview-sources-layout input.alm-src-edit-active {
  font: inherit;
  padding: 0.25rem;
  border: 1px solid #bbb;
  border-radius: 3px;
}
.alm-source-registry-modal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0;
  padding: 0.4rem;
  border: 1px solid #dce4ea;
  border-radius: 8px;
  background: #f8fafb;
}
.alm-source-registry-modal-tabs .gloss-modal-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  min-width: 7.5rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #eef2f5;
  color: #26394a;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.alm-source-registry-modal-tabs .gloss-modal-tab-btn.gloss-modal-tab-active {
  border-color: #8db6d3;
  background: #fff;
  color: #17324d;
}
.alm-source-registry-incoming-list,
#alm-src-edit-linked-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.alm-source-registry-incoming-section {
  border: 1px solid #e0e6eb;
  border-radius: 6px;
  background: #fff;
  padding: 0.45rem 0.55rem;
}
.alm-source-registry-incoming-section summary {
  cursor: pointer;
  color: #17324d;
  font-weight: 800;
}
.alm-source-registry-incoming-row {
  margin-top: 0.35rem;
  line-height: 1.35;
}
.alm-source-registry-incoming-meta {
  color: #667788;
  font-size: 0.8rem;
}
.alm-source-registry-incoming-empty {
  padding: 0.75rem;
  border: 1px dashed #d5dee8;
  border-radius: 6px;
  background: #fafcff;
  color: #60727e;
}
.requirements-list-body-scroll {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  position: relative;
}
/* List: validation + export gate + issues log share a bounded scroll so the table body keeps more vertical space (laptop). */
#requirements-list-upper-chrome-scroll.requirements-list-upper-chrome-scroll {
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(42vh, 360px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
/* BR / Epic / Step / Key / prototype strips — stay above the scroll region (not inside .requirements-list-body-scroll) */
.requirements-list-info-banner {
  flex-shrink: 0;
}
/* Data Model mini: single table wrap in .requirements-list-left — fill height and scroll */
.requirements-list-left > .alm-table-horizontal-scroll {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
}
/* Glossary: chrome + filters fixed; table scrolls in subview (sticky thead) */
#glossary-view-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#rules-view-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#glossary-subview-container {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
#glossary-subview-container.glossary-subview-container--ontology,
#glossary-subview-container.glossary-subview-container--ontology-graph {
  display: flex;
  flex-direction: column;
}
#glossary-subview-container.glossary-subview-container--ontology-graph {
  overflow: hidden;
}
#bpmn-subview-container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* Data model tab: Table vs ER share mount; inner roots control scroll */
#data-model-subview-container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.data-model-view-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.data-model-view-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
/* Data Model: table wrapper fills body and scrolls (same idea as .requirements-list-left > .alm-table-horizontal-scroll). Global wrapper uses overflow-y:clip — without this, tall expanded class rows are clipped with no scrollport. */
.data-model-view-body > .alm-table-horizontal-scroll {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
}
.data-model-view-body > .requirements-list-with-pane {
  flex: 1;
  min-height: 0;
  min-width: 0;
}
/* Data Model -> Attributes for: Data Model owns an overflow:hidden mount, so the class attributes table needs its own vertical scrollport. Glossary keeps its existing parent scrollport. */
.class-attributes-view {
  box-sizing: border-box;
  min-width: 0;
}
.class-attributes-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  min-width: 0;
}
.class-attributes-toolbar-btn {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  margin: 0 !important;
  white-space: nowrap;
}
.class-attributes-toolbar-btn--add {
  background: #4caf50;
  color: #fff;
}
.class-attributes-order-panel {
  flex: 0 1 auto;
  margin: 0 !important;
  min-width: 0;
}
#data-model-subview-container .class-attributes-view,
#requirements-subview-container .class-attributes-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.class-attributes-table-scrollport {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  overflow: auto;
  border-radius: 14px;
}
.data-model-er-view-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.data-model-subview-nav {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.data-model-subview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.42rem 0.82rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #274057;
  font-weight: 600;
  box-shadow: none;
}
.data-model-subview-btn:hover {
  background: #f8fafc;
}
.data-model-subview-btn.is-active,
.data-model-subview-btn[data-active="true"] {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #0f4c81;
}
.data-model-subview-btn--create {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #0f4c81;
}
.data-model-subview-btn--create:hover {
  background: #dbeafe;
}
.data-model-workspace-header {
  margin-bottom: 0.2rem;
}
.data-model-workspace-header-secondary {
  align-items: flex-start;
}
.dm-lifecycle-body {
  gap: 0.85rem;
  overflow: auto;
}
.dm-lifecycle-controls {
  flex: 1 1 38rem;
}
.dm-lifecycle-select {
  min-width: 14rem;
}
.dm-lifecycle-guidance,
.dm-lifecycle-empty {
  padding: 0.75rem 0.85rem;
  border: 1px solid #dbe4ec;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  line-height: 1.45;
}
.dm-lifecycle-guidance ol {
  margin: 0.45rem 0 0;
  padding-left: 1.25rem;
}
.dm-lifecycle-guidance li {
  margin: 0.2rem 0;
}
.dm-lifecycle-guidance-action {
  margin-top: 0.55rem;
}
.dm-lifecycle-main {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(20rem, 1.5fr) minmax(18rem, 0.9fr);
  gap: 0.85rem;
  align-items: stretch;
  min-height: 0;
  overflow: visible;
}
.dm-lifecycle-panel {
  border: 1px solid #dbe4ec;
  border-radius: 8px;
  background: #fff;
  padding: 0.85rem;
  min-width: 0;
  min-height: 0;
}
.dm-lifecycle-diagram-panel,
.dm-lifecycle-warning-panel,
.dm-lifecycle-transition-panel {
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.dm-lifecycle-panel h4 {
  flex: 0 0 auto;
  margin: 0 0 0.65rem 0;
  font-size: 0.95rem;
  color: #1f2937;
}
.dm-lifecycle-mermaid {
  flex: 0 0 auto;
  overflow-x: auto;
  overflow-y: visible;
  min-width: 0;
  min-height: 0;
  padding: 0.5rem;
  border: 1px solid #e5edf4;
  border-radius: 8px;
  background: #ffffff;
}
.dm-lifecycle-mermaid svg {
  max-width: none;
}
.dm-lifecycle-source {
  flex: 0 0 auto;
  margin-top: 0.65rem;
  font-size: 0.84rem;
}
.dm-lifecycle-source pre {
  margin: 0.45rem 0 0;
  max-height: 14rem;
  overflow: auto;
  white-space: pre;
  border: 1px solid #e5edf4;
  border-radius: 8px;
  padding: 0.6rem;
  background: #f8fafc;
}
.dm-lifecycle-warning-list {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  overflow: visible;
  padding-right: 0.2rem;
}
.dm-lifecycle-warning-row {
  border: 1px solid #e2e8f0;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  background: #fffaf0;
}
.dm-lifecycle-warning-text {
  color: #334155;
  line-height: 1.4;
}
.dm-lifecycle-warning-refs,
.dm-lifecycle-warning-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.dm-lifecycle-warning-next {
  margin-top: 0.45rem;
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.4;
}
.dm-lifecycle-warning-action {
  min-height: 1.75rem;
}
.dm-lifecycle-transition-panel {
  flex: 0 0 auto;
  max-height: none;
}
.dm-lifecycle-transition-table-scroll {
  flex: 0 0 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
}
.dm-lifecycle-transition-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.dm-lifecycle-transition-table th,
.dm-lifecycle-transition-table td {
  border: 1px solid #dbe4ec;
  padding: 0.55rem;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}
.dm-lifecycle-transition-table th {
  background: #f1f5f9;
  color: #334155;
}
.dm-lifecycle-req-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  margin: 0 0.25rem 0.25rem 0;
  padding: 0.1rem 0.45rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #0f4c81;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.dm-lifecycle-ref-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 1.6rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: normal;
  text-align: left;
}
.dm-lifecycle-ref-chip--requirement,
.dm-lifecycle-ref-chip--bpmn-function {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #0f4c81;
}
.dm-lifecycle-ref-chip:hover,
.dm-lifecycle-req-chip:hover {
  background: #dbeafe;
}
@media (max-width: 900px) {
  .dm-lifecycle-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: 0;
    overflow: visible;
  }
  .dm-lifecycle-select {
    min-width: min(18rem, 100%);
  }
  .dm-lifecycle-transition-panel {
    flex-basis: auto;
    max-height: none;
  }
}
.data-model-toolbar-controls {
  display: flex;
  flex: 999 1 42rem;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.85rem;
  min-width: 0;
}
.dm-type-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.dm-standard-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.08rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.dm-standard-badge--standard {
  background: rgba(29, 122, 62, 0.12);
  color: #205c35;
}
.dm-standard-badge--extended {
  background: rgba(26, 115, 232, 0.12);
  color: #1f4f96;
}
.dm-standard-badge--profile {
  background: rgba(120, 63, 4, 0.12);
  color: #7a4304;
}
.dm-standard-badge--coverage {
  background: rgba(64, 64, 64, 0.08);
  color: #444;
}
.data-model-standard-term-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
  padding: 0.45rem 0.3rem;
  border-bottom: 1px solid #eee;
}
.data-model-standard-term-row:last-child {
  border-bottom: none;
}
.data-model-standard-term-copy {
  min-width: 0;
}
.data-model-toolbar-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.data-model-toolbar-group--primary {
  flex: 0 0 auto;
}
.data-model-toolbar-group--search {
  flex: 1 1 22rem;
  min-width: min(100%, 18rem);
}
.data-model-toolbar-group--filters {
  flex: 1 1 100%;
  flex-wrap: nowrap;
  align-items: center;
  overflow: visible;
}
.data-model-class-filter {
  flex: 0 1 13rem;
  min-width: min(13rem, 100%);
}
.data-model-class-filter .selected-chips {
  flex: 0 1 4rem;
}
.data-model-toolbar-filter-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 max-content;
  white-space: nowrap;
}
.data-model-toolbar-label {
  color: #60758a;
  font-size: 0.82rem;
  font-weight: 600;
}
.data-model-toolbar-select,
.data-model-toolbar-search {
  min-height: 2.2rem;
  border: 1px solid #c7d2dc;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  box-sizing: border-box;
}
.data-model-toolbar-select {
  min-width: 5.25rem;
  padding: 0.38rem 0.55rem;
}
.data-model-toolbar-search {
  flex: 1 1 16rem;
  width: 100%;
  min-width: 0;
  padding: 0.46rem 0.7rem;
}
.data-model-toolbar-search::placeholder {
  color: #94a3b8;
}
.data-model-toolbar-search:focus,
.data-model-toolbar-select:focus {
  outline: 2px solid rgba(96, 165, 250, 0.32);
  outline-offset: 1px;
  border-color: #93c5fd;
}
.data-model-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 2.2rem;
  padding: 0.42rem 0.82rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: none;
}
.data-model-toolbar-btn--secondary {
  background: #fff;
  color: #29465d;
  border-color: #cbd5e1;
}
.data-model-toolbar-btn--secondary:hover {
  background: #f8fafc;
}
.data-model-toolbar-btn.is-muted,
.data-model-toolbar-btn:disabled {
  opacity: 0.56;
  cursor: default;
  background: #f8fafc;
  color: #64748b;
  border-color: #dbe4ec;
}
.data-model-toolbar-menu-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.data-model-toolbar-menu-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 26;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 11rem;
  padding: 0.55rem;
  border: 1px solid #dbe4ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}
.data-model-toolbar-menu-panel[hidden] {
  display: none;
}
.data-model-toolbar-menu-action {
  width: 100%;
  justify-content: flex-start;
  padding: 0.46rem 0.72rem;
  border: 1px solid #dbe4ec;
  border-radius: 10px;
  background: #f8fafc;
  color: #1f2937;
}
.data-model-toolbar-menu-action:hover {
  background: #eef6ff;
  border-color: #bfdbfe;
}
.data-model-toolbar-menu-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.15rem;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.data-model-workspace-summary {
  flex: 0 0 auto;
  justify-content: flex-end;
  align-self: center;
}
@media (max-width: 1120px) {
  .data-model-workspace-summary {
    flex: 1 1 100%;
    justify-content: flex-start;
    align-self: stretch;
  }
}
.user-intents-workspace {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1rem;
  min-height: 0;
  min-width: 0;
  padding: 1rem;
  background:
    radial-gradient(circle at top left, rgba(224, 242, 254, 0.52), transparent 42%),
    linear-gradient(180deg, #f8fbfe 0%, #eef4f9 100%);
}
.user-intents-workspace-header {
  flex: 0 0 auto;
  border-color: #d6e4ef;
  background:
    linear-gradient(180deg, rgba(246, 250, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}
.user-intents-workspace-header-primary {
  align-items: flex-start;
}
.user-intents-workspace-title-block {
  max-width: 30rem;
}
.user-intents-toolbar-controls {
  display: flex;
  flex: 1 1 28rem;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.user-intents-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.user-intents-toolbar-group--filters {
  flex: 1 1 100%;
  align-items: flex-end;
  padding-top: 0.05rem;
}
.user-intents-toolbar-group--filters[hidden] {
  display: none;
}
.user-intents-toolbar-control {
  gap: 0.4rem;
}
.user-intents-toolbar-select {
  min-width: 8.75rem;
}
.user-intents-toolbar-group--search {
  flex: 1 1 16rem;
}
.user-intents-search-control {
  flex: 1 1 13rem;
}
.user-intents-toolbar-search {
  width: 100%;
  min-width: 12rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #1f2937;
}
.user-intents-search-clear-btn {
  min-width: 2.1rem;
  padding-inline: 0.62rem;
}
.user-intents-toolbar-btn {
  white-space: nowrap;
}
.user-intents-toolbar-menu-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.user-intents-toolbar-menu-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 26;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 11rem;
  padding: 0.55rem;
  border: 1px solid #dbe4ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}
.user-intents-toolbar-menu-panel[hidden] {
  display: none;
}
.user-intents-toolbar-menu-action {
  width: 100%;
  justify-content: flex-start;
  padding: 0.46rem 0.72rem;
  border: 1px solid #dbe4ec;
  border-radius: 10px;
  background: #f8fafc;
  color: #1f2937;
}
.user-intents-toolbar-menu-action:hover {
  background: #eef6ff;
  border-color: #bfdbfe;
}
.user-intents-toolbar-menu-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.15rem;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.user-intents-mode-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid #dbe4ec;
  border-radius: 8px;
  background: #f8fafc;
}
.user-intents-mode-btn {
  padding: 0.38rem 0.62rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  font-weight: 650;
  cursor: pointer;
}
.user-intents-mode-btn.active,
.user-intents-mode-btn:hover {
  border-color: #bfdbfe;
  background: #eaf4ff;
  color: #123f77;
}
.user-intents-workspace-summary {
  justify-content: flex-end;
  align-self: center;
}
@media (max-width: 1120px) {
  .user-intents-workspace-summary {
    flex: 1 1 100%;
    justify-content: flex-start;
    align-self: stretch;
  }
}
.er-workspace {
  gap: 0.8rem;
  padding: 1rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.er-workspace-header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #dbe4ec;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.er-workspace-header-primary,
.er-workspace-header-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.er-workspace-header-secondary {
  padding-top: 0.15rem;
  border-top: 1px solid #e5edf4;
}
.er-workspace-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 14rem;
  margin-right: 0.4rem;
}
.er-workspace-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.2;
  color: #1e293b;
}
.er-workspace-title-copy {
  margin: 0;
  color: #60758a;
  font-size: 0.86rem;
  line-height: 1.4;
}
.er-workspace-nav,
.er-workspace-actions,
.er-workspace-summary,
.er-workspace-class-filter,
.er-workspace-zoom-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.er-workspace-actions {
  margin-left: auto;
}
.er-workspace-summary {
  flex: 1 1 14rem;
}
.er-workspace-class-filter {
  flex: 0 1 auto;
  min-width: 0;
  padding: 0.32rem 0.45rem;
  border: 1px solid #dbe4ec;
  border-radius: 12px;
  background: #fff;
}
.er-workspace-class-filter-count {
  display: inline-flex;
  align-items: center;
  min-height: 1.95rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a4d0b;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.er-diagram-class-filter-picker {
  flex: 0 0 auto;
  min-width: 0;
}
.er-diagram-class-filter-picker .selected-chips {
  display: none !important;
}
.er-diagram-class-filter-picker .dual-list-top-row {
  min-height: 0;
  padding: 0;
}
.er-workspace-class-filter-preview {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 7rem;
  overflow: auto;
  padding: 0.45rem 0.1rem 0.05rem;
  border-top: 1px solid #edf2f7;
}
.er-workspace-class-filter-preview-chip {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.er-workspace-zoom-controls {
  flex: 0 1 auto;
  margin-left: auto;
}
.er-workspace-zoom-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.6rem;
  min-height: 2.05rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid #dbe4ec;
  border-radius: 999px;
  background: #f8fafc;
  color: #274057;
  font-size: 0.8rem;
  font-weight: 700;
}
.er-workspace-export-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #dbe4ec;
  border-radius: 12px;
  background: #fff;
}
.er-workspace-export-menu {
  flex: 0 0 auto;
}
.er-workspace-export-toggle::after {
  content: "v";
  font-size: 0.72rem;
  line-height: 1;
}
.er-workspace-export-menu-panel {
  min-width: 15rem;
}
.er-workspace-export-menu-action {
  text-align: left;
}
.er-workspace-control {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
}
.er-workspace-control-label {
  color: #60758a;
}
.er-workspace-select {
  min-height: 2.15rem;
  padding: 0.36rem 0.52rem;
  border: 1px solid #c7d2dc;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  color: #1f2937;
}
.er-workspace-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 2.2rem;
  padding: 0.42rem 0.82rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: none;
}
.er-workspace-btn--secondary {
  background: #fff;
  color: #29465d;
  border-color: #cbd5e1;
}
.er-workspace-btn--secondary:hover {
  background: #f8fafc;
}
.er-workspace-btn--secondary.is-active {
  background: #dbeafe;
  color: #0f4c81;
  border-color: #60a5fa;
}
.er-workspace-btn--icon {
  width: 2rem;
  min-height: 2rem;
  padding: 0;
  border-radius: 999px;
  font-size: 1.05rem;
  line-height: 1;
}
.er-workspace-btn--create {
  background: #e0f2fe;
  color: #0f4c81;
  border-color: #93c5fd;
}
.er-workspace-btn--create:hover {
  background: #bfdbfe;
}
.er-workspace-btn--accent {
  background: #dbeafe;
  color: #0f4c81;
  border-color: #60a5fa;
}
.er-workspace-btn--accent:hover {
  background: #bfdbfe;
}
.er-workspace-btn--ghost {
  background: transparent;
  color: #475569;
  border-color: #cbd5e1;
}
.er-workspace-btn--ghost:hover {
  background: #fff;
}
.er-workspace-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.18rem 0.62rem;
  border-radius: 999px;
  border: 1px solid #dbe4ec;
  background: #f8fafc;
  color: #365066;
  font-size: 0.79rem;
  font-weight: 600;
  white-space: nowrap;
}
.er-workspace-chip--info {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0f4c81;
}
.er-workspace-chip--accent {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #5b21b6;
}
.er-workspace-chip--warning {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}
.ui-tab-view {
  position: relative;
  padding: 1rem;
  gap: 1rem;
  background:
    radial-gradient(circle at top left, rgba(219, 234, 254, 0.5), transparent 42%),
    linear-gradient(180deg, #f6f9fc 0%, #eef4f9 100%);
}
.ui-workspace-header {
  border-color: #d6e2ee;
  background:
    linear-gradient(180deg, rgba(244, 249, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}
.ui-workspace-header-primary {
  align-items: flex-start;
}
.ui-workspace-title-block {
  max-width: 28rem;
}
.ui-workspace-title {
  letter-spacing: -0.01em;
}
.ui-workspace-title-copy {
  max-width: 34rem;
}
.ui-workspace-nav {
  flex: 1 1 20rem;
  min-width: min(100%, 18rem);
}
.ui-workspace-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.ui-subview-btn {
  min-height: 2.35rem;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #c8d6e3;
  background: rgba(255, 255, 255, 0.82);
  color: #355066;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.ui-subview-btn:hover {
  background: #ffffff;
  border-color: #9eb8d3;
}
.ui-subview-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.ui-subview-btn.is-active,
#ui-subnav button[data-active="true"] {
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  border-color: #60a5fa;
  color: #0f4c81;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.12);
}
.ui-workspace-summary {
  margin-left: auto;
  justify-content: flex-end;
  gap: 0.55rem;
}
.ui-workspace-summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.95rem;
  padding: 0.18rem 0.72rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #0f4c81;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.ui-workspace-summary-copy,
.ui-workspace-secondary-copy {
  margin: 0;
  color: #5b7085;
  font-size: 0.86rem;
  line-height: 1.45;
}
.ui-workspace-secondary-copy {
  max-width: 52rem;
}
.ui-workspace-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}
.ui-subview-shell,
.ui-inventory-container,
.content-inventory-container,
.component-binding-container,
.ui-prototype-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ui-subview-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #d7e3ed;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}
.ui-subview-hero,
.ui-subview-section {
  padding: 1rem 1.05rem;
}
.ui-subview-hero {
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.72) 0%, rgba(255, 255, 255, 0.98) 52%);
}
.ui-subview-section-title,
.ui-subview-hero-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
  color: #1f2937;
}
.ui-subview-section-heading {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  margin-bottom: 0.85rem;
}
.ui-subview-section-copy,
.ui-subview-hero-copy {
  margin: 0.35rem 0 0;
  color: #60758a;
  font-size: 0.9rem;
  line-height: 1.5;
}
.ui-subview-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
}
.ui-subview-toolbar-actions,
.ui-subview-toolbar-filters,
.ui-subview-toolbar-summary,
.ui-subview-field-row,
.content-inventory-chip-list,
.content-inventory-results-grid,
.ui-prototype-export-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.ui-subview-toolbar-actions {
  align-items: center;
}
.ui-subview-toolbar-filters,
.ui-subview-toolbar-summary {
  align-items: flex-end;
}
.ui-subview-toolbar-summary {
  margin-left: auto;
  color: #60758a;
  font-size: 0.84rem;
}
.ui-inventory-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: 'actions filters summary';
  align-items: end;
  gap: 0.85rem 1rem;
}
.ui-inventory-toolbar-actions {
  grid-area: actions;
}
.ui-inventory-toolbar-filters {
  grid-area: filters;
  justify-content: flex-start;
  min-width: 0;
}
.ui-inventory-toolbar-summary {
  grid-area: summary;
  margin-left: 0;
  justify-content: flex-end;
  white-space: nowrap;
}
.ui-inventory-columns-control {
  position: relative;
}
.ui-inventory-columns-control[open] {
  z-index: 40;
}
.ui-inventory-columns-summary {
  list-style: none;
  cursor: pointer;
}
.ui-inventory-columns-summary::-webkit-details-marker {
  display: none;
}
.ui-inventory-columns-summary::after {
  content: "v";
  margin-left: 0.4rem;
  font-size: 0.72rem;
}
.ui-inventory-columns-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  display: grid;
  gap: 0.35rem;
  min-width: 15rem;
  padding: 0.55rem;
  border: 1px solid #d7e3ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}
.ui-inventory-columns-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.9rem;
  color: #31485f;
  font-size: 0.86rem;
  white-space: nowrap;
}
.ui-inventory-columns-option input {
  margin: 0;
}
.ui-inventory-search-field {
  min-width: 0;
}
.ui-inventory-search-row {
  flex-wrap: nowrap;
  align-items: stretch;
  min-width: 0;
}
.ui-inventory-search-row .ui-subview-input {
  flex: 1 1 auto;
  min-width: 0;
}
.ui-inventory-search-clear-btn {
  flex: 0 0 auto;
  align-self: stretch;
  min-width: 2.35rem;
  padding: 0.48rem 0.75rem;
}
.ui-inventory-scope-picker.dual-list-multi-select {
  flex: 1 1 15rem;
  min-width: 13rem;
  margin-bottom: 0;
}
.ui-inventory-scope-picker.dual-list-multi-select > label {
  color: #40556a;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.ui-inventory-scope-picker .dual-list-top-row {
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.4rem;
}
.ui-inventory-scope-picker .selected-chips {
  min-height: 2.35rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.18rem 0.35rem;
  border: 1px solid #d7e3ed;
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
}
.ui-inventory-scope-picker .selected-chips:empty::before {
  content: 'Any';
  color: #60758a;
  font-size: 0.85rem;
}
.ui-inventory-scope-picker .dual-list-edit-btn {
  min-height: 2.35rem;
  padding: 0.35rem 0.7rem;
  border-color: #c7d7e6;
  background: #f8fbff;
  color: #29465d;
  font-weight: 600;
}
.ui-inventory-scope-picker-unavailable {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid #d7e3ed;
  border-radius: 6px;
  background: #fff;
  color: #60758a;
  font-size: 0.85rem;
}
.traceability-container {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.traceability-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
}
.traceability-banner--warning {
  background: linear-gradient(135deg, #fff8e1 0%, #ffffff 100%);
  border-color: #f4c95d;
}
.traceability-banner--info {
  background: linear-gradient(135deg, #e8f3ff 0%, #ffffff 100%);
  border-color: #9ec5f8;
}
.traceability-banner--scope {
  background: linear-gradient(135deg, #eef5ff 0%, #ffffff 100%);
  border-color: #b7d1fb;
}
.traceability-banner__copy {
  color: #29465d;
  font-size: 0.9rem;
  line-height: 1.45;
}
.traceability-banner__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.traceability-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
}
.traceability-toolbar-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.traceability-toolbar-heading {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}
.traceability-toolbar-title {
  margin: 0;
  font-size: 0.98rem;
  color: #1f2937;
}
.traceability-toolbar-copy {
  margin: 0;
  color: #60758a;
  font-size: 0.84rem;
  line-height: 1.4;
}
.traceability-toolbar-header-meta {
  margin-left: auto;
}
.traceability-toolbar-toggle {
  flex-shrink: 0;
}
.traceability-toolbar-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: 'actions filters summary';
  align-items: end;
  gap: 0.85rem 1rem;
}
.traceability-toolbar-body[hidden] {
  display: none !important;
}
.traceability-toolbar.is-collapsed {
  padding-bottom: 1rem;
}
.traceability-toolbar-actions {
  grid-area: actions;
  align-items: center;
}
.traceability-toolbar-filters {
  grid-area: filters;
  min-width: 0;
}
.traceability-toolbar-filters .ui-subview-field:not(.ui-subview-field--grow) {
  flex: 0 1 11rem;
}
.traceability-toolbar-filters .ui-subview-field--grow {
  flex: 1 1 19rem;
  min-width: 19rem;
}
.traceability-toolbar-summary {
  grid-area: summary;
  margin-left: 0;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.traceability-toolbar-summary-text {
  white-space: nowrap;
}
.traceability-governance-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.2rem;
  padding: 0.36rem 0.75rem;
  border: 1px solid #d7e3ed;
  border-radius: 999px;
  background: #f8fbff;
  color: #29465d;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
}
.traceability-governance-toggle input[type="checkbox"] {
  margin: 0;
}
.traceability-object-combobox {
  position: relative;
}
.traceability-object-combobox__input {
  width: 100%;
}
.traceability-object-combobox__list {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 1002;
  display: none;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.3rem;
  border: 1px solid #d7e3ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}
.traceability-object-combobox__option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #1f2937;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.traceability-object-combobox__option:hover,
.traceability-object-combobox__option--active {
  background: #eef5ff;
}
.traceability-object-combobox__option-meta {
  flex-shrink: 0;
  color: #60758a;
  font-size: 0.76rem;
}
.traceability-object-combobox__empty {
  padding: 0.65rem;
  color: #60758a;
  font-size: 0.84rem;
}
.traceability-impact-group-item {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.traceability-table-card {
  padding: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.traceability-suggestions-groups {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.traceability-suggestions-group {
  overflow: hidden;
}
.traceability-suggestions-group .traceability-table-scrollport {
  border-top: none;
}
.traceability-suggestions-group__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.95rem 1rem 0.8rem;
  border-bottom: 1px solid #e6edf4;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
}
.traceability-suggestions-group__title {
  margin: 0;
  font-size: 0.95rem;
  color: #1f2937;
}
.traceability-suggestions-group__count {
  color: #60758a;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.traceability-suggestion-link {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  color: #0f5aa3;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  cursor: pointer;
}
.traceability-suggestion-link:hover {
  color: #0b4b87;
}
.traceability-suggestion-link:focus-visible {
  outline: 2px solid #1976d2;
  outline-offset: 2px;
  border-radius: 4px;
}
.traceability-table-card > .ui-subview-section-heading {
  padding: 1rem 1rem 0;
}
.traceability-table-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.traceability-table-scrollport {
  width: 100%;
  max-width: 100%;
  max-height: min(70vh, calc(100vh - 18rem));
  border-top: 1px solid #e6edf4;
  border-radius: 0 0 16px 16px;
}
.traceability-table-wrap {
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.traceability-empty-state {
  margin: 0 1rem 1rem;
}
.requirements-cockpit {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.requirements-cockpit-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'filters summary';
  align-items: end;
  gap: 0.9rem 1rem;
}
.requirements-cockpit-toolbar-filters {
  grid-area: filters;
  min-width: 0;
}
.requirements-cockpit-toolbar-filters .ui-subview-field:not(.ui-subview-field--grow) {
  flex: 0 1 11rem;
}
.requirements-cockpit-toolbar-filters .ui-subview-field--grow {
  flex: 1 1 18rem;
  min-width: 18rem;
}
.requirements-cockpit-toolbar-summary {
  grid-area: summary;
  margin-left: 0;
  justify-content: flex-end;
  white-space: nowrap;
}
.requirements-cockpit-signal-overview {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.55rem 0 0;
  border-top: 1px solid #e7eef5;
}
.requirements-cockpit-signal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  min-width: 0;
}
.requirements-cockpit-signal-copy {
  min-width: 0;
}
.requirements-cockpit-signal-title {
  margin: 0;
  color: #213a54;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
}
.requirements-cockpit-signal-help {
  margin: 0.12rem 0 0;
  color: #60758a;
  font-size: 0.8rem;
  line-height: 1.35;
}
.requirements-cockpit-signal-stats {
  flex: 0 0 auto;
  color: #37536b;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}
.requirements-cockpit-signal-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  color: #60758a;
  font-size: 0.76rem;
  line-height: 1.3;
}
.requirements-cockpit-signal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}
.requirements-cockpit-signal-band {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}
.requirements-cockpit-band-item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: 18px;
  height: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.requirements-cockpit-band-item .alm-intent-signal,
.requirements-cockpit-band-item .alm-capability-signal {
  width: 6px;
  height: 6px;
}
.requirements-cockpit-band-item:focus-visible {
  outline: 2px solid rgba(31, 79, 214, 0.55);
  outline-offset: 2px;
  border-radius: 999px;
}
.requirements-cockpit-more-filters {
  min-width: 11rem;
  padding: 0.2rem 0;
}
.requirements-cockpit-more-filters > summary {
  cursor: pointer;
  color: #36526a;
  font-size: 0.83rem;
  font-weight: 600;
}
.requirements-cockpit-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.55rem;
  font-size: 0.84rem;
  color: #526779;
}
.requirements-cockpit-brief-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  overflow: hidden;
}
.requirements-cockpit-tabs-card,
.requirements-cockpit-overview-card,
.requirements-cockpit-hotspot-metrics-card,
.requirements-cockpit-heatmap-preview-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.requirements-cockpit-tabs-card {
  padding: 0.75rem;
}
.requirements-cockpit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.requirements-cockpit-tab-btn {
  min-height: 2.35rem;
}
.requirements-cockpit-panels {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}
.requirements-cockpit-panel {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  min-width: 0;
}
.requirements-cockpit-panel[hidden] {
  display: none;
}
.requirements-cockpit-solar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.36fr);
  gap: 1rem;
  align-items: start;
}
.requirements-cockpit-solar-card,
.requirements-cockpit-solar-inspector {
  min-width: 0;
}
.requirements-cockpit-solar-controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.25rem 0 0.85rem;
}
.requirements-cockpit-solar-controls .ui-subview-field {
  margin: 0;
}
.requirements-cockpit-solar-expand-btn {
  margin-left: auto;
}
.requirements-cockpit-solar-layout.context-graph-tab--expanded {
  min-height: min(82vh, 860px);
}
.requirements-cockpit-solar-layout.context-graph-tab--expanded .requirements-cockpit-solar-map-shell {
  min-height: min(70vh, 720px);
}
.requirements-cockpit-solar-summary {
  flex: 0 0 auto;
  color: #53657a;
  font-size: 0.86rem;
  line-height: 1.35;
  text-align: right;
}
.requirements-cockpit-solar-map-shell {
  width: 100%;
  overflow: hidden;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 52%, rgba(31, 79, 214, 0.08), transparent 32%),
    linear-gradient(180deg, #f8fbff 0%, #eef4f8 100%);
}
.requirements-cockpit-solar-svg {
  display: block;
  width: 100%;
  aspect-ratio: 920 / 640;
  min-height: 320px;
}
.requirements-cockpit-solar-orbit {
  fill: none;
  stroke: rgba(39, 64, 87, 0.22);
  stroke-width: 1;
  stroke-dasharray: 4 6;
}
.requirements-cockpit-solar-orbit--intent {
  stroke: rgba(104, 73, 148, 0.36);
  stroke-dasharray: 3 5;
}
.requirements-cockpit-solar-orbit--source {
  stroke: rgba(83, 101, 122, 0.18);
  stroke-dasharray: 2 7;
}
.requirements-cockpit-solar-orbit-label,
.requirements-cockpit-solar-label {
  fill: #53657a;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}
.requirements-cockpit-solar-node {
  cursor: pointer;
  outline: none;
}
.requirements-cockpit-solar-node .requirements-cockpit-solar-bubble {
  fill: #868e96;
  stroke: rgba(18, 33, 52, 0.22);
  stroke-width: 2;
  filter: drop-shadow(0 3px 5px rgba(18, 33, 52, 0.14));
}
.requirements-cockpit-solar-node[data-state="clear"] .requirements-cockpit-solar-bubble {
  fill: #1f4fd6;
}
.requirements-cockpit-solar-node[data-state="drift"] .requirements-cockpit-solar-bubble {
  fill: #f59f00;
}
.requirements-cockpit-solar-node[data-state="degraded"] .requirements-cockpit-solar-bubble {
  fill: #e8590c;
}
.requirements-cockpit-solar-node[data-state="broken"] .requirements-cockpit-solar-bubble {
  fill: #c92a2a;
}
.requirements-cockpit-solar-node[data-lineage-kind="intent"] .requirements-cockpit-solar-bubble {
  fill: #8b6bb1;
  stroke: rgba(62, 43, 92, 0.28);
  filter: drop-shadow(0 2px 4px rgba(62, 43, 92, 0.12));
}
.requirements-cockpit-solar-node[data-state="lineage-unresolved"] .requirements-cockpit-solar-bubble {
  fill: #b5a6c8;
  stroke-dasharray: 3 3;
}
.requirements-cockpit-solar-node[data-lineage-kind="source"] {
  cursor: default;
  opacity: 0.66;
}
.requirements-cockpit-solar-node[data-lineage-kind="source"] .requirements-cockpit-solar-bubble {
  fill: #9aa9b8;
  stroke: rgba(83, 101, 122, 0.16);
  filter: none;
}
.requirements-cockpit-solar-node[data-lineage-kind="project"] {
  cursor: default;
}
.requirements-cockpit-solar-node[data-lineage-kind="project"] .requirements-cockpit-solar-bubble {
  fill: #244a7f;
  stroke: rgba(20, 42, 72, 0.26);
  filter: drop-shadow(0 4px 8px rgba(18, 33, 52, 0.18));
}
.requirements-cockpit-solar-node--lineage .requirements-cockpit-solar-label {
  fill: #5d526c;
  font-size: 10px;
  font-weight: 700;
}
.requirements-cockpit-solar-node.is-context {
  opacity: 0.62;
}
.requirements-cockpit-solar-node.is-selected .requirements-cockpit-solar-bubble,
.requirements-cockpit-solar-node:focus .requirements-cockpit-solar-bubble {
  stroke: #122134;
  stroke-width: 3;
}
.requirements-cockpit-solar-node.is-changing .requirements-cockpit-solar-bubble {
  animation: requirements-cockpit-solar-change 900ms ease-out 1;
}
.requirements-cockpit-solar-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin: 0.35rem 0 0.55rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #f8fbff;
  color: #53657a;
  font-size: 0.82rem;
}
.requirements-cockpit-solar-legend-copy {
  flex: 1 1 18rem;
  min-width: 14rem;
  line-height: 1.35;
}
.requirements-cockpit-solar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  white-space: nowrap;
  font-weight: 700;
}
.requirements-cockpit-solar-legend-swatch {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(18, 33, 52, 0.14);
}
.requirements-cockpit-solar-legend-swatch[data-state="clear"] {
  background: #1f4fd6;
}
.requirements-cockpit-solar-legend-swatch[data-state="drift"] {
  background: #f59f00;
}
.requirements-cockpit-solar-legend-swatch[data-state="degraded"] {
  background: #e8590c;
}
.requirements-cockpit-solar-legend-swatch[data-state="broken"] {
  background: #c92a2a;
}
.requirements-cockpit-solar-legend-swatch[data-state="unknown"] {
  background: #868e96;
}
@keyframes requirements-cockpit-solar-change {
  0% { stroke-width: 5; filter: drop-shadow(0 0 0 rgba(31, 79, 214, 0)); }
  35% { stroke-width: 6; filter: drop-shadow(0 0 12px rgba(31, 79, 214, 0.35)); }
  100% { stroke-width: 2; filter: drop-shadow(0 3px 5px rgba(18, 33, 52, 0.14)); }
}
@media (prefers-reduced-motion: reduce) {
  .requirements-cockpit-solar-node.is-changing .requirements-cockpit-solar-bubble {
    animation: none;
  }
}
@media (max-width: 900px) {
  .requirements-cockpit-solar-layout {
    grid-template-columns: 1fr;
  }
  .requirements-cockpit-solar-controls {
    align-items: stretch;
    flex-direction: column;
  }
  .requirements-cockpit-solar-summary {
    text-align: left;
  }
}
.requirements-cockpit-solar-inspector {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  position: sticky;
  top: 5.75rem;
}
@media (max-width: 900px) {
  .requirements-cockpit-solar-inspector {
    max-height: none;
    overflow-y: visible;
    position: static;
  }
}
.requirements-cockpit-solar-inspector-heading {
  color: #1c2d3f;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}
.requirements-cockpit-solar-inspector-copy,
.requirements-cockpit-solar-inspector-block span {
  color: #53657a;
  font-size: 0.9rem;
  line-height: 1.45;
}
.requirements-cockpit-solar-inspector-block {
  display: grid;
  gap: 0.25rem;
}
.requirements-cockpit-solar-inspector-block strong {
  color: #274057;
  font-size: 0.78rem;
  text-transform: uppercase;
}
.requirements-cockpit-solar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
#requirement-modal .req-modal-solar-panel {
  min-height: 24rem;
}
#requirement-modal .req-modal-solar-panel .requirements-cockpit-solar-layout {
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.34fr);
}
#requirement-modal .req-modal-solar-panel .requirements-cockpit-solar-inspector {
  max-height: min(58vh, 34rem);
  top: 1rem;
}
#requirement-modal .req-modal-solar-panel .requirements-cockpit-solar-svg {
  min-height: 280px;
}
@media (max-width: 900px) {
  #requirement-modal .req-modal-solar-panel .requirements-cockpit-solar-layout {
    grid-template-columns: 1fr;
  }
  #requirement-modal .req-modal-solar-panel .requirements-cockpit-solar-inspector {
    max-height: none;
    position: static;
  }
}
.requirements-cockpit {
  --requirements-cockpit-main-height: min(72vh, calc(100vh - 19rem));
}
.requirements-cockpit-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.38fr);
  gap: 0.9rem;
  align-items: start;
}
.requirements-cockpit-dashboard-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
}
.requirements-cockpit-brief-card--compact {
  gap: 0.65rem;
  height: 100%;
}
.requirements-cockpit-brief-card--compact .requirements-cockpit-brief-heading {
  padding: 0.85rem 0.9rem 0;
}
.requirements-cockpit-brief-card--compact .requirements-cockpit-brief-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0 0.9rem 0.9rem;
}
.requirements-cockpit-brief-card--compact .requirements-cockpit-brief-main,
.requirements-cockpit-brief-card--compact .requirements-cockpit-brief-side,
.requirements-cockpit-brief-card--compact .requirements-cockpit-brief-section {
  gap: 0.6rem;
}
.requirements-cockpit-brief-card--compact .requirements-cockpit-brief-kicker {
  font-size: 0.7rem;
}
.requirements-cockpit-brief-card--compact .requirements-cockpit-brief-subtitle {
  font-size: 0.78rem;
}
.requirements-cockpit-brief-card--compact .requirements-cockpit-brief-copy {
  font-size: 0.86rem;
  line-height: 1.45;
}
.requirements-cockpit-brief-card--compact .requirements-cockpit-brief-context,
.requirements-cockpit-brief-card--compact .requirements-cockpit-brief-list {
  font-size: 0.8rem;
  line-height: 1.38;
}
.requirements-cockpit-brief-card--compact .requirements-cockpit-brief-action-item {
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 13rem);
  gap: 0.45rem 0.6rem;
  padding: 0.45rem 0.55rem;
}
.requirements-cockpit-brief-card--compact .requirements-cockpit-brief-action-copy,
.requirements-cockpit-brief-card--compact .requirements-cockpit-brief-action-btn {
  font-size: 0.8rem;
}
.requirements-cockpit-brief-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.requirements-cockpit-brief-analysis-ai {
  padding: 0.75rem;
  border: 1px solid #d7e4ee;
  border-radius: 8px;
  background: #f8fbfd;
}
.requirements-cockpit-brief-analysis-ai-actions .requirements-cockpit-action-btn {
  flex: 1 1 12rem;
  width: 100%;
}
.requirements-cockpit-brief-heading {
  padding: 1rem 1rem 0;
}
.requirements-cockpit-brief-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding: 0 1rem 1rem;
}
.requirements-cockpit-brief-main,
.requirements-cockpit-brief-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}
.requirements-cockpit-brief-section {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}
.requirements-cockpit-brief-kicker {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #557086;
}
.requirements-cockpit-brief-subtitle {
  font-size: 0.82rem;
  font-weight: 700;
  color: #37536b;
}
.requirements-cockpit-brief-copy {
  margin: 0;
  color: #1f3347;
  font-size: 0.92rem;
  line-height: 1.55;
}
.requirements-cockpit-brief-context {
  color: #51697d;
  font-size: 0.86rem;
}
.requirements-cockpit-brief-list {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  color: #25405a;
  font-size: 0.85rem;
  line-height: 1.45;
}
.requirements-cockpit-brief-list--sources {
  color: #51697d;
}
.requirements-cockpit-brief-action-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
}
.requirements-cockpit-brief-action-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 14.5rem);
  gap: 0.55rem 0.8rem;
  align-items: start;
  padding: 0.55rem 0.65rem;
  border: 1px solid #d6e2ea;
  border-radius: 12px;
  background: rgba(248, 251, 253, 0.92);
}
.requirements-cockpit-brief-action-copy {
  min-width: 0;
  color: #25405a;
  font-size: 0.85rem;
  line-height: 1.45;
}
.requirements-cockpit-brief-action-btn {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-height: 2.2rem;
  align-self: start;
}
.requirements-cockpit-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.8rem;
}
.requirements-cockpit-kpi-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.65rem;
}
.requirements-cockpit-kpi-grid--secondary {
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}
.requirements-cockpit-kpi-grid--compact .requirements-cockpit-kpi-card {
  min-height: 6.6rem;
  padding: 0.75rem 0.85rem;
  gap: 0.28rem;
  border-radius: 14px;
}
.requirements-cockpit-kpi-grid--compact .requirements-cockpit-kpi-label {
  font-size: 0.77rem;
}
.requirements-cockpit-kpi-grid--compact .requirements-cockpit-kpi-value {
  font-size: 1.45rem;
}
.requirements-cockpit-kpi-grid--compact .requirements-cockpit-kpi-meta {
  font-size: 0.78rem;
  line-height: 1.35;
}
.requirements-cockpit-overview-copy {
  margin: 0;
  padding: 0 1rem 1rem;
  color: #244057;
  font-size: 0.92rem;
  line-height: 1.55;
}
.requirements-cockpit-selection-summary {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0 1rem 1rem;
}
.requirements-cockpit-selection-meta {
  margin: 0;
  color: #557086;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.requirements-cockpit-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.requirements-cockpit-open-hotspot-btn {
  width: auto;
  max-width: 100%;
}
.requirements-cockpit-action-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0 1rem 1rem;
}
.requirements-cockpit-kpi-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-height: 8.3rem;
  padding: 0.95rem 1rem;
  border: 1px solid #d7e3ed;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 0 transparent, 0 10px 24px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  text-align: left;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.requirements-cockpit-kpi-card:hover,
.requirements-cockpit-kpi-card.is-selected {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}
.requirements-cockpit-kpi-card.is-selected {
  border-color: #3b82f6;
}
.requirements-cockpit-kpi-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #466177;
}
.requirements-cockpit-kpi-value {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  color: #16344d;
}
.requirements-cockpit-kpi-meta {
  font-size: 0.83rem;
  line-height: 1.45;
  color: #5f7487;
}
.requirements-cockpit-kpi-card[data-state="strong"],
.requirements-cockpit-heatmap-cell[data-state="strong"] {
  background: linear-gradient(135deg, #effbf2 0%, #ffffff 100%);
  border-color: #9bd0aa;
  box-shadow: inset 3px 0 0 #4caf50, 0 10px 24px rgba(15, 23, 42, 0.05);
}
.requirements-cockpit-kpi-card[data-state="medium"],
.requirements-cockpit-heatmap-cell[data-state="medium"] {
  background: linear-gradient(135deg, #fff8e7 0%, #ffffff 100%);
  border-color: #f2c879;
  box-shadow: inset 3px 0 0 #f4b400, 0 10px 24px rgba(15, 23, 42, 0.05);
}
.requirements-cockpit-kpi-card[data-state="weak"],
.requirements-cockpit-heatmap-cell[data-state="weak"] {
  background: linear-gradient(135deg, #fff0ef 0%, #ffffff 100%);
  border-color: #f0aea8;
  box-shadow: inset 3px 0 0 #e53935, 0 10px 24px rgba(15, 23, 42, 0.05);
}
.requirements-cockpit-kpi-card[data-state="unknown"],
.requirements-cockpit-heatmap-cell[data-state="unknown"] {
  background: linear-gradient(135deg, #f5f8fb 0%, #ffffff 100%);
  border-color: #d7e3ed;
  box-shadow: inset 3px 0 0 #9e9e9e, 0 10px 24px rgba(15, 23, 42, 0.05);
}
.requirements-cockpit-heatmap-card,
.requirements-cockpit-hotspot-card {
  overflow: hidden;
}
.requirements-cockpit-heatmap-card--fit,
.requirements-cockpit-hotspot-card--full {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.requirements-cockpit-heatmap-card > .ui-subview-section-heading {
  padding: 1rem 1rem 0;
}
.requirements-cockpit-heatmap-scroll {
  max-height: min(72vh, calc(100vh - 19rem));
  overflow: auto;
  border-top: 1px solid #e6edf4;
}
.requirements-cockpit-heatmap-card--fit .requirements-cockpit-heatmap-scroll {
  max-height: var(--requirements-cockpit-main-height);
  min-height: 18rem;
}
.requirements-cockpit-heatmap-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.requirements-cockpit-heatmap-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.75rem 0.8rem;
  background: #eef4fb;
  border-bottom: 1px solid #d7e3ed;
  color: #1f3650;
  font-size: 0.8rem;
  text-align: left;
  white-space: normal;
  line-height: 1.35;
}
.requirements-cockpit-heatmap-table thead th:first-child,
.requirements-cockpit-heatmap-table tbody td:first-child {
  width: 11.5rem;
}
.requirements-cockpit-heatmap-table thead th:nth-child(2),
.requirements-cockpit-heatmap-table tbody td:nth-child(2) {
  width: 5.4rem;
}
.requirements-cockpit-heatmap-table tbody td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid #edf2f7;
  vertical-align: top;
  background: #fff;
}
.requirements-cockpit-row-label {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: #17334e;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
  white-space: normal;
  line-height: 1.35;
}
.requirements-cockpit-row-label.is-selected {
  color: #1d4ed8;
}
.requirements-cockpit-row-meta {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.75rem;
  color: #62788b;
  line-height: 1.35;
}
.requirements-cockpit-row-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.1rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid #d6e4ef;
  border-radius: 0.7rem;
  background: #f8fbff;
  font-weight: 700;
  color: #3d5568;
  white-space: nowrap;
  cursor: pointer;
}
.requirements-cockpit-row-count:hover,
.requirements-cockpit-row-count:focus-visible {
  border-color: #8db8d9;
  outline: none;
}
.requirements-cockpit-heatmap-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 2.1rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid #d7e3ed;
  border-radius: 12px;
  color: #19324b;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  transition: box-shadow 120ms ease, border-color 120ms ease;
}
.requirements-cockpit-heatmap-cell:hover,
.requirements-cockpit-heatmap-cell.is-selected {
  border-color: #3b82f6;
  box-shadow: inset 0 0 0 1px #3b82f6;
}
.requirements-cockpit-table-empty {
  padding: 1rem;
  color: #647b8e;
  text-align: center;
}
.requirements-cockpit-hotspot-body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1rem;
}
.requirements-cockpit-hotspot-card--full .requirements-cockpit-hotspot-body {
  min-width: 0;
  overflow-x: hidden;
}
.requirements-cockpit-hotspot-headline {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
  color: #14314a;
}
.requirements-cockpit-hotspot-copy {
  margin: 0;
  color: #60758a;
  font-size: 0.88rem;
  line-height: 1.45;
}
.requirements-cockpit-hotspot-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.requirements-cockpit-hotspot-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #3f586c;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.requirements-cockpit-reason-list {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: #1f3347;
  font-size: 0.88rem;
  line-height: 1.45;
}
.requirements-cockpit-reason-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.45rem;
}
.requirements-cockpit-reason-label {
  flex: 1 1 11rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.requirements-cockpit-reason-count-link {
  display: inline;
  margin: 0;
  padding: 0 0.05rem;
  border: 0;
  background: transparent;
  color: #1d5fbf;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.requirements-cockpit-reason-count-link:hover,
.requirements-cockpit-reason-count-link:focus-visible {
  color: #123f86;
}
.requirements-cockpit-reason-count-link:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 3px;
}
.requirements-cockpit-reason-action {
  flex: 0 1 100%;
  max-width: 100%;
}
.requirements-cockpit-action-btn {
  display: flex;
  width: 100%;
  max-width: 100%;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
@media (min-width: 1600px) {
  .requirements-cockpit-heatmap-table thead th:first-child,
  .requirements-cockpit-heatmap-table tbody td:first-child {
    width: 10.75rem;
  }
  .requirements-cockpit-heatmap-table thead th:nth-child(2),
  .requirements-cockpit-heatmap-table tbody td:nth-child(2) {
    width: 5rem;
  }
}
.usecase-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1rem;
  min-height: 0;
  min-width: 0;
}
.usecase-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(186, 230, 253, 0.9) 0%, rgba(186, 230, 253, 0) 32%),
    linear-gradient(135deg, rgba(219, 234, 254, 0.8) 0%, rgba(255, 255, 255, 0.98) 55%);
}
.usecase-hero::after {
  content: '';
  position: absolute;
  inset: auto -4rem -4rem auto;
  width: 13rem;
  height: 13rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  pointer-events: none;
}
.usecase-hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
  position: relative;
  z-index: 1;
}
.usecase-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: 'actions filters summary';
  align-items: end;
  gap: 0.85rem 1rem;
}
.usecase-toolbar-actions {
  grid-area: actions;
  align-items: center;
}
.usecase-toolbar-filters {
  grid-area: filters;
  min-width: 0;
}
.usecase-toolbar-filters .ui-subview-field--grow {
  flex: 1 1 18rem;
  min-width: 18rem;
}
.usecase-toolbar-summary {
  grid-area: summary;
  margin-left: 0;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.usecase-toolbar-summary-copy,
.usecase-diagram-meta-copy {
  color: #60758a;
  font-size: 0.84rem;
  line-height: 1.45;
}
.usecase-diagram-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.usecase-diagram-card > .ui-subview-section-heading {
  padding: 1rem 1rem 0;
}
.usecase-diagram-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 0 1rem 0.95rem;
}
.usecase-diagram-viewport {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: auto;
  padding: 0 0.75rem 0.8rem;
}
.usecase-diagram-canvas {
  flex: 0 0 auto;
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  margin: 0 auto;
  border: 1px solid #e1ebf3;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.ui-inventory-toolbar-filters .ui-subview-field--grow {
  flex: 1 1 18rem;
  min-width: 18rem;
}
.ui-inventory-toolbar-filters .ui-subview-field:not(.ui-subview-field--grow) {
  flex: 0 1 12rem;
}
@media (max-width: 1360px) {
  .ui-inventory-toolbar {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      'actions summary'
      'filters filters';
  }
  .traceability-toolbar {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      'actions summary'
      'filters filters';
  }
  .usecase-toolbar {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      'actions summary'
      'filters filters';
  }
}
.ui-subview-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 10rem;
}
.ui-subview-field--grow {
  flex: 1 1 16rem;
}
.ui-subview-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #60758a;
}
.ui-subview-input,
.ui-subview-select,
.ui-subview-textarea {
  min-height: 2.35rem;
  padding: 0.48rem 0.65rem;
  border: 1px solid #c8d6e3;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font: inherit;
}
.ui-subview-textarea {
  min-height: 5.5rem;
  resize: vertical;
}
.ui-subview-input:focus,
.ui-subview-select:focus,
.ui-subview-textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  border-color: #60a5fa;
}
.ui-subview-chip {
  min-height: 2.1rem;
  padding: 0.34rem 0.78rem;
  border-radius: 999px;
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #0f4c81;
  cursor: pointer;
  font-weight: 600;
}
.ui-subview-chip.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.ui-subview-empty-state {
  padding: 1.1rem 1.15rem;
  border: 1px dashed #bfd0df;
  border-radius: 16px;
  background: rgba(250, 252, 255, 0.92);
  color: #60758a;
}
.ui-subview-empty-state-title {
  margin: 0;
  color: #31485f;
  font-size: 0.98rem;
}
.ui-subview-empty-state-copy {
  margin: 0.4rem 0 0;
  line-height: 1.5;
}
.ui-subview-results-meta {
  margin: 0;
  color: #60758a;
  font-size: 0.84rem;
}
.content-inventory-results-grid {
  gap: 0.8rem;
}
.content-inventory-results-grid > * {
  flex: 1 1 14rem;
}
.content-inventory-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}
.ui-inventory-table-card > .ui-subview-section-heading,
.component-binding-table-card > .ui-subview-section-heading {
  padding: 1rem 1rem 0;
}
.content-inventory-result-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.content-inventory-result-card:hover {
  border-color: #9eb8d3;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}
.content-inventory-result-card:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.content-inventory-results-table-scrollport {
  overflow: auto;
  width: 100%;
  max-width: 100%;
  max-height: min(60vh, calc(100vh - 20rem));
  border: 1px solid #e6edf4;
  border-radius: 12px;
}
.content-inventory-results-table-wrap {
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.content-inventory-results-table {
  width: 100%;
  min-width: max(100%, 860px);
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}
.content-inventory-results-table thead th {
  position: sticky;
  top: 0;
  z-index: 9;
  text-align: left;
  padding: 0.72rem 0.8rem;
  background: #e8f1fb;
  border-bottom: 1px solid #d7e3ed;
  color: #1e3a5f;
  font-size: 0.82rem;
  box-shadow: 0 1px 0 #d7e3ed;
}
.content-inventory-results-table tbody td {
  padding: 0.68rem 0.8rem;
  border-bottom: 1px solid #e6edf4;
  vertical-align: top;
  background: #fff;
  color: #1f2937;
  font-size: 0.84rem;
}
.content-inventory-results-table tbody tr:last-child td {
  border-bottom: 0;
}
.content-inventory-results-open-btn {
  min-height: 2rem;
  padding: 0.32rem 0.62rem;
  white-space: nowrap;
}
.content-inventory-table-toolbar {
  align-items: flex-end;
}
.content-inventory-table-search {
  min-width: 16rem;
}
.content-inventory-all-table-scrollport {
  max-height: min(70vh, calc(100vh - 18rem));
}
.content-inventory-all-table {
  min-width: max(100%, 980px);
}
.content-inventory-inline-editor {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}
.content-inventory-inline-input {
  width: 100%;
  min-width: 9rem;
}
.content-inventory-inline-input--invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.08);
}
.content-inventory-inline-message {
  min-height: 1rem;
  color: #60758a;
  font-size: 0.74rem;
  line-height: 1.35;
}
.content-inventory-inline-message.is-error,
.content-inventory-validation-cell.is-error {
  color: #b91c1c;
}
.content-inventory-inline-message.is-warning,
.content-inventory-validation-cell.is-warning {
  color: #92400e;
}
.content-inventory-validation-cell {
  font-weight: 700;
  color: #166534;
}
.component-binding-table-card,
.ui-inventory-table-card {
  padding: 0;
}
.component-binding-table-card {
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.component-binding-table-scrollport {
  overflow: auto;
  width: 100%;
  max-width: 100%;
  min-height: 20rem;
  max-height: min(68vh, calc(100vh - 18rem));
  resize: vertical;
  border-top: 1px solid #e6edf4;
  border-radius: 0 0 16px 16px;
}
.component-binding-table-wrap {
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
}
.ui-inventory-table-card {
  overflow: visible;
  display: flex;
  flex-direction: column;
}
.ui-inventory-table-scrollport {
  width: 100%;
  max-width: 100%;
  max-height: min(70vh, calc(100vh - 18rem));
  border-radius: 0 0 16px 16px;
}
.ui-inventory-table-wrap {
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.component-binding-table,
.ui-inventory-table {
  width: 100%;
  border-collapse: collapse;
}
.component-binding-table {
  min-width: max(100%, 980px);
  table-layout: fixed;
}
.component-binding-table thead th {
  position: sticky;
  top: 0;
  z-index: 13;
  text-align: left;
  padding: 0.75rem 0.8rem;
  background: #e8f1fb;
  border-bottom: 1px solid #d7e3ed;
  color: #1e3a5f;
  box-shadow: 0 1px 0 #d7e3ed;
}
.component-binding-table tbody td {
  padding: 0.72rem 0.8rem;
  border-bottom: 1px solid #e6edf4;
  vertical-align: top;
  background: #fff;
}
@media (max-width: 959px) {
  .ui-workspace-summary {
    margin-left: 0;
    justify-content: flex-start;
  }
  .ui-subview-toolbar-summary {
    margin-left: 0;
    width: 100%;
  }
  .ui-inventory-toolbar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'actions'
      'filters'
      'summary';
  }
  .ui-inventory-toolbar-actions,
  .ui-inventory-toolbar-filters,
  .ui-inventory-toolbar-summary {
    grid-column: 1;
  }
  .ui-inventory-toolbar-summary {
    justify-content: flex-start;
  }
  .traceability-toolbar {
    gap: 0.75rem;
  }
  .traceability-toolbar-header-meta {
    margin-left: 0;
  }
  .traceability-toolbar-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'actions'
      'filters'
      'summary';
  }
  .traceability-toolbar-actions,
  .traceability-toolbar-filters,
  .traceability-toolbar-summary {
    grid-column: 1;
  }
  .traceability-toolbar-summary {
    justify-content: flex-start;
  }
  .traceability-suggestions-group__header {
    align-items: flex-start;
  }
  .traceability-suggestions-group__count {
    white-space: normal;
  }
  .requirements-cockpit-toolbar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'filters'
      'summary';
  }
  .requirements-cockpit-toolbar-summary {
    justify-content: flex-start;
    white-space: normal;
  }
  .requirements-cockpit-signal-header {
    flex-direction: column;
    gap: 0.35rem;
  }
  .requirements-cockpit-signal-stats {
    text-align: left;
  }
  .requirements-cockpit-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }
  .requirements-cockpit-dashboard-metrics {
    gap: 0.8rem;
  }
  .requirements-cockpit-brief-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .requirements-cockpit-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .usecase-toolbar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'actions'
      'filters'
      'summary';
  }
  .usecase-toolbar-actions,
  .usecase-toolbar-filters,
  .usecase-toolbar-summary {
    grid-column: 1;
  }
  .usecase-toolbar-summary {
    justify-content: flex-start;
  }
}
@media (max-width: 719px) {
  .ui-tab-view {
    padding: 0.75rem;
  }
  .ui-subview-btn {
    width: 100%;
    justify-content: flex-start;
  }
  .ui-workspace-subnav {
    width: 100%;
  }
  .ui-subview-field,
  .ui-subview-field--grow {
    min-width: min(100%, 14rem);
    flex-basis: 100%;
  }
  .traceability-banner {
    padding: 0.75rem 0.8rem;
  }
  .traceability-banner__actions,
  .traceability-toolbar-actions {
    width: 100%;
  }
  .traceability-toolbar-header {
    align-items: flex-start;
  }
  .traceability-toolbar-header-meta,
  .traceability-toolbar-toggle {
    width: 100%;
    margin-left: 0;
  }
  .traceability-toolbar-actions .er-workspace-btn,
  .traceability-banner__actions .er-workspace-btn {
    flex: 1 1 11rem;
  }
  .traceability-governance-toggle {
    width: 100%;
    justify-content: flex-start;
  }
  .traceability-toolbar-summary-text {
    white-space: normal;
  }
  .requirements-cockpit-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .requirements-cockpit-kpi-grid--compact,
  .requirements-cockpit-kpi-grid--secondary {
    grid-template-columns: minmax(0, 1fr);
  }
  .requirements-cockpit-brief-grid {
    padding: 0 0.85rem 0.9rem;
  }
  .requirements-cockpit-brief-action-item,
  .requirements-cockpit-brief-card--compact .requirements-cockpit-brief-action-item {
    grid-template-columns: minmax(0, 1fr);
  }
  .requirements-cockpit-brief-card--compact .requirements-cockpit-brief-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 0.85rem 0.9rem;
  }
  .requirements-cockpit-heatmap-table thead th,
  .requirements-cockpit-heatmap-table tbody td {
    padding: 0.6rem 0.55rem;
  }
  .requirements-cockpit-heatmap-cell {
    min-width: 5.1rem;
  }
}
/* Rules validation row highlighting (Requirements table) */
tr.row-error { background: rgba(211, 47, 47, 0.12); }
tr.row-warning { background: rgba(255, 152, 0, 0.14); }
tr.highlight-flash { animation: rowHighlightFlash 1.5s ease; }
@keyframes rowHighlightFlash {
  0% { background: rgba(255, 235, 59, 0.5); }
  100% { background: transparent; }
}
/* Requirements List: Simple View two-column layout + Details Pane */
.requirements-list-with-pane {
  display: flex;
  height: 100%;
  min-height: 0;
  width: 100%;
}
.requirements-list-left {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.requirements-details-pane {
  width: 420px;
  min-width: 360px;
  max-width: 520px;
  border-left: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background: #fff;
}
.requirements-details-pane-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
  z-index: 1;
}
.requirements-details-pane-header button {
  flex-shrink: 0;
}
.requirements-details-pane-title {
  font-weight: 600;
  font-size: 0.95rem;
}
.requirements-details-pane-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 0.75rem;
}
.requirements-details-pane-placeholder {
  margin: 0;
}
/* Simplified List Details pane: Children — collapsed by default, one requirement per line */
.requirements-details-pane-children-details {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}
.requirements-details-pane-children-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  list-style-position: outside;
}
.requirements-details-pane-children-list {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  max-height: min(40vh, 320px);
  overflow-y: auto;
  padding-left: 0.15rem;
}
.requirements-details-pane-child-row {
  display: block;
  margin-bottom: 0.25rem;
  line-height: 1.35;
  word-break: break-word;
}
.requirements-details-pane-child-row:last-child {
  margin-bottom: 0;
}
.requirements-details-pane-child-row a {
  display: inline;
}
.architecture-diagram-focus-hint {
  margin: 0 0 0.5rem 0;
  padding: 0.4rem 0.55rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #444;
  background: #f0f4f8;
  border-radius: 4px;
  border: 1px solid #d8e2ec;
}

.architecture-diagram--focus-active svg g.architecture-diagram-node--focused rect,
.architecture-diagram--focus-active svg g.architecture-diagram-node--focused polygon {
  stroke-width: 2.5px;
}

.architecture-toolbar-focus-toggle {
  user-select: none;
}

.architecture-toolbar-layout-label select.architecture-layout-engine-select {
  font-size: 0.88rem;
  padding: 0.15rem 0.35rem;
}

.architecture-elk-scope-panel {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.architecture-elk-scope-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.architecture-elk-scope-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
}

.architecture-elk-scope-kind {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  user-select: none;
}

.architecture-elk-scope-presets,
.architecture-elk-scope-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.architecture-elk-scope-summary {
  font-size: 0.82rem;
  color: #555;
}

.architecture-elk-scope-chip,
.architecture-elk-boundary-warning,
.architecture-elk-layout-note,
.architecture-elk-loading {
  font-size: 0.82rem;
  margin: 0 0 0.35rem;
  color: #555;
}

.architecture-elk-boundary-warning {
  color: #9a3412;
}

.architecture-elk-loading {
  color: #666;
  font-style: italic;
}

.architecture-integration-coverage-chip {
  font-size: 0.78rem;
  padding: 0.2rem 0.5rem;
  margin-left: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f5f5f5;
  cursor: pointer;
}
.architecture-integration-coverage--warning {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}
.architecture-integration-trace-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-weight: 600;
}
.architecture-integration-trace-badge--linked {
  background: #dcfce7;
  color: #166534;
}
.architecture-integration-trace-badge--weak {
  background: #fef9c3;
  color: #854d0e;
}
.architecture-integration-trace-badge--orphan {
  background: #fee2e2;
  color: #991b1b;
}
.architecture-integration-trace-badge--architecture-only {
  background: #f3f4f6;
  color: #4b5563;
}
.architecture-integration-trace-legend {
  font-size: 0.82rem;
  color: #666;
  margin: 0 0 0.5rem;
}
.architecture-integration-flow-workspace {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.architecture-integration-flow-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.architecture-integration-flow-tab-pane {
  min-width: 0;
}

.architecture-integration-flow-diagram-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.architecture-integration-flow-diagram-toolbar-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #444;
}

.architecture-integration-flow-diagram-toolbar-hint {
  font-size: 0.82rem;
  color: #666;
}

.architecture-integration-coverage-panel {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  max-height: min(70vh, 640px);
  overflow: auto;
}

.architecture-integration-coverage-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.architecture-integration-coverage-summary {
  font-size: 0.88rem;
  margin: 0 0 0.35rem;
}

.architecture-integration-coverage-scope {
  font-size: 0.82rem;
  color: #555;
  margin: 0 0 0.5rem;
}

.architecture-integration-coverage-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.architecture-integration-coverage-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.architecture-integration-coverage-table th,
.architecture-integration-coverage-table td {
  border-top: 1px solid #eee;
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

.architecture-integration-coverage-table th {
  color: #475569;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #f8fafc;
}

.architecture-integration-coverage-status-cell {
  width: 9rem;
  white-space: nowrap;
}

.architecture-integration-coverage-hop-cell,
.architecture-integration-coverage-backing-cell {
  overflow-wrap: anywhere;
}

.architecture-integration-coverage-action-cell {
  width: 15rem;
}

.architecture-integration-coverage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: flex-start;
}

.architecture-integration-coverage-empty {
  color: #666;
  font-size: 0.88rem;
}

.architecture-integration-hop-panel {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 0.65rem 0.75rem;
  background: #f8fafc;
}

.architecture-integration-hop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.architecture-integration-hop-table th {
  text-align: left;
  font-weight: 600;
  color: #444;
  padding: 0.35rem 0.5rem;
}

.architecture-integration-hop-modal h3 {
  font-size: 1.05rem;
}

.architecture-diagram-expand-overlay {
  position: fixed;
  inset: 0;
  z-index: 100070;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.architecture-diagram-expand-box {
  display: flex;
  flex-direction: column;
  width: calc(100vw - 2rem);
  max-width: calc(100vw - 2rem);
  height: calc(100vh - 2rem);
  height: calc(100dvh - 2rem);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.architecture-diagram-expand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #ddd;
  background: #f8fafc;
}

.architecture-diagram-expand-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.architecture-diagram--expanded {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 1rem;
  background: #fafafa;
}

.architecture-diagram--expanded svg {
  max-width: none;
  height: auto;
}

.architecture-views-browse {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  min-height: 0;
}
.architecture-browse-toolbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #d8e3ef;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(244, 249, 255, 0.98) 0%, rgba(250, 252, 255, 0.98) 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}
.architecture-browse-toolbar__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 0.85rem;
}
.architecture-browse-toolbar__title-group {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.18rem;
}
.architecture-browse-toolbar__title {
  margin: 0;
  color: #1f3145;
  font-size: 1.05rem;
  line-height: 1.2;
}
.architecture-browse-toolbar__summary {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.18rem 0.65rem;
  border: 1px solid #b9d8f7;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0f4c81;
  font-size: 0.79rem;
  font-weight: 700;
  white-space: nowrap;
}
.architecture-browse-toolbar__sections {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.architecture-browse-toolbar__section {
  display: flex;
  flex: 1 1 13rem;
  min-width: min(100%, 12rem);
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid #dbe4ec;
  border-radius: 10px;
  background: #fff;
}
.architecture-browse-toolbar__section--levels {
  flex: 1.15 1 15rem;
}
.architecture-browse-toolbar__section--generate {
  flex: 2.1 1 28rem;
}
.architecture-browse-toolbar__section--inspect {
  flex: 0.8 1 11rem;
}
.architecture-browse-toolbar__section-label {
  color: #5f7689;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.architecture-browse-toolbar__section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.architecture-browse-toolbar__section-actions--levels {
  gap: 0.4rem;
}
.architecture-browse-toolbar__filter-btn,
.architecture-browse-toolbar__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  padding: 0.38rem 0.8rem;
  border: 1px solid #c7d7e6;
  border-radius: 999px;
  background: #fff;
  color: #29465d;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: none;
}
.architecture-browse-toolbar__filter-btn:hover,
.architecture-browse-toolbar__action-btn:hover {
  background: #f8fbfe;
  border-color: #aac6df;
}
.architecture-browse-toolbar__filter-btn[aria-pressed="true"] {
  background: #dbeafe;
  color: #0f4c81;
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.14);
}
.architecture-browse-toolbar__action-btn--refresh {
  background: linear-gradient(180deg, #1d6ed8 0%, #1565c0 100%);
  color: #fff;
  border-color: transparent;
}
.architecture-browse-toolbar__action-btn--refresh:hover {
  background: linear-gradient(180deg, #1b64c7 0%, #0f57ab 100%);
  border-color: transparent;
}
.architecture-browse-toolbar__action-btn--generate {
  background: #eff6ff;
  color: #0f4c81;
  border-color: #bfdbfe;
}
.architecture-browse-toolbar__action-btn--generate:hover,
.architecture-browse-toolbar__action-btn--custom:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}
.architecture-browse-toolbar__action-btn--custom {
  background: #f8fafc;
  color: #29465d;
  border-color: #cbd5e1;
}
.architecture-browse-toolbar__action-btn--inspect {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
}
.architecture-browse-toolbar__action-btn--inspect:hover {
  background: #eef3f8;
  border-color: #b8c7d8;
}
.architecture-views-table-shell {
  overflow: auto;
  flex: 1;
  min-height: 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
}
.bpmn-toolbar-shell {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #dbe4ec;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.96);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}
.bpmn-toolbar-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.bpmn-toolbar-bar--summary {
  align-items: flex-start;
  gap: 0.4rem;
}
.bpmn-toolbar-title {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  margin-right: 0.25rem;
}
.bpmn-toolbar-title h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}
.bpmn-toolbar-control {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 8.5rem;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
}
.bpmn-toolbar-control__label {
  color: #5b7084;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bpmn-toolbar-select {
  min-height: 2.25rem;
  padding: 0.38rem 0.55rem;
  border: 1px solid #c7d2dc;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  color: #1f2937;
}
.bpmn-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: none;
}
.bpmn-toolbar-btn--compact {
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.84rem;
}
.bpmn-toolbar-btn--secondary {
  background: #fff;
  color: #29465d;
  border-color: #cbd5e1;
}
.bpmn-toolbar-btn--secondary:hover {
  background: #f8fafc;
}
.bpmn-toolbar-btn--create {
  background: #2f9e44;
  color: #fff;
}
.bpmn-toolbar-btn--create:hover {
  background: #2b8a3e;
}
.bpmn-toolbar-btn--generate {
  background: #0f766e;
  color: #fff;
}
.bpmn-toolbar-btn--generate:hover {
  background: #0d9488;
}
.bpmn-toolbar-btn--capability {
  background: #7c3aed;
  color: #fff;
}
.bpmn-toolbar-btn--capability:hover {
  background: #6d28d9;
}
.bpmn-toolbar-btn--workflow {
  background: #1565c0;
  color: #fff;
}
.bpmn-toolbar-btn--workflow:hover {
  background: #0d47a1;
}
.bpmn-toolbar-btn--accent {
  background: #e0f2fe;
  color: #0f4c81;
  border-color: #93c5fd;
}
.bpmn-toolbar-btn--accent:hover {
  background: #bfdbfe;
}
.bpmn-toolbar-btn--active,
.bpmn-toolbar-btn.is-active {
  background: #dbeafe;
  color: #0f4c81;
  border-color: #60a5fa;
}
.bpmn-toolbar-disclosure-btn {
  margin-left: 0;
}
.bpmn-toolbar-disclosure-btn + .bpmn-toolbar-disclosure-btn,
.bpmn-toolbar-disclosure-btn + .bpmn-toolbar-btn {
  margin-left: 0;
}
.bpmn-toolbar-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.18rem 0.62rem;
  border-radius: 999px;
  border: 1px solid #dbe4ec;
  background: #f8fafc;
  color: #365066;
  font-size: 0.79rem;
  font-weight: 600;
  white-space: nowrap;
}
.bpmn-toolbar-chip--info {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0f4c81;
}
.bpmn-toolbar-chip--accent {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #5b21b6;
}
.bpmn-toolbar-chip--warning {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}
.bpmn-toolbar-chip--neutral {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}
.bpmn-toolbar-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-top: 0.15rem;
  border-top: 1px solid #e5edf4;
}
.bpmn-toolbar-panel__title {
  flex: 1 1 100%;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5f7689;
}
.bpmn-toolbar-card {
  display: flex;
  flex: 1 1 16rem;
  min-width: min(100%, 15rem);
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem 0.8rem;
  background: #fff;
  border: 1px solid #dbe4ec;
  border-radius: 10px;
}
.bpmn-list-layout--analysis {
  display: block;
}
.bpmn-analysis-view-column {
  max-width: none;
  width: 100%;
}
.bpmn-analysis-view-host {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}
.bpmn-analysis-view-host .bpmn-toolbar-card {
  flex: 1 1 auto;
}
.bpmn-analysis-view-intro {
  padding: 0.7rem 0.85rem;
  border: 1px solid #dbe4ec;
  border-radius: 8px;
  background: #f8fafc;
  color: #516173;
  font-size: 0.9rem;
  line-height: 1.4;
}
.bpmn-toolbar-card--process-filter {
  flex: 2.4 1 32rem;
  min-width: min(100%, 28rem);
}
.bpmn-toolbar-card--visibility {
  flex: 0.75 1 13rem;
  min-width: min(100%, 11.5rem);
}
.bpmn-toolbar-card--table-layout {
  flex: 0 1 15rem;
}
.bpmn-toolbar-card__title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #263847;
}
.bpmn-toolbar-card__description {
  color: #60758a;
  font-size: 0.8rem;
  line-height: 1.4;
}
.bpmn-toolbar-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.bpmn-toolbar-action-row .bpmn-toolbar-btn {
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  white-space: nowrap;
  align-self: flex-start;
}
.bpmn-toolbar-action-row--icon-strip {
  gap: 0.45rem;
}
.bpmn-toolbar-flow-utilities {
  display: inline-flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  min-width: 0;
  max-width: 100%;
}
.bpmn-toolbar-action-row--flow-utilities,
.bpmn-toolbar-action-row--flow-layout-controls {
  flex: 0 1 auto;
  gap: 0.45rem;
}
.bpmn-toolbar-action-row--flow-layout-controls {
  align-items: center;
}
.bpmn-flow-layout-diagnostics--toolbar {
  margin-top: 0;
}
.bpmn-toolbar-quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.22rem 0.34rem;
  border: 1px solid #dbe4ec;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}
.bpmn-toolbar-quick-actions__divider {
  width: 1px;
  height: 1.65rem;
  margin: 0 0.12rem;
  background: #dbe4ec;
}
.bpmn-toolbar-icon-btn {
  background: #fff;
  color: #29465d;
  border-color: #cbd5e1;
}
.bpmn-toolbar-icon-btn:hover {
  background: #f8fafc;
}
.bpmn-toolbar-insert-btn {
  position: relative;
  min-width: 2.7rem;
  width: 2.7rem;
  min-height: 2.7rem;
  height: 2.7rem;
  padding: 0.35rem;
  border-radius: 10px;
}
.bpmn-toolbar-insert-btn svg {
  display: block;
  width: 24px;
  height: 24px;
}
.bpmn-toolbar-space-btn {
  position: relative;
  min-width: 2.55rem;
  width: 2.55rem;
  min-height: 2.55rem;
  height: 2.55rem;
  padding: 0.3rem;
  border-radius: 10px;
}
.bpmn-toolbar-space-btn svg {
  display: block;
  width: 24px;
  height: 24px;
}
.bpmn-toolbar-action-icon-btn {
  position: relative;
  flex: 0 0 2.55rem;
  min-width: 2.55rem;
  width: 2.55rem;
  min-height: 2.55rem;
  height: 2.55rem;
  padding: 0.3rem;
  border-radius: 10px;
}
.bpmn-toolbar-action-icon-btn svg {
  display: block;
  width: 24px;
  height: 24px;
}
.bpmn-toolbar-menu-group {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}
.bpmn-toolbar-c4-menu-group {
  flex-basis: 2.55rem;
  min-width: 2.55rem;
  width: 2.55rem;
  min-height: 2.55rem;
  height: 2.55rem;
}
.bpmn-toolbar-menu-toggle {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
}
.bpmn-toolbar-menu-toggle::-webkit-details-marker {
  display: none;
}
.bpmn-toolbar-menu-toggle::after {
  content: '';
  position: absolute;
  right: 0.36rem;
  bottom: 0.38rem;
  width: 0;
  height: 0;
  border-left: 0.22rem solid transparent;
  border-right: 0.22rem solid transparent;
  border-top: 0.3rem solid #64748b;
}
.bpmn-toolbar-menu-group[open] .bpmn-toolbar-menu-toggle {
  background: #dbeafe;
  color: #0f4c81;
  border-color: #60a5fa;
}
.bpmn-toolbar-menu-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 45;
  display: flex;
  min-width: 11.5rem;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.4rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}
.bpmn-toolbar-menu-action {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  justify-content: flex-start;
  min-height: 2.45rem;
  width: 100%;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: #fff;
  color: #29465d;
  font-size: 0.84rem;
  text-align: left;
}
.bpmn-toolbar-menu-action-icon {
  display: inline-flex;
  flex: 0 0 1.8rem;
  width: 1.8rem;
  height: 1.8rem;
  align-items: center;
  justify-content: center;
}
.bpmn-toolbar-menu-action-icon svg {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
}
.bpmn-toolbar-menu-action-label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.bpmn-toolbar-menu-action:hover,
.bpmn-toolbar-menu-action:focus-visible {
  background: #e0f2fe;
  color: #0f4c81;
}
.bpmn-toolbar-insert-btn--group {
  padding-right: 0.75rem;
}
.bpmn-toolbar-insert-btn--group::after {
  content: '';
  position: absolute;
  right: 0.4rem;
  bottom: 0.42rem;
  width: 0;
  height: 0;
  border-left: 0.24rem solid transparent;
  border-right: 0.24rem solid transparent;
  border-top: 0.32rem solid #64748b;
}
.bpmn-toolbar-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  color: #31475a;
  font-size: 0.88rem;
}
.bpmn-toolbar-checkbox input[type="checkbox"] {
  margin: 0;
}
.bpmn-toolbar-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.bpmn-toolbar-inline-copy {
  color: #4a6175;
  font-size: 0.86rem;
}
.bpmn-flow-layout-diagnostics {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.6rem 0.65rem;
  border: 1px solid #dbe4ec;
  border-radius: 8px;
  background: #f8fafc;
  color: #31475a;
  font-size: 0.82rem;
}
.bpmn-flow-layout-diagnostics__heading {
  font-weight: 700;
  color: #263847;
}
.bpmn-flow-layout-diagnostics__group {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
}
.bpmn-flow-layout-diagnostics__status {
  font-weight: 700;
  text-transform: capitalize;
}
.bpmn-flow-layout-diagnostics__group--failed .bpmn-flow-layout-diagnostics__status {
  color: #b91c1c;
}
.bpmn-flow-layout-diagnostics__group--degraded .bpmn-flow-layout-diagnostics__status {
  color: #92400e;
}
.bpmn-flow-layout-diagnostics__group--valid .bpmn-flow-layout-diagnostics__status {
  color: #166534;
}
.bpmn-flow-layout-diagnostics ul {
  margin: 0;
  padding-left: 1rem;
}
.bpmn-flow-layout-diagnostics li {
  margin: 0 0 0.2rem 0;
}
.bpmn-toolbar-dual-list.dual-list-multi-select {
  margin-bottom: 0;
}
.bpmn-toolbar-dual-list.dual-list-multi-select > label {
  display: none;
}
.bpmn-toolbar-dual-list .dual-list-top-row {
  align-items: center;
  gap: 0.55rem;
}
.bpmn-toolbar-dual-list .selected-chips {
  min-height: 2.25rem;
  padding: 0.15rem 0;
}
.bpmn-list-layout {
  display: flex;
  flex: 1 1 auto;
  gap: 1rem;
  min-height: 0;
  min-width: 0;
  width: 100%;
  align-items: stretch;
}
.bpmn-list-layout--flow {
  min-height: 0;
}
.bpmn-list-primary-column {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.bpmn-list-primary-column--table,
.bpmn-list-primary-column--sipoc,
.bpmn-inline-flow-column {
  overflow: hidden;
}
.bpmn-list-primary-column--sipoc {
  min-width: 0;
}
.bpmn-list-details-pane {
  flex: 1 1 0;
  min-width: 320px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  background: #fafafa;
  overflow: auto;
}
.bpmn-list-details-pane--sipoc {
  flex: 0 0 min(33.333vw, 520px);
  width: min(33.333vw, 520px);
  max-width: min(33.333vw, 520px);
}
.bpmn-list-scrollport,
.bpmn-sipoc-scrollport {
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.bpmn-sipoc-table-wrap {
  display: inline-block;
  width: max-content;
  min-width: 100%;
  max-width: none;
}
.requirements-row-selected {
  background: rgba(33, 150, 243, 0.12) !important;
}
/* Data Model Mini view: Details Pane row affordance + pane height */
tr.dm-mini-row-selectable {
  cursor: pointer;
}
.data-model-mini-with-pane {
  min-height: min(70vh, 640px);
}
.requirements-show-details-pane-btn {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.requirements-show-details-pane-btn:hover {
  background: #f0f0f0;
}
/* Validation summary bar */
.validation-summary-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; padding: 0.35rem 0.5rem; background: #fafafa; border: 1px solid #e0e0e0; border-radius: 4px; font-size: 0.9rem; }
.validation-summary-bar .validation-counts { margin-right: 0.5rem; }
/* Requirements list: validation chrome — collapsible <details> (like Export / baseline readiness) */
details.requirements-validation-details {
  margin-bottom: 0.45rem;
  padding: 0.4rem 0.55rem;
  background: #f8fafc;
  border: 1px solid #cfd8dc;
  border-radius: 4px;
  font-size: 0.82rem;
  line-height: 1.35;
}
.requirements-validation-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: #37474f;
  user-select: none;
  list-style-position: outside;
}
.requirements-validation-summary-title { font-weight: 600; }
.requirements-validation-summary-hint {
  font-weight: 400;
  color: #607d8b;
  font-size: 0.78rem;
}
.requirements-validation-details-body {
  margin-top: 0.35rem;
  padding-top: 0.25rem;
  border-top: 1px solid #eceff1;
}
.requirements-validation-details-body .validation-summary-bar {
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  margin-bottom: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.requirements-validation-details-body .validation-summary-bar .validation-counts {
  width: 100%;
  margin-right: 0;
  flex: none;
  box-sizing: border-box;
}
.requirements-validation-details-body .validation-summary-bar .requirements-completeness-line {
  flex: none;
  width: 100%;
}
.requirements-validation-bar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}
.requirements-validation-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}
.requirements-validation-actions-row label {
  flex: 1 1 12rem;
  min-width: min(100%, 10rem);
}
.validation-summary-bar button { padding: 0.25rem 0.5rem; cursor: pointer; border-radius: 4px; border: 1px solid #ccc; background: #fff; font-size: 0.85rem; }
.validation-summary-bar button:hover { background: #f0f0f0; }
/* Requirements List: +Add flyout + Set ID as No. (filter row before "Filter:", or parked in validation bar when another subview is active) */
.validation-summary-bar .requirements-validation-add-toolbar,
.requirements-list-filter-toolbar .requirements-validation-add-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-right: 0; }
.requirements-list-filter-toolbar .requirements-validation-add-toolbar { flex-shrink: 0; }
.requirements-list-primary-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.3rem;
  background: #f8fafc;
  border: 1px solid #dbe4ec;
  border-radius: 8px;
}
.validation-summary-bar .requirements-list-add-toggle-btn,
.requirements-list-filter-toolbar .requirements-list-add-toggle-btn {
  padding: 0.35rem 0.75rem;
  background: #4caf50;
  color: #fff;
  border: 1px solid #43a047;
  font-weight: 600;
}
.validation-summary-bar .requirements-list-add-toggle-btn:hover,
.requirements-list-filter-toolbar .requirements-list-add-toggle-btn:hover { background: #43a047; }
.validation-summary-bar .requirements-set-id-as-no-btn,
.requirements-list-filter-toolbar .requirements-set-id-as-no-btn {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffb74d;
}
.validation-summary-bar .requirements-set-id-as-no-btn:hover,
.requirements-list-filter-toolbar .requirements-set-id-as-no-btn:hover { background: #ffe0b2; }
/* Requirements List: toolbar zones (Find & view vs Act) + View options flyout */
.requirements-list-toolbar-root {
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.requirements-list-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.65rem;
}
.requirements-list-toolbar-zone--act {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}
.requirements-list-toolbar-zone--find {
  flex: 1 1 18rem;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.65rem;
  min-width: 0;
}
.requirements-list-toolbar-group {
  display: inline-flex;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.32rem 0.45rem;
  border: 1px solid #dde5ec;
  border-radius: 10px;
  background: #fbfcfd;
  box-sizing: border-box;
}
.requirements-list-toolbar-group--primary,
.requirements-list-toolbar-group--controls,
.requirements-list-toolbar-group--toggles,
.requirements-list-toolbar-group--utilities {
  flex: 0 0 auto;
}
.requirements-list-toolbar-group--search {
  flex: 1 1 25rem;
  min-width: min(100%, 26rem);
}
.requirements-list-toolbar-group--summary {
  flex: 1 1 16rem;
  justify-content: flex-start;
  min-width: 0;
}
.requirements-list-toolbar-group--toggles {
  gap: 0.35rem;
}
.requirements-list-toolbar-group--utilities {
  margin-left: auto;
}
.requirements-list-toolbar-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
}
.requirements-list-toolbar-search-input,
.requirements-list-toolbar-select {
  min-height: 2rem;
  box-sizing: border-box;
}
.requirements-list-toolbar-search-input {
  min-width: 14rem;
}
.requirements-list-toolbar-clear-btn {
  min-width: 2.2rem;
  font-weight: 600;
  line-height: 1;
}
.requirements-list-toolbar-flyout-group {
  display: inline-flex;
  align-items: center;
}
.requirements-list-toolbar-label {
  flex-shrink: 0;
  margin-right: 0;
  font-size: 0.85rem;
  color: #4a5b6c;
}
.requirements-list-toolbar-btn-secondary {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-height: 2rem;
}
.requirements-list-toolbar-btn-secondary:hover {
  background: #f5f5f5;
}
.requirements-list-toolbar-filter-toggle {
  font-weight: 600;
}
.requirements-list-type-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.requirements-list-type-summary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.9rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #d3e2f1;
  background: #fff;
  color: #2b4459;
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}
.requirements-list-type-summary-pill:hover {
  background: #f5f9fc;
}
.requirements-list-type-summary-pill.is-active {
  border-color: #8fb7df;
  background: #eaf4ff;
  color: #153b63;
}
.requirements-list-section-row td.requirements-list-section-cell {
  letter-spacing: 0.02em;
}
.requirements-list-filter-flags {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.requirements-list-flag-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 2rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid #d7e0e8;
  border-radius: 999px;
  background: #f8fbfd;
  color: #334e68;
  font-size: 0.84rem;
  cursor: pointer;
}
.requirements-list-flag-toggle input {
  margin: 0;
}
.requirements-list-tree-toggle-btn {
  margin-left: 0;
}
#requirements-list-view-options-panel.requirements-list-view-options-panel {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.35rem;
  min-width: 14rem;
  padding: 0.35rem 0.5rem;
  max-width: min(calc(100vw - 1rem), 24rem);
  max-height: min(72vh, 36rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
#requirements-list-view-options-panel.requirements-list-view-options-panel--custom {
  min-width: min(22rem, calc(100vw - 1rem));
  width: min(calc(100vw - 1rem), 43rem);
  max-width: min(calc(100vw - 1rem), 43rem);
}
@media (max-width: 1240px) {
  .requirements-list-toolbar-group--summary {
    flex-basis: 100%;
  }
  .requirements-list-toolbar-group--utilities {
    margin-left: 0;
  }
}
.requirements-list-view-option-row {
  font-size: 0.9rem;
}
.req-process-mapping-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-left: 0;
  flex: 1 0 100%;
  min-width: 0;
  vertical-align: middle;
}
.req-process-mapping-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.req-process-mapping-badge--mapped {
  background: #edf7ef;
  border-color: #b7ddc0;
  color: #22543d;
}
.req-process-mapping-badge--unmapped {
  background: #fff5e8;
  border-color: #f2c88a;
  color: #8d4b0f;
}
.req-process-mapping-badge--multi {
  background: #eef4ff;
  border-color: #bfd1f7;
  color: #294c7a;
}
.req-process-mapping-badge--suggestion {
  background: #eef2ff;
  border-color: #c7cff7;
  color: #3c4f97;
}
.req-process-mapping-badge--conflict {
  background: #fff1f2;
  border-color: #f6b6bc;
  color: #9b1c1c;
}
.req-process-mapping-badge--new-process {
  background: #f4f0ff;
  border-color: #d7c4fa;
  color: #5b38a1;
}
.req-process-mapping-suggestion-line {
  margin-top: 0.3rem;
  font-size: 0.76rem;
  line-height: 1.35;
  color: #627d98;
}
.req-process-mapping-summary-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: #f5f8fb;
  border: 1px solid #d7e2eb;
  color: #334e68;
  font-size: 0.8rem;
  font-weight: 600;
}
.req-process-mapping-table-scrollport {
  overflow: auto;
  max-height: 52vh;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
}
.req-process-mapping-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}
.req-proc-map-link {
  color: #0b63ce;
  text-decoration: underline;
  cursor: pointer;
}
.req-proc-map-link:hover,
.req-proc-map-link:focus {
  color: #084c9e;
}
.req-process-mapping-table__head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.55rem;
  border: 1px solid #ddd;
  text-align: left;
  background: #f4f6f8;
}
.requirements-list-custom-columns-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.2rem;
}
.requirements-list-view-option-action {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  box-sizing: border-box;
  margin-top: 0.1rem;
}
.requirements-list-view-option-action--custom-columns {
  margin-top: 0;
}
.requirements-list-custom-columns-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem 1rem;
  width: 100%;
  max-width: 100%;
  margin-top: 0.35rem;
}
.requirements-list-custom-columns-option {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  cursor: pointer;
  line-height: 1.3;
  min-width: 0;
}
.requirements-list-custom-columns-option input {
  margin-top: 0.1rem;
  flex: 0 0 auto;
}
@media (max-width: 860px) {
  .requirements-list-custom-columns-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #requirements-list-view-options-panel.requirements-list-view-options-panel--custom {
    width: min(calc(100vw - 1rem), 34rem);
    max-width: min(calc(100vw - 1rem), 34rem);
  }
}
@media (max-width: 620px) {
  .requirements-list-custom-columns-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  #requirements-list-view-options-panel.requirements-list-view-options-panel--custom {
    min-width: min(18rem, calc(100vw - 1rem));
    width: min(calc(100vw - 1rem), 24rem);
    max-width: min(calc(100vw - 1rem), 24rem);
  }
}
/* Column filters: summary row + chips + collapsible controls */
.requirements-list-filters-row {
  padding: 0.4rem 0.5rem;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
}
.requirements-list-filters-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.requirements-list-filter-expand-toggle {
  flex-shrink: 0;
  padding: 0.25rem 0.5rem;
  font-size: 0.82rem;
  cursor: pointer;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  background: #fff;
}
.requirements-list-filter-expand-toggle:hover {
  background: #f0f0f0;
}
.requirements-list-filter-count {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #eef3f8;
  color: #38536b;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.requirements-list-filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 12rem;
  min-width: 0;
}
.requirements-list-filter-chip {
  padding: 0.15rem 0.45rem;
  font-size: 0.78rem;
  line-height: 1.3;
  cursor: pointer;
  border: 1px solid #90caf9;
  border-radius: 999px;
  background: #e3f2fd;
  color: #0d47a1;
}
.requirements-list-filter-chip:hover {
  background: #bbdefb;
}
.requirements-list-filter-controls-row {
  border-top: 1px solid #eceff1;
  padding-top: 0.65rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.65rem;
  font-size: 0.88rem;
}
.requirements-list-filter-field {
  display: flex;
  flex: 1 1 11rem;
  min-width: 10rem;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.55rem 0.65rem;
  background: #fafcfe;
  border: 1px solid #dde6ee;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}
.requirements-list-filter-field--wide {
  flex-basis: 18rem;
}
.requirements-list-filter-field--action {
  justify-content: flex-end;
}
.requirements-list-filter-label {
  display: block;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #52697d;
}
.requirements-list-filter-select {
  width: 100%;
  min-height: 2.25rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid #c7d2dc;
  border-radius: 6px;
  background: #fff;
  font: inherit;
}
.requirements-list-dual-filter.dual-list-multi-select {
  margin-bottom: 0;
}
.requirements-list-dual-filter.dual-list-multi-select > label {
  display: none;
}
.requirements-list-dual-filter .dual-list-top-row {
  align-items: center;
  gap: 0.55rem;
}
.requirements-list-dual-filter .selected-chips {
  min-height: 2.25rem;
  padding: 0.2rem 0;
}
.requirements-list-dual-filter .selected-chips:empty::before {
  content: "All";
  color: #7a8d9f;
  font-size: 0.82rem;
}
.requirements-list-filter-actions {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding-top: 0.15rem;
}
.requirements-list-filter-reset-btn,
.requirements-list-filter-secondary-btn {
  min-height: 2.2rem;
  padding: 0.38rem 0.7rem;
  border: 1px solid #b8c6d1;
  border-radius: 6px;
  background: #fff;
  color: #233746;
  font: inherit;
  cursor: pointer;
}
.requirements-list-filter-reset-btn {
  font-weight: 600;
}
.requirements-list-filter-reset-btn:hover,
.requirements-list-filter-secondary-btn:hover {
  background: #f3f7fa;
}
.requirements-list-filter-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.2rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid #d6e0e7;
  border-radius: 6px;
  background: #f8fbfd;
  color: #38536b;
  font-size: 0.84rem;
}
.requirements-list-filter-checkbox input {
  margin: 0;
}
@media (max-width: 920px) {
  .requirements-list-filter-field,
  .requirements-list-filter-field--wide {
    flex-basis: calc(50% - 0.35rem);
    min-width: 14rem;
  }
}
@media (max-width: 640px) {
  .requirements-list-filter-field,
  .requirements-list-filter-field--wide {
    flex-basis: 100%;
    min-width: 0;
  }
  .requirements-list-filter-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
/* Bulk edit strip (separate from column filters) */
.requirements-list-bulk-strip {
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}
.requirements-list-bulk-hint {
  font-size: 0.82rem;
  color: #546e7a;
  padding: 0.35rem 0.5rem;
  background: #eceff1;
  border: 1px solid #cfd8dc;
  border-radius: 4px;
}
.requirements-list-bulk-bar {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.55rem;
  background: #fff8e1;
  border: 1px solid #ffcc80;
  border-radius: 4px;
  font-size: 0.88rem;
}
.requirements-list-bulk-count {
  font-weight: 600;
  margin-right: 0.25rem;
  color: #e65100;
}
.requirements-list-bulk-label {
  font-weight: 600;
  margin-right: 0.15rem;
}
.requirements-list-bulk-apply {
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid #ef6c00;
  background: #fff3e0;
  font-weight: 600;
}
.requirements-list-bulk-apply:hover {
  background: #ffe0b2;
}
/* Export / baseline readiness checklist (Requirements list, below validation bar) — collapsible <details> */
details.requirements-export-gate-checklist {
  padding: 0.4rem 0.55rem;
  background: #f8fafc;
  border: 1px solid #cfd8dc;
  border-radius: 4px;
  font-size: 0.82rem;
  line-height: 1.35;
}
.requirements-export-gate-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: #37474f;
  user-select: none;
  list-style-position: outside;
}
.requirements-export-gate-summary-title {
  font-weight: 600;
}
.requirements-export-gate-summary-hint {
  font-weight: 400;
  color: #607d8b;
  font-size: 0.78rem;
}
.requirements-export-gate-body {
  margin-top: 0.35rem;
  padding-top: 0.25rem;
  border-top: 1px solid #eceff1;
}
.requirements-export-gate-row {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}
.requirements-export-gate-row:last-child { margin-bottom: 0; }
.requirements-export-gate-badge {
  flex: 0 0 auto;
  min-width: 2.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.25rem;
  border-radius: 3px;
  text-align: center;
}
.requirements-export-gate-ok .requirements-export-gate-badge {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}
.requirements-export-gate-block .requirements-export-gate-badge {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}
.requirements-export-gate-note {
  color: #546e7a;
  font-size: 0.78rem;
  padding-left: 0.1rem;
}
.aris-delivery-pilot-guide {
  margin: 0.55rem 0 0.45rem;
  padding: 0.65rem;
  border: 1px solid #b0bec5;
  border-radius: 6px;
  background: #ffffff;
}
.aris-delivery-pilot-guide-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.45rem;
}
.aris-delivery-pilot-guide-title {
  font-weight: 700;
  color: #263238;
}
.aris-delivery-pilot-guide-summary {
  color: #546e7a;
  font-size: 0.78rem;
}
.aris-delivery-pilot-guide-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}
.aris-delivery-pilot-guide-chip {
  border: 1px solid #d0d7de;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  background: #f6f8fa;
  color: #37474f;
  font-size: 0.75rem;
}
.aris-delivery-pilot-guide-steps {
  display: grid;
  gap: 0.35rem;
}
.aris-delivery-pilot-guide-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.45rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fafafa;
}
.aris-delivery-pilot-guide-step--ready {
  border-color: #a5d6a7;
  background: #f1f8e9;
}
.aris-delivery-pilot-guide-step--attention {
  border-color: #ffcc80;
  background: #fff8e1;
}
.aris-delivery-pilot-guide-step--blocked {
  border-color: #ef9a9a;
  background: #fffbfb;
}
.aris-delivery-pilot-guide-badge {
  min-width: 3.1rem;
  padding: 0.12rem 0.35rem;
  border-radius: 3px;
  text-align: center;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
  color: #263238;
  background: #eceff1;
}
.aris-delivery-pilot-guide-step--ready .aris-delivery-pilot-guide-badge {
  background: #c8e6c9;
  color: #1b5e20;
}
.aris-delivery-pilot-guide-step--attention .aris-delivery-pilot-guide-badge {
  background: #ffe0b2;
  color: #8a4b00;
}
.aris-delivery-pilot-guide-step--blocked .aris-delivery-pilot-guide-badge {
  background: #ffcdd2;
  color: #b71c1c;
}
.aris-delivery-pilot-guide-step-content {
  min-width: 0;
}
.aris-delivery-pilot-guide-step-label {
  font-weight: 700;
  color: #263238;
}
.aris-delivery-pilot-guide-step-reason {
  margin-top: 0.08rem;
  color: #546e7a;
  font-size: 0.76rem;
}
.aris-delivery-pilot-guide-action {
  white-space: nowrap;
}
.aris-delivery-pilot-guide-report-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: 0.55rem;
}
@media (max-width: 720px) {
  .aris-delivery-pilot-guide-step {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .aris-delivery-pilot-guide-action {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
#requirements-list-add-panel.requirements-list-add-panel {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.25rem;
}
#requirements-list-add-panel .req-add-panel-item {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  box-sizing: border-box;
}
#requirements-list-add-panel .req-add-panel-quick {
  background: #e8f5e9;
  color: #1b5e20;
  border-color: #81c784;
}
#requirements-list-add-panel .req-add-panel-quick:hover { background: #c8e6c9; }
#requirements-list-add-panel .req-add-panel-type {
  background: #e3f2fd;
  color: #1565c0;
  border-color: #90caf9;
}
#requirements-list-add-panel .req-add-panel-type:hover { background: #bbdefb; }
/* Requirements List filter row: Export flyout (vertical menu like Feedback) */
#requirements-list-export-panel.requirements-list-export-panel {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.25rem;
}
#requirements-list-export-panel .req-export-panel-item {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  box-sizing: border-box;
}
/* Requirements List: Scaffold flyout (same vertical menu pattern as Export) */
#requirements-list-scaffold-panel.requirements-list-scaffold-panel {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.25rem;
  min-width: 14rem;
}
#requirements-list-scaffold-panel .req-scaffold-panel-item {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  box-sizing: border-box;
}
.requirements-list-scaffold-panel-hint {
  font-size: 0.78rem;
  color: #607d8b;
  margin-bottom: 0.15rem;
  line-height: 1.35;
}
.requirements-list-scaffold-toggle-btn {
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  font: inherit;
}
.requirements-list-scaffold-toggle-btn:hover {
  background: #eeeeee;
}
/* Glossary tab: title then ➕ Glossary, 📋 Table, subnav (left-aligned) */
.glossary-view-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 0.5rem; margin-bottom: 1rem; }
.glossary-view-header h3 { margin: 0; }
.glossary-view-header button,
.glossary-header-nav-btn { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.5rem 1rem; background: #2196F3; color: white; border: none; border-radius: 4px; cursor: pointer; }
.glossary-view-header > div:first-of-type button { background: #4CAF50; }
.glossary-view-header > div:first-of-type button:hover { background: #43a047; }
.glossary-header-nav-btn:hover { background: #1976d2; }
/* Reconciliation Lab → Quality heatmap: header stays visible while scrolling */
#recon-quality-heatmap-wrap .recon-quality-heatmap-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f5f5;
  box-shadow: 0 1px 0 #ddd;
}
#recon-quality-heatmap-wrap .recon-quality-heatmap-sort-btn {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  margin: 0;
  padding: 0.3rem;
  cursor: pointer;
  text-align: inherit;
  width: 100%;
  box-sizing: border-box;
}
#recon-quality-heatmap-wrap .recon-quality-heatmap-sort-btn:hover {
  text-decoration: underline;
}
/* Edit Requirement → Quality tab: heatmap score table (aligned with Reconciliation Lab colors) */
.req-modal-quality-table {
  border-collapse: collapse;
  table-layout: auto;
  font-size: inherit;
}
.req-modal-quality-table th,
.req-modal-quality-table td {
  border: 1px solid #ddd;
  padding: 0.35rem 0.45rem;
  vertical-align: top;
  text-align: left;
}
.req-modal-quality-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f5f5;
  box-shadow: 0 1px 0 #ddd;
  font-weight: 600;
}
.req-modal-quality-table tbody th[scope="row"] {
  font-weight: 600;
  background: #fafafa;
  white-space: nowrap;
}
.req-modal-quality-table .req-modal-quality-score {
  color: #1a1a1a;
  font-variant-numeric: tabular-nums;
  text-align: center;
  min-width: 3rem;
}
.req-modal-quality-table .req-modal-quality-updated {
  color: #666;
  font-size: 0.86em;
  font-weight: normal;
}
#requirement-modal .req-modal-quality-signals {
  display: block;
}
#requirement-modal .req-modal-quality-signals-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
#requirement-modal .req-modal-quality-signals-toggle:hover .req-modal-quality-signals-label,
#requirement-modal .req-modal-quality-signals-toggle:focus-visible .req-modal-quality-signals-label {
  text-decoration: underline;
}
#requirement-modal .req-modal-quality-signals-toggle:focus-visible {
  outline: 2px solid #7b1fa2;
  outline-offset: 3px;
  border-radius: 4px;
}
#requirement-modal .req-modal-quality-signals-label {
  font-weight: 700;
  color: #2f2a33;
}
#requirement-modal .req-modal-quality-signals-summary {
  flex: 1 1 14rem;
  min-width: 0;
  color: #4a235a;
  font-weight: 600;
}
#requirement-modal .req-modal-quality-signals-affordance {
  flex: 0 0 auto;
  min-width: 1.4rem;
  text-align: center;
  border: 1px solid rgba(91, 44, 111, 0.2);
  border-radius: 999px;
  padding: 0.05rem 0.35rem;
  background: rgba(255, 255, 255, 0.55);
  color: #5b2c6f;
  font-weight: 700;
  line-height: 1.1;
}
#requirement-modal .req-modal-quality-signals-body {
  margin-top: 0.45rem;
  max-height: min(22vh, 16rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 0.25rem;
  box-sizing: border-box;
}
#requirement-modal .req-modal-quality-signals-toprow {
  display: flex;
  align-items: center;
  gap: 0.35rem 0.5rem;
  flex-wrap: wrap;
}
#requirement-modal .req-modal-quality-signals-copy-btn {
  margin: 0;
}
#requirement-modal .req-modal-quality-signals-note {
  font-size: 0.82rem;
  color: #555;
}
#requirement-modal .req-modal-quality-signals-score {
  margin-top: 0.35rem;
  color: #4a235a;
  font-weight: 600;
}
#requirement-modal .req-modal-quality-signals-section-title {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #5b2c6f;
}
#requirement-modal .req-modal-quality-signals-section-title[data-after-section="true"] {
  margin-top: 0.2rem;
}
#requirement-modal .req-modal-quality-signals-list {
  margin-top: 0.2rem;
  padding-left: 1.25rem;
}
#requirement-modal .req-ai-guidance {
  margin: 0 0 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid #b9cde4;
  border-radius: 6px;
  background: #f7fbff;
  font-size: 0.85rem;
}
#requirement-modal .req-ai-guidance-summary {
  cursor: pointer;
  font-weight: 700;
  color: #24415f;
}
#requirement-modal .req-ai-guidance-summary:focus-visible {
  outline: 2px solid #1f6fb2;
  outline-offset: 3px;
  border-radius: 4px;
}
#requirement-modal .req-ai-guidance-body {
  margin-top: 0.5rem;
}
#requirement-modal .req-ai-guidance[open] .req-ai-guidance-body {
  max-height: min(34vh, 24rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 0.25rem;
  box-sizing: border-box;
}
#requirement-modal .req-ai-guidance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
#requirement-modal .req-ai-guidance-output {
  display: grid;
  gap: 0.4rem;
}
#requirement-modal .req-ai-guidance-empty,
#requirement-modal .req-ai-guidance-explanation,
#requirement-modal .req-ai-guidance-suggestion {
  padding: 0.45rem 0.55rem;
  border-radius: 5px;
  border: 1px solid #d7e2ee;
  background: #fff;
  color: #334155;
  line-height: 1.45;
}
#requirement-modal .req-ai-guidance-empty {
  color: #64748b;
}
#requirement-modal .req-ai-guidance-suggestion {
  border-left-width: 4px;
}
#requirement-modal .req-ai-guidance-suggestion--high {
  border-left-color: #b42318;
}
#requirement-modal .req-ai-guidance-suggestion--medium {
  border-left-color: #b76e00;
}
#requirement-modal .req-ai-guidance-suggestion--low {
  border-left-color: #2e7d32;
}
#requirement-modal .req-ai-guidance-suggestion-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
#requirement-modal .req-ai-guidance-severity {
  display: inline-flex;
  align-items: center;
  min-height: 1.2rem;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 700;
}
#requirement-modal .req-ai-guidance-suggestion-title {
  font-weight: 700;
  color: #1f2937;
}
#requirement-modal .req-ai-guidance-confidence {
  color: #64748b;
  font-size: 0.78rem;
}
#requirement-modal .req-ai-guidance-suggestion-copy {
  margin-top: 0.25rem;
  color: #475569;
}
#requirement-modal .req-ai-guidance-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.35rem;
}
#requirement-modal .req-ai-guidance-evidence-chip {
  padding: 0.08rem 0.32rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
}
#requirement-modal .req-ai-guidance-route-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}
#requirement-modal .req-ai-guidance-preview-lines {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.35rem;
}
#requirement-modal .req-ai-guidance-preview-line {
  padding: 0.25rem 0.35rem;
  border-radius: 4px;
  background: #f8fafc;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
#requirement-modal .req-ai-guidance-packet-textarea {
  min-height: 12rem;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.4;
}
#requirement-modal .req-trigger-panel {
  margin: 0 0 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d5c28a;
  border-radius: 6px;
  background: #fffdf3;
  font-size: 0.85rem;
}
#requirement-modal .req-trigger-summary {
  cursor: pointer;
  font-weight: 700;
  color: #5f4b17;
}
#requirement-modal .req-trigger-body {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.5rem;
}
#requirement-modal .req-trigger-intro,
#requirement-modal .req-trigger-output-note,
#requirement-modal .req-trigger-signal {
  padding: 0.42rem 0.55rem;
  border: 1px solid #eadfb8;
  border-radius: 5px;
  background: #fff;
  color: #433b25;
  line-height: 1.45;
}
#requirement-modal .req-trigger-signal {
  border-left-width: 4px;
}
#requirement-modal .req-trigger-change-requests-link {
  border: 0;
  background: transparent;
  color: #0b5cad;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
  text-decoration: underline;
}
#requirement-modal .req-trigger-change-requests-link:hover,
#requirement-modal .req-trigger-change-requests-link:focus {
  color: #063f7a;
  outline: 2px solid #8ab4f8;
  outline-offset: 2px;
}
#requirement-modal .req-trigger-signal--high {
  border-left-color: #b42318;
}
#requirement-modal .req-trigger-signal--medium {
  border-left-color: #b76e00;
}
#requirement-modal .req-trigger-signal--low {
  border-left-color: #6b8e23;
}
#requirement-modal .req-trigger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
#requirement-modal .req-trigger-prompt-textarea {
  min-height: 12rem;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.4;
}
.req-trigger-suggest-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.08rem 0.38rem;
  border: 1px solid #d9b85f;
  border-radius: 999px;
  background: #fff8de;
  color: #60460e;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}
.req-trigger-suggest-pill:hover {
  background: #ffefb5;
}
.req-aris-delta-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.08rem 0.38rem;
  border: 1px solid #7aa7c7;
  border-radius: 999px;
  background: #e8f4fd;
  color: #17425f;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}
.req-aris-delta-badge:hover {
  background: #d4ecfb;
}
.alm-ai-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.6rem;
  margin: 0 0 0.75rem 0;
  padding: 0.75rem;
  border: 1px solid #c8d6e6;
  border-radius: 8px;
  background: #f8fbff;
  color: #243447;
}
.alm-ai-guide-section {
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid #dde7f2;
  border-radius: 6px;
  background: #fff;
}
.alm-ai-guide-label {
  margin-bottom: 0.25rem;
  color: #285075;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}
.alm-ai-guide p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}
.alm-ai-guide-steps {
  margin: 0;
  padding-left: 1.15rem;
  color: #334155;
  font-size: 0.82rem;
  line-height: 1.4;
}
.alm-ai-guide-steps li + li {
  margin-top: 0.18rem;
}
.alm-ai-guide-section--outcome {
  border-left: 4px solid #5a8bb8;
}
.alm-ai-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}
.alm-ai-validation-heading {
  margin-bottom: 0.35rem;
  color: #172033;
  font-weight: 700;
}
.alm-ai-validation-error,
.alm-ai-validation-warning-title {
  margin-top: 0.45rem;
  font-weight: 700;
}
.alm-ai-validation-error {
  color: #8a1f1f;
}
.alm-ai-validation-warning-title {
  color: #6f4e00;
}
.alm-ai-validation-list {
  margin: 0.3rem 0 0.45rem 1.1rem;
  padding: 0;
}
.alm-ai-validation-summary,
.alm-ai-card-warning {
  border: 1px solid #efd58c;
  border-radius: 6px;
  background: #fff8df;
  color: #5f4700;
  line-height: 1.4;
}
.alm-ai-validation-summary {
  margin-top: 0.3rem;
  padding: 0.5rem 0.6rem;
  font-size: 0.84rem;
}
.alm-ai-card-warning {
  margin: 0.55rem 0;
  padding: 0.42rem 0.5rem;
  font-size: 0.8rem;
}
.alm-ai-run-section {
  margin: 0 0 0.85rem 0;
}
.alm-ai-run-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  color: #5b6475;
  font-size: 0.8rem;
}
.alm-ai-run-header strong {
  color: #172033;
  font-size: 0.92rem;
}
.alm-ai-proposal-card-list {
  display: grid;
  gap: 0.55rem;
}
.alm-ai-proposal-card {
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid #cfd8e5;
  border-radius: 8px;
  background: #fff;
  color: #172033;
}
.alm-ai-proposal-card--highlighted {
  border-color: #6aa7e8;
  box-shadow: 0 0 0 3px rgba(106, 167, 232, 0.18);
}
.alm-ai-proposal-card-header,
.alm-ai-proposal-actions,
.alm-ai-proposal-statuses {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.alm-ai-proposal-card-header {
  justify-content: space-between;
  margin-bottom: 0.45rem;
}
.alm-ai-proposal-heading {
  display: grid;
  min-width: 0;
  gap: 0.18rem;
}
.alm-ai-operation-label {
  color: #285075;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}
.alm-ai-proposal-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0;
  font-size: 0.84rem;
}
.alm-ai-proposal-meta-label,
.alm-ai-value-label {
  color: #5b6475;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}
.alm-ai-proposal-target {
  font-weight: 650;
}
.alm-ai-before-after {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.55rem;
  margin: 0.55rem 0;
}
.alm-ai-value-block {
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid #dde7f2;
  border-radius: 6px;
  background: #fbfdff;
}
.alm-ai-value-text {
  margin-top: 0.25rem;
  color: #1f2937;
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.alm-ai-value-text--empty {
  color: #7a8493;
  font-style: italic;
}
.alm-ai-proposal-rationale,
.alm-ai-next-step,
.alm-ai-citation-line,
.alm-ai-ledger-only-note {
  margin-top: 0.45rem;
  font-size: 0.84rem;
  line-height: 1.45;
}
.alm-ai-proposal-rationale {
  color: #26364a;
}
.alm-ai-proposal-rationale--empty,
.alm-ai-ledger-only-note {
  color: #667085;
}
.alm-ai-citation-line {
  color: #335b47;
}
.alm-ai-next-step {
  color: #172033;
}
.alm-ai-proposal-actions {
  margin-top: 0.55rem;
}
.alm-ai-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.08rem 0.42rem;
  border: 1px solid #d7dde8;
  border-radius: 999px;
  background: #f6f8fb;
  color: #4b5563;
  font-size: 0.76rem;
  font-weight: 650;
}
.alm-ai-status-chip--staged,
.alm-ai-status-chip--drafted {
  border-color: #b9d8c4;
  background: #e8f5e9;
  color: #25533a;
}
.alm-ai-status-chip--rejected {
  border-color: #f3d1a7;
  background: #fff3e0;
  color: #734b00;
}
.alm-ai-status-chip--ledger {
  border-color: #c8d6e6;
  background: #eef4fb;
  color: #285075;
}
.alm-ai-technical-details {
  margin-top: 0.55rem;
  color: #5b6475;
  font-size: 0.8rem;
}
.alm-ai-technical-details summary {
  cursor: pointer;
  font-weight: 650;
}
.alm-ai-technical-details pre {
  max-height: 14rem;
  margin: 0.45rem 0 0 0;
  padding: 0.5rem;
  overflow: auto;
  border: 1px solid #d7dde8;
  border-radius: 6px;
  background: #f8fafc;
  color: #172033;
  font-size: 0.75rem;
  line-height: 1.35;
}
.alm-ai-technical-warning-list ul,
.alm-ai-validation-technical ul {
  margin: 0.3rem 0 0.5rem 1.1rem;
  padding: 0;
}
@media (max-width: 900px) {
  .alm-ai-guide {
    grid-template-columns: 1fr;
  }
  .alm-ai-before-after {
    grid-template-columns: 1fr;
  }
}
.alm-local-ai-view {
  min-height: 0;
  overflow: auto;
}
.alm-local-ai-shell {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
}
.alm-local-ai-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}
.alm-local-ai-header h3 {
  margin: 0 0 0.2rem 0;
  font-size: 1.05rem;
}
.alm-local-ai-header p,
.alm-local-ai-note {
  margin: 0;
  font-size: 0.84rem;
  color: #52606d;
}
.alm-local-ai-status,
.alm-local-ai-advisory,
.alm-local-ai-progress,
.alm-local-ai-packet-summary {
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.82rem;
  padding: 0.45rem 0.6rem;
}
.alm-local-ai-advisory {
  border-color: #facc15;
  background: #fefce8;
  color: #713f12;
  font-weight: 700;
}
.alm-local-ai-packet-summary {
  border-color: #d7dde8;
  background: #f8fafc;
  color: #334155;
  white-space: pre-wrap;
}
.alm-local-ai-progress {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.alm-local-ai-progress[hidden] {
  display: none !important;
}
.alm-local-ai-progress--running {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}
.alm-local-ai-progress-spinner {
  flex: 0 0 auto;
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid rgba(30, 58, 138, 0.25);
  border-top-color: #2563eb;
  border-radius: 999px;
  animation: almLocalAiSpin 0.9s linear infinite;
}
@keyframes almLocalAiSpin {
  to { transform: rotate(360deg); }
}
.alm-local-ai-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.alm-local-ai-controls label {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.82rem;
  color: #334155;
}
.alm-local-ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}
.alm-local-ai-grid section {
  min-width: 0;
  border: 1px solid #d7dde8;
  border-radius: 6px;
  background: #fff;
  padding: 0.65rem;
}
.alm-local-ai-grid h4 {
  margin: 0 0 0.45rem 0;
  font-size: 0.88rem;
}
.alm-local-ai-grid pre {
  margin: 0;
  max-height: 22rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.78rem;
  line-height: 1.4;
}
.alm-local-ai-human-result {
  min-height: 5rem;
  line-height: 1.45;
  font-size: 0.84rem;
  color: #334155;
}
.alm-local-ai-result-summary,
.alm-local-ai-result-waiting,
.alm-local-ai-empty-result,
.alm-local-ai-explanations,
.alm-local-ai-escalation {
  border: 1px solid #d7dde8;
  border-radius: 6px;
  background: #f8fafc;
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.6rem;
}
.alm-local-ai-result-summary--success {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}
.alm-local-ai-result-summary--attention,
.alm-local-ai-result-waiting {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}
.alm-local-ai-result-title,
.alm-local-ai-result-waiting-title,
.alm-local-ai-section-title,
.alm-local-ai-proposal-title {
  font-weight: 700;
  color: #172033;
}
.alm-local-ai-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  margin-top: 0.35rem;
  font-size: 0.8rem;
}
.alm-local-ai-result-meta-item strong {
  color: inherit;
}
.alm-local-ai-warning-panel {
  margin-bottom: 0.65rem;
}
.alm-local-ai-warning-panel li {
  margin-bottom: 0.25rem;
}
.alm-local-ai-proposal-card {
  box-shadow: inset 3px 0 0 #6aa7e8;
}
.alm-local-ai-result-field {
  margin-top: 0.45rem;
}
.alm-local-ai-requirement-link,
.alm-local-ai-object-label {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0.05rem 0.2rem;
  padding: 0.13rem 0.42rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.alm-local-ai-object-label {
  cursor: default;
}
.alm-local-ai-requirement-link:hover,
.alm-local-ai-requirement-link:focus-visible {
  background: #dbeafe;
  outline: none;
}
.alm-local-ai-requirement-link--missing,
.alm-local-ai-requirement-link:disabled {
  border-color: #d7dde8;
  background: #f8fafc;
  color: #64748b;
  cursor: default;
}
.alm-local-ai-explanations ul {
  margin: 0.35rem 0 0 1.1rem;
  padding: 0;
}
.alm-local-ai-escalation {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}
.alm-local-ai-wide {
  grid-column: 1 / -1;
}

.external-review-lab {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: #172033;
}

.external-review-hero,
.external-review-form,
.external-review-panel,
.external-review-empty {
  border: 1px solid #d9e3ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 1rem;
}

.external-review-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  background: #f7fbff;
}

.external-review-hero h3,
.external-review-panel h4 {
  margin: 0 0 0.35rem 0;
  color: #10223d;
}

.external-review-hero p,
.external-review-field p,
.external-review-panel-heading p,
.external-review-empty p,
.external-review-muted {
  margin: 0;
  color: #54657a;
  line-height: 1.45;
}

.external-review-boundary {
  flex: 0 0 280px;
  border: 1px solid #f2c98c;
  border-radius: 8px;
  background: #fff8eb;
  color: #6d4300;
  padding: 0.7rem 0.8rem;
  font-size: 0.84rem;
  line-height: 1.4;
}

.external-review-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.external-review-field label,
.external-review-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 700;
  color: #20334d;
  font-size: 0.86rem;
}

.external-review-field textarea,
.external-review-form-grid input,
.external-review-form-grid select {
  width: 100%;
  border: 1px solid #cdd8e6;
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  color: #172033;
  background: #fff;
}

.external-review-field textarea {
  min-height: 190px;
  resize: vertical;
}

.external-review-form-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 0.75rem;
}

.external-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.external-review-running {
  border: 1px solid #b8d3f2;
  border-radius: 8px;
  background: #eef7ff;
  color: #17446f;
  padding: 0.65rem 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.external-review-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid #b8d3f2;
  border-top-color: #17446f;
  border-radius: 50%;
  animation: external-review-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

@keyframes external-review-spin {
  to {
    transform: rotate(360deg);
  }
}

.external-review-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 0.75rem;
}

.external-review-summary-card {
  border: 1px solid #d9e3ef;
  border-radius: 8px;
  background: #fff;
  padding: 0.85rem;
}

.external-review-summary-card span {
  display: block;
  color: #63758c;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.external-review-summary-card strong {
  display: block;
  margin: 0.2rem 0;
  color: #10223d;
  font-size: 1.25rem;
}

.external-review-summary-card p {
  margin: 0;
  color: #53657a;
  font-size: 0.84rem;
  line-height: 1.4;
}

.external-review-panel-heading {
  margin-bottom: 0.7rem;
}

.external-review-table-wrap {
  overflow: auto;
  border: 1px solid #d9e3ef;
  border-radius: 8px;
}

.external-review-findings-table {
  width: 100%;
  min-width: 1160px;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
}

.external-review-col-ref {
  width: 4%;
}

.external-review-col-severity {
  width: 10%;
}

.external-review-col-finding {
  width: 18%;
}

.external-review-col-count {
  width: 6%;
}

.external-review-col-evidence {
  width: 34%;
}

.external-review-col-recommendation {
  width: 28%;
}

.external-review-findings-table th,
.external-review-findings-table td {
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid #e1e8f1;
  text-align: left;
  vertical-align: top;
  font-size: 0.85rem;
}

.external-review-findings-table th {
  background: #f4f8fc;
  color: #20334d;
  font-weight: 800;
}

.external-review-findings-table p {
  margin: 0.3rem 0 0 0;
  color: #36485f;
  line-height: 1.45;
}

.external-review-findings-table ul {
  margin: 0;
  padding-left: 1rem;
}

.external-review-findings-table li + li {
  margin-top: 0.35rem;
}

.external-review-findings-table code {
  display: block;
  margin-top: 0.4rem;
  white-space: pre-wrap;
  background: #eef3f8;
  border: 1px solid #d9e3ef;
  border-radius: 6px;
  color: #1d3854;
  padding: 0.45rem;
}

.external-review-mini-note {
  display: inline-flex;
  margin-left: 0.35rem;
  color: #54657a;
  font-size: 0.78rem;
  font-weight: 700;
}

.external-review-concern,
.external-review-finding,
.external-review-recommendation {
  border: 1px solid #e1e8f1;
  border-radius: 8px;
  background: #fbfdff;
  padding: 0.75rem;
  margin: 0.55rem 0;
}

.external-review-concern p,
.external-review-finding p,
.external-review-recommendation p {
  margin: 0.35rem 0 0 0;
  color: #36485f;
  line-height: 1.45;
}

.external-review-finding-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.external-review-finding-title em {
  color: #697b91;
  font-size: 0.8rem;
  font-style: normal;
}

.external-review-severity {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.external-review-severity--informational {
  background: #edf3fb;
  color: #315c88;
}

.external-review-severity--warning {
  background: #fff3d8;
  color: #7a4b00;
}

.external-review-severity--high-risk {
  background: #ffe4d8;
  color: #8a2f0b;
}

.external-review-severity--blocking {
  background: #ffe1e5;
  color: #9b1c31;
}

.external-review-finding blockquote {
  margin: 0.55rem 0 0 0;
  border-left: 3px solid #9cb7d6;
  padding: 0.35rem 0.6rem;
  color: #43556b;
  background: #f3f7fb;
}

.external-review-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.external-review-recommendation code {
  display: block;
  margin-top: 0.5rem;
  white-space: pre-wrap;
  background: #eef3f8;
  border: 1px solid #d9e3ef;
  border-radius: 6px;
  color: #1d3854;
  padding: 0.5rem;
}

.external-review-technical {
  border: 1px solid #d9e3ef;
  border-radius: 8px;
  background: #fff;
  padding: 0.75rem;
}

.external-review-technical summary {
  cursor: pointer;
  font-weight: 700;
  color: #20334d;
}

.external-review-technical pre {
  overflow: auto;
  max-height: 420px;
  margin: 0.75rem 0 0 0;
  background: #101826;
  color: #eaf1ff;
  border-radius: 8px;
  padding: 0.8rem;
  font-size: 0.78rem;
}

@media (max-width: 1100px) {
  .external-review-form-grid,
  .external-review-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .external-review-hero,
  .external-review-two-col {
    display: block;
  }

  .external-review-boundary {
    margin-top: 0.75rem;
  }

  .external-review-form-grid,
  .external-review-summary-grid {
    grid-template-columns: 1fr;
  }
}

.mera-assessment-lab {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: #172033;
}

.mera-hero,
.mera-form,
.mera-panel,
.mera-empty {
  border: 1px solid #d9e3ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 1rem;
}

.mera-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  background: #f8fbf8;
}

.mera-hero h3,
.mera-panel h4 {
  margin: 0 0 0.35rem 0;
  color: #10223d;
}

.mera-hero p,
.mera-panel-heading p,
.mera-empty p,
.mera-panel p,
.mera-ownership-grid em {
  margin: 0;
  color: #54657a;
  line-height: 1.45;
}

.mera-boundary {
  flex: 0 0 300px;
  border: 1px solid #b9d9c1;
  border-radius: 8px;
  background: #eef9f1;
  color: #1c5a2c;
  padding: 0.7rem 0.8rem;
  font-size: 0.84rem;
  line-height: 1.4;
  font-weight: 700;
}

.mera-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mera-question-grid,
.mera-ownership-grid,
.mera-cost-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 0.75rem;
}

.mera-question-grid label,
.mera-ownership-grid label,
.mera-cost-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 700;
  color: #20334d;
  font-size: 0.86rem;
}

.mera-question-grid select,
.mera-ownership-grid select,
.mera-cost-grid select {
  width: 100%;
  border: 1px solid #cdd8e6;
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  color: #172033;
  background: #fff;
}

.mera-summary-grid,
.mera-dimension-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 0.75rem;
}

.mera-dimension-grid {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.mera-summary-card,
.mera-dimension-card {
  border: 1px solid #d9e3ef;
  border-radius: 8px;
  background: #fff;
  padding: 0.85rem;
}

.mera-summary-card span,
.mera-dimension-card span {
  display: block;
  color: #63758c;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.mera-summary-card strong,
.mera-dimension-card strong {
  display: block;
  margin: 0.2rem 0;
  color: #10223d;
  font-size: 1.25rem;
}

.mera-summary-card p {
  margin: 0;
  color: #53657a;
  font-size: 0.84rem;
  line-height: 1.4;
}

.mera-risk {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.mera-risk--low {
  background: #e8f6ef;
  color: #1f6b3a;
}

.mera-risk--moderate {
  background: #fff3d8;
  color: #7a4b00;
}

.mera-risk--high {
  background: #ffe4d8;
  color: #8a2f0b;
}

.mera-risk--critical {
  background: #ffe1e5;
  color: #9b1c31;
}

.mera-table-wrap {
  overflow-x: auto;
}

.mera-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.mera-table th,
.mera-table td {
  border-bottom: 1px solid #e1e8f1;
  padding: 0.55rem;
  text-align: left;
  vertical-align: top;
}

.mera-table th {
  color: #20334d;
  background: #f4f8fc;
}

@media (max-width: 1100px) {
  .mera-summary-grid,
  .mera-dimension-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .mera-hero {
    display: block;
  }

  .mera-boundary {
    margin-top: 0.75rem;
  }

  .mera-question-grid,
  .mera-ownership-grid,
  .mera-cost-grid,
  .mera-summary-grid,
  .mera-dimension-grid {
    grid-template-columns: 1fr;
  }
}
/* Glossary tab: workspace-style header, grouped navigation, and compact table toolbar */
.glossary-view-header {
  display: block;
  margin-bottom: 0.9rem;
}
.glossary-view-header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem;
}
.glossary-view-header .glossary-view-title {
  margin: 0;
  flex: 0 0 auto;
  align-self: center;
}
.glossary-add-term-group {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  flex: 0 0 auto;
}
.glossary-add-term-main {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.glossary-add-term-toggle {
  min-width: 2.5rem;
  padding-left: 0.7rem;
  padding-right: 0.7rem;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 1px solid rgba(255,255,255,0.28);
}
.glossary-workspace-shell {
  --glossary-rail-collapsed-width: 5rem;
  --glossary-rail-flyout-width: min(26rem, calc(100vw - 8rem));
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.glossary-workspace-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  padding-left: calc(var(--glossary-rail-collapsed-width) + 0.65rem);
}
.glossary-subnav-rail {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--glossary-rail-collapsed-width);
  overflow: visible;
}
#glossary-subnav.glossary-subnav-rail-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: var(--glossary-rail-collapsed-width);
  height: auto;
  min-height: 0;
  padding: 0.35rem 0.3rem;
  box-sizing: border-box;
  overflow: visible;
  border: 1px solid #d8e2ea;
  border-radius: 8px;
  background: #f8fbfd;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
#glossary-subnav.glossary-subnav-rail-list .glossary-subnav-category-btn {
  display: grid;
  grid-template-rows: 1.65rem auto;
  justify-items: center;
  align-items: center;
  gap: 0.12rem;
  width: 100%;
  min-height: 3.15rem;
  padding: 0.28rem 0.2rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #2f4a5f;
  cursor: pointer;
  font: inherit;
  line-height: 1.1;
  text-align: center;
}
#glossary-subnav.glossary-subnav-rail-list .glossary-subnav-category-btn:hover,
#glossary-subnav.glossary-subnav-rail-list .glossary-subnav-category-btn:focus-visible,
#glossary-subnav.glossary-subnav-rail-list .glossary-subnav-category-btn[data-open="true"] {
  border-color: #c9d9e7;
  background: #eef5fb;
  outline: none;
}
#glossary-subnav.glossary-subnav-rail-list .glossary-subnav-category-btn[data-active="true"] {
  border-color: #99c4e9;
  background: #dff0ff;
  color: #123b60;
  box-shadow: inset 3px 0 0 #1976d2;
}
#glossary-subnav.glossary-subnav-rail-list .glossary-subnav-category-icon,
.glossary-subnav-flyout-items .glossary-subnav-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #e7eef5;
  color: #31516d;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
#glossary-subnav.glossary-subnav-rail-list .glossary-subnav-category-icon {
  width: 1.65rem;
  height: 1.65rem;
}
#glossary-subnav.glossary-subnav-rail-list .glossary-subnav-category-icon svg,
.glossary-subnav-flyout-items .glossary-subnav-btn-icon svg {
  display: block;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  color: inherit;
}
#glossary-subnav.glossary-subnav-rail-list .glossary-subnav-category-btn[data-active="true"] .glossary-subnav-category-icon,
.glossary-subnav-flyout-items .glossary-subnav-btn[data-active="true"] .glossary-subnav-btn-icon,
.glossary-subnav-flyout-items .glossary-subnav-btn.active .glossary-subnav-btn-icon {
  background: #1976d2;
  color: #ffffff;
}
#glossary-subnav.glossary-subnav-rail-list .glossary-subnav-category-label {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 0.62rem;
  font-weight: 750;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.glossary-subnav-flyout {
  position: absolute;
  top: 0.35rem;
  left: calc(var(--glossary-rail-collapsed-width) + 0.45rem);
  width: var(--glossary-rail-flyout-width);
  max-height: calc(100% - 0.7rem);
  padding: 0.7rem;
  box-sizing: border-box;
  overflow: auto;
  border: 1px solid #cbd9e6;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 35, 55, 0.2);
}
.glossary-subnav-flyout[hidden] {
  display: none;
}
.glossary-subnav-flyout-header {
  margin-bottom: 0.65rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #e3ebf2;
}
.glossary-subnav-flyout-title {
  margin: 0;
  color: #1e3a52;
  font-size: 0.98rem;
  line-height: 1.2;
}
.glossary-subnav-flyout-hint {
  margin: 0.22rem 0 0;
  color: #5b7286;
  font-size: 0.78rem;
  line-height: 1.35;
}
.glossary-subnav-flyout-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}
.glossary-subnav-flyout-items .glossary-subnav-btn {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 2.35rem;
  padding: 0.28rem 0.42rem;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #274057;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}
.glossary-subnav-flyout-items .glossary-subnav-btn:hover,
.glossary-subnav-flyout-items .glossary-subnav-btn:focus-visible {
  border-color: #d2dfeb;
  background: #eef5fb;
  outline: none;
}
.glossary-subnav-flyout-items .glossary-subnav-btn[data-active="true"],
.glossary-subnav-flyout-items .glossary-subnav-btn.active {
  border-color: #99c4e9;
  background: #dff0ff;
  color: #123b60;
  box-shadow: inset 3px 0 0 #1976d2;
}
.glossary-subnav-flyout-items .glossary-subnav-btn-icon {
  width: 1.75rem;
  height: 1.75rem;
}
.glossary-subnav-flyout-items .glossary-subnav-btn-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
#glossary-subnav.glossary-subnav-strip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.6rem;
  min-height: 0;
  flex: 0 1 auto;
}
#glossary-subnav.glossary-subnav-strip .glossary-subnav-section {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 0.4rem;
  width: max-content;
  max-width: 100%;
  padding: 0.55rem 0.65rem;
  background: #f8fafc;
  border: 1px solid #dbe4ec;
  border-radius: 10px;
}
#glossary-subnav.glossary-subnav-strip .glossary-subnav-section-title {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #597187;
}
#glossary-subnav.glossary-subnav-strip .glossary-subnav-section-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
}
#glossary-subnav.glossary-subnav-strip .glossary-subnav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #ccd7e2;
  background: #fff;
  cursor: pointer;
  color: #274057;
  white-space: nowrap;
}
#glossary-subnav.glossary-subnav-strip .glossary-subnav-btn:hover {
  background: #eef4f8;
}
#glossary-subnav.glossary-subnav-strip .glossary-subnav-btn.active {
  border-color: rgba(20, 98, 235, 0.28);
  background: linear-gradient(180deg, #1462eb 0%, var(--alm-primary) 100%);
  color: #fff;
}
.glossary-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 0.8rem;
  margin-bottom: 0.5rem;
  padding: 0.7rem 0.85rem;
  background: #fbfdff;
  border: 1px solid #dbe4ec;
  border-radius: 12px;
}
.glossary-table-toolbar-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.glossary-table-toolbar-right .glossary-toolbar-menu-group {
  margin-left: 0;
}
.glossary-table-filters-wrapper {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 0.8rem;
}
.glossary-table-toolbar-btn-secondary {
  padding: 0.4rem 0.75rem;
  border: 1px solid #c9d6e2;
  border-radius: 10px;
  background: #fff;
  color: #274057;
  font-weight: 600;
  cursor: pointer;
}
.glossary-table-toolbar-btn-secondary:hover,
.glossary-table-toolbar-btn-secondary:focus-visible {
  border-color: #9fb7cc;
  background: #eef5ff;
}
.glossary-table-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.glossary-table-toolbar-group--search {
  flex: 1 1 14rem;
  min-width: 10rem;
}
.glossary-table-toolbar-group--content-types {
  flex: 1 1 18rem;
  min-width: 15rem;
  max-width: min(30rem, 100%);
}
.glossary-table-toolbar-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #52687c;
  white-space: nowrap;
}
.glossary-table-toolbar-search,
.glossary-table-toolbar-select {
  padding: 0.45rem 0.6rem;
  border: 1px solid #c9d6e2;
  border-radius: 10px;
  background: #fff;
}
.glossary-table-toolbar-search-row {
  display: inline-flex;
  align-items: stretch;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}
.glossary-table-toolbar-search {
  flex: 1 1 auto;
  min-width: 0;
}
.glossary-table-toolbar-search-clear {
  flex: 0 0 auto;
  min-width: 2.25rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid #c9d6e2;
  border-radius: 10px;
  background: #fff;
  color: #445f76;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}
.glossary-table-toolbar-search-clear:hover:not(:disabled),
.glossary-table-toolbar-search-clear:focus-visible {
  border-color: #9fb7cc;
  background: #eef5ff;
  color: #17324a;
}
.glossary-table-toolbar-search-clear:disabled {
  cursor: default;
  opacity: 0.45;
}
.glossary-tags-search-row {
  flex: 1 1 320px;
}
.glossary-tags-tag-cell,
.glossary-tags-preview-cell,
table.data-model-table td.glossary-tags-tag-cell,
table.data-model-table td.glossary-tags-preview-cell {
  text-align: left;
}
.glossary-tags-tag-anchor {
  display: inline-flex;
  max-width: 100%;
  cursor: default;
  color: #17324a;
  font-weight: 600;
  text-align: left;
}
.glossary-tags-tag-anchor:hover {
  text-decoration: underline;
}
.glossary-tags-preview-link {
  display: block;
  width: 100%;
  padding: 0.1rem 0;
  border: 0;
  background: transparent;
  color: #1976d2;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.glossary-tags-preview-link:hover,
.glossary-tags-preview-link:focus-visible {
  text-decoration: underline;
}
.glossary-tags-preview-more {
  margin-top: 0.2rem;
  color: #667085;
  font-size: 0.82rem;
  text-align: left;
}
.glossary-table-toolbar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid #d4dee8;
  border-radius: 10px;
  background: #fff;
  white-space: nowrap;
}
#glossary-filter-content-type-wrapper.dual-list-multi-select {
  margin-bottom: 0;
}
#glossary-filter-content-type-wrapper > label {
  margin-bottom: 0;
  white-space: nowrap;
}
#glossary-filter-content-type-wrapper .dual-list-top-row {
  flex: 1 1 auto;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
}
#glossary-filter-content-type-wrapper .selected-chips {
  min-width: 0;
  min-height: 2.25rem;
  padding: 0.15rem 0;
}
.glossary-toolbar-menu-group {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}
.glossary-toolbar-menu-toggle {
  white-space: nowrap;
}
.glossary-toolbar-menu-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 13rem;
  padding: 0.35rem;
}
.glossary-toolbar-menu-panel[hidden] {
  display: none;
}
.glossary-toolbar-menu-panel--add {
  left: 0;
  right: auto;
  width: min(20rem, calc(100vw - 3rem));
  min-width: min(20rem, calc(100vw - 3rem));
  max-width: calc(100vw - 3rem);
  max-height: min(calc(100vh - 8rem), 28rem);
  flex-wrap: nowrap;
  align-items: stretch;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
}
.glossary-toolbar-menu-panel--add .glossary-toolbar-menu-action {
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: anywhere;
  min-height: 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #274057;
  font-weight: 600;
  line-height: 1.25;
  box-shadow: none;
}
.glossary-toolbar-menu-action {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}
.glossary-toolbar-menu-panel--add .glossary-toolbar-menu-action:hover,
.glossary-toolbar-menu-panel--add .glossary-toolbar-menu-action:focus-visible {
  background: #eef4f8;
  border-color: #d6e0ea;
  color: #17324a;
}
.glossary-toolbar-menu-panel--add .glossary-toolbar-menu-action:focus-visible {
  outline: 2px solid rgba(20, 98, 235, 0.22);
  outline-offset: 0;
}
.glossary-toolbar-menu-divider {
  height: 1px;
  background: rgba(139, 157, 176, 0.35);
}
.glossary-toolbar-menu-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.1rem 0.3rem;
  color: #304558;
  font-size: 0.9rem;
}
.glossary-filter-chip-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}
.glossary-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #d7e3ee;
  background: #f4f8fb;
  color: #284155;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.glossary-filter-chip--search {
  background: #eef5ff;
  border-color: #cbdcf8;
}
.glossary-filter-chip--toggle {
  background: #fff6dd;
  border-color: #efd694;
}
.glossary-filter-chip--type {
  background: #edf8f2;
  border-color: #cce8d7;
}
.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;
}
@media (max-width: 860px) {
  .glossary-table-toolbar {
    padding: 0.6rem 0.7rem;
  }
  .glossary-toolbar-menu-group {
    margin-left: 0;
  }
}
@media (max-width: 700px) {
  #glossary-subnav.glossary-subnav-strip .glossary-subnav-section {
    width: 100%;
  }
  .glossary-view-header-top {
    align-items: stretch;
  }
  .glossary-add-term-group {
    width: 100%;
  }
  .glossary-add-term-main {
    flex: 1 1 auto;
  }
  .glossary-workspace-shell {
    --glossary-rail-collapsed-width: 4.55rem;
    --glossary-rail-flyout-width: min(18rem, calc(100vw - 5.85rem));
    min-height: 34rem;
  }
  .glossary-workspace-body {
    padding-left: calc(var(--glossary-rail-collapsed-width) + 0.4rem);
  }
  #glossary-subnav.glossary-subnav-rail-list {
    padding: 0.3rem 0.2rem;
  }
  .glossary-subnav-flyout {
    left: calc(var(--glossary-rail-collapsed-width) + 0.3rem);
    padding: 0.55rem;
  }
  .glossary-subnav-flyout-items {
    grid-template-columns: 1fr;
  }
  #glossary-subnav.glossary-subnav-strip {
    width: 100%;
  }
  #glossary-subnav.glossary-subnav-strip .glossary-subnav-section-buttons {
    flex-wrap: wrap;
  }
  .glossary-table-toolbar-group--search,
  .glossary-table-toolbar-group--content-types {
    flex-basis: 100%;
  }
}
/* Requirements tab: layered left rail. Category rail stays fixed; flyout overlays content. */
.requirements-workspace-shell {
  --requirements-rail-collapsed-width: 5rem;
  --requirements-rail-flyout-width: min(31rem, calc(100vw - 8rem));
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.requirements-workspace-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  padding-left: calc(var(--requirements-rail-collapsed-width) + 0.65rem);
}
.requirements-subnav-rail {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--requirements-rail-collapsed-width);
  overflow: visible;
}
#requirements-subnav.requirements-subnav-rail-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: var(--requirements-rail-collapsed-width);
  height: auto;
  min-height: 0;
  padding: 0.35rem 0.3rem;
  box-sizing: border-box;
  overflow: visible;
  border: 1px solid #d8e2ea;
  border-radius: 8px;
  background: #f8fbfd;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
#requirements-subnav.requirements-subnav-rail-list .requirements-subnav-category-btn {
  display: grid;
  grid-template-rows: 1.65rem auto;
  justify-items: center;
  align-items: center;
  gap: 0.12rem;
  width: 100%;
  min-height: 3.15rem;
  padding: 0.28rem 0.2rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #2f4a5f;
  cursor: pointer;
  font: inherit;
  line-height: 1.1;
  text-align: center;
}
#requirements-subnav.requirements-subnav-rail-list .requirements-subnav-category-btn:hover,
#requirements-subnav.requirements-subnav-rail-list .requirements-subnav-category-btn:focus-visible,
#requirements-subnav.requirements-subnav-rail-list .requirements-subnav-category-btn[data-open="true"] {
  border-color: #c9d9e7;
  background: #eef5fb;
  outline: none;
}
#requirements-subnav.requirements-subnav-rail-list .requirements-subnav-category-btn[data-active="true"] {
  border-color: #99c4e9;
  background: #dff0ff;
  color: #123b60;
  box-shadow: inset 3px 0 0 #1976d2;
}
#requirements-subnav.requirements-subnav-rail-list .requirements-subnav-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 6px;
  background: #e7eef5;
  color: #31516d;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
#requirements-subnav.requirements-subnav-rail-list .requirements-subnav-category-icon svg,
.requirements-subnav-flyout-items .requirements-subnav-btn-icon svg {
  display: block;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  color: inherit;
}
#requirements-subnav.requirements-subnav-rail-list .requirements-subnav-category-btn[data-active="true"] .requirements-subnav-category-icon {
  background: #1976d2;
  color: #ffffff;
}
#requirements-subnav.requirements-subnav-rail-list .requirements-subnav-category-label {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 0.62rem;
  font-weight: 750;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.requirements-subnav-flyout {
  position: absolute;
  top: 0.35rem;
  left: calc(var(--requirements-rail-collapsed-width) + 0.45rem);
  width: var(--requirements-rail-flyout-width);
  max-height: calc(100% - 0.7rem);
  padding: 0.7rem;
  box-sizing: border-box;
  overflow: auto;
  border: 1px solid #cbd9e6;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 35, 55, 0.2);
}
.requirements-subnav-flyout[hidden] {
  display: none;
}
.requirements-subnav-flyout-header {
  margin-bottom: 0.65rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #e3ebf2;
}
.requirements-subnav-flyout-title {
  margin: 0;
  color: #1e3a52;
  font-size: 0.98rem;
  line-height: 1.2;
}
.requirements-subnav-flyout-hint {
  margin: 0.22rem 0 0;
  color: #5b7286;
  font-size: 0.78rem;
  line-height: 1.35;
}
.requirements-subnav-flyout-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}
.requirements-subnav-flyout-items .requirements-subnav-btn,
.requirements-subnav-flyout-items button.requirements-list-subnav-btn {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 2.35rem;
  padding: 0.28rem 0.42rem;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #274057;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}
.requirements-subnav-flyout-items .requirements-subnav-btn:hover,
.requirements-subnav-flyout-items .requirements-subnav-btn:focus-visible {
  border-color: #d2dfeb;
  background: #eef5fb;
  outline: none;
}
.requirements-subnav-flyout-items .requirements-subnav-btn[data-active="true"] {
  border-color: #99c4e9;
  background: #dff0ff;
  color: #123b60;
  box-shadow: inset 3px 0 0 #1976d2;
}
.requirements-subnav-flyout-items .requirements-subnav-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 6px;
  background: #e7eef5;
  color: #31516d;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.requirements-subnav-flyout-items .requirements-subnav-btn[data-active="true"] .requirements-subnav-btn-icon {
  background: #1976d2;
  color: #ffffff;
}
.requirements-subnav-flyout-items .requirements-subnav-btn-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.requirements-subnav-compact-toggle-btn {
  margin-left: 0;
  padding: 0.32rem 0.58rem;
  border: 1px solid #ffd54f;
  border-radius: 999px;
  background: #fff8e1;
  color: #6d4c00;
  cursor: pointer;
}
.requirements-subnav-compact-toggle-btn:hover {
  background: #ffefb3;
}
.requirements-analysis-ai-chooser {
  display: flex;
  flex-direction: column;
  gap: 0.5rem 0.65rem;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
  margin: 0.15rem 0 0.6rem 0;
  padding: 0.48rem 0.55rem;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  background: #f7fbff;
  color: #243447;
}
.requirements-analysis-ai-chooser[hidden] {
  display: none;
}
.requirements-analysis-ai-chooser-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
  position: relative;
  z-index: 2;
}
.requirements-analysis-ai-chooser-intro {
  min-width: 0;
  padding: 0 0.15rem;
}
.requirements-analysis-ai-chooser-intro h4 {
  margin: 0;
  color: #17324d;
  font-size: 0.9rem;
}
.requirements-analysis-ai-chooser-intro p {
  margin: 0.12rem 0 0 0;
  color: #52606d;
  font-size: 0.78rem;
  line-height: 1.25;
  white-space: normal;
}
.requirements-analysis-ai-guide-toggle {
  flex: 0 0 auto;
  min-height: 2rem;
  padding: 0.34rem 0.62rem;
  border: 1px solid #c9d7e5;
  border-radius: 999px;
  background: #ffffff;
  color: #244865;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.requirements-analysis-ai-guide-toggle:hover {
  border-color: #8db5dd;
  background: #eef7ff;
}
.requirements-analysis-ai-guide-toggle:focus-visible,
.requirements-analysis-ai-choice:focus-visible,
.requirements-analysis-ai-guide-card:focus-visible {
  outline: 2px solid rgba(31, 79, 214, 0.55);
  outline-offset: 2px;
}
.requirements-analysis-ai-chooser-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.requirements-analysis-ai-choice,
.requirements-analysis-ai-guide-card {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  min-width: 0;
  padding: 0.45rem 0.58rem;
  border: 1px solid #d4e0ec;
  border-radius: 8px;
  background: #ffffff;
  color: #243447;
  text-align: left;
  cursor: pointer;
}
.requirements-analysis-ai-choice {
  flex: 1 1 10.5rem;
  min-height: 2.85rem;
}
.requirements-analysis-ai-guide-card {
  min-height: 5.5rem;
}
.requirements-analysis-ai-choice:hover,
.requirements-analysis-ai-guide-card:hover {
  border-color: #8db5dd;
  background: #f2f8ff;
}
.requirements-analysis-ai-choice[data-active="true"],
.requirements-analysis-ai-guide-card[data-active="true"] {
  border-color: #5c95c8;
  background: #eaf4ff;
  box-shadow: inset 0 0 0 1px #8db5dd;
}
.requirements-analysis-ai-choice strong,
.requirements-analysis-ai-guide-card strong {
  color: #17324d;
  font-size: 0.84rem;
}
.requirements-analysis-ai-choice span,
.requirements-analysis-ai-guide-card span {
  display: block;
  overflow-wrap: anywhere;
}
.requirements-analysis-ai-choice-cue {
  color: #285075;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
}
.requirements-analysis-ai-choice-use,
.requirements-analysis-ai-choice-output {
  color: #52606d;
  font-size: 0.78rem;
  line-height: 1.35;
}
.requirements-analysis-ai-guide-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  min-width: 0;
  padding-top: 0.5rem;
  border-top: 1px solid #dce7f2;
}
.requirements-analysis-ai-guide-panel[hidden] {
  display: none;
}
.requirements-view-header .requirements-view-title {
  flex: 0 0 auto;
}
.requirements-work-packet-indicator {
  flex: 0 1 auto;
  max-width: min(100%, 32rem);
  background: #f5f9ff;
  border: 1px solid #d2e3fc;
  border-radius: 999px;
}
.requirements-work-packet-indicator.is-empty {
  background: #f7f7f7;
  border-color: #dddddd;
}
.requirements-work-packet-indicator #requirements-current-work-packet-label {
  min-width: 0;
}
.requirements-work-packet-indicator .requirements-subnav-btn {
  border-radius: 999px;
}
@media (max-width: 1100px) {
  .requirements-analysis-ai-guide-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .requirements-workspace-shell {
    min-height: 36rem;
  }
}
@media (max-width: 700px) {
  .requirements-workspace-shell {
    --requirements-rail-collapsed-width: 4.55rem;
    --requirements-rail-flyout-width: min(18rem, calc(100vw - 5.85rem));
  }
  .requirements-workspace-body {
    padding-left: calc(var(--requirements-rail-collapsed-width) + 0.4rem);
  }
  #requirements-subnav.requirements-subnav-rail-list {
    padding: 0.3rem 0.2rem;
  }
  .requirements-subnav-flyout {
    left: calc(var(--requirements-rail-collapsed-width) + 0.3rem);
    padding: 0.55rem;
  }
  .requirements-subnav-flyout-items {
    grid-template-columns: 1fr;
  }
  .requirements-analysis-ai-chooser-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .requirements-analysis-ai-guide-toggle {
    width: 100%;
  }
  .requirements-analysis-ai-guide-panel {
    grid-template-columns: 1fr;
  }
  .requirements-analysis-ai-choice {
    flex-basis: calc(50% - 0.42rem);
    min-height: 0;
  }
}
@media (max-width: 480px) {
  .requirements-analysis-ai-choice {
    flex-basis: 100%;
  }
}
@media (max-width: 980px) {
  .requirements-work-packet-indicator {
    margin-left: 0 !important;
    max-width: 100%;
  }
}
/* Service tab: title and danger actions */
.service-view-header { margin-bottom: 1rem; font-size: 1.25rem; font-weight: bold; }
#service-view .toolbar { flex-wrap: wrap; gap: 0.5rem; }
.service-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.85rem 0;
}
.service-tab-btn {
  min-height: 2.2rem;
  padding: 0.38rem 0.85rem;
  border: 1px solid #c8d6e3;
  border-radius: 999px;
  background: #fff;
  color: #355066;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.service-tab-btn:hover,
.service-tab-btn:focus-visible {
  background: #f8fafc;
  border-color: #9eb8d3;
}
.service-tab-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.service-tab-btn--active {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #0f4c81;
}
.service-panels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.service-tab-panel[hidden] {
  display: none;
}
#service-llm-settings-card,
#service-local-ai-settings {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}
.service-local-ai-guide {
  display: grid;
  gap: 0.4rem;
  margin: 0.55rem 0;
  padding: 0.5rem;
  border: 1px solid #d7dde8;
  border-radius: 4px;
  background: #fff;
  color: #334155;
  font-size: 0.8rem;
  line-height: 1.45;
}
.service-local-ai-guide-title {
  font-weight: 700;
  color: #1e3a8a;
}
.service-local-ai-guide ul {
  margin: 0;
  padding-left: 1rem;
}
.service-local-ai-recommendations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 0.35rem;
}
.service-local-ai-recommendation {
  min-width: 0;
  padding: 0.35rem 0.4rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #f8fafc;
  overflow-wrap: anywhere;
}
.service-local-ai-guide-note {
  margin: 0;
  overflow-wrap: anywhere;
}
.service-local-ai-status-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.45;
}
.service-local-ai-status-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.35rem 0.45rem;
  border: 1px solid #d7dde8;
  border-radius: 4px;
  background: #fff;
}
.service-local-ai-status-lamp {
  flex: 0 0 auto;
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.3rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.2);
}
.service-local-ai-status-lamp--green {
  background: #22c55e;
}
.service-local-ai-status-lamp--yellow {
  background: #facc15;
}
.service-local-ai-status-lamp--gray {
  background: #94a3b8;
}
.service-local-ai-status-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.refinement-ai-mode-notice,
.refinement-local-ai-panel {
  border: 1px solid #d7dde8;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  padding: 0.65rem 0.75rem;
  margin: 0 0 0.9rem 0;
  font-size: 0.84rem;
  line-height: 1.45;
}
.refinement-ai-mode-notice strong,
.refinement-local-ai-panel-title {
  color: #1e3a8a;
  font-weight: 700;
}
.refinement-local-ai-panel p {
  margin: 0.25rem 0 0.55rem 0;
  color: #475569;
}
.refinement-local-ai-panel-muted {
  color: #64748b;
}
.refinement-local-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}
.refinement-local-ai-progress {
  margin: 0.35rem 0 0.55rem 0;
}
.refinement-local-ai-human-result,
.refinement-local-ai-json-result,
.refinement-local-ai-raw-result {
  margin: 0.35rem 0 0 0;
  max-height: 14rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.78rem;
  line-height: 1.4;
}
.refinement-local-ai-human-result {
  color: #1f2937;
}

/* Codex tab */
.codex-view-header { margin-bottom: 0.5rem; }
.codex-view-header h3 { margin: 0; font-size: 1.25rem; }
.codex-upload-section { border: 1px solid #ddd; }
.codex-upload-section input[type="file"] { max-width: 280px; }
.codex-meta-section label { font-weight: 500; }
.codex-result a { color: #1565c0; text-decoration: underline; }
.codex-result a:hover { color: #0d47a1; }

/* Glossary-aware highlight: known terms and candidates */
mark.hl-known {
  padding: 0 2px;
  border-radius: 4px;
  background: rgba(80, 140, 255, 0.18);
  box-shadow: inset 0 -1px 0 rgba(80, 140, 255, 0.55);
  cursor: pointer;
}
mark.hl-candidate {
  padding: 0 2px;
  border-radius: 4px;
  background: rgba(255, 140, 0, 0.22);
  box-shadow: inset 0 -1px 0 rgba(255, 140, 0, 0.75);
  cursor: pointer;
}
/* Soft candidate: single-word Title Case hint; distinct from hard candidate (no orange) */
mark.hl-soft-candidate {
  padding: 0 2px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.04);
  border-bottom: 1px dotted rgba(100, 100, 100, 0.6);
}
mark.hl-ambiguous {
  background: repeating-linear-gradient(
    -45deg,
    rgba(80, 140, 255, 0.2),
    rgba(80, 140, 255, 0.2) 4px,
    rgba(120, 170, 255, 0.25) 4px,
    rgba(120, 170, 255, 0.25) 8px
  );
  box-shadow: inset 0 -1px 0 rgba(80, 140, 255, 0.5);
}
/* Known term by concept type (Requirements-List tooltip + visual hint) */
mark.hl-known[data-content-type="Class"] {
  background: rgba(80, 140, 255, 0.2);
  box-shadow: inset 0 -1px 0 rgba(80, 140, 255, 0.55);
}
mark.hl-known[data-content-type="Attribute"] {
  background: rgba(76, 175, 80, 0.15);
  box-shadow: inset 0 -1px 0 rgba(76, 175, 80, 0.5);
}
mark.hl-known[data-content-type="Scenario"] {
  background: rgba(156, 39, 176, 0.12);
  box-shadow: inset 0 -1px 0 rgba(156, 39, 176, 0.45);
}
mark.hl-known[data-content-type="Role"],
mark.hl-known[data-content-type="Stage"],
mark.hl-known[data-content-type="Step"] {
  background: rgba(96, 125, 139, 0.15);
  box-shadow: inset 0 -1px 0 rgba(96, 125, 139, 0.45);
}
mark.hl-known[data-is-alias="true"] {
  border-bottom: 1px dotted rgba(80, 140, 255, 0.7);
  background: rgba(80, 140, 255, 0.1);
}
/* Banner when Glossary is filtered by terms from Requirements-List highlight click */
.glossary-highlight-filter-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  background: #e3f2fd;
  border: 1px solid #2196F3;
  border-radius: 4px;
}
.hl-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  font: inherit;
  padding: inherit;
  margin: 0;
  border: none;
  box-sizing: border-box;
  z-index: 0;
}
/* US Description overlay: ensure readable text (user sees overlay, not textarea); avoids gray-on-gray */
#req-description-hl-overlay {
  color: #222;
}
.hl-textarea-wrapper { position: relative; }
/* Single visible text layer for multiline fields: textarea text is transparent while the overlay shows highlighted text. */
.hl-textarea-wrapper textarea.form-control.hl-with-overlay,
.hl-textarea-wrapper textarea.ui-subview-textarea.hl-with-overlay,
.hl-textarea-wrapper textarea.alm-rlm-textarea.hl-with-overlay {
  position: relative;
  z-index: 1;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: #333;
}
.hl-textarea-wrapper textarea.form-control.hl-with-overlay::selection,
.hl-textarea-wrapper textarea.ui-subview-textarea.hl-with-overlay::selection,
.hl-textarea-wrapper textarea.alm-rlm-textarea.hl-with-overlay::selection {
  background: rgba(0, 123, 255, 0.25);
}
.hl-textarea-wrapper textarea.form-control.hl-with-overlay::-moz-selection,
.hl-textarea-wrapper textarea.ui-subview-textarea.hl-with-overlay::-moz-selection,
.hl-textarea-wrapper textarea.alm-rlm-textarea.hl-with-overlay::-moz-selection {
  background: rgba(0, 123, 255, 0.25);
}

/* Parser: single scroll in source area; wrapper and textarea constrained */
#requirements-parser-inner-panel .hl-textarea-wrapper {
  overflow: hidden;
  min-height: 0;
}
#requirements-parser-inner-panel #requirements-parser-text {
  max-height: 100%;
}

/* BR (Business Requirement) rows: subtle distinction from EPIC/HLR/US/ACC */
tr.requirement-type-br { background: #f3e5f5; }

table { width: 100%; border-collapse: collapse; max-width: 100%; table-layout: auto; }
/*
 * Sticky table headers: Chromium / Edge / Safari do not apply position:sticky reliably on th/td
 * when border-collapse is collapse (see HTML/CSS tables spec + browser bugs). Use separate +
 * border-spacing:0 so grid matches collapse layout closely. !important overrides inline
 * element.style.borderCollapse from app.js.
 */
table.data-model-table,
table.story-map-table,
table.bpmn-view-table,
table.component-binding-table,
table.data-table,
table.roles-table,
table.status-board,
table.requirements-list-table,
table.alm-table,
#gherkin-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
/* datamodel-view-content: overflow-x here breaks multi-row sticky thead in Chromium; horizontal scroll is on inner .alm-table-horizontal-scroll */
#gherkin-view-content, #scenario-view-content, #scenario-matrix-panel, #scenario-gherkin-panel, #scenario-model-panel { overflow-x: auto; max-width: 100%; }
#datamodel-view-content { overflow: visible; max-width: 100%; min-width: 0; }
#gherkin-table { table-layout: fixed; width: 100%; min-width: 1280px; }
#gherkin-table th:nth-child(1), #gherkin-table td:nth-child(1) { min-width: 100px; word-wrap: break-word; overflow-wrap: break-word; box-sizing: border-box; }
#gherkin-table th:nth-child(2), #gherkin-table td:nth-child(2) { min-width: 160px; word-wrap: break-word; overflow-wrap: break-word; box-sizing: border-box; }
#gherkin-table th:nth-child(3), #gherkin-table td:nth-child(3) { min-width: 160px; word-wrap: break-word; overflow-wrap: break-word; box-sizing: border-box; }
#gherkin-table th:nth-child(4), #gherkin-table td:nth-child(4) { min-width: 90px; word-wrap: break-word; overflow-wrap: break-word; box-sizing: border-box; }
#gherkin-table th:nth-child(5), #gherkin-table td:nth-child(5) { min-width: 90px; word-wrap: break-word; overflow-wrap: break-word; box-sizing: border-box; }
#gherkin-table th:nth-child(6), #gherkin-table td:nth-child(6), #gherkin-table th:nth-child(7), #gherkin-table td:nth-child(7) { max-width: 400px !important; width: 400px !important; min-width: 200px; word-wrap: break-word; overflow-wrap: break-word; overflow: hidden; box-sizing: border-box; }
#gherkin-table th:nth-child(8), #gherkin-table td:nth-child(8) { min-width: 100px; word-wrap: break-word; overflow-wrap: break-word; box-sizing: border-box; }
#gherkin-table th:nth-child(9), #gherkin-table td:nth-child(9) { min-width: 80px; word-wrap: break-word; overflow-wrap: break-word; box-sizing: border-box; }
#gherkin-table td:nth-child(6) pre, #gherkin-table td:nth-child(7) pre { white-space: pre-wrap; word-wrap: break-word; margin: 0; max-width: 100%; }
/* Inline-editable cells in the Scenario Gherkin table. */
.editable-cell { outline: none; }
.editable-cell:hover { background: #fafafa; }
.editable-cell:focus { background: #fffde7; }
th, td { border: 1px solid #ccc; padding: 8px; vertical-align: top; }
th { background: #eee; }
pre { margin: 0; font-family: monospace; }
.scenario-view-table { table-layout: fixed; width: 100%; }
.scenario-view-table--wide-scroll {
  width: max-content;
  min-width: 100%;
  max-width: none;
}
.scenario-view-table th { position: relative; }
.scenario-view-table th, .scenario-view-table td { word-wrap: break-word; overflow-wrap: break-word; }
/* Scenario matrix: plain-text columns before Gherkin (Description, BR, before/after state); Default view only (12 data cols + spacer) */
.scenario-view-table--default td:nth-child(2),
.scenario-view-table--default td:nth-child(3),
.scenario-view-table--default td:nth-child(4),
.scenario-view-table--default td:nth-child(5) {
  white-space: pre-line;
  word-break: break-word;
  vertical-align: top;
}
/* Scenario detail row: Action + Rules columns need room so controls stay inside cells */
.scenario-view-table--default th:nth-child(11),
.scenario-view-table--default td:nth-child(11),
.scenario-view-table--default th:nth-child(12),
.scenario-view-table--default td:nth-child(12) {
  min-width: 7.5rem;
  box-sizing: border-box;
  vertical-align: top;
}
/* Simple view: similar treatment for text-heavy columns (no Prev/Next columns) */
.scenario-view-table--simple td:nth-child(2),
.scenario-view-table--simple td:nth-child(3),
.scenario-view-table--simple td:nth-child(4) {
  white-space: pre-line;
  word-break: break-word;
  vertical-align: top;
}
.scenario-view-table--values .scenario-values-col-attribute {
  white-space: normal;
  vertical-align: top;
}
.scenario-view-table--values .scenario-values-col-gherkin,
.scenario-view-table--values .scenario-values-col-generated,
.scenario-view-table--values .scenario-values-col-summary-action {
  min-width: 10rem;
  box-sizing: border-box;
  vertical-align: top;
}
.scenario-view-table--values .scenario-values-col-prev-action,
.scenario-view-table--values .scenario-values-col-initial {
  vertical-align: top;
}
.scenario-view-table--values .filter-group-header td {
  background: #f5f5f5;
  font-weight: 700;
  color: #555;
}
.scenario-values-summary-cell {
  vertical-align: top;
}
.scenario-values-summary-cell pre {
  white-space: pre-wrap;
  margin: 0;
}
.scenario-view-table pre { white-space: pre-wrap; }
/* Scenario-Table: double-click inline edit affordance */
.scenario-view-table td.scenario-inline-editable {
  cursor: text;
}
.scenario-view-table td.scenario-inline-editable:hover {
  background: #f4f8ff;
}
.scenario-view-table--values td.scenario-values-previous-match {
  background: #d9f2dd;
  color: #1c5e26;
  font-weight: 700;
}
.scenario-view-table--values td.scenario-values-previous-mismatch {
  background: #f7d9d9;
  color: #8c1d1d;
  font-weight: 700;
}
.changed { background-color: #ffeb3b; font-weight: bold; }
/* Initial≠Action: global `table td` / `tbody tr:nth-child(even) td` (~4430) beat bare `.changed`; keep yellow on matrix/Data Model cells */
.data-model-table tbody td.changed {
  background-color: #ffeb3b;
  font-weight: 700;
}
/* Main WHEN trigger (first trigger by scenario sequence) - highlight Action value in red */
.main-trigger-action { color: #c00; font-weight: bold; }
/* Scenario-Table Attribute Values: same semantics as Gherkin generated column (pair in manual Gherkin or not) */
.attr-values-table td.scenario-attr-gherkin-match {
  color: green;
  font-style: normal;
}
.attr-values-table td.scenario-attr-gherkin-mismatch {
  color: #c00;
  font-style: normal;
}
.attr-values-table td.main-trigger-action.scenario-attr-gherkin-match {
  color: green;
}
.data-model-table { font-size: 0.85rem; }
.data-model-table th { position: sticky; top: 0; background: #eee; z-index: 10; }
.data-model-table td { text-align: center; }
.data-model-table .scenario-name { text-align: left; font-weight: bold; background: #f5f5f5; }
.data-model-table .scenario-name.clickable { cursor: pointer; }
.data-model-table .scenario-name.clickable:hover { background: #e0e0e0; text-decoration: underline; }
.data-model-table .group-header { text-align: center; font-weight: bold; background: #e8f5e9; font-size: 0.9rem; position: sticky; z-index: 10; }
/* Scenario Matrix: per-row sticky top set via JS (applyEnreScenarioMatrixStickyHeaderOffsets); fallback z-index */
#datamodel-view-content .data-model-table thead .group-header,
#scenario-matrix-panel .data-model-table thead .group-header { z-index: 14; }
#datamodel-view-content .data-model-table thead .attribute-name,
#scenario-matrix-panel .data-model-table thead .attribute-name { z-index: 12; }
#datamodel-view-content .data-model-table thead .attribute-code,
#scenario-matrix-panel .data-model-table thead .attribute-code { z-index: 10; }
/* Scenario Matrix: keep the scenario column visible while scrolling horizontally. */
#scenario-matrix-panel .alm-table-horizontal-scroll .data-model-table tbody td.scenario-name {
  position: sticky;
  left: 0;
  z-index: 7;
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.06);
}
#scenario-matrix-panel .alm-table-horizontal-scroll .data-model-table thead th.scenario-name {
  position: sticky;
  left: 0;
  z-index: 50 !important;
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.06);
}
.data-model-table .attribute-name { text-align: left; font-weight: bold; background: #e3f2fd; }
.data-model-table .attribute-code { text-align: center; font-weight: bold; background: #bbdefb; color: #1976d2; }
.data-model-table .gherkin-phrase-cell { text-align: left; }
.data-model-table .rule-description-cell { text-align: left; }
/* Glossary, Attributes, and other data-model tables: wrap action buttons when the row is narrow */
.data-model-table:not(.requirements-dm-class-table) td.action-buttons {
  flex-wrap: wrap;
  align-content: flex-start;
  box-sizing: border-box;
  vertical-align: top;
}
/* Glossary table: reinforce sticky header (scrollport is often .content) */
#glossary-subview-container.glossary-table table.data-model-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f5f5f5;
}
/* Rules workspace: refreshed header, dense table editing, and modernized modal shell */
.rules-workspace-header {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
  padding: 0.95rem 1.05rem 1rem;
  border: 1px solid #dbe4ec;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.rules-workspace-header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}
.rules-workspace-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.rules-workspace-title {
  margin: 0;
  color: #1f3145;
}
.rules-workspace-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.rules-summary-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.16rem 0.7rem;
  border: 1px solid #bdd7f5;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0f4c81;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.rules-summary-detail {
  color: #5f7185;
  font-size: 0.85rem;
  line-height: 1.4;
}
.rules-toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem 0.8rem;
  padding-top: 0.1rem;
  border-top: 1px solid rgba(203, 213, 225, 0.6);
}
.rules-toolbar-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid #dbe4ec;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}
.rules-toolbar-group--filter {
  flex: 1 1 15rem;
  align-items: flex-start;
  gap: 0.35rem;
  flex-direction: column;
}
.rules-toolbar-group--actions,
.rules-toolbar-group--exports {
  align-items: center;
}
.rules-toolbar-label {
  color: #5f7689;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.rules-toolbar-select {
  width: 100%;
  min-width: 12rem;
  padding: 0.48rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #223449;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.rules-toolbar-btn {
  white-space: nowrap;
  min-height: 2.25rem;
  padding: 0.48rem 0.85rem;
  border-radius: 10px;
}
.rules-toolbar-btn--primary {
  background: linear-gradient(180deg, #1d6ed8 0%, #1565c0 100%);
  border-color: transparent;
  color: #fff;
}
.rules-toolbar-btn--primary:hover {
  background: linear-gradient(180deg, #1b64c7 0%, #0f57ab 100%);
}
.rules-toolbar-btn--accent {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #0f4c81;
}
.rules-toolbar-btn--accent:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}
.rules-empty-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 1.2rem 1.15rem;
  border: 1px dashed #bfd4e7;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.rules-empty-view-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}
.rules-empty-view-copy {
  margin: 0;
  max-width: 44rem;
  color: #5f7185;
  line-height: 1.5;
}
.rules-empty-state-title {
  margin: 0;
  color: #1f3145;
  font-size: 1rem;
}
.rules-empty-state-copy {
  margin: 0;
  max-width: 44rem;
  color: #5f7185;
  line-height: 1.5;
}
.rules-empty-state-btn {
  white-space: nowrap;
}
.rule-id-cell {
  position: relative;
  min-width: 130px;
  vertical-align: middle;
}
.rule-id-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}
.rule-id-actions-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.rule-id-actions-trigger {
  flex: 0 0 auto;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid #ccd7e2;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  line-height: 1;
  font-size: 1rem;
}
.rule-id-actions-trigger:hover {
  background: #f5f8fc;
}
.rule-id-actions-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 30;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  padding: 0.25rem;
  background: #fff;
  border: 1px solid #ccd7e2;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}
.rule-id-actions-menu button {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
}
.rule-id-actions-menu button:hover {
  background: #f3f6fb;
}
.rule-id-actions-menu button.danger {
  color: #b71c1c;
}
.rules-resize-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #d7e3ef;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
}
.rules-table-wrap {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
}
.rules-table-wrap {
  border: 1px solid #dbe4ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}
.rules-table.rules-table--wide-layout {
  min-width: max(100%, 2400px);
}
.rules-table {
  border-collapse: separate;
  border-spacing: 0;
}
.rules-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5fb 100%);
  color: #274057;
  border-bottom: 1px solid #d7e3ef;
  font-size: 0.82rem;
  font-weight: 700;
}
.rules-table-header-cell {
  padding: 0.76rem 0.8rem;
  box-sizing: border-box;
}
.rules-table-cell {
  min-width: 0;
  padding: 0.68rem 0.8rem;
  border-bottom: 1px solid #e6edf4;
  border-right: 1px solid #edf2f7;
  word-break: break-word;
  vertical-align: top;
  box-sizing: border-box;
  line-height: 1.4;
}
.rules-table tbody td:last-child,
.rules-table thead th:last-child {
  border-right: none;
}
.rules-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.55);
}
.rules-table tbody tr:hover {
  background: #f8fbfe;
}
.rules-table tbody tr:hover .rules-table-cell--readonly {
  background: rgba(241, 245, 249, 0.9);
}
.rules-table-cell--readonly {
  color: #243042;
  background: rgba(248, 250, 252, 0.55);
}
.rules-table-cell--editable {
  background: #fff;
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
  outline: none;
}
.rules-table-cell--editable.is-editing {
  background: #fff9c4;
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.2);
}
.rules-table-cell--description {
  min-width: 200px;
}
.rules-table-cell--system {
  color: #334155;
}
.rules-table-cell--select {
  background: #fff;
}
.rules-table-select {
  width: 100%;
  min-width: 7.5rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #223449;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.rules-table-select:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}
.rules-table-empty-cell {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid #e6edf4;
  color: #64748b;
  text-align: center;
  background: #fbfdff;
}
.rules-table td.rule-id-cell {
  text-align: left;
  vertical-align: top;
}
.rule-id-actions {
  align-items: flex-start;
}
.rules-table .rule-mnemo-code-cell {
  min-width: 130px;
}
.rules-scenario-link {
  display: block;
  color: #1565c0;
  text-decoration: none;
}
.rules-scenario-link + .rules-scenario-link {
  margin-top: 0.25rem;
}
.rules-scenario-link:hover {
  text-decoration: underline;
}
.rule-modal-content {
  display: flex;
  flex-direction: column;
  width: min(780px, calc(100vw - 2rem));
  max-width: 780px;
  max-height: min(90vh, 960px);
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.rule-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem 0.8rem;
  border-bottom: 1px solid #e2e8f0;
}
.rule-modal-header-copy {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}
.rule-modal-header h2 {
  margin: 0;
  color: #1f3145;
  font-size: 1.3rem;
}
.rule-modal-subtitle {
  margin: 0;
  color: #64748b;
  line-height: 1.45;
}
.rule-modal-mode-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 1.8rem;
  padding: 0.14rem 0.62rem;
  border: 1px solid #d7e3ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #455a64;
  font-size: 0.78rem;
  font-weight: 700;
}
.rule-modal-close {
  float: none;
  line-height: 1;
  margin-top: -0.1rem;
}
.rule-modal-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.rule-modal-scroll {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}
.rule-modal-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.95rem 1rem;
  border: 1px solid #dbe4ec;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}
.rule-modal-section-title {
  margin: 0;
  color: #1f3145;
  font-size: 0.96rem;
}
.rule-modal-section-copy {
  margin: 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
}
.rule-modal-section-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 0.95rem;
}
.rule-modal-field {
  min-width: 0;
}
.rule-modal-field--mnemo,
#rule-modal-relatedSystems-wrapper {
  grid-column: 1 / -1;
}
.rule-modal-summary {
  min-height: 2.4rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d0d7e2;
  border-radius: 8px;
  background: #fff;
  color: #243042;
  line-height: 1.35;
  box-sizing: border-box;
}
.rule-modal-summary.is-placeholder {
  color: #6b788a;
}
.rule-modal-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.rule-modal-inline-actions button,
.rule-modal-action-btn,
#rule-modal-delete-btn {
  padding: 0.45rem 0.8rem;
  border: 1px solid #c9d3e3;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.rule-modal-inline-actions button:hover {
  background: #f5f8fc;
}
.rule-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0;
  padding: 0.9rem 1.25rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: #fbfdff;
}
.rule-modal-footer-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.rule-modal-footer-group--secondary {
  margin-left: auto;
}
#rule-modal-delete-btn {
  border-color: #d32f2f;
  color: #b71c1c;
  background: #fff5f5;
}
#rule-modal-delete-btn:hover {
  background: #fdeaea;
}
/* Rules table: keep reference scenario column readable */
#rules-view-content table.data-model-table td.rule-reference-scenario-cell {
  min-width: 140px;
  white-space: nowrap;
  box-sizing: border-box;
  vertical-align: middle;
}
@media (max-width: 860px) {
  .rules-workspace-header {
    padding: 0.8rem 0.85rem;
  }
  .rules-toolbar-group--filter {
    flex-basis: 100%;
  }
  .rules-toolbar-group--actions,
  .rules-toolbar-group--exports {
    width: 100%;
  }
  .rules-toolbar-select {
    width: 100%;
    min-width: 0;
  }
  .rule-modal-content {
    width: min(100vw - 1rem, 780px);
  }
  .rule-modal-section-body {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .rules-toolbar-group {
    width: 100%;
  }
  .rules-toolbar-btn {
    flex: 1 1 auto;
  }
  .rules-resize-toggle {
    justify-content: center;
  }
  .rule-modal-header,
  .rule-modal-scroll,
  .rule-modal-footer {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
  .rule-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .rule-modal-footer-group,
  .rule-modal-footer-group--secondary {
    width: 100%;
    margin-left: 0;
  }
  .rule-modal-footer-group > * {
    flex: 1 1 auto;
  }
}
.gherkin-view pre { background: #f5f5f5; padding: 1rem; border: 1px solid #ddd; margin-bottom: 1rem; border-radius: 4px; }
.scenario-links a { color: #1976d2; text-decoration: underline; cursor: pointer; }
.previous-scenarios-list { border: 1px solid #ccc; border-radius: 4px; padding: 0.5rem; max-height: 200px; overflow-y: auto; overflow-x: hidden; background: #fafafa; }
.previous-scenarios-list > * { margin-left: 0; padding-left: 0; }
.previous-scenarios-item { display: flex !important; align-items: center; flex-direction: row; margin-bottom: 0.25rem; padding: 0; margin-left: 0; width: 100%; box-sizing: border-box; }
.previous-scenarios-item input[type="checkbox"] { margin: 0 !important; margin-right: 8px !important; flex-shrink: 0; cursor: pointer; padding: 0; width: auto; }
.previous-scenarios-item span { line-height: 1.5; margin: 0 !important; padding: 0; flex: 0 1 auto; white-space: nowrap; }
.scenarios-model { position: relative; overflow: auto; padding: 1rem; min-height: 300px; }
.scenario-main-mode-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-bottom: 0.75rem; }
.scenario-main-mode-bar button { padding: 0.55rem 0.95rem; font-size: 0.9rem; font-weight: 600; cursor: pointer; border: 1px solid var(--alm-border); background: #fff; color: var(--alm-text-muted); border-radius: 10px; transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.scenario-main-mode-bar button.active { background: linear-gradient(180deg, #1462eb 0%, var(--alm-primary) 100%); color: #fff; border-color: transparent; box-shadow: 0 6px 14px rgba(0, 83, 219, 0.2); }
.scenario-main-mode-bar button:not(.active):hover { background: var(--alm-surface-2); border-color: var(--alm-border-strong); }
.scenario-model-columns { display: flex; gap: 2rem; align-items: flex-start; position: relative; }
.scenario-model-column { display: flex; flex-direction: column; gap: 1rem; }
.scenario-model-node { border: 1px solid #ccc; border-radius: 4px; padding: 0.5rem 0.75rem; background: #fff; min-width: 160px; }
.scenario-model-node.rule-node { margin-top: 0.25rem; background: #f5f5f5; }
.scenario-model-node.highlighted { background: #e3f2fd; border-color: #2196F3; transition: background 0.15s ease, border-color 0.15s ease; }
.scenario-model-node.rule-node.highlighted { background: #c8e6c9; border-color: #4CAF50; transition: background 0.15s ease, border-color 0.15s ease; }
.scenario-model-lines { position: absolute; top: 0; left: 0; pointer-events: none; }
.scenario-model-lines .scenario-line.highlighted { stroke: #2196F3; stroke-width: 3; transition: stroke 0.15s ease, stroke-width 0.15s ease; }
.scenario-model-lines .rule-line.highlighted { stroke: #2E7D32; stroke-width: 3; transition: stroke 0.15s ease, stroke-width 0.15s ease; }
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; background-color: rgba(0,0,0,0.4); }
/* Nested modals (References UI, Related Roles, etc.) must appear above parent modal (Edit Attribute, Edit Requirement, Glossary) */
.modal.choose-fields-modal { z-index: 1100; }
#create-relation-modal, #edit-relation-modal, #glossary-graph-modal { z-index: 11100; }
.glossary-graph-modal-content {
  max-width: 1120px;
}
.glossary-graph-modal-body {
  margin: 0.75rem 0 1rem 0;
}
.gloss-related-objects-empty {
  color: #64748b;
  font-size: 0.9rem;
}
.gloss-related-objects-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}
.gloss-related-objects-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
}
.gloss-related-objects-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.gloss-related-objects-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.gloss-related-objects-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.gloss-related-objects-target {
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}
.gloss-related-objects-note {
  color: #64748b;
  font-size: 0.85rem;
  word-break: break-word;
}
.glossary-relation-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.glossary-relation-chip--direction {
  background: #eef2ff;
  color: #3730a3;
}
.glossary-relation-chip--type {
  background: #dbeafe;
  color: #1d4ed8;
}
.glossary-relation-chip--data-model {
  background: #e5e7eb;
  color: #374151;
}
.glossary-relation-dir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  color: #475569;
  font-size: 0.95rem;
  font-weight: 700;
}
.glossary-graph-workspace {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 0;
}
.glossary-ontology-shell {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}
.glossary-ontology-shell--graph {
  flex: 1;
  overflow: hidden;
}
.glossary-ontology-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.glossary-ontology-view-mode-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.glossary-ontology-toolbar-hint {
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.45;
}
.glossary-ontology-body {
  min-height: 0;
}
.glossary-ontology-body--graph {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.glossary-graph-workspace--compact {
  gap: 0.75rem;
}
.glossary-graph-workspace--fill-height {
  flex: 1;
  min-height: 0;
}
.glossary-graph-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.glossary-graph-workspace--fill-height .glossary-graph-controls {
  align-items: flex-start;
}
.glossary-graph-controls-primary {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) minmax(16rem, 1fr) 7.5rem;
  align-items: end;
  gap: 0.75rem;
}
.glossary-graph-controls-primary--fill-height {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: flex-start;
  width: 100%;
}
.glossary-graph-controls-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.glossary-graph-controls-secondary--left {
  justify-content: flex-start;
  gap: 0.55rem;
}
.glossary-graph-control {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  width: 100%;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}
.glossary-graph-control--center {
  min-width: 12rem;
  max-width: 18rem;
}
.glossary-graph-control--wide {
  min-width: 16rem;
}
.glossary-graph-controls-primary--fill-height .glossary-graph-control--wide {
  flex: 1 1 auto;
  min-width: 16rem;
}
.glossary-graph-control--small {
  min-width: 7.5rem;
  max-width: 7.5rem;
}
.glossary-graph-term-search,
.glossary-graph-term-search-list {
  width: 100%;
}
.glossary-graph-viewport-tools {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-left: auto;
}
.glossary-graph-viewport-tools--flush-left {
  margin-left: 0;
  justify-content: flex-start;
}
.glossary-graph-controls-primary--fill-height .glossary-graph-viewport-tools {
  flex-wrap: nowrap;
}
.glossary-graph-viewport-btn {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}
.glossary-graph-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0 0.2rem 0;
  font-size: 0.88rem;
  color: #334155;
}
.glossary-graph-main {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(18rem, 1fr);
  gap: 0.95rem;
  align-items: stretch;
  min-height: 0;
}
.glossary-graph-main--compact {
  grid-template-columns: minmax(0, 1.55fr) minmax(17rem, 1fr);
}
.glossary-graph-workspace--fill-height .glossary-graph-main {
  flex: 1;
  min-height: 0;
}
@media (max-width: 1100px) {
  .glossary-graph-controls-primary {
    grid-template-columns: minmax(12rem, 18rem) minmax(16rem, 1fr);
  }
  .glossary-graph-control--small {
    max-width: none;
  }
}
.glossary-graph-canvas-shell {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
}
.glossary-graph-workspace--fill-height .glossary-graph-canvas-shell {
  flex: 1;
}
.glossary-graph-summary {
  padding: 0.7rem 0.85rem;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  background: linear-gradient(180deg, #f9fbff 0%, #f2f6fb 100%);
  color: #334155;
  font-size: 0.87rem;
  line-height: 1.5;
}
.glossary-graph-summary strong {
  color: #0f172a;
  margin-right: 0.2rem;
}
.glossary-graph-canvas {
  min-height: 420px;
  border: 1px solid #d9e2ea;
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.09), transparent 36%),
    linear-gradient(180deg, #fcfdff 0%, #f7fafc 100%);
  overflow: hidden;
  position: relative;
}
.glossary-graph-workspace--fill-height .glossary-graph-canvas {
  flex: 1;
  min-height: 18rem;
}
.glossary-graph-workspace--compact .glossary-graph-canvas {
  min-height: 320px;
}
.glossary-graph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  color: #475569;
  font-size: 0.84rem;
}
.glossary-graph-legend-line {
  display: inline-block;
  width: 1.5rem;
  height: 0;
  margin-right: 0.35rem;
  border-top: 3px solid #1565c0;
  vertical-align: middle;
}
.glossary-graph-legend-line--data-model {
  border-top-color: #8b95a7;
  border-top-style: dashed;
}
.glossary-graph-inspector {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 0;
  padding: 0.95rem;
  border: 1px solid #d9e2ea;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.glossary-graph-inspector--compact {
  gap: 0.55rem;
  padding: 0.82rem;
}
.glossary-graph-inspector-title {
  margin: 0;
  font-size: 1.1rem;
  color: #0f172a;
}
.glossary-graph-inspector-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.glossary-graph-inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.glossary-graph-inspector-actions--compact {
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0.35rem;
}
.glossary-graph-inspector-actions--compact .toolbar-btn {
  white-space: nowrap;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
}
.glossary-graph-inspector-tabs {
  display: flex;
  gap: 0.35rem;
}
.glossary-graph-inspector-tabs--compact {
  justify-content: flex-start;
  gap: 0.3rem;
}
.glossary-graph-inspector-tab {
  border: 1px solid #d9e2ea;
  background: #f8fafc;
  color: #475569;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.glossary-graph-inspector-tabs--compact .glossary-graph-inspector-tab {
  padding: 0.3rem 0.72rem;
  font-size: 0.8rem;
}
.glossary-graph-inspector-tab.is-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}
.glossary-graph-inspector-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
  overflow: auto;
}
.glossary-graph-inspector-body--compact {
  gap: 0.65rem;
}
.glossary-graph-inspector-section {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.glossary-graph-inspector-body--compact .glossary-graph-inspector-section {
  gap: 0.35rem;
}
.glossary-graph-inspector-section h4 {
  margin: 0;
  font-size: 0.9rem;
  color: #334155;
}
.glossary-graph-inspector-copy {
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.glossary-graph-inspector-empty {
  color: #64748b;
  font-size: 0.9rem;
}
.glossary-graph-relation-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.glossary-graph-inspector-body--compact .glossary-graph-relation-list {
  gap: 0.35rem;
}
.glossary-graph-relation-row {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  color: #0f172a;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.glossary-graph-inspector-body--compact .glossary-graph-relation-row {
  padding: 0.58rem 0.7rem;
}
.glossary-graph-relation-row:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.08);
}
.glossary-graph-relation-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.glossary-graph-relation-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.glossary-graph-relation-target {
  font-size: 0.95rem;
  font-weight: 700;
  word-break: break-word;
}
.glossary-graph-relation-note {
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.4;
}
.glossary-graph-alias-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.glossary-graph-alias {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
}
.glossary-graph-empty {
  padding: 1rem 1.1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
}
.glossary-graph-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.glossary-graph-bg-hit {
  cursor: grab;
}
.glossary-graph-edge {
  fill: none;
  stroke-linecap: round;
  transition: opacity 0.15s ease, stroke-width 0.15s ease;
}
.glossary-graph-edge--ontology {
  stroke: #1565c0;
  stroke-width: 2px;
}
.glossary-graph-edge--dataModel {
  stroke: #8b95a7;
  stroke-width: 1.7px;
  stroke-dasharray: 5 4;
}
.glossary-graph-edge--context {
  stroke: #2563eb;
  stroke-width: 1.8px;
}
.glossary-graph-edge--visual-impact-high,
.glossary-graph-edge--visual-coherence-low {
  stroke: #dc2626;
}
.glossary-graph-edge--visual-impact-medium,
.glossary-graph-edge--visual-coherence-medium {
  stroke: #f59e0b;
}
.glossary-graph-edge--visual-impact-low {
  stroke: #eab308;
}
.glossary-graph-edge--visual-impact-none,
.glossary-graph-edge--visual-coherence-unknown {
  stroke: #94a3b8;
}
.glossary-graph-edge--visual-coherence-high {
  stroke: #16a34a;
}
.glossary-graph-edge--visual-why-origin {
  stroke: #64748b;
}
.glossary-graph-edge--visual-why-refines {
  stroke: #2563eb;
}
.glossary-graph-edge--visual-why-implements,
.glossary-graph-edge--visual-why-realizes,
.glossary-graph-edge--visual-why-derived_from {
  stroke: #7c3aed;
}
.glossary-graph-edge--dashed {
  stroke-dasharray: 6 4;
}
.glossary-graph-edge.is-connected {
  opacity: 1;
}
.glossary-graph-edge.dimmed {
  opacity: 0.18;
}
.glossary-graph-node {
  cursor: pointer;
  transition: opacity 0.15s ease;
  user-select: none;
}
.glossary-graph-node.dimmed {
  opacity: 0.32;
}
.glossary-graph-node-circle {
  fill: #60a5fa;
  stroke: #fff;
  stroke-width: 2.4px;
}
.glossary-graph-node--center .glossary-graph-node-circle {
  fill: #2563eb;
}
.glossary-graph-node--class .glossary-graph-node-circle {
  fill: #3b82f6;
}
.glossary-graph-node--attribute .glossary-graph-node-circle {
  fill: #f59e0b;
}
.glossary-graph-node--context-requirement .glossary-graph-node-circle {
  fill: #2563eb;
}
.glossary-graph-node--context-glossary .glossary-graph-node-circle {
  fill: #10b981;
}
.glossary-graph-node--context-process .glossary-graph-node-circle,
.glossary-graph-node--context-function .glossary-graph-node-circle {
  fill: #7c3aed;
}
.glossary-graph-node--context-journeyStep .glossary-graph-node-circle {
  fill: #db2777;
}
.glossary-graph-node--context-ui .glossary-graph-node-circle {
  fill: #0891b2;
}
.glossary-graph-node--context-source .glossary-graph-node-circle {
  fill: #64748b;
}
.glossary-graph-node--visual-impact-high .glossary-graph-node-circle,
.glossary-graph-node--visual-coherence-low .glossary-graph-node-circle {
  fill: #dc2626;
}
.glossary-graph-node--visual-impact-medium .glossary-graph-node-circle,
.glossary-graph-node--visual-coherence-medium .glossary-graph-node-circle {
  fill: #f59e0b;
}
.glossary-graph-node--visual-impact-low .glossary-graph-node-circle {
  fill: #eab308;
}
.glossary-graph-node--visual-impact-none .glossary-graph-node-circle,
.glossary-graph-node--visual-coherence-unknown .glossary-graph-node-circle {
  fill: #94a3b8;
}
.glossary-graph-node--visual-coherence-high .glossary-graph-node-circle {
  fill: #16a34a;
}
.glossary-graph-node--layer-source .glossary-graph-node-circle {
  fill: #64748b;
}
.glossary-graph-node--layer-draft .glossary-graph-node-circle {
  fill: #f59e0b;
}
.glossary-graph-node--layer-requirement .glossary-graph-node-circle {
  fill: #2563eb;
}
.glossary-graph-node--layer-outcome .glossary-graph-node-circle {
  fill: #7c3aed;
}
.glossary-graph-node--selected .glossary-graph-node-circle {
  stroke: #0f172a;
  stroke-width: 3px;
}
.glossary-graph-node-warning-badge {
  fill: #fff;
  stroke: #0f172a;
  stroke-width: 0.45px;
  font-size: 10px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
}
.glossary-graph-node-label-main {
  fill: #0f172a;
  font-size: 11px;
  font-weight: 700;
}
.glossary-graph-node-label-sub {
  fill: #64748b;
  font-size: 9.5px;
  font-weight: 600;
}
.context-graph-tab {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: min(64vh, 620px);
}
.context-graph-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.8rem;
  padding: 0.35rem 0;
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.context-graph-lens {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}
.context-graph-lens-btn {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.32rem 0.48rem;
}
.context-graph-lens-btn.active {
  background: #0f172a;
  color: #fff;
}
.context-graph-lens-brief {
  color: #475569;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.35;
  margin-top: -0.25rem;
  max-width: 72rem;
}
.context-graph-scope {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
}
.context-graph-scope-select {
  min-width: 7.5rem;
  padding: 0.28rem 0.45rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
}
.context-graph-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: center;
}
.context-graph-expand-btn {
  margin-left: auto;
  white-space: nowrap;
}
.context-graph-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: #334155;
}
.context-graph-warning {
  padding: 0.45rem 0.6rem;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.84rem;
}
.context-graph-signal {
  padding: 0.45rem 0.6rem;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  background: #f0fdf4;
  color: #166534;
  font-size: 0.84rem;
  font-weight: 800;
}
.context-graph-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
  gap: 0.8rem;
  min-height: 440px;
}
.context-graph-canvas {
  min-height: 440px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}
.context-graph-tab--expanded {
  min-height: min(82vh, 860px);
}
.context-graph-tab--expanded .context-graph-body {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  min-height: min(72vh, 760px);
}
.context-graph-tab--expanded .context-graph-canvas {
  min-height: min(72vh, 760px);
}
.context-graph-inspector {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: 0.8rem;
  background: #fff;
  min-width: 0;
}
.context-graph-inspector-title {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
  word-break: break-word;
}
.context-graph-inspector-type {
  margin-top: 0.25rem;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}
.context-graph-inspector-fact {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e2e8f0;
}
.context-graph-inspector-fact-label {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.context-graph-inspector-fact-value {
  display: block;
  margin-top: 0.18rem;
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}
.context-graph-inspector-list-block {
  margin-top: 0.7rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e2e8f0;
}
.context-graph-inspector-list-title {
  color: #334155;
  font-size: 0.78rem;
  font-weight: 900;
}
.context-graph-inspector-list {
  margin: 0.35rem 0 0 1rem;
  padding: 0;
  color: #334155;
  font-size: 0.8rem;
  line-height: 1.35;
}
.context-graph-inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}
.context-graph-empty {
  margin: 1rem;
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  font-size: 0.9rem;
}
@media (max-width: 760px) {
  .context-graph-toolbar {
    align-items: stretch;
  }
  .context-graph-expand-btn {
    margin-left: 0;
    width: 100%;
  }
  .context-graph-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .context-graph-canvas {
    min-height: 360px;
  }
  .context-graph-tab--expanded {
    min-height: 72vh;
  }
  .context-graph-tab--expanded .context-graph-body,
  .context-graph-tab--expanded .context-graph-canvas {
    min-height: 52vh;
  }
}
.bpmn-context-details-shell {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}
.bpmn-context-details-tab-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.35rem;
}
.bpmn-context-details-tab-btn {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 6px 6px 0 0;
  background: #f8fafc;
  color: #334155;
  padding: 0.35rem 0.65rem;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}
.bpmn-context-details-tab-btn.active {
  background: #fff;
  color: #0f172a;
  border-bottom-color: #fff;
}
.bpmn-context-details-panel {
  min-width: 0;
}
.bpmn-context-details-panel .context-graph-tab {
  min-height: 420px;
}
.bpmn-context-details-panel .context-graph-body {
  grid-template-columns: minmax(0, 1fr);
  min-height: 360px;
}
.bpmn-context-details-panel .context-graph-canvas {
  min-height: 360px;
}
.bpmn-context-details-panel .context-graph-inspector {
  min-height: 0;
}
.relation-to-term-option--empty {
  color: #64748b;
  cursor: default;
}
/* Glossary delete confirmation: list references above nested glossary/requirement modals */
.modal.glossary-delete-ref-modal { z-index: 11000; overflow: hidden; }
.glossary-delete-ref-modal-content { box-sizing: border-box; }
.glossary-delete-ref-section-title {
  font-size: 0.95rem;
  margin: 0.75rem 0 0.35rem 0;
  color: #333;
}
.glossary-delete-ref-section-title:first-child { margin-top: 0; }
.glossary-delete-ref-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.88rem;
}
.glossary-delete-ref-row span { flex: 1 1 auto; min-width: 0; }
.glossary-delete-ref-open-btn { flex-shrink: 0; }
.glossary-delete-ref-static {
  font-size: 0.85rem;
  color: #444;
  padding: 0.25rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.modal-content { background-color: #fefefe; margin: 5% auto; padding: 20px; border: 1px solid #888; width: 90%; max-width: 900px; max-height: 90vh; overflow-y: auto; border-radius: 8px; }
/* Requirement Edit modal: flex shell — scroll middle only; keep actions visible */
#requirement-modal .modal-content.req-modal-content {
  display: flex;
  flex-direction: column;
  width: min(92vw, 1480px);
  max-width: min(92vw, 1480px);
  max-height: min(90vh, 920px);
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}
#requirement-modal .modal-content.req-modal-content.req-modal-expanded,
#requirement-modal .modal-content.req-modal-content.context-graph-modal-expanded {
  width: calc(100vw - 2rem);
  max-width: calc(100vw - 2rem);
  height: calc(100vh - 2rem);
  height: calc(100dvh - 2rem);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: 1rem auto;
}
#requirement-modal .req-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 1rem 1.25rem 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}
#requirement-modal .req-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  flex: 1;
  min-width: 0;
}
#requirement-modal .req-modal-header .req-modal-subtitle {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
#requirement-modal .req-modal-header .req-modal-subtitle .req-modal-subtitle-id {
  font-weight: 600;
  color: #333;
}
#requirement-modal .req-modal-header .close {
  float: none;
  flex-shrink: 0;
  line-height: 1;
  margin-top: -0.15rem;
}
#requirement-modal .req-modal-window-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  color: #263238;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
#requirement-modal .req-modal-window-expand-btn:hover,
#requirement-modal .req-modal-window-expand-btn:focus-visible {
  border-color: #90caf9;
  background: #eef7ff;
  outline: none;
}
#requirement-modal .req-modal-content > #requirement-error-summary,
#requirement-modal .req-modal-content > #req-inline-ref-orphan-warning,
#requirement-modal .req-modal-content > #requirement-modal-issues {
  margin-left: 1.25rem;
  margin-right: 1.25rem;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}
#requirement-modal .req-modal-content > #requirement-error-summary {
  margin-top: 0.5rem;
}
#requirement-modal #requirement-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0 1rem 1rem;
}
#requirement-modal .req-modal-editor-shell {
  display: grid;
  grid-template-columns: minmax(12rem, 0.18fr) minmax(0, 1fr) minmax(16rem, 0.28fr);
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
}
#requirement-modal .req-modal-content-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
#requirement-modal .req-modal-tab-bar {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid #e0e6eb;
  background: #f8fafb;
  padding: 0.55rem 0.55rem;
  scrollbar-width: thin;
}
#requirement-modal .req-modal-mode-group {
  display: flex;
  flex-direction: column;
  gap: 0.26rem;
  border: 1px solid #dce4ea;
  border-radius: 8px;
  background: #fff;
  padding: 0.42rem;
}
#requirement-modal .req-modal-mode-group-active {
  border-color: #90b7d8;
  box-shadow: inset 3px 0 0 #2f6f9f;
}
#requirement-modal .req-modal-mode-label {
  color: #1f3444;
  font-size: 0.82rem;
  font-weight: 800;
}
#requirement-modal .req-modal-mode-helper {
  display: none;
  color: #60727e;
  font-size: 0.76rem;
  line-height: 1.35;
}
#requirement-modal .req-modal-mode-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}
#requirement-modal .req-modal-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--alm-border, #e0e0e0);
  background: #f8fafb;
}
#requirement-modal .req-modal-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.48rem;
  border-radius: 8px;
  border: 1px solid #d7e2ec;
  background: #fff;
  color: #264057;
  font-size: 0.78rem;
}
#requirement-modal .req-modal-summary-chip-label {
  font-weight: 700;
  color: #546e7a;
}
#requirement-modal .req-modal-summary-chip-value {
  font-weight: 600;
}
#requirement-modal #req-modal-summary-identity {
  flex: 1 1 22rem;
  flex-wrap: wrap;
  align-items: flex-start;
  border-radius: 8px;
}
#requirement-modal #req-modal-summary-identity .req-modal-summary-chip-label {
  flex: 0 0 auto;
}
#requirement-modal #req-modal-summary-identity .req-modal-summary-chip-value {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
#requirement-modal #req-modal-summary-save-state[data-state="unsaved"] {
  border-color: #ffcc80;
  background: #fff8ec;
}
#requirement-modal #req-modal-summary-save-state[data-state="saved-with-issues"] {
  border-color: #ef9a9a;
  background: #fff4f4;
}
#requirement-modal #req-modal-summary-save-state[data-state="saved"] {
  border-color: #a5d6a7;
  background: #f1fbf2;
}
#requirement-modal #req-modal-summary-type[data-type="US"] {
  background: #eef8f6;
  border-color: #8fd0c0;
}
#requirement-modal #req-modal-summary-type[data-type="ACC"] {
  background: #fff5ec;
  border-color: #ffcc80;
}
#requirement-modal #req-modal-summary-type[data-type="HLR"] {
  background: #eef5ff;
  border-color: #90caf9;
}
#requirement-modal #req-modal-summary-type[data-type="BR"] {
  background: #f3efff;
  border-color: #b39ddb;
}
#requirement-modal #req-modal-summary-type[data-type="EPIC"] {
  background: #eef1ff;
  border-color: #9fa8da;
}
#requirement-modal .req-modal-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  gap: 0.5rem;
  padding: 0.32rem 0.45rem;
  font-size: 0.8rem;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f4f6f8;
  color: #333;
  white-space: normal;
  text-align: left;
}
#requirement-modal .req-modal-tab-btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}
#requirement-modal .req-modal-tab-btn-label {
  font-weight: 600;
}
#requirement-modal .req-modal-tab-btn-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}
#requirement-modal .req-modal-tab-badge,
#requirement-modal .req-modal-tab-issue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.15rem;
  padding: 0.05rem 0.38rem;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
}
#requirement-modal .req-modal-tab-badge[hidden],
#requirement-modal .req-modal-tab-issue-badge[hidden] {
  display: none !important;
}
#requirement-modal .req-modal-tab-badge {
  background: #fff;
  border: 1px solid #d5dde5;
  color: #355061;
}
#requirement-modal .req-modal-tab-issue-badge {
  background: #fff1f1;
  border: 1px solid #ef9a9a;
  color: #b71c1c;
}
#requirement-modal .req-modal-tab-btn.req-modal-tab-active {
  background: #fff;
  border-color: #8db6d3;
  font-weight: 600;
}
#requirement-modal .req-modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 0.75rem;
}
#requirement-modal .req-modal-readiness-panel {
  align-self: stretch;
  min-width: 0;
  overflow-y: auto;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #fbfdff;
  padding: 0.75rem;
  color: #263238;
}
#requirement-modal .req-modal-readiness-heading {
  font-size: 0.82rem;
  font-weight: 800;
  color: #23405a;
  margin-bottom: 0.35rem;
}
#requirement-modal .req-modal-readiness-status {
  border-radius: 8px;
  border: 1px solid #cdd9e2;
  background: #fff;
  padding: 0.45rem 0.55rem;
  font-weight: 800;
  color: #1f3444;
}
#requirement-modal .req-modal-readiness-panel[data-readiness-state="blocked"] .req-modal-readiness-status {
  border-color: #ef9a9a;
  background: #fff5f5;
  color: #9f1d1d;
}
#requirement-modal .req-modal-readiness-panel[data-readiness-state="ready"] .req-modal-readiness-status {
  border-color: #ffcc80;
  background: #fff8ec;
  color: #7a4a00;
}
#requirement-modal .req-modal-readiness-panel[data-readiness-state="saved"] .req-modal-readiness-status {
  border-color: #a5d6a7;
  background: #f1fbf2;
  color: #1b5e20;
}
#requirement-modal .req-modal-readiness-next,
#requirement-modal .req-modal-readiness-empty,
#requirement-modal .req-modal-readiness-after-save {
  color: #60727e;
  font-size: 0.8rem;
  line-height: 1.4;
}
#requirement-modal .req-modal-readiness-next {
  margin-top: 0.45rem;
}
#requirement-modal .req-modal-readiness-section {
  margin-top: 0.75rem;
}
#requirement-modal .req-modal-readiness-section-title {
  color: #23405a;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}
#requirement-modal .req-modal-readiness-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
#requirement-modal .req-modal-readiness-action {
  width: 100%;
  border: 1px solid #e1d0c5;
  border-radius: 6px;
  background: #fffaf7;
  color: #5c3726;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 0.42rem 0.5rem;
  text-align: left;
}
#requirement-modal .req-modal-readiness-action:hover,
#requirement-modal .req-modal-readiness-action:focus-visible {
  border-color: #bf7a4c;
  outline: none;
  background: #fff5ec;
}
#requirement-modal .req-modal-readiness-after-save {
  margin-top: 0.8rem;
  padding-top: 0.65rem;
  border-top: 1px solid #e0e6eb;
}
#requirement-modal .req-modal-improve-guidance {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
#requirement-modal .req-modal-section-heading {
  padding: 0.55rem 0.75rem 0.6rem;
  border: 1px solid #dbe6ee;
  border-radius: 8px;
  background: linear-gradient(180deg, #fcfdff 0%, #f6f9fb 100%);
  margin-top: 0.1rem;
}
#requirement-modal .req-modal-section-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #23405a;
  letter-spacing: 0.01em;
}
#requirement-modal .req-modal-section-hint {
  font-size: 0.78rem;
  color: #60727e;
  margin-top: 0.15rem;
  line-height: 1.4;
}
#requirement-modal .req-main-trace-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  margin-bottom: 0.7rem;
  border-radius: 999px;
  border: 1px solid #c9dcec;
  background: #f7fbff;
  color: #23405a;
  font-size: 0.82rem;
  font-weight: 600;
}
#requirement-modal .req-list-status-summary {
  margin-bottom: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d7e2ec;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6faff 100%);
}
#requirement-modal .req-list-status-summary-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #23405a;
}
#requirement-modal .req-list-status-summary-copy {
  margin-top: 0.18rem;
  font-size: 0.78rem;
  color: #60727e;
  line-height: 1.35;
}
#requirement-modal .req-list-status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.55rem;
}
#requirement-modal .req-list-status-badges .alm-context-review-badges {
  margin-left: 0;
}
#requirement-modal .req-modal-list-status-action {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font: inherit;
}
#requirement-modal .req-modal-list-status-action,
#requirement-modal .req-list-status-badges .almanac-process-review-pill[role="button"] {
  border-width: 1px;
  border-style: solid;
}
#requirement-modal .req-list-status-badges .almanac-process-review-pill[role="button"] {
  margin-left: 0;
}
#requirement-modal .req-modal-secondary-field > label {
  color: #60727e;
}
#requirement-modal .req-modal-generated-preview-field textarea,
#requirement-modal .req-modal-generated-preview-field input {
  background: #f2f7fa !important;
  border-color: #c7d7e2;
  color: #23405a;
}
#requirement-modal .req-modal-main-form-grid textarea.form-control {
  overflow-y: hidden;
  resize: vertical;
}
#requirement-modal .req-lifecycle-wrap {
  padding: 0.6rem 0.75rem;
  border: 1px solid #d7e2ec;
  border-radius: 6px;
  background: #fbfdff;
}
#requirement-modal .req-lifecycle-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.45rem;
  font-size: 0.84rem;
  line-height: 1.4;
}
#requirement-modal .req-lifecycle-row {
  color: #34495e;
}
#requirement-modal .req-lifecycle-status {
  font-weight: 700;
  color: #23405a;
}
#requirement-modal .req-lifecycle-at,
#requirement-modal .req-lifecycle-comment,
#requirement-modal .req-lifecycle-empty {
  color: #60727e;
}
/* Requirement modal Main tab: syncRequirementModalShellLayout sets CSS order on .form-group rows (HLR/BR/EPIC/US/ACC shells; grid honours order). */
#requirement-modal.req-modal-compact-shell .req-modal-main-form-grid.form-grid {
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
}
#requirement-modal.req-modal-compact-shell .req-modal-main-form-grid textarea {
  min-height: 3.25rem;
}
#requirement-modal.req-modal-compact-shell .req-modal-main-form-grid .form-group label {
  font-size: 0.88rem;
  margin-bottom: 0.12rem;
}
/* Distinct compact Main tab accent by requirement shell (BR / US / ACC / EPIC / HLR) */
#requirement-modal.req-modal-compact-shell[data-req-shell="BR"] .req-modal-main-form-grid.form-grid {
  border-left: 3px solid #5e35b1;
  padding-left: 0.65rem;
  margin-left: -0.15rem;
}
#requirement-modal.req-modal-compact-shell[data-req-shell="US"] .req-modal-main-form-grid.form-grid {
  border-left: 3px solid #00695c;
  padding-left: 0.65rem;
  margin-left: -0.15rem;
}
#requirement-modal.req-modal-compact-shell[data-req-shell="ACC"] .req-modal-main-form-grid.form-grid {
  border-left: 3px solid #e65100;
  padding-left: 0.65rem;
  margin-left: -0.15rem;
}
#requirement-modal.req-modal-compact-shell[data-req-shell="EPIC"] .req-modal-main-form-grid.form-grid {
  border-left: 3px solid #283593;
  padding-left: 0.65rem;
  margin-left: -0.15rem;
}
#requirement-modal.req-modal-compact-shell[data-req-shell="HLR"] .req-modal-main-form-grid.form-grid {
  border-left: 3px solid #1565c0;
  padding-left: 0.65rem;
  margin-left: -0.15rem;
}
#requirement-modal .req-modal-tab-panel[hidden] {
  display: none !important;
}
#requirement-modal .req-modal-qa-scroll {
  max-height: min(60vh, 560px);
  overflow-y: auto;
  padding: 0.35rem 0.25rem;
}
#requirement-modal .req-modal-content.req-modal-expanded .req-modal-qa-scroll {
  max-height: min(74vh, 820px);
}
#requirement-modal .req-modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e0e0e0;
}
#requirement-modal .req-modal-footer-spacer {
  flex: 1 1 auto;
}
#requirement-modal .req-modal-delete-btn {
  border-color: #ef9a9a;
  color: #b71c1c;
  background: #fff7f7;
}
#requirement-modal .req-modal-error-summary-heading {
  font-weight: 700;
}
#requirement-modal .req-modal-error-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
#requirement-modal .req-modal-error-summary-item {
  text-align: left;
  width: 100%;
  border: 1px solid #ef9a9a;
  background: #fffaf9;
  color: #9f1d1d;
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
}
@media (max-width: 900px) {
  #requirement-modal .modal-content.req-modal-content {
    width: calc(100vw - 2rem);
    max-width: calc(100vw - 2rem);
  }
  #requirement-modal #requirement-form {
    padding: 0 0.75rem 0.75rem;
  }
  #requirement-modal .req-modal-editor-shell {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }
  #requirement-modal .req-modal-tab-bar {
    flex-direction: row;
    gap: 0.45rem;
    border-right: 0;
    border-bottom: 1px solid #e0e6eb;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.55rem 0.25rem;
  }
  #requirement-modal .req-modal-mode-group {
    flex: 0 0 min(72vw, 18rem);
  }
  #requirement-modal .req-modal-mode-tabs {
    flex-direction: row;
    flex-wrap: wrap;
  }
  #requirement-modal .req-modal-tab-btn {
    width: auto;
    flex: 1 1 7rem;
  }
  #requirement-modal .req-modal-readiness-panel {
    position: sticky;
    top: 0;
    z-index: 2;
    max-height: min(28vh, 16rem);
  }
}
/* Glossary Edit modal: flex shell — scroll middle only; Main vs Ontology & impact tabs */
#glossary-modal .modal-content.gloss-modal-content {
  display: flex;
  flex-direction: column;
  width: min(92vw, 1480px);
  max-width: min(92vw, 1480px);
  max-height: min(90vh, 920px);
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}
#glossary-modal .modal-content.gloss-modal-content.gloss-modal-expanded,
#glossary-modal[data-active-tab="context"] .modal-content.gloss-modal-content.context-graph-modal-expanded {
  width: calc(100vw - 2rem);
  max-width: calc(100vw - 2rem);
  height: calc(100vh - 2rem);
  height: calc(100dvh - 2rem);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: 1rem auto;
}
#glossary-modal .gloss-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 1rem 1.25rem 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}
#glossary-modal .gloss-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: normal;
}
#glossary-modal .gloss-modal-header .close {
  float: none;
  flex-shrink: 0;
  line-height: 1;
  margin-top: -0.15rem;
}
#glossary-modal .gloss-modal-window-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  color: #263238;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
#glossary-modal .gloss-modal-window-expand-btn:hover,
#glossary-modal .gloss-modal-window-expand-btn:focus-visible {
  border-color: #90caf9;
  background: #eef7ff;
  outline: none;
}

@media (max-width: 640px) {
  .architecture-diagram-expand-overlay {
    padding: 0.5rem;
  }

  .architecture-diagram-expand-box,
  #requirement-modal .modal-content.req-modal-content.req-modal-expanded,
  #requirement-modal .modal-content.req-modal-content.context-graph-modal-expanded,
  #glossary-modal .modal-content.gloss-modal-content.gloss-modal-expanded,
  #glossary-modal[data-active-tab="context"] .modal-content.gloss-modal-content.context-graph-modal-expanded {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    height: calc(100vh - 1rem);
    height: calc(100dvh - 1rem);
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  #requirement-modal .modal-content.req-modal-content.req-modal-expanded,
  #requirement-modal .modal-content.req-modal-content.context-graph-modal-expanded,
  #glossary-modal .modal-content.gloss-modal-content.gloss-modal-expanded,
  #glossary-modal[data-active-tab="context"] .modal-content.gloss-modal-content.context-graph-modal-expanded {
    margin: 0.5rem auto;
  }
}
#glossary-modal .gloss-modal-content > #glossary-modal-subtitle,
#glossary-modal .gloss-modal-content > p.glossary-modal-context {
  margin: 0 1.25rem 0.5rem;
  flex-shrink: 0;
}
#glossary-modal .gloss-modal-client-spec-tier1-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0 1rem 0.35rem;
  font-size: 0.82rem;
  color: #455a64;
}
#glossary-modal .gloss-modal-client-spec-tier1-label {
  white-space: nowrap;
}
#glossary-modal .gloss-modal-client-spec-tier1-wrap .btn-secondary {
  margin-left: 0;
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
}
#glossary-modal .gloss-modal-tab-bar {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid #e0e6eb;
  background: #f8fafb;
  padding: 0.55rem;
  scrollbar-width: thin;
}
#glossary-modal .gloss-modal-mode-group {
  display: flex;
  flex-direction: column;
  gap: 0.26rem;
  border: 1px solid #dce4ea;
  border-radius: 8px;
  background: #fff;
  padding: 0.42rem;
}
#glossary-modal .gloss-modal-mode-group-active {
  border-color: #90b7d8;
  box-shadow: inset 3px 0 0 #2f6f9f;
}
#glossary-modal .gloss-modal-mode-label {
  color: #1f3444;
  font-size: 0.82rem;
  font-weight: 800;
}
#glossary-modal .gloss-modal-mode-helper {
  display: none;
  color: #60727e;
  font-size: 0.76rem;
  line-height: 1.35;
}
#glossary-modal .gloss-modal-mode-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}
#glossary-modal .gloss-modal-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  gap: 0.5rem;
  padding: 0.32rem 0.45rem;
  font-size: 0.8rem;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f4f6f8;
  color: #333;
  white-space: normal;
  text-align: left;
}
#glossary-modal .gloss-modal-tab-btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}
#glossary-modal .gloss-modal-tab-btn-text,
#glossary-modal .gloss-modal-tab-btn-meta {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
#glossary-modal .gloss-modal-tab-btn-text {
  gap: 0.42rem;
}
#glossary-modal .gloss-modal-tab-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}
#glossary-modal .gloss-modal-tab-btn-label {
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}
#glossary-modal .gloss-modal-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.15rem;
  padding: 0.05rem 0.38rem;
  border-radius: 999px;
  border: 1px solid #d5dde5;
  background: #fff;
  color: #355061;
  font-size: 0.72rem;
  line-height: 1;
}
#glossary-modal .gloss-modal-tab-badge[hidden] {
  display: none !important;
}
#glossary-modal .gloss-modal-tab-btn.gloss-modal-tab-migrated {
  background: #e8f5e9;
  border-color: #81c784;
  color: #1b5e20;
}
#glossary-modal .gloss-modal-tab-btn.gloss-modal-tab-active {
  background: #fff;
  border-color: #8db6d3;
  font-weight: 600;
}
#glossary-modal .gloss-modal-tab-btn.gloss-modal-tab-migrated.gloss-modal-tab-active {
  background: #c8e6c9;
  border-color: #66bb6a;
  color: #1b5e20;
}
#glossary-modal #glossary-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0 1rem 1rem;
}
#glossary-modal .gloss-modal-editor-shell {
  display: grid;
  grid-template-columns: minmax(12rem, 0.18fr) minmax(0, 1fr);
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
}
#glossary-modal .gloss-modal-content-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
#glossary-modal .gloss-modal-current-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--alm-border, #e0e0e0);
  background: #f8fafb;
  color: #264057;
  font-size: 0.8rem;
}
#glossary-modal .gloss-modal-current-mode-label {
  color: #546e7a;
  font-weight: 700;
}
#glossary-modal .gloss-modal-current-mode-value {
  font-weight: 700;
}
#glossary-modal .gloss-modal-guidance-panel {
  margin: 0.6rem 0.25rem 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #fbfdff;
  color: #263238;
}
#glossary-modal .gloss-modal-guidance-heading {
  font-size: 0.82rem;
  font-weight: 800;
  color: #23405a;
  margin-bottom: 0.35rem;
}
#glossary-modal .gloss-modal-guidance-status {
  border-radius: 8px;
  border: 1px solid #cdd9e2;
  background: #fff;
  padding: 0.42rem 0.52rem;
  font-weight: 800;
  color: #1f3444;
}
#glossary-modal .gloss-modal-guidance-panel[data-gloss-saved="false"] .gloss-modal-guidance-status {
  border-color: #ffcc80;
  background: #fff8ec;
  color: #7a4a00;
}
#glossary-modal .gloss-modal-guidance-next {
  margin-top: 0.45rem;
  color: #60727e;
  font-size: 0.8rem;
  line-height: 1.4;
}
#glossary-modal .gloss-modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 0.75rem;
}
#glossary-modal .gloss-modal-tab-panel[hidden] {
  display: none !important;
}
/* Glossary Main tab: two fields per row (short text / selects) to reduce vertical scroll */
#glossary-modal .glossary-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 1rem;
  margin-bottom: 1rem;
  align-items: start;
}
#glossary-modal .glossary-field-row .form-group {
  margin-bottom: 0;
}
#glossary-modal .form-group,
#glossary-modal .dual-list-multi-select,
#glossary-modal .dual-list-top-row,
#glossary-modal .dual-list-top-row .selected-chips {
  min-width: 0;
}
#glossary-modal .form-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
@media (max-width: 900px) {
  #glossary-modal .modal-content.gloss-modal-content {
    width: calc(100vw - 2rem);
    max-width: calc(100vw - 2rem);
  }
  #glossary-modal #glossary-form {
    padding: 0 0.75rem 0.75rem;
  }
  #glossary-modal .gloss-modal-editor-shell {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }
  #glossary-modal .gloss-modal-tab-bar {
    flex-direction: row;
    gap: 0.45rem;
    border-right: 0;
    border-bottom: 1px solid #e0e6eb;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.55rem 0.25rem;
  }
  #glossary-modal .gloss-modal-mode-group {
    flex: 0 0 min(72vw, 18rem);
  }
  #glossary-modal .gloss-modal-mode-tabs {
    flex-direction: row;
    flex-wrap: wrap;
  }
  #glossary-modal .gloss-modal-tab-btn {
    width: auto;
    flex: 1 1 7rem;
  }
  #glossary-modal .gloss-modal-guidance-panel {
    margin-top: 0.45rem;
  }
}
@media (max-width: 640px) {
  #glossary-modal .glossary-field-row {
    grid-template-columns: 1fr;
  }
}
/* Risks */
#risks-view.risks-view-root {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.risks-screen {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
  min-height: 0;
}
.risks-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background: linear-gradient(180deg, #f6fbff 0%, #fff 100%);
  box-shadow: var(--alm-shadow-sm, 0 1px 2px rgba(24, 39, 75, 0.06));
}
.risks-toolbar-copy-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.risks-toolbar-copy {
  margin: 0;
  color: #5c6873;
  font-size: 0.9rem;
}
.risks-toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem 1rem;
}
.risks-toolbar-subnav,
.risks-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.risks-toolbar-subnav {
  flex: 0 1 auto;
  padding: 0.45rem 0.6rem;
  border: 1px solid #d7e3ef;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.risks-toolbar-group-label {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.2rem 0 0.05rem;
  color: #587086;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.risks-toolbar-subnav-buttons,
.risks-toolbar-list-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.risks-toolbar-actions {
  flex: 1 1 18rem;
  justify-content: flex-start;
}
.risks-toolbar-list-actions {
  padding-left: 0.55rem;
  margin-left: 0.15rem;
  border-left: 1px solid #d8e2ea;
}
.risks-subnav-btn {
  border-radius: 999px;
  min-width: 5.5rem;
}
.risks-subnav-btn.requirements-list-toolbar-btn-secondary {
  border-color: #ccd7e2;
  background: #fff;
  color: #274057;
}
.risks-subnav-btn.requirements-list-toolbar-btn-secondary:hover {
  background: #f5f9fc;
}
.risks-subnav-btn.toolbar-btn-primary,
.risks-subnav-btn.active {
  background: #1976d2;
  border-color: #1976d2;
  color: #fff;
}
.risks-add-btn {
  white-space: nowrap;
}
.risks-export-group {
  position: relative;
}
.risks-export-panel {
  position: absolute;
  top: calc(100% + 0.3rem);
  right: 0;
  min-width: 10.5rem;
  z-index: 20;
}
@media (max-width: 900px) {
  .risks-toolbar-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .risks-toolbar-actions {
    flex: 1 1 auto;
  }
}
@media (max-width: 640px) {
  .risks-toolbar-subnav,
  .risks-toolbar-actions {
    width: 100%;
  }
  .risks-toolbar-subnav {
    border-radius: 14px;
  }
  .risks-toolbar-list-actions {
    width: 100%;
    padding-left: 0;
    margin-left: 0;
    border-left: none;
  }
}
.risks-table-scrollport {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--alm-shadow-sm, 0 1px 2px rgba(24, 39, 75, 0.06));
}
.risks-table-wrap {
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
}
.risks-table {
  width: 100%;
  min-width: max(100%, 2500px);
  table-layout: fixed;
}
.risks-table thead th {
  position: sticky;
  top: 0;
  z-index: 13;
  background: #f5f5f5;
}
.risks-table td {
  vertical-align: top;
}
.risks-table .dm-col-resize-handle {
  right: -2px;
}
.risks-empty {
  text-align: center;
  color: #777;
  padding: 1rem 0.75rem;
}
.risks-th-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.risk-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border: none;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.risk-sort-btn.is-active {
  color: var(--alm-primary-strong, #1565c0);
}
.risk-sort-indicator {
  font-size: 0.82rem;
  color: var(--alm-text-muted, #5b6b75);
}
.risk-inline-display-wrap {
  min-height: 1.15rem;
}
.risk-inline-display {
  display: inline-block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  box-shadow: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.risk-inline-display.is-multiline {
  display: block;
  white-space: pre-wrap;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.4;
}
.risk-inline-display.is-title-wrap {
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
}
.risk-inline-display.is-empty {
  color: #999;
}
.risk-inline-display.is-severity-pill,
.risk-inline-display.is-bucket-pill {
  display: inline-flex;
  width: auto;
  align-items: center;
  min-height: 1.6rem;
  padding: 0.14rem 0.58rem;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
.risk-inline-display.severity-1 {
  background: #e8f5e9;
  color: #1b5e20;
}
.risk-inline-display.severity-2 {
  background: #dcedc8;
  color: #33691e;
}
.risk-inline-display.severity-3 {
  background: #fff8e1;
  color: #8d6e00;
}
.risk-inline-display.severity-4 {
  background: #ffe0b2;
  color: #bf360c;
}
.risk-inline-display.severity-5 {
  background: #ffebee;
  color: #b71c1c;
}
.risk-inline-display.bucket-low {
  background: #e8f5e9;
  color: #1b5e20;
}
.risk-inline-display.bucket-medium {
  background: #fff3e0;
  color: #e65100;
}
.risk-inline-display.bucket-high {
  background: #ffebee;
  color: #b71c1c;
}
.risk-inline-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.32rem 0.45rem;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  color: inherit;
  font: inherit;
}
.risk-inline-textarea {
  min-height: 4.35rem;
  resize: vertical;
}
.risk-score-cell {
  font-weight: 600;
}
.risk-linked-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-height: 1.5rem;
}
.risk-link-count {
  font-size: 0.85rem;
  color: #555;
}
.risk-issues-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-height: 1.5rem;
  color: #666;
  white-space: normal;
}
.risk-issues-badge.has-issues {
  color: #b26a00;
  font-weight: 600;
  cursor: help;
}
.risk-issues-item {
  line-height: 1.35;
}
/* Incoming references tab: collapsible groups (<details>), closed by default */
#glossary-modal .alm-incoming-ref-group,
#attribute-modal .alm-incoming-ref-group,
#requirement-modal .alm-incoming-ref-group {
  margin-bottom: 0.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  background: #fafafa;
}
#glossary-modal .alm-incoming-ref-group summary,
#attribute-modal .alm-incoming-ref-group summary,
#requirement-modal .alm-incoming-ref-group summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  user-select: none;
  list-style-position: outside;
}
#glossary-modal .alm-incoming-ref-group-body,
#attribute-modal .alm-incoming-ref-group-body,
#requirement-modal .alm-incoming-ref-group-body {
  margin-top: 0.35rem;
  padding-top: 0.15rem;
}
#glossary-modal .gloss-scenario-traceability {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
#glossary-modal .gloss-scenario-traceability-group {
  margin-bottom: 0;
}
#glossary-modal .gloss-scenario-traceability-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
#glossary-modal .gloss-scenario-traceability-row {
  width: 100%;
  border: 1px solid #d7e2ea;
  border-left: 3px solid #1565c0;
  border-radius: 4px;
  background: #f5f9ff;
  color: #20303a;
  cursor: pointer;
  display: block;
  font: inherit;
  line-height: 1.35;
  padding: 0.45rem 0.55rem;
  text-align: left;
}
#glossary-modal .gloss-scenario-traceability-row:hover,
#glossary-modal .gloss-scenario-traceability-row:focus {
  background: #eaf3ff;
  border-color: #9fc0dd;
  outline: 2px solid rgba(21, 101, 192, 0.18);
  outline-offset: 1px;
}
#glossary-modal .gloss-modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e0e0e0;
}
/* Edit Attribute modal (Data Model / Glossary): Main vs Links tabs */
#attribute-modal .modal-content.attr-modal-content {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 920px);
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}
#attribute-modal .attr-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 1rem 1.25rem 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}
#attribute-modal .attr-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  flex: 1;
  min-width: 0;
}
#attribute-modal .attr-modal-header .close {
  float: none;
  flex-shrink: 0;
  line-height: 1;
  margin-top: -0.15rem;
}
#attribute-modal .attr-modal-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0 1rem 0.5rem;
  flex-shrink: 0;
  border-bottom: 1px solid #e0e0e0;
  background: #fafafa;
}
#attribute-modal .attr-modal-tab-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px 4px 0 0;
  background: #eee;
  color: #333;
}
#attribute-modal .attr-modal-tab-btn.attr-modal-tab-active {
  background: #fff;
  border-bottom-color: #fff;
  margin-bottom: -1px;
  font-weight: 600;
}
#attribute-modal .attr-modal-utility-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 1rem;
  padding: 0.5rem 1rem 0.6rem;
  background: #f8fafb;
  border-bottom: 1px solid var(--alm-border, #e0e0e0);
  flex-shrink: 0;
}
#attribute-modal .attr-modal-utility-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-left: auto;
}
#attribute-modal #attribute-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0 1.25rem 1rem;
}
#attribute-modal .attr-modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 0.75rem;
}
#attribute-modal .attr-modal-tab-panel[hidden] {
  display: none !important;
}
#attribute-modal .attr-modal-footer {
  flex-shrink: 0;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e0e0e0;
}
#attribute-modal #attr-modal-advanced-fields-wrap {
  display: none !important;
}
#attribute-modal.attr-modal-show-additional #attr-modal-advanced-fields-wrap {
  display: block !important;
}
/* BPMN Function modal: Main / Flow / Trace tabs (parity with Attribute modal layout) */
#function-modal .modal-content.function-modal-content {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 920px);
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}
#function-modal .function-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 1rem 1.25rem 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}
#function-modal .function-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  flex: 1;
  min-width: 0;
}
#function-modal .function-modal-header .close {
  float: none;
  flex-shrink: 0;
  line-height: 1;
  margin-top: -0.15rem;
}
#function-modal .function-modal-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0 1rem 0.5rem;
  flex-shrink: 0;
  border-bottom: 1px solid #e0e0e0;
  background: #fafafa;
}
#function-modal .function-modal-tab-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px 4px 0 0;
  background: #eee;
  color: #333;
}
#function-modal .function-modal-tab-btn.function-modal-tab-active {
  background: #fff;
  border-bottom-color: #fff;
  margin-bottom: -1px;
  font-weight: 600;
}
#function-modal #function-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0 1.25rem 1rem;
}
#function-modal .function-modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 0.75rem;
}
#function-modal .form-group,
#function-modal .dual-list-multi-select,
#function-modal .dual-list-top-row,
#function-modal .dual-list-top-row .selected-chips {
  min-width: 0;
}
#function-modal .form-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
#function-modal .function-modal-tab-panel[hidden] {
  display: none !important;
}
#function-modal .function-modal-footer {
  flex-shrink: 0;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e0e0e0;
}
@media (max-width: 720px) {
  #glossary-modal .gloss-modal-header,
  #function-modal .function-modal-header {
    padding: 0.75rem 0.85rem 0.4rem;
  }
  #glossary-modal .gloss-modal-tab-bar,
  #function-modal .function-modal-tab-bar {
    padding: 0 0.75rem 0.4rem;
  }
  #glossary-modal .gloss-modal-tab-btn,
  #function-modal .function-modal-tab-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
  }
  #glossary-modal #glossary-form,
  #function-modal #function-form {
    padding: 0 0.85rem 0.75rem;
  }
  #glossary-modal .gloss-modal-content > #glossary-modal-subtitle,
  #glossary-modal .gloss-modal-content > p.glossary-modal-context {
    margin: 0 0.85rem 0.45rem;
  }
  #glossary-modal .gloss-modal-scroll,
  #function-modal .function-modal-scroll {
    padding-top: 0.55rem;
  }
  #glossary-modal .gloss-modal-footer,
  #function-modal .function-modal-footer {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
  }
  #glossary-modal .form-grid,
  #function-modal .form-grid {
    gap: 0.75rem;
  }
}
@media (max-width: 480px) {
  #glossary-modal .gloss-modal-header h2,
  #function-modal .function-modal-header h2 {
    font-size: 1.08rem;
  }
  #glossary-modal .gloss-modal-tab-btn,
  #function-modal .function-modal-tab-btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }
  #glossary-modal .gloss-modal-footer .btn,
  #glossary-modal .gloss-modal-footer button,
  #function-modal .function-modal-footer .btn,
  #function-modal .function-modal-footer button {
    font-size: 0.84rem;
    padding: 0.42rem 0.62rem;
  }
}
.close { color: #666; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.close:hover { color: #000; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: bold; }
.form-group .previous-scenarios-item { display: flex !important; align-items: center; flex-direction: row; margin-bottom: 0.25rem; font-weight: normal; padding: 0 !important; margin-left: 0 !important; width: 100% !important; box-sizing: border-box !important; }
.form-group .previous-scenarios-item input[type="checkbox"] { margin: 0 !important; margin-right: 8px !important; flex-shrink: 0; cursor: pointer; padding: 0 !important; width: auto !important; }
.form-group .previous-scenarios-item span { margin: 0 !important; padding: 0 !important; flex: 0 1 auto !important; white-space: nowrap !important; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 0.5rem; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; }
/* Form grid layout for compact requirement form */
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; margin-bottom: 1rem; }
.form-group-full { grid-column: 1 / -1; }
.form-group-third { grid-column: span 4; }
.form-group-two-thirds { grid-column: span 8; }
.form-group-half { grid-column: span 6; }
.form-group-quarter { grid-column: span 3; }
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-group-third, .form-group-two-thirds, .form-group-half, .form-group-quarter { grid-column: 1 / -1; }
}
/* UI elements 3-column layout */
.ui-elements-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 0.5rem; }
.ui-elements-grid > div { margin-top: 0; }
@media (max-width: 600px) {
  .ui-elements-grid { grid-template-columns: 1fr; }
}
.modal-filter-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; margin-bottom: 0.5rem; }
.modal-filter-table th { background: #eee; padding: 0.35rem; text-align: left; font-weight: bold; border: 1px solid #ddd; }
.modal-filter-table td { padding: 0.35rem; border: 1px solid #ddd; vertical-align: middle; }
.modal-filter-table .modal-filter-label-col { width: 40%; }
.modal-filter-table .modal-filter-input-col { width: 30%; }
.modal-filter-table .modal-filter-group-header { background: #f5f5f5; font-weight: bold; font-size: 0.9rem; color: #555; }
.modal-filter-table .modal-filter-attribute-label { font-size: 0.85rem; padding-left: 1rem; }
.modal-filter-table input, .modal-filter-table select { width: 100%; padding: 0.4rem; font-size: 0.8rem; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; }
/* Scenario Attribute Values table: 5 columns (Sequence, Attribute, Initial State, Action, Use as WHEN trigger) */
#gloss-scenario-attributes-table { table-layout: fixed; }
#gloss-scenario-attributes-table th:nth-child(1), #gloss-scenario-attributes-table td:nth-child(1) { width: 5.5rem; min-width: 5.5rem; }
#gloss-scenario-attributes-table th:nth-child(2), #gloss-scenario-attributes-table td:nth-child(2) { min-width: 10rem; }
#gloss-scenario-attributes-table th:nth-child(3), #gloss-scenario-attributes-table td:nth-child(3) { width: 12ch; min-width: 12ch; }
#gloss-scenario-attributes-table th:nth-child(4), #gloss-scenario-attributes-table td:nth-child(4) { width: 12ch; min-width: 12ch; }
#gloss-scenario-attributes-table th:nth-child(5), #gloss-scenario-attributes-table td:nth-child(5) { width: 6rem; min-width: 6rem; }
.attributes-scroll-container { max-height: 350px; overflow-y: auto; border: 1px solid #ddd; border-radius: 4px; padding: 0.5rem; background: #fafafa; margin-top: 0.5rem; }
.form-actions { margin-top: 2rem; text-align: right; padding-top: 1rem; border-top: 1px solid #ddd; }
.form-actions button { padding: 0.5rem 1rem; margin-left: 0.5rem; cursor: pointer; border: none; border-radius: 4px; font-size: 0.9rem; }
.form-actions button[type="submit"] { background: #4CAF50; color: white; }
/* Cancel and other non-delete actions — exclude all edit-form Delete control ids */
.form-actions button[type="button"]:not([id$="-delete-btn"]):not(#delete-btn):not(#delete-attribute-btn) { background: #f0f0f0; color: #333; }
/* Destructive Delete in modal/edit form footers */
.form-actions button[type="button"][id$="-delete-btn"],
.form-actions button[type="button"]#delete-btn,
.form-actions button[type="button"]#delete-attribute-btn,
#delete-btn { background: #f44336; color: white; }
.attribute-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.attribute-modal-grid .form-group { margin-bottom: 0; }
/* Attribute Comments (Notes) field - full width, min height like glossary Notes */
#attr-notes { min-height: 4rem; resize: vertical; }
.action-buttons { display: flex; gap: 0.5rem; }
.action-buttons button { padding: 0.25rem 0.5rem; font-size: 0.75rem; cursor: pointer; border: 1px solid #ccc; border-radius: 4px; background: #2196F3; color: white; }
/* Attribute reorder buttons (Attributes for: class, Data Model) */
.attr-reorder-btn {
  pointer-events: auto;
  cursor: pointer;
  min-width: 1.5rem;
  user-select: none;
}
.attr-reorder-btn:not(:disabled):hover {
  background: #e0e0e0 !important;
  border-color: #999 !important;
}
.attr-reorder-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
/* Tree-table styles for hierarchical requirements view */
.tree-expand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  text-align: center;
  line-height: 16px;
  cursor: pointer;
  user-select: none;
  color: #555;
  font-size: 10px;
  transition: transform 0.2s ease;
  margin-right: 4px;
}
.tree-expand-icon.expanded {
  transform: rotate(90deg);
}
.tree-row-parent {
  cursor: pointer;
}
.tree-row-parent:hover {
  background-color: rgba(31, 90, 166, 0.04) !important;
}
.tree-row-child {
  display: none;
}
.tree-row-child[data-parent-expanded="true"] {
  display: table-row;
}
.req-id-tree-cell {
  text-align: left;
}
.req-id-tree-wrap {
  display: flex;
  align-items: flex-start;
  min-width: 0;
}
.req-id-tree-content {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
}
.alm-signal-pair {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin: 0 0.1rem 0 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  flex: 0 0 auto;
}
.alm-intent-signal,
.alm-capability-signal {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.alm-intent-signal[data-state="strong"] { background: #1f4fd6; }
.alm-intent-signal[data-state="generic"] { background: #6ea8fe; }
.alm-intent-signal[data-state="fragmented"] { background: #f59f00; }
.alm-intent-signal[data-state="missing-origin"],
.alm-intent-signal[data-state="missing"],
.alm-intent-signal[data-state="lost"] { background: #e03131; }
.alm-intent-signal[data-state="reconstructed"] { background: #7950f2; }
.alm-capability-signal[data-state="aligned"] { background: #2b8a3e; }
.alm-capability-signal[data-state="mixed"] { background: #f08c00; }
.alm-capability-signal[data-state="missing"] { background: #c92a2a; }
.alm-capability-signal[data-state="over-general"] { background: #868e96; }
.alm-signal-pair:focus-visible {
  outline: 2px solid rgba(31, 79, 214, 0.55);
  outline-offset: 2px;
  border-radius: 999px;
}
.req-id-tree-indent {
  flex: 0 0 auto;
  height: 1px;
}
.req-id-tree-toggle-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  width: 20px;
  min-width: 20px;
  margin-right: 0.2rem;
}
.tree-expand-placeholder {
  display: inline-block;
  width: 16px;
  height: 16px;
}
.req-id-tree-link {
  min-width: 0;
  flex: 0 0 auto;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
/* Requirements list: Sel./Spec are before No.—do not indent leading cells; td.req-no-cell padding-left is uniform for all levels (set in renderTreeTableRow). */
.requirements-list-table tbody tr[data-requirement-index] td:first-child {
  padding-left: 0.25rem !important;
}
/* Data Model hierarchical table: class vs attribute rows */
.dm-tree-row-class { font-weight: 600; background-color: rgba(33, 150, 243, 0.06) !important; }
.dm-tree-row-attr { background-color: rgba(0, 0, 0, 0.02) !important; }
.requirements-dm-class-table tr.dm-row-standard td {
  box-shadow: inset 3px 0 0 rgba(32, 92, 53, 0.28);
}
.dm-tree-row-attr td:nth-child(2) { padding-left: 1.5rem !important; }
/* Requirements-Data model: column widths (Full view: 24 cols; Simple: 14 cols). Full: … Comments (last). Simple: … Related Requirements (last). Row hover opens actions bubble (no Actions column). */
.requirements-dm-class-table { table-layout: fixed; width: 100%; }
.requirements-dm-class-table th,
.requirements-dm-class-table td { word-wrap: break-word; overflow-wrap: break-word; box-sizing: border-box; }
.requirements-dm-class-table th { white-space: nowrap; }
.requirements-dm-class-table th.dm-spec-export-th,
.requirements-dm-class-table td.dm-spec-export-cell { width: 44px; min-width: 44px; max-width: 44px; text-align: center !important; }
.dm-spec-export-toggle { min-width: 28px; height: 28px; padding: 0; }
.dm-spec-export-cell.is-hidden { background: rgba(148, 163, 184, 0.12); }
.requirements-dm-class-table th:nth-child(1),
.requirements-dm-class-table td:nth-child(1) { width: 2em; min-width: 2em; }
.requirements-dm-class-table th:nth-child(2),
.requirements-dm-class-table td:nth-child(2) { min-width: 180px; width: 14%; }
.requirements-dm-class-table th:nth-child(3),
.requirements-dm-class-table td:nth-child(3) { min-width: 200px; width: 14%; }
.requirements-dm-class-table th:nth-child(4),
.requirements-dm-class-table td:nth-child(4) { min-width: 180px; width: 12%; }
.requirements-dm-class-table th:nth-child(5),
.requirements-dm-class-table td:nth-child(5) { width: 55px; min-width: 55px; }
.requirements-dm-class-table th:nth-child(6),
.requirements-dm-class-table td:nth-child(6) { width: 55px; min-width: 55px; }
.requirements-dm-class-table th:nth-child(7),
.requirements-dm-class-table td:nth-child(7) { width: 50px; min-width: 50px; }
.requirements-dm-class-table th:nth-child(8),
.requirements-dm-class-table td:nth-child(8) { width: 50px; min-width: 50px; }
.requirements-dm-class-table th:nth-child(9),
.requirements-dm-class-table td:nth-child(9) { width: 45px; min-width: 45px; }
.requirements-dm-class-table th:nth-child(10),
.requirements-dm-class-table td:nth-child(10) { width: 45px; min-width: 45px; }
.requirements-dm-class-table th:nth-child(11),
.requirements-dm-class-table td:nth-child(11) { min-width: 220px; width: 220px; }
/* Full view: Order (11) narrow; Description (4), UI elements (21), Comments (24) wider */
.requirements-dm-class-table.requirements-dm-full th:nth-child(4),
.requirements-dm-class-table.requirements-dm-full td:nth-child(4) { min-width: 220px; width: 14%; }
.requirements-dm-class-table.requirements-dm-full th:nth-child(11),
.requirements-dm-class-table.requirements-dm-full td:nth-child(11) { min-width: 4.5em; width: 4.5em; max-width: 5em; }
.requirements-dm-class-table th:nth-child(12),
.requirements-dm-class-table td:nth-child(12) { min-width: 220px; width: 14%; text-align: left !important; }
.requirements-dm-class-table th:nth-child(13),
.requirements-dm-class-table td:nth-child(13) { min-width: 50px; width: 3.5%; }
.requirements-dm-class-table th:nth-child(14),
.requirements-dm-class-table td:nth-child(14) { min-width: 45px; width: 3%; }
.requirements-dm-class-table th:nth-child(15),
.requirements-dm-class-table td:nth-child(15) { min-width: 100px; width: 6%; text-align: left !important; }
.requirements-dm-class-table th:nth-child(16),
.requirements-dm-class-table td:nth-child(16) { min-width: 100px; width: 6%; text-align: left !important; }
.requirements-dm-class-table th:nth-child(17),
.requirements-dm-class-table td:nth-child(17) { min-width: 80px; width: 5%; }
.requirements-dm-class-table th:nth-child(18),
.requirements-dm-class-table td:nth-child(18) { min-width: 100px; width: 6%; text-align: left !important; }
.requirements-dm-class-table th:nth-child(19),
.requirements-dm-class-table td:nth-child(19) { min-width: 100px; width: 6%; text-align: left !important; }
.requirements-dm-class-table th:nth-child(20),
.requirements-dm-class-table td:nth-child(20) { min-width: 120px; width: 120px; word-break: normal; white-space: normal; }
.requirements-dm-class-table .dm-cell-references-ui { word-break: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; min-width: 140px; }
.requirements-dm-class-table .dm-cell-ui-elements { word-break: normal; white-space: pre-line; overflow: visible; text-overflow: clip; max-height: none; text-align: left; min-width: 140px; vertical-align: top; }
.requirements-dm-class-table .dm-cell-ui-elements .dm-cell-inner { white-space: pre-line; overflow-y: visible; max-height: none; }
.requirements-dm-class-table th:nth-child(21),
.requirements-dm-class-table td:nth-child(21) { min-width: 140px; width: 140px; }
.requirements-dm-class-table.requirements-dm-full th:nth-child(21),
.requirements-dm-class-table.requirements-dm-full td:nth-child(21) { min-width: 240px; width: 240px; }
.requirements-dm-class-table.requirements-dm-full .dm-cell-ui-elements { min-width: 240px; }
.requirements-dm-class-table.requirements-dm-full th:nth-child(24),
.requirements-dm-class-table.requirements-dm-full td:nth-child(24) { min-width: 140px; width: 10%; }
.requirements-dm-class-table.requirements-dm-full .dm-cell-comments { min-width: 140px; }
/* Simple view (14 cols): Possible Values (11) … Related Requirements (14); row hover opens actions bubble */
.requirements-dm-class-table.requirements-dm-simple th:nth-child(11),
.requirements-dm-class-table.requirements-dm-simple td:nth-child(11) { min-width: 7.5rem; width: 7.5rem; max-width: 8.5rem; }
.requirements-dm-class-table.requirements-dm-simple th:nth-child(12),
.requirements-dm-class-table.requirements-dm-simple td:nth-child(12) { min-width: 3em; width: 3em; max-width: 3.5em; }
.requirements-dm-class-table.requirements-dm-simple th:nth-child(13),
.requirements-dm-class-table.requirements-dm-simple td:nth-child(13) { min-width: 3em; width: 3em; max-width: 3.5em; }
.requirements-dm-class-table.requirements-dm-simple th:nth-child(14),
.requirements-dm-class-table.requirements-dm-simple td:nth-child(14) { min-width: 220px; width: 240px; }
.requirements-dm-class-table.requirements-dm-simple .dm-cell-references-requirements { min-width: 220px; }
/* Requirements view (7 cols): Expand, Title, Concept Full Name, Description, Priority, Mandatory, Related Requirements */
.requirements-dm-class-table.requirements-dm-requirements th:nth-child(5),
.requirements-dm-class-table.requirements-dm-requirements td:nth-child(5) { min-width: 4em; width: 4em; }
.requirements-dm-class-table.requirements-dm-requirements th:nth-child(6),
.requirements-dm-class-table.requirements-dm-requirements td:nth-child(6) { min-width: 3em; width: 3em; }
.requirements-dm-class-table.requirements-dm-requirements th:nth-child(7),
.requirements-dm-class-table.requirements-dm-requirements td:nth-child(7) { min-width: 260px; width: 28%; }
.requirements-dm-class-table.requirements-dm-requirements .dm-cell-references-requirements { min-width: 260px; }
.requirements-dm-class-table.requirements-dm-requirements .dm-tree-row-attr td:nth-child(4),
.requirements-dm-class-table.requirements-dm-requirements .dm-tree-row-attr td:nth-child(7) { vertical-align: top; }
/* Mandatory=Yes attribute rows: red text (Simple and Full view) */
.requirements-dm-class-table tr.dm-attr-mandatory td { color: red; }
.requirements-dm-class-table .dm-cell-related-roles { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal; max-width: 100%; }
.requirements-dm-class-table th:nth-child(22),
.requirements-dm-class-table td:nth-child(22) { min-width: 100px; }
.requirements-dm-class-table .dm-cell-references-requirements { word-break: break-word; white-space: normal; overflow: visible; text-overflow: clip; max-height: none; min-width: 200px; text-align: left; vertical-align: top; }
.requirements-dm-class-table .dm-cell-references-requirements .dm-cell-references-inner { overflow-y: visible; max-height: none; }
.requirements-dm-class-table th:nth-child(23),
.requirements-dm-class-table td:nth-child(23) { min-width: 200px; width: 200px; }
.requirements-dm-class-table th:nth-child(24),
.requirements-dm-class-table td:nth-child(24) { min-width: 100px; width: 8%; text-align: left !important; }
.requirements-dm-class-table .dm-cell-comments { word-break: break-word; white-space: normal; max-height: 4em; overflow-y: auto; }
/* Cap row height for attribute rows: inner divs constrain height (avoids 477px+ row bug) */
.requirements-dm-class-table .dm-tree-row-attr .dm-cell-inner { word-break: break-word; overflow-y: auto; box-sizing: border-box; }
.requirements-dm-class-table .dm-tree-row-attr .dm-cell-ui-elements .dm-cell-inner { overflow-y: visible; max-height: none; }
.requirements-dm-class-table .dm-tree-row-attr .dm-cell-references-requirements .dm-cell-inner { overflow-y: visible; max-height: none; }
/* Possible Values: one value per line (Full view col 12, Simple view col 11) */
.requirements-dm-class-table.requirements-dm-full .dm-tree-row-attr td:nth-child(12) .dm-cell-inner,
.requirements-dm-class-table.requirements-dm-simple .dm-tree-row-attr td:nth-child(11) .dm-cell-inner { white-space: pre-line; }
.requirements-dm-class-table .dm-tree-row-attr .dm-cell-references-inner { word-break: break-word; overflow-y: auto; box-sizing: border-box; }
.requirements-dm-class-table .dm-tree-row-attr td:nth-child(4),
.requirements-dm-class-table .dm-tree-row-attr td:nth-child(11),
.requirements-dm-class-table .dm-tree-row-attr td:nth-child(15),
.requirements-dm-class-table .dm-tree-row-attr td:nth-child(16),
.requirements-dm-class-table .dm-tree-row-attr td:nth-child(18),
.requirements-dm-class-table .dm-tree-row-attr td:nth-child(20),
.requirements-dm-class-table .dm-tree-row-attr td:nth-child(23),
.requirements-dm-class-table .dm-tree-row-attr td:nth-child(24) { vertical-align: top; }
/* Mini view (11 cols): Possible Values (9) wider, Max Length (11) last */
.requirements-dm-class-table.requirements-dm-mini th:nth-child(9),
.requirements-dm-class-table.requirements-dm-mini td:nth-child(9) { min-width: 180px; width: 16%; text-align: left !important; }
.requirements-dm-class-table.requirements-dm-mini th:nth-child(10),
.requirements-dm-class-table.requirements-dm-mini td:nth-child(10) { min-width: 3em; width: 3em; max-width: 3.5em; }
.requirements-dm-class-table.requirements-dm-mini th:nth-child(11),
.requirements-dm-class-table.requirements-dm-mini td:nth-child(11) { min-width: 4em; width: 4.5em; max-width: 5em; }
.requirements-dm-class-table.requirements-dm-mini .dm-tree-row-attr td:nth-child(9) .dm-cell-inner { white-space: pre-line; }
.requirements-dm-class-table.requirements-dm-mini .dm-tree-row-attr td:nth-child(9) { vertical-align: top; }
/* Data Model: resizable column handles; sticky header (positioning context for absolute handles) */
.requirements-dm-class-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #eee;
}
.dm-col-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  z-index: 1;
}
.dm-col-resize-handle:hover { background: rgba(33, 150, 243, 0.2); }
/* Trailing layout column: absorbs fixed-table slack so the last data column keeps its width */
col.dm-col-spacer,
.scenario-table-resizable .dm-col-spacer-head,
.requirements-dm-class-table .dm-col-spacer-head,
.requirements-list-table .dm-col-spacer-head,
.rules-table .dm-col-spacer-head,
.glossary-requirement-links-table .dm-col-spacer-head,
.ui-inventory-table .dm-col-spacer-head {
  width: 4px;
  min-width: 4px;
  max-width: none;
  padding: 0 !important;
  box-sizing: border-box;
}
.scenario-table-resizable .dm-col-spacer-head,
.requirements-dm-class-table .dm-col-spacer-head,
.requirements-list-table .dm-col-spacer-head,
.rules-table .dm-col-spacer-head,
.glossary-requirement-links-table .dm-col-spacer-head,
.ui-inventory-table .dm-col-spacer-head {
  border-left: none;
  background: #eee;
}
.requirements-list-table .dm-col-spacer-head {
  background: #f5f5f5;
}
.glossary-requirement-links-table .dm-col-spacer-head {
  background: #f5f5f5;
}
.ui-inventory-table .dm-col-spacer-head {
  background: var(--alm-surface-2, #f0f4f7);
  box-shadow: 0 1px 0 var(--alm-border, #e0e0e0);
}
.dm-col-spacer-cell {
  padding: 0 !important;
  border-left: none !important;
  background: transparent;
}
/* When "Resize" is unchecked: hide resize handles and disable drag */
.change-columns-disabled .dm-col-resize-handle { visibility: hidden; pointer-events: none; }
/* Shared tab-table contract:
   - .alm-tab-table-scrollport owns vertical scrolling for sticky thead
   - .alm-tab-table-wrap is a non-scrolling inner wrapper for wide/resizable tables */
.alm-tab-table-scrollport {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
}
.alm-tab-table-wrap {
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 14px;
}
.alm-tab-table-scrollport table.data-model-table thead th,
.alm-tab-table-scrollport table.requirements-list-table thead th,
.alm-tab-table-scrollport table.story-map-table thead th,
.alm-tab-table-scrollport table.roles-table thead th,
.alm-tab-table-scrollport table.bpmn-view-table thead th,
.alm-tab-table-scrollport table.component-binding-table thead th,
.alm-tab-table-scrollport table.data-table thead th,
.alm-tab-table-scrollport table.alm-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  /* Sticky th needs an opaque background so body rows do not show through when scrolling. */
  background: #eee;
}
/* Horizontal-only wrapper for wide tables when a parent tab pane or custom scrollport owns vertical scrolling. */
.alm-table-horizontal-scroll {
  overflow-x: auto;
  overflow-y: clip;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  border-radius: 14px;
}
/*
 * Glossary scrollport is #glossary-subview-container (overflow:auto). Inner wrappers with
 * overflow-x:auto break position:sticky on thead th in Chromium (same as .requirements-list-table-wrap).
 * Scroll both axes on the subview container only.
 */
#glossary-subview-container.glossary-table .alm-table-horizontal-scroll,
#glossary-subview-container.glossary-table #glossary-products-table-host .glossary-products-table-wrap {
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-height: 0;
}
/* Requirements-List Full View: do NOT put overflow-x on this wrapper — it sits between .requirements-list-body-scroll and the table and breaks position:sticky on th in Chromium. Parent .requirements-list-body-scroll (overflow:auto) scrolls both axes. */
.requirements-list-table-wrap {
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 14px;
}
/* Glossary -> Products table: the parent subview owns scroll so sticky headers keep working. */
#glossary-products-table-host .glossary-products-table-wrap {
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-height: 0;
}
#glossary-products-table-host {
  width: 100%;
  min-width: 0;
  min-height: 0;
}
#glossary-subview-container.glossary-products-table-layout {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#glossary-subview-container.glossary-products-table-layout #glossary-products-table-host {
  flex: 1;
  overflow: auto;
}
table.data-model-table.glossary-products-table--wide-layout {
  min-width: max(100%, 2600px);
}
/* Glossary Report view: many columns — horizontal scroll inside alm-table-horizontal-scroll */
table.data-model-table.glossary-table--wide-report {
  min-width: max(100%, 2400px);
}
.glossary-requirement-links-scrollport {
  max-height: 70vh;
  margin-top: 0.5rem;
}
.glossary-requirement-links-table-wrap {
  min-width: 1180px;
}
table.data-model-table.glossary-requirement-links-table {
  min-width: 1180px;
}
table.data-model-table.glossary-requirement-links-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f5f5f5;
  text-align: left;
}
table.data-model-table.glossary-requirement-links-table th,
table.data-model-table.glossary-requirement-links-table td {
  box-sizing: border-box;
  vertical-align: top;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
table.data-model-table.glossary-requirement-links-table td {
  border: 1px solid #ddd;
}
table.data-model-table td.glossary-content-type-cell {
  color: #1f2937;
  font-weight: 600;
  white-space: nowrap;
  background: var(--glossary-type-bg, #f3f4f6);
  box-shadow: inset 4px 0 0 var(--glossary-type-accent, #94a3b8);
}
table.data-model-table td.glossary-content-type-cell--empty {
  color: #64748b;
  font-weight: 500;
  background: #f8fafc;
  box-shadow: inset 4px 0 0 #cbd5e1;
}
table.data-model-table td.glossary-content-type-cell--gray {
  --glossary-type-bg: #f3f4f6;
  --glossary-type-accent: #6b7280;
}
table.data-model-table td.glossary-content-type-cell--blue {
  --glossary-type-bg: #e8f1ff;
  --glossary-type-accent: #3b82f6;
}
table.data-model-table td.glossary-content-type-cell--teal {
  --glossary-type-bg: #e6fffb;
  --glossary-type-accent: #0f766e;
}
table.data-model-table td.glossary-content-type-cell--green {
  --glossary-type-bg: #ecfdf3;
  --glossary-type-accent: #16a34a;
}
table.data-model-table td.glossary-content-type-cell--mint {
  --glossary-type-bg: #ecfdf5;
  --glossary-type-accent: #10b981;
}
table.data-model-table td.glossary-content-type-cell--gold {
  --glossary-type-bg: #fff7dd;
  --glossary-type-accent: #ca8a04;
}
table.data-model-table td.glossary-content-type-cell--amber {
  --glossary-type-bg: #fff7ed;
  --glossary-type-accent: #ea580c;
}
table.data-model-table td.glossary-content-type-cell--orange {
  --glossary-type-bg: #fff1e6;
  --glossary-type-accent: #f97316;
}
table.data-model-table td.glossary-content-type-cell--rose {
  --glossary-type-bg: #fff1f2;
  --glossary-type-accent: #e11d48;
}
table.data-model-table td.glossary-content-type-cell--red {
  --glossary-type-bg: #fef2f2;
  --glossary-type-accent: #dc2626;
}
table.data-model-table td.glossary-content-type-cell--pink {
  --glossary-type-bg: #fdf2f8;
  --glossary-type-accent: #db2777;
}
table.data-model-table td.glossary-content-type-cell--purple {
  --glossary-type-bg: #f5f3ff;
  --glossary-type-accent: #7c3aed;
}
table.data-model-table td.glossary-content-type-cell--violet {
  --glossary-type-bg: #f4f0ff;
  --glossary-type-accent: #8b5cf6;
}
table.data-model-table td.glossary-content-type-cell--indigo {
  --glossary-type-bg: #eef2ff;
  --glossary-type-accent: #4f46e5;
}
table.data-model-table td.glossary-content-type-cell--plum {
  --glossary-type-bg: #faf5ff;
  --glossary-type-accent: #9333ea;
}
table.data-model-table td.glossary-content-type-cell--sky {
  --glossary-type-bg: #e0f2fe;
  --glossary-type-accent: #0284c7;
}
table.data-model-table td.glossary-content-type-cell--cyan {
  --glossary-type-bg: #ecfeff;
  --glossary-type-accent: #0891b2;
}
table.data-model-table td.glossary-content-type-cell--slate {
  --glossary-type-bg: #f1f5f9;
  --glossary-type-accent: #475569;
}
table.data-model-table td.glossary-content-type-cell--lime {
  --glossary-type-bg: #f7fee7;
  --glossary-type-accent: #65a30d;
}
#glossary-subview-container.glossary-table table.data-model-table tr.glossary-retired-row > td:nth-child(n + 2),
#glossary-products-table-host table.data-model-table tr.glossary-retired-row > td:nth-child(n + 2) {
  color: var(--alm-text-muted, #6b7280);
}
#glossary-subview-container.glossary-table table.data-model-table tr.glossary-retired-row > td:nth-child(n + 2) a,
#glossary-products-table-host table.data-model-table tr.glossary-retired-row > td:nth-child(n + 2) a {
  color: var(--alm-text-muted, #6b7280);
}
#glossary-products-table-host table.data-model-table tr.glossary-products-orphan-row > td {
  background: #fff8e1;
}
#glossary-products-table-host table.data-model-table tr.glossary-products-orphan-row > td:first-child {
  box-shadow: inset 4px 0 0 #d97706;
}
/* Override global glossary Source column 120px cap for Products resizable table */
#glossary-products-table-host table.glossary-products-table-resizable th:nth-child(7),
#glossary-products-table-host table.glossary-products-table-resizable td:nth-child(7) {
  width: auto !important;
  max-width: none !important;
  min-width: 72px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}
#glossary-products-table-host table.data-model-table thead th {
  position: sticky;
  top: 0;
  z-index: 14;
  background: #f5f5f5;
  box-shadow: 0 1px 0 #ddd;
}
#glossary-products-table-host table.data-model-table td.glossary-products-url-cell {
  overflow: hidden;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  text-align: left;
  vertical-align: top;
}
#glossary-products-table-host table.data-model-table td.glossary-products-url-cell .glossary-products-url-link {
  color: #1976d2;
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.glossary-products-tree-cell {
  --glossary-products-tree-level: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  padding-left: calc(var(--glossary-products-tree-level) * 1.2rem);
  min-height: 1.25rem;
  min-width: 0;
  max-width: 100%;
}
.glossary-products-tree-label-row {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
}
.glossary-products-tree-toggle {
  width: 1rem;
  min-width: 1rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.2;
}
.glossary-products-tree-toggle[disabled] {
  cursor: default;
  opacity: 0;
}
.glossary-products-tree-toggle-spacer {
  display: inline-block;
  width: 1rem;
  min-width: 1rem;
  height: 1.2em;
}
.glossary-products-tree-label {
  display: -webkit-box;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.glossary-products-tree-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  min-width: 0;
  max-width: 100%;
  padding-left: 1.35rem;
}
.glossary-tree-content-type-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.08rem 0.35rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #eef2ff;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.glossary-tree-relation-hint {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.08rem 0.35rem;
  border: 1px solid #d7dde8;
  border-radius: 999px;
  background: #f8fafc;
  color: #52606d;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.glossary-products-tree-primary-cell--group .glossary-products-tree-label {
  font-weight: 700;
  color: #334155;
}
.glossary-products-tree-primary-cell--placeholder .glossary-products-tree-label {
  color: #6b7280;
  font-style: italic;
}
.glossary-products-tree-row--level-0 td {
  background-clip: padding-box;
}
.glossary-main-tree-row.glossary-tree-cycle-row td {
  background: #fff8e1;
}
table.requirements-list-table.requirements-list-table--wide-layout {
  min-width: max(100%, 2800px);
}
table.requirements-list-table.requirements-list-table--report-layout {
  min-width: max(100%, 4200px);
}
table.requirements-list-table.requirements-list-table--custom-layout {
  min-width: max(100%, var(--requirements-list-custom-table-min-width, 760px));
}
/* Same issue as #data-model-table: overflow on <table> breaks position:sticky on thead/th */
table.requirements-list-table {
  overflow: visible;
}
/* Requirements-List: sticky header; th is positioning context for absolute resize handles */
.requirements-list-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f5f5f5;
}
.requirements-list-body-scroll .requirements-tree-table thead th {
  position: sticky;
  top: 0;
  z-index: 16;
  background: #f5f5f5;
  box-shadow: 0 1px 0 #ddd;
}
.requirements-tree-table-wrap {
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
}
/* Scrollport is .requirements-list-body-scroll; keep header cells above tbody while scrolling */
.requirements-list-body-scroll .requirements-list-table thead th {
  z-index: 13;
}
/* No. + ID: avoid overlap into Level/Title when table is narrow (Spec/Sel. columns may precede) */
.requirements-list-table th.req-col-no,
.requirements-list-table td[data-column="no"],
.requirements-list-table th.req-col-id,
.requirements-list-table td[data-column="id"] {
  box-sizing: border-box;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.requirements-list-table th.req-col-id,
.requirements-list-table td[data-column="id"] {
  text-align: left;
}
.requirements-list-table th.req-spec-export-th,
.requirements-list-table td.req-spec-export-cell {
  width: 2.75rem;
  min-width: 2.5rem;
  max-width: 3.5rem;
  box-sizing: border-box;
  vertical-align: top;
}
.requirements-list-table td.req-spec-export-cell.is-hidden {
  background: #d8d8d8;
}
.requirements-list-table .req-spec-export-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0.1rem 0.2rem;
  border-radius: 4px;
}
.requirements-list-table .req-spec-export-toggle:hover {
  background: rgba(0, 0, 0, 0.06);
}
.requirements-list-table .req-spec-export-toggle--off {
  opacity: 0.5;
  text-decoration: line-through;
}
/* Tree view: spec export toggle next to EPIC/HLR/US/ACC */
.taxonomy-tree-folder .req-spec-export-tree-wrap,
.taxonomy-tree-item .req-spec-export-tree-wrap {
  display: inline-flex;
  align-items: center;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.taxonomy-tree-folder .req-spec-export-toggle,
.taxonomy-tree-item .req-spec-export-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.15rem;
}
.taxonomy-tree-folder .req-spec-export-toggle--off,
.taxonomy-tree-item .req-spec-export-toggle--off {
  opacity: 0.5;
  text-decoration: line-through;
}
.req-spec-export-toggle--tree {
  font-size: 0.95rem;
}
/* Full View: No. cell triggers floating actions bubble (see setupRequirementsListActionsBubble) */
.requirements-list-table td[data-column="title"].req-title-cell--full-view {
  position: relative;
  vertical-align: top;
}
.requirements-list-table .req-title-cell-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
}
.requirements-list-table .req-title-text-wrap {
  flex: 1;
  min-width: 0;
}
table.requirements-list-table.requirements-list-table--full-nowrap td.requirements-list-cell--ellipsis {
  overflow: hidden;
}
table.requirements-list-table.requirements-list-table--full-nowrap .requirements-list-cell-ellipsis {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}
table.requirements-list-table.requirements-list-table--full-nowrap .req-title-text-wrap.requirements-list-cell-ellipsis {
  display: block;
}
/* Shared hover action bubble (Requirements-List + BPMN, Data Model, Glossary) */
.alm-row-actions-bubble,
.requirements-actions-bubble {
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.18);
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--alm-border, #ddd);
  padding: 0.4rem 0.55rem;
  max-width: min(96vw, 1280px);
  pointer-events: auto;
}
.alm-row-actions-bubble-inner,
.requirements-actions-bubble-inner {
  min-width: 0;
}
.alm-row-actions-bubble-buttons.action-buttons,
.requirements-actions-bubble-buttons.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  align-content: flex-start;
}
.alm-row-actions-bubble-buttons.action-buttons button,
.requirements-actions-bubble-buttons.action-buttons button {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #2196F3;
  color: white;
}
.alm-row-actions-bubble-buttons.action-buttons button:hover,
.requirements-actions-bubble-buttons.action-buttons button:hover {
  filter: brightness(1.05);
}
/* Hover ⋮ trigger for non–requirements-list tables/trees */
.alm-row-actions-trigger {
  flex-shrink: 0;
  align-self: flex-start;
  padding: 0.1rem 0.35rem;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 4px;
  background: rgba(0, 83, 219, 0.06);
  color: var(--alm-primary-strong, #1565c0);
}
.alm-row-actions-trigger:hover,
.alm-row-actions-trigger:focus-visible {
  border-color: rgba(0, 83, 219, 0.25);
  background: rgba(0, 83, 219, 0.1);
  outline: none;
}
/* Tree rows: taxonomy-tree-folder-actions still used where inline buttons remain */
.taxonomy-tree-folder-actions.alm-tree-actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 2rem;
}
/* No. column: all values left; override data-model center; left padding uniform in JS (not per level) */
.requirements-list-table th:nth-child(1) {
  text-align: left;
}
.requirements-list-table td.req-no-cell {
  font-variant-numeric: tabular-nums;
  text-align: left !important;
  /* padding-left: uniform via renderTreeTableRow (setProperty important) */
  padding-right: 0.5rem !important;
}
/* Multiline plain text: Enter/newlines visible in list table cells */
.requirements-list-table td[data-column="description"],
.requirements-list-table td[data-column="comments"],
.requirements-list-table td[data-column="source"],
.requirements-list-table td[data-column="related-requirements"] {
  white-space: pre-line;
  word-break: break-word;
  vertical-align: top;
}
/* User Story preview: ACC description body after title */
#us-preview-body .us-preview-acc-body {
  white-space: pre-line;
  word-break: break-word;
}
/* Requirements-List: soft semantic tints for Priority / Plateau / Status values. */
.requirements-list-table td.requirements-list-semantic-field select,
.requirements-list-table td.requirements-list-semantic-field > span {
  background: var(--req-semantic-bg, #f8fafc);
  border-color: var(--req-semantic-border, #d6dde7);
  color: var(--req-semantic-text, #374151);
  font-weight: 600;
}
.requirements-list-table td.requirements-list-semantic-field select {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}
.requirements-list-table td.requirements-list-semantic-field > span {
  display: block;
  padding: 0.2rem;
  border: 1px solid var(--req-semantic-border, #d6dde7);
  border-radius: 8px;
}
.requirements-list-semantic-field--green {
  --req-semantic-bg: #edf7ef;
  --req-semantic-border: #b9dcc1;
  --req-semantic-text: #245c36;
}
.requirements-list-semantic-field--blue {
  --req-semantic-bg: #eef6ff;
  --req-semantic-border: #bdd8f2;
  --req-semantic-text: #255a8b;
}
.requirements-list-semantic-field--teal {
  --req-semantic-bg: #edf8f7;
  --req-semantic-border: #b8dcda;
  --req-semantic-text: #24615f;
}
.requirements-list-semantic-field--neutral {
  --req-semantic-bg: #f4f6f8;
  --req-semantic-border: #d1d8e0;
  --req-semantic-text: #44505c;
}
.requirements-list-semantic-field--rose {
  --req-semantic-bg: #fbf1f3;
  --req-semantic-border: #e5c2c8;
  --req-semantic-text: #8a3b49;
}
.requirements-list-semantic-field--violet {
  --req-semantic-bg: #f5f1fb;
  --req-semantic-border: #d4c3ec;
  --req-semantic-text: #5d477f;
}
.requirements-list-semantic-field--amber {
  --req-semantic-bg: #fbf6ea;
  --req-semantic-border: #e4d19e;
  --req-semantic-text: #705822;
}
.requirements-list-semantic-field--indigo {
  --req-semantic-bg: #f0f3fa;
  --req-semantic-border: #c1cbe1;
  --req-semantic-text: #435274;
}
.requirements-list-semantic-field--gray {
  --req-semantic-bg: #f1f3f5;
  --req-semantic-border: #c9d0d7;
  --req-semantic-text: #4b5563;
}
.requirements-quality-score-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.requirements-quality-score-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.requirement-score-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  background: #9e9e9e;
}
.score-strong {
  color: #2e7d32;
  font-weight: 600;
}
.score-medium {
  color: #f9a825;
}
.score-weak {
  color: #c62828;
}
.score-unknown {
  color: #616161;
}
/* ARIS baseline: red "?" when requirement differs from last-synced baseline (Title, Description, Role, Priority, Plateau, Status) */
.baseline-dirty-indicator {
  color: #c62828;
  font-weight: bold;
  margin-right: 0.25em;
  cursor: help;
}
/* Visual styling for requirement types */
.tree-row-level-0[data-requirement-type="EPIC"] { font-weight: bold; background-color: rgba(31, 90, 166, 0.05) !important; }
.tree-row-level-1[data-requirement-type="HLR"] { font-weight: 600; }
/* Taxonomy Tree styles - matching Data_Desk_20.html navigation tree */
.taxonomy-tree-container {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.ui-inventory-container {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
/* UI Inventory: Page = H1-like, Form = H2-like, Component = H3-like */
.ui-inventory-page-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 1.1rem;
  font-weight: bold;
  background: rgba(31, 90, 166, 0.08);
  border-left: 3px solid rgba(31, 90, 166, 0.6);
}
.ui-inventory-page-row:hover {
  background: rgba(31, 90, 166, 0.12);
}
.ui-inventory-page-row-selected {
  font-weight: 700;
  background: rgba(31, 90, 166, 0.12);
}
.ui-inventory-form-row-selected {
  font-weight: 600;
  background: rgba(31, 90, 166, 0.06);
}
.ui-inventory-row-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.ui-inventory-fold-toggle {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  border: 1px solid rgba(31, 90, 166, 0.22);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  color: rgba(31, 90, 166, 0.85);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  line-height: 1;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.ui-inventory-fold-toggle:hover,
.ui-inventory-fold-toggle:focus-visible {
  background: rgba(31, 90, 166, 0.08);
  border-color: rgba(31, 90, 166, 0.45);
  outline: none;
}
.ui-inventory-fold-toggle--expanded {
  transform: rotate(90deg);
}
.ui-inventory-row-actions {
  /* Inherit layout from taxonomy-tree-folder-actions for consistency */
  display: flex;
  gap: 0.25rem;
  margin-left: 0.5rem;
}
.ui-inventory-form-row,
.ui-inventory-component-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  padding: 2px 0;
}
.ui-inventory-form-row {
  cursor: pointer;
  user-select: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s ease;
  font-size: 1rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.03);
  border-left: 2px solid rgba(0, 0, 0, 0.1);
}
.ui-inventory-form-row:hover {
  background: rgba(31, 90, 166, 0.04);
}
.ui-inventory-component-row {
  font-size: 0.95rem;
  padding-left: 0.5rem;
}
.ui-inventory-form-row-label,
.ui-inventory-component-row-label {
  font-size: inherit;
}

/* UI Inventory 3-column layout */
.ui-inventory-table {
  width: 100%;
  min-width: max(100%, 1120px);
  border-collapse: collapse;
  margin-top: 0.5rem;
  table-layout: fixed;
}
.ui-inventory-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  text-align: left;
  padding: 8px 10px;
  font-weight: 600;
  border-bottom: 1px solid var(--alm-border, #e0e0e0);
  background: var(--alm-surface-2, #f0f4f7);
  box-shadow: 0 1px 0 var(--alm-border, #e0e0e0);
}
.ui-inventory-table-scrollport .ui-inventory-table thead th {
  z-index: 13;
}
.ui-inventory-table tbody td {
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}
.ui-inventory-col-elements {
  min-width: 280px;
}
.ui-inventory-col-data {
  min-width: 180px;
}
.ui-inventory-col-requirements {
  min-width: 200px;
}
.ui-inventory-col-journey-step {
  min-width: 200px;
}
.ui-inventory-col-elements .ui-inventory-indent-form { padding-left: 1.5rem; }
.ui-inventory-col-elements .ui-inventory-indent-component { padding-left: 2.5rem; }
.ui-inventory-data-list,
.ui-inventory-req-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 0.9rem;
}
.ui-inventory-data-list li,
.ui-inventory-req-list li { margin: 0.2rem 0; }
.ui-inventory-req-list a { text-decoration: none; }
.ui-inventory-req-list a:hover { text-decoration: underline; }

.taxonomy-tree-node {
  margin: 4px 0;
}
.taxonomy-tree-folder {
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease;
}
.taxonomy-tree-folder:hover {
  background: rgba(31, 90, 166, 0.06);
}
.taxonomy-tree-folder.expanded {
  background: rgba(31, 90, 166, 0.04);
}
.taxonomy-tree-folder-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(31, 90, 166, 0.8);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.taxonomy-tree-folder.expanded .taxonomy-tree-folder-icon {
  transform: rotate(90deg);
}
.taxonomy-tree-folder-title {
  font-weight: 700;
  font-size: 15px;
  color: #1a1a1a;
  flex: 1;
}
/* BPMN tree: title box matches text width so row-actions bubble anchors next to the label */
.bpmn-taxonomy-tree .taxonomy-tree-folder-title,
.bpmn-taxonomy-tree .taxonomy-tree-item-title {
  flex: 0 1 auto;
  min-width: 0;
}
.bpmn-tree-process-flow-shortcut {
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: 1px solid #c9d8ea;
  border-radius: 0.45rem;
  background: #f8fbff;
  color: #1f5aa6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.bpmn-tree-process-flow-shortcut:hover {
  background: #eaf3ff;
  border-color: #8cb6e8;
  box-shadow: 0 0 0 1px rgba(31, 90, 166, 0.08);
}
.bpmn-tree-process-flow-shortcut:focus-visible {
  outline: 2px solid #1f5aa6;
  outline-offset: 1px;
}
.bpmn-tree-process-flow-shortcut__glyph {
  width: 0.78rem;
  height: 0.56rem;
  border: 2px solid currentColor;
  border-radius: 0.2rem;
  box-sizing: border-box;
  position: relative;
}
.bpmn-tree-process-flow-shortcut__glyph::after {
  content: '';
  position: absolute;
  right: -0.32rem;
  top: 50%;
  width: 0.28rem;
  height: 0.28rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}
.taxonomy-tree-folder-actions {
  display: flex;
  gap: 0.25rem;
  margin-left: 0.5rem;
}
.taxonomy-tree-folder-actions button {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #2196F3;
  color: white;
  transition: background 0.15s ease;
}
.taxonomy-tree-folder-actions button:hover {
  background: #1976D2;
}
.taxonomy-tree-content {
  margin-left: 32px;
  display: none;
}
.taxonomy-tree-folder.expanded + .taxonomy-tree-content {
  display: block;
}
.taxonomy-tree-item {
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.taxonomy-tree-item:hover {
  background: rgba(31, 90, 166, 0.04);
}
.taxonomy-tree-item-title {
  flex: 1;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  white-space: pre-line;
  word-break: break-word;
}
.taxonomy-tree-item-title:hover {
  color: #1976D2;
  text-decoration: underline;
}
.taxonomy-tree-item-actions {
  display: flex;
  gap: 0.25rem;
  margin-left: 0.5rem;
}
.taxonomy-tree-item-actions button {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #2196F3;
  color: white;
  transition: background 0.15s ease;
}
.taxonomy-tree-item-actions button:hover {
  background: #1976D2;
}
.tree-row-level-2[data-requirement-type="US"] { font-weight: bold; color: #1976d2; }
.tree-row-level-3[data-requirement-type="ACC"] { font-style: italic; }
.action-buttons button:hover { background: #1976D2; }
/* Ensure attribute actions in Attributes view look like other action buttons */
.action-buttons button + button { margin-left: 0.25rem; }
/* Version chip: in-flow inside .almanac-chrome-row (was fixed top-right and overlapped save status) */
.almanac-chrome-row .version-number {
  color: #fff;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: Arial, sans-serif;
  line-height: 1.3;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  flex: 0 1 auto;
  min-width: 0;
}
.version-number.almanac-env-dev { background: #a55757; }
.version-number.almanac-env-share { background: #2e7d32; }
.version-number.almanac-env-author { background: #e65100; }
.version-number.almanac-env-bundle { background: #7b1fa2; }
.version-number.almanac-env-public {
  background: #f8fafc;
  border: 1px solid #94a3b8;
  color: #1f2937;
}
.version-number:not([class*="almanac-env-"]) { background: rgba(0, 0, 0, 0.7); }

.almanac-chrome-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.4rem;
  padding: 0.3rem 0.45rem;
  font-size: 0.82rem;
  color: #333;
  background: #f5f5f5;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}
.almanac-history-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}
.almanac-history-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #1f4f96;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.almanac-history-btn:hover:not(:disabled),
.almanac-history-btn:focus-visible:not(:disabled) {
  background: #e8f1ff;
  border-color: #7fb1f0;
  color: #0f4c81;
  outline: none;
}
.almanac-history-btn:disabled {
  opacity: 0.45;
  cursor: default;
  color: #7a8a9a;
  background: #f8fafc;
}
.almanac-breadcrumb { flex: 1 1 14rem; min-width: 0; font-weight: 500; }
.almanac-chrome-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.6rem;
  flex: 1 1 auto;
  min-width: 0;
}
.almanac-chrome-meta .almanac-save-status { flex: 0 1 auto; color: #555; max-width: 100%; text-align: right; }
.almanac-source-update-chip {
  flex: 0 0 auto;
  padding: 0.25rem 0.65rem;
  border: 1px solid #0d5ea8;
  border-radius: 999px;
  background: #1976d2;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  box-shadow: var(--alm-shadow-sm);
}
.almanac-source-update-chip:hover,
.almanac-source-update-chip:focus-visible {
  background: #0d5ea8;
  outline: none;
}
.almanac-source-update-chip[hidden] {
  display: none !important;
}
.almanac-local-ai-health-chip {
  flex: 0 0 auto;
  padding: 0.25rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  box-shadow: var(--alm-shadow-sm);
}
.almanac-local-ai-health-chip:hover,
.almanac-local-ai-health-chip:focus-visible {
  filter: brightness(0.97);
  outline: none;
}
.almanac-local-ai-health-chip--checking {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}
.almanac-local-ai-health-chip--ready {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.almanac-local-ai-health-chip--needs-model {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}
.almanac-local-ai-health-chip--unreachable,
.almanac-local-ai-health-chip--hidden {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}
.almanac-local-ai-health-chip[hidden] {
  display: none !important;
}
.almanac-shortcut-hint { flex: 0 0 auto; font-size: 0.75rem; color: #888; white-space: nowrap; }

.almanac-toast-host { position: fixed; bottom: 1rem; right: 1rem; z-index: 10050; display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; max-width: min(420px, 92vw); pointer-events: none; }
.almanac-toast { pointer-events: auto; padding: 0.6rem 0.85rem; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,0.18); font-size: 0.88rem; line-height: 1.35; }
.almanac-toast-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.almanac-toast-error { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }
.almanac-toast-warning { background: #fff8e1; color: #f57f17; border: 1px solid #ffe082; }
.almanac-toast-info { background: #e3f2fd; color: #0d47a1; border: 1px solid #90caf9; }
.almanac-toast-out { opacity: 0; transform: translateY(6px); transition: opacity 0.25s ease, transform 0.25s ease; }

.almanac-confirm-overlay { position: fixed; inset: 0; z-index: 10060; background: rgba(0,0,0,0.45); display: none; align-items: center; justify-content: center; padding: 1rem; }
.almanac-confirm-panel { background: #fff; border-radius: 8px; max-width: min(480px, 96vw); padding: 1rem 1.25rem; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.almanac-confirm-title { margin: 0 0 0.5rem 0; font-size: 1.05rem; }
.almanac-confirm-message { margin-bottom: 1rem; white-space: pre-wrap; font-size: 0.9rem; color: #333; }
.almanac-confirm-actions { display: flex; gap: 0.5rem; justify-content: flex-end; flex-wrap: wrap; }

.almanac-bpmn-draft-process-intro { margin: 0 0 1rem 0; font-size: 0.9rem; color: #333; line-height: 1.45; }
.almanac-bpmn-draft-process-intro p:last-child { margin-bottom: 0; }
.almanac-bpmn-draft-process-field { margin-bottom: 1rem; }
.almanac-bpmn-draft-process-field label { display: block; margin-bottom: 0.35rem; font-size: 0.85rem; color: #444; }
.almanac-bpmn-draft-process-field select { width: 100%; max-width: 100%; padding: 0.4rem; font-size: 0.9rem; box-sizing: border-box; }
.almanac-bpmn-draft-process-check { display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.75rem; }
.almanac-bpmn-draft-process-check input[type="checkbox"] { margin-top: 0.2rem; flex-shrink: 0; }
.almanac-bpmn-draft-process-check label { margin-bottom: 0; font-weight: normal; cursor: pointer; line-height: 1.35; }

.almanac-command-palette-overlay { position: fixed; inset: 0; z-index: 10055; background: rgba(0,0,0,0.4); display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.almanac-command-palette-box { background: #fff; border-radius: 8px; width: min(520px, 94vw); box-shadow: 0 12px 40px rgba(0,0,0,0.22); overflow: hidden; }
.almanac-command-palette-input { width: 100%; box-sizing: border-box; padding: 0.65rem 0.85rem; font-size: 1rem; border: none; border-bottom: 1px solid #e0e0e0; outline: none; }
.almanac-command-palette-list { max-height: 320px; overflow-y: auto; padding: 0.35rem; }
.almanac-command-palette-section { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #666; padding: 0.35rem 0.65rem 0.2rem; margin-top: 0.25rem; }
.almanac-command-palette-section:first-child { margin-top: 0; }
.almanac-command-palette-item { display: block; width: 100%; text-align: left; padding: 0.45rem 0.65rem; margin: 0.15rem 0; border: none; border-radius: 4px; background: #fafafa; cursor: pointer; font-size: 0.9rem; }
.almanac-command-palette-item:hover { background: #e3f2fd; }
.almanac-command-palette-item-active { background: #bbdefb !important; outline: 1px solid #64b5f6; }

.validation-summary-bar .requirements-completeness-line { flex: 1 1 100%; font-size: 0.82rem; color: #424242; }

/* Requirement modal: BR-only progressive nudge (Level = BR) */
.req-modal-br-nudge-wrap {
  margin: 0.35rem 0 0.5rem 0;
  background: #e8f4fd;
  border: 1px solid #90caf9;
  border-radius: 6px;
  font-size: 0.84rem;
  line-height: 1.4;
  color: #0d47a1;
  overflow: hidden;
}
.req-modal-br-nudge-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  font-weight: 600;
  color: #01579b;
  cursor: pointer;
  list-style: none;
}
.req-modal-br-nudge-title::-webkit-details-marker { display: none; }
.req-modal-br-nudge-wrap[open] .req-modal-br-nudge-title { border-bottom: 1px solid rgba(144, 202, 249, 0.75); }
.req-modal-br-nudge-list {
  margin: 0;
  padding: 0.55rem 0.9rem 0.75rem 1.9rem;
}
.req-modal-br-nudge-list li { margin-bottom: 0.25rem; }
.req-modal-br-nudge-list li:last-child { margin-bottom: 0; }

select[multiple] { min-height: 100px; padding: 0.5rem; }
.content-type-dropdown { position: absolute; top: 100%; left: 0; background: white; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); z-index: 1000; min-width: 200px; max-height: 300px; overflow-y: auto; margin-top: 2px; }
.content-type-dropdown > div { padding: 0.5rem 1rem; cursor: pointer; }
.content-type-dropdown > div:hover { background: #f0f0f0; }
/* Create/Edit relation: searchable "To term" combobox, list max 10 lines */
.relation-to-term-combobox-wrap { position: relative; }
.relation-to-term-list-wrap { position: absolute; top: 100%; left: 0; right: 0; background: white; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); z-index: 1001; margin-top: 2px; max-height: 10em; overflow-y: auto; }
.relation-to-term-option { padding: 0.35rem 0.75rem; cursor: pointer; font-size: 0.95rem; }
.relation-to-term-option:hover { background: #f0f0f0; }
/* BPMN Flow Visualization styles */
.bpmn-flow-modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); }
.bpmn-flow-modal.active { display: flex; flex-direction: column; }
.bpmn-flow-content { background-color: #fefefe; margin: 2% auto; padding: 20px; border: 1px solid #888; width: 95%; max-width: 1400px; max-height: 90vh; border-radius: 8px; display: flex; flex-direction: column; }
.bpmn-flow-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #ddd; }
.bpmn-flow-header h3 { margin: 0; }
.bpmn-flow-close { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; background: none; border: none; padding: 0; }
.bpmn-flow-close:hover { color: black; }
.bpmn-flow-body { display: flex; flex: 1; gap: 1rem; overflow: hidden; }
.bpmn-flow-diagram-container { flex: 1; overflow: auto; border: 1px solid #ddd; border-radius: 4px; background: #f9f9f9; padding: 20px; }
.bpmn-sequence-flow-label-editor {
  position: fixed;
  z-index: 4200;
  box-sizing: border-box;
  min-height: 30px;
  padding: 0.3rem 0.5rem;
  border: 1px solid #90a4ae;
  border-radius: 6px;
  background: #fff;
  color: #17324d;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}
.bpmn-sequence-flow-label-editor:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18), 0 8px 18px rgba(15, 23, 42, 0.18);
}
.bpmn-inline-flow-column { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.bpmn-flow-diagram-inline { flex: 1; min-height: min(400px, 100%); overflow: auto; padding: 1rem; }
.bpmn-flow-details-panel { width: 350px; min-width: 350px; border: 1px solid #ddd; border-radius: 4px; padding: 1rem; background: #fafafa; overflow-y: auto; }
.bpmn-swimlane { border-bottom: 1px solid #999; }
.bpmn-swimlane-label { font-weight: bold; padding: 10px; background: #e0e0e0; }
.bpmn-task { fill: #c8e6c9; stroke: #2e7d32; stroke-width: 1.5; cursor: pointer; }
.bpmn-task:hover { fill: #a5d6a7; stroke-width: 2; }
.bpmn-task-external { fill: #fff3e0; stroke: #ff9800; stroke-dasharray: 4 3; }
.bpmn-flow-external .bpmn-task-text { fill: #333; }
.bpmn-gateway-shape-external { fill: #fff3e0; }
.bpmn-task-text { pointer-events: none; font-size: 12px; text-anchor: middle; }
/* Completeness: error / warning / info (inline fill on circle overrides for color) */
.bpmn-task-status-dot { cursor: pointer; }
.bpmn-flow-arrow { stroke: #000; stroke-width: 2; fill: none; }
/* BPMN inline flow: business object links (data association, distinct from sequence flow) */
.bpmn-bol-association-layer { pointer-events: auto; }
.bpmn-bol-association-line { pointer-events: stroke; }
.bpmn-bol-node { fill: #fff9c4; stroke: #f57f17; stroke-width: 1.25; }
.bpmn-bol-node-group:hover .bpmn-bol-node { fill: #fff59d; stroke-width: 1.75; }
.bpmn-bol-node-text { pointer-events: none; fill: #5d4037; text-anchor: middle; }

.bpmn-related-system-layer { pointer-events: auto; }
.bpmn-related-system-association-line { pointer-events: stroke; }
.bpmn-related-system-node { fill: #ede7f6; stroke: #6a1b9a; stroke-width: 1.25; }
.bpmn-related-system-node-group:hover .bpmn-related-system-node { fill: #d1c4e9; stroke-width: 1.75; }
.bpmn-related-system-node-text { pointer-events: none; fill: #4a148c; text-anchor: middle; }
/* BPMN inline flow: hover + insert / quick business objects (QA live in .bpmn-flow-quick-actions-top-layer above BO chips) */
/* Invisible QA must not capture pointer events — otherwise they sit above tasks/edges and block mouseenter on .bpmn-task-group, so hover never reveals controls. */
.bpmn-flow-quick-action { opacity: 0; pointer-events: none; transition: opacity 0.12s ease; cursor: pointer; }
.bpmn-flow-quick-action.bpmn-flow-quick-action--visible { opacity: 1; pointer-events: auto; }
.bpmn-flow-quick-action-hit { fill: #e0f7fa; stroke: #00838f; stroke-width: 1.5; }
.bpmn-flow-quick-action:hover .bpmn-flow-quick-action-hit { fill: #b2ebf2; }
.bpmn-flow-quick-action-plus { pointer-events: none; fill: #006064; font-size: 15px; font-weight: bold; text-anchor: middle; }
.bpmn-flow-quick-link-icon { pointer-events: none; }
/* BPMN flow: compact insert-before/after picker (icons + native title tooltips) */
.bpmn-flow-insert-type-panel {
  position: fixed;
  z-index: 4001;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  padding: 0.4rem 0.5rem;
  box-sizing: border-box;
  max-width: min(220px, calc(100vw - 16px));
}
.bpmn-flow-insert-type-panel__title {
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  line-height: 1.2;
  color: #333;
}
.bpmn-flow-insert-type-panel__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.bpmn-flow-insert-type-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  padding: 2px;
  margin: 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fafafa;
  cursor: pointer;
  line-height: 0;
}
.bpmn-flow-insert-type-btn:hover {
  background: #e3f2fd;
  border-color: #90caf9;
}
.bpmn-flow-insert-type-btn:focus-visible {
  outline: 2px solid #1976d2;
  outline-offset: 1px;
}
.bpmn-flow-insert-type-btn svg {
  display: block;
  width: 22px;
  height: 22px;
}
/* Journey Flow Visualization modal */
.journey-flow-modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); align-items: flex-start; justify-content: center; padding: 2rem 0; }
.journey-flow-modal.active { display: flex; }
.journey-flow-journey-picker-wrap { position: relative; display: inline-block; vertical-align: middle; }
.journey-flow-journey-picker-btn { padding: 0.3rem 0.55rem; font-size: 0.88rem; cursor: pointer; border: 1px solid #ccc; border-radius: 4px; background: #fff; }
.journey-flow-journey-picker-panel {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 220px;
  max-height: min(50vh, 320px);
  overflow: auto;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  z-index: 2500;
  padding: 0.5rem;
}
.journey-flow-journey-picker-actions { display: flex; gap: 0.35rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.journey-flow-journey-picker-actions button { padding: 0.2rem 0.45rem; font-size: 0.8rem; cursor: pointer; border: 1px solid #ccc; border-radius: 4px; background: #f5f5f5; }
.journey-flow-journey-picker-list { display: flex; flex-direction: column; gap: 0.25rem; }
.journey-flow-journey-picker-row { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; font-size: 0.85rem; }
.journey-flow-content { background-color: #fefefe; padding: 20px; border: 1px solid #888; width: 95%; max-width: 1200px; max-height: 90vh; border-radius: 8px; display: flex; flex-direction: column; }
.journey-flow-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; padding-bottom: 0.75rem; border-bottom: 1px solid #ddd; }
.journey-flow-header h3 { margin: 0; }
.journey-flow-close { color: #aaa; font-size: 28px; font-weight: bold; cursor: pointer; background: none; border: none; padding: 0; }
.journey-flow-close:hover { color: black; }
.journey-flow-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; min-height: 300px; }
.journey-flow-diagram-container { flex: 1; overflow: auto; border: 1px solid #ddd; border-radius: 4px; background: #f9f9f9; padding: 1rem; min-height: 200px; }
.journey-flow-columns { position: relative; }
.journey-flow-node { min-width: 140px; position: relative; z-index: 1; }
.journey-flow-node-event { background: #d5e8d4 !important; border-left: 4px solid #82b366 !important; }
.journey-flow-node-external { border: 2px dashed #ff9800; background: #fff3e0; opacity: 0.95; }
.journey-flow-node-step { }
.journey-flow-node.highlighted { background: #e3f2fd; border-color: #2196F3; transition: background 0.15s ease, border-color 0.15s ease; }
.journey-flow-node-event.highlighted { background: #c5e1c5; border-color: #2196F3; }
.journey-flow-node-step.highlighted { background: #e8eaf6; border-color: #2196F3; }
.journey-flow-node-external.highlighted { opacity: 1; }
.journey-flow-lines .journey-flow-line.highlighted { stroke: #2196F3; stroke-width: 3; transition: stroke 0.15s ease, stroke-width 0.15s ease; }
.journey-flow-node.dimmed { opacity: 0.35; transition: opacity 0.15s ease; }
.journey-flow-line.dimmed { opacity: 0.35; transition: opacity 0.15s ease; }
.journey-flow-graph { display: block; width: 100%; height: 100%; min-height: 200px; }
.journey-flow-graph svg { display: block; overflow: visible; }
.journey-browse-layout {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  height: 100%;
  min-height: 0;
}
.journey-browse-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #d8e3ef;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(244, 249, 255, 0.98) 0%, rgba(250, 252, 255, 0.98) 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}
.journey-browse-toolbar__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 0.85rem;
}
.journey-browse-toolbar__title-group {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
}
.journey-browse-toolbar__title {
  margin: 0;
  color: #1f3145;
  font-size: 1.05rem;
  line-height: 1.2;
}
.journey-browse-toolbar__top-actions,
.journey-browse-toolbar__actions,
.journey-browse-toolbar__menus {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.journey-browse-toolbar__top-actions {
  justify-content: flex-end;
}
.journey-browse-toolbar__summary {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.18rem 0.65rem;
  border: 1px solid #b9d8f7;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0f4c81;
  font-size: 0.79rem;
  font-weight: 700;
  white-space: nowrap;
}
.journey-browse-toolbar__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 2.15rem;
  padding: 0.38rem 0.8rem;
  border: 1px solid #c7d7e6;
  border-radius: 999px;
  background: #fff;
  color: #29465d;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: none;
}
.journey-browse-toolbar__button:hover {
  background: #f8fbfe;
  border-color: #aac6df;
}
.journey-browse-toolbar__button--primary {
  background: linear-gradient(180deg, #1d6ed8 0%, #1565c0 100%);
  color: #fff;
  border-color: transparent;
}
.journey-browse-toolbar__button--primary:hover {
  background: linear-gradient(180deg, #1b64c7 0%, #0f57ab 100%);
  border-color: transparent;
}
.journey-browse-toolbar__button--secondary {
  background: #fff;
  color: #29465d;
  border-color: #cbd5e1;
}
.journey-browse-toolbar__button--menu {
  background: #eff6ff;
  color: #0f4c81;
  border-color: #bfdbfe;
}
.journey-browse-toolbar__button--menu:hover,
.journey-browse-toolbar__button--menu[aria-expanded="true"] {
  background: #dbeafe;
  border-color: #93c5fd;
}
.journey-browse-toolbar-menu-group {
  position: relative;
  display: inline-flex;
}
.journey-browse-toolbar-menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(22rem, calc(100vw - 3rem));
  max-width: calc(100vw - 3rem);
  padding: 0.75rem;
  border: 1px solid #d8e3ef;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
  overflow-x: hidden;
}
.journey-browse-toolbar-menu-panel[hidden] {
  display: none !important;
}
.journey-browse-toolbar-menu-section {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.journey-browse-toolbar-menu-section + .journey-browse-toolbar-menu-section {
  padding-top: 0.7rem;
  border-top: 1px solid #e5edf4;
}
.journey-browse-toolbar-menu-section-label {
  color: #5f7689;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.journey-browse-toolbar-menu-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}
.journey-browse-toolbar-menu-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  width: 100%;
  padding: 0.45rem 0.7rem;
  border: 1px solid #dbe4ec;
  border-radius: 10px;
  background: #f8fafc;
  color: #29465d;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
}
.journey-browse-toolbar-menu-action:hover {
  background: #eef5fb;
  border-color: #bfd2e4;
}
.journey-browse-toolbar-menu-action--compact {
  min-height: 2rem;
  padding: 0.38rem 0.55rem;
  font-size: 0.8rem;
}
.journey-browse-list {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
}
.journey-browse-empty {
  color: #64748b;
  font-size: 0.88rem;
  font-style: italic;
  padding: 0.35rem 0.1rem;
}
.journey-browse-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid #dbe4ec;
  border-radius: 12px;
  background: #f8fafc;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.journey-browse-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.journey-browse-item.is-active {
  background: #e0f2fe;
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.16);
}
.journey-browse-item__selection {
  margin: 0;
  cursor: pointer;
}
.journey-browse-item__reorder {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.journey-browse-item__reorder-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  min-height: 1.15rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #52677a;
  font-size: 0.72rem;
  cursor: pointer;
}
.journey-browse-item__reorder-btn:hover {
  background: rgba(148, 163, 184, 0.16);
}
.journey-browse-item__title {
  min-width: 0;
  user-select: none;
  font-weight: 600;
}
.journey-browse-item__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0 0.4rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font-size: 1rem;
  cursor: pointer;
}
.journey-browse-item__icon-btn:hover {
  background: rgba(148, 163, 184, 0.16);
}
.journey-browse-item__icon-btn--danger {
  color: #d32f2f;
  font-size: 1.15rem;
}
.journey-detail-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  min-height: 0;
}
.journey-detail-main {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}
.journey-detail-workspace {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  --journey-detail-stage-sticky-top: 13rem;
}
.journey-detail-toolbar-frame {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 10;
  width: var(--journey-detail-toolbar-width, 100%);
  max-width: var(--journey-detail-toolbar-width, 100%);
  transform: translateX(var(--journey-detail-toolbar-scroll-left, 0px));
}
.journey-detail-toolbar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: 100%;
  max-width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid #d8e3ef;
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(224, 242, 254, 0.48), transparent 38%),
    linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(241, 247, 252, 0.98) 100%);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.09);
  backdrop-filter: blur(8px);
  box-sizing: border-box;
}
.journey-detail-toolbar__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}
.journey-detail-toolbar__title-group {
  display: flex;
  min-width: 0;
  flex: 1 1 20rem;
  flex-direction: column;
  gap: 0.2rem;
}
.journey-detail-toolbar__title {
  margin: 0;
  color: #1f3145;
  font-size: 1.08rem;
  line-height: 1.2;
}
.journey-detail-toolbar__copy {
  color: #60758a;
  font-size: 0.84rem;
  line-height: 1.35;
}
.journey-detail-toolbar__summary,
.journey-detail-toolbar__controls,
.journey-detail-toolbar__primary,
.journey-detail-toolbar__menus {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.journey-detail-toolbar__summary {
  justify-content: flex-end;
}
.journey-detail-toolbar__primary {
  flex: 1 1 auto;
}
.journey-detail-toolbar__summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.95rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #d3e2f1;
  background: #fff;
  color: #2b4459;
  font-size: 0.79rem;
  font-weight: 700;
  white-space: nowrap;
}
.journey-detail-toolbar__summary-chip--info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #0f4c81;
}
.journey-detail-toolbar__summary-chip--accent {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #166534;
}
.journey-detail-toolbar__summary-chip--neutral {
  border-color: #dbe4ec;
  background: #f8fafc;
  color: #52677a;
}
.journey-detail-toolbar__control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.25rem;
  padding: 0.2rem 0.24rem 0.2rem 0.7rem;
  border: 1px solid #d3e2f1;
  border-radius: 999px;
  background: #fff;
  color: #29465d;
  box-sizing: border-box;
}
.journey-detail-toolbar__control-label {
  color: #60758a;
  font-size: 0.81rem;
  font-weight: 700;
  white-space: nowrap;
}
.journey-detail-toolbar__select {
  min-height: 1.95rem;
  min-width: min(18rem, 42vw);
  border: 1px solid #d3e2f1;
  border-radius: 999px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  padding: 0.28rem 0.65rem;
  box-sizing: border-box;
}
.journey-detail-toolbar__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 2.2rem;
  padding: 0.42rem 0.86rem;
  border: 1px solid #c7d7e6;
  border-radius: 999px;
  background: #fff;
  color: #29465d;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
}
.journey-detail-toolbar__button:hover {
  background: #f8fbfe;
  border-color: #aac6df;
}
.journey-detail-toolbar__button--primary {
  background: linear-gradient(180deg, #1d6ed8 0%, #1565c0 100%);
  border-color: transparent;
  color: #fff;
}
.journey-detail-toolbar__button--primary:hover {
  background: linear-gradient(180deg, #1b64c7 0%, #0f57ab 100%);
  border-color: transparent;
}
.journey-detail-toolbar__button--secondary {
  background: #fff;
  border-color: #cbd5e1;
  color: #29465d;
}
.journey-detail-toolbar__button--accent {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #0f4c81;
}
.journey-detail-toolbar__button--accent:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}
.journey-detail-toolbar__button--menu {
  background: #f8fafc;
  border-color: #dbe4ec;
  color: #29465d;
}
.journey-detail-toolbar__button--menu:hover,
.journey-detail-toolbar__button--menu[aria-expanded="true"] {
  background: #eef5fb;
  border-color: #bfd2e4;
}
.journey-detail-canvas {
  flex: 1;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
}
.journey-detail-stage-rail {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  padding-bottom: 0.2rem;
}
.journey-detail-stage-list {
  display: flex;
  gap: 0.85rem;
}
.journey-detail-stage-list--horizontal {
  align-items: stretch;
  min-width: max-content;
}
.journey-detail-stage-list--vertical {
  flex-direction: column;
  min-width: 0;
}
.journey-detail-stage-list--horizontal .journey-detail-stage-card {
  flex: 0 0 clamp(17rem, 24vw, 22rem);
  align-self: stretch;
}
.journey-detail-stage-list--vertical .journey-detail-stage-card {
  width: 100%;
}
.journey-detail-stage-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid #dbe4ec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.journey-detail-stage-card--external {
  border-style: dashed;
  border-width: 2px;
  border-color: #c7d2dc;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  box-shadow: none;
}
.journey-detail-stage-card__events {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.journey-detail-stage-card__event {
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
}
.journey-detail-stage-card__header {
  position: sticky;
  top: var(--journey-detail-stage-sticky-top, 13rem);
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.6rem;
  margin: -0.8rem -0.8rem 0;
  padding: 0.8rem;
  border-radius: 16px 16px 10px 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(6px);
}
.journey-detail-stage-card__reorder,
.journey-detail-step-card__reorder {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.journey-detail-stage-card__reorder-btn,
.journey-detail-step-card__reorder-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  min-height: 1.25rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #52677a;
  font-size: 0.72rem;
  cursor: pointer;
}
.journey-detail-stage-card__reorder-btn:hover,
.journey-detail-step-card__reorder-btn:hover {
  background: rgba(148, 163, 184, 0.16);
}
.journey-detail-stage-card__title-block {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.15rem;
}
.journey-detail-stage-card__title {
  min-width: 0;
  color: #1f3145;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
}
.journey-detail-stage-card--external .journey-detail-stage-card__title {
  cursor: pointer;
}
.journey-detail-stage-card__subtitle {
  color: #60758a;
  font-size: 0.76rem;
  line-height: 1.35;
}
.journey-detail-stage-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem;
}
.journey-detail-step-card__title-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-self: start;
  justify-content: flex-end;
  gap: 0.3rem;
}
.journey-detail-stage-card__action-btn,
.journey-detail-step-card__title-btn,
.journey-detail-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0 0.45rem;
  border: 1px solid #dbe4ec;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.88rem;
  cursor: pointer;
}
.journey-detail-step-card__title-btn {
  flex-shrink: 0;
}
.journey-detail-stage-card__action-btn:hover,
.journey-detail-step-card__title-btn:hover,
.journey-detail-icon-button:hover {
  background: #eef5fb;
  border-color: #bfd2e4;
}
.journey-detail-stage-card__action-btn--danger,
.journey-detail-step-card__title-btn--danger {
  color: #d32f2f;
}
.journey-detail-stage-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.journey-detail-stage-card__empty,
.journey-detail-stage-card__external-note {
  color: #64748b;
  font-size: 0.84rem;
  font-style: italic;
}
.journey-detail-step-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.journey-detail-step-card {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.6rem;
  border: 1px solid #dde5ed;
  border-radius: 14px;
  background: #fbfdff;
}
.journey-detail-step-card--selected {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.18);
}
.journey-detail-step-card__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
}
.journey-detail-step-card__title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 0.5rem;
}
.journey-detail-step-card__title {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #1f3145;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.28;
}
.journey-detail-step-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.journey-detail-step-card__badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.journey-detail-step-card__badge-row--compact {
  gap: 0.28rem;
}
.journey-detail-step-card__control-row {
  align-items: center;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.08rem;
  scrollbar-width: thin;
}
.journey-detail-step-card__badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 1.45rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid #dbe4ec;
  border-radius: 999px;
  background: #fff;
  color: #52677a;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.journey-detail-step-card__badge--link {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #0f4c81;
}
.journey-detail-step-card__badge--info {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
}
.journey-detail-step-card__badge--success {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #166534;
}
.journey-detail-step-card__badge--warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}
.journey-detail-step-card__badge--danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}
.journey-detail-step-card__badge--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #52677a;
}
.journey-detail-step-card__scenario-row {
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.4;
}
.journey-detail-step-card__requirements {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding-top: 0.45rem;
  border-top: 1px solid #e5edf4;
}
.journey-detail-step-card__requirement-link {
  color: #1565c0;
  font-size: 0.75rem;
  line-height: 1.35;
  text-decoration: none;
}
.journey-detail-step-card__requirement-link:hover {
  text-decoration: underline;
}
.journey-detail-step-card__quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 1.9rem;
  padding: 0.26rem 0.58rem;
  border: 1px solid #dbe4ec;
  border-radius: 10px;
  background: #f8fafc;
  color: #29465d;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}
.journey-detail-step-card__quick-action:hover {
  background: #eef5fb;
  border-color: #bfd2e4;
}
.journey-detail-step-card__quick-action--primary {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #0f4c81;
}
.journey-detail-step-card__quick-action--warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}
.journey-detail-step-card__quick-action--accent {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}
.journey-detail-inline-input {
  width: 100%;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  box-sizing: border-box;
}
.journey-detail-empty-state {
  padding: 1.35rem;
}
@media (max-width: 980px) {
  .glossary-graph-main,
  .glossary-graph-main--compact {
    grid-template-columns: 1fr;
  }
  .glossary-graph-canvas {
    min-height: 360px;
  }
  .glossary-graph-workspace--fill-height .glossary-graph-canvas {
    min-height: 16rem;
  }
  .glossary-graph-inspector-actions--compact {
    flex-wrap: wrap;
  }
}
@media (max-width: 640px) {
  .glossary-ontology-toolbar {
    align-items: flex-start;
  }
  .glossary-graph-controls-primary {
    grid-template-columns: 1fr;
  }
  .glossary-graph-controls-primary--fill-height {
    display: grid;
    width: 100%;
  }
  .glossary-graph-controls-secondary {
    flex-direction: column;
    align-items: stretch;
  }
  .glossary-graph-control--center,
  .glossary-graph-control--small,
  .glossary-graph-control--wide {
    min-width: 0;
    max-width: none;
  }
  .glossary-graph-viewport-tools {
    margin-left: 0;
    justify-content: flex-start;
  }
  .glossary-graph-inspector {
    padding: 0.8rem;
  }
  .glossary-graph-canvas {
    min-height: 320px;
  }
  .glossary-graph-workspace--fill-height .glossary-graph-canvas {
    min-height: 14rem;
  }
}
/* User Journey: Event cards (ArchiMate Event style) - strong specificity so they override step-like styling */
.journey-view-event-card {
  background: #d5e8d4 !important;
  border: 1px solid #82b366 !important;
  border-left-width: 4px !important;
  border-radius: 3px;
}
.journey-view-event-card:hover { filter: brightness(0.97); }
/* Journey browse list: clickable name opens stages */
.journey-list-name {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}
.journey-list-name:hover { color: #1565c0; }
@media (max-width: 959px) {
  .journey-detail-workspace {
    --journey-detail-stage-sticky-top: 16rem;
  }
  .journey-browse-toolbar {
    padding: 0.75rem 0.8rem;
  }
  .journey-detail-toolbar {
    padding: 0.8rem 0.85rem;
  }
  .journey-detail-toolbar__top {
    align-items: stretch;
  }
  .journey-detail-toolbar__summary {
    width: 100%;
    justify-content: flex-start;
  }
  .journey-detail-toolbar__primary {
    width: 100%;
  }
  .journey-detail-stage-list--horizontal .journey-detail-stage-card {
    flex-basis: min(20rem, 70vw);
  }
  .journey-browse-toolbar__top,
  .journey-browse-toolbar__top-actions {
    align-items: stretch;
  }
  .journey-browse-toolbar__top-actions {
    width: 100%;
    justify-content: space-between;
  }
  .journey-browse-toolbar-menu-panel {
    position: fixed;
  }
}
@media (max-width: 959px) {
  .journey-detail-toolbar {
    padding: 0.8rem 0.85rem;
  }
}
@media (max-width: 719px) {
  .journey-detail-workspace {
    --journey-detail-stage-sticky-top: 19rem;
  }
  .journey-detail-toolbar__summary,
  .journey-detail-toolbar__controls,
  .journey-detail-toolbar__primary,
  .journey-detail-toolbar__menus {
    flex-direction: column;
    align-items: stretch;
  }
  .journey-detail-toolbar__control,
  .journey-detail-toolbar__button,
  .journey-detail-toolbar .journey-browse-toolbar-menu-group {
    width: 100%;
  }
  .journey-detail-toolbar__control {
    border-radius: 14px;
    justify-content: space-between;
  }
  .journey-detail-toolbar__select {
    min-width: 0;
    width: 100%;
  }
  .journey-detail-stage-list--horizontal .journey-detail-stage-card {
    flex-basis: min(18rem, 85vw);
  }
  .journey-detail-stage-card__header {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .journey-detail-stage-card__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .journey-detail-step-card {
    padding: 0.6rem;
  }
  .journey-browse-toolbar__top-actions,
  .journey-browse-toolbar__actions,
  .journey-browse-toolbar__menus {
    flex-direction: column;
    align-items: stretch;
  }
  .journey-browse-toolbar-menu-group,
  .journey-browse-toolbar__button {
    width: 100%;
  }
  .journey-browse-toolbar-menu-panel {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 0.45rem;
    box-shadow: none;
  }
  .journey-browse-toolbar-menu-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .journey-browse-item {
    grid-template-columns: auto auto minmax(0, 1fr) auto auto;
    gap: 0.45rem;
    padding: 0.55rem 0.6rem;
  }
}
@media (max-width: 719px) {
  .journey-browse-toolbar__top-actions,
  .journey-browse-toolbar__actions,
  .journey-browse-toolbar__menus {
    flex-direction: column;
    align-items: stretch;
  }
}
/* BPMN tab table view */
.bpmn-view-table { table-layout: fixed; width: 100%; }
.bpmn-view-table th, .bpmn-view-table td { word-wrap: break-word; overflow-wrap: break-word; padding: 0.4rem 0.5rem; border: 1px solid #ddd; vertical-align: top; }
.bpmn-view-table th { background: #f5f5f5; font-weight: bold; white-space: nowrap; }
.bpmn-view-table tbody tr:hover { background: rgba(31, 90, 166, 0.04); }
.bpmn-view-table tbody tr.bpmn-summary-row-clickable { cursor: pointer; }
.bpmn-view-table tbody tr.bpmn-summary-row-clickable:focus { outline: 2px solid #1f5aa6; outline-offset: -2px; }
.bpmn-view-table thead th {
  position: sticky;
  top: var(--bpmn-toolbar-sticky-offset, 0px);
  z-index: 8;
  background: #f5f5f5;
  box-shadow: 0 1px 0 #d7dde4;
}

/* Glossary -> Capabilities taxonomy workspace */
.glossary-capability-taxonomy-workspace {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
  overflow: hidden;
}
.capability-taxonomy-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid #d9e2ea;
  border-radius: 10px;
  background: #f8fbfd;
  box-shadow: 0 1px 0 rgba(31, 90, 166, 0.06);
}
.capability-taxonomy-toolbar__top,
.capability-taxonomy-toolbar__controls,
.capability-taxonomy-panel,
.capability-taxonomy-details-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.capability-taxonomy-toolbar__top {
  justify-content: space-between;
}
.capability-taxonomy-toolbar__heading {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-width: 0;
}
.capability-taxonomy-toolbar__heading h3 {
  margin: 0;
  font-size: 1.12rem;
}
.capability-taxonomy-toolbar__heading span {
  color: #526271;
  font-size: 0.9rem;
}
.capability-taxonomy-control,
.capability-taxonomy-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #27313a;
  font-size: 0.9rem;
}
.capability-taxonomy-control--wide {
  flex: 1 1 18rem;
  min-width: min(100%, 16rem);
}
.capability-taxonomy-control input,
.capability-taxonomy-control select,
.capability-taxonomy-select {
  min-height: 2rem;
  border: 1px solid #cfd9e3;
  border-radius: 6px;
  background: #fff;
  padding: 0.25rem 0.45rem;
  font: inherit;
}
.capability-taxonomy-control input[type="search"] {
  width: 100%;
}
.capability-taxonomy-btn,
.capability-taxonomy-row-btn {
  min-height: 2rem;
  border: 1px solid #b8c8d8;
  border-radius: 6px;
  background: #fff;
  color: #1f5aa6;
  cursor: pointer;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
}
.capability-taxonomy-btn:hover,
.capability-taxonomy-row-btn:hover {
  background: #eef6ff;
  border-color: #8cb6e8;
}
.capability-taxonomy-btn--primary {
  background: #2f8f46;
  border-color: #2f8f46;
  color: #fff;
}
.capability-taxonomy-btn--primary:hover {
  background: #26783a;
  border-color: #26783a;
}
.capability-taxonomy-btn--active {
  background: #eaf3ff;
  border-color: #8cb6e8;
}
.capability-taxonomy-row-btn {
  min-height: 1.7rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.78rem;
}
.capability-taxonomy-row-btn--danger {
  background: #fff5f4;
  border-color: #f2b8b5;
  color: #b3261e;
}
.capability-taxonomy-layout {
  display: flex;
  gap: 1rem;
  min-height: 0;
  flex: 1 1 auto;
}
.capability-taxonomy-layout--details-hidden {
  gap: 0;
}
.capability-taxonomy-primary {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}
.capability-taxonomy-details-pane {
  flex: 0 0 min(34vw, 520px);
  width: min(34vw, 520px);
  min-width: 320px;
  min-height: 0;
  overflow: auto;
  border: 1px solid #d9e2ea;
  border-radius: 8px;
  padding: 1rem;
  background: #fafafa;
}
.capability-taxonomy-details-placeholder,
.capability-taxonomy-empty {
  color: #66717c;
  font-style: italic;
  padding: 0.75rem;
}
.capability-taxonomy-details-list {
  margin: 0.85rem 0 0;
}
.capability-taxonomy-details-list dt {
  font-weight: 700;
  margin-top: 0.45rem;
}
.capability-taxonomy-details-list dd {
  margin: 0 0 0.45rem 1rem;
}
.capability-taxonomy-details-link-list {
  margin-left: 0;
}
.capability-taxonomy-link-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
  min-width: 0;
}
.capability-taxonomy-link-item {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f5aa6;
  cursor: pointer;
  font: inherit;
  line-height: 1.28;
  text-align: left;
  overflow-wrap: anywhere;
}
.capability-taxonomy-link-item:hover,
.capability-taxonomy-link-item:focus {
  color: #0f3d75;
  text-decoration: underline;
}
.capability-taxonomy-link-empty {
  color: #71808f;
}
.capability-taxonomy-tree-row {
  padding-left: calc(0.75rem + (var(--capability-tree-level, 0) * 1.25rem));
}
.capability-taxonomy-tree .taxonomy-tree-folder-title {
  min-width: 0;
  overflow-wrap: anywhere;
}
.capability-taxonomy-tree-content {
  margin-left: 0;
}
.capability-taxonomy-table-scrollport {
  height: 100%;
}
.capability-taxonomy-table {
  table-layout: fixed;
  min-width: max(100%, 2450px);
}
.capability-taxonomy-table thead th {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #f5f5f5;
  box-shadow: 0 1px 0 #d7dde4;
}
.capability-taxonomy-table th,
.capability-taxonomy-table td {
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: normal;
}
.capability-taxonomy-table tbody tr {
  cursor: pointer;
}
.capability-taxonomy-table tbody tr:hover {
  background: rgba(31, 90, 166, 0.04);
}
.capability-taxonomy-table-tree-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding-left: calc(var(--capability-tree-level, 0) * 1.1rem);
}
.capability-taxonomy-table-toggle,
.capability-taxonomy-table-toggle-spacer {
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.capability-taxonomy-table-toggle {
  border: 1px solid #cfd9e3;
  border-radius: 5px;
  background: #fff;
  color: #1f5aa6;
  cursor: pointer;
}
.capability-taxonomy-id-cell {
  min-height: 2rem;
}
.capability-taxonomy-link-cell {
  min-width: 0;
}
.capability-taxonomy-title-cell {
  display: block;
  min-width: 0;
}
.capability-taxonomy-title-cell > span {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}
@media (max-width: 959px) {
  .capability-taxonomy-layout {
    flex-direction: column;
  }
  .capability-taxonomy-details-pane {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex-basis: auto;
  }
}
@media (max-width: 719px) {
  .capability-taxonomy-toolbar__top {
    align-items: stretch;
    flex-direction: column;
  }
  .capability-taxonomy-toolbar__controls,
  .capability-taxonomy-panel {
    align-items: stretch;
  }
  .capability-taxonomy-btn,
  .capability-taxonomy-control,
  .capability-taxonomy-checkbox {
    flex: 1 1 auto;
  }
}
@media (max-width: 959px) {
  .architecture-browse-toolbar {
    padding: 0.75rem 0.8rem;
  }
  .architecture-browse-toolbar__section {
    flex-basis: 100%;
    min-width: 0;
  }
  .bpmn-toolbar-shell {
    padding: 0.7rem;
  }
  .bpmn-toolbar-disclosure-btn {
    margin-left: 0;
  }
  .bpmn-toolbar-control {
    min-width: min(100%, 11rem);
    flex: 1 1 11rem;
  }
  .bpmn-toolbar-btn {
    width: auto;
    max-width: 100%;
  }
  .bpmn-toolbar-card {
    flex-basis: 100%;
    min-width: 0;
  }
  .bpmn-toolbar-card--process-filter,
  .bpmn-toolbar-card--visibility,
  .bpmn-toolbar-card--table-layout {
    flex-basis: 100%;
  }
  .bpmn-list-layout--sipoc.bpmn-list-layout--with-details {
    flex-direction: column;
  }
  .bpmn-list-layout--sipoc.bpmn-list-layout--with-details .bpmn-list-details-pane--sipoc {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex-basis: auto;
  }
}
@media (max-width: 719px) {
  .architecture-browse-toolbar {
    border-radius: 10px;
  }
  .architecture-browse-toolbar__top {
    flex-direction: column;
    align-items: stretch;
  }
  .architecture-browse-toolbar__summary {
    align-self: flex-start;
  }
  .architecture-browse-toolbar__filter-btn,
  .architecture-browse-toolbar__action-btn {
    flex: 1 1 auto;
  }
  .bpmn-toolbar-shell {
    border-radius: 10px;
  }
  .bpmn-toolbar-title {
    flex: 1 1 100%;
  }
  .bpmn-toolbar-bar--primary {
    gap: 0.45rem;
  }
  .bpmn-toolbar-btn,
  .bpmn-toolbar-disclosure-btn {
    flex: 1 1 auto;
  }
  .bpmn-toolbar-quick-actions {
    flex: 0 1 auto;
    max-width: 100%;
    overflow-x: auto;
  }
  .bpmn-toolbar-quick-actions .bpmn-toolbar-btn {
    flex: 0 0 auto;
  }
  .bpmn-toolbar-flow-utilities {
    flex: 1 1 100%;
  }
  .bpmn-toolbar-action-row--flow-utilities,
  .bpmn-toolbar-action-row--flow-layout-controls {
    width: 100%;
  }
  .bpmn-toolbar-action-row .bpmn-toolbar-btn {
    flex: 0 1 auto;
  }
  .bpmn-toolbar-chip {
    white-space: normal;
  }
}
.component-binding-table thead th {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #e8f1fb;
  box-shadow: 0 1px 0 #d7e3ed;
}
table.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #eee;
}
#gherkin-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #eee;
}
/* Scenario Gherkin: keep first column visible while scrolling wide tables */
#gherkin-table thead th:nth-child(1),
#gherkin-table tbody td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 9;
  background: #f9f9f9;
}
#gherkin-table thead th:nth-child(1) {
  z-index: 11;
}
.scenario-workspace-header {
  padding: 0.85rem 1rem;
  border: 1px solid #d9e2ea;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #f9fbfd 0%, #f3f7fb 100%);
}
#scenario-gherkin-rules-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.scenario-gherkin-rules-editor--embedded {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
}
.scenario-gherkin-rules-editor--embedded .scenario-gherkin-rules-form-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.scenario-gherkin-rules-editor--embedded .scenario-gherkin-rules-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid #d9e2ea;
  border-radius: 0.75rem;
  background: #fff;
}
.scenario-gherkin-rules-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: visible;
}
.scenario-gherkin-rules-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--alm-surface-2, #eee);
}
.scenario-filters-shell {
  border-top: 1px solid #d9e2ea;
  padding-top: 0.75rem;
}
.scenario-filters-results {
  color: #526271;
  font-size: 0.92rem;
}
#scenario-filters-panel {
  max-height: min(50vh, 28rem);
  overflow: auto;
  padding: 0.1rem;
  border: 1px solid #d9e2ea;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.88);
}
#scenario-filters-panel .filter-table {
  width: 100%;
}
#scenario-main-mode-bar button[data-scenario-subview].active {
  background: #bbdefb;
  border-color: #90caf9;
}
#scenario-explorer-shell {
  min-height: 0;
  align-items: start;
  grid-template-columns: var(--scenario-explorer-list-width, minmax(220px, 320px)) minmax(0, 1fr);
}
.scenario-explorer-list-pane {
  width: var(--scenario-explorer-list-width, auto);
  max-width: 100%;
  min-width: 0;
  min-height: 0;
}
.scenario-explorer-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: calc(100vh - 19rem);
  overflow: auto;
  padding-right: 0.25rem;
}
.scenario-explorer-item {
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.8rem;
  border: 1px solid #d0d7de;
  border-radius: 0.65rem;
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.scenario-explorer-item-title {
  font-weight: 600;
  white-space: nowrap;
}
.scenario-explorer-item-meta {
  font-size: 0.82rem;
  color: #5d6f80;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.scenario-explorer-item:hover {
  border-color: #90caf9;
  background: #f8fbff;
}
.scenario-explorer-item.active {
  border-color: #64b5f6;
  background: #eaf4ff;
  box-shadow: inset 0 0 0 1px rgba(33, 150, 243, 0.08);
}
.scenario-explorer-empty {
  padding: 0.85rem;
  border: 1px dashed #c7d2da;
  border-radius: 0.65rem;
  color: #607080;
  background: #fbfdff;
}
#scenario-table-container {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: calc(100vh - 19rem);
  overflow-x: auto;
  overflow-y: auto;
  padding-right: 0.25rem;
}
@media (max-width: 960px) {
  #scenario-explorer-shell {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .scenario-explorer-list-pane {
    width: auto;
  }
  .scenario-explorer-list {
    max-height: 18rem;
  }
}
/* Requirements list: sticky first column (No. / Sel. / tree) inside horizontal scroll; top+left corner above body */
#requirements-subview-container .requirements-list-table tbody td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 9;
  background: #fafafa;
}
#requirements-subview-container .requirements-list-table thead th:nth-child(1) {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 14;
  background: #fafafa;
}
#requirements-subview-container table.story-map-table thead th,
#user-intents-table-wrapper .story-map-table thead th {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #e0e0e0;
}
#requirements-subview-container table.story-map-table thead th.epic-header,
#user-intents-table-wrapper .story-map-table thead th.epic-header {
  background: #d0e8ff;
}
#user-intents-table-wrapper {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  border-radius: 14px;
}
#user-intents-table-wrapper .story-map-table th,
#user-intents-table-wrapper .story-map-table td {
  min-width: 0;
  overflow-wrap: anywhere;
}
#user-intents-table-wrapper .story-map-table select {
  min-width: 0;
}
#user-intents-table-wrapper .user-intents-catalog-table .user-intents-sticky-col {
  position: sticky;
  background: #fff;
  z-index: 7;
}
#user-intents-table-wrapper .user-intents-catalog-table thead .user-intents-sticky-col {
  z-index: 11;
  background: #e0e0e0;
}
#user-intents-table-wrapper .user-intents-catalog-table .user-intents-sticky-no {
  left: 0;
}
#user-intents-table-wrapper .user-intents-catalog-table .user-intents-sticky-id {
  left: var(--user-intents-sticky-no-width, 5rem);
}
#user-intents-table-wrapper .user-intents-catalog-table .user-intents-sticky-name {
  left: calc(var(--user-intents-sticky-no-width, 5rem) + var(--user-intents-sticky-id-width, 8rem));
  box-shadow: 1px 0 0 #d6dde6;
}
#user-intents-table-wrapper .user-intents-catalog-table tbody tr:hover .user-intents-sticky-col {
  background: #eef6ff;
}
#user-intents-table-wrapper .user-intents-id-cell {
  color: #0f4f93;
  font-weight: 700;
  cursor: default;
}
#user-intents-table-wrapper .user-intents-id-cell[contenteditable="true"],
#user-intents-table-wrapper .user-intents-id-cell[contenteditable=""] {
  min-width: 0 !important;
}
#user-intents-table-wrapper .user-intents-no-cell {
  color: #334155;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
#user-intents-table-wrapper .user-intents-primary-actor-cell {
  vertical-align: top;
}
#user-intents-table-wrapper .user-intents-primary-actor-list {
  white-space: pre-line;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}
#user-intents-table-wrapper .user-intents-primary-actor-edit {
  padding: 0.2rem 0.45rem;
  font-size: 0.78rem;
  line-height: 1.2;
}
#user-intents-table-wrapper .user-intents-requirements-section-row td {
  background: #edf5ff;
  color: #17324d;
  font-weight: 750;
}
#user-intents-table-wrapper .user-intents-requirements-section-row {
  cursor: pointer;
}
#user-intents-table-wrapper .user-intents-requirements-section-row--no-intent {
  cursor: default;
}
#user-intents-table-wrapper .user-intents-requirements-section-row:hover td,
#user-intents-table-wrapper .user-intents-requirements-section-row:focus td {
  background: #dceeff;
  outline: 2px solid #93c5fd;
  outline-offset: -2px;
}
#user-intents-table-wrapper .user-intents-requirements-section-row--no-intent:hover td,
#user-intents-table-wrapper .user-intents-requirements-section-row--no-intent:focus td {
  background: #edf5ff;
  outline: 0;
}
#user-intents-table-wrapper .user-intents-requirements-description-row td {
  background: #f8fbff;
  border-top: 0;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
}
#user-intents-table-wrapper .user-intents-requirements-description-row.is-missing-description td {
  color: #8a5a12;
}
#user-intents-table-wrapper .user-intents-requirement-quality-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
#user-intents-table-wrapper .user-intents-requirement-row.is-context td {
  color: #64748b;
}
#user-intents-table-wrapper .user-intents-requirement-row.is-direct td {
  background: #fbfdff;
}
#user-intents-table-wrapper .user-intents-requirement-link {
  border: 0;
  background: transparent;
  color: #0f4f93;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
#user-intents-table-wrapper .user-intents-requirement-link:hover {
  text-decoration: underline;
}
.user-intent-quality-rollup h3 {
  margin: 0 0 0.75rem 0;
  color: #17324d;
}
.user-intent-quality-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.user-intent-quality-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem;
  border: 1px solid #dbe4ec;
  border-radius: 8px;
  background: #f8fafc;
}
.user-intent-quality-card strong {
  color: #123f77;
  font-size: 1.05rem;
}
.user-intent-quality-card span {
  color: #64748b;
  font-size: 0.82rem;
}
.user-intent-quality-table {
  width: 100%;
}
#requirements-subview-container table.story-map-table thead th.plateau-label {
  background: #f0f0f0;
}
/* User Story Map (by Epic / by Process / by Stage tables): sticky first column while scrolling horizontally */
#requirements-subview-container table.story-map-table {
  --story-map-priority-sticky-left: 9.5rem;
}
#requirements-subview-container table.story-map-table tbody tr > td.plateau-label:first-child {
  position: sticky;
  left: 0;
  z-index: 9;
  background: #f0f0f0;
  min-width: var(--story-map-priority-sticky-left);
}
#requirements-subview-container table.story-map-table tbody tr > td.priority-label:nth-child(2) {
  position: sticky;
  left: var(--story-map-priority-sticky-left);
  z-index: 8;
  background: #f8fafc;
  min-width: 9rem;
}
#requirements-subview-container table.story-map-table thead tr > th:first-child {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 15;
  background: #e0e0e0;
  min-width: var(--story-map-priority-sticky-left);
}
#requirements-subview-container table.story-map-table thead tr > th.story-map-priority-header:nth-child(2) {
  position: sticky;
  left: var(--story-map-priority-sticky-left);
  top: 0;
  z-index: 14;
  background: #e0e0e0;
  min-width: 9rem;
}
/* Requirements Traceability: Process/Function column (multi-line, wrap long labels) */
#requirements-subview-container table.story-map-table th.traceability-col-pf,
#requirements-subview-container table.story-map-table td.traceability-col-pf {
  max-width: 14rem;
  min-width: 7rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: top;
}
#requirements-subview-container table.roles-table thead th {
  position: sticky;
  top: 0;
  z-index: 9;
  background: #e0e0e0;
}
/* User Story Map by Role: sticky first column (Epic label) */
#requirements-subview-container table.roles-table tbody tr > td:first-child {
  position: sticky;
  left: 0;
  z-index: 9;
  background: #f0f0f0;
}
#requirements-subview-container table.roles-table thead tr > th:first-child {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 15;
  background: #e0e0e0;
}
.requirements-table, .glossary-table { overflow-x: auto; }
.requirements-table table, .glossary-table table { min-width: 100%; }
/* Glossary Aliases column (3rd): one value per line */
.glossary-table th:nth-child(4), .glossary-table td:nth-child(4),
#glossary-subview-container.glossary-table th:nth-child(4), #glossary-subview-container.glossary-table td:nth-child(4) {
  white-space: pre-line;
  vertical-align: top;
}
/* Glossary Source column (7th): fixed width 120px max (long URLs truncated with ellipsis) */
.glossary-table th:nth-child(7), .glossary-table td:nth-child(7),
#glossary-subview-container.glossary-table th:nth-child(7), #glossary-subview-container.glossary-table td:nth-child(7) {
  width: 120px !important;
  max-width: 120px !important;
  min-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Requirements Kanban (status board) styles - matching USM.html design */
.status-board {
  width: 100%;
  margin-bottom: 2em;
}
.status-col {
  vertical-align: top;
  width: 33%;
  border: 1px solid #ccc;
}
.status-col h3 {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #e0e0e0;
  padding: 0.5em;
  text-align: center;
  margin-top: 0;
  margin-bottom: 0;
  font-size: 1em;
  font-weight: 600;
}
.story-card {
  background: #fff;
  border: 1px solid #ccc;
  margin: 0.5em;
  padding: 0.5em;
  border-radius: 4px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}
.story-card[data-status="Draft"] {
  border-left: 6px solid #9e9e9e;
}
.story-card[data-status="Reviewed"] {
  border-left: 6px solid #2196f3;
}
.story-card[data-status="Approved"] {
  border-left: 6px solid #4caf50;
}
.story-card[data-status="Rejected"] {
  border-left: 6px solid #f44336;
}
.story-card[data-status="Obsolete"] {
  border-left: 6px solid #ff9800;
}
.story-card[data-status="Canceled"] {
  border-left: 6px solid #616161;
}
.story-card-title {
  position: relative;
  padding-right: 1.1em;
  font-size: 0.9em;
  color: #1565c0;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.35;
  word-break: break-word;
}
.story-card-title::after {
  content: "\25B8";
  position: absolute;
  right: 0;
  color: #555;
  font-size: 0.8em;
}
.story-card.open .story-card-title::after {
  content: "\25BC";
}
.story-card-description {
  display: none;
  margin-top: 0.45em;
  color: #333;
  font-size: 0.9em;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 11rem;
  overflow-y: auto;
}
.story-card.open .story-card-description {
  display: block;
}
.story-card-edit-link {
  margin-top: 0.45em;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1565c0;
  cursor: pointer;
  font: inherit;
  font-size: 0.82em;
  text-decoration: underline;
}
.status-selector-controls {
  margin-bottom: 1em;
}
.status-map-display-toggle {
  display: inline-flex;
  align-items: center;
}
/* UI Prototype View styles */
.ui-prototype-container {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.ui-prototype-filters {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
}
.ui-prototype-filters-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.ui-prototype-filters-heading {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}
.ui-prototype-filters-title {
  margin: 0;
  font-size: 0.98rem;
  color: #1f2937;
}
.ui-prototype-filters-copy {
  margin: 0;
  color: #60758a;
  font-size: 0.84rem;
  line-height: 1.4;
}
.ui-prototype-filters-toggle {
  margin-left: auto;
}
.ui-prototype-filters-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
}
.ui-prototype-filters-body[hidden] {
  display: none !important;
}
.ui-prototype-filters.is-collapsed {
  padding-bottom: 1rem;
}
.ui-prototype-filters label {
  font-weight: 600;
  margin-right: 0.5rem;
  font-size: 0.9rem;
}
.ui-prototype-filters select {
  padding: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 150px;
}
.ui-prototype-toolbar {
  align-items: center;
  justify-content: space-between;
}
.ui-prototype-toolbar .ui-prototype-page-nav {
  flex: 1 1 34rem;
  margin-bottom: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.ui-prototype-toolbar-actions {
  margin-left: auto;
  align-items: center;
  justify-content: flex-end;
}
.ui-prototype-page-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid #d7e3ed;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  flex-wrap: wrap;
}
.ui-prototype-page-nav button {
  padding: 0.5rem 1rem;
  background: #f8fbff;
  border: 1px solid #c8d6e3;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}
.ui-prototype-page-nav button:hover {
  background: #ffffff;
  border-color: #9eb8d3;
}
.ui-prototype-page-nav button.active {
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  border-color: #60a5fa;
  color: #0f4c81;
}
.ui-prototype-page {
  display: none;
  padding: 1.5rem;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9fc 100%);
  border: 1px solid #d7e3ed;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  min-height: 400px;
}
.ui-prototype-page.active {
  display: block;
}
.ui-prototype-page h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #1976d2;
  font-size: 1.5rem;
}
.ui-prototype-page-description {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.ui-prototype-form {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
}
.ui-prototype-form-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #333;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #e0e0e0;
}
.ui-prototype-form-description {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.ui-prototype-component {
  margin-bottom: 1rem;
  position: relative;
}
.ui-prototype-component-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.ui-prototype-attributes {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
}
.ui-prototype-attributes-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.5rem;
}
.ui-prototype-attribute-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ui-prototype-attribute-item {
  font-size: 0.8rem;
  color: #333;
}
.ui-prototype-attr-possible-values {
  display: block;
  font-size: 0.9em;
  color: #666;
  margin-top: 0.15rem;
  padding-left: 18px;
  border-left: 2px solid #dee2e6;
}
.ui-prototype-attr-overlay {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}
.ui-prototype-attr-tag {
  display: inline-block;
  padding: 0.2rem 0.4rem;
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 4px;
  color: #1565c0;
}
.ui-prototype-view-in-er {
  font-size: 0.8rem;
  color: #1976d2;
  text-decoration: none;
}
.ui-prototype-view-in-er:hover {
  text-decoration: underline;
}
.er-diagram-main-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: nowrap;
  min-height: 0;
}
.er-diagram-column {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
}
.er-diagram-viewport {
  width: 100%;
  min-height: 26rem;
  max-height: calc(100vh - 17rem);
  overflow: auto;
  border: 1px solid #dbe4ec;
  background: #fafafa;
}
.er-diagram-viewport svg {
  border: 0;
  background: #fafafa;
}
.er-diagram-render-recovery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(180, 83, 9, 0.28);
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.86rem;
  line-height: 1.35;
}
.er-diagram-instance-panel {
  min-width: 300px;
  width: min(360px, 100%);
  flex: 0 0 min(360px, 100%);
}
.er-diagram-inspector {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-self: stretch;
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.9rem;
  border: 1px solid #dbe4ec;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.er-diagram-inspector-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.er-diagram-inspector-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.er-diagram-inspector-title {
  flex: 1 1 auto;
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  color: #1e293b;
}
.er-diagram-inspector-close {
  flex: 0 0 auto;
  margin-top: -0.25rem;
}
.er-diagram-inspector-meta,
.er-diagram-inspector-selected-attribute,
.er-diagram-inspector-empty-copy {
  margin: 0;
  color: #5f7185;
  font-size: 0.85rem;
  line-height: 1.45;
}
.er-diagram-inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.15rem;
}
.er-diagram-inspector-empty {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.er-diagram-inspector-hints {
  margin: 0;
  padding-left: 1.15rem;
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.45;
}
.er-diagram-inspector-section {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.er-diagram-inspector-section-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5f7689;
}
.er-diagram-inspector-section-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.er-diagram-inspector-card {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.55rem 0.65rem;
  background: #fff;
  border: 1px solid #dbe4ec;
  border-radius: 10px;
  font-size: 0.85rem;
}
.er-diagram-inspector-card-title {
  font-weight: 700;
  color: #1f2937;
}
.er-diagram-inspector-card-copy {
  color: #5f7185;
  line-height: 1.4;
}
.er-diagram-inspector-link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: #1565c0;
  font-size: 0.8rem;
  text-decoration: none;
}
.er-diagram-inspector-link:hover {
  text-decoration: underline;
}
.er-instance-card {
  margin-top: 0;
}
@media (max-width: 1180px) {
  .er-workspace-actions {
    margin-left: 0;
  }
  .er-diagram-main-row {
    flex-wrap: wrap;
  }
  .er-diagram-instance-panel {
    width: 100%;
    flex-basis: 100%;
    max-width: none;
    max-height: none;
  }
}
@media (max-width: 780px) {
  .er-workspace-header {
    padding: 0.7rem 0.75rem;
  }
  .er-workspace-title-block {
    min-width: 0;
  }
  .er-workspace-export-group {
    width: 100%;
  }
  .er-workspace-export-menu {
    width: 100%;
  }
  .er-workspace-export-toggle {
    width: 100%;
  }
  .er-workspace-zoom-controls {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
  .er-workspace-class-filter {
    width: 100%;
    min-width: 0;
  }
  .er-diagram-viewport {
    min-height: 22rem;
    max-height: 68vh;
  }
}
.component-binding-table {
  width: 100%;
  font-size: 0.9rem;
}
.component-binding-table th,
.component-binding-table td {
  text-align: left;
  padding: 0.4rem;
  border-bottom: 1px solid #eee;
}
.component-binding-table thead th {
  border-bottom: 1px solid #d7e3ed;
}
.ui-prototype-requirements {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #f0f4f8;
  border: 1px solid #d0e0f0;
  border-radius: 6px;
}
.ui-prototype-requirements-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.5rem;
}
.ui-prototype-requirements-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 8rem;
  overflow-y: auto;
}
.ui-prototype-requirements-list a {
  font-size: 0.8rem;
  color: #1f5aa6;
  text-decoration: none;
}
.ui-prototype-requirements-list a:hover {
  text-decoration: underline;
}
.ui-prototype-input-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 200px;
}
.ui-prototype-input-group label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #555;
}
.ui-prototype-input {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}
.ui-prototype-input:focus {
  outline: none;
  border-color: #2196F3;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}
.ui-prototype-button {
  padding: 0.6rem 1.2rem;
  background: #2196F3;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
}
.ui-prototype-button:hover {
  background: #1976D2;
}
.ui-prototype-button.secondary {
  background: #757575;
}
.ui-prototype-button.secondary:hover {
  background: #616161;
}
.ui-prototype-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ui-prototype-list-item {
  padding: 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  background: white;
  transition: background 0.2s ease;
}
.ui-prototype-list-item:hover {
  background: #f5f5f5;
}
.ui-prototype-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
  transition: box-shadow 0.2s ease;
}
.ui-prototype-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.ui-prototype-card-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}
.ui-prototype-card-content {
  color: #666;
  font-size: 0.9rem;
}
.ui-prototype-chart {
  width: 100%;
  height: 200px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.9rem;
}
.ui-prototype-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.ui-prototype-badge.status-done {
  background: #4caf50;
  color: white;
}
.ui-prototype-badge.status-in-progress {
  background: #ff9800;
  color: white;
}
.ui-prototype-badge.status-draft {
  background: #9e9e9e;
  color: white;
}
/* Concept Status values (glossary) */
.ui-prototype-badge.status-to-be-defined-tbd {
  background: #bdbdbd;
  color: #333;
}
.ui-prototype-badge.status-in-review {
  background: #2196f3;
  color: white;
}
.ui-prototype-badge.status-approved {
  background: #4caf50;
  color: white;
}
.ui-prototype-badge.status-in-use {
  background: #388e3c;
  color: white;
}
.ui-prototype-badge.status-need-revision {
  background: #ff9800;
  color: white;
}
.ui-prototype-badge.status-obsolete {
  background: #f44336;
  color: white;
}
.ui-prototype-badge.coverage-ok {
  background: #4caf50;
  color: white;
}
.ui-prototype-badge.coverage-partial {
  background: #ff9800;
  color: white;
}
.ui-prototype-badge.coverage-gap {
  background: #f44336;
  color: white;
}
.ui-prototype-tooltip {
  position: fixed;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  z-index: 2000;
  pointer-events: none;
  max-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.ui-prototype-tooltip h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: #fff;
}
.ui-prototype-tooltip p {
  margin: 0.25rem 0;
  font-size: 0.85rem;
}
.ui-prototype-tooltip a {
  color: #90caf9;
  text-decoration: underline;
  cursor: pointer;
}
.ui-prototype-info-panel {
  background: linear-gradient(135deg, #eef6ff 0%, #f8fbff 100%);
  border-color: #bfdbfe;
  margin-top: 0;
  min-height: 0;
}
.ui-prototype-info-panel h4 {
  margin-top: 0;
  color: #1976d2;
}
.ui-prototype-export-summary {
  color: #60758a;
  font-size: 0.88rem;
  line-height: 1.4;
  margin-right: 0.1rem;
}
.ui-prototype-export-inventory-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}
.ui-prototype-export-inventory-toggle input {
  margin: 0;
}
.ui-prototype-export-inventory-summary {
  flex: 1 1 22rem;
  min-width: min(22rem, 100%);
}
.requirements-dm-inventory .dm-tree-row-inventory-instance td {
  background: #fbfdff;
}
.requirements-dm-inventory .dm-inventory-value-cell {
  min-width: 12rem;
}
.data-model-inventory-create-with-pane {
  gap: 0;
}
.data-model-inventory-create-pane-host {
  flex: 0 0 400px;
  min-width: 340px;
  max-width: 460px;
  display: flex;
  min-height: 0;
}
.data-model-inventory-create-pane {
  width: 100%;
  min-width: 0;
  max-width: none;
}
.data-model-inventory-create-pane-header {
  justify-content: space-between;
}
.data-model-inventory-create-title-wrap {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.1rem;
}
.data-model-inventory-create-meta {
  color: #60758a;
  font-size: 0.78rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-model-inventory-create-intro {
  margin: 0 0 0.75rem;
  color: #52606d;
  font-size: 0.84rem;
  line-height: 1.45;
}
.dm-inventory-create-panel-fields {
  display: grid;
  gap: 0.65rem;
}
.dm-inventory-create-panel-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.25rem;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
}
.dm-inventory-create-panel-label {
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.dm-inventory-create-additional {
  margin-top: 0.85rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.7rem;
}
.dm-inventory-create-additional summary {
  cursor: pointer;
  color: #1f4f96;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
}
.data-model-inventory-create-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}
.data-model-inventory-create-form-message {
  margin-top: 0.55rem;
}
.dm-inventory-class-action {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.dm-inventory-class-count {
  color: #334155;
  font-weight: 700;
}
.dm-inventory-open-create-btn {
  min-height: 1.9rem;
  padding: 0.3rem 0.62rem;
}
.requirements-dm-inventory .dm-inventory-create-active-class td {
  background: #eef7ff;
}
.data-model-toolbar-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}
.data-model-toolbar-checkbox-label input {
  margin: 0;
}
.dm-inventory-value-input {
  width: 100%;
  max-width: 100%;
  padding: 0.34rem 0.42rem;
  border: 1px solid #c8d6e3;
  border-radius: 4px;
  background: #fff;
  color: #1f2937;
  font: inherit;
}
.dm-inventory-value-input.is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.08);
}
.dm-inventory-value-message {
  min-height: 1rem;
  color: #60758a;
  font-size: 0.74rem;
  line-height: 1.35;
}
.dm-inventory-value-message.is-error,
.dm-inventory-validation-cell.is-error {
  color: #b91c1c;
}
.dm-inventory-validation-cell {
  font-weight: 700;
  color: #166534;
}
@media (max-width: 980px) {
  .data-model-inventory-create-with-pane {
    flex-direction: column;
    overflow: visible;
  }
  .data-model-inventory-create-pane-host {
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
    width: 100%;
  }
  .data-model-inventory-create-pane {
    border-left: 0;
    border-top: 1px solid #ddd;
  }
}
.status-selector-controls label {
  margin-right: 1em;
  font-weight: 600;
}
.status-selector-controls input[type=checkbox] {
  margin-right: 0.3em;
}
.ui-prototype-page-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.1rem;
  align-items: start;
}
.ui-prototype-canvas {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.ui-prototype-empty-copy {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px dashed #bfd0e0;
  border-radius: 14px;
  background: #fff;
  color: #60758a;
}
.ui-prototype-form {
  border: 1px solid #d8e3ee;
  border-radius: 18px;
  padding: 1.1rem 1.1rem 1rem;
  margin-bottom: 0;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}
.ui-prototype-form.is-selected,
.ui-prototype-component-wrap.is-selected {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16), 0 10px 26px rgba(15, 23, 42, 0.06);
}
.ui-prototype-form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.95rem;
}
.ui-prototype-form-heading {
  min-width: 0;
}
.ui-prototype-form-title {
  color: #24364a;
  padding-bottom: 0;
  border-bottom: none;
}
.ui-prototype-form-description {
  color: #60758a;
  margin-bottom: 0;
}
.ui-prototype-form-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}
.ui-prototype-section-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.24rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4f91;
  border: 1px solid #bfdbfe;
}
.ui-prototype-section-chip.warning {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fdba74;
}
.ui-prototype-section-chip.status-approved,
.ui-prototype-section-chip.status-done,
.ui-prototype-section-chip.status-in-use {
  background: #ecfdf3;
  color: #166534;
  border-color: #86efac;
}
.ui-prototype-section-chip.status-in-progress,
.ui-prototype-section-chip.status-need-revision {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fdba74;
}
.ui-prototype-section-chip.status-in-review {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}
.ui-prototype-section-chip.status-obsolete {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fca5a5;
}
.ui-prototype-component {
  margin-bottom: 0;
}
.ui-prototype-component-group {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 0;
}
.ui-prototype-component-wrap {
  grid-column: span 4;
  border: 1px solid #dde6ef;
  border-radius: 14px;
  padding: 0.85rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  min-width: 0;
  cursor: pointer;
}
.ui-prototype-span-one-third {
  grid-column: span 4;
}
.ui-prototype-span-half {
  grid-column: span 6;
}
.ui-prototype-span-full {
  grid-column: 1 / -1;
}
.ui-prototype-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.ui-prototype-input-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #415468;
}
.ui-prototype-inline-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.55rem;
}
.ui-prototype-inline-link {
  background: transparent;
  border: none;
  color: #1f5aa6;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.ui-prototype-inline-link:hover {
  text-decoration: underline;
}
.ui-prototype-input-group {
  min-width: 0;
}
.ui-prototype-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.72rem 0.78rem;
  border: 1px solid #c7d3df;
  border-radius: 10px;
  background: #fff;
}
.ui-prototype-select {
  appearance: none;
}
.ui-prototype-textarea {
  resize: vertical;
  min-height: 7rem;
}
.ui-prototype-checkbox-shell {
  padding: 0.15rem 0;
}
.ui-prototype-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: #24364a;
  font-size: 0.95rem;
  line-height: 1.45;
}
.ui-prototype-checkbox input {
  margin-top: 0.15rem;
  width: 1rem;
  height: 1rem;
}
.ui-prototype-file-upload {
  border: 1px dashed #9fc0df;
  border-radius: 12px;
  padding: 1rem;
  background: #f8fbff;
  color: #4d6a86;
  text-align: center;
  font-weight: 600;
}
.ui-prototype-info-panel {
  position: sticky;
  top: 1rem;
  align-self: start;
}
.ui-prototype-inspector-header {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  margin-bottom: 0.8rem;
}
.ui-prototype-inspector-title {
  margin: 0;
  color: #123b6b;
  font-size: 1rem;
}
.ui-prototype-inspector-copy {
  margin: 0.2rem 0 0;
  color: #50667e;
  font-size: 0.84rem;
  line-height: 1.45;
}
.ui-prototype-inspector-link {
  display: inline-flex;
  margin-bottom: 0.9rem;
  color: #1565c0;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}
.ui-prototype-inspector-link:hover {
  text-decoration: underline;
}
@media (max-width: 1180px) {
  .ui-prototype-page-workspace {
    grid-template-columns: 1fr;
  }
  .ui-prototype-info-panel {
    position: static;
  }
}
@media (max-width: 980px) {
  .ui-prototype-toolbar {
    align-items: stretch;
  }
  .ui-prototype-toolbar .ui-prototype-page-nav,
  .ui-prototype-toolbar-actions {
    flex: 1 1 100%;
  }
  .ui-prototype-toolbar-actions {
    margin-left: 0;
    justify-content: flex-start;
  }
  .ui-prototype-component-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ui-prototype-span-one-third,
  .ui-prototype-span-half {
    grid-column: span 1;
  }
  .ui-prototype-span-full {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .ui-prototype-toolbar .ui-prototype-page-nav {
    gap: 0.4rem;
  }
  .ui-prototype-toolbar-actions {
    gap: 0.5rem;
  }
  .ui-prototype-export-summary {
    width: 100%;
  }
  .ui-prototype-page {
    padding: 1rem;
  }
  .ui-prototype-form {
    padding: 0.9rem;
  }
  .ui-prototype-form-header {
    flex-direction: column;
  }
  .ui-prototype-form-chips {
    justify-content: flex-start;
  }
  .ui-prototype-component-group {
    grid-template-columns: 1fr;
  }
  .ui-prototype-span-one-third,
  .ui-prototype-span-half,
  .ui-prototype-span-full {
    grid-column: 1 / -1;
  }
}
/* User Story Map styles - matching USM.html design */
.user-story-map-mode-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.8rem 1rem;
  margin-bottom: 0.85rem;
  padding: 0.95rem 1rem;
  border: 1px solid #d7e3ed;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.78) 0%, rgba(255, 255, 255, 0.98) 55%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}
.user-story-map-mode-switcher-heading {
  display: flex;
  align-items: center;
  min-height: 2.35rem;
}
.user-story-map-mode-switcher-title {
  margin: 0;
  color: #1f2937;
  font-size: 1.02rem;
  line-height: 1.25;
}
.user-story-map-mode-switcher-nav {
  display: flex;
  flex: 1 1 24rem;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}
.user-story-map-mode-switcher-btn {
  min-height: 2.35rem;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #c8d6e3;
  background: rgba(255, 255, 255, 0.86);
  color: #355066;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}
.user-story-map-mode-switcher-btn:hover {
  background: #fff;
  border-color: #9eb8d3;
}
.user-story-map-mode-switcher-btn.is-active,
.user-story-map-mode-switcher-btn[data-active="true"] {
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  border-color: #60a5fa;
  color: #0f4c81;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.12);
}
.user-story-map-empty-state {
  margin-top: 0.1rem;
}
.user-story-map-filter-section {
  width: 100%;
  margin-bottom: 0.5rem;
}
.user-story-map-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.user-story-map-filter-title {
  color: #355066;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.user-story-map-filter-toggle {
  min-height: 2.1rem;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #c8d6e3;
  background: rgba(255, 255, 255, 0.92);
  color: #355066;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.user-story-map-filter-toggle:hover {
  background: #fff;
  border-color: #9eb8d3;
}
.user-story-map-filter-panel[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .user-story-map-mode-switcher {
    gap: 0.7rem;
    padding: 0.85rem 0.9rem;
  }
  .user-story-map-mode-switcher-heading,
  .user-story-map-mode-switcher-nav {
    flex-basis: 100%;
  }
  .user-story-map-mode-switcher-btn {
    flex: 1 1 9rem;
    justify-content: center;
  }
  .user-story-map-filter-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
.story-map-table {
  width: 100%;
  margin-bottom: 2em;
}
.story-map-table th, .story-map-table td {
  border: 1px solid #ccc;
  padding: 0.5em;
  vertical-align: top;
}
.story-map-table th {
  background: #e0e0e0;
}
.epic-header {
  background: #d0e8ff;
  font-weight: bold;
  text-align: center;
}
.plateau-label {
  background: #f0f0f0;
  font-weight: bold;
}
.priority-label {
  background: #f8fafc;
  font-weight: bold;
}
/* User Story Map (by Stage) flow layout: scroll wrapper and step columns */
.story-map-flow-scroll {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  max-height: none;
}
.story-map-flow-table {
  table-layout: auto;
  min-width: max-content;
}
/* User Story Map (by stage), Top-Down: two sticky header rows inside .story-map-flow-scroll */
.story-map-flow-scroll .story-map-flow-table thead tr:first-child th.story-map-stage-header {
  position: sticky;
  top: 0;
  z-index: 12;
  background: #d0e8ff;
}
.story-map-flow-scroll .story-map-flow-table thead tr.story-map-step-row th.story-map-step-header {
  position: sticky;
  top: var(--story-map-stage-header-h, 2.75rem);
  z-index: 11;
  background: #f0f0f0;
}
.story-map-step-row th.story-map-step-header {
  background: #f0f0f0;
  font-weight: bold;
  min-width: 180px;
}
.story-map-flow-scroll .story-map-flow-table thead tr:only-child th.epic-header {
  position: sticky;
  top: 0;
  z-index: 12;
  background: #d0e8ff;
}
.story-map-reqs-cell {
  min-width: 180px;
  vertical-align: top;
}
.expand-collapse-all-btn {
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f5f5f5;
}
.expand-collapse-all-btn:hover {
  background: #eee;
}
/* User Story Map (by Stage): Step labels – visually subordinate to HLR titles */
.usm-by-stage-step-label {
  font-size: 0.9em;
  color: #555;
  font-weight: 600;
  margin-bottom: 0.25em;
}
.story-group {
  /* container for HLRs in story map cell */
  min-height: 1em;
}
.hlr {
  background: #fff;
  margin-bottom: 0.5em;
  padding: 0.3em;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}
.hlr-title {
  font-weight: bold;
  cursor: pointer;
  position: relative;
  padding-right: 1.2em;
}
.hlr-title::after {
  content: "\25B8"; /* ▸ */
  position: absolute;
  right: 0;
  color: #555;
  font-size: 0.8em;
}
.hlr.open .hlr-title::after {
  content: "\25BC"; /* ▼ */
}
.us-list {
  margin-left: 1em;
  margin-top: 0.3em;
  display: none;
}
.hlr.open .us-list {
  display: block;
}
/* User Story Map: flat US row (bold title + toggle description) */
.us-map-item.us {
  background: #f7f7f7;
  margin-bottom: 0.5em;
  padding: 0.35em;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.06);
}
.us-map-title-row {
  font-weight: bold;
  cursor: pointer;
  position: relative;
  padding-right: 1.2em;
}
.us-map-title-row::after {
  content: "\25B8"; /* ▸ */
  position: absolute;
  right: 0;
  color: #555;
  font-size: 0.8em;
}
.us-map-item.open .us-map-title-row::after {
  content: "\25BC"; /* ▼ */
}
.user-story-map-show-desc .us-map-item .us-map-title-row::after {
  content: "\25BC";
}
.us-map-desc {
  margin-top: 0.35em;
  margin-left: 0.15em;
  display: none;
  white-space: pre-wrap;
  word-break: break-word;
  font-weight: normal;
}
.us-map-item.open .us-map-desc,
.user-story-map-show-desc .us-map-item .us-map-desc {
  display: block;
}
/* Show all US descriptions: expand HLR sections (inline display from JS overridden) */
#requirements-subview-container.user-story-map-show-desc .hlr .us-list {
  display: block !important;
}
#requirements-subview-container.user-story-map-show-desc .hlr .hlr-title::after {
  content: "\25BC";
}
.us {
  background: #f7f7f7;
  padding: 0.3em;
  margin-bottom: 0.3em;
  border-left: 6px solid #bbb;
}
.us[data-status="Draft"] {
  border-left-color: #9e9e9e;
}
.us[data-status="Reviewed"] {
  border-left-color: #2196f3;
}
.us[data-status="Approved"] {
  border-left-color: #4caf50;
}
.us[data-status="Rejected"] {
  border-left-color: #f44336;
}
.us[data-status="Obsolete"] {
  border-left-color: #ff9800;
}
.us[data-status="Canceled"] {
  border-left-color: #616161;
}
.us-title {
  font-size: 0.8em;
  color: #555;
  margin-top: 0.3em;
  font-style: italic;
  cursor: pointer;
}
/* Roles View styles - matching USM.html design */
.roles-table {
  width: 100%;
  margin-bottom: 2em;
}
.roles-table th, .roles-table td {
  border: 1px solid #ccc;
  padding: 0.5em;
  vertical-align: top;
}
.roles-table th {
  background: #e0e0e0;
  font-weight: bold;
  text-align: center;
}
.roles-table .epic-label {
  background: #f0f0f0;
  font-weight: bold;
}
.roles-table th .roles-col-title {
  margin-bottom: 0.35rem;
  line-height: 1.2;
}
.user-story-map-col-reorder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.15rem;
}
.user-story-map-col-reorder-btn {
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  background: #f5f5f5;
  border: 1px solid #bbb;
  border-radius: 3px;
  color: #333;
}
.user-story-map-col-reorder-btn:hover:not(:disabled) {
  background: #eee;
}
.user-story-map-col-reorder-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.roles-view-epic-filter-controls,
.roles-view-role-filter-controls {
  margin-bottom: 0.5em;
}
.roles-view-epic-filter-controls label,
.roles-view-role-filter-controls label {
  margin-right: 1em;
  font-weight: 600;
}
.roles-view-epic-filter-controls input[type=checkbox],
.roles-view-role-filter-controls input[type=checkbox] {
  margin-right: 0.3em;
}
.epic-filter-controls {
  margin-bottom: 1em;
}
.epic-filter-controls label {
  margin-right: 1em;
  font-weight: 600;
}
.epic-filter-controls input[type=checkbox] {
  margin-right: 0.3em;
}

/* Dual-list multi-select widget (inline chips + Edit) */
.dual-list-multi-select {
  margin-bottom: 0.75rem;
}
.dual-list-multi-select label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}
.dual-list-top-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.dual-list-top-row .selected-chips {
  flex: 1;
  min-width: 120px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0;
}
.dual-list-edit-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
  white-space: nowrap;
}
.dual-list-edit-btn:hover {
  background: #e0e0e0;
}
.req-intent-proposal-panel {
  margin-top: 0.35rem;
  padding: 0.55rem;
  border: 1px solid #d8e6f3;
  border-radius: 6px;
  background: #fafcff;
}
.req-intent-proposal-heading {
  margin-bottom: 0.4rem;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
}
.req-intent-proposal-handoff {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.35rem;
  padding: 0.45rem;
  border: 1px solid #d8e2ec;
  border-radius: 6px;
  background: #ffffff;
}
.req-intent-proposal-handoff-copy {
  min-width: 0;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.35;
}
.req-intent-proposal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.45rem 0;
  border-top: 1px solid #e5edf5;
}
.req-intent-proposal-heading + .req-intent-proposal-row {
  border-top: 0;
}
.req-intent-proposal-copy {
  min-width: 0;
}
.req-intent-proposal-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
}
.req-intent-proposal-title {
  color: #1f2937;
  font-weight: 700;
}
.req-intent-proposal-confidence {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}
.req-intent-proposal-evidence,
.req-intent-proposal-empty {
  margin-top: 0.15rem;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.35;
}
.req-intent-proposal-use {
  align-self: center;
}
.req-intent-context-panel {
  margin-top: 0.4rem;
  padding: 0.55rem;
  border: 1px solid #d8e6f3;
  border-radius: 6px;
  background: #fbfdff;
}
.req-intent-description-block {
  margin-top: 0.45rem;
}
.req-intent-description-block label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.req-intent-description-content {
  min-height: 2rem;
  padding: 0.5rem;
  border-radius: 4px;
  background: #f5f5f5;
  color: #555;
  font-size: 0.9rem;
  white-space: pre-wrap;
}
.req-bpmn-role-advisory,
.gloss-bpmn-role-advisory {
  margin-top: 0.45rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #d8e6f3;
  border-radius: 6px;
  background: #fbfdff;
  color: #263238;
  font-size: 0.84rem;
  line-height: 1.4;
}
.req-bpmn-role-advisory--warning,
.gloss-bpmn-role-advisory--warning {
  border-color: #ef9a9a;
  background: #fff5f5;
  color: #7f1d1d;
}
.req-bpmn-role-advisory--info,
.gloss-bpmn-role-advisory--info {
  border-color: #ffcc80;
  background: #fffaf0;
  color: #5d4037;
}
.req-bpmn-role-advisory__hint,
.gloss-bpmn-role-advisory__hint {
  margin-top: 0.25rem;
  color: inherit;
  opacity: 0.82;
  font-size: 0.78rem;
}
.gloss-bpmn-role-advisory__list {
  margin: 0.35rem 0 0 1rem;
  padding: 0;
}
.gloss-bpmn-role-advisory__list li + li {
  margin-top: 0.35rem;
}
.req-intent-context-heading {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
}
.req-intent-context-hint {
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.35;
}
.req-intent-context-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.4rem;
  padding: 0.45rem;
  border: 1px solid #e5edf5;
  border-radius: 6px;
  background: #ffffff;
}
.req-intent-context-bulk-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #c8d7e8;
  border-radius: 6px;
  background: #f7fbff;
}
.req-intent-context-bulk-title {
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
}
.req-intent-context-bulk-set {
  white-space: nowrap;
}
.req-intent-context-row--mismatch {
  border-color: #d33b3b;
  background: #fff1f1;
}
.req-intent-context-copy {
  min-width: 0;
}
.req-intent-context-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
}
.req-intent-context-title {
  color: #1f2937;
  font-weight: 700;
}
.req-intent-context-row--mismatch .req-intent-context-title {
  color: #b42323;
}
.req-intent-context-relation {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.req-intent-context-source {
  margin-top: 0.15rem;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.35;
}
.req-intent-context-set {
  align-self: center;
}
.req-terms-used-label-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.req-terms-used-heading {
  font-weight: 600;
}
.req-field-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 4px;
  border: 1px solid #bbb;
  background: #f5f5f5;
  color: #333;
  cursor: help;
  vertical-align: middle;
}
.req-field-help-btn:hover {
  background: #e8e8e8;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 4px;
  font-size: 0.85rem;
}
.chip-drag {
  cursor: grab;
  color: #666;
  font-size: 1rem;
  line-height: 1;
  user-select: none;
}
.chip-drag:active {
  cursor: grabbing;
}
.chip-label {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.related-requirement-row .chip-label {
  max-width: none;
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
}
.chip-remove {
  padding: 0 0.2rem;
  margin: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #666;
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 2px;
}
.chip-remove:hover {
  color: #c00;
  background: rgba(0,0,0,0.05);
}

/* Choose fields modal (Available + Selected columns) */
.choose-fields-modal .modal-content {
  max-width: 700px;
  width: 90%;
}
.choose-fields-modal h2 {
  margin-bottom: 1rem;
}
.choose-fields-two-col {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  min-height: 280px;
}
.choose-fields-available-column,
.choose-fields-selected-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.choose-fields-column-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.choose-fields-search {
  width: 100%;
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  box-sizing: border-box;
}
.choose-fields-available-list,
.choose-fields-selected-list {
  flex: 1;
  overflow-y: auto;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.5rem;
  background: #fafafa;
  min-height: 180px;
}
.choose-fields-create-from-search {
  margin-top: 0.5rem;
  padding: 0.5rem 0.5rem 0.35rem;
  border-top: 1px solid #e0e0e0;
  font-size: 0.88rem;
  color: #444;
}
.choose-fields-create-from-search-msg {
  margin-bottom: 0.4rem;
  line-height: 1.35;
}
.choose-fields-create-from-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
.choose-fields-create-from-search-row label {
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
}
.choose-fields-create-type {
  min-width: 7rem;
  padding: 0.25rem 0.4rem;
  font-size: 0.88rem;
}
.choose-fields-create-add {
  font-size: 0.85rem;
}
.choose-fields-option-label {
  display: block;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  border-radius: 3px;
}
.choose-fields-option-label:hover {
  background: #eee;
}
.choose-fields-option-label input {
  margin-right: 0.5rem;
  cursor: pointer;
}
.choose-fields-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 4px;
  font-size: 0.9rem;
}
.choose-fields-chip-drag {
  cursor: grab;
  color: #666;
  font-size: 1rem;
  user-select: none;
}
.choose-fields-chip-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.choose-fields-chip-remove {
  padding: 0 0.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #666;
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 2px;
}
.choose-fields-chip-remove:hover {
  color: #c00;
  background: rgba(0,0,0,0.05);
}
.choose-fields-chip.choose-fields-dragging {
  opacity: 0.7;
}
.choose-fields-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.choose-fields-actions .btn-primary {
  padding: 0.5rem 1rem;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.choose-fields-actions .btn-primary:hover {
  background: #1565c0;
}
.choose-fields-actions .btn-secondary {
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}
.choose-fields-actions .btn-secondary:hover {
  background: #eee;
}

/* ========== Usability & accessibility ========== */
/* Keyboard focus: visible ring for keyboard users (not on mouse click) */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #2196F3;
  outline-offset: 2px;
}
.toolbar-btn:focus-visible,
.view-buttons button:focus-visible,
.glossary-view-header button:focus-visible,
.glossary-header-nav-btn:focus-visible,
.glossary-subnav-btn:focus-visible,
.requirements-subnav-category-btn:focus-visible,
.requirements-subnav-flyout-items .requirements-subnav-btn:focus-visible,
.form-actions button:focus-visible,
.reset-btn:focus-visible,
.enre-subnav-controls input[type="checkbox"]:focus-visible {
  outline: 2px solid #1976d2;
  outline-offset: 2px;
}
.header-brand:focus-visible {
  outline: 2px solid var(--almanac-accent, #c8a96a);
  outline-offset: 2px;
}
.editable-cell:focus-visible {
  outline: 2px solid #2196F3;
  outline-offset: 0;
  background: #fffde7;
}
/* Modal close and other controls that need clear focus */
.close:focus-visible,
.bpmn-flow-close:focus-visible {
  outline: 2px solid #2196F3;
  outline-offset: 2px;
  color: #333;
}
/* Respect reduced motion (vestibular disorders, motion sensitivity) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .sidebar { transition: none; }
  .tree-expand-icon { transition: none; }
  .taxonomy-tree-folder-icon { transition: none; }
  .scenario-model-node.highlighted,
  .scenario-model-node.rule-node.highlighted { transition: none; }
}
/* Slightly larger touch targets for critical controls (min ~44px) */
@media (pointer: coarse) {
  .enre-subnav-controls {
    min-height: 2.75rem;
  }
  .toolbar-btn {
    min-height: 2.75rem;
    padding: 0.4rem 0.75rem;
  }
  .view-buttons button {
    min-height: 2.75rem;
    padding: 0.5rem 1rem;
  }
  .tree-expand-icon {
    min-width: 24px;
    min-height: 24px;
    padding: 4px;
  }
}
/* Modal close: focus uses same dark color as hover */
.close:focus-visible {
  color: #000;
}

/* Requirement Candidate Highlighter (Parser tab) */
span.candidate-strong {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(46, 125, 50, 0.2);
  box-shadow: inset 0 -1px 0 rgba(46, 125, 50, 0.5);
  cursor: default;
}
span.candidate-medium {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(245, 124, 0, 0.2);
  box-shadow: inset 0 -1px 0 rgba(245, 124, 0, 0.5);
  cursor: default;
}
span.candidate-weak {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(158, 158, 158, 0.25);
  box-shadow: inset 0 -1px 0 rgba(100, 100, 100, 0.4);
  cursor: default;
}
span.parser-hl-actor {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(63, 81, 181, 0.2);
  cursor: default;
}
span.parser-hl-system {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(0, 150, 136, 0.2);
  cursor: default;
}
span.parser-hl-capability {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(121, 85, 72, 0.2);
  cursor: default;
}
span.parser-hl-bytype {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(96, 125, 139, 0.25);
  cursor: default;
}
span.parser-hl-multi {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(128, 128, 128, 0.2);
  border-bottom: 2px solid rgba(100, 100, 100, 0.4);
  cursor: default;
}
span.similarity-match {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(156, 39, 176, 0.2);
  cursor: default;
}
.candidate-popover {
  font-size: 0.85rem;
  line-height: 1.4;
}
.candidate-list-item {
  cursor: pointer;
  min-width: 0;
}
.candidate-list-item > div:first-child {
  overflow: visible;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.candidate-list-item:hover {
  background: rgba(0, 0, 0, 0.04);
}
.candidate-score-badge.candidate-badge-strong {
  background: rgba(46, 125, 50, 0.2);
  color: #1b5e20;
}
.candidate-score-badge.candidate-badge-medium {
  background: rgba(245, 124, 0, 0.2);
  color: #e65100;
}
.candidate-score-badge.candidate-badge-weak {
  background: rgba(158, 158, 158, 0.25);
  color: #424242;
}

.parser-workspace,
.parser-drafter-shell {
  gap: 0.85rem;
}
.parser-workspace {
  min-height: 0;
}
.parser-workspace-tabbar {
  margin-bottom: 0.2rem;
}
.parser-workspace-panel {
  flex: 1 1 auto;
  gap: 0.85rem;
  min-height: 0;
}
.parser-workspace-hero,
.parser-drafter-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.9rem;
  flex-shrink: 0;
}
.parser-workspace-summary,
.parser-drafter-summary-chips {
  margin-left: 0;
  align-self: flex-start;
}
.parser-workspace-controls {
  padding-bottom: 0.75rem;
  flex-shrink: 0;
}
.parser-workspace-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.9fr) auto;
  gap: 0.75rem;
}
.parser-workspace-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
  min-width: 0;
}
.parser-workspace-toolbar-group--meta .ui-subview-field {
  flex: 1 1 15rem;
  min-width: 14rem;
}
.parser-workspace-toolbar-group--view {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.55rem;
}
.parser-workspace-toolbar-group--view .parser-workspace-inline-field {
  flex: 1 1 18rem;
  max-width: 26rem;
}
.parser-workspace-inline-field {
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.parser-workspace-inline-field .ui-subview-label {
  white-space: nowrap;
}
.parser-workspace-inline-field .ui-subview-select {
  flex: 1 1 12rem;
  min-width: 0;
  width: 100%;
}
.parser-workspace-toolbar-group--actions {
  justify-content: flex-end;
}
.parser-workspace-toggle,
.parser-drafter-filter-toggle,
.parser-drafter-preview-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid #d7e3ed;
  border-radius: 999px;
  background: #f8fbff;
  color: #29465d;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
}
.parser-workspace-severity-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
}
.parser-workspace-slider {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.parser-workspace-slider input[type="range"] {
  width: 7rem;
}
.parser-workspace-slider-value {
  min-width: 2ch;
  font-weight: 700;
  color: #29465d;
}
.parser-workspace-action {
  white-space: nowrap;
}
.parser-workspace-action--primary {
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  border-color: #60a5fa;
  color: #0f4c81;
}
.parser-workspace-main {
  display: flex;
  gap: 0.85rem;
  flex: 0 0 auto;
  min-height: 0;
  align-items: flex-start;
}
.parser-workspace-source {
  min-width: 0;
  min-height: clamp(18rem, 36vh, 28rem);
}
.parser-workspace-source-editor {
  flex: 1;
  min-height: 0;
}
.parser-workspace-source .ui-subview-textarea {
  min-height: 10rem;
}
.parser-workspace-results {
  min-width: 20rem;
  min-height: clamp(18rem, 36vh, 28rem);
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  overflow: visible;
}
.parser-workspace-results-header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid #e6edf4;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
}
.parser-workspace-results-title-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.parser-workspace-results-title,
.parser-workspace-results-copy {
  margin: 0;
}
.parser-workspace-results-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.parser-workspace-results-tab,
.parser-workspace-inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.28rem 0.65rem;
  border: 1px solid #c8d6e3;
  border-radius: 999px;
  background: #fff;
  color: #355066;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.parser-workspace-results-tab.is-active {
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  border-color: #60a5fa;
  color: #0f4c81;
}
.parser-workspace-results-list {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}
.parser-workspace-results-list-wrap,
.parser-workspace-results-list-inner {
  min-height: 0;
}
.parser-workspace-result-card,
.candidate-list-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #edf2f7;
  background: transparent;
  cursor: pointer;
}
.parser-workspace-result-card:hover,
.candidate-list-item:hover {
  background: rgba(219, 234, 254, 0.24);
}
.parser-workspace-result-title {
  font-weight: 700;
  color: #1f2937;
  word-break: break-word;
}
.parser-workspace-result-meta,
.parser-workspace-result-snippet,
.parser-workspace-result-status {
  color: #60758a;
  font-size: 0.85rem;
  line-height: 1.45;
}
.parser-workspace-result-status--exists {
  color: #1f7a4d;
}
.parser-workspace-result-meta-row,
.parser-workspace-result-actions,
.parser-workspace-results-actions,
.parser-workspace-results-search,
.parser-drafter-actions-row,
.parser-drafter-actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.parser-workspace-result-badge {
  align-self: flex-start;
}
.parser-workspace-empty-state {
  margin: 0.75rem;
}
.parser-drafter-actions {
  gap: 0.8rem;
}
.parser-drafter-action-feedback {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid #d6e1eb;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
  color: #29465d;
}
.parser-drafter-action-feedback-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.parser-drafter-action-feedback-chip,
.parser-drafter-action-feedback-state {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.16rem 0.6rem;
  border-radius: 999px;
  font-size: 0.77rem;
  font-weight: 700;
  white-space: nowrap;
}
.parser-drafter-action-feedback-chip {
  border: 1px solid #d6e1eb;
  background: #ffffff;
  color: #52677a;
}
.parser-drafter-action-feedback-state {
  border: 1px solid transparent;
}
.parser-drafter-action-feedback-message {
  margin: 0;
  color: #3d5368;
  font-size: 0.88rem;
  line-height: 1.45;
}
.parser-drafter-action-feedback--idle {
  border-color: #d6e1eb;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
}
.parser-drafter-action-feedback--idle .parser-drafter-action-feedback-state {
  background: #eef5fb;
  border-color: #d8e3ef;
  color: #456077;
}
.parser-drafter-action-feedback--info {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}
.parser-drafter-action-feedback--info .parser-drafter-action-feedback-state {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #0f4c81;
}
.parser-drafter-action-feedback--success {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}
.parser-drafter-action-feedback--success .parser-drafter-action-feedback-state {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}
.parser-drafter-action-feedback--error {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}
.parser-drafter-action-feedback--error .parser-drafter-action-feedback-state {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}
.parser-drafter-promotion-path {
  padding: 0.8rem 1rem;
  border: 1px solid #c5d7ef;
  border-radius: 16px;
  background: linear-gradient(135deg, #f5f9ff 0%, #ffffff 100%);
  color: #37474f;
  line-height: 1.55;
}
.parser-drafter-sections {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.parser-drafter-section-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.parser-drafter-section-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.parser-drafter-doc-meta,
.parser-drafter-hint,
.parser-drafter-inline-note {
  color: #60758a;
  font-size: 0.88rem;
  line-height: 1.45;
}
.parser-drafter-hint {
  margin: 0;
  font-style: italic;
}
.parser-drafter-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}
.parser-drafter-table th,
.parser-drafter-table td {
  padding: 0.5rem 0.6rem;
  border: 1px solid #d9e2ea;
  vertical-align: top;
  text-align: left;
}
.parser-drafter-table th {
  background: #f8fbff;
}
.parser-drafter-cell-scroll {
  max-width: 22rem;
  max-height: 9rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.parser-drafter-score {
  font-weight: 700;
}
.parser-drafter-warn {
  cursor: help;
  color: #f57c00;
}
.parser-drafter-subtitle {
  margin: 0.35rem 0 0;
  color: #29465d;
  font-size: 0.95rem;
}
.parser-drafter-list {
  margin: 0;
  padding-left: 1.15rem;
}
.parser-drafter-list-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
@media (max-width: 1180px) {
  .parser-workspace-toolbar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .parser-workspace-toolbar-group--view {
    flex-wrap: wrap;
  }
  .parser-workspace-severity-group {
    flex-wrap: wrap;
  }
  .parser-workspace-main {
    flex-direction: column;
  }
  .parser-workspace-results {
    width: 100%;
    align-self: stretch;
  }
}
@media (max-width: 719px) {
  .parser-workspace-toolbar-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .parser-workspace-inline-field {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  .parser-workspace-inline-field .ui-subview-select {
    min-width: 0;
    width: 100%;
  }
  .parser-workspace-toolbar-group--actions {
    justify-content: flex-start;
  }
  .parser-workspace-action,
  .parser-workspace-results-tab,
  .parser-workspace-inline-button {
    width: 100%;
  }
}


/* =========================================================
   ALManac visual refresh
   Derived from the Stitch-like direction but kept compatible
   with the current HTML / IDs / JS structure.
   Additive override layer only.
   ========================================================= */

:root {
  --alm-bg: #f7f9fb;
  --alm-surface: #ffffff;
  --alm-surface-2: #f0f4f7;
  --alm-surface-3: #e8eff3;
  --alm-border: #d7e0e6;
  --alm-border-strong: #b8c5cf;
  --alm-text: #24323a;
  --alm-text-muted: #5b6b75;
  --alm-primary: #0053db;
  --alm-primary-strong: #0048bf;
  --alm-primary-soft: #dbe7ff;
  --alm-success: #0d7a5f;
  --alm-success-soft: #dff5ef;
  --alm-warning: #a06300;
  --alm-warning-soft: #fff1d6;
  --alm-danger: #b33b3b;
  --alm-danger-soft: #fde8e7;
  --alm-shadow-sm: 0 1px 2px rgba(24, 39, 75, 0.06), 0 8px 24px rgba(24, 39, 75, 0.04);
  --alm-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.06);
  --alm-radius-sm: 8px;
  --alm-radius-md: 12px;
  --alm-radius-lg: 18px;
  --almanac-accent: #c8a96a;
  --almanac-text: #2b2f33;
  --almanac-divider: #d0d5db;
}

html {
  color-scheme: light;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--alm-text);
  flex-direction: column;
  background:
    radial-gradient(circle at top left, rgba(0, 83, 219, 0.06), transparent 28%),
    linear-gradient(180deg, #f8fbfd 0%, #f3f7fa 100%);
}

h1, h2, h3, h4, h5, h6,
.view-buttons button.active,
.requirements-details-pane-title,
.glossary-view-header h3,
.codex-view-header h3,
.service-view-header {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.015em;
}

.sidebar {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-right: 1px solid var(--alm-border);
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.6);
  padding: 1rem 1rem 1.25rem;
}

.filter-section,
#main-menu,
.view-container,
.requirements-details-pane,
details.requirements-validation-details,
.validation-summary-bar,
.codex-upload-section,
.attributes-scroll-container,
.bpmn-flow-content,
.modal-content {
  background: var(--alm-surface);
  border: 1px solid rgba(183, 197, 208, 0.7);
  box-shadow: var(--alm-shadow-sm);
}

#main-menu,
.view-container,
.requirements-details-pane,
.codex-upload-section,
.bpmn-flow-content,
.modal-content {
  border-radius: var(--alm-radius-lg);
}

#main-menu {
  padding: 0.65rem 1rem 0.55rem;
}

.header-brand {
  --header-brand-accent-color: var(--almanac-accent, #c8a96a);
  --signal-color: var(--header-brand-accent-color);
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 12px;
  color: var(--almanac-text, var(--alm-text, #2b2f33));
  line-height: 1;
  white-space: nowrap;
  transition: opacity 150ms ease;
}

.header-brand[role="button"] {
  cursor: pointer;
}

.header-brand__label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #1f2933;
}

.header-brand__dot {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--signal-color, var(--header-brand-accent-color, var(--almanac-accent, #c8a96a)));
  opacity: 0.7;
  transform: translateY(0.5px);
  transition: opacity 150ms ease;
}

.header-divider {
  width: 1px;
  height: 60%;
  flex: 0 0 auto;
  align-self: center;
  background: var(--almanac-divider, var(--alm-border, #d0d5db));
  margin: 0 14px;
  opacity: 0.7;
}

.header-brand .tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 1250;
  padding: 4px 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--alm-shadow-sm, 0 1px 2px rgba(24, 39, 75, 0.06));
  color: #556;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 150ms ease,
    visibility 0s linear 300ms;
  transition-delay: 0s, 300ms;
}

.header-brand:hover {
  opacity: 0.9;
}

.header-brand:hover .header-brand__dot,
.header-brand:focus-visible .header-brand__dot {
  opacity: 0.6;
}

.header-brand:hover .tooltip,
.header-brand:focus .tooltip,
.header-brand:focus-visible .tooltip {
  opacity: 0.95;
  visibility: visible;
  transition-delay: 150ms, 150ms;
}

.content {
  padding: 1rem;
  background: transparent;
}

.view-container {
  padding: 1rem;
  margin-bottom: 1rem;
}

/* Specification generator (showSpecView) */
#spec-view.spec-view-root {
  max-width: 56rem;
}
.spec-view-header {
  margin-bottom: 1rem;
}
.spec-view-title {
  margin: 0;
}
.spec-settings-group {
  margin-bottom: 1rem;
}
.spec-settings-group-title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}
.spec-settings-group-copy {
  margin: 0 0 0.75rem;
  color: var(--alm-text-muted, #555);
  font-size: 0.92rem;
  line-height: 1.4;
}
.spec-requirements-options-wrap {
  display: grid;
  gap: 0.85rem;
}
.spec-requirements-option-card {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--alm-border, #d7dbe2);
  border-radius: 10px;
  background: color-mix(in srgb, var(--alm-surface, #fff) 98%, #f5f7fa 2%);
}
.spec-requirements-card-header {
  margin-bottom: 0.2rem;
}
.spec-requirements-card-title {
  font-size: 0.96rem;
  font-weight: 600;
  color: #172033;
}
.spec-requirements-card-copy {
  margin: 0 0 0.75rem;
  font-size: 0.89rem;
  line-height: 1.42;
  color: var(--alm-text-muted, #55606b);
}
.spec-requirements-control-row,
.spec-requirements-link-display-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.spec-requirements-inline-label {
  font-weight: 600;
  color: #314054;
  white-space: nowrap;
}
.spec-requirements-inline-select {
  width: auto;
  min-width: 13rem;
  max-width: 100%;
  padding: 0.35rem 0.45rem;
  font-size: 0.95rem;
}
.spec-requirements-filters-body {
  display: grid;
  gap: 0.55rem;
}
.spec-requirements-filter-row {
  display: grid;
  grid-template-columns: minmax(6rem, 8rem) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem 0.75rem;
}
.spec-requirements-filter-label {
  font-weight: 600;
  color: #314054;
}
.spec-requirements-filter-btn {
  justify-self: start;
}
.spec-requirements-filter-summary {
  min-width: 0;
  font-size: 0.9rem;
  color: var(--alm-text-muted, #667085);
}
.spec-requirements-columns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.55rem 0.7rem;
}
.spec-requirements-column-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--alm-border, #d7dbe2);
  border-radius: 999px;
  background: #fff;
  color: #223041;
  cursor: pointer;
}
.spec-requirements-column-option:hover {
  background: #f7fafc;
}
.spec-requirements-column-checkbox {
  flex: 0 0 auto;
  margin: 0;
}
.spec-requirements-column-option-text {
  line-height: 1.3;
}
.spec-req-type-color-options {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid color-mix(in srgb, var(--alm-border, #d7dbe2) 92%, #eef2f7 8%);
}
.spec-req-type-color-hint {
  margin: 0.45rem 0 0;
  color: var(--alm-text-muted, #667085);
  font-size: 0.86rem;
  line-height: 1.35;
}
.spec-req-custom-colors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.55rem 0.7rem;
  margin-top: 0.65rem;
}
.spec-req-custom-color-row {
  display: grid;
  grid-template-columns: 3.75rem 2.75rem minmax(6.5rem, 1fr);
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--alm-border, #d7dbe2);
  border-radius: 8px;
  background: #fff;
}
.spec-req-custom-color-label {
  font-weight: 700;
  color: #314054;
}
.spec-req-custom-color-picker {
  width: 2.5rem;
  height: 2rem;
  padding: 0.1rem;
  border: 1px solid var(--alm-border, #d7dbe2);
  border-radius: 6px;
  background: #fff;
}
.spec-req-custom-color-hex {
  width: 100%;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-transform: uppercase;
}
.spec-requirements-link-display-row {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid color-mix(in srgb, var(--alm-border, #d7dbe2) 92%, #eef2f7 8%);
}
.spec-quickstart-panel {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--alm-border, #d7dbe2) 88%, #6b7cff 12%);
  border-radius: 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--alm-surface, #fff) 94%, #eef4ff 6%) 0%, var(--alm-surface, #fff) 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
.spec-quickstart-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.spec-quickstart-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3559c7;
}
.spec-quickstart-title {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.05rem;
  line-height: 1.35;
}
.spec-quickstart-copy {
  margin: 0;
  color: var(--alm-text-muted, #55606b);
  line-height: 1.45;
}
.spec-quickstart-dismiss {
  border: 0;
  background: transparent;
  color: var(--alm-text-muted, #55606b);
  cursor: pointer;
  padding: 0.25rem 0.1rem;
  font-size: 0.9rem;
}
.spec-quickstart-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.spec-quickstart-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  padding: 0.8rem 0.9rem;
  text-align: left;
  border: 1px solid var(--alm-border, #d7dbe2);
  border-radius: 8px;
  background: var(--alm-surface, #fff);
  cursor: pointer;
}
.spec-quickstart-choice.is-selected {
  border-color: #3559c7;
  box-shadow: 0 0 0 2px rgba(53, 89, 199, 0.12);
  background: #f6f8ff;
}
.spec-quickstart-choice-title {
  font-weight: 600;
  color: #172033;
}
.spec-quickstart-choice-copy {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--alm-text-muted, #55606b);
}
.spec-quickstart-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.spec-quickstart-summary-card {
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--alm-border, #d7dbe2);
  border-radius: 8px;
  background: color-mix(in srgb, var(--alm-surface, #fff) 96%, #f4f6fb 4%);
}
.spec-quickstart-summary-label {
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--alm-text-muted, #667085);
}
.spec-quickstart-summary-title {
  font-size: 1rem;
  font-weight: 600;
  color: #182230;
}
.spec-quickstart-summary-copy {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #324054;
}
.spec-quickstart-summary-copy-muted {
  color: var(--alm-text-muted, #667085);
}
.spec-quickstart-readiness-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.spec-quickstart-readiness-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}
.spec-quickstart-readiness-badge.is-ready {
  background: #e7f6ec;
  color: #0f6a3c;
}
.spec-quickstart-readiness-badge.is-blocked {
  background: #fdecec;
  color: #a52a2a;
}
.spec-quickstart-readiness-list {
  margin: 0.55rem 0 0;
  padding-left: 1.1rem;
  color: #324054;
}
.spec-quickstart-readiness-list li + li {
  margin-top: 0.3rem;
}
.spec-quickstart-action-area {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid color-mix(in srgb, var(--alm-border, #d7dbe2) 88%, #eef2f7 12%);
}
.spec-quickstart-action-lead {
  margin: 0;
  flex: 1 1 20rem;
  color: #324054;
  line-height: 1.45;
}
.spec-quickstart-format-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.spec-quickstart-format-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--alm-text-muted, #667085);
}
.spec-quickstart-format-select {
  min-width: 12rem;
  padding: 0.35rem 0.45rem;
}
.spec-quickstart-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.spec-meta-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  max-width: 500px;
  margin-bottom: 1rem;
}
.spec-meta-input {
  padding: 0.35rem;
}
.spec-sections-wrapper {
  margin-bottom: 1rem;
}
.spec-section-group-heading {
  margin: 1rem 0 0.45rem;
  padding: 0.45rem 0 0.35rem;
  border-top: 1px solid color-mix(in srgb, var(--alm-border, #d7dbe2) 88%, #eef2f7 12%);
  color: #172033;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}
.spec-sync-wp-block + .spec-section-group-heading {
  margin-top: 0.75rem;
}
.spec-sync-wp-row {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--alm-border, #eee);
}
.spec-sync-wp-label {
  margin-left: 0.35rem;
}
.spec-section-block {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--alm-border, #ddd);
  border-radius: var(--alm-radius-sm, 4px);
  background: var(--alm-surface-muted, #fafafa);
}
.spec-section-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  margin-bottom: 0.5rem;
}
.spec-section-label {
  min-width: min(100%, 14rem);
  margin-right: 0;
  color: #1f2933;
}
.spec-section-label--heading {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  cursor: pointer;
}
.spec-section-heading {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
}
.spec-section-view-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  min-width: 0;
  margin-left: auto;
}
.spec-view-inline-label {
  margin-right: 0.25rem;
}
.spec-view-select {
  padding: 0.25rem;
}
.spec-arch-views-btn {
  padding: 0.25rem 0.5rem;
}
.spec-arch-views-summary {
  margin-left: 0.5rem;
  font-size: 0.9rem;
  color: var(--alm-text-muted, #555);
}
.spec-annex-advanced-details {
  margin-top: 0.5rem;
  border: 1px solid var(--alm-border, #ddd);
  border-radius: var(--alm-radius-sm, 4px);
  padding: 0.35rem 0.5rem;
  background: var(--alm-surface, #fff);
}
.spec-annex-advanced-details > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--alm-text-muted, #455a64);
}
.spec-annex-advanced-inner {
  margin-top: 0.5rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--alm-border, #e0e0e0);
}
.spec-format-fieldset {
  margin: 1rem 0;
  padding: 0.65rem 1rem;
  border: 1px solid var(--alm-border, #ccc);
  border-radius: var(--alm-radius-sm, 4px);
}
.spec-format-fieldset legend {
  padding: 0 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.spec-format-radios-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.spec-format-option-label {
  margin-right: 0;
}
.spec-narrative-completeness-report {
  margin-top: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--alm-border, #d7dbe2) 88%, #2f5db8 12%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--alm-surface, #fff) 96%, #f4f7fb 4%);
}
.spec-narrative-completeness-report[hidden] {
  display: none;
}
.spec-narrative-completeness-report-inner,
.spec-narrative-completeness-empty-state {
  padding: 0.85rem 0.95rem;
}
.spec-narrative-completeness-empty-state p {
  margin: 0.35rem 0 0;
  color: var(--alm-text-muted, #55606b);
  line-height: 1.4;
}
.spec-narrative-completeness-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.spec-narrative-completeness-eyebrow {
  margin-bottom: 0.2rem;
  color: #3559c7;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.spec-narrative-completeness-topline h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  color: #172033;
}
.spec-narrative-completeness-topline p {
  margin: 0.35rem 0 0;
  max-width: 46rem;
  color: var(--alm-text-muted, #55606b);
  font-size: 0.88rem;
  line-height: 1.4;
}
.spec-narrative-completeness-readiness {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.75rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}
.spec-narrative-completeness-readiness.is-ready {
  background: #dcfce7;
  color: #166534;
}
.spec-narrative-completeness-readiness.is-review {
  background: #fef3c7;
  color: #92400e;
}
.spec-narrative-completeness-readiness.is-blocked {
  background: #fee2e2;
  color: #991b1b;
}
.spec-narrative-completeness-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}
.spec-narrative-completeness-metric {
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--alm-border, #d7dbe2) 88%, #eef2f7 12%);
  border-radius: 8px;
  background: var(--alm-surface, #fff);
}
.spec-narrative-completeness-metric-value {
  display: block;
  color: #172033;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
}
.spec-narrative-completeness-metric-label {
  display: block;
  margin-top: 0.2rem;
  color: var(--alm-text-muted, #55606b);
  font-size: 0.78rem;
  line-height: 1.25;
}
.spec-narrative-completeness-section {
  margin-top: 0.9rem;
}
.spec-narrative-completeness-section h4 {
  margin: 0 0 0.4rem;
  color: #172033;
  font-size: 0.9rem;
}
.spec-narrative-completeness-axis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.4rem;
}
.spec-narrative-completeness-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.42rem 0.5rem;
  border-radius: 7px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--alm-border, #d7dbe2) 90%, #eef2f7 10%);
}
.spec-narrative-completeness-axis.is-covered {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.spec-narrative-completeness-axis.is-not-represented {
  border-color: #e5e7eb;
  background: #f8fafc;
}
.spec-narrative-completeness-axis-label {
  min-width: 0;
  color: #334155;
  font-size: 0.8rem;
  line-height: 1.25;
}
.spec-narrative-completeness-axis-count {
  flex: 0 0 auto;
  color: #172033;
  font-weight: 800;
}
.spec-narrative-completeness-list {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.spec-narrative-completeness-list-item {
  padding: 0.55rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--alm-border, #d7dbe2) 90%, #eef2f7 10%);
  border-radius: 8px;
  background: var(--alm-surface, #fff);
}
.spec-narrative-completeness-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}
.spec-narrative-completeness-list-head strong {
  min-width: 0;
  color: #172033;
  font-size: 0.84rem;
  line-height: 1.3;
}
.spec-narrative-completeness-list-item p {
  margin: 0.25rem 0 0;
  color: var(--alm-text-muted, #55606b);
  font-size: 0.82rem;
  line-height: 1.35;
}
.spec-narrative-completeness-severity {
  flex: 0 0 auto;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.spec-narrative-completeness-severity.is-warning {
  background: #fef3c7;
  color: #92400e;
}
.spec-narrative-completeness-severity.is-error,
.spec-narrative-completeness-severity.is-critical {
  background: #fee2e2;
  color: #991b1b;
}
.spec-narrative-completeness-empty {
  margin: 0;
  color: var(--alm-text-muted, #667085);
  font-size: 0.84rem;
  line-height: 1.35;
}
.spec-template-row {
  margin-bottom: 1rem;
}
.spec-template-label {
  margin-right: 0.5rem;
}
.spec-template-file-input {
  padding: 0.25rem;
}
.spec-actions-row-sticky {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 0;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--alm-surface, #fff) 85%, rgba(255, 255, 255, 0));
  border-top: 1px solid var(--alm-border, #ddd);
}
.spec-action-btn {
  padding: 0.5rem 1rem;
}
.spec-action-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
@media (max-width: 640px) {
  .spec-section-label,
  .spec-section-view-wrap {
    flex: 1 1 calc(100% - 2rem);
  }
  .spec-section-view-wrap {
    margin-left: 1.65rem;
  }
  .spec-requirements-filter-row {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .spec-requirements-column-option {
    border-radius: 14px;
  }
  .spec-requirements-inline-select {
    min-width: 0;
    width: 100%;
  }
  .spec-quickstart-top {
    flex-direction: column;
  }
  .spec-quickstart-dismiss {
    padding-left: 0;
  }
  .spec-quickstart-action-area {
    align-items: stretch;
  }
}

.filter-section {
  border-radius: var(--alm-radius-md);
  padding: 0.85rem;
}

.toolbar {
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  padding: 0 0 0.25rem;
  scrollbar-width: thin;
}

.almanac-feedback-toolbar-panel {
  background: var(--alm-surface);
  border: 1px solid var(--alm-border);
  border-radius: var(--alm-radius-md);
  box-shadow: var(--alm-shadow-md);
}

.toolbar-btn,
.view-buttons button,
.reset-btn,
.validation-summary-bar button,
.glossary-view-header button,
.glossary-header-nav-btn,
.glossary-subnav-btn,
.requirements-show-details-pane-btn,
.form-actions button,
.export-buttons button,
.action-buttons button,
button {
  border-radius: 10px;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.toolbar-btn {
  padding: 0.48rem 0.8rem;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  font-weight: 600;
}

#almanac-file-toolbar-toggle {
  background: #f8fafc;
  color: #29465d;
  border-color: #dbe4ec;
}

#almanac-file-toolbar-toggle:hover,
#almanac-file-toolbar-toggle:focus-visible {
  background: #eef5fb;
  border-color: #bfd2e4;
}

#almanac-file-toolbar-toggle[aria-expanded="true"],
#almanac-file-toolbar-toggle[aria-expanded="true"]:hover,
#almanac-file-toolbar-toggle[aria-expanded="true"]:focus-visible {
  background: linear-gradient(180deg, #1462eb 0%, var(--alm-primary) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(0, 83, 219, 0.22);
}

.toolbar-btn:hover,
.view-buttons button:hover,
.reset-btn:hover,
.glossary-view-header button:hover,
.glossary-header-nav-btn:hover,
.glossary-subnav-btn:hover,
.validation-summary-bar button:hover,
.form-actions button:hover,
.action-buttons button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.10);
}

.toolbar-btn.toolbar-btn-primary,
.glossary-header-nav-btn,
.glossary-subnav-btn,
.choose-fields-actions .btn-primary {
  background: linear-gradient(180deg, #1462eb 0%, var(--alm-primary) 100%);
  color: #fff;
}

.toolbar-btn.toolbar-btn-primary:hover,
.glossary-header-nav-btn:hover,
.glossary-subnav-btn:hover,
.choose-fields-actions .btn-primary:hover {
  background: linear-gradient(180deg, #0f59dd 0%, var(--alm-primary-strong) 100%);
}

.glossary-subnav-btn.active {
  background: linear-gradient(180deg, #0f59dd 0%, var(--alm-primary-strong) 100%);
  border-color: transparent;
  color: #fff;
}

.toolbar-btn.toolbar-btn-load,
.form-actions button[type="submit"],
.glossary-view-header > div:first-of-type button {
  background: linear-gradient(180deg, #18906f 0%, var(--alm-success) 100%);
  color: #fff;
}

.toolbar-btn.toolbar-btn-ie,
.toolbar-btn.toolbar-btn-html,
.toolbar-btn.toolbar-btn-changelog,
.toolbar-btn.toolbar-btn-settings,
.view-buttons button:not(.active),
.validation-summary-bar button,
.requirements-show-details-pane-btn,
.choose-fields-actions .btn-secondary,
.form-actions button[type="button"]:not([id$="-delete-btn"]):not(#delete-btn):not(#delete-attribute-btn),
.reset-btn {
  background: #fff;
  color: var(--alm-text);
  border: 1px solid var(--alm-border);
}

.toolbar-btn.toolbar-btn-ie:hover,
.toolbar-btn.toolbar-btn-html:hover,
.toolbar-btn.toolbar-btn-changelog:hover,
.toolbar-btn.toolbar-btn-settings:hover,
.view-buttons button:not(.active):hover,
.validation-summary-bar button:hover,
.requirements-show-details-pane-btn:hover,
.choose-fields-actions .btn-secondary:hover,
.form-actions button[type="button"]:not([id$="-delete-btn"]):not(#delete-btn):not(#delete-attribute-btn):hover,
.reset-btn:hover {
  background: var(--alm-surface-2);
  border-color: var(--alm-border-strong);
}

.glossary-products-view-mode-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.toolbar-btn.glossary-products-add-btn {
  border-radius: 999px;
  box-shadow: none;
}

.glossary-products-view-mode-bar .glossary-products-view-mode-btn {
  min-height: 2.2rem;
  padding: 0.42rem 0.82rem;
  border-radius: 999px;
  background: #fff;
  color: #29465d;
  border-color: #cbd5e1;
  box-shadow: none;
}

.glossary-products-view-mode-bar .glossary-products-view-mode-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.glossary-products-view-mode-bar .glossary-products-view-mode-btn--active,
.glossary-products-view-mode-bar .glossary-products-view-mode-btn--active:hover {
  background: #dbeafe;
  color: #0f4c81;
  border-color: #60a5fa;
  box-shadow: none;
}

#delete-btn,
.form-actions button[type="button"][id$="-delete-btn"],
.form-actions button[type="button"]#delete-attribute-btn,
.toolbar-btn.toolbar-btn-danger {
  background: linear-gradient(180deg, #d95555 0%, var(--alm-danger) 100%);
  color: #fff;
  border: 1px solid transparent;
}

#delete-btn:hover,
.form-actions button[type="button"][id$="-delete-btn"]:hover,
.form-actions button[type="button"]#delete-attribute-btn:hover,
.toolbar-btn.toolbar-btn-danger:hover {
  background: linear-gradient(180deg, #c94848 0%, #8f2a2a 100%);
  border-color: transparent;
}

.view-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--alm-border);
}

.view-buttons button {
  margin-right: 0;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  border: 1px solid var(--alm-border);
  background: #fff;
  color: var(--alm-text-muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.view-buttons button .alm-view-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.88;
}

.view-buttons button .alm-view-tab-icon svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.view-buttons button.active .alm-view-tab-icon {
  opacity: 1;
}

.view-buttons button.active {
  background: linear-gradient(180deg, #1462eb 0%, var(--alm-primary) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow:
    0 8px 18px rgba(0, 83, 219, 0.22),
    inset 0 -3px 0 rgba(255, 255, 255, 0.22);
}

#btn-service.active {
  background: linear-gradient(180deg, #1462eb 0%, var(--alm-primary) 100%) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 8px 18px rgba(0, 83, 219, 0.22);
}

#main-menu.toolbar {
  overflow-x: visible;
}

#main-menu.toolbar > .view-buttons {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-bottom: 0;
  padding: 0;
  border-bottom: none;
  -webkit-overflow-scrolling: touch;
}

#main-menu > .view-buttons button:hover,
#main-menu > .view-buttons button:focus-visible {
  transform: none;
}

@media (max-width: 1024px) {
  .header-divider {
    margin: 0 8px;
  }
}

@media (max-width: 720px) {
  .header-divider {
    display: none;
  }
}

/* File menu: stitch-like export rows (quick formats) */
.almanac-file-menu-section .almanac-file-menu-export-rows {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.35rem;
  width: 100%;
}

.alm-export-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--alm-border);
  border-radius: var(--alm-radius-sm);
  background: var(--alm-surface-2);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.alm-export-row:hover {
  border-color: rgba(0, 83, 219, 0.35);
  background: var(--alm-primary-soft);
  box-shadow: 0 2px 8px rgba(0, 83, 219, 0.08);
}

.alm-export-row-icon {
  flex-shrink: 0;
  color: var(--alm-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.alm-export-row-icon svg {
  display: block;
}

.alm-export-row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.alm-export-row-title {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--alm-text);
  line-height: 1.2;
}

.alm-export-row-sub {
  font-size: 0.65rem;
  color: var(--alm-text-muted);
  line-height: 1.2;
}

.alm-export-row-chevron {
  flex-shrink: 0;
  color: var(--alm-text-muted);
  opacity: 0.75;
  display: flex;
  align-items: center;
}

/* Snapshot manager modal: stats + vertical timeline */
.alm-snapshot-modal-stats {
  margin-bottom: 1rem;
  padding: 0.5rem 0.65rem;
  background: var(--alm-surface-2);
  border: 1px solid var(--alm-border);
  border-radius: var(--alm-radius-sm);
  font-size: 0.9rem;
}

.alm-snapshot-create-btn {
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  border: none;
  border-radius: var(--alm-radius-sm);
  cursor: pointer;
  font-weight: 600;
  background: linear-gradient(180deg, #18906f 0%, var(--alm-success) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13, 122, 95, 0.25);
}

.alm-snapshot-create-btn:hover {
  filter: brightness(1.05);
}

.alm-snapshot-timeline {
  margin-bottom: 1rem;
  max-height: 400px;
  overflow-y: auto;
  margin-left: 0.35rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--alm-border);
}

.alm-snapshot-timeline-item {
  position: relative;
  margin-bottom: 0.85rem;
  padding-left: 0.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.alm-snapshot-timeline-item:last-child {
  margin-bottom: 0;
}

.alm-snapshot-timeline-item::before {
  content: '';
  position: absolute;
  left: -1.2rem;
  top: 0.4rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(180deg, #1462eb 0%, var(--alm-primary) 100%);
  border: 2px solid var(--alm-surface);
  box-shadow: 0 0 0 1px var(--alm-border);
}

.alm-snapshot-timeline-info {
  flex: 1;
  min-width: 0;
}

.alm-snapshot-timeline-name {
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--alm-text);
}

.alm-snapshot-timeline-desc {
  font-size: 0.9rem;
  color: var(--alm-text-muted);
  margin-bottom: 0.25rem;
}

.alm-snapshot-timeline-meta {
  font-size: 0.85rem;
  color: var(--alm-text-muted);
}

.alm-snapshot-timeline-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
  align-items: center;
}

.alm-snapshot-timeline-actions button {
  padding: 0.35rem 0.75rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.alm-snapshot-btn-load {
  background: linear-gradient(180deg, #1462eb 0%, var(--alm-primary) 100%);
  color: #fff;
}

.alm-snapshot-btn-delete {
  background: linear-gradient(180deg, #d95555 0%, var(--alm-danger) 100%);
  color: #fff;
}

.alm-snapshot-empty {
  color: var(--alm-text-muted);
  text-align: center;
  padding: 2rem;
}

.validation-summary-bar,
.version-number,
.filter-table .filter-group-header,
.modal-filter-table .modal-filter-group-header {
  letter-spacing: 0.01em;
}

.version-number {
  border-radius: 999px;
  box-shadow: var(--alm-shadow-sm);
  backdrop-filter: blur(6px);
}

.filter-table,
.modal-filter-table,
.requirements-table,
#requirements-table,
#glossary-table,
#scenarios-table,
#scenario-table,
#attributes-table,
#risks-table,
#codex-table,
#service-table,
#enre-table,
#rules-table,
#spec-table,
#gloss-scenario-attributes-table,
.table-like {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 14px;
}

/* #data-model-table omitted above: overflow:hidden breaks position:sticky on thead; radius on .alm-table-horizontal-scroll wrapper */
#data-model-table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: visible;
}
#glossary-subview-container.glossary-table table.data-model-table {
  overflow: visible;
}

.filter-table th,
.modal-filter-table th,
table th {
  background: var(--alm-surface-2);
  color: var(--alm-text);
  border-color: var(--alm-border);
  font-weight: 700;
}

.filter-table th,
.filter-table td,
.modal-filter-table th,
.modal-filter-table td,
table th,
table td {
  border-color: var(--alm-border);
}

.filter-table td,
.modal-filter-table td,
table td {
  background: #fff;
}

/* Initial vs Action mismatch (Scenario Attribute Values): must win over .filter-table td background */
.filter-table td.changed,
.modal-filter-table td.changed {
  background-color: #ffeb3b;
  font-weight: 700;
}

tbody tr:nth-child(even) td {
  background: #fbfdfe;
}

tbody tr:hover td,
tr.hoverable:hover td,
#requirements-table tbody tr:hover td,
#glossary-table tbody tr:hover td {
  background: #f4f8ff;
}

/* Requirements List: soft row tint by requirement type so EPIC / HLR / US / ACC
   are easier to distinguish at a glance without overwhelming the table. */
.requirements-list-table tbody tr[data-requirement-type] {
  --req-row-bg: #ffffff;
  --req-row-hover-bg: #f4f8ff;
  --req-row-accent: transparent;
}
.requirements-list-table tbody tr[data-requirement-type="EPIC"] {
  --req-row-bg: #e9eff6;
  --req-row-hover-bg: #d9e6f3;
  --req-row-accent: #5f7ea5;
}
.requirements-list-table tbody tr[data-requirement-type="HLR"] {
  --req-row-bg: #f0f5fb;
  --req-row-hover-bg: #e1ebf8;
  --req-row-accent: #7ea2cd;
}
.requirements-list-table tbody tr[data-requirement-type="US"] {
  --req-row-bg: #f6faff;
  --req-row-hover-bg: #dfedff;
  --req-row-accent: #8fc2ff;
}
.requirements-list-table tbody tr[data-requirement-type="ACC"] {
  --req-row-bg: #edf4ff;
  --req-row-hover-bg: #d6e6ff;
  --req-row-accent: #4f8fda;
}
.requirements-list-table tbody tr[data-requirement-type] td {
  background: var(--req-row-bg) !important;
  transition: background-color 0.14s ease;
}
.requirements-list-table tbody tr[data-requirement-type] td:first-child {
  box-shadow: inset 4px 0 0 var(--req-row-accent);
}
.requirements-list-table tbody tr[data-requirement-type]:hover td {
  background: var(--req-row-hover-bg) !important;
}
.requirements-list-table tbody tr[data-requirement-type="ACC"] td[data-column="id"],
.requirements-list-table tbody tr[data-requirement-type="ACC"] td[data-column="title"],
.requirements-list-table tbody tr[data-requirement-type="ACC"] td[data-column="description"] {
  color: #1d4f91;
}
.requirements-list-table tbody tr[data-requirement-type="ACC"] td[data-column="id"] {
  font-weight: 600;
}

tr.row-error td {
  background: #fff4f4 !important;
}

tr.row-warning td {
  background: #fff8eb !important;
}

.requirements-row-selected td,
.requirements-row-selected {
  background: rgba(0, 83, 219, 0.14) !important;
}

/* Text-like inputs only — do not restyle checkbox, radio, file, range, or native button inputs */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
select,
textarea,
.form-control,
.editable-cell,
.modal-filter-table input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
.modal-filter-table select,
.filter-table select {
  border-radius: 10px;
  border: 1px solid var(--alm-border);
  background: #fff;
  color: var(--alm-text);
  box-shadow: inset 0 1px 2px rgba(15,23,42,0.02);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
select,
textarea,
.form-control {
  padding: 0.58rem 0.72rem;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"])::placeholder,
textarea::placeholder {
  color: #8a98a3;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):hover,
select:hover,
textarea:hover,
.form-control:hover {
  border-color: var(--alm-border-strong);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):focus,
select:focus,
textarea:focus,
.form-control:focus,
.editable-cell:focus {
  border-color: rgba(0, 83, 219, 0.42);
  box-shadow: 0 0 0 4px rgba(0, 83, 219, 0.12);
  outline: none;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):focus-visible,
select:focus-visible,
textarea:focus-visible,
.form-control:focus-visible,
.editable-cell:focus-visible {
  outline: 2px solid #2196F3;
  outline-offset: 2px;
}

.form-group label {
  color: var(--alm-text);
  font-size: 0.92rem;
}

.validation-summary-bar {
  gap: 0.65rem;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}
details.requirements-validation-details {
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}
.requirements-validation-details-body .validation-summary-bar {
  background: transparent;
}

.requirements-details-pane {
  border-left: 1px solid var(--alm-border);
  border-radius: 0 var(--alm-radius-lg) var(--alm-radius-lg) 0;
  overflow: hidden;
}

.requirements-details-pane-header {
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fb 100%);
  border-bottom: 1px solid var(--alm-border);
  padding: 0.75rem 0.9rem;
}

.requirements-details-pane-body {
  padding: 1rem;
}

.glossary-view-header,
.requirements-view-header {
  margin-bottom: 1rem;
}

.glossary-view-header button,
.glossary-header-nav-btn,
.glossary-subnav-btn,
.form-actions button,
.export-buttons button,
.action-buttons button {
  font-weight: 600;
}

.modal {
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
}

.modal-content,
.bpmn-flow-content {
  padding: 1.1rem 1.1rem 1rem;
  border-color: rgba(183, 197, 208, 0.8);
}

.close,
.bpmn-flow-close {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--alm-text-muted);
}

.close:hover,
.bpmn-flow-close:hover {
  background: var(--alm-surface-2);
  color: var(--alm-text);
}

.attributes-scroll-container {
  border-color: var(--alm-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fcfdff 0%, #f8fbfd 100%);
}

.almanac-share-banner {
  background: linear-gradient(90deg, #0d4fd6 0%, #0c67f4 100%);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.18);
}

a {
  color: var(--alm-primary);
}

a:hover {
  color: var(--alm-primary-strong);
}

/* Journey flow modal — align with main modal / BPMN surfaces */
.journey-flow-modal {
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
}
.journey-flow-content {
  background: var(--alm-surface);
  border: 1px solid rgba(183, 197, 208, 0.8);
  border-radius: var(--alm-radius-lg);
  box-shadow: var(--alm-shadow-sm);
  padding: 1.1rem 1.1rem 1rem;
}
.journey-flow-header {
  border-bottom-color: var(--alm-border);
}
.journey-flow-diagram-container {
  border: 1px solid var(--alm-border);
  border-radius: var(--alm-radius-sm);
  background: var(--alm-surface-2);
}
.journey-flow-close {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--alm-text-muted);
}
.journey-flow-close:hover {
  background: var(--alm-surface-2);
  color: var(--alm-text);
}

/* Floating combobox / pickers */
.content-type-dropdown {
  background: var(--alm-surface);
  border: 1px solid var(--alm-border);
  border-radius: var(--alm-radius-sm);
  box-shadow: var(--alm-shadow-md);
}
.content-type-dropdown > div:hover {
  background: var(--alm-surface-2);
}

.relation-to-term-list-wrap {
  background: var(--alm-surface);
  border: 1px solid var(--alm-border);
  border-radius: var(--alm-radius-sm);
  box-shadow: var(--alm-shadow-md);
}
.relation-to-term-option:hover {
  background: var(--alm-surface-2);
}

/* Taxonomy & UI inventory — card chrome only (layout unchanged) */
.taxonomy-tree-container {
  background: var(--alm-surface);
  border: 1px solid var(--alm-border);
  border-radius: var(--alm-radius-lg);
  box-shadow: var(--alm-shadow-sm);
}
.ui-inventory-container {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* Chips & choose-fields — token colors; keep padding for touch targets */
.chip,
.choose-fields-chip {
  background: var(--alm-primary-soft);
  border: 1px solid var(--alm-border);
  color: var(--alm-text);
}
.choose-fields-available-list,
.choose-fields-selected-list {
  background: linear-gradient(180deg, #fcfdff 0%, #f8fbfd 100%);
  border-color: var(--alm-border);
  border-radius: var(--alm-radius-sm);
}
.choose-fields-search {
  border-color: var(--alm-border);
  border-radius: var(--alm-radius-sm);
}
.choose-fields-option-label:hover {
  background: var(--alm-surface-2);
}

/* Story map / status / roles — neutral borders only (semantic fills unchanged) */
.story-map-table th,
.story-map-table td,
.story-map-flow-table th,
.story-map-flow-table td,
.roles-table th,
.roles-table td {
  border-color: var(--alm-border);
}
.status-board,
.status-board .status-col {
  border-color: var(--alm-border);
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: #eef3f6;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: #c4d0d9;
  border-radius: 999px;
  border: 2px solid #eef3f6;
}

::-webkit-scrollbar-thumb:hover {
  background: #aab9c4;
}

@media (max-width: 1280px) {
  .sidebar {
    width: 520px;
    min-width: 520px;
    max-width: 520px;
  }
  .requirements-details-pane {
    width: 380px;
    min-width: 320px;
  }
}

@media (max-width: 900px) {
  body {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }
  .almanac-main-columns {
    flex-direction: column;
  }
  .content {
    width: auto;
    min-width: 0;
    overflow: visible;
  }
  .sidebar,
  .sidebar.collapsed {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    border-right: none;
    border-bottom: 1px solid var(--alm-border);
  }
  .requirements-list-with-pane {
    flex-direction: column;
  }
  .requirements-details-pane {
    width: 100%;
    max-width: none;
    border-left: none;
    border-top: 1px solid var(--alm-border);
    border-radius: 0 0 var(--alm-radius-lg) var(--alm-radius-lg);
  }
}


/* Work profile: optional disclosure control (Client spec profile) */
#requirement-modal #req-modal-expand-tier1-btn {
  background: #e8f5e9;
  border-color: #81c784;
  color: #1b5e20;
}
#requirement-modal #req-modal-expand-tier1-btn[aria-pressed="true"] {
  font-weight: 600;
  background: #c8e6c9;
}

/* Glossary: Business Function — More — scenarios & traceability (Client spec); swim/BOL in key fields */
#glossary-modal #gloss-bpmn-expand-tier1-btn {
  background: #e8f5e9;
  border-color: #81c784;
  color: #1b5e20;
}
#glossary-modal #gloss-bpmn-expand-tier1-btn[aria-pressed="true"] {
  font-weight: 600;
  background: #c8e6c9;
}
#glossary-modal .gloss-bpmn-tier1-inline-actions {
  display: flex;
  justify-content: flex-start;
}
#glossary-modal .gloss-bpmn-tier1-inline-actions #gloss-bpmn-expand-tier1-btn {
  margin-top: 0.35rem;
}
#glossary-modal .gloss-bpmn-tier1-collapsed-hint {
  font-size: 0.8rem;
  color: #455a64;
  margin: 0 0 0.35rem 0;
  padding: 0.4rem 0.55rem;
  background: var(--alm-surface-muted, #eceff1);
  border-radius: var(--alm-radius-sm, 4px);
  line-height: 1.4;
  border: 1px solid var(--alm-border, #e0e0e0);
}
#glossary-modal .glossary-bpmn-tier1-toolbar {
  margin-top: 0.25rem;
}
#glossary-modal .glossary-bpmn-function-key-fields {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--alm-border, #e0e0e0);
}
#glossary-modal .glossary-bpmn-key-attributes-heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: #37474f;
  margin: 0 0 0.5rem 0;
}

#requirement-modal .req-modal-tier1-collapsed-hint {
  font-size: 0.8rem;
  color: #455a64;
  margin: 0 0 0.5rem 0;
  padding: 0.4rem 0.55rem;
  background: var(--alm-surface-muted, #eceff1);
  border-radius: var(--alm-radius-sm, 4px);
  line-height: 1.4;
  border: 1px solid var(--alm-border, #e0e0e0);
}


/* ARIS / RM handoff map modal (Requirements list export gate) */
.aris-coverage-map-table tbody tr:nth-child(even) { background: #fafafa; }
.aris-coverage-map-panel h3 { color: #37474f; }


/* Reconciliation Lab — Triage Queue */
.recon-triage-panel .recon-triage-intro {
  font-size: 0.85rem;
  color: #444;
  line-height: 1.45;
  margin: 0 0 0.65rem 0;
}
.recon-triage-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
}
.recon-triage-filter-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.recon-triage-rec-label {
  flex: 1 1 12rem;
  min-width: min(100%, 14rem);
}
.recon-triage-rec-input {
  flex: 1;
  min-width: 8rem;
  max-width: 22rem;
  padding: 0.2rem 0.35rem;
  font-size: 0.82rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.recon-triage-meta {
  font-size: 0.8rem;
  color: #555;
  margin: 0 0 0.4rem 0;
}
.recon-triage-list-wrap {
  max-height: 480px;
  overflow: auto;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fafafa;
  padding: 0.35rem;
}
.recon-triage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.recon-triage-table thead th {
  text-align: left;
  padding: 0.35rem 0.4rem;
  background: #eee;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 1;
}
.recon-triage-table td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}
.recon-triage-table tbody tr:hover {
  background: #fff;
}
.recon-triage-type-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: #e3f2fd;
  border: 1px solid #90caf9;
  white-space: nowrap;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recon-triage-cell-id .recon-triage-rtype {
  font-size: 0.72rem;
  color: #666;
  margin-left: 0.25rem;
}
.recon-triage-reasons {
  font-size: 0.76rem;
  color: #333;
  line-height: 1.35;
}
.recon-triage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.recon-triage-empty {
  font-size: 0.85rem;
  color: #666;
  margin: 0.5rem 0;
}
.recon-triage-pager {
  margin-top: 0.5rem;
}
.recon-triage-pager-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}
.recon-triage-page-label {
  color: #555;
}

/* HITL Bulk Review Dashboard (Reconciliation Lab) */
.hitl-review-panel .hitl-review-intro {
  font-size: 0.88rem;
  color: #444;
  line-height: 1.5;
  margin: 0 0 0.65rem 0;
}
.hitl-review-toolbar {
  margin: 0 0 0.75rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.hitl-review-buckets {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.hitl-review-bucket {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fafafa;
  padding: 0.35rem 0.5rem;
}
.hitl-review-details > summary.hitl-review-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  list-style: none;
}
.hitl-review-details > summary.hitl-review-summary::-webkit-details-marker {
  display: none;
}
.hitl-review-subdetails {
  border: 1px solid #e8e8e8;
  border-radius: 5px;
  background: #f5f5f5;
  padding: 0.25rem 0.45rem;
  margin-bottom: 0.45rem;
}
.hitl-review-subdetails:last-child {
  margin-bottom: 0;
}
.hitl-review-subdetails > summary.hitl-review-subsummary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.86rem;
  list-style: none;
  color: #333;
}
.hitl-review-subdetails > summary.hitl-review-subsummary::-webkit-details-marker {
  display: none;
}
.hitl-review-cards-nested {
  margin-top: 0.4rem;
  padding-left: 0.15rem;
}
.hitl-review-count {
  font-weight: 500;
  color: #555;
  font-size: 0.85rem;
}
.hitl-review-cards {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.hitl-review-card {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
  background: #fff;
  font-size: 0.85rem;
  line-height: 1.45;
}
.hitl-review-card-head {
  font-size: 0.78rem;
  color: #555;
  margin-bottom: 0.25rem;
}
.hitl-review-card-id {
  font-weight: 600;
}
.hitl-review-subtype {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.06rem 0.35rem;
  border-radius: 3px;
  background: #e3f2fd;
  font-size: 0.75rem;
}
.hitl-review-card-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
  word-break: break-word;
}
.hitl-review-card-meta,
.hitl-review-merge-sim {
  font-size: 0.78rem;
  color: #666;
  margin-bottom: 0.25rem;
}
.hitl-review-card-reasons {
  font-size: 0.8rem;
  color: #444;
  margin-bottom: 0.45rem;
}
.hitl-review-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.hitl-review-open-target {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #1976d2;
  cursor: pointer;
  text-decoration: underline;
  text-align: left;
}
.hitl-review-card-head .hitl-review-open-target {
  color: #333;
  text-decoration: none;
}
.hitl-review-card-head .hitl-review-open-target:hover {
  color: #1976d2;
  text-decoration: underline;
}
.hitl-review-card-title .hitl-review-open-target {
  display: block;
  width: 100%;
  font-weight: 500;
  color: #1565c0;
  text-decoration: none;
}
.hitl-review-card-title .hitl-review-open-target:hover {
  text-decoration: underline;
}
.hitl-review-merge-col > button.hitl-review-open-target.hitl-review-merge-body {
  display: block;
  width: 100%;
  box-sizing: border-box;
  color: #1565c0;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0;
  background: transparent;
}
.hitl-review-merge-col > button.hitl-review-open-target.hitl-review-merge-body:hover {
  text-decoration: underline;
  border-color: #90caf9;
}
.hitl-review-gbp-req {
  vertical-align: baseline;
}
.recon-draft-desc-preview {
  white-space: pre-wrap;
  word-break: break-word;
}
.recon-promote-intro {
  margin: 0 0 0.55rem 0;
  color: #455a64;
  font-size: 0.85rem;
  line-height: 1.45;
}
.recon-promote-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0 0 0.6rem 0;
}
.recon-promote-guide > div {
  border: 1px solid #d7e3f3;
  border-radius: 6px;
  background: #f8fbff;
  padding: 0.55rem 0.65rem;
  min-width: 0;
}
.recon-promote-guide strong {
  display: block;
  color: #17324d;
  font-size: 0.84rem;
  margin-bottom: 0.15rem;
}
.recon-promote-guide span {
  display: block;
  color: #546a7b;
  font-size: 0.78rem;
  line-height: 1.35;
}
.recon-promote-primary-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 0.45rem 0;
}
.recon-promote-primary-toolbar label {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.85rem;
}
.recon-promote-primary-toolbar span {
  color: #60727d;
  font-size: 0.82rem;
}
.recon-promote-advanced-tools {
  border: 1px solid #d7e3f3;
  border-radius: 6px;
  background: #fbfdff;
  margin: 0 0 0.55rem 0;
}
.recon-promote-advanced-tools > summary {
  cursor: pointer;
  font-weight: 700;
  color: #17324d;
  padding: 0.5rem 0.65rem;
}
.recon-promote-advanced-body {
  border-top: 1px solid #e4edf7;
  padding: 0.6rem;
  display: grid;
  gap: 0.55rem;
}
.recon-promote-advanced-section {
  border: 1px solid #e3eaf2;
  border-radius: 6px;
  padding: 0.55rem;
  background: #fff;
}
.recon-promote-advanced-section h5 {
  margin: 0 0 0.25rem 0;
  font-size: 0.88rem;
}
.recon-promote-advanced-note {
  margin: 0 0 0.45rem 0;
  color: #60727d;
  font-size: 0.8rem;
  line-height: 1.35;
}
.recon-promote-advanced-warning {
  color: #92400e;
}
.recon-promote-advanced-actions,
.recon-promote-bulk-source {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.recon-promote-bulk-source {
  margin-bottom: 0.45rem;
}
.recon-promote-bulk-source label {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.82rem;
}
.recon-promote-refine-summary {
  font-size: 0.84rem;
}
.recon-promote-refine-summary > summary {
  cursor: pointer;
  font-weight: 700;
}
.recon-promote-refine-summary > div {
  margin-top: 0.45rem;
  padding: 0.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fafafa;
  max-height: 320px;
  overflow: auto;
}
.recon-draft-table-wrap {
  margin: 0.5rem 0 0 0;
  overflow: auto;
  border: 1px solid #dce3ea;
  border-radius: 6px;
  background: #fff;
}
.recon-draft-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.84rem;
}
.recon-draft-table th,
.recon-draft-table td {
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid #e8edf3;
  padding: 0.5rem 0.55rem;
}
.recon-draft-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f8fc;
  color: #34495e;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0;
  border-bottom: 1px solid #cfd9e5;
}
.recon-draft-table th:first-child,
.recon-draft-table td:first-child {
  width: 3.2rem;
}
.recon-draft-table th:nth-child(2),
.recon-draft-table td:nth-child(2) {
  width: 7rem;
}
.recon-draft-table th:nth-child(4),
.recon-draft-table td:nth-child(4) {
  width: 10rem;
}
.recon-draft-table th:nth-child(5),
.recon-draft-table td:nth-child(5) {
  width: 17rem;
}
.recon-draft-table th:nth-child(6),
.recon-draft-table td:nth-child(6) {
  width: 15rem;
}
.recon-draft-row {
  background: #fff;
}
.recon-draft-row--approving {
  background: #f0fdf4;
  box-shadow: inset 3px 0 0 #16a34a;
}
.recon-draft-table-group th {
  position: sticky;
  top: 2.15rem;
  z-index: 1;
  background: #eef4ff;
  color: #1e3a8a;
  font-size: 0.8rem;
  font-weight: 700;
  border-bottom: 1px solid #ccd8f0;
}
.recon-draft-table-select {
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.recon-draft-table-kind,
.recon-draft-table-title {
  font-weight: 700;
  color: #172b3a;
}
.recon-draft-table-origin,
.recon-draft-table-muted {
  color: #60727d;
  font-size: 0.78rem;
}
.recon-draft-table-desc {
  margin-top: 0.3rem;
  color: #3f4d57;
  line-height: 1.45;
  max-height: 7.25em;
  overflow: hidden;
}
.recon-draft-table-chips,
.recon-draft-table-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}
.recon-draft-table-chips + .recon-draft-table-chips {
  margin-top: 0.3rem;
}
.recon-draft-parent-target {
  display: grid;
  gap: 0.3rem;
}
.recon-draft-parent-target label {
  color: #536675;
  font-size: 0.78rem;
  font-weight: 650;
}
.recon-draft-parent-target select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0.25rem 0.4rem;
}
.recon-draft-parent-target p {
  margin: 0.1rem 0 0 0;
  color: #92400e;
  font-size: 0.78rem;
  line-height: 1.35;
}
.recon-draft-table-trace {
  color: #526574;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.recon-draft-table-detail-row > td {
  background: #fbfdff;
  padding: 0.6rem 0.75rem;
}
.recon-draft-table-enrichment {
  padding: 0.45rem 0.55rem;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 4px;
  font-size: 0.82rem;
}
.recon-draft-table-approval-row .recon-draft-approval-preview {
  margin: 0;
}
.recon-draft-row-actions {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.toolbar-btn.recon-draft-approve,
.toolbar-btn.recon-draft-approve-confirm {
  background: #16a34a;
  color: #fff;
}
.toolbar-btn.recon-draft-approve:hover,
.toolbar-btn.recon-draft-approve-confirm:hover {
  background: #15803d;
}
.toolbar-btn.recon-draft-discard {
  background: #fff1f2;
  color: #991b1b;
  border: 1px solid #fecdd3;
}
.almanac-draft-risk-evidence {
  margin: 0.55rem 0;
  padding: 0.55rem;
  border: 1px solid #f3c2d8;
  border-radius: 6px;
  background: #fff6fb;
  color: #4a2435;
}
.almanac-draft-risk-evidence-empty {
  color: #60727d;
  background: #f8fbff;
  border-color: #d7e3f3;
}
.almanac-draft-risk-evidence-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: baseline;
  margin-bottom: 0.45rem;
}
.almanac-draft-risk-evidence-head strong {
  color: #9d174d;
  font-size: 0.9rem;
}
.almanac-draft-risk-evidence-head span,
.almanac-draft-risk-evidence-muted {
  color: #6b3b51;
  font-size: 0.78rem;
}
.almanac-draft-risk-evidence-block {
  margin-top: 0.45rem;
}
.almanac-draft-risk-evidence-block ul {
  margin: 0.18rem 0 0 1rem;
  padding: 0;
}
.almanac-draft-risk-evidence-block p {
  margin: 0.18rem 0 0 0;
}
.almanac-draft-risk-evidence-label {
  color: #5f293f;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}
.almanac-draft-risk-peer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 0.45rem;
  margin-top: 0.35rem;
}
.almanac-draft-risk-compare-subject {
  margin-top: 0.45rem;
  padding: 0.5rem;
  border: 1px solid #e8c7d6;
  border-radius: 6px;
  background: #fff;
}
.almanac-draft-risk-peer {
  min-width: 0;
  padding: 0.45rem;
  border: 1px solid #efd0df;
  border-radius: 6px;
  background: #fff;
}
.almanac-draft-risk-peer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 650;
}
.almanac-draft-risk-peer-title {
  margin-top: 0.22rem;
  color: #172033;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
}
.almanac-draft-risk-peer-context,
.almanac-draft-risk-peer-text {
  margin-top: 0.28rem;
  color: #45515c;
  font-size: 0.76rem;
  line-height: 1.35;
}
.almanac-draft-risk-peer-text {
  color: #27323c;
  white-space: pre-wrap;
}
.almanac-draft-risk-context-list,
.almanac-draft-risk-match-list {
  display: grid;
  gap: 0.25rem;
  margin: 0.45rem 0 0 0;
}
.almanac-draft-risk-context-list div,
.almanac-draft-risk-match-list div {
  display: grid;
  grid-template-columns: minmax(7rem, 0.42fr) minmax(0, 1fr);
  gap: 0.4rem;
}
.almanac-draft-risk-context-list dt,
.almanac-draft-risk-match-list dt {
  color: #6b3b51;
  font-size: 0.72rem;
  font-weight: 700;
}
.almanac-draft-risk-context-list dd,
.almanac-draft-risk-match-list dd {
  min-width: 0;
  margin: 0;
  color: #27323c;
  font-size: 0.76rem;
}
.almanac-draft-risk-technical {
  margin-top: 0.35rem;
  color: #60727d;
  font-size: 0.72rem;
}
.almanac-draft-risk-technical pre {
  white-space: pre-wrap;
  margin: 0.25rem 0 0 0;
  padding: 0.35rem;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #f8fafc;
}
.almanac-draft-risk-peer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.almanac-draft-risk-evidence-decision {
  margin-top: 0.5rem;
  padding: 0.42rem 0.48rem;
  border: 1px solid #f0b8cf;
  border-radius: 5px;
  background: #fff;
  color: #5f293f;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
}
.draft-inbox-resizable-scrollport {
  overflow: auto;
  resize: vertical;
  min-height: 12rem;
  max-height: min(68vh, 720px);
}
.draft-inbox-resizable-table {
  table-layout: fixed;
  min-width: 1120px;
}
.draft-inbox-resizable-table th {
  position: sticky;
  top: 0;
}
.draft-inbox-text-cell {
  white-space: pre-line;
}
.draft-inbox-resizable-table .dm-col-resize-handle,
.recon-draft-table-resizable .dm-col-resize-handle {
  visibility: visible;
  pointer-events: auto;
}
.recon-draft-table-wrap-resizable {
  min-height: 16rem;
}
.recon-draft-table-resizable {
  table-layout: fixed;
}
.recon-draft-row--selected-detail {
  background: #fffbe6;
  box-shadow: inset 3px 0 0 #f59e0b;
}
.recon-promote-resizable-split {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  align-items: flex-start;
  min-width: 0;
}
.recon-promote-draft-table-panel {
  flex: 1 1 38rem;
  min-width: min(100%, 360px);
  max-width: 100%;
}
.recon-promote-detail-pane {
  flex: 0 0 440px;
  min-width: min(100%, 260px);
  max-width: min(70vw, 720px);
  box-sizing: border-box;
  position: sticky;
  top: 0.75rem;
  z-index: 1;
  max-height: calc(100vh - 7.5rem);
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.6rem 0.65rem 1rem;
  background: #fafafa;
  align-self: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  resize: horizontal;
}
.recon-promote-quality-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 0.25rem;
  scrollbar-gutter: stable;
}
.recon-promote-quality-table-wrap .req-modal-quality-table {
  min-width: 38rem;
  width: max-content;
  max-width: none;
  margin-bottom: 0.5rem !important;
}
@media (max-width: 900px) {
  .recon-promote-resizable-split {
    flex-wrap: wrap;
  }
  .recon-promote-detail-pane {
    flex-basis: 100%;
    position: static;
    max-width: 100%;
    max-height: none;
    overflow-x: hidden;
    overflow-y: visible;
    resize: vertical;
  }
}
.recon-draft-approval-preview {
  margin: 0.65rem 0 0 1.55rem;
  border: 1px solid #86efac;
  border-radius: 6px;
  background: #f0fdf4;
  padding: 0.65rem;
  color: #17324d;
}
.recon-draft-approval-preview-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.45rem;
}
.recon-draft-approval-preview-head span,
.recon-draft-approval-muted,
.recon-draft-approval-warning span {
  color: #546a7b;
  font-size: 0.8rem;
}
.recon-draft-approval-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  font-size: 0.82rem;
}
.recon-draft-approval-label {
  display: block;
  color: #60727d;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.1rem;
}
.recon-draft-approval-warning {
  margin: 0.5rem 0 0 0;
  padding: 0.45rem 0.5rem;
  border: 1px solid #fde68a;
  border-radius: 5px;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.8rem;
  line-height: 1.4;
}
.recon-draft-approval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.recon-draft-approval-outcome {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0 0 0.55rem 0;
  border: 1px solid #86efac;
  border-radius: 6px;
  background: #f0fdf4;
  padding: 0.5rem 0.65rem;
  color: #166534;
  font-size: 0.84rem;
}
.recon-draft-approval-outcome-detail {
  color: #3f6f51;
}
.recon-draft-desc-full {
  max-height: min(40vh, 320px);
  overflow: auto;
  padding: 0.4rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
  font-size: 0.82rem;
  line-height: 1.45;
}
@media (max-width: 900px) {
  .recon-promote-guide,
  .recon-draft-approval-grid {
    grid-template-columns: 1fr;
  }
}
.hitl-review-merge-cols,
.hitl-review-rewrite-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.35rem 0;
}
.hitl-review-merge-col,
.hitl-review-rewrite-col {
  flex: 1;
  min-width: 140px;
  border: 1px solid #eceff1;
  border-radius: 4px;
  padding: 0.4rem;
  background: #fafafa;
}
.hitl-review-merge-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #78909c;
  margin-bottom: 0.2rem;
}
.hitl-review-merge-body {
  font-size: 0.82rem;
  word-break: break-word;
}
.hitl-review-merge-sid code {
  font-size: 0.72rem;
}
.hitl-diff-wrap {
  margin-top: 0.45rem;
  border-top: 1px dashed #e0e0e0;
  padding-top: 0.45rem;
}
.hitl-diff-row {
  margin-bottom: 0.45rem;
}
.hitl-diff-row.hitl-diff-changed .hitl-diff-field {
  font-weight: 600;
  color: #bf360c;
}
.hitl-diff-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}
@media (max-width: 720px) {
  .hitl-diff-cols {
    grid-template-columns: 1fr;
  }
}
.hitl-diff-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.76rem;
  max-height: 180px;
  overflow: auto;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 0.35rem;
}
.hitl-diff-changed .hitl-diff-left .hitl-diff-pre {
  background: #fff3e0;
}
.hitl-diff-changed .hitl-diff-right .hitl-diff-pre {
  background: #e8f5e9;
}
.hitl-review-empty {
  font-size: 0.85rem;
  color: #888;
  margin: 0.35rem 0;
}

/* Compact shell: optional reveal for secondary Main fields */
#requirement-modal .req-modal-compact-secondary-toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.5rem 1rem 0.6rem;
  background: #f8fafb;
  border-bottom: 1px solid var(--alm-border, #e0e0e0);
}

#requirement-modal .req-modal-current-mode {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 2rem;
  color: #455a64;
  font-size: 0.82rem;
}

#requirement-modal .req-modal-current-mode-label {
  font-weight: 600;
}

#requirement-modal .req-modal-current-mode-value {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--alm-border, #d7dee2);
  border-radius: 999px;
  background: #fff;
  color: #263238;
  font-weight: 600;
}

#requirement-modal .req-modal-compact-secondary-toggle-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

/* Reconciliation Lab — Visual Context Map (Mermaid) */
.recon-context-map-wrap {
  box-sizing: border-box;
  height: calc(100vh - 7rem);
  min-height: 24rem;
  max-height: none;
  overflow: auto;
  border: 1px solid var(--alm-border, #e0e0e0);
  border-radius: 6px;
  padding: 0.5rem;
  background: #fafafa;
}
.recon-context-map-mermaid {
  min-height: 120px;
}
.recon-context-map-mermaid svg {
  max-width: 100%;
}
.recon-context-map-empty {
  font-size: 0.85rem;
  color: #888;
  margin: 0.35rem 0;
}
.recon-context-map-panel .recon-context-map-wrap g.node {
  cursor: pointer;
}

/* Reconciliation Lab: defer layout work for heavy panels (large requirement sets) */
.recon-lab-panel[hidden] {
  content-visibility: hidden;
}
.recon-redundancy-lazy-host {
  content-visibility: auto;
  contain-intrinsic-size: 320px 480px;
}
.recon-quality-heatmap-row {
  content-visibility: auto;
  contain-intrinsic-size: 1.5rem 100%;
}

/* Analysis pipeline (Reconciliation Lab Analysis tab) */
.recon-pipeline-panel {
  margin: 0.65rem 0 0.5rem 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid #c5cae9;
  border-radius: 6px;
  background: #f8f9ff;
  font-size: 0.82rem;
}
.recon-pipeline-head {
  margin-bottom: 0.4rem;
}
.recon-pipeline-title {
  display: block;
  font-size: 0.92rem;
  color: #1a237e;
  margin-bottom: 0.2rem;
}
.recon-pipeline-sub {
  display: block;
  font-size: 0.78rem;
  color: #555;
  line-height: 1.4;
}
.recon-pipeline-steps {
  margin: 0.35rem 0 0.45rem 1.1rem;
  padding: 0;
  line-height: 1.5;
  color: #424242;
}
.recon-pipeline-steps li {
  margin-bottom: 0.15rem;
  transition: color 0.15s ease;
}
.recon-pipeline-steps li.recon-pipeline-step-done {
  color: #2e7d32;
}
.recon-pipeline-steps li.recon-pipeline-step-active {
  font-weight: 600;
  color: #1565c0;
}
.recon-pipeline-status {
  font-size: 0.8rem;
  color: #333;
  margin: 0.35rem 0;
  min-height: 1.25rem;
  line-height: 1.45;
}
.recon-pipeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.35rem;
}
.recon-pipeline-llm-cb {
  font-size: 0.78rem;
  color: #444;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-right: 0.25rem;
}

/* Open Questions */
#open-questions-view.open-questions-view-root {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.open-questions-screen {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
  min-height: 0;
}
.open-questions-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf3 0%, #fff 100%);
}
.open-questions-toolbar-copy {
  margin: 0.2rem 0 0 0;
  color: #666;
  font-size: 0.9rem;
}
.open-questions-toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.open-questions-highlight-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  cursor: pointer;
  color: #333;
  padding: 0.35rem 0.1rem;
}
.open-questions-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
}
.open-questions-filters[hidden] {
  display: none !important;
}
.open-questions-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #444;
}
.open-questions-filters select,
.open-questions-filters input {
  min-height: 34px;
}
.open-questions-search-wrap {
  grid-column: span 2;
}
.open-questions-table-scrollport {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--alm-shadow-sm, 0 1px 2px rgba(24, 39, 75, 0.06));
}
.open-questions-table-wrap {
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
}
.open-questions-table {
  width: 100%;
  min-width: max(100%, 2600px);
  table-layout: fixed;
}
.open-questions-table thead th {
  position: sticky;
  top: 0;
  z-index: 13;
  background: #f5f5f5;
}
.open-questions-table td {
  vertical-align: top;
}
.bpmn-object-crud-map-screen {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  flex-direction: column;
}
.bpmn-object-crud-map-scrollport {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: auto;
}
.bpmn-object-crud-map-table-wrap {
  display: inline-block;
  width: max-content;
  min-width: 100%;
  max-width: none;
}
.bpmn-object-crud-map-table {
  width: max-content;
  min-width: 100%;
}
.bpmn-object-crud-map-status {
  align-self: center;
  color: #555;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.bpmn-object-crud-map-row--green td {
  background: #f0fdf4;
  border-top-color: #bbf7d0;
}
.bpmn-object-crud-map-row--orange td {
  background: #fff7ed;
  border-top-color: #fed7aa;
}
.bpmn-object-crud-map-row--red td {
  background: #fef2f2;
  border-top-color: #fecaca;
}
.bpmn-object-crud-map-row--green:hover td,
.bpmn-object-crud-map-row--orange:hover td,
.bpmn-object-crud-map-row--red:hover td {
  filter: brightness(0.98);
}
.bpmn-object-crud-map-gap-toggle.is-active {
  border-color: #c2410c;
  background: #fff7ed;
  color: #9a3412;
}
.open-questions-table .dm-col-resize-handle {
  right: -2px;
}
.open-questions-empty {
  text-align: center;
  color: #777;
  padding: 1rem 0.75rem;
}
.open-question-priority-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
}
.open-question-link-btn {
  border: 0;
  background: none;
  color: #1565c0;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font: inherit;
}
.open-question-link-btn:hover {
  text-decoration: underline;
}
.open-question-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border: none;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.open-question-sort-btn.is-active {
  color: var(--alm-primary-strong, #1565c0);
}
.open-question-sort-indicator {
  font-size: 0.82rem;
  color: var(--alm-text-muted, #5b6b75);
}
.open-question-th-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.open-question-no-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  vertical-align: top;
}
.open-question-priority-cell {
  vertical-align: middle;
}
.open-question-linked-cell {
  vertical-align: middle;
}
.open-question-linked-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  min-height: 1.5rem;
}
.open-question-linked-empty {
  color: #999;
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
}
.open-question-linked-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.14rem 0.48rem;
  margin: 0;
  border: none;
  border-radius: 999px;
  background: rgba(21, 101, 192, 0.08);
  color: #1565c0;
  text-align: left;
  font: inherit;
  cursor: pointer;
  white-space: normal;
  word-break: break-word;
}
.open-question-linked-link:last-child {
  margin-bottom: 0;
}
.open-question-linked-link:hover {
  text-decoration: underline;
  background: rgba(21, 101, 192, 0.14);
}
.open-question-linked-text {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  background: rgba(60, 64, 67, 0.08);
  color: #3c4043;
  white-space: normal;
  word-break: break-word;
}
.open-questions-table td {
  vertical-align: top;
}
.open-question-inline-display-wrap {
  min-height: 1.15rem;
}
.open-question-inline-display {
  display: inline-block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  box-shadow: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.open-question-inline-display.is-title-wrap {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
}
.open-question-inline-display.is-multiline {
  display: block;
  white-space: pre-wrap;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.4;
}
.open-question-inline-display.is-priority-pill {
  display: inline-flex;
  width: auto;
  align-items: center;
  min-height: 1.6rem;
  padding: 0.14rem 0.58rem;
  border-radius: 999px;
  background: var(--open-question-priority-color, #9e9e9e);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
.open-question-inline-display.is-empty {
  color: #999;
}
.open-question-inline-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.32rem 0.45rem;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  color: inherit;
  font: inherit;
}
.open-question-inline-textarea {
  min-height: 4.35rem;
  resize: vertical;
}
.open-question-inline-open-btn {
  align-self: flex-start;
}
.open-questions-export-group {
  position: relative;
}
.open-questions-export-panel {
  position: absolute;
  top: calc(100% + 0.3rem);
  right: 0;
  min-width: 10.5rem;
  z-index: 20;
}
.open-question-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}
.open-questions-context-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}
.open-questions-context-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #ececec;
  border-radius: 6px;
  background: #fffdf8;
  margin-bottom: 0.45rem;
}
.open-questions-context-meta {
  color: #666;
  font-size: 0.84rem;
}
.open-questions-context-empty {
  color: #777;
  font-size: 0.88rem;
  padding: 0.4rem 0;
}
.open-question-linked-req-row {
  padding: 0.45rem 0.55rem;
  border: 1px solid #ececec;
  border-radius: 6px;
  background: #fffdf8;
  margin-bottom: 0.45rem;
}
#open-question-modal .modal-content.open-question-modal-content {
  display: flex;
  flex-direction: column;
  width: min(1100px, calc(100vw - 2rem));
  max-width: min(1100px, calc(100vw - 2rem));
  max-height: min(90vh, 940px);
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}
#open-question-modal .open-question-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 1rem 1.25rem 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}
#open-question-modal .open-question-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  flex: 1;
  min-width: 0;
}
#open-question-modal .open-question-modal-header .close {
  float: none;
  flex-shrink: 0;
  line-height: 1;
  margin-top: -0.15rem;
}
#open-question-modal .req-modal-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0 1rem 0.5rem;
  flex-shrink: 0;
  border-bottom: 1px solid #e0e0e0;
  background: #fafafa;
}
#open-question-modal .req-modal-tab-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px 4px 0 0;
  background: #eee;
  color: #333;
}
#open-question-modal .req-modal-tab-btn.req-modal-tab-active {
  background: #fff;
  border-bottom-color: #fff;
  margin-bottom: -1px;
  font-weight: 600;
}
#open-question-modal #open-question-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0 1.25rem 1rem;
}
#open-question-modal .open-question-modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 0.75rem;
}
#open-question-modal .req-modal-tab-panel[hidden] {
  display: none !important;
}
#open-question-modal .form-group-half { grid-column: span 6; }
#open-question-modal .form-group-third { grid-column: span 4; }
#open-question-modal .form-group-quarter { grid-column: span 3; }
#open-question-modal .form-group-full {
  grid-column: 1 / -1;
}
.open-question-section-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.open-question-section-copy {
  font-size: 0.82rem;
  color: #555;
  margin: 0 0 0.5rem 0;
}
.open-question-source-refs-list {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.5rem;
  background: #fafafa;
}
/* Structured trace add row: search/create, role, locator, and action stay on one compact row. */
.alm-source-ref-search-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
  flex: 1 1 18rem;
  min-width: 13rem;
  max-width: min(100%, 34rem);
}
.alm-source-ref-search-input {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
}
.alm-source-ref-browse-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.alm-source-ref-search-list {
  flex: 1 1 100%;
  width: 100%;
  box-sizing: border-box;
  max-height: 14rem;
  overflow-y: auto;
  border: 1px solid #d6dde5;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  padding: 0.25rem;
}
.alm-source-ref-search-list[hidden] {
  display: none !important;
}
.alm-source-ref-search-option {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #1f3138;
  cursor: pointer;
  font: inherit;
  line-height: 1.25;
  padding: 0.45rem 0.55rem;
  text-align: left;
}
.alm-source-ref-search-option:hover,
.alm-source-ref-search-option.is-active {
  background: #eef5ff;
}
.alm-source-ref-search-action {
  font-weight: 600;
}
.alm-source-ref-search-help {
  color: #555;
  font-size: 0.78rem;
  line-height: 1.3;
}
.alm-source-ref-search-help[hidden] {
  display: none !important;
}
.alm-source-ref-pending-picks select.alm-source-ref-select-role,
.alm-source-ref-pending-picks input,
.alm-source-ref-pending-picks button {
  flex: 0 0 auto;
  box-sizing: border-box;
}
.alm-source-ref-pending-picks select.alm-source-ref-select-role {
  width: max-content;
  max-width: 100%;
}
.alm-source-ref-pending-picks input[id$="source-ref-pending-source"] {
  display: none;
}
.alm-source-ref-pending-picks input[id$="source-ref-pending-locator"] {
  min-width: 9rem;
  max-width: 100%;
}
.alm-source-ref-pending-picks button {
  flex: 0 0 auto;
  white-space: nowrap;
}
@supports (field-sizing: content) {
  .alm-source-ref-pending-picks select.alm-source-ref-select-role {
    field-sizing: content;
  }
}
@media (max-width: 720px) {
  .alm-source-ref-pending-picks {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
  }
  .alm-source-ref-search-wrap,
  .alm-source-ref-pending-picks select.alm-source-ref-select-role,
  .alm-source-ref-pending-picks input[id$="source-ref-pending-locator"],
  .alm-source-ref-pending-picks button {
    max-width: 100%;
    width: 100%;
  }
}
.open-question-reference-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e4e7eb;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 0.65rem;
}
.open-question-reference-meta {
  min-width: 0;
  flex: 1;
}
.open-question-reference-title {
  font-weight: 600;
  color: #1f2933;
  word-break: break-word;
}
.open-question-reference-detail {
  margin-top: 0.2rem;
  color: #52606d;
  font-size: 0.85rem;
  word-break: break-word;
}
.open-question-reference-empty {
  color: #6b7280;
  font-size: 0.9rem;
  padding: 0.5rem 0;
}
@media (max-width: 900px) {
  .open-questions-toolbar {
    flex-direction: column;
  }
  .open-question-form-grid {
    grid-template-columns: 1fr;
  }
  .open-questions-search-wrap {
    grid-column: auto;
  }
  #open-question-modal .form-group-half,
  #open-question-modal .form-group-third,
  #open-question-modal .form-group-quarter {
    grid-column: 1 / -1;
  }
}

/* Self-Coherence review (run triage) */
.self-coherence-root {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 0.5rem 1.25rem;
  box-sizing: border-box;
}
.self-coherence-intro p {
  margin: 0.25rem 0 0 0;
  color: #374151;
  max-width: 58rem;
  line-height: 1.45;
}
.self-coherence-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.self-coherence-hint {
  padding: 0.6rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fffbeb;
  color: #1f2933;
  max-width: 58rem;
}
.self-coherence-hint p {
  margin: 0;
}
.self-coherence-summary {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  background: #fafbfc;
}
.self-coherence-summary-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.05rem;
}
.self-coherence-summary-dl {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
  gap: 0.25rem 1rem;
  margin: 0;
  font-size: 0.9rem;
}
.self-coherence-summary-dl dt {
  color: #6b7280;
  font-weight: 500;
}
.self-coherence-summary-dl dd {
  margin: 0;
  color: #111827;
  word-break: break-word;
}
.self-coherence-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.9rem;
  color: #374151;
}
.self-coherence-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.18rem 0.5rem;
  border: 1px solid #d8e3ef;
  border-radius: 999px;
  background: #fff;
  color: #374151;
}
.self-coherence-counter--accepted {
  border-color: #f0b44d;
  background: #fff8e6;
  color: #7a5200;
}
.self-coherence-counter--rejected {
  border-color: #d46b6b;
  background: #fff1f1;
  color: #8a1f1f;
}
.self-coherence-counter--needs-review {
  border-color: #9cc7f2;
  background: #eef7ff;
  color: #16457a;
}
.self-coherence-counter--pending {
  border-color: #d8e3ef;
  background: #f8fafc;
  color: #43566d;
}
.self-coherence-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: flex-end;
}
.self-coherence-filter-item label {
  display: block;
  font-size: 0.78rem;
  color: #6b7280;
  margin-bottom: 0.15rem;
}
.self-coherence-filter-item select {
  min-width: 10rem;
}
.self-coherence-diff-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-bottom: 0.18rem;
  font-size: 0.78rem;
  color: #556;
}
.self-coherence-proposals h3,
.self-coherence-open-questions h3 {
  margin: 0.5rem 0 0.35rem 0;
  font-size: 1.05rem;
}
.self-coherence-group {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: #fff;
}
.self-coherence-group-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
  padding: 0.45rem 0.65rem;
  font-weight: 600;
}
.self-coherence-group-summary::-webkit-details-marker {
  display: none;
}
.self-coherence-group-heading {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  min-width: 0;
}
.self-coherence-group-type {
  color: #1f2937;
}
.self-coherence-group-secondary {
  color: #4b5563;
  font-weight: 500;
  font-size: 0.92rem;
}
.self-coherence-group-meta {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 500;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.self-coherence-group-body {
  padding: 0 0.65rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.self-coherence-show-more {
  padding-top: 0.25rem;
}
.self-coherence-proposal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.75rem;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  background: #fcfdff;
}
.self-coherence-proposal-row--low-confidence {
  border-color: #fcd34d;
  background: #fffbeb;
}
.self-coherence-proposal-row--accepted {
  border-color: #f0b44d;
  background: #fff8e6;
}
.self-coherence-proposal-row--rejected {
  border-color: #d46b6b;
  background: #fff1f1;
}
.self-coherence-proposal-row--needs-review {
  border-color: #9cc7f2;
  background: #f7fbff;
}
.self-coherence-proposal-row--applied {
  border-color: #4ba96b;
  background: #edf9f0;
}
.self-coherence-low-flag {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #fff1cc;
  color: #835c00;
  font-size: 0.75rem;
  font-weight: 700;
}
.self-coherence-proposal-main {
  flex: 1 1 16rem;
  min-width: 0;
}
.self-coherence-proposal-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}
.self-coherence-proposal-title-text {
  color: #16324f;
}
.self-coherence-proposal-topic {
  margin-top: 0.18rem;
  font-size: 0.86rem;
  color: #4b5563;
  font-weight: 600;
}
.self-coherence-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  border: 1px solid #d8e3ef;
  background: #f8fafc;
  font-size: 0.74rem;
  line-height: 1.25;
  color: #4b5563;
  font-weight: 650;
  white-space: nowrap;
}
.self-coherence-chip--good {
  border-color: #9fd6ad;
  background: #edf9f0;
  color: #1f6d2f;
}
.self-coherence-chip--pending {
  border-color: #f0d08a;
  background: #fff8e6;
  color: #7a5200;
}
.self-coherence-chip--bad {
  border-color: #d46b6b;
  background: #fff1f1;
  color: #8a1f1f;
}
.self-coherence-chip--neutral {
  border-color: #d8e3ef;
  background: #f8fafc;
  color: #43566d;
}
.self-coherence-chip--priority-high {
  border-color: #ef9a9a;
  background: #fff1f1;
  color: #8a1f1f;
}
.self-coherence-chip--priority-medium {
  border-color: #f0d08a;
  background: #fff8e6;
  color: #7a5200;
}
.self-coherence-chip--priority-low {
  border-color: #9cc7f2;
  background: #eef7ff;
  color: #16457a;
}
.self-coherence-confidence-pill--high {
  border-color: #9fd6ad;
  background: #edf9f0;
  color: #1f6d2f;
}
.self-coherence-confidence-pill--medium {
  border-color: #f0d08a;
  background: #fff8e6;
  color: #7a5200;
}
.self-coherence-confidence-pill--low {
  border-color: #ef9a9a;
  background: #fff1f1;
  color: #8a1f1f;
}
.self-coherence-rationale {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #374151;
  line-height: 1.4;
}
.self-coherence-explain-block {
  margin-top: 0.35rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #e5ebf3;
  border-radius: 8px;
  background: #fff;
}
.self-coherence-comparison {
  margin-top: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.self-coherence-comparison-row {
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #fff;
  padding: 0.5rem;
}
.self-coherence-comparison-attr {
  font-size: 0.74rem;
  font-weight: 700;
  color: #567;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.self-coherence-comparison-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.5rem;
}
.self-coherence-comparison-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #567;
  text-transform: uppercase;
  margin-bottom: 0.18rem;
}
.self-coherence-comparison-value {
  padding: 0.4rem 0.5rem;
  border: 1px solid #e5ebf3;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #223;
}
.self-coherence-comparison-value--after {
  background: #eef9f0;
  border-color: #d7eadb;
}
.self-coherence-inline-ref-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.self-coherence-inline-ref {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  margin: 0 0.08rem;
  padding: 0.12rem 0.42rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #17324d;
  font: inherit;
  font-weight: 650;
  line-height: 1.3;
  vertical-align: baseline;
}
button.self-coherence-inline-ref {
  cursor: pointer;
}
button.self-coherence-inline-ref:hover {
  border-color: #8fb8dc;
  background: #f7fbff;
}
.self-coherence-inline-ref--proposed {
  border-color: #b7dec0;
  background: #f2fbf4;
  color: #1f6d2f;
}
.self-coherence-inline-ref--missing {
  border-color: #f0d08a;
  background: #fffbeb;
  color: #7a5200;
}
.self-coherence-inline-ref-meta {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
}
.self-coherence-term-summary {
  display: grid;
  grid-template-columns: minmax(4.5rem, max-content) minmax(0, 1fr);
  gap: 0.18rem 0.55rem;
  margin: 0;
}
.self-coherence-term-summary dt {
  color: #567;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.self-coherence-term-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.self-coherence-targets {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #6b7280;
  word-break: break-word;
}
.self-coherence-evidence-links,
.self-coherence-evidence-cards {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.self-coherence-evidence-cards {
  flex-direction: column;
  align-items: stretch;
}
button.self-coherence-req-link {
  font-size: 0.78rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
  text-align: left;
  max-width: 100%;
}
button.self-coherence-req-link:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.self-coherence-req-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid #d8e3ef;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
  text-align: left;
}
.self-coherence-req-card:hover:not(:disabled) {
  border-color: #8fb8dc;
  background: #f7fbff;
}
.self-coherence-req-card:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}
.self-coherence-req-card-title {
  flex: 1 1 18rem;
  min-width: 12rem;
  font-size: 0.84rem;
  font-weight: 650;
}
.self-coherence-req-card-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.self-coherence-req-card-tech {
  flex-basis: 100%;
  font-size: 0.72rem;
  color: #6b7280;
}
.self-coherence-technical-details {
  margin-top: 0.45rem;
  border-top: 1px solid #e5ebf3;
  padding-top: 0.35rem;
}
.self-coherence-technical-details summary {
  cursor: pointer;
  color: #4b5563;
  font-size: 0.8rem;
  font-weight: 650;
}
.self-coherence-technical-details pre {
  margin: 0.35rem 0 0 0;
  padding: 0.5rem;
  max-height: 16rem;
  overflow: auto;
  border: 1px solid #e5ebf3;
  border-radius: 6px;
  background: #f8fafc;
  color: #1f2937;
  font-size: 0.75rem;
  white-space: pre-wrap;
}
.self-coherence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: flex-start;
}
.self-coherence-muted {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0.25rem 0 0 0;
}
.self-coherence-oq-row {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.45rem;
  background: #fafafa;
}
.self-coherence-oq-row--resolved {
  opacity: 0.65;
}

.import-view-shell {
  padding: 0;
}

.import-workspace {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0.9rem;
  background:
    radial-gradient(circle at top left, rgba(39, 123, 192, 0.08), transparent 22rem),
    linear-gradient(180deg, #fbfdff 0%, #f5f8fb 100%);
  min-height: calc(100vh - 12rem);
  box-sizing: border-box;
}

.import-workspace-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}

.import-workspace-header h2 {
  margin: 0;
  font-size: 1.55rem;
}

.import-workspace-header p {
  margin: 0.25rem 0 0 0;
  color: #52606d;
  max-width: 52rem;
}

.import-bulk-toolbar,
.import-action-strip {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.import-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas: 'source mode file';
  align-items: start;
  gap: 0.65rem;
  width: 100%;
}

.import-toolbar-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #dce6f0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  min-width: 0;
}

.import-toolbar-section-source {
  grid-area: source;
}

.import-toolbar-section-mode {
  grid-area: mode;
}

.import-toolbar-section-file {
  grid-area: file;
  align-items: flex-start;
}

.import-toolbar-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #446075;
}

.import-toolbar-caption {
  color: #5d6b78;
  font-size: 0.83rem;
  line-height: 1.4;
}

.import-toolbar-segmented {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}

.import-toolbar-primary-btn {
  min-width: 11rem;
}

.import-stage-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.import-stage-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #d9e2ec;
  background: #fff;
  color: #52606d;
  font-size: 0.84rem;
  font-weight: 600;
}

.import-stage-chip.is-active {
  border-color: #7cb4e1;
  background: #eaf5ff;
  color: #0d4f7a;
}

.import-stage-chip-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(17, 92, 41, 0.08);
  font-size: 0.78rem;
}

.import-stage-divider {
  width: 1rem;
  height: 1px;
  background: #cfd8e3;
}

.import-action-strip {
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid #dce6f0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.import-action-strip-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: min(100%, 22rem);
}

.import-action-strip-title {
  color: #173a52;
  font-size: 1rem;
}

.import-action-strip-subcopy {
  color: #5d6b78;
  font-size: 0.88rem;
  line-height: 1.45;
}

.import-action-strip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.import-action-strip-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: #eef4f8;
  color: #355065;
  font-size: 0.78rem;
  font-weight: 600;
}

.import-action-strip-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.import-filter-heading {
  margin-top: 0.8rem;
  margin-bottom: 0.1rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #446075;
}

.import-stage-drafts-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.import-stage-drafts-btn[disabled]:hover {
  transform: none;
  background: linear-gradient(180deg, #1462eb 0%, var(--alm-primary) 100%);
  box-shadow: none;
}

.import-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 18rem) minmax(0, 1fr) minmax(18rem, 24rem);
  gap: 0.85rem;
  min-height: 0;
}

.import-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dce5ee;
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  padding: 0.9rem;
  min-height: 0;
}

.import-panel-head h3 {
  margin: 0;
  font-size: 1rem;
}

.import-panel-head p {
  margin: 0.35rem 0 0 0;
  color: #5e6b79;
  font-size: 0.88rem;
  line-height: 1.45;
}

.import-cluster-strip {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
  padding: 0.85rem;
  border: 1px solid #dce6f0;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(245, 248, 252, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.import-cluster-strip-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.import-cluster-strip-head h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #173a52;
}

.import-cluster-strip-head p {
  margin: 0.2rem 0 0 0;
  color: #5d6b78;
  font-size: 0.83rem;
  line-height: 1.45;
}

.import-cluster-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.65rem;
}

.import-cluster-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.8rem;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.import-cluster-card.is-active,
.import-cluster-card:hover {
  border-color: #7cb4e1;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.import-cluster-card-top,
.import-cluster-meta,
.import-cluster-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.import-cluster-type {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #446075;
}

.import-cluster-summary {
  color: #173a52;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}

.import-cluster-meta,
.import-cluster-targets {
  color: #5d6b78;
  font-size: 0.79rem;
}

.import-stat-card,
.import-impact-card,
.import-validation-block,
.import-diff-block,
.import-focus-card {
  border: 1px solid #e3eaf2;
  border-radius: 12px;
  background: #fcfeff;
  padding: 0.75rem;
  margin-top: 0.8rem;
}

.import-stat-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6d7b88;
}

.import-stat-value {
  margin-top: 0.2rem;
  font-weight: 600;
  color: #15374e;
  word-break: break-word;
}

.import-source-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.import-source-counts > div,
.import-summary-list > div,
.import-impact-card > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #edf2f7;
}

.import-source-counts > div:last-child,
.import-summary-list > div:last-child,
.import-impact-card > div:last-child {
  border-bottom: none;
}

.import-source-counts strong {
  font-size: 1.35rem;
  color: #163a53;
}

.import-source-counts span {
  color: #5f6d7a;
}

.import-summary-list {
  margin-top: 0.8rem;
}

.import-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.import-filter-group-primary {
  margin-top: 0.45rem;
}

.import-filter-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid #d9e2ec;
  background: #fff;
  color: #334e68;
  cursor: pointer;
}

.import-filter-chip.is-active {
  border-color: #7cb4e1;
  background: #ecf7ff;
  color: #0d4f7a;
}

.import-table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.import-mapping-table {
  width: 100%;
  min-width: 58rem;
}

.import-empty-cell,
.import-empty-state,
.import-diff-empty {
  padding: 1rem;
  text-align: center;
  color: #66788a;
}

.import-map-row.is-focused td {
  background: #fff9df;
}

.import-map-row.is-cluster-member td,
.import-map-row-detail.is-cluster-member td {
  background: rgba(234, 245, 255, 0.75);
}

.import-row-title {
  font-weight: 600;
  color: #183b56;
}

.import-row-subcopy {
  margin-top: 0.2rem;
  color: #6b7a88;
  font-size: 0.79rem;
}

.import-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.import-map-row-detail td {
  background: #f9fbfd;
}

.import-map-row-detail.is-visible td {
  border-top: none;
}

.import-inline-diff-btn {
  margin-right: 0.4rem;
}

.import-focus-title {
  font-size: 1rem;
  font-weight: 700;
  color: #173a52;
}

.import-focus-meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.5rem;
  color: #5d6b78;
  font-size: 0.8rem;
}

.import-focus-description {
  margin-top: 0.6rem;
  color: #314b5f;
  line-height: 1.5;
  white-space: pre-wrap;
}

.import-reason-summary {
  color: #4b5f71;
  line-height: 1.45;
}

.import-reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.import-reason-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #d8e3ef;
  background: #f4f8fb;
  color: #355066;
  font-size: 0.74rem;
  font-weight: 600;
}

.import-candidate-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.import-candidate-select-wrap span {
  color: #56697b;
  font-size: 0.82rem;
  font-weight: 600;
}

.import-candidate-select {
  width: 100%;
}

.import-row-reasons {
  max-width: 18rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.import-action-group {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}

.import-action-btn.is-active {
  background: #0d6abf;
  border-color: #0d6abf;
  color: #fff;
}

.import-current-decision {
  margin-top: 0.6rem;
  color: #5d6b78;
  font-size: 0.84rem;
}

.import-decision-merge,
.import-decision-overwrite,
.import-decision-ignore,
.import-decision-create,
.import-decision-pending {
  font-weight: 700;
}

.import-decision-merge {
  color: #125c2f;
}

.import-decision-overwrite {
  color: #8c4b00;
}

.import-decision-ignore {
  color: #8d1d1d;
}

.import-decision-create {
  color: #0c4e75;
}

.import-decision-pending {
  color: #5d6b78;
}

.import-diff-item {
  padding: 0.55rem 0;
  border-bottom: 1px solid #edf2f7;
}

.import-diff-item:last-child {
  border-bottom: none;
}

.import-diff-field {
  font-weight: 700;
  color: #173a52;
  margin-bottom: 0.35rem;
}

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

.import-diff-old,
.import-diff-new {
  border-radius: 10px;
  padding: 0.45rem;
}

.import-diff-old {
  background: #fff1f0;
  border: 1px solid #f0c3bd;
}

.import-diff-new {
  background: #edf9ef;
  border: 1px solid #b7dfc0;
}

.import-diff-old span,
.import-diff-new span {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #5f6d7a;
}

.import-diff-old pre,
.import-diff-new pre {
  margin: 0.3rem 0 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.82rem;
}

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

  .import-mapping-table {
    min-width: 48rem;
  }

  .import-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      'source mode'
      'file file';
  }
}

@media (max-width: 760px) {
  .import-workspace {
    padding: 0.65rem;
  }

  .import-diff-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .import-mapping-table {
    min-width: 40rem;
  }

  .import-toolbar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'source'
      'mode'
      'file';
  }

  .import-toolbar-section,
  .import-action-strip {
    width: 100%;
  }

  .import-action-strip-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.alm-impact-shell {
  padding: 0.85rem;
  color: #243447;
}

.alm-impact-input-panel,
.alm-impact-panel {
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.85rem;
}

.alm-impact-header {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.alm-impact-header h3,
.alm-impact-panel h4 {
  margin: 0;
  color: #17324d;
}

.alm-impact-header p {
  margin: 0.2rem 0 0 0;
  color: #52606d;
  font-size: 0.88rem;
}

.alm-impact-textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 8rem;
  border: 1px solid #c8d4e2;
  border-radius: 6px;
  padding: 0.7rem;
  font: inherit;
  line-height: 1.45;
}

.alm-impact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.65rem;
}

.alm-impact-status,
.alm-impact-muted,
.alm-impact-empty {
  color: #52606d;
  font-size: 0.84rem;
}

.alm-impact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.alm-impact-dossier {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.alm-impact-dossier article,
.alm-impact-metrics {
  min-width: 0;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #ffffff;
}

.alm-impact-dossier article {
  padding: 0.7rem;
}

.alm-impact-dossier h4 {
  margin: 0 0 0.35rem 0;
  color: #17324d;
  font-size: 0.86rem;
}

.alm-impact-dossier p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0;
  color: #415265;
  font-size: 0.84rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.alm-impact-dossier-wide {
  grid-column: 1 / -1;
}

.alm-impact-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.85rem;
  padding: 0.55rem 0.7rem;
}

.alm-impact-metrics span {
  border-radius: 999px;
  background: #f4f6f8;
  color: #52606d;
  padding: 0.16rem 0.48rem;
  font-size: 0.76rem;
}

.alm-impact-triage-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.alm-impact-triage-strip div {
  min-width: 0;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #fbfdff;
  padding: 0.6rem;
}

.alm-impact-triage-strip strong {
  display: block;
  color: #17324d;
  font-size: 1.15rem;
  line-height: 1.1;
}

.alm-impact-triage-strip span,
.alm-impact-selected-count {
  color: #52606d;
  font-size: 0.78rem;
}

.alm-impact-triage-controls {
  display: grid;
  grid-template-columns: minmax(9rem, 0.8fr) minmax(9rem, 0.8fr) minmax(12rem, 1.2fr) minmax(18rem, 2fr);
  gap: 0.6rem;
  align-items: end;
  margin-top: 0.85rem;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.75rem;
}

.alm-impact-triage-controls label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.2rem;
  color: #52606d;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.alm-impact-triage-controls select,
.alm-impact-triage-controls input[type='search'] {
  min-width: 0;
  border: 1px solid #c8d4e2;
  border-radius: 6px;
  padding: 0.42rem 0.5rem;
  color: #243447;
  font: inherit;
  font-size: 0.86rem;
  text-transform: none;
}

.alm-impact-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
}

.alm-impact-panel-wide {
  grid-column: 1 / -1;
}

.alm-impact-summary-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.65rem 0 0 0;
}

.alm-impact-summary-list div {
  min-width: 0;
  border: 1px solid #e1e9f3;
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  background: #f8fbff;
}

.alm-impact-summary-list dt {
  margin: 0 0 0.12rem 0;
  color: #6a7786;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.alm-impact-summary-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.alm-impact-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.alm-impact-row {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid #e1e9f3;
  border-radius: 8px;
  background: #fbfdff;
  padding: 0.6rem;
}

.alm-impact-select-cell {
  display: inline-flex;
  width: 1.2rem;
  min-width: 1.2rem;
  min-height: 1.5rem;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.08rem;
}

.alm-impact-select-cell input {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.alm-impact-select-cell-empty {
  opacity: 0;
}

.alm-impact-row-main {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.alm-impact-row-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.alm-impact-node-btn,
.alm-impact-rec-btn {
  border: 0;
  background: none;
  color: #0f5e9c;
  padding: 0;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.alm-impact-node-btn:hover,
.alm-impact-rec-btn:hover {
  text-decoration: underline;
}

.alm-impact-type,
.alm-impact-score,
.alm-impact-confidence,
.alm-impact-pill,
.alm-impact-signals span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.12rem 0.42rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.alm-impact-type,
.alm-impact-score,
.alm-impact-confidence {
  background: #eef4fb;
  color: #38556f;
}

.alm-impact-confidence {
  font-weight: 700;
}

.alm-impact-confidence--high {
  background: #e6f7ef;
  color: #17633a;
}

.alm-impact-confidence--medium {
  background: #fff7d6;
  color: #705b00;
}

.alm-impact-confidence--low {
  background: #fff0e6;
  color: #8a3d00;
}

.alm-impact-row-badges {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.alm-impact-trace-path {
  color: #38556f;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.alm-impact-pill {
  background: #eef4fb;
  color: #38556f;
  font-weight: 700;
}

.alm-impact-pill--conflict {
  background: #fff0e6;
  color: #8a3d00;
}

.alm-impact-pill--requires-update {
  background: #e9f6ff;
  color: #075985;
}

.alm-impact-pill--outdated {
  background: #fff7d6;
  color: #705b00;
}

.alm-impact-pill--potential-duplicate {
  background: #f2edff;
  color: #5b3f91;
}

.alm-impact-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.alm-impact-signals span {
  background: #f4f6f8;
  color: #586574;
}

.alm-rlm-shell {
  width: 100%;
  box-sizing: border-box;
}

.alm-rlm-header-actions,
.alm-rlm-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.alm-rlm-header-actions {
  justify-content: flex-end;
}

.alm-rlm-mode-switch {
  margin: 0.5rem 0 0.75rem 0;
}

.alm-rlm-highlight-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  margin: 0.15rem 0 0.45rem 0;
  color: #333;
  cursor: pointer;
  font-size: 0.9rem;
}

.alm-rlm-textarea {
  min-height: 7rem;
}

.alm-rlm-ba-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.alm-rlm-ba-guide div {
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #f7fafc;
  padding: 0.65rem 0.75rem;
}

.alm-rlm-ba-guide strong,
.alm-rlm-ba-guide span {
  display: block;
}

.alm-rlm-ba-guide strong {
  color: #17324d;
  font-size: 0.82rem;
}

.alm-rlm-ba-guide span {
  margin-top: 0.25rem;
  color: #536172;
  font-size: 0.82rem;
  line-height: 1.35;
}

.alm-rlm-plan {
  margin-top: 0.85rem;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #fff;
  padding: 0.7rem 0.85rem;
}

.alm-rlm-plan summary {
  cursor: pointer;
  color: #17324d;
  font-weight: 700;
}

.alm-rlm-plan pre {
  max-height: 22rem;
  overflow: auto;
  margin: 0.7rem 0 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  line-height: 1.4;
}

.alm-rlm-confidence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  width: fit-content;
  max-width: 100%;
  margin-top: 0.85rem;
  border: 1px solid #d8e2ef;
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
  background: #fff;
  color: #17324d;
  font-size: 0.84rem;
}

.alm-rlm-confidence span {
  color: #5b6475;
}

.alm-rlm-confidence--high {
  border-color: #b7e4c7;
  background: #eefaf1;
  color: #17653a;
}

.alm-rlm-confidence--medium {
  border-color: #d8e2ef;
  background: #f7fafc;
}

.alm-rlm-confidence--low {
  border-color: #f2d6a2;
  background: #fff7d6;
  color: #705b00;
}

.alm-rlm-explanation ol {
  display: grid;
  gap: 0.5rem;
  margin: 0.7rem 0 0 1.15rem;
  padding: 0;
}

.alm-rlm-explanation li {
  padding-left: 0.15rem;
}

.alm-rlm-explanation li span,
.alm-rlm-explanation li em {
  display: block;
  margin-top: 0.18rem;
  color: #5b6475;
  font-size: 0.82rem;
  font-style: normal;
}

.alm-rlm-verification {
  margin: 0.65rem 0 0 0;
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  font-size: 0.84rem;
}

.alm-rlm-verification--ok {
  background: #eefaf1;
  color: #17653a;
}

.alm-rlm-verification--warn {
  background: #fff7d6;
  color: #705b00;
}

.alm-concern-output {
  margin-top: 0.85rem;
}

.alm-concern-dossier {
  grid-column: 1 / -1;
}

.alm-concern-governance {
  border: 1px solid #d7e7dd;
  border-radius: 8px;
  background: #f2faf5;
  color: #25533b;
  padding: 0.65rem 0.75rem;
  font-size: 0.84rem;
  line-height: 1.4;
}

.alm-concern-governance strong {
  color: #17422d;
}

.alm-concern-clusters,
.alm-concern-list,
.alm-concern-investigation-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.alm-concern-investigation {
  min-width: 0;
  border: 1px solid #c8d9ea;
  border-radius: 10px;
  background: #f7fbff;
  padding: 0.85rem;
  box-shadow: 0 1px 0 rgba(23, 50, 77, 0.04);
}

.alm-concern-investigation--primary {
  border-color: #9eb8d4;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f8ff 100%);
}

.alm-concern-investigation-head {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.alm-concern-investigation-head h4 {
  margin: 0;
  color: #12324f;
  font-size: 1.02rem;
}

.alm-concern-dominant-interpretation {
  border-left: 3px solid #2f6ea8;
  padding: 0.55rem 0.65rem;
  background: #eef5fc;
  color: #17324d;
  font-size: 0.9rem;
  line-height: 1.45;
}

.alm-concern-related-concerns {
  display: grid;
  gap: 0.45rem;
}

.alm-concern-related-concern {
  border: 1px solid #e3ebf4;
  border-radius: 8px;
  background: #fbfdff;
  padding: 0.45rem 0.55rem;
}

.alm-concern-related-concern > summary {
  cursor: pointer;
  color: #35506a;
  font-size: 0.84rem;
}

.alm-concern-card--nested {
  margin-top: 0.45rem;
  border: 0;
  background: transparent;
  padding: 0.35rem 0 0;
  box-shadow: none;
}

.alm-concern-card--nested .alm-concern-workspace-section {
  opacity: 0.96;
}

.alm-concern-investigation-evidence {
  display: grid;
  gap: 0.35rem;
}

.alm-concern-cluster,
.alm-concern-card {
  min-width: 0;
  border: 1px solid #e1e9f3;
  border-radius: 8px;
  background: #fbfdff;
}

.alm-concern-cluster {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.6rem;
}

.alm-concern-cluster strong,
.alm-concern-cluster span {
  display: block;
}

.alm-concern-cluster strong {
  color: #17324d;
  font-size: 0.86rem;
}

.alm-concern-cluster span {
  color: #52606d;
  font-size: 0.78rem;
  line-height: 1.35;
}

.alm-concern-card {
  padding: 0.75rem;
}

.alm-concern-card-head {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  justify-content: space-between;
}

.alm-concern-card-head h4 {
  margin: 0;
  color: #17324d;
  font-size: 0.98rem;
}

.alm-concern-card-head p,
.alm-concern-action {
  margin: 0.25rem 0 0 0;
  color: #52606d;
  font-size: 0.84rem;
  line-height: 1.4;
}

.alm-concern-category {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #edf4fb;
  color: #38556f;
  padding: 0.16rem 0.48rem;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.alm-concern-card blockquote {
  margin: 0.65rem 0 0 0;
  border-left: 3px solid #b7c9da;
  padding: 0.25rem 0 0.25rem 0.65rem;
  color: #44566b;
  font-size: 0.82rem;
  line-height: 1.4;
}

.alm-concern-panel-note {
  margin-top: 0.2rem;
  color: #6b7785;
  font-size: 0.76rem;
  line-height: 1.35;
}

.alm-concern-workspace-overview {
  margin-top: 0.7rem;
}

.alm-concern-workspace-overview h5,
.alm-concern-secondary-clusters h5 {
  margin: 0;
  color: #17324d;
  font-size: 0.88rem;
}

.alm-concern-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.alm-concern-overview-grid > div,
.alm-concern-workspace-section {
  min-width: 0;
  border: 1px solid #e3ebf4;
  border-radius: 6px;
  background: #ffffff;
}

.alm-concern-overview-grid > div {
  padding: 0.6rem;
}

.alm-concern-workspace-sections {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.alm-concern-workspace-section {
  padding: 0.55rem;
}

.alm-concern-workspace-section--orientation {
  border-color: #7aa8cf;
  background: #edf6ff;
  box-shadow: inset 4px 0 0 #3d78ad;
}

.alm-concern-workspace-section--primary {
  border-color: #b8d4eb;
  background: #f4faff;
}

.alm-concern-workspace-section--supporting {
  border-color: #e4e9ef;
  background: #fcfdff;
}

.alm-concern-workspace-section summary {
  color: #17324d;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.alm-concern-workspace-section > *:not(summary) {
  margin-top: 0.45rem;
}

.alm-concern-workspace-section--orientation summary {
  font-size: 0.9rem;
}

.alm-concern-core strong {
  display: block;
  margin-top: 0.3rem;
  color: #17324d;
  font-size: 0.94rem;
  line-height: 1.35;
}

.alm-concern-workspace-section--primary .alm-concern-interpretation-row,
.alm-concern-workspace-section--primary .alm-concern-core,
.alm-concern-workspace-section--primary .alm-concern-question-row {
  border-color: #d6e6f5;
  background: #ffffff;
}

.alm-concern-workspace-section--orientation .alm-concern-interpretation-row h5 {
  font-size: 0.9rem;
}

.alm-concern-signal-list,
.alm-concern-interpretation-list,
.alm-concern-dependency-list,
.alm-concern-question-list,
.alm-concern-stakeholder-list,
.alm-concern-uncertainty-list {
  display: grid;
  gap: 0.45rem;
}

.alm-concern-signal-row,
.alm-concern-interpretation-row,
.alm-concern-dependency-row,
.alm-concern-question-row,
.alm-concern-stakeholder-row,
.alm-concern-uncertainty-row {
  border: 1px solid #e6edf5;
  border-radius: 6px;
  background: #fbfdff;
  padding: 0.55rem;
}

.alm-concern-signal-row h5,
.alm-concern-interpretation-row h5,
.alm-concern-question-row h5,
.alm-concern-stakeholder-row h5,
.alm-concern-uncertainty-row h5 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0;
  color: #17324d;
  font-size: 0.84rem;
}

.alm-concern-signal-row p,
.alm-concern-interpretation-row p,
.alm-concern-dependency-row p,
.alm-concern-question-row p,
.alm-concern-stakeholder-row p,
.alm-concern-uncertainty-row p,
.alm-concern-evidence {
  margin: 0.35rem 0 0 0;
  color: #667788;
  font-size: 0.74rem;
  line-height: 1.34;
}

.alm-concern-evidence--anchor-only {
  color: #7a8794;
  font-size: 0.72rem;
  font-style: italic;
}

.alm-concern-evidence--anchor-only .alm-concern-source-nav {
  font-style: normal;
}

.alm-concern-supporting-snippets p {
  color: #667788;
  font-size: 0.74rem;
  line-height: 1.34;
}

.alm-concern-tension-table {
  display: grid;
  gap: 0.35rem;
}

.alm-concern-tension-row {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 0.55rem;
  align-items: start;
}

.alm-concern-tension-row--head {
  color: #52606d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.alm-concern-tension-row .alm-concern-evidence {
  grid-column: 1 / -1;
}

.alm-concern-topology-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  align-items: center;
}

.alm-concern-topology-hop {
  color: #7a8794;
  font-size: 0.78rem;
  font-weight: 800;
}

.alm-concern-topology-relation {
  border: 1px solid #e2eaf3;
  border-radius: 999px;
  background: #f8fbff;
  color: #38556f;
  padding: 0.1rem 0.42rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.alm-concern-source-nav {
  display: inline-flex;
  margin-left: 0.35rem;
  color: #2f5f8f;
  font-size: 0.74rem;
  font-weight: 750;
  text-decoration: none;
}

.alm-concern-source-nav:hover,
.alm-concern-source-nav:focus-visible {
  text-decoration: underline;
}

.alm-concern-supporting-evidence {
  display: grid;
  gap: 0.55rem;
}

.alm-concern-supporting-evidence > div {
  min-width: 0;
}

.alm-concern-supporting-evidence > div > strong {
  display: block;
  color: #17324d;
  font-size: 0.78rem;
  margin-bottom: 0.32rem;
}

.alm-concern-supporting-snippets {
  display: grid;
  gap: 0.35rem;
}

.alm-concern-supporting-snippets p {
  margin: 0;
  border-left: 3px solid #d7e3ef;
  padding-left: 0.55rem;
  color: #52606d;
  font-size: 0.8rem;
  line-height: 1.38;
}

.alm-concern-source-discussion {
  margin-top: 0.85rem;
  border: 1px dashed #d5dee8;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.55rem 0.65rem;
  opacity: 0.96;
}

.alm-concern-source-discussion summary {
  color: #52606d;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
}

.alm-concern-source-discussion-anchor {
  scroll-margin-top: 1rem;
}

.alm-concern-signal-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #edf4fb;
  color: #38556f;
  padding: 0.1rem 0.42rem;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.3;
  white-space: nowrap;
}

.alm-concern-signal-badge--explicit {
  background: #eaf7ef;
  color: #21613f;
}

.alm-concern-signal-badge--change,
.alm-concern-signal-badge--transition {
  background: #eef6ff;
  color: #255a84;
}

.alm-concern-signal-badge--alignment {
  background: #f1f5ff;
  color: #334a8a;
}

.alm-concern-signal-badge--decision-pressure {
  background: #fff3e8;
  color: #79451f;
}

.alm-concern-signal-badge--boundary-drift {
  background: #f5efff;
  color: #5a3a83;
}

.alm-concern-signal-badge--strong-inference {
  background: #edf4fb;
  color: #315b7a;
}

.alm-concern-signal-badge--speculative,
.alm-concern-signal-badge--unknown {
  background: #fff7d6;
  color: #6b5700;
}

.alm-concern-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.alm-concern-chip {
  border: 1px solid #dbe6ef;
  border-radius: 999px;
  background: #f7fafc;
  color: #44566b;
  padding: 0.12rem 0.45rem;
  font-size: 0.76rem;
  line-height: 1.3;
}

.alm-concern-related-list {
  margin: 0;
  padding-left: 1rem;
  color: #44566b;
  font-size: 0.8rem;
  line-height: 1.38;
}

.alm-concern-match-list {
  display: grid;
  gap: 0.25rem;
  list-style: none;
  padding-left: 0;
}

.alm-concern-match-text {
  color: #52606d;
}

.alm-concern-terms {
  margin-top: 0.65rem;
  border: 1px solid #e3ebf4;
  border-radius: 6px;
  background: #ffffff;
  padding: 0.6rem;
}

.alm-concern-terms > strong {
  display: block;
  color: #17324d;
  font-size: 0.82rem;
}

.alm-concern-term-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.alm-concern-term-row {
  border: 1px solid #e6edf5;
  border-radius: 6px;
  background: #fbfdff;
  padding: 0.55rem;
}

.alm-concern-term-row > strong {
  display: block;
  color: #17324d;
  font-size: 0.84rem;
}

.alm-concern-term-row dl {
  display: grid;
  gap: 0.35rem;
  margin: 0.45rem 0 0 0;
}

.alm-concern-term-row dt {
  color: #52606d;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.alm-concern-term-row dd {
  margin: 0.1rem 0 0 0;
  color: #44566b;
  font-size: 0.8rem;
  line-height: 1.38;
}

.alm-concern-uncertainty {
  border-radius: 4px;
  background: #fff7d6;
  color: #6b5700;
  padding: 0 0.12rem;
  box-shadow: inset 0 -1px 0 rgba(189, 140, 0, 0.45);
}

.alm-rlm-highlight-wrap {
  width: 100%;
}

.alm-rlm-highlight-overlay {
  color: #1f2d3d;
}

@media (max-width: 900px) {
  .alm-impact-grid,
  .alm-impact-dossier,
  .alm-impact-summary-list,
  .alm-impact-triage-strip,
  .alm-rlm-ba-guide,
  .alm-impact-triage-controls,
  .alm-concern-overview-grid,
  .alm-concern-tension-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .alm-impact-header,
  .alm-impact-row,
  .alm-concern-card-head,
  .alm-concern-cluster {
    flex-direction: column;
  }

  .alm-impact-bulk-actions,
  .alm-rlm-header-actions {
    justify-content: flex-start;
  }
}

.codex-request-builder {
  display: grid;
  gap: 1rem;
  color: #1f2d3d;
}

.codex-request-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid #d5e2ef;
  border-radius: 8px;
  background: #f7fbff;
  padding: 1rem;
}

.codex-request-hero h3,
.codex-request-panel-heading h4,
.codex-request-scope-group h4 {
  margin: 0;
}

.codex-request-hero p,
.codex-request-panel-heading p {
  margin: 0.35rem 0 0 0;
  color: #536579;
  line-height: 1.45;
}

.codex-request-next {
  flex: 0 0 auto;
  max-width: 18rem;
  border: 1px solid #b8d7ef;
  border-radius: 6px;
  background: #eef7ff;
  padding: 0.55rem 0.7rem;
  color: #25445f;
  font-size: 0.86rem;
  line-height: 1.35;
}

.codex-request-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(18rem, 0.85fr);
  gap: 1rem;
  align-items: start;
}

.codex-request-form-panel,
.codex-request-scope-panel,
.codex-request-output {
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
}

.codex-request-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}

.codex-request-field--short {
  max-width: 18rem;
}

.codex-request-field label {
  font-weight: 700;
  color: #22364a;
}

.codex-request-field textarea,
.codex-request-field select,
.codex-request-field input,
#codex-request-generated-scope,
#codex-request-prompt-preview {
  width: 100%;
  border: 1px solid #cbd6e2;
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  line-height: 1.45;
  color: #26384a;
  background: #fff;
  box-sizing: border-box;
}

.codex-request-help {
  margin: 0;
  color: #52687a;
  font-size: 0.86rem;
  line-height: 1.4;
}

.codex-request-intake-guide {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem;
  border: 1px solid #d5e3f0;
  border-radius: 8px;
  background: #f7fbff;
  color: #1c2b36;
}

.codex-request-intake-guide h4,
.codex-request-intake-guide p {
  margin: 0;
}

.codex-request-intake-guide ol {
  margin: 0;
  padding-left: 1.25rem;
}

.codex-request-intake-guide li {
  margin: 0.18rem 0;
}

.codex-request-builder [hidden] {
  display: none !important;
}

#codex-request-generated-scope,
#codex-request-prompt-preview {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  resize: vertical;
}

.codex-request-optional {
  border: 1px solid #e1e8f0;
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
}

.codex-request-optional summary,
.codex-request-generated-details summary {
  cursor: pointer;
  font-weight: 700;
  color: #29435c;
}

.codex-request-scope-panel {
  display: grid;
  gap: 0.85rem;
}

.codex-request-suggestion-panel {
  display: grid;
  gap: 0.65rem;
  border: 1px solid #cfe0ef;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 0.75rem;
}

.codex-request-suggestion-empty p,
.codex-request-suggestion-head p,
.codex-request-suggestion-card p,
.codex-request-linked-preview p {
  margin: 0.25rem 0 0 0;
  color: #536579;
  line-height: 1.4;
}

.codex-request-suggestion-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.codex-request-suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.codex-request-suggestion-list {
  display: grid;
  gap: 0.45rem;
}

.codex-request-suggestion-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.55rem;
  align-items: start;
  border: 1px solid #d9e4ee;
  border-left: 4px solid #8ca1b4;
  border-radius: 6px;
  background: #fff;
  padding: 0.55rem 0.65rem;
}

.codex-request-suggestion-card--high {
  border-left-color: #2e7d32;
}

.codex-request-suggestion-card--medium {
  border-left-color: #c17400;
}

.codex-request-suggestion-card--low {
  border-left-color: #607d8b;
}

.codex-request-confidence {
  display: inline-flex;
  align-items: center;
  min-height: 1.4rem;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.codex-request-confidence--high {
  background: #e8f5e9;
  color: #1b5e20;
}

.codex-request-confidence--medium {
  background: #fff4df;
  color: #7a4a00;
}

.codex-request-confidence--low {
  background: #eef4f7;
  color: #355261;
}

.codex-request-scope-group {
  display: grid;
  gap: 0.45rem;
}

.codex-request-scope-group h4 {
  color: #29435c;
  font-size: 0.9rem;
}

.codex-request-scope-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.4rem;
}

.codex-request-scope-option {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  border: 1px solid #dce5ef;
  border-radius: 6px;
  padding: 0.48rem 0.55rem;
  background: #fbfdff;
  line-height: 1.3;
}

.codex-request-scope-option input {
  margin-top: 0.1rem;
}

.codex-request-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.codex-request-generated-details {
  margin-bottom: 0.75rem;
}

.codex-request-generated-details textarea {
  margin-top: 0.5rem;
}

.codex-request-linked-preview {
  display: grid;
  gap: 0.55rem;
  border: 1px solid #e1e8f0;
  border-radius: 6px;
  background: #fbfdff;
  padding: 0.65rem;
  margin-top: 0.5rem;
}

.codex-request-linked-group ul {
  margin: 0.25rem 0 0 1rem;
  padding: 0;
}

.codex-request-linked-group li {
  margin: 0.15rem 0;
}

.codex-request-linked-overflow {
  border-top: 1px solid #e1e8f0;
  padding-top: 0.45rem;
  color: #536579;
  font-size: 0.84rem;
}

.codex-request-message {
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.5rem;
  font-size: 0.86rem;
}

.codex-request-message--error {
  background: #fff1f1;
  border: 1px solid #f2b7b7;
  color: #7f1d1d;
}

.codex-request-message--warning {
  background: #fff7d6;
  border: 1px solid #efd48b;
  color: #6c5300;
}

.codex-request-empty {
  border: 1px solid #efd48b;
  border-radius: 8px;
  background: #fff7d6;
  padding: 1rem;
  color: #6c5300;
}

@media (max-width: 900px) {
  .codex-request-hero,
  .codex-request-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .codex-request-next {
    max-width: none;
  }

  .codex-request-suggestion-head,
  .codex-request-suggestion-card {
    grid-template-columns: minmax(0, 1fr);
    display: grid;
  }
}

.architecture-workspace-shell {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  min-height: 0;
}

.architecture-subnav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.architecture-subnav-btn.active {
  background: #174ea6;
  color: #fff;
  border-color: #174ea6;
}

.architecture-subview-container {
  flex: 1 1 auto;
  min-height: 0;
}

.modeling-agreement-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.75rem;
  height: 100%;
  min-height: 680px;
}

.modeling-agreement-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: #f8fafc;
  padding: 0.9rem 1rem;
}

.modeling-agreement-hero h2 {
  margin: 0 0 0.25rem 0;
  font-size: 1.15rem;
}

.modeling-agreement-hero p {
  margin: 0;
  max-width: 72rem;
  color: #415064;
  line-height: 1.45;
}

.modeling-agreement-principle {
  flex: 0 0 auto;
  border: 1px solid #b8d1ff;
  border-radius: 6px;
  background: #eef5ff;
  color: #174ea6;
  font-weight: 700;
  padding: 0.45rem 0.6rem;
  white-space: nowrap;
}

.modeling-agreement-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.5rem;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: #fff;
  padding: 0.65rem;
}

.modeling-agreement-control,
.modeling-agreement-check {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: #4b5b6e;
}

.modeling-agreement-check {
  flex-direction: row;
  align-items: center;
  align-self: center;
}

.modeling-agreement-control select {
  min-width: 8.5rem;
}

.modeling-agreement-body {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(420px, 1.7fr) minmax(270px, 0.9fr);
  gap: 0.75rem;
  min-height: 0;
}

.modeling-agreement-body--diagram-expanded {
  grid-template-columns: minmax(220px, 0.45fr) minmax(640px, 2.6fr) minmax(270px, 0.55fr);
}

.modeling-agreement-body--diagram-expanded.modeling-agreement-body--tree-hidden {
  grid-template-columns: minmax(640px, 1fr) minmax(270px, 0.45fr);
}

.modeling-agreement-body--diagram-expanded.modeling-agreement-body--details-hidden {
  grid-template-columns: minmax(220px, 0.45fr) minmax(640px, 1fr);
}

.modeling-agreement-body--diagram-expanded.modeling-agreement-body--tree-hidden.modeling-agreement-body--details-hidden {
  grid-template-columns: minmax(720px, 1fr);
}

.modeling-agreement-tree,
.modeling-agreement-canvas,
.modeling-agreement-details {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: #fff;
}

.modeling-agreement-tree[hidden],
.modeling-agreement-details[hidden] {
  display: none;
}

.modeling-agreement-tree,
.modeling-agreement-details {
  padding: 0.75rem;
}

.modeling-agreement-overview {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0.75rem;
  color: #415064;
}

.modeling-agreement-alignment-list {
  display: grid;
  gap: 0.55rem;
}

.modeling-agreement-alignment-finding {
  display: grid;
  gap: 0.4rem;
  border: 1px solid #d8e0ea;
  border-left: 4px solid #b45309;
  border-radius: 6px;
  padding: 0.65rem;
  background: #fff;
}

.modeling-agreement-alignment-finding-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  color: #25364a;
}

.modeling-agreement-alignment-finding-head span {
  color: #64748b;
  font-size: 0.78rem;
}

.modeling-agreement-alignment-finding-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.26fr) minmax(0, 1fr);
  gap: 0.5rem;
  color: #415064;
  font-size: 0.84rem;
  line-height: 1.35;
}

.modeling-agreement-alignment-finding-row strong {
  color: #25364a;
}

.modeling-agreement-tree-section {
  margin-bottom: 0.9rem;
}

.modeling-agreement-tree-section h3,
.modeling-agreement-details h3,
.modeling-agreement-details h4 {
  margin: 0 0 0.45rem 0;
  font-size: 0.92rem;
}

.modeling-agreement-tree-list {
  display: grid;
  gap: 0.2rem;
}

.modeling-agreement-tree-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 4px;
  padding: 0.25rem 0.35rem;
  color: #25364a;
  font-size: 0.84rem;
}

.modeling-agreement-tree-button {
  cursor: pointer;
}

.modeling-agreement-tree-button:hover,
.modeling-agreement-tree-button.is-active {
  background: #eef5ff;
  color: #174ea6;
}

.modeling-agreement-canvas {
  background: #f8fafc;
}

.modeling-agreement-shell--diagram-expanded .modeling-agreement-canvas {
  display: grid;
  place-items: stretch center;
}

.modeling-agreement-graph-svg {
  width: 100%;
  min-width: 1040px;
  height: 100%;
  min-height: 700px;
  display: block;
  background: #f8fafc;
}

.modeling-agreement-zone {
  fill: #fff;
  stroke: #d6deea;
  stroke-width: 1;
}

.modeling-agreement-zone--requirements { fill: #fff7ed; }
.modeling-agreement-zone--process { fill: #eff6ff; }
.modeling-agreement-zone--data { fill: #f0fdf4; }
.modeling-agreement-zone--ui { fill: #fdf2f8; }
.modeling-agreement-zone--architecture { fill: #eef2ff; }
.modeling-agreement-zone--journey { fill: #f5f3ff; }
.modeling-agreement-zone--semantic { fill: #f0fdfa; }
.modeling-agreement-zone--organization { fill: #f7fee7; }
.modeling-agreement-zone--interaction { fill: #ecfeff; }
.modeling-agreement-zone--service { fill: #fefce8; }
.modeling-agreement-zone--strategy { fill: #fff1f2; }
.modeling-agreement-zone--case-management { fill: #f5f5f4; }
.modeling-agreement-zone--governance { fill: #f8fafc; }

.modeling-agreement-zone-label {
  fill: #25364a;
  font-size: 13px;
  font-weight: 700;
}

.modeling-agreement-zone-marker {
  fill: #64748b;
  font-size: 9px;
  font-weight: 800;
  text-anchor: end;
}

.modeling-agreement-edge {
  stroke: #64748b;
  stroke-width: 1.7;
}

.modeling-agreement-edge--dashed {
  stroke-dasharray: 7 5;
}

.modeling-agreement-edge--structural,
.modeling-agreement-edge--taxonomy {
  stroke: #1d4ed8;
  stroke-width: 2.2;
}

.modeling-agreement-edge--governance,
.modeling-agreement-edge--export {
  stroke: #7c3aed;
}

.modeling-agreement-edge--navigation,
.modeling-agreement-edge--context {
  stroke: #0f766e;
}

.modeling-agreement-edge--realization,
.modeling-agreement-edge--service-exposure {
  stroke: #b45309;
  stroke-width: 2.1;
}

.modeling-agreement-edge--interaction,
.modeling-agreement-edge--interface-dependency {
  stroke: #0891b2;
}

.modeling-agreement-edge--organization,
.modeling-agreement-edge--capability-ownership {
  stroke: #4d7c0f;
}

.modeling-agreement-edge--domain-containment,
.modeling-agreement-edge--strategy-alignment,
.modeling-agreement-edge--value-stream {
  stroke: #be123c;
}

.modeling-agreement-arrow-path {
  fill: #64748b;
}

.modeling-agreement-node {
  cursor: pointer;
}

.modeling-agreement-node-shape {
  fill: #fff;
  stroke: #52677f;
  stroke-width: 1.4;
}

.modeling-agreement-node--modelType .modeling-agreement-node-shape {
  fill: #eaf2ff;
  stroke: #174ea6;
}

.modeling-agreement-node--objectType .modeling-agreement-node-shape {
  fill: #fff;
}

.modeling-agreement-node--taxonomyType .modeling-agreement-node-shape {
  fill: #ecfdf5;
  stroke-dasharray: 4 2;
}

.modeling-agreement-node--temporaryArtifact .modeling-agreement-node-shape {
  fill: #f1f5f9;
  stroke: #94a3b8;
  stroke-dasharray: 5 4;
}

.modeling-agreement-node--category-service .modeling-agreement-node-shape {
  stroke: #b45309;
}

.modeling-agreement-node--category-interaction .modeling-agreement-node-shape {
  stroke: #0891b2;
}

.modeling-agreement-node--taxonomy-grouped .modeling-agreement-node-shape {
  stroke-width: 1.9;
}

.modeling-agreement-node.is-selected .modeling-agreement-node-shape {
  stroke: #dc2626;
  stroke-width: 2.4;
}

.modeling-agreement-node.is-faded {
  opacity: 0.34;
}

.modeling-agreement-node--governance-mandatory .modeling-agreement-node-shape {
  stroke-width: 2.2;
}

.modeling-agreement-node-label {
  text-anchor: middle;
  dominant-baseline: middle;
  fill: #172033;
  font-weight: 700;
  font-size: 11px;
}

.modeling-agreement-node-meta {
  text-anchor: middle;
  fill: #536579;
  font-size: 8.7px;
}

.modeling-agreement-notation-badge-shape {
  fill: #f8fafc;
  stroke: #cbd5e1;
  stroke-width: 0.8;
}

.modeling-agreement-notation-badge-text {
  fill: #334155;
  font-size: 7px;
  font-weight: 800;
  text-anchor: middle;
}

.modeling-agreement-perspective-badge-shape {
  fill: #ffffff;
  stroke: #cbd5e1;
  stroke-width: 1;
}

.modeling-agreement-perspective-badge-text {
  fill: #25364a;
  font-size: 10px;
  font-weight: 800;
  text-anchor: middle;
  text-transform: uppercase;
}

.modeling-agreement-legend-frame {
  fill: #ffffff;
  stroke: #d6deea;
  stroke-width: 1;
}

.modeling-agreement-legend-title {
  fill: #25364a;
  font-size: 10px;
  font-weight: 700;
}

.modeling-agreement-legend-swatch {
  marker-end: none;
}

.modeling-agreement-legend-text {
  fill: #415064;
  font-size: 10px;
  font-weight: 700;
}

.modeling-agreement-empty {
  color: #536579;
  padding: 1rem;
}

.modeling-agreement-details-note {
  color: #536579;
  font-size: 0.82rem;
  line-height: 1.4;
  margin: 0 0 0.7rem 0;
}

.modeling-agreement-form {
  display: grid;
  gap: 0.45rem;
}

.modeling-agreement-form label {
  display: grid;
  gap: 0.2rem;
  color: #415064;
  font-size: 0.78rem;
}

.modeling-agreement-form input,
.modeling-agreement-form select,
.modeling-agreement-form textarea,
.modeling-agreement-add-relationship select {
  width: 100%;
  box-sizing: border-box;
}

.modeling-agreement-details-actions,
.modeling-agreement-add-relationship {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.7rem 0;
}

.modeling-agreement-add-relationship select {
  flex: 1 1 7rem;
}

.modeling-agreement-relationship-list {
  display: grid;
  gap: 0.35rem;
  color: #415064;
  font-size: 0.84rem;
}

.modeling-agreement-relationship-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(7rem, auto) auto;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.35rem;
}

.modeling-agreement-indicator-row,
.modeling-agreement-mapping-row,
.modeling-agreement-profile-badge,
.modeling-agreement-profile-artifacts,
.modeling-agreement-mapping-summary {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.35rem 0.45rem;
  margin-bottom: 0.35rem;
  color: #334155;
  font-size: 0.82rem;
}

.modeling-agreement-indicator-row strong {
  color: #174ea6;
}

.modeling-agreement-mapping-group {
  margin-top: 0.75rem;
}

.modeling-agreement-mapping-row em {
  color: #64748b;
  font-style: normal;
}

.modeling-agreement-effective-scope,
.modeling-agreement-scope-list {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.45rem;
  margin: 0.45rem 0;
  background: #f8fafc;
  color: #334155;
  font-size: 0.84rem;
}

.modeling-agreement-scope-list {
  background: #fff;
  padding: 0.35rem 0.45rem;
}

.modeling-agreement-scope-list-body {
  margin-top: 0.35rem;
  color: #64748b;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .modeling-agreement-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .modeling-agreement-principle {
    white-space: normal;
  }
}

.reality-drift-view {
  gap: 0.85rem;
}

.reality-drift-shell {
  display: grid;
  gap: 0.85rem;
}

.reality-drift-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.reality-drift-run-btn {
  border-color: #315f86;
  background: #315f86;
  color: #fff;
}

.reality-drift-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 0.65rem;
}

.reality-drift-metric {
  border: 1px solid #d8e3ea;
  border-radius: 6px;
  background: #f8fbfd;
  padding: 0.65rem;
}

.reality-drift-metric__label,
.reality-drift-evidence__kind {
  display: block;
  color: #637381;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.reality-drift-metric__value {
  display: block;
  color: #1f2933;
  font-size: 1.35rem;
  margin-top: 0.15rem;
}

.reality-drift-group {
  display: grid;
  gap: 0.65rem;
}

.reality-drift-group__heading,
.reality-drift-signal-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.reality-drift-group__empty {
  margin: 0;
}

.reality-drift-signal-card {
  border-left: 4px solid #8aa1b4;
}

.reality-drift-signal-card--medium {
  border-left-color: #c77d00;
}

.reality-drift-signal-card--high {
  border-left-color: #b42318;
}

.reality-drift-signal-card__title {
  margin: 0;
  color: #1f2933;
  font-size: 0.98rem;
}

.reality-drift-signal-card__message {
  margin: 0.18rem 0 0;
  color: #52606d;
  line-height: 1.4;
}

.reality-drift-severity {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d8e3ea;
  border-radius: 999px;
  background: #f4f7f9;
  color: #334e68;
  padding: 0.16rem 0.48rem;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.reality-drift-severity--medium {
  border-color: #f6c768;
  background: #fff8e6;
  color: #8a4b00;
}

.reality-drift-severity--high {
  border-color: #f4b4ac;
  background: #fff1f0;
  color: #9f1f14;
}

.reality-drift-evidence-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.reality-drift-evidence {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(160px, 0.45fr) minmax(220px, 1fr);
  gap: 0.55rem;
  align-items: start;
  width: 100%;
  border: 1px solid #e1e8ef;
  border-radius: 6px;
  background: #fff;
  color: #1f2933;
  padding: 0.55rem;
  text-align: left;
  cursor: pointer;
}

.reality-drift-evidence:hover,
.reality-drift-evidence:focus {
  border-color: #7aa2c7;
  box-shadow: 0 0 0 2px rgba(49, 95, 134, 0.12);
  outline: none;
}

.reality-drift-evidence__label {
  color: #1f2933;
  overflow-wrap: anywhere;
}

.reality-drift-evidence__detail {
  color: #52606d;
  line-height: 1.35;
}

.bpmn-reality-drift-marker {
  pointer-events: none;
}

.journey-detail-step-card__badge--reality-drift {
  background: #fff8e6;
  color: #8a4b00;
  border-color: #f6c768;
}

.context-graph-inspector-list--reality-drift {
  border-top: 1px solid #e1e8ef;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
}

@media (max-width: 900px) {
  .reality-drift-summary,
  .reality-drift-evidence {
    grid-template-columns: minmax(0, 1fr);
  }
}

.almanac-story-prompt,
.almanac-story-overlay {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1800;
  box-sizing: border-box;
  width: min(420px, calc(100vw - 2rem));
  border: 1px solid #c8d6e4;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2933;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  padding: 1rem;
}

.almanac-story-overlay--over-modal {
  z-index: 100054;
}

.almanac-story-prompt h2,
.almanac-story-overlay h2,
.almanac-story-picker-panel h2 {
  margin: 0;
  color: #102a43;
  font-size: 1.05rem;
  line-height: 1.25;
}

.almanac-story-prompt p,
.almanac-story-overlay p,
.almanac-story-picker-panel p {
  margin: 0.55rem 0 0;
  color: #334e68;
  font-size: 0.9rem;
  line-height: 1.45;
}

.almanac-story-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.almanac-story-progress {
  margin-bottom: 0.45rem;
  color: #52606d;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.almanac-story-focus-hint {
  display: inline-flex;
  margin-top: 0.65rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.almanac-story-picker {
  position: fixed;
  inset: 0;
  z-index: 1810;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.35);
}

.almanac-story-picker-panel {
  box-sizing: border-box;
  width: min(860px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 1px solid #c8d6e4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.22);
  padding: 1.1rem;
}

.almanac-story-journey-section {
  margin-top: 1rem;
}

.almanac-story-journey-section h3 {
  margin: 0;
  color: #243b53;
  font-size: 0.84rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.almanac-story-journey-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.almanac-story-journey-card {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  min-height: 8.4rem;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f8fafc;
  color: #1f2933;
  padding: 0.85rem;
  text-align: left;
  cursor: pointer;
}

.almanac-story-journey-card:hover,
.almanac-story-journey-card:focus {
  border-color: #2f80ed;
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.16);
  outline: none;
}

.almanac-story-journey-card strong {
  color: #102a43;
  font-size: 0.96rem;
}

.almanac-story-journey-card span {
  color: #52606d;
  font-size: 0.84rem;
  line-height: 1.4;
}

.almanac-story-highlight {
  position: relative;
  z-index: 12;
  outline: 3px solid #2f80ed;
  outline-offset: 3px;
  box-shadow: 0 0 0 7px rgba(47, 128, 237, 0.18);
}

@media (max-width: 760px) {
  .almanac-story-prompt,
  .almanac-story-overlay {
    right: 0.75rem;
    bottom: 0.75rem;
    width: calc(100vw - 1.5rem);
  }

  .almanac-story-journey-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
