/* MSTR 10M — black-and-orange app window floating on a slate #aec2c9 stage. */

:root {
  --stage-top: #c3d3d9;
  --stage-mid: #aec2c9;
  --stage-bottom: #8aa1a9;
  --bg: #000000;
  --surface: #0e0e0f;
  --surface-2: #18181a;
  --line: #262628;
  --line-strong: #3a3a3d;
  --text: #ffffff;
  --muted: #9a9aa1;
  --brand: #ff7a1a;
  --brand-ink: #1a0d00;
  --brand-soft: rgba(255, 122, 26, 0.12);
  --btc: #f7931a;
  --opt: #34d27a;
  --pos: #34d27a;
  --neg: #ff6b6b;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 12% -12%, rgba(255, 255, 255, 0.45), transparent 60%),
    radial-gradient(900px 500px at 108% 30%, rgba(255, 122, 26, 0.10), transparent 60%),
    linear-gradient(180deg, var(--stage-top), var(--stage-mid) 45%, var(--stage-bottom));
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.5 Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  font-feature-settings: 'tnum' 1, 'cv11' 1;
  -webkit-font-smoothing: antialiased;
}

/* ---------- stage + app window ---------- */

.stage { padding: 40px 32px 56px; }
.app {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg);
  border-radius: 28px;
  overflow: clip; /* clip (not hidden) keeps the sticky header working */
  box-shadow:
    0 0 0 1px rgba(20, 40, 48, 0.25),     /* shadows tinted blue-grey to sit on the slate stage */
    0 2px 4px rgba(20, 40, 48, 0.12),
    0 24px 48px -12px rgba(20, 40, 48, 0.40),
    0 60px 120px -30px rgba(20, 40, 48, 0.55);
}

.wrap { padding: 0 32px; }

/* ---------- header: orange bar + black sub-nav ---------- */

