/* One platform shell, two research lines. Product navigation stays above
   workspace navigation; operating content keeps its established density. */
@font-face {
  font-family: Geist;
  src: url("/releases/eee019d4f4271b6285e6/assets/platform/geist.woff2?v=1") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --sil-font:
    Geist, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  --sil-header-height: 80px;
  --sil-subbar-height: 48px;
  --sil-gutter: max(24px, calc((100vw - 1364px) / 2));
}
.sil-platform-chrome {
  position: sticky;
  z-index: 99;
  top: 0;
  background: var(--sil-chrome);
}
.sil-global-header {
  box-sizing: border-box;
  width: 100%;
  height: var(--sil-header-height);
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: var(--sil-header-height);
  align-items: center;
  gap: 0 24px;
  padding-block: 0;
  padding-left: max(var(--sil-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--sil-gutter), env(safe-area-inset-right, 0px));
  border: 0;
  border-bottom: 1px solid var(--sil-line);
  background: var(--sil-chrome);
  color: var(--sil-ink);
  font-family: var(--sil-font);
  line-height: 1.4;
  box-shadow: none;
}
.sil-global-header .brand-cluster {
  grid-column: 1;
  grid-row: 1;
  gap: 0;
}
.sil-global-header .sil-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  text-decoration: none;
}
.sil-global-header .brand-logo {
  width: 144px;
  height: 48px;
  max-width: none;
  object-fit: contain;
}
.sil-global-header .brand-divider,
.sil-global-header .mobile-workspace-label,
.sil-global-header .language-control,
.sil-global-header .theme-control,
.sil-preference-adapters {
  display: none !important;
}
.sil-product-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  align-self: stretch;
  grid-column: 2;
  grid-row: 1;
  gap: 32px;
  min-width: 0;
}
.sil-product-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 2px;
  color: var(--sil-muted);
  font-size: 14px;
  font-weight: 540;
  letter-spacing: 0;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  transition: color 160ms ease;
}
.sil-product-nav a::after {
  content: "";
  position: absolute;
  inset: auto 2px -1px;
  border-bottom: 2px solid transparent;
}
.sil-product-nav a:hover,
.sil-product-nav a[aria-current="page"] {
  color: var(--sil-accent);
}
.sil-product-nav a[aria-current="page"]::after {
  border-color: var(--sil-accent);
}
.sil-global-tools {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 6px;
  min-width: 0;
}
.sil-global-tools > button,
.sil-language-picker > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: var(--sil-muted);
  background: transparent;
  font: 540 13px/1.4 var(--sil-font);
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}
.sil-global-tools > button:hover,
.sil-language-picker > button:hover {
  color: var(--sil-ink);
  background: var(--sil-wash);
}
.sil-global-tools svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.sil-global-header :is(a, button):focus-visible {
  outline: 2px solid var(--sil-focus);
  outline-offset: 3px;
}
.sil-global-header .mobile-menu-button {
  display: none;
}

html:lang(zh-HK) {
  --sil-font: Geist, -apple-system, BlinkMacSystemFont, "PingFang HK", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
html:lang(zh-HK) body { font-family: var(--sil-font); }
.sil-language-picker { position: relative; flex: 0 0 auto; }
.sil-global-header .sil-global-tools { overflow: visible; }
/* The dashboard's status row has its own stacking layer. Raise only the open
   header menu so its first option remains clickable above that row. */
.sil-quant-shell .sil-global-header:has([data-shell-language][aria-expanded="true"]) { z-index: 4; }
.sil-language-picker > button { gap: 4px; }
.sil-language-picker > button svg { width: 14px; height: 14px; }
.sil-language-picker > button[aria-expanded="true"] {
  background: var(--sil-wash);
  color: var(--sil-accent);
}
.sil-language-menu {
  position: absolute;
  z-index: 110;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  width: 232px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  border: 1px solid var(--sil-line);
  border-radius: 10px;
  background: var(--sil-chrome);
  color: var(--sil-ink);
  box-shadow: 0 12px 32px rgb(9 24 46 / 14%);
}
.sil-language-menu[hidden] { display: none; }
.sil-language-menu > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: 500 14px/1.5 var(--sil-font);
  text-align: start;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}
