/* Light mode: flat controls on glass surfaces. Loaded after the base theme rules. */
:root[data-theme="light"] {
  --control-fill: #f0f7ff;
  --control-hover: #deedff;
  --control-pressed: #cbdfff;
  --control-border: #91aecf;
  --control-ink: #14365d;
  --control-accent: #075dce;
  --control-accent-hover: #064ba6;
}

/* Cards retain their glass material; interactive controls have no bevel or lift. */
:root[data-theme="light"] body button:not(.launch-tool):not(.cortex-control),
:root[data-theme="light"] body select {
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
  background-color: var(--control-fill);
  color: var(--control-ink);
  border-color: var(--control-border);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

:root[data-theme="light"] body button:not(.launch-tool):hover:not(:disabled),
:root[data-theme="light"] body select:hover:not(:disabled) {
  background-color: var(--control-hover);
  border-color: #507eaf;
}

:root[data-theme="light"] body button:not(.launch-tool):active:not(:disabled) {
  background-color: var(--control-pressed);
}

:root[data-theme="light"] body :is(.launch-signin, .composer-toolbar .send, .launch-dialog .primary) {
  background: var(--control-accent) !important;
  color: #fff !important;
  border: 1px solid var(--control-accent);
}

:root[data-theme="light"] body :is(.launch-signin, .composer-toolbar .send, .launch-dialog .primary):hover:not(:disabled) {
  background: var(--control-accent-hover) !important;
}

:root[data-theme="light"] :is(#profile, #workspace-open) {
  background-color: var(--control-fill);
  color: var(--control-ink);
  border: 1px solid var(--control-border);
}

:root[data-theme="light"] :is(#profile, #workspace-open):hover:not(:disabled) {
  background-color: var(--control-hover);
  border-color: #507eaf;
}

:root[data-theme="light"] body :is(.sidebar .nav, .history button, #projects button, .context-chip button, .composer-add-menu button) {
  background-color: transparent;
}

:root[data-theme="light"] body :is(.sidebar .nav.active, .history button.active, .workspace-dock button[aria-selected="true"], button[aria-pressed="true"]) {
  color: #064aab;
  background-color: #d9eaff;
  border-color: #3779ca;
}

:root[data-theme="light"] body :is(button, select):disabled {
  opacity: .55;
  cursor: not-allowed;
}

:root[data-theme="light"] body :is(button, select, input, textarea):focus-visible {
  outline: 2px solid #075dce;
  outline-offset: 3px;
}

:root[data-theme="light"] body button svg {
  filter: none;
  text-shadow: none;
}

:root[data-theme="light"] .workspace-dock { --ink: #14365d; }
:root[data-theme="light"] .dock-menu,
:root[data-theme="light"] .composer-add-menu {
  background: #f4f9ff;
  color: #14365d;
  border-color: #91aecf;
  box-shadow: 0 8px 24px #244e7926;
}

:root[data-theme="light"] :is(.launch-subtitle, .launch-support) { color: #234773; }
:root[data-theme="light"] .launch-home h1 span:first-child { color: #10294e; }

@media (prefers-reduced-motion: reduce) {
  :root[data-theme="light"] body button,
  :root[data-theme="light"] body select { transition: none; }
}

@media (forced-colors: active) {
  :root[data-theme="light"] body button:not(.launch-tool),
  :root[data-theme="light"] body select {
    background: ButtonFace !important;
    color: ButtonText !important;
    border-color: ButtonText;
  }
  :root[data-theme="light"] body :is(button, select, input, textarea):focus-visible { outline-color: Highlight; }
}
