/* Themes (Phase 053). Each theme is one complete set of the variables every
   rule below uses, on the page or on any element that names a theme, such as
   the Profile page's swatches. Monaco's theme is built from the same variables
   (themes.js), so the page and the editor always agree. Midnight is the
   default, for pages with no theme or an unknown one. The test suite checks
   every theme against WCAG AA (tests/unit/test_themes.py). */
:root,
[data-theme="midnight"] {
  color-scheme: dark;
  --lane-0: #69a3ff;
  --lane-1: #db7cff;
  --lane-2: #45c980;
  --lane-3: #ff9f43;
  --lane-4: #5bd6e8;
  --lane-5: #f36f8f;
  --lane-6: #d6c44f;
  --lane-7: #a894ff;
  --lane-text: #10161e;
  --tint-2: #2fb5a3;
  --tint-3: #a487f5;
  --tint-4: #e0a33a;
  --tint-5: #ec6f95;
  --tint-6: #5fbf62;
  --highlight: #ffe66d;
  --highlight-strong: #f4d84d;
  --highlight-text: #1d2430;
  --highlight-outline: #d39b00;
  --unresolved-surface: #ffe0a3;
  --unresolved-text: #6f4300;
  --on-solid: #ffffff;
  --avatar-text: #ffffff;
  --background: #0f141b;
  --surface: #1b2430;
  --surface-raised: #222d3b;
  --topbar: #171e28;
  --field: #10161e;
  --field-border: #5d7089;
  --border: #405064;
  --text: #f2f5fa;
  --muted: #aab5c5;
  --accent: #76a7ff;
  --accent-text: #07111f;
  --focus: #f0ad38;
  --editing: #f0ad38;
  --notice: #153f55;
  --notice-border: #62c3f2;
  --notice-text: #82d4fb;
  /* What a build made, laid over the Code tree (Phase 132): a hue no other role uses. */
  --built: #c4a5ff;
  --danger: #ff9e9e;
  --danger-solid: #8f2631;
  --danger-surface: #4a2025;
  --danger-border: #cc5d68;
  --success: #a7e4ba;
  --success-solid: #1f7a3d;
  --success-surface: #173d29;
  --success-border: #4da973;
  --warning: #c77d00;
  --warning-text: #e2b341;
  --avatar: #b8472a;
  --code-surface: #10161e;
  --code-text: #82d4fb;
  --welcome-start: #203e72;
  --welcome-middle: #122039;
  --welcome-end: #0f141b;
  --editor-background: #10161e;
  --editor-text: #e6edf3;
  --editor-selection: #1f3550;
  --editor-line: #18202b;
  --editor-gutter: #8a96a8;
  --editor-gutter-active: #e6edf3;
  --syntax-comment: #8fb37d;
  --syntax-keyword: #7fb4f0;
  --syntax-string: #e3a383;
  --syntax-number: #c3d9b0;
  --syntax-regexp: #f08f8f;
  --syntax-type: #5ed6bd;
  --syntax-function: #e6e6ac;
  --syntax-variable: #a6dcff;
  --syntax-parameter: #d2b4ff;
  --syntax-property: #94c6ff;
  --syntax-constant: #6fcfff;
  --syntax-namespace: #5ed6bd;
  --syntax-tag: #7fb4f0;
  --syntax-attribute: #a6dcff;
  --syntax-operator: #d4d4d4;
  --syntax-invalid: #ff8a80;
  --syntax-macro: #e0aa76;
}

[data-theme="graphite"] {
  color-scheme: dark;
  --lane-0: #69a3ff;
  --lane-1: #db7cff;
  --lane-2: #45c980;
  --lane-3: #ff9f43;
  --lane-4: #5bd6e8;
  --lane-5: #f36f8f;
  --lane-6: #d6c44f;
  --lane-7: #a894ff;
  --lane-text: #10161e;
  --tint-2: #2fb5a3;
  --tint-3: #a487f5;
  --tint-4: #e0a33a;
  --tint-5: #ec6f95;
  --tint-6: #5fbf62;
  --highlight: #ffe66d;
  --highlight-strong: #f4d84d;
  --highlight-text: #1d2430;
  --highlight-outline: #d39b00;
  --unresolved-surface: #ffe0a3;
  --unresolved-text: #6f4300;
  --on-solid: #ffffff;
  --avatar-text: #ffffff;
  --background: #16171a;
  --surface: #202226;
  --surface-raised: #2a2d32;
  --topbar: #1b1c20;
  --field: #141518;
  --field-border: #6c717a;
  --border: #43474f;
  --text: #ececec;
  --muted: #a9adb3;
  --accent: #9cc2ff;
  --accent-text: #0d1420;
  --focus: #f2b84b;
  --editing: #f2b84b;
  --notice: #22303d;
  --notice-border: #7fb0e0;
  --notice-text: #a6cdf2;
  /* What a build made, laid over the Code tree (Phase 132): a hue no other role uses. */
  --built: #c9adff;
  --danger: #f2a1a1;
  --danger-solid: #93303a;
  --danger-surface: #43242a;
  --danger-border: #c96a72;
  --success: #9bd8a5;
  --success-solid: #25713f;
  --success-surface: #1d3a26;
  --success-border: #559e66;
  --warning: #c98a1c;
  --warning-text: #e6c25a;
  --avatar: #a5543a;
  --code-surface: #141518;
  --code-text: #a6cdf2;
  --welcome-start: #34373d;
  --welcome-middle: #1e2024;
  --welcome-end: #16171a;
  --editor-background: #18191c;
  --editor-text: #e4e4e4;
  --editor-selection: #2c3542;
  --editor-line: #1f2024;
  --editor-gutter: #8c9098;
  --editor-gutter-active: #e4e4e4;
  --syntax-comment: #9a9fa6;
  --syntax-keyword: #d4a6f7;
  --syntax-string: #a6d9a0;
  --syntax-number: #f0b37e;
  --syntax-regexp: #f2a1a1;
  --syntax-type: #f3d27a;
  --syntax-function: #9cc2ff;
  --syntax-variable: #e4e4e4;
  --syntax-parameter: #e8c3a8;
  --syntax-property: #8fd3e8;
  --syntax-constant: #f0b37e;
  --syntax-namespace: #f3d27a;
  --syntax-tag: #f2a08e;
  --syntax-attribute: #f3d27a;
  --syntax-operator: #c8cbd0;
  --syntax-invalid: #ff8f8f;
  --syntax-macro: #e8c3a8;
}

[data-theme="harbor"] {
  color-scheme: dark;
  --lane-0: #69a3ff;
  --lane-1: #db7cff;
  --lane-2: #45c980;
  --lane-3: #ff9f43;
  --lane-4: #5bd6e8;
  --lane-5: #f36f8f;
  --lane-6: #d6c44f;
  --lane-7: #a894ff;
  --lane-text: #10161e;
  --tint-2: #2fb5a3;
  --tint-3: #a487f5;
  --tint-4: #e0a33a;
  --tint-5: #ec6f95;
  --tint-6: #5fbf62;
  --highlight: #ffe66d;
  --highlight-strong: #f4d84d;
  --highlight-text: #1d2430;
  --highlight-outline: #d39b00;
  --unresolved-surface: #ffe0a3;
  --unresolved-text: #6f4300;
  --on-solid: #ffffff;
  --avatar-text: #ffffff;
  --background: #0b1d26;
  --surface: #12303b;
  --surface-raised: #173a47;
  --topbar: #0f2731;
  --field: #0a1a22;
  --field-border: #4f7e8c;
  --border: #2f5866;
  --text: #e8f4f6;
  --muted: #a3c6ce;
  --accent: #5fd3e0;
  --accent-text: #04171c;
  --focus: #f2c46d;
  --editing: #f2c46d;
  --notice: #0f3a48;
  --notice-border: #5fd3e0;
  --notice-text: #9fe6ee;
  /* What a build made, laid over the Code tree (Phase 132): a hue no other role uses. */
  --built: #d2b4ff;
  --danger: #ffa699;
  --danger-solid: #8f2e2a;
  --danger-surface: #3f2328;
  --danger-border: #d06a62;
  --success: #8fe0b0;
  --success-solid: #1c6e4a;
  --success-surface: #123d33;
  --success-border: #47a37a;
  --warning: #c98f1c;
  --warning-text: #f2c46d;
  --avatar: #a8492c;
  --code-surface: #0a1a22;
  --code-text: #9fe6ee;
  --welcome-start: #1b4d5c;
  --welcome-middle: #0f2b36;
  --welcome-end: #0b1d26;
  --editor-background: #0d212b;
  --editor-text: #e3f1f4;
  --editor-selection: #1d4252;
  --editor-line: #122a35;
  --editor-gutter: #86aab3;
  --editor-gutter-active: #e3f1f4;
  --syntax-comment: #93b4bc;
  --syntax-keyword: #86dbff;
  --syntax-string: #9fe6b8;
  --syntax-number: #f7c97e;
  --syntax-regexp: #ffa699;
  --syntax-type: #f2c46d;
  --syntax-function: #6fe0ec;
  --syntax-variable: #e3f1f4;
  --syntax-parameter: #d9c2ff;
  --syntax-property: #b5e3ec;
  --syntax-constant: #f7c97e;
  --syntax-namespace: #f2c46d;
  --syntax-tag: #ffa699;
  --syntax-attribute: #f2c46d;
  --syntax-operator: #c3dbe0;
  --syntax-invalid: #ff8f80;
  --syntax-macro: #e8b98a;
}

[data-theme="ember"] {
  color-scheme: dark;
  --lane-0: #69a3ff;
  --lane-1: #db7cff;
  --lane-2: #45c980;
  --lane-3: #ff9f43;
  --lane-4: #5bd6e8;
  --lane-5: #f36f8f;
  --lane-6: #d6c44f;
  --lane-7: #a894ff;
  --lane-text: #10161e;
  --tint-2: #2fb5a3;
  --tint-3: #a487f5;
  --tint-4: #e0a33a;
  --tint-5: #ec6f95;
  --tint-6: #5fbf62;
  --highlight: #ffe66d;
  --highlight-strong: #f4d84d;
  --highlight-text: #1d2430;
  --highlight-outline: #d39b00;
  --unresolved-surface: #ffe0a3;
  --unresolved-text: #6f4300;
  --on-solid: #ffffff;
  --avatar-text: #ffffff;
  --background: #1d1612;
  --surface: #28201a;
  --surface-raised: #322820;
  --topbar: #231b16;
  --field: #191310;
  --field-border: #836b5a;
  --border: #57463a;
  --text: #f6ece4;
  --muted: #c8b3a3;
  --accent: #ffa466;
  --accent-text: #1d1006;
  --focus: #f3c562;
  --editing: #f3c562;
  --notice: #3a2a1c;
  --notice-border: #ff9f5a;
  --notice-text: #ffc79c;
  /* What a build made, laid over the Code tree (Phase 132): a hue no other role uses. */
  --built: #d9b8ff;
  --danger: #ff9a8c;
  --danger-solid: #922f28;
  --danger-surface: #45221d;
  --danger-border: #cf6a5d;
  --success: #bfdc96;
  --success-solid: #3f6b1e;
  --success-surface: #2d3519;
  --success-border: #7fa456;
  --warning: #c98a1c;
  --warning-text: #f3c562;
  --avatar: #a8492c;
  --code-surface: #191310;
  --code-text: #ffc79c;
  --welcome-start: #5a3720;
  --welcome-middle: #2c1f17;
  --welcome-end: #1d1612;
  --editor-background: #1a1410;
  --editor-text: #f2e6dc;
  --editor-selection: #3a2c22;
  --editor-line: #221a15;
  --editor-gutter: #ab9584;
  --editor-gutter-active: #f2e6dc;
  --syntax-comment: #a8927f;
  --syntax-keyword: #ffa466;
  --syntax-string: #bfdc96;
  --syntax-number: #f3c562;
  --syntax-regexp: #ff9a8c;
  --syntax-type: #86d8de;
  --syntax-function: #ecbcff;
  --syntax-variable: #f2e6dc;
  --syntax-parameter: #f2c2a0;
  --syntax-property: #ffd0a8;
  --syntax-constant: #f3c562;
  --syntax-namespace: #86d8de;
  --syntax-tag: #ff9a8c;
  --syntax-attribute: #f3c562;
  --syntax-operator: #dccbbd;
  --syntax-invalid: #ff8a7a;
  --syntax-macro: #ffb38a;
}

[data-theme="daylight"] {
  color-scheme: light;
  --lane-0: #2f62c9;
  --lane-1: #9437c2;
  --lane-2: #1a7a43;
  --lane-3: #b35400;
  --lane-4: #0f7585;
  --lane-5: #bf2f58;
  --lane-6: #776800;
  --lane-7: #5f4bd0;
  --lane-text: #ffffff;
  --tint-2: #2fb5a3;
  --tint-3: #a487f5;
  --tint-4: #e0a33a;
  --tint-5: #ec6f95;
  --tint-6: #5fbf62;
  --highlight: #ffe66d;
  --highlight-strong: #f4d84d;
  --highlight-text: #1d2430;
  --highlight-outline: #a87b00;
  --unresolved-surface: #ffe0a3;
  --unresolved-text: #6f4300;
  --on-solid: #ffffff;
  --avatar-text: #ffffff;
  --background: #f5f7fb;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --topbar: #ffffff;
  --field: #ffffff;
  --field-border: #8592a3;
  --border: #c9d1dc;
  --text: #172131;
  --muted: #566477;
  --accent: #2a62cc;
  --accent-text: #ffffff;
  --focus: #b86e00;
  --editing: #b86e00;
  --notice: #e5f6ff;
  --notice-border: #2f9bd0;
  --notice-text: #0d4d70;
  /* What a build made, laid over the Code tree (Phase 132): a hue no other role uses. */
  --built: #7434b8;
  --danger: #a62533;
  --danger-solid: #8f2631;
  --danger-surface: #fff0f1;
  --danger-border: #d6727c;
  --success: #176b37;
  --success-solid: #1f7a3d;
  --success-surface: #e5f7ea;
  --success-border: #4da973;
  --warning: #b86e00;
  --warning-text: #8a5300;
  --avatar: #b8472a;
  --code-surface: #eef5ff;
  --code-text: #174b8a;
  --welcome-start: #dce9ff;
  --welcome-middle: #edf3ff;
  --welcome-end: #f5f7fb;
  --editor-background: #ffffff;
  --editor-text: #1f2328;
  --editor-selection: #dbe8ff;
  --editor-line: #f3f6fa;
  --editor-gutter: #6b7685;
  --editor-gutter-active: #1f2328;
  --syntax-comment: #336b33;
  --syntax-keyword: #0b44c4;
  --syntax-string: #a31515;
  --syntax-number: #0d6b4d;
  --syntax-regexp: #811f3f;
  --syntax-type: #1d6a80;
  --syntax-function: #6a4f1c;
  --syntax-variable: #0e2a8a;
  --syntax-parameter: #5c3d99;
  --syntax-property: #0451a5;
  --syntax-constant: #005f9e;
  --syntax-namespace: #1d6a80;
  --syntax-tag: #800000;
  --syntax-attribute: #b80000;
  --syntax-operator: #333333;
  --syntax-invalid: #c4141b;
  --syntax-macro: #7a4207;
}

[data-theme="paper"] {
  color-scheme: light;
  --lane-0: #2f62c9;
  --lane-1: #9437c2;
  --lane-2: #1a7a43;
  --lane-3: #b35400;
  --lane-4: #0f7585;
  --lane-5: #bf2f58;
  --lane-6: #776800;
  --lane-7: #5f4bd0;
  --lane-text: #ffffff;
  --tint-2: #2fb5a3;
  --tint-3: #a487f5;
  --tint-4: #e0a33a;
  --tint-5: #ec6f95;
  --tint-6: #5fbf62;
  --highlight: #ffe66d;
  --highlight-strong: #f4d84d;
  --highlight-text: #1d2430;
  --highlight-outline: #a87b00;
  --unresolved-surface: #ffe0a3;
  --unresolved-text: #6f4300;
  --on-solid: #ffffff;
  --avatar-text: #ffffff;
  --background: #f7f3ea;
  --surface: #fffdf7;
  --surface-raised: #fffdf7;
  --topbar: #fffdf7;
  --field: #fffdf7;
  --field-border: #8f8370;
  --border: #d9cfbb;
  --text: #2b261e;
  --muted: #665b4a;
  --accent: #a64b14;
  --accent-text: #ffffff;
  --focus: #1f5fa8;
  --editing: #a65f00;
  --notice: #fbefd9;
  --notice-border: #b07a2a;
  --notice-text: #6b4510;
  /* What a build made, laid over the Code tree (Phase 132): a hue no other role uses. */
  --built: #7a3a9e;
  --danger: #a8231c;
  --danger-solid: #93261f;
  --danger-surface: #fbe8e4;
  --danger-border: #d47a70;
  --success: #356b24;
  --success-solid: #3d6e2a;
  --success-surface: #ecf3e1;
  --success-border: #7aa860;
  --warning: #a65f00;
  --warning-text: #7f4a00;
  --avatar: #a64b14;
  --code-surface: #f3ecdc;
  --code-text: #5c3a12;
  --welcome-start: #f2e2c4;
  --welcome-middle: #f7efe0;
  --welcome-end: #f7f3ea;
  --editor-background: #fffdf7;
  --editor-text: #2b261e;
  --editor-selection: #f1e5cc;
  --editor-line: #f8f2e6;
  --editor-gutter: #7d715f;
  --editor-gutter-active: #2b261e;
  --syntax-comment: #6f6553;
  --syntax-keyword: #982f62;
  --syntax-string: #3a6e27;
  --syntax-number: #8f4e00;
  --syntax-regexp: #a8231c;
  --syntax-type: #6e4200;
  --syntax-function: #1d5799;
  --syntax-variable: #2b261e;
  --syntax-parameter: #6a3f8f;
  --syntax-property: #1d5799;
  --syntax-constant: #8f4e00;
  --syntax-namespace: #6e4200;
  --syntax-tag: #982f62;
  --syntax-attribute: #1d5799;
  --syntax-operator: #4a4237;
  --syntax-invalid: #b3261e;
  --syntax-macro: #8f4e00;
}

