:root {
  --content-forest: #13241d;
  --content-forest-2: #1b3429;
  --content-paper: #f3f1eb;
  --content-surface: #fffef9;
  --content-ink: #17201c;
  --content-muted: #667069;
  --content-line: rgba(23, 32, 28, 0.16);
  --content-orange: #c8461e;
  --content-green: #7baa70;
  --content-shell: min(1180px, calc(100vw - 48px));
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--content-ink);
  background: var(--content-paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--content-ink); background: var(--content-paper); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
svg { width: 1.15em; height: 1.15em; stroke-width: 1.8; }

.content-skip { position: fixed; top: -80px; left: 20px; z-index: 100; padding: 10px 16px; color: var(--content-ink); background: var(--content-surface); }
.content-skip:focus { top: 12px; }
:focus-visible { outline: 3px solid #f0a184; outline-offset: 3px; }

.content-header { position: sticky; top: 0; z-index: 40; height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 max(24px, calc((100vw - 1180px) / 2)); color: #fffef9; background: rgba(19, 36, 29, .97); border-bottom: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(14px); }
.content-brand { justify-self: start; display: flex; align-items: center; gap: 11px; }
.content-brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.74); border-radius: 50%; }
.content-brand strong, .content-brand small { display: block; letter-spacing: 0; }
.content-brand strong { font-family: Arial, sans-serif; font-size: 12px; font-weight: 800; }
.content-brand small { margin-top: 2px; color: rgba(255,255,255,.62); font-size: 10px; }
.content-header-nav { justify-self: center; display: flex; align-items: center; gap: 32px; }
.content-header-nav a { min-height: 44px; display: inline-flex; align-items: center; color: rgba(255,255,255,.72); font-size: 13px; }
.content-header-nav a:hover { color: #fff; }
.content-menu-button, .content-sidebar-head button { width: 44px; height: 44px; display: none; place-items: center; padding: 0; color: inherit; border: 1px solid currentColor; border-radius: 50%; background: transparent; cursor: pointer; }

.content-shell { width: var(--content-shell); display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 72px; margin: 0 auto; padding: 52px 0 80px; }
.content-sidebar { position: sticky; top: 104px; align-self: start; max-height: calc(100vh - 128px); overflow-y: auto; border-right: 1px solid var(--content-line); }
.content-sidebar-head { padding: 0 24px 22px 0; border-bottom: 1px solid var(--content-line); }
.content-sidebar-head span, .content-sidebar-head strong { display: block; }
.content-sidebar-head span { color: var(--content-orange); font-family: Arial, sans-serif; font-size: 10px; font-weight: 800; }
.content-sidebar-head strong { margin-top: 4px; font-family: Georgia, "Songti SC", serif; font-size: 22px; font-weight: 600; }
.content-directory { padding: 8px 24px 0 0; }
.content-directory section { padding: 16px 0 14px; border-bottom: 1px solid var(--content-line); }
.content-directory p { margin: 0 0 7px; color: var(--content-muted); font-size: 10px; font-weight: 800; }
.content-directory a { min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 7px 8px; color: #3f4943; border-left: 2px solid transparent; font-size: 13px; line-height: 1.35; transition: color 160ms ease, background 160ms ease, border-color 160ms ease; }
.content-directory a svg { flex: 0 0 auto; color: #89918c; }
.content-directory a:hover { color: var(--content-ink); background: rgba(255,255,255,.55); }
.content-directory a[aria-current="page"] { color: var(--content-ink); background: #fffef9; border-left-color: var(--content-orange); font-weight: 700; }
.content-directory a[aria-current="page"] svg { color: var(--content-orange); }
.content-sidebar-map { min-height: 64px; display: flex; align-items: center; gap: 11px; margin: 20px 24px 0 0; padding: 10px 12px; color: #fffef9; background: var(--content-forest); font-size: 12px; font-weight: 700; }
.content-sidebar-map svg { flex: 0 0 auto; }
.content-sidebar-map span, .content-sidebar-map small { display: block; }
.content-sidebar-map small { margin-top: 2px; color: rgba(255,255,255,.58); font-size: 9px; font-weight: 500; }

.content-main { min-width: 0; max-width: 820px; }
.content-breadcrumb { min-height: 32px; display: flex; align-items: center; gap: 7px; margin-bottom: 28px; color: var(--content-muted); font-size: 12px; }
.content-breadcrumb a { color: var(--content-orange); font-weight: 700; }
.content-breadcrumb svg { width: 14px; height: 14px; }

.prose { font-size: 16px; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose h1 { margin: 0 0 36px; padding-bottom: 28px; font-family: Georgia, "Songti SC", serif; font-size: clamp(38px, 5vw, 62px); font-weight: 500; line-height: 1.08; letter-spacing: 0; border-bottom: 1px solid var(--content-line); }
.prose h2 { margin: 56px 0 20px; padding-top: 8px; font-family: Georgia, "Songti SC", serif; font-size: 30px; font-weight: 600; line-height: 1.25; letter-spacing: 0; }
.prose h3 { margin: 36px 0 14px; font-family: Georgia, "Songti SC", serif; font-size: 22px; font-weight: 600; line-height: 1.35; letter-spacing: 0; }
.prose h4 { margin: 28px 0 10px; font-size: 17px; letter-spacing: 0; }
.prose p { max-width: 72ch; margin: 14px 0; }
.prose ul, .prose ol { max-width: 72ch; margin: 16px 0; padding-left: 1.35em; }
.prose li { margin: 7px 0; padding-left: .25em; }
.prose a { color: var(--content-orange); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose strong { color: #0d1712; font-weight: 750; }
.prose code { padding: 2px 5px; color: #8e3218; background: #ece8df; border: 1px solid rgba(200,70,30,.14); border-radius: 3px; font-family: "SFMono-Regular", Consolas, monospace; font-size: .88em; }
.prose pre { max-width: 100%; overflow-x: auto; margin: 20px 0; padding: 18px; color: #ecf3ee; background: var(--content-forest); border-left: 3px solid var(--content-orange); font-size: 13px; line-height: 1.65; }
.prose pre code { padding: 0; color: inherit; background: transparent; border: 0; }
.prose blockquote { margin: 24px 0; padding: 18px 22px; color: #344039; background: #e5e9df; border-left: 3px solid var(--content-green); }
.prose blockquote p { margin: 0; }
.prose hr { height: 1px; margin: 48px 0; border: 0; background: var(--content-line); }
.prose table { width: 100%; display: block; overflow-x: auto; margin: 24px 0 34px; border-collapse: collapse; font-size: 13px; line-height: 1.55; }
.prose thead { color: #fffef9; background: var(--content-forest); }
.prose tbody { background: rgba(255,255,255,.48); }
.prose th, .prose td { min-width: 112px; padding: 12px 13px; text-align: left; vertical-align: top; border: 1px solid var(--content-line); }
.prose th { font-weight: 750; }
.prose td:first-child, .prose th:first-child { min-width: 116px; }
.prose input[type="checkbox"] { width: 20px; height: 20px; flex: 0 0 auto; margin: 0 8px 0 0; accent-color: var(--content-orange); vertical-align: -4px; cursor: pointer; }
.prose .task-list { list-style: none; padding-left: 0; }
.prose .task-list li { margin: 4px 0; padding: 0; }
.prose .task-list label { min-height: 44px; display: flex; align-items: center; padding: 7px 8px; border-bottom: 1px solid var(--content-line); cursor: pointer; }
.prose .task-list label:hover { background: rgba(255, 255, 255, .55); }

.content-footer { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 72px; padding-top: 24px; color: var(--content-muted); border-top: 1px solid var(--content-line); font-size: 11px; }
.content-footer a { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; color: var(--content-ink); font-weight: 750; }
.content-overlay { display: none; }

@media (max-width: 900px) {
  :root { --content-shell: min(100% - 40px, 760px); }
  .content-header { grid-template-columns: 1fr auto; padding-inline: 20px; }
  .content-header-nav { display: none; }
  .content-menu-button { justify-self: end; display: grid; }
  .content-shell { grid-template-columns: 1fr; gap: 0; padding-top: 36px; }
  .content-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(320px, calc(100vw - 48px)); max-height: none; padding: 24px; color: var(--content-ink); background: var(--content-paper); border-right: 1px solid var(--content-line); transform: translateX(-105%); transition: transform 200ms ease-out; }
  .content-menu-open .content-sidebar { transform: translateX(0); }
  .content-sidebar-head { display: grid; grid-template-columns: 1fr 44px; padding-right: 0; }
  .content-sidebar-head span, .content-sidebar-head strong { grid-column: 1; }
  .content-sidebar-head button { grid-column: 2; grid-row: 1 / 3; display: grid; align-self: center; }
  .content-directory { padding-right: 0; }
  .content-sidebar-map { margin-right: 0; }
  .content-overlay { position: fixed; inset: 0; z-index: 50; display: block; visibility: hidden; background: rgba(6,18,13,.48); opacity: 0; transition: opacity 200ms ease-out, visibility 200ms; }
  .content-menu-open .content-overlay { visibility: visible; opacity: 1; }
  .content-menu-open { overflow: hidden; }
  .content-main { max-width: none; }
}

@media (max-width: 600px) {
  :root { --content-shell: calc(100vw - 32px); }
  .content-header { height: 68px; padding-inline: 16px; }
  .content-brand-mark { width: 34px; height: 34px; }
  .content-shell { padding: 28px 0 60px; }
  .content-breadcrumb { margin-bottom: 20px; }
  .prose { font-size: 16px; line-height: 1.72; }
  .prose h1 { margin-bottom: 28px; padding-bottom: 22px; font-size: 38px; }
  .prose h2 { margin-top: 44px; font-size: 27px; }
  .prose h3 { font-size: 21px; }
  .prose table { width: calc(100vw - 32px); margin-left: 0; font-size: 12px; }
  .prose th, .prose td { min-width: 132px; padding: 11px 12px; }
  .content-footer { align-items: flex-start; flex-direction: column; gap: 6px; }
}

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