:root {
  color-scheme: dark;
  --theme-name: dark;
  --theme-is-dark: 1;
  --theme-is-light: 0;
  --bg: #0c1117;
  --bg-top: #162536;
  --bg-bottom: #091019;
  --panel: #121a23;
  --panel-2: #182231;
  --panel-gradient-end: #101823;
  --surface-1: #121a23;
  --surface-2: #182231;
  --surface-3: #101823;
  --surface-4: #0f1721;
  --surface-hover: #122233;
  --surface-strong: #16314a;
  --surface-strong-hover: #1f3d59;
  --border: #27364a;
  --border-strong: #355777;
  --text: #d8e3f1;
  --text-strong: #dceaff;
  --text-inverse: #f7fbff;
  --muted: #93a9c1;
  --link: #81c9ff;
  --accent: #3fa9f5;
  --focus-ring: rgba(72, 129, 240, 0.2);
  --overlay: rgba(8, 12, 18, 0.65);
  --modal-surface: #101a26;
  --modal-border: #335474;
  --modal-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
  --drawer-surface: linear-gradient(180deg, #111d2c, #0d1621);
  --drawer-border: #325272;
  --drawer-shadow: 0 14px 38px rgba(0, 0, 0, 0.45);
  --left-rail-start: #101c2a;
  --left-rail-end: #0a121c;
  --shell-card-border: rgba(76, 120, 180, 0.45);
  --shell-card-bg:
    linear-gradient(180deg, rgba(11, 22, 37, 0.96), rgba(8, 16, 28, 0.96)),
    linear-gradient(120deg, rgba(94, 70, 247, 0.15), rgba(79, 143, 247, 0.12));
  --shell-card-shadow: 0 12px 32px rgba(2, 8, 20, 0.32);
  --brand-gradient-start: #5e46f7;
  --brand-gradient-end: #4f8ff7;
  --brand-shadow: 0 10px 24px rgba(78, 134, 247, 0.24);
  --primary-btn-bg: #1f6cab;
  --primary-btn-border: #2f86d0;
  --interactive-surface: #0f1721;
  --interactive-surface-hover: #142435;
  --interactive-surface-border: #223349;
  --tab-surface: #101d2a;
  --tab-surface-active: #132739;
  --tab-border: #2a3d53;
  --tab-border-active: #3a6b94;
  --button-subtle-border: #30465e;
  --button-subtle-hover: #122233;
  --selection-surface: #17324a;
  --splitter-handle-bg: #3a5068;
  --splitter-handle-hover-bg: #4a6580;
  --menu-hover-bg: #162638;
  --menu-danger-hover-bg: #3a1920;
  --menu-surface: #0f1721;
  --menu-border: #30465e;
  --menu-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --menu-danger-text: #ffb7bf;
  --input-label-color: #dceaff;
  --copy-btn-color: #c7d8ef;
  --copy-btn-hover-color: #eef5ff;
  --info-banner-border: #33557a;
  --info-banner-bg: linear-gradient(180deg, rgba(29, 47, 69, 0.94) 0%, rgba(17, 28, 41, 0.96) 100%);
  --inline-secret-border: #31475f;
  --inline-secret-bg: rgba(10, 16, 25, 0.94);
  --inline-secret-text: #d9e6f3;
  --compact-action-border: rgba(53, 87, 119, 0.55);
  --compact-action-bg: rgba(22, 49, 74, 0.52);
  --compact-action-text: rgba(220, 234, 255, 0.72);
  --compact-action-hover-border: rgba(79, 143, 247, 0.75);
  --compact-action-hover-bg: rgba(24, 51, 76, 0.88);
  --compact-action-hover-text: rgba(220, 234, 255, 0.92);
  --request-dirty-bg: linear-gradient(180deg, #78b8ff, #4794ff);
  --request-dirty-shadow: 0 0 0 1px rgba(71, 148, 255, 0.18), 0 0 10px rgba(71, 148, 255, 0.24);
  --drop-target-border: rgba(88, 153, 226, 0.52);
  --drop-target-bg: rgba(21, 39, 59, 0.92);
  --drop-target-shadow: inset 0 0 0 1px rgba(88, 153, 226, 0.18);
  --hover-card-border: rgba(94, 133, 182, 0.5);
  --hover-card-bg: linear-gradient(180deg, rgba(16, 27, 40, 0.98), rgba(10, 17, 26, 0.98));
  --hover-card-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  --button-default-border: #355777;
  --button-default-bg: #16314a;
  --button-default-hover-bg: #1f3d59;
  --button-default-text: #dceaff;
  --button-danger-bg: #4a1f25;
  --button-danger-border: #83313b;
  --editor-surface-border: #30465e;
  --editor-surface-bg: #0c141e;
  --editor-surface-text: #d2e3f6;
  --table-border-color: #26384b;
  --placeholder-text: rgba(147, 169, 193, 0.52);
  --toggle-track-bg: #24384c;
  --toggle-track-border: #355777;
  --toggle-thumb-bg: linear-gradient(180deg, #dbe9f8, #b8d0ea);
  --toggle-thumb-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  --toggle-active-bg: linear-gradient(135deg, #21598a, #1f6cab);
  --toggle-active-border: #4c8ec5;
  --toggle-focus-outline: rgba(92, 165, 255, 0.85);
  --badge-border: #3a4f67;
  --badge-bg: #1a2a3c;
  --badge-text: #d3e6fb;
  --badge-gql-bg: #3a1e4f;
  --badge-gql-border: #7045a0;
  --method-default-bg: #223245;
  --method-get-bg: #134b38;
  --method-get-border: #209167;
  --method-post-bg: #173d61;
  --method-post-border: #2a6da7;
  --method-put-bg: #5a3e0f;
  --method-put-border: #8d6824;
  --method-patch-bg: #4f2f63;
  --method-patch-border: #7a4c97;
  --method-delete-bg: #5f1f26;
  --method-delete-border: #9a3b47;
  --method-head-bg: #164a53;
  --method-head-border: #2b8a97;
  --method-options-bg: #5f341d;
  --method-options-border: #a05e33;
  --running-card-text: #dceaff;
  --running-card-border: rgba(123, 193, 255, 0.5);
  --running-card-bg: radial-gradient(circle at top left, rgba(62, 141, 222, 0.18), transparent 36%), linear-gradient(180deg, rgba(19, 41, 61, 0.98), rgba(11, 22, 33, 0.98));
  --running-card-bg-prominent: radial-gradient(circle at top left, rgba(62, 141, 222, 0.16), transparent 40%), linear-gradient(180deg, rgba(20, 43, 64, 0.98), rgba(10, 21, 31, 0.98));
  --running-card-shadow: 0 18px 40px rgba(4, 12, 18, 0.34);
  --running-card-shadow-prominent: 0 20px 42px rgba(4, 12, 18, 0.34);
  --spinner-border: rgba(220, 234, 255, 0.18);
  --spinner-top-border: #7bc1ff;
  --auth-section-border: #26384b;
  --auth-section-bg: rgba(14, 24, 36, 0.78);
  --status-ready-bg: #153c30;
  --status-ready-border: #209167;
  --status-attention-bg: #4f3113;
  --status-attention-border: #c98929;
  --status-attention-text: #ffebc6;
  --status-risk-low-bg: #173842;
  --status-risk-low-border: #2c7282;
  --status-risk-high-bg: #4a1820;
  --status-risk-high-border: #d65f6f;
  --status-risk-high-text: #ffe4e8;
  --warning-text-color: #fbbf24;
  --lint-panel-border: #30465e;
  --lint-panel-bg: rgba(12, 20, 30, 0.88);
  --lint-valid-border: rgba(32, 145, 103, 0.55);
  --lint-valid-bg: linear-gradient(180deg, rgba(13, 37, 30, 0.92), rgba(11, 24, 22, 0.92));
  --lint-invalid-border: rgba(154, 59, 71, 0.55);
  --lint-invalid-bg: linear-gradient(180deg, rgba(45, 18, 25, 0.9), rgba(27, 12, 16, 0.92));
  --lint-invalid-text: #f5d7dc;
  --toast-border: #2d5478;
  --toast-bg: #10263a;
  --import-summary-border: #274768;
  --import-summary-bg: #0e1824;
  --footer-link-color: #89a7c8;
  --footer-link-hover: #d7e8fb;
  --footer-separator: #5e7a97;
  --search-highlight-bg: rgba(111, 74, 255, 0.24);
  --search-highlight-text: #f7f9ff;
  --matrix-header-border: rgba(63, 103, 140, 0.45);
  --matrix-header-bg: linear-gradient(180deg, rgba(18, 37, 56, 0.92) 0%, rgba(13, 26, 40, 0.92) 100%);
  --matrix-header-shadow: inset 0 1px 0 rgba(125, 177, 230, 0.08);
  --matrix-header-hover-border: rgba(88, 138, 184, 0.72);
  --matrix-header-hover-shadow: inset 0 1px 0 rgba(165, 212, 255, 0.12), 0 0 0 1px rgba(58, 104, 147, 0.18);
  --matrix-input-bg: rgba(8, 18, 28, 0.88);
  --matrix-count-border: rgba(76, 120, 180, 0.45);
  --matrix-count-bg: rgba(16, 28, 42, 0.92);
  --matrix-pin-divider: rgba(97, 133, 168, 0.52);
  --matrix-pin-shadow: rgba(2, 10, 18, 0.34);
  --pin-surface: #132131;
  --scrollbar-track: #0f1722;
  --scrollbar-track-border: #223246;
  --scrollbar-thumb-start: #4b6d8f;
  --scrollbar-thumb-end: #385471;
  --scrollbar-thumb-hover-start: #5d84aa;
  --scrollbar-thumb-hover-end: #446482;
  --tab-scroll-track-start: #0f1721;
  --tab-scroll-track-end: #0b121b;
  --tab-scroll-track-border: rgba(40, 58, 79, 0.85);
  --tab-scroll-thumb-start: #6f98bf;
  --tab-scroll-thumb-end: #4b6f92;
  --tab-scroll-thumb-hover-start: #83acd2;
  --tab-scroll-thumb-hover-end: #5b7fa3;
  --success: #34d399;
  --danger: #ef4444;
  --method-get: #10b981;
  --method-post: #3b82f6;
  --method-put: #f59e0b;
  --method-patch: #8b5cf6;
  --method-delete: #ef4444;
  --method-head: #06b6d4;
  --method-options: #f97316;
}

:root[data-theme="light"] {
  color-scheme: light;
  --theme-name: light;
  --theme-is-dark: 0;
  --theme-is-light: 1;
  --bg: #f4f8fc;
  --bg-top: #ffffff;
  --bg-bottom: #e9f0f8;
  --panel: #ffffff;
  --panel-2: #f4f8fc;
  --panel-gradient-end: #e6eef8;
  --surface-1: #ffffff;
  --surface-2: #f4f8fc;
  --surface-3: #edf3fb;
  --surface-4: #f8fbff;
  --surface-hover: #e6f0fb;
  --surface-strong: #1f6cab;
  --surface-strong-hover: #165486;
  --border: #bfd0e2;
  --border-strong: #2d5f8f;
  --text: #102235;
  --text-strong: #0b1a29;
  --text-inverse: #f7fbff;
  --muted: #3e5973;
  --link: #155ba0;
  --accent: #1f6cab;
  --focus-ring: rgba(31, 108, 171, 0.2);
  --overlay: rgba(8, 18, 30, 0.35);
  --modal-surface: #f8fbff;
  --modal-border: #b9cade;
  --modal-shadow: 0 18px 44px rgba(16, 34, 53, 0.16);
  --drawer-surface: linear-gradient(180deg, #fbfdff, #eef4fb);
  --drawer-border: #b9cade;
  --drawer-shadow: 0 14px 38px rgba(16, 34, 53, 0.16);
  --left-rail-start: #f4f8fc;
  --left-rail-end: #edf3fb;
  --shell-card-border: rgba(31, 108, 171, 0.35);
  --shell-card-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 252, 0.98)),
    linear-gradient(120deg, rgba(31, 108, 171, 0.09), rgba(27, 83, 131, 0.08));
  --shell-card-shadow: 0 10px 24px rgba(16, 34, 53, 0.14);
  --brand-gradient-start: #1f6cab;
  --brand-gradient-end: #4f8ff7;
  --brand-shadow: 0 10px 24px rgba(31, 108, 171, 0.18);
  --primary-btn-bg: #18588d;
  --primary-btn-border: #2a6da7;
  --interactive-surface: #edf4fb;
  --interactive-surface-hover: #dfeaf6;
  --interactive-surface-border: #b7cce0;
  --tab-surface: #edf4fb;
  --tab-surface-active: #dbe9f8;
  --tab-border: #b9cade;
  --tab-border-active: #6b96c1;
  --button-subtle-border: #a8bfd6;
  --button-subtle-hover: #dfeaf6;
  --selection-surface: #dceaf8;
  --splitter-handle-bg: #d7e4f2;
  --splitter-handle-hover-bg: #c8d9eb;
  --menu-hover-bg: #dfeaf6;
  --menu-danger-hover-bg: #f8dce0;
  --menu-surface: #f8fbff;
  --menu-border: #b9cade;
  --menu-shadow: 0 12px 30px rgba(16, 34, 53, 0.16);
  --menu-danger-text: #9b2233;
  --input-label-color: #14324b;
  --copy-btn-color: #335c84;
  --copy-btn-hover-color: #173c5f;
  --info-banner-border: #a9c1da;
  --info-banner-bg: linear-gradient(180deg, rgba(247, 250, 254, 0.98) 0%, rgba(232, 240, 248, 0.98) 100%);
  --inline-secret-border: #bfd0e2;
  --inline-secret-bg: rgba(239, 245, 252, 0.98);
  --inline-secret-text: #14324b;
  --compact-action-border: rgba(110, 142, 177, 0.58);
  --compact-action-bg: rgba(226, 237, 248, 0.96);
  --compact-action-text: rgba(20, 50, 75, 0.82);
  --compact-action-hover-border: rgba(80, 126, 171, 0.7);
  --compact-action-hover-bg: rgba(211, 226, 241, 0.98);
  --compact-action-hover-text: rgba(11, 26, 41, 0.95);
  --request-dirty-bg: linear-gradient(180deg, #2f8ddd, #1f6cab);
  --request-dirty-shadow: 0 0 0 1px rgba(31, 108, 171, 0.16), 0 0 10px rgba(31, 108, 171, 0.18);
  --drop-target-border: rgba(80, 126, 171, 0.52);
  --drop-target-bg: rgba(218, 232, 245, 0.96);
  --drop-target-shadow: inset 0 0 0 1px rgba(80, 126, 171, 0.14);
  --hover-card-border: rgba(125, 156, 189, 0.58);
  --hover-card-bg: linear-gradient(180deg, rgba(251, 253, 255, 0.99), rgba(238, 244, 251, 0.99));
  --hover-card-shadow: 0 12px 30px rgba(16, 34, 53, 0.16);
  --button-default-border: #a8bfd6;
  --button-default-bg: #edf4fb;
  --button-default-hover-bg: #dfeaf6;
  --button-default-text: #102235;
  --button-danger-bg: #f8dce0;
  --button-danger-border: #d28c97;
  --editor-surface-border: #bfd0e2;
  --editor-surface-bg: #f8fbff;
  --editor-surface-text: #102235;
  --table-border-color: #d4dfeb;
  --placeholder-text: rgba(62, 89, 115, 0.6);
  --toggle-track-bg: #d9e6f2;
  --toggle-track-border: #9eb7d0;
  --toggle-thumb-bg: linear-gradient(180deg, #ffffff, #e6eef6);
  --toggle-thumb-shadow: 0 1px 2px rgba(16, 34, 53, 0.16);
  --toggle-active-bg: linear-gradient(135deg, #2b79b9, #1f6cab);
  --toggle-active-border: #5a93c5;
  --toggle-focus-outline: rgba(31, 108, 171, 0.72);
  --badge-border: #bfd0e2;
  --badge-bg: #edf4fb;
  --badge-text: #14324b;
  --badge-gql-bg: #efe4fb;
  --badge-gql-border: #b795da;
  --method-default-bg: #e6eff8;
  --method-get-bg: #dcf3ea;
  --method-get-border: #67b895;
  --method-post-bg: #dcecfb;
  --method-post-border: #6b9aca;
  --method-put-bg: #f6ead1;
  --method-put-border: #c7a159;
  --method-patch-bg: #ede0f7;
  --method-patch-border: #ad87c9;
  --method-delete-bg: #f8dce0;
  --method-delete-border: #cf8894;
  --method-head-bg: #d9eef1;
  --method-head-border: #69aab4;
  --method-options-bg: #f5e3d9;
  --method-options-border: #c89269;
  --running-card-text: #0b1a29;
  --running-card-border: rgba(80, 126, 171, 0.42);
  --running-card-bg: radial-gradient(circle at top left, rgba(31, 108, 171, 0.12), transparent 36%), linear-gradient(180deg, rgba(251, 253, 255, 0.98), rgba(235, 243, 250, 0.98));
  --running-card-bg-prominent: radial-gradient(circle at top left, rgba(31, 108, 171, 0.1), transparent 40%), linear-gradient(180deg, rgba(251, 253, 255, 0.98), rgba(232, 240, 248, 0.98));
  --running-card-shadow: 0 18px 40px rgba(16, 34, 53, 0.16);
  --running-card-shadow-prominent: 0 20px 42px rgba(16, 34, 53, 0.16);
  --spinner-border: rgba(80, 126, 171, 0.2);
  --spinner-top-border: #1f6cab;
  --auth-section-border: #bfd0e2;
  --auth-section-bg: rgba(247, 250, 254, 0.96);
  --status-ready-bg: #dcf3ea;
  --status-ready-border: #67b895;
  --status-attention-bg: #f8ebd6;
  --status-attention-border: #c89b46;
  --status-attention-text: #6c4d12;
  --status-risk-low-bg: #d9eef1;
  --status-risk-low-border: #69aab4;
  --status-risk-high-bg: #f8dce0;
  --status-risk-high-border: #d36a79;
  --status-risk-high-text: #7a1f2d;
  --warning-text-color: #9a6113;
  --lint-panel-border: #bfd0e2;
  --lint-panel-bg: rgba(248, 251, 255, 0.98);
  --lint-valid-border: rgba(103, 184, 149, 0.62);
  --lint-valid-bg: linear-gradient(180deg, rgba(235, 247, 241, 0.98), rgba(223, 243, 234, 0.98));
  --lint-invalid-border: rgba(207, 136, 148, 0.68);
  --lint-invalid-bg: linear-gradient(180deg, rgba(252, 239, 242, 0.98), rgba(248, 220, 224, 0.98));
  --lint-invalid-text: #7a1f2d;
  --toast-border: #a9c1da;
  --toast-bg: #f8fbff;
  --import-summary-border: #bfd0e2;
  --import-summary-bg: #f8fbff;
  --footer-link-color: #4b6d8f;
  --footer-link-hover: #173c5f;
  --footer-separator: #7c97b2;
  --search-highlight-bg: rgba(95, 111, 201, 0.22);
  --search-highlight-text: #102235;
  --matrix-header-border: rgba(125, 156, 189, 0.5);
  --matrix-header-bg: linear-gradient(180deg, rgba(247, 250, 254, 0.98) 0%, rgba(232, 240, 248, 0.98) 100%);
  --matrix-header-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  --matrix-header-hover-border: rgba(80, 126, 171, 0.62);
  --matrix-header-hover-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 0 0 1px rgba(80, 126, 171, 0.12);
  --matrix-input-bg: rgba(255, 255, 255, 0.98);
  --matrix-count-border: rgba(125, 156, 189, 0.48);
  --matrix-count-bg: rgba(233, 241, 249, 0.98);
  --matrix-pin-divider: rgba(100, 132, 163, 0.44);
  --matrix-pin-shadow: rgba(54, 88, 122, 0.18);
  --pin-surface: #eef4fb;
  --scrollbar-track: #edf3fb;
  --scrollbar-track-border: #c7d6e6;
  --scrollbar-thumb-start: #9cb5cf;
  --scrollbar-thumb-end: #7f9ab6;
  --scrollbar-thumb-hover-start: #89a9c8;
  --scrollbar-thumb-hover-end: #6687a7;
  --tab-scroll-track-start: #edf3fb;
  --tab-scroll-track-end: #e1eaf4;
  --tab-scroll-track-border: rgba(183, 204, 224, 0.9);
  --tab-scroll-thumb-start: #97b2cd;
  --tab-scroll-thumb-end: #7695b2;
  --tab-scroll-thumb-hover-start: #84a7c9;
  --tab-scroll-thumb-hover-end: #5f84ab;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, var(--bg-top) 0%, var(--bg) 38%, var(--bg-bottom) 100%);
  color: var(--text);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  min-height: 100%;
}

html {
  scrollbar-color: var(--scrollbar-thumb-end) var(--scrollbar-track);
  scrollbar-width: thin;
}

* {
  scrollbar-color: var(--scrollbar-thumb-end) var(--scrollbar-track);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-left: 1px solid var(--scrollbar-track-border);
  border-top: 1px solid var(--scrollbar-track-border);
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--scrollbar-thumb-start) 0%, var(--scrollbar-thumb-end) 100%);
  border: 2px solid var(--scrollbar-track);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--scrollbar-thumb-hover-start) 0%, var(--scrollbar-thumb-hover-end) 100%);
}

*::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

a {
  color: var(--link);
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.app-frame {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 100vh;
}

.left-nav-rail {
  grid-column: 1;
  grid-row: 1 / span 2;
  /* Card #966 (round 5 design ruling): .app-frame no longer pins itself to a fixed 100vh, so a
     tall workspace page can grow past one viewport and the document itself scrolls. Without an
     explicit height here, this rail (spanning both app-frame rows) would stretch to match that
     tall content instead of staying a normal one-viewport sidebar. position:sticky + a fixed
     height keeps the nav rail's own look (visible for a full viewport, scrolls its own overflow
     internally) while the page scrolls past/under it. */
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  background: linear-gradient(180deg, var(--left-rail-start) 0%, var(--left-rail-end) 100%);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.rail-logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #061327;
  box-shadow: var(--brand-shadow);
  align-self: center;
}

.rail-logo-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.rail-links {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 10px;
}

.rail-bottom {
  margin-top: auto;
  align-items: stretch;
}

.rail-link {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 36px;
  min-width: 0;
  width: 100%;
  padding: 9px 10px;
  color: var(--text);
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 12px;
  line-height: 1.2;
  word-break: break-word;
}

.rail-link-standalone {
  justify-content: center;
  font-weight: 700;
  background: var(--surface-2);
  border-color: var(--border);
}

.rail-link-button {
  width: 100%;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.rail-link:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--text);
}

.rail-link-locked {
  justify-content: space-between;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.rail-link-pending {
  justify-content: space-between;
  background: transparent;
  cursor: default;
  opacity: 0.7;
}

.rail-lock-marker {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.locked-navigation-backdrop {
  position: fixed;
  inset: 0;
  z-index: 930;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
}

.locked-navigation-dialog {
  width: min(520px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  box-shadow: var(--modal-shadow);
}

.locked-navigation-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.locked-navigation-heading h2,
.locked-navigation-heading p {
  margin-top: 0;
}

.locked-navigation-member-guidance {
  align-self: center;
}

.settings-nav-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  object-fit: contain;
  border-radius: 5px;
}

.rail-settings-action {
  align-self: flex-end;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
}

.rail-settings-action:hover {
  background: transparent;
  opacity: 0.82;
}

.settings-bottom-nav-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  object-fit: contain;
  background: transparent;
}

.rail-nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.rail-group-toggle {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.rail-group-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

.rail-group-links {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.rail-child-link {
  min-height: 32px;
  font-size: 11px;
}

.app-main {
  grid-column: 2;
  grid-row: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow-x: hidden;
}

.app-shell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tester-mode-global-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--status-attention-border);
  border-radius: 8px;
  background: var(--status-attention-bg);
  color: var(--status-attention-text);
  font-size: 0.9rem;
}

.tester-mode-global-banner span {
  color: var(--text);
}

.shell-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.theme-toggle-btn {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-4);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.theme-toggle-btn:hover {
  background: var(--surface-hover);
}

.help-button {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-3);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.help-button:hover {
  background: var(--surface-hover);
}

.help-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 900;
}

.help-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 901;
  width: min(420px, calc(100vw - 24px));
  min-width: min(320px, calc(100vw - 24px));
  max-width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  min-height: 0;
  isolation: isolate;
  background-color: var(--modal-surface);
  color: var(--text);
  border-left: 1px solid var(--border-strong);
  box-shadow: var(--modal-shadow);
  resize: horizontal;
  overflow: auto;
}

.help-drawer-position-left {
  inset: 0 auto 0 0;
  border-left: 0;
  border-right: 1px solid var(--border-strong);
}

.help-drawer-expanded {
  inset: 16px;
  width: auto;
  max-width: none;
  height: auto;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  resize: both;
}

.help-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.help-drawer-title-block {
  flex: 1 1 180px;
  min-width: 0;
}

.help-drawer-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1 1 150px;
  gap: 6px;
  min-width: 0;
}

