@layer reset, tokens, base, layout, components, network, dialogs, utilities;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    margin: 0;
  }

  h1,
  h2,
  h3,
  p,
  ul,
  ol,
  figure,
  pre {
    margin: 0;
  }

  ul,
  ol {
    padding: 0;
    list-style: none;
  }

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

  button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
  }

  a {
    color: inherit;
  }

  img,
  svg {
    display: block;
    max-width: 100%;
  }

  svg {
    flex-shrink: 0;
  }
}

@layer tokens {
  :root {
    color-scheme: light dark;

    --font-sans: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;

    /* Светлая тема: чертёжная бумага × Dieter Rams × MSCHF */
    --bg: #f3f0e8;
    --surface: #fcfbf7;
    --surface-elevated: #ffffff;
    --surface-subtle: #eae6dc;
    --surface-hover: #f7f4ec;
    --ink: #141412;
    --ink-muted: #524f48;
    --border: #d5d0c3;
    --border-dash: #c2bba9;
    --border-strong: #171614;

    /* Вермилион (WCAG AA+) */
    --accent: #c72b12;
    --accent-vivid: #e63b1f;
    --accent-hover: #a6220d;
    --accent-ink: #ffffff;
    --accent-soft: #fdebe6;
    --accent-border: #f3bdb0;

    /* Стек / Подтверждено (изумрудный) */
    --stack-fg: #0b653f;
    --stack-bg: #e4f4ec;
    --stack-border: #a7d7be;

    /* Пробелы / Внимание (терракота) */
    --gap-fg: #9a3808;
    --gap-bg: #fdf1e8;
    --gap-border: #dfb08e;

    /* Сырые идеи */
    --idea-fg: #4a4740;
    --idea-bg: #ebe7dd;
    --idea-border: #d2ccbe;

    /* Стелс / Зашифровано (глубокий чернильный индиго-графит) */
    --stealth-fg: #3b2f63;
    --stealth-bg: #efecf8;
    --stealth-border: #c5bce3;

    /* Коллаборация (чистый чертёжный кобальт) */
    --collab-fg: #154b8a;
    --collab-bg: #e6f0fc;
    --collab-border: #adc9ec;

    /* Предупреждение / Демо / Гостевое превью (янтарь) */
    --amber-fg: #824400;
    --amber-bg: #fef3dc;
    --amber-border: #e5c07b;

    --grid-hairline: rgba(20, 20, 18, 0.045);
    --backdrop: rgba(18, 18, 16, 0.58);
    --shadow-hard: 3px 3px 0 var(--border-strong);
    --shadow-hard-sm: 2px 2px 0 var(--border-strong);
    --shadow-dialog: 0 24px 64px rgba(15, 15, 13, 0.3);

    --radius-xs: 3px;
    --radius-sm: 5px;
    --radius-md: 7px;
    --topbar-h: 48px;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* Отражение <meta name="color-scheme"> в CSS color-scheme (dark-mode-toggle) */
  :root:has(> head > meta[name='color-scheme'][content='dark']) {
    color-scheme: dark;
  }

  :root:has(> head > meta[name='color-scheme'][content='light']) {
    color-scheme: light;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) {
      --bg: #10100f;
      --surface: #171715;
      --surface-elevated: #1f1f1c;
      --surface-subtle: #252420;
      --surface-hover: #23221f;
      --ink: #f3f1ea;
      --ink-muted: #a6a297;
      --border: #2f2e29;
      --border-dash: #44423b;
      --border-strong: #ece9df;

      --accent: #ff6243;
      --accent-vivid: #ff6243;
      --accent-hover: #ff7a5e;
      --accent-ink: #111110;
      --accent-soft: #331913;
      --accent-border: #6b2e20;

      --stack-fg: #67dfa4;
      --stack-bg: #102a1e;
      --stack-border: #1e4f38;

      --gap-fg: #ffb178;
      --gap-bg: #2e1d12;
      --gap-border: #6b4125;

      --idea-fg: #c9c5ba;
      --idea-bg: #252420;
      --idea-border: #3d3b35;

      --stealth-fg: #c9bdf5;
      --stealth-bg: #221d33;
      --stealth-border: #493f6b;

      --collab-fg: #8bc1ff;
      --collab-bg: #13253b;
      --collab-border: #2a4d78;

      --amber-fg: #ffd07a;
      --amber-bg: #312510;
      --amber-border: #6e5120;

      --grid-hairline: rgba(243, 241, 234, 0.04);
      --backdrop: rgba(0, 0, 0, 0.76);
      --shadow-dialog: 0 24px 72px rgba(0, 0, 0, 0.72);
    }
  }

  :root[data-theme='dark'] {
    color-scheme: dark;
    --bg: #10100f;
    --surface: #171715;
    --surface-elevated: #1f1f1c;
    --surface-subtle: #252420;
    --surface-hover: #23221f;
    --ink: #f3f1ea;
    --ink-muted: #a6a297;
    --border: #2f2e29;
    --border-dash: #44423b;
    --border-strong: #ece9df;

    --accent: #ff6243;
    --accent-vivid: #ff6243;
    --accent-hover: #ff7a5e;
    --accent-ink: #111110;
    --accent-soft: #331913;
    --accent-border: #6b2e20;

    --stack-fg: #67dfa4;
    --stack-bg: #102a1e;
    --stack-border: #1e4f38;

    --gap-fg: #ffb178;
    --gap-bg: #2e1d12;
    --gap-border: #6b4125;

    --idea-fg: #c9c5ba;
    --idea-bg: #252420;
    --idea-border: #3d3b35;

    --stealth-fg: #c9bdf5;
    --stealth-bg: #221d33;
    --stealth-border: #493f6b;

    --collab-fg: #8bc1ff;
    --collab-bg: #13253b;
    --collab-border: #2a4d78;

    --amber-fg: #ffd07a;
    --amber-bg: #312510;
    --amber-border: #6e5120;

    --grid-hairline: rgba(243, 241, 234, 0.04);
    --backdrop: rgba(0, 0, 0, 0.76);
    --shadow-dialog: 0 24px 72px rgba(0, 0, 0, 0.72);
  }

  :root[data-theme='light'] {
    color-scheme: light;
  }

  @supports (color: light-dark(white, black)) {
    :root {
      --bg: light-dark(#f3f0e8, #10100f);
      --surface: light-dark(#fcfbf7, #171715);
      --surface-elevated: light-dark(#ffffff, #1f1f1c);
      --surface-subtle: light-dark(#eae6dc, #252420);
      --surface-hover: light-dark(#f7f4ec, #23221f);
      --ink: light-dark(#141412, #f3f1ea);
      --ink-muted: light-dark(#524f48, #a6a297);
      --border: light-dark(#d5d0c3, #2f2e29);
      --border-dash: light-dark(#c2bba9, #44423b);
      --border-strong: light-dark(#171614, #ece9df);

      --accent: light-dark(#c72b12, #ff6243);
      --accent-vivid: light-dark(#e63b1f, #ff6243);
      --accent-hover: light-dark(#a6220d, #ff7a5e);
      --accent-ink: light-dark(#ffffff, #111110);
      --accent-soft: light-dark(#fdebe6, #331913);
      --accent-border: light-dark(#f3bdb0, #6b2e20);

      --stack-fg: light-dark(#0b653f, #67dfa4);
      --stack-bg: light-dark(#e4f4ec, #102a1e);
      --stack-border: light-dark(#a7d7be, #1e4f38);

      --gap-fg: light-dark(#9a3808, #ffb178);
      --gap-bg: light-dark(#fdf1e8, #2e1d12);
      --gap-border: light-dark(#dfb08e, #6b4125);

      --idea-fg: light-dark(#4a4740, #c9c5ba);
      --idea-bg: light-dark(#ebe7dd, #252420);
      --idea-border: light-dark(#d2ccbe, #3d3b35);

      --stealth-fg: light-dark(#3b2f63, #c9bdf5);
      --stealth-bg: light-dark(#efecf8, #221d33);
      --stealth-border: light-dark(#c5bce3, #493f6b);

      --collab-fg: light-dark(#154b8a, #8bc1ff);
      --collab-bg: light-dark(#e6f0fc, #13253b);
      --collab-border: light-dark(#adc9ec, #2a4d78);

      --amber-fg: light-dark(#824400, #ffd07a);
      --amber-bg: light-dark(#fef3dc, #312510);
      --amber-border: light-dark(#e5c07b, #6e5120);

      --grid-hairline: light-dark(rgba(20, 20, 18, 0.045), rgba(243, 241, 234, 0.04));
      --backdrop: light-dark(rgba(18, 18, 16, 0.58), rgba(0, 0, 0, 0.76));
    }
  }
}

@layer base {
  html,
  body {
    height: 100dvh;
    width: 100%;
    overflow: hidden;
  }

  body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.42;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
      linear-gradient(to right, var(--grid-hairline) 1px, transparent 1px),
      linear-gradient(to bottom, var(--grid-hairline) 1px, transparent 1px);
    background-size: 32px 32px;
    text-rendering: optimizeLegibility;
  }

  h1,
  h2,
  h3 {
    letter-spacing: -0.02em;
    line-height: 1.18;
  }

  code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 0.06em 0.34em;
  }

  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  ::selection {
    background: var(--accent);
    color: var(--accent-ink);
  }
}

@layer layout {
  .lab-shell {
    display: grid;
    grid-template-rows: var(--topbar-h) minmax(0, 1fr);
    height: 100dvh;
    width: 100%;
    overflow: hidden;
  }

  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: var(--topbar-h);
    padding-inline: 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 20;
    min-width: 0;
  }

  .console-stage {
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    display: grid;
  }

  .lab-workspace {
    display: grid;
    grid-template-columns: clamp(304px, 23.8vw, 344px) minmax(0, 1fr);
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
  }

  .network-workspace {
    display: grid;
    grid-template-columns: clamp(316px, 25.5vw, 366px) minmax(0, 1fr);
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
  }

  .profile-rail,
  .network-rail {
    display: flex;
    flex-direction: column;
    gap: clamp(7px, 1.05vh, 11px);
    padding: clamp(9px, 1.25vh, 14px) 14px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .workbench,
  .network-workbench {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
  }

  .workbench-bar,
  .network-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 14px;
    background: color-mix(in srgb, var(--surface) 84%, var(--bg));
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }

  .subfilter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    padding: 6px 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }

  .workbench-body,
  .network-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: clamp(8px, 1.15vh, 13px) 14px;
    container-type: inline-size;
  }

  .workbench-content {
    min-height: 100%;
    display: flex;
    flex-direction: column;
  }

  .mobile-tabs {
    display: none;
  }
}

@layer components {
  .skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 120;
    background: var(--ink);
    color: var(--bg);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-220%);
    transition: transform 0.16s var(--ease-out);
  }

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

  /* ==================== TOP BAR & LAYER SWITCHER ==================== */
  .topbar-left,
  .topbar-actions,
  .owner-controls {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
  }

  .topbar-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 9px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition:
      border-color 0.14s ease,
      color 0.14s ease,
      background-color 0.14s ease,
      transform 0.12s var(--ease-out),
      box-shadow 0.12s var(--ease-out);
  }

  .topbar-back-link:hover {
    color: var(--ink);
    border-color: var(--border-strong);
    background: var(--surface-elevated);
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-hard-sm);
  }

  .layer-switcher {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
  }

  .layer-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px;
    border-radius: var(--radius-xs);
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.03em;
    color: var(--ink-muted);
    white-space: nowrap;
    transition: background-color 0.14s ease, color 0.14s ease;
  }

  .layer-btn:hover {
    color: var(--ink);
    background: var(--surface-subtle);
  }

  .layer-btn[aria-current='page'] {
    background: var(--ink);
    color: var(--bg);
  }

  .layer-btn[aria-current='page']::after {
    content: '';
    position: absolute;
    inset: auto 6px 2px;
    border-bottom: 2px solid var(--accent-vivid);
    border-radius: 1px;
  }

  .brand-mark {
    width: 11px;
    height: 11px;
    background: var(--accent-vivid);
    border: 1.5px solid currentColor;
    border-radius: 2px;
    flex-shrink: 0;
  }

  .layer-node-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--stack-fg);
    flex-shrink: 0;
  }

  .live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
    white-space: nowrap;
  }

  .live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-vivid);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-vivid) 22%, transparent);
    animation: lab-pulse 2.2s ease-in-out infinite;
    flex-shrink: 0;
  }

  @keyframes lab-pulse {
    0%,
    100% {
      opacity: 1;
      transform: scale(1);
    }
    50% {
      opacity: 0.45;
      transform: scale(0.8);
    }
  }

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

  /* Local Launcher Status Pill in Topbar */
  .launcher-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 9px;
    border: 1px solid var(--stack-border);
    border-radius: 999px;
    background: var(--stack-bg);
    color: var(--stack-fg);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.14s ease, background-color 0.14s ease, transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out);
  }

  .launcher-pill:hover {
    border-color: var(--stack-fg);
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 var(--stack-fg);
  }

  .launcher-pill.is-guest-locked {
    border-style: dashed;
    background: var(--bg);
    color: var(--stack-fg);
  }

  .launcher-pill.has-running {
    background: var(--stack-fg);
    border-color: var(--stack-fg);
    color: var(--surface-elevated);
  }

  .launcher-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--stack-fg);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--stack-fg) 22%, transparent);
    flex-shrink: 0;
  }

  .launcher-pill.has-running .launcher-dot {
    background: var(--surface-elevated);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface-elevated) 28%, transparent);
    animation: lab-pulse 2s ease-in-out infinite;
  }

  /* Hardware Buttons */
  .btn-primary,
  .btn-secondary,
  .btn-danger,
  .btn-danger-outline,
  .btn-auth,
  .btn-owner-unlocked,
  .btn-guest-preview,
  .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 31px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
    font-weight: 650;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out);
  }

  .btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
    border: 1px solid var(--accent);
  }

  .btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-hard-sm);
  }

  .btn-secondary,
  .theme-toggle {
    background: var(--surface-elevated);
    color: var(--ink);
    border: 1px solid var(--border);
  }

  .btn-secondary:hover,
  .theme-toggle:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-hard-sm);
  }

  .btn-auth {
    background: var(--stealth-bg);
    color: var(--stealth-fg);
    border: 1px solid var(--stealth-border);
  }

  .btn-auth:hover {
    border-color: var(--stealth-fg);
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 var(--stealth-fg);
  }

  .btn-owner-unlocked {
    background: var(--stack-bg);
    color: var(--stack-fg);
    border: 1px solid var(--stack-border);
  }

  .btn-owner-unlocked:hover {
    border-color: var(--stack-fg);
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 var(--stack-fg);
  }

  .btn-guest-preview {
    background: var(--surface-elevated);
    color: var(--ink);
    border: 1px dashed var(--border-dash);
  }

  .btn-guest-preview:hover {
    border-style: solid;
    border-color: var(--border-strong);
  }

  .btn-guest-preview[aria-pressed='true'] {
    background: var(--amber-bg);
    color: var(--amber-fg);
    border: 1px solid var(--amber-border);
  }

  .btn-danger {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-border);
  }

  .btn-danger:hover {
    border-color: var(--accent);
  }

  .unsaved-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 0.67rem;
    font-weight: 750;
  }

  /* Theme toggle icon without JS dependency */
  .theme-icon--sun {
    display: none;
  }

  .theme-icon--moon {
    display: block;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) .theme-icon--sun {
      display: block;
    }
    :root:not([data-theme='light']) .theme-icon--moon {
      display: none;
    }
  }

  :root[data-theme='dark'] .theme-icon--sun,
  :root:has(> head > meta[name='color-scheme'][content='dark']) .theme-icon--sun {
    display: block;
  }

  :root[data-theme='dark'] .theme-icon--moon,
  :root:has(> head > meta[name='color-scheme'][content='dark']) .theme-icon--moon {
    display: none;
  }

  :root[data-theme='light'] .theme-icon--sun,
  :root:has(> head > meta[name='color-scheme'][content='light']) .theme-icon--sun {
    display: none;
  }

  :root[data-theme='light'] .theme-icon--moon,
  :root:has(> head > meta[name='color-scheme'][content='light']) .theme-icon--moon {
    display: block;
  }

  /* Guest preview banner */
  .preview-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 14px;
    background: var(--amber-bg);
    border-bottom: 1px solid var(--amber-border);
    color: var(--amber-fg);
    font-size: 0.76rem;
    flex-shrink: 0;
  }

  /* ==================== LEFT RAIL: PERSONAL LAB #01 ==================== */
  .profile-head {
    display: flex;
    align-items: center;
    gap: 11px;
  }

  .avatar-frame {
    position: relative;
    width: clamp(62px, 7.8vh, 76px);
    height: clamp(62px, 7.8vh, 76px);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-strong);
    box-shadow: var(--shadow-hard-sm);
    overflow: hidden;
    background: var(--surface-subtle);
    flex-shrink: 0;
  }

  .avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 46% 45%;
  }

  .avatar-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink);
    background: var(--surface-subtle);
  }

  .profile-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
  }

  .profile-greeting {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
  }

  .profile-name {
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.08;
  }

  .role-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: var(--radius-xs);
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25;
  }

  /* Triple-Lock Strip */
  .triple-lock-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 5px 8px;
    background: var(--stack-bg);
    border: 1px solid var(--stack-border);
    border-radius: var(--radius-sm);
    color: var(--stack-fg);
    font-size: 0.7rem;
    font-weight: 700;
    text-align: left;
    transition: border-color 0.14s ease, transform 0.12s var(--ease-out);
  }

  .triple-lock-strip:hover {
    border-color: var(--stack-fg);
    transform: translateY(-1px);
  }

  .triple-lock-strip-left {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
  }

  .triple-lock-strip-meta {
    font-size: 0.65rem;
    opacity: 0.9;
    white-space: nowrap;
  }

  .profile-tagline {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink);
    padding: 5px 8px;
    background: var(--bg);
    border-left: 2.5px solid var(--accent-vivid);
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  }

  .profile-bio {
    font-size: 0.77rem;
    line-height: 1.4;
    color: var(--ink-muted);
  }

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

  .skill-chip {
    display: flex;
    align-items: center;
    padding: 3px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--bg);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .profile-links-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .profile-links {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 5px;
  }

  .profile-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-elevated);
    font-size: 0.73rem;
    font-weight: 650;
    text-decoration: none;
    min-width: 0;
    transition: border-color 0.14s ease, transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out);
  }

  .profile-link-btn:hover {
    border-color: var(--border-strong);
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-hard-sm);
  }

  .profile-link-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-link-arrow {
    color: var(--accent);
    flex-shrink: 0;
  }

  .profile-hire-btn {
    width: 100%;
    height: 30px;
  }

  .missing-links-slot {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 4px 8px;
    border: 1px dashed var(--gap-border);
    border-radius: var(--radius-sm);
    background: var(--gap-bg);
    color: var(--gap-fg);
    font-size: 0.7rem;
    font-weight: 600;
    text-align: left;
    transition: border-color 0.14s ease;
  }

  .missing-links-slot:hover {
    border-style: solid;
    border-color: var(--gap-fg);
  }

  .missing-links-tag {
    margin-left: auto;
    font-size: 0.63rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
  }

  .gap-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    flex-shrink: 0;
  }

  /* Радар пробелов */
  .gap-radar {
    margin-top: auto;
    padding: 8px 9px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .radar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .radar-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink);
  }

  .radar-hint {
    font-size: 0.66rem;
    color: var(--ink-muted);
  }

  .radar-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .radar-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 6px 8px;
    border: 1px dashed var(--gap-border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--ink);
    text-align: left;
    transition: border-color 0.14s ease, background-color 0.14s ease, transform 0.12s var(--ease-out);
  }

  .radar-row:hover {
    border-style: solid;
    border-color: var(--border-strong);
    background: var(--surface-elevated);
    transform: translateX(2px);
  }

  .radar-row[aria-pressed='true'] {
    border-style: solid;
    border-color: var(--accent);
    background: var(--accent-soft);
  }

  .radar-row.is-done {
    border-style: solid;
    border-color: var(--stack-border);
    background: var(--stack-bg);
  }

  .radar-row-left {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }

  .radar-row-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gap-fg);
    flex-shrink: 0;
  }

  .radar-row.is-done .radar-row-dot {
    background: var(--stack-fg);
  }

  .radar-row-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .radar-row-count {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: var(--radius-xs);
    background: var(--gap-bg);
    color: var(--gap-fg);
    border: 1px solid var(--gap-border);
    flex-shrink: 0;
  }

  .radar-row.is-done .radar-row-count {
    background: var(--surface);
    color: var(--stack-fg);
    border-color: var(--stack-border);
  }

  .radar-all-clear {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--stack-fg);
    padding: 5px 8px;
    border-radius: var(--radius-xs);
    background: var(--stack-bg);
    border: 1px solid var(--stack-border);
    text-align: center;
  }

  .rail-mobile-actions {
    display: none;
  }

  .rail-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 5px;
    border-top: 1px solid var(--border);
    font-size: 0.68rem;
    color: var(--ink-muted);
    flex-shrink: 0;
  }

  .rail-link {
    font-size: 0.72rem;
    font-weight: 650;
    color: var(--accent);
  }

  .rail-link:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  /* ==================== RIGHT WORKBENCH TOOLBAR ==================== */
  .mode-tabs {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }

  .mode-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 29px;
    padding: 0 9px;
    border-radius: var(--radius-xs);
    font-size: 0.76rem;
    font-weight: 650;
    color: var(--ink-muted);
    white-space: nowrap;
    transition: background-color 0.14s ease, color 0.14s ease;
  }

  .mode-tab:hover {
    color: var(--ink);
    background: var(--surface-subtle);
  }

  .mode-tab[aria-pressed='true'] {
    background: var(--ink);
    color: var(--bg);
  }

  .mode-tab[aria-pressed='true']::after {
    content: '';
    position: absolute;
    inset: auto 6px 2px;
    border-bottom: 2px solid var(--accent-vivid);
  }

  .mode-tab--gaps[aria-pressed='true'] {
    background: var(--accent);
    color: var(--accent-ink);
  }

  .mode-tab--gaps[aria-pressed='true']::after {
    border-bottom-color: var(--accent-ink);
  }

  .mode-tab--local {
    color: var(--stack-fg);
  }

  .mode-tab--local[aria-pressed='true'] {
    background: var(--stack-fg);
    color: var(--surface-elevated);
  }

  .mode-tab--local[aria-pressed='true']::after {
    border-bottom-color: var(--surface-elevated);
  }

  .launcher-tab-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
  }

  .tab-count {
    font-size: 0.7rem;
    opacity: 0.82;
  }

  .workbench-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .readiness-meter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    flex-shrink: 0;
  }

  .readiness-label {
    font-size: 0.71rem;
    font-weight: 600;
    color: var(--ink-muted);
  }

  .progress-track {
    width: 64px;
    height: 6px;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
  }

  .progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-vivid), var(--stack-fg));
    border-radius: 999px;
    transition: width 0.3s var(--ease-out);
  }

  .readiness-pct {
    font-size: 0.71rem;
    font-weight: 700;
    color: var(--ink);
    min-width: 3ch;
    text-align: right;
  }

  .active-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 29px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 650;
    white-space: nowrap;
  }

  .active-filter-pill:hover {
    border-color: var(--accent);
  }

  .search-box {
    position: relative;
    width: clamp(190px, 18vw, 250px);
  }

  .search-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-muted);
    pointer-events: none;
  }

  .search-input {
    width: 100%;
    height: 30px;
    padding: 0 26px 0 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-elevated);
    font-size: 0.78rem;
    color: var(--ink);
    transition: border-color 0.14s ease;
  }

  .search-input::placeholder {
    color: var(--ink-muted);
  }

  .search-input:focus {
    border-color: var(--border-strong);
  }

  .search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
  }

  .search-clear {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
    color: var(--ink-muted);
  }

  .search-clear:hover {
    color: var(--ink);
    background: var(--surface-subtle);
  }

  .subfilter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
  }

  .sub-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 25px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-muted);
    transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
  }

  .sub-pill:hover {
    color: var(--ink);
    border-color: var(--border-strong);
  }

  .sub-pill[aria-pressed='true'] {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
  }

  /* ==================== SPLIT-DECK VIEW («ЛАБОРАТОРИЯ») ==================== */
  .split-deck {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.15vh, 14px);
    flex: 1 1 auto;
  }

  .deck-section {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 0.75vh, 9px);
  }

  .deck-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .deck-header-left {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
  }

  .deck-title {
    font-size: 0.73rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink);
    white-space: nowrap;
  }

  .deck-count {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-xs);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink-muted);
  }

  .deck-caption {
    font-size: 0.72rem;
    color: var(--ink-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .deck-action {
    font-size: 0.72rem;
    font-weight: 650;
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
  }

  .deck-action:hover {
    background: var(--accent-soft);
  }

  /* Status Dots & Micro Badges */
  .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .status-dot--stack {
    background: var(--stack-fg);
  }

  .status-dot--momentum {
    background: var(--accent-vivid);
    animation: lab-pulse 2.2s ease-in-out infinite;
  }

  .status-dot--idea {
    background: var(--idea-fg);
  }

  .stealth-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 5px;
    border-radius: var(--radius-xs);
    background: var(--stealth-bg);
    border: 1px solid var(--stealth-border);
    color: var(--stealth-fg);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .collab-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 5px;
    border-radius: var(--radius-xs);
    background: var(--collab-bg);
    border: 1px solid var(--collab-border);
    color: var(--collab-fg);
    font-size: 0.62rem;
    font-weight: 750;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .lock-mini {
    font-size: 0.64rem;
    color: var(--stack-fg);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .visibility-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: var(--radius-xs);
    font-size: 0.68rem;
    font-weight: 750;
    border: 1px solid var(--stack-border);
    background: var(--stack-bg);
    color: var(--stack-fg);
  }

  .visibility-pill.is-stealth {
    border-color: var(--stealth-border);
    background: var(--stealth-bg);
    color: var(--stealth-fg);
  }

  .lifecycle-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--ink);
    font-size: 0.68rem;
    font-weight: 700;
  }

  /* Upper Deck: Stack Cards (scales to 5 columns on 1440px to keep 14 cards in 3 crisp rows) */
  .stack-deck-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(5px, 0.72vh, 8px);
  }

  @container (min-width: 460px) {
    .stack-deck-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @container (min-width: 760px) {
    .stack-deck-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  @container (min-width: 980px) {
    .stack-deck-grid {
      grid-template-columns: repeat(5, minmax(0, 1fr));
    }
  }

  .stack-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: clamp(6px, 0.78vh, 9px) 8px;
    min-height: clamp(78px, 9.4vh, 96px);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-top: 2.5px solid var(--stack-fg);
    border-radius: var(--radius-sm);
    text-align: left;
    transition: border-color 0.14s ease, box-shadow 0.14s var(--ease-out), transform 0.14s var(--ease-out);
  }

  .stack-tile.has-gap {
    border-style: dashed;
    border-color: var(--gap-border);
    border-top: 2.5px solid var(--stack-fg);
    background: linear-gradient(180deg, var(--surface-elevated) 68%, color-mix(in srgb, var(--gap-bg) 52%, var(--surface-elevated)));
  }

  .stack-tile.is-stealth-tile {
    border-top-color: var(--stealth-fg);
    background: linear-gradient(180deg, var(--surface-elevated) 60%, color-mix(in srgb, var(--stealth-bg) 44%, var(--surface-elevated)));
  }

  .stack-tile:hover {
    border-style: solid;
    border-color: var(--border-strong);
    border-top-color: var(--stack-fg);
    box-shadow: var(--shadow-hard-sm);
    transform: translate(-1.5px, -1.5px);
  }

  .stack-tile.is-stealth-tile:hover {
    border-top-color: var(--stealth-fg);
  }

  .tile-open-btn {
    display: block;
    width: 100%;
    text-align: left;
    color: inherit;
  }

  .tile-open-btn:focus-visible {
    outline: none;
  }

  .tile-open-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 0;
  }

  :is(.stack-tile, .momentum-tile, .idea-chip-tile):has(.tile-open-btn:focus-visible) {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  .stack-tile-sub {
    font-size: 0.61rem;
    color: var(--stealth-fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    min-width: 0;
  }

  .tile-top-right {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
  }

  .drop-number {
    font-size: 0.71rem;
    font-weight: 700;
    color: var(--ink-muted);
    letter-spacing: 0.04em;
    flex-shrink: 0;
  }

  .drop-number.is-priority,
  .idea-chip-num.is-priority {
    color: var(--accent);
  }

  .tile-cat {
    font-size: 0.64rem;
    font-weight: 600;
    color: var(--ink-muted);
    background: var(--surface-subtle);
    padding: 1px 5px;
    border-radius: var(--radius-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .stack-tile-title {
    font-size: 0.82rem;
    font-weight: 750;
    line-height: 1.2;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .stack-tile-bottom {
    margin-top: auto;
    padding-top: 4px;
    border-top: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    flex-wrap: wrap;
  }

  .pip-row {
    display: inline-flex;
    align-items: center;
    gap: 3px;
  }

  .pip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.63rem;
    font-weight: 650;
    padding: 1px 4px;
    border-radius: var(--radius-xs);
    border: 1px dashed var(--gap-border);
    color: var(--gap-fg);
    background: var(--gap-bg);
  }

  .pip-dot {
    width: 4.5px;
    height: 4.5px;
    border-radius: 50%;
    border: 1.2px solid currentColor;
  }

  .pip.is-filled {
    border-style: solid;
    border-color: var(--stack-border);
    color: var(--stack-fg);
    background: var(--stack-bg);
  }

  .pip.is-filled .pip-dot {
    background: currentColor;
  }

  .tile-gap-flag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--gap-fg);
    white-space: nowrap;
  }

  .tile-gap-flag.is-ready {
    color: var(--stack-fg);
  }

  /* Lower Deck: 3 Momentum Highlight Cards + 17 Raw Idea Tiles */
  .momentum-deck-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(6px, 0.8vh, 8px);
  }

  @container (min-width: 700px) {
    .momentum-deck-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  .momentum-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: clamp(6px, 0.82vh, 9px) 10px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent-vivid);
    border-radius: var(--radius-sm);
    text-align: left;
    transition: border-color 0.14s ease, box-shadow 0.14s var(--ease-out), transform 0.14s var(--ease-out);
  }

  .momentum-tile:hover {
    border-color: var(--border-strong);
    border-top-color: var(--accent-vivid);
    box-shadow: var(--shadow-hard-sm);
    transform: translate(-1.5px, -1.5px);
  }

  .momentum-badges {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
  }

  .momentum-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 6px;
    border-radius: var(--radius-xs);
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    font-size: 0.64rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .priority-pill {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: var(--radius-xs);
    background: var(--ink);
    color: var(--bg);
    font-size: 0.62rem;
    font-weight: 750;
    letter-spacing: 0.03em;
  }

  .momentum-title {
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--ink);
  }

  .momentum-summary {
    font-size: 0.72rem;
    line-height: 1.34;
    color: var(--ink-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .momentum-chips {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .mini-chip {
    font-size: 0.64rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: var(--radius-xs);
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    color: var(--ink);
  }

  /* Dense 17 Raw Idea Tiles Grid */
  .raw-ideas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(4px, 0.6vh, 7px);
  }

  @container (min-width: 360px) {
    .raw-ideas-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @container (min-width: 560px) {
    .raw-ideas-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  @container (min-width: 760px) {
    .raw-ideas-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  @container (min-width: 980px) {
    .raw-ideas-grid {
      grid-template-columns: repeat(5, minmax(0, 1fr));
    }
  }

  .idea-chip-tile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: clamp(37px, 4.4vh, 45px);
    padding: 4px 8px;
    background: var(--surface);
    border: 1px dashed var(--border-dash);
    border-radius: var(--radius-sm);
    text-align: left;
    transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.12s var(--ease-out), transform 0.12s var(--ease-out);
  }

  .idea-chip-tile.is-stealth-guest {
    background: color-mix(in srgb, var(--stealth-bg) 55%, var(--surface));
    border-color: var(--stealth-border);
  }

  .idea-chip-tile.is-stealth-owner {
    background: var(--surface-elevated);
    border-style: solid;
    border-color: var(--stealth-border);
    border-left: 2.5px solid var(--stealth-fg);
  }

  .idea-chip-tile.is-explored {
    border-style: solid;
    border-color: var(--stack-border);
    background: var(--surface-elevated);
  }

  .idea-chip-tile:hover {
    border-style: solid;
    border-color: var(--border-strong);
    background: var(--surface-elevated);
    box-shadow: var(--shadow-hard-sm);
    transform: translate(-1px, -1px);
  }

  .idea-chip-main {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    min-width: 0;
    flex: 1 1 auto;
    width: auto;
  }

  .idea-chip-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
  }

  .idea-chip-num {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--ink-muted);
    flex-shrink: 0;
    margin-top: 1px;
  }

  .idea-chip-title {
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .idea-chip-sub {
    font-size: 0.62rem;
    color: var(--stealth-fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .idea-chip-meta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
  }

  .idea-add-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: clamp(37px, 4.4vh, 45px);
    padding: 4px 8px;
    background: var(--accent-soft);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 750;
    transition: background-color 0.14s ease, transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out);
  }

  .idea-add-tile:hover {
    background: var(--accent);
    color: var(--accent-ink);
    border-style: solid;
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-hard-sm);
  }

  /* ==================== EXPANDED VIEWS (STACK / IDEAS / GAPS) ==================== */
  .expanded-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  @container (min-width: 520px) {
    .expanded-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @container (min-width: 880px) {
    .expanded-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

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

  @container (min-width: 560px) {
    .expanded-grid--stack {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @container (min-width: 960px) {
    .expanded-grid--stack {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  .rich-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 11px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.14s ease, box-shadow 0.15s var(--ease-out), transform 0.15s var(--ease-out);
  }

  .rich-card[data-status='stack'] {
    border-top: 3px solid var(--stack-fg);
  }

  .rich-card[data-status='momentum'] {
    border-top: 3px solid var(--accent-vivid);
  }

  .rich-card.is-stealth-card {
    border-top: 3px solid var(--stealth-fg);
    background: linear-gradient(180deg, var(--surface-elevated) 60%, color-mix(in srgb, var(--stealth-bg) 42%, var(--surface-elevated)));
  }

  .rich-card.has-gap:not(.is-stealth-card) {
    border-style: dashed;
    border-color: var(--gap-border);
    border-top-style: solid;
  }

  .rich-card:hover {
    border-style: solid;
    border-color: var(--border-strong);
    box-shadow: var(--shadow-hard);
    transform: translate(-2px, -2px);
  }

  .rich-card:has(.card-open-btn:focus-visible) {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  .rich-card-title {
    font-size: 0.94rem;
    font-weight: 750;
    line-height: 1.22;
  }

  .rich-card-codename {
    font-size: 0.68rem;
    color: var(--stealth-fg);
    margin-top: -4px;
  }

  .card-open-btn {
    text-align: left;
    color: inherit;
    width: 100%;
  }

  .card-open-btn:focus-visible {
    outline: none;
  }

  .card-open-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
  }

  .rich-card-summary {
    font-size: 0.8rem;
    line-height: 1.42;
    color: var(--ink-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .rich-card-gap-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .gap-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 650;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    background: var(--gap-bg);
    border: 1px dashed var(--gap-border);
    color: var(--gap-fg);
  }

  .ready-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 650;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    background: var(--stack-bg);
    border: 1px solid var(--stack-border);
    color: var(--stack-fg);
  }

  .rich-card-footer {
    margin-top: auto;
    padding-top: 7px;
    border-top: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .card-cta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
  }

  /* Status Badges */
  .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 7px;
    border-radius: var(--radius-xs);
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid transparent;
  }

  .status-badge--stack {
    color: var(--stack-fg);
    background: var(--stack-bg);
    border-color: var(--stack-border);
  }

  .status-badge--momentum {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent-border);
  }

  .status-badge--idea {
    color: var(--idea-fg);
    background: var(--idea-bg);
    border-color: var(--idea-border);
  }

  .category-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: var(--radius-xs);
    background: var(--surface-subtle);
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 600;
  }

  .local-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-border);
    font-size: 0.67rem;
    font-weight: 700;
  }

  /* Gaps Queue Rows */
  .gaps-queue {
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  .gap-queue-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 11px;
    background: var(--surface-elevated);
    border: 1px dashed var(--gap-border);
    border-radius: var(--radius-sm);
    transition: border-color 0.14s ease, box-shadow 0.14s var(--ease-out), transform 0.12s var(--ease-out);
  }

  .gap-queue-row:hover {
    border-style: solid;
    border-color: var(--border-strong);
    box-shadow: var(--shadow-hard-sm);
    transform: translate(-1px, -1px);
  }

  .gap-queue-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
  }

  .gap-queue-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .gap-queue-title {
    font-size: 0.88rem;
    font-weight: 750;
    color: var(--ink);
  }

  .gap-queue-fill-btn {
    flex-shrink: 0;
  }

  /* ==================== LOCAL LAUNCHER: CARD CONTROLS & LOCAL DECK ==================== */
  .card-launch-controls {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }

  .launch-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 24px;
    padding: 0 7px;
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    color: var(--ink);
    transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out);
  }

  .card-launch-controls--compact .launch-btn {
    height: 21px;
    padding: 0 5px;
    font-size: 0.62rem;
  }

  .card-launch-controls--lg .launch-btn {
    height: 29px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
  }

  .launch-btn--start {
    background: var(--stack-bg);
    border-color: var(--stack-border);
    color: var(--stack-fg);
  }

  .launch-btn--start:hover {
    background: var(--stack-fg);
    border-color: var(--stack-fg);
    color: var(--surface-elevated);
    transform: translate(-1px, -1px);
    box-shadow: 1.5px 1.5px 0 var(--border-strong);
  }

  .launch-btn--starting {
    background: var(--amber-bg);
    border-color: var(--amber-border);
    color: var(--amber-fg);
    cursor: wait;
  }

  .launch-btn--running {
    background: var(--stack-fg);
    border-color: var(--stack-fg);
    color: var(--surface-elevated);
  }

  .launch-btn--running:hover {
    filter: brightness(1.08);
    transform: translate(-1px, -1px);
    box-shadow: 1.5px 1.5px 0 var(--border-strong);
  }

  .launch-btn--stop {
    background: var(--accent-soft);
    border-color: var(--accent-border);
    color: var(--accent);
    padding-inline: 6px;
  }

  .launch-btn--stop:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
  }

  .launch-btn--error {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
  }

  .launch-btn--error:hover {
    background: var(--accent);
    color: var(--accent-ink);
  }

  .launch-btn--subtle {
    background: var(--bg);
    border-color: var(--border);
    color: var(--ink-muted);
  }

  .launch-btn--subtle:hover {
    border-color: var(--border-strong);
    color: var(--ink);
    background: var(--surface-hover);
  }

  .launch-btn--stamp {
    background: var(--stealth-bg);
    border-color: var(--stealth-border);
    color: var(--stealth-fg);
  }

  .launch-btn--stamp:hover:not(:disabled) {
    background: var(--stealth-fg);
    border-color: var(--stealth-fg);
    color: var(--surface-elevated);
    transform: translate(-1px, -1px);
    box-shadow: 1.5px 1.5px 0 var(--border-strong);
  }

  .launch-btn--stamp.is-fresh {
    background: var(--stack-bg);
    border-color: var(--stack-border);
    color: var(--stack-fg);
  }

  .launch-btn--stamp.is-fresh:hover:not(:disabled) {
    background: var(--stack-fg);
    border-color: var(--stack-fg);
    color: var(--surface-elevated);
  }

  .launch-btn--stamp.is-busy {
    background: var(--amber-bg);
    border-color: var(--amber-border);
    color: var(--amber-fg);
    cursor: wait;
  }

  .local-stamp-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    padding: 4px 6px;
    border-radius: var(--radius-xs);
    background: var(--bg);
    border: 1px dashed var(--border);
  }

  .local-stamp-row.has-stamp {
    border-style: solid;
    border-color: var(--stack-border);
    background: color-mix(in srgb, var(--stack-bg) 35%, var(--bg));
  }

  .local-stamp-row.needs-stamp {
    border-style: dashed;
    border-color: var(--amber-border);
    background: color-mix(in srgb, var(--amber-bg) 40%, var(--bg));
  }

  .local-stamp-meta {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-width: 0;
  }

  .local-stamp-date {
    font-size: 0.65rem;
    font-weight: 650;
    color: var(--ink-muted);
    white-space: nowrap;
  }

  .local-stamp-row.has-stamp .local-stamp-date {
    color: var(--ink);
  }

  .local-stamp-delta {
    display: inline-flex;
    align-items: center;
    padding: 0 5px;
    height: 17px;
    border-radius: 999px;
    font-size: 0.61rem;
    font-weight: 750;
    white-space: nowrap;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-muted);
  }

  .local-stamp-delta.is-warn {
    background: var(--amber-bg);
    border-color: var(--amber-border);
    color: var(--amber-fg);
  }

  .local-stamp-delta.is-ok {
    background: var(--stack-bg);
    border-color: var(--stack-border);
    color: var(--stack-fg);
  }

  .local-stamp-delta.is-err {
    background: var(--accent-soft);
    border-color: var(--accent-border);
    color: var(--accent);
  }

  .launch-spinner {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1.6px solid currentColor;
    border-right-color: transparent;
    animation: launcher-spin 0.75s linear infinite;
    flex-shrink: 0;
  }

  .launch-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
  }

  /* Local Deck («Локальные») */
  .local-deck-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  @container (min-width: 520px) {
    .local-deck-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @container (min-width: 840px) {
    .local-deck-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  .local-project-card {
    min-width: 0;
    gap: 6px;
    padding: 10px 11px;
    border-top: 3px solid var(--border-strong);
  }

  .local-project-card[data-runtime='running'] {
    border-top-color: var(--stack-fg);
    background: linear-gradient(180deg, var(--surface-elevated) 68%, color-mix(in srgb, var(--stack-bg) 52%, var(--surface-elevated)));
  }

  .local-project-card[data-runtime='starting'] {
    border-top-color: var(--amber-fg);
  }

  .local-project-card[data-runtime='error'] {
    border-top-color: var(--accent);
    background: linear-gradient(180deg, var(--surface-elevated) 68%, color-mix(in srgb, var(--accent-soft) 55%, var(--surface-elevated)));
  }

  .local-runtime-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 750;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--ink-muted);
    white-space: nowrap;
  }

  .local-runtime-pill.is-running {
    background: var(--stack-bg);
    border-color: var(--stack-border);
    color: var(--stack-fg);
  }

  .local-runtime-pill.is-starting {
    background: var(--amber-bg);
    border-color: var(--amber-border);
    color: var(--amber-fg);
  }

  .local-runtime-pill.is-error {
    background: var(--accent-soft);
    border-color: var(--accent-border);
    color: var(--accent);
  }

  .local-meta-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
  }

  .local-cmd-line {
    min-width: 0;
    max-width: 100%;
    font-size: 0.67rem;
    color: var(--ink-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 3px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .local-card-actions {
    margin-top: auto;
    padding-top: 7px;
    border-top: 1px dashed var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    position: relative;
    z-index: 2;
  }

  .local-card-actions-main {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
  }

  .local-card-actions-sub {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  .subfilter-note {
    font-size: 0.69rem;
    color: var(--ink-muted);
    white-space: nowrap;
  }

  /* Empty State & Toast */
  .empty-state,
  .noscript-notice {
    margin: auto;
    max-width: 440px;
    text-align: center;
    padding: 24px 18px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
  }

  .empty-code {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.08em;
    margin-bottom: 6px;
  }

  .empty-title {
    font-size: 1.02rem;
    margin-bottom: 6px;
  }

  .empty-text {
    font-size: 0.82rem;
    color: var(--ink-muted);
    margin-bottom: 12px;
  }

  .lab-toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 90;
    max-width: min(380px, calc(100vw - 32px));
    padding: 9px 13px;
    background: var(--ink);
    color: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-dialog);
    font-size: 0.78rem;
    font-weight: 600;
  }
}

