:root {
  color-scheme: light;
  --ink: #17201e;
  --muted: #69736f;
  --line: rgba(31, 47, 42, .14);
  --surface: rgba(250, 252, 249, .92);
  --surface-strong: #fbfcfa;
  --accent: #237c68;
  --accent-strong: #145b4d;
  --accent-soft: #dcece6;
  --positive: #c33f3a;
  --negative: #18836b;
  --warning: #a56718;
  --shadow: 0 16px 48px rgba(21, 34, 29, .12);
  --radius: 6px;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #e9eeea; }
body { margin: 0; min-height: 100vh; color: var(--ink); letter-spacing: 0; }
button, input, select { font: inherit; letter-spacing: 0; }
button { color: inherit; }

.scene {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("assets/balanced-coast.jpg") center / cover no-repeat;
  transition: background-image .55s ease, filter .55s ease;
  filter: saturate(.88) contrast(.94);
}
.scene::after { content: ""; position: absolute; inset: 0; background: rgba(235, 241, 237, .46); }
body[data-mode="steady"] .scene { background-image: url("assets/steady-forest.jpg"); }
body[data-mode="attack"] .scene { background-image: url("assets/attack-summit.jpg"); }
body[data-mode="steady"] { --accent: #2e7451; --accent-strong: #185238; --accent-soft: #dceadf; }
body[data-mode="attack"] { --accent: #bd4a46; --accent-strong: #8e2f2c; --accent-soft: #f4ddda; }

.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 24px 18px;
  display: flex; flex-direction: column; gap: 22px;
  background: rgba(247, 250, 247, .94); border-right: 1px solid var(--line);
  backdrop-filter: blur(18px); z-index: 3;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; }
.brand strong { display: block; font-size: 16px; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 700; }
.side-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-left: 3px solid transparent; padding: 11px 10px; background: transparent; cursor: pointer; text-align: left; transition: .18s ease; }
.nav-item span { color: #8a948f; font-size: 10px; font-weight: 800; }
.nav-item:hover { background: rgba(35, 124, 104, .07); }
.nav-item.active { background: var(--accent-soft); border-left-color: var(--accent); color: var(--accent-strong); font-weight: 800; }
.side-section { padding: 16px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.58); }
.kicker { margin: 0 0 7px; color: var(--accent-strong); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.mode-switch { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; margin: 10px 0 18px; }
.mode-switch button { border: 0; border-right: 1px solid var(--line); padding: 9px 4px; background: rgba(255,255,255,.72); cursor: pointer; font-size: 12px; }
.mode-switch button:last-child { border-right: 0; }
.mode-switch button.active { background: var(--accent); color: #fff; font-weight: 800; }
.range-row { display: flex; justify-content: space-between; margin: 13px 0 5px; font-size: 12px; color: var(--muted); }
.range-row strong { color: var(--ink); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.side-status { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 12px; border-top: 1px solid var(--line); }
.side-status strong, .side-status small { display: block; }
.side-status strong { font-size: 12px; }
.side-status small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.status-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #8d9793; box-shadow: 0 0 0 4px rgba(80,90,86,.1); }
.status-dot.good { background: var(--accent); box-shadow: 0 0 0 4px rgba(35,124,104,.13); }
.status-dot.warn { background: var(--warning); box-shadow: 0 0 0 4px rgba(165,103,24,.13); }
.status-dot.bad { background: var(--positive); box-shadow: 0 0 0 4px rgba(195,63,58,.12); }
.status-dot.loading { animation: pulse 1.3s ease-in-out infinite; }

.workspace { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 30px 54px; }
.topbar { min-height: 92px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.topbar h1 { margin: 0; font-size: 22px; line-height: 1.25; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.auth-button { min-height: 34px; padding: 7px 10px; border: 1px solid rgba(35,124,104,.28); border-radius: 4px; background: var(--accent-soft); color: var(--accent-strong); cursor: pointer; font-size: 10px; font-weight: 800; }
.auth-button.locked { border-color: var(--line); background: rgba(255,255,255,.58); color: var(--muted); }
.pill { display: inline-flex; align-items: center; min-height: 30px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(250,252,249,.82); font-size: 11px; font-weight: 750; white-space: nowrap; }
.pill.subtle { color: var(--muted); }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; transition: .2s ease; }
.icon-button:hover { transform: rotate(20deg); border-color: var(--accent); }
.icon-button svg { width: 18px; fill: currentColor; }
.view { display: none; animation: view-in .28s ease; }
.view.active { display: block; }

.plan-hero { padding: 24px; border: 1px solid rgba(255,255,255,.78); border-radius: var(--radius); background: rgba(248, 251, 248, .91); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.plan-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.plan-heading h2, .section-head h2, .page-intro h2 { margin: 0; letter-spacing: 0; }
.plan-heading h2 { font-size: 27px; }
.plan-heading p:not(.kicker) { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.review-badge { min-width: 155px; padding: 12px 14px; border-left: 3px solid var(--warning); background: rgba(245, 235, 216, .72); }
.review-badge.final { border-left-color: var(--accent); background: var(--accent-soft); }
.review-badge span, .review-badge strong, .review-badge small { display: block; }
.review-badge span { font-size: 10px; color: var(--muted); }
.review-badge strong { margin: 4px 0; font-size: 20px; }
.review-badge small { font-size: 9px; color: var(--muted); }
.notice { margin: 18px 0; padding: 11px 13px; border-left: 3px solid var(--accent); background: rgba(255,255,255,.72); color: #4f5a56; font-size: 12px; line-height: 1.65; }
.notice.warning { border-color: var(--warning); color: #6d4a18; }
.notice.blocked { border-color: var(--positive); color: #792f2c; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.plan-card { position: relative; min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-strong); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.plan-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); transform: scaleY(.25); transform-origin: bottom; transition: transform .28s ease; }
.plan-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(21,34,29,.1); }
.plan-card:hover::before { transform: scaleY(1); }
.plan-card header { display: flex; justify-content: space-between; gap: 9px; align-items: flex-start; }
.plan-card h3 { margin: 0; font-size: 16px; }
.plan-card h3 small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 600; }
.plan-rank { color: var(--accent); font-weight: 900; font-size: 11px; }
.score-line { display: flex; gap: 18px; margin: 16px 0; }
.score-line span { color: var(--muted); font-size: 10px; }
.score-line strong { display: block; margin-top: 3px; color: var(--ink); font-size: 16px; }
.plan-level { height: 4px; background: #e1e6e3; overflow: hidden; margin-bottom: 15px; }
.plan-level i { display: block; height: 100%; background: var(--accent); animation: fill .7s ease; }
.price-box { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.price-box div { padding: 9px; background: #f0f3f0; }
.price-box span { display: block; color: var(--muted); font-size: 9px; }
.price-box strong { display: block; margin-top: 4px; font-size: 13px; }
.plan-card p { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.plan-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; }
.plan-actions small { color: var(--muted); font-size: 9px; }
.use-plan { border: 0; padding: 7px 9px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-strong); cursor: pointer; font-size: 10px; font-weight: 800; }
.skeleton-card { min-height: 260px; border-radius: var(--radius); background: rgba(255,255,255,.55); animation: pulse 1.4s ease-in-out infinite; }

.dashboard-grid { display: grid; gap: 16px; margin-top: 16px; }
.dashboard-grid.two-one { grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr); }
.dashboard-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-grid.position-ticket { grid-template-columns: minmax(0, 1.7fr) minmax(320px, .8fr); }
.panel { min-width: 0; padding: 20px; border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 25px rgba(21,34,29,.07); backdrop-filter: blur(12px); }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-size: 17px; }
.panel-note, .empty { color: var(--muted); font-size: 12px; line-height: 1.7; }
.index-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.index-chip { padding: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.62); }
.index-chip span, .index-chip strong, .index-chip small { display: block; }
.index-chip span { color: var(--muted); font-size: 9px; }
.index-chip strong { margin: 4px 0; font-size: 15px; }
.index-chip small { font-size: 10px; }
.up { color: var(--positive) !important; }
.down { color: var(--negative) !important; }
.impact-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.impact-list span { padding: 6px 8px; border: 1px solid var(--line); background: rgba(255,255,255,.62); font-size: 10px; }
.metric-stack { display: grid; gap: 8px; }
.metric-stack div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.metric-stack div:last-child { border: 0; }

.account-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius); background: var(--line); box-shadow: 0 8px 25px rgba(21,34,29,.07); }
.account-strip article { padding: 16px 18px; background: var(--surface); }
.account-strip span, .account-strip strong, .account-strip small { display: block; }
.account-strip span { color: var(--muted); font-size: 10px; }
.account-strip strong { margin: 7px 0 4px; font-size: 20px; }
.account-strip small { color: var(--muted); font-size: 9px; }
.account-strip-primary { margin-top: 0; }
.today-actions { margin-top: 16px; padding: 18px 20px; }
.today-actions .section-head { margin-bottom: 10px; }
.today-action-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.today-action { display: grid; grid-template-columns: 8px 1fr; gap: 10px; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); background: rgba(255,255,255,.62); }
.today-action i { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 4px rgba(191,137,44,.1); }
.today-action.critical i { background: var(--positive); box-shadow: 0 0 0 4px rgba(187,62,53,.1); }
.today-action strong { display: block; font-size: 11px; }
.today-action p, .today-clear p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.today-clear { grid-column: 1 / -1; padding: 11px 12px; border-left: 3px solid var(--accent); background: rgba(35,124,104,.055); }
.pill.danger { border-color: rgba(187,62,53,.28); background: rgba(187,62,53,.07); color: var(--positive); }
.compute-radar { margin-top: 16px; padding: 22px; }
.compute-radar + .plan-hero { margin-top: 16px; }
.radar-head { align-items: center; }
.compute-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.compute-console {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) repeat(4, minmax(105px, .75fr)) auto minmax(105px, auto);
  align-items: center;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.36);
}
.node-state, .compute-metric, .auto-scan-control, .interval-control { min-width: 0; min-height: 70px; padding: 13px 14px; border-right: 1px solid var(--line); }
.node-state { display: flex; align-items: center; gap: 11px; }
.node-state strong, .node-state small, .compute-metric span, .compute-metric strong { display: block; }
.node-state strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.node-state small, .compute-metric span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.compute-metric { display: flex; flex-direction: column; justify-content: center; }
.compute-metric strong { margin-top: 5px; font-size: 14px; }
.auto-scan-control { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 11px; white-space: nowrap; }
.auto-scan-control input { width: 17px; height: 17px; accent-color: var(--accent); }
.interval-control { display: flex; flex-direction: column; justify-content: center; border-right: 0; }
.interval-control span { margin-bottom: 4px; color: var(--muted); font-size: 9px; }
.interval-control select { min-height: 31px; padding: 4px 7px; font-size: 10px; }
.opportunity-table-wrap { max-height: 480px; overflow: auto; border-top: 1px solid var(--line); }
.opportunity-table thead { position: sticky; top: 0; z-index: 1; background: var(--surface-strong); }
.opportunity-table td { vertical-align: middle; }
.opportunity-table td:nth-child(2) { min-width: 150px; white-space: normal; }
.opportunity-table td:nth-child(6) { min-width: 155px; }
.opportunity-table tr { transition: background .18s ease; }
.opportunity-table tr:hover, .opportunity-table tr.opportunity-actionable { background: rgba(35,124,104,.055); }
.signal-tag, .opportunity-status { display: inline-flex; padding: 4px 6px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: 9px; font-weight: 800; }
.signal-tag.active, .opportunity-status.active { border-color: rgba(35,124,104,.28); background: var(--accent-soft); color: var(--accent-strong); }
.use-opportunity:disabled { opacity: .45; cursor: not-allowed; }
.radar-footnote { display: flex; justify-content: space-between; gap: 16px; margin: 11px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.page-intro { margin-bottom: 18px; padding: 22px 0; }
.page-intro h2 { font-size: 25px; }
.page-intro p:not(.kicker) { max-width: 760px; margin: 9px 0 0; color: var(--muted); line-height: 1.7; font-size: 13px; }
.index-board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.index-board .index-chip { padding: 14px; }
.gate-list { display: grid; gap: 8px; }
.gate-item { display: grid; grid-template-columns: 11px 1fr auto; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.gate-item i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.gate-item.warn i { background: var(--warning); }
.gate-item.bad i { background: var(--positive); }
.gate-item small { color: var(--muted); }
.signal-panel { margin-top: 16px; }
.signal-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.signal-item { padding: 13px; border-left: 3px solid #8d9793; background: rgba(255,255,255,.6); }
.signal-item.positive { border-color: var(--positive); }
.signal-item.negative { border-color: var(--negative); }
.signal-item strong { display: block; margin-bottom: 5px; font-size: 12px; }
.signal-item p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { padding: 9px 8px; color: var(--muted); font-weight: 700; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td small { display: block; color: var(--muted); margin-top: 3px; }
.form-grid { display: grid; gap: 11px; }
.form-grid label > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
input:not([type="range"]), select { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.82); outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(35,124,104,.1); }
.primary-button, .secondary-button, .text-button { border: 0; border-radius: 4px; cursor: pointer; font-weight: 800; transition: .18s ease; }
.primary-button { padding: 11px 13px; background: var(--accent); color: #fff; }
.primary-button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.secondary-button { padding: 10px 12px; background: var(--accent-soft); color: var(--accent-strong); }
.text-button { padding: 6px 7px; background: transparent; color: var(--accent-strong); }
.risk-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.risk-form label > span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.risk-form label div { display: flex; align-items: center; gap: 5px; }
.risk-form b { color: var(--muted); }
.broker-reconcile-panel { margin-top: 16px; }
.broker-import-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 14px; }
.broker-import-row input { min-width: 0; }
.reconcile-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 14px; background: var(--line); }
.reconcile-metrics span { padding: 10px; background: rgba(255,255,255,.66); color: var(--muted); font-size: 9px; }
.reconcile-metrics b { display: block; margin-top: 4px; color: var(--ink); font-size: 12px; }
.difference-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.difference-tags span { padding: 5px 7px; border: 1px solid rgba(187,62,53,.2); background: rgba(187,62,53,.05); color: var(--positive); font-size: 9px; }
button:disabled { opacity: .48; cursor: not-allowed; transform: none !important; }
.archive-card { max-width: 760px; }
.archive-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.archive-metrics div { padding: 18px; background: var(--surface-strong); }
.archive-metrics span, .archive-metrics strong { display: block; }
.archive-metrics span { color: var(--muted); font-size: 10px; }
.archive-metrics strong { margin-top: 7px; font-size: 18px; }
.rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rule-grid article { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rule-grid article > strong { color: var(--accent); font-size: 11px; }
.rule-grid h3 { margin: 12px 0 8px; font-size: 16px; }
.rule-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; max-width: 360px; padding: 12px 15px; border-radius: 5px; background: #17201e; color: #fff; box-shadow: var(--shadow); font-size: 11px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: #8f3531; }
.auth-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(13,22,20,.56); backdrop-filter: blur(10px); }
.auth-overlay[hidden] { display: none; }
.auth-dialog { width: min(430px, 100%); padding: 28px; border: 1px solid rgba(255,255,255,.72); border-radius: 7px; background: rgba(249,251,248,.97); box-shadow: 0 28px 80px rgba(7,18,15,.28); }
.auth-dialog h2 { margin: 8px 0 10px; font-size: 22px; }
.auth-dialog > p:not(.kicker) { margin: 0 0 20px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.auth-dialog label span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.auth-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

@keyframes pulse { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes fill { from { width: 0; } }

@media (max-width: 1180px) {
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid.position-ticket { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0; overflow-x: hidden; }
  .sidebar { position: static; width: 100%; min-width: 0; max-width: 100vw; height: auto; padding: 15px; overflow-x: hidden; }
  .brand { margin-bottom: 2px; }
  .side-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .nav-item { justify-content: center; border-left: 0; border-bottom: 3px solid transparent; padding: 9px 4px; font-size: 11px; }
  .nav-item span { display: none; }
  .nav-item.active { border-left: 0; border-bottom-color: var(--accent); }
  .side-section { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 12px; align-items: center; }
  .side-section > .kicker { display: none; }
  .mode-switch { margin: 0; }
  .range-row { margin: 0 0 4px; }
  .side-status { display: none; }
  .workspace { width: 100%; min-width: 0; max-width: 100vw; padding: 0 16px 40px; overflow-x: hidden; }
  .topbar { min-height: 76px; flex-wrap: wrap; }
  .dashboard-grid.two-one, .dashboard-grid.equal { grid-template-columns: 1fr; }
  .today-action-list { grid-template-columns: 1fr 1fr; }
  .compute-console { grid-template-columns: repeat(4, 1fr); }
  .node-state { grid-column: span 2; }
  .node-state, .compute-metric, .auto-scan-control, .interval-control { border-bottom: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .side-nav { width: 100%; min-width: 0; overflow-x: auto; justify-content: start; grid-template-columns: repeat(5, minmax(78px, 1fr)); }
  .side-section { grid-template-columns: 1fr; }
  .side-section > input, .side-section > .range-row { display: none; }
  .topbar { align-items: flex-start; padding: 15px 0; }
  .topbar > div:first-child { min-width: 0; flex: 1 1 210px; }
  .top-actions { flex: 0 1 auto; }
  .top-actions .pill { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .topbar h1 { font-size: 18px; }
  .plan-hero { padding: 17px; }
  .plan-heading { display: block; }
  .review-badge { margin-top: 14px; }
  .plan-grid { grid-template-columns: 1fr; }
  .index-row, .account-strip, .risk-form, .rule-grid, .signal-list { grid-template-columns: 1fr; }
  .today-action-list, .broker-import-row, .reconcile-metrics { grid-template-columns: 1fr; }
  .account-strip { gap: 0; }
  .account-strip article { border-bottom: 1px solid var(--line); }
  .form-row { grid-template-columns: 1fr; }
  .compute-radar { padding: 16px; }
  .radar-head { display: block; }
  .compute-actions { justify-content: stretch; margin-top: 12px; }
  .compute-actions button { flex: 1 1 130px; }
  .compute-console { grid-template-columns: 1fr 1fr; }
  .node-state { grid-column: 1 / -1; }
  .node-state, .compute-metric, .auto-scan-control, .interval-control { min-height: 62px; padding: 10px; }
  .radar-footnote { display: grid; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