.help-drawer-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.help-reviewed-date {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.help-drawer-close {
  flex: 0 0 auto;
}

.help-search-row {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.help-resize-hint {
  margin: 8px 0 0;
  font-size: 12px;
}

.help-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background-color: var(--modal-surface);
}

.help-how-to,
.help-examples,
.help-terms,
.help-video-section {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
}

.help-how-to-header {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
}

.help-how-to-header h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.help-how-to p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.help-quick-steps {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--text);
}

.help-quick-steps li {
  line-height: 1.4;
}

.help-examples {
  display: grid;
  gap: 12px;
}

.help-terms {
  display: grid;
  gap: 12px;
}

.help-term-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.help-term-row {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-3);
}

.help-term-row dt {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.help-term-row dd {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.help-video-section {
  display: grid;
  gap: 12px;
}

.help-video-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 12px;
}

.help-video-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.25;
}

.help-video-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.4;
}

.help-video-duration {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.help-video-open {
  min-width: 76px;
}

.help-video-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 920;
  background: rgba(0, 0, 0, 0.45);
}

.help-video-modal {
  position: fixed;
  z-index: 921;
  top: 50%;
  left: 50%;
  width: min(720px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  border: 1px solid var(--modal-border);
  border-radius: 8px;
  background: var(--modal-surface);
  color: var(--text);
  box-shadow: var(--modal-shadow);
  padding: 16px;
}

.help-video-modal .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.help-video-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.help-video-modal-header h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.help-video-player {
  width: 100%;
  max-height: 360px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #0f172a;
}

.help-video-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.help-video-actions p {
  margin: 0;
  flex: 1 1 280px;
}

.help-video-visible-actions {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 12px;
}

.help-video-visible-actions h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.help-video-visible-actions ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.help-video-visible-actions li {
  line-height: 1.35;
}

.help-video-visible-actions span {
  display: block;
  color: var(--text-muted);
}

.help-video-visible-actions strong {
  display: block;
  overflow-wrap: anywhere;
}

.help-video-transcript {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.help-video-transcript h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.help-video-transcript p,
.help-video-modal > p {
  margin: 0;
  line-height: 1.45;
}

.help-example {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 12px;
  min-width: 0;
}

.help-example h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.25;
}

.help-example p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.help-example-steps {
  display: grid;
  gap: 7px;
  margin: 10px 0;
  padding-left: 22px;
  color: var(--text);
}

.help-example-steps li {
  line-height: 1.4;
}

.help-example-verification {
  color: var(--muted);
}

@media (max-width: 420px) {
  .help-video-card {
    grid-template-columns: 1fr;
  }

  .help-video-open {
    width: 100%;
  }

  .help-video-modal {
    width: min(100vw - 20px, 400px);
    max-height: calc(100vh - 20px);
    padding: 12px;
  }
}

.help-article {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
}

.help-article h3 {
  margin: 6px 0;
  font-size: 16px;
  line-height: 1.25;
}

.help-article p {
  margin: 0 0 10px;
  color: var(--muted);
}

.help-article-note {
  font-size: 12px;
  color: var(--text);
}

.help-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}