.sil-language-menu > button:hover,
.sil-language-menu > button:focus-visible { background: var(--sil-wash); }
.sil-language-menu > button[aria-checked="true"] { color: var(--sil-accent); }
.sil-language-menu > button svg { width: 16px; height: 16px; visibility: hidden; }
.sil-language-menu > button[aria-checked="true"] svg { visibility: visible; }
.sil-language-menu > button[aria-disabled="true"] { cursor: progress; opacity: .65; }
.sil-language-error { margin: 4px 12px; font-size: 13px; line-height: 1.5; }
.sil-language-error:empty { display: none; }
.sil-context-bar {
  min-height: var(--sil-subbar-height);
  padding: 0 var(--sil-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--sil-line);
  color: var(--sil-muted);
  font: 400 13px/1.4 var(--sil-font);
  background: var(--sil-chrome);
}
.sil-section-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.sil-section-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  white-space: nowrap;
}
.sil-section-nav a:hover,
.sil-section-nav a[aria-current] {
  color: var(--sil-accent);
  text-decoration: underline;
  text-underline-offset: 7px;
}
.sil-context-note {
  font-size: 12px;
}
.sil-resume-context {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.sil-platform-chrome ~ .platform-main {
  padding-top: 0;
}
html:has(.sil-platform-chrome) {
  scroll-padding-top: calc(
    var(--sil-header-height) + var(--sil-subbar-height) + 24px
  );
}

/* The operating view shares ALTA neutrals and typography, not marketing-scale
   cards or display copy. Semantic return and warning colors remain unchanged. */
.sil-signature {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  line-height: 1.5;
  font-family: var(--sil-font);
  letter-spacing: 0;
}
.sil-signature strong {
  font-size: 15px;
  font-weight: 550;
  color: var(--sil-ink);
}
.sil-signature > span {
  font-size: 12px;
  font-weight: 400;
  color: var(--sil-muted);
  white-space: nowrap;
}
:is(.platform-main, .alta-main) :is(h1, h2, h3) {
  text-wrap: balance;
  overflow-wrap: break-word;
}
html:lang(zh) :is(.platform-main, .alta-main) :is(h1, h2, h3) {
  letter-spacing: -0.015em;
}
.site-footer .footer-signature {
  min-width: 0;
  overflow-wrap: anywhere;
}
.site-footer .footer-signature > span {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

html[data-ui-mode="precision-ledger"] {
  --font: var(--sil-font);
  --bg: var(--sil-canvas);
  --bg-elevated: var(--sil-surface);
  --surface-solid: var(--sil-surface);
  --text: var(--sil-ink);
  --text-secondary: var(--sil-muted);
  --text-tertiary: var(--sil-muted);
  --border: var(--sil-line);
  --border-strong: var(--sil-line-strong);
  --blue: var(--sil-accent);
  --blue-soft: var(--sil-wash);
  --chart-strategy: var(--sil-accent);
  --grid: var(--sil-grid);
  --surface: var(--sil-surface);
  --surface-muted: var(--sil-chrome);
  --material-control: var(--sil-chrome);
  --material-selected: var(--sil-surface);
  --material-chrome: var(--sil-chrome);
}
html[data-ui-mode="precision-ledger"] body {
  font-family: var(--sil-font);
}
html[data-ui-mode] {
  --app-brand-height: var(--sil-header-height);
  --app-topbar-height: var(--sil-header-height);
  --app-connection-top: var(--sil-header-height);
  --app-connection-height: var(--sil-subbar-height);
}
.sil-quant-shell .chrome-material {
  background: var(--sil-chrome);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.sil-quant-shell .connection-bar {
  border-top: 0;
  border-bottom: 1px solid var(--sil-line);
  background: var(--sil-chrome);
  color: var(--sil-muted);
  padding: 0 var(--sil-gutter);
}
body.has-strategy-sidebar .sil-quant-shell .connection-bar {
  padding-inline: var(--sil-gutter);
}
.sil-quant-shell .connection-shell,
body.has-strategy-sidebar .sil-quant-shell .connection-shell {
  width: 100%;
  margin: 0;
  gap: 24px;
  transition: none;
}
.sil-quant-shell #workspace-navigation {
  display: flex;
  flex: 0 0 auto;
  align-self: stretch;
  justify-content: flex-start;
  width: auto;
  margin: 0;
  gap: 12px;
}
.sil-quant-shell #workspace-navigation a {
  flex: 0 0 auto;
  overflow: visible;
  isolation: isolate;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  font: 600 14px/1.4 var(--sil-font);
  letter-spacing: 0;
  color: color-mix(in srgb, var(--sil-ink) 72%, var(--sil-muted));
  touch-action: manipulation;
}
.sil-quant-shell #workspace-navigation a::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 5px 0;
  border-radius: 6px;
  background: var(--sil-wash);
  opacity: 0;
  transition: opacity 140ms ease;
}
.sil-quant-shell #workspace-navigation a:hover {
  color: var(--sil-ink);
}
.sil-quant-shell #workspace-navigation a:is(:hover, .active)::before {
  opacity: 1;
}
.sil-quant-shell #workspace-navigation a.active {
  color: var(--sil-accent);
}
.sil-quant-shell #workspace-navigation a::after {
  inset: auto 10px 0;
  height: 2px;
  background: var(--sil-accent);
  border-radius: 0;
  transform: none;
}
.sil-quant-shell #workspace-navigation a:focus-visible {
  outline: 2px solid var(--sil-focus);
  outline-offset: -3px;
  box-shadow: none;
}
.sil-quant-shell .connection-state {
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
  color: var(--sil-muted);
  font-family: var(--sil-font);
  font-size: 12px;
}
.sil-quant-shell #connection-detail {
  color: var(--sil-muted);
}
.sil-quant-shell .connection-state::before {
  display: none;
}

