  /* ──────────────────────────────────────────────────────────────────────
     Services view (Cluster 2)
     Three-column layout: BS selector | selected service overview | summary
     stack. All content driven by STRUCTURAL_CONTEXT plus the small explicit
     SERVICE_PATH_OVERLAY for the Merchant Services authority paths.
     ────────────────────────────────────────────────────────────────────── */

  .services-view {
    padding: 24px;
  }
  .services-grid {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 24px;
    align-items: start;
  }

  /* Polish PR: per-column header strip for first-use clarity. The
     three columns now each declare a title + helper subtitle so the
     reading order ("which service?" → "what does it do?" → "how is
     it governed?") is explicit. Visual treatment is intentionally
     light — a small uppercase title and a one-line subtitle —
     matching the existing dark workbench language. */
  .services-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .services-col-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--outline-variant);
  }
  .services-col-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--slate-300);
    font-family: var(--font-display);
    margin-bottom: 2px;
  }
  .services-col-subtitle {
    font-size: 11px;
    color: var(--slate-500);
    line-height: 1.45;
  }

  .services-bs-search {
    width: 100%;
    padding: 9px 12px;
    background: var(--surface-container-lowest);
    border: 0;
    border-bottom: 2px solid var(--outline-variant);
    color: var(--on-surface);
    font-size: 12px;
    font-family: inherit;
    margin-bottom: 12px;
    border-radius: 0;
  }
  .services-bs-search:focus {
    outline: none;
    border-bottom-color: var(--primary);
    box-shadow: none;
  }
  .services-bs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .services-bs-card {
    background: var(--surface-container);
    border: 1px solid var(--outline-variant);
    border-radius: 6px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, opacity 0.12s;
    text-align: left;
    font-family: inherit;
    color: inherit;
    width: 100%;
    display: block;
  }
  .services-bs-card:hover {
    background: var(--surface-container-high);
  }
  .services-bs-card.active {
    background: var(--surface-container-high);
    border-left: 4px solid var(--primary);
    padding-left: 13px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  }
  .services-bs-card.inactive {
    opacity: 0.75;
  }
  .services-bs-card.inactive:hover { opacity: 1; }
  .services-bs-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 10px;
  }
  .services-bs-card-id {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--primary);
    background: rgba(173,198,255,0.10);
    padding: 2px 8px;
    border-radius: 4px;
  }
  .services-bs-card.inactive .services-bs-card-id {
    color: var(--slate-500);
    background: rgba(255,255,255,0.04);
  }
  .services-bs-card-badge {
    font-size: 9px;
    background: rgba(78, 222, 163, 0.10);
    color: var(--secondary);
    border: 1px solid rgba(78, 222, 163, 0.20);
    border-radius: 3px;
    padding: 2px 7px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    white-space: nowrap;
  }
  .services-bs-card-name {
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--on-surface);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
  }
  .services-bs-card-counts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    font-size: 11px;
    color: var(--slate-400);
    font-family: var(--font-mono);
  }
  .services-bs-card-count-item {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .services-bs-card-count-glyph {
    color: var(--slate-500);
    width: 12px;
    display: inline-block;
    text-align: center;
  }

  /* Live BS-list state strips. The selector now consults the live
     /v1/businessservices endpoint and renders one of three explicit
     states (loading / empty / error) instead of falling back to the
     demo constant. Each strip uses the existing dark workbench palette. */
  .services-bs-loading,
  .services-bs-empty,
  .services-bs-error {
    background: var(--surface-container);
    border: 1px solid var(--outline-variant);
    border-radius: 6px;
    padding: 14px 16px;
    font-size: 12px;
    color: var(--slate-400);
    line-height: 1.5;
  }
  .services-bs-empty strong,
  .services-bs-error strong {
    color: var(--on-surface);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
  }
  .services-bs-error {
    border-left: 4px solid var(--error);
    color: var(--error);
  }
  .services-bs-error strong { color: var(--error); }
  .services-bs-card-status {
    font-size: 9px;
    background: var(--surface-container-high);
    color: var(--slate-300);
    border: 1px solid var(--outline-variant);
    border-radius: 3px;
    padding: 2px 7px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    white-space: nowrap;
  }

  .services-center {
    background: var(--surface-container-low);
    border: 1px solid var(--outline-variant);
    border-radius: 8px;
    overflow: hidden;
  }
  .services-overview-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--outline-variant);
    background: var(--surface-container-lowest);
  }
  .services-overview-header h2 {
    font-size: 20px;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--on-surface);
    letter-spacing: -0.01em;
    margin-bottom: 4px;
  }
  .services-overview-header p {
    font-size: 12px;
    color: var(--slate-500);
  }
  .services-overview-body {
    padding: 24px;
  }

  .services-overview-bs-card {
    background: var(--surface-container);
    border-left: 4px solid var(--primary);
    padding: 14px 18px;
    border-radius: 0 4px 4px 0;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .services-overview-bs-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(173, 198, 255, 0.15);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
  }
  .services-overview-bs-text { flex: 1; }
  .services-overview-bs-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--primary);
    margin-bottom: 2px;
  }
  .services-overview-bs-name {
    font-size: 17px;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--on-surface);
  }

  .services-paths-header {
    text-align: center;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--slate-500);
    margin: 0 0 16px;
  }
  .services-paths-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .services-path {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  .services-path-step {
    background: var(--surface-container-high);
    border: 1px solid var(--outline-variant);
    border-radius: 4px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .services-path-step-label {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--slate-500);
  }
  .services-path-step-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--on-surface);
  }
  .services-path-connector {
    width: 1px;
    height: 12px;
    margin: 0 auto;
    background-image: linear-gradient(180deg, var(--outline-variant) 50%, transparent 50%);
    background-size: 1px 4px;
    background-repeat: repeat-y;
  }
  .services-path-chain {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
  }
  .services-path-chain-row {
    background: var(--surface-container-lowest);
    padding: 6px 10px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    border-left: 2px solid;
  }
  .services-path-chain-row.surface  { border-left-color: var(--chain-surface); }
  .services-path-chain-row.profile  { border-left-color: var(--chain-profile); }
  .services-path-chain-row.grant    { border-left-color: var(--chain-grant); }
  .services-path-chain-row.agent    { border-left-color: var(--primary); }
  .services-path-chain-key {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--slate-500);
  }
  .services-path-chain-val { font-family: var(--font-mono); font-size: 11px; }
  .services-path-chain-row.surface .services-path-chain-val { color: var(--chain-surface); }
  .services-path-chain-row.profile .services-path-chain-val { color: var(--chain-profile); }
  .services-path-chain-row.grant   .services-path-chain-val { color: var(--chain-grant); }
  .services-path-chain-row.agent   .services-path-chain-val { color: var(--primary); }

  .services-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .services-card {
    background: var(--surface-container);
    border: 1px solid var(--outline-variant);
    border-radius: 8px;
    padding: 18px;
  }
  .services-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
  }
  .services-card-title {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--slate-500);
    flex: 1;
  }
  .services-card-demo-badge {
    font-size: 8px;
    background: rgba(78, 222, 163, 0.10);
    color: var(--secondary);
    border: 1px solid rgba(78, 222, 163, 0.20);
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
  }
  .services-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 12px;
  }
  .services-summary-row:last-child { border-bottom: 0; }
  .services-summary-key { color: var(--slate-400); }
  .services-summary-val {
    font-family: var(--font-mono);
    color: var(--on-surface);
  }
  .services-summary-val.ok { color: var(--secondary); }

  .services-coverage-pct {
    font-size: 32px;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--on-surface);
    letter-spacing: -0.02em;
    line-height: 1;
  }
  .services-coverage-bar {
    margin-top: 12px;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    overflow: hidden;
  }
  .services-coverage-bar-fill {
    height: 100%;
    background: var(--secondary);
    transition: width 0.3s ease;
  }
  .services-coverage-note {
    margin-top: 8px;
    font-size: 10px;
    color: var(--slate-500);
  }

  .services-recent-decision {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    gap: 12px;
  }
  .services-recent-decision:last-child { border-bottom: 0; }
  .services-recent-id {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--slate-300);
  }
  .services-recent-time {
    font-size: 10px;
    color: var(--slate-500);
    margin-top: 2px;
  }
  .services-recent-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .services-runtime-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
  }
  .services-runtime-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  .services-runtime-key {
    font-size: 10px;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .services-runtime-val {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--on-surface);
  }

  /* Responsive collapse */
  @media (max-width: 1100px) {
    .layout { grid-template-columns: 1fr; }
    .panel-left { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .services-grid { grid-template-columns: 1fr 1fr; }
    .services-summary { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
    .services-summary > .services-card { flex: 1 1 240px; }
  }
  @media (max-width: 720px) {
    :root { --sidebar-width: 0px; }
    .shell-sidebar { display: none; }
    .shell-header,
    .shell-footer { left: 0; }
    .shell-main   { margin-left: 0; }
    .shell-header-chips { display: none; }
    .services-grid       { grid-template-columns: 1fr; }
    .services-paths-grid { grid-template-columns: 1fr; }
  }

  /* ──────────────────────────────────────────────────────────────────────
     Services view — catalogue → record → map navigation
     Replaces the previous three-column overview/map mode-toggle layout
     with a sub-view state machine. Class names are entity-agnostic
     where reasonable so future record pages (Capability, Process, AI
     System) can adopt the same patterns without renames.
     ────────────────────────────────────────────────────────────────────── */

  .services-subview { display: none; }
  .services-subview.active { display: block; }

  /* Catalogue page — full-width list of business services */
  .services-catalogue { padding: 0; }
  .services-catalogue-header {
    margin-bottom: 18px;
  }
  .services-catalogue-title {
    font-size: 22px;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--on-surface);
    letter-spacing: -0.01em;
    margin-bottom: 4px;
  }
  .services-catalogue-subtitle {
    font-size: 12px;
    color: var(--slate-500);
    margin-bottom: 12px;
  }
  .services-catalogue-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
  }
  /* Catalogue cards extend the existing .services-bs-card styling but
     the catalogue list re-flows them as a responsive grid rather than
     a single-column sidebar. The catalogue card adds a meta footer
     row showing service_type / owner / EXT-REF. */
  .services-catalogue .services-bs-card-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 11px;
    color: var(--slate-400);
  }
  .services-bs-card-type,
  .services-bs-card-owner,
  .services-bs-card-extref {
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 3px;
    background: var(--surface-container-high);
    color: var(--slate-300);
    border: 1px solid var(--outline-variant);
  }
  .services-bs-card-extref {
    color: var(--primary);
    border-color: rgba(173,198,255,0.30);
  }

  /* Record page — header + identity strip + sectioned body */
  .services-record { padding: 0; }
  .services-record-header {
    margin-bottom: 18px;
  }
  .services-record-back {
    background: transparent;
    border: 0;
    color: var(--primary);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    margin-bottom: 8px;
  }
  .services-record-back:hover { text-decoration: underline; }
  .services-record-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
  }
  .services-record-name {
    font-size: 22px;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--on-surface);
    letter-spacing: -0.01em;
  }
  .services-record-id {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--primary);
    background: rgba(173,198,255,0.10);
    padding: 3px 9px;
    border-radius: 4px;
  }
  .services-record-status {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 3px;
    background: var(--surface-container-high);
    color: var(--slate-300);
    border: 1px solid var(--outline-variant);
  }
  .services-record-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .services-record-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .services-record-section {
    background: var(--surface-container-low);
    border: 1px solid var(--outline-variant);
    border-radius: 6px;
    padding: 16px 20px;
  }
  .services-record-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--slate-500);
    margin-bottom: 12px;
  }
  .services-record-identity {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 11px;
  }
  .services-record-identity-pill {
    background: var(--surface-container-high);
    border: 1px solid var(--outline-variant);
    border-radius: 999px;
    padding: 4px 10px;
    color: var(--slate-300);
    font-family: var(--font-mono);
  }
  .services-record-identity-pill .key {
    color: var(--slate-500);
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.08em;
    margin-right: 4px;
  }

  /* Generic field grid: two-column key/value pairs, responsive */
  .services-record-field-grid {
    display: grid;
    grid-template-columns: minmax(140px, max-content) 1fr;
    column-gap: 18px;
    row-gap: 8px;
  }
  .services-record-field-key {
    color: var(--slate-500);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    padding-top: 2px;
  }
  .services-record-field-val {
    color: var(--on-surface);
    font-size: 12px;
    font-family: var(--font-mono);
    word-break: break-word;
  }
  .services-record-field-val.muted { color: var(--slate-500); font-style: italic; }

  /* Generic related list: rows with id/name/status + per-row link
     affordance. Used by Capabilities / Processes / Surfaces / AI
     systems / Related services on the BS record page. */
  .services-related-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .services-related-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 8px 12px;
    background: var(--surface-container);
    border: 1px solid var(--outline-variant);
    border-radius: 4px;
    font-size: 12px;
  }
  .services-related-row .id {
    font-family: var(--font-mono);
    color: var(--primary);
    font-size: 10px;
    background: rgba(173,198,255,0.10);
    padding: 2px 7px;
    border-radius: 3px;
    flex-shrink: 0;
  }
  .services-related-row .name {
    color: var(--on-surface);
    font-weight: 600;
    flex: 1 1 auto;
    min-width: 0;
  }
  .services-related-row .meta {
    color: var(--slate-400);
    font-size: 10px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .services-related-row .badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--outline-variant);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
  }
  .services-related-row .badge.ok    { color: var(--secondary); border-color: rgba(78,222,163,0.40); }
  .services-related-row .badge.warn  { color: #f0b67a;          border-color: rgba(240,182,122,0.45); }
  .services-related-row .badge.bind  { color: var(--primary);   border-color: rgba(173,198,255,0.40); }
  .services-record-empty {
    color: var(--slate-500);
    font-size: 12px;
    font-style: italic;
    padding: 6px 0;
  }

  /* Governance summary chip strip */
  .services-record-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .services-record-chip {
    background: var(--surface-container);
    border: 1px solid var(--outline-variant);
    border-radius: 4px;
    padding: 8px 12px;
    min-width: 110px;
  }
  .services-record-chip .label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--slate-500);
    font-weight: 700;
    margin-bottom: 4px;
  }
  .services-record-chip .value {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--on-surface);
    line-height: 1.1;
  }
  .services-record-chip.gap .value { color: #f0b67a; }

  /* Loading / error strips on the record page */
  .services-record-loading,
  .services-record-error {
    background: var(--surface-container);
    border: 1px solid var(--outline-variant);
    border-radius: 6px;
    padding: 18px 20px;
    color: var(--slate-400);
    font-size: 12px;
  }
  .services-record-error {
    border-left: 4px solid var(--error);
    color: var(--error);
  }