.shell-account {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: min(100%, 420px);
  max-width: min(100%, 420px);
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid var(--shell-card-border);
  background: var(--shell-card-bg);
  box-shadow: var(--shell-card-shadow);
}

.shell-account-compact {
  min-width: 0;
}

.shell-avatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text-inverse);
  background: linear-gradient(145deg, var(--brand-gradient-start) 0%, var(--brand-gradient-end) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.shell-account-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  min-width: 0;
}

.shell-account-namegroup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 8px;
}

.shell-account-namegroup:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.shell-account-name {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.shell-account-actions {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 8px;
}

.shell-account-tier {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  min-height: 26px;
  padding: 2px 8px;
  border: 1px solid var(--button-subtle-border);
  border-radius: 7px;
  background: var(--interactive-surface);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-account-tier:hover {
  background: var(--interactive-surface-hover);
  border-color: var(--accent);
}

.shell-account-workspace {
  flex: 1 1 auto;
  min-width: 0;
}

.shell-workspace-switcher {
  position: relative;
  width: 100%;
  min-width: 0;
}

.shell-workspace-current {
  width: 100%;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid var(--button-subtle-border);
  background: var(--interactive-surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.shell-workspace-current span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-workspace-chevron {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.shell-workspace-current:hover {
  background: var(--interactive-surface-hover);
  border-color: var(--accent);
}

.shell-workspace-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  right: 0;
  width: min(280px, calc(100vw - 24px));
  max-height: min(360px, calc(100vh - 120px));
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--shell-card-border);
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
}

.shell-workspace-menu-item {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.shell-workspace-menu-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-workspace-menu-item small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}

.shell-workspace-menu-item:hover,
.shell-workspace-menu-item.active {
  background: var(--surface-hover);
}

.shell-workspace-create {
  justify-content: center;
  margin-top: 4px;
  border-top: 1px solid var(--border);
  color: var(--accent);
  font-weight: 700;
}

.shell-account-signout {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--shell-card-border);
  background: var(--surface-4);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.shell-account-session {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.shell-account-signout:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

.workspace-page {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.workspace-shell {
  display: grid;
  grid-template-columns: minmax(280px, var(--workspace-explorer-width, 336px)) minmax(0, 1fr);
  align-items: stretch;
  flex: 1 1 auto;
  gap: 12px;
  width: 100%;
  min-height: 0;
  min-width: 0;
}

.workspace-explorer-host {
  position: relative;
  display: flex;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: visible;
}

.workspace-main {
  /* Card #966 (round 5 design ruling): this used to be a viewport-height cage (height:100% of
     an ancestor chain pinned to 100vh, overflow-y:auto scrolling internally) so every section
     below had to fight over a fixed budget. There is no fixed height anywhere above this now, so
     grid-template-rows: auto sizes each row - action row, tab strip, active content - to its own
     natural height, and this element grows with its content instead of scrolling internally; the
     actual page (html/body) scrolls when the content is taller than the viewport. */
  display: grid;
  grid-template-rows: auto auto auto;
  align-self: stretch;
  gap: 10px;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  padding-right: 4px;
  padding-bottom: 18px;
}

.workspace-main-caged {
  /* The folder-auth and environment matrix editors keep their pre-round-5 bounded-height,
     internally-scrolling layout (WorkspaceShell.razor picks this class for them) - only the
     request/response layout goes fully to natural height and page scrolling. */
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.workspace-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.workspace-action-row-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.workspace-action-groups {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.workspace-settings-gear-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.workspace-settings-gear-action:hover,
.workspace-settings-gear-action:focus-visible {
  background: transparent;
  opacity: 0.82;
}

.workspace-settings-gear-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.workspace-settings-gear-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  object-fit: contain;
  background: transparent;
}

.request-tools-dropdown {
  min-width: 180px;
}

.workspace-secondary-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.workspace-secondary-modal-medium {
  width: min(980px, calc(100vw - 64px));
  height: min(78vh, 820px);
}

.workspace-secondary-modal-expanded {
  width: min(1040px, calc(100vw - 32px));
  height: min(86vh, 900px);
}

.workspace-secondary-modal-large {
  width: min(1280px, calc(100vw - 64px));
  height: min(86vh, 940px);
}

.workspace-secondary-modal-body {
  min-height: 0;
  overflow: auto;
}

.modal-card.workspace-variables-modal {
  width: min(1500px, calc(100vw - 64px));
  max-width: 1500px;
  min-width: 0;
  height: min(86vh, 980px);
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

@media (max-width: 480px) {
  .modal-card.workspace-variables-modal {
    width: calc(100vw - 16px);
    padding: 8px;
  }
}

.workspace-variables-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.workspace-variables-modal-header h3 {
  margin: 0 0 6px;
}

.workspace-variables-modal-header .muted {
  margin: 0;
}

.workspace-variables-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.workspace-variables-modal-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.workspace-variables-modal-body.workspace-secondary-modal-body {
  overflow: auto;
}

.workspace-variables-modal-body .matrix-panel {
  border: 0;
  min-height: 0;
}

.panel {
  border: 1px solid var(--border);
  background-color: var(--panel);
  background-image: linear-gradient(180deg, var(--panel) 0%, var(--panel-gradient-end) 100%);
  border-radius: 12px;
  padding: 10px;
}

.workspace-explorer {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.workspace-explorer-content {
  display: grid;
  gap: 12px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.workspace-explorer::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

.workspace-explorer::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-left: 1px solid var(--scrollbar-track-border);
}

.workspace-explorer::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--scrollbar-thumb-start) 0%, var(--scrollbar-thumb-end) 100%);
  border: 2px solid var(--scrollbar-track);
  border-radius: 999px;
}

.workspace-explorer::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--scrollbar-thumb-hover-start) 0%, var(--scrollbar-thumb-hover-end) 100%);
}

.workspace-explorer-edge-resizer {
  position: absolute;
  top: 0;
  right: -14px;
  bottom: 0;
  width: 14px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: ew-resize;
  z-index: 1;
}

.workspace-explorer-edge-resizer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(63, 169, 245, 0.08) 0%, rgba(63, 169, 245, 0.22) 50%, rgba(63, 169, 245, 0.08) 100%);
  transition: background 120ms ease, width 120ms ease;
}

.workspace-explorer-edge-resizer:hover::before {
  width: 2px;
  background: linear-gradient(180deg, rgba(63, 169, 245, 0.2) 0%, rgba(63, 169, 245, 0.46) 50%, rgba(63, 169, 245, 0.2) 100%);
}

.explorer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.explorer-header h3 {
  margin: 0;
  font-size: 16px;
}

.explorer-group h4 {
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.explorer-section-header {
  border-radius: 8px;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.request-drop-zone {
  border: 1px dashed transparent;
  padding: 0 4px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.line-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.request-row {
  display: block;
  min-width: 0;
  max-width: 100%;
}

.request-row.dragging {
  opacity: 0.55;
}

.request-row.active .link-btn {
  border-color: var(--border-strong);
  box-shadow: inset 0 0 0 1px var(--focus-ring);
  background: var(--selection-surface);
}

.environment-row-btn.active {
  border-color: var(--border-strong);
  box-shadow: inset 0 0 0 1px var(--focus-ring);
  background: var(--selection-surface);
}

.request-row-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.link-btn.request-open-btn {
  box-sizing: border-box;
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  min-width: 0;
  overflow: hidden;
}

.request-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: 28px;
  min-width: 28px;
  flex: 0 0 28px;
}

.folder-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.folder-open-btn {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-open-btn:hover {
  color: var(--text-strong);
}

.folder-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.folder-tree-level {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.folder-children {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 22px;
  padding-left: 6px;
  border-left: 1px solid var(--border);
  min-width: 0;
  width: calc(100% - 22px);
  max-width: 100%;
  box-sizing: border-box;
}

.folder-children.collapsed {
  display: none;
}

.folder-children > .line-list {
  margin-left: 8px;
  min-width: 0;
  max-width: calc(100% - 8px);
}

.folder-children > .line-list .link-btn {
  margin-left: 18px;
  width: calc(100% - 18px);
}

.folder-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.folder-toggle.active {
  border-color: var(--border-strong);
  box-shadow: inset 0 0 0 1px var(--focus-ring);
  background: var(--selection-surface);
}

.folder-caret-btn {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 22px;
  padding: 0;
  font-size: 12px;
}

.folder-caret-btn:hover {
  background: var(--interactive-surface-hover);
  color: var(--text);
}

.folder-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.toolbar-menu {
  position: relative;
  display: inline-flex;
}

.menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.menu-caret {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.compact-icon {
  min-width: 28px;
  min-height: 28px;
  padding: 4px 8px;
}

.folder-actions .compact-icon {
  min-width: 24px;
  min-height: 24px;
  padding: 2px 6px;
  border-radius: 6px;
  border-color: var(--compact-action-border);
  background: var(--compact-action-bg);
  color: var(--compact-action-text);
  box-shadow: none;
  font-size: 12px;
  line-height: 1;
}

.request-actions .compact-icon {
  min-width: 24px;
  min-height: 24px;
  padding: 2px 6px;
  border-radius: 6px;
  border-color: var(--compact-action-border);
  background: var(--compact-action-bg);
  color: var(--compact-action-text);
  box-shadow: none;
  font-size: 12px;
  line-height: 1;
}

.folder-actions .compact-icon:hover {
  border-color: var(--compact-action-hover-border);
  background: var(--compact-action-hover-bg);
  color: var(--compact-action-hover-text);
}

.request-actions .compact-icon:hover {
  border-color: var(--compact-action-hover-border);
  background: var(--compact-action-hover-bg);
  color: var(--compact-action-hover-text);
}

.folder-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  display: grid;
  gap: 4px;
  min-width: 150px;
  max-height: var(--workspace-explorer-menu-max-height, none);
  padding: 6px;
  border: 1px solid var(--menu-border);
  border-radius: 10px;
  background: var(--menu-surface);
  box-shadow: var(--menu-shadow);
  z-index: 20;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.folder-menu.open-up {
  top: auto;
  bottom: calc(100% + 4px);
}

.folder-menu.align-left {
  left: 0;
  right: auto;
}

.folder-menu.align-right {
  left: auto;
  right: 0;
}

.toolbar-dropdown {
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  min-width: 140px;
}

.toolbar-dropdown.open-up {
  top: auto;
  bottom: calc(100% + 6px);
}

.folder-menu-item {
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  border-radius: 8px;
  padding: 7px 9px;
  cursor: pointer;
  font: inherit;
}

.folder-menu-item:hover {
  background: var(--menu-hover-bg);
}

/* Card #1095: a disabled (entitlement-locked) menu item, e.g. "Run Collection"
   on Free tier, must read as disabled — the base rule's explicit color/cursor
   otherwise makes it look identical to the enabled items. */
.folder-menu-item:disabled {
  color: var(--muted);
  opacity: 0.55;
  cursor: not-allowed;
}

.folder-menu-item:disabled:hover {
  background: transparent;
}

.folder-menu-item.danger {
  color: var(--menu-danger-text);
}

.folder-menu-item.danger:hover {
  background: var(--menu-danger-hover-bg);
}

.folder-name-input {
  width: 100%;
}

.folder-description-input {
  width: 100%;
  min-height: 84px;
  resize: vertical;
}

.command-name {
  width: min(560px, 100%);
  min-width: 260px;
  max-width: 100%;
}

.command-tags {
  width: min(560px, 100%);
  min-width: 260px;
  max-width: 100%;
}

.command-description {
  width: min(560px, 100%);
  min-width: 260px;
  max-width: 100%;
  min-height: 72px;
  resize: vertical;
}

.link-btn {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--interactive-surface-border);
  background: var(--interactive-surface);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  min-width: 0;
}

.link-btn:hover {
  background: var(--interactive-surface-hover);
}

.request-name-label,
.environment-name-label {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-dirty-indicator {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--request-dirty-bg);
  box-shadow: var(--request-dirty-shadow);
  flex: 0 0 8px;
}

.drop-target {
  border-color: var(--drop-target-border) !important;
  background: var(--drop-target-bg) !important;
  box-shadow: var(--drop-target-shadow);
}

.tab-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
  min-height: 56px;
  height: 56px;
  padding: 8px 10px;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  height: auto;
  min-height: 0;
  align-self: center;
  scrollbar-width: thin;
  scrollbar-color: var(--tab-scroll-thumb-end) var(--tab-scroll-track-start);
}

.tabs::-webkit-scrollbar {
  height: 12px;
}

.tabs::-webkit-scrollbar-track {
  background: linear-gradient(180deg, var(--tab-scroll-track-start), var(--tab-scroll-track-end));
  border-radius: 999px;
  border: 1px solid var(--tab-scroll-track-border);
}

.tabs::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--tab-scroll-thumb-start), var(--tab-scroll-thumb-end));
  border-radius: 999px;
  border: 2px solid var(--tab-scroll-track-start);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tabs::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--tab-scroll-thumb-hover-start), var(--tab-scroll-thumb-hover-end));
}

