:root {
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", "HarmonyOS Sans SC", system-ui, sans-serif;
  color: #243047;
  background: #f7f9fc;
  font-size: 16px;
  line-height: 1.68;
  --ink: #243047;
  --muted: #647086;
  --primary: #5876c7;
  --primary-strong: #3e5fae;
  --blue-soft: #e9effb;
  --mint: #def2eb;
  --lavender: #eeeaf8;
  --warm: #fff3d6;
  --paper: #ffffff;
  --canvas: #f7f9fc;
  --line: #dce3ee;
  --line-strong: #cbd5e3;
  --display: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --utility: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --shadow: 0 12px 32px rgb(45 61 92 / 7%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--canvas); }
a { color: var(--primary-strong); text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
:focus-visible { outline: 3px solid #9eb5ec; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-140%); border-radius: 6px; padding: 9px 14px; background: var(--ink); color: #fff; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 30; top: 0; border-bottom: 1px solid rgb(203 213 227 / 88%); background: rgb(255 255 255 / 94%); backdrop-filter: blur(14px); }
.header-inner { width: min(100% - 40px, 1280px); min-height: 64px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-mark { width: 31px; height: 31px; flex: 0 0 31px; }
.brand-cn { font-size: 15px; font-weight: 700; }
nav { display: flex; align-items: center; gap: 3px; }
nav a { min-height: 40px; display: inline-flex; align-items: center; border-radius: 6px; padding: 7px 10px; color: #536077; font-size: 13px; font-weight: 650; text-decoration: none; transition: background-color 160ms ease, color 160ms ease; }
nav a:hover { background: #f0f4fa; color: var(--primary-strong); }
nav a.active { background: var(--blue-soft); color: var(--primary-strong); }
.header-search { height: 38px; display: flex; align-items: stretch; }
.header-search input { width: 150px; border: 1px solid var(--line-strong); border-right: 0; border-radius: 6px 0 0 6px; padding: 7px 10px; background: #fbfcfe; color: var(--ink); }
.header-search button { min-width: 54px; border: 1px solid var(--primary); border-radius: 0 6px 6px 0; background: var(--primary); color: #fff; font-weight: 700; cursor: pointer; transition: background-color 160ms ease; }
.header-search button:hover { background: var(--primary-strong); }

main { width: min(100% - 32px, 800px); min-height: calc(100vh - 150px); margin: 0 auto; padding: 42px 0 68px; }
main.wide { width: min(100% - 40px, 1280px); }
body > footer { width: min(100% - 40px, 1280px); margin: 0 auto; border-top: 1px solid var(--line); padding: 20px 0 30px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
body > footer strong { color: var(--primary); font-family: var(--utility); font-size: 16px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 20px; }
body > footer a { color: var(--muted); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.32; letter-spacing: 0; overflow-wrap: anywhere; }
h1, h2 { font-weight: 700; }
h1 { margin: 0 0 18px; font-size: 34px; }
h2 { margin: 30px 0 11px; font-size: 22px; }
h3 { margin: 28px 0 9px; font-size: 18px; }
h4 { margin: 22px 0 8px; font-size: 16px; }
p { margin: 0 0 18px; overflow-wrap: anywhere; }
ul, ol { margin: 0 0 20px; padding-left: 25px; }
li { margin: 6px 0; }
code { border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; background: #eef2f7; font-family: var(--utility); font-size: .9em; overflow-wrap: anywhere; }
pre { overflow-x: auto; padding: 18px; border: 1px solid #32405a; border-radius: 6px; background: #26334a; color: #f5f7fb; }
pre code { padding: 0; border: 0; background: transparent; color: inherit; }
blockquote { margin: 22px 0; padding: 14px 18px; border-left: 3px solid var(--primary); border-radius: 0 6px 6px 0; background: var(--blue-soft); color: #3c4962; }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.eyebrow { color: var(--primary-strong); font-family: var(--utility); font-size: 12px; font-weight: 700; }
.lead { max-width: 680px; color: #566278; font-size: 17px; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 16px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease; }
.button:hover { border-color: var(--primary); background: var(--blue-soft); color: var(--primary-strong); }
.button.primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.button.small { min-height: 40px; margin-top: 10px; padding: 6px 12px; }
.button.disabled { border-color: var(--line); background: #edf1f6; color: #7b8495; cursor: not-allowed; }

.home-hero { min-height: 400px; display: grid; grid-template-columns: minmax(0, 1.36fr) minmax(300px, .64fr); align-items: stretch; border-bottom: 1px solid var(--line); background: var(--paper); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 42px 48px 44px 30px; }
.hero-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: #6d7890; font-family: var(--utility); font-size: 10px; font-weight: 700; }
.signal-dot { width: 7px; height: 7px; border-radius: 50%; background: #65a995; box-shadow: 0 0 0 4px var(--mint); }
.hero-copy h1 { max-width: 720px; margin: 0 0 24px; color: var(--ink); font-family: var(--display); font-size: 46px; font-weight: 700; line-height: 1.22; }
.hero-copy h1 span { color: var(--primary); }
.hero-search { width: min(100%, 620px); height: 50px; display: grid; grid-template-columns: minmax(0, 1fr) auto; border-radius: 7px; box-shadow: 0 7px 20px rgb(57 76 112 / 8%); }
.hero-search input { min-width: 0; border: 1px solid var(--line-strong); border-right: 0; border-radius: 7px 0 0 7px; padding: 12px 16px; background: #fff; color: var(--ink); }
.hero-search button { min-width: 84px; border: 1px solid var(--primary); border-radius: 0 7px 7px 0; background: var(--primary); color: #fff; font-weight: 750; cursor: pointer; transition: background-color 160ms ease; }
.hero-search button:hover { background: var(--primary-strong); }
.hero-quick { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; }
.hero-quick a { min-height: 36px; display: inline-flex; align-items: center; color: #5d6980; font-size: 12px; font-weight: 650; text-decoration: none; }
.hero-quick a::after { content: "›"; margin-left: 5px; color: #8aa0d7; font-family: var(--utility); }
.hero-quick a:hover { color: var(--primary-strong); }
.knowledge-gates { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 34px; }
.knowledge-gates a { min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; padding: 19px 22px; color: var(--ink); text-decoration: none; transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.knowledge-gates a:hover { transform: translateY(-2px); border-color: #b7c6df; box-shadow: var(--shadow); }
.gate-general { background: #eff8f5; }
.gate-project { background: #f1f4fb; }
.knowledge-gates span { color: #718097; font-family: var(--utility); font-size: 11px; font-weight: 700; }
.knowledge-gates strong { font-family: var(--display); font-size: 24px; font-weight: 700; }
.knowledge-gates em { color: #647086; font-size: 12px; font-style: normal; font-weight: 600; }

.home-recent { max-width: 1234px; margin: 0 auto; padding: 44px 0 20px; font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif; }
.home-recent .section-heading h2 { font-size: 25px; font-weight: 700; }
.home-recent .section-heading span { font-size: 12px; }
.home-recent .section-heading > a { font-size: 14px; }
.home-recent .doc-row { padding: 26px 14px; }
.home-recent .doc-row .eyebrow { font-family: inherit; font-size: 13px; }
.home-recent .doc-row h2 { margin: 6px 0 10px; font-size: 21px; font-weight: 700; line-height: 1.45; }
.home-recent .doc-row p { margin-bottom: 16px; font-size: 17px; line-height: 1.85; }
.home-recent .doc-row time { font-size: 12px; }
.home-recent .tag { font-family: inherit; font-size: 13px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line-strong); margin-bottom: 0; }
.section-heading h2 { margin: 1px 0 12px; }
.section-heading span { color: var(--primary); font-family: var(--utility); font-size: 11px; font-weight: 700; }
.section-heading > a { min-height: 44px; display: inline-flex; align-items: center; margin-bottom: 3px; font-size: 13px; font-weight: 650; }

.kb-overview { max-width: 900px; border: 1px solid var(--line); border-radius: 8px; padding: 30px 34px 34px; background: #f0f4fb; box-shadow: var(--shadow); }
.kb-overview .eyebrow { color: var(--primary); }
.kb-overview h1 { margin: 7px 0 21px; color: var(--ink); font-family: var(--display); font-size: 35px; }
.kb-overview > p { display: none; }
.kb-search { max-width: 720px; height: 50px; display: grid; grid-template-columns: 1fr auto; margin-top: 0; box-shadow: 0 6px 18px rgb(57 76 112 / 7%); }
.kb-search input { min-width: 0; border: 1px solid var(--line-strong); border-right: 0; border-radius: 6px 0 0 6px; padding: 10px 15px; background: #fff; }
.kb-search button { min-width: 80px; border: 1px solid var(--primary); border-radius: 0 6px 6px 0; padding: 8px 18px; background: var(--primary); color: #fff; font-weight: 700; cursor: pointer; }
.kb-portals { max-width: 900px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.kb-portals a { min-height: 116px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; padding: 19px 22px; color: var(--ink); text-decoration: none; transition: border-color 160ms ease, transform 160ms ease; }
.kb-portals a:first-child { background: #eff8f5; }
.kb-portals a:last-child { background: #f1f4fb; }
.kb-portals a:hover { transform: translateY(-2px); border-color: #b7c6df; }
.kb-portals span { color: #66758d; font-family: var(--utility); font-size: 11px; font-weight: 700; }
.kb-portals strong { max-width: 330px; font-size: 18px; }
.tag-section { max-width: 960px; margin-top: 46px; }
.tag-cloud, .tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { min-height: 32px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 3px 9px; background: #fff; color: var(--primary-strong); font-size: 12px; font-weight: 600; text-decoration: none; }
.tag:hover { border-color: #aebfe0; background: var(--blue-soft); }
.tag span { color: var(--muted); }
.build-note { margin-top: 28px; color: #7c8799; font-family: var(--utility); font-size: 11px; }

.kb-shell { display: grid; grid-template-columns: 220px minmax(0, 720px) 180px; align-items: start; gap: 40px; }
.kb-sidebar { position: sticky; top: 99px; max-height: calc(100vh - 120px); overflow-y: auto; display: flex; flex-direction: column; gap: 3px; border-top: 2px solid #9eb1d8; padding-top: 12px; font-size: 13px; }
.kb-sidebar > a { min-height: 38px; display: flex; align-items: center; border-radius: 5px; padding: 6px 9px; color: #536077; text-decoration: none; }
.kb-sidebar > a:hover { background: #eef2f8; color: var(--primary-strong); }
.kb-sidebar .kb-home-link { color: var(--ink); font-weight: 750; }
.tree { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; }
.tree { display: flex; flex-direction: column; gap: 2px; }
.tree a { padding: 6px 8px 6px 13px; border-left: 2px solid transparent; color: #566278; line-height: 1.45; text-decoration: none; }
.tree a.active { border-left-color: var(--primary); background: var(--blue-soft); color: var(--primary-strong); font-weight: 700; }
.kb-article { min-width: 0; }
.article-header { border-top: 2px solid #9eb1d8; border-bottom: 1px solid var(--line-strong); padding: 17px 0 21px; margin-bottom: 4px; }
.article-header h1 { margin-bottom: 10px; }
.article-header > p { color: var(--muted); font-size: 16px; }
.page-toc { position: sticky; top: 99px; display: flex; flex-direction: column; gap: 7px; border-top: 2px solid #b7d8cd; margin-left: 14px; padding-top: 12px; font-size: 12px; }
.aside-title { color: var(--ink); font-weight: 750; margin-bottom: 5px; }
.page-toc a { border-left: 2px solid var(--line); padding-left: 10px; color: #667187; line-height: 1.45; text-decoration: none; }
.page-toc a:hover { color: var(--primary-strong); border-left-color: var(--primary); }
.page-toc .toc-level-3 { padding-left: 20px; }
.page-toc .toc-level-4 { padding-left: 30px; }
.prose { padding-top: 12px; }
.prose a { min-height: 32px; display: inline-flex; align-items: center; }
.prose h1:first-child { margin-top: 0; }
.prose h2 { border-top: 1px solid var(--line); padding-top: 30px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 7px 18px; margin: 18px 0 10px; color: var(--muted); font-family: var(--utility); font-size: 11px; }
.doc-license { width: 100%; display: block; border-top: 1px solid var(--line-strong); margin-top: 48px; padding: 18px 0 0; color: var(--muted); font-size: 12px; }

.doc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; border-bottom: 1px solid var(--line); padding: 18px 10px; transition: background-color 150ms ease, padding-left 150ms ease; }
.doc-row:hover { padding-left: 17px; background: rgb(255 255 255 / 70%); }
.doc-row h2 { margin: 4px 0 6px; font-size: 18px; }
.doc-row h2 a { color: var(--ink); text-decoration: none; }
.doc-row h2 a:hover { color: var(--primary-strong); }
.doc-row p { color: #59657b; margin-bottom: 12px; }
.doc-row time { color: #778196; font-family: var(--utility); font-size: 11px; white-space: nowrap; }
.project-row { min-height: 84px; display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); padding: 0 12px; color: var(--ink); text-decoration: none; }
.project-row:hover { background: #f0f4fa; }
.project-row > span:last-child { color: var(--muted); font-size: 13px; }
.tag-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.tag-index a { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 12px 14px; color: var(--ink); text-decoration: none; }
.tag-index a:nth-child(odd) { border-right: 1px solid var(--line); }
.tag-index a:hover { background: #f0f4fa; }
.tag-index span { color: var(--muted); font-size: 12px; }

.simple-page { max-width: 800px; margin: 0 auto; }
.simple-page > h1 { border-top: 2px solid #9eb1d8; padding-top: 19px; }
.idea-card { border: 1px solid var(--line); border-bottom: 0; padding: 19px; background: #fff; }
.idea-card:first-of-type { border-radius: 8px 8px 0 0; }
.idea-card:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.idea-card:nth-of-type(even) { background: #f6f8fc; }
.idea-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.idea-card h2 { margin: 4px 0 8px; }
.idea-card p { color: #566278; }
.idea-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: #566278; font-size: 13px; }
.status-mark { min-height: 27px; display: inline-flex; align-items: center; border: 1px solid #bdd9d0; border-radius: 5px; padding: 2px 8px; background: var(--mint); color: #376e60; font-size: 11px; font-weight: 700; }
.empty-state { border: 1px solid var(--line); border-left: 4px solid #9bc9ba; border-radius: 6px; padding: 18px 20px; background: #fff; color: #4b576d; margin: 20px 0; }
.empty-state strong { color: var(--ink); }
.empty-state p { margin: 3px 0 0; }
.contribute-layout { width: min(100%, 860px); margin: 0 auto; }
.contribute-intro { max-width: 680px; border-top: 2px solid #9eb1d8; padding: 20px 0 22px; }
.contribute-intro h1 { margin: 5px 0 10px; }
.contribute-intro p { color: var(--muted); font-size: 16px; }
.submission-form { border-top: 1px solid var(--line-strong); padding-top: 26px; }
.form-section { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.submission-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.submission-form legend, .form-field > label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 14px; font-weight: 700; }
.submission-form legend span, .form-field > label span { color: #9b3f54; }
.form-field > label .optional { margin-left: 7px; color: var(--muted); font-size: 11px; font-weight: 600; }
.choice-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice-group label { position: relative; min-width: 0; cursor: pointer; }
.choice-group input { position: absolute; opacity: 0; pointer-events: none; }
.choice-group span { min-height: 46px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 12px; background: #fff; color: #536077; font-size: 14px; font-weight: 650; transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease; }
.choice-group input:checked + span { border-color: var(--primary); background: var(--blue-soft); color: var(--primary-strong); box-shadow: inset 0 0 0 1px var(--primary); }
.choice-group input:focus-visible + span { outline: 3px solid #9eb5ec; outline-offset: 3px; }
.form-field { margin-bottom: 22px; }
.form-field input, .form-field textarea, .form-field select { width: 100%; min-height: 46px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 10px 12px; background: #fff; color: var(--ink); }
.form-field textarea { display: block; min-height: 92px; line-height: 1.65; resize: vertical; }
.form-field #body { min-height: 310px; font-family: var(--utility); font-size: 14px; tab-size: 2; }
.form-field input:hover, .form-field textarea:hover, .form-field select:hover { border-color: #aebbd0; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--primary); }
.form-field [aria-invalid="true"] { border-color: #a63f56; background: #fffafb; }
.file-input { min-height: 64px; display: flex; align-items: center; border: 1px dashed #aebbd0; border-radius: 6px; padding: 9px 12px; background: #f8faff; }
.file-input:hover { border-color: var(--primary); background: var(--blue-soft); }
.file-input.invalid { border-color: #a63f56; background: #fffafb; }
.file-input input { min-height: 42px; border: 0; padding: 7px 0; background: transparent; font-size: 13px; }
.file-input input::file-selector-button { min-height: 38px; margin-right: 12px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 6px 12px; background: #fff; color: var(--ink); font-weight: 700; cursor: pointer; }
.file-input input::file-selector-button:hover { border-color: var(--primary); color: var(--primary-strong); }
.field-help, .field-error { margin: 6px 0 0; font-size: 12px; line-height: 1.55; }
.field-help { color: var(--muted); }
.field-error { color: #8e3146; font-weight: 650; }
.form-alert { margin-bottom: 24px; border-left: 4px solid #a63f56; padding: 14px 17px; background: #fff3f5; color: #6f2637; }
.form-alert strong { color: #6f2637; }
.form-alert ul { margin: 5px 0 0; padding-left: 20px; }
.form-alert li { margin: 2px 0; }
.form-alert a { color: #7d2d40; }
.form-actions { display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding-top: 22px; }
.form-actions .button { min-width: 124px; cursor: pointer; }
.form-actions p, .alternate-entry { margin: 0; color: var(--muted); font-size: 12px; }
.alternate-entry { margin-top: 16px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.submission-success { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 20px; border-top: 2px solid #82b8a8; padding: 32px 0; }
.submission-success h1 { margin: 4px 0 10px; }
.submission-success p { color: var(--muted); }
.success-mark { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid #9bc9ba; border-radius: 50%; background: var(--mint); color: #376e60; font-size: 24px; font-weight: 800; }

.admin-login { width: min(100%, 430px); margin: 42px auto 0; border: 1px solid var(--line-strong); border-top: 3px solid var(--primary); border-radius: 7px; padding: 30px 32px 32px; background: #fff; box-shadow: var(--shadow); }
.admin-login h1 { margin: 7px 0 8px; font-size: 30px; }
.admin-login > p { color: var(--muted); }
.admin-login form { display: grid; gap: 10px; margin-top: 24px; }
.admin-login label { color: var(--ink); font-size: 13px; font-weight: 700; }
.admin-login input { width: 100%; min-height: 46px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 9px 11px; background: #fff; font-size: 16px; }
.admin-login .button { margin-top: 8px; }
.admin-login-error { border-left: 3px solid #a63f56; padding: 9px 11px; background: #fff3f5; color: #7d2d40 !important; font-size: 13px; }
.admin-shell { width: min(100%, 1020px); margin: 0 auto; }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; border-top: 2px solid #9eb1d8; padding-top: 18px; }
.admin-heading h1 { margin: 4px 0 0; }
.admin-heading-actions { display: flex; align-items: center; gap: 10px; }
.admin-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-strong); margin-top: 28px; }
.admin-tabs a { min-height: 42px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; padding: 8px 15px; color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.admin-tabs a:hover, .admin-tabs a.active { border-bottom-color: var(--primary); color: var(--primary-strong); }
.admin-list { border-bottom: 1px solid var(--line-strong); }
.admin-row { min-height: 88px; display: grid; grid-template-columns: 76px minmax(0, 1fr) minmax(190px, auto); align-items: center; gap: 18px; border-bottom: 1px solid var(--line); padding: 13px 10px; color: var(--ink); text-decoration: none; }
.admin-row:last-child { border-bottom: 0; }
.admin-row:hover { background: #f0f4fa; }
.admin-row-main, .admin-row-file { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.admin-row-main strong { overflow-wrap: anywhere; }
.admin-row small, .admin-row-file { color: var(--muted); font-size: 12px; }
.admin-row-file { align-items: flex-end; text-align: right; }
.admin-row-file span { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-approved { border-color: #a7d0c2; background: #e9f7f2; color: #356f60; }
.status-rejected { border-color: #dfbbc4; background: #fff2f4; color: #8e3146; }
.admin-detail { width: min(100%, 900px); margin: 0 auto; }
.admin-back { min-height: 44px; display: inline-flex; align-items: center; margin-bottom: 18px; color: var(--primary-strong); font-size: 13px; font-weight: 700; text-decoration: none; }
.admin-back::before { content: "‹"; margin-right: 6px; font-size: 18px; }
.admin-detail > header { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 42px; border-top: 2px solid #9eb1d8; border-bottom: 1px solid var(--line-strong); padding: 22px 0 24px; }
.admin-detail h1 { margin: 9px 0 10px; overflow-wrap: anywhere; }
.admin-detail header p { color: var(--muted); }
.admin-detail dl { margin: 0; }
.admin-detail dl div { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; border-bottom: 1px solid var(--line); padding: 7px 0; font-size: 12px; }
.admin-detail dt { color: var(--muted); }
.admin-detail dd { margin: 0; overflow-wrap: anywhere; color: var(--ink); }
.admin-attachment { display: flex; justify-content: space-between; align-items: center; gap: 18px; border: 1px dashed #aebbd0; border-radius: 6px; margin-top: 24px; padding: 14px 16px; background: #f8faff; color: var(--ink); text-decoration: none; }
.admin-attachment:hover { border-color: var(--primary); background: var(--blue-soft); }
.admin-attachment span { color: var(--muted); font-size: 12px; }
.admin-content { margin-top: 30px; }
.admin-content h2 { margin-bottom: 12px; font-size: 18px; }
.admin-body { max-height: 520px; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-no-body { border-left: 3px solid #9eb1d8; padding: 12px 15px; background: #f1f4fb; color: var(--muted); }
.admin-review-actions { display: flex; gap: 10px; border-top: 1px solid var(--line-strong); margin-top: 30px; padding-top: 22px; }
.button.danger { border-color: #d5a7b3; background: #fff; color: #8e3146; }
.button.danger:hover { border-color: #a63f56; background: #fff3f5; }
.admin-review-note { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 14px; margin-top: 15px; color: var(--muted); font-size: 12px; }
.admin-publish-link { min-height: 38px; padding: 7px 12px; }

@media (max-width: 1120px) {
  .header-inner { grid-template-columns: auto 1fr; gap: 18px; padding: 10px 0; }
  nav { justify-content: flex-end; }
  .header-search { grid-column: 1 / -1; width: 100%; }
  .header-search input { width: 100%; }
  .home-hero { grid-template-columns: minmax(0, 1fr) 280px; }
  .hero-copy { padding: 38px 34px 40px 22px; }
  .hero-copy h1 { font-size: 42px; }
  .kb-shell { grid-template-columns: 200px minmax(0, 1fr); gap: 30px; }
  .page-toc { display: none; }
}

@media (max-width: 760px) {
  .header-inner { width: min(100% - 28px, 1280px); display: flex; align-items: stretch; flex-direction: column; gap: 8px; padding: 11px 0 8px; }
  .brand { align-self: flex-start; gap: 9px; }
  .brand-mark { width: 32px; height: 32px; flex-basis: 32px; }
  .brand-cn { font-size: 15px; }
  nav { width: 100%; justify-content: space-between; gap: 0; }
  nav a { flex: 0 0 auto; min-height: 44px; padding: 6px; font-size: 12px; white-space: nowrap; }
  .header-search { display: none; }
  main, main.wide { width: min(100% - 28px, 800px); padding-top: 30px; }
  body > footer { width: min(100% - 28px, 1280px); flex-direction: column; }
  .footer-links { justify-content: flex-start; }
  h1 { font-size: 29px; }
  .home-hero { min-height: 0; display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
  .hero-copy { padding: 28px 20px 22px; }
  .hero-copy h1 { font-size: 34px; }
  .hero-search { height: 48px; box-shadow: none; }
  .hero-search input { padding: 10px; }
  .hero-search button { min-width: 68px; }
  .hero-quick { gap: 4px 15px; }
  .knowledge-gates { grid-template-columns: 1fr; gap: 10px; margin-top: 28px; }
  .knowledge-gates a { min-height: 112px; padding: 17px 19px; }
  .knowledge-gates strong { font-size: 22px; }
  .section-heading { align-items: center; }
  .section-heading > a { margin-bottom: 0; }
  .home-recent { padding-top: 36px; }
  .home-recent .doc-row { padding: 22px 8px; }
  .kb-overview { padding: 24px 19px 27px; box-shadow: none; }
  .kb-overview h1 { font-size: 30px; }
  .kb-search { height: 48px; box-shadow: none; }
  .kb-search button { min-width: 68px; padding: 8px 12px; }
  .kb-portals { grid-template-columns: 1fr; gap: 10px; margin-top: 26px; }
  .kb-portals a { min-height: 104px; padding: 17px 19px; }
  .tag { min-height: 40px; padding: 5px 10px; }
  .kb-shell { display: flex; flex-direction: column; gap: 24px; }
  .kb-sidebar { position: static; width: 100%; max-height: none; overflow-x: auto; flex-direction: row; border-top: 0; border-bottom: 1px solid var(--line-strong); padding: 0 0 9px; scrollbar-width: none; }
  .kb-sidebar > a { flex: 0 0 auto; min-height: 44px; white-space: nowrap; }
  .kb-sidebar .tree { display: none; }
  .kb-article { width: 100%; }
  .article-header { padding: 18px 0 20px; }
  .doc-row { grid-template-columns: 1fr; gap: 2px; padding: 20px 6px; }
  .doc-row:hover { padding-left: 10px; }
  .doc-row time { grid-row: 1; }
  .project-row { grid-template-columns: 70px minmax(0, 1fr); padding: 14px 8px; }
  .project-row > span:last-child { grid-column: 2; }
  .tag-index { grid-template-columns: 1fr; }
  .tag-index a:nth-child(odd) { border-right: 0; }
  .form-section { grid-template-columns: 1fr; gap: 20px; }
  .form-field input, .form-field textarea, .form-field select { font-size: 16px; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .button { width: 100%; }
  .submission-success { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding-top: 24px; }
  .success-mark { width: 42px; height: 42px; font-size: 20px; }
  .admin-login { margin-top: 10px; padding: 24px 20px 26px; box-shadow: none; }
  .admin-heading { align-items: stretch; flex-direction: column; }
  .admin-heading-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .admin-heading-actions form, .admin-heading-actions .button { width: 100%; }
  .admin-tabs { overflow-x: auto; }
  .admin-tabs a { flex: 0 0 auto; min-height: 44px; }
  .admin-row { grid-template-columns: 70px minmax(0, 1fr); gap: 10px; padding: 15px 5px; }
  .admin-row-file { grid-column: 2; align-items: flex-start; text-align: left; }
  .admin-detail > header { grid-template-columns: 1fr; gap: 18px; }
  .admin-attachment { align-items: flex-start; flex-direction: column; }
  .admin-review-actions { flex-direction: column; }
  .admin-review-actions form, .admin-review-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

@media print {
  .site-header, .kb-sidebar, .page-toc, .button, body > footer { display: none !important; }
  body, main, main.wide { width: 100%; margin: 0; padding: 0; background: #fff; }
  .kb-shell { display: block; }
  .kb-article { max-width: none; }
}