[data-theme="glacier"] {
  color-scheme: light;
  --lane-0: #2f62c9;
  --lane-1: #9437c2;
  --lane-2: #1a7a43;
  --lane-3: #b35400;
  --lane-4: #0f7585;
  --lane-5: #bf2f58;
  --lane-6: #776800;
  --lane-7: #5f4bd0;
  --lane-text: #ffffff;
  --tint-2: #2fb5a3;
  --tint-3: #a487f5;
  --tint-4: #e0a33a;
  --tint-5: #ec6f95;
  --tint-6: #5fbf62;
  --highlight: #ffe66d;
  --highlight-strong: #f4d84d;
  --highlight-text: #1d2430;
  --highlight-outline: #a87b00;
  --unresolved-surface: #ffe0a3;
  --unresolved-text: #6f4300;
  --on-solid: #ffffff;
  --avatar-text: #ffffff;
  --background: #eef3f8;
  --surface: #fbfdff;
  --surface-raised: #fbfdff;
  --topbar: #fbfdff;
  --field: #fbfdff;
  --field-border: #7d8ea1;
  --border: #c3d0dd;
  --text: #1b2733;
  --muted: #4d5f70;
  --accent: #1d68a8;
  --accent-text: #ffffff;
  --focus: #a35d00;
  --editing: #a35d00;
  --notice: #e1effa;
  --notice-border: #4b95cf;
  --notice-text: #174a73;
  /* What a build made, laid over the Code tree (Phase 132): a hue no other role uses. */
  --built: #6b3fb0;
  --danger: #b0242a;
  --danger-solid: #9a2329;
  --danger-surface: #fbeaeb;
  --danger-border: #d8777b;
  --success: #1f6e51;
  --success-solid: #1f6e51;
  --success-surface: #e3f3ec;
  --success-border: #5aa486;
  --warning: #a35d00;
  --warning-text: #7f4a00;
  --avatar: #2f6398;
  --code-surface: #e6eff8;
  --code-text: #174a73;
  --welcome-start: #d3e4f5;
  --welcome-middle: #e6eff8;
  --welcome-end: #eef3f8;
  --editor-background: #fbfdff;
  --editor-text: #1b2733;
  --editor-selection: #dce9f6;
  --editor-line: #f1f6fb;
  --editor-gutter: #617386;
  --editor-gutter-active: #1b2733;
  --syntax-comment: #55677a;
  --syntax-keyword: #4b40c4;
  --syntax-string: #1f6e51;
  --syntax-number: #9c4200;
  --syntax-regexp: #b0242a;
  --syntax-type: #7a4f00;
  --syntax-function: #1d68a8;
  --syntax-variable: #1b2733;
  --syntax-parameter: #7a3f9c;
  --syntax-property: #1d5f8f;
  --syntax-constant: #9c4200;
  --syntax-namespace: #7a4f00;
  --syntax-tag: #b0242a;
  --syntax-attribute: #4b40c4;
  --syntax-operator: #3b4a59;
  --syntax-invalid: #c0292e;
  --syntax-macro: #9c4200;
}

[data-theme="meadow"] {
  color-scheme: light;
  --lane-0: #2f62c9;
  --lane-1: #9437c2;
  --lane-2: #1a7a43;
  --lane-3: #b35400;
  --lane-4: #0f7585;
  --lane-5: #bf2f58;
  --lane-6: #776800;
  --lane-7: #5f4bd0;
  --lane-text: #ffffff;
  --tint-2: #2fb5a3;
  --tint-3: #a487f5;
  --tint-4: #e0a33a;
  --tint-5: #ec6f95;
  --tint-6: #5fbf62;
  --highlight: #ffe66d;
  --highlight-strong: #f4d84d;
  --highlight-text: #1d2430;
  --highlight-outline: #a87b00;
  --unresolved-surface: #ffe0a3;
  --unresolved-text: #6f4300;
  --on-solid: #ffffff;
  --avatar-text: #ffffff;
  --background: #f2f6ef;
  --surface: #fcfefa;
  --surface-raised: #fcfefa;
  --topbar: #fcfefa;
  --field: #fcfefa;
  --field-border: #7f9174;
  --border: #c6d4bc;
  --text: #1e2a1b;
  --muted: #506049;
  --accent: #2a7130;
  --accent-text: #ffffff;
  --focus: #9a5a00;
  --editing: #9a5a00;
  --notice: #e6f2df;
  --notice-border: #5ea25f;
  --notice-text: #2a5426;
  /* What a build made, laid over the Code tree (Phase 132): a hue no other role uses. */
  --built: #7a3a9e;
  --danger: #a8302a;
  --danger-solid: #9a2b25;
  --danger-surface: #fae9e6;
  --danger-border: #d37d74;
  --success: #2a7130;
  --success-solid: #2f6e33;
  --success-surface: #e4f2e1;
  --success-border: #66a86a;
  --warning: #9a5a00;
  --warning-text: #784600;
  --avatar: #2f6e33;
  --code-surface: #e8f1e2;
  --code-text: #2a5426;
  --welcome-start: #d9ebd0;
  --welcome-middle: #e9f2e3;
  --welcome-end: #f2f6ef;
  --editor-background: #fcfefa;
  --editor-text: #1e2a1b;
  --editor-selection: #e1eed8;
  --editor-line: #f4f8f0;
  --editor-gutter: #66785e;
  --editor-gutter-active: #1e2a1b;
  --syntax-comment: #57684f;
  --syntax-keyword: #7537a0;
  --syntax-string: #2a7130;
  --syntax-number: #954e00;
  --syntax-regexp: #a8302a;
  --syntax-type: #785500;
  --syntax-function: #25619a;
  --syntax-variable: #1e2a1b;
  --syntax-parameter: #7537a0;
  --syntax-property: #25619a;
  --syntax-constant: #954e00;
  --syntax-namespace: #785500;
  --syntax-tag: #a8302a;
  --syntax-attribute: #25619a;
  --syntax-operator: #3c4a37;
  --syntax-invalid: #b8322a;
  --syntax-macro: #954e00;
}

* { box-sizing: border-box; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body { margin: 0; min-height: 100vh; background: var(--background); color: var(--text); font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
.topbar { height: 48px; display: flex; align-items: center; padding: 0 16px; background: var(--topbar); border-bottom: 1px solid var(--border); }
.account-menu { position: relative; margin-left: auto; }
.primary-nav { display: flex; align-self: stretch; margin-left: 28px; }
.signed-out-nav { flex: 1; }
.signed-out-nav .sign-in-nav-link { margin-left: auto; }
.primary-nav a { display: flex; align-items: center; padding: 0 12px; border-bottom: 3px solid transparent; font-weight: 750; text-decoration: none; }
.primary-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.account-menu summary { list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-avatar { display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--border); border-radius: 50%; background: var(--avatar); color: var(--avatar-text); font-size: 12px; font-weight: 800; cursor: pointer; }
.account-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.account-avatar:hover { border-color: var(--accent); }
.account-avatar:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.account-menu-panel { position: absolute; z-index: 10; top: calc(100% + 12px); right: 0; width: 250px; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-raised); box-shadow: 0 18px 45px rgb(0 0 0 / 35%); }
.account-menu-identity { display: grid; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.account-menu-identity span { color: var(--muted); font-size: 14px; }
.account-menu-panel nav { display: grid; padding: 8px; }
.account-menu-panel nav a, .account-menu-panel nav button { display: flex; align-items: center; width: 100%; min-height: 42px; padding: 0 12px; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-weight: 700; text-align: left; text-decoration: none; }
.account-menu-panel nav a:hover, .account-menu-panel nav button:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.account-menu-panel nav a:focus-visible, .account-menu-panel nav button:focus-visible { outline: 3px solid var(--focus); outline-offset: -1px; }
.account-menu-panel form { margin: 0; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 750; text-decoration: none; }
/* The application icon, nearly the bar's height, from an image twice its size for sharp screens. */
.brand-mark { display: block; flex: none; width: 42px; height: 42px; }
.setup-layout { min-height: calc(100vh - 48px); display: grid; grid-template-columns: minmax(360px, 1.12fr) minmax(580px, .88fr); }
.welcome { display: flex; align-items: center; padding: clamp(48px, 8vw, 140px); background: radial-gradient(circle at 20% 15%, var(--welcome-start) 0, var(--welcome-middle) 45%, var(--welcome-end) 80%); }
.welcome h1 { margin: 0 0 24px; max-width: 720px; font-size: clamp(52px, 6vw, 92px); line-height: 1.03; letter-spacing: -.05em; }
.welcome p { max-width: 700px; color: var(--muted); font-size: 23px; }
.setup-panel { display: flex; justify-content: center; align-items: center; padding: 52px clamp(38px, 5vw, 86px); background: var(--topbar); }
.form-shell { width: min(100%, 760px); }
h1, h2 { line-height: 1.15; letter-spacing: -.025em; }
.form-shell h2 { margin: 34px 0 10px; font-size: 40px; }
.lede, .hint { color: var(--muted); }
.notice, .success, .form-error { position: relative; margin: 0 0 24px; padding: 17px 20px; border-radius: 12px; }
.notice { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; gap: 18px; background: var(--notice); border: 1px solid var(--notice-border); color: var(--notice-text); }
.success, .form-error { display: flex; align-items: flex-start; gap: 18px; }
.success { background: var(--success-surface); border: 1px solid var(--success-border); color: var(--success); }
.form-error { background: var(--danger-surface); border: 1px solid var(--danger-border); color: var(--danger); }
/* An inline notice inside a page or dialog. The warning variant marks something the
   reader must act on or cannot undo. */
.banner { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); }
.banner p { margin: 0; }
/* Inside a card or dialog the surrounding grid already spaces its children. */
.review-summary .banner, .dialog-card .banner { margin: 0; }
.banner-warning { border-color: var(--warning); background: color-mix(in srgb, var(--warning) 16%, var(--surface)); }
.banner-success { border-color: var(--success); background: color-mix(in srgb, var(--success) 14%, var(--surface)); }
.banner-dismiss { flex: 0 0 auto; width: 30px; min-height: 30px; margin: -6px -8px -6px auto; padding: 0; border: 0; border-radius: 6px; background: transparent; color: currentColor; font-size: 22px; font-weight: 500; line-height: 1; }
.banner-dismiss:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 20px; margin: 32px 0; align-items: start; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--field-border); border-radius: 10px; background: var(--field); color: var(--text); font: inherit; }
input, select { height: 54px; padding: 0 15px; }
textarea { min-height: 168px; padding: 14px 15px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); border-color: var(--accent); }
.hint, .field-error { margin: 0; font-size: 14px; }
.field-error { color: var(--danger); }
/* Button roles. Every button and link-button is neutral (secondary) unless it opts in to
   exactly one emphasis: .primary for the main action of a form, card, or page,
   .success-button for actions that sign off a review step (approve, resolve), or
   .danger-button for destructive or access-revoking actions. Structural controls (tabs,
   sort headers, menu items) override these with their own more specific rules. */
button, .button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px; border: 1px solid var(--border); border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
:where(button, .button-link):hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
:where(button, .button-link):focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.primary { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--text)); }
.full { width: 100%; }
.centered-page { width: min(100% - 40px, 980px); margin: 0 auto; padding: 70px 0; }
.card { padding: clamp(28px, 5vw, 54px); border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.card.narrow { max-width: 540px; margin: 0 auto; }
.card h1 { margin-top: 0; font-size: 40px; }
.card form { display: grid; gap: 22px; margin-top: 30px; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.security-page { display: grid; gap: 28px; }
.security-heading h1 { margin: 0; font-size: 44px; }
.security-page .card h2 { margin-top: 0; font-size: 28px; }
.admin-page { width: min(100% - 40px, 1180px); }
/* Administration pages with several cards space them like the banners between them. */
.admin-sections > .card { margin: 0 0 16px; }
.project-index-page { padding-top: 36px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.page-heading h1 { margin: 0; font-size: 44px; }
.page-heading p:last-child { margin-bottom: 0; }
/* A bar of tabs scrolls sideways when it is wider than the page, keeping each label on one line. */
.section-nav { display: flex; gap: 8px; margin: -12px 0 24px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.section-nav a { padding: 10px 14px; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 750; text-decoration: none; white-space: nowrap; }
.section-nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--text); }
/* A tab's own pages, under the Administration bar: Code tools' two. */
.admin-subnav { margin-top: -16px; border-bottom: 0; }
.admin-subnav a { padding: 6px 12px; border-bottom-width: 2px; font-size: 14px; font-weight: 650; }
.table-card { padding: 0; overflow: hidden; }
.data-table { display: grid; }
.data-row { display: grid; grid-template-columns: minmax(270px, 2fr) minmax(130px, 1fr) minmax(130px, .8fr) max-content; gap: 24px; align-items: center; min-height: 82px; padding: 14px 22px; border-top: 1px solid var(--border); }
.data-row:first-child { border-top: 0; }
.data-heading { min-height: 56px; background: var(--surface-raised); color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.maintenance-table { width: 100%; border-collapse: collapse; background: var(--surface); text-align: left; }
.maintenance-table th { padding: 12px 14px; background: var(--surface-raised); color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.maintenance-table th .sort-link { display: inline-flex; gap: 6px; align-items: center; color: inherit; text-decoration: none; }
.maintenance-table th .sort-link:hover { color: var(--text); }
.maintenance-table td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: top; }
.maintenance-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.maintenance-table td form { display: block; margin: 0; }
.identity-cell { display: flex; align-items: center; gap: 13px; min-width: 0; }
.identity-cell > span:last-child { display: grid; min-width: 0; }
.identity-cell small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.small-avatar, .detail-avatar { display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--avatar); color: var(--avatar-text); font-weight: 800; }
.small-avatar { width: 42px; height: 42px; font-size: 13px; }
.detail-avatar { width: 86px; height: 86px; margin: 0 auto; font-size: 24px; }
.status-pill { display: inline-flex; width: fit-content; padding: 5px 10px; border: 1px solid var(--success-border); border-radius: 999px; color: var(--success); font-size: 13px; font-weight: 750; }
.status-pill.disabled { border-color: var(--danger-border); color: var(--danger); }
.wide-field { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 28px; }
.credential-card code { display: block; margin: 26px 0; padding: 20px; overflow-wrap: anywhere; border: 1px solid var(--notice-border); border-radius: 10px; background: var(--code-surface); color: var(--code-text); font-size: 18px; }
.detail-grid { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.5fr); gap: 28px; align-items: start; }
.identity-summary { text-align: center; }
.identity-summary h2 { margin-bottom: 0; }
.identity-summary .status-pill { margin: 12px auto 0; }
.detail-sections { display: grid; gap: 28px; }
.detail-sections .card h2 { margin-top: 0; }
.project-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 210px) max-content; gap: 10px; margin: 0 0 24px; }
.project-controls button { height: 54px; }
.project-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
/* A project card is a tinted header naming the project above its description. The
   card clips its children so the header follows the card's rounded corners. */
.project-card { display: grid; grid-template-rows: auto 1fr; min-height: 172px; padding: 0; overflow: hidden; color: inherit; text-decoration: none; transition: border-color .12s ease, transform .12s ease; }
/* Card headers take six tints in turn, by position in the list, so the page is
   easier to scan. The tint is mixed into the surface, so it suits both themes. */
.project-card { --card-tint: var(--accent); }
.project-card:nth-child(6n + 2) { --card-tint: var(--tint-2); }
.project-card:nth-child(6n + 3) { --card-tint: var(--tint-3); }
.project-card:nth-child(6n + 4) { --card-tint: var(--tint-4); }
.project-card:nth-child(6n + 5) { --card-tint: var(--tint-5); }
.project-card:nth-child(6n + 6) { --card-tint: var(--tint-6); }
.project-card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 13px 20px; border-bottom: 1px solid color-mix(in srgb, var(--card-tint) 45%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, var(--card-tint) 30%, var(--surface)), color-mix(in srgb, var(--card-tint) 12%, var(--surface))); font-size: 1.05rem; }
.project-card-header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-card-owner { flex: 0 1 auto; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.project-card-separator { color: var(--muted); }
.project-card-body { display: grid; grid-template-rows: 1fr auto; gap: 12px; padding: 16px 20px 18px; }
.project-card-description-empty { font-style: italic; }
.project-card:hover { border-color: var(--card-tint); transform: translateY(-1px); }
.project-card:hover .project-card-header { background: linear-gradient(135deg, color-mix(in srgb, var(--card-tint) 38%, var(--surface)), color-mix(in srgb, var(--card-tint) 18%, var(--surface))); }
.project-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.project-card-description { display: -webkit-box; overflow: hidden; color: var(--muted); -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.project-card-updated { align-self: end; color: var(--muted); font-size: 12px; }
.token-table .data-row { grid-template-columns: minmax(190px, 1.4fr) minmax(190px, 1fr) minmax(150px, .9fr) minmax(130px, .7fr) max-content; }
.token-table .data-row > span:first-child { display: grid; }
.token-table small { color: var(--muted); }
.token-table form { margin: 0; }
.token-table button { min-height: 42px; padding: 0 14px; }
.ssh-key-table .data-row { grid-template-columns: minmax(190px, 1.2fr) minmax(260px, 1.4fr) minmax(150px, .8fr) max-content; }
.ssh-key-table .data-row > span:first-child { display: grid; }
.ssh-key-table small { color: var(--muted); }
.ssh-key-table form { margin: 0; }
.ssh-key-table button { min-height: 42px; padding: 0 14px; }
.ssh-public-key-field textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; overflow-wrap: anywhere; }
.key-fingerprint { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem; }
.scope-list { display: flex; flex-wrap: wrap; gap: 7px; }
.scope-list code { width: fit-content; padding: 3px 7px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-raised); }
.scope-field { margin: 0; padding: 0; border: 0; }
.scope-field legend { margin-bottom: 8px; font-weight: 700; }
.scope-field label { display: grid; grid-template-columns: max-content max-content 1fr; align-items: center; gap: 6px; font-weight: 400; }
.scope-field input { width: 18px; height: 18px; }
.project-identity { display: grid; min-width: 0; }
.project-name-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.project-identity small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.empty-state { text-align: center; }
.project-form { padding: clamp(28px, 4vw, 46px); }
.project-form .form-grid { margin-top: 0; }
.project-detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .8fr); gap: 28px; }
.project-detail-grid .card h2 { margin-top: 0; }
.wide-project-card { grid-column: 1 / -1; }
.project-settings { min-width: 0; }
.settings-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.settings-tabs button { min-height: 46px; padding: 10px 16px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: var(--muted); white-space: nowrap; }
.settings-tabs button:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--text); }
.settings-tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--text); }
.settings-tabs a { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 16px; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 700; text-decoration: none; white-space: nowrap; }
.settings-tabs a:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--text); }
.settings-tabs a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--text); }
.muted { color: var(--muted); }
.settings-panels { padding-top: 28px; }
.settings-panel { max-width: 1100px; }
.settings-panel > h2 { margin-top: 0; }
.settings-panel > form { margin-top: 28px; }
.settings-panel[hidden] { display: none; }
/* A setting's longer explanation, such as Require a passed build (Phase 134). */
.settings-explainer { margin: 16px 0 20px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); }
.settings-explainer h3 { margin: 0 0 6px; font-size: 15px; }
.settings-explainer p { margin: 0 0 8px; }
.settings-explainer ul { margin: 0; padding-left: 20px; }
.settings-explainer li { margin: 4px 0; }
.settings-section { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 1fr); gap: clamp(24px, 4vw, 52px); padding: 28px 0; border-top: 1px solid var(--border); }
.settings-panel > .settings-section:first-child { border-top: 0; }
.settings-section-heading h3 { margin: 0; font-size: 1rem; }
.settings-section-heading p { margin: 8px 0 0; color: var(--muted); line-height: 1.45; }
.settings-section-body { min-width: 0; }
.settings-section-body > :first-child { margin-top: 0; }
.settings-section-body > :last-child { margin-bottom: 0; }
.settings-section-body form { margin: 0; }
.settings-section-body .metadata-list { margin-top: 18px; }
.settings-clone-list { display: grid; gap: 10px; margin-top: 18px; }
.settings-clone-list .clone-command { margin: 0; }
.settings-clone-description { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.metadata-list { display: grid; gap: 0; margin: 28px 0 0; }
.metadata-list div { display: grid; grid-template-columns: minmax(150px, .6fr) minmax(0, 1.4fr); gap: 20px; padding: 14px 0; border-top: 1px solid var(--border); }
.metadata-list dt { color: var(--muted); font-weight: 700; }
.metadata-list dd { margin: 0; overflow-wrap: anywhere; }
.clone-command { margin: 24px 0 0; padding: 16px 18px; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--code-surface); color: var(--code-text); white-space: nowrap; }
.member-list { display: grid; }
.member-list > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-top: 1px solid var(--border); }
.settings-panel > .member-list > div:first-child { border-top: 0; }
.member-list > div > span:first-child { display: grid; }
.member-list small { color: var(--muted); }
.card .member-form, .settings-panel .member-form { display: grid; grid-template-columns: minmax(140px, 180px) max-content max-content; align-items: center; gap: 10px; margin: 0; }
.member-form select { width: 100%; min-width: 140px; height: 42px; }
.member-form button { min-height: 42px; padding: 0 14px; }
.member-add-form { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(160px, .6fr) max-content; gap: 16px; align-items: end; margin-top: 24px; }
.member-add-form button { height: 54px; }
/* Protected branches: the badge sits on the pattern's line, and Protect sits
   beside its input, as wide as its word, lined up with each row's Remove. */
