/* 灵枢阁统一顶栏 — 与首页 site-header 同款 */
:root {
  --lsg-site-header-height: 72px;
  --lsg-site-header-reserve: max(72px, calc(56px + env(safe-area-inset-top, 0px)));
}
header.site-header:not(.lsg-site-header) { display: none !important; }
.static-site-document.is-standard .site-footer:not(#lsg-site-footer) { display: none !important; }
.site-header.lsg-site-header,
header.lsg-site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 2147483000 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: var(--lsg-site-header-height);
  margin: 0 !important;
  padding: max(10px, env(safe-area-inset-top, 0px)) clamp(20px, 4vw, 48px) 8px;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
  transform: none !important;
  box-sizing: border-box;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  pointer-events: auto !important;
  background: rgba(255,252,246,var(--lsg-surface-alpha,0.54)) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 0;
}
.site-header.lsg-site-header > *,
header.lsg-site-header > *,
.site-header.lsg-site-header .brand,
.site-header.lsg-site-header .top-nav,
.site-header.lsg-site-header .top-nav a {
  pointer-events: auto !important;
  cursor: pointer;
}
/* Every static page uses the shared fixed header. Reserve its full footprint
   once at the wrapper so page-specific headings cannot start underneath it. */
.static-site-document {
  padding-top: var(--lsg-site-header-reserve);
}
/* Hero-backed pages keep the footer flush with the document from first paint. */
body:has(.lg-home-hero) #lsg-site-footer.site-footer {
  margin: 0 !important;
}
.static-site-document.is-renti-document {
  padding-top: var(--lsg-site-header-reserve);
}
/* The tools index already reserves the fixed header on its migrated wrapper.
   Remove the legacy body's second reserve so the directory starts at the
   intended compact distance below the shared header. */
body:has(.static-site-document.is-tool-document) {
  padding-top: 0 !important;
}
/* Keep the shared footer at the viewport bottom. The wrapper already reserves
   the fixed header with padding-top, so its height must cover the full viewport. */
.static-site-document.is-tool-document:not(.is-hecan-document) {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.static-site-document.is-tool-document:not(.is-hecan-document) > main {
  width: 100%;
  min-width: 0;
  flex: 1 0 auto;
}
.static-site-document.is-tool-document:not(.is-hecan-document) > #lsg-site-footer.site-footer {
  margin-top: auto !important;
}
/* The six-line page is a centered mobile-first shell. Its legacy body uses a
   row flex layout, which would place the shared footer beside the shell on
   desktop instead of below it. */
