:root {
  --ink: #090d11;
  --ink-2: #0d1319;
  --panel: #111920;
  --panel-2: #151f28;
  --line: #25313a;
  --line-soft: rgba(165, 185, 196, 0.12);
  --paper: #ece8dd;
  --muted: #8b989f;
  --muted-2: #67737b;
  --mint: #54d6ad;
  --mint-ink: #071a14;
  --coral: #ff775f;
  --amber: #edc86a;
  --ice: #78b9df;
  --danger: #ff5f5f;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: auto;
  scroll-padding-top: 86px;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  background-color: var(--ink);
  overflow-x: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 12% 0%, rgba(84, 214, 173, 0.07), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(255, 119, 95, 0.055), transparent 24%),
    linear-gradient(180deg, #0a0f14 0%, #080c10 100%);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 22px 20px;
  border-right: 1px solid var(--line);
  background: rgba(9, 13, 17, 0.86);
  backdrop-filter: blur(14px);
  z-index: 5;
}

.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 0.82;
  letter-spacing: -1.8px;
  color: var(--mint);
}
.brand-copy {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.25;
  letter-spacing: 0.12em;
  color: var(--muted);
}

#overview, #signals, #capital, #strategy { scroll-margin-top: 86px; }

.nav { display: grid; gap: 4px; margin-top: 54px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 11px 10px;
  border: 0;
  border-left: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}
.nav-link:hover, .nav-link.is-active {
  color: var(--paper);
  border-left-color: var(--mint);
  background: linear-gradient(90deg, rgba(84,214,173,0.08), transparent);
}
.nav-index {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted-2);
}

.sidebar-status {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.status-line { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(84,214,173,0.08);
  animation: livePulse 2.6s ease-in-out infinite;
}
.status-dot.offline { background: var(--coral); box-shadow: 0 0 0 4px rgba(255,119,95,0.08); }
.status-meta {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.02em;
}
.status-meta strong { color: var(--paper); font-weight: 500; }
.mini-rule { height: 1px; background: var(--line); margin: 14px 0; }
.sidebar-footer { margin-top: 18px; }
.sidebar-footer a {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--paper);
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.sidebar-footer a span { color: var(--mint); }
.sidebar-footer p { color: var(--muted-2); font-size: 10px; line-height: 1.55; margin: 12px 0 0; }

.workspace {
  min-width: 0;
  padding: 0 30px 22px;
  max-width: 1760px;
  width: 100%;
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 13, 17, 0.88);
  backdrop-filter: blur(16px);
}

.market-switcher { display: flex; align-items: center; gap: 8px; }
.select-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.select-wrap span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}
select {
  color: var(--paper);
  background: transparent;
  border: 0;
  outline: none;
  font-family: var(--font-mono);
  font-size: 11px;
  appearance: none;
  padding-right: 12px;
}
select option { background: var(--panel); }

.topbar-ticker { display: flex; align-items: baseline; gap: 12px; justify-self: start; }
.topbar-ticker strong {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.ticker-change { font-family: var(--font-mono); font-size: 11px; }
.ticker-change.up { color: var(--mint); }
.ticker-change.down { color: var(--coral); }
.ticker-mark { color: var(--muted-2); font-family: var(--font-mono); font-size: 8px; }
#topPrice.price-up { animation: priceUp 520ms ease-out; }
#topPrice.price-down { animation: priceDown 520ms ease-out; }

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.switch-label {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}
.switch-label input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  position: relative; width: 30px; height: 16px;
  background: #202b34;
  border: 1px solid #33414c;
  transition: background 150ms ease, border-color 150ms ease;
}
.switch::after {
  content: ""; position: absolute; left: 2px; top: 2px;
  width: 10px; height: 10px; background: var(--muted);
  transition: transform 150ms ease, background 150ms ease;
}
.switch-label input:checked + .switch { background: rgba(84,214,173,0.18); border-color: rgba(84,214,173,0.55); }
.switch-label input:checked + .switch::after { transform: translateX(14px); background: var(--mint); }

.btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--paper);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.btn:hover { border-color: var(--muted); color: #fff; }
.btn-outline { border-color: rgba(84,214,173,0.36); color: var(--mint); }
.btn-outline:hover { background: rgba(84,214,173,0.08); border-color: var(--mint); }
.btn-quiet { background: transparent; color: var(--muted); }
.btn-danger { color: var(--coral); border-color: rgba(255,119,95,0.35); background: rgba(255,119,95,0.04); }
.btn-danger:hover { border-color: var(--coral); background: rgba(255,119,95,0.08); }
.btn-small { padding: 6px 9px; font-size: 9px; }

.notice-bar {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 18px;
  padding: 9px 13px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(90deg, rgba(237,200,106,0.055), transparent 55%);
  color: var(--muted);
  font-size: 11px;
}
.notice-pulse { width: 5px; height: 5px; background: var(--amber); border-radius: 50%; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(330px, 0.8fr); gap: 16px; }
.mid-grid { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(330px, 0.8fr); gap: 16px; margin-top: 16px; }
.bottom-grid { display: grid; grid-template-columns: 1fr 1fr 0.9fr; gap: 16px; margin-top: 16px; }

.panel {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.018), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute; inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(84,214,173,0.32), transparent 38%);
  pointer-events: none;
}
.panel-head { display: flex; justify-content: space-between; gap: 20px; padding: 20px 22px 8px; }
.panel-head-tight { align-items: flex-start; padding-bottom: 15px; }
.eyebrow {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.panel-title { margin: 4px 0 0; font-family: var(--font-display); font-size: 22px; font-weight: 400; letter-spacing: -0.02em; }
.display-number { margin: 6px 0 2px; font-family: var(--font-mono); font-size: clamp(34px, 4vw, 58px); font-weight: 500; letter-spacing: -0.075em; line-height: 1; }
.inline-change { font-family: var(--font-mono); font-size: 12px; color: var(--mint); }
.inline-change.down { color: var(--coral); }
.equity-stats {
  display: grid; grid-template-columns: repeat(2, minmax(88px, 1fr));
  gap: 12px 20px; padding-top: 4px;
}
.equity-stats div { display: grid; gap: 3px; }
.equity-stats span { color: var(--muted); font-size: 9px; }
.equity-stats strong { font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.equity-stats strong.positive { color: var(--mint); }
.equity-stats strong.negative { color: var(--coral); }

.chart-shell { position: relative; width: 100%; }
.chart-shell-equity { height: 206px; margin-top: 10px; }
.chart-shell-price { height: 292px; margin-top: 2px; }
.chart-shell canvas { width: 100%; height: 100%; display: block; }
.chart-label {
  position: absolute; bottom: 7px;
  color: var(--muted-2); font-family: var(--font-mono); font-size: 8px;
}
.chart-label-left { left: 12px; }
.chart-label-right { right: 12px; }
.price-axis {
  position: absolute; right: 8px; top: 10px; bottom: 18px;
  width: 74px;
  display: flex; flex-direction: column; justify-content: space-between;
  pointer-events: none;
  font-family: var(--font-mono); font-size: 8px; color: var(--muted-2);
  text-align: right;
}
.price-axis span { background: rgba(17,25,32,0.78); padding: 1px 2px; }

.panel-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 17px;
  min-height: 36px;
  padding: 8px 22px 12px;
  color: var(--muted); font-size: 9px;
}
.muted { color: var(--muted-2); }
.legend-line { display: inline-block; width: 15px; height: 1px; margin-right: 6px; vertical-align: middle; }
.legend-line.mint { background: var(--mint); }
.legend-line.coral { background: var(--coral); }
.legend-line.amber { background: var(--amber); }
.legend-box { display: inline-block; width: 9px; height: 9px; margin-right: 6px; vertical-align: -1px; }
.legend-box.premium { background: rgba(255,119,95,0.28); }
.legend-box.discount { background: rgba(84,214,173,0.25); }

.decision-panel { padding-bottom: 16px; }
.decision-title-row { display: flex; align-items: center; gap: 11px; margin-top: 8px; }
.action-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 94px;
  padding: 8px 12px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--amber);
  border: 1px solid rgba(237,200,106,0.35);
  background: rgba(237,200,106,0.08);
}
.action-pill.long { color: var(--mint); border-color: rgba(84,214,173,0.45); background: rgba(84,214,173,0.08); }
.action-pill.short { color: var(--coral); border-color: rgba(255,119,95,0.45); background: rgba(255,119,95,0.08); }
.action-pill.neutral { color: var(--muted); border-color: var(--line); background: rgba(255,255,255,0.02); }
.confidence { color: var(--muted); font-family: var(--font-mono); font-size: 10px; }
.source-chip {
  padding: 4px 7px;
  border: 1px solid var(--line);
  color: var(--muted-2);
  font-family: var(--font-mono); font-size: 8px;
}
.source-chip.live { color: var(--mint); border-color: rgba(84,214,173,0.3); }