/* ==================== VIEW A: PROD LABS · СЕТЬ (#network) ==================== */
@layer network {
  .network-brand-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .network-kicker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
  }

  .network-kicker {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--accent);
  }

  .triple-lock-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    background: var(--stack-bg);
    border: 1px solid var(--stack-border);
    color: var(--stack-fg);
    font-size: 0.64rem;
    font-weight: 750;
    white-space: nowrap;
  }

  .network-title {
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
  }

  .network-tagline {
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.38;
    color: var(--ink);
  }

  .network-positioning {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--ink-muted);
  }

  .network-cta-card {
    padding: 10px 11px;
    background: var(--bg);
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hard-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .network-cta-title {
    font-size: 0.88rem;
    font-weight: 800;
  }

  .network-cta-text {
    font-size: 0.74rem;
    line-height: 1.38;
    color: var(--ink-muted);
  }

  .network-cta-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    margin-top: 2px;
  }

  .network-cta-btn {
    width: 100%;
    height: 30px;
  }

  /* Live Pulse Box */
  .pulse-box {
    margin-top: auto;
    padding: 9px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 0;
  }

  .pulse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .pulse-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .pulse-title {
    font-size: 0.69rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
  }

  .pulse-mode-pill {
    font-size: 0.61rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: var(--radius-xs);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink-muted);
  }

  .pulse-mode-pill.is-owner {
    background: var(--stack-bg);
    border-color: var(--stack-border);
    color: var(--stack-fg);
  }

  .pulse-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .pulse-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 8px;
    border-left: 2px solid var(--border-dash);
  }

  .pulse-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.64rem;
    color: var(--ink-muted);
  }

  .pulse-item-tag {
    font-weight: 750;
    color: var(--accent);
    text-transform: uppercase;
  }

  .pulse-item-text {
    font-size: 0.72rem;
    line-height: 1.32;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Right Column Telemetry & Workbench */
  .network-telemetry {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .telemetry-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
  }

  .telemetry-chip--stealth {
    background: var(--stealth-bg);
    border-color: var(--stealth-border);
    color: var(--stealth-fg);
  }

  .network-body {
    display: flex;
    flex-direction: column;
    gap: clamp(9px, 1.3vh, 14px);
  }

  .net-section {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 0.9vh, 9px);
  }

  /* Creator Nodes Grid (6 cards: 3x2) */
  .nodes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  @container (min-width: 680px) {
    .nodes-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  .node-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: clamp(9px, 1.15vh, 12px);
    border-radius: var(--radius-md);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    transition: border-color 0.14s ease, box-shadow 0.14s var(--ease-out), transform 0.14s var(--ease-out);
  }

  .node-card--active {
    border: 1.5px solid var(--border-strong);
    border-top: 3px solid var(--accent-vivid);
    box-shadow: var(--shadow-hard-sm);
  }

  .node-card--open {
    background: var(--surface);
    border: 1.5px dashed var(--border-dash);
  }

  .node-card--open:hover {
    border-style: solid;
    border-color: var(--border-strong);
    background: var(--surface-elevated);
    transform: translate(-1.5px, -1.5px);
    box-shadow: var(--shadow-hard-sm);
  }

  .node-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .node-code {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
  }

  .node-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 750;
  }

  .node-status-pill--active {
    background: var(--stack-bg);
    border: 1px solid var(--stack-border);
    color: var(--stack-fg);
  }

  .node-status-pill--open {
    background: var(--surface-subtle);
    border: 1px dashed var(--border-dash);
    color: var(--ink-muted);
  }

  .node-identity {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .node-avatar {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-strong);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--surface-subtle);
  }

  .node-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 46% 45%;
  }

  .node-avatar-slot {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1.5px dashed var(--border-dash);
    display: grid;
    place-items: center;
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink-muted);
    background: var(--bg);
    flex-shrink: 0;
  }

  .node-avatar-slot--stub {
    color: var(--ink);
    background: var(--surface-subtle);
  }

  .node-identity-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .node-handle {
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.15;
  }

  .node-role {
    font-size: 0.74rem;
    color: var(--ink-muted);
    line-height: 1.28;
  }

  .node-stub-note {
    font-size: 0.73rem;
    color: var(--ink-muted);
    line-height: 1.34;
  }

  .node-metrics-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
  }

  .node-specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .node-card-footer {
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .node-card-footer .btn-primary,
  .node-card-footer .btn-secondary {
    width: 100%;
    height: 29px;
    font-size: 0.74rem;
  }

  /* 3-Pillar Ecosystem Strip */
  .ecosystem-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  @container (min-width: 680px) {
    .ecosystem-strip {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  .eco-card {
    padding: 8px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .eco-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .eco-title {
    font-size: 0.78rem;
    font-weight: 800;
  }

  .eco-badge {
    font-size: 0.63rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: var(--radius-xs);
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--ink-muted);
    white-space: nowrap;
  }

  .eco-desc {
    font-size: 0.71rem;
    line-height: 1.35;
    color: var(--ink-muted);
  }

  /* Network Highlighted Projects Grid (4x2 = 8 tiles) */
  .network-projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(6px, 0.8vh, 8px);
  }

  @container (min-width: 480px) {
    .network-projects-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @container (min-width: 780px) {
    .network-projects-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  .net-project-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: clamp(7px, 0.9vh, 10px) 9px;
    min-height: clamp(92px, 11.4vh, 114px);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-top: 2.5px solid var(--ink);
    border-radius: var(--radius-sm);
    text-align: left;
    transition: border-color 0.14s ease, box-shadow 0.14s var(--ease-out), transform 0.14s var(--ease-out);
  }

  .net-project-tile[data-status='stack'] {
    border-top-color: var(--stack-fg);
  }

  .net-project-tile[data-status='momentum'] {
    border-top-color: var(--accent-vivid);
  }

  .net-project-tile.is-stealth {
    border-top-color: var(--stealth-fg);
    background: linear-gradient(180deg, var(--surface-elevated) 55%, color-mix(in srgb, var(--stealth-bg) 50%, var(--surface-elevated)));
  }

  .net-project-tile:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-hard-sm);
    transform: translate(-1.5px, -1.5px);
  }

  .net-project-title {
    font-size: 0.8rem;
    font-weight: 750;
    line-height: 1.2;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .net-project-sub {
    font-size: 0.69rem;
    line-height: 1.32;
    color: var(--ink-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .net-project-foot {
    margin-top: auto;
    padding-top: 4px;
    border-top: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    font-size: 0.64rem;
    color: var(--ink-muted);
  }
}

/* ==================== DIALOGS & CONTROLS ==================== */
@layer dialogs {
  .lab-dialog {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    width: min(560px, calc(100vw - 24px));
    max-width: none;
    max-height: min(90dvh, 840px);
    margin: auto;
    overflow: visible;
    opacity: 0;
    transform: translateY(8px) scale(0.985);
    transition:
      opacity 0.18s var(--ease-out),
      transform 0.18s var(--ease-out),
      overlay 0.18s var(--ease-out) allow-discrete,
      display 0.18s var(--ease-out) allow-discrete;
  }

  .lab-dialog--wide {
    width: min(760px, calc(100vw - 24px));
  }

  .lab-dialog[open] {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  @starting-style {
    .lab-dialog[open] {
      opacity: 0;
      transform: translateY(10px) scale(0.985);
    }
  }

  .lab-dialog::backdrop {
    background: var(--backdrop);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition:
      opacity 0.18s var(--ease-out),
      overlay 0.18s var(--ease-out) allow-discrete,
      display 0.18s var(--ease-out) allow-discrete;
  }

  .lab-dialog[open]::backdrop {
    opacity: 1;
  }

  @starting-style {
    .lab-dialog[open]::backdrop {
      opacity: 0;
    }
  }

  .dialog-surface {
    display: flex;
    flex-direction: column;
    max-height: min(90dvh, 840px);
    background: var(--surface);
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-dialog);
    overflow: hidden;
  }

  .dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 15px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
  }

  .dialog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
  }

  .dialog-heading-sm {
    font-size: 1.04rem;
    font-weight: 800;
  }

  .dialog-sub {
    font-size: 0.77rem;
    color: var(--ink-muted);
    margin-top: 2px;
  }

  .dialog-close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-elevated);
    color: var(--ink);
    flex-shrink: 0;
  }

  .dialog-close:hover {
    border-color: var(--border-strong);
    background: var(--surface-subtle);
  }

  .dialog-close-hint {
    font-size: 0.65rem;
    color: var(--ink-muted);
  }

  .dialog-body {
    padding: 14px 15px;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .dialog-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .dialog-title-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
  }

  .dialog-title {
    font-size: clamp(1.2rem, 2vw, 1.52rem);
    font-weight: 800;
  }

  .dialog-codename-sub {
    font-size: 0.74rem;
    font-weight: 650;
    color: var(--stealth-fg);
  }

  /* Native Switch & Privacy Toggle Bar (switch guide) */
  .privacy-toggle-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: var(--stealth-bg);
    border: 1px solid var(--stealth-border);
    border-radius: var(--radius-sm);
  }

  .privacy-toggle-bar.is-public {
    background: var(--stack-bg);
    border-color: var(--stack-border);
  }

  .privacy-toggle-bar--compact {
    padding: 8px 10px;
  }

  .privacy-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .privacy-toggle-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink);
  }

  .privacy-toggle-desc {
    font-size: 0.76rem;
    color: var(--ink-muted);
  }

  .switch-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .switch-state-label {
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--ink);
  }

  input[type='checkbox'][switch].native-switch {
    accent-color: var(--accent);
    margin: 0;
    cursor: pointer;
  }

  input[type='checkbox'][switch].native-switch:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
  }

  /* Fallback styled toggle track for browsers without native HTML switch (Chrome/Firefox) */
  input[type='checkbox'][switch].native-switch.is-fallback-switch {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: var(--stack-fg);
    border: 1.5px solid var(--border-strong);
    transition: background-color 0.16s var(--ease-out);
  }

  input[type='checkbox'][switch].native-switch.is-fallback-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--surface-elevated);
    border: 1px solid var(--border-strong);
    transition: transform 0.16s var(--ease-out);
  }

  input[type='checkbox'][switch].native-switch.is-fallback-switch:checked {
    background: var(--stealth-fg);
  }

  input[type='checkbox'][switch].native-switch.is-fallback-switch:checked::before {
    transform: translateX(18px);
  }

  /* Triple-Lock Verification Box inside Inspector */
  .triple-lock-box {
    padding: 9px 11px;
    background: var(--bg);
    border: 1px solid var(--stack-border);
    border-left: 3px solid var(--stack-fg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .triple-lock-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .triple-lock-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--stack-fg);
  }

  .triple-lock-proof {
    font-size: 0.71rem;
    font-weight: 700;
    color: var(--ink);
  }

  .triple-lock-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  .lock-detail-pill {
    font-size: 0.67rem;
    font-weight: 650;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink-muted);
  }

  .lock-detail-pill.is-ok {
    background: var(--stack-bg);
    border-color: var(--stack-border);
    color: var(--stack-fg);
  }

  /* Local Launcher Panel inside Project Inspector Modal */
  .launcher-panel {
    padding: 11px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 3.5px solid var(--border-strong);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .launcher-panel[data-runtime='running'] {
    border-color: var(--stack-border);
    border-left-color: var(--stack-fg);
    background: color-mix(in srgb, var(--stack-bg) 36%, var(--bg));
  }

  .launcher-panel[data-runtime='starting'] {
    border-color: var(--amber-border);
    border-left-color: var(--amber-fg);
  }

  .launcher-panel[data-runtime='error'] {
    border-color: var(--accent-border);
    border-left-color: var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 35%, var(--bg));
  }

  .launcher-panel-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .launcher-panel-title {
    color: var(--ink);
  }

  .launcher-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.69rem;
    font-weight: 750;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-muted);
  }

  .launcher-status-chip.is-running {
    background: var(--stack-bg);
    border-color: var(--stack-border);
    color: var(--stack-fg);
  }

  .launcher-status-chip.is-starting {
    background: var(--amber-bg);
    border-color: var(--amber-border);
    color: var(--amber-fg);
  }

  .launcher-status-chip.is-error {
    background: var(--accent-soft);
    border-color: var(--accent-border);
    color: var(--accent);
  }

  .launcher-panel-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
  }

  .launcher-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.69rem;
    font-weight: 650;
    color: var(--ink);
  }

  .launcher-cmd-preview {
    font-size: 0.7rem;
    color: var(--ink-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 2px 6px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .launcher-panel-error {
    font-size: 0.76rem;
    font-weight: 650;
    color: var(--accent);
    padding: 5px 8px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-xs);
  }

  .launcher-panel-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .btn-launcher-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 31px;
    padding: 0 11px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 750;
    white-space: nowrap;
    text-decoration: none;
    background: var(--stack-fg);
    color: var(--surface-elevated);
    border: 1px solid var(--stack-fg);
    transition: filter 0.14s ease, transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out);
  }

  .btn-launcher-open:hover {
    filter: brightness(1.08);
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-hard-sm);
  }

  .launcher-stamp-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px;
    border-radius: var(--radius-xs);
    background: var(--surface);
    border: 1px dashed var(--border-strong);
  }

  .launcher-stamp-bar.has-stamp {
    border-style: solid;
    border-color: var(--stack-border);
    background: color-mix(in srgb, var(--stack-bg) 32%, var(--surface));
  }

  .launcher-stamp-bar.needs-stamp {
    border-style: dashed;
    border-color: var(--amber-border);
    background: color-mix(in srgb, var(--amber-bg) 36%, var(--surface));
  }

  .launcher-stamp-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }

  .launcher-stamp-label {
    font-size: 0.69rem;
    font-weight: 750;
    color: var(--ink-muted);
  }

  .launcher-stamp-date {
    font-size: 0.72rem;
    font-weight: 750;
    color: var(--ink);
  }

  .launcher-stamp-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 750;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--ink-muted);
  }

  .launcher-stamp-badge.is-warn {
    background: var(--amber-bg);
    border-color: var(--amber-border);
    color: var(--amber-fg);
  }

  .launcher-stamp-badge.is-ok {
    background: var(--stack-bg);
    border-color: var(--stack-border);
    color: var(--stack-fg);
  }

  .launcher-stamp-badge.is-err {
    background: var(--accent-soft);
    border-color: var(--accent-border);
    color: var(--accent);
  }

  .launcher-stamp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
  }

  .launcher-upgrade-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid var(--amber-border);
    background: var(--amber-bg);
    color: var(--amber-fg);
    font-size: 0.67rem;
    font-weight: 750;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.14s ease, color 0.14s ease;
  }

  .launcher-upgrade-pill:hover:not(:disabled) {
    background: var(--amber-fg);
    color: var(--surface-elevated);
  }

  .launcher-upgrade-pill:disabled {
    opacity: 0.72;
    cursor: wait;
  }

  .launcher-shutdown-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-block-size: 24px;
    min-inline-size: 24px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--accent-border);
    background: transparent;
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 750;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .launcher-power-icon {
    font-size: 0.76rem;
    line-height: 1;
  }

  @media (prefers-reduced-motion: no-preference) {
    .launcher-shutdown-pill {
      transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.12s var(--ease-out);
    }
  }

  @media (hover: hover) {
    .launcher-shutdown-pill:hover:not([aria-disabled='true']) {
      background: var(--accent-soft);
      border-color: var(--accent);
    }
  }

  .launcher-shutdown-pill.is-armed {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
    box-shadow: 2px 2px 0 var(--border-strong);
  }

  @media (hover: hover) {
    .launcher-shutdown-pill.is-armed:hover:not([aria-disabled='true']) {
      background: var(--accent-hover);
      border-color: var(--accent-hover);
      color: var(--accent-ink);
    }
  }

  .launcher-shutdown-pill[aria-disabled='true'] {
    opacity: 0.72;
    cursor: wait;
  }

  @media (pointer: coarse) {
    .launcher-shutdown-pill,
    .launcher-upgrade-pill {
      min-block-size: 30px;
      padding-inline: 11px;
    }
  }

  /* Native <details> Log Viewer (modern-web-guidance: accordion & html) */
  .launcher-logs-details {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    overflow: hidden;
  }

  .launcher-logs-summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    font-size: 0.71rem;
    font-weight: 750;
    color: var(--ink);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.14s ease;
  }

  .launcher-logs-summary::-webkit-details-marker {
    display: none;
  }

  .launcher-logs-summary::before {
    content: '▾';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    color: var(--ink-muted);
    rotate: -90deg;
  }

  .launcher-logs-details[open] > .launcher-logs-summary::before {
    rotate: 0deg;
  }

  .launcher-logs-summary:hover {
    background: var(--surface-hover);
  }

  .launcher-logs-badge {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--ink-muted);
  }

  .launcher-logs-details::details-content {
    interpolate-size: allow-keywords;
    overflow: clip;
    contain: layout;
  }

  .launcher-logs-details:not([open])::details-content {
    block-size: 0;
  }

  @media (prefers-reduced-motion: no-preference) {
    .launcher-logs-summary::before {
      transition: rotate 0.2s var(--ease-out);
    }

    .launcher-logs-details::details-content {
      transition: block-size 0.24s var(--ease-out), content-visibility 0.24s allow-discrete, display 0.24s allow-discrete;
    }
  }

  .launcher-logs-body {
    border-top: 1px solid var(--border);
    background: var(--bg);
  }

  .launcher-logs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 9px;
    background: var(--surface-subtle);
    border-bottom: 1px solid var(--border);
  }

  .launcher-logs-hint {
    font-size: 0.65rem;
    color: var(--ink-muted);
  }

  .launcher-mini-action {
    font-size: 0.66rem;
    font-weight: 750;
    color: var(--accent);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    border: 1px solid transparent;
  }

  .launcher-mini-action:hover {
    background: var(--accent-soft);
    border-color: var(--accent-border);
  }

  .launcher-logs-pre {
    margin: 0;
    padding: 8px 10px;
    max-height: 200px;
    overflow: auto;
    overscroll-behavior: contain;
    font-size: 0.69rem;
    line-height: 1.44;
    white-space: pre-wrap;
    word-break: break-word;
    background: #141412;
    color: #e9e6dc;
  }

  .launcher-logs-pre code {
    background: transparent;
    border: 0;
    padding: 0;
    font-size: inherit;
    color: inherit;
  }

  /* Guest Stealth Card inside Inspector */
  .guest-stealth-card {
    padding: 14px;
    background: var(--stealth-bg);
    border: 1.5px dashed var(--stealth-border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .guest-stealth-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .stealth-lock-pill {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--stealth-fg);
  }

  .guest-stealth-teaser {
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--ink);
  }

  .guest-stealth-note {
    font-size: 0.78rem;
    line-height: 1.46;
    color: var(--ink-muted);
  }

  .guest-stealth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 2px;
  }

  /* Owner Private Notes Box */
  .dialog-private-box {
    padding: 11px 13px;
    background: var(--amber-bg);
    border: 1px solid var(--amber-border);
    border-left: 3.5px solid var(--amber-fg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .dialog-private-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .dialog-private-tag {
    font-size: 0.64rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: var(--radius-xs);
    background: var(--surface);
    border: 1px solid var(--amber-border);
    color: var(--amber-fg);
  }

  .dialog-private-text {
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--ink);
  }

  .dialog-teaser-box {
    padding: 9px 12px;
    background: var(--stealth-bg);
    border: 1px dashed var(--stealth-border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .dialog-teaser-text {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--ink-muted);
  }

  /* Auth Dialog */
  .auth-context-note {
    padding: 8px 10px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 650;
  }

  .auth-crypto-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.69rem;
    font-weight: 700;
    color: var(--ink-muted);
  }

  .auth-crypto-meta span {
    padding: 2px 7px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
  }

  .auth-demo-box {
    padding: 10px 12px;
    background: var(--amber-bg);
    border: 1px dashed var(--amber-border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .auth-demo-text {
    font-size: 0.78rem;
    line-height: 1.46;
    color: var(--amber-fg);
  }

  .password-wrap {
    display: flex;
    align-items: stretch;
    gap: 6px;
  }

  .password-input {
    flex: 1 1 auto;
  }

  .password-vis-btn {
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-elevated);
    font-size: 0.75rem;
    font-weight: 650;
    color: var(--ink-muted);
    white-space: nowrap;
  }

  .password-vis-btn:hover {
    color: var(--ink);
    border-color: var(--border-strong);
  }

  /* Inquiry Modal Tabs (tabs guide: non-color border underline) */
  .dialog-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 3px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }

  .dialog-tab {
    position: relative;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--radius-xs);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink-muted);
    transition: background-color 0.14s ease, color 0.14s ease;
  }

  .dialog-tab:hover {
    color: var(--ink);
    background: var(--surface-subtle);
  }

  .dialog-tab[aria-selected='true'] {
    background: var(--surface-elevated);
    color: var(--ink);
  }

  .dialog-tab[aria-selected='true']::after {
    content: '';
    position: absolute;
    inset: auto 8px 0;
    border-bottom: 2.5px solid var(--accent);
  }

  .inquiry-preview-box {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg);
  }

  .inquiry-preview-head {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    font-size: 0.67rem;
    font-weight: 750;
    color: var(--ink-muted);
    background: var(--surface-subtle);
    border-bottom: 1px solid var(--border);
  }

  .inquiry-preview-text {
    padding: 8px 10px;
    font-size: 0.73rem;
    line-height: 1.44;
    white-space: pre-wrap;
    color: var(--ink);
    max-height: 112px;
    overflow-y: auto;
  }

  /* Gap Checklist inside Inspector */
  .checklist-box {
    padding: 10px 12px;
    background: var(--bg);
    border: 1px dashed var(--gap-border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .checklist-box.is-complete {
    border-style: solid;
    border-color: var(--stack-border);
    background: color-mix(in srgb, var(--stack-bg) 45%, var(--bg));
  }

  .checklist-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .checklist-top-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .btn-danger-outline {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-border);
  }

  .btn-danger-outline:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-hard-sm);
  }

  .btn-danger-outline.is-armed {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
    box-shadow: var(--shadow-hard-sm);
  }

  .checklist-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 6px;
  }

  .checklist-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.77rem;
    font-weight: 600;
    color: var(--gap-fg);
  }

  .checklist-item.is-done {
    color: var(--stack-fg);
  }

  .check-mark {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    border: 1.5px dashed currentColor;
    display: inline-grid;
    place-items: center;
    font-size: 0.66rem;
    font-weight: 800;
    flex-shrink: 0;
  }

  .checklist-item.is-done .check-mark {
    border-style: solid;
    background: var(--stack-fg);
    color: var(--surface);
  }

  /* Forms */
  .edit-form,
  .modal-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .edit-form {
    padding: 12px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
  }

  .form-row--two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .form-row--three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }

  .form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .form-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ink);
  }

  .form-hint {
    font-size: 0.72rem;
    color: var(--ink-muted);
    line-height: 1.35;
  }

  .req-mark {
    color: var(--accent);
  }

  .form-opt {
    font-weight: 500;
    color: var(--ink-muted);
  }

  .form-control {
    width: 100%;
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--ink);
    font-size: 0.82rem;
  }

  .form-control:focus {
    border-color: var(--border-strong);
    background: var(--surface-elevated);
  }

  :is(.form-control:user-invalid, .form-control.user-invalid-fallback, .form-control[aria-invalid='true']) {
    border-color: var(--accent);
    background: var(--accent-soft);
  }

  .form-textarea {
    resize: vertical;
    min-height: 54px;
    line-height: 1.44;
  }

  .form-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
  }

  .form-checkbox input {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
  }

  .form-error {
    font-size: 0.75rem;
    font-weight: 650;
    color: var(--accent);
  }

  .edit-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 3px;
  }

  .edit-save-hint {
    font-size: 0.73rem;
    color: var(--ink-muted);
  }

  /* Inspector Read View */
  .inspector-read-view {
    display: flex;
    flex-direction: column;
    gap: 11px;
  }

  .dialog-thesis {
    font-size: 0.9rem;
    line-height: 1.54;
    color: var(--ink);
    padding: 10px 12px;
    background: var(--bg);
    border-left: 3px solid var(--accent-vivid);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }

  .dialog-outcome-box {
    padding: 9px 12px;
    background: var(--stack-bg);
    border-left: 3px solid var(--stack-fg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .dialog-outcome-text {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--ink);
  }

  .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  .tag-item {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--ink-muted);
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--bg);
  }

  .dialog-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .dialog-block-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-muted);
  }

  .dialog-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .dialog-list li {
    position: relative;
    padding-left: 15px;
    font-size: 0.84rem;
    line-height: 1.46;
    color: var(--ink);
  }

  .dialog-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
  }

  .dialog-list--questions li::before {
    content: '?';
    font-family: var(--font-mono);
  }

  .reference-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  .reference-list li,
  .reference-chip {
    font-size: 0.78rem;
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--surface-subtle);
  }

  .dialog-next-step {
    font-size: 0.84rem;
    color: var(--ink-muted);
    line-height: 1.46;
  }

  .dialog-source-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }

  .dialog-source-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .dialog-source-label {
    font-size: 0.68rem;
    color: var(--ink-muted);
  }

  .dialog-source-path {
    font-size: 0.76rem;
    font-weight: 650;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
  }

  .dialog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 15px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
  }

  .dialog-footer--inline {
    padding: 10px 0 0;
    background: transparent;
    justify-content: flex-end;
  }

  .dialog-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-elevated);
    font-size: 0.76rem;
    font-weight: 650;
    max-width: 42%;
  }

  .dialog-nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dialog-nav-btn:hover:not(:disabled) {
    border-color: var(--border-strong);
  }

  .dialog-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }

  .dialog-position {
    font-size: 0.74rem;
    color: var(--ink-muted);
    white-space: nowrap;
  }

  /* About Modal */
  .about-hero {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 11px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }

  .about-figure {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 108px;
    flex-shrink: 0;
  }

  .about-figure img {
    width: 104px;
    height: 104px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-strong);
    object-fit: cover;
    object-position: 46% 45%;
  }

  .about-caption {
    font-size: 0.66rem;
    line-height: 1.28;
    color: var(--ink-muted);
  }

  .about-hero-meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
  }

  .about-hero-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
  }

  .about-handle {
    font-size: 1.02rem;
    font-weight: 800;
  }

  .about-tagline {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ink);
  }

  .about-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .about-section {
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  .about-section--prodlabs {
    padding: 11px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--ink);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }

  .about-prose {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 0.85rem;
    line-height: 1.52;
    color: var(--ink);
  }

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

  .arsenal-card {
    padding: 9px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .arsenal-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--ink);
  }

  .arsenal-term {
    font-size: 0.7rem;
    font-style: italic;
    color: var(--accent);
  }

  .arsenal-text {
    font-size: 0.76rem;
    line-height: 1.42;
    color: var(--ink-muted);
  }

  .about-section--lab {
    padding: 11px;
    background: var(--bg);
    border-left: 3px solid var(--accent-vivid);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }

  /* Export Modal */
  .export-status-box {
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .export-status-text {
    font-size: 0.85rem;
    font-weight: 700;
  }

  .export-hint {
    font-size: 0.76rem;
    color: var(--ink-muted);
    line-height: 1.55;
  }

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

  .export-preview-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg);
  }

  .export-preview-head {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ink-muted);
    background: var(--surface-subtle);
    border-bottom: 1px solid var(--border);
  }

  .export-preview {
    max-height: 260px;
    overflow: auto;
    padding: 9px 11px;
    font-size: 0.72rem;
    line-height: 1.42;
    color: var(--ink);
  }
}

