/* A stationery desk: one material system for the mat, archive, badges and papers. */
@font-face{font-family:Huiwen;src:url('assets/fonts/huiwen-ui.woff2?build=0ded360152d4201c') format('woff2');font-weight:400;font-display:swap}
.gazette-page{--desk-ink:#2c342b;--desk-gold:#c9a664;--desk-paper:#fff;--desk-green:#1d7150;--mat-edge:#175d43;--mat-light:#2c825f;--grid-line:#d5e2d470;--folder-face:#dec58e;--folder-tab:#e6ce9e;--paper-rule:#8cdef0;--paper-margin:#ff3939}
/* Screenshot reference: 40px single grid, inset cutting-mat frame, saturated green. */
.portfolio-page.gazette-page main{position:relative;isolation:isolate;background:radial-gradient(ellipse at 48% 34%,var(--mat-light),var(--desk-green) 55%,var(--mat-edge));color:var(--desk-ink)}
.portfolio-page.gazette-page main:before{content:'';position:absolute;z-index:0;top:64px;left:64px;right:64px;bottom:-1px;border:1px solid var(--grid-line);background-image:linear-gradient(var(--grid-line) 1px,transparent 1px),linear-gradient(90deg,var(--grid-line) 1px,transparent 1px);background-size:40px 40px;background-position:-1px -1px;pointer-events:none}
.portfolio-page.gazette-page main:after{content:'';position:absolute;z-index:0;inset:0;background:url('assets/gazette-desk/mat-grain.svg?build=0ded360152d4201c') repeat;mix-blend-mode:soft-light;pointer-events:none}
.reader-toolbar{z-index:7;position:relative;border:0;background:transparent;color:#f1eddb;padding:10px 22px;min-height:50px;font:14px/1.4 Huiwen,serif;letter-spacing:.3px}
.reader-toolbar a{color:inherit;text-decoration:none}.reader-toolbar a:hover{text-decoration:underline;text-underline-offset:4px}.reader-toolbar button{border:1px solid #dddcc27a;background:#edf0d50d;border-radius:2px;color:#fff7e2;font:inherit}.reader-toolbar button:hover{background:#edf0d52b}
.research-workspace{position:relative;z-index:1;isolation:isolate;flex:1;min-height:0;width:100%;padding:8px clamp(115px,11vw,180px) 20px;display:flex}
.research-workspace>.reader{position:relative;width:100%;min-width:0;min-height:0;isolation:isolate;overflow:visible;padding:6px 12px 8px;z-index:1}
.book-pose{position:relative}.reader.toc-open .book-pose{transform:none}
.desk-props{position:absolute;inset:0;pointer-events:none;z-index:0}
.desk-folder{position:absolute;left:17%;right:17%;top:4%;bottom:-220px;border-radius:5px;background:url('assets/gazette-desk/material-grain.svg?build=0ded360152d4201c') repeat,linear-gradient(100deg,#dac18b,var(--folder-face) 55%,#e4cc97);transform:rotate(-3deg);box-shadow:0 2px 1px #654f35,0 4px 4px #18261e44,0 15px 20px #14291b40;border:1px solid #d2b980}
.desk-folder:before{content:'';position:absolute;width:190px;height:44px;left:5%;top:-43px;border-radius:11px 11px 0 0;background:var(--folder-tab);border:1px solid #d2b980;border-bottom:0;display:flex;align-items:center;justify-content:center;color:#897345;font:18px/1 ui-monospace,monospace;letter-spacing:1px}
.desk-folder:after{content:'';position:absolute;left:22px;top:0;bottom:0;width:1px;box-shadow:1px 0 #fff2c455;background:#b99b5d66}
.desk-folder>span{position:absolute;bottom:10px;left:40px;font:11px/1.2 Huiwen,serif;letter-spacing:2px;color:#604f37}
.desk-sheet{position:absolute;left:18.5%;right:18.5%;top:5%;bottom:-240px;background:#fff url('assets/gazette-desk/material-grain.svg?build=0ded360152d4201c') repeat;box-shadow:0 1px 1px #443e2e50,0 3px 6px #202b1e30;transform:rotate(1.8deg)}
.desk-sheet-front{left:19%;right:18%;top:6%;bottom:-250px;transform:rotate(-.8deg);background:url('assets/gazette-desk/material-grain.svg?build=0ded360152d4201c') repeat,repeating-linear-gradient(transparent 0 35px,var(--paper-rule) 35px 36px),linear-gradient(90deg,transparent 127px,var(--paper-margin) 127px 128px,transparent 128px),#fff;border:1px solid #deded9}
.desk-sheet-front:after{display:none}
.desk-binder{position:absolute;top:2.5%;left:24%;width:60px;height:29px;border-radius:2px;background:linear-gradient(100deg,#333633,#585b50 50%,#242a24);box-shadow:1px 3px 2px #18231977;rotate:-3deg;z-index:2}
.desk-binder:before,.desk-binder:after{content:'';position:absolute;bottom:17px;left:10px;width:35px;height:35px;border:3px solid #c0c5bd;border-radius:10px 10px 4px 4px;box-shadow:1px 0 1px #555,inset 1px 0 #fff8}.desk-binder:after{bottom:-20px;height:30px;border-width:2px;opacity:.8}
.desk-paperclip{position:absolute;right:18%;top:9%;width:25px;height:74px;border:3px solid #c6c9bd;border-radius:14px;rotate:16deg;box-shadow:1px 2px 2px #10251b88,inset 1px 0 1px #fff9;z-index:2}.desk-paperclip:after{content:'';position:absolute;inset:8px 3px -9px;border:2px solid #a8aea2;border-radius:11px}
.desk-tape{position:absolute;left:18%;top:30%;width:60px;height:30px;rotate:-25deg;background:#dac8a999;box-shadow:inset 0 0 8px #f5e7c855;clip-path:polygon(0 5%,97% 0,100% 16%,96% 30%,100% 50%,96% 68%,100% 90%,1% 100%,4% 75%,0 50%,4% 25%)}
.desk-sticky{position:absolute;right:3.6%;top:4%;width:128px;height:112px;padding:17px 13px;background:linear-gradient(135deg,#f6e38d,#efda77);box-shadow:1px 2px 2px #20342366,5px 13px 13px -8px #152c1a66;transform:rotate(7deg);font:16px/1.5 Huiwen,serif;color:#5c573f}.desk-sticky span{display:block;margin-top:8px;font-size:10px;letter-spacing:.7px}
.desk-pencil{position:absolute;left:8%;bottom:8%;width:11px;height:135px;background:linear-gradient(90deg,#ba7839 30%,#f4bd58 32% 72%,#d2933c 74%);rotate:-30deg;box-shadow:2px 3px 2px #142d1a66;border-top:16px solid #c7b9b4;border-radius:3px}.desk-pencil:after{content:'';position:absolute;top:100%;width:11px;height:24px;background:linear-gradient(#d0b889 65%,#333 66%);clip-path:polygon(0 0,100% 0,50% 100%)}
/* Spread the badges around the fixed reading surface. Each button owns its full label. */
.research-rail{position:absolute;inset:0;pointer-events:none;z-index:3}
.research-tab{position:absolute;pointer-events:auto;border:0;padding:0;background:none;color:#f6efd9;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:9px;font:15px/1.25 Huiwen,serif;outline-offset:7px;-webkit-tap-highlight-color:transparent;isolation:isolate}
.research-rail-left .research-tab:nth-of-type(1){left:4%;top:10%;rotate:-8deg}
.research-rail-left .research-tab:nth-of-type(2){left:4%;top:44%;rotate:5deg}
.research-rail-left .research-tab:nth-of-type(3){left:5%;top:76%;rotate:-4deg}
.research-rail-right .research-tab:nth-of-type(1){right:4%;top:19%;rotate:7deg}
.research-rail-right .research-tab:nth-of-type(2){right:4%;top:49%;rotate:-5deg}
.research-rail-right .research-tab:nth-of-type(3){right:5%;top:78%;rotate:6deg}
.research-badge{width:100px;height:100px;display:grid;place-items:center;position:relative;transition:translate .22s ease,rotate .22s ease}
.research-pin{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none}
.tab-label{display:block;padding:4px 9px;background:#24362c;box-shadow:1px 2px 2px #14261988;white-space:nowrap;letter-spacing:1px;border:1px solid #b5bba42b;border-radius:1px}
.research-tab:hover .research-badge,.research-tab:focus-visible .research-badge{translate:0 -3px;rotate:-3deg}
.research-tab:focus-visible{outline:2px solid #f3db90;border-radius:6px}
/* Preview is an overlay, never a column that resizes the book. */
.research-preview{position:absolute;left:var(--preview-x,20px);top:var(--preview-y,70px);width:285px;max-width:calc(100% - 24px);max-height:min(430px,calc(100% - 30px));overflow:auto;overscroll-behavior:contain;z-index:6;background:#f8f3e7 url('assets/gazette-research/paper.webp?build=0ded360152d4201c') center/cover;padding:13px 12px 9px;border:1px solid #ddd3b7;box-shadow:0 2px 2px #22372344,4px 13px 18px #13271b66;transform-origin:center;animation:paper-peek .23s ease-out both;scrollbar-width:thin}
.research-preview:before{content:'';position:absolute;left:35%;top:0;width:65px;height:11px;background:#d2bb8c80;pointer-events:none}
.research-preview[hidden],.research-detail[hidden]{display:none}
.research-open{border:0;padding:0;background:none;width:100%;display:block;color:inherit;cursor:pointer;text-align:left}
.preview-caption{display:block;border-top:1px dashed #b7ae94;margin-top:7px;padding-top:8px;text-align:right;font:13px/1.4 Huiwen,serif;color:#695b42}
.research-artboard{position:relative;width:100%;aspect-ratio:var(--art-w)/var(--art-h);user-select:none}
.research-artboard img{position:absolute;display:block;max-width:none;pointer-events:none;-webkit-user-drag:none}
.research-artboard.is-detail{background:#fffdf6 url('assets/gazette-research/paper.webp?build=0ded360152d4201c') center/100% 100% no-repeat}
/* Large research sheets lie above the book. The surrounding desk closes the sheet. */
.research-detail{position:absolute;inset:-50px 0 0;z-index:20;display:grid;place-items:center;padding:40px clamp(24px,8vw,125px);background:#14251945;backdrop-filter:blur(1px);-webkit-backdrop-filter:blur(1px)}
.research-paper{position:relative;width:min(100%,1050px);height:100%;max-height:calc(100svh - 80px);min-height:0;display:flex;flex-direction:column;background:#f8f3e7 url('assets/gazette-research/paper.webp?build=0ded360152d4201c') center/cover;border:1px solid #e9e0c9;box-shadow:1px 3px 0 #d4c9ac,3px 5px 0 #eee5d0,4px 7px 1px #b6a889,0 18px 40px #12221799;isolation:isolate}
.research-paper:before{content:'';position:absolute;top:-10px;left:30px;width:85px;height:25px;background:#cab48277;rotate:-4deg;z-index:2;pointer-events:none}
.research-detail-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding:14px 20px 10px;border-bottom:1px dashed #b6a98e;font:14px/1.4 Huiwen,serif}
.research-detail-toolbar h1{font:inherit;margin:0;color:#504837}
.research-detail-controls{display:flex;gap:6px;align-items:center}.research-detail-controls button{font:13px/1.4 Huiwen,serif;border:1px solid #bfb295;border-radius:2px;background:#f9f4e6;color:#514a37;min-height:32px;padding:5px 10px;cursor:pointer}.research-detail-controls button:hover{background:#e9dfc7}.research-detail-controls button:disabled{opacity:.35;cursor:default}
.research-detail-scroll{overflow:auto;min-width:0;min-height:0;flex:1;overscroll-behavior:contain;scrollbar-gutter:stable;padding:12px 20px 24px;outline-offset:-3px;scrollbar-color:#b0a080 #eee6d4}
#research-detail-content{width:calc(100% * var(--research-zoom,1));min-width:100%}.research-detail-scroll.is-zoomed{cursor:grab}.research-detail-scroll.is-dragging{cursor:grabbing}
.research-workspace[data-detail]>.research-rail{visibility:hidden}
@keyframes paper-peek{from{opacity:0;transform:translateY(8px) rotate(-2deg)}to{opacity:1;transform:none}}
@media(min-width:1700px){.research-workspace{padding-left:15%;padding-right:15%}.research-badge{width:112px;height:112px}}
@media(max-height:720px) and (min-width:761px){.research-workspace{padding-top:8px;padding-bottom:20px}.research-badge{width:82px;height:82px}.research-tab{gap:5px;font-size:13px}.desk-sticky{width:112px;height:96px;font-size:15px}}
@media(max-width:1000px) and (min-width:761px){.research-workspace{padding-left:95px;padding-right:95px}.research-badge{width:76px;height:76px}.research-tab{font-size:12px}.desk-sticky{right:2%;width:105px;font-size:15px}}
@media(max-width:760px){
 .portfolio-page.gazette-page main:before{top:54px;left:16px;right:16px;background-size:40px 40px}
 .desk-folder:before{width:130px;font-size:13px}
 .reader-toolbar{padding:9px 12px;font-size:12px}.reader-toolbar>div{gap:8px}.reader-toolbar>div>a{display:none}
 .research-workspace{padding:24px 16px 200px;min-height:0}.research-workspace>.reader{padding:8px 5px 45px;overflow:visible}
 .desk-folder{left:5%;right:5%;top:5%;bottom:-130px;rotate:1deg}.desk-folder>span{display:none}.desk-sheet,.desk-sheet-front{left:7%;right:7%;top:6%;bottom:-145px}.desk-sheet-front{rotate:-1deg}.desk-sticky,.desk-pencil,.desk-tape{display:none}.desk-binder{left:10%;top:3%;scale:.7}.desk-paperclip{right:5%;top:13%;scale:.7}
 .research-tab{font-size:11px;gap:6px}.tab-label{padding:3px 5px;letter-spacing:0}.research-badge{width:62px;height:62px}
 .research-rail-left .research-tab:nth-of-type(1){left:7%;top:auto;bottom:96px}.research-rail-left .research-tab:nth-of-type(2){left:39%;top:auto;bottom:96px}.research-rail-left .research-tab:nth-of-type(3){left:auto;right:6%;top:auto;bottom:96px}
 .research-rail-right .research-tab:nth-of-type(1){left:6%;right:auto;top:auto;bottom:9px}.research-rail-right .research-tab:nth-of-type(2){left:39%;right:auto;top:auto;bottom:9px}.research-rail-right .research-tab:nth-of-type(3){right:6%;top:auto;bottom:9px}
 .research-preview{width:260px;max-height:calc(100% - 25px)}
 .research-detail{padding:30px 14px;inset:-50px 0 0}.research-paper{max-height:calc(100svh - 60px)}.research-detail-toolbar{padding:12px 10px;gap:8px}.research-detail-controls{gap:4px;flex-wrap:wrap}.research-detail-controls button{padding:4px 7px;font-size:12px}.research-detail-scroll{padding:8px 8px 16px}
}
@media(prefers-reduced-motion:reduce){.research-preview{animation:none!important}.research-tab,.research-badge{transition:none!important}.reader[data-entering=true] .book-pose{animation:none!important}}

/* The author's fieldwork cutouts lie on the file, below the publication and its hit area. */
.desk-scraps{position:absolute;inset:0;pointer-events:none;transition:opacity .3s ease}
.desk-scrap{position:absolute;display:block;object-fit:contain;pointer-events:none;user-select:none;filter:none}
.scrap-festival{left:calc(50% - var(--book-half)/2 - 190px);top:20%;width:clamp(150px,15.5vw,220px);rotate:-10deg}
.scrap-fieldwork{left:calc(50% + var(--book-half)/2 - 35px);top:10%;width:clamp(170px,17vw,245px);rotate:7deg}
.scrap-shops{left:calc(50% + var(--book-half)/2 - 25px);top:52%;width:clamp(155px,16vw,230px);rotate:-5deg}
.scrap-stamp{left:calc(50% - var(--book-half)/2 - 145px);top:55%;width:clamp(105px,10vw,140px);rotate:8deg}
.research-workspace:has(.book-shell[data-cover=false][data-back-cover=false]) .desk-scraps{opacity:0}
@media(max-width:1000px) and (min-width:761px){.research-rail-left .research-tab:nth-of-type(1),.research-rail-left .research-tab:nth-of-type(3){left:1%}.research-rail-right .research-tab:nth-of-type(1),.research-rail-right .research-tab:nth-of-type(3){right:1%}.scrap-festival{left:calc(50% - var(--book-half)/2 - 145px)}.scrap-fieldwork,.scrap-shops{left:calc(50% + var(--book-half)/2 - 25px);width:180px}}
@media(max-width:760px){.desk-scraps{display:none}}
@media(prefers-reduced-motion:reduce){.desk-scraps{transition:none}}

/* Stagger the pins across the available green margins, clear of every paper layer. */
@media(min-width:761px){
 .research-rail-left .research-tab:nth-of-type(1){left:max(16px,calc(var(--safe-edge-left,140px) - 130px))}
 .research-rail-left .research-tab:nth-of-type(2){left:max(16px,calc(var(--safe-edge-left,140px) - 190px))}
 .research-rail-left .research-tab:nth-of-type(3){left:max(16px,calc(var(--safe-edge-left,140px) - 148px))}
 .research-rail-right .research-tab:nth-of-type(1){right:max(16px,calc(var(--safe-edge-right,140px) - 180px))}
 .research-rail-right .research-tab:nth-of-type(2){right:max(16px,calc(var(--safe-edge-right,140px) - 130px))}
 .research-rail-right .research-tab:nth-of-type(3){right:max(16px,calc(var(--safe-edge-right,140px) - 160px))}
}
@media(max-width:760px){
 .desk-props{overflow:hidden;bottom:206px}
 .desk-folder{bottom:-90px}.desk-sheet,.desk-sheet-front{bottom:-100px}
 .research-tab{gap:0}
 .research-rail-left .research-tab:nth-of-type(1),.research-rail-left .research-tab:nth-of-type(2),.research-rail-left .research-tab:nth-of-type(3){bottom:110px}
 .research-rail-right .research-tab:nth-of-type(1),.research-rail-right .research-tab:nth-of-type(2),.research-rail-right .research-tab:nth-of-type(3){bottom:30px}
}

/* Tilt the closed cover only. Reading spreads remain flat and keep their page geometry. */
.research-workspace .book-pose{rotate:0deg;translate:0 0;scale:1;transition:rotate .4s ease,translate .4s ease,scale .4s ease}
.research-workspace[data-book-open=false] .book-pose{rotate:2.2deg;translate:0 -12px;scale:1.02}
.research-tab{gap:0}
.tab-label{position:relative;z-index:1;margin-top:-8px}
.research-tab[data-pin=pencil] .tab-label{margin-top:-23px}
.research-tab[data-pin=hi] .tab-label{margin-top:-12px}
.research-tab[data-pin=ghost] .tab-label{margin-top:-3px}
@media(max-width:1000px){.tab-label{margin-top:-5px}.research-tab[data-pin=pencil] .tab-label{margin-top:-16px}.research-tab[data-pin=hi] .tab-label{margin-top:-7px}}
@media(max-width:760px){
 .research-workspace[data-book-open=false] .book-pose{rotate:1.5deg;translate:0 -4px;scale:1}
 .tab-label{margin-top:-3px}.research-tab[data-pin=pencil] .tab-label{margin-top:-12px}.research-tab[data-pin=hi] .tab-label{margin-top:-5px}.research-tab[data-pin=ghost] .tab-label{margin-top:-2px}
}
@media(prefers-reduced-motion:reduce){.research-workspace .book-pose{transition:none!important}}

/* Native SVG cursors: no following DOM layer that could cover a click target. */
@media(hover:hover) and (pointer:fine){
 .gazette-page{--desk-cursor:url('assets/gazette-desk/cursors/arrow.svg?build=0ded360152d4201c') 5 3,auto;--desk-pointer:url('assets/gazette-desk/cursors/hand.svg?build=0ded360152d4201c') 16 5,pointer}
 .gazette-page,.gazette-page *{cursor:var(--desk-cursor)}
 .gazette-page a,.gazette-page a *,.gazette-page button:not(:disabled),.gazette-page button:not(:disabled) *,.gazette-page .book,.gazette-page .book *{cursor:var(--desk-pointer)}
 .gazette-page button:disabled{cursor:not-allowed}
 .gazette-page .contents-range{cursor:ew-resize}
 .gazette-page .reader[data-flip-state=user_fold] .book *,.gazette-page .research-detail-scroll.is-dragging{cursor:grabbing}
 .gazette-page .research-detail-scroll.is-zoomed:not(.is-dragging){cursor:grab}
}
