html[data-theme="light"] {
  color-scheme: light;
  --night: #f7f7fb;
  --night-deep: #f7f7fb;
  --panel: #ffffff;
  --panel-soft: #faf9fe;
  --line: #ececf1;
  --line-strong: #ddd6fe;
  --ink: #1b1d36;
  --muted: #6b6e87;
  --faint: #898ba1;
  --cyan: #6d28d9;
  --cyan-bright: #5b21b6;
  --blue: #6d28d9;
  --danger: #b42318;
  --success: #15803d;
  --radius-xl: 16px;
  --radius-lg: 16px;
  --radius-md: 10px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

html[data-theme="light"] body {
  color: var(--ink);
  background: #f7f7fb;
}

html[data-theme="light"] :focus-visible { outline-color: #7c3aed; }
html[data-theme="light"] .skip-link { color: #fff; background: #6d28d9; }
html[data-theme="light"] .login-screen {
  background:
    radial-gradient(ellipse at 75% 25%, rgba(124, 58, 237, .08), transparent 32rem),
    radial-gradient(ellipse at 21% 87%, rgba(167, 139, 250, .09), transparent 31rem),
    #f7f7fb;
}
html[data-theme="light"] .login-screen::before,
html[data-theme="light"] .login-screen::after { border-color: rgba(109, 40, 217, .08); box-shadow: 0 0 0 44px rgba(109, 40, 217, .025), 0 0 0 90px rgba(109, 40, 217, .018); }
html[data-theme="light"] .login-glow-a { background: #a78bfa; opacity: .12; }
html[data-theme="light"] .login-glow-b { background: #c4b5fd; opacity: .2; }
html[data-theme="light"] .brand-mark { border-color: #ddd6fe; background: linear-gradient(145deg, #fff, #f3efff); box-shadow: 0 3px 10px rgba(76, 29, 149, .08); }
html[data-theme="light"] .brand-mark svg { fill: #6d28d9; }
html[data-theme="light"] .brand-mark .brand-cut { fill: #fff; }
html[data-theme="light"] .brand b { color: #1b1d36; }
html[data-theme="light"] .brand small { color: #6b6e87; }
html[data-theme="light"] .language-switch { border-color: #ececf1; background: #faf9fe; }
html[data-theme="light"] .language-option { color: #6b6e87; }
html[data-theme="light"] .language-option:hover { color: #4c1d95; }
html[data-theme="light"] .language-option.active { color: #fff; background: #6d28d9; box-shadow: 0 2px 8px rgba(109, 40, 217, .18); }
html[data-theme="light"] .login-card { border-color: #ececf1; background: #fff; box-shadow: 0 18px 55px rgba(42, 30, 78, .1); }
html[data-theme="light"] .login-emblem { border-color: #ddd6fe; background: linear-gradient(140deg, #6d28d9, #7c3aed 56%, #8b5cf6); box-shadow: 0 8px 22px rgba(109, 40, 217, .18); }
html[data-theme="light"] .login-emblem .emblem-cut { fill: #6d28d9; }
html[data-theme="light"] .login-emblem circle { fill: #ddd6fe; }
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .panel-kicker { color: #6d28d9; }
html[data-theme="light"] .login-card h1 em { color: #6d28d9; }
html[data-theme="light"] .login-description { color: #6b6e87; }
html[data-theme="light"] .login-form label { color: #4b4d64; }
html[data-theme="light"] .login-form input,
html[data-theme="light"] .mic-device-control select {
  border-color: #e4e1eb;
  color: #1b1d36;
  background: #fff;
}
html[data-theme="light"] .login-form input::placeholder,
html[data-theme="light"] .composer textarea::placeholder { color: #898ba1; }
html[data-theme="light"] .login-form input:hover { border-color: #c4b5fd; }
html[data-theme="light"] .login-form input:focus { border-color: #8b5cf6; background: #fff; box-shadow: 0 0 0 3px rgba(109, 40, 217, .1); }
html[data-theme="light"] .button-primary { color: #fff; background: linear-gradient(105deg, #6d28d9, #7c3aed 68%, #8b5cf6); box-shadow: 0 7px 18px rgba(109, 40, 217, .18); }
html[data-theme="light"] .button-primary:hover { box-shadow: 0 10px 24px rgba(109, 40, 217, .24); }
html[data-theme="light"] .form-error,
html[data-theme="light"] .chat-error { color: #b42318; }
html[data-theme="light"] .login-foot { color: #6b6e87; }
html[data-theme="light"] .login-footer { color: #6b6e87; }
html[data-theme="light"] .login-footer span:first-child { color: #4c1d95; }

html[data-theme="light"] .topbar { border-bottom-color: #ececf1; }
html[data-theme="light"] .workspace-context { color: #6b6e87; }
html[data-theme="light"] .context-icon { border-color: #ddd6fe; color: #6d28d9; background: #f3efff; }
html[data-theme="light"] .icon-button { color: #6b6e87; }
html[data-theme="light"] .icon-button:hover { color: #4c1d95; background: #f3efff; }
html[data-theme="light"] .workspace-intro .eyebrow { color: #6d28d9; }
html[data-theme="light"] .intro-note { color: #6b6e87; }
html[data-theme="light"] .panel { border-color: #ececf1; background: #fff; box-shadow: 0 8px 28px rgba(40, 32, 73, .045); }
html[data-theme="light"] .panel-kicker { color: #6d28d9; }
html[data-theme="light"] .avatar-stage::before { border-color: rgba(109, 40, 217, .16); background: radial-gradient(circle, rgba(196, 181, 253, .28), rgba(237, 233, 254, .35) 62%, transparent 68%); box-shadow: 0 0 42px rgba(109, 40, 217, .07), inset 0 0 24px rgba(167, 139, 250, .07); }
html[data-theme="light"] .avatar-stage::after { border-color: rgba(109, 40, 217, .12); }
html[data-theme="light"] .guide-copy { color: #6b6e87; }
html[data-theme="light"] .guide-state { border-color: #ececf1; color: #4b4d64; background: #faf9fe; }
html[data-theme="light"] .state-detail { color: #898ba1; }
html[data-theme="light"] .question-library { border-top-color: #ececf1; }
html[data-theme="light"] .question-library-title { color: #4c1d95; }
html[data-theme="light"] .question-library-hint,
html[data-theme="light"] .provider-note { color: #6b6e87; }
html[data-theme="light"] .question-category { border-bottom-color: #f0eef5; }
html[data-theme="light"] .question-category summary { color: #4b4d64; }
html[data-theme="light"] .question-category[open] summary { color: #6d28d9; }
html[data-theme="light"] .question-category summary:hover,
html[data-theme="light"] .library-question:hover { color: #4c1d95; background: #f7f4ff; }
html[data-theme="light"] .question-category summary:focus-visible,
html[data-theme="light"] .library-question:focus-visible { outline-color: #7c3aed; }
html[data-theme="light"] .question-category-icon { stroke: #7c3aed; }
html[data-theme="light"] .question-category-count { color: #6b5b8e; background: #f3efff; }
html[data-theme="light"] .question-category-items { scrollbar-color: #d6c8f5 transparent; }
html[data-theme="light"] .library-question { border-bottom-color: #f1eff6; color: #4b4d64; }

html[data-theme="light"] .conversation-header { border-bottom-color: #ececf1; }
html[data-theme="light"] .quiet-toggle { color: #6b6e87; }
html[data-theme="light"] .quiet-toggle[aria-pressed="true"] { color: #4c1d95; }
html[data-theme="light"] .toggle-track { border-color: #ddd6e8; background: #eeebf4; }
html[data-theme="light"] .toggle-track span { background: #a9a5b5; }
html[data-theme="light"] .quiet-toggle[aria-pressed="true"] .toggle-track { border-color: #c4b5fd; background: #ede9fe; }
html[data-theme="light"] .quiet-toggle[aria-pressed="true"] .toggle-track span { background: #6d28d9; }
html[data-theme="light"] .message-list { scrollbar-color: #d7d3df transparent; }
html[data-theme="light"] .message-avatar-mark { border-color: #ddd6fe; color: #6d28d9; background: #f3efff; }
html[data-theme="light"] .message-content p { color: #34364e; }
html[data-theme="light"] .message-time { color: #898ba1; }
html[data-theme="light"] .chat-message.user .message-content { border-color: #ddd6fe; background: #f3efff; }
html[data-theme="light"] .chat-message.user .message-avatar-mark { border-color: #e4e1eb; color: #6b6e87; background: #f6f5f9; }
html[data-theme="light"] .chat-message.assistant .message-content { border-color: #ececf1; background: #fff; }
html[data-theme="light"] .chat-message.error .message-content p { color: #b42318; }
html[data-theme="light"] .analysis-text h3,
html[data-theme="light"] .analysis-text h4 { color: #4c1d95; }
html[data-theme="light"] .suggestion-heading,
html[data-theme="light"] .role-picker label,
html[data-theme="light"] .knowledge-note { color: #6b6e87; }
html[data-theme="light"] .suggestion-rule { background: #ececf1; }
html[data-theme="light"] .suggestion-chip { border-color: #e5e0ee; color: #4b4d64; background: #fff; }
html[data-theme="light"] .suggestion-chip:hover { border-color: #c4b5fd; color: #4c1d95; background: #f7f4ff; }
html[data-theme="light"] .role-picker select { border-color: #e4e1eb; color: #34364e; background: #fff; }
html[data-theme="light"] .composer { border-color: #e4e1eb; background: #fff; }
html[data-theme="light"] .composer:focus-within { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(109, 40, 217, .08); }
html[data-theme="light"] .composer textarea { color: #1b1d36; }
html[data-theme="light"] .send-button { color: #fff; background: linear-gradient(135deg, #6d28d9, #8b5cf6); box-shadow: 0 4px 12px rgba(109, 40, 217, .16); }
html[data-theme="light"] .action-notice { color: #15803d; }
html[data-theme="light"] .action-notice[data-tone="info"] { color: #4c1d95; }
html[data-theme="light"] .conversation-controls .control-button,
html[data-theme="light"] .conversation-controls .interrupt-button { color: #6b6e87; }
html[data-theme="light"] .control-button:hover:not(:disabled),
html[data-theme="light"] .interrupt-button:hover:not(:disabled) { color: #4c1d95; background: #f7f4ff; }
html[data-theme="light"] .control-connect,
html[data-theme="light"] .control-button[aria-pressed="true"] { border-color: #ddd6fe; color: #6d28d9; background: #f3efff; }
html[data-theme="light"] .control-connect[aria-pressed="true"] { color: #15803d; background: #effaf3; }
html[data-theme="light"] .interrupt-button:not(:disabled) { color: #b42318; }
html[data-theme="light"] .privacy-note,
html[data-theme="light"] .mic-device-control { color: #6b6e87; }

html[data-theme="light"] .results-heading { color: #4c1d95; }
html[data-theme="light"] .disclosure-chevron { stroke: #6b6e87; }
html[data-theme="light"] .data-overview { border-color: #ececf1; background: #faf9fe; }
html[data-theme="light"] .overview-label,
html[data-theme="light"] .results-message { color: #6b6e87; }
html[data-theme="light"] .data-overview strong { color: #4c1d95; }
html[data-theme="light"] .overview-divider { background: #e5e0ee; }
html[data-theme="light"] .results-heading-row h3,
html[data-theme="light"] .facets-section h3,
html[data-theme="light"] .actions-section h3,
html[data-theme="light"] .sources-section h3,
html[data-theme="light"] .warnings-section h3 { color: #4b4d64; }
html[data-theme="light"] .result-count { color: #6d28d9; }
html[data-theme="light"] .summary-table { color: #34364e; }
html[data-theme="light"] .summary-table th,
html[data-theme="light"] .summary-table td { border-bottom-color: #ececf1; }
html[data-theme="light"] .summary-table th { color: #6b6e87; }
html[data-theme="light"] .summary-table td { color: #34364e; }
html[data-theme="light"] .result-card { border-color: #ececf1; color: #1b1d36; background: #fff; }
html[data-theme="light"] .result-card:hover { border-color: #c4b5fd; background: #faf9fe; }
html[data-theme="light"] .result-name { color: #34364e; }
html[data-theme="light"] .result-meta { color: #6b6e87; }
html[data-theme="light"] .result-score { border-color: #ddd6fe; color: #6d28d9; background: #f3efff; }
html[data-theme="light"] .facets-section,
html[data-theme="light"] .actions-section,
html[data-theme="light"] .sources-section,
html[data-theme="light"] .warnings-section { border-top-color: #ececf1; }
html[data-theme="light"] .facet-chip { border-color: #e5e0ee; color: #6b5b8e; background: #faf9fe; }
html[data-theme="light"] .action-button { border-color: #ddd6fe; color: #5b21b6; background: #f7f4ff; }
html[data-theme="light"] .action-button:hover { border-color: #c4b5fd; background: #ede9fe; }
html[data-theme="light"] .sources-section ul,
html[data-theme="light"] .warnings-section ul { color: #6b6e87; }
html[data-theme="light"] .source-document-button { color: #5b21b6; text-decoration-color: #c4b5fd; }
html[data-theme="light"] .source-document-button:hover { color: #4c1d95; }
html[data-theme="light"] .export-button { border-color: #ddd6fe; color: #5b21b6; background: #f7f4ff; }
html[data-theme="light"] .export-button:not(.is-disabled):hover { border-color: #c4b5fd; background: #ede9fe; }
html[data-theme="light"] .facets-hint { color: #6b6e87; }
html[data-theme="light"] .hint-mark { border-color: #ddd6fe; color: #6d28d9; }
html[data-theme="light"] .workspace-footer { color: #6b6e87; }
html[data-theme="light"] .footer-dot { color: #8b5cf6; }

html[data-theme="light"] .modal-backdrop { background: rgba(27, 29, 54, .38); }
html[data-theme="light"] .lead-modal { border-color: #ececf1; background: #fff; box-shadow: 0 24px 75px rgba(27, 29, 54, .2); }
html[data-theme="light"] .modal-header { border-bottom-color: #ececf1; }
html[data-theme="light"] .modal-header h2 { color: #1b1d36; }
html[data-theme="light"] .lead-modal-content { scrollbar-color: #d7d3df transparent; }
html[data-theme="light"] .modal-loading,
html[data-theme="light"] .modal-empty { color: #6b6e87; }
html[data-theme="light"] .lead-field-group { border-color: #ececf1; background: #faf9fe; }
html[data-theme="light"] .lead-field-group h3 { color: #6d28d9; }
html[data-theme="light"] .lead-field { border-top-color: #ececf1; }
html[data-theme="light"] .lead-field dt { color: #6b6e87; }
html[data-theme="light"] .lead-field dd,
html[data-theme="light"] .knowledge-document-text { color: #34364e; }
html[data-theme="light"] .lead-flag { border-color: #bbebcb; color: #166534; background: #effaf3; }
html[data-theme="light"] .lead-flag.unavailable { border-color: #ececf1; color: #6b6e87; background: #f7f7fb; }
html[data-theme="light"] .visit-prep-button { border-color: #ddd6fe; color: #5b21b6; background: #f7f4ff; }
html[data-theme="light"] .visit-prep-button:hover { border-color: #c4b5fd; background: #ede9fe; }
html[data-theme="light"] .lead-media-section { border-top-color: #ececf1; }
html[data-theme="light"] .lead-media-section h3 { color: #4b4d64; }
html[data-theme="light"] .lead-images img { border-color: #ececf1; background: #f7f7fb; }
html[data-theme="light"] .lead-review { border-left-color: #c4b5fd; color: #4b4d64; }
html[data-theme="light"] .lead-review-meta { color: #6b6e87; }

html[data-theme="light"] .prime-answer-map { border-color: #ececf1; background: #fff; }
html[data-theme="light"] .prime-answer-map__canvas:focus-visible,
html[data-theme="light"] .prime-answer-map__explore:focus-visible { outline-color: #7c3aed; }
html[data-theme="light"] .prime-answer-map__status { color: #6b6e87; }
html[data-theme="light"] .prime-answer-map__explore { color: #5b21b6; }

.login-top-tools { display: inline-flex; align-items: center; gap: 8px; }
.theme-toggle { display: inline-grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: transparent; cursor: pointer; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.theme-toggle:hover { border-color: var(--line-strong); color: var(--cyan); background: var(--panel-soft); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle-sun { display: none; }
html[data-theme="dark"] .theme-toggle-moon { display: none; }
html[data-theme="dark"] .theme-toggle-sun { display: block; }
html[data-theme="light"] .theme-toggle-moon { display: block; }
html[data-theme="light"] .theme-toggle-sun { display: none; }
html[data-theme="light"] .theme-toggle { border-color: #ececf1; color: #6b6e87; background: #fff; }
html[data-theme="light"] .theme-toggle:hover { border-color: #c4b5fd; color: #6d28d9; background: #f7f4ff; }
