/* learnsomefinance cloud research system v3
   Shared navigation, language controls and a restrained Tencent Cloud-like
   visual layer for independently generated analytical pages. */

:root {
  --lsf-canvas: #f5f7fa;
  --lsf-surface: #ffffff;
  --lsf-surface-soft: #f4f9ff;
  --lsf-surface-muted: #f0f3f7;
  --lsf-ink: #0f1f33;
  --lsf-text: #26364a;
  --lsf-muted: #5f6f85;
  --lsf-line: #d8e2ef;
  --lsf-line-strong: #b9c7d9;
  --lsf-brand: #0052d9;
  --lsf-brand-deep: #003da5;
  --lsf-brand-bright: #006eff;
  --lsf-brand-wash: #eaf4ff;
  --lsf-positive: #00a870;
  --lsf-negative: #e34d59;
  --lsf-warning: #ed7b2f;
  --lsf-radius-sm: 4px;
  --lsf-radius: 6px;
  --lsf-radius-lg: 8px;
  --lsf-shadow-sm: 0 2px 8px rgba(31, 56, 88, 0.06);
  --lsf-shadow: 0 8px 24px rgba(31, 56, 88, 0.08);
  --lsf-content: 1180px;
  --lsf-nav-content: 1320px;
  --lsf-reading: 780px;
  --lsf-nav-height: 64px;
}

html[data-lsf-shell] {
  color-scheme: light;
  scroll-padding-top: calc(var(--lsf-nav-height) + 20px);
  background: var(--lsf-canvas);
}

html[data-lsf-shell],
html[data-lsf-shell] body {
  min-height: 100%;
}

html[data-lsf-shell] body {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
  color: var(--lsf-text);
  background:
    linear-gradient(180deg, #edf5ff 0, #f5f8fc 280px, var(--lsf-canvas) 620px),
    var(--lsf-canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[data-lsf-shell] *,
html[data-lsf-shell] *::before,
html[data-lsf-shell] *::after {
  box-sizing: border-box;
}

html[data-lsf-shell] a {
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

html[data-lsf-shell] :focus-visible {
  outline: 2px solid var(--lsf-brand-bright);
  outline-offset: 3px;
}

html[data-lsf-shell] h1,
html[data-lsf-shell] h2,
html[data-lsf-shell] h3 {
  color: var(--lsf-ink);
  text-wrap: balance;
}

html[data-lsf-shell] table,
html[data-lsf-shell] .metric,
html[data-lsf-shell] .metric-card,
html[data-lsf-shell] .hero-metric,
html[data-lsf-shell] .portable-table-number {
  font-variant-numeric: tabular-nums;
}

html[data-lsf-shell] img,
html[data-lsf-shell] svg {
  max-width: 100%;
}

/* Portable report pages declare a dark system palette in their own HTML.
   The site is deliberately one consistent light visual system. */
html[data-lsf-shell][data-lsf-shell] {
  --portable-canvas: var(--lsf-canvas);
  --portable-surface: var(--lsf-surface);
  --portable-surface-subtle: var(--lsf-surface-soft);
  --portable-ink: var(--lsf-ink);
  --portable-muted: var(--lsf-muted);
  --portable-tertiary: #7b899b;
  --portable-table-text: var(--lsf-text);
  --portable-border: rgba(15, 31, 51, 0.1);
  --portable-accent: var(--lsf-brand-bright);
  --portable-positive: var(--lsf-positive);
  --portable-positive-bg: #e8f8f2;
  --portable-negative: var(--lsf-negative);
  --portable-negative-bg: #fff0f1;
  --portable-warning-bg: #fff7e8;
  --portable-warning-border: #f3c589;
  --portable-radius: var(--lsf-radius);
}

.lsf-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[data-lsf-nav-en] {
  display: none;
}

html[lang^="en"] [data-lsf-nav-zh] {
  display: none;
}

html[lang^="en"] [data-lsf-nav-en] {
  display: inline;
}

/* Navigation */
#nav-mount {
  position: sticky;
  top: 0;
  z-index: 9990;
  min-height: var(--lsf-nav-height) !important;
  background: #121d2f !important;
  line-height: normal;
}

#nav-mount:empty::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 7%, rgba(255, 255, 255, 0.08) 7% 18%, transparent 18% 100%),
    #121d2f;
  animation: lsf-nav-loading 1.1s ease-in-out infinite alternate;
}

@keyframes lsf-nav-loading {
  to { opacity: 0.76; }
}

#site-nav.lsf-site-nav {
  position: relative;
  z-index: 9999;
  width: 100%;
  min-height: var(--lsf-nav-height);
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 29, 47, 0.98);
  box-shadow: 0 4px 14px rgba(4, 16, 34, 0.12);
  color: #ffffff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1;
  backdrop-filter: blur(16px) saturate(130%);
}

