@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root, html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090d16;
  --bg-gradient: radial-gradient(circle at 50% 0%, #151d30 0%, #090d16 70%);
  --surface: #111624;
  --surface-2: #182032;
  --surface-3: #202b42;
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --muted: #8493a8;
  --border: #232f48;
  --border-light: rgba(255, 255, 255, 0.08);
  
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-bg: rgba(99, 102, 241, 0.14);
  --accent-border: rgba(99, 102, 241, 0.35);
  
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.14);
  --green-border: rgba(16, 185, 129, 0.35);
  
  --red: #f43f5e;
  --red-bg: rgba(244, 63, 94, 0.14);
  --red-border: rgba(244, 63, 94, 0.35);
  
  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.14);
  --amber-border: rgba(245, 158, 11, 0.35);
  
  --chip: #1e293b;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.2);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-gradient: radial-gradient(circle at 50% 0%, #eef2ff 0%, #f8fafc 70%);
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-light: rgba(0, 0, 0, 0.05);
  
  --accent: #4f46e5;
  --accent-light: #6366f1;
  --accent-bg: rgba(79, 70, 229, 0.08);
  --accent-border: rgba(79, 70, 229, 0.25);
  
  --green: #059669;
  --green-bg: rgba(5, 150, 105, 0.08);
  --green-border: rgba(5, 150, 105, 0.25);
  
  --red: #e11d48;
  --red-bg: rgba(225, 29, 72, 0.08);
  --red-border: rgba(225, 29, 72, 0.25);
  
  --amber: #d97706;
  --amber-bg: rgba(217, 119, 6, 0.08);
  --amber-border: rgba(217, 119, 6, 0.25);
  
  --chip: #f1f5f9;
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 8px 24px rgba(79, 70, 229, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 0 16px calc(env(safe-area-inset-bottom) + 36px);
  max-width: 1040px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ---- unified app bar ---- */
.appbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  margin: 0 -16px 16px; padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.appbar-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; gap: 12px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px; font-weight: 800;
  letter-spacing: -.3px; font-size: 17px; color: var(--text); text-decoration: none;
  transition: opacity .15s;
}
.brand:hover { opacity: .9; }
.logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent-bg); color: var(--accent-light);
  border: 1px solid var(--accent-border); font-size: 13px; font-weight: 800;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}
.appbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.updated {
  display: inline-flex !important;
  align-items: center;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface-2);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}
.icon-btn {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  width: 36px; height: 36px; border-radius: 10px; font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s cubic-bezier(0.16, 1, 0.3, 1); flex: none;
}
.icon-btn:hover { background: var(--surface-3); border-color: var(--accent-border); color: var(--accent-light); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.94); }

