@charset "UTF-8";
:root {
  color-scheme: light;
  --paper: #fff; --sidebar: #fafafa; --ink: rgb(0 0 0 / .9); --muted: rgb(0 0 0 / .6);
  --line: rgb(0 0 0 / .1); --soft: rgb(0 0 0 / .05); --selected: rgb(0 0 0 / .1); --bubble: rgb(0 0 0 / .05); --accent: #d97757; --link: #c6613f;
  --drawer-width: 288px; --toolbar-height: 52px; --drawer-time: 340ms; --drawer-ease: cubic-bezier(.22,1,.36,1);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --reading: Georgia, "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", serif;
}
:root[data-theme=dark] { color-scheme: dark; --paper:#252524; --sidebar:#20201f; --ink:#e8e7e4; --muted:#aaa8a2; --line:#3b3b38; --soft:#323230; --selected:#41413d; --bubble:#333330; --accent:#d97757; --link:#d97757; }
@media(prefers-color-scheme:dark) {
  :root:not([data-theme=light]) { color-scheme:dark; --paper:#252524; --sidebar:#20201f; --ink:#e8e7e4; --muted:#aaa8a2; --line:#3b3b38; --soft:#323230; --selected:#41413d; --bubble:#333330; --accent:#d97757; --link:#d97757; }
}
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:var(--paper); font-family:var(--sans); -webkit-font-smoothing:antialiased; }
html { scrollbar-gutter:stable; }
::selection { background:var(--selected); }
a { color:inherit; text-decoration:none; }
a:hover { color:var(--link); }
button,input { font:inherit; }
button { cursor:pointer; color:inherit; }
a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
[hidden] { display:none!important; }
svg { width:20px; height:20px; flex-shrink:0; }
summary { cursor:pointer; list-style:none; }
summary::-webkit-details-marker { display:none; }
.icon-button { display:grid; place-items:center; width:32px; height:32px; padding:6px; border:0; border-radius:6px; background:transparent; }
.icon-button:hover { background:var(--soft); }
.drawer > summary { position:fixed; left:16px; top:10px; z-index:45; display:grid; place-items:center; width:32px; height:32px; border-radius:6px; background:var(--paper); }
.drawer > summary:hover { background:var(--soft); }
.drawer[open] > summary { left:calc(min(var(--drawer-width), 85vw) - 48px); z-index:75; }
#sidebar { position:fixed; inset:0 auto 0 0; z-index:60; width:min(var(--drawer-width),85vw); background:var(--sidebar); border-right:1px solid var(--line); display:flex; flex-direction:column; }
.sidebar-head { min-height:var(--toolbar-height); display:flex; align-items:center; justify-content:space-between; padding:0 13px 0 20px; border-bottom:1px solid var(--line); flex-shrink:0; }
.wordmark { font:600 28px/1 Georgia,serif; letter-spacing:-1px; }
.sidebar-scroll { min-height:0; flex:1; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; padding:12px 10px 20px; }
.primary-nav { display:grid; gap:3px; }
.primary-nav a { display:flex; align-items:center; gap:12px; padding:6px 10px; border-radius:8px; font-size:14px; }
.primary-nav svg { width:18px; height:18px; }
.primary-nav a:hover,.article-nav-link:hover { background:var(--soft); color:var(--ink); }
.primary-nav [aria-current=page], .article-nav-link[aria-current=page] { background:var(--selected); color:var(--ink); }
.sidebar-articles { margin-top:34px; }
.sidebar-articles > summary { display:flex; align-items:center; gap:5px; margin:0 12px 11px; font-size:13px; font-weight:500; }
.sidebar-articles > summary svg { width:13px; height:13px; }
.sidebar-articles:not([open]) > summary svg { transform:rotate(-90deg); }
.sidebar-articles nav { display:grid; gap:3px; }
.article-nav-link { display:flex; align-items:center; gap:12px; min-width:0; min-height:32px; padding:5px 10px; border-radius:8px; font-size:14px; line-height:1.5; }
.article-nav-link span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.article-dot { color:var(--muted); width:10px; text-align:center; flex-shrink:0; }
.sidebar-bottom { flex-shrink:0; display:flex; align-items:center; gap:20px; padding:12px 20px; color:var(--muted); font-size:12px; }
.sidebar-bottom .theme-toggle { margin-left:auto; }
.drawer-backdrop { position:fixed; inset:0; background:rgb(0 0 0 / .18); z-index:50; }
.content-frame { min-width:0; min-height:100svh; }
.page-toolbar { position:sticky; top:0; z-index:30; height:var(--toolbar-height); border-bottom:1px solid var(--line); background:var(--paper); display:flex; align-items:center; padding:0 26px 0 64px; transition:padding-left var(--drawer-time) var(--drawer-ease); }
.page-name { font-size:15px; }
.title-menu { min-width:0; max-width:100%; position:relative; }
.title-menu > summary { display:flex; align-items:center; gap:10px; min-height:36px; padding:4px 7px; margin-left:-7px; border-radius:6px; font-size:15px; }
.title-menu > summary:hover { background:var(--bubble); }
.title-menu > summary span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.title-menu > summary svg { width:16px; height:16px; }
.title-menu nav { position:absolute; top:calc(100% + 5px); left:0; min-width:260px; max-width:min(420px,calc(100vw - 80px)); padding:6px; background:var(--paper); border:1px solid var(--line); border-radius:9px; box-shadow:0 8px 26px rgb(0 0 0 / .09); }
.shell { max-width:860px; min-height:calc(100svh - var(--toolbar-height)); margin:0 auto; padding:40px 30px 0; display:flex; flex-direction:column; }
main { flex:1; min-width:0; }
.prose { font:400 18px/1.8 var(--reading); overflow-wrap:anywhere; }
.prose p { margin:0 0 1.1em; }
.prose h1,.prose h2,.prose h3,.prose h4,.prose h5,.prose h6 { font:inherit; margin:1.7em 0 1.1em; }
.prose a { color:var(--link); text-decoration:underline; text-underline-offset:3px; }
.prose img { max-width:100%; height:auto; }
.prose blockquote { border-left:2px solid var(--line); margin:25px 0; padding:0 20px; color:var(--muted); }
.prose blockquote p:last-child { margin:0; }
.prose code { font: .85em/1.6 monospace; background:var(--bubble); padding:2px 5px; border-radius:4px; }
.prose pre { overflow-x:auto; background:var(--bubble); padding:18px; border-radius:8px; }
.prose pre code { padding:0; background:none; }
.prose table { display:block; max-width:100%; overflow:auto; border-collapse:collapse; font-size:15px; margin:24px 0; }
.prose td,.prose th { border:1px solid var(--line); padding:8px 12px; }
.prose hr { border:0; border-top:1px solid var(--line); margin:32px 0; }
.article-actions { display:flex; align-items:center; gap:9px; margin-top:24px; color:var(--muted); }
.article-actions svg { width:17px; height:17px; }
.copy-status { font-size:12px; }
.footer { font-size:12px; color:var(--muted); padding:64px 0 24px; }
.flow-article { margin-bottom:36px; padding-bottom:36px; border-bottom:1px solid var(--line); }
.flow-article:last-child { border-bottom:0; }
.flow-stick { position:sticky; top:0; height:0; z-index:10; }
.flow-title { position:absolute; top:0; left:0; right:0; height:var(--toolbar-height); display:flex; align-items:center; background:var(--paper); opacity:0; visibility:hidden; transition:opacity 120ms ease,visibility 0s 120ms; }
.flow-title.is-stuck { opacity:1; visibility:visible; transition-delay:0s; }
.flow-title a { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:500 16px/1.4 var(--sans); }
.flow-heading,.article-heading { font:600 28px/1.4 var(--sans); margin:0 0 6px; }
.article-date { display:block; margin:0 0 26px; color:var(--muted); font-size:12px; }
.flow-article > time { display:block; margin:0 0 26px; color:var(--muted); font-size:12px; }
.read-link { display:inline-block; font:12px/1.5 var(--sans); color:var(--muted); margin-top:15px; }
.search-label { display:block; margin-bottom:30px; }
.search-label input { width:100%; padding:12px 15px; border:1px solid var(--line); border-radius:10px; background:var(--paper); color:var(--ink); font-size:14px; }
.search-empty,.empty-state { font-size:14px; color:var(--muted); }
.about h1 { font:500 25px/1.6 var(--sans); margin:0 0 25px; }
.about p { font:18px/1.8 var(--reading); }
.skip-link { position:fixed; left:16px; top:-100px; padding:10px 16px; background:var(--ink); color:var(--paper); z-index:90; }
.skip-link:focus { top:8px; }
.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; }
/* The head script sets the remembered state before the first paint. */
html[data-sidebar=closed] #sidebar { transform:translateX(-100%); visibility:hidden; }
html[data-sidebar=closed] .drawer-backdrop { opacity:0; visibility:hidden; }
html[data-sidebar] .drawer > summary { left:16px; top:10px; z-index:45; }
html[data-sidebar=open] .drawer > summary { visibility:hidden; }
.drawer-enhanced #sidebar { transition:transform var(--drawer-time) var(--drawer-ease),visibility 0s; }
.drawer-enhanced[data-sidebar=closed] #sidebar { transition:transform var(--drawer-time) var(--drawer-ease),visibility 0s var(--drawer-time); }
.drawer-enhanced .drawer-backdrop { opacity:0; visibility:hidden; transition:opacity var(--drawer-time) ease,visibility 0s var(--drawer-time); }
.drawer-enhanced .drawer-modal .drawer-backdrop { opacity:1; visibility:visible; transition-delay:0s; }
.drawer-modal { overflow:hidden; }
@media(min-width:761px) {
  html[data-sidebar=open] .content-frame { margin-left:var(--drawer-width); }
  html[data-sidebar=open] .page-toolbar { padding-left:26px; }
  .content-frame { transition:margin-left var(--drawer-time) var(--drawer-ease); }
  html[data-sidebar] .drawer-backdrop { display:none; }
}
@media(max-width:760px) {
  .shell { padding:26px 22px 0; }
  .page-toolbar { padding-left:60px; padding-right:16px; }
  .title-menu > summary { font-size:14px; }
  .prose,.about p { font-size:16px; line-height:1.9; }
  .flow-heading,.article-heading { font-size:24px; }
  .footer { padding-top:42px; }
}
html:not(.ui-ready) #sidebar,html:not(.ui-ready) .content-frame,html:not(.ui-ready) .page-toolbar { transition:none; }
@media(prefers-reduced-motion:reduce) { #sidebar,.content-frame,.page-toolbar,.drawer-backdrop,.flow-title { transition:none!important; } }

.plain-page .shell { min-height:100svh; padding-top:48px; }
.search-dialog { position:fixed; inset:0; margin:clamp(90px,23vh,220px) auto auto; width:min(700px,calc(100vw - 40px)); max-height:65svh; padding:0; border:1px solid var(--line); border-radius:14px; color:var(--ink); background:var(--paper); box-shadow:0 24px 70px rgb(0 0 0 / .2); }
.search-dialog::backdrop { background:rgb(0 0 0 / .4); }
.search-dialog[open] { display:flex; flex-direction:column; animation:search-appear 150ms ease-out; }
.search-dialog-header { display:flex; align-items:center; gap:14px; min-height:64px; padding:12px 18px 12px 23px; border-bottom:1px solid var(--line); flex-shrink:0; }
.search-dialog-header > svg { width:19px; height:19px; color:var(--muted); }
.search-dialog-header input { min-width:0; flex:1; width:100%; border:0; background:transparent; color:var(--ink); outline:none; font-size:16px; padding:6px 0; }
.search-dialog-header input::-webkit-search-cancel-button { display:none; }
.search-dialog-body { min-height:0; overflow:auto; padding:14px 10px 17px; }
.search-caption { font-size:12px; color:var(--muted); margin:9px 15px 10px; }
.search-result { display:flex; align-items:center; gap:11px; min-height:39px; padding:9px 13px; border-radius:8px; font-size:14px; color:var(--ink); }
.search-result > svg { width:18px; height:18px; color:var(--muted); }
.search-result[aria-selected=true] { background:var(--selected); }
.search-result:hover { color:var(--ink); }
.result-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; min-width:0; }
.result-title strong { font-weight:650; }
.search-result time { font-size:12px; color:var(--muted); white-space:nowrap; }
.result-enter { color:var(--muted); display:none; }
.search-result[aria-selected=true] time { display:none; }
.search-result[aria-selected=true] .result-enter { display:block; }
.search-no-results { padding:20px 15px; margin:0; color:var(--muted); font-size:14px; }
.search-open { overflow:hidden; }
.search-fallback h1 { font-size:24px; font-weight:500; }
.search-launch { display:flex; align-items:center; gap:10px; padding:11px 15px; background:var(--paper); color:var(--muted); border:1px solid var(--line); border-radius:8px; margin-bottom:24px; cursor:pointer; }
@keyframes search-appear { from{opacity:0;transform:translateY(-5px) scale(.99)} to{opacity:1;transform:none} }
@media(max-width:760px){
  .plain-page .shell { padding-top:64px; }
  .plain-page .flow-title { right:-10px; }
  .search-dialog { width:calc(100vw - 24px); margin-top:12svh; max-height:75svh; }
  .search-dialog-header { padding:12px 12px 12px 17px; }
  .search-result { font-size:13px; padding:10px; gap:9px; }
  .search-result time { display:none; }
}
@media(prefers-reduced-motion:reduce){.search-dialog[open]{animation:none;}}

.related-reading { margin-top:36px; padding-top:22px; border-top:1px solid var(--line); }
.related-reading h2 { margin:0 0 14px; font:400 12px/1.5 var(--sans); color:var(--muted); }
.related-reading a { display:block; padding:5px 0 12px; }
.related-title { display:block; font:500 16px/1.65 var(--sans); }
.related-title > span { display:inline-block; margin-left:5px; color:var(--muted); font-size:13px; }
.related-note { display:block; margin:6px 0 0; color:var(--muted); font:400 13px/1.8 var(--sans); }
@media(max-width:960px) { html[data-sidebar=closed] .plain-page .flow-title { padding-left:32px; } }
html[data-sidebar] .page-toolbar .title-menu { transition:opacity 120ms ease,visibility 0s 120ms; }
html[data-sidebar] .page-toolbar:not(.title-shown) .title-menu { opacity:0; visibility:hidden; }
html[data-sidebar] .page-toolbar.title-shown .title-menu { transition-delay:0s; }
@media(prefers-reduced-motion:reduce) { html[data-sidebar] .page-toolbar .title-menu { transition:none; } }