#site-nav .lsf-nav-inner {
  position: relative;
  width: min(var(--lsf-nav-content), calc(100vw - 40px));
  min-height: var(--lsf-nav-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

#site-nav .lsf-brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #ffffff;
  text-decoration: none;
}

#site-nav .lsf-brand-name {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

#site-nav .lsf-nav-panel {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}

#site-nav .lsf-nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}

#site-nav .lsf-nav-link,
#site-nav .lsf-nav-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-weight: 550;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

#site-nav .lsf-nav-link:hover,
#site-nav .lsf-nav-trigger:hover,
#site-nav .lsf-nav-group[open] > .lsf-nav-trigger {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

#site-nav .lsf-nav-link[aria-current="page"],
#site-nav .lsf-nav-group.is-current > .lsf-nav-trigger {
  color: #ffffff;
}

#site-nav .lsf-nav-link[aria-current="page"]::after,
#site-nav .lsf-nav-group.is-current > .lsf-nav-trigger::after,
#site-nav .lsf-nav-group[open] > .lsf-nav-trigger::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: -12px;
  left: 9px;
  height: 2px;
  background: #4c9aff;
}

#site-nav .lsf-nav-group {
  position: relative;
  flex: 0 0 auto;
}

#site-nav .lsf-nav-group > summary {
  list-style: none;
}

#site-nav .lsf-nav-group > summary::-webkit-details-marker {
  display: none;
}

#site-nav .lsf-nav-submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 248px;
  padding: 8px;
  border: 1px solid var(--lsf-line);
  border-top: 2px solid var(--lsf-brand-bright);
  border-radius: var(--lsf-radius-sm);
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 31, 51, 0.18);
  color: var(--lsf-text);
}

#site-nav .lsf-nav-sub-link {
  display: block;
  min-height: 56px;
  padding: 10px 12px;
  border-left: 2px solid transparent;
  border-radius: 2px;
  color: var(--lsf-text);
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease;
}

#site-nav .lsf-nav-sub-link:hover,
#site-nav .lsf-nav-sub-link[aria-current="page"] {
  border-left-color: var(--lsf-brand-bright);
  background: var(--lsf-brand-wash);
}

#site-nav .lsf-nav-sub-name,
#site-nav .lsf-nav-sub-description {
  display: block;
}

#site-nav .lsf-nav-sub-name {
  color: var(--lsf-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

#site-nav .lsf-nav-sub-description {
  margin-top: 4px;
  color: var(--lsf-muted);
  font-size: 12px;
  line-height: 1.4;
}

#site-nav .lsf-nav-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

#site-nav .lsf-nav-edition {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

#site-nav .lsf-language-control {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--lsf-radius-sm);
  background: rgba(255, 255, 255, 0.06);
}

#site-nav .lsf-language-control button {
  min-width: 42px;
  min-height: 32px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 2px;
  appearance: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
}

#site-nav .lsf-language-control button:hover {
  color: #ffffff;
}

#site-nav .lsf-language-control button[aria-pressed="true"] {
  background: var(--lsf-brand-bright);
  color: #ffffff;
  box-shadow: none;
}

#site-nav .lsf-nav-toggle {
  flex: 0 0 auto;
  min-width: 52px;
  min-height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--lsf-radius-sm);
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

/* Remove duplicate, page-local language controls after the global control is ready. */
html[data-lsf-shell] body.lsf-shell-ready .lsf-language-switch-shell,
html[data-lsf-shell] body.lsf-shell-ready [data-lang-switch],
html[data-lsf-shell] body.lsf-shell-ready [data-lsf-legacy-lang-control] {
  display: none !important;
}

/* Shared page geometry */
html[data-lsf-shell] .container,
html[data-lsf-shell] .page-wrap,
html[data-lsf-shell] .wrap,
html[data-lsf-shell] .page {
  width: min(var(--lsf-content), calc(100vw - 32px));
  margin-right: auto;
  margin-left: auto;
}

