@import "tailwindcss";
@import "@xterm/xterm/css/xterm.css";
@plugin "@tailwindcss/typography";

body.sen-file-dragging,
body.sen-file-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url('/fonts/material-symbols-outlined.woff2') format('woff2');
}

.code-viewer-area .line {
  display: block;
  padding: 0 12px;
}

.code-viewer-area .has-line-numbers .line {
  padding-left: 12px;
}

.code-viewer-area .line:hover {
  background: rgba(0, 0, 0, 0.03);
}

.code-viewer-area .line-numbers::before {
  margin-right: 1.5ch;
}

.code-viewer-area .has-line-numbers {
  --line-numbers-foreground: rgba(135, 115, 109, 0.5);
  --line-numbers-width: 2.5ch;
  --line-numbers-padding-left: 0;
  --line-numbers-padding-right: 0;
  --line-numbers-font-size: 11px;
}

.settings-terminal-host .xterm {
  height: 100%;
  padding: 0;
}

.settings-terminal-host .xterm-viewport {
  scrollbar-color: rgba(215, 210, 208, 0.35) transparent;
}

.settings-terminal-host .xterm-screen {
  outline: none;
}

@theme {
  --color-primary: #A16900;
  --color-primary-container: #C9851A;
  --color-primary-fixed: #FFE7B3;
  --color-primary-fixed-dim: #F6CC78;

  --color-on-primary: #FFFFFF;
  --color-on-surface: #1B1C1A;
  --color-on-surface-variant: #54433E;

  --color-surface: #FCFCFC;
  --color-surface-bright: #FCFCFC;
  --color-surface-dim: #DBDAD6;
  --color-surface-container: #F2F2F2;
  --color-surface-container-low: #F7F7F7;
  --color-surface-container-high: #ECECEC;
  --color-surface-container-highest: #E5E5E5;
  --color-surface-container-lowest: #FFFFFF;
  --color-surface-variant: #E5E5E5;

  --color-ref-chip-session-bg: #D8F0DC;
  --color-ref-chip-cred-bg: #FBE6C8;

  --color-background: #FCFCFC;

  --color-outline: #87736D;
  --color-outline-variant: #DAC1BA;

  --color-secondary: #2D628F;
  --color-secondary-container: #9ACBFE;
  --color-tertiary: #4F6237;
  --color-tertiary-container: #677B4E;

  --color-error: #BA1A1A;
  --color-error-container: #FFDAD6;
  --color-on-error-container: #410002;

  --color-inverse-surface: #2F312E;
  --color-inverse-on-surface: #F2F1ED;
  --color-inverse-primary: #F6CC78;

  --color-success: #16A34A;
  --color-warning: #CA8A04;

  --color-plan-accent: #D4A92E;
  --color-plan-accent-hover: #B68F1E;
  --color-plan-accent-container: #FFF4D6;
  --color-on-plan-accent-container: #6B4F0E;
  --color-on-plan-accent: #3D2A06;

  --color-curator-accent: #7B3FE4;
  --color-curator-accent-hover: #6326C7;
  --color-curator-accent-container: #EFE5FF;
  --color-on-curator-accent-container: #3B146A;
  --color-on-curator-accent: #FFFFFF;

  --color-agent-accent: #2563EB;
  --color-agent-accent-hover: #1D4ED8;
  --color-agent-accent-container: #DBEAFE;
  --color-on-agent-accent-container: #1E3A8A;
  --color-on-agent-accent: #FFFFFF;

  --color-spec-accent: #0891B2;
  --color-spec-accent-hover: #0E7490;
  --color-spec-accent-container: #CFFAFE;
  --color-on-spec-accent-container: #155E75;
  --color-on-spec-accent: #FFFFFF;

  --color-ask-accent: #6B7280;
  --color-ask-accent-hover: #4B5563;
  --color-ask-accent-container: #F3F4F6;
  --color-on-ask-accent-container: #1F2937;
  --color-on-ask-accent: #FFFFFF;

  --color-debug-accent: #E04848;
  --color-debug-accent-hover: #C92E2E;
  --color-debug-accent-container: #FFE5E5;
  --color-on-debug-accent-container: #7A1818;
  --color-on-debug-accent: #FFFFFF;

  --color-harness-accent: #EA580C;
  --color-harness-accent-hover: #C2410C;
  --color-harness-accent-container: #FFE8D6;
  --color-on-harness-accent-container: #7C2D12;
  --color-on-harness-accent: #FFFFFF;

  --font-headline: 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-label: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

:root,
[data-theme="light"] {
  color-scheme: light;

  --sidebar-width: 228px;
  --sidebar-rail-width: 72px;
  --titlebar-height: 40px;
  --statusbar-height: 36px;
  --motion-sidebar-duration: 280ms;
  --motion-sidebar-easing: cubic-bezier(0.22, 1, 0.36, 1);

  --color-surface-sidebar: var(--color-surface-container-low);
  --color-surface-hover: var(--color-surface-container-high);
  --color-surface-selected: var(--color-surface-container);
  --color-sidebar-filter-bg: transparent;
  --color-sidebar-filter-border: rgba(218, 193, 186, 0.92);
  --color-sidebar-filter-icon-bg: transparent;
  --color-sidebar-search-bg: rgba(255, 255, 255, 0.78);
  --color-sidebar-search-border: rgba(218, 193, 186, 0.88);
  --color-sidebar-item-hover: rgba(239, 238, 234, 0.82);
  --color-sidebar-item-active: rgba(239, 238, 234, 0.94);
  --color-sidebar-item-active-border: rgba(143, 72, 47, 0.12);
  --sidebar-panel-bg-image: none;

  --color-border: rgba(27, 28, 26, 0.08);
  --color-border-focus: var(--color-primary);
  --color-border-separator: rgba(27, 28, 26, 0.05);

  --color-text-primary: var(--color-on-surface);
  --color-text-secondary: var(--color-on-surface-variant);
  --color-text-tertiary: var(--color-outline);

  --color-surface-info: var(--color-surface-container-low);

  --color-brand: var(--color-primary);
  --color-text-accent: var(--color-secondary);

  --shadow-dropdown: 0 4px 20px rgba(27, 28, 26, 0.04), 0 12px 40px rgba(27, 28, 26, 0.08);
  --shadow-sidebar-filter: none;
  --shadow-focus-ring: 0 0 0 1px rgba(143, 72, 47, 0.16);
  --shadow-error-ring: 0 0 0 1px rgba(186, 26, 26, 0.18);
  --shadow-button-primary: 0 8px 24px rgba(143, 72, 47, 0.18);

  --color-btn-primary-fg: var(--color-on-primary);
  --gradient-btn-primary: linear-gradient(135deg, var(--color-primary), var(--color-primary-container));
  --gradient-btn-primary-hover: linear-gradient(135deg, var(--color-primary-container), var(--color-primary));

  --color-surface-user-msg: var(--color-surface-container);

  --color-overlay-scrim: rgba(27, 28, 26, 0.48);
  --color-surface-glass: rgba(255, 255, 255, 0.84);
  --color-surface-glass-border: rgba(218, 193, 186, 0.22);

  --color-code-bg: #FDFCF9;
  --color-code-fg: #24201E;
  --color-code-comment: #5C6B7A;
  --color-code-string: #437220;
  --color-code-keyword: #B8533B;
  --color-code-function: #1D5A8C;
  --color-code-number: #1B7A6A;
  --color-code-property: #7A3E20;
  --color-code-type: #7E5520;
  --color-code-parameter: #5C3D2E;
  --color-code-punctuation: #5C504A;
  --color-code-inserted: #1A7F37;
  --color-code-deleted: #CF222E;

  --color-diff-added-bg: #E8F5E2;
  --color-diff-added-word: #B8E4A8;
  --color-diff-added-gutter: #D4EDCA;
  --color-diff-added-text: #1A7F37;
  --color-diff-removed-bg: #FDECEA;
  --color-diff-removed-word: #F5B8B4;
  --color-diff-removed-gutter: #F9D4D0;
  --color-diff-removed-text: #CF222E;
  --color-diff-highlight-bg: #FFF5D6;
  --color-diff-highlight-gutter: #FFECB3;
  --color-diff-title-bg: #F4F4F0;
  --color-diff-title-color: #87736D;
  --color-diff-title-border: #DAC1BA;

  --color-terminal-header: #2D2D2D;
  --color-terminal-bg: #1E1E1E;
  --color-terminal-border: #1A1A1A;
  --color-terminal-fg: #D4D4D4;
  --color-terminal-muted: #999999;
  --color-terminal-accent: #28C840;
  --color-terminal-danger: #FF5F57;
  --color-terminal-warning: #FEBC2E;

  --color-window-close-hover: #E81123;
  --color-selection-bg: rgba(255, 219, 208, 0.9);
  --color-selection-fg: #390C00;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

[data-theme="dark"] {
  color-scheme: dark;

  --color-primary: #FFB59F;
  --color-primary-container: #FF6E40;
  --color-primary-fixed: #FFD9CF;
  --color-primary-fixed-dim: #FFB59F;

  --color-on-primary: #2C120B;
  --color-on-surface: #E5E2E1;
  --color-on-surface-variant: #B7AAA5;

  --color-surface: #131313;
  --color-surface-bright: #201F1F;
  --color-surface-dim: #0E0E0E;
  --color-surface-container: #201F1F;
  --color-surface-container-low: #1C1B1B;
  --color-surface-container-high: #2A2929;
  --color-surface-container-highest: #353534;
  --color-surface-container-lowest: #0E0E0E;
  --color-surface-variant: #252120;
  --color-ref-chip-session-bg: #25402C;
  --color-ref-chip-cred-bg: #423318;
  --color-background: #0E0E0E;

  --color-outline: #8D7F7A;
  --color-outline-variant: #5A4138;

  --color-secondary: #CDBDFF;
  --color-secondary-container: #3A3050;
  --color-tertiary: #00DAF3;
  --color-tertiary-container: #003D44;

  --color-error: #FFB4AB;
  --color-error-container: #93000A;
  --color-on-error-container: #FFDAD6;

  --color-inverse-surface: #E5E2E1;
  --color-inverse-on-surface: #1B1C1A;
  --color-inverse-primary: #A16900;

  --color-success: #7EDB8B;
  --color-warning: #F7C46C;

  --color-plan-accent: #E2B33A;
  --color-plan-accent-hover: #F0C45A;
  --color-plan-accent-container: rgba(226, 179, 58, 0.16);
  --color-on-plan-accent-container: #F5D27C;
  --color-on-plan-accent: #2A1D04;

  --color-curator-accent: #B68DFF;
  --color-curator-accent-hover: #D2B8FF;
  --color-curator-accent-container: rgba(123, 63, 228, 0.20);
  --color-on-curator-accent-container: #E5D6FF;
  --color-on-curator-accent: #1E0F3D;

  --color-agent-accent: #60A5FA;
  --color-agent-accent-hover: #93C5FD;
  --color-agent-accent-container: rgba(37, 99, 235, 0.20);
  --color-on-agent-accent-container: #BFDBFE;
  --color-on-agent-accent: #0A1733;

  --color-spec-accent: #22D3EE;
  --color-spec-accent-hover: #67E8F9;
  --color-spec-accent-container: rgba(8, 145, 178, 0.20);
  --color-on-spec-accent-container: #A5F3FC;
  --color-on-spec-accent: #0E2A2F;

  --color-ask-accent: #9CA3AF;
  --color-ask-accent-hover: #D1D5DB;
  --color-ask-accent-container: rgba(107, 114, 128, 0.20);
  --color-on-ask-accent-container: #E5E7EB;
  --color-on-ask-accent: #1F2937;

  --color-debug-accent: #F87171;
  --color-debug-accent-hover: #FCA5A5;
  --color-debug-accent-container: rgba(224, 72, 72, 0.20);
  --color-on-debug-accent-container: #FECACA;
  --color-on-debug-accent: #3F0F0F;

  --color-harness-accent: #FB923C;
  --color-harness-accent-hover: #FDBA74;
  --color-harness-accent-container: rgba(234, 88, 12, 0.20);
  --color-on-harness-accent-container: #FED7AA;
  --color-on-harness-accent: #3F1A06;

  --color-surface-sidebar: #171615;
  --color-surface-hover: var(--color-surface-container-highest);
  --color-surface-selected: var(--color-surface-container);
  --color-sidebar-filter-bg: rgba(255, 255, 255, 0.01);
  --color-sidebar-filter-border: rgba(255, 255, 255, 0.08);
  --color-sidebar-filter-icon-bg: transparent;
  --color-sidebar-search-bg: rgba(255, 255, 255, 0.03);
  --color-sidebar-search-border: rgba(255, 255, 255, 0.06);
  --color-sidebar-item-hover: rgba(255, 255, 255, 0.04);
  --color-sidebar-item-active: rgba(255, 255, 255, 0.06);
  --color-sidebar-item-active-border: rgba(255, 181, 159, 0.14);
  --sidebar-panel-bg-image:
    radial-gradient(circle at top left, rgba(255, 181, 159, 0.045), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));

  --color-border: rgba(90, 65, 56, 0.18);
  --color-border-focus: rgba(255, 181, 159, 0.55);
  --color-border-separator: rgba(90, 65, 56, 0.12);

  --color-text-primary: var(--color-on-surface);
  --color-text-secondary: var(--color-on-surface-variant);
  --color-text-tertiary: #8F827D;

  --color-surface-info: rgba(32, 31, 31, 0.88);
  --color-brand: var(--color-primary);
  --color-text-accent: var(--color-tertiary);

  --shadow-dropdown: 0 16px 40px rgba(0, 0, 0, 0.42);
  --shadow-sidebar-filter: none;
  --shadow-focus-ring: 0 0 0 1px rgba(255, 181, 159, 0.32);
  --shadow-error-ring: 0 0 0 1px rgba(255, 180, 171, 0.26);
  --shadow-button-primary: 0 12px 24px rgba(255, 110, 64, 0.18);

  --gradient-btn-primary: linear-gradient(135deg, var(--color-primary), var(--color-primary-container));
  --gradient-btn-primary-hover: linear-gradient(135deg, var(--color-primary-container), var(--color-primary));

  --color-surface-user-msg: rgba(32, 31, 31, 0.92);

  --color-overlay-scrim: rgba(6, 6, 6, 0.56);
  --color-surface-glass: rgba(32, 31, 31, 0.8);
  --color-surface-glass-border: rgba(90, 65, 56, 0.18);

  --color-code-bg: #0E0E0E;
  --color-code-fg: #E5E2E1;
  --color-code-comment: #8F8683;
  --color-code-string: #88C988;
  --color-code-keyword: #FF8F70;
  --color-code-function: #00DAF3;
  --color-code-number: #74E0F7;
  --color-code-property: #FFC9B8;
  --color-code-type: #CDBDFF;
  --color-code-parameter: #E5E2E1;
  --color-code-punctuation: #9B908C;
  --color-code-inserted: #8EEA9A;
  --color-code-deleted: #FFB59F;

  --color-diff-added-bg: rgba(126, 219, 139, 0.12);
  --color-diff-added-word: rgba(126, 219, 139, 0.22);
  --color-diff-added-gutter: rgba(126, 219, 139, 0.18);
  --color-diff-added-text: #8EEA9A;
  --color-diff-removed-bg: rgba(255, 110, 64, 0.12);
  --color-diff-removed-word: rgba(255, 110, 64, 0.24);
  --color-diff-removed-gutter: rgba(255, 110, 64, 0.18);
  --color-diff-removed-text: #FFB59F;
  --color-diff-highlight-bg: rgba(205, 189, 255, 0.12);
  --color-diff-highlight-gutter: rgba(205, 189, 255, 0.16);
  --color-diff-title-bg: var(--color-surface-container-low);
  --color-diff-title-color: var(--color-text-tertiary);
  --color-diff-title-border: rgba(90, 65, 56, 0.15);

  --color-terminal-header: #242323;
  --color-terminal-bg: #121212;
  --color-terminal-border: #1A1919;
  --color-terminal-fg: #D7D2D0;
  --color-terminal-muted: #8F8683;
  --color-terminal-accent: #7EF18A;
  --color-terminal-danger: #FF6D67;
  --color-terminal-warning: #F8C55F;

  --color-window-close-hover: #C63B44;
  --color-selection-bg: rgba(255, 181, 159, 0.32);
  --color-selection-fg: #FBE7E1;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

* {
  box-sizing: border-box;
}

html, body, #root {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--color-on-surface);

  background-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  outline: none;
  box-shadow: none;
}

.app-window-frame {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
  background-color: var(--color-surface);
  box-shadow: none;
  z-index: 1;
}

::selection {
  background: var(--color-selection-bg);
  color: var(--color-selection-fg);
}

[data-tauri-drag-region] {
  -webkit-app-region: drag;
}
button, input, textarea, select, a, [role="button"] {
  -webkit-app-region: no-drag;
}
[draggable="true"] {
  -webkit-app-region: no-drag;
}
.tab-bar-hit-area,
.tab-bar-hit-area * {
  -webkit-app-region: no-drag;
}

.custom-shadow {
  box-shadow: var(--shadow-dropdown);
}

.glass-panel {
  background: var(--color-surface-glass);
  border: 1px solid var(--color-surface-glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-dropdown);
}

.glass-panel:focus-within {
  box-shadow: var(--shadow-focus-ring), var(--shadow-dropdown);
}

.is-window-busy .glass-panel {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.sidebar-shell {
  width: var(--sidebar-width);
  flex-shrink: 0;
  overflow: hidden;
  transition: width var(--motion-sidebar-duration) var(--motion-sidebar-easing);
  will-change: width;
}

.sidebar-shell[data-state="closed"] {
  width: var(--sidebar-rail-width);
}

.sidebar-panel {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background-image: var(--sidebar-panel-bg-image);
  background-repeat: no-repeat;
  transition:
    background-color var(--motion-sidebar-duration) var(--motion-sidebar-easing),
    border-color var(--motion-sidebar-duration) var(--motion-sidebar-easing);
}

.sidebar-panel[data-state="closed"] {
  width: var(--sidebar-rail-width);
  min-width: var(--sidebar-rail-width);
}

.sidebar-toggle-button {
  color: color-mix(in srgb, var(--color-text-secondary) 72%, transparent);
  background: transparent;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
  border: 0;
  box-shadow: none;
}

.sidebar-toggle-button:hover {
  color: color-mix(in srgb, var(--color-text-primary) 88%, transparent);
  background: color-mix(in srgb, var(--color-surface-hover) 34%, transparent);
}

.sidebar-toggle-button:active {
  transform: translateY(0.5px);
  background: color-mix(in srgb, var(--color-surface-hover) 54%, transparent);
}

.sidebar-toggle-button--open {
  color: color-mix(in srgb, var(--color-text-secondary) 68%, transparent);
}

.sidebar-toggle-button--open:hover {
  color: color-mix(in srgb, var(--color-text-primary) 82%, transparent);
}

.sidebar-toggle-button--collapsed {
  color: color-mix(in srgb, var(--color-text-primary) 78%, transparent);
}

.sidebar-toggle-button--collapsed:hover {
  color: var(--color-text-primary);
}

.sidebar-toggle-button--collapsed:active {
}

.sidebar-toggle-icon {
  overflow: visible;
}

.sidebar-toggle-chevron {
  stroke: currentColor;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  vector-effect: non-scaling-stroke;
}

.sidebar-toggle-chevron {
  opacity: 0.95;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.85;
  transform-origin: 50% 50%;
}

.sidebar-toggle-icon--open .sidebar-toggle-chevron {
  transform: translateX(-0.2px);
}

.sidebar-toggle-button--collapsed .sidebar-toggle-chevron {
  stroke-width: 2;
  transform: translateX(0.4px);
}

.sidebar-copy {
  overflow: hidden;
  white-space: nowrap;
  transition:
    max-width var(--motion-sidebar-duration) var(--motion-sidebar-easing),
    opacity calc(var(--motion-sidebar-duration) - 40ms) ease,
    transform var(--motion-sidebar-duration) var(--motion-sidebar-easing);
}

.sidebar-copy--visible {
  max-width: 240px;
  opacity: 1;
  transform: translateX(0);
}

.sidebar-copy--hidden {
  max-width: 0;
  opacity: 0;
  transform: translateX(-10px);
}

.sidebar-section {
  overflow: hidden;
  transition:
    max-height var(--motion-sidebar-duration) var(--motion-sidebar-easing),
    opacity calc(var(--motion-sidebar-duration) - 40ms) ease,
    transform var(--motion-sidebar-duration) var(--motion-sidebar-easing);
}

.sidebar-section--visible {
  max-height: 1200px;
  opacity: 1;
  transform: translateX(0);
}

.sidebar-section--hidden {
  max-height: 0;
  opacity: 0;
  transform: translateX(-12px);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-shell,
  .sidebar-panel,
  .sidebar-copy,
  .sidebar-section {
    transition-duration: 0.01ms !important;
  }
}

.markdown-prose .md-table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
}

.markdown-prose .md-table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.markdown-prose a code {
  color: inherit;
}

.streaming-markdown {
  font-size: 13px;
  line-height: 1.625;
  color: var(--color-text-primary);
  word-break: break-word;
  white-space: normal;
}
.streaming-markdown a {
  color: var(--color-text-accent);
  text-decoration: none;
}
.streaming-markdown a:hover {
  text-decoration: underline;
}
.streaming-markdown strong {
  color: var(--color-text-primary);
  font-weight: 600;
}
.streaming-markdown .md-stream-code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--color-code-bg);
  color: var(--color-code-fg);
  padding: 1px 4px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}
