:root {
  --canvas: #ffffff;
  --surface: #ffffff;
  --surface-muted: #F7F8FA;
  --line: #EBEEF5;
  --line-strong: #D3D3D3;
  --ink: #333333;
  --body: #666666;
  --muted: #999999;
  --blue: #1377FF;
  --blue-soft: #E7F1FF;
  --teal: #4BBB82;
  --danger: #FD4C2B;
  --sidebar-width: 246px;
  --header-height: 72px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); scrollbar-color: rgba(144, 147, 153, 0.3) transparent; scrollbar-width: thin; }
html::-webkit-scrollbar { width: 8px; height: 8px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb { border-radius: 4px; background-color: rgba(144, 147, 153, 0.3); }
html::-webkit-scrollbar-thumb:hover { background-color: rgba(144, 147, 153, 0.48); }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.7 var(--font-sans); letter-spacing: 0; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.is-hidden { display: none !important; }

/* Reader */
.site-header { position: sticky; z-index: 20; top: 0; display: grid; min-height: var(--header-height); grid-template-columns: var(--sidebar-width) minmax(320px, 710px) minmax(160px, 1fr); align-items: center; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .98); }
.site-logo { display: flex; height: var(--header-height); padding-left: 28px; align-items: center; gap: 10px; border-right: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.site-logo:hover { text-decoration: none; }
.logo-mark { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 5px; color: white; background: var(--blue); font-size: 14px; font-weight: 750; line-height: 1; }
.site-logo strong, .site-logo small { display: block; line-height: 1.2; }
.site-logo strong { font-size: 16px; font-weight: 700; }
.site-logo small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.search-shell { position: relative; width: min(640px, calc(100% - 32px)); justify-self: center; }
.header-search { display: flex; height: 40px; align-items: center; border: 1px solid #bfc9d6; border-radius: 5px; background: #fff; }
.header-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(19, 119, 255, .1); }
.header-search input { width: 100%; min-width: 0; height: 100%; padding: 0 10px 0 13px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.header-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.header-search input::placeholder { color: var(--muted); }
.search-clear { display: none; width: 30px; height: 30px; border: 0; color: var(--muted); background: transparent; font-size: 20px; line-height: 1; }
.header-search:focus-within .search-clear { display: block; }
.search-clear:hover { color: var(--blue); }
.search-submit { display: grid; width: 39px; height: 38px; place-items: center; border: 0; border-left: 1px solid var(--line); color: var(--body); background: transparent; font-size: 22px; line-height: 1; }
.search-submit:hover { color: var(--blue); background: var(--blue-soft); }
.header-actions { display: flex; padding-right: 32px; justify-content: flex-end; }
.login-command { padding: 6px 10px; border: 0; color: var(--ink); background: transparent; font-size: 13px; font-weight: 650; }
.login-command:hover { color: var(--blue); }

.search-suggestions { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; left: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; box-shadow: 0 12px 26px rgba(31, 53, 80, .12); }
.suggestion-list { padding: 6px 0; }
.suggestion-item { display: block; padding: 12px 18px; color: inherit; text-decoration: none; }
.suggestion-item:hover { background: var(--surface-muted); text-decoration: none; }
.result-title { display: block; color: var(--blue); font-size: 15px; font-weight: 700; }
.suggestion-item p, .search-result-item p { display: -webkit-box; overflow: hidden; margin: 3px 0 0; color: var(--body); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.suggestion-item p { font-size: 13px; }
.result-path { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
mark { padding: 0; color: var(--blue); background: transparent; font-weight: 700; }
.suggestion-more { width: 100%; height: 47px; border: 0; border-top: 1px solid var(--line); color: var(--blue); background: #fff; font-size: 14px; font-weight: 650; }
.suggestion-more:hover { background: var(--blue-soft); }
.suggestion-empty { padding: 18px; color: var(--muted); font-size: 13px; }

.reader-shell { display: grid; min-height: calc(100vh - var(--header-height)); grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: sticky; top: var(--header-height); height: calc(100vh - var(--header-height)); padding: 26px 16px 18px; overflow-y: auto; border-right: 1px solid var(--line); background: #fff; scrollbar-color: rgba(144, 147, 153, 0.3) transparent; scrollbar-width: thin; }
.sidebar::-webkit-scrollbar { width: 6px; height: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { border-radius: 4px; background-color: rgba(144, 147, 153, 0.3); }
.sidebar::-webkit-scrollbar-thumb:hover { background-color: rgba(144, 147, 153, 0.48); }
.sidebar-head { padding: 0 12px 17px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 3px; color: var(--muted); font-size: 12px; font-weight: 500; }
.sidebar h1 { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 700; }
.help-menu { padding: 13px 0 16px; }
.menu-item, .menu-group-title, .menu-child { display: block; width: 100%; padding: 8px 11px; border: 0; border-radius: 4px; color: var(--body); background: transparent; text-align: left; }
.menu-item:hover, .menu-group-title:hover, .menu-child:hover { color: var(--blue); background: var(--surface-muted); text-decoration: none; }
.menu-item.is-active, .menu-child.is-active { color: var(--blue); background: var(--blue-soft); font-weight: 700; }
.menu-item.is-unavailable { color: var(--muted); cursor: not-allowed; }
.menu-group-title { display: flex; align-items: center; justify-content: space-between; font-weight: 650; }
.menu-group-title.is-active { color: var(--blue); background: var(--blue-soft); font-weight: 700; }
.menu-static-label { cursor: default; }
.menu-static-label, .menu-item, .menu-child { display: flex; align-items: center; gap: 7px; }
.menu-badge { display: inline-flex; align-items: center; height: 17px; padding: 0 4px; border-radius: 3px; color: #fff; background: #ff4d5b; font-size: 10px; font-weight: 700; line-height: 17px; }
.menu-group-chevron { width: 7px; height: 7px; margin-right: 4px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; color: var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .16s ease; }
.menu-group.is-expanded .menu-group-chevron { transform: rotate(225deg) translateY(-1px); }
.menu-product > .menu-children,.menu-product[open] > .menu-children { display: block; padding-left: 0; }
.menu-children { display: none; padding-left: 12px; }
.menu-group.is-expanded > .menu-children { display: block; }
.menu-child { position: relative; padding-left: 18px; font-size: 13px; }
.menu-child::before { content: ""; position: absolute; top: 17px; left: 8px; width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.menu-divider { height: 1px; margin: 14px 10px; background: var(--line); }
.menu-section-label { display: block; padding: 0 11px 5px; color: var(--muted); font-size: 12px; font-weight: 650; }
.sidebar-foot { position: sticky; bottom: -18px; margin: 12px -16px -18px; padding: 13px 18px; border-top: 1px solid var(--line); color: var(--muted); background: #fff; font-size: 11px; line-height: 1.55; }

.main-panel { position: relative; min-width: 0; }
.mobile-menu-command { display: none; }
.reader-status { max-width: 900px; margin: 90px auto; color: var(--muted); text-align: center; }
.article-layout { display: grid; width: 100%; max-width: none; margin: 0; grid-template-columns: minmax(0, 1fr) 182px; gap: clamp(48px, 4.5vw, 80px); padding: 50px clamp(28px, 3vw, 48px) 90px; }
.article-content { width: 100%; max-width: none; min-width: 0; }
.article-lead { padding-bottom: 27px; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; margin: 0 0 17px; flex-wrap: wrap; gap: 5px; color: var(--muted); font-size: 12px; }
.breadcrumb span:not(:last-child)::after { content: ">"; margin-left: 5px; color: var(--line-strong); }
.article-lead h1 { margin: 0; color: var(--ink); font-size: 30px; line-height: 1.32; font-weight: 730; }
.article-meta { display: flex; margin-top: 13px; flex-wrap: wrap; gap: 7px; }
.article-meta span { padding: 2px 7px; border: 1px solid var(--blue-soft); border-radius: 3px; color: var(--blue); background: #fff; font-size: 11px; }
.markdown-video { display: block; width: 100%; min-height: 260px; margin: 18px 0; aspect-ratio: 16 / 9; border: 0; border-radius: 4px; background: #131b26; object-fit: contain; }
.article-content h2 { margin: 42px 0 15px; padding-top: 2px; color: var(--ink); font-size: 21px; line-height: 1.45; }
.article-content h3 { margin: 30px 0 11px; color: var(--ink); font-size: 16px; line-height: 1.5; }
.article-content h4 { margin: 23px 0 8px; color: var(--ink); font-size: 14px; line-height: 1.55; }
.article-content h2, .article-content h3, .article-content h4, .anchor-target { scroll-margin-top: calc(var(--header-height) + 20px); }
.article-content p { margin: 10px 0; color: var(--body); }
.article-content ul, .article-content ol { margin: 10px 0; padding-left: 22px; color: var(--body); }
.article-content li { margin: 5px 0; }
.article-content blockquote { margin: 19px 0; padding: 12px 15px; border-left: 3px solid var(--blue); color: var(--body); background: var(--surface-muted); }
.article-content blockquote p { margin: 0; color: inherit; }
.article-content hr { margin: 30px 0; border: 0; border-top: 1px solid var(--line); }
.article-content table { width: 100%; margin: 16px 0; border-collapse: collapse; font-size: 13px; }
.article-content th, .article-content td { padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; text-align: left; }
.article-content th { color: var(--ink); background: var(--surface-muted); font-weight: 650; }
.article-content td { color: var(--body); }
.article-content code { padding: 1px 4px; border-radius: 3px; color: var(--ink); background: var(--surface-muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: .92em; }
.field-reference-link { margin: 0; padding: 0; border: 0; color: var(--blue); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.field-reference-link:hover { text-decoration: underline; }
.field-reference-link:focus-visible { border-radius: 2px; outline: 2px solid rgba(19, 119, 255, .35); outline-offset: 2px; }
.article-content figure { margin: 18px 0 22px; }
.article-content img { display: block; max-width: 100%; height: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.markdown-image-trigger { display: block; width: 100%; padding: 0; border: 0; border-radius: 4px; background: transparent; cursor: zoom-in; }
.markdown-image-trigger > img { width: 100%; height: auto; margin: 0; }
.article-toc { position: sticky; top: calc(var(--header-height) + 24px); width: 182px; justify-self: end; align-self: start; padding-top: 7px; }
.article-toc > p { margin: 0 0 8px; color: var(--body); font-size: 12px; font-weight: 650; }
.article-toc a { display: block; padding: 5px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.article-toc a.toc-level-3 { padding-left: 11px; }
.article-toc a:hover { color: var(--blue); text-decoration: none; }

.search-view { width: 100%; max-width: 1240px; margin: 0; padding: 54px clamp(28px, 3vw, 48px) 90px; }
.search-view-head { display: flex; padding-bottom: 26px; align-items: start; justify-content: space-between; gap: 22px; border-bottom: 1px solid var(--line); }
.search-view-head p { margin: 0 0 5px; color: var(--muted); font-size: 13px; }
.search-view-head h1 { margin: 0; color: var(--ink); font-size: 25px; line-height: 1.35; }
.search-view-head span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.filter-command, .filter-reset { padding: 6px 5px; border: 0; color: var(--body); background: transparent; font-size: 13px; }
.filter-command:hover, .filter-command.is-active, .filter-reset:hover { color: var(--blue); }
.result-filter-panel { display: flex; padding: 13px 0; align-items: center; flex-wrap: wrap; gap: 9px 14px; border-bottom: 1px solid var(--line); }
.result-filter-panel label { display: flex; align-items: center; gap: 7px; color: var(--body); font-size: 12px; white-space: nowrap; }
.result-filter-panel select { height: 31px; min-width: 110px; padding: 0 25px 0 7px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--ink); outline: 0; background: white; }
.result-filter-panel select:focus { border-color: var(--blue); }
.search-result-list { padding-top: 10px; }
.search-result-item { display: block; padding: 24px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.search-result-item:hover { text-decoration: none; }
.search-result-item:hover .result-title { text-decoration: underline; }
.search-result-item .result-title { font-size: 18px; }
.search-result-item p { max-width: 850px; margin-top: 7px; -webkit-line-clamp: 3; font-size: 14px; line-height: 1.75; }
.search-result-item .result-path { margin-top: 8px; }
.empty-state { display: grid; min-height: 170px; place-content: center; gap: 6px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); }
.reader-toast { position: fixed; z-index: 40; right: 25px; bottom: 25px; max-width: 280px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--body); background: #fff; box-shadow: 0 8px 22px rgba(26, 46, 74, .12); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .16s ease, transform .16s ease; font-size: 13px; }
.reader-toast.is-visible { opacity: 1; transform: translateY(0); }
body.has-image-lightbox { overflow: hidden; }
body.has-field-reference { overflow: hidden; padding-right: var(--field-reference-scrollbar-width, 0px); }
.image-lightbox { position: fixed; z-index: 60; inset: 0; display: grid; padding: 30px; place-items: center; background: rgba(18, 27, 39, .82); }
.image-lightbox-frame { position: relative; display: grid; max-width: min(96vw, 1840px); max-height: calc(100vh - 60px); justify-items: center; }
.image-lightbox-image { display: block; max-width: 100%; max-height: calc(100vh - 106px); border-radius: 4px; background: #fff; object-fit: contain; }
.image-lightbox-close { position: absolute; z-index: 1; top: 10px; right: 10px; display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 0; border-radius: 4px; color: #fff; background: rgba(20, 31, 46, .72); font-size: 25px; line-height: 1; }
.image-lightbox-close:hover { background: rgba(20, 31, 46, .94); }
.image-lightbox-caption { width: 100%; margin: 9px 0 0; color: rgba(255, 255, 255, .9); text-align: center; font-size: 13px; }
.field-reference-dialog { position: fixed; z-index: 55; inset: 0; display: grid; padding: 32px; place-items: center; background: rgba(27, 45, 68, .32); }
.field-reference-panel { display: grid; width: min(860px, 100%); max-height: min(82vh, 880px); grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 24px 72px rgba(20, 43, 74, .2); }
.field-reference-head { display: flex; padding: 21px 24px 17px; align-items: start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.field-reference-head .eyebrow { margin-bottom: 5px; }
.field-reference-head h2 { margin: 0; color: var(--ink); font-size: 19px; line-height: 1.45; }
.field-reference-close { display: grid; width: 30px; height: 30px; padding: 0; flex: 0 0 auto; place-items: center; border: 1px solid transparent; border-radius: 4px; color: var(--muted); background: transparent; font-size: 22px; line-height: 1; }
.field-reference-close:hover { border-color: var(--line); color: var(--ink); background: var(--surface-muted); }
.field-reference-close:focus-visible { outline: 2px solid rgba(19, 119, 255, .35); outline-offset: 2px; }
.field-reference-content { overflow-y: auto; padding: 4px 24px 28px; }
.field-reference-content h2 { margin: 26px 0 12px; color: var(--ink); font-size: 18px; line-height: 1.45; }
.field-reference-content h3 { margin: 23px 0 9px; color: var(--ink); font-size: 15px; line-height: 1.5; }
.field-reference-content p { margin: 10px 0; color: var(--body); }
.field-reference-content ul, .field-reference-content ol { margin: 10px 0; padding-left: 22px; color: var(--body); }
.field-reference-content li { margin: 5px 0; }
.field-reference-content table { width: 100%; margin: 15px 0; border-collapse: collapse; font-size: 13px; }
.field-reference-content th, .field-reference-content td { padding: 9px 10px; border: 1px solid var(--line); vertical-align: top; text-align: left; }
.field-reference-content th { color: var(--ink); background: var(--surface-muted); font-weight: 650; }
.field-reference-content td { color: var(--body); }
.field-reference-content th:first-child, .field-reference-content td:first-child { width: 190px; min-width: 190px; }
.field-reference-content code { padding: 1px 4px; border-radius: 3px; color: var(--ink); background: var(--surface-muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: .92em; }

/* Content maintenance */
.admin-page { background: #f4f7fa; }
.admin-topbar { display: flex; min-height: 82px; padding: 14px 28px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: white; }
.admin-topbar h1 { margin: 0; font-size: 20px; }
.admin-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.save-state { margin-right: 4px; color: var(--muted); font-size: 12px; }
.save-state.is-saved { color: var(--teal); }
.primary-command, .secondary-command, .outline-command { display: inline-flex; min-height: 34px; padding: 7px 12px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 4px; font-size: 13px; font-weight: 650; text-decoration: none; }
.primary-command { color: white; background: var(--blue); }
.primary-command:hover { background: #0f58c9; text-decoration: none; }
.secondary-command { border-color: #08796b; color: white; background: var(--teal); }
.secondary-command:hover { background: #056d60; }
.outline-command { border-color: var(--line-strong); color: var(--body); background: white; }
.outline-command:hover { border-color: #b7c6d8; color: var(--blue); text-decoration: none; }
.admin-layout { display: grid; min-height: calc(100vh - 82px); grid-template-columns: 274px minmax(0, 1fr); }
.editor-list-panel { padding: 22px 16px; border-right: 1px solid var(--line); background: #fff; }
.small-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 650; }
.editor-list-panel input { width: 100%; height: 34px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 4px; outline: 0; }
.editor-list-panel input:focus { border-color: var(--blue); }
.admin-article-list { padding-top: 14px; }
.admin-list-product + .admin-list-product { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.admin-list-product h2 { margin: 0 0 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.admin-list-direct { padding-bottom: 3px; }
.admin-list-group { margin-top: 2px; }
.admin-list-group-title { display: flex; width: 100%; min-height: 34px; padding: 7px 9px; align-items: center; justify-content: space-between; border: 0; border-radius: 4px; color: var(--body); background: transparent; text-align: left; font-size: 13px; font-weight: 650; }
.admin-list-group-title:hover { background: var(--surface-muted); }
.admin-list-group-title i { width: 7px; height: 7px; margin-right: 3px; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .16s ease; }
.admin-list-group.is-expanded .admin-list-group-title i { transform: rotate(225deg) translate(-1px, -1px); }
.admin-list-group-items { display: none; padding: 1px 0 4px 8px; }
.admin-list-group.is-expanded .admin-list-group-items { display: block; }
.admin-list-item { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 4px; color: var(--body); background: transparent; text-align: left; }
.admin-list-item:hover { background: var(--surface-muted); }
.admin-list-item.is-active { color: var(--blue); background: var(--blue-soft); }
.admin-list-item strong, .admin-list-item span { display: block; }
.admin-list-item strong { font-size: 13px; font-weight: 500; }
.admin-list-item span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.editor-panel { min-width: 0; padding: 30px clamp(20px, 4vw, 58px) 56px; }
.article-form { max-width: 1080px; }
.form-title-row, .metadata-grid { display: grid; gap: 14px; }
.form-title-row { grid-template-columns: minmax(0, 1fr) 170px; }
.metadata-grid { margin-top: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.article-form label { min-width: 0; color: var(--body); font-size: 12px; font-weight: 650; }
.article-form input, .article-form select { display: block; width: 100%; height: 38px; margin-top: 5px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--ink); outline: 0; background: white; font-weight: 400; }
.article-form input[hidden] { display: none; }
.article-form .publication-toggle { display: flex; align-items: center; gap: 8px; }
.article-form .publication-toggle input { display: inline-block; width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--accent); }
.article-form input:focus, .article-form select:focus, .article-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(19, 119, 255, .09); }
.full-row { grid-column: 1 / -1; }
.editor-heading { display: flex; margin: 30px 0 10px; align-items: start; justify-content: space-between; gap: 14px; }
.editor-heading h2 { margin: 0; color: var(--ink); font-size: 16px; }
.editor-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.source-badge { color: var(--muted); font-size: 11px; white-space: nowrap; }
.article-form textarea { display: block; width: 100%; min-height: 480px; padding: 15px; border: 1px solid var(--line-strong); border-radius: 4px; outline: 0; resize: vertical; color: var(--ink); background: #fff; font: 13px/1.7 "SFMono-Regular", Consolas, "PingFang SC", monospace; }
.editor-media-bar { display: flex; margin-top: 14px; padding: 12px 0 0; align-items: start; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); }
.editor-media-bar.is-dragover { border-top-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 2px rgba(19, 119, 255, .11); }
.editor-media-tools { display: grid; min-width: 0; gap: 9px; }
.image-insert-control, .video-insert-control { display: flex; min-height: 34px; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.video-insert-control label { color: var(--body); font-size: 12px; font-weight: 650; }
.video-insert-control input { width: min(360px, 52vw); height: 34px; margin: 0; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--ink); background: #fff; font-weight: 400; }
.editor-save-command { flex: 0 0 auto; min-width: 96px; }
.upload-result { min-height: 0; color: var(--teal); font-size: 12px; }
.upload-result.is-error { color: var(--danger); }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 210px minmax(260px, 1fr) 80px; }
  .site-logo { padding-left: 20px; }
  .article-layout { grid-template-columns: minmax(0, 1fr); padding: 38px 30px 70px; }
  .article-toc { display: none; }
  .editor-media-bar { flex-direction: column; }
  .field-reference-panel { max-height: 86vh; }
}

@media (max-width: 720px) {
  :root { --header-height: 62px; --sidebar-width: 278px; }
  .site-header { grid-template-columns: 154px minmax(0, 1fr) 48px; }
  .site-logo { height: var(--header-height); padding-left: 14px; gap: 7px; }
  .site-logo small { display: none; }
  .site-logo strong { font-size: 14px; }
  .logo-mark { width: 25px; height: 25px; }
  .search-shell { width: calc(100% - 10px); }
  .header-search { height: 36px; }
  .header-search input { padding-left: 9px; font-size: 12px; }
  .search-submit { width: 34px; height: 34px; }
  .header-actions { padding-right: 8px; }
  .login-command { padding: 6px 3px; font-size: 12px; }
  .sidebar { position: fixed; z-index: 25; top: var(--header-height); left: 0; height: calc(100vh - var(--header-height)); transform: translateX(-100%); transition: transform .18s ease; box-shadow: 10px 0 28px rgba(20, 45, 75, .14); }
  .sidebar.is-open { transform: translateX(0); }
  .reader-shell { display: block; }
  .mobile-menu-command { position: fixed; z-index: 18; top: calc(var(--header-height) + 12px); left: 12px; display: inline-flex; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--body); background: rgba(255, 255, 255, .95); font-size: 12px; }
  .article-layout { padding: 62px 18px 55px; }
  .article-lead h1 { font-size: 25px; }
  .article-content h2 { font-size: 19px; }
  .article-content table { display: block; overflow-x: auto; white-space: normal; }
  .field-reference-dialog { padding: 16px; }
  .field-reference-head { padding: 17px 18px 14px; }
  .field-reference-content { padding: 2px 18px 22px; }
  .field-reference-content table { display: block; overflow-x: auto; white-space: normal; }
  .search-view { padding: 58px 18px 55px; }
  .search-view-head h1 { font-size: 22px; }
  .result-filter-panel { align-items: stretch; flex-direction: column; }
  .result-filter-panel label { justify-content: space-between; }
  .result-filter-panel select { width: 64%; }
  .search-result-item { padding: 21px 0; }
  .search-result-item .result-title { font-size: 16px; }
  .search-suggestions { right: -48px; left: -154px; border-radius: 0 0 5px 5px; }
  .suggestion-item { padding: 11px 15px; }
  .admin-topbar { padding: 13px 16px; align-items: start; flex-direction: column; }
  .admin-actions { justify-content: flex-start; }
  .admin-layout { grid-template-columns: 1fr; }
  .editor-list-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-article-list { max-height: 280px; overflow-y: auto; }
  .admin-list-item { min-width: 0; }
  .editor-panel { padding: 22px 16px 45px; }
  .form-title-row, .metadata-grid { grid-template-columns: 1fr; }
  .full-row { grid-column: auto; }
  .editor-heading { flex-direction: column; }
  .video-insert-control input { width: 100%; }
}
/* Keep the original reader, with the website logo and working product actions. */
.sidebar-head h2{margin:0;font-size:18px;line-height:1.35;font-weight:700}
.header-actions{display:flex;align-items:center;gap:12px;white-space:nowrap}
.trial-command{padding:8px 16px;background:var(--blue);color:#fff;border-radius:4px;font-size:13px}
.trial-command:hover{color:#fff;text-decoration:none}
.article-content img{cursor:zoom-in}
.article-content .table-wrap{overflow:auto}
@media(max-width:640px){.site-logo img{width:85px;height:auto}.trial-command{padding:8px}.site-logo small{display:none}}
@media(prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
/* Product → section → article: keep each level distinct and collapsible. */
.menu-product>summary{font-size:16px;color:#34435b;font-weight:650;padding:10px 11px;cursor:pointer;list-style:none}
.menu-product>summary::-webkit-details-marker,.menu-product .menu-group>summary::-webkit-details-marker{display:none}
.menu-product>summary::after,.menu-product .menu-group>summary::after{content:'›';color:#8997a8;font-size:16px;transition:transform .16s ease}
.menu-product[open]>summary::after,.menu-product .menu-group[open]>summary::after{transform:rotate(90deg)}
.menu-product>.menu-children{padding-left:8px}
.menu-product .menu-group>summary{font-size:14px;color:#596a81;font-weight:550;cursor:pointer;list-style:none;padding:8px 10px}
.menu-product .menu-group[open]>.menu-children{display:block;padding-left:8px}
.menu-product .menu-child{font-size:13px;line-height:1.5;padding:8px 10px 8px 18px}
.menu-empty{display:block;padding:8px 18px;color:#9aa5b3;font-size:12px}
@media(prefers-reduced-motion:reduce){.menu-product>summary::after,.menu-product .menu-group>summary::after{transition:none}}

/* Keep the reader header and rich article content inside their available columns. */
.search-shell,.article-content,.field-reference-content{min-width:0}
.header-search input{flex:1 1 0;width:0;min-width:0}
.search-submit,.search-clear{flex-shrink:0}
.article-content{overflow-wrap:anywhere}
.article-content pre,.field-reference-content pre{box-sizing:border-box;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;padding:12px;white-space:pre}
.article-content pre code,.field-reference-content pre code{white-space:pre;overflow-wrap:normal}
.article-content .table-wrap,.field-reference-content .table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;margin:16px 0}
.article-content .table-wrap table,.field-reference-content .table-wrap table{display:table;width:100%;margin:0;overflow:visible}
.article-content .table-wrap.is-scrollable::before,.field-reference-content .table-wrap.is-scrollable::before{content:'左右滑动查看表格';display:block;padding:0 0 8px;color:var(--muted);font-size:12px;line-height:20px}
.table-wrap:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.site-logo{min-width:0}
@media(max-width:1100px){
 .site-header{grid-template-columns:200px minmax(0,1fr) auto;gap:12px;padding-right:16px}
 .site-header .header-actions{padding-right:0}
 .search-shell{width:100%}
}
@media(max-width:720px){
 .site-header{grid-template-columns:94px minmax(0,1fr) auto;gap:8px;padding:0 10px}
 .site-logo{padding-left:0;border-right:0;gap:0}
 .site-logo img{max-width:85px;height:auto}
 .site-logo>span,.site-header .login-command{display:none}
 .site-header .header-actions{gap:0;padding:0}
 .site-header .trial-command{padding:8px;font-size:12px;line-height:20px;white-space:nowrap}
 .search-shell{width:100%;min-width:0}
 .search-submit{width:30px;height:34px}
 .sidebar{height:calc(100vh - var(--header-height));height:calc(100dvh - var(--header-height));padding-bottom:calc(18px + env(safe-area-inset-bottom,0px))}
 .sidebar:not(.is-open){visibility:hidden;pointer-events:none}
 .sidebar.is-open{visibility:visible;pointer-events:auto}
 .markdown-video{min-height:0;height:auto}
}

@media(max-width:720px){
 .sidebar{width:min(var(--sidebar-width),calc(100vw - 40px));max-width:calc(100vw - 40px)}
 .reader-menu-open .mobile-menu-command{z-index:30;left:min(calc(var(--sidebar-width) - 76px),calc(100vw - 116px))}
 .reader-menu-open .sidebar-head{padding-right:70px}
}

@media(max-width:720px){.site-header .header-search input{font-size:16px}}
/* Product, section and article use progressively indented rows. */
.sidebar .menu-product>summary,.sidebar .menu-product .menu-group>summary{display:flex;justify-content:flex-start;align-items:center;gap:10px;font-size:14px;line-height:22px;min-height:38px;color:#34435b}
.sidebar .menu-product>summary{font-weight:600;padding:8px 10px}
.sidebar .menu-product .menu-group>summary{font-weight:400;padding:8px 10px}
.sidebar .menu-product>summary::before,.sidebar .menu-product .menu-group>summary::before{content:'›';display:inline-block;width:12px;text-align:center;color:#8492a5;transform:rotate(0);transition:transform .16s ease}
.sidebar .menu-product[open]>summary::before,.sidebar .menu-product .menu-group[open]>summary::before{transform:rotate(90deg)}
.sidebar .menu-product>summary::after,.sidebar .menu-product .menu-group>summary::after{content:none}
.sidebar .menu-product>.menu-children{padding-left:18px}
.sidebar .menu-product .menu-group[open]>.menu-children{padding-left:18px}
.sidebar .menu-product .menu-child{display:block;padding:9px 12px;font-size:14px;font-weight:400;line-height:20px;color:#34435b}
.sidebar .menu-product .menu-child::before{content:none}
.sidebar .menu-product .menu-child.is-active{background:#e9f1ff;color:#1377ff;font-weight:500}
@media(prefers-reduced-motion:reduce){.sidebar .menu-product>summary::before,.sidebar .menu-product .menu-group>summary::before{transition:none}}
/* Third-level article rows stay inside the second-level column. */
.sidebar .menu-product .menu-group .menu-child{width:calc(100% - 8px);margin:2px 0 2px 8px;padding:9px 12px;border-radius:4px;}
.sidebar .menu-product .menu-group .menu-child.is-active{box-sizing:border-box;}
