:root {
  color-scheme: dark;
  --bg: #1c252b;
  --ink: #ffffff;
  --muted: rgba(255,255,255,.68);
  --line: rgba(218,228,215,.18);
  --panel: rgba(255,255,255,.06);
  --navy: #1c252b;
  --lime: #cffc54;
  --green: #cffc54;
  --red: #ff9c75;
  --amber: #ffd166;
  --shadow: 0 24px 80px rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 18% 8%, rgba(207,252,84,.16), transparent 28rem), radial-gradient(circle at 84% 12%, rgba(214,218,243,.14), transparent 24rem), linear-gradient(135deg, #162027 0%, var(--bg) 48%, #11181d 100%); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
.shell { width: min(1280px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 56px; }
.back { display: inline-flex; margin-bottom: 28px; color: var(--muted); text-decoration: none; font-weight: 850; }
.back:hover { color: var(--green); }
.hero, .status-row, .actions, .panel-heading, .note-panel { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.hero { padding: 34px; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.035)); box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: .72rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 14px; font-size: clamp(2.8rem, 7vw, 6.4rem); line-height: .9; letter-spacing: -.05em; }
h2 { margin-bottom: 2px; font-size: 1.55rem; }
h3 { margin-bottom: 0; font-size: 1.1rem; }
.lede { max-width: 760px; margin-bottom: 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.22rem); line-height: 1.55; }
.muted { color: var(--muted); }
.file-input { max-width: 380px; color: var(--muted); font-weight: 750; }
.file-input::file-selector-button, .ghost-button { min-height: 44px; border: 1px solid transparent; border-radius: 999px; padding: 0 16px; cursor: pointer; font-weight: 900; white-space: nowrap; }
.file-input::file-selector-button { margin-right: 10px; background: var(--lime); color: var(--ink); }
.ghost-button { background: rgba(255,255,255,.04); border-color: var(--line); color: var(--ink); }
.status-message { min-height: 24px; margin: 12px 0 0; color: var(--muted); font-size: .92rem; font-weight: 750; }
.status-message.error { color: var(--red); }
.empty-state { margin-top: 24px; min-height: 48vh; display: grid; align-items: center; border: 1px dashed rgba(218,228,215,.28); border-radius: 24px; padding: clamp(24px, 7vw, 68px); background: rgba(255,255,255,.055); }
.empty-state h2 { max-width: 720px; font-size: clamp(2rem, 5vw, 4.2rem); line-height: .96; letter-spacing: -.045em; }
.empty-state p { max-width: 680px; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.hidden { display: none; }
.dashboard { display: grid; gap: 18px; padding-top: 22px; }
.panel { border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(180deg, rgba(255,255,255,.09), var(--panel)); box-shadow: var(--shadow); }
.panel { padding: 24px; }
.table-wrap { margin-top: 18px; overflow: auto; border: 1px solid var(--line); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; background: #11181d; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .hero, .actions, .panel-heading { align-items: flex-start; flex-direction: column; } .hero { padding: 24px; } .file-input { max-width: 100%; } }
.table-panel { padding: 0; overflow: hidden; }
.table-panel .panel-heading { padding: 24px 24px 0; }
.table-panel .table-wrap { border-left: 0; border-right: 0; border-bottom: 0; border-radius: 0; max-height: 72vh; }
th.sticky-col, td.sticky-col { position: sticky; left: 0; z-index: 2; background: #11181d; box-shadow: 1px 0 0 var(--line); }
th.sticky-col { z-index: 3; }
.symbol-cell { font-weight: 900; color: var(--ink); }
td.best { font-weight: 850; color: var(--green); }
td.empty { text-align: center; color: rgba(255,255,255,.42); }
thead th { position: sticky; top: 0; z-index: 1; background: #11181d; }
thead th.sticky-col { z-index: 4; background: #11181d; }
.market-panel { display: grid; gap: 18px; }
.market-heading { align-items: flex-end; }
.market-picker { display: grid; gap: 8px; min-width: min(360px, 100%); color: var(--muted); font-size: .78rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.market-picker input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; background: rgba(12,18,22,.42); color: var(--ink); font-size: 1rem; font-weight: 850; letter-spacing: 0; text-transform: uppercase; outline: none; }
.market-picker input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(207,252,84,.14); }
.market-cards { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 14px; align-items: stretch; }
.market-card { min-width: 0; border: 1px solid var(--line); border-radius: 20px; padding: 18px; background: rgba(12,18,22,.42); }
.market-card h4 { margin: 0 0 14px; font-size: 1.4rem; letter-spacing: -.03em; }
.spread-triplet { display: grid; grid-template-columns: 1fr; gap: 10px; }
.spread-triplet div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding-top: 8px; border-top: 1px solid var(--line); }
.spread-triplet div:first-child { padding-top: 0; border-top: 0; }
.spread-triplet span { display: block; color: var(--muted); font-size: .64rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.spread-triplet strong { display: block; margin-top: 4px; font-size: clamp(1.45rem, 2.4vw, 2.2rem); line-height: .95; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.04em; }
.best-card { display: flex; min-height: 138px; flex-direction: column; justify-content: space-between; background: linear-gradient(135deg, rgba(207,252,84,.16), rgba(255,255,255,.06)); }
.best-card strong { color: var(--green); font-size: clamp(1.5rem, 3vw, 2.45rem); line-height: .95; letter-spacing: -.04em; }
tr.selected-row td { background: rgba(207,252,84,.12); }
tr.selected-row td.sticky-col { background: rgba(207,252,84,.12); }
@media (max-width: 1100px) { .market-cards { grid-template-columns: 1fr; } .lp-analysis-card { overflow-x: auto; } }
@media (max-width: 900px) { .market-heading { align-items: flex-start; } }

.primary-card { background: linear-gradient(135deg, var(--navy), #2a373d); color: #fff; }
.primary-card .eyebrow { color: rgba(255,255,255,.68); }
.primary-card strong { color: #fff; font-size: clamp(1.35rem, 2.8vw, 2.1rem); line-height: 1; letter-spacing: -.035em; }
td.primary-lp-cell { font-weight: 850; color: var(--ink); }

.recommendations-panel { display: grid; gap: 18px; }
.recommendations-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.recommendation-card { display: grid; gap: 16px; border: 1px solid var(--line); border-radius: 20px; padding: 18px; background: rgba(12,18,22,.42); }
.recommendation-card h4 { margin: 0 0 8px; font-size: 1.25rem; letter-spacing: -.03em; }
.recommendation-card p { margin-bottom: 0; }
.recommendation-card dl { display: grid; gap: 8px; margin: 0; }
.recommendation-card dl div { display: flex; justify-content: space-between; gap: 14px; padding-top: 8px; border-top: 1px solid var(--line); }
.recommendation-card dt { color: var(--muted); font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.recommendation-card dd { margin: 0; font-weight: 900; color: var(--green); text-align: right; }
.no-recommendations { margin: 0; line-height: 1.55; }