.decision-headline {
  margin: 12px 22px 3px;
  font-family: var(--font-display);
  font-size: clamp(23px, 2.4vw, 32px);
  font-weight: 400; line-height: 1.08; letter-spacing: -0.03em;
}
.decision-detail { margin: 0 22px 18px; color: var(--muted); font-size: 11px; line-height: 1.55; max-width: 44ch; }

.range-block { margin: 0 22px; border-top: 1px solid var(--line); padding-top: 13px; }
.range-heading { display: flex; justify-content: space-between; margin-bottom: 8px; font-family: var(--font-mono); font-size: 8px; color: var(--muted-2); }
.range-heading strong { color: var(--paper); font-weight: 400; }
.range-ladder {
  position: relative; height: 117px;
  border: 1px solid var(--line);
  background:
    linear-gradient(to bottom, rgba(255,119,95,0.14), transparent 46%, rgba(84,214,173,0.12));
}
.range-zone {
  position: absolute; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px;
  font-family: var(--font-mono); font-size: 8px;
}
.range-zone.premium { top: 9px; color: var(--coral); }
.range-zone.discount { bottom: 9px; color: var(--mint); }
.range-zone b { font-weight: 400; color: var(--paper); }
.range-mid {
  position: absolute; top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  display: flex; justify-content: space-between; padding: 0 10px;
  border-top: 1px dashed rgba(237,200,106,0.55);
  color: var(--amber); font-family: var(--font-mono); font-size: 8px; line-height: 1;
}
.range-mid span, .range-mid b { transform: translateY(-50%); background: var(--panel); padding: 0 3px; }
.range-mid b { font-weight: 400; }
.range-marker {
  position: absolute; right: 18px; top: 50%;
  display: flex; align-items: center; gap: 5px;
  transform: translateY(-50%);
  transition: top 300ms ease;
  z-index: 2;
}
.range-marker::before { content: ""; position: absolute; right: 100%; width: 42px; height: 1px; background: var(--paper); opacity: 0.55; }
.range-marker span {
  color: var(--ink); background: var(--paper); padding: 2px 4px;
  font-family: var(--font-mono); font-size: 8px; font-weight: 600;
}

.level-strip { display: grid; grid-template-columns: 1.15fr 1fr 1.2fr; gap: 1px; margin: 14px 22px 0; background: var(--line); border: 1px solid var(--line); }
.level-cell { display: grid; gap: 3px; padding: 8px 9px; background: var(--panel-2); }
.level-cell span { color: var(--muted-2); font-family: var(--font-mono); font-size: 8px; }
.level-cell strong { font-family: var(--font-mono); font-size: 11px; font-weight: 500; }
.level-cell.entry strong { color: var(--amber); }
.level-cell.stop strong { color: var(--coral); }
.level-cell.target strong { color: var(--mint); }
.reason-stack { padding: 15px 22px 0; }
.reason-stack p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.chart-status, .live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--mint); font-family: var(--font-mono); font-size: 8px;
}
.chart-latency { color: var(--muted-2); font-family: var(--font-mono); font-size: 8px; margin-left: 10px; }
.chart-tools { display: flex; align-items: center; }
.count-badge {
  display: grid; place-items: center;
  min-width: 25px; height: 20px;
  border: 1px solid var(--line);
  color: var(--muted); font-family: var(--font-mono); font-size: 9px;
}
.live-badge .status-dot { width: 5px; height: 5px; }

