:root{color-scheme:light;--ink:#342920;--red:#8e3428;--muted:#806f5a;--paper:#f2e7cf;--line:#c9b89a}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;color:var(--ink);background:#38291f;font-family:Georgia,'Times New Roman',serif;line-height:1.7}body:before{content:"";position:fixed;inset:0;pointer-events:none;background:linear-gradient(110deg,rgba(226,176,108,.08),transparent 40%),repeating-linear-gradient(91deg,transparent 0 90px,rgba(0,0,0,.1) 92px 95px,transparent 98px 180px),repeating-linear-gradient(2deg,#4c3528 0,#60422d 3px,#4d3426 7px,#3c2a20 11px,#5a3c29 20px,#4e3426 23px);z-index:-1}a{color:inherit}a:focus-visible,button:focus-visible{outline:3px solid #a24d35;outline-offset:5px}.site{padding:0 24px}.header{max-width:1130px;margin:auto;height:92px;display:flex;align-items:center;gap:42px;color:#e3d3b5}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;font-size:13px;line-height:1.2;letter-spacing:.04em}.brand-mark{display:grid;place-items:center;width:42px;height:42px;border:1px solid #bd9b72;border-radius:50%;font-size:15px}.header nav{display:flex;align-items:center;gap:30px;margin-left:auto}.header nav a,.head-github{font-size:13px;color:#ddcfb9;text-decoration:none}.header nav a:hover,.head-github:hover{color:white}.head-github{border:1px solid #ae9375;padding:8px 15px}.paper{max-width:1130px;margin:auto;background:#f2e8d2;box-shadow:0 14px 40px #130d09aa,0 1px 2px #160c08;position:relative}.paper:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 8% 5%,#b49c6b30,transparent 35%),radial-gradient(ellipse at 90% 60%,#b49c6b1c,transparent 40%),repeating-linear-gradient(0deg,transparent 0 4px,#715d4010 5px 6px);mix-blend-mode:multiply}.paper-inner{position:relative;padding:28px 7.5% 85px}.paper-top{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:15px;font:10px Arial,sans-serif;letter-spacing:.14em;color:#8d7d68}.hero{display:grid;grid-template-columns:1.08fr .92fr;gap:70px;padding:64px 0 68px;align-items:center}.eyebrow,.ending-label{font:11px Arial,sans-serif;letter-spacing:.2em;color:var(--red)}.eyebrow span{font-size:11px;padding:0 6px}h1{font-weight:normal;font-size:clamp(56px,6vw,91px);line-height:.94;letter-spacing:-.04em;margin:27px 0 22px}h1 i{font-weight:normal;color:var(--red)}.hero-sub{font-size:20px;line-height:1.4;margin:0}.ornament{color:var(--red);font-size:20px;letter-spacing:10px;margin:24px 0}.ornament span{font-size:12px}.hero-text{font-size:15px;line-height:1.85;color:#665547;max-width:480px}.text-link{display:inline-block;margin-top:17px;font-size:13px;letter-spacing:.05em;text-decoration:none;border-bottom:1px solid var(--red);padding-bottom:6px;color:var(--red)}.text-link span{margin-left:14px}.portrait{margin:0}.portrait-image{padding:10px;border:1px solid #bda982;outline:1px solid #d6c7a9;outline-offset:4px;background:#e3d3b3}.portrait img{display:block;width:100%;aspect-ratio:3/4;object-fit:cover}.portrait figcaption{text-align:center;color:#91806b;font:10px Arial,sans-serif;letter-spacing:.14em;margin-top:19px}.portrait figcaption span{color:var(--red)}.milestones{border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:grid;grid-template-columns:repeat(3,1fr);padding:24px 0}.milestones div{display:flex;flex-direction:column;text-align:center;border-right:1px solid var(--line)}.milestones div:last-child{border:0}.milestones b{font-size:20px;font-weight:normal}.milestones span{font:10px Arial,sans-serif;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);margin-top:6px}.resume{max-width:790px;margin:auto;font-size:16px;line-height:1.85}.resume h2{scroll-margin-top:24px;font-weight:normal;font-size:35px;line-height:1.2;text-align:center;margin:90px 0 38px;color:var(--red)}.resume .mark{display:block;font-size:12px;margin-bottom:16px}.resume h3{font-size:23px;font-weight:normal;line-height:1.35;margin:48px 0 4px;color:#483628}.resume h3+p{color:#8a705a;font-size:14px;margin-top:3px}.resume p,.resume li{color:#4f4235}.resume ul{padding:0;list-style:none}.resume li{position:relative;padding-left:21px;margin:16px 0}.resume li:before{content:'✦';position:absolute;left:0;top:.5em;font-size:8px;color:var(--red)}.resume strong{color:#493124}.resume a{color:var(--red);text-decoration-thickness:1px;text-underline-offset:3px}.ending{text-align:center;border-top:1px solid var(--line);margin-top:75px;padding-top:28px}.ending .signature{font-size:31px;font-style:italic;margin:14px 0 0}.ending p:not(.ending-label):not(.signature){font-size:14px;color:var(--muted);margin:0 0 20px}.ending a{color:var(--red);font-size:14px;text-underline-offset:4px}.page-bottom{text-align:center;color:#c4ae92;font:10px Arial,sans-serif;letter-spacing:.16em;padding:25px 0 35px}.page-bottom span{color:#a45c49}.opening{position:fixed;z-index:10;inset:0;display:grid;place-items:center;background:linear-gradient(120deg,#81583255,#25150f60),repeating-linear-gradient(90deg,#493025 0 100px,#3d291f 102px 105px,#563a29 108px 220px);transition:opacity .7s,visibility .7s}.opening[hidden]{display:none}.opening.is-gone{opacity:0;visibility:hidden}.opening-wrap{text-align:center;width:min(90vw,570px)}.opening-overline,.opening-foot{color:#d1b695;font:10px Arial,sans-serif;letter-spacing:.2em}.opening-foot{margin-top:40px}.closed-scroll{appearance:none;border:0;padding:0;background:none;width:min(90%,470px);cursor:pointer;filter:drop-shadow(0 18px 14px #160d0ab0);color:#3c2c20}.closed-paper{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:285px;padding:35px 18px;background:linear-gradient(90deg,#c7b18d,#eee0bf 11%,#f1e5ca 50%,#e3d0aa 90%,#bca17a);border-left:1px solid #a79070;border-right:1px solid #a79070}.roll-top,.roll-bottom{display:block;height:25px;border-radius:50%;background:linear-gradient(180deg,#9e8058,#e4cfa7 27%,#c6aa7e 56%,#957950 100%);border:1px solid #92744d}.roll-top{margin-bottom:-10px;position:relative;z-index:2}.roll-bottom{margin-top:-10px;position:relative;z-index:2}.intro-label,.intro-hint{font:10px Arial,sans-serif;letter-spacing:.17em;color:#7c4031}.intro-title{font:30px/1.15 Georgia,serif;margin-top:12px}.intro-hint{margin-top:22px}.seal{display:grid;place-items:center;width:68px;height:68px;border-radius:44% 52% 46% 48%;margin-top:18px;color:#e6b7a1;font:18px Georgia,serif;background:radial-gradient(circle,#a84332 0 55%,#782a21 57% 65%,#a53b2b 67%);box-shadow:1px 3px 5px #633b2980,inset 0 2px 4px #e9805d80}.seal span{font-size:8px;position:absolute}.cord{position:absolute;top:0;bottom:0;width:2px;background:#8c7350;opacity:.35}.cord-one{left:22%}.cord-two{right:22%}@media(max-width:700px){.site{padding:0 10px}.header{height:74px;gap:10px}.header nav{gap:12px;overflow:auto}.header nav a{font-size:12px;white-space:nowrap}.head-github{display:none}.brand{font-size:10px;gap:6px}.brand-mark{width:32px;height:32px;font-size:11px}.paper-inner{padding:19px 7% 55px}.paper-top{font-size:8px;letter-spacing:.08em}.hero{display:flex;flex-direction:column;gap:35px;padding:42px 0}.hero-copy{width:100%}.hero h1{font-size:clamp(54px,14vw,74px)}.hero-sub{font-size:18px}.portrait{width:min(100%,400px)}.hero-text{font-size:15px}.milestones{grid-template-columns:1fr;gap:14px}.milestones div{border:0}.milestones b{font-size:18px}.resume{font-size:15px}.resume h2{font-size:29px;margin:70px 0 30px}.resume h3{font-size:21px}.opening-overline{font-size:8px}.intro-title{font-size:26px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

h1:focus{outline:none}

/* The open manuscript is the current stage; the opening scene is developed later. */
@font-face{font-family:Literata;src:url('literata-subset.ttf') format('truetype');font-style:normal;font-weight:200 900;font-display:swap}
@font-face{font-family:Cormorant;src:url('cormorant-subset.ttf') format('truetype');font-style:normal;font-weight:300 700;font-display:swap}
body{font-family:Literata,Georgia,serif;line-height:1.55}
.paper{background:#eee3ca}
.paper:before{background:radial-gradient(ellipse at 8% 5%,#b49c6b22,transparent 35%),radial-gradient(ellipse at 90% 60%,#b49c6b1c,transparent 40%);mix-blend-mode:multiply}
.paper:after{content:"";position:absolute;inset:20px 16px;pointer-events:none;background:url('border.svg') left top / 43px 158px repeat-y,url('border.svg') right top / 43px 158px repeat-y;border-top:1px solid #aa8e65;border-bottom:1px solid #aa8e65}
.paper-inner{padding:28px 10% 62px}
.crest{display:block;width:min(100%,680px);height:82px;margin:0 auto -3px;object-fit:contain}
.paper-top{border-top:1px solid #c0aa83;border-bottom:1px solid #c0aa83;padding:8px 0;font-size:9px}
.hero{grid-template-columns:1.12fr .88fr;gap:24px;padding:34px 0 30px}
.hero h1,.resume h2,.resume h3,.signature{font-family:Cormorant,Georgia,serif;font-weight:600}
.hero h1{font-size:clamp(58px,6.2vw,84px);line-height:.88;margin:19px 0}
.hero h1 i{font-style:normal;color:#873a2c}
.hero-sub{font-size:17px;line-height:1.35}
.hero .ornament{margin:12px 0;font-size:15px}
.hero-text{font-size:14px;line-height:1.55;margin:0}
.text-link{margin-top:12px}
.portrait{align-self:center;margin:0 -9px 0 0}
.portrait img{width:100%;aspect-ratio:auto;display:block;object-fit:contain;mix-blend-mode:multiply}
.milestones{padding:15px 0}
.milestones b{font:600 21px/1.1 Cormorant,Georgia,serif}
.milestones span{margin-top:4px}
.resume{max-width:790px;font:16px/1.58 Literata,Georgia,serif}
.resume h2{font-size:33px;line-height:1.1;margin:48px 0 20px}
.resume h2 .mark{margin-bottom:7px}
.resume h3{font-size:24px;line-height:1.15;margin:27px 0 3px}
.resume h3+p{font-size:13px;margin:4px 0 9px}
.resume p{margin:10px 0}
.resume ul{margin:8px 0 15px}
.resume li{margin:7px 0;padding-left:18px}
.resume li:before{top:.65em}
.featured{border-top:1px solid #c5b08a;border-bottom:1px solid #c5b08a;padding:0 0 13px;margin:42px 0 0}
.featured h2{margin-top:26px}
.featured-intro{text-align:center;font-style:italic}
.feature-links{display:flex;justify-content:center;gap:25px;flex-wrap:wrap;font-size:14px}
.ending{margin-top:42px;padding-top:14px}
.ending .ornament{margin:12px 0}
.ending .signature{font-size:30px;font-style:normal}
@media(max-width:700px){
 .paper:after{inset:9px 5px;background-size:20px 64px,20px 64px}
 .paper-inner{padding:15px 9% 40px}
 .crest{height:56px}
 .hero{display:flex;flex-direction:column;gap:5px;padding:28px 0 20px}
 .hero h1{font-size:clamp(51px,14vw,69px)}
 .hero-text{font-size:14px}
 .portrait{width:min(100%,400px);margin:0;align-self:center}
 .milestones{grid-template-columns:repeat(3,1fr);gap:4px;padding:12px 0}
 .milestones b{font-size:16px}.milestones span{font-size:8px;letter-spacing:.04em}
 .resume{font-size:15px;line-height:1.58}
 .resume h2{font-size:29px;margin:38px 0 17px}
 .resume h3{font-size:22px;margin-top:23px}
 .featured h2{margin-top:24px}.featured{margin-top:32px}
 .header nav{gap:12px}.header nav a{font-size:11px}
}

/* Opening scene: the content remains regular HTML and is available without JavaScript. */
.opening{background:#3e291d;overflow:hidden;isolation:isolate;display:block;transition:opacity .45s ease,visibility .45s ease}
.opening[hidden]{display:none}.scene{position:absolute;width:max(100vw,177.7vh);height:max(100vh,56.28vw);left:50%;top:50%;transform:translate(-50%,-50%);overflow:hidden;z-index:-3}.scene-image{width:100%;height:100%;object-fit:fill;display:block}.scene-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(34,20,12,.47),transparent 35%,rgba(28,15,9,.12) 70%,rgba(28,15,9,.4));z-index:-1;pointer-events:none}.scroll-trigger{border:0;background:transparent;padding:0;display:flex;flex-direction:column;align-items:center;cursor:pointer;color:#fff1d9;width:min(72vw,720px);font:600 16px Literata,Georgia,serif;text-shadow:0 2px 8px #291409}.scroll-trigger img{display:block;width:100%;height:auto;filter:drop-shadow(0 16px 12px #291409b5);transition:transform .25s,filter .25s}.scroll-trigger:hover img{transform:translateY(-4px);filter:drop-shadow(0 20px 15px #291409c7)}.scroll-trigger>span{border-bottom:1px solid #f1d1a1;padding:3px 2px 7px}.scroll-trigger>span span{margin-left:8px}.opening-wrap{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;width:auto;padding:4vh 20px 5vh;text-align:center}.opening-overline{margin:0;color:#f0dfc8;font-size:10px;letter-spacing:.18em;text-shadow:0 2px 7px #1f1108}.opening-title{font:600 clamp(42px,5vw,70px)/1 Cormorant,Georgia,serif;color:#fff2db;margin:14px 0 0;text-shadow:0 3px 15px #24140c}.opening-subtitle{font:400 16px Literata,Georgia,serif;color:#ffebd0;margin:8px 0 0;text-shadow:0 2px 8px #24140c}.skip-opening{background:transparent;border:0;color:#f0ddc2;text-decoration:underline;text-underline-offset:4px;font:12px Literata,Georgia,serif;cursor:pointer;margin:18px 0 0;text-shadow:0 2px 7px #24140c}.unfurl{position:absolute;left:50%;top:38%;width:min(82vw,1000px);height:80vh;transform:translateX(-50%);pointer-events:none;opacity:0}.unfurl-page{height:100%;background:#eee3ca;border:1px solid #c0aa83;box-shadow:0 18px 35px #150b08aa;transform-origin:top;transform:scaleY(.01)}.unfurl-roller{position:absolute;left:-1%;right:-1%;top:-8px;height:20px;border-radius:50%;background:linear-gradient(#b99462,#f4e4c6,#9a7851);z-index:1}.unfurl-mark{text-align:center;margin-top:5vh;color:#893f31;font:14px Literata,Georgia,serif;letter-spacing:.15em}.opening.is-opening .opening-wrap{animation:fade-away .45s ease forwards}.opening.is-opening .unfurl{opacity:1;animation:sheet-out 1.7s ease forwards}.opening.is-opening .unfurl-page{animation:unroll 1.05s cubic-bezier(.25,.6,.3,1) forwards}.opening.is-opening .unfurl-roller{animation:roller-out 1.1s ease forwards}@keyframes fade-away{to{opacity:0;visibility:hidden}}@keyframes unroll{to{transform:scaleY(1)}}@keyframes roller-out{to{opacity:0}}@keyframes sheet-out{0%,65%{opacity:1}100%{opacity:0}}@media(max-width:700px){.opening-wrap{justify-content:center}.opening-title{font-size:43px}.opening-subtitle{font-size:14px}.scroll-trigger{width:min(96vw,590px)}.unfurl{width:94vw;top:34%;height:75vh}.opening-overline{font-size:9px}.skip-opening{margin-top:15px}}

/* The scroll rests on the near edge of the table. */
.opening-wrap{justify-content:initial}
.opening-overline{position:absolute;top:14%;margin:0}
.opening-title{position:absolute;top:17%;margin:0}
.opening-subtitle{position:absolute;top:26%;margin:0}
.scroll-trigger{position:absolute;top:61%;left:50%;transform:translateX(-50%);width:min(68vw,650px)}
.skip-opening{position:absolute;bottom:3%;left:50%;transform:translateX(-50%);white-space:nowrap;margin:0}
@media(max-width:700px){.opening-overline{top:16%}.opening-title{top:19%}.opening-subtitle{top:26%}.scroll-trigger{top:56%;width:min(94vw,560px)}.skip-opening{bottom:5%}}
/* Keep the unrolling sheet visually connected to the scroll on the table. */
@keyframes sheet-out{0%{opacity:1;top:62%;transform:translateX(-50%) scaleX(.68)}60%,70%{opacity:1;top:8%;transform:translateX(-50%) scaleX(1)}100%{opacity:0;top:8%;transform:translateX(-50%) scaleX(1)}}

@media(max-height:540px) and (orientation:landscape){.opening-overline{top:5%}.opening-title{top:9%;font-size:38px}.opening-subtitle{top:24%;font-size:13px}.scroll-trigger{top:38%;width:min(55vw,420px)}.skip-opening{bottom:2%}}

/* The room is a persistent backdrop and its chest is an actual link. */
.ambience{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;isolation:isolate;background:#38291f}
.ambience .scene{z-index:0;pointer-events:none}
.chest-link{position:absolute;left:27.5%;top:41.5%;width:19.5%;height:23%;pointer-events:auto;cursor:pointer;clip-path:polygon(0 10%,13% 0,95% 0,100% 90%,91% 100%,8% 100%,0 87%)}
.chest-link span{position:absolute;bottom:3px;left:50%;transform:translateX(-50%);white-space:nowrap;color:#fff0d8;background:#38271dd9;padding:4px 8px;border-radius:3px;font:12px Literata,Georgia,serif;opacity:0;transition:opacity .15s}
.chest-link:hover span,.chest-link:focus-visible span{opacity:1}
.chest-link:focus-visible{outline:3px solid #eac68d;outline-offset:-4px}
.opening{background:transparent;pointer-events:none}
.opening-wrap{pointer-events:none}.opening button{pointer-events:auto}
.site{position:relative;z-index:1;pointer-events:none;margin-left:auto;margin-right:48px;width:min(57vw,850px);padding:0 12px}
.site.is-folded{visibility:hidden}.site.is-folding{animation:fold-away .45s ease forwards}
@keyframes fold-away{to{opacity:0;transform:scaleY(.94)}}
.site .paper,.site .header,.chapter-rail,.mobile-chest{pointer-events:auto}
.header{height:74px;margin:0;max-width:none}.brand{font-size:12px}.page-bottom{color:#eadbc4;text-shadow:0 1px 4px #26180d}
/* Compact, labelled bars show the reader's place in the document. */
.chapter-rail{position:fixed;right:8px;top:50%;transform:translateY(-50%);z-index:5;display:flex;flex-direction:column;align-items:flex-end;gap:5px;padding:12px 7px;border:1px solid #e1c89a44;border-radius:15px;background:#342317b8;box-shadow:0 3px 14px #150b0733}
.chapter-rail a{position:relative;display:flex;align-items:center;justify-content:flex-end;width:34px;height:18px;text-decoration:none;outline-offset:2px}
.chapter-rail a:after{content:"";display:block;width:15px;height:2px;border-radius:2px;background:#dfc9a7aa;transition:width .18s,background .18s}
.chapter-rail a:hover:after,.chapter-rail a:focus-visible:after,.chapter-rail a[aria-current="location"]:after{width:26px;background:#fff0cf}
.chapter-rail a span,.fold-scroll .fold-label{position:absolute;right:44px;top:50%;transform:translateY(-50%);white-space:nowrap;padding:5px 8px;border-radius:4px;color:#fff1d6;background:#342317eb;font:12px Literata,Georgia,serif;opacity:0;visibility:hidden;transition:opacity .12s}
.chapter-rail a:hover span,.chapter-rail a:focus-visible span,.fold-scroll:hover .fold-label,.fold-scroll:focus-visible .fold-label{opacity:1;visibility:visible}
.fold-scroll{position:relative;width:34px;height:31px;margin-top:6px;border:1px solid #d7bc9070;border-radius:50%;background:transparent;color:#fff0cf;font:22px/1 Georgia,serif;cursor:pointer}
.fold-scroll[hidden]{display:none}.fold-scroll:hover{background:#f5e0bd22}
.mobile-chest{display:none}
@media(max-width:900px){
 .site{width:auto;max-width:760px;margin:0 auto;padding:0 30px 0 10px}
 .chapter-rail{right:2px;gap:2px;padding:9px 4px;border-radius:12px}
 .chapter-rail a{width:26px;height:16px}.chapter-rail a:after{width:12px}.chapter-rail a:hover:after,.chapter-rail a:focus-visible:after,.chapter-rail a[aria-current="location"]:after{width:20px}
 .fold-scroll{width:27px;height:27px;font-size:20px}
 .chapter-rail a span,.fold-scroll .fold-label{right:34px}
 .mobile-chest{position:fixed;display:block;left:10px;bottom:10px;width:66px;height:44px;z-index:4;border:1px solid #b99868;border-radius:5px;overflow:hidden;box-shadow:0 2px 8px #1a0e08a8;cursor:pointer;background:#3f2d20}
 .mobile-chest svg{display:block;width:100%;height:100%}
}

/* A live document inside a bounded, independently reusable scroll surface. */
.has-scroll-simulation, .has-scroll-simulation body{height:100%;overflow:hidden}
.has-scroll-simulation .ambience,.has-scroll-simulation .ambience .scene{pointer-events:auto}
.has-scroll-simulation .site{position:fixed;inset:0;z-index:1;width:min(calc(210mm + 160px),calc(100vw - 32px));height:100dvh;margin:auto;padding:0;display:grid;place-items:center;pointer-events:none}
.has-scroll-simulation .site .header,.has-scroll-simulation .site .page-bottom{display:none}
.has-scroll-simulation .scroll-shell{position:relative;width:100%;height:calc(100dvh - 48px);max-height:1100px;pointer-events:auto;box-shadow:0 18px 38px #1c100bb0;overflow:hidden;border-radius:3px;--paper-color:#eee3ca;--paper-aging:.35}
.has-scroll-simulation .paper{width:100%;max-width:none;height:100%;margin:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#af9670 transparent;background:var(--paper-color);background-image:var(--paper-texture,none);background-size:256px 256px;box-shadow:none}
.has-scroll-simulation .paper:before,.has-scroll-simulation .paper:after{display:none}
.has-scroll-simulation .paper-inner{padding-top:82px;padding-bottom:90px}
.has-scroll-simulation .paper-inner:before{content:"";position:absolute;inset:16px;pointer-events:none;background:url('border.svg') left top / 43px 158px repeat-y,url('border.svg') right top / 43px 158px repeat-y;border-top:1px solid #aa8e65;border-bottom:1px solid #aa8e65}
.scroll-curl{position:absolute;left:0;right:0;height:var(--curl-height);overflow:hidden;pointer-events:none;z-index:3;background:var(--paper-color);background-image:var(--paper-texture,none);background-size:256px 256px}
.scroll-curl--top{top:0;border-radius:12px 12px 2px 2px;box-shadow:0 8px 12px #3a28174d,inset 0 5px 4px #fff2d984}
.scroll-curl--bottom{bottom:0;border-radius:2px 2px 12px 12px;box-shadow:0 -8px 12px #3a28174d,inset 0 -6px 5px #8c734b66}
.scroll-curl:after{content:"";position:absolute;inset:0;pointer-events:none}
.scroll-curl--top:after{background:linear-gradient(180deg,#6b4b243b 0%,#fff6dd22 23%,transparent 70%,#62462438 100%)}
.scroll-curl--bottom:after{background:linear-gradient(0deg,#60421e50 0%,#fff6dd2a 26%,transparent 65%,#62462430 100%)}
.scroll-curl__slice{position:absolute;left:0;right:0;overflow:hidden;transform-origin:top center;background:var(--paper-color);background-image:var(--paper-texture,none);background-size:256px 256px}
.scroll-curl__slice:after{content:"";position:absolute;inset:0;background:rgba(84,56,27,var(--slice-shade));pointer-events:none}
.scroll-curl__slice>.scroll-curl__copy{position:absolute;top:0;left:0;max-width:none;will-change:transform;pointer-events:none}
.has-scroll-simulation .site.is-expanding .scroll-shell{animation:scroll-unfold 1s cubic-bezier(.22,.7,.25,1) both}
@keyframes scroll-unfold{from{height:6px;opacity:.7}to{height:calc(100dvh - 48px);opacity:1}}
.has-scroll-simulation .opening.is-opening .opening-wrap{animation:none}
.has-scroll-simulation .opening.is-opening .opening-title,.has-scroll-simulation .opening.is-opening .opening-overline,.has-scroll-simulation .opening.is-opening .opening-subtitle,.has-scroll-simulation .opening.is-opening .skip-opening{opacity:0;transition:opacity .3s}
.has-scroll-simulation .opening.is-opening .scroll-trigger{transform:translate(-50%,-29vh) rotate(3deg) scale(.78);opacity:0;transition:transform .52s ease,opacity .52s ease}
@media(max-width:700px){.has-scroll-simulation .scroll-shell{height:calc(100dvh - 30px)}.has-scroll-simulation .paper-inner:before{inset:9px 5px;background-size:20px 64px,20px 64px}.has-scroll-simulation .paper-inner{padding-top:74px;padding-bottom:80px}.has-scroll-simulation .site.is-expanding .scroll-shell{animation-name:scroll-unfold-mobile}@keyframes scroll-unfold-mobile{from{height:6px;opacity:.7}to{height:calc(100dvh - 30px);opacity:1}}}
@media(prefers-reduced-motion:reduce){.has-scroll-simulation .site.is-expanding .scroll-shell{animation:none}.scroll-curl__slice{visibility:hidden}}
.has-scroll-simulation .paper-inner:after{content:"";position:absolute;inset:0;pointer-events:none;opacity:var(--paper-aging);background:radial-gradient(ellipse 90px 240px at 5% 18%,#99743c25,transparent),radial-gradient(ellipse 100px 290px at 94% 60%,#8d69392b,transparent),repeating-linear-gradient(7deg,transparent 0 16px,#92784c08 17px 18px,transparent 19px 38px)}
.scroll-curl--top:after{background:radial-gradient(ellipse 18px 38px at 0% 43%,#59391865,#d9bd8544 42%,transparent 100%),radial-gradient(ellipse 18px 38px at 100% 43%,#59391865,#d9bd8544 42%,transparent 100%),linear-gradient(180deg,#6b4b243b 0%,#fff6dd22 23%,transparent 70%,#62462438 100%)}
.scroll-curl--bottom:after{background:radial-gradient(ellipse 18px 38px at 0% 55%,#59391865,#d9bd8544 42%,transparent 100%),radial-gradient(ellipse 18px 38px at 100% 55%,#59391865,#d9bd8544 42%,transparent 100%),linear-gradient(0deg,#60421e50 0%,#fff6dd2a 26%,transparent 65%,#62462430 100%)}

.has-scroll-simulation .opening .unfurl{display:none}
/* WebGL scroll stage; the semantic document is retained for the fallback. */
.has-scroll-3d,.has-scroll-3d body{height:100%;overflow:hidden}
.has-scroll-3d .ambience,.has-scroll-3d .ambience .scene{pointer-events:auto}
.has-scroll-3d .site{position:fixed;inset:0;z-index:3;width:min(calc(210mm + 160px),calc(100vw - 32px));height:100dvh;margin:auto;padding:0;pointer-events:none}
.has-scroll-3d .site .paper,.has-scroll-3d .site .header,.has-scroll-3d .site .page-bottom{display:none}
.has-scroll-3d .site.is-folded{visibility:hidden}
.has-scroll-3d .chapter-rail,.has-scroll-3d .mobile-chest{pointer-events:auto}
.scroll-webgl{position:fixed;inset:0;z-index:2;width:100%;height:100%;pointer-events:none}
.has-scroll-3d .opening{z-index:4}.has-scroll-3d .opening .scroll-trigger img{opacity:0}
.has-scroll-3d .opening .scroll-trigger{height:min(27vw,240px);justify-content:flex-end}
.has-scroll-3d .opening .unfurl{display:none}
.has-scroll-3d .opening.webgl-open{visibility:hidden}
.texture-source{position:fixed!important;left:-10000px!important;top:0!important;height:auto!important;max-height:none!important;overflow:visible!important;z-index:-100!important;box-shadow:none!important;background:#eee3ca!important;pointer-events:none!important}
.texture-source:before{display:none}.texture-source .paper-inner:before{content:"";position:absolute;inset:16px;pointer-events:none;background:url('border.svg') left top / 43px 158px repeat-y,url('border.svg') right top / 43px 158px repeat-y;border-top:1px solid #aa8e65;border-bottom:1px solid #aa8e65}
/* Compact title area on the texture, leaving the first line close to the curl. */
.texture-source .crest{height:30px;margin-bottom:0}
.texture-source .paper-inner{padding-top:8px}
.rotation-panel{position:fixed;left:16px;bottom:16px;z-index:8;display:grid;gap:5px;max-width:calc(100vw - 32px);padding:10px 12px;border:1px solid #e1c89a66;border-radius:8px;color:#fff0d4;background:#302016e8;box-shadow:0 4px 14px #1a0e0855;font:12px/1.35 Literata,Georgia,serif;pointer-events:auto}
.rotation-panel[hidden]{display:none}.rotation-values{font:13px/1.4 ui-monospace,monospace;user-select:text}.rotation-buttons{display:flex;gap:5px}.rotation-buttons button{min-width:29px;height:27px;border:1px solid #e1c89a77;border-radius:4px;color:inherit;background:#f5e0bd18;cursor:pointer}.rotation-buttons button:last-child{padding:0 9px;font:11px Literata,Georgia,serif}.rotation-buttons button:hover{background:#f5e0bd44}
@media(max-width:700px){.rotation-panel{left:8px;bottom:8px;font-size:10px}.rotation-hint{max-width:190px}.rotation-values{font-size:11px}.rotation-buttons button{height:25px}}

/* Mobile manuscript: content stays inside the screen while paper bleeds 8px. */
@media(max-width:699px){
.texture-source .paper-inner{padding:10px 30px 38px}
.texture-source .hero{padding:16px 0 14px;gap:8px}
.texture-source .portrait{width:clamp(130px,42vw,200px);margin:0 auto}
.texture-source .hero h1{font-size:clamp(40px,11vw,58px);margin:12px 0}
.texture-source .hero-sub{font-size:16px}
.texture-source .hero-text{font-size:14px;line-height:1.55}
.texture-source .resume h2{margin:36px 0 18px;font-size:27px}
.texture-source .resume h3{margin-top:26px}
.texture-source .paper-inner:before{inset:10px 13px;background-size:20px 100px}
.texture-source p,.texture-source li,.texture-source a{overflow-wrap:anywhere}
.texture-source .hero-copy,.texture-source .resume{min-width:0;max-width:100%}
.rotation-panel{left:5px;bottom:5px;transform:scale(.8);transform-origin:bottom left}
}

.ambience .scene,.opening .scene{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%)}
.closed-pose-panel{z-index:20;max-width:min(720px,calc(100vw - 32px));pointer-events:auto}.closed-pose-panel output{font:12px/1.5 monospace;white-space:normal}

#debug-toggle{all:unset;cursor:pointer;color:inherit;font:inherit}#debug-toggle:focus-visible{outline:2px solid #fff2db}
.loader{position:fixed;inset:0;z-index:100;place-content:center;justify-items:center;gap:18px;color:#fff1d5;background:#2e1c12;font:16px Literata,serif}.loader-shield{display:block;width:108px;height:108px;border-radius:50%;background-image:url('izba-laptop.webp');background-size:1000px auto;background-position:97% 64%;box-shadow:0 0 0 5px #6f4b2d,0 0 22px #d4a766;animation:shield-turn 1.5s linear infinite}@keyframes shield-turn{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.loader-shield{animation:none}}
.reader-fallback .opening,.reader-fallback .chapter-rail button{display:none!important}.reader-fallback .site{position:relative;inset:auto;width:min(100%,850px);height:auto;margin:0 auto;padding:20px;pointer-events:auto}.reader-fallback .site .paper{display:block;height:auto;overflow:visible}.reader-fallback .scroll-webgl{display:none}.reader-fallback body{height:auto;overflow:auto}.reader-fallback .paper{background:#eee3ca;background-image:radial-gradient(ellipse at 5% 15%,#ac835640,transparent 35%),radial-gradient(ellipse at 95% 70%,#ad835138,transparent 40%),repeating-linear-gradient(93deg,#b48d5c08 0 1px,transparent 1px 5px)}
.agent-note[hidden]{display:none!important}

/* The shade belongs to the room, not to the opening overlay. */
.ambience .scene-shade{z-index:1;pointer-events:none}
.opening-title{z-index:3}.opening-title #debug-toggle{pointer-events:auto;position:relative;z-index:5;cursor:pointer;touch-action:manipulation}
.opening-overline{font-size:clamp(13px,1vw,17px)}.opening-subtitle{font-size:clamp(19px,1.4vw,24px)}
@media(max-width:700px){.opening-overline{font-size:12px}.opening-subtitle{font-size:17px}}
.loader-shield{background:transparent url('loading-shield.png') center/contain no-repeat;box-shadow:none;filter:drop-shadow(0 5px 12px #0009)}