@layer utilities {
  [hidden] {
    display: none !important;
  }

  .mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
  }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}

/* ==================== COMPACT DESKTOP HEIGHT (<= 840px, e.g. 1280x800) ==================== */
@media (max-height: 840px) and (min-width: 960px) {
  .profile-rail,
  .network-rail {
    gap: 6px;
    padding: 8px 13px;
  }

  .avatar-frame {
    width: 60px;
    height: 60px;
  }

  .profile-bio,
  .network-positioning {
    font-size: 0.74rem;
    line-height: 1.34;
  }

  .workbench-body,
  .network-body {
    padding: 7px 13px;
  }

  .split-deck,
  .network-body {
    gap: 7px;
  }

  .deck-section,
  .net-section {
    gap: 5px;
  }

  .stack-tile {
    min-height: 74px;
    padding: 5px 8px;
  }

  .momentum-tile {
    padding: 5px 9px;
  }

  .idea-chip-tile,
  .idea-add-tile {
    min-height: 34px;
    padding: 3px 7px;
  }

  .node-card {
    padding: 8px 10px;
    gap: 5px;
  }

  .eco-card {
    padding: 6px 8px;
  }

  .net-project-tile {
    min-height: 86px;
    padding: 6px 8px;
  }

  .pulse-box {
    padding: 7px 8px;
    gap: 5px;
  }
}