.signal-tape { height: 347px; overflow-y: auto; padding: 0 13px 13px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.signal-card {
  position: relative;
  display: grid; gap: 6px;
  margin-bottom: 8px; padding: 11px 12px 10px 14px;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.018);
}
.signal-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--amber); }
.signal-card.long::before { background: var(--mint); }
.signal-card.short::before { background: var(--coral); }
.signal-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.signal-card-title { font-size: 11px; color: var(--paper); }
.signal-card-time { color: var(--muted-2); font-family: var(--font-mono); font-size: 8px; }
.signal-card-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-family: var(--font-mono); font-size: 8px; }
.signal-card-levels { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-family: var(--font-mono); font-size: 8px; }
.signal-card-levels b { color: var(--paper); font-weight: 400; }
.signal-status { padding: 2px 5px; border: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); font-size: 7px; }
.signal-status.ready, .signal-status.filled { color: var(--mint); border-color: rgba(84,214,173,0.35); }
.signal-status.stopped { color: var(--coral); border-color: rgba(255,119,95,0.35); }

.empty-state {
  display: grid; place-items: center;
  min-height: 110px; padding: 20px;
  border: 1px dashed var(--line);
  color: var(--muted-2); font-size: 10px; text-align: center;
}

.position-content { padding: 0 22px 18px; }
.position-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.position-cell { display: grid; gap: 3px; padding: 11px 12px; background: var(--panel); }
.position-cell span { color: var(--muted-2); font-family: var(--font-mono); font-size: 8px; }
.position-cell strong { font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.position-cell strong.positive { color: var(--mint); }
.position-cell strong.negative { color: var(--coral); }
.position-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.position-side { font-family: var(--font-mono); font-size: 18px; color: var(--mint); }
.position-side.short { color: var(--coral); }
.position-side small { font-size: 9px; color: var(--muted); }

.table-scroll { max-height: 234px; overflow: auto; padding: 0 14px 12px; scrollbar-width: thin; }
.ledger-table { width: 100%; border-collapse: collapse; }
.ledger-table th {
  position: sticky; top: 0; z-index: 1;
  padding: 7px 8px; background: var(--panel);
  color: var(--muted-2); font-family: var(--font-mono); font-size: 8px; font-weight: 400; text-align: left;
  border-bottom: 1px solid var(--line);
}
.ledger-table td { padding: 8px; border-bottom: 1px solid var(--line-soft); font-family: var(--font-mono); font-size: 9px; color: var(--muted); }
.ledger-table td:nth-child(3) { color: var(--paper); }
.ledger-table td.positive { color: var(--mint); }
.ledger-table td.negative { color: var(--coral); }

.event-log { height: 225px; overflow-y: auto; padding: 0 20px 14px; scrollbar-width: thin; }
.event-row { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.event-time { color: var(--muted-2); font-family: var(--font-mono); font-size: 8px; }
.event-message { color: var(--muted); font-size: 10px; line-height: 1.45; }
.event-message strong { color: var(--paper); font-weight: 500; }
.event-row.success .event-message { color: rgba(84,214,173,0.82); }
.event-row.warning .event-message { color: var(--amber); }
.event-row.danger .event-message { color: var(--coral); }

.settings-strip {
  display: grid; grid-template-columns: minmax(260px, 1.3fr) minmax(220px, 0.8fr) auto;
  align-items: center; gap: 26px;
  margin-top: 16px; padding: 17px 20px;
  border: 1px solid var(--line);
  background: rgba(17,25,32,0.58);
}
.settings-copy p { margin: 5px 0 0; color: var(--muted); font-size: 10px; max-width: 62ch; }
.range-control { display: grid; gap: 8px; color: var(--muted); font-size: 10px; }
.range-control strong { color: var(--paper); font-family: var(--font-mono); font-weight: 500; }
input[type="range"] { width: 100%; accent-color: var(--mint); }
.settings-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted-2); font-family: var(--font-mono); font-size: 8px; }
.settings-meta strong { display: block; margin-top: 3px; color: var(--paper); font-size: 10px; font-weight: 400; }