.tabs::-webkit-scrollbar-corner {
  background: transparent;
}

.tab-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  max-width: 360px;
  border: 1px solid var(--tab-border);
  background: var(--tab-surface);
  border-radius: 8px;
  color: var(--text);
  min-height: 36px;
  padding: 8px 12px;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
}

.tab-item.active {
  border-color: var(--tab-border-active);
  background: var(--tab-surface-active);
}

.tab-item-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.close-btn {
  flex: 0 0 auto;
  color: var(--muted);
  padding-left: 2px;
}

.dirty-dot {
  color: var(--warning-text-color);
  font-weight: 700;
}

.tab-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
  align-items: center;
  align-self: center;
  justify-self: end;
  flex-wrap: nowrap;
  white-space: nowrap;
  height: auto;
  min-height: 0;
}

.tab-actions > .action-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  text-wrap: nowrap;
  min-height: 30px;
  height: 30px;
  align-self: center;
}

.command-bar,
.toolbar-row,
.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.home-support-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-version-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-4);
  color: var(--text);
}

.home-version-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-version-chip code {
  color: var(--text-strong);
  font-family: "IBM Plex Mono", "Cascadia Code", monospace;
  font-size: 0.92rem;
}

.home-positioning h2 {
  max-width: 980px;
  margin: 4px 0 10px;
  font-size: 1.55rem;
  line-height: 1.2;
}

.home-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
}

.home-feature-grid,
.pricing-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.home-feature-card,
.pricing-plan-card {
  min-width: 0;
}

.pricing-plan-context-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.pricing-navigation-context {
  border-color: var(--accent);
}

.pricing-plan-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.home-feature-card h2,
.pricing-plan-card h2,
.pricing-comparison-panel h2,
.account-pricing-current h2 {
  font-size: 1.05rem;
}

.pricing-plan-card h2 {
  margin: 0;
}

.account-tier-summary {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-strong);
}

.pricing-plan-price {
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.pricing-plan-price-summary {
  margin: 0;
  color: var(--text-strong);
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.pricing-plan-price-details {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.35;
}

.pricing-plan-price-details li,
.pricing-plan-positioning,
.pricing-metered-detail {
  overflow-wrap: anywhere;
}

.pricing-public-actions,
.pricing-plan-actions {
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
}

.tester-mode-switcher {
  display: grid;
  gap: 10px;
}

.tester-mode-banner-inline {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--status-attention-border);
  border-radius: 8px;
  background: var(--status-attention-bg);
  color: var(--status-attention-text);
  font-weight: 800;
}

.tester-mode-plan-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pricing-plan-actions {
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

.pricing-plan-action-note {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.pricing-plan-current {
  cursor: default;
  opacity: 0.72;
}

.locked-state-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--status-attention-border);
  border-radius: 8px;
  background: rgba(79, 49, 19, 0.16);
  padding: 12px;
  color: var(--text);
}

.locked-state-panel:focus-visible {
  outline: 2px solid var(--toggle-focus-outline);
  outline-offset: 3px;
}

.locked-state-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.locked-state-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 26px;
  border: 1px solid var(--status-attention-border);
  border-radius: 999px;
  background: var(--status-attention-bg);
  color: var(--status-attention-text);
  font-size: 0.72rem;
  font-weight: 800;
}

.locked-state-title {
  min-width: 0;
}