.streaming-markdown .md-stream-pre {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--color-code-bg);
  color: var(--color-code-fg);
  padding: 8px 10px;
  margin: 6px 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow-x: auto;
  white-space: pre;
}
.streaming-markdown .md-stream-pre code {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: inherit;
  white-space: pre;
}

* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

*:hover,
*:focus-within {
  scrollbar-color: color-mix(in srgb, var(--color-outline) 45%, transparent) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
  background: transparent;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: transparent;
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 9999px;
  transition: background-color 180ms ease-out;
}

*:hover::-webkit-scrollbar-thumb,
*:focus-within::-webkit-scrollbar-thumb {
  background-color: color-mix(in srgb, var(--color-outline) 42%, transparent);
}

::-webkit-scrollbar-thumb:hover {
  background-color: color-mix(in srgb, var(--color-outline) 78%, transparent);
}

::-webkit-scrollbar-thumb:active {
  background-color: color-mix(in srgb, var(--color-outline) 92%, transparent);
}

[data-scroll-keep],
[data-scroll-keep] * {
  scrollbar-color: color-mix(in srgb, var(--color-outline) 60%, transparent) transparent;
}

[data-scroll-keep]::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

[data-scroll-keep]::-webkit-scrollbar-thumb {
  background-color: color-mix(in srgb, var(--color-outline) 55%, transparent);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 9999px;
}