body:has(.static-site-document.is-bushi-document) {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 !important;
}
.static-site-document.is-bushi-document {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: var(--lsg-site-header-reserve);
}
.lsg-legacy-loader {
  position: fixed;
  inset: 0;
  /* Keep the shared public navigation visible while the immersive scene boots. */
  z-index: 2147482995;
  display: grid;
  place-items: center;
  background: #fff;
  color: #2a3242;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .45s ease, visibility 0s linear 0s;
}
.lsg-legacy-loader.is-ready {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .45s ease, visibility 0s linear .45s;
}
.lsg-legacy-loader__content {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 180px;
  text-align: center;
}
.lsg-legacy-loader__spinner {
  width: 58px;
  height: 58px;
  border: 2px solid rgba(70, 83, 101, .22);
  border-top-color: #9a741c;
  border-right-color: #4b9b71;
  border-radius: 50%;
  animation: lsg-legacy-loader-spin 1s linear infinite;
}
.lsg-legacy-loader__content strong {
  color: #76570c;
  font: 700 20px/1.2 "Noto Serif SC", "Songti SC", serif;
  letter-spacing: .18em;
  text-indent: .18em;
}
.lsg-legacy-loader__content span:last-child {
  color: #626d7d;
  font: 12px/1.5 "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .12em;
}
@keyframes lsg-legacy-loader-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .lsg-legacy-loader__spinner { animation: none; }
}
.lsg-tool-back {
  position: fixed;
  top: calc(var(--lsg-site-header-height) + 12px);
  left: clamp(14px, 4vw, 48px);
  z-index: 2147482990;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(55, 49, 41, .18);
  border-radius: 999px;
  color: #3a3530;
  background: rgba(255, 252, 246, .9);
  box-shadow: 0 8px 22px rgba(47, 40, 31, .12);
  font: 13px/1 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.lsg-tool-back:hover {
  border-color: rgba(125, 93, 45, .42);
  background: #fff;
  box-shadow: 0 10px 26px rgba(47, 40, 31, .16);
  transform: translateY(-1px);
}
.lsg-tool-back:focus-visible {
  outline: 3px solid rgba(125, 93, 45, .3);
  outline-offset: 3px;
}
.lsg-home-back {
  position: fixed;
  top: var(--lsg-site-header-reserve);
  left: 16px;
  z-index: 2147482990;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 280px;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid #e3e9e6;
  border-radius: 5px;
  color: #157b67;
  background: rgba(255, 255, 255, var(--lsg-surface-alpha, .54));
  box-shadow: 0 3px 12px rgba(32, 62, 48, .06);
  font: 12px/1 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.lsg-home-back:hover {
  border-color: #b8d5c9;
  color: #106753;
  background: #eaf5ef;
}
.lsg-home-back:focus-visible {
  outline: 2px solid #157b67;
  outline-offset: 3px;
}
.static-site-document.is-renti-document .lsg-home-back {
  position: static;
  width: 100%;
  min-height: 32px;
  margin: 0 0 18px;
  padding: 0 12px;
  box-shadow: 0 3px 12px rgba(32, 62, 48, .06);
}
.static-site-document.is-renti-document .lsg-home-back svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.static-site-document.is-tool-document .hecan-return-link {
  display: none !important;
}
/* Ocean 工具快照原本在 html.ocean 下绘制。迁移到当前 Next 壳后，
   根节点主题类不再随快照保留，先用页面自身的 ocean token 绘制，避免首帧落入暗色默认主题。
   工具首页和三术合参保留各自的纸张主题，不纳入这一组。 */
.static-site-document.is-ocean-tool-document,
.static-site-document.is-qizheng-document {
  color-scheme: light;
  --theme-paper: #f6f9f5;
  --theme-paper-raised: #ffffff;
  --theme-ink: #14282a;
  --theme-ink-secondary: #1d5057;
  --theme-ink-muted: #14282aad;
  --theme-wash: #2e829017;
  --theme-cinnabar: #9f493f;
  --theme-border: #20585f29;
  --theme-shadow: rgba(18, 57, 64, .12);
  --ocean-paper: #f6f9f5;
  --ocean-blue: #1177a7;
  --ocean-cyan: #8ae4ef;
  --ocean-deep: #0b5177;
  --ocean-sea-ink: #0f3546;
  --ocean-abyss: #071e2a;
  --ocean-foam: #e7f7f5;
  --ocean-ink-line: #0b1418;
  --background: #f6f9f5;
  --foreground: #14282a;
  --card: #ffffffc7;
  --card-foreground: #14282a;
  --primary: #0b1418;
  --primary-foreground: #f8fbf7;
  --secondary: #2e829017;
  --secondary-foreground: #1d5057;
  --muted: #14282a14;
  --muted-foreground: #14282aad;
  --border: #20585f29;
  --ring: #0510146b;
  --destructive: #b04b3d;
}
/* The migrated hecan page still contains its former local header. The shared
   Next header owns this page now, so hide the duplicate header before the
   progress rail starts. */
.static-site-document.is-hecan-document > .lsg-topbar {
  display: none !important;
}
.static-site-document.is-hecan-document {
  min-height: calc(100vh - var(--lsg-site-header-reserve));
  min-height: calc(100dvh - var(--lsg-site-header-reserve));
}
.static-site-document.is-hecan-document > .stage {
  min-height: calc(100vh - var(--lsg-site-header-reserve));
  min-height: calc(100dvh - var(--lsg-site-header-reserve));
}

/* Full-screen legacy tools have fixed descendants that ignore wrapper
   padding. Move their working surfaces below the shared header as well. */
.static-site-document.is-immersive #app {
  top: var(--lsg-site-header-reserve);
}
.static-site-document.is-immersive #uiSidebar {
  height: calc(100dvh - var(--lsg-site-header-reserve));
}
.static-site-document.is-immersive #sidebarFoldBtn {
  top: calc(var(--lsg-site-header-reserve) + 10px);
}
.static-site-document.is-immersive #topbar {
  top: var(--lsg-site-header-reserve);
}
.static-site-document.is-immersive #main,
.static-site-document.is-immersive #side {
  top: calc(var(--lsg-site-header-reserve) + 46px + var(--safe-top, 0px));
}
/* BR-WEB-TOOLS-010: the mobile sheet is anchored below the canvas, not at the shared header. */
@media (max-width: 900px) {
  .static-site-document.is-kanyu-document #side { top:auto; bottom:0; }
}
@media (min-width: 901px) {
  .static-site-document.is-kanyu-document #topbar {
    top: var(--lsg-site-header-reserve);
    right: 0;
    left: auto;
    width: 250px;
    height: 46px;
    gap: 3px;
    padding: 0 6px;
    overflow: hidden;
  }
  .static-site-document.is-kanyu-document #topbar .back {
    flex: none;
    padding: 4px 5px;
    font-size: 13px;
    white-space: nowrap;
  }
  .static-site-document.is-kanyu-document #topbar .title {
    flex: none;
    font-size: 18px;
    color: #000;
    letter-spacing: .08em;
    white-space: nowrap;
  }
  .static-site-document.is-kanyu-document #topbar .sub {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .static-site-document.is-kanyu-document #main,
  .static-site-document.is-kanyu-document #side {
    top: var(--lsg-site-header-reserve);
  }
  .static-site-document.is-kanyu-document #side {
    padding-top: 56px;
  }
}
.lsg-site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  text-decoration: none;
  color: #1c1a17;
}
.lsg-site-header .brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  overflow: hidden;
  background: #0b0b0b;
  flex: none;
}
.lsg-site-header .brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.lsg-site-header .brand-logo-frame {
  display: grid;
  place-items: center;
  width: 68px;
  height: 30px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(28,26,23,.16);
  background: #0b0b0b;
  flex: none;
}
.lsg-site-header .brand-logo-frame .brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.lsg-site-header .brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}
.lsg-site-header .brand-text strong {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  font-size: 20px;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.lsg-site-header .brand-text small {
  font-size: 10px;
  letter-spacing: 0.28em;
  opacity: 0.55;
  text-transform: uppercase;
}
.lsg-site-header .top-nav {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(50,46,40,.10);
  border-radius: 999px;
  background: rgba(255,255,255,var(--lsg-surface-alpha,.54));
  box-shadow: 0 10px 34px rgba(47,40,31,.08), inset 0 1px 0 rgba(255,255,255,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.lsg-site-header .top-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  color: #3a3530;
  font-size: 14px;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background .2s, color .2s;
}
.lsg-site-header .top-nav a[aria-current="page"],
.lsg-site-header .top-nav a.is-active {
  color: #7d5d2d;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 4px 12px rgba(47, 40, 31, .1), inset 0 0 0 1px rgba(125, 93, 45, .18);
  font-weight: 650;
}
.lsg-site-header .top-nav .site-login-link,
.lsg-site-header .top-nav .site-login-link[aria-current="page"],
.lsg-site-header .top-nav .site-login-link.is-active {
  min-width: 84px;
  margin-left: auto;
  padding-inline: 16px;
  gap: 7px;
  border: 1px solid #8a6839;
  color: #fffaf2;
  background: #8a6839;
  box-shadow: 0 3px 10px rgba(80, 57, 28, .18);
  font-weight: 650;
}
.lsg-site-header .top-nav .site-login-link:hover,
.lsg-site-header .top-nav .site-login-link[aria-current="page"]:hover {
  color: #fffaf2;
  background: #72532c;
  border-color: #72532c;
}
.lsg-site-header .top-nav .site-login-link:focus-visible {
  outline: 2px solid #9b7845;
  outline-offset: 2px;
}
.lsg-site-header .top-nav .site-login-link[aria-current="page"]::after,
.lsg-site-header .top-nav .site-login-link.is-active::after { display: none; }
.lsg-site-header .top-nav a[aria-current="page"]::after,
.lsg-site-header .top-nav a.is-active::after {
  position: absolute;
  right: 14px;
  bottom: 4px;
  left: 14px;
  height: 2px;
  border-radius: 999px;
  background: #b8955d;
  content: "";
}
.lsg-site-header .top-nav a { position: relative; }
.lsg-site-header .mobile-menu-trigger {
  display: none;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(50,46,40,.14);
  border-radius: 8px;
  color: #29251f;
  background: rgba(255,255,255,.72);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lsg-site-header .mobile-menu-trigger:focus-visible,
.lsg-site-header .mobile-nav-dialog__close:focus-visible,
.lsg-site-header .mobile-nav-dialog__links a:focus-visible {
  outline: 2px solid #9b7845;
  outline-offset: 2px;
}
.lsg-site-header .mobile-nav-dialog {
  position: fixed;
  inset: 0 auto 0 0;
  box-sizing: border-box;
  width: min(84vw, 340px);
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(20px, env(safe-area-inset-bottom, 0px));
  border: 0;
  border-radius: 0 14px 14px 0;
  color: #1c1a17;
  background: rgba(255,252,246,.98);
  box-shadow: 16px 0 40px rgba(24,22,19,.16);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .18s ease, transform .18s ease;
}
.lsg-site-header .mobile-nav-dialog[open] {
  opacity: 1;
  transform: translateX(0);
}
.lsg-site-header .mobile-nav-dialog::backdrop {
  background: rgba(17,19,20,.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.lsg-site-header .mobile-nav-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(50,46,40,.12);
}
.lsg-site-header .mobile-nav-dialog__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  font-size: 18px;
  font-weight: 700;
}
.lsg-site-header .mobile-nav-dialog__brand .brand-mark {
  width: 36px;
  height: 36px;
}
.lsg-site-header .mobile-nav-dialog__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(50,46,40,.14);
  border-radius: 8px;
  color: #29251f;
  background: rgba(255,255,255,.72);
  cursor: pointer;
}
.lsg-site-header .mobile-nav-dialog__links {
  display: grid;
  gap: 2px;
}
.lsg-site-header .mobile-nav-dialog__links a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 0 14px 0 18px;
  border-radius: 7px;
  color: #38332c;
  font-size: 16px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.lsg-site-header .mobile-nav-dialog__links a[aria-current="page"] {
  color: #76572c;
  background: rgba(184,149,93,.12);
  font-weight: 650;
}
.lsg-site-header .mobile-nav-dialog__links a[aria-current="page"]::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 3px;
  background: #b8955d;
  content: "";
}
@starting-style {
  .lsg-site-header .mobile-nav-dialog[open] {
    opacity: 0;
    transform: translateX(-12px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .lsg-site-header .mobile-nav-dialog { transition: none; }
}

/* Client-only legacy routes receive a server-rendered content fallback so the
   migrated shell never leaves a page with only its navigation and loader. */
.lsg-knowledge-fallback,
.lsg-learning-fallback {
  --lsg-paper: #f7f2e8;
  --lsg-paper-bright: #fffdf8;
  --lsg-ink: #1f1c18;
  --lsg-muted: #716b62;
  --lsg-line: #ded7ca;
  --lsg-accent: #c8472e;
  width: min(100% - 2rem, 1132px);
  margin: 0 auto;
  color: var(--lsg-ink);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.lsg-knowledge-fallback {
  padding: clamp(28px, 5vw, 60px) 0 clamp(56px, 8vw, 104px);
}
.lsg-knowledge-fallback__header,
.lsg-learning-fallback__header {
  max-width: 680px;
  margin: 0 auto clamp(28px, 4vw, 48px);
  text-align: center;
}
.lsg-knowledge-fallback__header > span,
.lsg-learning-fallback__header > span,
.lsg-learning-fallback__kicker {
  color: var(--lsg-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
}
.lsg-knowledge-fallback h1,
.lsg-learning-fallback h1,
.lsg-knowledge-fallback h2,
.lsg-learning-fallback h2 {
  margin: 0;
  color: var(--lsg-ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  font-weight: 650;
}
.lsg-knowledge-fallback h1,
.lsg-learning-fallback h1 {
  margin-top: 10px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: .04em;
}
.lsg-knowledge-fallback__header p,
.lsg-learning-fallback__header p {
  max-width: 580px;
  margin: 14px auto 0;
  color: var(--lsg-muted);
  font-size: 15px;
  line-height: 1.85;
}
.lsg-knowledge-fallback__groups {
  display: grid;
  gap: clamp(30px, 5vw, 56px);
}
.lsg-knowledge-fallback__group-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--lsg-line);
}
.lsg-knowledge-fallback__group-title span {
  color: var(--lsg-accent);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .1em;
}
.lsg-knowledge-fallback__group-title h2 {
  font-size: clamp(20px, 2.5vw, 28px);
}
.lsg-knowledge-fallback__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.lsg-knowledge-fallback__card {
  display: grid;
  min-height: 190px;
  align-content: start;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--lsg-line);
  border-radius: 8px;
  color: var(--lsg-ink);
  background: var(--lsg-paper-bright);
  box-shadow: 0 8px 20px rgb(31 28 24 / 4%);
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.lsg-knowledge-fallback__card:hover,
.lsg-knowledge-fallback__card:focus-visible {
  border-color: color-mix(in srgb, var(--lsg-accent) 58%, var(--lsg-line));
  box-shadow: 0 13px 29px rgb(31 28 24 / 10%);
  transform: translateY(-2px);
}
.lsg-knowledge-fallback__card:focus-visible,
.lsg-learning-fallback a:focus-visible {
  outline: 3px solid #005a9c;
  outline-offset: 2px;
}
.lsg-knowledge-fallback__card-kicker {
  color: var(--lsg-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}
.lsg-knowledge-fallback__card strong {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  font-size: 19px;
  line-height: 1.4;
}
.lsg-knowledge-fallback__card > span:not(.lsg-knowledge-fallback__card-kicker):not(.lsg-knowledge-fallback__card-action) {
  color: var(--lsg-muted);
  font-size: 13px;
  line-height: 1.7;
}
.lsg-knowledge-fallback__card-action {
  align-self: end;
  margin-top: auto;
  color: var(--lsg-accent);
  font-size: 12px;
  font-weight: 700;
}
.lsg-knowledge-fallback__card-action span {
  margin-left: 4px;
  font-size: 16px;
}
.lsg-learning-fallback {
  min-height: calc(100svh - var(--lsg-site-header-reserve));
  padding: clamp(24px, 5vw, 64px) 0 clamp(60px, 8vw, 112px);
}
.lsg-learning-fallback__inner {
  max-width: 928px;
  margin: 0 auto;
}
.lsg-learning-fallback__header {
  max-width: 740px;
  margin-left: 0;
  text-align: left;
}
.lsg-learning-fallback__header p {
  margin-left: 0;
}
.lsg-learning-fallback__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(30px, 5vw, 54px);
}
.lsg-learning-fallback__tabs a,
.lsg-learning-fallback__glossary a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  border: 1px solid var(--lsg-line);
  border-radius: 999px;
  color: var(--lsg-muted);
  background: var(--lsg-paper-bright);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.lsg-learning-fallback__tabs a:hover,
.lsg-learning-fallback__tabs a:focus-visible,
.lsg-learning-fallback__glossary a:hover,
.lsg-learning-fallback__glossary a:focus-visible {
  border-color: var(--lsg-accent);
  color: var(--lsg-accent);
}
.lsg-learning-fallback__section {
  margin-top: clamp(32px, 5vw, 60px);
  padding-top: 24px;
  border-top: 1px solid var(--lsg-line);
}
.lsg-learning-fallback__section-heading,
.lsg-learning-fallback__section--split {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(0, 1.3fr);
  gap: 24px;
  align-items: start;
}
.lsg-learning-fallback__section-heading > span {
  color: var(--lsg-accent);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .1em;
}
.lsg-learning-fallback__section h2 {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.3;
}
.lsg-learning-fallback__section-heading p {
  margin: 9px 0 0;
  color: var(--lsg-muted);
  font-size: 14px;
  line-height: 1.8;
}
.lsg-learning-fallback__track-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.lsg-learning-fallback__track {
  display: grid;
  min-height: 170px;
  align-content: start;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--lsg-line);
  border-radius: 8px;
  color: var(--lsg-ink);
  background: var(--lsg-paper-bright);
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.lsg-learning-fallback__track:hover {
  border-color: color-mix(in srgb, var(--lsg-accent) 58%, var(--lsg-line));
  box-shadow: 0 12px 26px rgb(31 28 24 / 8%);
  transform: translateY(-2px);
}
.lsg-learning-fallback__track span,
.lsg-learning-fallback__kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}
.lsg-learning-fallback__track span,
.lsg-learning-fallback__kicker { color: var(--lsg-accent); }
.lsg-learning-fallback__track strong {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  font-size: 20px;
}
.lsg-learning-fallback__track p,
.lsg-learning-fallback__section--split li {
  margin: 0;
  color: var(--lsg-muted);
  font-size: 14px;
  line-height: 1.75;
}
.lsg-learning-fallback__track em {
  align-self: end;
  margin-top: auto;
  color: var(--lsg-accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}
.lsg-learning-fallback__section--split ul,
.lsg-learning-fallback__section--split ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}
.lsg-learning-fallback__section--split li::marker { color: var(--lsg-accent); }
.lsg-learning-fallback__section--glossary {
  display: grid;
  gap: 14px;
}
.lsg-learning-fallback__glossary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 760px) {
  .lsg-knowledge-fallback__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lsg-learning-fallback__section-heading,
  .lsg-learning-fallback__section--split { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 520px) {
  .lsg-knowledge-fallback,
  .lsg-learning-fallback { width: min(100% - 1.25rem, 1132px); }
  .lsg-knowledge-fallback__grid,
  .lsg-learning-fallback__track-grid { grid-template-columns: 1fr; }
  .lsg-knowledge-fallback__card { min-height: 160px; }
  .lsg-learning-fallback__tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lsg-learning-fallback__tabs a { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .lsg-knowledge-fallback__card,
  .lsg-learning-fallback__track { transition: none; }
}
.lsg-site-header .top-nav::-webkit-scrollbar { display: none; }
.lsg-site-header .top-nav .legacy-app-link {
  color: #9d3b31;
  border: 1px solid rgba(157,59,49,.28);
}
.lsg-site-header .top-nav .legacy-app-link:hover,
.lsg-site-header .top-nav .legacy-app-link.is-active {
  color: #fffaf2;
  background: #9d3b31;
  border-color: #9d3b31;
}
.lsg-site-header .top-nav a:hover { color: #1c1a17; background: rgba(255,255,255,.7); }
.lsg-site-header .top-nav a.is-active,
.lsg-site-header .top-nav a[aria-current="page"] {
  color: #1c1a17;
  font-weight: 600;
  background: #fff;
  box-shadow: 0 4px 14px rgba(47,40,31,.08);
}
.lsg-site-header .lsg-context-nav {
  display: flex;
  min-width: 0;
  max-width: min(38vw, 440px);
  flex: 0 1 auto;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border: 1px solid rgba(50,46,40,.10);
  border-radius: 8px;
  padding: 4px;
  background: rgba(247,249,248,.92);
}
.lsg-site-header .lsg-context-nav::-webkit-scrollbar { display: none; }
.lsg-site-header .lsg-context-nav .mode {
  min-height: 32px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #3a3530;
  font-size: 13px;
  white-space: nowrap;
}
.lsg-site-header .lsg-context-nav .mode.active {
  color: #157b67;
  background: #fff;
  box-shadow: 0 2px 6px rgba(35,54,52,.08);
}
.lsg-site-header .lsg-context-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding-left: 8px;
  color: #788985;
  font-size: 11px;
  white-space: nowrap;
}
.lsg-site-header .lsg-context-meta .icon-btn {
  min-height: 28px;
  padding: 2px 8px;
  border: 1px solid rgba(120,137,133,.25);
  border-radius: 6px;
  background: #fff;
}
.lsg-site-header .lsg-context-meta .live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #157b67;
}
.lsg-site-header .lsg-renti-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: #788985;
  font-size: 11px;
  white-space: nowrap;
}
.lsg-site-header .lsg-renti-meta .icon-btn {
  min-height: 28px;
  padding: 2px 8px;
  border: 1px solid rgba(120,137,133,.25);
  border-radius: 6px;
  background: #fff;
}
.lsg-site-header .lsg-renti-meta .live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #157b67;
}
.static-site-document.is-renti-document .lsg-renti-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  color: #788985;
  font-size: 11px;
  white-space: nowrap;
}
.static-site-document.is-renti-document .lsg-renti-meta .icon-btn {
  min-height: 28px;
  padding: 2px 8px;
  border: 1px solid rgba(120,137,133,.25);
  border-radius: 6px;
  background: #fff;
}
.static-site-document.is-renti-document .lsg-renti-meta .live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #157b67;
}
.static-site-document.is-renti-document .help-inline {
  margin-left: 8px;
  vertical-align: middle;
}
.right-panel > .renti-work-mode {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 10px;
  background: #f4f6f5;
}
.right-panel > .renti-work-mode::-webkit-scrollbar { display: none; }
.right-panel > .renti-work-mode .mode {
  flex: 1 0 auto;
  min-height: 32px;
  padding: 8px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  white-space: nowrap;
}
.right-panel > .renti-work-mode .mode.active {
  color: var(--accent);
  background: #fff;
  box-shadow: 0 2px 6px rgba(35,54,52,.08);
}
.right-panel > .renti-work-mode + .detail-tabs { padding-top: 12px; }
/* legacy bare lsg-topbar — hide if leftover */
/* legacy lsg-topbar unused */
@media (max-width: 860px) {
  .lsg-site-header .top-nav { gap: 0; }
  .lsg-site-header .top-nav a { padding: 0 10px; font-size: 13px; }
  .lsg-site-header .lsg-context-nav { max-width: 42vw; }
}
/* BR-WEB-RESPONSIVE-001: Use the existing drawer before the full navigation stops fitting. */
@media (max-width: 1100px) {
  .lsg-site-header .mobile-menu-trigger { display: grid; }
  .lsg-site-header .top-nav { display: none; }
}
@media (max-width: 640px) {
  :root {
    --lsg-site-header-height: 64px;
    --lsg-site-header-reserve: max(64px, calc(56px + env(safe-area-inset-top, 0px)));
  }
  .lsg-site-header {
    width: 100%;
    min-height: var(--lsg-site-header-height);
    gap: 12px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .lsg-site-header .brand {
    flex: 0 0 auto;
    min-width: 0;
  }
  .lsg-site-header .brand-mark { width: 38px; height: 38px; }
  .lsg-site-header .brand-text { min-width: 0; white-space: nowrap; }
  .lsg-site-header .brand-text small { display: none; }
  .lsg-site-header .mobile-menu-trigger { display: grid; }
  .lsg-site-header .top-nav {
    display: none;
  }
  .lsg-site-header .lsg-context-nav { max-width: 100%; }
  .lsg-site-header .lsg-context-meta { display: none; }
  .lsg-site-header .lsg-renti-meta { display: none; }
  .lsg-home-back {
    left: 10px;
    width: min(180px, calc(100vw - 20px));
  }
  .static-site-document.is-immersive #uiSidebar { height: auto; }
  .lsg-tool-back {
    top: calc(var(--lsg-site-header-height) + 8px);
    left: 14px;
    min-height: 38px;
    padding: 0 12px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .right-panel > .renti-work-mode { padding: 7px 8px; }
  .right-panel > .renti-work-mode .mode { padding: 7px 8px; font-size: 11px; }
}

.lsg-site-header .brand-text { display:flex; flex-direction:column; gap:2px; line-height:1.1; }
.lsg-site-header .brand-text strong { font-family:"Noto Serif SC","Source Han Serif SC","Songti SC",serif; font-size:20px; letter-spacing:.12em; font-weight:700; color:#1c1a17; }
.lsg-site-header .brand-text small { font-size:10px; letter-spacing:.28em; opacity:.55; text-transform:uppercase; color:#1c1a17; }

/* All normal legacy pages share the same restrained public footer. */
#lsg-site-footer.site-footer {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  margin: 40px 0 0 !important;
  padding: 28px clamp(20px, 4vw, 48px) max(36px, env(safe-area-inset-bottom, 0px)) !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto !important;
  gap: 20px !important;
  align-items: center !important;
  border-top: 0 !important;
  color: #000 !important;
  background: rgba(255, 252, 246, var(--lsg-surface-alpha, .54)) !important;
  box-shadow: 0 -10px 28px rgba(47, 40, 31, .08) !important;
  font: 13px/1.6 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif !important;
}
#lsg-site-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #000;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  font-size: 20px;
}
#lsg-site-footer .footer-brand .brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
#lsg-site-footer .footer-tagline { justify-self: center; color: #000; font-size: 17px; text-align: center; }
#lsg-site-footer .footer-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
  text-align: right;
}
#lsg-site-footer .footer-meta span,
#lsg-site-footer .footer-meta a { overflow-wrap: anywhere; }
#lsg-site-footer .footer-contact {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 12px;
}
#lsg-site-footer .footer-contact a,
#lsg-site-footer .footer-meta a { color: inherit; text-decoration: none; }
#lsg-site-footer .footer-meta a:hover { color: #7d5d2d; text-decoration: underline; }