.locked-state-title h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.locked-state-title p,
.locked-state-explanation {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.locked-state-reason {
  max-width: 100%;
  text-align: center;
  white-space: normal;
}

.locked-state-details {
  margin: 0;
}

.locked-state-preview {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 10px;
}

.locked-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.locked-state-next-action {
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

@media (max-width: 420px) {
  .locked-state-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .locked-state-status,
  .locked-state-reason {
    justify-self: start;
  }
}

.pricing-plan-ad-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.25;
}

.pricing-plan-ad-status::before {
  content: "";
  flex: 0 0 auto;
  inline-size: 8px;
  block-size: 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
}

.pricing-metered-detail {
  margin: 0;
  padding-block-start: 8px;
  border-block-start: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.4;
}

.pricing-guardrail-list {
  margin: 0;
  padding-left: 16px;
}

.pricing-guardrail-list li {
  overflow-wrap: anywhere;
}

.table-scroll {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.audit-activity-page,
.audit-activity-page .panel,
.audit-activity-page .toolbar-row {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.audit-activity-page .toolbar-row > * {
  max-width: 100%;
}

.audit-activity-page .content-copy-shell {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.audit-activity-page .content-copy-shell pre {
  max-width: 100%;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pricing-comparison-table {
  min-width: 860px;
}

.pricing-comparison-table th {
  text-align: left;
  vertical-align: top;
}

.command-bar {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.command-bar-name-row,
.command-bar-request-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.command-bar-name-row {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.command-bar-request-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
  position: relative;
  isolation: isolate;
}

.command-bar-request-main {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.command-bar-request-prefix {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  min-width: max-content;
  position: relative;
  z-index: 3;
}

.command-url-field-shell {
  position: relative;
  display: grid;
  gap: 4px;
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  z-index: 1;
}

.command-url-field-shell > .field {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.field.invalid {
  border-color: var(--status-risk-high-border);
}

.command-url-validation-message {
  margin: 0;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.command-url-hover-card {
  position: fixed;
  left: 0;
  right: auto;
  top: 0;
  bottom: auto;
  transform: translateY(-100%);
  z-index: 40;
  width: max-content;
  max-width: min(720px, calc(100vw - 160px));
  padding: 10px 12px;
  border: 1px solid var(--hover-card-border);
  border-radius: 10px;
  background: var(--hover-card-bg);
  box-shadow: var(--hover-card-shadow);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
  pointer-events: none;
}

.command-bar-trailing-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 0;
  justify-self: end;
  position: relative;
  z-index: 3;
}

.command-bar-trailing-actions > * {
  flex: 0 0 auto;
  white-space: nowrap;
}

.command-bar-trailing-actions > .action-btn {
  padding: 8px 9px;
}

.matrix-toolbar-row {
  align-items: center;
}

.matrix-import-target-modal {
  width: min(560px, calc(100vw - 48px));
}

.input-label {
  display: block;
  margin-bottom: 8px;
  color: var(--input-label-color);
  font-size: 13px;
  font-weight: 700;
}

.button-column {
  display: grid;
  gap: 8px;
}

.field {
  border: 1px solid var(--border-strong);
  background: var(--surface-4);
  border-radius: 8px;
  color: var(--text-strong);
  min-height: 36px;
  padding: 8px 12px;
  line-height: 1.25;
}

.field.compact {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

select.field {
  min-width: 92px;
  padding-right: 30px;
}

.field.grow {
  flex: 1;
}

.action-btn,
.icon-btn {
  border: 1px solid var(--button-default-border);
  background: var(--button-default-bg);
  color: var(--button-default-text);
  border-radius: 8px;
  min-height: 34px;
  padding: 8px 12px;
  cursor: pointer;
  line-height: 1.2;
}

.action-btn:hover,
.icon-btn:hover {
  background: var(--button-default-hover-bg);
}

.action-btn.primary {
  background: var(--primary-btn-bg);
  border-color: var(--primary-btn-border);
}

.action-btn.subtle {
  background: transparent;
  border-color: var(--button-subtle-border);
  color: var(--muted);
}

.action-btn.subtle:hover {
  background: var(--button-subtle-hover);
  color: var(--text);
}

.help-drawer .help-drawer-close {
  background: var(--button-default-bg);
  border-color: var(--button-default-border);
  color: var(--button-default-text);
}

.help-drawer .help-drawer-close:hover {
  background: var(--button-default-hover-bg);
  color: var(--button-default-text);
}

.action-btn.disabled,
.action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.workspace-group-btn-unavailable {
  opacity: 0.55;
  cursor: help;
}

.action-btn.danger,
.icon-btn.danger {
  background: var(--button-danger-bg);
  border-color: var(--button-danger-border);
}

.action-btn.small,
.icon-btn {
  font-size: 12px;
  min-height: 30px;
  padding: 6px 10px;
}

.compact-square-icon-btn {
  width: 30px;
  min-width: 30px;
  max-width: 30px;
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 8px;
  line-height: 1;
}

/* Card #983: the pre-#966 340px floor here left a large dead gap under short tabs (e.g.
   Params with a single row). The editor sizes to its active tab's natural content height,
   consistent with the rest of the #966 natural-height model. */

.workspace-folder-layout,
.workspace-environment-layout {
  position: relative;
  display: grid;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.workspace-request-layout {
  /* Card #966 (round 5 design ruling): this used to be a fixed-height, overflow:hidden grid
     (fed by fr-weighted rows in WorkspaceShell.razor) that rationed a fixed pixel budget between
     the editor and response sections via a drag splitter. There is no budget to ration anymore -
     the editor and response sections each render at their own natural content height, stacked in
     normal document flow, and the page scrolls when the total is taller than the viewport. */
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.workspace-environment-layout .matrix-panel {
  height: 100%;
  min-height: 0;
}

.workspace-metadata-fields {
  display: grid;
  gap: 12px;
  width: min(680px, 100%);
}

.workspace-create-workspace-panel {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.workspace-danger-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.workspace-danger-zone .field {
  width: min(420px, 100%);
  min-width: 0;
}

.workspace-metadata-field-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.workspace-metadata-description-row {
  align-items: start;
}

.workspace-metadata-description-row .field-label {
  padding-top: 8px;
}

.workspace-metadata-field-row .field {
  width: 100%;
  min-width: 0;
}

.workspace-metadata-field-help {
  grid-column: 2;
  margin: -4px 0 0;
}

.workspace-metadata-description {
  min-height: 56px;
  resize: vertical;
}

@media (max-width: 720px) {
  .workspace-metadata-field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .workspace-metadata-description-row .field-label {
    padding-top: 0;
  }

  .workspace-metadata-field-help {
    grid-column: 1;
  }

  .workspace-danger-zone {
    grid-template-columns: minmax(0, 1fr);
  }
}

.workspace-editor-pane,
.workspace-folder-editor-pane,
.workspace-response-pane {
  min-height: 0;
}

.workspace-folder-editor-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-gutter: stable;
  height: 100%;
}

/* Card #966 (round 5 design ruling): the editor pane no longer scrolls internally or fights
   for a capped height (see the #955 comment this replaces, in git history for context) - it
   grows to its natural content height as part of the normal document flow, and the page scrolls.
   The order properties below are a genuine visual choice, not a height workaround: they keep the
   command bar first and push the AI-draft-review card and any warning/preview cards below the
   editor even though the command bar component renders some of them earlier in the DOM. */
.workspace-editor-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workspace-editor-pane .editor {
  order: 2;
}

.workspace-editor-pane > .command-bar {
  order: 1;
  flex: 0 0 auto;
  /* Card #1140: .command-bar-request-row's `isolation: isolate` traps the Tools
     dropdown's z-index inside the command bar's own stacking context. Flex items
     paint in order-modified order, so .editor (order: 2) painted on top of the
     command bar (order: 1) even though both are z-index: auto. Giving the command
     bar an explicit stacking context above .editor lets the dropdown paint over it. */
  position: relative;
  z-index: 2;
}

.workspace-editor-pane > .warning-text,
.workspace-editor-pane > [data-testid="request-execution-preview-card"],
.workspace-editor-pane > [data-testid="request-variable-resolution-card"],
.workspace-editor-pane > .workspace-pane-region:not(.editor) {
  order: 3;
  flex: 0 0 auto;
}

.workspace-folder-editor-pane > .folder-auth-shell {
  min-height: 0;
  align-content: start;
}

.lifecycle-panel {
  max-height: min(170px, 24vh);
  overflow: hidden;
}

.lifecycle-panel-body {
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.lifecycle-panel .toolbar-row {
  align-items: center;
}

.lifecycle-panel .toolbar-row > .input-field,
.lifecycle-panel .toolbar-row > .field,
.lifecycle-panel .toolbar-row > select {
  min-width: 176px;
  flex: 1 1 176px;
  max-width: 100%;
}

.lifecycle-panel .toolbar-row > .action-btn {
  flex: 0 0 auto;
}

.workspace-response-pane {
  display: flex;
  overflow-x: hidden;
}

.workspace-pane-region {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.workspace-pane-region-header {
  display: flex;
  flex-shrink: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.workspace-pane-region-header h3 {
  margin: 0;
  font-size: 14px;
}

.workspace-pane-region-header .muted {
  margin: 4px 0 0;
  font-size: 12px;
}

.collaboration-panel {
  min-height: 0;
  height: 100%;
  overflow: visible;
}

.collaboration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  grid-auto-rows: minmax(0, auto);
  align-content: start;
  gap: 12px;
  flex: 0 0 auto;
  min-height: max-content;
  overflow: visible;
}

.collaboration-grid > section {
  display: grid;
  gap: 6px;
  min-height: max-content;
}

.collaboration-grid h4,
.collaboration-grid p {
  margin: 0;
}

.collaboration-grid .line-list {
  max-height: none;
  overflow: visible;
}

.collaboration-grid .toolbar-row {
  align-items: center;
}

.collaboration-grid .field {
  min-width: min(220px, 100%);
}

.workspace-ai-review-card {
  flex: 0 0 auto;
  max-height: min(130px, 18vh);
  overflow: hidden;
}

.workspace-ai-review-body {
  display: grid;
  gap: 10px;
  max-height: min(72px, 10vh);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.workspace-response-region {
  width: 100%;
  gap: 8px;
}

.workspace-response-panel-stack {
  /* Card #966 (round 5 design ruling): flex:1 1 0 used to grow this stack to fill the leftover
     height inside a fixed-height viewport cage. With no fixed height left anywhere above it, a
     flex-basis of 0 on an auto-height ancestor chain can under-size the container relative to its
     own content (a flexbox auto-sizing quirk) instead of just hugging that content, so this is a
     plain block-like flex row now. */
  display: flex;
  width: 100%;
}

.workspace-response-panel-instance {
  width: 100%;
}

.workspace-response-panel-instance.hidden {
  display: none;
}

.workspace-response-pane .workspace-response-region .response-panel {
  width: 100%;
}

.workspace-resize-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  cursor: ns-resize;
}

body.workspace-explorer-resizing {
  cursor: ew-resize;
  user-select: none;
}

body.workspace-section-content-resizing {
  cursor: ns-resize;
  user-select: none;
}

.editor {
  position: relative;
}

.section-content {
  min-height: 0;
}

.section-content-resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 10px;
  cursor: ns-resize;
  z-index: 1;
}

.section-content-resize-handle::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(63, 169, 245, 0.08) 0%, rgba(63, 169, 245, 0.22) 50%, rgba(63, 169, 245, 0.08) 100%);
  transition: background 120ms ease, height 120ms ease;
}

.section-content-resize-handle:hover::before {
  height: 2px;
  background: linear-gradient(90deg, rgba(63, 169, 245, 0.2) 0%, rgba(63, 169, 245, 0.46) 50%, rgba(63, 169, 245, 0.2) 100%);
}

.section-tabs {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  margin-bottom: 10px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.testing-section-tabs {
  overflow-x: auto;
  padding-bottom: 2px;
}

.testing-section-tabs .section-tab {
  flex: 0 0 auto;
}

.section-tab {
  flex: 0 0 auto;
  border: 1px solid var(--tab-border);
  background: var(--tab-surface);
  color: var(--text);
  border-radius: 8px;
  min-height: 34px;
  padding: 7px 12px;
  cursor: pointer;
  line-height: 1.2;
}

.workspace-explorer input.field.compact {
  width: 100%;
}

.section-tab.active {
  background: var(--tab-surface-active);
  border-color: var(--tab-border-active);
}

.automation-center-page,
.automation-center-panel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .automation-center-navigation {
    flex: 1 1 100%;
    width: 100%;
  }
}

.editor-area {
  width: 100%;
  min-height: 180px;
  border: 1px solid var(--editor-surface-border);
  background: var(--editor-surface-bg);
  color: var(--editor-surface-text);
  border-radius: 8px;
  padding: 10px;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 13px;
}

.editor-area.tall {
  min-height: 260px;
}

.testing-panel {
  display: block;
  min-height: 1px;
}

.testing-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.testing-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.testing-editor {
  min-height: 140px;
}

.testing-suite-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.6fr);
  gap: 12px;
  align-items: start;
}

.cost-control-layout {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
}

.cost-control-limits-table {
  min-width: 680px;
}

.admin-billing-page,
.admin-billing-page .panel,
.admin-billing-page .billing-policy-editor > * {
  min-width: 0;
}

.admin-billing-usage-table {
  min-width: 880px;
}

.admin-billing-page progress,
.cost-control-layout progress {
  width: min(100%, 10rem);
}

.billing-policy-editor input,
.billing-policy-editor select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 700px) {
  .cost-control-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .help-drawer {
    width: min(100vw, calc(100vw - 12px));
    min-width: 0;
  }

  .help-drawer-header {
    padding: 14px;
  }

  .help-drawer-title-block,
  .help-drawer-controls {
    flex-basis: 100%;
  }

  .help-drawer-controls {
    justify-content: flex-start;
  }

  .help-drawer-controls .action-btn {
    min-width: 0;
  }
}

.api-catalog-layout {
  grid-template-columns: minmax(320px, 0.9fr) minmax(520px, 1.6fr);
}

.testing-suite-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.testing-suite-panel.wide {
  min-width: 0;
}

.api-catalog-layout .testing-suite-panel.wide {
  grid-column: 1 / -1;
}

.testing-request-picker {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
}

.testing-suite-receipt {
  margin-top: 12px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--table-border-color);
  padding: 6px;
  text-align: left;
  vertical-align: top;
}

.data-table.compact td,
.data-table.compact th {
  padding: 4px;
}

.tester-roster-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.4fr);
  gap: 12px;
  min-width: 0;
}

.tester-roster-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tester-roster-form-grid label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tester-roster-wide {
  grid-column: 1 / -1;
}

.tester-roster-table-panel {
  min-width: 0;
}

.tester-roster-actions {
  align-items: flex-start;
}

.api-generated-docs-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.api-catalog-table {
  table-layout: fixed;
  min-width: 720px;
}

.api-catalog-method-cell {
  width: 80px;
  white-space: nowrap;
}

.api-catalog-cell-wrap {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.api-catalog-url-cell,
.api-catalog-headers-cell {
  font-family: var(--mono-font, ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace);
}

.settings-card-list {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
}

.settings-row-card {
  width: 100%;
  min-width: 0;
}

.settings-form-stack {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.settings-form-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.settings-form-row > .field {
  width: 100%;
  min-width: 0;
}

.settings-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  min-width: 0;
  /* .app-main sets overflow-x:hidden, which per the CSS overflow spec forces its computed
     overflow-y to "auto" even though it never actually clips (it has no bounded height). That
     makes .app-main the nearest ancestor scroll container for any position:sticky descendant,
     but one that never scrolls - so a rail sticky against the real page/viewport never sticks.
     Bounding this shell's own height and scrolling it internally gives the rail a scroll
     container that genuinely scrolls, so position:sticky works (verified against a running
     instance - see PR for the repro). This also delivers the card's literal ask: only the
     content pane scrolls, not the page. */
  height: calc(100vh - 210px);
  min-height: 420px;
  overflow-y: auto;
}

.settings-rail {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.settings-rail-link {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.settings-rail-link:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}

.settings-rail-link.active {
  background: var(--surface-strong);
  border-color: var(--border-strong);
  color: var(--text-strong);
  font-weight: 600;
}

.settings-rail-link.danger {
  color: var(--danger);
}

.settings-rail-link.danger.active {
  background: var(--button-danger-bg);
  border-color: var(--button-danger-border);
  color: var(--danger);
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.settings-category-section {
  scroll-margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.settings-category-heading h2 {
  margin: 0 0 4px;
}

.settings-category-heading p {
  margin: 0;
}

.settings-category-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

.settings-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-launch-control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.settings-launch-control-value {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.settings-launch-control-value > .field,
.settings-launch-control-value > select.field {
  flex: 1 1 auto;
  min-width: 0;
}

.settings-toggle-input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 20px;
  margin: 0;
  border-radius: 999px;
  background: var(--toggle-track-bg);
  border: 1px solid var(--toggle-track-border);
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.settings-toggle-input::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--toggle-thumb-bg);
  box-shadow: var(--toggle-thumb-shadow);
  transition: transform 120ms ease, background-color 120ms ease;
}

.settings-toggle-input:checked {
  background: var(--toggle-active-bg);
  border-color: var(--toggle-active-border);
}

.settings-toggle-input:checked::after {
  transform: translateX(14px);
}

.settings-toggle-input-danger:checked {
  background: var(--danger);
  border-color: var(--danger);
}

.settings-toggle-input:focus-visible {
  outline: 2px solid var(--toggle-focus-outline);
  outline-offset: 3px;
}

.settings-toggle-input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.settings-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.info-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  cursor: help;
}

.info-icon-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.settings-card-wide {
  grid-column: 1 / -1;
}

.settings-category-section-danger {
  padding-top: 14px;
  border-top: 1px solid var(--button-danger-border);
}

.settings-category-section-danger .settings-card {
  border-color: var(--button-danger-border);
}

.settings-mcp-grants-panel {
  min-width: 0;
}

.settings-mcp-grants-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.settings-mcp-grants-table {
  min-width: 100%;
}

.settings-mcp-grants-table th,
.settings-mcp-grants-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.settings-mcp-grants-client-cell,
.settings-mcp-grants-workspace-cell,
.settings-mcp-grants-scopes-cell {
  min-width: 0;
}

.kv-grid-null::placeholder,
.kv-grid .field::placeholder {
  color: var(--placeholder-text);
}

.grid-enabled-cell {
  width: 56px;
  text-align: center;
}

.grid-enabled-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.grid-enabled-track {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--toggle-track-bg);
  border: 1px solid var(--toggle-track-border);
  transition: background-color 120ms ease, border-color 120ms ease;
}

.grid-enabled-thumb {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--toggle-thumb-bg);
  box-shadow: var(--toggle-thumb-shadow);
  transition: transform 120ms ease, background-color 120ms ease;
}

.grid-enabled-toggle.active .grid-enabled-track {
  background: var(--toggle-active-bg);
  border-color: var(--toggle-active-border);
}

.grid-enabled-toggle.active .grid-enabled-thumb {
  transform: translateX(14px);
}

.grid-enabled-toggle:focus-visible {
  outline: 2px solid var(--toggle-focus-outline);
  outline-offset: 3px;
  border-radius: 999px;
}

.matrix-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.matrix-scroll-shell {
  min-height: 0;
  overflow: hidden;
  container: matrix-scroll / inline-size;
}

.matrix-status-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
}

.matrix-scroll-region {
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

.matrix {
  --matrix-variable-column-width: 200px;
  --matrix-description-column-width: 160px;
  --matrix-secret-column-width: 92px;
}

.matrix-env-column {
  min-width: 200px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.matrix-env-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name delete"
    "count scope";
  gap: 6px 8px;
  min-width: 180px;
  padding: 6px 8px;
  border: 1px solid var(--matrix-header-border);
  border-radius: 10px;
  background: var(--matrix-header-bg);
  box-shadow: var(--matrix-header-shadow);
}

.matrix-env-name-btn {
  grid-area: name;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.matrix-env-name-btn:hover {
  color: var(--text-strong);
}

.matrix-env-name-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matrix-env-header:focus-within,
.matrix-env-header:hover {
  border-color: var(--matrix-header-hover-border);
  box-shadow: var(--matrix-header-hover-shadow);
}

.matrix-env-column.active .matrix-env-header {
  border-color: var(--matrix-header-hover-border);
  box-shadow: var(--matrix-header-hover-shadow);
}

.matrix-env-cell.active {
  background: var(--interactive-surface-hover);
}

.matrix-env-name-input {
  grid-area: name;
  flex: 1;
  min-width: 0;
  background: var(--matrix-input-bg);
}

.matrix-env-count-pill {
  grid-area: count;
  justify-self: start;
}

.matrix-env-access-scope {
  grid-area: scope;
  min-width: 0;
  width: 100%;
}

.matrix-env-delete {
  grid-area: delete;
  font-size: 14px;
  align-self: start;
  justify-self: end;
}

.matrix-variable-column {
  min-width: var(--matrix-variable-column-width);
}

.matrix-variable-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name delete"
    "count delete";
  gap: 6px 8px;
}

.matrix-variable-name-btn {
  grid-area: name;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  width: 100%;
  overflow: hidden;
}

.matrix-variable-name-btn:hover {
  color: var(--text-strong);
}

.matrix-variable-name-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matrix-variable-name-input {
  grid-area: name;
  flex: 1;
  min-width: 0;
}

.matrix-variable-count-pill {
  grid-area: count;
  justify-self: start;
}

.matrix-variable-delete {
  grid-area: delete;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  border-radius: 999px;
  flex: 0 0 24px;
  align-self: start;
}

.matrix-count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--matrix-count-border);
  background: var(--matrix-count-bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.matrix .matrix-identity-column {
  position: sticky;
  box-sizing: border-box;
  background: var(--pin-surface);
  background-clip: padding-box;
  z-index: 2;
}

.matrix thead .matrix-identity-column {
  z-index: 4;
}

.matrix .matrix-variable-identity-column {
  left: 0;
  width: var(--matrix-variable-column-width);
  min-width: var(--matrix-variable-column-width);
  max-width: var(--matrix-variable-column-width);
}

.matrix .matrix-description-identity-column {
  left: var(--matrix-variable-column-width);
  width: var(--matrix-description-column-width);
  min-width: var(--matrix-description-column-width);
  max-width: var(--matrix-description-column-width);
  overflow-wrap: anywhere;
}

.matrix .matrix-secret-identity-column {
  left: calc(var(--matrix-variable-column-width) + var(--matrix-description-column-width));
  width: var(--matrix-secret-column-width);
  min-width: var(--matrix-secret-column-width);
  max-width: var(--matrix-secret-column-width);
}

.matrix .matrix-identity-boundary {
  position: sticky;
}

.matrix .matrix-identity-boundary::after {
  content: "";
  position: absolute;
  top: 0;
  right: -10px;
  bottom: -1px;
  width: 10px;
  background: linear-gradient(90deg, var(--matrix-pin-divider) 0 1px, var(--matrix-pin-shadow) 1px, transparent 100%);
  pointer-events: none;
}

@container matrix-scroll (max-width: 720px) {
  .matrix {
    --matrix-variable-column-width: 132px;
    --matrix-description-column-width: 112px;
    --matrix-secret-column-width: 80px;
  }
}

@container matrix-scroll (max-width: 420px) {
  .matrix {
    --matrix-variable-column-width: 84px;
    --matrix-description-column-width: 64px;
    --matrix-secret-column-width: 52px;
  }

  .matrix .matrix-identity-column {
    padding-inline: 4px;
  }

  .matrix-variable-count-pill {
    display: none;
  }
}

.matrix-secret-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.matrix-secret-track {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--toggle-track-bg);
  border: 1px solid var(--toggle-track-border);
  transition: background-color 120ms ease, border-color 120ms ease;
}

.matrix-secret-thumb {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--toggle-thumb-bg);
  transition: transform 120ms ease, background-color 120ms ease;
}

.matrix-secret-toggle.active {
  color: var(--text);
}

.matrix-secret-toggle.active .matrix-secret-track {
  background: var(--toggle-active-bg);
  border-color: var(--toggle-active-border);
}

.matrix-secret-toggle.active .matrix-secret-thumb {
  transform: translateX(14px);
}

.matrix-secret-label {
  min-width: 24px;
  font-size: 12px;
  font-weight: 600;
}

@container matrix-scroll (max-width: 420px) {
  .matrix-secret-toggle {
    gap: 0;
  }

  .matrix-secret-label {
    display: none;
  }
}

.badge,
.method,
.status-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  border: 1px solid var(--badge-border);
  background: var(--badge-bg);
  color: var(--badge-text);
}

.badge.gql {
  background: var(--badge-gql-bg);
  border-color: var(--badge-gql-border);
}

.badge.active,
.badge.role-badge {
  background: var(--status-ready-bg);
  border-color: var(--status-ready-border);
}

.badge.pending {
  background: var(--status-attention-bg);
  border-color: var(--status-attention-border);
  color: var(--status-attention-text);
}

.badge.expired {
  background: var(--status-risk-high-bg);
  border-color: var(--status-risk-high-border);
  color: var(--status-risk-high-text);
}

.identity-actions {
  display: grid;
  gap: 10px;
}

.identity-action-group {
  display: grid;
  gap: 6px;
}

.identity-action-group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.capability-toggle-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.capability-toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.capability-toggle-row .grid-enabled-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

@media (max-width: 640px) {
  .roster-table thead {
    display: none;
  }

  .roster-table,
  .roster-table tbody,
  .roster-table tr,
  .roster-table td {
    display: block;
    width: 100%;
  }

  .roster-table tr {
    border-bottom: 1px solid var(--table-border-color);
    padding: 8px 0;
  }

  .roster-table td {
    border-bottom: none;
    padding: 4px 0;
  }

  .roster-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 2px;
  }
}