html[data-lsf-shell] .portable-page-header {
  top: var(--lsf-nav-height);
  border-color: var(--lsf-line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

html[data-lsf-shell] .hero,
html[data-lsf-shell] .home-hero {
  border: 1px solid #cdddf0;
  border-radius: var(--lsf-radius-lg);
  box-shadow: var(--lsf-shadow-sm);
}

html[data-lsf-shell] .hero::before,
html[data-lsf-shell] .hero::after,
html[data-lsf-shell] .home-hero::before,
html[data-lsf-shell] .home-hero::after {
  border-radius: 0;
}

html[data-lsf-shell] :is(.eyebrow, .kicker, .overline) {
  color: var(--lsf-brand);
}

html[data-lsf-shell] :is(.subtitle, .lede, .intro) {
  color: var(--lsf-muted);
}

html[data-lsf-shell] :is(
  .indicator-card,
  .article-list,
  .article,
  .metric,
  .metric-card,
  .hero-metric,
  .summary,
  .visual,
  .chart,
  .chart-card,
  .stock-card,
  .principle,
  .private-card,
  .portable-metric-card
) {
  border-color: var(--lsf-line);
  border-radius: var(--lsf-radius);
  box-shadow: var(--lsf-shadow-sm);
}

html[data-lsf-shell] :is(.article, .stock-card, .indicator-card, .chart-card):hover {
  border-color: #91bfff;
  box-shadow: var(--lsf-shadow);
}

html[data-lsf-shell] :is(.chart-header, .card-head, .panel-head) {
  border-color: var(--lsf-line);
  background: #f8fafc;
}

html[data-lsf-shell] :is(.chart-source, .source-pill, .source-link, .src) {
  border-color: #c9d6e6;
  border-radius: var(--lsf-radius-sm);
  background: #ffffff;
  color: var(--lsf-brand);
  text-decoration: none;
}

html[data-lsf-shell] :is(.chart-source, .source-pill, .source-link, .src):hover {
  border-color: var(--lsf-brand-bright);
  background: var(--lsf-brand-wash);
}

html[data-lsf-shell] :is(.method span, .identity-pill, .portable-filter-chip) {
  border-color: #c7dcff;
  border-radius: var(--lsf-radius-sm);
  background: var(--lsf-brand-wash);
  color: var(--lsf-brand);
}

html[data-lsf-shell] :is(.tag, .pill) {
  border-radius: var(--lsf-radius-sm);
}

html[data-lsf-shell] :is(.callout:not(.warning):not(.danger), .takeaway) {
  border-color: #bfd5f3;
  border-left: 3px solid var(--lsf-brand-bright);
  border-radius: var(--lsf-radius-sm);
  background: var(--lsf-surface-soft);
}

html[data-lsf-shell] :is(.toc a, .lsf-toc-link) {
  color: var(--lsf-muted);
  text-decoration: none;
}

html[data-lsf-shell] :is(.toc a, .lsf-toc-link):hover,
html[data-lsf-shell] .lsf-toc-link.active {
  color: var(--lsf-brand);
}

html[data-lsf-shell] .page-wrap > main {
  border-color: var(--lsf-line);
  border-radius: var(--lsf-radius);
  box-shadow: var(--lsf-shadow-sm);
}

html[data-lsf-shell] .table-wrap,
html[data-lsf-shell] .table-scroll,
html[data-lsf-shell] .portable-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border-color: var(--lsf-line);
  border-radius: var(--lsf-radius-sm);
  overscroll-behavior-inline: contain;
}

html[data-lsf-shell] .curve-line {
  stroke: var(--lsf-brand-bright);
}

html[data-lsf-shell] .curve-point {
  stroke: var(--lsf-brand-bright);
}

html[data-lsf-shell] .curve-point--key {
  fill: #ffffff;
  stroke: var(--lsf-brand-deep);
}

html[data-lsf-shell] #ois-area stop:first-child {
  stop-color: var(--lsf-brand-bright);
}

html[data-lsf-shell] .lsf-skip-link {
  position: fixed;
  z-index: 10050;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: var(--lsf-radius-sm);
  background: var(--lsf-brand-bright);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
}

html[data-lsf-shell] .lsf-skip-link:focus {
  transform: translateY(0);
}

