/* Jiancodes editorial system: paper, ink, architectural drawings, precise controls. */
:root{--ink:#222521;--muted:#6e746e;--blue:#3e59b7;--border:#dedfd8;--line:#dedfd8;--paper:#fff;--soft:#f3f4ef;--nav:#f1f2ed;--nav-deep:#f5f5f0;--editorial-paper:#f6f6f1}
body{font-family:'Open Sans',-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif}
button,input,textarea,select{font-family:inherit}
.topbar,.research-header{background:#fafaf6;border-bottom-color:var(--border)}
.brand,.research-brand{color:var(--ink)}.brand>svg,.research-brand svg{color:var(--blue)}
.brand>span,.research-brand strong{font-weight:600;letter-spacing:-.8px}.brand-en,.research-brand small{font-family:Georgia,'Times New Roman',serif;font-style:italic;font-size:12px}
.top-nav{gap:22px}.top-nav button,.top-nav a{font-weight:500}.global-search{border-radius:6px;background:#eeefe9;border:1px solid #e3e4dc}
.primary{border-radius:5px}.secondary{border-radius:5px}.sidebar,.rail{background:var(--soft)}
.sidebar .toc-filter:focus-within{box-shadow:inset 0 0 0 2px var(--blue)}
.research-tabs,.condition-pane,.context-pane{background:#f8f8f4}.research-intro h1,.view-heading h1{font-weight:500;letter-spacing:-1px}
.research-grid,.wide-view{color:var(--ink)}.research-footer{border-color:var(--border)}
.dark .topbar,.dark .research-header{background:var(--paper)}.dark .brand{color:var(--ink)}.dark .global-search{background:var(--soft);border-color:var(--border)}

/* Reusable covers. All titles, codes, editions and chapter summaries come from the book. */
.code-cover{position:relative;display:flex;flex-direction:column;overflow:hidden;width:190px;height:258px;padding:15px 16px 11px;background:var(--cover-paper);color:var(--cover-ink);text-align:left;border-radius:1px;box-shadow:inset 4px 0 7px #00000012,inset 0 0 0 1px #00000012;font-family:'Open Sans','PingFang SC','Microsoft YaHei',sans-serif;isolation:isolate}
.code-cover:after{content:'';position:absolute;top:0;bottom:0;left:5px;border-left:1px solid #ffffff40;pointer-events:none}
.cover-top{display:flex;align-items:center;justify-content:space-between;gap:5px;line-height:1.2;border-bottom:1px solid currentColor;padding-bottom:7px;opacity:.85}
.cover-top>span:first-child{font-size:11px;font-weight:600}.cover-top [lang]{font-size:6.5px;letter-spacing:1px}
.cover-title{display:block;font-weight:650;font-size:22px;line-height:1.25;letter-spacing:-.6px;margin-top:13px;max-width:7em;overflow-wrap:anywhere;z-index:1}
.cover-long .cover-title{font-size:16px;letter-spacing:-.4px;max-width:none}
.cover-code{display:block;font-size:8px;letter-spacing:.5px;margin-top:7px;z-index:1;font-variant-numeric:tabular-nums}
.cover-drawing{width:110px;height:104px;position:absolute;right:5px;bottom:44px;fill:none;stroke:currentColor;stroke-width:1;stroke-linejoin:miter;stroke-linecap:butt;opacity:.55;z-index:-1}
.cover-1 .cover-drawing{width:140px;height:132px;right:-29px;bottom:47px;opacity:.32}.cover-2 .cover-drawing{right:1px;bottom:46px;opacity:.45}.cover-3 .cover-drawing{width:130px;height:123px;right:-17px;bottom:45px}.cover-4 .cover-drawing{right:6px;opacity:.4}.cover-5 .cover-drawing{width:145px;height:138px;right:-36px;bottom:44px;opacity:.35}
.cover-description{display:block;margin-top:auto;padding-top:14px;font-size:8px;line-height:1.65;max-width:142px;font-weight:500;z-index:1}
.cover-bottom{display:flex;justify-content:space-between;align-items:flex-end;gap:6px;font-size:5.8px;line-height:1.4;margin-top:10px;border-top:1px solid currentColor;padding-top:5px;opacity:.85}
.cover-bottom>span:first-child{max-width:95px}.cover-bottom>span:last-child{white-space:nowrap}
.library-cover{width:58px;height:79px;flex:0 0 58px;overflow:hidden;display:block;border-radius:1px;box-shadow:0 2px 4px #22252112}
.library-cover .code-cover{transform:scale(.3053);transform-origin:top left}
.library-record .book-card{gap:17px;align-items:center}.library-record .book-detail{min-width:0}.library-record .library-book-title{font-weight:550}

/* A quiet black exhibition surface above a bilingual editorial masthead. */
#home{background:var(--editorial-paper);--home-accent:var(--blue)}
.home-shell{max-width:1400px;padding:20px 40px 28px}
.home-heading{margin:0 0 16px}.home-eyebrow{font-size:10px;letter-spacing:1.6px;color:#6b716b}.home-heading-actions{gap:18px}
.book-stage{position:relative;background:#141614;color:#f3f3e9;border:1px solid #282c27;border-radius:14px;height:340px;overflow:hidden;isolation:isolate}
.stage-heading{position:absolute;top:20px;left:25px;right:25px;display:flex;justify-content:space-between;align-items:center;color:#c5cabf;font-size:11px;z-index:25;pointer-events:none}
.stage-heading [lang]{font-size:9px;letter-spacing:2px;color:#a4ad9e}
.book-fan{position:absolute;inset:36px 0 65px;--fan-step:90px;--fan-angle:6deg;--fan-rise:2px}
.fan-book{position:absolute;top:46%;left:50%;display:block;color:inherit;transform:translate(-50%,-50%) translateX(calc(var(--slot)*var(--fan-step))) translateY(calc(var(--dip)*var(--fan-rise))) rotate(calc(var(--slot)*var(--fan-angle)));transition:transform .65s cubic-bezier(.22,.7,.2,1),filter .2s,opacity .2s;filter:brightness(.84);transform-origin:50% 90%;box-shadow:-8px 8px 20px #0007;text-decoration:none;will-change:auto}
.fan-book.is-center{filter:brightness(1)}
.fan-book:hover,.fan-book:focus-visible{z-index:30!important;filter:brightness(1);transform:translate(-50%,-50%) translateX(calc(var(--slot)*var(--fan-step))) translateY(calc(var(--dip)*var(--fan-rise) - 24px)) rotate(0deg) scale(1.045);outline:2px solid #f7f5e9;outline-offset:5px;text-decoration:none}
.fan-book:focus-visible{transition-duration:.15s}
.book-stage[data-layout="row"] .book-fan{--fan-step:204px;--fan-angle:0deg;--fan-rise:0px}
.book-stage[data-layout="row"] .fan-book{filter:brightness(.9)}
.deck-bottom{position:absolute;bottom:25px;left:25px;right:25px;display:flex;align-items:center;justify-content:space-between;gap:18px;z-index:40;pointer-events:none}
.deck-reading{display:flex;gap:14px;align-items:center;min-width:0;font-size:10px;max-width:50%}.deck-position{font-size:10px;font-variant-numeric:tabular-nums;color:#9ba594;white-space:nowrap}.deck-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#d6dbce}
.deck-controls{display:flex;align-items:center;gap:4px;background:#242722;border:1px solid #383d34;border-radius:6px;padding:3px;pointer-events:auto}
.deck-controls button{height:27px;min-width:31px;padding:3px 9px;color:#cdd4c3;border-radius:3px;font-size:10px}.deck-controls button:hover{background:#363c30;color:#fff}.deck-controls button:focus-visible{outline:2px solid #edf0df;outline-offset:2px}
.deck-controls svg{width:13px;height:13px}.deck-layout{display:flex;border-left:1px solid #4b5146;border-right:1px solid #4b5146;padding:0 4px;gap:2px}
.deck-layout button[aria-pressed="true"]{background:#e9ecdf;color:#22281b}.deck-hint{position:absolute;bottom:6px;left:25px;font-size:8px;letter-spacing:1px;color:#a1ab98}
.deck-paused .deck-hint{color:#dce3d2}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.home-hero{padding:24px 4px 20px;display:block}.home-statement{display:flex;align-items:center;justify-content:space-between;gap:30px;max-width:1040px;margin:auto}
.home-hero h1{font-size:clamp(34px,3.4vw,46px);font-weight:500;line-height:1.25;letter-spacing:-2px;margin:0;color:#20251e}
.home-english{padding-top:3px}.home-hero .home-english p{font:30px/1.14 Georgia,'Times New Roman',serif;letter-spacing:-.7px;color:#41483c;margin:0 0 12px}.home-hero .home-english em{font-style:italic;color:inherit}.home-english>span{font-size:11px;color:#73796d;letter-spacing:1px}
.home-search{max-width:1040px;margin:auto;padding:14px 20px 12px;border:1px solid #cdd1c5;border-radius:7px;box-shadow:none;background:#fffffc}
.home-label{font-size:10px;letter-spacing:.5px;margin-bottom:5px}.home-query-row input{font-size:16px}.home-query-row .primary{background:#252c22;color:#fff;border-radius:4px;font-size:13px;min-height:42px}
.home-query-row .primary:hover{background:#3e59b7}.home-search-options{padding-top:8px;margin-top:10px;gap:10px}.home-search-options label{padding:4px 8px}.home-search-help{margin-top:5px;font-size:10px}
.home-topics{max-width:1040px;margin:auto;padding:10px 0 22px}.home-section{margin-top:26px}.home-section-head h2{font-size:15px;font-weight:550}.home-disciplines{grid-template-columns:repeat(4,minmax(0,1fr));gap:0 32px}
.home-lower{gap:60px}.home-section-head>span{font-family:inherit}.home-books b{font-weight:500}.home-continue{border-color:var(--border)}.home-footer{padding-top:20px;margin-top:34px}
.dark #home{--editorial-paper:var(--paper)}.dark .home-hero h1,.dark .home-hero .home-english p{color:var(--ink)}.dark .home-search{background:var(--paper);border-color:var(--border)}
@media(min-width:1500px){.book-fan{--fan-step:100px}.book-stage{height:340px}.home-shell{padding-top:25px}}
@media(max-width:1060px){.home-shell{padding:20px 28px}.book-fan{--fan-step:78px}.book-stage{height:340px}.home-hero h1{font-size:40px}.home-hero .home-english p{font-size:27px}.deck-caption{max-width:200px}}
@media(max-width:760px){
 .home-shell{padding:15px 16px 26px}.home-heading{margin-bottom:12px}.home-eyebrow{font-size:9px;letter-spacing:.7px}.home-heading-actions{gap:10px}
 .book-stage{height:292px;border-radius:10px;overflow:hidden}.stage-heading{top:15px;left:15px;right:15px;font-size:10px}.stage-heading [lang]{font-size:7px;letter-spacing:1px}
 .book-fan{--fan-step:58px;--fan-rise:1px;--fan-angle:7deg;inset:42px 0 75px}.fan-book .code-cover{width:144px;height:196px;padding:10px 12px 8px}.cover-title{font-size:17px;margin-top:10px}.cover-long .cover-title{font-size:12px}.cover-code{font-size:6px}.cover-top>span:first-child{font-size:9px}.cover-top [lang]{font-size:5px;letter-spacing:.5px}.cover-description{font-size:6px;max-width:110px;padding-top:9px}.cover-bottom{font-size:4.5px;margin-top:6px;padding-top:4px}.cover-drawing{width:84px;height:80px;bottom:35px}.cover-1 .cover-drawing,.cover-3 .cover-drawing,.cover-5 .cover-drawing{width:95px;height:90px;bottom:35px}
 .library-cover .code-cover{width:190px;height:258px;padding:15px 16px 11px}.library-cover .cover-title{font-size:22px}.library-cover .cover-long .cover-title{font-size:16px}
 .book-stage[data-layout="row"] .book-fan{--fan-step:156px}.fan-book:hover,.fan-book:focus-visible{transform:translate(-50%,-50%) translateX(calc(var(--slot)*var(--fan-step))) translateY(calc(var(--dip)*var(--fan-rise) - 10px)) rotate(0deg)}
 .deck-bottom{bottom:21px;left:12px;right:12px;justify-content:center}.deck-reading{position:absolute;top:-21px;max-width:100%;font-size:8px;gap:8px}.deck-position{font-size:8px}.deck-caption{max-width:210px}.deck-hint{left:auto;width:100%;text-align:center;bottom:5px;font-size:7px}
 .deck-controls{padding:2px;gap:3px}.deck-controls button{height:36px;min-width:36px;font-size:10px;padding:4px 9px}
 .home-hero{padding:25px 2px 20px}.home-statement{align-items:flex-start;gap:14px}.home-hero h1{font-size:29px;line-height:1.35;letter-spacing:-1.3px;flex-shrink:0}.home-hero .home-english p{font-size:18px;line-height:1.2;letter-spacing:-.4px;margin-bottom:0}.home-hero .home-english em{display:inline}.home-english>span{display:none}
 .home-search{padding:12px}.home-query-row{flex-wrap:nowrap;gap:8px}.home-query-row input{flex:1;min-width:0;font-size:16px;min-height:42px}.home-query-row .primary{width:auto;padding:9px 12px;font-size:12px}.home-search-options{gap:2px;justify-content:space-between;padding-top:8px}.home-search-options label{padding:5px 3px}.home-search-options b{font-size:11px}.home-search-help{font-size:9px}
 .home-topics{padding:10px 0 14px;font-size:10px;gap:0 12px}.home-topics button{font-size:11px}.home-topics>span{display:none}.home-disciplines{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}.home-lower{gap:12px}.home-continue{grid-row:auto}
 .library-record .book-card{gap:12px}.library-cover{width:50px;height:68px;flex-basis:50px}.library-cover .code-cover{transform:scale(.2632)}
}
@media(max-width:380px){.home-hero h1{font-size:26px}.home-hero .home-english p{font-size:16px}.home-shell{padding-left:12px;padding-right:12px}.home-trial{display:none}}
@media(prefers-reduced-motion:reduce){.fan-book,.home-search{transition:none!important}}
@media print{.book-stage{display:none!important}}

.book-fan .cover-title{text-wrap:balance}
@media(min-width:761px){.book-fan .code-cover{width:174px;height:234px;padding:13px 14px 10px}.book-fan .cover-title{font-size:20px}.book-fan .cover-long .cover-title{font-size:14px}.book-fan .cover-drawing{height:90px;bottom:45px}.book-fan .cover-description{font-size:7.5px}.book-fan .cover-bottom{font-size:5px}}

/* Black exhibition / glass controls. Glass is an explicit brand direction from the owner. */
body.at-home{background:#0b0c0e}
.at-home .topbar{background:rgba(18,19,22,.82);backdrop-filter:blur(20px) saturate(120%);-webkit-backdrop-filter:blur(20px) saturate(120%);border-color:#ffffff15;color:#f2f3f5}
.at-home .brand,.at-home .brand-en{color:#f2f3f5}.at-home .brand>svg{color:#9dafed}
.at-home .top-nav button,.at-home .top-nav a{color:#a8acb5}.at-home .top-nav .active,.at-home .top-nav button:hover,.at-home .top-nav a:hover{color:#fff;border-bottom-color:#a5baff}
.at-home .global-search{background:#ffffff07;border-color:#ffffff16;color:#afb5c0}.at-home .global-search kbd{background:#ffffff09;color:#afb5c0;border-color:#ffffff18}
.at-home .topbar .secondary{background:#ffffff07;border-color:#ffffff22;color:#c7cad1}.at-home .sync-state{color:#a9aeb8}.at-home .avatar{background:#ffffff0c;color:#d3dcff}
#home{--editorial-paper:#0b0c0e;color:#f1f2f5;--ink:#f1f2f5;--muted:#a4a9b4;--border:#2a2d34;--line:#2a2d34;--soft:#191c22;--home-accent:#adc0ff;background:#0b0c0e}
.home-heading{margin-bottom:12px}.home-eyebrow{color:#a6adb9}.home-heading-actions,.home-replay,.home-trial{color:#a6adb9}.home-trial{background:transparent;border-color:#30343c}
.book-stage{background:#101114;border-color:#ffffff16;border-radius:16px}.stage-heading{color:#d1d5de}.stage-heading [lang]{color:#a9afbb}.deck-position,.deck-caption,.deck-hint{color:#b9bfcb}
.deck-controls{background:rgba(48,51,59,.72);border-color:#ffffff25;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);box-shadow:inset 0 1px #ffffff0c}.deck-controls button{color:#d5d9e2}.deck-controls button:hover{background:#ffffff10}.deck-layout{border-color:#ffffff20}.deck-layout button[aria-pressed="true"]{background:#e9edf5;color:#15171c}
.home-hero h1,.dark .home-hero h1{color:#f4f5f7;font-weight:500;letter-spacing:-1.7px}.home-hero .home-english p,.dark .home-hero .home-english p{color:#bec6d8}.home-english>span{color:#a1a9b8}
.home-search,.dark .home-search{position:relative;background:rgba(33,36,44,.7);border:1px solid #ffffff26;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);box-shadow:inset 0 1px #ffffff0b;border-radius:12px}
.home-search:focus-within{border-color:#9babd1;box-shadow:0 0 0 3px #adc0ff14}.home-label{color:#b8becb;font-size:11px}.home-query-row input{color:#f2f4fa;background:transparent}.home-query-row input::placeholder{color:#a3aab8;opacity:1}.home-query-row .primary{background:#e6edff;color:#151d30;border:1px solid transparent;font-weight:600}.home-query-row .primary:hover{background:#fff}
.home-search-options{border-color:#ffffff12}.home-search-options label{color:#aab2c2;background:transparent;border-color:transparent}.home-search-options label:has(input:checked){background:#ffffff09;color:#edf1fb;border-color:#ffffff16}.home-search-options small{color:#a1a9b8}.home-search-options input{accent-color:#b9caff}.home-search-help{color:#9ba3b2}
.home-topics,.home-topics button{color:#a9b2c5}.home-topics button:hover{color:#fff;background:#ffffff08}.home-section-head h2,.home-books b,.home-continue h3{color:#eceff5}.home-section-head button{color:#bdcfff}.home-section-head>span,.home-books small,.home-continue>small,.home-continue p,.home-local{color:#a6aebb}
.home-disciplines button,.home-books button{border-color:#272b33;color:#e1e5ef;background:transparent}.home-disciplines button:hover,.home-books button:hover{background:#171a20;color:#fff}.home-disciplines small{color:#9ca5b6}.home-disciplines button>span:last-child,.home-books button>span:last-child{color:#a4afc4}
.home-continue{background:transparent;border-color:#2a2d35}.home-continue .primary{background:#e4ebfc;color:#182134}.home-records button{background:#1a1d24;border-color:#303540;color:#c6cfdf}.home-footer{border-color:#282d35;color:#a9b1c1}.home-footer button{color:#b7c9f0}
#home :is(button,a,input):focus-visible{outline:2px solid #b7cbff;outline-offset:4px}.at-home .topbar :is(button,a):focus-visible{outline:2px solid #b7cbff;outline-offset:3px}
@media(max-width:760px){.at-home .top-nav{background:#111318;border-color:#ffffff14}.home-heading{margin-bottom:12px}.home-hero h1{letter-spacing:-1px}.deck-controls button{min-height:44px;min-width:36px}.book-stage{height:302px}.home-search-options b{font-size:12px}.home-search-help{font-size:10px}}
@media(prefers-reduced-transparency:reduce){.at-home .topbar,.home-search,.deck-controls{backdrop-filter:none;-webkit-backdrop-filter:none;background:#20232a}}

.home-mobile-nav{display:none}.deck-reading{background:#16191ee8;border-radius:4px;padding:5px 8px;max-width:34%}
@media(max-width:760px){.deck-reading{display:none}.home-mobile-nav{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:-3px 0 12px}.home-mobile-nav button,.home-mobile-nav a{font-size:12px;color:#b7bfce;min-height:36px;display:inline-flex;align-items:center;text-decoration:none}.home-mobile-nav button:hover,.home-mobile-nav a:hover{color:#fff}.home-hero .home-english p{font-size:17px}.home-shell{padding-top:12px}}
@media(min-width:761px) and (max-width:1060px){.home-mobile-nav{display:flex;gap:28px;margin:0 0 14px}.home-mobile-nav button,.home-mobile-nav a{font-size:13px;color:#bdc5d4;min-height:36px;display:inline-flex;align-items:center;text-decoration:none}}