.method-method {
  background: var(--method-default-bg);
}

.method-get {
  background: var(--method-get-bg);
  border-color: var(--method-get-border);
}

.method-post {
  background: var(--method-post-bg);
  border-color: var(--method-post-border);
}

.method-put {
  background: var(--method-put-bg);
  border-color: var(--method-put-border);
}

.method-patch {
  background: var(--method-patch-bg);
  border-color: var(--method-patch-border);
}

.method-delete {
  background: var(--method-delete-bg);
  border-color: var(--method-delete-border);
}

.method-head {
  background: var(--method-head-bg);
  border-color: var(--method-head-border);
}

.method-options {
  background: var(--method-options-bg);
  border-color: var(--method-options-border);
}

.response-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.response-header {
  display: flex;
  flex-shrink: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.response-running-summary,
.response-running-card,
.response-running-banner {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--running-card-text);
  font-size: 15px;
  font-weight: 600;
}

.response-running-summary.prominent,
.response-running-card.prominent,
.response-running-banner.prominent {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
}

.response-running-banner {
  width: 100%;
  max-width: 100%;
  padding: 24px 28px;
  border: 1px solid var(--running-card-border);
  border-radius: 20px;
  background: var(--running-card-bg);
  box-shadow: var(--running-card-shadow);
}

.response-running-summary.prominent,
.response-running-card.prominent {
  width: fit-content;
  max-width: 100%;
  min-width: min(100%, 520px);
  padding: 32px 36px;
  border: 1px solid var(--running-card-border);
  border-radius: 20px;
  background: var(--running-card-bg-prominent);
  box-shadow: var(--running-card-shadow-prominent);
}

.response-running-state-empty {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.response-running-banner.prominent {
  min-height: 124px;
  padding: 28px 32px;
  border-radius: 20px;
}

.response-running-spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 3px solid var(--spinner-border);
  border-top-color: var(--spinner-top-border);
  animation: response-running-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

.response-running-summary.prominent .response-running-spinner,
.response-running-card.prominent .response-running-spinner,
.response-running-banner.prominent .response-running-spinner {
  width: 42px;
  height: 42px;
  border-width: 6px;
}

.response-running-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.response-running-title {
  font-size: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.response-body-layout {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.response-body-shell {
  position: relative;
  padding-bottom: 4px;
}

.response-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--editor-surface-border);
  padding-bottom: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.response-panel-actions {
  flex: 0 0 auto;
}

@keyframes response-running-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.status-badge.ok {
  background: var(--method-get-bg);
  border-color: var(--method-get-border);
}

.status-badge.fail {
  background: var(--method-delete-bg);
  border-color: var(--method-delete-border);
}

.response-body {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 12px;
  color: var(--text-strong);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-4);
  padding: 8px;
  /* Card #966 (round 5 design ruling): grow to natural content height by default - no forced
     floor/fill-parent height. Only a response large enough to make the page absurdly long gets
     its own internal scrollbar, via this generous cap rather than a small fixed pane. */
  max-height: min(70vh, 2000px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable both-edges;
}

.content-copy-shell {
  position: relative;
}

.content-copy-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 1;
  opacity: 0.82;
  padding: 0;
  min-width: 0;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--copy-btn-color);
}

.content-copy-btn:hover,
.content-copy-btn:focus-visible {
  opacity: 1;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--copy-btn-hover-color);
}

.info-banner {
  padding: 12px 14px;
  border: 1px solid var(--info-banner-border);
  border-radius: 14px;
  background: var(--info-banner-bg);
}

.inline-secret {
  display: block;
  overflow-x: auto;
  padding: 10px 12px;
  border: 1px solid var(--inline-secret-border);
  border-radius: 12px;
  background: var(--inline-secret-bg);
  color: var(--inline-secret-text);
  white-space: nowrap;
}

.response-body.pretty {
  line-height: 1.45;
}

.response-body.raw {
  line-height: 1.35;
}

.response-format-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.response-diagnostics-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.response-diagnostics-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.response-diagnostics-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--lint-panel-border);
  border-radius: 10px;
  background: var(--lint-panel-bg);
}

.response-diagnostics-card.content-copy-shell {
  padding-right: 36px;
}

.response-diagnostics-card.content-copy-shell .content-copy-btn {
  top: 12px;
  right: 14px;
}

.response-diagnostics-card h4 {
  margin: 0;
  font-size: 13px;
}

.response-visualizer {
  display: grid;
  gap: 12px;
}

.response-visualizer-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.response-visualizer-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.response-analysis-metric {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--lint-panel-border);
  border-radius: 10px;
  background: var(--lint-panel-bg);
}

.response-analysis-metric.tone-up {
  border-color: var(--warning-text);
}

.response-analysis-metric.tone-down {
  border-color: var(--method-get-border);
}

.response-diff-list {
  display: grid;
  gap: 10px;
}

.response-diff-row {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--editor-surface-border);
  border-radius: 10px;
  background: var(--surface-4);
}

.response-diff-row pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 12px;
}

.response-diff-added {
  border-color: var(--method-get-border);
}

.response-diff-removed {
  border-color: var(--method-delete-border);
}

.response-diff-changed {
  border-color: var(--section-tab-active-bg);
}

.workspace-response-popout-btn {
  min-width: 84px;
}

.popout-layout {
  min-height: 100vh;
  padding: 14px;
  background: radial-gradient(circle at top, var(--bg-top) 0%, var(--bg) 38%, var(--bg-bottom) 100%);
}

.response-popout-shell {
  min-height: calc(100vh - 28px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.response-popout-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.response-popout-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.response-popout-context {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.response-popout-panel {
  min-height: 0;
  display: flex;
}

.response-popout-panel .response-panel {
  width: 100%;
}

.response-search-highlight {
  background: var(--search-highlight-bg);
  color: var(--search-highlight-text);
  border-radius: 3px;
  padding: 0 1px;
}

.drawer {
  position: fixed;
  top: 18px;
  right: 16px;
  bottom: 18px;
  width: min(620px, calc(100vw - 40px));
  overflow: auto;
  border: 1px solid var(--drawer-border);
  background-color: var(--surface-2);
  background: var(--drawer-surface);
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--drawer-shadow);
  z-index: 30;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.drawer-header h3 {
  margin: 0;
  color: var(--text-strong);
}

.drawer label {
  color: var(--text);
}

.diff-item {
  border: 1px solid var(--editor-surface-border);
  border-radius: 8px;
  margin-bottom: 8px;
  padding: 8px;
}

.page-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.page-section > h1:focus,
.page-section > h1:focus-visible {
  outline: none;
}

.page-section.narrow {
  max-width: 480px;
}

.auth-screen {
  min-height: calc(100vh - 28px);
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(24, 61, 101, calc(0.18 - (var(--theme-is-light) * 0.08))), transparent 24%),
    linear-gradient(225deg, rgba(39, 82, 146, calc(0.12 - (var(--theme-is-light) * 0.04))), transparent 30%),
    radial-gradient(circle at top, rgba(44, 118, 205, calc(0.12 - (var(--theme-is-light) * 0.03))), transparent 28%),
    linear-gradient(180deg, var(--surface-1), var(--surface-2));
}

.auth-stage {
  width: min(560px, 100%);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.auth-brand > div {
  display: grid;
  gap: 2px;
}

.auth-brand strong,
.auth-brand span {
  display: block;
}

.auth-brand strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.auth-brand span {
  color: var(--muted);
  font-size: 12px;
}

.auth-brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: block;
  flex: 0 0 52px;
  overflow: hidden;
  object-fit: cover;
  background: #061327;
  border: 1px solid rgba(164, 191, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 22px rgba(66, 116, 221, 0.24);
}

.auth-card {
  position: relative;
  overflow: hidden;
  padding: 40px 36px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--shell-card-border);
  border-radius: 28px;
  background:
    var(--shell-card-bg),
    linear-gradient(90deg, rgba(64, 112, 194, calc(0.08 - (var(--theme-is-light) * 0.03))), transparent 46%);
  box-shadow: 0 28px 80px rgba(16, 34, 53, calc(0.42 - (var(--theme-is-light) * 0.28)));
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(91, 78, 245, calc(0.14 - (var(--theme-is-light) * 0.05))), transparent 24%),
    linear-gradient(0deg, transparent 0, transparent calc(100% - 1px), rgba(76, 102, 147, calc(0.12 - (var(--theme-is-light) * 0.06))) calc(100% - 1px)),
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(76, 102, 147, calc(0.12 - (var(--theme-is-light) * 0.06))) calc(100% - 1px));
  background-size: auto, 100% 64px, 64px 100%;
  pointer-events: none;
  opacity: 0.8;
}

.auth-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(116, 76, 249, 0.9), rgba(68, 147, 234, 0.9), rgba(116, 76, 249, 0));
  pointer-events: none;
}

.auth-card-header,
.auth-mode-toggle,
.auth-status,
.auth-form,
.auth-divider,
.auth-provider-grid,
.auth-footer {
  position: relative;
  z-index: 1;
}

.auth-card-header h2 {
  margin: 0 0 10px;
  font-size: 42px;
  letter-spacing: -0.04em;
  color: var(--text-strong);
}

.auth-card-header p {
  margin: 0;
  color: var(--muted);
}

.auth-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 22px 0 18px;
  padding: 5px;
  border: 1px solid var(--interactive-surface-border);
  border-radius: 16px;
  background: var(--interactive-surface);
}

