#finance-theme { white-space: nowrap; }
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edfafa;
  --panel: #fff;
  --ink: #12363e;
  --muted: #44636b;
  --line: #a3ccca;
  --gold: #076465;
  --green: #146c48;
}
[data-theme="light"] body {
  background: radial-gradient(ellipse at 95% 0,#a6e8e3,transparent 55%), var(--bg);
}
[data-theme="light"] :is(.top,.rail,.sidebar,.mobile-dock,#finance-oracle) {
  background: #effcfa;
  color: var(--ink);
  border-color: var(--line);
}
[data-theme="light"] :is(.panel,.hero) {
  background: linear-gradient(120deg,#fff,#d4f3ee,#f1fffd);
  background-size: 180% 180%;
  border-color: var(--line);
  box-shadow: 0 8px 22px #08737314;
}
[data-theme="light"] :is(button,input,select,.pill,.ticker button,.navgroup button[aria-pressed="true"]) {
  background: #e0f5f1;
  color: var(--ink);
  border-color: var(--line);
}
[data-theme="light"] button.gold { background: #076465; color: white; }
[data-theme="light"] .down { color: #963b46; }
[data-theme="light"] a { color: #075f68; }
@media (prefers-reduced-motion: no-preference) {
  [data-theme="light"] :is(.hero,.desk-chart) { animation: finance-current 14s ease-in-out infinite alternate; }
  [data-theme="light"] .hero::after { animation: finance-orbits 18s ease-in-out infinite alternate; }
  @keyframes finance-current { to { background-position: 100% 80%; } }
  @keyframes finance-orbits { to { transform: translate(-24px,18px) rotate(12deg); } }
}
@media (max-width: 620px) {
  .top #finance-theme { grid-column: 3; grid-row: 1; }
  .top #feed-mode { grid-row: 3; grid-column: 1 / -1; justify-self: start; }
}
[data-theme="light"] .market-widget {
  background: #effcfa;
  border: 1px solid #a3ccca;
  border-radius: 12px;
  overflow: hidden;
}
[data-theme="light"] :is(.market-fallback,.market-embed-status) {
  background: #effcfa;
  color: #44636b;
}

[data-theme="light"] :is(.hq-link,.desk-chart .pill,.desk-chart .tabs button,.mobile-dock button) {
  background: #fff;
  color: #124e55;
  border: 1px solid #93bebd;
}
[data-theme="light"] :is(.hq-link,.mobile-dock button) {
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #77a9a7, 0 5px 9px #164f5426;
}
[data-theme="light"] :is(.hq-link,.mobile-dock button[aria-pressed="true"],.desk-chart .tabs button[aria-pressed="true"]) {
  background: linear-gradient(160deg,#147c80,#074950);
  color: #fff;
  border-color: #1a6c71;
  box-shadow: inset 0 1px 0 #ffffff55, 0 2px 0 #063a40, 0 5px 9px #164f5438;
}
[data-theme="light"] :is(.hq-link,.mobile-dock button):active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 4px #153c4540;
}
@media (max-width: 620px) {
  [data-theme="light"] .mobile-wordmark > span {
    background: linear-gradient(145deg,#166d75,#084c55);
    border-radius: 7px;
    padding: 4px 6px;
  }
  [data-theme="light"] .mobile-wordmark > span,
  [data-theme="light"] .mobile-wordmark small { color: #fff; }
  [data-theme="light"] .mobile-dock { gap: 3px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
}

.watch-star { color: #b37b00; }
[data-theme="light"] .desk-grid .desk-shortcut {
  background: #fff;
  color: #124e55;
  border-color: #93bebd;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #77a9a7, 0 5px 9px #164f5426;
}
[data-theme="light"] .desk-grid .desk-shortcut:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 4px #153c4540;
}
.finance-orbit-icons { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .finance-orbit-icons { display: block; position: absolute; inset: 0; pointer-events: none; }
  .finance-orbit-icons i {
    position: absolute;
    left: 50%; top: 50%;
    display: grid; place-items: center;
    width: 16px; height: 16px;
    border: 1px solid #deb66e;
    border-radius: 5px;
    background: #103b47;
    color: #ffe4a3;
    font: 700 11px/1 system-ui;
    opacity: 0;
    animation: finance-orbit-chip 8s ease-in-out infinite;
    --x: -39px; --y: -17px;
  }
  .finance-orbit-icons i:nth-child(2) { --x: -32px; --y: -38px; animation-delay: 2s; }
  .finance-orbit-icons i:nth-child(3) { --x: 4px; --y: -40px; animation-delay: 4s; }
  .finance-orbit-icons i:nth-child(4) { --x: -39px; --y: 4px; animation-delay: 6s; }
  @keyframes finance-orbit-chip {
    0%, 45%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.35); }
    12%, 28% { opacity: 1; transform: translate(var(--x), var(--y)) scale(1); }
  }
}

:root:not([data-theme="light"]) {
  --ink: #fff;
  --muted: #fff;
  --gold: #edca86;
}
:root:not([data-theme="light"]) :is(.label,.pill,.hq-link,.mobile-wordmark b,.rail .mark,.navgroup button[aria-pressed="true"],.finance-oracle-launch > span:last-child,.watch-star) {
  color: var(--gold);
  text-shadow: 0 0 8px #e7b95a42;
}
@media (max-width: 620px) {
  :root:not([data-theme="light"]) .mobile-dock {
    gap: 5px;
    padding: 7px 5px calc(10px + env(safe-area-inset-bottom));
  }
  :root:not([data-theme="light"]) .mobile-dock button {
    color: #fff;
    background: linear-gradient(160deg,#37383b,#17181c 62%,#242326);
    border: 1px solid #666053;
    box-shadow: inset 0 1px 0 #fff3, 0 3px 0 #080809, 0 5px 8px #0009;
  }
  :root:not([data-theme="light"]) .mobile-dock button[aria-pressed="true"] {
    color: var(--gold);
    border-color: #ad874e;
    background: linear-gradient(160deg,#51412b,#252018 70%);
    text-shadow: 0 0 8px #e7b95a55;
  }
  :root:not([data-theme="light"]) .mobile-dock button:active {
    transform: translateY(2px);
    box-shadow: inset 0 2px 4px #000a, 0 1px 0 #080809;
  }
}
