@font-face {
  font-family:'Instrument Sans';
  src:url('assets/instrument-sans.woff2') format('woff2');
  font-display:swap;
  font-weight:400 700
}

:root {
  color-scheme:dark;
  --bg:#000;
  --panel:#0c0c0c;
  --line:#242424;
  --muted:#929292;
  --text:#f4f4f4;
  --green:#52d69b;
  --red:#fa707c;
  font-family:'Instrument Sans','DM Sans',Arial,sans-serif;
  font-size:14px
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  background:#000;
  color:var(--text)
}
[hidden] {
  display:none!important
}
button,input,select,textarea {
  font:inherit
}
button,a,input,select,textarea {
   -webkit-tap-highlight-color:transparent
}
button,a {
  touch-action:manipulation
}
button {
  cursor:pointer
}
a {
  color:inherit;
  text-decoration:none
}
button:disabled {
  opacity:.45;
  cursor:wait
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible {
  outline:2px solid #fff;
  outline-offset:4px
}
button {
  border:0
}
h1,h2,h3,p {
  margin:0
}
h1 {
  font-size:clamp(30px,3vw,43px);
  letter-spacing:-1.7px;
  font-weight:500;
  line-height:1.16
}
h2 {
  font-size:21px;
  font-weight:500;
  letter-spacing:-.6px
}
h3 {
  font-size:17px;
  font-weight:500
}
.muted {
  color:var(--muted);
  line-height:1.65
}
.eyebrow {
  font-size:10px;
  font-weight:600;
  letter-spacing:1.8px;
  color:var(--muted);
  margin-bottom:12px
}
.fine {
  color:#999;
  font-size:12px;
  line-height:1.65
}
.positive {
  color:var(--green)!important
}
.negative {
  color:var(--red)!important
}
.primary,.secondary {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  padding:13px 18px;
  border-radius:7px;
  font-size:12px;
  font-weight:600;
  min-height:44px
}
.primary {
  background:#eee;
  color:#000
}
.primary:hover {
  background:#fff
}
.secondary {
  background:#141414;
  color:#eee;
  border:1px solid #333
}
.secondary:hover {
  border-color:#777
}
.text-button {
  background:transparent;
  color:#b6b6b6;
  padding:9px 0;
  font-size:12px;
  text-align:left
}
.text-button:hover {
  color:#fff
}
.button-row {
  display:flex;
  gap:16px;
  align-items:center;
  flex-wrap:wrap
}
.topbar {
  height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  padding:0 36px;
  background:#000;
  position:sticky;
  top:0;
  z-index:15
}
.wordmark {
  display:flex;
  align-items:center;
  gap:15px;
  font-size:12px;
  font-weight:600;
  letter-spacing:3px
}
.brand-mark {
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border:1px solid #eee;
  border-radius:50%;
  font-size:16px;
  letter-spacing:-2px;
  font-weight:600;
  color:#fff
}
.large {
  width:70px;
  height:70px;
  font-size:32px;
  letter-spacing:-4px;
  margin-bottom:32px
}
.large span {
  font-size:8px;
  position:absolute;
  top:6px;
  right:0;
  letter-spacing:0
}
.top-actions {
  display:flex;
  align-items:center;
  gap:23px
}
.local-badge {
  font-size:9px;
  letter-spacing:1.6px;
  color:#999;
  display:flex;
  align-items:center;
  gap:8px
}
.local-badge i {
  width:5px;
  height:5px;
  background:#ddd;
  border-radius:50%
}
.avatar {
  width:34px;
  height:34px;
  border-radius:50%;
  background:#202020;
  color:#ddd;
  font-size:10px
}
.frame {
  display:grid;
  grid-template-columns:204px minmax(0,1fr);
  max-width:1800px;
  margin:auto
}
.sidebar {
  height:calc(100dvh - 78px);
  position:sticky;
  top:78px;
  padding:35px 20px 25px 28px;
  border-right:1px solid var(--line);
  display:flex;
  flex-direction:column
}
.sidebar nav {
  display:flex;
  flex-direction:column;
  gap:8px
}
.nav-item {
  display:flex;
  align-items:center;
  gap:12px;
  background:transparent;
  color:#888;
  padding:12px 10px;
  border-radius:7px;
  text-align:left;
  font-size:12px
}
.nav-item.active {
  color:#fff;
  background:#171717
}
.nav-icon {
  width:25px;
  height:25px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #444;
  border-radius:50%;
  font-size:9px;
  font-weight:600;
  letter-spacing:-.3px
}
.nav-icon svg {
  width:13px;
  height:13px;
  stroke:currentColor;
  fill:none;
  stroke-width:1.4
}
.sidebar-bottom {
  margin-top:auto;
  display:flex;
  flex-direction:column
}
.sidebar-bottom p {
  line-height:1.6;
  color:#999;
  font-size:12px;
  margin-bottom:17px
}
.sidebar-bottom small {
  font-size:9px;
  color:#666;
  margin-top:12px
}
main {
  min-width:0;
  padding:36px 40px 72px
}
.page-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin:0 0 30px
}
.page-heading .muted {
  margin-top:10px;
  font-size:13px
}
.panel {
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  padding:25px
}
.dashboard-grid {
  display:grid;
  grid-template-columns:1.13fr 1fr;
  gap:18px
}
.card-top {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px
}
.pill {
  font-size:10px;
  color:#aaa;
  padding:6px 9px;
  border:1px solid #303030;
  border-radius:5px;
  white-space:nowrap
}
.pnl-card {
  min-height:230px;
  display:flex;
  flex-direction:column
}
.hero-value {
  font-size:clamp(45px,5.3vw,78px);
  letter-spacing:-4px;
  font-weight:500;
  line-height:1;
  margin:22px 0 28px;
  font-variant-numeric:tabular-nums
}
.pnl-footer {
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:11px;
  color:#888;
  margin-top:auto
}
.plan-card {
  display:flex;
  flex-direction:column;
  justify-content:center
}
.plan-card h2 {
  font-size:25px;
  line-height:1.3;
  margin-bottom:12px
}
.plan-card p.muted {
  font-size:12px;
  margin-bottom:18px
}
.metrics {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin:18px 0;
  gap:12px
}
.metric {
  border:1px solid var(--line);
  border-radius:9px;
  padding:18px;
  background:#080808
}
.metric span {
  font-size:10px;
  display:block;
  color:#999;
  margin-bottom:12px
}
.metric b {
  font-size:23px;
  font-weight:500;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.8px
}
.chart-grid {
  grid-template-columns:1.65fr 1fr
}
.chart-wrap {
  height:220px;
  position:relative;
  margin-top:20px
}
.chart-wrap canvas {
  width:100%;
  height:100%
}
.chart-empty {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  text-align:center;
  font-size:12px;
  color:#777;
  padding:30px;
  pointer-events:none
}
.daily-bars {
  display:flex;
  height:190px;
  gap:5px;
  align-items:center;
  margin-top:18px
}
.day-bar-wrap {
  height:100%;
  flex:1;
  position:relative;
  border-bottom:1px solid #222
}
.day-bar-wrap:after {
  content:'';
  height:1px;
  background:#333;
  position:absolute;
  top:50%;
  width:100%;
  left:0
}
.day-bar {
  position:absolute;
  left:8%;
  width:84%;
  min-height:2px;
  border-radius:2px;
  background:#333
}
.legend {
  display:flex;
  gap:14px;
  font-size:10px;
  color:#999;
  justify-content:center
}
.legend span {
  display:flex;
  align-items:center;
  gap:5px
}
.green-dot,.red-dot {
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--green)
}
.red-dot {
  background:var(--red)
}
.section-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:32px 0 16px
}
.section-heading .eyebrow {
  margin-bottom:7px
}
.empty-state {
  padding:32px;
  text-align:center;
  border:1px dashed #333;
  border-radius:10px;
  color:#888;
  line-height:1.8
}
.trade-row {
  display:grid;
  grid-template-columns:100px minmax(0,1fr) 110px 72px;
  gap:18px;
  padding:20px 6px;
  border-bottom:1px solid var(--line);
  align-items:center
}
.trade-instrument {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:13px
}
.ticker-icon {
  width:35px;
  height:35px;
  background:#171717;
  border:1px solid #333;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:10px;
  letter-spacing:-.3px
}
.trade-reason {
  font-size:12px;
  line-height:1.7;
  color:#aaa;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.trade-reason strong {
  color:#ddd;
  font-weight:500;
  display:block
}
.trade-row small {
  font-size:10px;
  color:#777;
  display:block;
  margin-top:4px
}
.trade-pnl {
  text-align:right;
  font-size:17px;
  white-space:nowrap;
  font-variant-numeric:tabular-nums
}
.trade-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px
}
.icon-button {
  background:transparent;
  color:#aaa;
  font-size:25px;
  padding:3px 8px;
  line-height:1;
  min-width:30px;
  min-height:32px
}
.small-button {
  font-size:11px;
  background:transparent;
  color:#aaa;
  padding:8px
}
.quote-strip {
  display:flex;
  gap:15px;
  align-items:center;
  border-top:1px solid var(--line);
  margin-top:32px;
  padding:24px 0
}
.quote-mark {
  font-family:Georgia,serif;
  font-size:50px;
  color:#777;
  line-height:1
}
.quote-strip p {
  font-size:13px;
  line-height:1.6
}
.quote-strip .muted {
  font-size:10px
}
.quote-strip .text-button {
  margin-left:auto;
  white-space:nowrap
}
#bottom-nav {
  display:none
}
label {
  display:flex;
  flex-direction:column;
  gap:8px;
  color:#aaa;
  font-size:11px;
  line-height:1.5
}
input,select,textarea {
  width:100%;
  background:#111;
  color:#eee;
  border:1px solid #333;
  padding:11px 12px;
  border-radius:6px;
  min-height:42px;
  max-width:100%
}
textarea {
  resize:vertical
}
select {
  color-scheme:dark
}
input[type=checkbox] {
  width:16px;
  min-height:16px;
  accent-color:#fff
}
.form-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:17px;
  margin:20px 0
}
.lab-form>label {
  margin:20px 0
}
.instrument-token {
  font-size:22px;
  letter-spacing:-2px;
  border:1px solid #999;
  border-radius:50%;
  width:60px;
  height:60px;
  display:grid;
  place-items:center;
  box-shadow:5px 7px 0 #222;
  transform:rotate(-8deg)
}
.tabs {
  display:flex;
  gap:28px;
  border-bottom:1px solid var(--line);
  margin-bottom:24px
}
.tabs button {
  font-size:12px;
  padding:14px 0;
  background:transparent;
  color:#777;
  border-bottom:2px solid transparent
}
.tabs button.active {
  color:#eee;
  border-color:#eee
}
.rule-preview {
  font-size:12px;
  color:#aaa;
  line-height:1.8;
  background:#151515;
  border-left:2px solid #888;
  padding:15px;
  margin:20px 0
}
.lab-form .fine {
  margin:18px 0
}
.toolbar {
  display:flex;
  align-items:flex-end;
  gap:14px;
  margin-bottom:20px
}
.toolbar>label {
  flex:1
}
details {
  border:1px solid #333;
  border-radius:7px;
  padding:16px;
  margin:20px 0
}
summary {
  cursor:pointer;
  font-size:12px;
  color:#ddd
}
.live-widget {
  height:560px;
  margin:20px 0
}
.live-widget iframe {
  width:100%;
  height:100%;
  border:0
}
.news-widget {
  height:500px;
  margin-top:20px
}
.widget-consent {
  padding:40px 20px;
  max-width:700px;
  line-height:1.8;
  color:#aaa;
  margin:20px 0
}
.widget-consent h2,.widget-consent h3 {
  color:#eee;
  margin-bottom:14px
}
.widget-consent .secondary {
  margin-top:18px
}
#news-widgets {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  margin-top:25px
}
.quote-feature {
  padding:60px;
  margin-bottom:25px
}
.quote-feature blockquote {
  font-size:clamp(27px,4vw,48px);
  line-height:1.3;
  letter-spacing:-1px;
  margin:10px 0 30px
}
.quote-feature p {
  color:#999;
  margin-bottom:30px
}
.checklist {
  display:grid;
  gap:20px;
  margin-top:25px
}
.checklist label {
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:15px;
  font-size:13px
}
.session-card {
  margin-bottom:18px
}
.session-card .card-top {
  align-items:center
}
.session-meta {
  font-size:11px;
  color:#999;
  margin-top:12px;
  line-height:1.8
}
.session-card .button-row {
  margin-top:14px
}
.table-wrap {
  overflow:auto;
  margin-top:20px
}
table {
  width:100%;
  border-collapse:collapse;
  font-size:11px;
  white-space:nowrap
}
th,td {
  text-align:left;
  padding:12px;
  border-bottom:1px solid #292929
}
th {
  color:#999;
  font-weight:500
}
td {
  color:#ddd
}
.result-heading {
  margin:28px 0 12px
}
.stack {
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:20px
}
.danger {
  padding:12px;
  background:#221214;
  color:var(--red);
  border:1px solid #49242a;
  border-radius:7px
}
.onboarding {
  position:fixed;
  inset:0;
  background:#000;
  z-index:99;
  overflow:auto;
  padding:40px 20px;
  display:grid;
  place-items:center
}
.welcome {
  max-width:480px;
  width:100%;
  padding:40px
}
.welcome h1 {
  font-size:34px;
  margin-bottom:20px
}
.welcome .muted {
  font-size:13px;
  margin-bottom:26px
}
.welcome label {
  margin-bottom:18px
}
.welcome .primary {
  width:100%;
  justify-content:space-between;
  margin-bottom:18px
}
dialog {
  color:#eee;
  background:#0b0b0b;
  border:1px solid #383838;
  border-radius:14px;
  max-width:680px;
  width:calc(100% - 28px);
  padding:28px;
  max-height:90dvh;
  overflow:auto
}
dialog::backdrop {
  background:#000c;
  backdrop-filter:blur(4px)
}
dialog .form-grid {
  grid-template-columns:1fr 1fr
}
dialog .primary {
  margin-top:18px
}
dialog .muted {
  margin:18px 0;
  font-size:12px
}
.trade-estimate {
  font-size:20px;
  margin:18px 0
}
#toast {
  position:fixed;
  bottom:28px;
  left:50%;
  transform:translateX(-50%);
  padding:14px 22px;
  max-width:90vw;
  background:#eee;
  color:#111;
  font-size:12px;
  border-radius:8px;
  z-index:120;
  box-shadow:0 8px 30px #000a
}
#run-status {
  font-size:12px;
  color:#aaa
}
.report-copy {
  line-height:1.8;
  color:#aaa;
  font-size:13px
}
.report-copy p {
  margin:15px 0
}
.report-copy a {
  text-decoration:underline
}
.report-copy ul {
  padding-left:20px
}
.file-label {
  cursor:pointer
}
#broker-links {
  margin-top:20px
}
.broker-link {
  display:flex;
  justify-content:space-between;
  gap:12px;
  border-top:1px solid #333;
  padding:15px 0
}
.checklist input {
  flex:none
}
@media(min-width:1500px) {
  main {
  padding:45px 60px 80px
}

}
@media(max-width:1100px) {
  main {
  padding:28px 24px 65px
}
.frame {
  grid-template-columns:172px minmax(0,1fr)
}
.sidebar {
  padding-left:18px
}
.dashboard-grid {
  grid-template-columns:1fr 1fr
}
.chart-grid {
  grid-template-columns:1fr
}
.form-grid {
  grid-template-columns:1fr 1fr
}
.hero-value {
  font-size:60px
}
.pnl-footer {
  font-size:10px
}
.metrics {
  gap:8px
}
.metric {
  padding:15px 12px
}
.metric b {
  font-size:21px
}

}
@media(max-width:760px) {
  .topbar {
  height:66px;
  padding:0 20px
}
.wordmark {
  font-size:10px;
  letter-spacing:2px;
  gap:10px
}
.brand-mark {
  width:33px;
  height:33px;
  font-size:15px
}
.top-actions {
  gap:14px
}
.local-badge {
  font-size:8px;
  letter-spacing:1px
}
.frame {
  display:block
}
.sidebar {
  display:none
}
main {
  padding:27px 18px 115px
}
.page-heading {
  align-items:flex-start;
  margin-bottom:23px;
  gap:12px;
  flex-wrap:wrap
}
.page-heading>.primary,.page-heading>.secondary {
  padding:11px 13px;
  font-size:11px
}
.page-heading .muted {
  font-size:12px
}
.eyebrow {
  font-size:9px;
  letter-spacing:1.5px
}
h1 {
  font-size:32px
}
h2 {
  font-size:20px
}
.dashboard-grid {
  grid-template-columns:1fr;
  gap:14px
}
.panel {
  padding:21px;
  border-radius:11px
}
.pnl-card {
  min-height:215px
}
.hero-value {
  font-size:65px;
  letter-spacing:-3px;
  margin-top:23px
}
.plan-card {
  display:none
}
.pnl-footer {
  font-size:11px
}
.metrics {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:14px 0
}
.metric {
  padding:17px
}
.metric b {
  font-size:25px
}
.chart-wrap {
  height:200px
}
.daily-bars {
  height:150px
}
.chart-grid {
  gap:14px
}
.section-heading {
  margin-top:28px
}
.section-heading .eyebrow {
  font-size:8px
}
.section-heading h2 {
  font-size:20px
}
.trade-row {
  grid-template-columns:74px minmax(0,1fr) 83px;
  gap:10px;
  padding:18px 0
}
.trade-actions {
  grid-column:2 / 4;
  justify-content:flex-start;
  margin-top:-8px
}
.trade-instrument {
  gap:6px;
  font-size:11px
}
.ticker-icon {
  width:28px;
  height:28px;
  font-size:9px
}
.trade-pnl {
  font-size:15px
}
.trade-reason {
  font-size:11px
}
.quote-strip {
  align-items:flex-start
}
.quote-strip .text-button {
  display:none
}
.quote-strip p {
  font-size:12px
}
#bottom-nav {
  display:flex;
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  justify-content:space-around;
  background:#090909f5;
  backdrop-filter:blur(14px);
  border-top:1px solid #303030;
  padding:12px 8px max(12px,env(safe-area-inset-bottom));
  z-index:20
}
.bottom-item {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:5px;
  color:#777;
  background:transparent;
  min-width:54px;
  font-size:8px;
  letter-spacing:.2px
}
.bottom-item .nav-icon {
  width:34px;
  height:34px;
  font-size:11px
}
.bottom-item .nav-icon svg {
  width:16px;
  height:16px
}
.bottom-item.active {
  color:#fff
}
.bottom-item.active .nav-icon {
  border-color:#fff;
  background:#1c1c1c
}
.bottom-item[data-page=dashboard] .nav-icon {
  width:41px;
  height:41px;
  font-size:18px;
  letter-spacing:-2px;
  margin-top:-7px;
  border-color:#999
}
.bottom-item[data-page=quotes] .nav-icon {
  font-size:6px;
  line-height:1.1;
  letter-spacing:0
}
.form-grid {
  gap:14px
}
.lab-form {
  padding:20px 16px
}
.lab-form .card-top h2 {
  font-size:21px
}
.instrument-token {
  width:47px;
  height:47px;
  font-size:18px
}
.tabs {
  gap:22px
}
.tabs button {
  font-size:11px
}
.toolbar {
  flex-wrap:wrap
}
.toolbar>label {
  min-width:100%
}
.toolbar .secondary {
  flex:1;
  font-size:10px;
  padding:10px
}
.live-widget {
  height:480px
}
.news-widget {
  height:470px
}
#news-widgets {
  grid-template-columns:1fr
}
.quote-feature {
  padding:34px 25px
}
.quote-feature blockquote {
  font-size:31px;
  margin:10px 0 25px
}
.welcome {
  padding:29px
}
.welcome h1 {
  font-size:30px
}
.welcome .large {
  width:65px;
  height:65px;
  font-size:30px
}
dialog {
  padding:22px 18px
}
.form-grid label {
  font-size:10px
}
input,select,textarea {
  font-size:14px;
  padding:10px 9px
}
.button-row {
  gap:12px
}
.result-heading {
  font-size:23px
}
#toast {
  bottom:105px
}
.session-card h2 {
  font-size:18px
}
.session-card .card-top {
  align-items:flex-start
}
.section-heading .text-button {
  font-size:10px
}

}
@media(prefers-reduced-motion:no-preference) {
  .page {
  animation:appear .2s ease-out
}
@keyframes appear {
  from {
  opacity:.4;
  transform:translateY(5px)
}
to {
  opacity:1;
  transform:translateY(0)
}

}

}