.auth-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  min-height: 42px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.auth-mode-btn.active {
  background: linear-gradient(135deg, #6e45f5, #3a8de3);
  color: #f6fbff;
  font-weight: 700;
}

.auth-status {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
}

.auth-status.info {
  background: rgba(34, 88, 145, calc(0.22 - (var(--theme-is-light) * 0.08)));
  border: 1px solid rgba(88, 153, 226, calc(0.34 - (var(--theme-is-light) * 0.12)));
  color: var(--text);
}

.auth-status.error {
  background: rgba(110, 28, 40, calc(0.26 - (var(--theme-is-light) * 0.14)));
  border: 1px solid rgba(208, 78, 104, calc(0.36 - (var(--theme-is-light) * 0.12)));
  color: var(--text);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-input {
  min-height: 48px;
  border-radius: 14px;
  border-color: var(--interactive-surface-border);
  background: var(--surface-1);
  color: var(--text);
}

.auth-input:focus {
  outline: none;
  border-color: #5ca7ff;
  box-shadow: 0 0 0 3px rgba(72, 129, 240, 0.18);
}

.auth-submit-btn {
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #6e45f5, #4493ea);
  color: #f7fbff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 18px 32px rgba(57, 103, 219, 0.24);
}

.auth-submit-btn:hover {
  filter: brightness(1.06);
}

.auth-inline-link {
  align-self: center;
  border: 0;
  padding: 4px 8px;
  background: transparent;
  color: #8e6bff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 120ms ease, text-shadow 120ms ease;
}

.auth-inline-link:hover,
.auth-inline-link:focus-visible {
  color: #a98bff;
  text-shadow: 0 0 18px rgba(110, 69, 245, 0.2);
  outline: none;
}

.auth-divider {
  position: relative;
  margin: 22px 0 18px;
  text-align: center;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--border);
}

.auth-divider span {
  position: relative;
  padding: 0 10px;
  background: var(--surface-1);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.auth-provider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--interactive-surface-border);
  border-radius: 14px;
  background: var(--surface-1);
  color: var(--text-strong);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.auth-provider-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.auth-footer {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.auth-footer p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.auth-provider-form {
    display: contents;
}

.legal-acceptance-control {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.legal-acceptance-control input {
    margin-top: 3px;
}

.legal-acceptance-control a,
.auth-footer a,
.legal-document-content a {
    color: var(--accent);
}

.auth-provider-btn.disabled {
    pointer-events: none;
    opacity: 0.55;
}

.panel-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.panel-grid > .panel {
  min-width: 0;
}

.chatgpt-mcp-setup-page {
  max-width: 1080px;
}

.chatgpt-mcp-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.chatgpt-mcp-value-list dd {
  overflow-wrap: anywhere;
}

.chatgpt-mcp-panel-grid {
  align-items: stretch;
}

.chatgpt-mcp-code-block {
  max-width: 100%;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}


.onboarding-card-stack {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  max-width: 980px;
}

.onboarding-settings-card {
  display: grid;
  gap: 14px;
}

.onboarding-field-stack {
  display: grid;
  gap: 14px;
}

.onboarding-field-group {
  display: grid;
  gap: 6px;
  align-content: start;
}

.onboarding-divider-group {
  padding-top: 14px;
  border-top: 1px solid var(--shell-card-border);
}

.auth-editor-panel {
  display: grid;
  gap: 0;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

.auth-editor-panel.auth-editor-panel-compact {
  height: auto;
  max-height: none;
  align-self: start;
}

.auth-editor-shell {
  display: grid;
  align-content: start;
  gap: 16px;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 12px;
  padding-right: 6px;
  scroll-padding-bottom: 16px;
}

.auth-editor-shell.auth-editor-shell-compact {
  height: auto;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.auth-editor-shell .field {
  scroll-margin-bottom: 16px;
}

.auth-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--auth-section-border);
  border-radius: 12px;
  background: var(--auth-section-bg);
}

.auth-section-header {
  display: grid;
  gap: 6px;
}

.auth-section-title {
  margin: 0;
  font-size: 14px;
}

.auth-section-copy {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.auth-form-grid {
  display: grid;
  gap: 14px 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.auth-field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.auth-field-wide {
  grid-column: 1 / -1;
}

.auth-field-compact {
  max-width: 340px;
}

.auth-field-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: left;
}

.auth-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.folder-auth-shell {
  display: grid;
  gap: 16px;
  align-content: start;
}

.folder-auth-shell.folder-auth-shell-compact {
  gap: 12px;
  grid-auto-rows: max-content;
}

.folder-auth-header {
  display: grid;
  gap: 8px;
}

.folder-auth-header.folder-auth-header-compact {
  gap: 6px;
  align-content: start;
}

.folder-auth-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.folder-auth-title-row h3 {
  margin: 0;
}

.folder-auth-shell.folder-auth-shell-compact .auth-editor-panel {
  align-self: start;
  justify-self: stretch;
}

.folder-auth-shell.folder-auth-shell-compact .auth-section {
  gap: 10px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.folder-auth-shell.folder-auth-shell-compact .auth-resolution-card {
  gap: 6px;
  padding: 10px;
}

.folder-auth-shell.folder-auth-shell-compact .auth-resolution-badges {
  gap: 6px;
}

.folder-auth-shell.folder-auth-shell-compact .auth-help {
  line-height: 1.35;
}

.auth-editor-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.auth-help,
.auth-status {
  margin: 0;
}

.auth-share-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  color: var(--text);
}

.auth-resolution-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--shell-card-border);
  border-radius: 10px;
  background-color: var(--panel-2);
  background-image: var(--shell-card-bg);
  box-shadow: var(--shell-card-shadow);
}

.execution-preview-card {
  position: relative;
}

.execution-preview-card.collapsed {
  align-content: start;
  min-height: 54px;
  overflow: hidden;
}

.execution-preview-card.collapsed .execution-preview-summary {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.execution-preview-risk-block {
  display: grid;
  gap: 6px;
}

.execution-preview-risk-list {
  gap: 4px;
}

.execution-preview-risk-signal {
  display: grid;
  gap: 2px;
}

.execution-preview-toggle {
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 999px;
  font-size: 15px;
  line-height: 1;
}

.expandable-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.expandable-panel-toggle {
  position: static;
  flex: 0 0 auto;
}

.auth-resolution-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-resolution-list {
  gap: 4px;
  font-size: 12px;
}

.request-variable-resolution-card {
  margin-top: 10px;
}

.auth-readiness-ready {
  background: var(--status-ready-bg);
  border-color: var(--status-ready-border);
}

.auth-readiness-needs-attention {
  background: var(--status-attention-bg);
  border-color: var(--status-attention-border);
  color: var(--status-attention-text);
}

.execution-risk-low {
  background: var(--status-risk-low-bg);
  border-color: var(--status-risk-low-border);
}

.execution-risk-moderate {
  background: var(--status-attention-bg);
  border-color: var(--status-attention-border);
  color: var(--status-attention-text);
}

.execution-risk-high {
  background: var(--status-risk-high-bg);
  border-color: var(--status-risk-high-border);
  color: var(--status-risk-high-text);
}

.auth-flow-toolbar {
  align-items: stretch;
}

.auth-device-panel {
  margin-top: 0;
}

.warning-text {
  color: var(--warning-text-color);
  margin: 4px 0;
}

.success-text {
  color: var(--status-ready-border);
  margin: 4px 0;
}

.json-lint-panel {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--lint-panel-border);
  background: var(--lint-panel-bg);
}

.json-lint-panel.valid {
  border-color: var(--lint-valid-border);
  background: var(--lint-valid-bg);
}

.json-lint-panel.invalid {
  border-color: var(--lint-invalid-border);
  background: var(--lint-invalid-bg);
}

.json-lint-header,
.json-lint-title-row,
.json-lint-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.json-lint-header {
  justify-content: space-between;
}

.json-lint-title {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.json-lint-detail,
.json-lint-meta {
  color: var(--muted);
  font-size: 12px;
}

.json-lint-message {
  margin: 0;
  color: var(--lint-invalid-text);
  font-size: 12px;
  line-height: 1.45;
}

.muted {
  color: var(--muted);
}

.toast-stack {
  position: fixed;
  right: 12px;
  bottom: 12px;
  display: grid;
  gap: 6px;
  max-width: calc(100vw - 24px);
  z-index: 100;
}

.toast-item {
  border: 1px solid var(--toast-border);
  background: var(--toast-bg);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 220px;
  max-width: min(420px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
}

.toast-item.warning {
  border-color: var(--warning, #b45309);
}

.toast-item.error {
  border-color: var(--danger, #dc2626);
}

.toast-content {
  min-width: 0;
}

.toast-context {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.toast-message {
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.toast-copy-details {
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  padding: 3px 7px;
}

.toast-copy-details:hover,
.toast-copy-details:focus-visible {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.toast-time {
  color: var(--muted);
  font-size: 11px;
  grid-column: 1 / -1;
}

.toast-dismiss {
  align-self: start;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  line-height: 1;
  padding: 2px 4px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: grid;
  place-items: center;
  z-index: 60;
}

.modal-card {
  background: var(--modal-surface);
  border: 1px solid var(--modal-border);
  border-radius: 12px;
  box-shadow: var(--modal-shadow);
  padding: 12px;
  min-width: 320px;
}

.free-tier-ad-overlay {
  z-index: 1300;
}

.free-tier-ad-modal {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: grid;
  gap: 12px;
  overflow-y: auto;
}

.free-tier-ad-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.free-tier-ad-close {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.free-tier-ad-placeholder {
  display: grid;
  min-height: 10rem;
  place-items: center;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-weight: 700;
}

.free-tier-ad-provider-host {
  display: contents;
}

.workspace-secondary-modal-small {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.workspace-import-modal {
  width: min(880px, calc(100vw - 48px));
  max-height: calc(100vh - 64px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
}

.workspace-import-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.workspace-import-modal-header h3,
.workspace-import-modal-header p {
  margin: 0;
}

.workspace-import-modal-header > div {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.workspace-modal-close {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  flex: 0 0 34px;
}

.workspace-import-modal-body {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.workspace-import-modal-footer {
  justify-content: flex-end;
}

.workspace-import-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.workspace-import-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.workspace-import-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workspace-import-file-name {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
}

.workspace-import-textarea {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  font-family: var(--mono);
  max-width: 100%;
}

.workspace-import-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.workspace-import-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--import-summary-border);
  border-radius: 10px;
  background: var(--import-summary-bg);
}

.workspace-import-errors {
  margin: 0;
}

.workspace-import-collisions {
  display: grid;
  gap: 8px;
}

.workspace-import-collisions .line-list {
  min-width: 0;
}

.workspace-import-collisions li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.workspace-import-collisions li span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.app-shell-footer {
  grid-column: 2;
  grid-row: 2;
  padding: 10px 22px 16px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.product-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  color: var(--footer-link-color);
  font-size: 0.88rem;
}

.product-footer-left,
.product-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.product-footer-right {
  justify-content: flex-end;
  text-align: right;
}

.product-footer-link {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.product-footer-link:hover {
  color: var(--footer-link-hover);
  text-decoration: underline;
}

.legal-footer-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--footer-link-color);
  font-size: 0.92rem;
}

.legal-footer-link {
  color: inherit;
  text-decoration: none;
}

.legal-footer-link:hover {
  color: var(--footer-link-hover);
  text-decoration: underline;
}

.legal-footer-separator {
  color: var(--footer-separator);
}

.advertising-consent-review {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--footer-link-color);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.advertising-consent-review:hover {
  color: var(--footer-link-hover);
  text-decoration: underline;
}

.advertising-consent-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  display: grid;
  gap: 12px;
  width: min(560px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 32px));
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 18px 52px rgb(0 0 0 / 28%);
  text-align: left;
}

.advertising-consent-panel p,
.advertising-consent-panel h3 {
  margin: 0;
}

.advertising-consent-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.advertising-consent-heading > div {
  display: grid;
  gap: 8px;
}

.advertising-consent-close {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
}

.advertising-consent-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .product-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-footer-right {
    justify-content: flex-start;
    text-align: left;
  }

  .advertising-consent-panel {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .advertising-consent-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .advertising-consent-actions .action-btn {
    width: 100%;
  }
}

.legal-page {
    max-width: 780px;
    margin-inline: auto;
    overflow-wrap: anywhere;
    overflow-x: auto;
}

.public-legal-shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: var(--background);
    color: var(--text);
}

.public-legal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 3rem);
    border-bottom: 1px solid var(--border);
    background: var(--surface-1);
}

.public-legal-header-start {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.public-legal-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: -0.6rem;
    padding: 0.35rem 0.6rem;
    border: 0;
    border-radius: 0.6rem;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-weight: 650;
    font-size: 0.95rem;
    cursor: pointer;
}

.public-legal-back[hidden] {
    display: none;
}

.public-legal-back:hover {
    color: var(--text-strong);
    background: var(--surface-2);
}

.public-legal-brand {
    color: var(--text-strong);
    font-size: 1.15rem;
    font-weight: 800;
    text-decoration: none;
}

.public-legal-sign-in {
    color: var(--accent);
    font-weight: 650;
}

.public-legal-main {
    width: 100%;
    padding: clamp(1rem, 3vw, 2rem);
}

.legal-document-content {
    line-height: 1.65;
}

.legal-support-nav {
    margin-top: 1rem;
}

.legal-document-content h1,
.legal-document-content h2,
.legal-document-content h3 {
    line-height: 1.2;
    color: var(--text-strong);
}

.legal-document-content blockquote {
    margin-inline: 0;
    padding: 12px 16px;
    border-left: 3px solid var(--accent);
    background: var(--surface-2);
}

.legal-acceptance-page {
    max-width: 760px;
    margin: 1.5rem auto;
}

.legal-version-list {
    display: grid;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.legal-version-list > div {
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--surface-2);
}

.legal-version-list dt {
    font-weight: 700;
}

.legal-version-list dd {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
}

.legal-acceptance-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

/* Card #1159: .email-verification-page is not a flex/grid container by default, so its
   stacked children (heading, .auth-status, address list/resend form, action button) rely
   on their own margins and collide - the global .auth-status { margin: 0; } rule (see
   above) leaves it with no bottom spacing at all. Give the page itself the gap instead of
   patching each child, so both the ?status=verified and ?status=sent views get even
   spacing without touching the shared .auth-status/.action-btn rules other pages depend
   on. */
.email-verification-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.email-verification-page .panel-heading,
.email-verification-page .panel-heading h1,
.email-verification-page .panel-heading p {
    margin: 0;
}

.email-verification-page .panel-heading p + h1,
.email-verification-page .panel-heading h1 + p {
    margin-top: 8px;
}

/* The action link/button is a single action, not a full-width block. */
.email-verification-page .action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    align-self: flex-start;
}

/* The heading is only focused programmatically (FocusOnNavigate) for screen-reader users
   landing on this page - it does not need a visible focus ring. */
.email-verification-page h1:focus,
.email-verification-page h1:focus-visible {
    outline: none;
}

.legal-document-content table {
    width: 100%;
    border-collapse: collapse;
}

.legal-document-content th,
.legal-document-content td {
    padding: 8px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

@media print {
    .public-legal-header,
    .public-legal-shell > .product-footer {
        display: none;
    }

    .public-legal-main {
        padding: 0;
    }

    .legal-page {
        max-width: none;
        border: 0;
        box-shadow: none;
    }
}

.support-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.support-topic-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}

.support-topic-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.support-topic-card h2,
.support-topic-card p {
  margin: 0;
}

.support-topic-card .action-btn {
  margin-top: auto;
}

@media (max-width: 720px) {
  .support-topic-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.export-detail-grid {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.export-detail-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  min-width: 0;
}

.export-detail-card h2 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.export-detail-card p {
  margin: 0;
}

@media (max-width: 960px) {
  .api-catalog-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-form-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .api-catalog-table {
    min-width: 640px;
  }
}

@media (max-width: 900px) {
  .tester-roster-layout {
    grid-template-columns: 1fr;
  }

  .tester-roster-form-grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 34px 22px 24px;
  }

  .auth-provider-grid {
    grid-template-columns: 1fr;
  }

  .left-nav-rail {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    height: auto;
    position: static;
    align-self: stretch;
  }

  .settings-shell {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: 0;
    overflow-y: visible;
  }

  .settings-rail {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 6px;
  }

  .settings-category-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-frame {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-width: 0;
    overflow: hidden;
  }

  .left-nav-rail {
    grid-column: 1;
    grid-row: 1;
  }

  .app-main {
    grid-column: 1;
    grid-row: 2;
  }

  .app-shell-footer {
    grid-column: 1;
    grid-row: 3;
    padding: 8px 12px 12px;
    background: var(--bg);
    border-top: 1px solid var(--border);
  }

  .rail-links,
  .rail-bottom {
    flex-direction: row;
    align-items: center;
    margin-top: 0;
    width: auto;
  }

  .rail-nav-group,
  .rail-group-links {
    flex-direction: row;
    align-items: center;
  }

  .rail-group-links {
    padding-left: 0;
    border-left: 0;
  }

  .rail-link,
  .rail-group-toggle {
    width: auto;
    white-space: nowrap;
    word-break: normal;
  }

  .rail-settings-action {
    width: 38px;
    min-width: 38px;
    background: transparent;
  }

  .app-shell-header {
    justify-content: flex-start;
  }

}

@media (max-width: 960px) {
  .workspace-shell {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .workspace-explorer-host,
  .workspace-main {
    height: auto;
    width: 100%;
  }

  .workspace-explorer-host {
    flex: 0 0 auto;
    min-height: 220px;
    max-height: 38vh;
    overflow: hidden;
  }

  .workspace-main {
    flex: 1 1 auto;
    min-height: 360px;
  }

  .workspace-request-layout {
    height: auto !important;
    grid-template-rows: minmax(420px, auto) 18px minmax(260px, auto) !important;
    overflow: visible;
  }

  .workspace-editor-pane > .editor {
    min-height: 320px;
  }

  .workspace-editor-pane .section-tabs {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .workspace-editor-pane .section-tab {
    flex: 0 0 auto;
  }

  .workspace-editor-pane .panel-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace-explorer-edge-resizer {
    display: none;
  }

  .section-content-resize-handle {
    display: none;
  }
}

@media (max-width: 720px) {
  .auth-screen {
    padding: 10px;
  }

  .auth-stage {
    border-radius: 20px;
  }

  .shell-account {
    width: 100%;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .shell-account-namegroup {
    flex: 1 1 calc(100% - 44px);
  }

  .shell-account-actions {
    width: 100%;
  }

  .shell-account-workspace {
    flex: 1 1 auto;
    min-width: 0;
  }

  .shell-account-tier {
    padding-inline: 6px;
    font-size: 9px;
  }

  .shell-workspace-menu {
    position: fixed;
    left: 10px;
    right: 10px;
    top: 112px;
    width: auto;
    max-height: calc(100vh - 132px);
  }

  .shell-account-signout,
  .shell-account-signout-form {
    margin-left: auto;
  }
}

.selected-table-row {
  background: rgba(79, 70, 229, 0.12);
}

.workflow-guided-panel,
.workflow-linear-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.22);
}

.workflow-template-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.workflow-template-button {
  display: flex;
  min-height: 6rem;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 0.75rem;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}

.workflow-template-button:hover,
.workflow-template-button:focus-visible {
  border-color: rgba(125, 211, 252, 0.72);
  outline: none;
}

.workflow-template-name {
  font-weight: 700;
}

.workflow-template-description {
  color: rgba(203, 213, 225, 0.82);
  font-size: 0.84rem;
  line-height: 1.35;
}

.workflow-linear-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding-left: 1.35rem;
}

.workflow-linear-step {
  padding-left: 0.25rem;
}

.workflow-guided-insertion {
  width: 100%;
  margin-bottom: 0.35rem;
  padding: 0.4rem 0.65rem;
  border: 1px dashed rgba(125, 211, 252, 0.38);
  border-radius: 0.45rem;
  background: rgba(15, 23, 42, 0.35);
  color: rgba(186, 230, 253, 0.96);
  font-size: 0.78rem;
  text-align: left;
}

.workflow-guided-insertion:hover,
.workflow-guided-insertion:focus-visible {
  border-color: rgba(125, 211, 252, 0.78);
  outline: none;
}

.workflow-linear-step-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: stretch;
}

.workflow-linear-step-main {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.68);
  color: var(--text-primary);
  text-align: left;
}

.workflow-linear-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
  max-width: min(100%, 24rem);
}

.workflow-linear-step-action {
  min-height: 2.35rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 0.45rem;
  background: rgba(30, 41, 59, 0.72);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.1;
}

.workflow-linear-add-controls {
  display: grid;
  width: min(100%, 24rem);
  gap: 0.35rem;
  grid-template-columns: minmax(0, 1fr);
}

.workflow-linear-add-controls label {
  color: rgba(203, 213, 225, 0.88);
  font-size: 0.78rem;
  font-weight: 700;
}

.workflow-linear-drag-handle {
  appearance: none;
  display: inline-flex;
  min-height: 2.35rem;
  align-items: center;
  padding: 0.45rem 0.6rem;
  border: 1px dashed rgba(125, 211, 252, 0.48);
  border-radius: 0.45rem;
  background: transparent;
  color: rgba(186, 230, 253, 0.96);
  cursor: grab;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.1;
  user-select: none;
}

.workflow-linear-drag-handle:active {
  cursor: grabbing;
}

.workflow-linear-drag-handle:focus-visible {
  border-color: rgba(125, 211, 252, 0.88);
  outline: 2px solid rgba(56, 189, 248, 0.45);
  outline-offset: 2px;
}

.workflow-linear-step-action:hover,
.workflow-linear-step-action:focus-visible {
  border-color: rgba(125, 211, 252, 0.72);
  outline: none;
}

.workflow-linear-step-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.workflow-linear-step-action-danger {
  border-color: rgba(248, 113, 113, 0.32);
}

.workflow-linear-step-main:hover,
.workflow-linear-step-main:focus-visible,
.workflow-linear-step-selected .workflow-linear-step-main {
  border-color: rgba(129, 140, 248, 0.72);
  outline: none;
}

.workflow-linear-step-boundary .workflow-linear-step-main {
  background: rgba(30, 41, 59, 0.46);
}

.workflow-linear-step-disabled .workflow-linear-step-main {
  border-style: dashed;
  opacity: 0.76;
}

.workflow-linear-step-kind {
  min-width: 0;
  color: rgba(125, 211, 252, 0.92);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.workflow-linear-step-label {
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
  white-space: normal;
}

.workflow-linear-step-state {
  flex: 0 0 auto;
  padding: 0.18rem 0.4rem;
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 0.4rem;
  color: rgba(253, 230, 138, 0.96);
  font-size: 0.72rem;
  font-weight: 700;
}

.workflow-branch-lanes {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.75rem;
}

.workflow-branch-lane {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.46);
}

.workflow-branch-lane h5 {
  margin: 0 0 0.35rem;
}

.workflow-branch-lane .muted {
  overflow-wrap: anywhere;
}

@media (max-width: 48rem) {
  .workflow-linear-step-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-linear-step-actions {
    justify-content: flex-start;
    max-width: 100%;
  }

  .workflow-branch-lanes {
    grid-template-columns: minmax(0, 1fr);
  }
}

.workflow-builder-shell {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 3fr) minmax(18rem, 1fr);
  margin-top: 1rem;
  min-width: 0;
  max-width: 100%;
}

.workflow-canvas-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.workflow-builder-toolbar {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  align-items: end;
}

.workflow-canvas {
  position: relative;
  min-height: 40rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 1rem;
  background:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    rgba(15, 23, 42, 0.36);
  background-size: 160px 160px;
  overflow: hidden;
}

.workflow-canvas-edges {
  inset: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.workflow-edge-line {
  stroke: rgba(96, 165, 250, 0.72);
  stroke-width: 4px;
  stroke-linecap: round;
}

.workflow-edge-label {
  fill: rgba(226, 232, 240, 0.9);
  font-size: 0.85rem;
  text-anchor: middle;
}

.workflow-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(4, 10rem);
  min-height: 40rem;
}

.workflow-grid-cell {
  border-right: 1px dashed rgba(148, 163, 184, 0.14);
  border-bottom: 1px dashed rgba(148, 163, 184, 0.14);
  padding: 0.75rem;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.workflow-grid-cell-label {
  align-self: end;
  color: rgba(148, 163, 184, 0.68);
  font-size: 0.8rem;
}

.workflow-node-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.18);
  cursor: pointer;
}

