:root{--bg:#fafbfc;--surface:#fff;--soft:#f1f4f8;--text:#253247;--muted:#607087;--border:#dce3ec;--accent:#235bb6;--code:#f3f5f9;--header:70px;color-scheme:light}
:root[data-theme=dark]{--bg:#131820;--surface:#19212d;--soft:#202b39;--text:#dde5ef;--muted:#a2b1c4;--border:#334156;--accent:#8ab7ff;--code:#18212e;color-scheme:dark}
@media(prefers-color-scheme:dark){:root:not([data-theme]){--bg:#131820;--surface:#19212d;--soft:#202b39;--text:#dde5ef;--muted:#a2b1c4;--border:#334156;--accent:#8ab7ff;--code:#18212e}}
:root{font-family: -apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;color:var(--text);background:var(--bg);font-synthesis:none;--line:var(--border)}*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:30px}body{margin:0}a{color:inherit;text-decoration:none}button{font:inherit}a:focus-visible,button:focus-visible{outline:2px solid var(--accent);outline-offset:6px}a:hover{color:var(--accent)}.wrap{max-width:1240px;width:calc(100% - 112px);margin:auto}.header{border-bottom:1px solid var(--line)}.nav{height:80px;display:flex;align-items:center;justify-content:space-between}.brand{font:25px Georgia,'Songti SC',serif}.brand span{font:10px -apple-system,sans-serif;letter-spacing:2px;color:var(--muted);margin-left:14px}nav{display:flex;gap:34px;align-items:center;font-size:14px}nav a{padding:28px 0}nav .nav-active{border-bottom:2px solid var(--accent);color:var(--accent)}.github{display:flex;gap:8px;align-items:center}.github img{width:18px;height:18px}.hero{display:flex;justify-content:space-between;align-items:flex-end;padding:56px 0 50px;border-bottom:1px solid var(--border)}.eyebrow{font-size:10px;line-height:1.6;letter-spacing:2.5px;color:var(--muted);margin:0 0 20px}.hero h1{font-family:'Songti SC','STSong','Noto Serif CJK SC',serif;font-size:82px;font-weight:600;letter-spacing:3px;line-height:1.2;margin:0}.hero h1 span{color:var(--accent)}.hero-note{padding:0 0 8px;max-width:340px}.hero-note .eyebrow{color:var(--accent);font-size:11px;letter-spacing:3px;margin-bottom:12px}.hero-note p:not(.eyebrow){font-size:15px;line-height:1.95;color:var(--muted);margin:0 0 22px}.hero-note a{font-size:14px;color:var(--accent)}.library{padding:36px 0 32px}.section-head{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:32px;gap:20px}.section-head .eyebrow{margin-bottom:8px}h2{font-family:'Songti SC','STSong',serif;font-size:32px;font-weight:600;margin:0 0 9px}.intro{font-size:14px;color:var(--muted);margin:0;line-height:1.7}.switch{display:flex;gap:4px;border-bottom:1px solid var(--line);flex-shrink:0}.switch button{border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted);padding:10px 14px;cursor:pointer;font-size:12px}.switch button.selected{color:var(--accent);border-bottom-color:var(--accent)}.switch button:hover{color:var(--text)}.switch span{font-size:10px;margin-left:7px;color:var(--muted)}.categories{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:34px 36px}.category{border-top:1px solid var(--line);padding-top:20px;min-width:0;display:flex;flex-direction:column}.category-top{display:flex;gap:14px;align-items:center;margin-bottom:12px}.index{font:14px Georgia,serif;color:var(--accent)}.category-en{font-size:9px;letter-spacing:1.5px;color:var(--muted)}h3{font-family:'Songti SC','STSong',serif;font-size:24px;font-weight:600;margin:0 0 10px}.description{font-size:12px;color:var(--muted);line-height:1.85;margin:0 0 18px;min-height:45px}.books{display:grid;grid-template-columns:1fr 1fr;gap:18px}.book{display:block;padding:0 0 14px;min-width:0}.book-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.book-title strong{font:600 27px Georgia,serif}.arrow{font-size:18px;color:var(--accent);transition:transform .2s}.book:hover .arrow{transform:translate(2px,-2px)}.version{font-size:11px;color:var(--accent);display:block;margin-bottom:9px;line-height:1.6}.detail{font-size:10px;color:var(--muted);line-height:1.7;display:block}.future{min-height:111px;padding:2px 0 15px}.future-label{font-size:10px;color:var(--muted);letter-spacing:1px}.future p{font:16px Georgia,'Songti SC',serif;color:var(--text);line-height:1.8;margin:9px 0 12px}.unpublished{font-size:10px;color:var(--muted)}.library-note{border-top:1px solid var(--line);font-size:11px;color:var(--muted);margin:24px 0 0;padding-top:20px;line-height:1.8}footer{border-top:1px solid var(--line);color:var(--muted);font-size:11px}.footer-inner{display:flex;align-items:center;justify-content:space-between;padding:27px 0}.dot{margin:0 8px}footer a{color:var(--text)}@media(min-width:1600px){.hero{padding-top:70px;padding-bottom:60px}.hero h1{font-size:92px}}@media(max-width:1000px){.wrap{width:calc(100% - 64px)}.brand span{display:none}.hero h1{font-size:68px}.hero-note{max-width:260px}.hero-note p:not(.eyebrow){font-size:13px}.categories{grid-template-columns:repeat(2,minmax(0,1fr))}.section-head{align-items:flex-start}.intro{max-width:320px}}@media(max-width:600px){.wrap{width:calc(100% - 40px)}.nav{height:64px}.brand{font-size:22px}nav{gap:18px;font-size:12px}nav a{padding:22px 0}nav a:nth-child(2){display:none}.github img{width:15px;height:15px}.hero{padding:36px 0 30px;display:block}.hero h1{font-size:58px;letter-spacing:1px}.hero>.hero-note{padding:26px 0 0;max-width:none}.hero-note .eyebrow{display:none}.hero-note p:not(.eyebrow){font-size:13px;margin-bottom:12px}.hero>.hero-note a{font-size:12px}.hero .eyebrow{font-size:8px;letter-spacing:1.7px;margin-bottom:15px}.library{padding-top:28px}.section-head{display:block;margin-bottom:26px}h2{font-size:28px}.intro{max-width:none;font-size:12px}.switch{margin-top:20px;width:max-content}.switch button{padding-left:0;padding-right:20px;font-size:12px}.categories{grid-template-columns:1fr;gap:26px}.description{min-height:0;margin-bottom:16px}.category h3{font-size:24px}.book-title strong{font-size:29px}.detail{font-size:11px}.future{min-height:95px}.footer-inner{flex-wrap:wrap;gap:16px;padding:24px 0}.footer-inner>span:nth-child(2){display:none}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.arrow{transition:none}}
/* Readable category descriptions and room for long handbook names. */
.description{font-size:14px;min-height:52px}.detail{font-size:11px}.version{font-size:12px}.future-label,.unpublished{font-size:11px}.library-note{font-size:12px}.book-title{gap:8px}.book-title strong{font-size:25px}.arrow{flex-shrink:0}@media(max-width:600px){.description{font-size:14px;min-height:0}.book-title strong{font-size:25px}.hero-note p:not(.eyebrow){font-size:14px}.intro{font-size:13px}.future p{font-size:17px}}
[hidden]{display:none!important}.skip-link{position:absolute;left:20px;top:-70px;padding:12px;background:var(--bg);color:var(--text);z-index:10}.skip-link:focus{top:8px}

.books.single{grid-template-columns:1fr}.books.single .book-title strong{font-size:30px}.books.single .book{padding-bottom:14px}

/* Cross-domain topics occupy a full row after the six subject categories. */
.category-topics{grid-column:1/-1;border-top-color:var(--accent);padding-top:24px}
.category-topics>.description{min-height:0;margin-bottom:24px}
.topic-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px;list-style:none;padding:0;margin:0}
.topic-links li{min-width:0;border-bottom:1px solid var(--line)}
.topic-links a{display:flex;align-items:center;gap:12px;padding:13px 0;font-size:13px;line-height:1.7}
.topic-links a>span:nth-child(2){min-width:0;overflow-wrap:anywhere}
.topic-number{font:12px Georgia,serif;color:var(--accent);flex-shrink:0}
.topic-links .arrow{margin-left:auto;font-size:15px}
.topic-links a:hover .arrow{transform:translate(2px,-2px)}
@media(max-width:1000px){.topic-links{gap:0 18px}}
@media(max-width:600px){.nav{height:auto;min-height:92px;flex-wrap:wrap;gap:4px;padding-top:16px}nav{width:100%;justify-content:space-between;gap:12px}nav a{padding:15px 0}nav a:nth-child(2){display:block}.topic-links{grid-template-columns:1fr}.topic-links a{font-size:14px;padding:14px 0}.category-topics>.description{margin-bottom:20px}}
@media(max-width:360px){.books{grid-template-columns:1fr}}

.header{background:var(--surface)}.nav{gap:24px}.nav nav{margin-left:auto}.header-theme{white-space:nowrap;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:6px 10px;font-size:12px;cursor:pointer}.header-theme:hover{background:var(--soft)}.github img{filter:brightness(0)}[data-theme=dark] .github img{filter:brightness(0) invert(1)}
@media(max-width:600px){.nav{gap:4px}.nav .brand{order:1}.header-theme{order:2;margin-left:auto}.nav nav{order:3;margin-left:0}}
body{background:var(--bg);color:var(--text)}
/* 长名称手册保留标题与箭头的空间，窄卡片自动改为单列。 */
#ai .books{grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}

.topics-all { margin: 14px 0 0; font-size: 13px; }