/* A quiet watermark and shallow relief keep the black workspace legible. */
body { isolation: isolate; }
body::before {
  content: 'BT';
  position: fixed;
  right: -.06em;
  top: 22%;
  font-size: clamp(220px, 45vw, 820px);
  font-weight: 600;
  letter-spacing: -.13em;
  line-height: 1;
  color: #fff;
  opacity: .022;
  pointer-events: none;
  z-index: -1;
  transform: rotate(-12deg);
}
.topbar { padding-top: env(safe-area-inset-top); height: calc(78px + env(safe-area-inset-top)); }
.panel, .metric { box-shadow: 0 12px 25px #0008, 0 1px 0 #ffffff05 inset; }
.nav-icon, .ticker-icon, .instrument-token, .avatar { box-shadow: 0 5px 0 #000, 0 8px 20px #000a, 0 1px 0 #ffffff15 inset; }
.ticker-icon { position: relative; flex: none; }
.ticker-icon img { width: 25px; height: 25px; filter: grayscale(1); }
.ticker-icon span { position: absolute; right: -4px; bottom: -4px; font-size: 7px; padding: 1px 3px; border: 1px solid #555; border-radius: 4px; background: #111; }
.instrument-token { position: relative; overflow: visible; flex: none; }
.instrument-token img { width: 70%; height: 70%; filter: grayscale(1); }
.instrument-token span { position: absolute; bottom: -5px; right: -6px; background: #111; border: 1px solid #555; border-radius: 4px; font-size: 10px; letter-spacing: 0; padding: 3px 5px; }
.primary, .secondary { box-shadow: 0 5px 0 #000, 0 9px 16px #0007; }
.primary:active, .secondary:active { transform: translateY(2px); }
.broker-mobile { display: none; }
.nav-item[data-page='quotes'] .nav-icon { font-size: 5px; line-height: 1.1; letter-spacing: 0; flex: none; }
.live-widget, .news-widget { position: relative; width: 100%; min-width: 0; overflow: hidden; border-radius: 8px; }
.live-widget { height: 640px; min-height: 580px; }
.live-widget > div, .news-widget > div { width: 100% !important; height: 100% !important; }
.live-widget iframe, .news-widget iframe { display: block; width: 100% !important; height: 100% !important; border: 0; }
#lab-chart .card-top { flex-wrap: wrap; align-items: center; }
#live-symbol { width: auto; max-width: 100%; min-width: 0; }
@media (prefers-reduced-motion: no-preference) {
  .instrument-token { animation: float-icon 6s ease-in-out infinite; }
  @keyframes float-icon {
    0%, 100% { transform: translateY(0) rotate(-8deg); }
    50% { transform: translateY(-6px) rotate(-5deg); }
  }
}
@media (max-width: 760px) {
  .topbar { height: calc(66px + env(safe-area-inset-top)); }
  .ticker-icon img { width: 21px; height: 21px; }
  main { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
  #bottom-nav { padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
  input, select, textarea { font-size: 16px; }
  .onboarding { padding-top: max(30px, env(safe-area-inset-top)); padding-bottom: max(30px, env(safe-area-inset-bottom)); }
  .topbar .local-badge { letter-spacing: .5px; }
  .broker-mobile { display: block; margin-bottom: 15px; }
  .live-widget { height: 620px; height: max(620px, 76svh); min-height: 620px; max-height: 900px; }
}
@media (max-width: 380px) {
  .local-badge { display: none; }
  .hero-value { font-size: 56px; }
  .form-grid, dialog .form-grid { grid-template-columns: 1fr; }
  .wordmark { letter-spacing: 1px; }
  .topbar { padding-left: 16px; padding-right: 16px; }
}

:root { --workspace-background: linear-gradient(145deg, #282828 0%, #121212 28%, #030303 62%, #000 100%); }
body { background: var(--workspace-background) fixed; }
.onboarding { background: var(--workspace-background); }
.topbar { background: #080808e8; backdrop-filter: blur(16px); }
#app main { touch-action: pan-y pinch-zoom; }
[data-no-swipe], .table-wrap { touch-action: pan-x pan-y pinch-zoom; }
.nav-icon { flex: none; transition: transform .5s ease, box-shadow .5s ease; }
.nav-item.active .nav-icon, .bottom-item.active .nav-icon { transform: translateY(-4px); box-shadow: 0 7px 18px #000b, 0 0 12px #ffffff09; }
.nav-item[data-page='profile'] .nav-icon, .bottom-item[data-page='profile'] .nav-icon { overflow: visible; border: 0; background: transparent; }
.crypto-categories { margin-bottom: 20px; }
.coin-picker { display: flex; gap: 12px; overflow-x: auto; padding: 8px 2px 18px; scrollbar-width: thin; }
.coin-choice { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 145px; padding: 15px; color: #aaa; background: #0d0d0d; border: 1px solid #303030; border-radius: 11px; text-align: left; transition: transform .35s ease, border-color .35s ease; }
.coin-choice.selected { color: #fff; border-color: #999; transform: translateY(-3px); background: #191919; }
.coin-choice > span:last-child { font-size: 12px; }
.crypto-badge { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: #171717; border: 1px solid #555; box-shadow: 0 5px 12px #0007; }
.crypto-badge img { width: 25px; height: 25px; object-fit: contain; }
.crypto-badge > span { position: absolute; bottom: -5px; right: -4px; font-size: 7px; color: #eee; background: #111; border: 1px solid #555; border-radius: 4px; padding: 1px 3px; }
.crypto-market-title { display: flex; align-items: center; gap: 15px; }
.crypto-market-title .eyebrow { margin-bottom: 7px; }
.crypto-market-card { margin: 7px 0 22px; }
.crypto-market-card .card-top { flex-wrap: wrap; align-items: center; }
.crypto-quote-widget { height: 130px; width: 100%; position: relative; overflow: hidden; margin-top: 20px; }
.crypto-quote-widget > div, .crypto-quote-widget iframe { width: 100% !important; height: 100% !important; border: 0; display: block; }
.crypto-watchlist-card { margin-bottom: 20px; }
.section-footnote { margin: 20px 0; }
.profile-layout { display: grid; grid-template-columns: minmax(240px,.8fr) minmax(0,1.7fr); gap: 22px; }
.profile-preview-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; padding-top: 36px; }
.profile-preview-card .eyebrow { margin: 0; }
.profile-preview-card .fine { max-width: 240px; }
.profile-avatar-preview { display: grid; place-items: center; width: 160px; height: 160px; }
.avatar-render { --avatar-size: 32px; position: relative; display: inline-grid; place-items: center; width: var(--avatar-size); height: var(--avatar-size); border-radius: 50%; color: #eee; font-size: calc(var(--avatar-size) * .3); line-height: 1; isolation: isolate; flex: none; }
.avatar-center { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: #292929; border-radius: 50%; border: 1px solid #ffffff18; }
.avatar-center img { width: 100%; height: 100%; object-fit: cover; }
.avatar-render::before, .avatar-render::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; pointer-events: none; }
.avatar-frame-ring::before { border: 2px solid var(--avatar-accent); }
.avatar-frame-double::before { border: 1px solid var(--avatar-accent); inset: -4px; }
.avatar-frame-double::after { border: 1px solid var(--avatar-accent); inset: -8px; opacity: .55; }
.avatar-frame-glow::before { border: 1px solid var(--avatar-accent); box-shadow: 0 0 13px var(--avatar-accent); opacity: .8; }
.avatar-frame-orbit::before { border: 1px solid var(--avatar-accent); inset: -7px; }
.avatar-frame-orbit::after { width: 6px; height: 6px; inset: -9px auto auto calc(50% - 3px); background: var(--avatar-accent); box-shadow: 0 0 9px var(--avatar-accent); transform-origin: 50% calc(var(--avatar-size) / 2 + 9px); }
.avatar-frame-corners::before { border: 2px solid var(--avatar-accent); border-radius: 25%; inset: -5px; clip-path: polygon(0 0,30% 0,30% 8%,8% 8%,8% 30%,0 30%,0 0,100% 0,100% 30%,92% 30%,92% 8%,70% 8%,70% 0,100% 0,100% 100%,70% 100%,70% 92%,92% 92%,92% 70%,100% 70%,100% 100%,0 100%,0 70%,8% 70%,8% 92%,30% 92%,30% 100%,0 100%); }
.avatar-frame-dashed::before { border: 2px dashed var(--avatar-accent); inset: -5px; }
.avatar-frame-wave::before { border: 1px solid var(--avatar-accent); inset: -6px; }
.avatar-frame-wave::after { border: 1px solid var(--avatar-accent); inset: -10px; opacity: .35; }
.profile-avatar-preview .avatar-render { --avatar-size: 108px; }
.avatar-button { padding: 0; background: transparent; overflow: visible; }
.avatar-button .avatar-render { --avatar-size: 32px; }
.nav-icon .avatar-render { --avatar-size: 25px; }
.profile-frame-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.frame-choice { display: flex; flex-direction: column; align-items: center; gap: 19px; padding: 20px 10px 14px; border: 1px solid #333; border-radius: 9px; background: #111; color: #999; font-size: 10px; }
.frame-choice .avatar-render { --avatar-size: 34px; }
.frame-choice.selected { border-color: #ccc; background: #202020; color: #fff; }
.profile-accent-colors { display: flex; flex-wrap: wrap; gap: 14px; }
.accent-choice { width: 30px; height: 30px; border: 4px solid #181818; outline: 1px solid #444; border-radius: 50%; background: var(--swatch); }
.accent-choice.selected { outline: 2px solid #ddd; outline-offset: 3px; }
.profile-save-row { margin-top: 30px; }
.profile-backup-card { margin-top: 24px; }
.profile-backup-card .muted { margin: 12px 0 20px; }
.report-home { display: inline-flex; align-items: center; gap: 12px; padding: 11px 15px; border: 1px solid #555; background: #111e; color: #eee; border-radius: 8px; font-size: 12px; margin: 20px 0 2px; backdrop-filter: blur(12px); }
.report-home-bar { position: sticky; top: 8px; z-index: 20; }
@media (prefers-reduced-motion: no-preference) {
  .nav-item.active .nav-icon, .bottom-item.active .nav-icon { animation: selected-icon-float 3.6s ease-in-out .5s infinite; }
  @keyframes selected-icon-float { 0%,100% { transform: translateY(-4px); } 50% { transform: translateY(-7px); } }
  .avatar-frame-orbit::after { animation: avatar-orbit 9s linear infinite; }
  .avatar-frame-dashed::before { animation: avatar-orbit 36s linear infinite; }
  .avatar-frame-wave::after { animation: avatar-ripple 3s ease-in-out infinite; }
  @keyframes avatar-orbit { to { transform: rotate(360deg); } }
  @keyframes avatar-ripple { 0%,100% { transform: scale(.98); opacity: .25; } 50% { transform: scale(1.05); opacity: .55; } }
}
@media (max-width: 1050px) { .profile-layout { grid-template-columns: 1fr; } .profile-preview-card { gap: 16px; } }
@media (max-width: 760px) {
  .bottom-item { flex: 1; min-width: 0; font-size: 8px; }
  .bottom-item .nav-icon { width: 30px; height: 30px; }
  .bottom-item[data-page=dashboard] .nav-icon { width: 38px; height: 38px; }
  .bottom-item .avatar-render { --avatar-size: 22px; }
  .crypto-market-card { padding: 20px 14px; }
  .coin-choice { min-width: 134px; padding: 14px 12px; }
  .crypto-market-title { gap: 12px; }
  .crypto-market-title h2 { font-size: 20px; }
  .profile-frame-grid { gap: 8px; }
  .frame-choice { padding-left: 5px; padding-right: 5px; font-size: 9px; }
  .profile-preview-card { padding-top: 26px; }
  .profile-avatar-preview { height: 135px; }
  .report-home-bar { top: 4px; }
}
@media (max-width: 380px) { .bottom-item { font-size: 7px; } .bottom-item .nav-icon { width: 28px; height: 28px; } .profile-frame-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