.workflow-node-card-armed {
  border-color: rgba(250, 204, 21, 0.65);
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.25);
}

.workflow-node-card-selected {
  border-color: rgba(129, 140, 248, 0.72);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.25);
}

.workflow-node-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.workflow-node-kind {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(125, 211, 252, 0.92);
}

.workflow-node-label {
  font-weight: 600;
}

.workflow-node-meta {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(148, 163, 184, 0.82);
}

.workflow-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.workflow-sidebar .panel,
.workflow-sidebar .field {
  min-width: 0;
  max-width: 100%;
}

.workflow-change-warning {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--status-attention-border);
  border-radius: 0.5rem;
  background: var(--status-attention-bg);
  color: var(--status-attention-text);
}

.workflow-validation-summary {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.workflow-selected-validation {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  margin-bottom: 0.75rem;
  overflow-wrap: anywhere;
}

.workflow-validation-action {
  width: 100%;
  min-width: 0;
  padding: 0.5rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.workflow-validation-action:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.workflow-field-error {
  display: block;
  min-width: 0;
  color: var(--status-risk-high-text);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.workflow-more-options {
  min-width: 0;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface-3);
}

.workflow-more-options > summary {
  min-height: 2.75rem;
  cursor: pointer;
  color: var(--link);
  font-weight: 700;
  line-height: 2.75rem;
}

.workflow-more-options[open] > summary {
  margin-bottom: 0.5rem;
}

.workflow-mapping-fieldset {
  min-width: 0;
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.5rem;
}

.workflow-mapping-fieldset legend {
  padding: 0 0.35rem;
  font-weight: 700;
}

.workflow-searchable-selector,
.workflow-step-preview,
.workflow-step-preview-input,
.workflow-step-preview-result {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.workflow-searchable-selector-options {
  display: grid;
  gap: 0.35rem;
  max-height: 13rem;
  overflow-y: auto;
}

.workflow-searchable-selector-option {
  display: grid;
  gap: 0.2rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.45rem;
  background: rgba(15, 23, 42, 0.52);
  color: var(--text-primary);
  text-align: left;
}

.workflow-searchable-selector-option[aria-selected="true"],
.workflow-searchable-selector-option:hover,
.workflow-searchable-selector-option:focus-visible {
  border-color: rgba(125, 211, 252, 0.72);
  outline: none;
}

.workflow-searchable-selector-current {
  margin: 0;
  font-weight: 700;
}

.workflow-step-preview {
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.46);
}

.workflow-step-preview-result {
  padding: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.5rem;
}

.workflow-step-preview-result h5,
.workflow-step-preview-result p,
.workflow-step-preview-result ul {
  margin: 0;
}

.workflow-edge-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.workflow-edge-item .field {
  min-width: 7rem;
}

.workflow-editor-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  align-items: end;
}

.workflow-editor-grid > .field,
.workflow-config-panel > .field {
  min-width: 0;
  max-width: 100%;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

@media (max-width: 1100px) {
  .workflow-builder-shell {
    grid-template-columns: 1fr;
  }

  .workflow-builder-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .workflow-builder-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .workflow-guided-panel,
  .workflow-linear-panel,
  .workflow-sidebar .panel {
    padding: 0.75rem;
  }

  .workflow-template-grid,
  .workflow-editor-grid,
  .workflow-builder-toolbar,
  .workflow-linear-step-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-sidebar,
  .workflow-more-options,
  .workflow-mapping-fieldset,
  .workflow-sidebar .field,
  .workflow-sidebar input,
  .workflow-sidebar select,
  .workflow-sidebar textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .workflow-sidebar button,
  .workflow-linear-step-actions button,
  .workflow-linear-add-controls button {
    min-height: 2.75rem;
  }

  .workflow-linear-step-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