/* Desktop Ledger has one context band: strategy heading on the left, workspace
   navigation and connection state on the right. Mobile retains the drawer. */
@media (min-width: 901px) {
  body.has-strategy-sidebar .strategy-sidebar-shell {
    /* Only the actual sticky aside receives events; the empty shell does not.
       Its content starts below the global header, never over the brand/nav. */
    z-index: 100;
  }
  body.has-strategy-sidebar .strategy-sidebar {
    top: var(--sil-header-height);
    height: calc(100vh - var(--sil-header-height));
    height: calc(100dvh - var(--sil-header-height));
    max-height: calc(100dvh - var(--sil-header-height));
  }
  body.has-strategy-sidebar .strategy-sidebar-header {
    box-sizing: border-box;
    height: var(--sil-subbar-height);
    min-height: var(--sil-subbar-height);
    grid-template-columns: minmax(0, 1fr) 44px;
    padding: 1px 12px 1px 18px;
    gap: 8px;
    border-color: var(--sil-line);
  }
  body.has-strategy-sidebar .strategy-sidebar-heading {
    gap: 1px;
  }
  body.has-strategy-sidebar .strategy-sidebar-heading strong {
    font: 550 13px/18px var(--sil-font);
    letter-spacing: 0;
  }
  body.has-strategy-sidebar .strategy-sidebar-heading small {
    font: 400 11px/15px var(--sil-font);
    color: var(--sil-muted);
    letter-spacing: 0;
  }
  body.has-strategy-sidebar .strategy-sidebar-collapse {
    width: 44px;
    height: 44px;
    color: var(--sil-muted);
    border: 0;
    box-shadow: none;
  }
  body.has-strategy-sidebar .strategy-sidebar-collapse:focus-visible {
    outline: 2px solid var(--sil-focus);
    outline-offset: -5px;
  }
  html[data-strategy-sidebar="collapsed"]
    body.has-strategy-sidebar
    .strategy-sidebar-header {
    grid-template-columns: 1fr;
    padding: 1px 0;
  }
  body.has-strategy-sidebar .sil-quant-shell .connection-bar {
    padding-inline: 0;
  }
  body.has-strategy-sidebar .sil-quant-shell .connection-shell {
    width: min(1364px, calc(100vw - var(--strategy-sidebar-width) - 48px));
    margin-right: auto;
    margin-left: max(
      calc(var(--strategy-sidebar-width) + 24px),
      calc((100vw + var(--strategy-sidebar-width) - 1364px) / 2)
    );
    transition:
      width var(--strategy-sidebar-motion) var(--strategy-sidebar-ease),
      margin-left var(--strategy-sidebar-motion) var(--strategy-sidebar-ease);
  }
  body.has-strategy-sidebar .sil-quant-shell .connection-state {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    justify-content: flex-end;
  }
  body.has-strategy-sidebar
    .sil-quant-shell
    :is(#connection-text, #connection-detail) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.has-strategy-sidebar .sil-quant-shell #connection-text {
    flex-shrink: 1;
  }
  body.has-strategy-sidebar .sil-quant-shell .connection-state .live-dot {
    flex-shrink: 0;
  }
  body.has-strategy-sidebar .sil-quant-shell #retry-button {
    flex-shrink: 0;
    min-height: 44px;
  }
}
/* The local ALTA experience is framed by the same platform chrome. */
.preview-body .sil-platform-chrome {
  display: contents;
}
.preview-body .sil-global-header {
  flex: 0 0 var(--sil-header-height);
  order: 0;
}
.preview-body .preview-frame {
  order: 1;
}
.preview-body .sil-alta-context {
  order: 2;
  flex: 0 0 auto;
  border-top: 1px solid var(--sil-line);
  border-bottom: 0;
}
.sil-preview-links {
  display: flex;
  gap: 20px;
}
.sil-preview-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 12px;
}
.preview-body .sil-context-bar {
  flex-wrap: wrap;
  padding-block: 4px;
  gap: 4px 20px;
}
.preview-body .sil-preview-return {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
}

