:root {
  color-scheme: dark;
  --bg: #090b0d;
  --bg-soft: #0d1013;
  --sidebar: #0a0d10;
  --panel: #101317;
  --panel-strong: #15191e;
  --panel-soft: #0d1013;
  --border: #22272d;
  --border-soft: #1a1f24;
  --border-gold: #30363d;
  --text: #f3f4f6;
  --text-soft: #c5cbd0;
  --muted: #8e969f;
  --muted-dark: #626b74;
  --gold: #8f989f;
  --gold-bright: #d8dde5;
  --gold-soft: rgba(216, 221, 229, 0.055);
  --green: #59b779;
  --green-soft: rgba(89, 183, 121, 0.12);
  --red: #d0645c;
  --sidebar-width: 92px;
  --sidebar-expanded-width: 310px;
  --topbar-height: 98px;
  --content-width: 1540px;
  --radius: 12px;
  --shadow: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, a { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-150%);
  border-radius: 6px;
  background: var(--gold-bright);
  color: #0b0d0f;
  padding: 10px 15px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 750;
}
.skip-link:focus { transform: translateY(0); }

.cabinet-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }

.sidebar {
  position: relative;
  z-index: 40;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--sidebar);
  padding: 28px 16px 18px;
}

.sidebar-header { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.brand { display: inline-flex; align-items: center; gap: 13px; color: var(--text); text-decoration: none; }
.brand-mark { color: var(--text); font-size: 35px; font-weight: 760; letter-spacing: 0.025em; line-height: 1; }
.brand-divider { width: 1px; height: 39px; background: var(--border); }
.brand-product { color: #aeb4b7; font-size: 11px; font-weight: 700; letter-spacing: 0.2em; line-height: 1.35; text-transform: uppercase; }

.icon-button { display: grid; place-items: center; border: 1px solid var(--border); background: var(--panel-soft); color: var(--muted); }
.icon-button svg { width: 21px; height: 21px; }
.sidebar-close { display: none; width: 40px; height: 40px; border-radius: 8px; }

.primary-nav { margin-top: 48px; }
.nav-label { margin: 0 18px 14px; color: #707a7f; font-size: 10px; font-weight: 760; letter-spacing: 0.16em; text-transform: uppercase; }
.nav-item {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 34px 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #aeb5b9;
  padding: 9px 17px;
  text-align: left;
  font-size: 15px;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.nav-item + .nav-item { margin-top: 4px; }
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.025); }
.nav-item.is-active {
  border-color: var(--border-gold);
  background: #15191e;
  color: var(--text);
  box-shadow: inset -2px 0 0 #8b949d;
}
.nav-icon { width: 25px; height: 25px; color: #9ba3a8; }
.nav-item.is-active .nav-icon, .nav-item.is-active .nav-index { color: var(--gold-bright); }
.nav-index { color: #687278; font-size: 11px; font-weight: 680; }
.nav-text { min-width: 0; line-height: 1.35; }

.sidebar-spacer { flex: 1; min-height: 30px; }
.sidebar-account { border-top: 1px solid var(--border-soft); padding-top: 24px; }
.profile-entry, .logout-entry {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel-soft);
  color: var(--text);
}
.profile-entry {
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  text-align: left;
}
.profile-entry:hover, .logout-entry:hover { border-color: #344047; background: var(--panel-strong); }
.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #4a525b;
  border-radius: 50%;
  background: #12161a;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 760;
}
.profile-copy { min-width: 0; display: grid; gap: 5px; }
.profile-copy strong { overflow: hidden; font-size: 13px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.chevron { width: 18px; height: 18px; color: #7b858b; }
.logout-entry { min-height: 54px; display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 0 18px; color: #db655b; text-align: left; font-size: 13px; font-weight: 620; }
.logout-entry svg { width: 23px; height: 23px; }

.sidebar-backdrop { position: fixed; inset: 0; z-index: 30; border: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(3px); }

.workspace { min-width: 0; height: 100vh; display: grid; grid-template-rows: var(--topbar-height) minmax(0, 1fr); }
.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border-soft);
  padding: 0 36px 0 42px;
  background: rgba(7, 11, 14, 0.9);
  backdrop-filter: blur(18px);
}
.topbar-context { display: flex; align-items: center; gap: 15px; }
.topbar-kicker { margin: 0 0 4px; color: var(--gold); font-size: 10px; font-weight: 750; letter-spacing: 0.13em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-size: 25px; font-weight: 520; letter-spacing: -0.02em; }
.menu-button { display: none; width: 42px; height: 42px; border-radius: 8px; }
.topbar-actions { display: flex; align-items: center; gap: 24px; }
.access-pill { min-width: 205px; min-height: 56px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--border-gold); border-radius: 9px; background: #0d1013; padding: 8px 15px; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #747e84; box-shadow: 0 0 0 4px rgba(116, 126, 132, 0.08); }
.access-pill > span:last-child, .top-profile-copy { display: grid; gap: 3px; }
.access-pill strong { color: var(--text-soft); font-size: 12px; font-weight: 650; }
.access-pill small, .top-profile small { color: var(--muted); font-size: 10px; }
.top-profile { display: grid; grid-template-columns: 42px minmax(0, 1fr) 18px; align-items: center; gap: 12px; border: 0; background: transparent; color: var(--text); padding: 5px; text-align: left; }
.top-profile strong { font-size: 12px; font-weight: 620; }

.content { min-width: 0; overflow-y: auto; padding: 30px 34px 60px; scroll-behavior: smooth; }
.view { width: min(100%, var(--content-width)); margin: 0 auto; animation: view-in 220ms ease; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 8px; color: #9aa1aa; font-size: 10px; font-weight: 740; letter-spacing: 0.12em; text-transform: uppercase; }
.demo-notice { min-height: 34px; display: flex; align-items: center; gap: 10px; margin-bottom: 15px; color: var(--muted); font-size: 10px; }
.demo-notice span, .demo-badge, .status-chip { border: 1px solid var(--border); border-radius: 999px; background: var(--panel-soft); color: var(--text-soft); padding: 5px 8px; font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.demo-notice p { margin: 0; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.overview-main { min-width: 0; display: grid; gap: 24px; }
.overview-aside { min-width: 0; display: grid; gap: 20px; }

.hero-card { min-height: 255px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); overflow: hidden; }
.hero-copy { position: relative; z-index: 2; padding: 27px 30px 25px; }
.hero-copy h2 { max-width: 780px; margin: 0; font-size: clamp(25px, 2.3vw, 38px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.12; }
.hero-copy > p:last-of-type { max-width: 690px; margin: 15px 0 0; color: var(--text-soft); font-size: 13px; line-height: 1.62; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border-radius: 8px; padding: 0 18px; text-decoration: none; font-size: 12px; font-weight: 650; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.button:hover { transform: translateY(-1px); }
.button svg { width: 18px; height: 18px; }
.button-primary { border: 1px solid #d8dde5; background: #d8dde5; color: #090b0d; }
.button-primary:hover { border-color: #eef0f2; background: #eef0f2; }
.button-secondary { border: 1px solid #384249; background: #151b1f; color: var(--text); }
.button-outline { border: 1px solid var(--border-gold); background: var(--gold-soft); color: var(--gold-bright); }
.button-outline:hover { border-color: #505861; background: rgba(216, 221, 229, .085); }
.full-width { width: 100%; }

.hero-visual { position: relative; min-height: 255px; overflow: hidden; background: radial-gradient(circle at 52% 50%, rgba(197, 203, 208, .08), transparent 18%); }
.hero-visual::before, .hero-visual::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 400px; height: 1px; background: linear-gradient(90deg, transparent, rgba(161, 170, 178, .22), transparent); transform: translate(-50%, -50%) rotate(25deg); }
.hero-visual::after { transform: translate(-50%, -50%) rotate(-25deg); }
.orbit { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(151, 160, 168, .18); border-radius: 50%; transform: translate(-50%, -50%) rotate(-12deg); }
.orbit-one { width: 250px; height: 110px; }
.orbit-two { width: 330px; height: 160px; opacity: .55; transform: translate(-50%, -50%) rotate(17deg); }
.core-cube { position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; display: grid; place-items: center; border: 1px solid #596168; background: #171b1f; box-shadow: inset 0 0 0 1px rgba(255,255,255,.018); transform: translate(-50%, -50%) rotate(9deg); }
.core-cube::before { content: ""; position: absolute; inset: 9px; border: 1px solid #353c43; }
.core-cube span { color: var(--gold-bright); font-size: 17px; font-weight: 780; letter-spacing: .08em; transform: rotate(-9deg); }
.node { position: absolute; width: 7px; height: 7px; border: 1px solid #68717a; border-radius: 50%; background: var(--bg); box-shadow: none; }
.node-one { left: 15%; top: 25%; }.node-two { right: 13%; top: 30%; }.node-three { left: 18%; bottom: 23%; }.node-four { right: 16%; bottom: 18%; }

.section-heading, .chart-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-heading h3, .chart-header h3 { margin: 0; font-size: 16px; font-weight: 560; }
.compact-heading { margin-bottom: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.metric-card { position: relative; min-height: 117px; display: grid; align-content: start; gap: 7px; overflow: hidden; padding: 17px 15px; box-shadow: none; }
.metric-card > span { color: #a7afb3; font-size: 9px; font-weight: 730; letter-spacing: .075em; text-transform: uppercase; }
.metric-card strong { font-size: clamp(19px, 1.55vw, 26px); font-weight: 520; letter-spacing: -.03em; }
.metric-card small { max-width: 120px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.metric-card > svg { position: absolute; right: 12px; bottom: 13px; width: 24px; height: 24px; color: #6f7880; }
.metric-card.is-positive strong { color: var(--green); font-weight: 620; }
.metric-card.is-negative strong { color: var(--red); font-weight: 620; }

.portfolio-panel { padding: 20px 20px 14px; }
.chart-meta { display: flex; align-items: center; gap: 25px; color: var(--text-soft); font-size: 10px; }
.chart-meta span { display: grid; gap: 4px; }
.chart-meta small { color: var(--muted); font-size: 9px; }
.chart-meta button { height: 36px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel-soft); color: var(--muted); padding: 0 13px; font-size: 10px; }
.chart-and-strategies { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .65fr); gap: 20px; margin-top: 18px; }
.chart-wrap { min-width: 0; padding-top: 1px; }
.chart-legend { display: flex; gap: 24px; color: var(--muted); font-size: 9px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.chart-legend span::before { content: ""; width: 25px; height: 2px; background: var(--gold); }
.chart-legend .legend-capital::before { height: 1px; background: repeating-linear-gradient(90deg, #758087 0 5px, transparent 5px 9px); }
.demo-chart { width: 100%; height: auto; margin-top: 11px; }
.chart-grid-lines { fill: none; stroke: rgba(119, 132, 139, .12); stroke-width: 1; }
.capital-line { fill: none; stroke: #7a858b; stroke-width: 1.4; stroke-dasharray: 7 7; }
.chart-area { fill: url(#chartFill); stroke: none; }
.balance-line { fill: none; stroke: #aeb5bb; stroke-width: 2; }
.chart-points circle { fill: #b7bdc2; stroke: #343b42; stroke-width: 2; }
.chart-axis { display: flex; justify-content: space-between; padding: 2px 0 0 6%; color: #737e84; font-size: 8px; }
.strategy-preview { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 9px; background: rgba(5, 9, 11, .46); padding: 15px; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.preview-heading h4 { margin: 0; color: var(--gold); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.preview-heading button, .text-action { border: 0; background: transparent; color: var(--gold); font-size: 10px; }
.strategy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 9px; border-bottom: 1px solid var(--border-soft); padding: 15px 0; }
.strategy-row > span:first-child, .result { display: grid; gap: 4px; }
.strategy-row strong { font-size: 11px; }
.strategy-row small { color: var(--muted); font-size: 8px; }
.strategy-row em { border-radius: 4px; background: var(--green-soft); color: var(--green); padding: 5px 6px; font-size: 8px; font-style: normal; font-weight: 730; }
.result { text-align: right; font-size: 11px; font-weight: 650; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.strategy-preview .button { margin-top: auto; min-height: 40px; }

.documents-panel { padding: 19px 20px 20px; }
.document-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
.document-card { min-height: 125px; display: grid; align-content: center; justify-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; background: rgba(4,8,10,.3); color: var(--text); padding: 12px 8px; text-align: center; }
.document-card:hover { border-color: var(--border-gold); background: var(--gold-soft); }
.document-card svg { width: 29px; height: 29px; color: var(--gold); margin-bottom: 3px; }
.document-card strong { font-size: 10px; font-weight: 620; }
.document-card small { color: var(--muted); font-size: 8px; line-height: 1.35; }

.next-step-card, .access-card, .help-card { padding: 24px; }
.aside-label { display: flex; align-items: flex-start; justify-content: space-between; color: var(--gold); font-size: 10px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.aside-label svg { width: 42px; height: 42px; border-radius: 50%; background: var(--gold-soft); padding: 9px; }
.next-step-card h3 { margin: 14px 0 8px; font-size: 18px; font-weight: 540; }
.next-step-card p { min-height: 65px; margin: 0 0 20px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.access-card dl { display: grid; gap: 17px; margin: 21px 0 24px; }
.access-card dl div { display: flex; justify-content: space-between; gap: 20px; }
.access-card dt { color: var(--muted); font-size: 11px; }
.access-card dd { margin: 0; color: var(--text-soft); font-size: 11px; text-align: right; }
.access-card .muted-value { color: var(--muted); }
.help-card { min-height: 300px; }
.help-card > button { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr) 16px; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid var(--border-soft); background: transparent; color: var(--text); padding: 16px 0; text-align: left; }
.help-card > button:hover strong { color: var(--gold-bright); }
.help-card > button > svg:first-child { width: 24px; height: 24px; color: #aeb6ba; }
.help-card button span { display: grid; gap: 4px; }
.help-card strong { font-size: 11px; font-weight: 580; }
.help-card small { color: var(--muted); font-size: 9px; }
.cabinet-footer { padding: 2px 0 0; color: #606b71; font-size: 9px; text-align: center; }
.cabinet-footer span { color: var(--gold); margin: 0 8px; }

/* Secondary views */
.page-heading { min-height: 150px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; border-bottom: 1px solid var(--border-soft); padding: 14px 0 28px; margin-bottom: 25px; }
.page-heading h2 { margin: 0; font-size: clamp(35px, 4.3vw, 58px); font-weight: 480; letter-spacing: -.045em; line-height: 1; }
.page-heading p:last-child { max-width: 720px; margin: 17px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.status-chip { flex: 0 0 auto; color: var(--muted); }
.status-chip.is-ready { border-color: rgba(65,179,106,.3); background: var(--green-soft); color: var(--green); }
.catalog-heading { margin-bottom: 0; }
.catalog-toolbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--border-soft); padding: 17px 2px; }
.catalog-toolbar p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.catalog-count { flex: 0 0 auto; color: var(--text-soft); font-size: 11px; }
.strategy-view.is-detail .catalog-heading, .strategy-view.is-detail .catalog-toolbar { display: none; }
.strategy-view.is-detail .strategy-catalog { margin-top: 0; }
.strategy-catalog { display: grid; gap: 12px; margin-top: 18px; }
.strategy-catalog-row {
  width: 100%;
  min-height: 116px;
  display: grid;
  grid-template-columns: minmax(210px, 1.5fr) minmax(92px, .62fr) minmax(120px, .8fr) minmax(96px, .62fr) minmax(105px, .7fr) 28px;
  align-items: center;
  gap: 16px;
  color: var(--text);
  padding: 20px 22px;
  text-align: left;
  box-shadow: none;
}
.strategy-catalog-row:hover { border-color: #3a424a; background: #13171b; }
.strategy-catalog-row:active { transform: translateY(1px); }
.strategy-identity { min-width: 0; display: flex; align-items: center; gap: 16px; }
.strategy-identity > span:last-child, .strategy-metric { min-width: 0; display: grid; gap: 8px; }
.strategy-number { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #343b42; border-radius: 50%; background: #151a1e; color: #929ba3; font-size: 9px; font-weight: 720; }
.strategy-identity small, .strategy-metric small { color: #737c84; font-size: 9px; font-weight: 720; letter-spacing: .1em; text-transform: uppercase; }
.strategy-identity strong { overflow: hidden; font-size: 16px; font-weight: 570; letter-spacing: .015em; text-overflow: ellipsis; white-space: nowrap; }
.strategy-metric { min-height: 48px; align-content: center; border-left: 1px solid var(--border-soft); padding-left: 17px; }
.strategy-metric strong { overflow: hidden; color: var(--text-soft); font-size: 14px; font-weight: 540; text-overflow: ellipsis; white-space: nowrap; }
.strategy-row-open { width: 28px; height: 28px; display: grid; place-items: center; justify-self: end; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); }
.strategy-row-open svg { width: 15px; height: 15px; }
.strategy-state { min-height: 150px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); color: var(--muted); padding: 28px; text-align: center; }
.strategy-state-error { gap: 18px; align-content: center; }
.strategy-state-error p { margin: 0; }
.strategy-state-error .button { min-width: 130px; }
.strategy-back { width: max-content; border: 0; background: transparent; color: var(--text-soft); padding: 3px 0; font-size: 11px; }
.strategy-back:hover { color: var(--text); }
.strategy-back-state { margin-bottom: 2px; }
.strategy-detail-dashboard { min-width: 0; display: grid; grid-template-columns: minmax(350px, 420px) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.strategy-detail-summary { min-width: 0; display: grid; grid-template-rows: auto 1fr; gap: 10px; }
.strategy-detail-header { min-height: 118px; display: grid; align-content: center; gap: 9px; padding: 15px 18px; }
.strategy-detail-header h2 { margin: 4px 0 5px; font-size: clamp(25px, 2vw, 30px); font-weight: 520; letter-spacing: -.03em; }
.strategy-detail-header > div > p:last-child { display: none; }
.strategy-trust-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--border-soft); padding-top: 8px; }
.strategy-detail-metric { min-width: 0; display: grid; align-content: center; gap: 5px; padding: 10px 12px; }
.strategy-trust-summary .strategy-detail-metric + .strategy-detail-metric { border-left: 1px solid var(--border-soft); }
.strategy-detail-metric dt { color: #737c84; font-size: 9px; font-weight: 720; letter-spacing: .1em; text-transform: uppercase; }
.strategy-detail-metric dd { margin: 0; color: var(--text); font-size: 16px; font-weight: 550; line-height: 1.2; }
.strategy-chart { min-width: 0; display: grid; align-content: start; padding: 17px 18px 12px; }
.strategy-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 5px; }
.strategy-section-heading h3 { margin: 3px 0 0; font-size: 17px; font-weight: 540; }
.strategy-section-heading > span { color: var(--muted); font-size: 9px; }
.strategy-history-chart { width: 100%; height: auto; overflow: visible; }
.chart-grid-line { stroke: #232a30; stroke-width: 1; }
.chart-zero-line { stroke: #717b84; stroke-width: 1.2; stroke-dasharray: 4 5; }
.chart-result-line { fill: none; stroke: #c4cbd2; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-result-point { fill: #11161a; stroke: #d8dde5; stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.chart-axis-label { fill: #7f8891; stroke: none; font-size: 11px; font-weight: 520; }
.chart-date-label { font-size: 10px; }
.strategy-chart-empty, .strategy-history-empty { min-height: 120px; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: 11px; text-align: center; }
.strategy-detail-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.strategy-detail-metrics .strategy-detail-metric { min-height: 66px; border-right: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.strategy-detail-metrics .strategy-detail-metric:nth-child(2n) { border-right: 0; }
.strategy-detail-metrics .strategy-detail-metric:nth-last-child(-n+2) { border-bottom: 0; }
.strategy-detail-metrics .metric-insufficient dd { max-width: 170px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.strategy-history { overflow: hidden; }
.strategy-history-summary { min-height: 62px; display: grid; grid-template-columns: minmax(0, 1fr) auto 26px; align-items: center; gap: 16px; padding: 10px 18px; cursor: pointer; list-style: none; }
.strategy-history-summary::-webkit-details-marker { display: none; }
.strategy-history-summary > span:first-child { display: grid; gap: 4px; }
.strategy-history-summary small { color: #737c84; font-size: 8px; font-weight: 720; letter-spacing: .1em; text-transform: uppercase; }
.strategy-history-summary strong { font-size: 14px; font-weight: 540; }
.strategy-history-meta { color: var(--muted); font-size: 10px; }
.strategy-history-toggle { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); transition: transform 180ms ease; }
.strategy-history-toggle svg { width: 14px; height: 14px; }
.strategy-history[open] .strategy-history-toggle { transform: rotate(90deg); }
.strategy-history-scroll { overflow-x: auto; }
.strategy-history[open] .strategy-history-scroll, .strategy-history[open] .strategy-history-empty { border-top: 1px solid var(--border-soft); margin: 0 18px; padding-bottom: 10px; }
.strategy-history table { width: 100%; border-collapse: collapse; }
.strategy-history th, .strategy-history td { border-top: 1px solid var(--border-soft); padding: 11px 8px; font-size: 10px; text-align: right; white-space: nowrap; }
.strategy-history th { color: #737c84; font-size: 9px; font-weight: 720; letter-spacing: .08em; text-transform: uppercase; }
.strategy-history th:first-child, .strategy-history td:first-child { padding-left: 0; text-align: left; }
.strategy-history th:last-child, .strategy-history td:last-child { padding-right: 0; }
.placeholder-hero { min-height: 290px; display: grid; grid-template-columns: minmax(0, 1fr) 230px; align-items: center; gap: 30px; overflow: hidden; padding: 38px 42px; }
.placeholder-hero > div { position: relative; z-index: 2; max-width: 730px; }
.large-index { display: block; margin-bottom: 16px; color: #6f7881; font-size: 15px; font-weight: 750; letter-spacing: .15em; }
.placeholder-hero h3 { margin: 0; font-size: clamp(28px, 3vw, 44px); font-weight: 500; letter-spacing: -.035em; }
.placeholder-hero p:last-child { max-width: 670px; margin: 17px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.placeholder-hero > svg { width: 180px; height: 180px; color: rgba(158,167,175,.18); stroke-width: .7; }
.accent-panel { background: var(--panel); }
.skeleton-toolbar { min-height: 74px; display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 15px; box-shadow: none; }
.skeleton-toolbar span { width: 150px; height: 37px; border-radius: 7px; background: #151c20; }
.skeleton-toolbar span:first-child { width: 260px; }
.skeleton-list { display: grid; gap: 10px; margin-top: 10px; }
.skeleton-list article { min-height: 86px; display: grid; grid-template-columns: 44px minmax(160px,1fr) 100px 100px 90px; align-items: center; gap: 20px; padding: 15px 20px; box-shadow: none; }
.skeleton-list i { width: 38px; height: 38px; border-radius: 50%; background: #182126; }
.skeleton-list div { display: grid; gap: 8px; }
.skeleton-list b, .skeleton-list small, .skeleton-list em, .skeleton-list button { display: block; height: 9px; border: 0; border-radius: 20px; background: #1a2328; }
.skeleton-list b { width: 140px; }.skeleton-list small { width: 85px; }.skeleton-list em { width: 72px; }.skeleton-list button { height: 34px; border-radius: 7px; }
.module-card { min-height: 230px; display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: 35px; }
.module-icon { width: 78px; height: 78px; display: grid; place-items: center; border: 1px solid var(--border-gold); border-radius: 18px; background: var(--gold-soft); color: var(--gold); }
.module-icon svg { width: 40px; height: 40px; }
.module-card h3 { margin: 0; font-size: 27px; font-weight: 520; }
.module-card p:last-child { max-width: 670px; margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.feature-placeholder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.feature-placeholder-grid article { min-height: 175px; padding: 25px; box-shadow: none; }
.feature-placeholder-grid span { color: var(--gold); font-size: 10px; font-weight: 730; }
.feature-placeholder-grid h3 { margin: 25px 0 8px; font-size: 16px; font-weight: 560; }
.feature-placeholder-grid p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.journey-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 15px 0 0; padding: 0; list-style: none; }
.journey-list li { min-height: 100px; display: flex; align-items: center; gap: 18px; padding: 20px; box-shadow: none; }
.journey-list li > span { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--border-gold); border-radius: 50%; color: var(--gold); font-size: 9px; }
.journey-list div { display: grid; gap: 6px; }.journey-list strong { font-size: 12px; }.journey-list small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.journey-list .is-future { opacity: .55; }
.library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.library-card { min-height: 205px; display: grid; grid-template-columns: 55px minmax(0, 1fr); gap: 20px; padding: 28px; box-shadow: none; }
.library-card > svg { width: 45px; height: 45px; color: var(--gold); }
.library-card div > span { color: var(--gold); font-size: 9px; font-weight: 730; letter-spacing: .12em; text-transform: uppercase; }
.library-card h3 { margin: 12px 0 8px; font-size: 19px; font-weight: 530; }
.library-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.library-card button { grid-column: 2; justify-self: start; border: 0; background: transparent; color: var(--gold); padding: 0; font-size: 10px; }
.profile-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 15px; }
.profile-card { min-height: 245px; display: flex; align-items: center; gap: 25px; padding: 35px; }
.avatar-large { width: 84px; height: 84px; font-size: 21px; }
.profile-card h3 { margin: 0; font-size: 25px; font-weight: 530; }
.profile-card p:last-child { max-width: 390px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.settings-card { padding: 30px; }
.settings-card h3 { margin: 0 0 25px; font-size: 17px; font-weight: 550; }
.settings-card dl { margin: 0; display: grid; }
.settings-card dl div { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--border-soft); padding: 17px 0; }
.settings-card dt { color: var(--muted); font-size: 11px; }.settings-card dd { margin: 0; color: var(--text-soft); font-size: 11px; text-align: right; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: 360px; display: grid; gap: 5px; border: 1px solid var(--border-gold); border-radius: 9px; background: #141a1e; padding: 16px 18px; box-shadow: 0 18px 55px rgba(0,0,0,.45); }
.toast strong { color: var(--gold-bright); font-size: 11px; }.toast span { color: var(--muted); font-size: 10px; line-height: 1.4; }
.toast.is-visible { animation: toast-in 180ms ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

@media (min-width: 821px) {
  .sidebar {
    width: var(--sidebar-width);
    overflow: hidden;
    padding-inline: 8px;
    transition: width 200ms ease 190ms, box-shadow 200ms ease 190ms;
  }
  .sidebar:hover, .sidebar:focus-within {
    width: var(--sidebar-expanded-width);
    box-shadow: 24px 0 54px rgba(0, 0, 0, .42);
    transition-delay: 0ms;
  }
  .sidebar-header { min-width: 293px; padding-inline: 10px; }
  .brand { min-width: 250px; white-space: nowrap; }
  .brand-mark { width: 64px; font-size: 28px; text-align: center; }
  .brand-divider, .brand-product, .nav-label {
    opacity: 0;
    visibility: hidden;
    transition: opacity 130ms ease, visibility 0ms linear 130ms;
  }
  .nav-text, .profile-copy, .profile-entry .chevron, .logout-entry span { display: none; }
  .sidebar:hover .brand-divider, .sidebar:hover .brand-product, .sidebar:hover .nav-label,
  .sidebar:focus-within .brand-divider, .sidebar:focus-within .brand-product, .sidebar:focus-within .nav-label {
    opacity: 1;
    visibility: visible;
    transition-delay: 80ms;
  }
  .sidebar:hover .nav-text, .sidebar:focus-within .nav-text { display: block; }
  .sidebar:hover .profile-copy, .sidebar:focus-within .profile-copy { display: grid; }
  .sidebar:hover .profile-entry .chevron, .sidebar:focus-within .profile-entry .chevron { display: block; }
  .sidebar:hover .logout-entry span, .sidebar:focus-within .logout-entry span { display: inline; }
  .primary-nav { min-width: 293px; margin-top: 38px; }
  .nav-label { height: 14px; margin-inline: 14px; }
  .nav-item { width: 76px; grid-template-columns: 28px 20px; gap: 7px; padding-inline: 10px; transition: width 200ms ease, color 160ms ease, background 160ms ease, border-color 160ms ease; }
  .sidebar:hover .nav-item, .sidebar:focus-within .nav-item { width: 293px; grid-template-columns: 34px 28px minmax(0, 1fr); gap: 10px; padding-inline: 17px; }
  .nav-icon { width: 24px; height: 24px; }
  .sidebar-account { min-width: 293px; }
  .profile-entry { width: 76px; grid-template-columns: 42px; justify-items: center; padding-inline: 16px; transition: width 200ms ease; }
  .sidebar:hover .profile-entry, .sidebar:focus-within .profile-entry { width: 293px; grid-template-columns: 42px minmax(0, 1fr) 20px; justify-items: stretch; padding-inline: 15px; }
  .logout-entry { width: 76px; justify-content: center; padding-inline: 0; transition: width 200ms ease; }
  .sidebar:hover .logout-entry, .sidebar:focus-within .logout-entry { width: 293px; justify-content: flex-start; padding-inline: 18px; }
}

@media (max-width: 1500px) {
  .overview-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .document-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-card { grid-template-columns: minmax(0, 1.4fr) minmax(240px, .6fr); }
}

@media (max-width: 1180px) {
  .overview-grid { grid-template-columns: 1fr; }
  .overview-aside { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .next-step-card p { min-height: 82px; }
  .help-card { min-height: 0; }
  .chart-and-strategies { grid-template-columns: 1fr; }
  .strategy-preview { min-height: 230px; }
  .strategy-preview .button { margin-top: 18px; }
  .module-card { grid-template-columns: 70px 1fr; }
  .module-card .button { grid-column: 2; justify-self: start; }
}

@media (max-width: 1080px) and (min-width: 821px) {
  .strategy-detail-dashboard { grid-template-columns: minmax(315px, .43fr) minmax(0, .57fr); }
  .strategy-detail-metric { padding-inline: 9px; }
  .strategy-detail-metric dd { font-size: 14px; }
}

@media (max-width: 960px) {
  .topbar { padding-inline: 25px; }
  .topbar-actions { gap: 10px; }
  .access-pill { min-width: 174px; }
  .top-profile-copy { display: none; }
  .top-profile { grid-template-columns: 42px 17px; }
  .hero-card { grid-template-columns: minmax(0, 1fr) 220px; }
  .hero-copy { padding: 25px; }
  .hero-visual { opacity: .72; }
  .overview-aside { grid-template-columns: 1fr 1fr; }
  .help-card { grid-column: 1 / -1; }
  .feature-placeholder-grid, .journey-list { grid-template-columns: 1fr; }
  .strategy-catalog-row { grid-template-columns: repeat(2, minmax(0, 1fr)) 28px; gap: 15px 22px; padding: 20px; }
  .strategy-identity { grid-column: 1 / -1; border-bottom: 1px solid var(--border-soft); padding-bottom: 16px; }
  .strategy-metric { min-height: 42px; border-left: 0; padding-left: 0; }
  .strategy-row-open { grid-column: 3; grid-row: 2 / span 2; align-self: center; }
  .strategy-detail-header { grid-template-columns: 1fr; gap: 18px; }
  .strategy-trust-summary { width: 100%; }
}

@media (max-width: 820px) {
  :root { --topbar-height: 78px; }
  body { overflow: hidden; }
  .cabinet-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(86vw, 330px); transform: translateX(-102%); transition: transform 210ms ease; box-shadow: 25px 0 70px rgba(0,0,0,.45); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-close, .menu-button { display: grid; }
  .topbar { padding: 0 20px; }
  .topbar h1 { font-size: 20px; }
  .content { padding: 22px 20px 50px; }
  .page-heading { min-height: 125px; }
  .placeholder-hero { grid-template-columns: 1fr 120px; padding: 30px; }
  .placeholder-hero > svg { width: 115px; height: 115px; }
  .module-card { padding: 28px; }
  .library-grid, .profile-layout { grid-template-columns: 1fr; }
  .strategy-detail-dashboard { grid-template-columns: 1fr; }
  .strategy-detail-summary { grid-template-columns: minmax(240px, .42fr) minmax(0, .58fr); grid-template-rows: none; }
}

@media (max-width: 640px) {
  .topbar { min-width: 0; gap: 10px; overflow: hidden; padding-inline: 12px; }
  .topbar-context { min-width: 0; gap: 10px; }
  .topbar-context > div { min-width: 0; }
  .topbar h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions { margin-left: auto; }
  .access-pill { min-width: 0; min-height: 46px; gap: 8px; padding: 7px 8px; }
  .access-pill strong { display: none; }
  .access-pill small { font-size: 9px; white-space: nowrap; }
  .top-profile { display: none; }
  .content { padding: 16px 14px 45px; }
  .demo-notice { align-items: flex-start; }
  .hero-card { display: block; min-height: 420px; position: relative; }
  .hero-copy { padding: 23px 20px; }
  .hero-copy h2 { font-size: 30px; }
  .hero-actions { display: grid; }
  .button { width: 100%; }
  .hero-visual { position: absolute; inset: auto 0 0; height: 155px; min-height: 0; opacity: .58; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 112px; }
  .chart-header, .section-heading { align-items: flex-start; }
  .chart-meta { display: none; }
  .portfolio-panel { padding: 17px 13px 13px; }
  .chart-and-strategies { margin-top: 14px; }
  .chart-legend { gap: 13px; font-size: 8px; }
  .document-grid { grid-template-columns: repeat(2, 1fr); }
  .document-card { min-height: 116px; }
  .overview-aside { grid-template-columns: 1fr; }
  .help-card { grid-column: auto; }
  .next-step-card p { min-height: 0; }
  .page-heading { min-height: 0; display: grid; padding: 18px 0 24px; }
  .page-heading h2 { font-size: 38px; }
  .status-chip { justify-self: start; }
  .catalog-toolbar { align-items: flex-start; }
  .catalog-toolbar p { max-width: 215px; }
  .catalog-count { display: none; }
  .strategy-catalog-row { position: relative; min-height: 245px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 19px 18px; }
  .strategy-identity { padding-right: 43px; padding-bottom: 15px; }
  .strategy-number { width: 38px; height: 38px; }
  .strategy-identity strong { font-size: 14px; }
  .strategy-metric strong { font-size: 13px; }
  .strategy-row-open { position: absolute; top: 25px; right: 18px; }
  .strategy-detail-summary { grid-template-columns: 1fr; }
  .strategy-detail-header { min-height: 106px; padding: 12px 14px; }
  .strategy-detail-header h2 { font-size: 22px; }
  .strategy-trust-summary { grid-template-columns: 1fr 1fr; }
  .strategy-detail-metric { padding: 9px 10px; }
  .strategy-detail-metric dd { font-size: 15px; }
  .strategy-chart { padding: 14px 10px 8px; }
  .strategy-section-heading { align-items: flex-start; }
  .strategy-section-heading > span { display: none; }
  .strategy-detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strategy-detail-metrics .strategy-detail-metric { min-height: 64px; }
  .strategy-detail-metrics .metric-insufficient dd { font-size: 9px; }
  .chart-date-intermediate { display: none; }
  .strategy-history-summary { min-height: 58px; grid-template-columns: minmax(0, 1fr) 26px; gap: 10px; padding-inline: 13px; }
  .strategy-history-meta { display: none; }
  .strategy-history[open] .strategy-history-scroll, .strategy-history[open] .strategy-history-empty { margin-inline: 13px; }
  .placeholder-hero { display: block; min-height: 315px; padding: 26px 22px; }
  .placeholder-hero > svg { position: absolute; right: 18px; bottom: 15px; opacity: .55; }
  .skeleton-toolbar span:nth-child(n+2) { display: none; }
  .skeleton-toolbar span:first-child { width: 100%; }
  .skeleton-list article { grid-template-columns: 38px 1fr 70px; gap: 12px; padding: 13px; }
  .skeleton-list em, .skeleton-list button { display: none; }
  .module-card { display: grid; grid-template-columns: 55px 1fr; gap: 18px; padding: 22px; }
  .module-icon { width: 55px; height: 55px; border-radius: 13px; }
  .module-icon svg { width: 28px; height: 28px; }
  .module-card h3 { font-size: 23px; }
  .module-card .button { grid-column: 1 / -1; }
  .library-card { grid-template-columns: 45px 1fr; padding: 22px; }
  .library-card > svg { width: 36px; height: 36px; }
  .profile-card { align-items: flex-start; padding: 25px; }
  .avatar-large { width: 62px; height: 62px; font-size: 15px; }
  .toast { right: 14px; bottom: 14px; left: 14px; }
}

@media (max-width: 390px) {
  .metric-grid { grid-template-columns: 1fr; }
  .document-grid { grid-template-columns: 1fr; }
  .hero-copy h2 { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* Owner session gate, stage 7. */
.auth-screen { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; overflow: auto; background: var(--bg); }
.auth-card { width: min(100%, 440px); padding: 32px; }
.auth-card h1 { font-size: 28px; }
.auth-card label { display: block; margin: 24px 0 8px; }
.auth-card input { width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
.auth-card input:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.auth-card a { display: inline-block; margin-top: 24px; color: var(--text-soft); }
#owner-login-message { color: #efaaa4; min-height: 1.5em; line-height: 1.5; }
.auth-card button:disabled { opacity: .6; cursor: wait; }

#owner-login { place-items: stretch; padding: 0; }
.auth-login-layout { width: 100%; min-height: 100vh; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.auth-login-pane { min-width: 0; display: grid; place-items: center; padding: 32px; }
#owner-login .auth-card { width: min(100%, 300px); padding: 22px; }
#owner-login .auth-card h1 { margin: 0; font-size: 23px; }
#owner-login .auth-card label { margin-top: 19px; font-size: 13px; }
#owner-login .auth-card input { padding: 11px 12px; }
#owner-login .auth-card .button { width: auto; min-height: 40px; padding-inline: 16px; }
#owner-login .auth-card a { margin-top: 19px; font-size: 13px; }
#owner-login-message { margin-block: 8px; font-size: 12px; }
.auth-login-visual { min-height: 100vh; border-left: 1px solid var(--border); background: radial-gradient(circle at 50% 50%, rgba(197, 203, 208, .1), transparent 24%); }
.auth-login-visual::before, .auth-login-visual::after { width: min(62vw, 980px); }
.auth-login-visual .orbit-one { width: min(35vw, 680px); height: min(16vw, 310px); }
.auth-login-visual .orbit-two { width: min(46vw, 900px); height: min(23vw, 450px); }
.auth-login-visual .core-cube { width: clamp(118px, 9vw, 176px); height: clamp(118px, 9vw, 176px); }
.auth-login-visual .core-cube::before { inset: 14px; }
.auth-login-visual .core-cube span { font-size: clamp(23px, 2vw, 34px); }
.auth-login-visual .node { width: 10px; height: 10px; }
.auth-login-visual .node-one { left: 22%; top: 28%; }
.auth-login-visual .node-two { right: 20%; top: 32%; }
.auth-login-visual .node-three { left: 24%; bottom: 27%; }
.auth-login-visual .node-four { right: 22%; bottom: 23%; }

@media (max-width: 760px) {
  .auth-login-layout { grid-template-columns: 1fr; grid-template-rows: minmax(430px, 1fr) minmax(230px, 38vh); }
  .auth-login-pane { padding: 24px; }
  .auth-login-visual { position: relative; inset: auto; width: 100%; height: auto; min-height: 230px; border-top: 1px solid var(--border); border-left: 0; opacity: 1; }
  .auth-login-visual::before, .auth-login-visual::after { width: 620px; }
  .auth-login-visual .orbit-one { width: 330px; height: 145px; }
  .auth-login-visual .orbit-two { width: 440px; height: 210px; }
  .auth-login-visual .core-cube { width: 100px; height: 100px; }
  .auth-login-visual .core-cube::before { inset: 10px; }
  .auth-login-visual .core-cube span { font-size: 20px; }
}