.protected-branch-list > div > span:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.protected-branch-form { display: grid; gap: 8px; margin-top: 24px; }
.protected-branch-form label { font-weight: 700; }
.protected-branch-row { display: flex; align-items: stretch; gap: 12px; }
.protected-branch-row input { flex: 1; min-width: 0; }
.protected-branch-row button { flex: none; width: auto; }
/* Stop requiring a build: neutral, but filled so it reads as a button on the pale light theme. */
.protected-branch-list .build-stop-button { border-color: color-mix(in srgb, var(--text) 28%, transparent); background: color-mix(in srgb, var(--text) 7%, transparent); }
.protected-branch-list .build-stop-button:hover { background: color-mix(in srgb, var(--text) 13%, transparent); }
.protected-branch-form .hint { margin: 0; }
/* Settings -> CI secrets (Phase 130). */
.ci-secret-list > div > span:first-child { display: grid; gap: 4px; }
.ci-secret-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.status-pill-warning { border-color: var(--warning); color: var(--warning-text); }
.ci-secret-form { display: grid; gap: 8px; margin-top: 24px; }
.ci-secret-form h3, .ci-secret-form .hint { margin: 0; }
.ci-secret-form label { font-weight: 700; }
.ci-secret-form textarea { font-family: var(--mono, ui-monospace, monospace); resize: vertical; }
.ci-secret-form .checkbox-row { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.ci-secret-form .checkbox-row input { width: auto; }
.pagination { display: grid; grid-template-columns: 1fr max-content 1fr; align-items: center; gap: 18px; margin-top: 22px; }
.pagination > :first-child { justify-self: start; }
.pagination > :last-child { justify-self: end; }
.pagination > span { color: var(--muted); font-weight: 700; }
.compact-pagination .button-link { min-height: 42px; padding: 0 14px; }
.lifecycle-card { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.lifecycle-card > form { display: grid; gap: 20px; }
.transfer-grid { margin: 18px 0 0; }
.redirect-list { display: grid; }
.redirect-list > div { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(280px, .8fr); gap: 24px; padding: 18px 0; border-top: 1px solid var(--border); }
.redirect-list > div > span { display: grid; align-content: start; }
.redirect-list small { color: var(--muted); }
.redirect-list details summary { color: var(--danger); font-weight: 750; cursor: pointer; }
.redirect-list form { display: grid; gap: 14px; margin-top: 14px; }

/* The project workspace frame (Phase 106): a rail of icons for the project's
   groups of pages, each opening a menu, and a bar naming the page in use. */
.workspace-frame { display: grid; grid-template: auto minmax(0, 1fr) / 48px minmax(0, 1fr); min-height: calc(100vh - 48px); font-size: 14px; }
.project-rail { grid-row: 1 / -1; border-right: 1px solid var(--border); background: var(--surface); }
/* Sticky makes the rail its own stacking layer, so the layer itself sits above
   the page: otherwise positioned content later in the page covers its menus. */
.project-rail-inner { position: sticky; z-index: 25; top: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; height: calc(100vh - 48px); padding: 6px 0; }
.project-rail-spacer { flex: 1; }
.rail-group { position: relative; }
.rail-button { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; color: var(--muted); }
.rail-button:hover, .rail-button[aria-expanded="true"] { color: var(--text); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.rail-button[aria-current="true"] { color: var(--text); }
.rail-button[aria-current="true"]::before { content: ""; position: absolute; left: -4px; top: 7px; bottom: 7px; width: 4px; border-radius: 0 2px 2px 0; background: var(--accent); }
.rail-button:focus-visible { outline: 3px solid var(--focus); outline-offset: -1px; }
.rail-button[data-quiet-focus]:focus-visible { outline: none; }
.rail-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.rail-menu { position: absolute; z-index: 30; top: 0; left: calc(100% + 6px); display: grid; min-width: 190px; padding: 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); box-shadow: 0 12px 32px rgb(0 0 0 / 30%); }
.rail-menu[hidden] { display: none; }
/* An invisible bridge over the gap to the icon, so the pointer stays in the rail's group
   on its way into an open menu (Phase 122). */
.rail-menu::before { content: ""; position: absolute; top: 0; bottom: 0; left: -8px; width: 8px; }
/* Settings sits at the rail's foot, so its menu opens upwards. */
.rail-group-foot .rail-menu { top: auto; bottom: 0; }
.rail-menu-title { margin: 2px 10px 4px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rail-menu a { padding: 6px 12px; border-radius: 6px; color: var(--text); text-decoration: none; }
.rail-menu a:hover, .rail-menu a:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); outline: none; }
.rail-menu a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 22%, transparent); font-weight: 650; }
/* The Code page's workspace (Phase 106): the file tree, a divider, and the
   branch row above the content, filling the height below the page bar. */
