:root {
  color-scheme: dark;
  --bg: #0a0c0b;
  --surface: #101311;
  --surface-2: #151917;
  --ink: #f1f4ef;
  --muted: #8e9991;
  --line: #283029;
  --accent: #b7f34a;
  --accent-ink: #12180a;
  --warn: #f6a65d;
  --bad: #ff6b6b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
button {
  min-height: 42px;
  border: 0;
  border-radius: 3px;
  padding: 0 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 750;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease, opacity 150ms ease;
}
button:hover { transform: translateY(-1px); filter: brightness(1.06); }
button:disabled { opacity: .45; cursor: wait; transform: none; }
button.secondary { color: var(--ink); background: transparent; border: 1px solid var(--line); }

.topbar {
  min-height: 110px;
  padding: 22px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: end;
  justify-content: space-between;
}
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(2.2rem, 5vw, 4.8rem); line-height: .82; letter-spacing: -.07em; }
h2 { margin-bottom: 0; font-size: 1.15rem; letter-spacing: -.025em; }
.eyebrow, .stage-kicker {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.system-status { display: flex; align-items: center; gap: 10px; text-align: right; }
.system-status strong, .system-status small { display: block; }
.system-status small { margin-top: 3px; color: var(--muted); }
.text-button { min-height: auto; padding: 4px 0; color: var(--muted); background: transparent; font-size: .68rem; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(183,243,74,.09); }

main { padding: 0 clamp(20px, 4vw, 64px) 60px; }
.account-strip {
  min-height: 90px;
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr)) auto;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.account-strip span { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.account-strip strong { display: block; margin-top: 6px; font-size: 1.25rem; }
.top-performance { padding: 24px 0 4px; border-bottom: 1px solid var(--line); }
.top-performance .section-heading { margin-bottom: 12px; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 48px; padding-top: 42px; }
.primary { min-width: 0; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.section-heading:not(:first-child) { margin-top: 42px; }
.heading-actions { display: flex; align-items: center; justify-content: end; gap: 12px; }
.heading-actions button { min-height: 36px; padding: 0 12px; font-size: .74rem; }
.timestamp, .status-label { color: var(--muted); font-size: .76rem; }
.status-label { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }
.status-label.good { color: var(--accent); border-color: rgba(183,243,74,.4); }
.status-label.warn { color: var(--warn); border-color: rgba(246,166,93,.45); }
.status-label.bad { color: var(--bad); border-color: rgba(255,107,107,.45); }
.mini-status { display: inline-block; padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .66rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.mini-status.good { color: var(--accent); border-color: rgba(183,243,74,.4); background: rgba(183,243,74,.045); }
.mini-status.warn { color: var(--warn); border-color: rgba(246,166,93,.45); background: rgba(246,166,93,.045); }
.mini-status.bad { color: var(--bad); border-color: rgba(255,107,107,.45); background: rgba(255,107,107,.045); }

.strategies { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.strategy { padding: 22px 20px 20px 0; border-bottom: 1px solid var(--line); }
.strategy:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
.intraday-engine-card { background: linear-gradient(150deg, transparent, rgba(183,243,74,.025)); }
.strategy-name { display: flex; justify-content: space-between; gap: 20px; }
.strategy-title-button {
  min-height: auto;
  padding: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -.025em;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(183,243,74,.38);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.strategy-title-button:hover { color: var(--accent); filter: none; transform: none; text-decoration-color: var(--accent); }
.strategy-title-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.strategy-state { color: var(--accent); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.sleeve-note { display: block; margin-top: 5px; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.allocations { display: flex; gap: 14px; margin-top: 24px; }
.allocation strong, .allocation span { display: block; }
.allocation strong { font-size: 1.65rem; letter-spacing: -.04em; }
.allocation span { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.indicators { margin-top: 20px; color: var(--muted); font-size: .75rem; line-height: 1.65; }
.execution-mode { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.execution-mode strong, .execution-mode span { display: block; }
.execution-mode strong { font-size: .76rem; }
.execution-mode span { margin-top: 4px; color: var(--muted); font-size: .68rem; }
.switch { position: relative; flex: 0 0 auto; width: 42px; min-height: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.switch i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform 160ms ease, background 160ms ease; }
.switch.on { border-color: rgba(183,243,74,.55); background: rgba(183,243,74,.12); }
.switch.on i { transform: translateX(18px); background: var(--accent); }
.empty { min-height: 90px; display: grid; align-items: center; color: var(--muted); border-top: 1px solid var(--line); }
.swing-allocation { border-top: 1px solid var(--line); }
.allocation-settings-card { padding: 20px 0 0; }
.allocation-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.allocation-settings-grid label { display: grid; gap: 7px; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.allocation-settings-grid input { min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg); color: var(--ink); font-size: 1.05rem; font-weight: 750; }
.allocation-settings-grid small { color: var(--muted); font-size: .66rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.allocation-summary { display: flex; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.allocation-summary strong { color: var(--accent); }
.allocation-summary span { color: var(--muted); text-align: right; font-size: .72rem; line-height: 1.45; }
.allocation-summary.warn strong { color: var(--warn); }
.benchmark-comparison { border-top: 1px solid var(--line); overflow-x: auto; }
.benchmark-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.benchmark-summary div { min-height: 86px; padding: 18px 18px 18px 0; }
.benchmark-summary div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.benchmark-summary span, .benchmark-summary strong { display: block; }
.benchmark-summary span { color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.benchmark-summary strong { margin-top: 8px; font-size: 1.22rem; letter-spacing: -.03em; }
.benchmark-comparison table td:first-child span { display: block; margin-top: 3px; color: var(--muted); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.benchmark-primary-row td { background: rgba(183,243,74,.035); }
.benchmark-note { margin: 12px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.45; }
.intraday-shadow { border-top: 1px solid var(--line); }
.intraday-strategy { padding: 22px 0; border-bottom: 1px solid var(--line); }
.intraday-strategy-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.intraday-strategy-heading span { color: var(--accent); font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.intraday-strategy-heading h3 { margin: 5px 0 0; font-size: 1.05rem; }
.intraday-strategy-heading > strong { color: var(--accent); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.intraday-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.intraday-metric { min-height: 92px; padding: 18px 18px 18px 0; border-bottom: 1px solid var(--line); }
.intraday-metric + .intraday-metric { padding-left: 18px; border-left: 1px solid var(--line); }
.intraday-metric span, .intraday-metric strong { display: block; }
.intraday-metric span { color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.intraday-metric strong { margin-top: 8px; font-size: 1rem; line-height: 1.25; }
.intraday-rule { padding: 14px 0; color: var(--muted); border-bottom: 1px solid var(--line); font-size: .72rem; line-height: 1.55; }
.intraday-trades { margin-top: 16px; }
.spy-widget-topline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spy-widget-topline div { min-height: 82px; padding: 16px 18px 16px 0; }
.spy-widget-topline div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.spy-widget-topline span, .spy-widget-topline strong { display: block; }
.spy-widget-topline span { color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.spy-widget-topline strong { margin-top: 8px; font-size: 1.15rem; line-height: 1.2; }
.indicator-pills { display: flex; flex-wrap: wrap; gap: 9px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.indicator-pill { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.indicator-pill.bullish { color: var(--accent); border-color: rgba(183,243,74,.45); background: rgba(183,243,74,.06); }
.indicator-pill.bearish { color: var(--bad); border-color: rgba(255,107,107,.45); background: rgba(255,107,107,.045); }
.indicator-pill.neutral { color: var(--warn); border-color: rgba(246,166,93,.45); background: rgba(246,166,93,.045); }
.candidate-context { display: grid; gap: 8px; padding: 15px 0; color: var(--muted); border-bottom: 1px solid var(--line); font-size: .72rem; line-height: 1.5; }
.candidate-context strong { color: var(--ink); font-size: .76rem; }
.candidate-context small { color: var(--muted); font-size: .66rem; }
.intraday-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.settings-card { border: 1px solid var(--line); background: linear-gradient(145deg, var(--surface), var(--surface-2)); }
.settings-card-header { width: 100%; min-height: 0; display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 20px; color: var(--ink); text-align: left; background: transparent; }
.settings-card-header h3 { margin: 4px 0 0; }
.settings-card-header small { display: block; margin-top: 8px; color: var(--muted); font-size: .68rem; font-weight: 600; }
.settings-card-status { display: flex; align-items: center; gap: 12px; }
.collapse-mark { width: 22px; color: var(--muted); font-size: 1.4rem; font-weight: 400; text-align: center; }
.settings-card-body { padding: 0 20px 20px; border-top: 1px solid var(--line); }
.settings-card-body[hidden] { display: none; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.settings-grid label { display: grid; gap: 6px; padding-top: 14px; color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.setting-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.info-button { width: 19px; min-height: 19px; height: 19px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; font-family: Georgia, serif; font-size: .7rem; font-weight: 700; text-transform: none; }
.info-button:hover { color: var(--ink); border-color: var(--muted); transform: none; }
.settings-grid input, .settings-grid select { min-width: 0; min-height: 38px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg); color: var(--ink); }
.fixed-signal-note { align-self: end; padding: 12px; border: 1px solid rgba(183,243,74,.22); color: var(--muted); background: rgba(183,243,74,.035); font-size: .7rem; line-height: 1.45; }
.settings-card-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.settings-card-actions span { color: var(--muted); font-size: .68rem; line-height: 1.4; }

.table-wrap { overflow-x: auto; }
.plan-notice { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .75rem; }
.plan-notice span { color: var(--muted); text-align: right; }
.plan-notice.warn strong { color: var(--warn); }
.plan-notice.bad strong { color: var(--bad); }
.plan-notice.neutral strong { color: var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: .78rem; }
th { color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .09em; text-align: left; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; text-align: right; }
.positive { color: var(--accent); }
.negative { color: var(--bad); }

aside { border-left: 1px solid var(--line); padding-left: 28px; }
.policy { padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.pause-control { width: 100%; margin-top: 18px; }
dl { margin: 20px 0 0; }
dl div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .76rem; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; }
.activity-section { padding-top: 34px; }
.activity { border-top: 1px solid var(--line); }
.activity-item { padding: 15px 0; border-bottom: 1px solid var(--line); }
.activity-item strong, .activity-item span { display: block; }
.activity-item strong { font-size: .78rem; }
.activity-item p { margin: 5px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.activity-item span { margin-top: 8px; color: var(--muted); font-size: .65rem; }

dialog { width: min(500px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--ink); box-shadow: 0 30px 90px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
dialog form { padding: 28px; }
dialog p { color: var(--muted); line-height: 1.55; }
dialog label { display: grid; gap: 9px; color: var(--muted); font-size: .78rem; }
dialog input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg); color: var(--ink); }
.auth-dialog::backdrop { background: rgba(0,0,0,.88); backdrop-filter: blur(9px); }
.auth-dialog label + label { margin-top: 14px; }
.auth-actions { flex-wrap: wrap; }
.dialog-actions { display: flex; justify-content: end; gap: 10px; margin-top: 22px; }
.strategy-detail-dialog { width: min(780px, calc(100% - 32px)); }
.strategy-detail-dialog form { padding: 32px; }
.strategy-detail-dialog > form > h2 { font-size: clamp(1.55rem, 3vw, 2.3rem); letter-spacing: -.045em; }
.strategy-detail-dialog > form > p { margin: 14px 0 26px; }
.detail-section-title { margin: 0 0 10px; font-size: .72rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.regime-list { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.regime-card { min-height: 160px; padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.012); }
.regime-card:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: auto; }
.regime-card h3 { margin: 0 0 13px; color: var(--accent); font-size: .92rem; }
.regime-card p { margin: 0 0 8px; font-size: .73rem; line-height: 1.5; }
.regime-card strong { color: var(--ink); }
.backtest-panel { margin-top: 22px; padding: 18px; border-left: 3px solid var(--accent); background: rgba(183,243,74,.055); }
.backtest-panel .eyebrow { color: var(--accent); }
.backtest-panel p { margin: 0; font-size: .78rem; }
.backtest-panel small { display: block; margin-top: 12px; color: var(--muted); font-size: .66rem; line-height: 1.5; }
#toast { position: fixed; right: 22px; bottom: 22px; max-width: 360px; padding: 12px 14px; background: var(--ink); color: var(--bg); border-radius: 3px; font-size: .78rem; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
#toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .account-strip { grid-template-columns: 1fr 1fr; padding: 20px 0; }
  .account-strip button { grid-column: 1 / -1; }
  .workspace { grid-template-columns: 1fr; }
  aside { border-left: 0; border-top: 1px solid var(--line); padding: 32px 0 0; }
}
@media (max-width: 620px) {
  .topbar { align-items: start; gap: 22px; }
  .system-status { display: none; }
  .section-heading { align-items: start; }
  .heading-actions { align-items: end; flex-direction: column; }
  .strategies { grid-template-columns: 1fr; }
  .strategy:nth-child(even) { padding-left: 0; border-left: 0; }
  .intraday-grid { grid-template-columns: 1fr 1fr; }
  .spy-widget-topline { grid-template-columns: 1fr 1fr; }
  .benchmark-summary { grid-template-columns: 1fr 1fr; }
  .benchmark-summary div:nth-child(3) { padding-left: 0; border-left: 0; }
  .intraday-settings, .settings-grid, .allocation-settings-grid { grid-template-columns: 1fr; }
  .allocation-summary { display: block; }
  .allocation-summary span { display: block; margin-top: 8px; text-align: left; }
  .intraday-metric:nth-child(3) { padding-left: 0; border-left: 0; }
  .strategy-detail-dialog form { padding: 22px; }
  .regime-list { grid-template-columns: 1fr; }
  .regime-card, .regime-card:last-child:nth-child(odd) { min-height: auto; grid-column: auto; }
}

/* Robinhood-inspired product dashboard refresh */
:root {
  --bg: #080b09;
  --surface: rgba(18, 23, 19, .86);
  --surface-2: rgba(26, 34, 28, .9);
  --surface-3: #202a23;
  --ink: #f5f7f1;
  --muted: #9aa69d;
  --line: rgba(214, 241, 204, .12);
  --accent: #b9f45a;
  --accent-ink: #101806;
  --warn: #ffbd70;
  --bad: #ff6f73;
  --card-radius: 28px;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 2%, rgba(185, 244, 90, .16), transparent 30vw),
    radial-gradient(circle at 85% 8%, rgba(90, 182, 255, .08), transparent 34vw),
    linear-gradient(180deg, #0b100d 0%, #070907 52%, #050605 100%);
  font-family: "Avenir Next", "Satoshi", "Manrope", ui-sans-serif, system-ui, sans-serif;
}

button { min-height: 44px; border-radius: 999px; }
button.secondary { background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.1); }
.compact { min-height: 34px; padding: 0 13px; font-size: .74rem; }

.topbar {
  min-height: 92px;
  padding: 24px clamp(18px, 4vw, 56px) 12px;
  border-bottom: 0;
}

h1 { font-size: clamp(2.4rem, 6vw, 5.7rem); line-height: .85; }
.system-status {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  backdrop-filter: blur(14px);
}

.app-home {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px clamp(18px, 4vw, 56px) 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
  gap: 24px;
}

.portfolio-card, .autopilot-card, .strategy-section, .allocation-section, .detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.025)), var(--surface);
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
  backdrop-filter: blur(18px);
}

.portfolio-card {
  min-height: 470px;
  padding: clamp(24px, 4vw, 42px);
  overflow: hidden;
}

.card-topline, .autopilot-heading, .autopilot-actions, .strategy-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hero-value {
  display: block;
  margin-top: 32px;
  font-size: clamp(3.8rem, 10vw, 8.4rem);
  line-height: .82;
  letter-spacing: -.075em;
}

.hero-caption { display: block; margin-top: 18px; color: var(--muted); font-size: .84rem; }
.hero-return {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(185,244,90,.1);
  color: var(--accent);
  font-weight: 850;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.metric-row div, .autopilot-stats div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.035);
}

.metric-row span, .autopilot-stats span, .target-display span {
  display: block;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.metric-row strong, .autopilot-stats strong { display: block; margin-top: 8px; font-size: 1.06rem; }
.benchmark-mini { margin-top: 28px; }
.benchmark-mini .section-heading { margin-bottom: 10px; }
.benchmark-comparison { border-top: 0; }
.benchmark-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; border-bottom: 0; }
.benchmark-summary div {
  min-height: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.03);
}
.benchmark-summary div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.benchmark-comparison table { margin-top: 12px; }

.autopilot-card {
  position: relative;
  min-height: 470px;
  padding: 30px;
  overflow: hidden;
}

.orbital-glow {
  position: absolute;
  inset: auto -80px -110px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185,244,90,.2), transparent 66%);
  pointer-events: none;
}

.status-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 8px rgba(255,255,255,.05);
}
.status-dot.good { background: var(--accent); box-shadow: 0 0 0 8px rgba(185,244,90,.1); }
.status-dot.warn { background: var(--warn); box-shadow: 0 0 0 8px rgba(255,189,112,.1); }
.status-dot.bad { background: var(--bad); box-shadow: 0 0 0 8px rgba(255,111,115,.1); }
.autopilot-heading { justify-content: start; }
.autopilot-card h2 { margin-top: 4px; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.06em; }
.autopilot-card p { margin: 28px 0; color: var(--muted); font-size: 1rem; line-height: 1.55; }
.autopilot-stats { display: grid; gap: 10px; margin-bottom: 24px; }
.autopilot-actions { align-items: stretch; }
.autopilot-actions button { flex: 1; }
.ghost-action {
  width: 100%;
  margin-top: 12px;
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--line);
}

.strategy-section, .allocation-section { margin-top: 24px; padding: clamp(22px, 3vw, 30px); }
.strategy-section .section-heading { margin-bottom: 20px; }
.allocation-section .section-heading { margin-bottom: 20px; }
.strategies {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 14px;
  border-top: 0;
}
.strategy, .strategy:nth-child(even) { padding: 0; border: 0; }
.app-strategy-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
}
.strategy-card-head { align-items: flex-start; }
.strategy-title-button {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.12;
  text-decoration: none;
}
.strategy-title-button:hover { color: var(--accent); }
.friendly-status {
  max-width: 116px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(185,244,90,.09);
  color: var(--accent);
  font-size: .63rem;
  font-weight: 850;
  line-height: 1.15;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.friendly-status.warn { background: rgba(255,189,112,.1); color: var(--warn); }
.friendly-status.bad { background: rgba(255,111,115,.1); color: var(--bad); }
.target-display { margin-top: 26px; }
.target-display strong {
  display: block;
  margin-top: 7px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: .95;
  letter-spacing: -.06em;
}
.strategy-detail-line {
  min-height: 48px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.45;
}
.app-strategy-card .execution-mode { margin-top: auto; padding-top: 16px; }
.strategy-meta { margin-top: 12px; color: var(--muted); font-size: .68rem; }

.unified-allocation-card {
  padding: 0;
}

.allocation-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, .35fr) minmax(220px, .65fr);
  gap: 14px;
  align-items: stretch;
}

.allocation-toolbar label,
.allocation-total,
.allocation-row {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.03);
}

.allocation-toolbar label {
  display: grid;
  gap: 7px;
  padding: 16px;
}

.allocation-toolbar label span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.allocation-toolbar input,
.allocation-row input {
  min-width: 0;
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(0,0,0,.22);
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 850;
}

.allocation-toolbar small,
.allocation-row small {
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.35;
}

.allocation-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
}

.allocation-total strong {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: .9;
  letter-spacing: -.06em;
}

.allocation-total span {
  max-width: 220px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
  text-align: right;
}

.allocation-total.good strong { color: var(--accent); }
.allocation-total.warn strong { color: var(--warn); }

.allocation-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.allocation-row {
  display: grid;
  grid-template-columns: 1fr 76px 14px;
  gap: 10px;
  align-items: center;
  padding: 14px;
}

.allocation-row span,
.allocation-row strong,
.allocation-row small {
  display: block;
}

.allocation-row strong {
  font-size: .9rem;
  line-height: 1.15;
}

.allocation-row small {
  margin-top: 5px;
}

.allocation-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 850;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.detail-panel { padding: 0; overflow: hidden; }
.detail-panel.wide { grid-column: 1 / -1; }
.detail-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 20px 22px;
  cursor: pointer;
}
.detail-panel summary::-webkit-details-marker { display: none; }
.detail-panel summary span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.detail-panel summary strong { font-size: .96rem; }
.detail-panel > :not(summary) { margin: 0 22px 22px; }
.empty { min-height: 90px; border-top: 0; }
.intraday-settings { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 0; }
.settings-card, .regime-card { border-radius: 20px; }
.intraday-shadow { border-top: 0; }
.intraday-strategy {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.025);
}
.intraday-strategy + .intraday-strategy { margin-top: 12px; }
.policy { padding-bottom: 0; border-bottom: 0; }
.activity { border-top: 0; }
.activity-item {
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.025);
}

@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: 1fr; }
  .strategies { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .allocation-list { grid-template-columns: 1fr 1fr; }
  .details-grid { grid-template-columns: 1fr; }
  .intraday-settings { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .topbar { align-items: flex-start; gap: 18px; }
  .system-status { width: 100%; display: flex; justify-content: space-between; text-align: left; }
  .app-home { padding-inline: 14px; }
  .portfolio-card, .autopilot-card, .strategy-section, .allocation-section { border-radius: 22px; padding: 20px; }
  .metric-row, .benchmark-summary, .strategies, .allocation-toolbar, .allocation-list { grid-template-columns: 1fr; }
  .autopilot-actions, .section-heading { flex-direction: column; align-items: stretch; }
  .allocation-total { align-items: flex-start; flex-direction: column; }
  .allocation-total span { text-align: left; }
  .hero-value { font-size: 4rem; }
}