/* ==================== COMPACT DESKTOP WIDTH (960–1320px) ==================== */
@media (max-width: 1320px) and (min-width: 960px) {
  .live-pill-ext,
  .readiness-label,
  .theme-toggle-label {
    display: none;
  }

  .topbar {
    padding-inline: 11px;
    gap: 7px;
  }

  .layer-btn {
    padding: 0 8px;
    font-size: 0.71rem;
  }

  .topbar-back-link {
    padding: 0 7px;
    font-size: 0.7rem;
  }

  .search-box {
    width: 170px;
  }

  .subfilter-bar[data-subfilter-mode='local'] {
    gap: 5px 8px;
    padding-inline: 12px;
  }

  .subfilter-bar[data-subfilter-mode='local'] .sub-pill {
    padding: 0 8px;
    font-size: 0.7rem;
  }

  .subfilter-bar[data-subfilter-mode='local'] .subfilter-note {
    font-size: 0.66rem;
  }
}

@media (max-width: 1120px) and (min-width: 960px) {
  .live-pill,
  .readiness-meter {
    display: none;
  }

  .lab-workspace,
  .network-workspace {
    grid-template-columns: 288px minmax(0, 1fr);
  }
}

/* ==================== MOBILE SINGLE-SCREEN CONSOLE (< 960px) ==================== */
@media (max-width: 959px) {
  .lab-shell {
    grid-template-rows: 46px minmax(0, 1fr) auto;
  }

  .topbar {
    height: 46px;
    padding-inline: 10px;
    gap: 6px;
  }

  .live-pill,
  .topbar-desktop-only,
  .theme-toggle-label,
  .readiness-meter,
  .owner-label,
  .mobile-compact-hide {
    display: none;
  }

  .auth-label,
  #launcher-pill-label,
  #guest-preview-label,
  .topbar-back-label {
    display: none;
  }

  .topbar-back-link {
    width: 28px;
    height: 28px;
    padding: 0;
    justify-content: center;
  }

  .launcher-pill {
    width: 26px;
    height: 26px;
    padding: 0;
    justify-content: center;
  }

  .topbar-actions,
  .owner-controls {
    gap: 5px;
  }

  .layer-btn {
    height: 28px;
    padding: 0 7px;
    font-size: 0.67rem;
  }

  .btn-primary,
  .btn-secondary,
  .btn-danger,
  .btn-danger-outline,
  .btn-auth,
  .btn-owner-unlocked,
  .btn-guest-preview,
  .theme-toggle {
    height: 29px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .console-stage {
    overflow: hidden;
  }

  .network-workspace {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .network-rail,
  .network-workbench,
  .network-body {
    overflow: visible;
    height: auto;
    border-right: 0;
  }

  .network-bar {
    flex-wrap: wrap;
    padding: 8px 12px;
  }

  .lab-workspace {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .profile-rail {
    border-right: 0;
    flex: 1 1 auto;
    padding: 12px;
    display: none;
  }

  .workbench {
    flex: 1 1 auto;
  }

  body[data-mobile-panel='profile'] .profile-rail {
    display: flex;
  }

  body[data-mobile-panel='profile'] .workbench {
    display: none;
  }

  .rail-mobile-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .workbench-bar {
    padding: 7px 10px;
  }

  .mode-tabs {
    display: none;
  }

  .workbench-bar-right {
    width: 100%;
    justify-content: space-between;
  }

  .search-box {
    flex: 1 1 auto;
    width: auto;
  }

  .workbench-body,
  .network-body {
    padding: 9px 10px 14px;
  }

  .deck-caption {
    display: none;
  }

  .mobile-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 25;
  }

  .mobile-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    padding: 5px 2px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ink-muted);
    border-top: 2px solid transparent;
  }

  .mobile-tab[aria-pressed='true'] {
    color: var(--accent);
    border-top-color: var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface));
  }

  .mobile-tab-count {
    font-size: 0.64rem;
    opacity: 0.85;
  }

  .form-row--two,
  .form-row--three,
  .arsenal-grid {
    grid-template-columns: 1fr;
  }

  .about-hero {
    flex-direction: column;
  }

  .dialog-close-hint {
    display: none;
  }

  .gap-queue-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .gap-queue-fill-btn {
    width: 100%;
  }

  .preview-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .lab-toast {
    bottom: 58px;
    left: 10px;
    right: 10px;
    max-width: none;
  }
}

/* ==================== ACCESSIBILITY: REDUCED MOTION & FORCED COLORS ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .stack-tile,
  .momentum-tile,
  .idea-chip-tile,
  .rich-card,
  .gap-queue-row,
  .radar-row,
  .node-card,
  .eco-card,
  .net-project-tile,
  .dialog-surface,
  .btn-primary,
  .btn-secondary,
  .btn-danger,
  .btn-danger-outline,
  .btn-auth,
  .btn-owner-unlocked,
  .btn-guest-preview,
  .theme-toggle,
  .layer-btn,
  .mode-tab,
  .dialog-tab,
  .launcher-pill,
  .launcher-upgrade-pill,
  .launcher-shutdown-pill,
  .launch-btn,
  .btn-launcher-open,
  .launcher-panel,
  .launcher-logs-details {
    border: 1px solid CanvasText;
  }

  .launcher-shutdown-pill.is-armed,
  .btn-danger-outline.is-armed {
    background: Highlight;
    color: HighlightText;
    border-color: Highlight;
  }

  .brand-mark,
  .live-dot,
  .status-dot,
  .layer-node-dot,
  .launcher-dot,
  .launcher-tab-dot {
    forced-color-adjust: none;
    background: Highlight;
  }
}