@media (min-width: 901px) and (max-width: 1200px) {
  .sil-quant-shell #connection-detail {
    display: none;
  }
  .sil-quant-shell #workspace-navigation {
    gap: 8px;
  }
  .sil-quant-shell .connection-shell,
  body.has-strategy-sidebar .sil-quant-shell .connection-shell {
    gap: 16px;
  }
}
@media (max-width: 900px) {
  :root {
    --sil-gutter: 20px;
  }
  .sil-global-header {
    gap: 0 16px;
  }
  .sil-global-header .brand-logo {
    width: 120px;
    height: 40px;
  }
  .sil-product-nav {
    gap: 24px;
  }
  .sil-global-header .mobile-menu-button {
    display: inline-flex;
    color: var(--sil-ink);
    background: var(--sil-wash);
  }
  .sil-quant-shell #workspace-navigation {
    display: none;
  }
  .sil-global-tools [data-shell-theme] span {
    display: none;
  }
  .sil-context-note {
    display: none;
  }
}
@media (max-width: 600px) {
  :root {
    --sil-gutter: 16px;
    --sil-header-height: 100px;
  }
  .sil-global-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 56px 44px;
    gap: 0 12px;
  }
  .sil-global-header .brand-logo {
    width: 120px;
    height: 40px;
  }
  .sil-global-tools {
    grid-column: 2;
    grid-row: 1;
    gap: 4px;
  }
  .sil-product-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    gap: 20px;
  }
  .sil-product-nav a {
    flex: 1;
    font-size: 13px;
  }
  .sil-product-nav a::after {
    left: 20%;
    right: 20%;
  }
  .sil-global-tools .mobile-menu-button {
    padding-inline: 8px;
  }
  .sil-section-nav {
    width: 100%;
    justify-content: space-between;
    gap: 16px;
  }
  .sil-context-bar {
    gap: 8px;
  }
  .sil-quant-shell .connection-shell {
    gap: 10px;
  }
  .sil-quant-shell .connection-bar {
    padding-inline: 12px;
  }
  .preview-body .sil-preview-return {
    font-size: 12px;
  }
  .preview-body .sil-context-bar .preview-status {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sil-global-header *,
  .sil-global-header *::after {
    transition: none !important;
  }
}
@media (forced-colors: active) {
  .sil-product-nav a[aria-current="page"]::after {
    border-color: Highlight;
  }
  .sil-global-header :is(a, button):focus-visible {
    outline-color: Highlight;
  }
}
@media print {
  .sil-platform-chrome,
  .sil-global-header {
    display: none !important;
  }
}