/* strategy navigation tabs */
.stratnav {
  display: flex; gap: 8px; padding: 0 0 12px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.stratnav::-webkit-scrollbar { display: none; }
.strat-tab {
  display: inline-flex; align-items: center; gap: 9px; flex: 1 1 0; min-width: 0;
  padding: 8px 14px; border-radius: var(--radius); text-decoration: none;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  transition: all .18s cubic-bezier(0.16, 1, 0.3, 1);
}
.strat-tab:hover { background: var(--surface-3); color: var(--text); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.strat-tab:active { transform: scale(.98); }
.strat-tab.active {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  color: var(--text);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}
.st-ico { font-size: 18px; flex: none; }
.st-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.st-name { font-size: 13.5px; font-weight: 700; color: var(--text-secondary); }
.strat-tab.active .st-name { color: var(--text); font-weight: 800; }
@media (max-width: 640px) {
  .appbar-row { gap: 6px; }
  .brand { font-size: 15px; gap: 6px; flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .logo { width: 24px; height: 24px; font-size: 12px; flex-shrink: 0; }
  .stratnav {
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .strat-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 8px 12px;
    white-space: nowrap;
  }
  .st-sub { display: none; }
  .updated {
    display: inline-flex !important;
    font-size: 10.5px;
    padding: 2px 7px;
  }
}

@media (max-width: 400px) {
  .appbar-actions { gap: 4px; }
  .updated {
    font-size: 10px;
    padding: 2px 6px;
  }
  .icon-btn {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
}



/* account & metrics banner */
.acct {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; margin: 4px 0 16px;
  font-size: 13.5px; color: var(--muted); box-shadow: var(--shadow);
}
.acct b { color: var(--text); font-weight: 700; }
.acct .stale { color: var(--amber); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* secondary strategy tabs */
.tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  font-weight: 600; font-size: 13px; white-space: nowrap; transition: all .15s ease;
}
.tab:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.tab.active {
  background: var(--accent); border-color: var(--accent); color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.tab.tab-top { color: var(--amber); border-color: var(--amber-border); }
.tab.tab-top.active { background: var(--amber); border-color: var(--amber); color: #000000; font-weight: 700; }
.badge.strat { color: var(--accent-light); background: var(--accent-bg); font-weight: 700; border: 1px solid var(--accent-border); }

/* expiration segmented control */
.segmented {
  display: flex; background: var(--surface); border-radius: var(--radius); padding: 4px;
  margin-bottom: 14px; border: 1px solid var(--border); box-shadow: var(--shadow);
}
.seg {
  flex: 1; text-align: center; padding: 8px 6px; border-radius: 10px; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: 13px; border: none; background: none;
  transition: all .15s ease;
}
.seg:hover { color: var(--text); }
.seg.active {
  background: var(--surface-2); color: var(--text); font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--border-light), 0 2px 6px rgba(0,0,0,0.2);
}
.seg small { display: block; font-weight: 500; font-size: 11px; opacity: .75; margin-top: 1px; }

.toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.switch { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.switch input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.sortby { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.sortby select {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; cursor: pointer;
  outline: none; transition: border-color .15s;
}
.sortby select:focus { border-color: var(--accent); }

/* main card grid */
.cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 740px) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow);
  border-left: 4px solid var(--border); position: relative; overflow: hidden;
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* confidence tints */
.card.conf-good {
  border-left-color: var(--green);
  background: linear-gradient(180deg, var(--green-bg) 0%, var(--surface) 25%);
}
.card.conf-mid {
  border-left-color: var(--amber);
  background: linear-gradient(180deg, var(--amber-bg) 0%, var(--surface) 25%);
}
.card.conf-low {
  border-left-color: var(--red);
  background: linear-gradient(180deg, var(--red-bg) 0%, var(--surface) 25%);
}

.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tick {
  font-family: 'JetBrains Mono', monospace; font-size: 21px; font-weight: 800;
  letter-spacing: -.4px; color: var(--text);
}
.rank { color: var(--muted); font-size: 12px; font-weight: 600; font-family: 'JetBrains Mono', monospace; }
.spot { color: var(--muted); font-size: 13px; font-family: 'JetBrains Mono', monospace; }
.dir { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .4px; }
.dir.bullish { color: var(--green); background: var(--green-bg); border: 1px solid var(--green-border); }
.dir.bearish { color: var(--red); background: var(--red-bg); border: 1px solid var(--red-border); }
.dir.neutral { color: var(--muted); background: var(--chip); border: 1px solid var(--border-light); }

.variants { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.vpill {
  flex: 0 0 auto; padding: 4px 10px; border-radius: 999px; cursor: pointer;
  font-size: 11.5px; font-weight: 600; font-family: 'JetBrains Mono', monospace;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
  transition: all .15s ease;
}
.vpill:hover { background: var(--surface-3); color: var(--text); }
.vpill.active { background: var(--accent); border-color: var(--accent); color: #ffffff; }

.sector { display: flex; align-items: center; gap: 6px; margin: 6px 0 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.thesis { color: var(--text-secondary); font-size: 13.5px; margin: 8px 0 12px; line-height: 1.45; }

/* stat tile grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; border: 1px solid var(--border-light); }
.stat .k { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.stat .v { font-size: 15px; font-weight: 800; margin-top: 2px; font-family: 'JetBrains Mono', monospace; }
.v.pos, .v.good { color: var(--green); }
.v.neg, .v.low { color: var(--red); }
.v.mid { color: var(--amber); }

.sizing {
  margin-top: 12px; font-size: 12.5px; color: var(--text);
  background: var(--accent-bg); border: 1px solid var(--accent-border);
  border-radius: 10px; padding: 8px 12px; font-weight: 500;
}
.sizing b { color: var(--accent-light); font-weight: 700; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.badge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--chip); color: var(--muted); max-width: 100%; border: 1px solid var(--border-light); }
.badge.warn { color: var(--amber); background: var(--amber-bg); border-color: var(--amber-border); }
.badge.bad { color: var(--red); background: var(--red-bg); border-color: var(--red-border); }
.badge.ok { color: var(--green); background: var(--green-bg); border-color: var(--green-border); }

/* order ticket styling */
.ticket-cvx {
  margin: 10px 0; padding: 12px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--green-border);
  box-shadow: inset 0 1px 0 var(--border-light);
}
.tk-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.tk-act { font-size: 10.5px; font-weight: 800; letter-spacing: .5px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.tk-act.buy { color: #ffffff; background: var(--green); }
.tk-act.sell { color: #ffffff; background: var(--red); }
.tk-desc { font-size: 13px; color: var(--text); }
.tk-sym { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; color: var(--accent-light); margin-bottom: 8px; }
.tk-line { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 3px 0; border-bottom: 1px dashed var(--border-light); }
.tk-line:last-of-type { border-bottom: none; }
.tk-line span:first-child { color: var(--muted); }
.tk-line .pos { color: var(--green); font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.tk-line .neg { color: var(--red); font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.tk-hint { margin-top: 8px; font-size: 11.5px; color: var(--muted); line-height: 1.4; }

/* AI explainer note */
.ai-note {
  margin: 10px 0; padding: 12px; border-radius: 12px;
  background: var(--accent-bg); border: 1px solid var(--accent-border);
}
.ai-note-h { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--accent-light); margin-bottom: 6px; }
.ai-note p { margin: 4px 0; font-size: 13px; color: var(--text); line-height: 1.45; }
.ai-note .ai-risk { color: var(--muted); }

/* AI narrative inline */
.why, .fund {
  margin: 10px 0; padding: 12px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.why-head, .fund-h {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--accent-light);
}
.why-verdict { font-size: 10.5px; font-weight: 800; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; }
.why-verdict.good { color: var(--green); background: var(--green-bg); border: 1px solid var(--green-border); }
.why-verdict.mid { color: var(--amber); background: var(--amber-bg); border: 1px solid var(--amber-border); }
.why-verdict.low { color: var(--red); background: var(--red-bg); border: 1px solid var(--red-border); }
.why-reason, .fund p { font-size: 13px; color: var(--text-secondary); line-height: 1.45; }
.why ul, .fund-next { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--text-secondary); }
.why-risks { margin-top: 8px; font-size: 12px; color: var(--muted); }
.why-risks b { color: var(--amber); }

/* regime banner */
.regime {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 14px 18px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.regime-badge { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 4px 10px; border-radius: 8px; }
.regime-badge.good { color: var(--green); background: var(--green-bg); border: 1px solid var(--green-border); }
.regime-badge.low { color: var(--red); background: var(--red-bg); border: 1px solid var(--red-border); }
.regime-badge.mid { color: var(--amber); background: var(--amber-bg); border: 1px solid var(--amber-border); }
.regime-note { font-size: 13px; color: var(--text-secondary); flex: 1; min-width: 260px; line-height: 1.45; }

/* heat meters */
.heat-row { display: flex; align-items: center; gap: 12px; margin: 10px 0 6px; }
.heat-label { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; font-family: 'JetBrains Mono', monospace; }
.heatbar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border-light); }
.heatbar-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.heatbar-fill.hot { background: linear-gradient(90deg, #f43f5e, #ef4444); }
.heatbar-fill.warm { background: linear-gradient(90deg, #f59e0b, #eab308); }
.heatbar-fill.cool { background: linear-gradient(90deg, #6366f1, #3b82f6); }

/* details & expanders */
.explainer {
  margin: 0 0 16px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow); padding: 0 16px;
}
.explainer > summary {
  cursor: pointer; list-style: none; padding: 14px 0; font-weight: 800;
  font-size: 14.5px; color: var(--text); display: flex; align-items: center; gap: 8px;
}
.explainer > summary::-webkit-details-marker { display: none; }
.explainer > summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .2s ease; }
.explainer[open] > summary::after { transform: rotate(180deg); }
.explainer-body { padding: 0 0 14px; border-top: 1px solid var(--border-light); }
.explainer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent-light); margin: 16px 0 8px; }
.explainer p, .explainer li { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.explainer .warn-note { color: var(--amber); }

.sidenote {
  margin: 16px 0; padding: 12px 16px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-secondary);
}

.empty { text-align: center; color: var(--muted); padding: 48px 0; font-size: 15px; font-weight: 500; }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 32px; font-weight: 500; }
.skeleton {
  height: 180px; border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%; animation: sh 1.4s infinite;
}
@keyframes sh { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ---- Options Simulator Styling ---- */
.sim-search { display: flex; gap: 10px; margin: 0 0 16px; }
.sim-search input {
  flex: 1; padding: 12px 16px; border-radius: var(--radius); font-size: 15px;
  font-weight: 700; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.5px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  text-transform: uppercase; outline: none; transition: border-color .15s;
}
.sim-search input:focus { border-color: var(--accent); }
.sim-search button {
  padding: 12px 20px; border-radius: var(--radius); border: none;
  background: var(--accent); color: #ffffff; font-weight: 700; font-size: 14px;
  cursor: pointer; transition: all .15s ease; box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.sim-search button:hover { background: var(--accent-light); transform: translateY(-1px); }

.sim-panel {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.sim-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sim-tick { display: flex; gap: 12px; align-items: center; }
.sim-ico {
  font-size: 28px; width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--surface-2); border-radius: 12px; border: 1px solid var(--border-light);
}
.sim-symbol { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 800; }
.sim-lastlabel { font-size: 12px; color: var(--muted); }
.sim-price { text-align: right; }
.sim-last { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 800; color: var(--text); }
.sim-day { font-size: 13px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.sim-day.up, .sim-panel .pos { color: var(--green); }
.sim-day.down, .sim-panel .neg { color: var(--red); }

.sim-trends { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 14px 0 10px; }
.sim-trend-label { font-size: 10.5px; font-weight: 800; letter-spacing: .5px; color: var(--muted); }
.sim-trend { font-size: 12.5px; font-weight: 600; }
.sim-trend b { color: var(--muted); font-weight: 600; margin-right: 4px; }
.sim-trend.up { color: var(--green); }
.sim-trend.down { color: var(--red); }
.sim-trend.neu { color: var(--muted); }

/* trend forecast cards */
.fc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.fc-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.fc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fc-label { font-size: 12.5px; font-weight: 700; color: var(--text); }
.fc-hz { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.fc-dir { font-size: 12px; font-weight: 700; }
.fc-dir.up { color: var(--green); } .fc-dir.down { color: var(--red); } .fc-dir.neu { color: var(--muted); }
.fc-proj { font-size: 13px; margin: 6px 0 4px; font-family: 'JetBrains Mono', monospace; }
.fc-proj .pos { color: var(--green); } .fc-proj .neg { color: var(--red); }
.fc-drivers { margin: 6px 0 0; padding-left: 16px; }
.fc-drivers li { font-size: 11.5px; color: var(--text-secondary); margin: 2px 0; }
.fc-ai {
  margin: 10px 0 4px; padding: 12px; border-radius: 12px;
  background: var(--accent-bg); border: 1px solid var(--accent-border);
}
.fc-ai p { font-size: 13px; margin: 5px 0; color: var(--text); line-height: 1.45; }
.fc-ai .ai-note-h { color: var(--accent-light); }
@media (max-width: 520px) { .fc-grid { grid-template-columns: 1fr; } }

/* market tiles */
.mkt-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 10px; }
.mkt-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.mkt-k { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; display: flex; align-items: center; gap: 4px; }
.mkt-v { font-size: 17px; font-weight: 800; margin: 3px 0 1px; font-family: 'JetBrains Mono', monospace; }
.mkt-v.pos { color: var(--green); } .mkt-v.neg { color: var(--red); }
.mkt-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt-sub.pos { color: var(--green); } .mkt-sub.neg { color: var(--red); }
@media (max-width: 520px) { .mkt-tiles { grid-template-columns: 1fr; } }

/* strategy selector & section labels */
.sim-section-label {
  font-size: 11px; font-weight: 800; letter-spacing: .6px; color: var(--accent-light);
  text-transform: uppercase; margin: 16px 0 8px; display: flex; justify-content: space-between; align-items: baseline;
}
.res-base { font-size: 11.5px; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 500; }
.strat-sel {
  width: 100%; padding: 10px 14px; border-radius: var(--radius); font-size: 14.5px;
  font-weight: 700; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); outline: none;
}
.strat-bias { font-size: 12.5px; color: var(--muted); margin: 6px 0 6px; }

.sim-pos {
  color: var(--muted); font-size: 13px; margin: 6px 0 14px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.sim-pos input {
  width: 90px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 13px;
  font-family: 'JetBrains Mono', monospace; font-weight: 600; outline: none;
}
.sim-dot { color: var(--border); }

/* expiration buttons */
.venc-group { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.venc-btn {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  color: var(--muted); padding: 10px 8px; cursor: pointer; display: flex; flex-direction: column;
  gap: 2px; transition: all .15s ease;
}
.venc-btn:hover { background: var(--surface-3); color: var(--text); }
.venc-btn.active {
  border-color: var(--accent); color: var(--accent-light); background: var(--accent-bg);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}
.venc-main { font-size: 13.5px; font-weight: 700; }
.venc-sub { font-size: 11px; color: var(--muted); }
.venc-btn.active .venc-sub { color: var(--accent-light); }
@media (max-width: 480px) { .venc-group { grid-template-columns: repeat(2, 1fr); } }

/* strike sliders */
.prem-slider {
  width: 100%; -webkit-appearance: none; appearance: none; height: 6px;
  border-radius: 4px; background: var(--surface-3); outline: none; margin: 10px 0 6px;
}
.prem-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 3px solid var(--surface);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.prem-slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent);
  cursor: pointer; border: 3px solid var(--surface);
}
.prem-hints { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }

/* option ticket order box */
.opt-box { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-top: 16px; background: var(--surface-2); }
.opt-head { display: flex; justify-content: space-between; align-items: baseline; }
.opt-label { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }
.opt-move { font-size: 13px; font-weight: 700; color: var(--accent-light); font-family: 'JetBrains Mono', monospace; }
.opt-sym {
  font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700;
  color: var(--accent-light); background: var(--accent-bg);
  display: inline-block; padding: 3px 8px; border-radius: 6px; margin: 6px 0 10px;
}
.opt-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.opt-row span:first-child { color: var(--muted); }

/* result cards */
.res-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.res-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 10px; text-align: center;
}
.res-card.total {
  background: var(--accent-bg); border-color: var(--accent-border);
}
.res-k { font-size: 10.5px; font-weight: 800; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }
.res-v { font-size: 17px; font-weight: 800; margin: 4px 0 2px; font-family: 'JetBrains Mono', monospace; }
.res-card.total .res-v { color: var(--accent-light); }
.res-p { font-size: 11.5px; color: var(--muted); }
.pop-line {
  margin: 12px 0 4px; padding: 10px 14px; border-radius: 12px; font-size: 13px;
  color: var(--text); background: var(--accent-bg); border: 1px solid var(--accent-border); line-height: 1.45;
}
.pop-line.adj {
  margin-top: 6px; background: var(--surface-2); border-color: var(--border);
}
.pop-delta { font-weight: 700; margin-left: 4px; }
.pop-delta.pos { color: var(--green); } .pop-delta.neg { color: var(--red); }

/* footer calculation rows */
.sim-foot-rows { margin-top: 14px; border-top: 1px solid var(--border-light); padding-top: 10px; }
.sim-frow { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed var(--border-light); }
.sim-frow:last-child { border-bottom: none; }
.sim-frow span:first-child { color: var(--muted); }
.sim-frow span:last-child { font-family: 'JetBrains Mono', monospace; font-weight: 600; }

.help {
  cursor: pointer; color: var(--muted); font-size: 12px; background: var(--surface-3);
  border: 1px solid var(--border); padding: 1px 6px; border-radius: 999px; line-height: 1; margin-left: 4px;
}
.help:hover { color: var(--accent-light); border-color: var(--accent); }
.tipbox {
  position: absolute; z-index: 100; display: none; font-size: 12.5px;
  line-height: 1.5; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4); max-width: 320px;
}