[data-scroll-keep]::-webkit-scrollbar-thumb:hover {
  background-color: color-mix(in srgb, var(--color-outline) 85%, transparent);
}

.sidebar-scroll-area {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.sidebar-scroll-area:hover,
.sidebar-scroll-area:focus-within {
  scrollbar-color: color-mix(in srgb, var(--color-outline) 55%, transparent) transparent;
}

.sidebar-scroll-area::-webkit-scrollbar {
  width: 8px;
}

.sidebar-scroll-area::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-scroll-area::-webkit-scrollbar-thumb {
  background-color: transparent;
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 9999px;
  transition: background-color 180ms ease-out;
}

.sidebar-scroll-area:hover::-webkit-scrollbar-thumb,
.sidebar-scroll-area:focus-within::-webkit-scrollbar-thumb {
  background-color: color-mix(in srgb, var(--color-outline) 55%, transparent);
}

.sidebar-scroll-area::-webkit-scrollbar-thumb:hover {
  background-color: color-mix(in srgb, var(--color-outline) 88%, transparent);
}

@keyframes shimmer {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.animate-shimmer { animation: shimmer 1.5s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse-dot { animation: pulse-dot 1.5s ease-in-out infinite; }

@keyframes browser-dock-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-brand) 0%, transparent), var(--shadow-dropdown); }
  50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand) 55%, transparent), var(--shadow-dropdown); }
}
.animate-browser-dock-pulse { animation: browser-dock-pulse 1.4s ease-in-out infinite; }

@keyframes browser-dock-bubble-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-browser-dock-bubble { animation: browser-dock-bubble-in 0.18s ease-out; }

@keyframes progress-fill {
  from { width: 0%; }
}

.monaco-editor .sen-ai-edit-line {
  background: rgba(34, 197, 94, 0.10);
  transition: background-color 1.2s ease-out;
}
.monaco-editor .sen-ai-edit-gutter {
  background: rgba(34, 197, 94, 0.85);
  width: 3px !important;
  margin-left: 3px;
  transition: opacity 1.2s ease-out;
}

.cv-auto {
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

.message-list-scroll {
  overscroll-behavior: contain;
  overflow-anchor: none;
}

.message-list-scroll * {
  overflow-anchor: none;
}