.site-header { position: sticky; top: 0; z-index: 20; }
.topbar {
  background: var(--brand);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 32px; min-height: 52px;
}
.brand { font-weight: 900; font-size: 24px; letter-spacing: -0.04em; color: #000; text-decoration: none; line-height: 1; }
.brand span { color: #fff; }
.topbar-links { display: flex; gap: 22px; }
.topbar-links a { color: var(--brand-ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.topbar-links a:hover { text-decoration: underline; }

.subnav {
  background: #0b0b0c; border-bottom: 1px solid var(--line);
  display: flex; gap: 4px; padding: 0 22px; overflow-x: auto; scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  flex: none; color: #e6e6e8; text-decoration: none; font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 13px 10px 11px;
  border-bottom: 2px solid transparent;
}
.subnav a:hover { color: var(--brand); }
.subnav a.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- market strip ---------- */

.market {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 24px 0 8px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: linear-gradient(180deg, #151517, #0c0c0d);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.stat { padding: 14px 18px 16px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-k { font-size: 14px; font-weight: 600; color: #e6e6e8; }
.stat-v { font-size: clamp(24px, 2.8vw, 32px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.stat-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
#mkBtc { color: var(--btc); }
#mkCall { color: var(--opt); }

/* ---------- hero ---------- */

.hero { padding: 32px 0 24px; }
.hero h1 { font-size: clamp(28px, 4.6vw, 48px); line-height: 1.08; letter-spacing: -0.035em; margin: 0 0 14px; font-weight: 800; max-width: 22ch; }
.hero h1 em { font-style: normal; color: var(--muted); }
.goal-echo { color: var(--brand); white-space: nowrap; }
.lede { color: var(--muted); font-size: 17px; max-width: 62ch; margin: 0; }

.notice { background: var(--brand-soft); border: 1px solid rgba(255, 122, 26, 0.45); padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; }

/* ---------- panels ---------- */

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.panel h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.panel-head { margin-bottom: 16px; }
.hint { color: var(--muted); font-size: 14px; margin: 0; }
.muted { color: var(--muted); }

/* ---------- assumptions ---------- */

.assumptions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 20px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: #e6e6e8; margin-bottom: 6px; }
.money, .pct { position: relative; }
.money::before { content: '$'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.pct::after { content: '%'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
input, select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font: 700 16px Inter, sans-serif; outline: none; transition: border-color .15s;
}
.money input { padding-left: 26px; }
.pct input { padding-right: 28px; }
select { font-weight: 600; font-size: 15px; cursor: pointer; }
input:focus, select:focus { border-color: var(--brand); }
input.bad { border-color: var(--neg); }
input[type="date"] { color-scheme: dark; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips button { background: transparent; border: 1px solid var(--line-strong); color: #cfcfd4; border-radius: 999px; padding: 3px 10px; font: 600 12px Inter, sans-serif; cursor: pointer; }
.chips button span { font-weight: 400; opacity: .7; }
.chips button:hover { border-color: var(--brand); color: #fff; }

.field-actions { display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; }
.btn-ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--text); border-radius: 10px; padding: 9px 12px; font: 600 14px Inter, sans-serif; cursor: pointer; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* IV spike toggle */
.iv-row { order: 1; grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 18px; }
.iv-row .switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 15px; color: var(--text); margin: 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-strong); position: relative; transition: background .15s; margin-top: 1px; }
.switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + .switch-ui { background: var(--brand-soft); border-color: var(--brand); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); background: var(--brand); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch-text { display: flex; flex-direction: column; gap: 2px; }
.switch-text strong { font-weight: 700; }
.switch-text .muted { font-size: 13px; font-weight: 400; }
.switch-text .warn { color: var(--neg); }
.iv-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) 2fr; gap: 16px 20px; margin-top: 14px; align-items: start; }
.iv-fields[hidden] { display: none; }
.iv-context { margin-top: 24px; }

/* ---------- path cards ---------- */

.paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.path { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; }
.path-hot { border-color: rgba(52, 210, 122, 0.5); background: linear-gradient(180deg, rgba(52, 210, 122, 0.08), var(--surface) 55%); }
.path-tag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand); }
.path h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-select { width: auto; padding: 4px 8px; font: 800 18px Inter, sans-serif; color: var(--opt); }
.big { font-weight: 800; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.035em; }
#pathBtc .big { color: var(--btc); }
#pathMstr .big { color: #fff; }
#pathOpt .big { color: var(--opt); }
.big-label { color: var(--muted); font-size: 13px; margin-top: 4px; margin-bottom: 18px; }
.facts { margin: 0; border-top: 1px solid var(--line); }
.facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-weight: 600; }
.path.is-off .big { color: var(--muted) !important; }
.path.is-off .facts dd { text-align: left; font-weight: 400; color: var(--muted); }
.iv-badge { display: none; margin: -10px 0 14px; font-size: 12px; font-weight: 700; color: var(--brand); }
.path.iv-on .iv-badge { display: block; }

/* ---------- comparison bars ---------- */

.bars { display: grid; gap: 12px; margin-top: 14px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr minmax(170px, auto); align-items: center; gap: 14px; }
.bar-label { font-size: 14px; color: var(--muted); }
.bar-track { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width .35s ease; }
.bar-fill.btc { background: var(--btc); }
.bar-fill.mstr { background: #fff; }
.bar-fill.opt { background: var(--opt); }
.bar-val { font-size: 14px; font-weight: 700; text-align: right; }
.bar-val .muted { font-size: 12px; font-weight: 500; }

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.grid { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.grid th { text-align: right; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); }
.grid td { text-align: right; padding: 10px; border-bottom: 1px solid var(--line); font-weight: 500; }
.grid th:first-child, .grid td:first-child { text-align: left; }
.grid td:first-child { font-weight: 700; }
.grid tr.pick { cursor: pointer; }
.grid tr.pick:hover td { background: var(--surface-2); }
.grid tr.is-selected td { background: rgba(255, 122, 26, 0.09); }
.grid tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.grid tr.is-off td { color: var(--muted); font-weight: 400; }
.grid td.strong { font-weight: 800; color: var(--opt); }
.grid td.pos { color: var(--pos); }
.grid td.neg { color: var(--neg); }
.grid.compact td { padding: 7px 10px; }
.pill { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; background: var(--brand-soft); color: var(--brand); padding: 2px 6px; border-radius: 6px; margin-left: 6px; vertical-align: 2px; }
.pill.muted { background: var(--surface-2); color: var(--muted); }

/* ---------- ladder ---------- */

.ladder-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.rung { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; }
.rung input { width: auto; accent-color: var(--brand); margin: 0; }
.rung.on { border-color: var(--brand); background: var(--brand-soft); }
.ladder-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ladder-summary > div { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.ladder-summary .k { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.ladder-summary .v { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.ladder-summary .v.hot { color: var(--opt); }
.warn { color: var(--neg); margin: 0; }

/* ---------- method + footer ---------- */

.method { padding: 8px 4px 16px; color: var(--muted); font-size: 14px; }
.method h3 { color: var(--text); font-size: 18px; font-weight: 800; }
.method ul { padding-left: 18px; margin: 0; }
.method li { margin-bottom: 8px; }
.method strong { color: var(--text); }
.disclaimer { border-top: 1px solid var(--line); padding: 20px 4px 32px; color: var(--muted); font-size: 13px; }
.disclaimer strong { color: var(--text); }
.small { font-size: 12px; }
.fine { font-style: italic; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--brand); color: #000; padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .2s; max-width: calc(100% - 32px); z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .stage { padding: 20px 16px 32px; }
  .wrap { padding: 0 20px; }
  .topbar { padding: 10px 20px; }
  .assumptions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paths { grid-template-columns: 1fr; }
  .market { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .ladder-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iv-fields { grid-template-columns: 1fr 1fr; }
  .iv-context { grid-column: 1 / -1; margin-top: 0; }
}
@media (max-width: 560px) {
  body { background: #000; }
  .stage { padding: 0; }
  .app { border-radius: 0; box-shadow: none; }
  .wrap { padding: 0 16px; }
  .topbar { padding: 10px 16px; }
  .topbar-links { display: none; }
  .subnav { padding: 0 8px; }
  .hero { padding-top: 24px; }
  .lede { font-size: 16px; }
  .assumptions { grid-template-columns: 1fr; }
  .iv-fields { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr; gap: 6px; }
  .bar-val { text-align: left; }
  .stat { padding: 12px 14px; }
}

/* asset logos on the path cards */
.asset-logo { flex: none; width: 28px; height: 28px; border-radius: 50%; display: block; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.stat-logo { width: 18px; height: 18px; border-radius: 50%; vertical-align: -4px; margin-right: 7px; }
.panel h3 .stat-logo { width: 20px; height: 20px; vertical-align: -3px; margin: 0 6px 0 1px; }
