:root {
  --ink: #000;
  --muted: #000;
  --line: #dbe5ec;
  --blue: #1d6fa5;
  --blue-dark: #0d3d63;
  --soft-blue: #edf6fb;
  --shadow: 0 8px 28px rgba(18, 34, 53, .045);
  --nav-offset: 96px;
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { min-height: 100vh; display: flex; flex-direction: column; margin: 0; color: var(--ink); background: #f6f9fc; font: 16px/1.8 system-ui, "Noto Sans SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--blue); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, main:focus-visible, .manual:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #3aa9ce; outline-offset: 4px; }
.shell { width: calc(100% - clamp(12px, 1.5vw, 28px) * 2); margin: auto; }
.hero { position: relative; color: #fff; background: radial-gradient(ellipse at 85% 0, rgba(74, 190, 211, .22), transparent 55%), linear-gradient(115deg, #0b1c2e, #124d73 65%, #196e89); padding: 28px 0 40px; }
.brand { display: inline-flex; align-items: center; gap: 15px; color: #fff; font-size: .9rem; font-weight: 800; letter-spacing: .1em; text-decoration: none; }
.brand span { color: #b7dce7; border-left: 1px solid #ffffff30; padding-left: 15px; font-size: .68rem; font-weight: 500; letter-spacing: .06em; }
.hero-copy { margin-top: 34px; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); line-height: 1.2; letter-spacing: -.035em; margin: 0 0 12px; }
.lead { color: #c9e2ee; max-width: 760px; margin: 0; font-size: 1rem; }
.kicker { color: var(--blue); font-size: .71rem; font-weight: 750; letter-spacing: .12em; }
.toc { position: sticky; z-index: 5; top: 0; background: #fffffff5; border-bottom: 1px solid var(--line); box-shadow: 0 4px 16px #12223503; backdrop-filter: blur(14px); }
.toc-inner { display: flex; gap: 8px; padding: 10px 0; }
.toc a { display: grid; place-items: center; min-width: 140px; min-height: 44px; padding: 9px 20px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .91rem; font-weight: 650; }
.toc a:hover { background: var(--soft-blue); color: var(--blue-dark); }
.toc a[aria-current="page"] { background: var(--blue-dark); color: white; box-shadow: 0 3px 8px #0d3d631f; }
.content { flex: 1; padding: 36px 0 72px; min-height: 55vh; overflow-wrap: anywhere; }
section { margin: 36px 0; }
h2 { font-size: clamp(1.4rem, 2.8vw, 1.85rem); line-height: 1.45; letter-spacing: -.025em; margin-top: 30px; }
h3 { font-size: 1.12rem; margin: 28px 0 10px; line-height: 1.6; }
p { margin: 14px 0; }
[id] { scroll-margin-top: var(--nav-offset); }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.portal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.download-card, .release-item { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.download-card { display: flex; flex-direction: column; }
.portal-number { display: inline-grid; place-items: center; align-self: flex-start; width: 38px; height: 38px; color: var(--blue); background: var(--soft-blue); border: 1px solid #dcecf5; border-radius: 12px; font: 650 .8rem ui-monospace, monospace; }
.download-card .kicker { margin: 22px 0 5px; }
.download-card h2 { margin: 0; font-size: 1.35rem; }
.download-card p { color: var(--muted); }
.download-card p:not(.kicker) { font-size: .94rem; margin-bottom: 24px; }
.download-link { display: block; border-top: 1px solid var(--line); margin-top: auto; padding: 15px 0 0; min-height: 44px; font-weight: 650; font-size: .94rem; text-decoration: none; }
.release-list { display: grid; gap: 22px; }
.release-item:first-child { border-color: #a6d0e4; background: linear-gradient(150deg, #f7fcff, #fff 60%); }
.release-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.release-head h3 { margin: 0; font-size: 1.4rem; }
.release-head p { margin: 5px 0 0; color: var(--muted); font-size: .84rem; }
.release-head > a { display: inline-block; padding: 8px 14px; min-height: 44px; background: #f1f6fa; border-radius: 9px; font-size: .84rem; text-decoration: none; }
.tag { display: inline-block; vertical-align: middle; margin-left: 7px; color: #16707c; background: #e8fbf7; border: 1px solid #cceee6; border-radius: 99px; padding: 3px 10px; font-size: .71rem; font-weight: 650; }
.release-assets { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line); }
.release-assets a { padding: 9px 16px; min-height: 44px; border: 1px solid #c6e2e9; border-radius: 9px; background: #f2fafb; text-decoration: none; font-size: .88rem; font-weight: 600; }
.release-assets a:hover { background: #e4f5f7; border-color: #91c9db; }
.page-cloud .content > section { background: white; padding: 28px 32px; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); margin: 0 0 22px; }
.page-cloud .content > section > h2:first-child { margin-top: 0; }
.note { border-radius: 14px; padding: 20px 24px; margin: 24px 0; }
.note-blue { background: #edf7fb; border: 1px solid #c9e5f0; }
.note p { margin: 6px 0 0; color: var(--muted); }
summary { min-height: 44px; cursor: pointer; font-weight: 700; }
img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; }
.annotated { margin: 40px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.annotated img { width: 100%; border: 0; }
figcaption { color: var(--muted); font-size: .83rem; padding: 8px 0 0; }
.manual-layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); align-items: start; gap: 28px; }
.manual-sidebar { position: sticky; top: 88px; max-height: calc(100vh - 112px); overflow-y: auto; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.sidebar-heading { padding: 23px 22px 15px; }
.sidebar-heading .kicker { margin: 0 0 5px; }
.sidebar-heading h2 { font-size: 1.08rem; margin: 0; }
.sidebar-heading > p:last-child { font-size: .78rem; color: var(--muted); margin: 6px 0 0; }
.chapter-nav { padding: 0 10px 14px; }
.chapter-nav ul { padding: 0; margin: 0; list-style: none; }
.chapter-nav li { padding: 0; margin: 4px 0; }
.chapter-nav a { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 8px 10px; border-radius: 9px; text-decoration: none; color: var(--muted); font-size: .86rem; font-weight: 500; }
.chapter-nav a:hover { color: var(--blue-dark); background: #f3f7fa; }
.chapter-number { display: inline-grid; place-items: center; flex: 0 0 26px; height: 26px; font: .7rem ui-monospace, monospace; color: #8395a5; border-radius: 7px; background: #f0f4f7; }
.chapter-nav a[aria-current="location"] { color: var(--blue-dark); background: #eaf4fb; font-weight: 650; }
.chapter-nav a[aria-current="location"] .chapter-number { background: var(--blue-dark); color: white; }
.sidebar-footer { border-top: 1px solid var(--line); padding: 15px 22px; font-size: .79rem; }
.sidebar-footer a { display: flex; justify-content: space-between; text-decoration: none; }
.manual { min-width: 0; border: 1px solid var(--line); border-radius: 18px; padding: 28px 36px 36px; background: white; box-shadow: var(--shadow); }
.manual-overview { margin: 0 0 28px; border: 1px solid #e3ebf1; border-radius: 12px; background: #f8fbfd; padding: 9px 16px; }
.manual-overview > summary { min-height: 28px; font-size: .82rem; color: var(--muted); font-weight: 500; }
.manual-overview img { display: block; max-height: 260px; margin: auto; width: auto; }
.manual-chapter { margin: 48px 0 0; padding-top: 36px; border-top: 1px solid var(--line); scroll-margin-top: 108px; }
.manual-chapter:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.manual-chapter > h2 { font-size: 1.65rem; color: var(--blue-dark); margin-top: 0; margin-bottom: 24px; }
.manual p, .manual li { font-size: .94rem; }
.table-wrap { width: 100%; overflow-x: auto; margin: 24px 0; border-radius: 10px; }
.manual table { width: 100%; border-collapse: collapse; margin: 0; font-size: .88rem; }
th, td { border: 1px solid #e1e9f0; text-align: left; padding: 12px 16px; }
th { background: #f0f5f9; color: #3b5569; font-weight: 650; }
tbody tr:nth-child(even) { background: #fafcfe; }
.manual-figure { margin: 26px 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #f6f9fc; }
.manual-figure img { display: block; margin: auto; border: 0; }
.manual-figure figcaption { text-align: center; }
code { background: #edf2f6; padding: 3px 6px; border-radius: 5px; color: #28495e; font: .87em ui-monospace, monospace; }
pre { background: #f2f6fa; border: 1px solid var(--line); padding: 20px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.85; }
pre code { padding: 0; background: transparent; }
li { padding: 4px 0; }
footer { background: #0d1b2a; color: #b5ced9; padding: 28px 0; font-size: .85rem; }
footer .shell { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer strong { color: #f1f9fc; font-size: .8rem; letter-spacing: .07em; }
footer a { color: #9de9ec; text-decoration: none; }
.skip-link { position: absolute; top: -100px; left: 12px; z-index: 10; background: white; padding: 12px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.directory-toggle { width: 100%; align-items: center; gap: 12px; min-height: 54px; padding: 13px 17px; border: 0; background: white; color: var(--blue-dark); text-align: left; font: 650 .85rem system-ui, sans-serif; cursor: pointer; }
.directory-current { margin-left: auto; color: var(--muted); font-size: .78rem; font-weight: 400; }
.directory-chevron { font-size: 1.1rem; }
.directory-toggle[aria-expanded="true"] .directory-chevron { transform: rotate(180deg); }
@media (min-width: 981px) and (prefers-reduced-motion: no-preference) {
  .download-card, .release-assets a { transition: border-color .15s ease, box-shadow .15s ease; }
  .download-card:hover { border-color: #a9d0e4; box-shadow: 0 10px 32px #1d6fa510; }
}
@media (max-width: 980px) {
  .shell { width: calc(100% - 40px); }
  .manual-layout { grid-template-columns: 1fr; gap: 20px; }
  .manual-sidebar { position: static; border-radius: 12px; }
  .manual-sidebar.directory-enhanced { position: sticky; z-index: 4; top: 76px; max-height: calc(100vh - 106px); }
  .directory-toggle:not([hidden]) { display: flex; }
  .sidebar-footer { display: none; }
  .manual { padding: 26px 28px; }
  .manual { scroll-margin-top: 156px; }
  .manual-chapter { scroll-margin-top: 156px; }
  .portal-grid { grid-template-columns: 1fr; }
  .download-card { display: block; }
  .download-link { margin-top: 18px; }
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 28px); }
  .hero { padding: 22px 0 28px; }
  .brand { font-size: .8rem; gap: 10px; }
  .brand span { font-size: .61rem; padding-left: 10px; }
  .hero-copy { margin-top: 26px; }
  .lead { font-size: .91rem; }
  .toc-inner { gap: 4px; }
  .toc a { min-width: 0; flex: 1; font-size: .83rem; padding: 9px 5px; }
  .content { padding-top: 22px; }
  .download-grid { grid-template-columns: 1fr; }
  .release-assets { display: grid; grid-template-columns: 1fr 1fr; }
  .release-assets a { padding: 9px 11px; font-size: .78rem; }
  .download-card, .release-item { padding: 22px; border-radius: 14px; }
  .page-cloud .content > section { padding: 22px; border-radius: 14px; }
  .manual { padding: 20px 18px; border-radius: 14px; }
  .manual-chapter > h2 { font-size: 1.4rem; }
  .manual p, .manual li { font-size: .9rem; }
  .manual-figure { padding: 7px; margin: 22px 0; }
  .manual-overview { padding: 10px 12px; }
  .manual-overview img { max-height: 170px; }
  .note { padding: 18px; }
  th, td { padding: 10px 12px; }
}

.content a, .content .kicker, .content .portal-number, .content .tag, .content .chapter-number, .content th, .content code, .content .manual-chapter > h2, .content .directory-toggle { color: #000; }
.section-layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); align-items: start; gap: 28px; }
.section-sidebar { position: sticky; top: 88px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.section-sidebar .sidebar-heading { padding-bottom: 18px; }
.section-main { min-width: 0; }
.section-main > section, .section-main > .note { max-width: none; }
@media (max-width: 980px) { .section-layout { grid-template-columns: 1fr; gap: 20px; } .section-sidebar { position: static; } }

.stable-downloads { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.stable-downloads a { padding: 6px 9px; border: 1px solid #c6e2e9; border-radius: 7px; background: #f2fafb; text-decoration: none; font-size: .78rem; font-weight: 600; }