.repository-page.code-page { width: 100%; max-width: none; margin: 0; padding: 0; container-type: normal; }
.code-workspace { --code-tree-width: 260px; --code-status-height: 25px; --code-height: calc(100vh - 48px - 37px); --code-editor-height: calc(var(--code-height) - 42px - var(--code-status-height)); position: relative; display: grid; grid-template-columns: var(--code-tree-width) 5px minmax(0, 1fr); height: var(--code-height); min-height: 360px; }
.code-workspace[data-tree="hidden"] { grid-template-columns: minmax(0, 1fr); }
.code-workspace[data-tree="hidden"] .code-tree, .code-workspace[data-tree="hidden"] .code-tree-grip { display: none; }
.code-workspace[data-resizing] { cursor: col-resize; user-select: none; }
.code-tree { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; border-right: 1px solid var(--border); background: var(--surface); }
.code-tree-head { display: flex; align-items: center; gap: 8px; height: 35px; padding: 0 6px 0 14px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.code-tree-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-tree-button { display: grid; place-items: center; width: 28px; height: 28px; min-height: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.code-tree-button:hover { color: var(--text); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.code-tree-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.code-tree-button[hidden] { display: none; }
.code-tree-list, .code-tree-list ul { margin: 0; padding: 0; list-style: none; }
.code-tree-list { flex: 1; min-height: 0; overflow: auto; padding: 2px 0 14px; font-size: 13px; }
.code-tree-row { display: flex; align-items: center; gap: 4px; height: 22px; padding-right: 8px; color: var(--text); text-decoration: none; white-space: nowrap; cursor: pointer; }
.code-tree-row:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
[aria-selected="true"] > .code-tree-row { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.code-tree-list [role="treeitem"]:focus-visible { outline: none; }
.code-tree-list [role="treeitem"]:focus-visible > .code-tree-row { outline: 2px solid var(--focus); outline-offset: -2px; }
.code-tree-twisty { flex: none; display: grid; place-items: center; width: 18px; color: var(--muted); }
.code-tree-folder { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.code-tree-folder.open { color: var(--accent); }
.code-tree-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.code-tree-inert { color: var(--muted); cursor: default; }
.code-artifacts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 8px 6px 14px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.code-artifacts[hidden] { display: none; }
.code-artifacts-icon, .code-tree-box { flex: none; fill: none; stroke: var(--built); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.code-artifacts-icon { width: 15px; height: 15px; }
.code-tree-box { width: 13px; height: 13px; }
.code-artifacts-title { font-weight: 700; }
.code-artifacts-build { min-width: 0; max-width: 100%; color: var(--built); font-size: 12px; }
/* The selector and Hide share one height, so the row reads as one line. */
select.code-artifacts-build { flex: 0 1 auto; width: auto; height: 24px; min-height: 0; padding: 0 6px; border-radius: 6px; }
.code-artifacts-toggle { height: 24px; min-height: 0; margin-left: auto; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; }
.code-artifacts-toggle:hover { color: var(--text); }
.code-artifacts-note { flex-basis: 100%; }
.code-tree-built { color: var(--built); }
/* Not by colour alone: built names are italic, and a built folder is drawn dashed. */
.code-tree-built .code-tree-name { font-style: italic; }
.code-tree-built .code-tree-folder, .code-tree-built .code-tree-folder.open { color: var(--built); stroke-dasharray: 3 2; }
.code-tree-built-job { flex: none; color: var(--muted); font-size: 11px; }
.code-tree-expired .code-tree-name { text-decoration: line-through; opacity: .7; }
.code-artifact { padding: 14px 16px; overflow: auto; }
.code-artifact-head { display: flex; align-items: center; gap: 8px; }
.code-artifact-badge { padding: 1px 6px; border: 1px solid var(--notice-border); border-radius: 999px; background: var(--notice); color: var(--notice-text); font-size: 11px; font-weight: 700; }
.code-artifact-path { overflow-wrap: anywhere; }
.code-artifact-meta { margin: 6px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.code-artifact-text { max-height: none; }
.code-artifact-image { margin-top: 12px; }
.code-artifact-image img { display: block; max-width: 100%; height: auto; background-color: var(--surface); background-image: conic-gradient(var(--border) 25%, transparent 0 50%, var(--border) 0 75%, transparent 0); background-size: 16px 16px; box-shadow: 0 0 0 1px var(--border); }
.code-tree-note { padding: 3px 8px; color: var(--muted); font-size: 12px; }
.code-tree-more { min-height: 0; margin: 4px 0; padding: 2px 8px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; }
.code-tree-more:hover { color: var(--text); }
.code-tree-grip { margin-left: -3px; cursor: col-resize; z-index: 2; }
.code-tree-grip:hover, .code-tree-grip:focus-visible, .code-workspace[data-resizing] .code-tree-grip { background: var(--accent); outline: none; }
.code-main { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; }
.code-branch-row { display: flex; align-items: center; gap: 10px; height: 42px; min-height: 42px; padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.code-branch-row .compact-ref-switcher { flex: 0 1 320px; margin: 0; }
.code-branch-row .compact-ref-switcher input { height: 32px; min-height: 0; font-size: 13px; }
.code-branch-row .commit-chip { flex: none; }
.code-branch-spacer { flex: 1; }
.code-branch-row .markdown-view-toggle .button-link { min-height: 30px; width: 34px; }
.code-actions { display: inline-flex; align-items: center; gap: 8px; }
.code-branch-row .code-actions > .button-link { min-height: 30px; height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.code-content { min-width: 0; min-height: 0; overflow: auto; }
.code-content-directory { padding: 16px 20px 40px; }
.code-content-file > .repository-readme, .code-content-file > .repository-state { margin: 16px 20px; }
.code-content-file > .source-viewer { display: flex; flex-direction: column; min-height: 100%; border: 0; border-radius: 0; }
.code-page .source-editor-stack { min-height: 0; }
.code-page .monaco-editor, .code-page .source-fallback { height: var(--code-editor-height); min-height: 200px; }
/* With analysis, the tray's tab bar takes a row; the tray itself shares the editor's height. */
.code-page .language-workbench { --language-shared-height: calc(var(--code-editor-height) - 31px); }
/* With no analysis for the file shown, the tray's tab row is hidden: the
   editor takes its room rather than leave a strip below the status bar. */
.code-page .language-workbench:has(> .language-rail[hidden]) { --language-shared-height: var(--code-editor-height); }
/* The diff and the Markdown preview stand where the editor does, at its height. */
.code-page .language-workbench:not([data-tray="open"]) > .source-editor-stack > :is(.code-diff, .code-preview) { height: var(--language-shared-height); }
.code-page .language-workbench:not([data-tray="open"]) > .source-editor-stack > .monaco-editor, .code-page .language-workbench:not([data-tray="open"]) > .source-editor-stack > .source-fallback { height: var(--language-shared-height); }
/* Open files, one tab each above the editor (Phase 109). The row takes 35px
   from the editor's height. A kept tab in front has a solid accent line along
   its top; a preview tab always has a dashed one, and its name is in italics
   and dimmer, so the tab the next single click replaces is plain to see. */
.code-workspace:has(#code-tabs) { --code-editor-height: calc(var(--code-height) - 42px - var(--code-status-height) - 35px); }
/* vi's row below the status bar takes its height from the editor (Phase 054). */
.code-workspace:has(.vi-bar) { --code-status-height: 50px; }
.code-tabs { position: relative; display: flex; flex: none; height: 35px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--border); background: var(--surface); scrollbar-width: thin; }
.code-tab { display: flex; flex: none; align-items: center; gap: 6px; max-width: 240px; padding: 0 6px 0 12px; border-right: 1px solid var(--border); color: var(--muted); font-size: 13px; white-space: nowrap; cursor: pointer; user-select: none; }
.code-tab:hover { color: var(--text); }
.code-tab.active { background: var(--background); color: var(--text); box-shadow: inset 0 2px 0 var(--accent); }
.code-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.code-tab-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.code-tab.preview .code-tab-label { font-style: italic; }
.code-tab.preview { background-image: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 10px); background-repeat: no-repeat; background-size: 100% 2px; color: color-mix(in srgb, var(--muted) 85%, transparent); }
.code-tab.preview.active { background-color: var(--background); box-shadow: none; color: color-mix(in srgb, var(--text) 72%, var(--muted)); }
.code-tab-folder { min-width: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; }
.code-tab-close { display: grid; flex: none; place-items: center; width: 20px; height: 20px; border-radius: 4px; color: var(--muted); font-size: 15px; line-height: 1; visibility: hidden; }
.code-tab:hover .code-tab-close, .code-tab.active .code-tab-close { visibility: visible; }
.code-tab-close:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }
.code-tabs[data-dragging] { cursor: grabbing; }
.code-tab-marker { position: absolute; top: 4px; bottom: 4px; width: 2px; background: var(--accent); pointer-events: none; }
.code-page .source-editor-stack { position: relative; }
.code-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; color: var(--muted); text-align: center; pointer-events: none; }
.code-empty[hidden] { display: none; }
/* Quick open: a box near the top of the page over a dimmed backdrop. */
.quick-open { top: 64px; width: min(620px, calc(100vw - 32px)); margin: 0 auto; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); color: var(--text); box-shadow: 0 24px 70px rgb(0 0 0 / 45%); }
.quick-open::backdrop { background: rgb(5 10 18 / .45); }
.quick-open-input { width: 100%; height: 42px; padding: 0 14px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; font-size: 14px; outline: none; }
.quick-open-input:focus { outline: none; }
.quick-open-results { max-height: min(360px, 60vh); margin: 0; padding: 4px; overflow: auto; list-style: none; }
.quick-open-results:empty { display: none; }
.quick-open-results li { display: flex; align-items: baseline; gap: 10px; min-width: 0; padding: 5px 10px; border-radius: 6px; font-size: 14px; cursor: pointer; }
.quick-open-results li:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.quick-open-results li[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.quick-open-name { flex: none; white-space: nowrap; }
.quick-open-folder { min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.quick-open mark { background: none; color: var(--accent); font-weight: 700; }
.quick-open-notice { margin: 0; padding: 8px 14px; color: var(--muted); font-size: 13px; }
/* Editing (Phase 096), as in the Phase 107 mockups. In edit mode the branch
   row shows the working branch instead of the branch field; Changes sits above
   the tree; an uncommitted tab has a dot; and a note above the editor says
   when analysis is paused or a file stays read only. */
.code-edit-button { flex: none; }
.code-edit-button[hidden], .code-edit-bar[hidden] { display: none; }
.code-workspace[data-mode="edit"] .compact-ref-switcher, .code-workspace[data-mode="edit"] .commit-chip, .code-workspace[data-mode="edit"] .code-branch-row > .code-branch-spacer { display: none; }
.code-edit-bar { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; container-type: inline-size; }
.code-edit-bar button, .code-edit-bar .button-link { flex: none; white-space: nowrap; }
.code-edit-ahead { flex: none; color: var(--muted); font-size: 13px; white-space: nowrap; }
.code-merge-request { min-height: 30px; height: 30px; }
.code-edit-from { flex: 0 1 auto; }
/* Narrow: the count of commits ahead moves to the button's tooltip. */
@media (max-width: 1180px) { .code-edit-ahead { display: none; } }
/* A bar too narrow for where the edits began drops it rather than keep a
   fragment; the commit dialog still says it. */
@container (max-width: 760px) { .code-edit-from { display: none; } }
.code-edit-branch { display: inline-flex; flex: none; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border: 1px solid var(--editing); border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 700; }
.code-edit-new { padding: 1px 6px; border-radius: 4px; background: color-mix(in srgb, var(--editing) 22%, transparent); color: var(--text); font-family: system-ui, sans-serif; font-size: 11px; font-weight: 600; }
.code-edit-from { min-width: 0; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.code-commit-button:disabled { opacity: .55; }
.code-changes { display: flex; flex: none; flex-direction: column; border-bottom: 1px solid var(--border); }
.code-changes[hidden], .code-changes-grip[hidden] { display: none; }
.code-changes-head { display: flex; align-items: center; height: 32px; padding: 0 6px 0 8px; }
.code-changes-toggle { display: inline-flex; flex: 1; align-items: center; gap: 6px; min-height: 0; height: 28px; padding: 0 4px; border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; justify-content: flex-start; }
.code-changes-toggle[aria-expanded="false"] .code-changes-chevron { transform: rotate(-90deg); }
.code-changes-count { padding: 0 6px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--text); letter-spacing: 0; }
.code-changes-list { max-height: 30vh; margin: 0; padding: 0 0 6px; overflow: auto; list-style: none; font-size: 13px; }
.code-change { display: flex; align-items: center; }
.code-change-open { display: flex; flex: 1; align-items: baseline; gap: 8px; min-width: 0; min-height: 0; height: 24px; padding: 0 8px 0 14px; border: 0; border-radius: 0; background: transparent; color: var(--text); font-weight: 400; justify-content: flex-start; }
.code-change-open:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.code-change-mark, .code-tree-mark { flex: none; color: var(--warning-text); font-size: 11px; font-weight: 800; }
.code-change-name { white-space: nowrap; }
.code-change-folder { min-width: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.code-change-discard { width: 24px; height: 24px; margin-right: 4px; visibility: hidden; }
.code-change:hover .code-change-discard, .code-change-discard:focus-visible { visibility: visible; }
.code-changes-empty { padding: 4px 14px; color: var(--muted); font-size: 12px; }
.code-changes-grip { flex: none; height: 5px; margin-top: -3px; cursor: row-resize; }
.code-changes-grip:hover, .code-changes-grip:focus-visible { background: var(--accent); outline: none; }
.code-tree-mark { margin-left: auto; padding-left: 8px; }
/* A file locked with Git LFS (Phase 067); the reader's own locks in the accent. */
.code-tree-lock { flex: none; display: inline-flex; margin-left: auto; padding-left: 6px; color: var(--muted); }
.code-tree-lock.mine { color: var(--accent); }
.code-tree-lock svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.code-tree-lock + .code-tree-mark { margin-left: 0; }
.lock-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lock-table th, .lock-table td { padding: 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.lock-table code { overflow-wrap: anywhere; }
#settings-panel-locks .table-scroll + .hint { margin-top: 12px; }
.lock-force { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lock-force label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.lock-force input[type="checkbox"] { width: auto; height: auto; }
.lock-disabled { color: var(--muted); font-size: 13px; }
.code-tab-dot, .code-tab-x { display: none; }
.code-tab.dirty .code-tab-close { visibility: visible; }
.code-tab.dirty .code-tab-dot { display: inline; font-size: 10px; }
.code-tab.dirty:hover .code-tab-dot { display: none; }
.code-tab.dirty:hover .code-tab-x { display: inline; }
.code-tab.diff .code-tab-label { color: var(--warning-text); }
.code-paused { flex: none; margin: 0; padding: 5px 14px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--editing) 12%, var(--surface)); font-size: 13px; }
.code-paused[hidden] { display: none; }
.code-workspace:has(#code-paused:not([hidden])) { --code-editor-height: calc(var(--code-height) - 42px - var(--code-status-height) - 35px - 29px); }
.code-diff { height: var(--code-editor-height); min-height: 200px; }
/* An image tab (Phase 125): shown over the editor, scaled to fit, never past its own size. */
.code-image { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: hidden; background: var(--background); }
.code-image[hidden] { display: none; }
.code-image img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; background-color: var(--surface); background-image: conic-gradient(var(--border) 25%, transparent 0 50%, var(--border) 0 75%, transparent 0); background-size: 16px 16px; box-shadow: 0 0 0 1px var(--border); }
.code-image.failed img { display: none; }
.code-image.failed::after { content: "The image could not be shown. Use Download to get it."; color: var(--muted); }
.code-image.failed[data-kind="svg"]::after { content: "This SVG could not be drawn. Source shows its text."; }
.code-diff[hidden] { display: none; }
.code-status-changes { min-height: 0; height: 22px; padding: 0 6px; border: 0; background: transparent; color: var(--warning-text); font-size: 12px; font-weight: 700; }
.code-status-changes[hidden] { display: none; }
.edit-dialog .edit-options { display: grid; gap: 8px; margin: 12px 0; }
.edit-option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.edit-option input { width: auto; height: auto; margin-top: 4px; }
.edit-option-text { display: grid; gap: 2px; }
.edit-name { display: grid; gap: 6px; margin: 12px 0; }
.edit-name[hidden] { display: none; }
.edit-name input, .commit-dialog input, .commit-dialog textarea { height: 38px; padding: 0 12px; border-radius: 8px; font-size: 14px; }
.commit-dialog textarea { height: auto; padding: 8px 12px; }
.edit-name-note[data-state="ok"] { color: var(--success); }
.edit-name-note[data-state="bad"] { color: var(--danger); }
.commit-dialog .field { display: grid; gap: 6px; margin: 12px 0; }
.commit-where { color: var(--muted); }
.commit-where strong { color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.commit-where .code-edit-new { margin-left: 6px; }
.commit-files { max-height: 160px; margin: 8px 0; padding: 8px 12px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; list-style: none; font-size: 13px; }
.commit-files li { display: flex; gap: 8px; }
.commit-dialog { max-height: calc(100vh - 32px); }
.commit-dialog .dialog-card { max-height: calc(100vh - 34px); overflow: auto; }
.commit-dialog .field { margin: 8px 0; }
.commit-dialog textarea { min-height: 64px; max-height: 160px; }
.commit-problem { display: grid; gap: 8px; }
.commit-problem[hidden], .commit-rename[hidden] { display: none; }
.commit-problem button { justify-self: start; white-space: nowrap; }
.code-status { display: flex; align-items: center; gap: 12px; height: 25px; padding: 0 12px; border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; }
.code-status-path { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.code-status-spacer { flex: 1; }
.repository-state-actions { display: flex; gap: 10px; }
@media (max-width: 900px) {
  .code-workspace { grid-template-columns: minmax(0, 1fr); }
  .code-tree { position: absolute; z-index: 20; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); box-shadow: 12px 0 30px rgb(0 0 0 / 35%); }
  .code-tree-grip { display: none; }
  .code-branch-row { flex-wrap: wrap; height: auto; padding: 4px 12px; }
}

/* Overview: the project's activity, details, Clone menu, and README. */
.overview-section { margin-bottom: 22px; }
.overview-heading { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.overview-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.overview-heading-row .clone-menu { flex: none; }
.overview-description { max-width: 78%; margin: 0; font-size: 16px; }
.overview-details { margin: 8px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.repository-readme > header a { color: inherit; text-decoration: none; }
.overview-heading + .repository-readme { margin-top: 0; }
.repository-readme > header a:hover { color: var(--accent); text-decoration: underline; }
.page-bar { display: flex; align-items: baseline; gap: 12px; min-width: 0; height: 37px; padding: 9px 16px 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.page-bar h1 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
.page-bar-home { color: inherit; text-decoration: none; }
.page-bar-home:hover { color: var(--accent); text-decoration: underline; }
.project-path { display: inline-flex; align-items: baseline; gap: 4px; min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; }
.project-path strong { color: var(--text); }
.project-public-indicator { flex: 0 0 auto; font-size: 12px; line-height: 1; }
.repository-page { width: min(100% - 48px, 1320px); margin: 0 auto; padding: 22px 0 70px; min-width: 0; container-type: inline-size; }
.repository-page > * { min-width: 0; max-width: 100%; }
.repository-heading { display: flex; align-items: end; justify-content: flex-end; gap: 24px; margin-bottom: 18px; }
.repository-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.repository-heading h1 { margin: 0; font-size: 36px; }
.project-code-description { max-width: 780px; margin: 7px 0 0; color: var(--muted); line-height: 1.45; }
.commit-chip { display: inline-flex; padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; }
.repository-breadcrumbs { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; overflow-x: auto; white-space: nowrap; }
.repository-breadcrumbs a { color: var(--accent); text-decoration: none; }
.repository-context-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; overflow: visible; }
.repository-context-bar .repository-breadcrumbs { flex: 0 0 auto; margin: 0; overflow: visible; }
.repository-context-bar .commit-chip { flex: 0 0 auto; }
.repository-browser, .source-viewer { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.repository-table { display: grid; }
.repository-row { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(240px, .8fr) 220px; gap: 18px; align-items: center; min-height: 42px; padding: 6px 16px; border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.repository-row:first-child { border-top: 0; }
.repository-row:not(.repository-table-heading):hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.repository-table-heading { min-height: 40px; background: var(--surface-raised); color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.repository-table-heading button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.repository-table-heading button:hover { color: var(--text); }
.repository-name { display: flex; align-items: center; gap: 10px; min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
/* The same closed-folder outline the file tree draws beside a directory;
   a file keeps the space empty so names line up. */
.repository-folder { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.repository-last-commit { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repository-row code { color: var(--muted); }
.repository-empty-row { padding: 42px 20px; color: var(--muted); text-align: center; }
.repository-readme { margin-top: 22px; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.repository-readme > header { padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface-raised); }
.markdown-body { padding: 22px 26px; overflow-wrap: anywhere; line-height: 1.65; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body h1, .markdown-body h2 { padding-bottom: .3em; border-bottom: 1px solid var(--border); }
.markdown-body a { color: var(--accent); }
.markdown-body img { max-width: 100%; height: auto; }
.markdown-body pre { max-width: 100%; padding: 14px; overflow: auto; border-radius: 8px; background: var(--background); }
.markdown-body code { padding: .12em .3em; border-radius: 4px; background: var(--background); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.markdown-body pre code { padding: 0; background: transparent; }
.markdown-body blockquote { margin-left: 0; padding-left: 16px; border-left: 4px solid var(--border); color: var(--muted); }
.markdown-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.markdown-body th, .markdown-body td { padding: 7px 12px; border: 1px solid var(--border); }
.markdown-body .contains-task-list { padding-left: 1.25rem; list-style: none; }
.markdown-body .task-list-item { margin-block: .2rem; }
.markdown-body .task-list-item-checkbox { width: auto; min-height: 0; margin: 0 .5rem 0 -1.25rem; accent-color: var(--accent); }
.markdown-body .markdown-image-unavailable { display: inline-block; padding: 0 6px; border: 1px dashed var(--border); border-radius: 4px; color: var(--muted); font-size: .85em; }
.markdown-omitted { margin: 0; padding: 22px 26px; color: var(--muted); }
.repository-state { text-align: center; }
.repository-state h2 { margin-top: 0; }
.repository-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--muted); }
.repository-actions .spacer { flex: 1; }
.repository-actions .button-link { min-height: 40px; padding: 0 14px; color: var(--text); }
.markdown-view-toggle { display: inline-flex; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; }
.markdown-view-toggle .button-link { width: 42px; padding: 0; border: 0; border-radius: 0; }
.markdown-view-toggle .button-link + .button-link { border-left: 1px solid var(--border); }
.markdown-view-toggle .button-link.active { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--accent); }
.markdown-view-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.markdown-file-preview { margin-top: 0; }
.lfs-badge { display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.markdown-file-preview > header { display: flex; justify-content: space-between; gap: 16px; }
.markdown-file-preview > header span { color: var(--muted); font-size: 13px; font-weight: 700; }
.source-viewer > header { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 10px 16px; background: var(--surface-raised); border-bottom: 1px solid var(--border); }
.source-viewer > header strong { margin-right: auto; overflow-wrap: anywhere; }
.source-viewer > header span { color: var(--muted); font-size: 13px; font-weight: 700; }
.source-metadata { display: flex; flex-wrap: wrap; gap: 14px; padding: 9px 16px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.source-metadata code { margin-left: auto; }
.source-editor-stack { display: grid; width: 100%; max-width: 100%; min-width: 0; min-height: 480px; overflow: hidden; contain: inline-size; }
.monaco-editor, .source-fallback { grid-area: 1 / 1; width: 100%; height: min(70vh, 760px); min-height: 480px; box-sizing: border-box; }
.monaco-editor { z-index: 0; }
.source-fallback { z-index: 1; margin: 0; padding: 18px; overflow: auto; overflow-wrap: anywhere; white-space: pre-wrap; background: var(--editor-background); color: var(--editor-text); font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 4; }
.editor-failure { margin: 0; padding: 12px 16px; color: var(--danger); }
.ref-switcher { display: grid; grid-template-columns: max-content minmax(220px, 380px) max-content; gap: 10px; align-items: center; margin: 0 0 18px; }
.ref-switcher label { font-weight: 700; }
.ref-switcher select, .ref-switcher input, .ref-switcher button { height: 44px; min-height: 44px; }
/* Ref combobox list. It is shown in the top layer and positioned by script beneath its
   field, so the popover defaults that would centre it are cleared. */
.ref-suggestions { position: fixed; inset: auto; z-index: 40; margin: 0; padding: 6px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); box-shadow: 0 12px 30px rgb(0 0 0 / .3); color: var(--text); list-style: none; }
.ref-suggestions[hidden] { display: none; }
.ref-suggestions li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.ref-suggestions li span { min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ref-suggestions li code { flex: 0 1 auto; min-width: 0; overflow: hidden; color: var(--muted); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.ref-suggestions li:hover, .ref-suggestions li.active { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.ref-suggestions li[aria-selected="true"] span::after { content: " ✓"; color: var(--accent); }
.ref-suggestions .ref-suggestions-note, .ref-suggestions .ref-suggestions-heading { color: var(--muted); font-size: .82rem; cursor: default; }
.ref-suggestions .ref-suggestions-note:hover, .ref-suggestions .ref-suggestions-heading:hover { background: transparent; }
.ref-suggestions .ref-suggestions-heading { margin-top: 4px; padding-top: 9px; border-top: 1px solid var(--border); border-radius: 0; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ref-suggestions .ref-suggestions-heading:first-child { margin-top: 0; padding-top: 7px; border-top: 0; }
/* Every branch, tag, or commit field opens a list when chosen; the arrow says so. */
input[data-ref-suggest] { padding-right: 34px; background-image: url("chevron-down.svg"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px 14px; cursor: pointer; }
input[data-ref-suggest]:focus { cursor: text; }
.compact-ref-switcher { display: block; flex: 0 0 240px; margin: 0 0 0 auto; }
.repository-context-bar .compact-ref-switcher { flex: 0 1 320px; margin: 0; }
.clone-menu { position: relative; flex: 0 0 auto; }
.repository-context-bar .clone-menu { margin-left: auto; }
.clone-menu summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; list-style: none; cursor: pointer; }
.clone-menu summary::-webkit-details-marker { display: none; }
.clone-menu-items { position: absolute; z-index: 5; top: calc(100% + 6px); right: 0; display: grid; min-width: 150px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); box-shadow: 0 12px 30px rgb(0 0 0 / .25); }
.clone-menu-items button { justify-content: flex-start; min-height: 38px; padding: 0 12px; border: 0; background: transparent; color: var(--text); text-align: left; }
.clone-menu-items button:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ref-catalog { min-width: 0; }
/* A tab's own introduction and action, below the Administration bar. */
.admin-section-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 16px; }
.admin-section-intro .lede { margin: 0; }
/* A running mirror sync's step, under its start in Settings -> Mirror. */
.mirror-step { display: block; margin-top: 4px; }
.ref-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.ref-page-heading h2 { margin: 0; }
.ref-tab-actions { display: flex; flex: none; align-items: center; gap: 10px; }
.ref-list-card { margin-bottom: 28px; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ref-list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 22px 24px; }
.ref-list-heading h2 { margin: 0; }
.ref-list-heading span { color: var(--muted); }
.ref-list { overflow-x: auto; }
.ref-row { display: grid; grid-template-columns: minmax(240px, 1fr) 150px 210px 90px; gap: 18px; align-items: center; min-width: 760px; min-height: 62px; padding: 12px 24px; border-top: 1px solid var(--border); }
.ref-row > span:first-child { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ref-row a { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.ref-row-heading a:hover { color: var(--text); }
.ref-row-heading { min-height: 44px; background: var(--surface-raised); color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ref-list-card .pagination { margin: 0; padding: 16px 24px; border-top: 1px solid var(--border); }
.danger-button { border-color: var(--danger-solid); background: var(--danger-solid); color: var(--on-solid); }
.success-button { border-color: var(--success-solid); background: var(--success-solid); color: var(--on-solid); }
.success-button:hover { background: color-mix(in srgb, var(--success-solid) 86%, #000); }
.danger-button:hover { background: color-mix(in srgb, var(--danger-solid) 86%, #000); }
.danger-zone { border-color: var(--danger-solid); }
.danger-zone .settings-section-heading h3 { color: var(--danger); }
.compact-button { min-height: 36px; height: 36px; padding: 0 14px; border-radius: 8px; }
button:disabled { cursor: not-allowed; opacity: .45; pointer-events: none; }
/* The neutral style by name. It carries its own border so elements that are not
   buttons, such as the Clone menu's summary, still look like one. */
.secondary-button { border: 1px solid var(--border); border-radius: 10px; background: transparent; color: var(--text); font-weight: 750; }
.secondary-button:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.secondary-button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ref-dialog { width: min(100% - 32px, 560px); padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 24px 70px rgb(0 0 0 / .35); }
.ref-dialog::backdrop { background: rgb(5 10 18 / .72); }
.dialog-card { display: grid; gap: 18px; padding: 26px; }
.dialog-card h2, .dialog-card p { margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.merge-request-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
.merge-request-filter { display: flex; align-items: center; gap: 10px; margin: 0; }
.merge-request-filter label { align-self: center; font-weight: 700; }
.merge-request-filter select { width: 170px; height: 36px; min-height: 0; padding: 0 12px; border-radius: 8px; }
.merge-request-list { min-width: 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.merge-request-row { display: grid; grid-template-columns: 110px 190px 160px minmax(280px, 1fr); gap: 16px; align-items: center; min-width: 800px; min-height: 50px; padding: 8px 16px; border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.merge-request-row:first-child { border-top: 0; }
.merge-request-row:not(.merge-request-row-heading):hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.merge-request-row-heading { min-height: 40px; background: var(--surface-raised); color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.merge-request-row-heading a { display: inline-flex; gap: 5px; color: inherit; text-decoration: none; }
.merge-request-row-heading a:hover { color: var(--text); }
.merge-request-row > span:last-child { display: grid; min-width: 0; }
.merge-request-row strong, .merge-request-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merge-request-row small { color: var(--muted); }
.merge-request-row .status-closed { border-color: var(--muted); color: var(--muted); }
.merge-request-list + .pagination { margin-top: 14px; }
.merge-request-dialog { width: min(100% - 32px, 720px); }
.merge-request-ref-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.merge-request-heading-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.merge-request-heading-actions form { margin: 0; }
.merge-request-heading-actions button { min-height: 40px; padding: 0 14px; white-space: nowrap; }
.merge-request-reset-warning[hidden] { display: none; }
.merge-option { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.merge-option input { width: auto; height: auto; }
.merge-option .muted { flex-basis: 100%; font-size: .86rem; font-weight: 400; }
[data-squash-field][hidden] { display: none; }
/* The merge control sits where the verdict badge would, at the same compact size. */
.review-summary .review-merge-button { flex: 0 0 auto; white-space: nowrap; }
.merged-summary-text { flex: 1 1 260px; min-width: 0; margin: 0; }
.merged-commits { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding-top: 10px; border-top: 1px solid var(--border); font-size: .9rem; }
.merged-commits div { display: flex; align-items: baseline; gap: 8px; }
.merged-commits dt { color: var(--muted); }
.merged-commits dd { margin: 0; font-weight: 700; }
.merge-request-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.merge-request-detail-heading h1 { margin-bottom: 8px; }
.merge-request-detail-heading p { margin: 0; }
.merge-request-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 22px; }
.merge-request-tabs { margin-bottom: 24px; }
.merge-request-review-summary { margin: 0; }
.merge-request-review-summary h2 { margin-top: 0; }
/* Author-written plain text; pre-wrap keeps its line breaks without rendering markup. */
.merge-request-description { max-width: 90ch; margin: 0 0 18px; overflow-wrap: anywhere; white-space: pre-wrap; }
.merge-request-summary-table { margin-top: 0; }
.merge-request-summary-table div { grid-template-columns: minmax(150px, .35fr) minmax(0, 1.65fr); }
.merge-request-commits { margin-top: 0; }
.merge-request-changes { margin-top: 0; }
.merge-request-commits .history-entries { padding: 0; overflow: hidden; }
.merge-request-commits .history-entry + .history-entry { border-top: 1px solid var(--border); }
.merge-request-commits .history-content { padding: 9px 16px; }
.merge-request-commits .repository-empty-row { padding: 12px 16px; }
.commit-list-hash { flex: 0 0 auto; color: var(--muted); }
/* A commit's or a merge request's changes: every changed path as a tree on
   the left, resizable by its corner, and the chosen file's diff on the right. */
.changes-browser { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.changes-view { min-width: 0; }
.changes-view .file-diff { margin-top: 0; }
.changes-tree { position: sticky; top: 12px; box-sizing: border-box; width: 340px; min-width: 200px; max-width: 60vw; max-height: calc(100vh - 24px); padding: 8px 6px; overflow: auto; resize: horizontal; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 13px; }
.changes-tree-nodes { margin: 0; padding: 0; list-style: none; }
.changes-tree-nodes .changes-tree-nodes { padding-left: 12px; }
.changes-tree summary { display: flex; gap: 6px; align-items: baseline; padding: 3px 6px; border-radius: 6px; cursor: pointer; list-style: none; }
.changes-tree summary::-webkit-details-marker { display: none; }
.changes-tree summary::before { content: "▸"; width: 10px; color: var(--muted); }
.changes-tree details[open] > summary::before { content: "▾"; }
.changes-tree summary:hover, .changes-tree-file:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.changes-tree-folder { overflow-wrap: anywhere; }
.changes-tree-count { margin-left: auto; color: var(--muted); font-size: 12px; }
.changes-tree-file { display: flex; gap: 7px; align-items: baseline; padding: 3px 6px 3px 8px; border-radius: 6px; color: var(--text); text-decoration: none; }
.changes-tree-file[aria-current="true"] { background: color-mix(in srgb, var(--accent) 22%, transparent); font-weight: 700; }
.changes-tree-file .change-status { flex: none; min-width: 0; padding: 0 5px; font-size: 11px; }
.changes-tree-name { min-width: 0; overflow-wrap: anywhere; }
.changes-tree-deleted { text-decoration: line-through; color: var(--muted); }
.changes-tree-file.has-review-comments { background: var(--highlight); color: var(--highlight-text); }
.changes-tree-file.has-review-comments:hover, .changes-tree-file.has-review-comments[aria-current="true"] { background: var(--highlight-strong); }
.changes-tree-counts { flex: none; margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.changes-tree-counts ins { color: var(--success); text-decoration: none; }
.changes-tree-counts del { color: var(--danger); text-decoration: none; }
@media (max-width: 800px) {
  .changes-browser { grid-template-columns: minmax(0, 1fr); }
  .changes-tree { position: static; width: auto !important; max-width: none; max-height: 40vh; resize: none; }
}
.changed-file-selector { margin-bottom: 20px; padding: 0; overflow: hidden; }
.changed-file-selector ul { margin: 0; padding: 0; list-style: none; }
.changed-file-selector li { min-width: 0; border-bottom: 1px solid var(--border); }
.changed-file-selector li:last-child { border-bottom: 0; }
.changed-file-selector a { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px 14px; color: var(--foreground); text-decoration: none; }
.changed-file-selector a:hover, .changed-file-selector a[aria-current="true"] { background: var(--selected); }
.changed-file-selector a.has-review-comments { background: var(--highlight); color: var(--highlight-text); }
.changed-file-selector a.has-review-comments:hover, .changed-file-selector a.has-review-comments[aria-current="true"] { background: var(--highlight-strong); }
.changed-file-selector code { min-width: 0; overflow-wrap: anywhere; }
.file-change-counts { display: inline-flex; flex: 0 0 auto; gap: 10px; margin-left: auto; color: var(--muted); font-size: .86rem; font-weight: 700; white-space: nowrap; }
.file-change-counts ins { color: var(--success); text-decoration: none; }
.file-change-counts del { color: var(--danger); text-decoration: none; }
.selected-file-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 26px 0 12px; scroll-margin-top: 20px; }
.selected-file-heading h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.selected-file-heading h2 code { font: inherit; font-weight: inherit; letter-spacing: inherit; }
.selected-file-heading a { color: inherit; text-decoration: none; }
.selected-file-heading a:hover, .selected-file-heading a:focus-visible { text-decoration: underline; }
/* In a diff card the heading is the card's header, so the card's top lines up with the tree beside it. */
.file-diff > .selected-file-heading { align-items: center; margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface-raised); }
.file-diff > .selected-file-heading h2 { font-size: 16px; }
[data-review-line] { cursor: text; }
.inline-discussion-highlight, .discussion-diff-excerpt mark { border-radius: 2px; background: var(--highlight); color: var(--highlight-text); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.inline-discussion-highlight { text-decoration: none; cursor: pointer; }
.inline-discussion-highlight:hover, .inline-discussion-highlight:focus-visible { outline: 2px solid var(--highlight-outline); outline-offset: 1px; }
::highlight(pending-inline-comment) { background: var(--highlight); color: var(--highlight-text); }
.inline-comment-popover { position: fixed; z-index: 60; width: min(420px, calc(100vw - 24px)); padding: 14px; border: 1px solid var(--accent); border-radius: 10px; background: var(--surface-raised); box-shadow: 0 16px 42px rgb(0 0 0 / 35%); }
.inline-comment-popover::before { position: absolute; top: calc(50% - 8px); left: -9px; width: 16px; height: 16px; border-bottom: 1px solid var(--accent); border-left: 1px solid var(--accent); background: var(--surface-raised); content: ""; transform: rotate(45deg); }
.inline-comment-popover form { display: grid; gap: 10px; }
.inline-comment-popover p { margin: 0; }
.inline-comment-popover textarea { min-height: 88px; }
.inline-review-line textarea, .discussion-composer textarea { min-height: 88px; }
.discussion-composer { margin: 12px 0 10px; padding: 16px; }
.discussion-composer h2 { margin-top: 0; }
.discussion-composer form, .discussion-reply { display: grid; gap: 8px; }
/* Compact two-row review summary: checks and verdict, then approvers and actions. */
/* The single column may shrink below its content so rows wrap instead of overflowing. */
.review-summary { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 16px; padding: 14px 20px; }
.review-summary-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.review-summary h2 { margin: 0; font-size: 1rem; }
.review-summary form { display: block; margin: 0; }
.review-summary button { min-height: 32px; padding: 0 12px; border-radius: 8px; font-size: .9rem; }
.review-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; padding: 0; list-style: none; }
/* The checks take their own row once the title and verdict leave too little room. */
.review-checks { flex: 1 1 260px; min-width: 0; }
.review-check { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: .86rem; font-weight: 700; }
.review-check-pass > span { color: var(--success); }
.review-check-blocked { border-color: color-mix(in srgb, var(--danger) 55%, var(--border)); }
.review-check-blocked > span { color: var(--danger); }
.review-verdict { padding: 3px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: .86rem; font-weight: 800; white-space: nowrap; }
.review-verdict-pass { border-color: var(--success); color: var(--success); }
.review-verdict-blocked { border-color: var(--danger); color: var(--danger); }
.review-verdict-neutral { color: var(--muted); }
.review-check a { color: inherit; }
/* Half the 46px account avatar, used beside slugs in review surfaces. */
.mini-avatar { display: inline-grid; place-items: center; flex: 0 0 auto; width: 23px; height: 23px; overflow: hidden; border-radius: 50%; background: var(--avatar); color: var(--avatar-text); font-size: 9px; font-weight: 800; line-height: 1; vertical-align: middle; }
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-author { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* A resolve or reopen record: quieter than a comment, but attributed the same way. */
.review-event { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 8px 16px; border-top: 1px dashed var(--border); color: var(--muted); font-size: .88rem; }
/* A check pill may reveal detail on hover or keyboard focus without growing the card. */
.review-check-hover { position: relative; cursor: default; }
/* The count is a real button so it takes keyboard focus and is announced with its list. */
.review-summary .review-check-trigger { all: unset; cursor: default; }
.review-summary .review-check-trigger:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 999px; }
/* Each list hangs directly beneath its own pill. The approvals pill is always first
   in the row, so its short list opens rightwards from it at every width. */
.review-popover { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; display: none; width: max-content; min-width: 220px; max-width: min(520px, calc(100vw - 32px)); padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); box-shadow: 0 12px 32px rgb(0 0 0 / .3); color: var(--text); font-weight: 400; }
/* The conflicts pill is usually last, so its wider list of paths opens leftwards from
   the pill's right edge. When the pills wrap and that pill lands near the left of the
   card, a leftward list would leave the card, so the browser tries the mirrored
   placement next and, failing that, the card's full width. The pill is the anchor
   and the card is the box the list must stay inside, at any window or sidebar width. */
.review-check-hover:has(#review-conflict-list) { position: static; anchor-name: --review-conflicts; }
#review-conflict-list { position-anchor: --review-conflicts; top: calc(anchor(bottom) + 6px); right: anchor(right); left: auto; max-width: min(520px, 100%); position-try-fallbacks: flip-inline, --review-below-pill-full-width; }
@position-try --review-below-pill-full-width { right: 0; left: 0; width: auto; max-width: none; }
.review-check-hover:hover .review-popover, .review-check-hover:focus .review-popover, .review-check-hover:focus-within .review-popover { display: block; }
.review-popover ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.review-popover li { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
#review-approver-list li { white-space: nowrap; }
#review-approver-list li > span:nth-child(2) { font-weight: 700; }
.conflict-badge { flex: 0 0 auto; padding: 2px 8px; border: 1px solid var(--danger); border-radius: 999px; color: var(--danger); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.changed-file-selector a.has-review-comments .conflict-badge { border-color: var(--danger-solid); background: var(--on-solid); color: var(--danger-solid); }
/* The action row: a hint that may wrap, then the buttons, set off from the checks. */
.review-actions { justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--border); font-size: .9rem; }
.review-actions .muted { flex: 1 1 200px; min-width: 0; font-size: .82rem; text-align: right; }
.discussion-list { display: grid; gap: 12px; }
.review-discussion { margin: 0; padding: 0; overflow: hidden; }
.review-discussion > header { padding: 12px 14px 0; border-bottom: 1px solid var(--border); }
.resolved-discussion-details > summary { display: block; padding: 12px 14px; cursor: pointer; list-style: none; }
.resolved-discussion-details > summary::-webkit-details-marker { display: none; }
.resolved-discussion-details > summary:hover { background: color-mix(in srgb, var(--success) 10%, var(--surface)); }
.resolved-discussion-details > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.resolved-discussion-details[open] > summary { border-bottom: 1px solid var(--border); }
.resolved-discussion-toggle { color: var(--muted); font-size: .82rem; font-weight: 700; }
.resolved-discussion-details[open] .resolved-discussion-toggle { font-size: 0; }
.resolved-discussion-details[open] .resolved-discussion-toggle::after { content: "Hide discussion"; font-size: .82rem; }
.resolved-discussion-content > .discussion-diff-link .discussion-diff-excerpt { margin: 0; }
.discussion-anchor { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.discussion-anchor > strong { min-width: 0; overflow-wrap: anywhere; }
.discussion-header-status { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-left: auto; }
.discussion-status { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border: 1px solid currentColor; border-radius: 999px; font-size: .78rem; font-weight: 750; line-height: 1; }
.discussion-status-unresolved { border-color: var(--warning); background: var(--unresolved-surface); color: var(--unresolved-text); }
.discussion-status-resolved { border-color: var(--success); background: color-mix(in srgb, var(--success) 22%, var(--surface-raised)); color: var(--success); }
.discussion-anchor-link { color: inherit; }
.discussion-diff-link { display: block; color: inherit; text-decoration: none; }
.discussion-diff-link:hover .discussion-diff-excerpt { outline: 2px solid var(--accent); outline-offset: -2px; }
.discussion-diff-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.discussion-diff-excerpt { display: block; width: auto; margin: 10px -14px 0; border-top: 1px solid var(--border); background: var(--background); }
.discussion-diff-excerpt .diff-line { display: grid; width: 100%; }
.discussion-diff-unavailable { margin-top: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; }
.review-discussion.resolved { opacity: .82; }
.review-comment { padding: 12px 16px; border-bottom: 1px solid var(--border); border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--surface-raised) 72%, var(--surface)); }
.review-comment > p { margin: 0 0 6px; color: var(--muted); font-size: .88rem; }
.review-comment > p strong { color: var(--foreground); }
.comment-body { white-space: pre-wrap; }
.comment-body > :first-child { margin-top: 0; }
.comment-body > :last-child { margin-bottom: 0; }
/* Reply and Resolve sit side by side, so they share one compact size. */
.discussion-actions button { min-height: 36px; padding: 0 14px; border-radius: 8px; font-size: .9rem; }
.discussion-footer { display: grid; gap: 10px; padding: 14px 16px 16px; border-top: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.discussion-reply { display: block; margin: 0; }
.discussion-reply label { display: grid; gap: 7px; color: var(--foreground); font-weight: 750; }
.discussion-reply textarea { min-height: 72px; background: var(--surface-raised); }
.discussion-actions { display: flex; align-items: center; gap: 8px; }
.discussion-actions form { margin: 0; }
.discussion-resolution { display: flex; margin: 0; }
.status-closed { border-color: var(--muted); color: var(--muted); }
.status-merged, .merge-request-row .status-merged { border-color: var(--accent); color: var(--accent); }
.history-scope { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; color: var(--muted); }
.overview-activity { position: relative; margin-bottom: 20px; }
.activity-calendar .activity-refresh { display: flex; gap: 0; margin: 0; }
.activity-refresh button { display: grid; place-items: center; width: 22px; min-width: 22px; height: 22px; min-height: 22px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; }
.activity-refresh button:hover { color: var(--text); }
/* The card is only as wide as the year's grid, so the legend sits beside it. */
.overview-activity .activity-calendar { width: fit-content; max-width: 100%; padding: 14px 16px; }
.overview-activity .activity-chart { grid-template: 16px auto / 30px max-content; gap: 4px 6px; }
.overview-activity .activity-months { grid-template-columns: repeat(var(--activity-weeks), 10px); column-gap: 2px; font-size: 10px; line-height: 16px; }
.overview-activity .activity-weekdays { grid-template-rows: repeat(7, 10px); gap: 2px; font-size: 10px; line-height: 10px; }
.overview-activity .activity-grid { grid-template-rows: repeat(7, 10px); grid-auto-columns: 10px; gap: 2px; }
.overview-activity .activity-calendar footer { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; margin-top: 10px; }
.overview-activity .activity-calendar footer strong { min-width: 0; }
.overview-activity .activity-legend { flex: none; white-space: nowrap; }
.history-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.history-entries { min-width: 0; }
.history-entry { min-height: 52px; }
.history-entry-selected { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.history-graph-svg { align-self: stretch; min-width: 72px; height: 100%; background: color-mix(in srgb, var(--surface-raised) 55%, var(--surface)); }
.history-edge { fill: none; stroke: currentColor; stroke-width: 3; pointer-events: none; vector-effect: non-scaling-stroke; }
/* A recorded squash link is not a Git parent edge, so it is dashed and thinner. */
.history-edge-squash { stroke-width: 2; stroke-dasharray: 4 5; opacity: .85; }
.history-edge-hitbox { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; vector-effect: non-scaling-stroke; }
.history-node { stroke: var(--surface); stroke-width: 3; vector-effect: non-scaling-stroke; }
.history-lane-0 { color: var(--lane-0); }
.history-lane-1 { color: var(--lane-1); }
.history-lane-2 { color: var(--lane-2); }
.history-lane-3 { color: var(--lane-3); }
.history-lane-4 { color: var(--lane-4); }
.history-lane-5 { color: var(--lane-5); }
.history-lane-6 { color: var(--lane-6); }
.history-lane-7 { color: var(--lane-7); }
.history-lane-fill-0 { fill: var(--lane-0); }
.history-lane-fill-1 { fill: var(--lane-1); }
.history-lane-fill-2 { fill: var(--lane-2); }
.history-lane-fill-3 { fill: var(--lane-3); }
.history-lane-fill-4 { fill: var(--lane-4); }
.history-lane-fill-5 { fill: var(--lane-5); }
.history-lane-fill-6 { fill: var(--lane-6); }
.history-lane-fill-7 { fill: var(--lane-7); }
.history-content { min-width: 0; padding: 5px 14px 4px; }
.history-entry-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 25px; }
.history-entry-heading > a:first-child { color: var(--text); font-weight: 800; text-decoration: none; overflow-wrap: anywhere; }
.history-entry-heading > a:first-child:hover { color: var(--accent); }
.history-entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); font-size: 11px; line-height: 16px; }
.history-entry-meta > * + *::before { margin-right: 8px; content: "·"; }
.history-entry-meta code { color: inherit; font-size: inherit; }
.history-branch-labels { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.history-branch { padding: 2px 6px; border-radius: 999px; color: var(--lane-text); font-size: 10px; font-weight: 800; }
.history-tag { padding: 1px 6px; border: 1px solid var(--muted); border-radius: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.history-lane-background-0 { background: var(--lane-0); }
.history-lane-background-1 { background: var(--lane-1); }
.history-lane-background-2 { background: var(--lane-2); }
.history-lane-background-3 { background: var(--lane-3); }
.history-lane-background-4 { background: var(--lane-4); }
.history-lane-background-5 { background: var(--lane-5); }
.history-lane-background-6 { background: var(--lane-6); }
.history-lane-background-7 { background: var(--lane-7); }
.commit-summary { margin-bottom: 28px; }
.commit-summary h2 { margin-top: 0; overflow-wrap: anywhere; }
.commit-message-body { margin: 18px 0 0; padding: 16px; overflow-x: auto; border: 1px solid var(--border); border-radius: 9px; background: var(--background); color: var(--text); font: inherit; white-space: pre-wrap; }
.commit-parents { display: grid; gap: 8px; }
.commit-parents a { color: var(--accent); overflow-wrap: anywhere; }
.changed-paths-card { padding: 0; overflow: hidden; }
.changed-paths-card > h2, .changed-paths-card > .merge-note { margin: 0; padding: 22px 24px 0; }
.merge-note { color: var(--muted); }
.changed-path-list { margin-top: 20px; }
.changed-path-list > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: center; min-height: 52px; padding: 10px 24px; border-top: 1px solid var(--border); }
.changed-path-list code { overflow-wrap: anywhere; }
.change-status { justify-self: start; min-width: 36px; padding: 3px 7px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); font: 700 12px ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; }
.change-a, .change-c { color: var(--success); }
.change-d { color: var(--danger); }
.commit-diff { min-width: 0; max-width: 100%; margin-top: 30px; }
.diff-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.diff-heading h2 { margin: 0 0 18px; }
.diff-heading span { color: var(--muted); }
.file-diff { width: 100%; max-width: 100%; min-width: 0; margin-bottom: 24px; padding: 0; overflow: hidden; scroll-margin-top: 20px; }
.file-diff > header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-raised); }
.file-diff > header > a { color: var(--muted); text-decoration: none; }
.file-diff > header strong { min-width: 0; overflow-wrap: anywhere; }
.diff-lines { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.diff-lines-split { display: none; width: 100%; max-width: 100%; min-width: 0; overflow: hidden; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.split-diff-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 22px; }
.split-diff-cell { display: grid; grid-template-columns: 58px minmax(0, 1fr); min-width: 0; border-right: 1px solid var(--border); }
.split-diff-cell:last-child { border-right: 0; }
.split-diff-cell > code { min-width: 0; padding: 1px 8px; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; }
.split-diff-cell.diff-empty { background: color-mix(in srgb, var(--background) 55%, transparent); }
.split-diff-marker { min-height: 22px; }
.split-diff-marker > code { display: block; padding: 1px 8px 1px 124px; overflow-wrap: anywhere; white-space: pre-wrap; }
.diff-line { display: grid; width: 100%; max-width: 100%; grid-template-columns: 58px 58px minmax(0, 1fr); min-height: 22px; }
.diff-line > span, .diff-line > code { padding: 1px 8px; }
.diff-line > span { white-space: pre; }
.diff-line > code { min-width: 0; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; }
.diff-number { border-right: 1px solid var(--border); color: var(--muted); text-align: right; user-select: none; }
.diff-addition { background: color-mix(in srgb, var(--success) 13%, transparent); }
.diff-deletion { background: color-mix(in srgb, var(--danger) 13%, transparent); }
.diff-hunk { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.diff-hunk-link { display: block; color: inherit; text-decoration: none; }
.diff-hunk-link:hover { text-decoration: underline; }
.diff-metadata { color: var(--muted); }
.diff-state, .diff-warning { padding: 18px; color: var(--muted); }
.diff-warning { border-top: 1px solid var(--border); color: var(--warning-text); font-weight: 700; }
@container (min-width: 1080px) {
  .commit-diff .diff-lines-unified { display: none; }
  .commit-diff .diff-lines-split { display: block; }
}
.storage-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--border); background: var(--notice); }
.storage-banner a { margin-left: auto; }
.storage-banner .banner-dismiss { margin-left: 0; }
.storage-critical, .storage-unknown { border-color: var(--danger); }
.storage-metrics { display: flex; flex-wrap: wrap; gap: 24px; }
.storage-metrics dt { color: var(--muted); }
.storage-metrics dd { margin: 6px 0 0; font-weight: 700; }
/* One compact row of controls, at the settings pages' control size. */
.compare-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 8px 14px; align-items: end; padding: 14px 18px; border-radius: 12px; }
.compare-controls label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; }
.compare-controls input { width: 100%; height: 36px; padding: 0 34px 0 12px; border-radius: 8px; font-size: 14px; }
.compare-actions { display: flex; align-items: center; gap: 8px; }
.compare-actions button { height: 36px; min-height: 0; padding: 0 14px; border-radius: 8px; }
.compare-arrow { align-self: end; padding-bottom: 6px; color: var(--muted); font-size: 18px; }
.compare-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0; }
.activity-page { width: min(100% - 40px, 1320px); }
.activity-heading { align-items: center; }
.activity-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin: 0 0 22px; }
.activity-filters label { display: grid; flex: 1 1 190px; gap: 6px; font-weight: 700; }
.activity-filters button { height: 54px; }
.activity-calendar { padding: 18px; }
.activity-chart-scroll { max-width: 100%; overflow-x: auto; }
.activity-chart { display: grid; grid-template: 18px auto / 36px max-content; gap: 5px 8px; width: max-content; min-width: 100%; }
.activity-months { display: grid; grid-column: 2; grid-template-columns: repeat(var(--activity-weeks), 12px); column-gap: 3px; min-width: max-content; color: var(--muted); font-size: 11px; line-height: 18px; }
/* One row of names: a name that met another would overlap it, never fall onto the squares. */
.activity-months span { grid-row: 1; white-space: nowrap; }
.activity-weekdays { display: grid; grid-row: 2; grid-template-rows: repeat(7, 12px); gap: 3px; color: var(--muted); font-size: 11px; line-height: 12px; }
.activity-weekdays span:nth-child(1) { grid-row: 1; }
.activity-weekdays span:nth-child(2) { grid-row: 3; }
.activity-weekdays span:nth-child(3) { grid-row: 5; }
.activity-grid { display: grid; grid-row: 2; grid-column: 2; grid-template-rows: repeat(7, 12px); grid-auto-flow: column; grid-auto-columns: 12px; gap: 3px; width: max-content; }
.activity-cell { position: relative; border: 1px solid var(--border); border-radius: 3px; background: color-mix(in srgb, var(--surface-raised) 85%, var(--border)); text-decoration: none; }
.activity-cell span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.activity-cell:hover, .activity-cell:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.activity-level-0 { background: color-mix(in srgb, var(--surface-raised) 85%, var(--border)); }
.activity-level-1 { background: color-mix(in srgb, var(--success) 28%, var(--surface)); }
.activity-level-2 { background: color-mix(in srgb, var(--success) 48%, var(--surface)); }
.activity-level-3 { background: color-mix(in srgb, var(--success) 72%, var(--surface)); }
.activity-level-4 { background: var(--success); }
.activity-calendar footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-top: 18px; }
.activity-legend { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.activity-legend i { width: 13px; height: 13px; border: 1px solid var(--border); border-radius: 2px; }
.activity-recent h2 { margin-top: 28px; }
.activity-recent ol { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.activity-recent li { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.activity-recent li:last-child { border-bottom: 0; }
.activity-recent li div { display: grid; gap: 3px; min-width: 0; }
.activity-recent li span { color: var(--muted); font-size: 12px; }
.activity-recent li > a { flex: none; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.empty-activity { padding: 24px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); }
.author-email-list { margin: 18px 0; border-top: 1px solid var(--border); }
.author-email-list > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.author-email-list span { display: grid; gap: 3px; }
.author-email-list small { color: var(--muted); }
.inline-author-email { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: end; }
.inline-author-email label { grid-column: 1 / -1; font-weight: 700; }
.ref-chip { max-width: 100%; padding: 5px 10px; overflow-wrap: anywhere; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 700; }
.comparison-identity { margin-bottom: 14px; padding: 14px 18px; border-radius: 12px; }
.comparison-identity h2, .comparison-identity p { margin: 0 0 4px; }
.comparison-identity h2 { font-size: 18px; }
.comparison-identity p { color: var(--muted); font-size: 14px; }
.comparison-identity code { overflow-wrap: anywhere; }
.comparison-commits { margin-bottom: 14px; padding: 0; border-radius: 12px; overflow: hidden; }
.comparison-commits > h2 { margin: 0; padding: 10px 18px; font-size: 16px; }
.comparison-commits > article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 18px; padding: 8px 18px; border-top: 1px solid var(--border); }
.comparison-commits > article > span { color: var(--muted); font-size: 13px; }
.comparison-commits > article > code { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.comparison-commits > .pagination { padding: 10px 18px; border-top: 1px solid var(--border); }


.profile-preferences { display: grid; gap: 28px; margin-top: 30px; }
.choice-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.choice-field legend { margin-bottom: 12px; font-weight: 750; }
/* The theme catalog on the Profile page. Each swatch names its theme, so it
   draws in that theme's own colours. */
.theme-field { display: grid; gap: 10px; }
.theme-field .hint { margin: 0; }
.theme-group-title { margin: 6px 0 0; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.theme-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.theme-choice { position: relative; display: grid; gap: 4px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.theme-choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.theme-choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.theme-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.theme-choice small { color: var(--muted); font-size: 12px; }
.theme-swatch { display: grid; grid-template-columns: repeat(4, 16px); grid-template-rows: 11px auto; gap: 4px; height: 44px; padding: 0 6px 6px; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: var(--background); }
.theme-swatch > span { grid-column: 1 / -1; margin: 0 -6px; background: var(--surface); border-bottom: 1px solid var(--border); }
.theme-swatch > i { align-self: center; height: 6px; border-radius: 3px; }
.theme-swatch > i:nth-of-type(1) { background: var(--syntax-keyword); }
.theme-swatch > i:nth-of-type(2) { background: var(--syntax-string); }
.theme-swatch > i:nth-of-type(3) { background: var(--syntax-function); }
.theme-swatch > i:nth-of-type(4) { background: var(--accent); }
.theme-reset { justify-self: start; }
.avatar-choice input { width: auto; height: auto; }
.avatar-choices { display: grid; grid-template-columns: repeat(6, minmax(100px, 1fr)); gap: 12px; }
.avatar-choice { display: grid; justify-items: center; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; text-align: center; }
.avatar-choice:has(input:checked) { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); border-color: var(--accent); }
.avatar-choice img, .avatar-fallback { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.avatar-fallback { background: var(--avatar); color: var(--avatar-text); font-weight: 800; }
.avatar-upload { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .6fr) auto; align-items: end; gap: 18px; margin-top: 34px; }
.avatar-upload h2 { margin: 0 0 6px; }

@media (max-width: 960px) {
  .setup-layout { grid-template-columns: 1fr; }
  .welcome { min-height: 360px; }
  .setup-panel { padding: 40px 24px 64px; }
  .project-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .avatar-choices { grid-template-columns: repeat(4, minmax(90px, 1fr)); }
  .avatar-upload { grid-template-columns: 1fr; align-items: stretch; }
}

@media (max-width: 620px) {
  .topbar { padding: 0 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .notice { grid-template-columns: 1fr; gap: 3px; }
  .welcome { min-height: 300px; padding: 40px 24px; }
  .welcome h1 { font-size: 46px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .project-controls { grid-template-columns: 1fr; }
  .project-card-grid { grid-template-columns: 1fr; }
  .avatar-choices { grid-template-columns: repeat(2, minmax(90px, 1fr)); }
  .data-heading { display: none; }
  .data-row { grid-template-columns: 1fr; gap: 8px; padding: 20px; }
  .detail-grid { grid-template-columns: 1fr; }
  .primary-nav { margin-left: 12px; }
  .project-detail-grid { grid-template-columns: 1fr; }
  .wide-project-card { grid-column: auto; }
  .settings-section { grid-template-columns: 1fr; gap: 14px; padding: 22px 0; }
  .member-list > div, .member-add-form { align-items: stretch; flex-direction: column; grid-template-columns: 1fr; }
  .card .member-form { grid-template-columns: 1fr; align-items: stretch; }
  .member-form select { width: 100%; }
  .redirect-list > div { grid-template-columns: 1fr; }
  .repository-page { width: min(100% - 32px, 1320px); padding-top: 24px; }
  .repository-row { grid-template-columns: minmax(220px, 1fr) 100px; }
  .repository-row > :last-child { display: none; }
  .ref-switcher { grid-template-columns: 1fr; align-items: stretch; }
  .changed-path-list > div { grid-template-columns: 1fr; }
  .compare-controls { grid-template-columns: 1fr; }
  .compare-arrow { display: none; }
  .comparison-commits > article { grid-template-columns: 1fr; }
  .comparison-commits > article > code { grid-column: 1; grid-row: auto; }
  .merge-request-ref-fields { grid-template-columns: 1fr; }
  .merge-request-filter { align-items: stretch; flex-direction: column; }
  .merge-request-filter select { width: 100%; }
  .merge-request-detail-heading { align-items: stretch; flex-direction: column; }
  .merge-request-heading-actions, .merge-request-heading-actions form, .merge-request-heading-actions button { width: 100%; }
}

/* Language intelligence in the code view. The strip, rail, and tray exist only
   for readers who may see analysis, and stay hidden until there is something to say. */
.language-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); border-left: 4px solid var(--muted); background: var(--surface); font-size: 0.9rem; }
.language-strip[hidden] { display: none; }
.language-strip.ok { border-left-color: var(--success); }
.language-strip.warn { border-left-color: var(--notice-border); }
.language-strip.bad { border-left-color: var(--danger); }
.language-strip strong { white-space: nowrap; }
.language-detail { flex: 1 1 240px; color: var(--muted); }
.language-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.language-dot.ok { background: var(--success); }
.language-dot.warn { background: var(--notice-border); }
.language-dot.bad { background: var(--danger); }
.language-spinner { width: 12px; height: 12px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: language-spin 1s linear infinite; }
@keyframes language-spin { to { transform: rotate(360deg); } }
.language-problems { border: 1px solid var(--danger); color: var(--danger); border-radius: 999px; padding: 0 10px; font-size: 0.8rem; white-space: nowrap; }
/* The editor with its tray beneath it: a bar of tabs, and under that the open panel. */
.language-workbench { display: flex; flex-direction: column; min-width: 0; }
.language-rail { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-top: 1px solid var(--border); background: var(--surface); }
.language-rail[hidden] { display: none; }
.language-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 0; margin: 0; padding: 4px 10px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 0.75rem; line-height: 1.3; cursor: pointer; }
.language-tab:hover, .language-tab:focus-visible { color: var(--text); background: var(--surface-raised); }
.language-tab[aria-pressed="true"] { border-color: var(--border); color: var(--text); background: var(--surface-raised); }
.language-tab-mark { font-size: inherit; }
/* The tray rises by animating its height; the panel inside scrolls. The editor
   gives up the height the tray takes, so opening or resizing it moves nothing
   else on the page. */
.language-workbench { --language-tray-height: 220px; --language-shared-height: max(480px, min(70vh, 760px)); --language-tray-shown: min(var(--language-tray-height), calc(var(--language-shared-height) - 160px)); }
.language-tray { height: 0; overflow: hidden; opacity: 0; transition: height 0.22s ease, opacity 0.22s ease; border-top: 0 solid var(--border); }
.language-workbench[data-tray="open"] .language-tray { height: var(--language-tray-shown); opacity: 1; border-top-width: 1px; box-sizing: border-box; }
.language-workbench[data-tray="open"] > .source-editor-stack { min-height: 0; }
/* Only the editor's own container: Monaco gives the same class to elements inside it. */
.language-workbench[data-tray="open"] > .source-editor-stack > .monaco-editor, .language-workbench[data-tray="open"] > .source-editor-stack > .source-fallback { height: calc(var(--language-shared-height) - var(--language-tray-shown)); min-height: 0; transition: height 0.22s ease; }
.language-panel { display: flex; flex-direction: column; height: 100%; background: var(--surface); }
/* Everything in the tray, and the tab that opens it, is set at 12px. */
.language-panel { font-size: 0.75rem; }
.language-panel > .language-strip { flex: 0 0 auto; padding: 6px 12px; font-size: inherit; }
.language-panel .language-problems, .language-panel .language-row small, .language-panel .language-code { font-size: inherit; }
.language-tab-mark.bad { color: var(--danger); }
.language-tab-mark.warn { color: var(--notice-border); }
.language-tab .language-spinner { width: 10px; height: 10px; }
/* The top edge of the tray, dragged to resize it. */
.language-grip { height: 6px; margin-bottom: -1px; border-top: 1px solid var(--border); background: var(--surface); cursor: ns-resize; touch-action: none; }
.language-grip[hidden] { display: none; }
.language-grip:hover, .language-grip:focus-visible, .language-workbench[data-resizing] .language-grip { background: var(--accent); outline: none; }
/* While dragging, heights follow the pointer at once and no text is selected. */
.language-workbench[data-resizing] { user-select: none; }
.language-workbench[data-resizing] .language-tray, .language-workbench[data-resizing] > .source-editor-stack > .monaco-editor, .language-workbench[data-resizing] > .source-editor-stack > .source-fallback { transition: none; }
/* Lists are dense: no gaps between entries, and no inherited button height. */
.language-panel ul { list-style: none; margin: 0; padding: 4px; }
.language-panel li { margin: 0; padding: 0; }
/* A problem's message is shown in full and wraps; its line number stays on the first row. */
.language-row { display: flex; align-items: baseline; gap: 10px; width: 100%; min-height: 0; margin: 0; padding: 2px 8px; border: 0; border-radius: 4px; background: none; color: var(--text); font: inherit; line-height: 1.35; text-align: left; cursor: pointer; }
.language-row:hover, .language-row:focus-visible { background: var(--surface-raised); }
.language-label { flex: 1 1 auto; min-width: 0; white-space: pre-line; overflow-wrap: anywhere; }
.language-row small { flex: 0 0 auto; color: var(--muted); font-size: 0.75rem; white-space: nowrap; }
.language-severity { color: var(--danger); font-weight: 700; }
.language-severity.severity-2 { color: var(--notice-border); }
.language-severity.severity-3, .language-severity.severity-4 { color: var(--muted); }
.language-problems.severity-2 { border-color: var(--notice-border); color: var(--text); }
.language-problems.severity-3, .language-problems.severity-4 { border-color: var(--border); color: var(--muted); }
.language-count.severity-2 { background: var(--notice-border); color: var(--highlight-text); }
.language-count.severity-3, .language-count.severity-4 { background: var(--muted); }
.language-empty { margin: 0; padding: 14px 12px; color: var(--muted); }
.language-count { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger-solid); color: var(--on-solid); font: 700 11px/18px system-ui, sans-serif; text-align: center; }
@media (prefers-reduced-motion: reduce) { .language-tray, .language-workbench > .source-editor-stack > .monaco-editor, .language-workbench > .source-editor-stack > .source-fallback { transition: none; } .language-spinner { animation: none; } }
.language-panel-body { flex: 1 1 0; min-height: 0; overflow-y: auto; }
.language-row.wrapped .language-label { white-space: pre-line; overflow-wrap: anywhere; }
.language-row:not(.wrapped) { white-space: nowrap; }
.language-row:not(.wrapped) .language-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.language-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; }

/* The project Analysis page. */
.analysis-page h1 { margin: 0 0 14px; }
/* Language badges sit at the right of the branch line: grey while a language
   can be analysed, coloured once its analysis is complete. */
.analysis-languages { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.analysis-language { padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.analysis-language.complete { border-color: color-mix(in srgb, var(--success) 60%, var(--border)); background: color-mix(in srgb, var(--success) 18%, var(--surface)); color: var(--text); }
.analysis-status { padding: 16px; border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: 10px; background: var(--surface); }
.analysis-status[hidden], .analysis-results[hidden] { display: none; }
.analysis-status.ok { border-left-color: var(--success); }
.analysis-status.bad { border-left-color: var(--danger); }
.analysis-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.analysis-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.analysis-tile strong { display: block; font-size: 1.4rem; line-height: 1.1; }
.analysis-tile-label { color: var(--muted); font-size: 0.8rem; }
.analysis-tile[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.analysis-tile[aria-pressed="false"] { opacity: 0.5; }
.analysis-mark { width: 24px; font-size: 1.25rem; text-align: center; }
.analysis-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.analysis-toolbar input { flex: 1 1 240px; }
.analysis-list { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
.analysis-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) fit-content(40%); gap: 10px; align-items: baseline; padding: 6px 12px; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.analysis-row:last-child { border-bottom: 0; }
.analysis-row:hover, .analysis-row:focus-visible { background: var(--surface-raised); }
.analysis-message { overflow-wrap: anywhere; }
.analysis-rule { margin-left: 6px; color: var(--muted); font-family: ui-monospace, monospace; font-size: 0.8rem; }
.analysis-where { color: var(--accent); font-family: ui-monospace, monospace; font-size: 0.8rem; text-align: right; overflow-wrap: anywhere; }
.analysis-group { display: flex; justify-content: space-between; padding: 6px 12px; border-bottom: 1px solid var(--border); background: var(--surface-raised); font-family: ui-monospace, monospace; font-size: 0.8rem; }
.analysis-empty { margin: 0; padding: 16px; color: var(--muted); }
.analysis-footer { margin-top: 10px; color: var(--muted); font-size: 0.8rem; }
@media (max-width: 900px) { .analysis-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Form controls are full-width by default; here they sit in a row. */
.analysis-toolbar select { width: auto; min-width: 0; margin: 0; }
.analysis-toolbar input { width: auto; min-width: 0; margin: 0; }
.analysis-toolbar label { display: inline-flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.analysis-tile { justify-content: flex-start; width: auto; margin: 0; }

/* Settings pages, compacted (Phase 108 review): project Settings, the account
   pages (Security, Profile, access tokens, SSH keys), and Administration.
   Smaller controls and tighter spacing, so a page reads as one flow rather
   than islands in empty space. Sign-in, setup, and the project list keep the
   larger defaults. */
.centered-page:is(.admin-page:not(.project-index-page), .security-page, .form-page) { padding: 28px 0 48px; }
:is(.admin-page:not(.project-index-page), .security-page, .form-page) :is(.page-heading, .security-heading) h1,
:is(.admin-page:not(.project-index-page), .security-page, .form-page) .card h1 { font-size: 28px; }
:is(.admin-page:not(.project-index-page), .security-page, .form-page) .page-heading { gap: 20px; margin-bottom: 16px; }
:is(.admin-page:not(.project-index-page), .security-page, .form-page) .lede { margin: 6px 0 0; }
:is(.admin-page:not(.project-index-page), .security-page, .form-page) .section-nav { margin: 0 0 16px; }
.security-page { gap: 16px; }
.security-page .card h2 { font-size: 20px; }
:is(.admin-page:not(.project-index-page), .security-page, .form-page) .card { padding: 20px 24px; border-radius: 12px; }
:is(.admin-page:not(.project-index-page), .security-page, .form-page) .card form { gap: 14px; margin-top: 14px; }
:is(.admin-page:not(.project-index-page), .security-page, .form-page, .project-settings) .form-grid { gap: 14px 16px; margin: 14px 0; }
:is(.admin-page:not(.project-index-page), .security-page, .form-page, .project-settings) .field { gap: 6px; }
:is(.admin-page:not(.project-index-page), .security-page, .form-page, .project-settings) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select) { height: 38px; padding: 0 12px; border-radius: 8px; }
:is(.admin-page:not(.project-index-page), .security-page, .form-page, .project-settings) textarea { min-height: 88px; padding: 8px 12px; border-radius: 8px; }
:is(.admin-page:not(.project-index-page), .security-page, .form-page, .project-settings) :is(button, .button-link) { min-height: 36px; padding: 0 14px; border-radius: 8px; }
:is(.admin-page:not(.project-index-page), .security-page, .form-page, .project-settings) .hint { font-size: 13px; }
:is(.admin-page:not(.project-index-page), .security-page, .form-page, .project-settings) :is(.notice, .success, .form-error) { margin-bottom: 14px; padding: 10px 14px; border-radius: 10px; }
:is(.admin-page:not(.project-index-page), .security-page, .form-page) .data-heading { min-height: 40px; }
:is(.admin-page:not(.project-index-page), .security-page, .form-page) .data-row { min-height: 54px; gap: 16px; padding: 8px 18px; }
.profile-preferences { gap: 18px; margin-top: 16px; }
/* Project Settings: one tab shown at a time, so no gap is kept for tabs. */
.project-settings .settings-panels { padding-top: 0; }
.project-settings .settings-section { grid-template-columns: minmax(150px, 200px) minmax(0, 1fr); gap: 24px; padding: 16px 0; }
.project-settings .settings-section-heading p { margin-top: 4px; font-size: 13px; }
.project-settings .metadata-list { margin-top: 10px; }
.project-settings .metadata-list div { gap: 16px; padding: 7px 0; }
.project-settings .member-list > div { gap: 16px; padding: 8px 0; }
.project-settings .member-add-form { gap: 12px; margin-top: 14px; }
.project-settings .member-add-form button, .project-settings .member-form button { height: 38px; min-height: 0; }
.project-settings .member-form select { height: 36px; }
.project-settings .lifecycle-card > form { gap: 14px; }
/* Profile: a denser avatar picker, eight across. */
.profile-page .avatar-choices { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.profile-page .avatar-choice { gap: 4px; padding: 6px; border-radius: 10px; font-size: 13px; }
.profile-page .avatar-choice img, .profile-page .avatar-fallback { width: 48px; height: 48px; }
.profile-page .avatar-upload { gap: 12px; margin-top: 18px; }
/* A checkbox with a label and a hint beneath it, as on New Project. */
.checkbox-field { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; cursor: pointer; }
/* New project…: an empty project, or one imported from a Git URL (Phase 069). */
.project-source { display: grid; gap: 8px; margin: 4px 0 16px; padding: 0; border: 0; }
.project-source legend { margin-bottom: 6px; font-weight: 600; }
.radio-field { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.radio-field input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
.radio-field .hint { display: block; }
.project-form .source-import { display: none; }
.project-form:has(input[name="source"][value="import"]:checked) .source-import { display: grid; }
.project-form:has(input[name="source"][value="import"]:checked) .source-empty { display: none; }
.project-form .keep-in-sync-options { display: none; }
.project-form:has(input[name="keep_in_sync"]:checked) .keep-in-sync-options { display: grid; }
.import-state .inline-form { display: inline-block; margin: 0 12px 0 0; }
.import-edit { margin-top: 12px; }
/* Settings -> Mirror (Phase 070). */
.mirror-branches { margin: 6px 0 14px; padding-left: 18px; }
.mirror-actions { margin-top: 14px; }
.mirror-form { margin-top: 22px; }
.mirror-form .mirror-credentials { display: none; }
.mirror-form:has(input[name="credentials"][value="replace"]:checked) .mirror-credentials { display: grid; }
.import-edit summary { cursor: pointer; color: var(--accent); }
.import-edit .form-grid { margin-top: 12px; text-align: left; }
.checkbox-field input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
.checkbox-field > span { display: grid; gap: 4px; }
/* Changing the tree's shape while editing (Phase 097): naming in place, the
   tree's menu, drop targets, and a colour per kind of change: A new, M
   changed, R renamed or moved, D deleted (struck through in Changes). */
.code-tree-input { flex: 1; min-width: 0; height: 22px; padding: 0 6px; border: 1px solid var(--accent); border-radius: 4px; background: var(--background); color: var(--text); font: inherit; font-size: 13px; }
.code-tree-input[aria-invalid="true"] { border-color: var(--danger); }
.code-tree-problem { margin: 0; padding: 4px 12px; background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--text); font-size: 12px; }
.code-tree-problem[hidden] { display: none; }
.code-tree-note { margin: 0; padding: 4px 12px; background: var(--success-surface); color: var(--text); font-size: 12px; }
.code-tree-note[hidden] { display: none; }
.code-tree-menu { position: fixed; z-index: 60; display: grid; min-width: 180px; padding: 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); box-shadow: 0 12px 30px rgb(0 0 0 / 40%); }
.code-tree-menu button { display: flex; justify-content: space-between; gap: 18px; min-height: 0; height: 28px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; color: var(--text); font-size: 13px; font-weight: 500; }
.code-tree-menu button:hover, .code-tree-menu button:focus-visible { background: color-mix(in srgb, var(--accent) 22%, transparent); outline: none; }
.code-tree-menu-key { color: var(--muted); font-size: 12px; }
.code-tree-menu-separator { height: 1px; margin: 4px 2px; background: var(--border); }
/* Live Server's badge at the left of the Code page's status bar (Phase 056). */
.code-status-live { flex: none; min-height: 0; height: 20px; padding: 0 8px; border: 1px solid var(--success); border-radius: 10px; background: transparent; color: var(--success); font-size: 12px; font-weight: 700; }
.code-status-live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.code-status-live-note { color: var(--muted); }
.live-server-menu { min-width: 240px; }
.live-server-facts { display: grid; gap: 2px; padding: 6px 10px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; color: var(--muted); font-size: 12px; white-space: normal; }
.live-server-facts strong { color: var(--text); font-size: 13px; }
.code-tree-drop { outline: 2px dashed var(--accent); outline-offset: -2px; }
.code-tree-mark-empty { color: var(--muted); font-style: italic; font-weight: 500; }
.code-tree-mark[data-mark="A"], .code-change-mark[data-mark="A"] { color: var(--success); }
.code-tree-mark[data-mark="R"], .code-change-mark[data-mark="R"] { color: var(--accent); }
.code-change-mark[data-mark="D"] { color: var(--danger); }
.code-change-D .code-change-name { text-decoration: line-through; color: var(--muted); }
/* Markdown previewed in place while editing, where the editor was. */
.code-preview { height: var(--code-editor-height); min-height: 200px; margin: 0; padding: 16px 24px; overflow: auto; border-radius: 0; }
.code-preview[hidden] { display: none; }
.markdown-view-toggle button.button-link { min-height: 30px; width: 34px; padding: 0; }
/* Editing hardened (Phase 111): the branch-changed warning in the branch row,
   and a tab whose file is too large to commit. */
.code-edit-warning { flex: none; padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--editing) 22%, transparent); color: var(--text); font-size: 12px; font-weight: 700; white-space: nowrap; cursor: help; }
.code-edit-warning[hidden] { display: none; }
.code-tab.too-large .code-tab-label { color: var(--danger); }
.code-paused a { color: var(--accent); font-weight: 700; }

/* Phase 085: a subgroup's card carries a stronger border than a project's. */
.subgroup-card {
  border-width: 2px;
}

/* A project path's groups link to their pages, quietly, as the path reads. */
.project-path-owner { display: inline-flex; gap: 4px; }
.project-path-owner a { color: inherit; text-decoration: none; }
.project-path-owner a:hover, .project-path-owner a:focus-visible { color: var(--text); text-decoration: underline; }
/* The project's own name leads to its Overview, as each group before it leads to its page. */
.project-path-name { color: inherit; text-decoration: none; }
.project-path-name:hover, .project-path-name:focus-visible { text-decoration: underline; }

/* Phase 114: icons beside a description. A group or project is a rounded
   square, a user's default group their round avatar. */
.entity-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; overflow: hidden; border-radius: 8px; background: var(--avatar); color: var(--avatar-text); font-size: 12px; font-weight: 800; }
.entity-icon img { width: 100%; height: 100%; object-fit: cover; }
.entity-icon-round { border-radius: 50%; }
.entity-icon-large { width: 48px; height: 48px; border-radius: 12px; font-size: 16px; }
.entity-icon-large.entity-icon-round { border-radius: 50%; }
.entity-icon-xlarge { width: 64px; height: 64px; border-radius: 16px; font-size: 22px; }
.project-card-about, .overview-about, .entity-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.entity-heading p { margin: 0; }

/* A file input reads as a neutral button beside the chosen file's name, never as
   a text box; its button follows the stylesheet's neutral role. */
input[type="file"] { width: auto; max-width: 100%; height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 14px; }
input[type="file"]:focus { outline: none; }
input[type="file"]::file-selector-button { min-height: 38px; margin-right: 12px; padding: 0 16px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-weight: 750; cursor: pointer; }
input[type="file"]::file-selector-button:hover { border-color: var(--accent); }
input[type="file"]:focus-visible::file-selector-button { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
/* Phase 114: an icon's preview and requirements, then one row of controls. */
.icon-upload { display: grid; gap: 16px; }
.icon-upload-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.icon-upload-controls input[type="file"] { flex: 1 1 260px; }

/* Phase 115: the signed-in home page's panel beside the welcome. */
.home-panel { display: grid; gap: 22px; }
.home-panel h2 { margin: 0; }
.home-panel h3 { margin: 0 0 8px; font-size: 15px; }
.home-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.home-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.home-list a { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 8px; color: var(--text); text-decoration: none; }
.home-list a:hover, .home-list a:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.home-path { flex: 1 1 auto; min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.home-when { flex: 0 1 auto; min-width: 0; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
/* Every level may shrink below its rows' natural width, so a narrow screen
   ellipsises a long row instead of widening the page. */
.home-page > section, .home-page .form-shell, .home-page .welcome > div, .home-panel, .home-list, .home-list li, .home-list a { min-width: 0; }
.home-links { display: flex; flex-wrap: wrap; gap: 28px; margin: 0; }
/* The home page's content sits a tenth smaller than the setup page it shares a
   layout with; the two halves' backgrounds still fill the screen. */
.home-page .welcome > div, .home-page .home-panel { zoom: .9; }
/* On the home page the welcome takes three tenths of the width and the
   reader's work seven tenths; its heading and margins scale to the narrower
   side. */
.home-page { grid-template-columns: minmax(280px, 3fr) minmax(0, 7fr); }
.home-page .welcome { padding: clamp(28px, 4vw, 72px); }
.home-page .welcome h1 { font-size: clamp(40px, 3.8vw, 68px); }
@media (max-width: 960px) {
  /* One column no wider than the screen, whatever its rows hold. */
  .home-page { grid-template-columns: minmax(0, 1fr); }
}

/* Phase 117: analysis changes on a merge request. The banner's edge says the
   worst thing the merge adds: red for errors, amber for warnings, green when
   it only resolves findings, grey otherwise. */
.analysis-change-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 16px; padding: 8px 12px; border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: 8px; background: var(--surface); font-size: 0.875rem; }
.analysis-change-strip[hidden] { display: none; }
.analysis-change-strip.worse { border-left-color: var(--danger); }
.analysis-change-strip.warn { border-left-color: var(--warning); }
.analysis-change-strip.better { border-left-color: var(--success); }
.analysis-change-label { font-weight: 700; }
.analysis-change-sep { color: var(--muted); }
.analysis-change-new.error { color: var(--danger); }
.analysis-change-new.warning { color: var(--warning-text); }
.analysis-change-resolved { color: var(--success); }
.analysis-change-view { margin-left: auto; font-weight: 700; white-space: nowrap; }
.analysis-change-count { margin-left: 6px; font-size: 0.8rem; }
.analysis-change-count span + span { margin-left: 4px; }
.analysis-count-new { color: var(--danger); }
.analysis-count-resolved { color: var(--success); }
.analysis-changes h2 { margin: 0 0 6px; }
.analysis-changes-context { margin: 0 0 14px; color: var(--muted); }
.analysis-change-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.analysis-tile-detail { display: block; color: var(--muted); font-size: 0.8rem; }
.analysis-change-mark-new { color: var(--danger); }
.analysis-change-mark-resolved { color: var(--success); }
.analysis-change-mark-unchanged { color: var(--muted); }
.analysis-changes-note { margin: -4px 0 12px; color: var(--muted); font-size: 0.8rem; }
.analysis-change-row { grid-template-columns: 78px 22px minmax(0, 1fr) fit-content(40%); }
.analysis-change-tag { padding: 1px 6px; border-radius: 4px; background: var(--surface-raised); color: var(--muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em; text-align: center; text-transform: uppercase; }
.analysis-change-tag-new { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.analysis-change-tag-resolved { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
.analysis-resolved .analysis-message { color: var(--muted); }
@media (max-width: 640px) { .analysis-change-tiles { grid-template-columns: 1fr; } .analysis-change-row { grid-template-columns: 70px 18px minmax(0, 1fr); } .analysis-change-row .analysis-where { grid-column: 3; text-align: left; } .analysis-change-view { margin-left: 0; } }
/* Phase 118: how an agent or script reads a merge request's analysis changes. */
.analysis-agent-access { margin-top: 18px; color: var(--muted); font-size: 0.875rem; }
.analysis-agent-access summary { cursor: pointer; font-weight: 700; }
.analysis-agent-access p { max-width: 70ch; }
.analysis-agent-request { overflow-x: auto; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 0.8rem; white-space: pre; }

/* vi's own row below the Code page's status bar (Phase 054). monaco-vim sets
   display: block on its status element; the row keeps its own layout, and a
   message too long for it ends in an ellipsis. */
.vi-bar { display: flex; flex: none; align-items: center; gap: 12px; height: 25px; padding: 0 12px; border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; }
.vi-status { display: inline-flex !important; flex: 1 1 auto; align-items: center; gap: 10px; min-width: 0; overflow: hidden; color: var(--text); font-family: ui-monospace, monospace; }
.vi-off-note { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.vi-off-note[hidden] { display: none; }
.vi-status > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vi-status > span:first-child { flex: none; }
.vi-status[hidden] { display: none !important; }
.vi-status > span:first-child { font-weight: 800; color: var(--accent); }
.vi-status input { width: 24ch; height: 20px; min-height: 0; padding: 0 4px; border: 1px solid var(--field-border); border-radius: 4px; background: var(--field); color: var(--text); font: inherit; }
.vi-status .vim-notification { color: var(--warning-text); }
.vi-toggle { flex: none; margin-left: auto; height: 20px; min-height: 0; padding: 0 7px; border: 1px solid var(--border); border-radius: 4px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; }
.vi-toggle[aria-pressed="true"] { border-color: var(--accent); color: var(--text); }
.editor-field { display: grid; gap: 8px; }
.editor-switch { display: flex; gap: 10px; align-items: flex-start; }
.editor-switch input { width: auto; height: auto; margin-top: 4px; }
.editor-switch .hint { display: block; margin-top: 2px; }

.vimrc-field { display: grid; gap: 6px; margin-left: 28px; }
.vimrc-field[hidden] { display: none; }
.vimrc-field textarea { min-height: 120px; font-family: ui-monospace, monospace; font-size: 13px; }

/* Administration -> CI: the builders and settings below its builds (Phase 072). */
/* An on/off switch: a submit button whose track and knob show its state. */
.toggle-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--text); font-weight: 600; cursor: pointer; }
.toggle-track { position: relative; flex: none; width: 42px; height: 24px; border-radius: 12px; background: var(--border); transition: background .15s; }
.toggle-knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.toggle-switch[aria-checked="true"] .toggle-track { background: var(--success-solid); }
.toggle-switch[aria-checked="true"] .toggle-knob { transform: translateX(18px); background: var(--on-solid); }
.toggle-switch:focus-visible .toggle-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.ci-switch { display: grid; gap: 8px; }
.ci-switch p { margin: 0; }
.ci-builder-details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 16px 0; }
.ci-builder-details dt { color: var(--muted); }
.ci-builder-details dd { margin: 0; }
.ci-builder-pause { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.ci-builder-pause .field { margin: 0; flex: 1 1 240px; }
.ci-builder-pause button, .ci-switch button, .ci-polling button, .ci-timeouts button { width: auto; flex: 0 0 auto; justify-self: start; }
.ci-builder-none pre { overflow-x: auto; }
@media (max-width: 600px) { .ci-builder-details { grid-template-columns: 1fr; } }

/* Build pages (Phase 074), as drawn in the Phase 071 mockup. */
#rail-ci .rail-icon, #rail-workflow .rail-icon { stroke-width: 1.5; }
.ci-page { display: grid; gap: 14px; align-content: start; }
.ci-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; }
.ci-filters { display: flex; flex-wrap: wrap; gap: 10px; }
/* Filters are compact, matching the toolbar's compact button, not the 54px form fields. */
.ci-filters select { width: auto; min-width: 0; height: 36px; padding: 0 10px; border-radius: 8px; font-size: 14px; }
.ci-table-card { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.ci-table { width: 100%; border-collapse: collapse; }
.ci-table th { padding: 9px 12px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 12px; text-align: left; white-space: nowrap; }
.ci-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.ci-table tbody tr:last-child td { border-bottom: 0; }
.ci-table tbody tr:hover { background: var(--surface-raised); }
.ci-num { text-align: right; white-space: nowrap; color: var(--muted); }
.ci-started { white-space: nowrap; color: var(--muted); }
/* A short hash or a trigger such as Manual is never broken across lines. */
.ci-table td.ci-commit, .ci-table td.ci-trigger { white-space: nowrap; overflow-wrap: normal; }
.ci-sub { display: block; color: var(--muted); font-size: 12px; }
.ci-ref { padding: 1px 7px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-raised); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
a.ci-ref { display: inline-block; text-decoration: none; }
/* In a Builds list, a long branch name wraps inside its box, at a / where it can. */
.ci-table .ci-ref { display: inline-block; max-width: 24ch; white-space: normal; overflow-wrap: break-word; }
a.ci-ref:hover { text-decoration: underline; }
/* The artifact browser, on the build and job pages: a tree of each attempt's
   files beside the chosen one, as Code shows a commit. Expired files stay in
   the tree, struck through. */
/* The tree starts wide enough for most file names and resizes by its corner. */
.ci-artifact-browser { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.ci-artifact-tree { display: grid; gap: 4px; box-sizing: border-box; width: 380px; min-width: 200px; max-width: 70vw; padding: 8px 6px; overflow: auto; resize: horizontal; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 13px; }
.ci-artifact-tree summary { display: flex; gap: 6px; align-items: baseline; padding: 3px 6px; border-radius: 6px; cursor: pointer; list-style: none; }
.ci-artifact-tree summary::-webkit-details-marker { display: none; }
.ci-artifact-tree summary::before { content: "▸"; width: 10px; color: var(--muted); }
.ci-artifact-tree details[open] > summary::before { content: "▾"; }
.ci-artifact-tree summary:hover, .ci-artifact-file:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ci-artifact-heading { font-weight: 750; overflow-wrap: anywhere; }
.ci-artifact-count { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.ci-artifact-nodes { margin: 0; padding: 0 0 0 12px; list-style: none; }
.ci-artifact-folder { overflow-wrap: anywhere; }
.ci-artifact-file { display: block; padding: 3px 6px 3px 22px; border-radius: 6px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.ci-artifact-file[aria-current="true"] { background: color-mix(in srgb, var(--accent) 22%, transparent); font-weight: 700; }
.ci-artifact-file.ci-expired { color: var(--muted); text-decoration: line-through; }
.ci-artifact-differs { color: var(--warning-text); font-weight: 900; text-decoration: none; }
.ci-artifact-group-actions { display: flex; justify-content: flex-end; padding: 2px 6px 6px; }
.ci-artifact-zip { height: 28px; min-height: 28px; padding: 0 10px; font-size: 12px; white-space: nowrap; }
.ci-artifact-view { min-width: 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.ci-artifact-view-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ci-artifact-path { overflow-wrap: anywhere; font-weight: 700; }
.ci-artifact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.ci-artifact-actions form { margin: 0; }
.ci-artifact-meta { margin: 6px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.ci-artifact-text { max-height: 70vh; overflow: auto; }
@media (max-width: 800px) { .ci-artifact-browser { grid-template-columns: minmax(0, 1fr); } .ci-artifact-tree { width: auto !important; max-width: none; resize: none; } }
/* A job page's attempt switcher: the attempt shown on every tab, and the others when opened. */
.ci-attempt-switcher { justify-self: start; max-width: 100%; }
.ci-attempt-switcher > summary { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 700; list-style: none; }
.ci-attempt-switcher > summary::-webkit-details-marker { display: none; }
.ci-attempt-switcher > summary::after { content: "▾"; color: var(--muted); }
.ci-attempt-list { margin-top: 8px; }
.ci-attempt-list p { margin: 8px 0 0; font-size: 12px; }
.ci-table tr.ci-current td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ci-footnote { margin: 0; font-size: 12px; }
.ci-empty { padding: 32px 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); text-align: center; }
.ci-empty h2 { margin: 0 0 8px; color: var(--text); }
.ci-state { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ci-state-icon { display: inline-grid; width: 18px; height: 18px; place-items: center; box-sizing: border-box; border-radius: 50%; font-size: 11px; font-weight: 900; }
.ci-s-passed { color: var(--success); } .ci-s-passed .ci-state-icon, .ci-step-icon.ci-s-passed { border: 1px solid var(--success-border); background: var(--success-surface); }
.ci-s-failed, .ci-s-invalid { color: var(--danger); } .ci-s-failed .ci-state-icon, .ci-s-invalid .ci-state-icon, .ci-step-icon.ci-s-failed { border: 1px solid var(--danger-border); background: var(--danger-surface); }
.ci-s-allowed, .ci-s-waiting { color: var(--warning-text); } .ci-s-allowed .ci-state-icon { border: 1px solid var(--warning); }
.ci-s-waiting .ci-state-icon { border: 1.5px dashed var(--warning); }
.ci-s-building { color: var(--accent); } .ci-s-building .ci-state-icon, .ci-step-icon.ci-s-building { border: 2px solid var(--border); border-top-color: var(--accent); font-size: 0; animation: language-spin 1s linear infinite; }
.ci-s-pending { color: var(--muted); } .ci-s-pending .ci-state-icon { border: 1.5px dashed var(--muted); }
.ci-s-reused { color: var(--success); } .ci-s-reused .ci-state-icon { border: 1.5px dashed var(--success-border); background: var(--success-surface); }
.ci-s-cancelled, .ci-s-skipped, .ci-step-icon.ci-s-stopped { color: var(--muted); } .ci-s-cancelled .ci-state-icon, .ci-s-skipped .ci-state-icon, .ci-step-icon.ci-s-stopped { border: 1px solid var(--muted); }
.ci-text-passed { color: var(--success); } .ci-text-failed { color: var(--danger); }
/* An edge a job waits on that was not taken. */
.ci-edge-dead { text-decoration: line-through; }
.ci-build-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ci-build-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; }
.ci-build-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ci-danger-outline { border-color: var(--danger-border); color: var(--danger); }
.ci-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; color: var(--muted); }
.ci-meta code { color: var(--muted); }
.ci-build-summary { display: grid; gap: 4px; }
.ci-build-title { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ci-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0; color: var(--muted); font-size: 14px; }
.ci-facts > * { white-space: nowrap; }
.ci-facts > * + *::before { display: inline-block; content: "·"; margin: 0 9px; color: var(--muted); font-weight: 400; }
.ci-facts strong { color: var(--text); font-weight: 600; }
.ci-facts code { color: var(--muted); }
.ci-build-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.ci-graph-card, .ci-panel, .ci-invalid, .ci-workflow { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.ci-graph-card { padding: 14px 10px; min-width: 0; }
.ci-graph-scroll { overflow-x: auto; }
.ci-graph { display: block; }
.ci-edge { fill: none; stroke: var(--field-border); stroke-width: 1.7; }
.ci-edge-ok { stroke: var(--success-border); stroke-width: 2; }
.ci-edge-bad { stroke: var(--danger-border); stroke-width: 2; }
.ci-edge-open.ci-on-failure { stroke: var(--danger-border); opacity: .55; }
.ci-edge-dead { stroke: var(--muted); stroke-dasharray: 4 4; opacity: .45; }
.ci-arrow-ok { fill: var(--success-border); } .ci-arrow-bad { fill: var(--danger-border); } .ci-arrow-open { fill: var(--field-border); } .ci-arrow-dead { fill: var(--muted); opacity: .6; }
.ci-edge-label rect { fill: var(--surface); stroke: var(--danger-border); }
.ci-edge-label text { fill: var(--danger); font: 600 10px system-ui, sans-serif; }
.ci-edge-label-dead { opacity: .5; }
.ci-start-ring { fill: none; stroke: var(--border); stroke-width: 1.5; }
.ci-start-dot { fill: var(--text); }
.ci-start-label { fill: var(--muted); font: 600 12px system-ui, sans-serif; }
.ci-node { cursor: pointer; }
.ci-node:focus-visible { outline: none; }
.ci-node:focus-visible .ci-node-box { stroke: var(--focus); stroke-width: 2.4; }
.ci-node-box { fill: var(--surface-raised); stroke: var(--border); stroke-width: 1.2; }
.ci-selected .ci-node-box { stroke: var(--accent); stroke-width: 2.4; }
.ci-node-name { fill: var(--text); font: 600 13px system-ui, sans-serif; }
.ci-node-detail { fill: var(--muted); font: 11px system-ui, sans-serif; }
.ci-node-ring { fill: none; stroke: currentColor; stroke-width: 1.6; }
.ci-node-glyph { fill: currentColor; font: 900 11px system-ui, sans-serif; }
.ci-node-bar { fill: currentColor; }
.ci-spin-track { stroke: var(--border); stroke-width: 2.5; }
.ci-spin { stroke: var(--accent); stroke-width: 2.5; }
.ci-n-passed { color: var(--success); } .ci-n-failed { color: var(--danger); } .ci-n-allowed, .ci-n-waiting { color: var(--warning); }
.ci-n-building { color: var(--accent); } .ci-n-pending, .ci-n-cancelled, .ci-n-skipped { color: var(--muted); }
/* Reused (Phase 137): passed without running, so green with a dashed ring. */
.ci-n-reused { color: var(--success); } .ci-n-reused .ci-node-ring { stroke-dasharray: 3 2; }
.ci-n-pending .ci-node-ring, .ci-n-waiting .ci-node-ring { stroke-dasharray: 3 2; }
.ci-n-skipped .ci-node-box, .ci-n-cancelled .ci-node-box { opacity: .55; }
.ci-n-skipped .ci-node-name, .ci-n-cancelled .ci-node-name { fill: var(--muted); }
/* GitCorner's own analysis job (Phase 136), shaded so it does not read as a workflow job. */
.ci-analysis .ci-node-box { fill: color-mix(in srgb, var(--accent) 14%, var(--surface-raised)); stroke: color-mix(in srgb, var(--accent) 45%, var(--border)); stroke-dasharray: 5 3; }
.ci-findings { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.ci-findings li { padding: 6px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.ci-finding-level { display: inline-block; min-width: 58px; font-weight: 600; text-transform: capitalize; }
.ci-level-error { color: var(--danger); } .ci-level-warning { color: var(--warning); } .ci-level-note, .ci-level-hint { color: var(--muted); }
.ci-analysis-key { display: inline-block; width: 22px; height: 12px; border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--border)); border-radius: 3px; background: color-mix(in srgb, var(--accent) 14%, var(--surface-raised)); }
.ci-count rect { fill: var(--surface); stroke: var(--border); }
.ci-count text { fill: var(--muted); font: 600 10px system-ui, sans-serif; }
.ci-count-full rect { fill: var(--danger-surface); stroke: var(--danger-border); } .ci-count-full text { fill: var(--danger); }
.ci-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 10px 0; font-size: 12px; }
.ci-key { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.ci-key-line { display: inline-block; width: 26px; border-top: 2px solid var(--field-border); }
.ci-key-ok { border-top-color: var(--success-border); } .ci-key-bad { border-top-color: var(--danger-border); } .ci-key-dead { border-top: 2px dashed var(--muted); }
.ci-count-key { padding: 0 6px; border: 1px solid var(--border); border-radius: 8px; font-size: 10px; font-weight: 600; }
.ci-panel { padding: 14px 16px; }
.ci-panel h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 16px; }
.ci-why { margin: 0 0 12px; padding: 8px 10px; border-radius: 6px; background: var(--surface-raised); font-size: 13px; }
.ci-panel dl { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 10px; margin: 0 0 12px; }
.ci-panel dt { color: var(--muted); font-size: 12px; }
.ci-panel dd { margin: 0; overflow-wrap: anywhere; }
.ci-panel-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ci-hint { margin: 10px 0 0; font-size: 12px; }
.ci-chip { display: inline-block; padding: 0 7px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-raised); color: var(--muted); font-size: 12px; white-space: nowrap; }
.ci-chip-warn { border-color: var(--warning); color: var(--warning-text); }
.ci-invalid { padding: 14px 18px; border-color: var(--danger-border); }
.ci-invalid h2 { margin: 0 0 6px; font-size: 16px; color: var(--danger); }
.ci-errors { margin: 8px 0 0; padding-left: 20px; }
.ci-workflow { padding: 12px 16px; }
.ci-workflow summary { cursor: pointer; }
.ci-workflow-text { margin: 10px 0 0; padding: 10px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--code-surface); color: var(--code-text); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.ci-line { display: block; padding: 0 12px 0 52px; text-indent: -40px; white-space: pre-wrap; }
.ci-line::before { content: attr(data-n); display: inline-block; width: 30px; margin-right: 10px; color: var(--muted); text-align: right; text-indent: 0; }
.ci-line-error { background: var(--danger-surface); }
.ci-line:target { outline: 2px solid var(--focus); outline-offset: -2px; }
.ci-tabs { margin: 0; }
.ci-log-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ci-log-tools form { margin: 0; }
.ci-log-tools input[type=search] { flex: 1 1 240px; width: auto; }
.ci-log { overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--code-surface); color: var(--code-text); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.ci-log details { border-bottom: 1px solid var(--border); }
.ci-log details:last-child { border-bottom: 0; }
.ci-log summary { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 7px 12px; cursor: pointer; list-style: none; }
.ci-log summary::-webkit-details-marker { display: none; }
.ci-log summary:hover { background: var(--surface-raised); }
.ci-step-icon { display: inline-grid; width: 16px; height: 16px; place-items: center; box-sizing: border-box; border-radius: 50%; font-size: 9px; font-weight: 900; }
.ci-step-command { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-step-system { color: var(--muted); font: italic 13px system-ui, sans-serif; }
.ci-step-took, .ci-step-exit { color: var(--muted); white-space: nowrap; }
.ci-step-exit-bad { color: var(--danger); font-weight: 700; }
.ci-log pre { margin: 0; padding: 4px 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ci-log-line { display: block; padding: 0 12px 0 46px; text-indent: -34px; }
.ci-log-line::before { content: attr(data-n); display: inline-block; width: 28px; margin-right: 6px; color: var(--muted); opacity: .7; text-align: right; text-indent: 0; }
.ci-log-line[hidden] { display: none; }
.ci-log-note { margin: 0; padding: 12px; color: var(--muted); }
.ci-failure { margin: 0; color: var(--danger); }
.ci-no-builder { margin: 0; }
@media (max-width: 1100px) { .ci-build-layout { grid-template-columns: minmax(0, 1fr); } }

/* A merge request's CI strip: the source tip's latest build (Phase 134). */
.ci-mr-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0; padding: 10px 14px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 8px; background: var(--surface); }
.ci-mr-strip-passed { border-left-color: var(--success); }
.ci-mr-strip-failed, .ci-mr-strip-invalid, .ci-mr-strip-cancelled { border-left-color: var(--danger); }
.ci-mr-strip-building { border-left-color: var(--accent); }
.ci-mr-strip-action { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.ci-mr-strip-action form { margin: 0; }

/* AI providers and settings (Phase 141). */
.ai-model { margin-bottom: 6px; }
.ai-provider-form form { display: grid; gap: 4px; max-width: 880px; }
.ai-models h3, .admin-ai .card h3 { margin-top: 0; }
.compact-table th, .compact-table td { padding: 8px 12px; }
.ai-models input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; }

/* Drafted text in the commit and merge request dialogs (Phase 142). */
.ai-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-label-row > span, .ai-label-row > label { font-weight: 700; }
.ai-draft-button::before { content: "\2726"; margin-right: 6px; color: var(--accent); }
.ai-chip { display: inline-flex; align-items: center; margin-right: 6px; padding: 1px 7px; border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
.ai-status { margin: 4px 0 10px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.ai-status-error { color: var(--danger); }
.ai-left-out { margin-top: 2px; }
.ai-left-out summary { cursor: pointer; }
.ai-left-out p { margin: 6px 0 2px; font-weight: 600; }
.ai-left-out ul { margin: 0; padding-left: 18px; max-height: 160px; overflow-y: auto; }
.ai-spinner { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: ai-spin 1s linear infinite; vertical-align: -1px; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ai-spinner { animation: none; } }
