/* Signed-in daylight materials, derived from the registration foundry. */
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) {
  --bg: #eef5fa;
  --surface: #f9fcff;
  --surface-2: #edf4fc;
  --surface-3: #e3eef9;
  --card: #f9fcff;
  --card-soft: #f2f7fd;
  --border: rgba(85, 129, 178, .15);
  --text: #17345b;
  --text-secondary: #425f81;
  --muted: #59718d;
  --accent: #246bd5;
  --accent-soft: rgba(60, 129, 224, .08);
  --blue: #347ce7;
  --blue-soft: rgba(52, 124, 231, .08);
  --positive: #128064;
  --positive-soft: rgba(18, 128, 100, .07);
  --danger: #bc4264;
  --negative: var(--danger);
  --danger-soft: rgba(188, 66, 100, .07);
  --warning: #97641c;
  --amber: #97641c;
  --forge-page-rgb: 238, 245, 250;
  --forge-accent: #246bd5;
  --forge-ink: #17345b;
  --forge-muted: #59718d;
  --forge-soft: rgba(88, 154, 226, .07);
  --forge-line: rgba(85, 129, 178, .15);
  --forge-line-strong: rgba(73, 128, 193, .25);
  --forge-panel: linear-gradient(138deg, rgba(255, 255, 255, .94), rgba(247, 252, 255, .82) 55%, rgba(231, 242, 254, .78));
  --forge-shadow: inset 0 1px 0 rgba(255, 255, 255, .98), 0 8px 28px rgba(49, 95, 153, .065);
  --ui-line: var(--forge-line);
  --ui-highlight: rgba(255, 255, 255, .95);
  --ui-shadow: 0 8px 28px rgba(49, 95, 153, .065);
  --ui-control-shadow: inset 0 1px 0 #fff, 0 2px 5px rgba(57, 106, 164, .05);
  --ui-selected: rgba(255, 255, 255, .85);
  --ui-selected-line: rgba(73, 128, 193, .2);
  --ui-header: rgba(247, 252, 255, .86);
  --control-top: rgba(255, 255, 255, .95);
  --control-bottom: rgba(68, 114, 165, .09);
  --control-shadow: rgba(49, 95, 153, .06);
  --control-pressed: rgba(49, 95, 153, .10);
  --brand-watermark-opacity: .02;
  color: var(--text);
  background:
    radial-gradient(ellipse 78% 550px at 12% 0, rgba(255, 255, 255, .94), transparent 75%),
    radial-gradient(ellipse 60% 650px at 100% 16%, rgba(165, 208, 242, .2), transparent 80%),
    radial-gradient(ellipse 82% 800px at 0 72%, rgba(182, 220, 249, .14), transparent 75%),
    linear-gradient(135deg, #eef5fa, #eaf3fa 44%, #f4f8fc);
  color-scheme: light;
}

/* White rim lighting and translucent chrome, with no blur on scrolling rows. */
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .topbar {
  background: rgba(247, 252, 255, .86);
  border-color: rgba(82, 131, 188, .12);
  box-shadow: 0 4px 20px rgba(52, 98, 152, .035);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .topbar :is(.icon-button, .theme-toggle) {
  color: #57769b; background: linear-gradient(145deg, #ffffffcf, #e7f1fbbf);
  border-color: var(--forge-line-strong); box-shadow: var(--ui-control-shadow);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .topbar .platform-brand .platform-symbol {
  color: #fff; background: linear-gradient(140deg, #5097f7, #296ce0);
  border-color: #4685de; box-shadow: inset 0 1px 0 #d8eeff99, 0 4px 12px #2d6cb91c;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .topbar .platform-wordmark b { color: #17345b; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .topbar :is(.platform-tagline, .platform-wordmark small) { color: #6280a3; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.mode-pill, .paper-badge, .demo-label, .bt-badge) {
  color: #3e6fa7; background: linear-gradient(135deg, #f7fcff, #e6f0fc); border-color: #cbdff3;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .home-user-avatar {
  background: #e1edfc; border-color: #c6daf1; color: var(--accent);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .bottom-nav {
  background: linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(238, 247, 255, .92));
  border-color: rgba(255, 255, 255, .94);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #b9cfe133, 0 10px 30px #3766a016;
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  backdrop-filter: blur(22px) saturate(1.2);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .bottom-nav button { color: #67809d; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .bottom-nav button.active { color: #246bd5; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .bottom-nav button.active .nav-icon {
  background: linear-gradient(145deg, #ffffff, #dcecff); border-color: #c6dcf7;
  box-shadow: inset 0 1px 0 #fff, 0 3px 8px #3974bc12;
}

/* Cards borrow the registration glass without sacrificing text contrast. */
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.panel, .portfolio-card, .wallet-card, .funding-card, .market-insight-card, .strategy-running-card, .copy-card, .ai-brief-card, .settings-group, .profile-menu, .strategy-hub-hero) {
  background: var(--forge-panel); border-color: var(--forge-line); box-shadow: var(--forge-shadow);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.home-assets, .wallet-card) {
  background: radial-gradient(ellipse at 95% 0, #c8e6ff63, transparent 62%), linear-gradient(130deg, #ffffffed, #f5faffd9 56%, #e6f1ffbf);
  border-color: #cadff2; box-shadow: inset 0 1px 0 #fff, 0 12px 32px #3b70b012;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .portfolio-card::after {
  border-color: #82b8f20c; box-shadow: 0 0 0 25px #82b8f205, 0 0 0 50px #82b8f203;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.running-strategy, .home-running, .recommend-card, .strategy-detail-actions button, .compact-position, .strategy-hub-plan-card, .strategy-hub-empty) {
  background: linear-gradient(140deg, #ffffffb8, #eaf4ff85); color: var(--text); border-color: var(--forge-line);
  box-shadow: inset 0 1px 0 #ffffffa6;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .polished-profile { background: transparent; border: 0; box-shadow: none; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.wallet-card, .exchange-sheet) {
  --wallet-ink: #17345b; --wallet-muted: #59718d; --wallet-line: rgba(85, 129, 178, .15);
  --wallet-soft: rgba(111, 169, 235, .06); --wallet-accent: #246bd5;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .profile-sheet {
  --profile-ink: #17345b; --profile-muted: #59718d; --profile-line: rgba(85, 129, 178, .15);
  --profile-field: #f5faff; --profile-accent: #246bd5;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .profile-portrait .avatar { background: linear-gradient(145deg, #e9f5ff, #cce1ff); color: #3974bf; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .portrait-camera { background: #e4f0ff; color: #246bd5; border-color: #fbfdff; }

/* Blue actions, pearl secondary controls, and clearly marked danger states. */
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.app-shell, #modal, .account-drawer) :is(.live-button, .primary-action) {
  color: #fff; background: linear-gradient(110deg, #3273dd, #286cdd 57%, #2260ce);
  border: 1px solid #3879dc;
  box-shadow: inset 0 1px 0 #cbe5ff8c, 0 5px 15px #357ad221 !important;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.app-shell, #modal, .account-drawer) :is(.live-button.secondary, .secondary-action, .pause-action) {
  color: #356aa8; background: linear-gradient(145deg, #ffffffd9, #e9f3ffc7);
  border: 1px solid var(--forge-line-strong); box-shadow: var(--ui-control-shadow) !important;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.app-shell, #modal, .account-drawer) :is(.live-button.danger, .auth-logout) {
  color: #b23e60; background: linear-gradient(140deg, #fff9fc, #fdebf1);
  border: 1px solid #efd0da; box-shadow: inset 0 1px 0 #fff !important;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.text-action, .recommend-link, .news-entry a>small, .strategy-detail-actions button>span, .text-button) { color: var(--accent); }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.strategy-back, .profile-sheet-back, .bt-back) {
  color: #386baf !important; background: linear-gradient(145deg, #ffffffde, #e9f3fccf);
  border-color: var(--forge-line-strong); box-shadow: var(--ui-control-shadow) !important;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.app-shell, #modal) :is(.live-form input, .live-form select, .live-form textarea, .compact-config-grid input, .compact-config-grid select, .bt-controls select, .bt-interval select, .home-assets select) {
  color: var(--text); background: rgba(250, 253, 255, .86); border-color: var(--forge-line-strong);
  box-shadow: inset 0 1px 2px #375e8906;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.app-shell, #modal) :is(input, textarea)::placeholder { color: #6f87a1; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.app-shell, #modal) :is(input, select, textarea):focus-visible { outline-color: #5c9ee8; }

/* Shared compact segmented controls. */
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.plaza-tabs, .news-tabs-five, .square-tabs, .home-strategy-tabs, .market-board-tabs) {
  background: rgba(215, 232, 248, .42); border-color: rgba(90, 141, 194, .13);
  box-shadow: inset 0 1px 2px #3766a007;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.plaza-tabs, .news-tabs-five, .square-tabs, .home-strategy-tabs, .market-board-tabs) button { color: #59718d; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.plaza-tabs, .news-tabs-five, .square-tabs, .home-strategy-tabs, .market-board-tabs) button.active {
  color: #246bd5; background: linear-gradient(135deg, #fff, #f1f8ff);
  border-color: #c5ddf3; box-shadow: inset 0 1px 0 #fff, 0 2px 6px #3567a112 !important;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.period-buttons>button, .more-period>summary, .bt-periods button, .strategy-filters button, .market-filters button, .copy-filters button) {
  background: rgba(250, 253, 255, .78); color: var(--muted); border-color: var(--forge-line);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.period-buttons>button.active, .more-period>summary.active, .bt-periods button.active, .strategy-filters button.active, .market-filters button.active, .copy-filters button.active) {
  background: linear-gradient(140deg, #e5f2ff, #f0f7ff); color: #246bd5; border-color: #adcff2;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .home-assets .period-menu { background: #f6fbff; border-color: #c8ddf1; box-shadow: 0 10px 28px #2b568524; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .home-assets .period-menu button { background: transparent; color: #366aa6; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.home-assets .equity-curve, .home-assets .asset-spark-button, .strategy-example-svg) { color: #367fdf; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .equity-grid { stroke: #7197bf; stroke-opacity: .12; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .curve-point-label { background: #f8fcff; color: #365d88; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(#bt-equity-chart, .chart) polyline { stroke: #367fdf; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .liquidation-chart>rect:first-child { fill: #eaf3fb; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .strategy-type-icon.adaptive { background: #e2f1ff; color: #2c78c7; border-color: #bfddf4; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .copy-card { --copy-accent: #3378c9; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .copy-card.blue { --copy-accent: #5279d2; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .copy-card.violet { --copy-accent: #8868be; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .copy-card footer button { background: #edf6ff; color: #246bd5; border-color: var(--forge-line-strong); }

/* Profit, loss, caution and unread indicators retain distinct meanings. */
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .positive { color: var(--positive) !important; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .negative { color: var(--danger) !important; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.market-change-up, .market-row .positive) { color: var(--positive); background: var(--positive-soft); }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .market-row .negative { background: var(--danger-soft); }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.live-pill, .running-badge, .status-banner) { color: #18745f; background: #eaf7f2; border-color: #c7e6da; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.live-pill i, .running-badge i) { background: var(--positive); }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .fear-value strong { color: var(--accent); }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .ratio-values span { color: var(--positive); }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .ratio-values span:last-child { color: var(--danger); }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .ratio-scale { background: #cd7695; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .ratio-scale span { background: #5eb49e; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .sentiment-scale { background: linear-gradient(90deg, #ce849c, #d4b880, #72bca5); }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .sentiment-scale i { background: #44698f; box-shadow: 0 0 0 2px #f6fbff; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.bt-progress i, .bt-dot) { background: #367fdf; }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .bt-dot.close { background: var(--warning); }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .bt-event-icon { background: var(--accent-soft); color: var(--accent); }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .bt-event-icon.exit { background: #97641c0d; color: var(--warning); }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .bt-error { background: #fff0f4; border-color: #efd0da; color: #a63858; }

/* Frosted sheets and account drawer share the registration palette. */
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(dialog#modal, .account-drawer) {
  color: var(--text); background: linear-gradient(145deg, #fcfefff7, #eaf4fff5);
  border-color: #fffffff0; box-shadow: inset 0 1px 0 #fff, 0 26px 80px #274c7833;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) dialog::backdrop { background: #37547138; -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(dialog#modal #modal-close, .drawer-close) { background: #f7fbff; color: #567493; border-color: var(--forge-line-strong); }
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) dialog.account-hub-drawer {
  --hub-bg: #eef5fa; --hub-card: #ffffffb8; --hub-soft: #eaf3fc;
  --hub-line: rgba(85, 129, 178, .15); --hub-text: #17345b; --hub-muted: #59718d;
  --hub-accent: #246bd5; --hub-tint: rgba(60, 129, 224, .08);
  background: radial-gradient(ellipse at 100% 0, #b9dcff4d, transparent 55%), linear-gradient(160deg, #fafeff, #edf5ff 55%, #f6faff);
  box-shadow: 18px 0 65px #315c8526;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) #toast { color: #244a76; background: #f9fcfff5; border: 1px solid #c7dcf0; box-shadow: 0 12px 35px #2d568c2b; }
@media(hover:hover) {
  :root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.strategy-market-row, .home-strategy-row, .wallet-fold>summary, .profile-menu>button, .profile-menu>a):hover { background: #77afea0b; }
  :root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.live-button, .primary-action):not(:disabled):hover { filter: brightness(1.025); }
}