@media (max-width: 680px) {
  #lsg-site-footer.site-footer {
    width: 100% !important;
    padding-inline: 20px !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    align-items: start !important;
  }
  #lsg-site-footer .footer-tagline { justify-self: center; text-align: center; }
  #lsg-site-footer .footer-meta { justify-items: start; text-align: left; }
  #lsg-site-footer .footer-contact { justify-content: flex-start; }
}

/* Hecan keeps the company information as part of the same ink page surface.
   The footer is server-rendered by the page and stays compact instead of
   becoming a separate paper-colored block. */
.static-site-document.is-hecan-document + #lsg-site-footer.site-footer {
  width: min(1500px, calc(100% - 40px)) !important;
  margin: 0 auto !important;
  padding: 28px 0 max(36px, env(safe-area-inset-bottom, 0px)) !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto !important;
  gap: 20px !important;
  align-items: center !important;
  border-top: 0 !important;
  color: #e9e1ce !important;
  background: transparent !important;
  box-shadow: none !important;
}
.static-site-document.is-hecan-document + #lsg-site-footer.site-footer .footer-brand,
.static-site-document.is-hecan-document + #lsg-site-footer.site-footer .footer-tagline,
.static-site-document.is-hecan-document + #lsg-site-footer.site-footer .footer-meta,
.static-site-document.is-hecan-document + #lsg-site-footer.site-footer .footer-meta a,
.static-site-document.is-hecan-document + #lsg-site-footer.site-footer .footer-contact a {
  color: inherit !important;
}
@media (min-width: 681px) {
  .static-site-document.is-hecan-document > .stage {
    padding-bottom: 7px;
  }
  .static-site-document.is-hecan-document > .stage {
    min-height: calc(100vh - var(--lsg-site-header-reserve));
    min-height: calc(100dvh - var(--lsg-site-header-reserve));
  }
}
@media (max-width: 680px) {
  .static-site-document.is-hecan-document {
    min-height: calc(100vh - var(--lsg-site-header-reserve));
    min-height: calc(100dvh - var(--lsg-site-header-reserve));
  }
}

/* Input steps only; keep the hecan reveal and result styling intact. */
.static-site-document.is-hecan-document:has(#view1.active,#view2.active),
.static-site-document.is-hecan-document > .stage:has(#view1.active,#view2.active) { background: transparent !important; }
