:root {
  --ink: #17211d;
  --muted: #6e7872;
  --soft-muted: #95a09a;
  --canvas: #f3f5f1;
  --paper: #ffffff;
  --line: #e2e7e1;
  --green-950: #102d26;
  --green-900: #173f35;
  --green-800: #205346;
  --green-700: #27725d;
  --green-600: #328a6e;
  --mint: #bcebd2;
  --positive: #238363;
  --negative: #c65b52;
  --sand: #c29250;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 1px 2px rgba(18, 42, 33, .03), 0 10px 32px rgba(18, 42, 33, .035);
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "Consolas", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(50, 138, 110, .3); outline-offset: 3px; }
a { color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.text-positive, .positive { color: var(--positive) !important; }
.negative { color: var(--negative) !important; }
.mono, .pnl { font-family: var(--mono); }

.prototype-brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; font-size: 17px; font-weight: 500; letter-spacing: -.55px; white-space: nowrap; }
.prototype-brand > span:last-child > span { font-weight: 800; }
.brand-emblem { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: var(--green-950); background: var(--mint); font-size: 18px; font-weight: 800; letter-spacing: -1px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }

/* Desktop shell */
.desktop-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; width: 248px; padding: 27px 18px 18px; background: var(--green-950); color: #fff; }
.workspace-switcher { display: flex; align-items: center; gap: 10px; margin: 31px 0 26px; padding: 12px 10px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 13px; background: rgba(255, 255, 255, .035); }
.workspace-icon { display: grid; place-items: center; flex: 0 0 33px; height: 33px; border-radius: 9px; color: var(--mint); background: rgba(188, 235, 210, .1); }
.workspace-icon svg { width: 17px; }
.workspace-switcher > span:nth-child(2) { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.workspace-switcher small { color: #8da79d; font-size: 9px; }
.workspace-switcher strong { font-size: 12px; font-weight: 600; }
.workspace-chevron { width: 13px; color: #7e998f; }
.desktop-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-caption { margin: 0 12px 7px; color: #6f8a80; font-size: 9px; font-weight: 700; letter-spacing: 1.35px; text-transform: uppercase; }
.nav-caption-system { margin-top: 23px; }
.desktop-nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 43px; padding: 0 12px; border: 0; border-radius: 11px; color: #a6bbb2; background: transparent; font-size: 12px; font-weight: 500; text-align: left; cursor: pointer; transition: color .18s, background .18s; }
.desktop-nav-item svg { width: 18px; height: 18px; }
.desktop-nav-item > span:nth-child(2) { flex: 1; }
.desktop-nav-item:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.desktop-nav-item.active { color: #fff; background: rgba(188, 235, 210, .12); box-shadow: inset 0 0 0 1px rgba(188, 235, 210, .04); }
.desktop-nav-item.active svg { color: var(--mint); }
.nav-count { display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: 7px; background: rgba(255, 255, 255, .07); color: #b8cbc3; font-family: var(--mono); font-size: 9px; }
.status-dot-small { width: 6px; height: 6px; border-radius: 50%; background: #70d5a2; }
.sidebar-bottom { margin-top: auto; }
.system-status { display: flex; align-items: flex-start; gap: 10px; margin: 0 8px 20px; }
.live-dot { display: inline-block; flex: 0 0 6px; width: 6px; height: 6px; margin-top: 5px; border-radius: 50%; background: #56b78a; box-shadow: 0 0 0 3px rgba(86, 183, 138, .1); }
.system-status > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.system-status strong { color: #b9ccc4; font-size: 10px; font-weight: 500; }
.system-status small { color: #658076; font-size: 9px; }
.sidebar-profile { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 8px 4px; border: 0; border-top: 1px solid rgba(255, 255, 255, .08); background: transparent; color: #fff; text-align: left; cursor: pointer; }
.profile-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--green-950); background: #d5e9dc; font-size: 10px; font-weight: 800; }
.sidebar-profile > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.sidebar-profile strong { font-size: 11px; font-weight: 600; }
.sidebar-profile small { color: #789187; font-size: 9px; }
.sidebar-profile svg { width: 16px; color: #668177; }
.desktop-workspace { min-height: 100vh; margin-left: 248px; }
.prototype-topbar { display: flex; align-items: center; justify-content: space-between; height: 70px; padding: 0 36px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .76); backdrop-filter: blur(16px); }
.topbar-breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--soft-muted); font-size: 11px; }
.topbar-breadcrumb svg { width: 12px; }
.topbar-breadcrumb strong { color: var(--ink); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.demo-label { margin-right: 8px; padding: 5px 9px; border: 1px solid #dce4dc; border-radius: 7px; color: #75827a; background: #f6f8f5; font-size: 9px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
.round-action { position: relative; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: #647169; cursor: pointer; transition: background .18s, transform .18s; }
.round-action:hover { background: #f0f4ef; transform: translateY(-1px); }
.round-action svg { width: 16px; height: 16px; }
.notification-button > span { position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border: 1.5px solid #fff; border-radius: 50%; background: #d17b59; }
.prototype-main { width: 100%; max-width: 1530px; margin: 0 auto; padding: 34px 36px 20px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 7px; color: #7b8a81; font-size: 9px; font-weight: 700; letter-spacing: 1.4px; }
.page-heading h1 { margin: 0 0 7px; font-size: clamp(25px, 2.2vw, 33px); line-height: 1.2; letter-spacing: -1.15px; }
.page-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.button-primary, .button-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 0 17px; border-radius: 11px; font-size: 11px; font-weight: 700; cursor: pointer; transition: transform .18s, background .18s, box-shadow .18s; }
.button-primary { border: 1px solid var(--green-900); color: #fff; background: var(--green-900); box-shadow: 0 6px 15px rgba(23, 63, 53, .13); }
.button-primary:hover { background: var(--green-800); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(23, 63, 53, .18); }
.button-primary svg { width: 16px; }
.button-secondary { border: 1px solid var(--line); background: #fff; }
.button-secondary:hover { background: #f3f6f2; }

/* Equity hero */
.equity-card { position: relative; display: grid; grid-template-columns: minmax(320px, .85fr) minmax(430px, 1.6fr); min-height: 308px; overflow: hidden; border-radius: var(--radius-lg); color: #fff; background: var(--green-900); box-shadow: 0 18px 40px rgba(23, 63, 53, .12); }
.equity-card::before { content: ""; position: absolute; width: 420px; height: 420px; top: -270px; left: -120px; border-radius: 50%; background: rgba(188, 235, 210, .04); pointer-events: none; }
.equity-summary { position: relative; z-index: 1; display: flex; flex-direction: column; padding: 28px 30px 23px; }
.equity-label-row { display: flex; align-items: center; gap: 9px; color: #b4c9c0; font-size: 11px; font-weight: 500; }
.icon-on-dark { position: relative; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; color: #a6c0b5; background: transparent; cursor: pointer; }
.icon-on-dark:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.icon-on-dark svg { width: 15px; height: 15px; }
.equity-label-row .icon-on-dark { width: 24px; height: 24px; }
.equity-amount { margin-top: 8px; font-family: var(--mono); font-size: clamp(29px, 2.8vw, 41px); font-weight: 600; line-height: 1.25; letter-spacing: -1.9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.equity-change { display: flex; align-items: center; gap: 9px; margin-top: 10px; font-size: 10px; }
.equity-change strong { color: #d7f4e4; font-family: var(--mono); font-size: 10px; font-weight: 500; }
.equity-change > span:last-child { color: #8fafa2; }
.positive-badge { display: inline-flex; align-items: center; gap: 2px; padding: 3px 6px; border-radius: 6px; color: #a9e7c7 !important; background: rgba(151, 226, 188, .1); font-family: var(--mono); font-size: 9px; font-weight: 600; }
.positive-badge svg { width: 11px; height: 11px; stroke-width: 2; }
.equity-periods { display: flex; align-self: flex-start; gap: 3px; margin-top: 25px; padding: 3px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 9px; background: rgba(4, 28, 21, .15); }
.equity-periods button { width: 36px; height: 26px; padding: 0; border: 0; border-radius: 6px; color: #8eaa9e; background: transparent; font-size: 9px; font-weight: 600; cursor: pointer; }
.equity-periods button:hover { color: #fff; }
.equity-periods button.active { color: var(--green-950); background: var(--mint); }
.equity-footnotes { display: flex; gap: 30px; margin-top: auto; padding-top: 20px; }
.equity-footnotes > span { display: flex; flex-direction: column; gap: 5px; color: #87a398; font-size: 9px; }
.equity-footnotes strong { color: #d8e5df; font-family: var(--mono); font-size: 10px; font-weight: 500; }
.equity-footnotes .text-positive { color: #a9e7c7 !important; }
.equity-visual { position: relative; min-width: 0; padding: 26px 27px 20px 10px; }
.chart-meta { display: flex; justify-content: space-between; padding-left: 22px; color: #9cb7ab; font-size: 9px; }
.chart-meta span:last-child { color: #718f83; }
.equity-chart { display: block; width: 100%; height: 218px; margin-top: 5px; overflow: visible; }
.chart-grid path { fill: none; stroke: rgba(208, 235, 221, .08); stroke-width: 1; vector-effect: non-scaling-stroke; }
.equity-path { fill: none; stroke: #b8e9cf; stroke-width: 2.2; vector-effect: non-scaling-stroke; transition: d .35s ease; }
.equity-area { fill: url(#equity-fill); stroke: none; transition: d .35s ease; }
.chart-endpoint circle:first-child { fill: rgba(184, 233, 207, .15); stroke: none; }
.chart-endpoint circle:last-child { fill: #c9f4dc; stroke: var(--green-900); stroke-width: 2; }
.chart-days { display: flex; justify-content: space-between; padding: 0 1px 0 20px; color: #6f9082; font-family: var(--mono); font-size: 8px; }

/* Metrics and panels */
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 18px 0; }
.metric-card { position: relative; display: flex; align-items: center; gap: 14px; min-height: 111px; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow); }
.metric-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 12px; }
.metric-icon svg { width: 19px; }
.metric-icon.mint { color: #307d62; background: #e7f4ec; }
.metric-icon.sand { color: #a57d44; background: #f6efe3; }
.metric-icon.blue { color: #567b8c; background: #eaf1f3; }
.metric-card > div:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.metric-card > div:nth-child(2) > span { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.metric-card strong { font-family: var(--mono); font-size: 18px; line-height: 1.25; letter-spacing: -.45px; white-space: nowrap; }
.metric-card small { margin-top: 5px; color: #8a958e; font-size: 9px; white-space: nowrap; }
.metric-card small b { font-family: var(--mono); font-weight: 500; }
.metric-card .inline-unit { margin: 0; color: #8b9690; font-family: var(--font); font-size: 10px; font-weight: 500; }
.metric-card small .live-dot { width: 5px; height: 5px; margin: 0 3px 0 0; }
.metric-trend { position: absolute; right: 17px; top: 17px; color: #81a999; font-size: 15px; }
.metric-link { display: grid; place-items: center; width: 29px; height: 29px; margin-left: auto; padding: 0; border: 0; border-radius: 50%; color: #7c8981; background: #f4f6f3; cursor: pointer; }
.metric-link:hover { color: var(--green-800); background: #e9f1eb; }
.metric-link svg { width: 13px; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(270px, .8fr); gap: 18px; align-items: start; }
.dashboard-primary, .dashboard-secondary { display: flex; min-width: 0; flex-direction: column; gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 21px 14px; }
.panel-heading h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: -.25px; }
.panel-heading p { margin: 5px 0 0; color: #89948d; font-size: 9px; }
.panel-heading.compact { padding-bottom: 12px; }
.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 0; border: 0; color: var(--green-700); background: transparent; font-size: 9px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.text-button:hover { color: var(--green-950); }
.text-button svg { width: 12px; height: 12px; }
.position-filters { display: flex; gap: 5px; padding: 0 21px 13px; }
.position-filters button { min-height: 27px; padding: 0 10px; border: 1px solid transparent; border-radius: 7px; color: #7d8982; background: transparent; font-size: 9px; font-weight: 600; cursor: pointer; }
.position-filters button span { margin-left: 4px; color: #9da69f; font-family: var(--mono); font-size: 8px; }
.position-filters button.active { border-color: #dce6df; color: var(--green-800); background: #edf4ef; }
.positions-table-wrap { overflow-x: auto; }
.prototype-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.prototype-table th { height: 33px; padding: 0 11px; border-top: 1px solid #edf0ec; border-bottom: 1px solid #edf0ec; color: #939d96; background: #fafbf9; font-size: 8px; font-weight: 600; text-align: left; text-transform: uppercase; letter-spacing: .35px; }
.prototype-table th:first-child, .prototype-table td:first-child { padding-left: 21px; }
.prototype-table th:last-child, .prototype-table td:last-child { padding-right: 13px; }
.prototype-table td { height: 65px; padding: 8px 11px; border-bottom: 1px solid #edf0ec; color: #58645d; font-size: 9px; }
.prototype-table tbody tr:last-child td { border-bottom: 0; }
.prototype-table tbody tr { transition: background .15s; }
.prototype-table tbody tr:hover { background: #fbfcfa; }
.align-right { text-align: right !important; }
.instrument { display: flex; align-items: center; gap: 10px; }
.asset-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 11px; font-size: 9px; font-weight: 800; letter-spacing: -.3px; }
.asset-icon.gold, .stream-symbol.gold { color: #977332; background: #f7edda; }
.asset-icon.euro, .stream-symbol.euro { color: #4a7293; background: #e8f0f6; }
.asset-icon.pound, .stream-symbol.pound { color: #7e6592; background: #f0eaf4; }
.asset-icon.bitcoin, .stream-symbol.bitcoin { color: #b67539; background: #f9ede2; }
.instrument > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.instrument strong { color: var(--ink); font-size: 10px; font-weight: 700; }
.instrument small { max-width: 185px; overflow: hidden; color: #919b94; font-size: 8px; text-overflow: ellipsis; }
.direction { display: inline-flex; align-items: center; justify-content: center; min-width: 35px; height: 19px; padding: 0 5px; border-radius: 5px; font-family: var(--mono); font-size: 7px; font-weight: 600; }
.direction.buy { color: #2b8265; background: #e8f4ed; }
.direction.sell { color: #b65f57; background: #f9ecea; }
.prototype-table .pnl { display: block; font-size: 10px; font-weight: 600; }
.table-sub { display: block; margin-top: 4px; font-family: var(--mono); font-size: 8px; }
.row-action { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; color: #9aa39d; background: transparent; cursor: pointer; }
.row-action:hover { color: var(--green-800); background: #eef3ef; }
.row-action svg { width: 13px; height: 13px; }
.stream-list { padding: 0 20px 9px; }
.stream-row { display: flex; align-items: center; gap: 11px; min-height: 60px; border-top: 1px solid #edf0ec; }
.stream-symbol { display: grid; place-items: center; flex: 0 0 31px; width: 31px; height: 31px; border-radius: 10px; font-size: 8px; font-weight: 800; }
.stream-info { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; }
.stream-info strong { font-size: 10px; font-weight: 700; }
.stream-info span { color: #8e9992; font-size: 8px; }
.stream-return { min-width: 46px; font-family: var(--mono); font-size: 9px; font-weight: 600; text-align: right; }
.switch { position: relative; flex: 0 0 33px; width: 33px; height: 19px; margin-left: 8px; padding: 0; border: 0; border-radius: 12px; background: #d6ded8; cursor: pointer; transition: background .2s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--green-600); }
.switch[aria-checked="true"] span { transform: translateX(14px); }

/* Secondary analytics */
.performance-panel { padding-bottom: 16px; }
.performance-value { display: flex; align-items: center; gap: 10px; padding: 2px 21px 13px; }
.performance-value > strong { font-family: var(--mono); font-size: 24px; letter-spacing: -1px; }
.performance-value .positive-badge { color: var(--positive) !important; background: #edf6f0; }
.performance-bars { display: flex; align-items: flex-end; gap: 5px; height: 103px; margin: 0 21px; padding-top: 10px; border-bottom: 1px solid #e8ede8; background: repeating-linear-gradient(to bottom, transparent 0, transparent 30px, #f0f2ef 31px); }
.performance-bars span { flex: 1; height: var(--h); min-width: 3px; border-radius: 3px 3px 0 0; background: #70b799; transition: height .3s, background .2s; }
.performance-bars span:hover { background: var(--green-800); }
.performance-bars span.down { background: #e0a39a; }
.performance-axis { display: flex; justify-content: space-between; margin: 6px 21px 15px; color: #9aa39d; font-size: 8px; }
.performance-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 21px; padding-top: 14px; border-top: 1px solid #edf0ec; }
.performance-stats > span { display: flex; flex-direction: column; gap: 5px; color: #8b9690; font-size: 8px; }
.performance-stats strong { color: var(--ink); font-family: var(--mono); font-size: 10px; font-weight: 600; }
.risk-panel { display: flex; gap: 12px; padding: 18px 20px; background: #edf4ee; border-color: #dbe8dd; }
.risk-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; color: var(--green-700); background: rgba(255, 255, 255, .7); }
.risk-icon svg { width: 17px; }
.risk-panel > div:last-child { flex: 1; min-width: 0; }
.risk-panel h3 { margin: 1px 0 5px; font-size: 10px; }
.risk-panel p { margin: 0; color: #718078; font-size: 8px; line-height: 1.5; }
.risk-scale { height: 4px; margin-top: 13px; overflow: hidden; border-radius: 4px; background: #d5e2d8; }
.risk-scale span { display: block; width: 14.3%; height: 100%; border-radius: inherit; background: var(--green-600); }
.risk-labels { display: flex; justify-content: space-between; margin-top: 6px; color: #7d8c83; font-size: 7px; }
.activity-panel { padding-bottom: 9px; }
.activity-list { padding: 0 20px; }
.activity-item { position: relative; display: flex; gap: 10px; padding: 10px 0; }
.activity-item:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 40px; bottom: -6px; width: 1px; background: #e5eae5; }
.activity-marker { position: relative; z-index: 1; display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px; border-radius: 50%; }
.activity-marker svg { width: 12px; height: 12px; }
.activity-marker.success { color: var(--positive); background: #e8f4ed; }
.activity-marker.neutral { color: #748a80; background: #edf1ee; }
.activity-marker.warning { color: #a9773f; background: #f8efe2; }
.activity-marker.error { color: var(--negative); background: #f9ecea; }
.activity-item > div { min-width: 0; }
.activity-item strong { display: block; font-size: 9px; font-weight: 700; }
.activity-item p { margin: 4px 0; color: #7f8b84; font-size: 8px; }
.activity-item small { color: #a0a8a2; font-size: 7px; }
.prototype-footer { display: flex; align-items: center; justify-content: space-between; padding: 25px 2px 3px; color: #929d96; font-size: 8px; }
.prototype-footer a { display: inline-flex; align-items: center; gap: 6px; color: #718078; text-decoration: none; }
.prototype-footer a:hover { color: var(--green-700); }
.prototype-footer svg { width: 11px; }

/* Overlays and dialogs */
.notification-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(12, 32, 25, .24); backdrop-filter: blur(2px); }
.notification-drawer { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: min(390px, 100%); padding: 27px 23px; overflow-y: auto; background: #fff; box-shadow: -20px 0 50px rgba(16, 45, 38, .12); transform: translateX(105%); transition: transform .25s ease; }
.notification-drawer.open { transform: translateX(0); }
.drawer-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 25px; }
.drawer-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.6px; }
.drawer-heading h2 span { display: inline-grid; place-items: center; width: 21px; height: 21px; border-radius: 7px; color: var(--green-700); background: #eaf3ed; font-size: 10px; vertical-align: middle; }
.notification-card { display: flex; gap: 12px; margin-bottom: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; }
.notification-card.unread { border-color: #d7e7dc; background: #f4f9f5; }
.notification-card strong { font-size: 11px; }
.notification-card p { margin: 6px 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.notification-card small { color: #95a098; font-size: 8px; }
.stream-dialog { width: min(480px, calc(100% - 30px)); padding: 0; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: #fff; box-shadow: 0 25px 80px rgba(16, 45, 38, .25); }
.stream-dialog::backdrop { background: rgba(12, 32, 25, .45); backdrop-filter: blur(3px); }
.stream-dialog form { padding: 25px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 23px; }
.dialog-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.6px; }
.stream-dialog label { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; color: #6f7c74; font-size: 10px; font-weight: 600; }
.stream-dialog input, .stream-dialog select { width: 100%; height: 43px; padding: 0 12px; border: 1px solid #dce3dd; border-radius: 10px; color: var(--ink); background: #fafbf9; font-size: 11px; }
.dialog-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-note { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border-radius: 10px; color: #748078; background: #f0f5f1; font-size: 9px; line-height: 1.5; }
.dialog-note svg { flex: 0 0 15px; width: 15px; color: var(--green-700); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.prototype-toast { position: fixed; z-index: 120; left: 50%; bottom: 25px; max-width: calc(100% - 30px); padding: 12px 17px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; color: #fff; background: var(--green-950); box-shadow: 0 10px 30px rgba(16, 45, 38, .2); font-size: 10px; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: opacity .2s, transform .2s; }
.prototype-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Mobile shell */
.mobile-prototype { min-height: 100vh; background: #f2f5f0; }
.mobile-shell { width: 100%; max-width: 540px; min-height: 100vh; margin: 0 auto; background: #f2f5f0; }
.mobile-hero { position: relative; min-height: 286px; overflow: hidden; padding: calc(15px + env(safe-area-inset-top)) 20px 0; color: #fff; background: var(--green-900); border-radius: 0 0 29px 29px; }
.mobile-hero::after { content: ""; position: absolute; width: 300px; height: 300px; top: -190px; right: -100px; border-radius: 50%; background: rgba(188, 235, 210, .06); pointer-events: none; }
.mobile-topbar { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }
.mobile-brand { font-size: 15px; }
.mobile-brand .brand-emblem { width: 30px; height: 30px; border-radius: 10px; font-size: 16px; }
.mobile-header-actions { display: flex; align-items: center; gap: 8px; }
.mobile-header-actions .icon-on-dark { width: 36px; height: 36px; border: 1px solid rgba(255, 255, 255, .09); background: rgba(255, 255, 255, .04); }
.mobile-header-actions .notification-button > span { top: 6px; right: 6px; border-color: var(--green-900); }
.mobile-avatar { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid rgba(255, 255, 255, .12); border-radius: 50%; color: var(--green-950); background: #d5e9dc; font-size: 10px; font-weight: 800; }
.mobile-balance { position: relative; z-index: 1; padding-top: 30px; }
.mobile-balance .equity-label-row { font-size: 11px; }
.mobile-balance-amount { margin-top: 6px; font-family: var(--mono); font-size: clamp(30px, 9vw, 39px); font-weight: 600; letter-spacing: -1.7px; line-height: 1.25; }
.mobile-balance-change { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 9px; }
.mobile-balance-change strong { color: #c3e9d4; font-family: var(--mono); font-size: 9px; }
.mobile-balance-change > span:last-child { color: #90aea1; }
.mobile-sparkline { position: absolute; right: -20px; bottom: -4px; left: -20px; width: calc(100% + 40px); height: 84px; stroke: #a9dfbf; stroke-width: 1.5; opacity: .8; }
.mobile-spark-area { fill: url(#mobile-fill); stroke: none; }
.mobile-content { padding: 0 16px calc(100px + env(safe-area-inset-bottom)); }
.mobile-page { padding-top: 23px; animation: mobile-page-in .22s ease; }
@keyframes mobile-page-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.mobile-greeting { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin: 0 3px 18px; }
.mobile-greeting h1 { margin: 0; font-size: 17px; letter-spacing: -.5px; }
.mobile-greeting .eyebrow { margin-bottom: 5px; font-size: 8px; }
.mobile-live { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; color: #718078; font-size: 8px; white-space: nowrap; }
.mobile-live .live-dot { width: 5px; height: 5px; margin: 0; flex-basis: 5px; }
.mobile-metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mobile-metric { position: relative; display: flex; min-width: 0; min-height: 117px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; flex-direction: column; align-items: flex-start; color: var(--ink); background: #fff; box-shadow: var(--shadow); text-align: left; }
.mobile-metric > span { margin-bottom: 7px; color: var(--muted); font-size: 9px; }
.mobile-metric > strong { max-width: 100%; font-family: var(--mono); font-size: 15px; letter-spacing: -.4px; white-space: nowrap; }
.mobile-metric > strong small { color: #8e9992; font-family: var(--font); font-size: 10px; font-weight: 500; }
.mobile-metric > small { display: flex; align-items: center; gap: 4px; margin-top: 7px; color: #8c9890; font-size: 8px; }
.mobile-metric > svg { position: absolute; right: 12px; bottom: 13px; width: 12px; color: #a0aaa3; }
.mobile-metric .live-dot { margin: 0; }
.mobile-section { margin-top: 23px; }
.mobile-section-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 3px 11px; }
.mobile-section-heading h2 { margin: 0; font-size: 13px; letter-spacing: -.2px; }
.mobile-section-heading h2 span { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; border-radius: 6px; color: #7a8b80; background: #e4eae4; font-family: var(--mono); font-size: 8px; vertical-align: middle; }
.mobile-section-heading button { display: inline-flex; align-items: center; gap: 3px; padding: 5px; border: 0; color: var(--green-700); background: transparent; font-size: 9px; font-weight: 700; }
.mobile-section-heading svg { width: 11px; height: 11px; }
.mobile-position-list { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.mobile-position { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 72px; padding: 12px 13px; border: 0; border-bottom: 1px solid #edf0ec; background: #fff; text-align: left; }
.mobile-position:last-child { border-bottom: 0; }
.mobile-position:active { background: #f7f9f6; }
.mobile-position .asset-icon { flex-basis: 37px; width: 37px; height: 37px; border-radius: 12px; }
.mobile-position-info { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 6px; }
.mobile-position-info > strong { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.mobile-position-info small { overflow: hidden; color: #8d9891; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-position-pnl { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.mobile-position-pnl strong { font-family: var(--mono); font-size: 10px; }
.mobile-position-pnl small { font-family: var(--mono); font-size: 8px; }
.mobile-risk-card { display: flex; gap: 12px; padding: 16px; border: 1px solid #dbe7dd; border-radius: 15px; background: #eaf2eb; }
.mobile-risk-card > div { flex: 1; }
.mobile-risk-card h3 { margin: 1px 0 5px; font-size: 11px; }
.mobile-risk-card p { margin: 0; color: #748178; font-size: 8px; line-height: 1.5; }
.desktop-version-link { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 25px 0 4px; color: #869189; font-size: 8px; text-decoration: none; }
.desktop-version-link svg { width: 11px; }
.mobile-bottom-nav { position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; max-width: 540px; height: calc(69px + env(safe-area-inset-bottom)); margin: 0 auto; padding: 7px 9px env(safe-area-inset-bottom); border-top: 1px solid rgba(216, 225, 216, .85); background: rgba(255, 255, 255, .92); backdrop-filter: blur(18px); box-shadow: 0 -8px 25px rgba(20, 48, 38, .04); }
.mobile-bottom-nav button { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 4px; border: 0; border-radius: 11px; flex-direction: column; color: #8b9690; background: transparent; font-size: 8px; font-weight: 600; }
.mobile-bottom-nav button svg { width: 20px; height: 20px; stroke-width: 1.7; }
.mobile-bottom-nav button.active { color: var(--green-800); }
.mobile-bottom-nav button.active::before { content: ""; position: absolute; top: -7px; width: 24px; height: 2px; border-radius: 0 0 3px 3px; background: var(--green-700); }
.mobile-page-heading { margin: 0 3px 20px; }
.mobile-page-heading h1 { margin: 0 0 7px; font-size: 25px; letter-spacing: -.8px; }
.mobile-page-heading > p:last-child, .mobile-page-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 10px; }
.mobile-page-heading.with-action { display: flex; align-items: center; justify-content: space-between; }
.small-add-button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; color: #fff; background: var(--green-900); }
.small-add-button svg { width: 18px; }
.mobile-filters { margin-bottom: 13px; padding: 0; }
.mobile-filters button { min-height: 34px; padding: 0 13px; }
.mobile-position-list-full .mobile-position { min-height: 80px; }
.mobile-demo-note { margin: 20px 4px; color: #929d96; font-size: 9px; line-height: 1.7; text-align: center; }
.mobile-stream-list { display: flex; flex-direction: column; gap: 11px; }
.mobile-stream-card { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.mobile-stream-top { display: flex; align-items: center; gap: 11px; }
.mobile-stream-top .stream-symbol { width: 38px; height: 38px; flex-basis: 38px; }
.mobile-stream-top > div { flex: 1; }
.mobile-stream-top h2 { margin: 0 0 5px; font-size: 12px; }
.mobile-stream-top p { margin: 0; color: var(--muted); font-size: 9px; }
.mobile-stream-top .switch { width: 37px; height: 21px; flex-basis: 37px; }
.mobile-stream-top .switch span { width: 15px; height: 15px; }
.mobile-stream-top .switch[aria-checked="true"] span { transform: translateX(16px); }
.mobile-stream-bottom { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid #edf0ec; color: #859088; font-size: 9px; }
.mobile-stream-bottom strong { font-family: var(--mono); font-size: 10px; }
.mobile-history-summary { display: flex; flex-direction: column; margin-bottom: 18px; padding: 20px; border-radius: 16px; color: #fff; background: var(--green-900); }
.mobile-history-summary > span { color: #a9c1b6; font-size: 10px; }
.mobile-history-summary > strong { margin: 8px 0; color: #b9e8cd !important; font-family: var(--mono); font-size: 24px; }
.mobile-history-summary small { color: #8faea0; font-size: 8px; }
.mobile-history-list { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.mobile-history-list article { display: flex; align-items: center; gap: 10px; min-height: 73px; padding: 12px; border-bottom: 1px solid #edf0ec; }
.mobile-history-list article:last-child { border: 0; }
.mobile-history-list article > div { flex: 1; }
.mobile-history-list article > div > strong { font-size: 10px; }
.mobile-history-list p { margin: 5px 0 0; color: #8d9891; font-size: 8px; }
.mobile-history-list article > strong { font-family: var(--mono); font-size: 10px; }
.mobile-profile-card { display: flex; align-items: center; padding: 22px 16px; border: 1px solid var(--line); border-radius: 17px; flex-direction: column; background: #fff; }
.mobile-profile-avatar { display: grid; place-items: center; width: 65px; height: 65px; margin-bottom: 12px; border-radius: 50%; color: var(--green-800); background: #e0eee4; font-size: 19px; font-weight: 800; }
.mobile-profile-card h1 { margin: 0 0 5px; font-size: 19px; }
.mobile-profile-card p { margin: 0; color: var(--muted); font-size: 9px; }
.mobile-settings-list { margin-top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.mobile-settings-list button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 54px; padding: 0 15px; border: 0; border-bottom: 1px solid #edf0ec; background: #fff; font-size: 10px; }
.mobile-settings-list button:last-child { border: 0; }
.mobile-settings-list button > span { display: flex; align-items: center; gap: 10px; }
.mobile-settings-list svg { width: 16px; color: #718078; }
.mobile-settings-list button > svg { width: 12px; color: #9aa49d; }
.mobile-prototype .notification-drawer { width: 100%; max-width: 540px; padding-top: calc(24px + env(safe-area-inset-top)); }
.mobile-prototype .prototype-toast { bottom: calc(85px + env(safe-area-inset-bottom)); }

@media (min-width: 541px) {
  .mobile-prototype { padding: 24px 0; }
  .mobile-shell { overflow: hidden; border: 1px solid #dce4dc; border-radius: 28px; box-shadow: 0 20px 60px rgba(16, 45, 38, .12); }
  .mobile-hero { border-radius: 0 0 29px 29px; }
  .mobile-bottom-nav { bottom: 24px; border-radius: 0 0 28px 28px; }
}

@media (max-width: 1180px) {
  .desktop-sidebar { width: 218px; }
  .desktop-workspace { margin-left: 218px; }
  .prototype-main { padding-right: 24px; padding-left: 24px; }
  .prototype-topbar { padding: 0 24px; }
  .equity-card { grid-template-columns: minmax(290px, .9fr) minmax(360px, 1.3fr); }
  .equity-summary { padding-right: 20px; padding-left: 24px; }
  .dashboard-columns { grid-template-columns: minmax(0, 1.65fr) minmax(245px, .75fr); }
  .metric-card { padding: 15px; gap: 10px; }
  .metric-icon { flex-basis: 36px; height: 36px; }
  .metric-card strong { font-size: 15px; }
  .prototype-table th:nth-child(4), .prototype-table td:nth-child(4) { display: none; }
}

@media (max-width: 920px) {
  .desktop-sidebar { width: 76px; padding: 25px 12px 16px; align-items: center; }
  .desktop-sidebar .prototype-brand > span:last-child, .workspace-switcher > span:nth-child(2), .workspace-chevron, .nav-caption, .desktop-nav-item > span, .system-status > span:last-child, .sidebar-profile > span:nth-child(2), .sidebar-profile > svg { display: none; }
  .workspace-switcher { justify-content: center; width: 45px; padding: 5px; border: 0; background: transparent; }
  .desktop-nav { width: 100%; }
  .nav-caption-system { display: block; height: 1px; margin: 17px 8px 12px; background: rgba(255, 255, 255, .08); font-size: 0; }
  .desktop-nav-item { justify-content: center; padding: 0; }
  .system-status { margin: 0 0 18px; }
  .sidebar-profile { justify-content: center; padding: 14px 0 0; }
  .desktop-workspace { margin-left: 76px; }
  .equity-card { grid-template-columns: 1fr; }
  .equity-summary { min-height: 265px; }
  .equity-visual { padding: 10px 24px 20px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 95px; }
  .dashboard-columns { grid-template-columns: 1fr; }
  .dashboard-secondary { display: grid; grid-template-columns: 1fr 1fr; }
  .activity-panel { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .desktop-sidebar { display: none; }
  .desktop-workspace { margin-left: 0; }
  .prototype-topbar { height: 60px; padding: 0 16px; }
  .topbar-breadcrumb > span, .topbar-breadcrumb svg, .demo-label, [data-search] { display: none; }
  .prototype-main { padding: 24px 14px 18px; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 25px; }
  .page-heading > div > p:last-child { max-width: 220px; line-height: 1.5; }
  .page-heading .button-primary { width: 42px; min-width: 42px; padding: 0; font-size: 0; }
  .equity-card { border-radius: 18px; }
  .equity-summary { min-height: 265px; padding: 24px 20px; }
  .equity-amount { font-size: 31px; }
  .equity-footnotes { gap: 20px; }
  .equity-visual { padding: 10px 15px 20px; }
  .chart-days span:nth-child(even) { display: none; }
  .metric-grid { gap: 10px; }
  .dashboard-secondary { display: flex; }
  .panel-heading { padding-right: 15px; padding-left: 15px; }
  .position-filters { padding-left: 15px; }
  .prototype-table th:first-child, .prototype-table td:first-child { padding-left: 15px; }
  .prototype-table th:nth-child(3), .prototype-table td:nth-child(3) { display: none; }
  .prototype-footer { align-items: flex-start; gap: 12px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