.app-footer {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 18px 2px 0;
  color: var(--muted-2); font-family: var(--font-mono); font-size: 8px;
}

.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 30;
  max-width: 360px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  background: #18232c;
  color: var(--paper); font-size: 11px;
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(255,119,95,0.45); color: var(--coral); }

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes priceUp {
  0% { color: var(--mint); text-shadow: 0 0 12px rgba(84,214,173,0.55); }
  100% { color: var(--paper); text-shadow: none; }
}
@keyframes priceDown {
  0% { color: var(--coral); text-shadow: 0 0 12px rgba(255,119,95,0.5); }
  100% { color: var(--paper); text-shadow: none; }
}

@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 178px minmax(0, 1fr); }
  .sidebar { padding-left: 16px; padding-right: 16px; }
  .workspace { padding-left: 20px; padding-right: 20px; }
  .bottom-grid { grid-template-columns: 1fr 1fr; }
  .event-panel { grid-column: 1 / -1; }
  .event-log { height: 180px; }
}

@media (max-width: 1020px) {
  .app-shell { display: block; }
  .sidebar { position: relative; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 18px; padding: 16px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { display: flex; flex-wrap: wrap; margin: 0 0 0 auto; }
  .nav-link { padding: 7px 8px; border-left: 0; border-bottom: 1px solid transparent; }
  .nav-link:hover, .nav-link.is-active { border-left: 0; border-bottom-color: var(--mint); background: transparent; }
  .sidebar-status { display: none; }
  .sidebar-footer { margin: 0; }
  .sidebar-footer p { display: none; }
  .sidebar-footer a { border: 0; gap: 8px; padding: 6px 0; }
  .topbar { grid-template-columns: 1fr auto; }
  .topbar-ticker { display: none; }
  .hero-grid, .mid-grid { grid-template-columns: 1fr; }
  .decision-panel { max-width: none; }
  .settings-strip { grid-template-columns: 1fr 1fr; }
  .settings-meta { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .workspace { padding: 0 12px 18px; }
  .sidebar { padding: 14px; }
  .brand-mark { font-size: 25px; }
  .nav { order: 3; width: 100%; margin: 0; }
  .nav-link { font-size: 11px; }
  .sidebar-footer { margin-left: auto; }
  .topbar { min-height: 62px; gap: 10px; }
  .market-switcher { gap: 4px; }
  .select-wrap { padding: 6px 7px; }
  .select-wrap span { display: none; }
  .topbar-actions .switch-label { display: none; }
  .topbar-actions .btn { padding: 7px 8px; font-size: 9px; }
  .hero-grid, .mid-grid, .bottom-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .event-panel { grid-column: auto; }
  .panel-head { padding: 16px 15px 8px; }
  .display-number { font-size: 38px; }
  .equity-stats { gap: 9px; }
  .equity-stats strong { font-size: 11px; }
  .chart-shell-equity { height: 180px; }
  .decision-headline, .decision-detail, .range-block, .level-strip, .reason-stack { margin-left: 15px; margin-right: 15px; }
  .reason-stack { padding-left: 0; padding-right: 0; }
  .panel-foot { padding-left: 15px; padding-right: 15px; }
  .settings-strip { grid-template-columns: 1fr; gap: 16px; padding: 15px; }
  .settings-meta { grid-column: auto; }
  .app-footer { flex-direction: column; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
