:root {
  --bg: #070b14;
  --bg-soft: #0a1020;
  --panel: #0e1627;
  --panel-raised: #121d31;
  --panel-bright: #17243a;
  --line: #22304a;
  --line-bright: #324664;
  --text: #f5f8fc;
  --muted: #99a7bc;
  --faint: #63718a;
  --mint: #82f3bf;
  --mint-strong: #45d99b;
  --blue: #79c9ff;
  --lilac: #b9a7ff;
  --amber: #f7ce72;
  --red: #ff9d9d;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Space Grotesk", Inter, system-ui, sans-serif;
  --shadow: 0 24px 70px rgba(0, 3, 12, .34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 75% -10%, rgba(44, 116, 128, .15), transparent 30rem),
    radial-gradient(circle at 35% 15%, rgba(72, 48, 133, .08), transparent 28rem),
    var(--bg);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
::selection { color: #07120e; background: var(--mint); }

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 7px;
  color: #07120e;
  background: var(--mint);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex: 0 0 244px;
  flex-direction: column;
  width: 244px;
  height: 100vh;
  padding: 28px 18px 22px;
  border-right: 1px solid #172238;
  background: linear-gradient(180deg, rgba(11, 18, 33, .98), rgba(7, 12, 23, .98));
}
.brand { display: block; width: 184px; padding: 0 8px 36px; text-decoration: none; }
.brand-logo { display: block; width: 100%; height: auto; }
.side-label {
  padding: 0 11px 10px;
  color: #57657d;
  font: 500 9px var(--mono);
  letter-spacing: .17em;
  text-transform: uppercase;
}
.nav-links { display: grid; gap: 4px; margin-bottom: 30px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #96a4b9;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.nav-link:hover { color: #fff; background: #111d30; transform: translateX(2px); }
.nav-link.active { color: #fff; border-color: #243654; background: linear-gradient(90deg, #17253c, #121c2f); box-shadow: inset 2px 0 var(--mint); }
.nav-icon { width: 20px; color: var(--mint); font-size: 19px; text-align: center; }
.nav-count { margin-left: auto; color: #728099; font: 10px var(--mono); }
.filter-stack { display: grid; gap: 5px; }
.filter-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 7px;
  color: #7f8ca1;
  font-size: 12px;
}
.filter-chip.selected { color: #dfe7f1; background: #101a2c; }
.filter-chip > span:last-child { margin-left: auto; color: #69768c; font: 10px var(--mono); }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.status-dot.live { background: var(--mint); box-shadow: 0 0 0 3px rgba(68, 217, 155, .12); }
.status-dot.research { background: var(--amber); box-shadow: 0 0 0 3px rgba(247, 206, 114, .1); }
.status-dot.paused { background: var(--red); }
.sidebar-footer { margin-top: auto; padding: 18px 10px 0; border-top: 1px solid #182337; color: #758299; font: 10px/1.5 var(--mono); }
.sync-mark { margin-bottom: 6px; color: #aac6ba; }
.sync-time { color: #536078; }
.pulse { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(69, 217, 155, .11); }

.main-content { width: calc(100% - 244px); max-width: 1520px; margin: 0 auto; padding: 0 50px 30px; }
.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  border-bottom: 1px solid #182338;
}
.mobile-brand { display: none; }
.breadcrumbs { color: #bdc8d9; font: 9px var(--mono); letter-spacing: .16em; }
.breadcrumbs i { padding: 0 11px; color: #45536a; font-style: normal; }
.breadcrumbs .muted { color: #68758c; }
.top-actions { position: relative; display: flex; align-items: center; gap: 14px; }
.read-only { color: #8290a6; font: 10px var(--mono); }
.lock { margin-right: 5px; color: var(--mint); font-size: 14px; }
.sign-in-button, .user-button, .home-button, .export-button {
  min-height: 34px;
  border: 1px solid #304361;
  border-radius: 7px;
  color: #dbe4ef;
  background: #142139;
  font: 10px var(--mono);
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.sign-in-button { padding: 0 13px; }
.sign-in-button span { padding-left: 6px; color: var(--mint); }
.sign-in-button:hover, .user-button:hover, .home-button:hover, .export-button:hover { border-color: #4e8679; background: #173329; transform: translateY(-1px); }
.sign-in-button:disabled { opacity: .65; cursor: wait; transform: none; }
.user-button { display: flex; align-items: center; gap: 8px; padding: 0 9px; }
.user-button > span:last-child { color: var(--mint); }
.user-avatar { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #07120e; background: linear-gradient(135deg, var(--mint), var(--blue)); font: 700 9px var(--mono); }
.account-menu {
  position: absolute;
  z-index: 50;
  top: 44px;
  right: 0;
  min-width: 205px;
  padding: 7px;
  border: 1px solid var(--line-bright);
  border-radius: 9px;
  background: #10192a;
  box-shadow: var(--shadow);
}
.account-menu a, .account-menu button { display: block; width: 100%; padding: 10px 11px; border: 0; border-radius: 6px; color: #b9c5d7; background: transparent; text-align: left; text-decoration: none; font: 10px var(--mono); cursor: pointer; }
.account-menu a:hover, .account-menu button:hover { color: #fff; background: #19263c; }
.account-menu button { margin-top: 4px; border-top: 1px solid #26344b; border-radius: 0 0 6px 6px; color: var(--red); }

.eyebrow { display: flex; align-items: center; gap: 9px; color: #8794a8; font: 500 9px var(--mono); letter-spacing: .18em; }
.eyebrow-line { display: inline-block; width: 24px; height: 1px; background: var(--mint); }
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr); align-items: center; min-height: 520px; overflow: hidden; padding: 70px 2% 65px 3%; }
.hero::before { position: absolute; top: 30px; right: 0; width: 440px; height: 440px; border-radius: 50%; background: radial-gradient(circle, rgba(47, 110, 126, .13), transparent 66%); content: ""; pointer-events: none; }
.hero-content { position: relative; z-index: 2; }
.hero h1, .profile-hero h1 { margin: 20px 0 18px; font-size: clamp(50px, 5vw, 75px); line-height: .98; letter-spacing: -.062em; font-weight: 600; }
.hero h1 em, .profile-hero h1 em { color: var(--mint); font-style: normal; }
.hero-copy { max-width: 590px; margin: 0; color: #a1aec0; font-size: 16px; line-height: 1.72; }
.hero-proof { max-width: 650px; margin-top: 18px; padding-left: 16px; border-left: 2px solid var(--mint); color: #c3cedb; font-size: 15px; line-height: 1.7; }
.hero-proof strong { color: #eff6fb; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 31px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; padding: 0 17px; border: 1px solid var(--line-bright); border-radius: 8px; color: #eaf0f7; background: #152238; text-decoration: none; font: 500 11px var(--mono); cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-2px); border-color: #54716e; background: #1a2a41; }
.button.primary { color: #06130e; border-color: var(--mint); background: linear-gradient(135deg, #99f8ce, #66e6ad); box-shadow: 0 12px 34px rgba(69, 217, 155, .15); }
.button.primary:hover { background: #a7fbd6; box-shadow: 0 14px 38px rgba(69, 217, 155, .23); }
.button.secondary { background: rgba(17, 28, 47, .72); }
.button.compact { min-height: 37px; padding: 0 13px; font-size: 10px; }
.button.danger { color: #ffc0c0; border-color: #643d48; background: #2b1b25; }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.hero-visual { position: relative; justify-self: center; width: 420px; height: 380px; }
.orbit { position: absolute; border: 1px solid #32405c; border-radius: 50%; }
.orbit-one { top: 116px; left: 27px; width: 365px; height: 135px; transform: rotate(-23deg); }
.orbit-two { top: 57px; left: 100px; width: 230px; height: 260px; transform: rotate(24deg); }
.orbit-three { top: 85px; left: 69px; width: 300px; height: 210px; transform: rotate(69deg); border-color: #253957; }
.orbit-core { position: absolute; top: 123px; left: 142px; display: grid; align-content: center; justify-items: center; gap: 7px; width: 136px; height: 136px; border: 1px solid #4a6c7e; border-radius: 50%; background: radial-gradient(circle at 35% 27%, #243d52, #0d1828 70%); box-shadow: 0 0 70px rgba(39, 99, 113, .18); }
.orbit-core span { color: #fff; font: 600 12px/1 var(--mono); letter-spacing: .1em; text-shadow: 0 0 12px rgba(255, 255, 255, .28); }
.orbit-core strong { color: var(--mint); font: 600 9px/1 var(--mono); letter-spacing: .16em; }
.orbit-node { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(69, 217, 155, .15), 0 0 20px var(--mint); }
.node-one { top: 190px; left: 19px; }
.node-two { top: 94px; right: 27px; background: var(--lilac); box-shadow: 0 0 0 5px rgba(185, 167, 255, .13), 0 0 20px var(--lilac); }
.node-three { right: 68px; bottom: 46px; background: var(--amber); box-shadow: 0 0 0 5px rgba(247, 206, 114, .12), 0 0 20px var(--amber); }
.visual-card { position: absolute; min-width: 118px; padding: 10px 12px; border: 1px solid #2b3d58; border-radius: 8px; background: rgba(12, 20, 35, .92); box-shadow: var(--shadow); }
.visual-card span { display: block; margin-bottom: 5px; color: #637289; font: 8px var(--mono); letter-spacing: .13em; }
.visual-card strong { color: #e8eef7; font: 500 13px var(--mono); }
.visual-card-top { top: 35px; left: 4px; }
.visual-card-bottom { right: 0; bottom: 17px; }

.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 11px; background: rgba(13, 22, 38, .8); box-shadow: 0 18px 55px rgba(0, 4, 13, .18); }
.trust-strip > div { display: flex; align-items: center; gap: 13px; padding: 17px 20px; border-right: 1px solid var(--line); }
.trust-strip > div:last-child { border-right: 0; }
.trust-icon { display: grid; place-items: center; flex: 0 0 31px; width: 31px; height: 31px; border: 1px solid #315447; border-radius: 7px; color: var(--mint); background: #122b24; font: 9px var(--mono); }
.trust-strip p { margin: 0; color: #718097; font: 9px/1.55 var(--mono); }
.trust-strip strong { display: block; margin-bottom: 3px; color: #dfe7f1; font: 500 11px var(--sans); }

.how-it-works { margin-top: 54px; padding: 27px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(145deg, rgba(17, 28, 48, .95), rgba(11, 18, 31, .95)); box-shadow: var(--shadow); }
.how-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.how-kicker { color: #6f7d94; font: 9px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.how-head h2, .section-heading h2, .workspace-heading h2 { margin: 8px 0 0; font-size: clamp(25px, 2.5vw, 35px); letter-spacing: -.045em; }
.how-note { color: var(--mint); font: 9px var(--mono); }
.how-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.how-step { position: relative; min-height: 195px; padding: 18px 16px; overflow: hidden; border: 1px solid #273753; border-radius: 9px; background: #0c1526; transition: border-color .2s ease, transform .2s ease; }
.how-step:hover { border-color: #3e5a63; transform: translateY(-3px); }
.how-number { position: absolute; top: 14px; right: 14px; color: #4d5b72; font: 9px var(--mono); }
.how-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #315c4a; border-radius: 8px; color: var(--mint); background: #163128; font-size: 16px; }
.how-step h3 { margin: 18px 0 8px; font-size: 15px; }
.how-step p { margin: 0; color: #7d8ba1; font: 9px/1.65 var(--mono); }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 52px; }
.metric-card { position: relative; min-height: 143px; overflow: hidden; padding: 18px; border: 1px solid var(--line); border-top: 2px solid transparent; border-radius: 10px; background: linear-gradient(145deg, #10192b, #0d1524); box-shadow: 0 15px 45px rgba(0, 4, 13, .17); }
.metric-card::after { position: absolute; right: -45px; bottom: -62px; width: 125px; height: 125px; border-radius: 50%; background: radial-gradient(circle, rgba(130, 243, 191, .07), transparent 68%); content: ""; }
.metric-card.accent-blue { border-top-color: var(--blue); }
.metric-card.accent-mint { border-top-color: var(--mint); }
.metric-card.accent-lilac { border-top-color: var(--lilac); }
.metric-card.accent-amber { border-top-color: var(--amber); }
.metric-top, .metric-foot { display: flex; align-items: center; justify-content: space-between; color: #8996aa; font-size: 10px; }
.metric-glyph { color: #66758d; font-size: 17px; }
.metric-card > strong { display: block; margin: 18px 0 13px; font: 500 32px var(--mono); letter-spacing: -.05em; }
.metric-negative > strong { color: #ffb0b0; }
.unit { color: #9ca9bb; font-size: 15px; }
.metric-foot { justify-content: flex-start; gap: 5px; color: #67758b; font: 9px var(--mono); }
.trend.up, .return-positive { color: var(--mint); }
.trend.down, .return-negative { color: var(--red); }
.trend.neutral { color: #98a4b5; }
.return-caution { color: var(--amber); }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 62px 0 19px; scroll-margin-top: 25px; }
.section-tools { display: flex; gap: 9px; }
.search { display: flex; align-items: center; gap: 7px; width: 230px; min-height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; color: #77859b; background: rgba(13, 21, 36, .82); }
.search input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font: 10px var(--mono); }
.search input::placeholder { color: #5e6c82; }
.export-button { padding: 0 13px; }
.export-button span { padding-left: 5px; color: var(--mint); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; background: rgba(14, 22, 38, .92); box-shadow: var(--shadow); }
.deployments-table { width: 100%; border-collapse: collapse; }
.deployments-table th { padding: 16px 15px; border-bottom: 1px solid var(--line); color: #637189; background: #0d1525; text-align: left; text-transform: uppercase; font: 600 11px var(--mono); letter-spacing: .06em; white-space: nowrap; }
.deployments-table td { padding: 18px 15px; border-bottom: 1px solid #1b273c; color: #b5c0d0; font: 13px var(--mono); }
.deployments-table tr:last-child td { border-bottom: 0; }
.result-row { cursor: pointer; transition: background .16s ease, box-shadow .16s ease; }
.result-row:hover, .result-row:focus { outline: 0; background: #142138; box-shadow: inset 3px 0 var(--mint); }
.bot-name { margin-bottom: 6px; color: #f1f5fa; font: 600 16px var(--sans); }
.bot-sub { max-width: 350px; margin: 0; overflow: hidden; color: #64728a; text-overflow: ellipsis; white-space: nowrap; font: 10px var(--mono); }
.result-link { color: var(--blue); font-size: 12px; }
.weekly-count { color: var(--mint); white-space: nowrap; }
.chevron { color: #697890; font-size: 16px; transition: transform .16s ease; }
.result-row:hover .chevron { transform: translateX(2px); color: var(--mint); }
.table-note { padding: 13px 16px; border-top: 1px solid var(--line); color: #66748a; background: #0b1322; font: 9px/1.6 var(--mono); }
.info { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-right: 7px; border: 1px solid #56667d; border-radius: 50%; color: #aab5c5; font-size: 8px; }
.evidence-pill { display: inline-flex; width: max-content; padding: 5px 8px; border: 1px solid; border-radius: 999px; white-space: nowrap; font: 500 8px var(--mono); }
.evidence-pill.reconciled { color: var(--mint); border-color: #285c49; background: #123027; }
.evidence-pill.legacy { color: var(--blue); border-color: #2a5275; background: #122941; }
.evidence-pill.research { color: var(--amber); border-color: #67552c; background: #332b19; }
.evidence-pill.rejected { color: #ffaaa7; border-color: #72404a; background: #371e26; }
.evidence-pill.paper { color: var(--mint); border-color: #285c49; background: #123027; }

.profile-section { scroll-margin-top: 25px; }
.compact-heading { margin-bottom: 18px; }
.series-note { color: #65738a; font: 9px var(--mono); }
.profile-panel { padding: 20px; border: 1px solid var(--line); border-radius: 11px; background: rgba(13, 21, 37, .92); box-shadow: var(--shadow); }
.scenario-intro { display: flex; align-items: end; justify-content: space-between; gap: 25px; padding: 3px 3px 19px; border-bottom: 1px solid var(--line); }
.scenario-intro h3 { margin: 6px 0 0; font-size: 21px; letter-spacing: -.035em; }
.scenario-intro p { max-width: 440px; margin: 0; color: #748299; text-align: right; font: 9px/1.6 var(--mono); }
.mini-label { color: #6f7d93; font: 500 8px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.scenario-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 17px; }
.scenario-card { min-width: 0; padding: 17px; border: 1px solid #273750; border-radius: 9px; background: linear-gradient(145deg, #101a2c, #0b1423); }
.card-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.card-heading h3 { margin: 6px 0 0; font-size: 17px; }
.scenario-card > p { min-height: 78px; margin: 14px 0; color: #748299; font: 9px/1.65 var(--mono); }

.sizing-control { display: grid; grid-template-columns: minmax(0, 1fr) 108px; gap: 7px 12px; align-items: center; margin-top: 17px; padding-top: 16px; border-top: 1px solid #213047; }
.sizing-control.compact { margin-top: 12px; }
.trade-input { display: flex; align-items: center; justify-content: space-between; color: #8b98ab; font: 9px var(--mono); }
.trade-input span { color: #56647a; }
.sizing-control input { width: 108px; padding: 8px 9px; border: 1px solid #31435e; border-radius: 6px; outline: 0; color: #edf2f8; background: #0b1423; text-align: right; font: 10px var(--mono); }
.sizing-control input:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(130, 243, 191, .07); }
.size-help { grid-column: 1 / -1; color: #57667d; font: 8px/1.55 var(--mono); }
.estimate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.estimate-grid > div { min-width: 0; padding: 9px; border: 1px solid #213149; border-radius: 6px; background: #101b2e; }
.estimate-grid span { display: block; margin-bottom: 6px; color: #66758b; font: 8px var(--mono); }
.estimate-grid strong { display: block; overflow-wrap: anywhere; color: var(--mint); font: 500 12px var(--mono); }
.estimate-foot { min-height: 43px; margin-top: 10px; color: #526078; font: 8px/1.55 var(--mono); }
.estimate-empty { display: grid; gap: 6px; margin-top: 17px; padding: 13px; border: 1px dashed #314159; border-radius: 7px; color: #718097; background: #0a1322; font: 9px/1.55 var(--mono); }
.estimate-empty strong { color: #bdc8d6; font: 500 11px var(--sans); }
/* Home scenarios stay deliberately open: the main card already provides the container. */
.home-scenarios .estimate-grid { gap: 15px; padding: 2px 1px 0; }
.home-scenarios .estimate-grid > div { padding: 4px 0; border: 0; border-radius: 0; background: transparent; }
.home-scenarios .estimate-grid span { margin-bottom: 5px; }

.bottom-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 12px; margin-top: 54px; }
.bottom-grid-single { grid-template-columns: minmax(0, 1fr); }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(145deg, #10192a, #0d1524); box-shadow: 0 18px 55px rgba(0, 4, 13, .18); }
.panel-heading { display: flex; align-items: start; justify-content: space-between; }
.panel h3 { margin: 9px 0 0; font-size: 20px; letter-spacing: -.035em; }
.date-pill, .verified-badge { padding: 7px 9px; border: 1px solid #30415d; border-radius: 6px; color: #8c99ad; font: 8px var(--mono); }
.verified-badge { color: var(--mint); border-color: #285945; background: #123027; }
.session-list { margin-top: 20px; }
.session-list > div { display: grid; grid-template-columns: 1fr auto; gap: 5px 15px; padding: 13px 0; border-bottom: 1px solid #1d293e; }
.session-list > div:last-child { border-bottom: 0; }
.session-name { color: #d7e0eb; font-size: 12px; }
.session-list strong { font: 500 12px var(--mono); }
.session-list small { grid-column: 1 / -1; color: #69778e; font: 8px var(--mono); }
.panel-caveat { margin: 15px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: #5f6d84; font: 8px/1.6 var(--mono); }
.evidence-definition { display: grid; grid-template-columns: 86px 1fr; align-items: center; gap: 13px; margin-top: 16px; }
.evidence-definition p { margin: 0; color: #75839a; font: 9px/1.5 var(--mono); }
.integration-callout { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; margin-top: 54px; padding: 24px; border: 1px solid #285246; border-radius: 11px; background: linear-gradient(120deg, rgba(20, 53, 45, .72), rgba(14, 23, 40, .92)); }
.integration-mark { display: grid; place-items: center; flex: 0 0 auto; width: 48px; height: 48px; border: 1px solid #4d896f; border-radius: 12px; color: #06130e; background: var(--mint); font: 700 20px var(--sans); }
.integration-callout h2 { margin: 6px 0 5px; font-size: 21px; letter-spacing: -.035em; }
.integration-callout p { margin: 0; color: #8290a5; font: 9px/1.6 var(--mono); }

.footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 48px; padding: 22px 0 4px; border-top: 1px solid #172238; color: #5f6c82; font: 8px var(--mono); letter-spacing: .06em; }
.footer > div { display: flex; align-items: center; gap: 8px; color: #9eabba; }
.footer img { width: 24px; height: 24px; }
.footer nav { display: flex; gap: 15px; }
.footer a { color: #7c899d; text-decoration: none; }
.footer a:hover { color: var(--mint); }

/* Account workspace */
.profile-body { min-height: 100vh; }
.profile-page { width: min(1380px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 28px; }
.profile-brand { display: block; width: 155px; }
.profile-brand img { display: block; width: 100%; }
.home-button { display: inline-flex; align-items: center; padding: 0 12px; }
.profile-hero { padding: 72px 0 42px; border-bottom: 1px solid #192439; }
.profile-hero h1 { max-width: 1000px; font-size: clamp(46px, 5vw, 67px); }
.profile-hero-copy > p { max-width: 730px; margin: 0; color: #98a6ba; font-size: 15px; line-height: 1.7; }
.profile-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 15px; margin-top: 38px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: rgba(13, 22, 38, .8); }
.profile-flow > div { display: grid; grid-template-columns: auto 1fr; gap: 2px 9px; align-items: center; }
.profile-flow span { grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #315647; border-radius: 8px; color: var(--mint); background: #122b24; font: 9px var(--mono); }
.profile-flow strong { font-size: 12px; }
.profile-flow small { color: #69788e; font: 8px var(--mono); }
.profile-flow i { color: #495870; font-style: normal; }
.notice { display: flex; gap: 12px; margin-top: 22px; padding: 14px 16px; border: 1px solid; border-radius: 8px; }
.notice strong { font-size: 12px; }
.notice span { color: #8794a8; font: 9px/1.6 var(--mono); }
.notice.success { border-color: #2f614d; background: #113027; }
.notice.error { border-color: #663e48; background: #301c24; }
.alpaca-connect { display: grid; grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr); gap: 20px; margin-top: 32px; padding: 26px; border: 1px solid #2c4f48; border-radius: 12px; background: linear-gradient(135deg, rgba(18, 48, 41, .65), rgba(12, 21, 37, .96) 58%); box-shadow: var(--shadow); scroll-margin-top: 20px; }
.integration-lockup { display: flex; align-items: center; gap: 14px; }
.integration-lockup h2 { margin: 5px 0 0; font-size: 25px; }
.connection-copy > p { max-width: 600px; margin: 18px 0 20px; color: #91a0b3; font-size: 13px; line-height: 1.65; }
.scope-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.scope-list span { padding: 10px; border: 1px solid #29463f; border-radius: 7px; color: #b9c5d2; background: rgba(8, 25, 22, .45); font: 9px var(--mono); }
.scope-list b { display: block; margin-bottom: 5px; color: #637f74; text-transform: uppercase; font-size: 7px; letter-spacing: .1em; }
.connection-control { padding: 20px; border: 1px solid #2b3b53; border-radius: 9px; background: rgba(8, 15, 27, .76); }
.connection-status { display: flex; align-items: start; gap: 12px; }
.connection-signal { flex: 0 0 auto; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: #66758a; box-shadow: 0 0 0 4px rgba(102, 117, 138, .12); }
.connection-status.connected .connection-signal { background: var(--mint); box-shadow: 0 0 0 4px rgba(130, 243, 191, .12); }
.connection-status.error .connection-signal { background: var(--amber); box-shadow: 0 0 0 4px rgba(247, 206, 114, .1); }
.connection-status strong { font-size: 14px; }
.connection-status p { margin: 6px 0 0; color: #75849a; font: 9px/1.6 var(--mono); }
.connection-actions { display: flex; gap: 8px; margin-top: 19px; }
.connection-footnote { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid #243149; color: #5f6e84; font: 8px/1.6 var(--mono); }
.workspace-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin: 64px 0 19px; }
.workspace-heading p { max-width: 690px; margin: 10px 0 0; color: #7f8da2; font: 9px/1.65 var(--mono); }
.workspace-badge { padding: 9px 11px; border: 1px solid #2a3b55; border-radius: 7px; color: #718096; background: #101a2c; white-space: nowrap; font: 8px var(--mono); }
.profile-intro { display: flex; align-items: center; gap: 6px; padding-bottom: 17px; border-bottom: 1px solid var(--line); color: #9aa7b9; font: 9px var(--mono); }
.profile-disclaimer { margin-left: auto; color: #65738a; }
.sizing-method { margin: 16px 0 4px; padding: 13px 14px; border: 1px solid #2d405b; border-radius: 7px; color: #8391a6; background: #101a2d; font: 9px/1.65 var(--mono); }
.sizing-method strong { margin-right: 5px; color: #e5ebf3; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.profile-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid #293950; border-radius: 13px; background: linear-gradient(150deg, #101a2c, #0a1322); box-shadow: 0 18px 45px rgba(0, 4, 13, .18); }
.profile-card::before { position: absolute; top: 0; right: 0; left: 0; height: 2px; background: #3b4f6c; content: ""; }
.profile-card.reconciled::before { background: var(--mint); }
.profile-card.legacy::before { background: var(--blue); }
.profile-card.research::before { background: var(--amber); }
.profile-card.rejected::before { background: var(--red); }
.profile-card.paper::before { background: var(--mint); }
.profile-card-header { display: flex; align-items: start; justify-content: space-between; gap: 24px; padding: 29px 31px 25px; border-bottom: 1px solid #213149; background: radial-gradient(circle at right top, rgba(83, 158, 151, .10), transparent 32rem); }
.profile-card-header h3 { margin: 7px 0 7px; font-size: clamp(29px, 3vw, 36px); letter-spacing: -.055em; }
.profile-card-header .bot-sub { max-width: 790px; white-space: normal; color: #93a1b4; font: 14px/1.65 var(--sans); }
.profile-state { padding: 7px 10px; border: 1px solid; border-radius: 999px; white-space: nowrap; font: 9px var(--mono); }
.profile-state.reconciled { color: var(--mint); border-color: #285a48; background: #123027; }
.profile-state.legacy { color: var(--blue); border-color: #2a5275; background: #122941; }
.profile-state.research { color: var(--amber); border-color: #67552c; background: #332b19; }
.profile-state.rejected { color: #ffaaa7; border-color: #72404a; background: #371e26; }
.profile-state.paper { color: var(--mint); border-color: #285c49; background: #123027; }
.profile-card-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(390px, .85fr); gap: 48px; padding: 28px 31px; }
.profile-narrative { min-width: 0; }
.profile-performance { min-width: 0; padding-left: 29px; border-left: 1px solid #26364d; }
.profile-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 13px; border-top: 1px solid #2a3b53; }
.profile-metrics span { min-width: 0; padding: 15px 13px 14px 0; border-bottom: 1px solid #2a3b53; color: var(--mint); font: 500 15px var(--mono); }
.profile-metrics span:nth-child(3n + 2), .profile-metrics span:nth-child(3n) { padding-left: 13px; }
.profile-metrics span:nth-child(3n + 2) { border-right: 1px solid #2a3b53; border-left: 1px solid #2a3b53; }
.profile-metrics b { display: block; margin-bottom: 7px; color: #718198; text-transform: uppercase; font-size: 8px; letter-spacing: .08em; }
.profile-source { min-height: 0; max-width: 730px; margin: 0; color: #b3becc; font: 14px/1.72 var(--sans); }
.live-check { display: flex; align-items: start; gap: 11px; min-height: 0; margin-top: 19px; padding: 0 0 0 14px; border: 0; border-left: 2px solid #355470; border-radius: 0; color: #aeb9c8; background: transparent; font: 12px/1.65 var(--sans); }
.live-check .status-dot { flex: 0 0 auto; margin-top: 4px; }
.delivery-note { display: flex; gap: 12px; min-height: 0; margin-top: 17px; padding: 0 0 0 14px; border: 0; border-left: 2px solid #4d675f; border-radius: 0; color: var(--blue); background: transparent; }
.delivery-note strong { display: block; margin-bottom: 5px; color: #aebfd1; font: 500 9px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.delivery-note p { margin: 0; color: #92a2b5; font: 12px/1.6 var(--sans); }
.profile-access { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: end; padding: 22px 31px 25px; border-top: 1px solid #213149; background: rgba(5, 11, 22, .26); }
.profile-access .sizing-control { margin: 0; padding: 0; border: 0; }
.profile-access .estimate-grid { max-width: 690px; }
.profile-access .estimate-empty { margin: 0; padding: 0; border: 0; background: transparent; }
.purchase-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-width: 285px; margin: 0; padding: 0; border: 0; }
.purchase-row > div { display: grid; gap: 4px; }
.purchase-row > div strong { font-size: 15px; }
.purchase-row > div span { color: #718198; font: 10px var(--mono); }
.purchase-row button { min-height: 43px; padding: 0 17px; border: 1px solid #31425c; border-radius: 7px; color: #8491a4; background: #111a2b; font: 10px var(--mono); }
.purchase-row.review button { color: var(--amber); border-color: #5b4c2b; background: #2b2518; }
.purchase-row.unavailable button { color: #ffaaa7; border-color: #603b45; background: #2d1c23; }
.risk-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin-top: 30px; padding: 18px; border: 1px solid #50452c; border-radius: 9px; background: rgba(44, 37, 21, .56); }
.risk-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #715f34; border-radius: 50%; color: var(--amber); font: 500 14px var(--mono); }
.risk-banner strong { color: #e7ddc5; }
.risk-banner p { margin: 4px 0 0; color: #92866c; font: 8px/1.6 var(--mono); }
.risk-banner a { color: var(--amber); white-space: nowrap; text-decoration: none; font: 9px var(--mono); }

/* P&L modal */
body.modal-open { overflow: hidden; }
.pnl-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(2, 5, 12, .84); backdrop-filter: blur(8px); }
.pnl-dialog { position: relative; width: min(820px, 100%); max-height: 90vh; overflow: auto; padding: 27px; border: 1px solid #3a4d6b; border-radius: 12px; background: linear-gradient(160deg, #111b2e, #0c1423); box-shadow: 0 28px 90px #0009; }
.pnl-close { position: absolute; top: 12px; right: 15px; border: 0; color: #9aa8bc; background: transparent; font-size: 27px; cursor: pointer; }
.pnl-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-top: 13px; }
.pnl-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.045em; }
.pnl-heading p { margin: 6px 0 0; color: #8997ad; font: 9px var(--mono); }
.pnl-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 21px 0 11px; }
.pnl-meta span { padding: 10px 12px; border: 1px solid #22334e; border-radius: 6px; color: #6f7d94; background: #0b1423; font: 10px var(--mono); }
.pnl-meta strong { display: block; margin-top: 5px; color: #dce5f1; font-size: 13px; }
.pnl-chart { min-height: 270px; padding: 8px; border: 1px solid #22334e; border-radius: 7px; background: linear-gradient(180deg, #0b1525, #08111f); }
.pnl-chart svg { width: 100%; height: 270px; }
.pnl-chart text { fill: #66758b; font: 9px var(--mono); }
.pnl-zero { stroke: #35445e; stroke-dasharray: 4 4; }
.pnl-line { fill: none; stroke: var(--mint); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.pnl-point { fill: var(--mint); stroke: #0b1322; stroke-width: 3; }
.pnl-size-input { display: flex; align-items: center; gap: 10px; margin-top: 15px; color: #8997ad; font: 9px var(--mono); }
.pnl-size-input span { margin-left: auto; color: #59687f; }
.pnl-size-input input { width: 116px; padding: 8px 9px; border: 1px solid #32425e; border-radius: 6px; color: #e9eef6; background: #0c1525; text-align: right; font: 10px var(--mono); }
.pnl-note { margin: 13px 0 0; color: #66758b; font: 9px/1.6 var(--mono); }
.monthly-evidence { margin: 22px 0 18px; padding: 16px; border: 1px solid #2b4159; border-radius: 9px; background: linear-gradient(145deg, rgba(14, 31, 43, .76), rgba(10, 19, 34, .92)); }
.monthly-evidence.unavailable { border-color: #51462d; background: linear-gradient(145deg, rgba(51, 42, 23, .68), rgba(16, 22, 34, .94)); }
.monthly-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.monthly-heading h3 { margin: 6px 0 0; font-size: 21px; letter-spacing: -.03em; }
.monthly-source { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 11px; color: #8191a8; font: 10px/1.5 var(--mono); }
.monthly-source span { padding: 5px 7px; border: 1px solid #263a52; border-radius: 5px; background: #0a1525; }
.monthly-table-wrap { overflow-x: auto; border: 1px solid #2a3d56; border-radius: 7px; }
.monthly-table { width: 100%; min-width: 620px; border-collapse: collapse; }
.monthly-table th, .monthly-table td { padding: 14px 13px; border-bottom: 1px solid #21324a; text-align: right; color: #b9c5d5; font: 12px var(--mono); }
.monthly-table thead th { color: #6f8097; background: #0b1626; text-transform: uppercase; font-size: 9px; letter-spacing: .08em; }
.monthly-table th:first-child, .monthly-table tbody th { text-align: left; }
.monthly-table tbody tr:last-child th, .monthly-table tbody tr:last-child td { border-bottom: 0; }
.monthly-table tbody th { color: #dfe7f2; font-weight: 500; }
.monthly-table small { display: block; margin-top: 4px; color: #627189; font-size: 9px; font-weight: 400; }
.monthly-caveat, .monthly-evidence.unavailable > p { margin: 13px 0 0; color: #75849a; font: 10px/1.65 var(--mono); }
.monthly-evidence.unavailable .monthly-caveat { color: #9d9174; }

/* Legal pages */
.legal-page { width: min(980px, calc(100% - 40px)); margin: 0 auto; padding-bottom: 56px; }
.legal-page .topbar { border-bottom: 1px solid var(--line); }
.legal-hero { padding: 58px 0 30px; border-bottom: 1px solid var(--line); }
.legal-hero h1 { margin: 12px 0; font-size: 46px; letter-spacing: -.05em; }
.legal-meta { color: var(--faint); font: 9px/1.7 var(--mono); }
.legal-note { margin-top: 20px; padding: 14px 16px; border: 1px solid #3f4f66; border-radius: 8px; color: #b9c4d3; background: #151f32; font: 9px/1.65 var(--mono); }
.legal-content { max-width: 790px; padding-top: 26px; }
.legal-content h2 { margin: 32px 0 9px; font-size: 19px; letter-spacing: -.025em; }
.legal-content p, .legal-content li { color: #aab6c8; font-size: 13px; line-height: 1.75; }
.legal-content ul { padding-left: 20px; }
.legal-content strong { color: #eef3fa; }
.legal-content a { color: var(--mint); }
.legal-contact { padding: 17px 18px; border: 1px solid var(--line); border-radius: 8px; color: #aab6c8; background: var(--panel); font: 11px/1.7 var(--mono); }

@media (max-width: 1180px) {
  .sidebar { flex-basis: 212px; width: 212px; }
  .main-content { width: calc(100% - 212px); padding: 0 30px 26px; }
  .hero { grid-template-columns: 1fr 360px; }
  .hero-visual { transform: scale(.86); }
  .how-step { min-height: 215px; }
  .deployments-table th:nth-child(7), .deployments-table td:nth-child(7), .deployments-table th:nth-child(8), .deployments-table td:nth-child(8) { display: none; }
  .profile-page { width: min(100% - 36px, 1280px); }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main-content { width: 100%; padding: 0 22px 25px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
  .mobile-brand img { width: 27px; }
  .breadcrumbs { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 72px 2% 48px; }
  .hero-visual { display: none; }
  .trust-strip { grid-template-columns: 1fr; }
  .trust-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .trust-strip > div:last-child { border-bottom: 0; }
  .how-steps { grid-template-columns: repeat(2, 1fr); }
  .how-step { min-height: 180px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .scenario-grid { grid-template-columns: 1fr; }
  .scenario-card > p { min-height: 0; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-card-body { grid-template-columns: 1fr; gap: 28px; }
  .profile-performance { padding: 25px 0 0; border-top: 1px solid #26364d; border-left: 0; }
  .profile-access { grid-template-columns: 1fr; align-items: start; }
  .alpaca-connect { grid-template-columns: 1fr; }
  .workspace-heading { align-items: start; flex-direction: column; }
}

@media (max-width: 700px) {
  .main-content { padding: 0 15px 20px; }
  .topbar { min-height: 64px; }
  .read-only { display: none; }
  .hero { padding: 50px 0 35px; }
  .hero h1, .profile-hero h1 { font-size: 43px; }
  .hero-copy { font-size: 14px; }
  .how-it-works { padding: 18px; }
  .how-head, .section-heading, .scenario-intro { align-items: start; flex-direction: column; }
  .how-note, .series-note { margin-top: 4px; }
  .how-steps { grid-template-columns: 1fr; }
  .how-step { min-height: 0; }
  .metric-grid { grid-template-columns: 1fr; }
  .section-heading { margin-top: 48px; }
  .section-tools { width: 100%; }
  .search { flex: 1; width: auto; }
  .table-wrap { overflow-x: auto; }
  .deployments-table { min-width: 760px; }
  .bottom-grid { grid-template-columns: 1fr; }
  .integration-callout { grid-template-columns: auto 1fr; }
  .integration-callout .button { grid-column: 1 / -1; }
  .footer { align-items: flex-start; flex-wrap: wrap; }
  .footer > span { order: 3; width: 100%; }
  .profile-page { width: calc(100% - 28px); }
  .profile-brand { width: 130px; }
  .profile-hero { padding-top: 50px; }
  .profile-card-header { gap: 14px; padding: 23px 21px 20px; }
  .profile-card-header .bot-sub, .profile-source { font-size: 12px; }
  .profile-card-body { padding: 23px 21px; }
  .profile-access { gap: 22px; padding: 20px 21px 23px; }
  .profile-flow { grid-template-columns: repeat(2, 1fr); }
  .profile-flow i { display: none; }
  .alpaca-connect { padding: 18px; }
  .scope-list { grid-template-columns: 1fr; }
  .workspace-badge { white-space: normal; }
  .profile-disclaimer { display: none; }
  .risk-banner { grid-template-columns: auto 1fr; }
  .risk-banner a { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .top-actions { gap: 7px; }
  .home-button { display: none; }
  .sign-in-button { padding: 0 9px; }
  .hero h1, .profile-hero h1 { font-size: 38px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .section-tools { flex-direction: column; }
  .search, .export-button { width: 100%; }
  .profile-flow { grid-template-columns: 1fr; }
  .profile-metrics { grid-template-columns: repeat(2, 1fr); }
  .estimate-grid { grid-template-columns: 1fr; }
  .sizing-control { grid-template-columns: 1fr; }
  .sizing-control input { width: 100%; }
  .purchase-row { align-items: stretch; flex-direction: column; }
  .purchase-row .button, .purchase-row button { width: 100%; }
  .connection-actions { align-items: stretch; flex-direction: column; }
  .pnl-dialog { padding: 20px; }
  .pnl-heading { flex-direction: column; }
  .monthly-evidence { padding: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
