    :root {
      --bg-darkest: #040811;
      --bg-primary: #070d18;
      --bg-surface: #0f172a;
      --bg-surface-elevated: #162238;
      --bg-hover: #1e293b;
      --bg-input: #090e17;

      --bg-base: #040811;
      --bg-panel: #0f172a;
      --bg-card: #151e30;
      --bg-card-hover: #1b263d;

      --border-subtle: rgba(255, 255, 255, 0.08);
      --border-medium: #334155;
      --border-light: rgba(255, 255, 255, 0.08);
      --border-focus: #38bdf8;

      --text-main: #f8fafc;
      --text-muted: #94a3b8;
      --text-dim: #64748b;
      --text-sub: #94a3b8;

      --accent-cyan: #38bdf8;
      --accent-emerald: #10b981;
      --accent-amber: #f59e0b;
      --accent-rose: #f43f5e;
      --accent-purple: #a855f7;
      --accent-blue: #3b82f6;

      --header-height: 52px;
      --ribbon-height: 0px;

      /* SAFe Tier Color Palette */
      --c-portfolio: #f59e0b; /* Amber / Gold */
      --c-solution:  #a855f7; /* Purple */
      --c-art:       #38bdf8; /* Cyan */
      --c-team:      #22c55e; /* Emerald */
      --c-risk:      #f43f5e; /* Rose / Red */
      --c-quality:   #6366f1; /* Indigo */
      --c-cadence:   #ec4899; /* Pink */
      --c-tbox:      #06b6d4; /* Cyan/Teal */

      --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      --font-mono: 'JetBrains Mono', monospace;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      background-color: var(--bg-base);
      color: var(--text-main);
      font-family: var(--font-main);
      height: 100vh;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      -webkit-font-smoothing: antialiased;
    }

    /* =========================================================================
       TOP EXECUTIVE CONTROL BAR & SUITE SWITCHER
    ========================================================================= */
    header {
      height: var(--header-height);
      min-height: var(--header-height);
      background: var(--bg-primary);
      border-bottom: 1px solid var(--border-medium);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 16px;
      z-index: 1000;
      gap: 14px;
      position: relative;
      overflow: visible;
      flex-shrink: 0;
    }

    .brand-section {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-shrink: 0;
    }

    .logo-badge {
      background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
      color: #fff;
      font-weight: 800;
      font-size: 0.82rem;
      padding: 5px 12px;
      border-radius: 6px;
      letter-spacing: 0.04em;
      border: 1px solid rgba(56, 189, 248, 0.4);
      box-shadow: 0 0 12px rgba(2, 132, 199, 0.3);
      display: inline-flex;
      align-items: center;
      white-space: nowrap;
    }

    /* Compact O³ Studio Switcher Dropdown */
    .studio-switcher-wrap {
      position: relative;
    }
    .studio-switcher-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(15, 23, 42, 0.8);
      border: 1px solid var(--border-medium, #334155);
      color: var(--text-main, #f8fafc);
      padding: 5px 12px;
      border-radius: 6px;
      font-size: 0.78rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }
    .studio-switcher-btn:hover, .studio-switcher-btn.open {
      background: rgba(30, 41, 59, 0.9);
      border-color: var(--accent-cyan, #38bdf8);
      color: #fff;
    }
    .studio-dropdown {
      display: none;
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      width: 330px;
      background: #090e18;
      border: 1px solid var(--border-medium, #334155);
      border-radius: 12px;
      box-shadow: 0 16px 40px rgba(0,0,0,0.7);
      z-index: 10000;
      overflow: hidden;
      padding: 0;
    }
    .studio-dropdown.show {
      display: block;
      animation: fadeInDown 0.15s ease-out;
    }
    @keyframes fadeInDown {
      from { opacity: 0; transform: translateY(-6px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .studio-dropdown-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 14px;
      background: rgba(15, 23, 42, 0.7);
      border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
      font-size: 0.72rem;
      font-weight: 700;
      color: var(--text-muted, #94a3b8);
      text-transform: uppercase;
    }
    .studio-dropdown-header .hub-link, .studio-hub-link {
      color: var(--accent-cyan, #38bdf8);
      text-decoration: none;
      font-weight: 700;
    }
    .studio-dropdown-header .hub-link:hover, .studio-hub-link:hover {
      text-decoration: underline;
    }
    .studio-dropdown-grid, .studio-grid-menu {
      padding: 6px;
      display: flex;
      flex-direction: column;
      gap: 2px;
      max-height: 420px;
      overflow-y: auto;
    }
    .studio-menu-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 10px;
      border-radius: 6px;
      text-decoration: none;
      transition: background 0.15s;
    }
    .studio-menu-item:hover, .studio-menu-item.active {
      background: rgba(56, 189, 248, 0.1);
    }
    .studio-menu-item .item-icon {
      font-size: 1.1rem;
    }
    .studio-menu-item .item-text {
      display: flex;
      flex-direction: column;
    }
    .studio-menu-item .item-title {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-main, #f8fafc);
    }
    .studio-menu-item .item-desc {
      font-size: 0.68rem;
      color: var(--text-muted, #94a3b8);
    }
    .studio-menu-item .active-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--accent-cyan, #38bdf8);
      margin-left: auto;
    }

    .status-pill {
      font-size: 0.68rem;
      font-family: var(--font-mono);
      font-weight: 700;
      padding: 3px 10px;
      border-radius: 9999px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      transition: all 0.2s ease;
      user-select: none;
      white-space: nowrap;
    }
    .status-pill.live {
      background: rgba(16, 185, 129, 0.15);
      border: 1px solid rgba(16, 185, 129, 0.4);
      color: var(--accent-emerald);
    }
    .status-pill.simulation {
      background: rgba(245, 158, 11, 0.15);
      border: 1px solid rgba(245, 158, 11, 0.4);
      color: var(--accent-amber);
    }
    .status-pill .status-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--accent-emerald);
      box-shadow: 0 0 6px var(--accent-emerald);
    }

    .btn-micro {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--border-subtle);
      color: var(--text-muted);
      font-size: 0.65rem;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 4px;
      cursor: pointer;
      transition: all 0.15s ease;
      white-space: nowrap;
    }
    .btn-micro:hover {
      background: var(--bg-hover);
      color: var(--text-main);
      border-color: var(--accent-cyan);
    }

    /* T-Box Picker Dropdown in Header */
    .ribbon-item {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .ribbon-label {
      font-size: 0.68rem;
      font-weight: 700;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      gap: 4px;
      white-space: nowrap;
      text-transform: uppercase;
      letter-spacing: 0.4px;
    }
    .ribbon-divider {
      color: var(--border-medium);
      font-size: 0.8rem;
      opacity: 0.6;
    }
    .ribbon-select-wrap {
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .ribbon-select {
      background: var(--bg-surface);
      border: 1px solid var(--border-medium);
      color: var(--text-main);
      font-size: 0.72rem;
      font-weight: 600;
      padding: 4px 8px;
      border-radius: 6px;
      outline: none;
      cursor: pointer;
      transition: all 0.15s ease;
      max-width: 220px;
    }
    .ribbon-select:hover {
      border-color: var(--accent-cyan);
    }
    .ribbon-select:focus {
      border-color: var(--accent-cyan);
      box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
    }
    .ribbon-select.scope-select {
      border-color: rgba(56, 189, 248, 0.4);
      background: rgba(15, 23, 42, 0.95);
      color: #7dd3fc;
      font-weight: 700;
    }

    .brand-group {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
    }

    .title-area {
      display: flex;
      flex-direction: column;
    }

    .title-area h1 {
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--text-main);
      white-space: nowrap;
      margin: 0;
      line-height: 1.2;
    }

    .title-area .subtitle {
      font-size: 0.62rem;
      color: var(--text-muted);
      font-weight: 500;
      line-height: 1.1;
      white-space: nowrap;
    }

    .header-status-cluster {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-left: 4px;
    }

    #header-system-status-pill {
      cursor: pointer;
      user-select: none;
      font-size: 0.65rem;
      font-family: var(--font-mono);
      font-weight: 700;
      color: #10b981;
      background: rgba(16, 185, 129, 0.15);
      border: 1px solid rgba(16, 185, 129, 0.4);
      padding: 3px 8px;
      border-radius: 4px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      white-space: nowrap;
      transition: all 0.2s ease;
    }

    #header-live-sync-btn {
      cursor: pointer;
      font-size: 0.65rem;
      font-family: var(--font-mono);
      font-weight: 700;
      color: #38bdf8;
      background: rgba(56, 189, 248, 0.12);
      border: 1px solid rgba(56, 189, 248, 0.35);
      padding: 3px 8px;
      border-radius: 4px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      transition: all 0.2s ease;
      white-space: nowrap;
    }
    #header-live-sync-btn:hover {
      background: rgba(56, 189, 248, 0.22);
      border-color: #38bdf8;
    }

    /* Screen Selector Navigation Tabs */
    .screen-tabs {
      display: flex;
      background: rgba(0, 0, 0, 0.45);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      padding: 3px;
      gap: 3px;
    }

    .tab-btn {
      background: transparent;
      border: none;
      color: var(--text-sub);
      font-family: var(--font-main);
      font-size: 0.71rem;
      font-weight: 600;
      padding: 5px 8px;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 5px;
      transition: all 0.2s ease;
      white-space: nowrap;
    }

    .tab-btn:hover {
      color: var(--text-main);
      background: rgba(255, 255, 255, 0.06);
    }

    .tab-btn.active {
      background: #1e293b;
      color: #ffffff;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .tab-btn.active.tab-tbox {
      color: #38bdf8;
      background: rgba(56, 189, 248, 0.12);
      border-bottom: 2px solid #38bdf8;
    }
    .tab-btn.active.tab-p { color: var(--c-portfolio); border-bottom: 2px solid var(--c-portfolio); }
    .tab-btn.active.tab-s { color: var(--c-solution); border-bottom: 2px solid var(--c-solution); }
    .tab-btn.active.tab-a { color: var(--c-art); border-bottom: 2px solid var(--c-art); }
    .tab-btn.active.tab-t { color: var(--c-team); border-bottom: 2px solid var(--c-team); }
    .tab-btn.active.tab-r { color: #f43f5e; border-bottom: 2px solid #f43f5e; }
    .tab-btn.active.tab-abox { color: #10b981; background: rgba(16, 185, 129, 0.15); border-bottom: 2px solid #10b981; }
    .tab-btn.active.tab-duality { color: #ec4899; background: rgba(236, 72, 153, 0.15); border-bottom: 2px solid #ec4899; }

    .tbox-pill {
      font-size: 0.6rem;
      font-family: var(--font-mono);
      background: rgba(56, 189, 248, 0.2);
      color: #38bdf8;
      padding: 1px 5px;
      border-radius: 4px;
      margin-left: 2px;
    }

    /* Header Actions */
    .header-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }

    .tools-dropdown-container {
      position: relative;
      display: inline-flex;
      align-items: center;
    }

    #header-tools-btn {
      border: 1px solid #38bdf8;
      color: #38bdf8;
      font-weight: 700;
      background: rgba(56, 189, 248, 0.12);
      display: inline-flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      padding: 5px 12px;
      border-radius: 6px;
      font-size: 0.72rem;
      white-space: nowrap;
      transition: all 0.2s ease;
    }
    #header-tools-btn:hover {
      background: rgba(56, 189, 248, 0.22);
      box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
    }

    #header-tools-dropdown {
      display: none;
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      background: #0f172a;
      border: 1px solid #334155;
      border-radius: 8px;
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
      min-width: 240px;
      z-index: 99999;
      padding: 6px;
      flex-direction: column;
      gap: 3px;
    }

    .dropdown-item-btn {
      display: flex;
      align-items: center;
      gap: 9px;
      width: 100%;
      text-align: left;
      background: transparent;
      border: none;
      color: #f8fafc;
      font-size: 0.72rem;
      padding: 7px 10px;
      border-radius: 5px;
      cursor: pointer;
      font-weight: 600;
      text-decoration: none;
      box-sizing: border-box;
      transition: background 0.15s ease, color 0.15s ease;
    }
    .dropdown-item-btn:hover {
      background: #1e293b;
      color: #38bdf8;
    }

    @media (max-width: 1360px) {
      .header-status-cluster #header-system-status-pill {
        padding: 2px 6px;
        font-size: 0.62rem;
      }
      .header-status-cluster #header-live-sync-btn {
        padding: 2px 6px;
        font-size: 0.62rem;
      }
      .tab-btn {
        padding: 4px 7px;
        font-size: 0.68rem;
      }
    }
    @media (max-width: 1220px) {
      .title-area .subtitle { display: none; }
      .header-status-cluster { display: none; }
    }

    .status-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-family: var(--font-mono);
      font-size: 0.65rem;
      color: #94a3b8;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border-subtle);
      padding: 4px 8px;
      border-radius: 20px;
    }

    .status-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #10b981;
      box-shadow: 0 0 6px #10b981;
    }

    .btn-fullscreen {
      background: rgba(56, 189, 248, 0.1);
      border: 1px solid rgba(56, 189, 248, 0.3);
      color: #38bdf8;
      font-size: 0.72rem;
      font-weight: 600;
      padding: 5px 10px;
      border-radius: 6px;
      cursor: pointer;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .btn-fullscreen:hover { background: rgba(56, 189, 248, 0.2); }

    /* =========================================================================
       MAIN MULTI-SCREEN VIEWPORT CONTAINER
    ========================================================================= */
    #viewport-container {
      flex: 1;
      position: relative;
      overflow: hidden;
      display: flex;
    }

    .screen-view {
      position: absolute;
      inset: 0;
      display: none;
      opacity: 0;
      transition: opacity 0.25s ease;
      background: var(--bg-base);
    }

    .screen-view.active {
      display: flex;
      opacity: 1;
      z-index: 10;
    }

    /* Screen 0, 1, 2: Canvas + Sidebar */
    .canvas-pane.bigpicture-mode {
      background: #ffffff !important;
    }
    .canvas-pane.bigpicture-mode.exec-gov-bp {
      background: #070b14 !important;
    }
    .canvas-pane.bigpicture-mode edge {
      opacity: 0 !important;
      transition: opacity 0.2s ease;
    }
    .canvas-pane.bigpicture-mode.show-all-edges edge {
      opacity: 0.16 !important;
      line-color: #64748b !important;
      width: 1.5px !important;
    }
    .canvas-pane.bigpicture-mode edge.highlighted,
    .canvas-pane.bigpicture-mode edge.hover-glow,
    .canvas-pane.bigpicture-mode edge.edge-selected {
      opacity: 0.95 !important;
      line-color: #0284c7 !important;
      target-arrow-color: #0284c7 !important;
      width: 3.5px !important;
      z-index: 999 !important;
    }

    .canvas-pane {
      flex: 1;
      position: relative;
      height: 100%;
      background: radial-gradient(circle at 50% 50%, #0d1527 0%, #070a0f 100%);
    }

    .side-widget-pane {
      width: 390px;
      min-width: 390px;
      max-width: 390px;
      flex-shrink: 0;
      background: var(--bg-panel);
      border-left: 1px solid var(--border-subtle);
      overflow-y: auto;
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      z-index: 10;
      transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), min-width 0.22s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.22s cubic-bezier(0.16, 1, 0.3, 1), padding 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
      position: relative;
    }

    .side-widget-pane.collapsed {
      width: 0 !important;
      min-width: 0 !important;
      max-width: 0 !important;
      padding: 0 !important;
      margin: 0 !important;
      border-left: none !important;
      overflow: hidden !important;
      opacity: 0;
      pointer-events: none;
    }

    .drawer-docked-tab {
      position: absolute;
      top: 50%;
      right: 0;
      transform: translateY(-50%);
      z-index: 45;
      background: #0b1324;
      border: 1px solid #38bdf8;
      border-right: none;
      color: #38bdf8;
      font-weight: 700;
      font-size: 0.68rem;
      padding: 12px 7px;
      border-radius: 8px 0 0 8px;
      cursor: pointer;
      display: none;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      box-shadow: -4px 0 16px rgba(0, 0, 0, 0.6);
      transition: all 0.2s ease;
      user-select: none;
    }

    .drawer-docked-tab:hover {
      background: #0284c7;
      color: #ffffff;
      padding-left: 11px;
      box-shadow: -6px 0 20px rgba(56, 189, 248, 0.4);
    }

    .widget-card {
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      padding: 14px;
    }

    .widget-header {
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    /* =========================================================================
       SCREEN 0: T-BOX METAMODEL & TEACHING WORKBENCH STYLES
    ========================================================================= */
    #screen-0 {
      flex-direction: row;
      overflow: hidden;
      width: 100%;
      height: 100%;
    }

    .tbox-left-container {
      flex: 1;
      min-width: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      height: 100%;
      position: relative;
    }

    .tbox-toolbar {
      padding: 8px 14px;
      background: rgba(15, 23, 42, 0.9);
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      flex-direction: column;
      gap: 6px;
      z-index: 20;
      min-width: 0;
      width: 100%;
    }

    .tbox-chips {
      display: flex;
      align-items: center;
      gap: 6px;
      overflow-x: auto;
      padding-bottom: 4px;
      min-width: 0;
      flex: 1;
      scrollbar-width: thin;
    }

    /* Domain Color Swatches & Circular Filter Palette */
    .domain-swatches-wrap {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      flex-shrink: 0;
    }

    .domain-swatch-btn {
      width: 22px;
      height: 22px;
      min-width: 22px;
      border-radius: 50%;
      border: 2px solid rgba(255, 255, 255, 0.25);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      position: relative;
      font-size: 0.58rem;
      font-family: var(--font-mono);
      font-weight: 800;
      color: #ffffff;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
      transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
      padding: 0;
      outline: none;
      flex-shrink: 0;
    }
    .has-domain-filter .domain-swatch-btn:not(.active) {
      opacity: 0.42;
      filter: grayscale(25%);
    }
    .domain-swatch-btn:hover {
      transform: scale(1.32);
      z-index: 10;
      opacity: 1 !important;
      filter: none !important;
      border-color: #ffffff !important;
      box-shadow: 0 0 12px var(--swatch-color, #38bdf8), 0 3px 8px rgba(0, 0, 0, 0.7);
    }
    .domain-swatch-btn.active {
      transform: scale(1.22);
      border: 2.5px solid #ffffff !important;
      box-shadow: 0 0 14px var(--swatch-color, #38bdf8), 0 0 4px #ffffff;
      opacity: 1 !important;
      filter: none !important;
      z-index: 5;
    }

    .domain-all-btn {
      background: rgba(30, 41, 59, 0.85);
      border: 1px solid rgba(56, 189, 248, 0.4);
      color: #38bdf8;
      font-size: 0.68rem;
      font-weight: 700;
      padding: 3px 9px;
      border-radius: 12px;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s ease;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      flex-shrink: 0;
    }
    .domain-all-btn:hover {
      background: rgba(56, 189, 248, 0.18);
      border-color: #38bdf8;
      color: #ffffff;
    }
    .domain-all-btn.active {
      background: #38bdf8;
      border-color: #38bdf8;
      color: #070a0f;
      font-weight: 800;
      box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
    }

    .active-domain-readout {
      font-size: 0.68rem;
      font-weight: 600;
      color: #94a3b8;
      background: rgba(15, 23, 42, 0.75);
      border: 1px solid rgba(255, 255, 255, 0.12);
      padding: 3px 10px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
      max-width: 250px;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: all 0.2s ease;
      flex-shrink: 0;
    }

    .chip-btn {
      background: #1e293b;
      border: 1px solid var(--border-subtle);
      color: var(--text-sub);
      font-size: 0.68rem;
      font-weight: 600;
      padding: 4px 9px;
      border-radius: 14px;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s ease;
    }
    .chip-btn:hover { color: white; background: #334155; }
    .chip-btn.active { background: #38bdf8; color: #070a0f; border-color: #38bdf8; font-weight: 700; }

    .tbox-search {
      background: #090e17;
      border: 1px solid var(--border-subtle);
      color: var(--text-main);
      font-size: 0.72rem;
      padding: 5px 10px;
      border-radius: 6px;
      width: 170px;
      outline: none;
    }
    .tbox-search:focus { border-color: #38bdf8; }

    .tbox-tool-btn {
      background: #1e293b;
      border: 1px solid var(--border-subtle);
      color: var(--text-main);
      font-size: 0.68rem;
      font-weight: 600;
      padding: 5px 8px;
      border-radius: 6px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .tbox-tool-btn:hover { background: #334155; }
    .tbox-tool-btn:disabled {
      opacity: 0.35;
      cursor: not-allowed;
      pointer-events: none;
      filter: grayscale(0.8);
      border-color: #334155 !important;
      color: #64748b !important;
    }

    /* Teaching Workbench Card */
    .teaching-box {
      background: rgba(245, 158, 11, 0.08);
      border: 1px solid rgba(245, 158, 11, 0.25);
      border-radius: 6px;
      padding: 10px;
      font-size: 0.7rem;
      color: #fbbf24;
      line-height: 1.45;
    }

    .rel-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: #090e17;
      border: 1px solid var(--border-subtle);
      color: #38bdf8;
      font-family: var(--font-mono);
      font-size: 0.65rem;
      padding: 3px 6px;
      border-radius: 4px;
      margin: 2px 0;
      cursor: pointer;
    }
    .rel-chip:hover { border-color: #38bdf8; background: #131c2e; }

    /* Compact Inline Flow Pills for T-Box Node Drawer */
    .drawer-rel-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 2px 7px;
      border-radius: 4px;
      font-size: 0.64rem;
      font-family: var(--font-mono);
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.12);
      color: #e2e8f0;
      cursor: pointer;
      transition: all 0.15s ease;
      line-height: 1.3;
      white-space: nowrap;
    }
    .drawer-rel-pill:hover {
      background: rgba(56, 189, 248, 0.15);
      border-color: #38bdf8;
      color: #ffffff;
      transform: translateY(-1px);
      box-shadow: 0 2px 6px rgba(56, 189, 248, 0.25);
    }
    .drawer-rel-pill .rel-pred {
      color: #38bdf8;
      font-size: 0.58rem;
      font-weight: 700;
      background: rgba(56, 189, 248, 0.1);
      padding: 1px 4px;
      border-radius: 3px;
      transition: all 0.12s ease;
    }
    .drawer-rel-pill .rel-pred:hover {
      background: #0284c7;
      color: #ffffff;
    }
    .drawer-rel-pill .pill-dot {
      width: 5px;
      height: 5px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    /* Horizon Meter Bars */
    .horizon-bar-wrap {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 8px;
    }
    .horizon-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 0.72rem;
    }
    .horizon-track {
      height: 7px;
      background: #1e293b;
      border-radius: 4px;
      overflow: hidden;
      margin-top: 3px;
    }
    .horizon-fill { height: 100%; border-radius: 4px; }

    /* =========================================================================
       SCREEN 3: 2D ART Planning Board MATRIX
    ========================================================================= */
    #screen-3 {
      flex-direction: column;
      background: #090e17;
      overflow: hidden;
    }

    .program-board-toolbar {
      padding: 10px 16px;
      background: rgba(15, 23, 42, 0.85);
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
      z-index: 20;
    }

    .matrix-scroll-wrap {
      flex: 1;
      overflow: auto;
      position: relative;
    }

    #dependency-svg-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 50;
      overflow: visible;
    }

    .matrix-table {
      border-collapse: collapse;
      width: 100%;
      min-width: 1100px;
    }

    .matrix-th {
      background: #0b1120;
      border: 1px solid rgba(51, 65, 85, 0.5);
      border-bottom: 2px solid #38bdf8;
      padding: 10px 12px;
      font-size: 0.74rem;
      font-weight: 700;
      color: #f8fafc;
      text-align: center;
      position: sticky;
      top: 0;
      z-index: 15;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }

    .matrix-th.ip-sprint {
      background: linear-gradient(180deg, rgba(245, 158, 11, 0.16) 0%, #0b1120 100%);
      color: #f59e0b;
      border-left: 2px dashed rgba(245, 158, 11, 0.6);
      border-bottom: 2px solid #f59e0b;
    }

    .matrix-row-header {
      background: #090e1a;
      border: 1px solid rgba(51, 65, 85, 0.5);
      border-right: 2px solid rgba(56, 189, 248, 0.4);
      padding: 14px 12px;
      position: sticky;
      left: 0;
      z-index: 12;
      box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }

    .matrix-cell {
      border: 1px solid rgba(51, 65, 85, 0.35);
      background: rgba(15, 23, 42, 0.45);
      min-width: 150px;
      height: 125px;
      vertical-align: top;
      padding: 8px;
      position: relative;
      transition: background 0.15s ease;
    }
    .matrix-cell:hover {
      background: rgba(30, 41, 59, 0.4);
    }
    .matrix-cell.ip-cell {
      border-left: 2px dashed rgba(245, 158, 11, 0.45);
      background: rgba(245, 158, 11, 0.03);
    }

    .pb-card {
      background: var(--bg-card);
      border: 1px solid rgba(51, 65, 85, 0.6);
      border-left: 3px solid #38bdf8;
      border-radius: 6px;
      padding: 8px;
      font-size: 0.68rem;
      cursor: pointer;
      transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease, border-color 0.18s ease;
      box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
      position: relative;
      z-index: 5;
    }
    .pb-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 18px rgba(0, 0, 0, 0.65);
      border-color: #38bdf8;
    }
    .pb-card.dep-highlighted {
      box-shadow: 0 0 16px rgba(244, 63, 94, 0.8), 0 4px 14px rgba(0, 0, 0, 0.6) !important;
      border-color: #f43f5e !important;
      transform: translateY(-3px) scale(1.02);
      z-index: 45;
    }

    .pb-card.has-risk { border-left-color: #f43f5e; }
    .pb-card.enabler-card { border-left-color: #c084fc; background: #16182c; }

    /* Red String Yarn Aesthetics */
    .dependency-group {
      pointer-events: all;
      cursor: pointer;
      transition: opacity 0.2s ease;
    }
    .dependency-group:hover .string-glow-layer {
      stroke-opacity: 0.55;
      stroke-width: 9px;
    }
    .dependency-group:hover .string-core-layer {
      stroke-width: 3.2px;
      filter: drop-shadow(0 0 6px rgba(244, 63, 94, 0.85));
    }
    .dependency-group:hover .dependency-tag rect {
      fill: #1e293b;
      stroke-width: 1.8px;
    }
    .string-core-layer {
      transition: stroke-width 0.18s ease;
      animation: stringFlow 25s linear infinite;
    }
    @keyframes stringFlow {
      from { stroke-dashoffset: 240; }
      to { stroke-dashoffset: 0; }
    }

    .pb-card-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 4px;
    }

    .pb-id { font-family: var(--font-mono); font-size: 0.62rem; color: #38bdf8; font-weight: 600; }
    .pb-wsjf { font-family: var(--font-mono); font-size: 0.6rem; color: #10b981; font-weight: 700; background: rgba(16,185,129,0.1); padding: 1px 4px; border-radius: 3px; }
    .pb-title { font-weight: 600; color: #f8fafc; line-height: 1.25; }

    /* =========================================================================
       METAMODEL TOPOLOGY: TABLE VIEW
    ========================================================================= */
    #tbox-table-view {
      flex: 1;
      position: relative;
      height: 100%;
      background: radial-gradient(circle at 50% 30%, #0d1527 0%, #06090e 100%);
      flex-direction: column;
      overflow: hidden;
      min-width: 0;
    }

    .tbox-table-subbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 14px;
      background: rgba(15, 23, 42, 0.95);
      border-bottom: 1px solid var(--border-subtle);
      flex-shrink: 0;
      gap: 12px;
      flex-wrap: wrap;
    }

    .tbox-table-tabs {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .tbox-subtab {
      background: #111827;
      border: 1px solid var(--border-subtle);
      color: var(--text-sub);
      font-size: 0.68rem;
      font-weight: 600;
      padding: 4px 10px;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .tbox-subtab:hover {
      background: #1e293b;
      color: #ffffff;
      border-color: #38bdf8;
    }

    .tbox-subtab.active {
      background: rgba(56, 189, 248, 0.15);
      color: #38bdf8;
      border-color: #38bdf8;
      font-weight: 700;
    }

    .tbox-table-actions {
      display: flex;
      align-items: center;
      gap: 10px;
    }

        .tbox-table-body-wrap {
      flex: 1;
      display: flex;
      position: relative;
      min-height: 0;
      overflow: hidden;
    }

    .tbox-alphabet-strip {
      width: 26px;
      background: rgba(10, 16, 30, 0.96);
      border-right: 1px solid rgba(255, 255, 255, 0.08);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-evenly;
      padding: 4px 0;
      user-select: none;
      z-index: 15;
      flex-shrink: 0;
      box-shadow: 2px 0 10px rgba(0, 0, 0, 0.4);
    }

    .tbox-alpha-btn {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      font-size: 0.60rem;
      font-weight: 700;
      color: #64748b;
      background: transparent;
      border: none;
      outline: none;
      cursor: pointer;
      padding: 1px 0;
      width: 100%;
      text-align: center;
      transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
      line-height: 1.1;
      border-radius: 2px;
    }

    .tbox-alpha-btn.has-items {
      color: #94a3b8;
    }

    .tbox-alpha-btn.has-items:hover {
      color: #38bdf8;
      background: rgba(56, 189, 248, 0.15);
      transform: scale(1.3);
      text-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
      z-index: 2;
    }

    .tbox-alpha-btn.active {
      color: #38bdf8;
      font-weight: 900;
      background: rgba(56, 189, 248, 0.2);
      box-shadow: inset 0 0 4px rgba(56, 189, 248, 0.4);
    }

    .tbox-alpha-btn.disabled {
      opacity: 0.15;
      color: #475569;
      cursor: default;
      pointer-events: none;
    }

    @keyframes rowAlphabetFlash {
      0% {
        background-color: rgba(56, 189, 248, 0.35);
        box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.6);
      }
      100% {
        background-color: transparent;
        box-shadow: none;
      }
    }
    .row-alphabet-highlight {
      animation: rowAlphabetFlash 1.6s ease-out;
    }

    .tbox-table-scroll-container {
      flex: 1;
      overflow: auto;
      min-height: 0;
      padding: 0;
      scrollbar-width: thin;
      scrollbar-color: #334155 #0b1120;
    }

    .tbox-data-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      font-size: 0.72rem;
      text-align: left;
    }

    .tbox-data-table thead th {
      background: #0b1220;
      color: #94a3b8;
      font-weight: 700;
      font-size: 0.65rem;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      padding: 9px 12px;
      border-bottom: 2px solid #1e293b;
      position: sticky;
      top: 0;
      z-index: 10;
      white-space: nowrap;
      user-select: none;
      cursor: pointer;
    }

    .tbox-data-table thead th:hover {
      color: #38bdf8;
      background: #0f192e;
    }

    .tbox-data-table thead th .sort-icon {
      font-size: 0.6rem;
      margin-left: 4px;
      opacity: 0.6;
    }

    .tbox-data-table tbody tr {
      border-bottom: 1px solid rgba(255, 255, 255, 0.04);
      cursor: pointer;
      transition: background 0.15s ease, border-left-color 0.15s ease;
    }

    .tbox-data-table tbody tr:hover {
      background: rgba(56, 189, 248, 0.08);
    }

    .tbox-data-table tbody tr.selected-row {
      background: rgba(56, 189, 248, 0.18) !important;
      border-left: 3px solid #38bdf8;
    }

    .tbox-data-table tbody td {
      padding: 8px 12px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.04);
      vertical-align: top;
      line-height: 1.4;
      color: #cbd5e1;
    }

    .tbl-class-name {
      font-family: var(--font-mono);
      font-weight: 700;
      color: #38bdf8;
      font-size: 0.74rem;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .tbl-tier-badge {
      display: inline-block;
      padding: 1px 7px;
      border-radius: 4px;
      font-size: 0.6rem;
      font-weight: 700;
      letter-spacing: 0.02em;
      white-space: nowrap;
    }

    .tbl-domain-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 1px 6px;
      border-radius: 4px;
      font-size: 0.62rem;
      font-weight: 600;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      white-space: nowrap;
    }

    .tbl-domain-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      display: inline-block;
    }

    .tbl-rel-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 6px;
      margin: 2px 4px 2px 0;
      border-radius: 4px;
      font-size: 0.62rem;
      font-family: var(--font-mono);
      background: #090e17;
      border: 1px solid rgba(56, 189, 248, 0.25);
      color: #7dd3fc;
      cursor: pointer;
      transition: all 0.15s ease;
      white-space: nowrap;
    }

    .tbl-rel-chip:hover {
      background: #0284c7;
      color: #ffffff;
      border-color: #38bdf8;
      transform: scale(1.02);
    }

    .tbl-target-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 2px 7px;
      margin: 1px 3px 1px 0;
      border-radius: 4px;
      font-size: 0.64rem;
      font-family: var(--font-mono);
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.12);
      color: #e2e8f0;
      cursor: pointer;
      transition: all 0.15s ease;
      white-space: nowrap;
    }

    .tbl-target-pill:hover {
      background: rgba(56, 189, 248, 0.18);
      border-color: #38bdf8;
      color: #38bdf8;
      transform: translateY(-1px);
      box-shadow: 0 2px 6px rgba(56, 189, 248, 0.25);
    }

    .tbl-target-pill-more {
      display: inline-flex;
      align-items: center;
      padding: 2px 6px;
      margin: 1px 2px;
      border-radius: 4px;
      font-size: 0.62rem;
      font-family: var(--font-mono);
      background: rgba(56, 189, 248, 0.08);
      border: 1px solid rgba(56, 189, 248, 0.25);
      color: #38bdf8;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.15s ease;
    }

    .tbl-target-pill-more:hover {
      background: #0284c7;
      color: #ffffff;
      border-color: #38bdf8;
    }

    .tbl-target-pill-more.expanded {
      background: rgba(244, 63, 94, 0.08);
      border-color: rgba(244, 63, 94, 0.25);
      color: #fb7185;
    }

    .tbl-target-pill-more.expanded:hover {
      background: #e11d48;
      color: #ffffff;
      border-color: #fb7185;
    }

    .tbl-prop-chip {
      display: inline-block;
      padding: 2px 6px;
      border-radius: 4px;
      font-size: 0.62rem;
      font-family: var(--font-mono);
      background: rgba(16, 185, 129, 0.1);
      border: 1px solid rgba(16, 185, 129, 0.25);
      color: #34d399;
      font-weight: 600;
      white-space: nowrap;
    }

    .tbl-principle {
      font-size: 0.64rem;
      font-family: var(--font-mono);
      color: #a7f3d0;
      font-weight: 600;
    }

    /* =========================================================================
       SCREEN 4: TEAM EXECUTION KANBAN
    ========================================================================= */
    #screen-4 {
      flex-direction: column;
      background: #090e17;
      overflow: hidden;
    }

    .kanban-toolbar {
      padding: 10px 16px;
      background: rgba(15, 23, 42, 0.85);
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .kanban-cols-wrap {
      flex: 1;
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 12px;
      padding: 16px;
      overflow-x: auto;
    }

    .kanban-col {
      background: rgba(15, 23, 42, 0.6);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .kanban-col-head {
      padding: 10px 12px;
      background: rgba(15, 23, 42, 0.95);
      border-bottom: 2px solid #334155;
      font-size: 0.75rem;
      font-weight: 700;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .kanban-card-list {
      flex: 1;
      padding: 10px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .story-card {
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-left: 3px solid #22c55e;
      border-radius: 6px;
      padding: 10px;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .story-card:hover { border-color: #6366f1; transform: translateY(-1px); }

    .capex-strip {
      background: rgba(16, 185, 129, 0.08);
      border-top: 1px solid rgba(16, 185, 129, 0.25);
      padding: 8px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 0.75rem;
    }

    /* =========================================================================
       SCREEN 5: 4-QUADRANT CONTROL ROOM
    ========================================================================= */
    #screen-5 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-template-rows: 1fr 1fr;
      gap: 12px;
      padding: 16px;
      background: #070a0f;
    }

    .quadrant-box {
      background: var(--bg-panel);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      padding: 14px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .quad-title {
      font-size: 0.78rem;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    /* Flow Metrics 6-Grid */
    .flow-metrics-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      flex: 1;
    }

    .metric-tile {
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: 6px;
      padding: 10px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .m-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
    .m-val { font-family: var(--font-mono); font-size: 1.2rem; font-weight: 800; color: var(--text-main); margin: 4px 0; }
    .m-sub { font-size: 0.62rem; color: var(--text-sub); }

    .roam-risk-card {
      background: #151e30;
      border-radius: 6px;
      padding: 10px;
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      position: relative;
      border: 1px solid rgba(255, 255, 255, 0.06);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }
    .roam-risk-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
      border-color: rgba(56, 189, 248, 0.5) !important;
      background: #1a253c !important;
    }
    .roam-risk-card:active {
      transform: translateY(0);
    }

    /* =========================================================================
       PERSISTENT SLIDE-OUT INSPECTOR DRAWER
    ========================================================================= */
    #inspector-drawer {
      position: fixed;
      top: calc(var(--header-height) + var(--ribbon-height));
      right: -460px;
      width: 420px;
      max-width: calc(100vw - 32px);
      height: calc(100vh - var(--header-height) - var(--ribbon-height));
      background: rgba(15, 23, 42, 0.98);
      backdrop-filter: blur(16px);
      border-left: 1px solid var(--border-subtle);
      box-shadow: -8px 0 32px rgba(0, 0, 0, 0.6);
      transition: right 0.28s cubic-bezier(0.16, 1, 0.3, 1);
      z-index: 2500;
      display: flex;
      flex-direction: column;
    }

    #inspector-drawer.open { right: 0; }

    .drawer-head {
      padding: 14px 16px;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .drawer-body {
      flex: 1;
      overflow-y: auto;
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .close-btn {
      background: transparent;
      border: 1px solid var(--border-subtle);
      color: var(--text-sub);
      width: 26px;
      height: 26px;
      border-radius: 4px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .close-btn:hover { background: #1e293b; color: white; }

    .prop-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.72rem;
    }
    .prop-table td {
      padding: 5px 8px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }
    .prop-k { color: var(--text-muted); width: 40%; font-family: var(--font-mono); }
    .prop-v { color: var(--text-main); font-weight: 500; word-break: break-all; }

    .cypher-box {
      background: #090e17;
      border: 1px solid var(--border-subtle);
      border-radius: 6px;
      padding: 10px;
      font-family: var(--font-mono);
      font-size: 0.65rem;
      color: #38bdf8;
      overflow-x: auto;
      white-space: pre-wrap;
    }

    /* Modal dialogs */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.75);
      backdrop-filter: blur(8px);
      z-index: 3000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    .modal-overlay.open { display: flex; }

    .modal-card {
      background: #0f172a;
      border: 1px solid var(--border-subtle);
      border-radius: 10px;
      width: 900px;
      max-width: 95vw;
      max-height: 85vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
      overflow: hidden;
    }

    .modal-head {
      padding: 14px 18px;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .modal-body {
      padding: 18px;
      overflow-y: auto;
      flex: 1;
    }

    /* =========================================================================
       SCREEN 6: DUALITY SPLIT-SCREEN STYLES
    ========================================================================= */
    .tab-btn.tab-duality.active {
      color: #c084fc;
      background: rgba(192, 132, 252, 0.12);
      border-bottom: 2px solid #c084fc;
    }

    .duality-container {
      display: flex;
      flex-direction: column;
      height: 100%;
      background: #070a0f;
      overflow: hidden;
    }

    .duality-topbar {
      height: 44px;
      min-height: 44px;
      background: #0d1527;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 16px;
      gap: 12px;
      z-index: 10;
    }

    .duality-ribbon {
      display: flex;
      align-items: center;
      gap: 8px;
      background: #080d1a;
      border: 1px solid #1e293b;
      padding: 4px 14px;
      border-radius: 20px;
      font-size: 0.68rem;
      max-width: 60%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .duality-split-viewport {
      flex: 1;
      display: flex;
      min-height: 0;
      position: relative;
    }

    .duality-pane {
      flex: 1;
      display: flex;
      flex-direction: column;
      position: relative;
      background: #080d1a;
      min-width: 0;
    }

    .duality-pane-header {
      height: 34px;
      min-height: 34px;
      background: #0e172a;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 14px;
      font-size: 0.7rem;
    }

    .duality-canvas-wrap {
      flex: 1;
      position: relative;
      background: radial-gradient(circle at 50% 50%, rgba(30, 41, 59, 0.25) 0%, transparent 80%), #070a0f;
    }

    .duality-divider {
      width: 24px;
      min-width: 24px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background: #090e17;
      border-left: 1px solid var(--border-subtle);
      border-right: 1px solid var(--border-subtle);
      z-index: 20;
    }

    .divider-line {
      flex: 1;
      width: 1px;
      background: rgba(255, 255, 255, 0.08);
    }

    .divider-badge {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: #1e293b;
      border: 1px solid #38bdf8;
      color: #38bdf8;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.65rem;
      font-weight: 700;
      box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
      margin: 8px 0;
      animation: pulseBridge 2.5s infinite ease-in-out;
    }

    @keyframes pulseBridge {
      0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(56, 189, 248, 0.3); }
      50% { transform: scale(1.15); box-shadow: 0 0 18px rgba(168, 85, 247, 0.8); border-color: #a855f7; color: #a855f7; }
    }

    .duality-bottom-drawer {
      height: 180px;
      min-height: 180px;
      background: #090e19;
      border-top: 1px solid var(--border-subtle);
      display: flex;
      flex-direction: column;
      padding: 8px 14px;
      z-index: 15;
    }

    .duality-drawer-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 6px;
    }

    .duality-drawer-grid {
      display: grid;
      grid-template-columns: 1fr 1fr 1.3fr;
      gap: 10px;
      flex: 1;
      min-height: 0;
    }

    .duality-drawer-card {
      background: #111a2e;
      border: 1px solid var(--border-subtle);
      border-radius: 6px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .d-card-head {
      font-size: 0.68rem;
      font-weight: 700;
      padding: 4px 10px;
      background: #0c1322;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .d-card-body {
      padding: 8px 10px;
      font-size: 0.68rem;
      line-height: 1.45;
      overflow-y: auto;
      flex: 1;
      color: #cbd5e1;
    }

    /* =========================================================================
       GUIDED TOURS HUD & LAUNCHER STYLES
    ========================================================================= */
    .tour-btn {
      background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.28));
      border: 1px solid #f59e0b;
      color: #fbbf24;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .tour-btn:hover {
      background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.45));
      box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
      transform: translateY(-1px);
    }

    .tour-card {
      background: #111a2e;
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      padding: 14px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 8px;
      transition: all 0.25s ease;
      position: relative;
      overflow: hidden;
    }
    .tour-card:hover {
      background: #17233d;
      border-color: #f59e0b;
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(245, 158, 11, 0.2);
    }
    .tour-card-badge {
      font-size: 0.6rem;
      font-weight: 700;
      letter-spacing: 0.05em;
      padding: 2px 6px;
      border-radius: 4px;
      align-self: flex-start;
    }
    .tour-card-title {
      font-size: 0.85rem;
      font-weight: 700;
      color: #f8fafc;
    }
    .tour-card-desc {
      font-size: 0.68rem;
      color: var(--text-sub);
      line-height: 1.45;
      flex: 1;
    }
    .tour-card-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      padding-top: 8px;
      font-size: 0.65rem;
      color: var(--text-muted);
    }
    .tour-card-btn {
      background: #f59e0b;
      color: #0b0f19;
      border: none;
      padding: 4px 10px;
      border-radius: 4px;
      font-weight: 700;
      font-size: 0.65rem;
      cursor: pointer;
    }

    #tour-hud {
      position: fixed;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%);
      width: 740px;
      max-width: 94vw;
      background: rgba(12, 18, 30, 0.96);
      backdrop-filter: blur(16px);
      border: 1px solid #f59e0b;
      box-shadow: 0 12px 40px rgba(0,0,0,0.8), 0 0 24px rgba(245, 158, 11, 0.25);
      border-radius: 12px;
      z-index: 9999;
      display: none;
      flex-direction: column;
      overflow: hidden;
      animation: slideUpHUD 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes slideUpHUD {
      from { transform: translate(-50%, 30px); opacity: 0; }
      to { transform: translate(-50%, 0); opacity: 1; }
    }

    .tour-progress-track {
      height: 4px;
      background: rgba(245, 158, 11, 0.2);
      width: 100%;
    }
    .tour-progress-bar {
      height: 100%;
      background: linear-gradient(90deg, #f59e0b, #fbbf24);
      width: 20%;
      transition: width 0.35s ease;
    }
    .tour-hud-content {
      padding: 12px 16px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .tour-hud-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      padding-bottom: 6px;
    }
    .tour-hud-tier-badge {
      font-size: 0.6rem;
      font-weight: 700;
      color: #10b981;
      background: rgba(16, 185, 129, 0.15);
      padding: 2px 6px;
      border-radius: 4px;
      font-family: var(--font-mono);
    }
    .tour-hud-close {
      background: transparent;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      font-size: 0.85rem;
      padding: 2px 6px;
      border-radius: 4px;
    }
    .tour-hud-close:hover {
      background: rgba(255, 255, 255, 0.1);
      color: white;
    }
    .tour-callout {
      background: #090e17;
      border-radius: 6px;
      padding: 6px 10px;
      display: flex;
      flex-direction: column;
      gap: 2px;
      border: 1px solid var(--border-subtle);
    }
    .callout-label {
      font-size: 0.6rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }
    .callout-text {
      font-size: 0.66rem;
      color: #cbd5e1;
      line-height: 1.35;
    }
    .tour-hud-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-top: 6px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
    .tour-hud-btn {
      background: #1e293b;
      border: 1px solid #334155;
      color: #f8fafc;
      font-size: 0.7rem;
      font-weight: 600;
      padding: 5px 12px;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .tour-hud-btn:hover {
      background: #334155;
      color: white;
    }
    .tour-hud-btn.primary {
      background: #f59e0b;
      border-color: #f59e0b;
      color: #0b0f19;
      font-weight: 700;
    }
    .tour-hud-btn.primary:hover {
      background: #fbbf24;
    }
    .tour-hud-exit-btn {
      background: transparent;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      text-decoration: underline;
      font-size: 0.62rem;
    }
    /* =========================================================================
       GRAPH WALKER HUD (OPTION B: MICRO SEMANTIC STEPPER)
       /* =========================================================================
       GRAPH WALKER HUD: SLEEK TURN-BY-TURN DOCKED BAR
    ========================================================================= */
    #graph-walker-hud.walker-docked-bar {
      position: fixed;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%);
      width: 900px;
      max-width: 96vw;
      background: rgba(11, 19, 36, 0.94);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      border: 1px solid rgba(56, 189, 248, 0.45);
      box-shadow: 0 20px 50px rgba(0,0,0,0.85), 0 0 25px rgba(56, 189, 248, 0.2);
      border-radius: 16px;
      z-index: 9999;
      display: none;
      flex-direction: column;
      overflow: hidden;
      animation: slideUpWalkerHUD 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes slideUpWalkerHUD {
      from { transform: translate(-50%, 25px); opacity: 0; }
      to { transform: translate(-50%, 0); opacity: 1; }
    }

    .walker-compact-header {
      padding: 10px 18px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      background: linear-gradient(180deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.6));
      gap: 12px;
      flex-wrap: wrap;
    }

    .walker-title-wrap {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .walker-badge-icon {
      font-size: 1.25rem;
      filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
    }

    .walker-label-title {
      font-size: 0.72rem;
      font-weight: 800;
      color: #94a3b8;
      letter-spacing: 0.5px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .walker-step-count {
      background: rgba(56, 189, 248, 0.15);
      border: 1px solid rgba(56, 189, 248, 0.4);
      color: #38bdf8;
      padding: 1px 6px;
      border-radius: 4px;
      font-size: 0.62rem;
      font-family: var(--font-mono);
      font-weight: 700;
    }

    .walker-focal-summary {
      font-size: 0.86rem;
      color: #f8fafc;
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 1px;
    }

    .walker-close-btn {
      background: rgba(239, 68, 68, 0.18) !important;
      border: 1px solid rgba(239, 68, 68, 0.45) !important;
      color: #f87171 !important;
      font-weight: 700 !important;
      font-size: 0.7rem !important;
      padding: 4px 10px !important;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .walker-close-btn:hover {
      background: rgba(239, 68, 68, 0.3) !important;
      border-color: #ef4444 !important;
      color: #ffffff !important;
    }

    .walker-trail-track {
      background: rgba(15, 23, 42, 0.85);
      padding: 6px 16px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      display: flex;
      align-items: center;
      gap: 6px;
      overflow-x: auto;
      white-space: nowrap;
      scrollbar-width: thin;
      scrollbar-color: #38bdf8 transparent;
      min-height: 38px;
    }

    .walker-breadcrumb-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.7rem;
      cursor: pointer;
      user-select: none;
    }

    .walker-node-pill {
      background: #1e293b;
      border: 1px solid #334155;
      padding: 2px 8px;
      border-radius: 6px;
      font-weight: 700;
      color: #f8fafc;
      transition: all 0.2s ease;
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    .walker-node-pill:hover {
      border-color: #38bdf8;
      background: #0f172a;
      transform: translateY(-1px);
    }

    .walker-node-pill.active {
      border-color: #38bdf8;
      background: rgba(56, 189, 248, 0.18);
      color: #38bdf8;
      box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
    }

    .walker-rel-arrow {
      color: #94a3b8;
      font-size: 0.62rem;
      font-weight: 600;
      font-family: var(--font-mono);
      display: inline-flex;
      align-items: center;
      gap: 3px;
      background: rgba(255, 255, 255, 0.04);
      padding: 1px 5px;
      border-radius: 4px;
      border: 1px solid rgba(255, 255, 255, 0.06);
    }

    .walker-pathways-strip {
      padding: 10px 18px 14px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      max-height: 180px;
      overflow-y: auto;
    }

    .walker-pathways-shelf {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .walker-shelf-title {
      font-size: 0.65rem;
      font-weight: 700;
      letter-spacing: 0.4px;
      text-transform: uppercase;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .walker-count-pill {
      font-size: 0.58rem;
      color: #64748b;
      font-family: var(--font-mono);
    }

    .walker-chips-row {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .walker-chip-step-btn {
      background: rgba(15, 23, 42, 0.85);
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 8px;
      padding: 5px 11px;
      color: #f1f5f9;
      font-size: 0.72rem;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all 0.15s ease;
    }

    .walker-chip-step-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    }

    .walker-chip-step-btn.out:hover {
      border-color: #38bdf8;
      background: rgba(56, 189, 248, 0.12);
    }

    .walker-chip-step-btn.in:hover {
      border-color: #a855f7;
      background: rgba(168, 85, 247, 0.12);
    }

    /* Embedded mode support */
    body.embedded-mode header { height: 44px; min-height: 44px; padding: 0 10px; }
    body.embedded-mode #inspector-drawer { top: 44px; height: calc(100vh - 44px); }
    body.embedded-mode .title-area .subtitle { display: none; }