@media (max-width: 1180px) {
  #site-nav .lsf-nav-inner {
    width: min(100% - 24px, var(--lsf-nav-content));
    gap: 10px;
  }

  #site-nav .lsf-nav-edition {
    display: none;
  }

  #site-nav .lsf-nav-toggle {
    display: inline-flex;
  }

  #site-nav .lsf-nav-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: none;
    max-height: calc(100vh - var(--lsf-nav-height) - 24px);
    padding: 10px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--lsf-radius);
    background: #18253a;
    box-shadow: 0 18px 46px rgba(4, 16, 34, 0.32);
  }

  #site-nav.is-open .lsf-nav-panel {
    display: block;
  }

  #site-nav .lsf-nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  #site-nav .lsf-nav-link,
  #site-nav .lsf-nav-trigger {
    justify-content: flex-start;
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
  }

  #site-nav .lsf-nav-link[aria-current="page"]::after,
  #site-nav .lsf-nav-group.is-current > .lsf-nav-trigger::after,
  #site-nav .lsf-nav-group[open] > .lsf-nav-trigger::after {
    top: 10px;
    right: auto;
    bottom: 10px;
    left: 4px;
    width: 2px;
    height: auto;
  }

  #site-nav .lsf-nav-group {
    grid-column: 1 / -1;
  }

  #site-nav .lsf-nav-submenu {
    position: static;
    width: auto;
    margin: 2px 4px 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 2px solid #4c9aff;
    border-radius: var(--lsf-radius-sm);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
  }

  #site-nav .lsf-nav-sub-link {
    min-height: 52px;
    color: rgba(255, 255, 255, 0.78);
  }

  #site-nav .lsf-nav-sub-link:hover,
  #site-nav .lsf-nav-sub-link[aria-current="page"] {
    border-left-color: #4c9aff;
    background: rgba(76, 154, 255, 0.12);
  }

  #site-nav .lsf-nav-sub-name {
    color: #ffffff;
  }

  #site-nav .lsf-nav-sub-description {
    color: rgba(255, 255, 255, 0.56);
  }
}

@media (max-width: 760px) {
  html[data-lsf-shell] .two-col {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html[data-lsf-shell] .two-col > *,
  html[data-lsf-shell] .grid > *,
  html[data-lsf-shell] .section {
    min-width: 0;
    max-width: 100%;
  }

  html[data-lsf-shell] main,
  html[data-lsf-shell] article,
  html[data-lsf-shell] .wrap,
  html[data-lsf-shell] .page,
  html[data-lsf-shell] .page-wrap,
  html[data-lsf-shell] .section {
    overflow-x: clip;
  }

  html[data-lsf-shell] table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  html[data-lsf-shell] .arithmatex,
  html[data-lsf-shell] mjx-container {
    display: inline-block !important;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    vertical-align: middle;
  }

  html[data-lsf-shell] mjx-container[display="true"] {
    display: block !important;
    width: 100%;
  }

  html[data-lsf-shell] .curve-axis {
    font-size: 13px;
  }

  html[data-lsf-shell] .curve-value {
    font-size: 12px;
  }
}

@media (max-width: 560px) {
  :root { --lsf-nav-height: 62px; }

  #site-nav .lsf-nav-inner {
    width: calc(100% - 20px);
    gap: 8px;
  }

  #site-nav .lsf-brand-name {
    font-size: 14px;
  }

  #site-nav .lsf-nav-actions {
    margin-left: auto;
  }

  #site-nav .lsf-language-control button {
    min-width: 36px;
    padding: 0 5px;
  }

  #site-nav .lsf-nav-toggle {
    min-width: 48px;
    padding: 0 8px;
  }

  #site-nav .lsf-nav-panel {
    top: calc(100% + 6px);
  }

  #site-nav .lsf-nav-links {
    grid-template-columns: 1fr;
  }

  #site-nav .lsf-nav-group {
    grid-column: auto;
  }

  html[data-lsf-shell] .container,
  html[data-lsf-shell] .page-wrap,
  html[data-lsf-shell] .wrap,
  html[data-lsf-shell] .page {
    width: min(100% - 24px, var(--lsf-content));
  }
}

@media (max-width: 380px) {
  #site-nav .lsf-brand-name {
    font-size: 13px;
  }

  #site-nav .lsf-language-control button {
    min-width: 33px;
    font-size: 11px;
  }

  #site-nav .lsf-nav-toggle {
    min-width: 44px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #site-nav *,
  #nav-mount:empty::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  #nav-mount,
  .lsf-skip-link {
    display: none !important;
  }

  html[data-lsf-shell] body {
    background: #ffffff;
  }
}
