/* ====== v6: living ink. No metal; everything is pigment absorbed into paper. ====== */
:root{
  --inkc:#292724; --forest:#152c24; --plum:#5b4847; --vellum:#d9c5a1; --oxb:#7a1f24; --olive:#55603f;
  --brass:#8a6d52; --brass-deep:#5b4847; --brass-2:#ecdcb6;
}
@property --ink-radius{syntax:'<percentage>';inherits:false;initial-value:150%}

/* ---- type: ink, not foil ---- */
.pg h1,.pg h2,.motto{background:none!important;-webkit-background-clip:border-box!important;background-clip:border-box!important;color:#1d211c!important;-webkit-text-fill-color:#1d211c;animation:none!important}
.title small{-webkit-text-fill-color:var(--plum)}
.motto i{-webkit-text-fill-color:var(--oxb);color:var(--oxb)}
.lede.drop::first-letter,.ans p::first-letter{background:none!important;-webkit-background-clip:border-box!important;background-clip:border-box!important;color:var(--oxb)!important;-webkit-text-fill-color:var(--oxb)!important;filter:none!important;text-shadow:0 0 .14em rgba(122,31,36,.4),.02em .03em 0 rgba(42,20,10,.25)}
.chap,.eyebrow,.latin,.rn,.qn,.rh,.pnum,.toc b,.hours .small{color:var(--plum)!important}
.latin{color:var(--oxb)!important}
a.rh:hover{color:var(--oxb)!important;text-shadow:none}
.pg h2::after{background:linear-gradient(90deg,var(--plum),rgba(91,72,71,0));height:1.5px;border-radius:2px}
.pg:not(.cover)::before{border-color:rgba(70,52,44,.38);border-radius:.3em .7em .35em .6em/.6em .35em .7em .3em;box-shadow:none}
.vine{color:var(--olive)!important;filter:none!important;opacity:.62}
.tw{opacity:0;filter:none;background:radial-gradient(circle,#fff,#e9d49a 55%,transparent 72%)}
.mark{color:#3a2c22;opacity:.06}

/* ---- buttons: hand-inked outlines ---- */
.btn{border-radius:255px 14px 225px 14px/14px 225px 14px 255px;border-width:1.5px;padding-left:1.6em;padding-right:1.6em;transition:background .35s,color .35s,transform .25s}
.btn-dark{background:#1d211c;color:var(--brass-2);border-color:#1d211c}
.btn-dark:hover{background:var(--oxb);border-color:var(--oxb)}
.btn-line{border-color:#1d211c;color:#1d211c}
.btn-line:hover{background:rgba(29,33,28,.1)}
.seal b{color:#f4e6c4}

/* ---- the cabinet: ink grows under the chosen drawer ---- */
.dr{border-bottom:0}
.dr::before{content:"";position:absolute;left:2.8em;right:.8em;bottom:0;height:2px;border-radius:2px;background:linear-gradient(90deg,var(--plum),var(--oxb) 60%,rgba(122,31,36,.0));transform-origin:left;scale:0 1;transition:scale .6s cubic-bezier(.2,.8,.2,1)}
.dr:hover::before,.dr.on::before,.dr:focus-visible::before{scale:1 1}
.dr:hover,.dr:focus-visible{background:linear-gradient(90deg,rgba(60,45,35,.1),transparent)}
.dr.on{background:linear-gradient(90deg,rgba(60,45,35,.16),transparent);box-shadow:inset .2em 0 0 var(--oxb)}
.dr.on::after{color:var(--oxb);filter:none}
.dr .dn b{color:#1d211c}
.q.on{background:linear-gradient(90deg,rgba(60,45,35,.16),transparent)}
.oracle-foot::before{background:none;color:var(--oxb)}

/* ---- photographs are inked into the paper ---- */
.print.plate,.print.plate.wide,.print.plate.small,.print.plate.solo{background:none;box-shadow:none;border-radius:0;padding:0 0 2.7em;border:0}
.print.plate::before{display:none}
.print.plate img{border-radius:0;box-shadow:none;background:none;
  --cx:50%;--cy:55%;
  -webkit-mask-image:radial-gradient(circle at var(--cx) var(--cy),#000 calc(var(--ink-radius) - 32%),transparent var(--ink-radius)),var(--m,url(../img/gen/inkmask1.png));
  mask-image:radial-gradient(circle at var(--cx) var(--cy),#000 calc(var(--ink-radius) - 32%),transparent var(--ink-radius)),var(--m,url(../img/gen/inkmask1.png));
  -webkit-mask-size:100% 100%,100% 100%;mask-size:100% 100%,100% 100%;
  -webkit-mask-composite:source-in;mask-composite:intersect;
  filter:grayscale(0) sepia(.14) contrast(1.04) brightness(1) drop-shadow(0 .12em .5em rgba(50,30,10,.42))}
.print:nth-child(1) img{--m:url(../img/gen/inkmask1.png);--cx:42%;--cy:60%}
.print:nth-child(2) img{--m:url(../img/gen/inkmask2.png);--cx:58%;--cy:45%}
.print.solo img{--m:url(../img/gen/inkmask3.png)}
.print.small img{--m:url(../img/gen/inkmask4.png)}
.print.wide img{--m:url(../img/gen/inkmask2.png)}
.print.plate .tile-cap{left:0;right:0;bottom:.1em;gap:.1em;color:#2a2622}
.print.plate .tile-cap .pl{color:var(--plum)!important;letter-spacing:.3em;font-size:.72em}
.print.plate .tile-cap b,.print.plate:not(.tile) .tile-cap b{font:400 1.7em/1 var(--hand)!important;letter-spacing:0!important;text-transform:none!important;color:#241f1b}
.tile:hover,.tile:focus-visible{box-shadow:none;scale:1.03}
.tile.lift{box-shadow:none}

/* ink blooms outward from a drop, and the colour comes back as it dries */
@keyframes inkbloom{from{--ink-radius:0%}to{--ink-radius:150%}}
@keyframes inkdry{from{filter:grayscale(1) sepia(.9) contrast(1.3) brightness(1.12) drop-shadow(0 .12em .5em rgba(50,30,10,.42))}}
html.js .pg.show .print img{animation:inkbloom 1.9s cubic-bezier(.35,.55,.3,1) backwards,inkdry 2.8s ease-out backwards;animation-delay:calc(.45s + var(--k,0) * .3s)}
html.js .pg.show .set.on .print img{animation:inkbloom 1.9s cubic-bezier(.35,.55,.3,1) backwards,inkdry 2.8s ease-out backwards;animation-delay:calc(.15s + var(--k,0) * .3s)}
.set:not(.on) .print img{animation:none!important}
html.js .pg.show .print{animation:none}
html.js .pg.show .set.on .print{animation:none}

/* the facing page thins out and re-forms */
.set{filter:none;scale:1;opacity:0;visibility:hidden;transition:opacity .7s ease,visibility 0s .7s}
.set.on{opacity:1;visibility:visible;transition-delay:0s}
.set:not(.on){filter:blur(2.5px)}
.setcap h3{color:#1d211c}
html.js .pg.show .set.on .setcap h3{animation:write 1.2s cubic-bezier(.4,.1,.3,1) backwards .4s}
html.js .pg.show .set.on .setcap p{animation:inkin 1s ease backwards .7s}
.setnote{color:var(--oxb)}

/* handwriting: headings write themselves */
@keyframes write{from{clip-path:inset(-20% 100% -20% 0)}to{clip-path:inset(-20% -2% -20% 0)}}
html.js .pg.show h2,html.js .pg.show .title,html.js .pg.show .motto,html.js .pg.show .ans h3{animation:write 1.5s cubic-bezier(.45,.1,.3,1) backwards;animation-delay:.5s}
html.js .pg.show .ans.on h3{animation-delay:.1s;animation-duration:1s}

/* leaving ink pulls back into the paper as the leaf turns */
html.js .pg .pg-in{transition:opacity .75s ease,filter .75s ease}
html.js .pg:not(.show):not(.cover) .pg-in{opacity:0;filter:blur(2px)}

/* ---- page-turn: a quill flourish that draws itself ---- */
.turn{width:6rem;height:3rem;border-radius:0;background:none!important;box-shadow:none!important;display:flex;align-items:center;justify-content:center;gap:.35rem;color:#2a2622;font-size:1.35rem;padding:0;bottom:calc(50% - var(--ph) / 2 + .6rem);overflow:visible}
.turn span{font:400 1.45rem/1 var(--hand);color:#2a2622;transition:color .3s}
.turn svg{width:2.6rem;height:1.3rem;fill:none;stroke:#2a2622;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;overflow:visible;filter:drop-shadow(0 0 .5px rgba(42,38,34,.6))}
.turn svg path{stroke-dasharray:1;stroke-dashoffset:0}
.turn::before{content:""!important;position:absolute;left:50%;top:50%;width:4.4rem;height:2.4rem;translate:-50% -50%;border-radius:50%;background:radial-gradient(ellipse,rgba(42,38,34,.22),transparent 70%);opacity:0;transition:opacity .35s;filter:blur(2px)}
.turn::after{content:none!important}
.turn:hover::before{opacity:1}
.turn:hover svg path{animation:redraw .8s cubic-bezier(.4,.1,.3,1)}
.turn:hover span,.turn:hover svg{color:var(--oxb);stroke:var(--oxb)}
@keyframes redraw{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
.turn:hover{scale:1.05;box-shadow:none}
.turn.next{left:calc(50% + var(--pw) - 6.8rem)}
.turn.prev{left:calc(50% - var(--pw) + .8rem)}
.single .turn{width:5.4rem;height:2.8rem;bottom:calc(50% - var(--ph) / 2 + .5rem)}
.single .turn.prev{left:calc(50% - var(--pw) / 2 + .5rem)}
.single .turn.next{left:calc(50% + var(--pw) / 2 - 5.9rem)}
@media (prefers-reduced-motion:reduce){html.js .pg.show .print img,html.js .pg.show h2{animation:none!important}}


/* ================= v7: the heirloom ================= */
:root{--flip:1.25s}
@keyframes inkin{from{opacity:0;transform:translateY(.5em)}}

/* ---- 1. the cover: one tooled leather volume ---- */
.face:has(.cover){overflow:visible}
.pg.cover{
  background:url(../img/gen/leather.jpg) center/cover,#1c3a2e;border-radius:.5em 1.1em 1.1em .5em;
  box-shadow:1px 1px 0 #e6d9b4,2px 2px 0 #b3a276,3px 3px 0 #e6d9b4,4px 4px 0 #b3a276,5px 5px 0 #d9ca9f,6px 6px 0 #857550,
    0 1.4em 2.6em rgba(0,0,0,.55),0 .3em .8em rgba(0,0,0,.5),
    inset 0 0 0 1px rgba(0,0,0,.55),inset 0 0 4.5em rgba(0,0,0,.55),inset .25em .3em .6em rgba(255,255,255,.07)}
.pg.cover::before{display:none!important}
.cover-btn{overflow:hidden;border-radius:inherit}
.cover-btn::before{width:9%;background:
  linear-gradient(90deg,transparent 0 20%,rgba(0,0,0,.6) 20% 25%,rgba(255,255,255,.14) 25% 30%,transparent 30% 56%,rgba(0,0,0,.6) 56% 61%,rgba(255,255,255,.14) 61% 66%,transparent 66%),
  linear-gradient(90deg,rgba(0,0,0,.55),rgba(0,0,0,.05) 70%,transparent)}
.cover-btn::after{background:linear-gradient(115deg,transparent 42%,rgba(255,255,255,.07) 50%,transparent 58%)}
.cover-tool{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.cover-tool .emb{fill:rgba(5,16,11,.42);stroke:rgba(5,16,11,.7);stroke-width:1.3;
  filter:drop-shadow(-1px -1px 0 rgba(190,230,200,.32)) drop-shadow(1px 1px 1px rgba(0,0,0,.85))}
.cover-tool .emb .st{fill:none;stroke-width:2.2}
.cover-tool .emb .bud{fill:#6d242c;stroke:rgba(20,4,6,.7)}
.cover-logo{position:relative;z-index:1;width:74%;height:auto;translate:0 -4%;filter:drop-shadow(0 .05em .05em rgba(0,0,0,.8)) drop-shadow(0 0 .35em rgba(0,0,0,.5))}
.cover-hint{bottom:1.5em!important;font-size:2.1em!important;color:#c9b88f;text-shadow:0 1px 0 rgba(0,0,0,.7);z-index:2;transition:opacity .4s}
.clasp{position:absolute;left:50%;bottom:4.9em;width:3.3em;height:3.3em;translate:-50% 0;z-index:2;pointer-events:none}
.clasp i{position:absolute;inset:0;border-radius:52% 48% 55% 45%/48% 55% 45% 52%;background:radial-gradient(circle at 35% 30%,#a8323a,#6d1f26 58%,#430f14);box-shadow:inset 0 0 0 .18em rgba(0,0,0,.18),inset 0 .15em .3em rgba(255,255,255,.22),0 .2em .5em rgba(0,0,0,.65)}
.clasp .h1{clip-path:polygon(0 0,52% 0,46% 30%,56% 52%,44% 74%,52% 100%,0 100%)}
.clasp .h2{clip-path:polygon(52% 0,100% 0,100% 100%,52% 100%,44% 74%,56% 52%,46% 30%)}
.clasp::after{content:"";position:absolute;inset:20%;background:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2040%2040%22%20fill%3D%22none%22%20stroke%3D%22%232a0a0d%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M20%2020c-5-3-5-9%200-11%205%202%205%208%200%2011zM20%2020c3-5%209-5%2011%200-2%205-8%205-11%200zM20%2020c5%203%205%209%200%2011-5-2-5-8%200-11zM20%2020c-3%205-9%205-11%200%202-5%208-5%2011%200z%22/%3E%3Ccircle%20cx%3D%2220%22%20cy%3D%2220%22%20r%3D%222%22/%3E%3C/svg%3E") center/contain no-repeat;opacity:.55;z-index:2;transition:opacity .2s}

/* the opening ritual: seal cracks, a drop of ink falls, it spreads, the book opens */
@keyframes crack1{40%{translate:-.1em .05em;rotate:-3deg}to{translate:-1em 1.4em;rotate:-24deg;opacity:0}}
@keyframes crack2{40%{translate:.1em .05em;rotate:3deg}to{translate:1em 1.4em;rotate:24deg;opacity:0}}
.stage.ritual .clasp .h1{animation:crack1 .7s ease-in forwards}
.stage.ritual .clasp .h2{animation:crack2 .7s ease-in forwards}
.stage.ritual .clasp::after,.stage.ritual .cover-hint{opacity:0}
.inkdrop{position:absolute;left:50%;top:50%;width:0;height:0;z-index:30;pointer-events:none}
.inkdrop .fall{position:absolute;left:-.55rem;top:-50vh;width:1.1rem;height:1.5rem;border-radius:50% 50% 50% 50%/65% 65% 35% 35%;background:#0f1411;opacity:0}
.inkdrop .ripple{position:absolute;left:0;top:0;width:12px;height:12px;translate:-50% -50%;border-radius:50%;background:radial-gradient(circle,rgba(15,20,17,0) 52%,rgba(15,20,17,.55) 60%,rgba(15,20,17,.0) 70%);opacity:0;mix-blend-mode:multiply}
@keyframes fall{0%{top:-50vh;opacity:1}100%{top:0;opacity:1;scale:.7 .5}}
@keyframes ripple{0%{opacity:1;scale:1}70%{opacity:.5}100%{opacity:0;scale:90}}
.stage.dropping .inkdrop .fall{animation:fall .6s cubic-bezier(.55,0,.9,.7) forwards}
.stage.dropping .inkdrop .ripple{animation:ripple 1.2s .58s cubic-bezier(.2,.6,.3,1) forwards}

/* open book sits on tooled leather boards with a stacked page block */
.board{background:url(../img/gen/leather.jpg) center/cover,#1c3a2e;box-shadow:0 0 0 1px rgba(0,0,0,.6),inset 0 0 0 2px rgba(255,255,255,.05),0 1.6em 3em rgba(0,0,0,.55)}
.base.l{box-shadow:-.2em .15em 0 #e6d9b4,-.35em .3em 0 #b3a276,-.5em .45em 0 #e0d2ab,-.65em .6em 0 #a99870}
.base.r{box-shadow:.2em .15em 0 #e6d9b4,.35em .3em 0 #b3a276,.5em .45em 0 #e0d2ab,.65em .6em 0 #a99870}
.book{animation:float 11s ease-in-out infinite}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}

/* ---- 3. paper: four stocks, lit from the spine ---- */
.pp1{--pimg:url(../img/gen/paper.jpg);--ppos:0 0}
.pp2{--pimg:url(../img/gen/paper2.jpg);--ppos:180px 60px}
.pp3{--pimg:url(../img/gen/paper3.jpg);--ppos:40px 240px}
.pp4{--pimg:url(../img/gen/paper4.jpg);--ppos:310px 120px}
.pg.l:not(.cover){border-radius:.5em 0 0 .5em;box-shadow:inset .25em 0 .6em rgba(120,85,40,.28),inset 0 0 1.4em rgba(120,85,40,.18)}
.pg.r:not(.cover){border-radius:0 .5em .5em 0;box-shadow:inset -.25em 0 .6em rgba(120,85,40,.28),inset 0 0 1.4em rgba(120,85,40,.18)}
.pg.l::after{background:linear-gradient(to left,rgba(60,35,10,.34),rgba(60,35,10,.08) 55%,transparent)}
.pg.r::after{background:linear-gradient(to right,rgba(60,35,10,.34),rgba(60,35,10,.08) 55%,transparent)}
.face.back{filter:brightness(1.02)}

/* ---- 6. the page turn has weight ---- */
.leaf{transition-timing-function:cubic-bezier(.66,.02,.18,1)}
.face::before{content:"";position:absolute;inset:0;z-index:40;pointer-events:none;opacity:0;background:linear-gradient(to right,rgba(31,24,19,.3),rgba(31,24,19,.08) 55%,transparent)}
.face.back::before{background:linear-gradient(to left,rgba(31,24,19,.3),rgba(31,24,19,.08) 55%,transparent)}
@keyframes shade{0%,100%{opacity:0}40%{opacity:.8}75%{opacity:.3}}
.leaf.moving .face::before{animation:shade var(--flip) ease-in-out var(--dl,0ms) both}
@keyframes gutter{0%,100%{opacity:0}40%{opacity:1}}

/* ---- 2. one voice: ink on paper, oxblood for emphasis, gold only on the logo ---- */
.pg h2::after{background:linear-gradient(90deg,var(--plum),rgba(91,72,71,0))}
.pg:not(.cover)::before{border-color:rgba(70,52,44,.3)}
.seal{box-shadow:0 .12em .3em rgba(0,0,0,.4),inset 0 0 0 .18em rgba(255,190,150,.12),inset 0 -.2em .4em rgba(0,0,0,.4)}
.seal:hover{box-shadow:0 .2em .5em rgba(0,0,0,.5),inset 0 0 0 .18em rgba(255,190,150,.14)}
.seal b{text-shadow:0 1px 0 rgba(40,6,8,.7)}
.aura{opacity:.5}
.open-now{flex-wrap:wrap;row-gap:.25em}
.open-now em{flex:1 0 100%;font:italic 400 1.18em/1.25 var(--serif);letter-spacing:0;text-transform:none;color:var(--plum);margin-left:1.25em}
.open-now.is-open .dot{background:var(--olive);box-shadow:0 0 0 .3em rgba(85,96,63,.22)}

/* ---- 4. organic ink: edges that spread, no blur over the work ---- */
@property --ms{syntax:'<percentage>';inherits:false;initial-value:100%}
@keyframes inkgrow{from{--ms:52%}to{--ms:100%}}
.print.plate img{-webkit-mask-size:100% 100%,var(--ms) var(--ms);mask-size:100% 100%,var(--ms) var(--ms);-webkit-mask-position:center,var(--cx) var(--cy);mask-position:center,var(--cx) var(--cy);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
html.js .pg.show .print img,html.js .pg.show .set.on .print img{animation:inkbloom 2.1s cubic-bezier(.35,.55,.3,1) backwards,inkgrow 2.1s cubic-bezier(.3,.6,.3,1) backwards,inkdry 3s ease-out backwards;animation-delay:calc(.45s + var(--k,0) * .35s)}
html.js .pg.show .set.on .print img{animation-delay:calc(.15s + var(--k,0) * .35s)}
.set:not(.on){filter:none}
html.js .pg:not(.show):not(.cover) .pg-in{filter:none}
@keyframes drawrule{from{scale:0 1}}
html.js .pg.show h2::after{transform-origin:left;animation:drawrule 1.3s cubic-bezier(.3,.7,.2,1) backwards 1.2s}
.pg.show .mark{animation:sigilin 2.4s ease backwards .3s}
@keyframes sigilin{from{opacity:0;scale:.9}}
.mark{opacity:.1}

/* ---- 5. portfolio: one hero, one detail, one handwritten word ---- */
.set .prints{position:absolute;inset:0}
.set .prints .print{--r:0deg}
.set .prints .print:nth-child(1){--r:-1.2deg}
.set .prints .print:nth-child(2){--r:1.6deg}
.set .setcap{width:40%}
.set .setnote{font-size:2em;max-width:44%;rotate:-3deg}
/* I realism: hero left, detail low right, words top right */
.lay0 .prints .print:nth-child(1){left:0;top:0;right:auto;bottom:auto;width:62%}
.lay0 .prints .print:nth-child(2){right:0;bottom:3%;left:auto;top:auto;width:36%}
.lay0 .setcap{top:1%;right:0;left:auto;width:33%}
.lay0 .setnote{left:4%;right:auto;bottom:6%;rotate:-4deg}
/* II portraits: mirrored, hero right */
.lay1 .prints .print:nth-child(1){right:0;left:auto;top:0;bottom:auto;width:62%}
.lay1 .prints .print:nth-child(2){left:0;right:auto;bottom:3%;top:auto;width:36%}
.lay1 .setcap{top:1%;left:0;right:auto;width:33%}
.lay1 .setnote{left:auto;right:4%;bottom:6%;rotate:3deg}
/* III fantasy: centred hero, tiny detail tucked beside, words beneath the title */
.lay2 .prints .print:nth-child(1){left:20%;right:auto;top:15%;bottom:auto;width:58%}
.lay2 .prints .print:nth-child(2){left:0;right:auto;bottom:2%;top:auto;width:32%}
.lay2 .setcap{top:0;left:0;right:0;width:100%;text-align:center}
.lay2 .setcap p:last-child{display:none}
.lay2 .setnote{left:auto;right:1%;bottom:12%;rotate:-5deg}
/* IV botanical: tall hero left, drifting detail right, caption lower right */
.lay3 .prints .print:nth-child(1){left:0;right:auto;top:0;bottom:auto;width:52%}
.lay3 .prints .print:nth-child(2){right:0;left:auto;top:6%;bottom:auto;width:36%}
.lay3 .setcap{top:auto;bottom:3%;right:0;left:auto;width:44%}
.lay3 .setnote{left:auto;right:6%;top:58%;bottom:auto;rotate:4deg}
/* V great pieces: very tall hero right, detail low left */
.lay4 .prints .print:nth-child(1){right:0;left:auto;top:0;bottom:auto;width:50%}
.lay4 .prints .print:nth-child(2){left:0;right:auto;bottom:3%;top:auto;width:38%}
.lay4 .setcap{top:1%;left:0;right:auto;width:46%}
.lay4 .setnote{left:2%;right:auto;bottom:40%;rotate:-4deg}

/* ---- 12. the book remembers: the margins grow with the drawer you chose ---- */
.mg{position:absolute;top:2.6em;bottom:2.6em;width:3em;z-index:1;pointer-events:none}
.pg.l .mg{left:.1em}.pg.r .mg{right:.1em}
.pg.r .mg svg{scale:-1 1}
.mg svg{position:absolute;inset:0;width:100%;height:100%;fill:none;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity 1s .5s}
.mg path,.mg circle{stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset 2.2s ease .4s}
.mg .m-fantasy circle,.mg .m-fantasy path{stroke-dasharray:none;stroke-dashoffset:0}
.m-realism{stroke:#2b2623;stroke-width:3.4;filter:blur(.4px)}
.m-portraits{stroke:#3a312c;stroke-width:1;stroke-dasharray:none}
.m-fantasy{stroke:var(--plum);stroke-width:1.4}
.m-botanical{stroke:var(--olive);stroke-width:1.6}
.m-great{stroke:var(--oxb);stroke-width:1.6}
.stage[data-mark=realism] .m-realism,.stage[data-mark=botanical] .m-botanical,.stage[data-mark=great] .m-great{opacity:.5}
.stage[data-mark=portraits] .m-portraits,.stage[data-mark=fantasy] .m-fantasy{opacity:.45}
.stage[data-mark] .pg.show .mg path{stroke-dashoffset:0}
.stage .m-portraits path{stroke-dasharray:none;stroke-dashoffset:0}

/* ---- 8. the chapter index: handwritten, drawn in as you hover ---- */
.index{position:fixed;left:50%;bottom:1.2rem;translate:-50% 0;display:flex;gap:1.9rem;z-index:40;transition:opacity .6s}
.stage[data-open="0"] ~ .index{opacity:0;pointer-events:none}
.index .tab{all:unset;position:relative;cursor:pointer;font:400 1.6rem/1 var(--hand);color:#d8c9a6;padding:.2rem .1rem;text-shadow:0 1px 2px rgba(0,0,0,.6);transition:color .3s,translate .3s}
.index .tab::after{content:"";position:absolute;left:0;right:0;bottom:-.1rem;height:2px;border-radius:2px;background:var(--oxb);background:#b8454c;transform-origin:left;scale:0 1;transition:scale .55s cubic-bezier(.2,.8,.2,1)}
.index .tab:hover,.index .tab:focus-visible{color:#fff3d6;translate:0 -2px}
.index .tab:hover::after,.index .tab.on::after,.index .tab:focus-visible::after{scale:1 1}
.index .tab.on{color:#fff3d6}
.index .tab:focus-visible{outline:2px solid #d8c9a6;outline-offset:4px}
.single .index,body.lb-open .index{display:none}

/* ---- 7. phones: keep the book, let a page scroll inside itself ---- */
.single .pg-in{overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:rgba(91,72,71,.45) transparent}
.single .pg-in::-webkit-scrollbar{display:block;width:4px}
.single .pg-in::-webkit-scrollbar-thumb{background:rgba(91,72,71,.4);border-radius:2px}
.single .pg-in.scrolls:not(.end){-webkit-mask-image:linear-gradient(#000 calc(100% - 4.2em),transparent calc(100% - 1.6em));mask-image:linear-gradient(#000 calc(100% - 4.2em),transparent calc(100% - 1.6em))}
.single .set .prints .print{width:auto}

/* ---- 10. only animate what's on the page ---- */
.pg:not(.show):not(.cover) *{animation-play-state:paused!important}

/* ---- 9. motion preferences ---- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;transition-delay:0s!important}
  .book{animation:none}
  .mg path,.mg circle{stroke-dashoffset:0}
}

.stage{--ph:min(760px,calc(100dvh - 176px))}
.index{bottom:.4rem}
.index .tab{font-size:1.5rem}
.lay4 .setnote{left:auto;right:4%;bottom:34%;rotate:-4deg}
.lay3 .setnote{top:50%}
.lay2 .prints .print:nth-child(1){left:26%;top:12%;width:56%}
.lay2 .prints .print:nth-child(2){width:30%;bottom:0}

/* ================= the living cover ================= */
.cover-tool .runes .rune{stroke:#b9f3dc;stroke-width:1.5;stroke-linecap:round;opacity:.3;filter:drop-shadow(0 0 3px #5fd9b4) drop-shadow(0 0 8px rgba(80,200,170,.7));animation:runeglow 7s ease-in-out infinite;animation-delay:calc(var(--i) * .17s)}
@keyframes runeglow{0%,100%{opacity:.3}38%{opacity:1}62%{opacity:.5}}
.cover-tool .veins .vein{stroke:#c8fff0;stroke-width:2.4;stroke-linecap:round;stroke-dasharray:.16 .84;stroke-dashoffset:1;opacity:.9;filter:drop-shadow(0 0 4px #5fd9b4) drop-shadow(0 0 10px rgba(80,210,170,.8));animation:vein 7.5s linear infinite;animation-delay:var(--d,0s)}
@keyframes vein{to{stroke-dashoffset:0}}
.cover-tool .emb circle,.cover-tool .emb line{stroke:rgba(5,16,11,.7)}
.mist{position:absolute;left:-30%;width:160%;height:55%;border-radius:50%;pointer-events:none;mix-blend-mode:screen;opacity:.34;filter:blur(1.2em);background:radial-gradient(ellipse at 50% 50%,rgba(120,220,190,.45),rgba(60,150,120,.14) 45%,transparent 70%)}
.mist.m1{top:52%;animation:mistA 17s ease-in-out infinite alternate}
.mist.m2{top:-14%;animation:mistB 23s ease-in-out infinite alternate;opacity:.24}
@keyframes mistA{from{translate:-8% 0;scale:1}to{translate:10% -5%;scale:1.15}}
@keyframes mistB{from{translate:9% 0;scale:1.1}to{translate:-9% 6%;scale:.95}}
.glint{position:absolute;inset:0;pointer-events:none;mix-blend-mode:screen;opacity:0;transition:opacity .5s;background:radial-gradient(circle at var(--mx,50%) var(--my,40%),rgba(190,255,230,.28),rgba(120,220,190,.08) 28%,transparent 46%)}
.cover-btn:hover .glint,.cover-btn:focus-visible .glint{opacity:1}
.cover-btn:hover .rune{animation-duration:3.4s}
.cover-logo{transition:translate .25s ease-out;translate:calc(var(--tx,0) * 7px) calc(-4% + var(--ty,0) * 5px);animation:logobreath 6s ease-in-out infinite}
@keyframes logobreath{0%,100%{filter:drop-shadow(0 .05em .05em rgba(0,0,0,.8)) drop-shadow(0 0 .3em rgba(0,0,0,.5)) drop-shadow(0 0 .0em rgba(196,164,97,0))}50%{filter:drop-shadow(0 .05em .05em rgba(0,0,0,.8)) drop-shadow(0 0 .3em rgba(0,0,0,.5)) drop-shadow(0 0 .7em rgba(196,164,97,.45))}}
.clasp i{animation:heartbeat 4.5s ease-in-out infinite}
@keyframes heartbeat{0%,100%{box-shadow:inset 0 0 0 .18em rgba(0,0,0,.18),inset 0 .15em .3em rgba(255,255,255,.22),0 .2em .5em rgba(0,0,0,.65),0 0 0 rgba(200,60,60,0)}50%{box-shadow:inset 0 0 0 .18em rgba(0,0,0,.18),inset 0 .15em .3em rgba(255,255,255,.22),0 .2em .5em rgba(0,0,0,.65),0 0 1.4em rgba(210,70,70,.55)}}
.stage.ritual .runes .rune{animation:runeflare 1.2s ease-out forwards;animation-delay:calc(var(--i) * .02s)}
@keyframes runeflare{0%{opacity:.2}35%{opacity:1;stroke:#fff}100%{opacity:0}}
@media (prefers-reduced-motion:reduce){.mist,.glint{display:none}.cover-tool .runes .rune{opacity:.5}.cover-tool .veins .vein{stroke-dasharray:none;stroke-dashoffset:0;opacity:.35}}
.cover-tool .runes .cring{stroke:#a6f0d6;stroke-width:1.2;opacity:.32;filter:drop-shadow(0 0 4px #5fd9b4);animation:ringpulse 5s ease-in-out infinite}
.cover-tool .runes .cring.c2{stroke-width:.8;animation-delay:-2.5s}
@keyframes ringpulse{0%,100%{opacity:.18}50%{opacity:.6}}
.innerglow{position:absolute;left:50%;top:46%;width:96%;aspect-ratio:1;translate:-50% -50%;border-radius:50%;pointer-events:none;mix-blend-mode:screen;background:radial-gradient(circle,rgba(110,230,195,.26),rgba(60,160,130,.1) 46%,transparent 68%);animation:innerpulse 6s ease-in-out infinite}
@keyframes innerpulse{0%,100%{opacity:.55;scale:.96}50%{opacity:1;scale:1.04}}
.cover-logo{z-index:2}

/* ---- v8: the painted cover ---- */
.pg.cover{background:url(../img/gen/cover-art.jpg) center/108% 104% no-repeat,#07130e;border-radius:.3em .55em .55em .3em;
  box-shadow:0 1.6em 3em rgba(0,0,0,.6),0 .3em .8em rgba(0,0,0,.55),inset 0 0 3em rgba(0,0,0,.25)}
.cover-btn::before{display:none}
.cover-logo{translate:calc(var(--tx,0) * 7px) calc(var(--ty,0) * 5px)}
.clasp{bottom:13%;width:2.7em;height:2.7em;opacity:.95}
.cover-hint{bottom:4.2%!important;color:#cfd8c6;text-shadow:0 0 .6em rgba(80,210,170,.6),0 1px 0 rgba(0,0,0,.7)}
.mist{opacity:.26}
.innerglow{top:50%;opacity:.8}
.cover-tool .runes .rune{opacity:.22}
.cover-logo{width:67%}

/* soft oval safety so no straight photo edge can ever show */
.print.plate img{
  -webkit-mask-image:radial-gradient(circle at var(--cx) var(--cy),#000 calc(var(--ink-radius) - 32%),transparent var(--ink-radius)),var(--m,url(../img/gen/inkmask1.png)),radial-gradient(ellipse 56% 54% at 50% 50%,#000 54%,transparent 94%);
  mask-image:radial-gradient(circle at var(--cx) var(--cy),#000 calc(var(--ink-radius) - 32%),transparent var(--ink-radius)),var(--m,url(../img/gen/inkmask1.png)),radial-gradient(ellipse 56% 54% at 50% 50%,#000 54%,transparent 94%);
  -webkit-mask-size:100% 100%,var(--ms) var(--ms),100% 100%;mask-size:100% 100%,var(--ms) var(--ms),100% 100%;
  -webkit-mask-position:center,var(--cx) var(--cy),center;mask-position:center,var(--cx) var(--cy),center;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-composite:source-in,source-in;mask-composite:intersect,intersect}

/* ---- v9: a redrawn logo that stays put ---- */
.cover-logo{width:84%;height:auto;translate:none!important;animation:none!important;transition:none;filter:drop-shadow(0 .06em .05em rgba(0,0,0,.85)) drop-shadow(0 0 .4em rgba(0,0,0,.55));overflow:visible}
.cover-logo .lg{fill:none;stroke:url(#gg);stroke-linecap:round;stroke-linejoin:round}
.cover-logo .pt{fill:rgba(12,34,25,.9);stroke-width:1.25}
.cover-logo .pv{stroke-width:.8;opacity:.7}
.cover-logo .pc{fill:#c9a65f;stroke:none}
.cover-logo .pd{fill:#f1dc9b;stroke:none}
.cover-logo .os{stroke-width:2.2}
.cover-logo .ol{fill:rgba(201,166,95,.2);stroke-width:1.15}
.cover-logo .ov{stroke-width:.7;opacity:.8}
.cover-logo .od{fill:url(#gg);stroke:none}
.cover-logo .lt1{font:700 23px/1 var(--display);letter-spacing:5px;fill:url(#gg);stroke:none}
.cover-logo .lt2{font:400 33px/1 var(--hand);letter-spacing:1px;fill:url(#gg);stroke:none}
/* the ink drop vanishes the instant it lands */
@keyframes fall{0%{top:-50vh;opacity:1}88%{top:0;opacity:1;scale:1 1}100%{top:0;opacity:0;scale:.2 .2}}
.stage.dropping .inkdrop .fall{animation:fall .6s cubic-bezier(.55,0,.9,.7) forwards}

/* ===== v11: enchanted-forest backdrop (emerald, no gold) ===== */
.desk{background:url(../img/gen/bg.jpg) center/cover no-repeat,#030a07}
.desk::before{content:"";position:absolute;inset:-10%;width:auto;height:auto;translate:none;rotate:none;
  background:
    radial-gradient(ellipse 38% 22% at 25% 70%,rgba(140,220,190,.10),transparent 70%),
    radial-gradient(ellipse 42% 24% at 78% 32%,rgba(120,200,190,.08),transparent 70%),
    radial-gradient(ellipse 50% 20% at 50% 95%,rgba(90,200,150,.12),transparent 70%);
  -webkit-mask:none;mask:none;animation:mistdrift 38s ease-in-out infinite alternate}
@keyframes mistdrift{from{transform:translate3d(-3%,1%,0) scale(1)}to{transform:translate3d(3%,-2%,0) scale(1.08)}}
.desk::after{background:radial-gradient(ellipse at center,transparent 48%,rgba(0,0,0,.55) 100%)}
.halo{display:none}
.aura{background:radial-gradient(ellipse,rgba(70,210,150,.26),rgba(30,140,100,.10) 48%,transparent 70%)}
@media (prefers-reduced-motion:reduce){.desk::before{animation:none}}

/* ===== v12: last page, calmer cover runes ===== */
.sign{font:400 3.4em/1 var(--hand);color:var(--oxb);margin:.5em 0 .2em!important;transform:rotate(-3deg);transform-origin:left;
  clip-path:inset(0 100% 0 0);}
html.js .pg.show .sign{animation:signwrite 2.4s cubic-bezier(.4,.1,.3,1) .9s forwards}
@keyframes signwrite{to{clip-path:inset(0 0 0 0)}}
.lastcrest{width:5.4em;margin:0 auto .5em;color:var(--oxb);opacity:.85}
.lastcrest svg{width:100%;height:auto;display:block}
.lastcrest path,.lastcrest circle,.lastcrest ellipse{stroke-dasharray:1;stroke-dashoffset:1}
html.js .pg.show .lastcrest path,html.js .pg.show .lastcrest circle,html.js .pg.show .lastcrest ellipse{animation:sigil 2.8s ease-out .5s forwards}
@keyframes sigil{to{stroke-dashoffset:0}}
.lastr .cta{margin-top:1em}
.cover-btn .runes{opacity:.62;transition:opacity 1.2s ease}
.cover-btn:hover .runes,.cover-btn:focus-visible .runes{opacity:1}
@media (prefers-reduced-motion:reduce){.sign{clip-path:none}.lastcrest path{stroke-dashoffset:0}}
.lastl .pg-in,.lastr .pg-in{display:flex;flex-direction:column;justify-content:center;padding-bottom:3em}
.lastr .pg-in{text-align:center;align-items:center}
.lastr .pg-in h2{border:0}
.lastl .lede{font-size:1.12em}
html.js .pg.show p.sign{animation:signwrite 2.4s cubic-bezier(.4,.1,.3,1) .9s forwards!important;opacity:1}

/* ===== v13: sigils, lightbox ink-bloom, ink residue ===== */
.lb-sigil{display:block;width:2.6em;height:2.6em;margin:0 auto .2em;color:#8fd9bd;opacity:.85}
.lb-sigil svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round;overflow:visible}
.lb-sigil path,.lb-sigil circle,.lb-sigil ellipse{stroke-dasharray:1;stroke-dashoffset:1;animation:sigil 1.6s ease-out .25s forwards}
.lb-zoom.inking img{-webkit-mask-image:radial-gradient(circle at 50% 55%,#000 calc(var(--ink-radius) - 34%),transparent var(--ink-radius));mask-image:radial-gradient(circle at 50% 55%,#000 calc(var(--ink-radius) - 34%),transparent var(--ink-radius));
  animation:inkbloom 1.15s cubic-bezier(.35,.55,.3,1) both,inkdry 1.4s ease-out both}
.showcase{position:relative}
.showcase.residue::after{content:"";position:absolute;inset:-4% -6%;pointer-events:none;z-index:6;
  background:radial-gradient(ellipse 38% 30% at 30% 40%,rgba(28,22,18,.55),transparent 70%),radial-gradient(ellipse 30% 36% at 68% 62%,rgba(28,22,18,.45),transparent 72%),radial-gradient(ellipse 24% 20% at 52% 22%,rgba(28,22,18,.35),transparent 70%);
  mix-blend-mode:multiply;filter:blur(8px);animation:residue 1.9s ease-out forwards}
@keyframes residue{0%{opacity:0;transform:scale(.7)}22%{opacity:1}100%{opacity:0;transform:scale(1.25)}}
@media (prefers-reduced-motion:reduce){.lb-sigil path{animation:none;stroke-dashoffset:0}.showcase.residue::after{display:none}}

/* ===== v14: ink-in-water backdrop ===== */
#ink{position:absolute;inset:0;width:100%;height:100%;display:block}
.desk.ink-live{background:#030907}
.desk.ink-live::before{display:none}
.desk.ink-live::after{background:radial-gradient(ellipse at center,transparent 55%,rgba(0,0,0,.45) 100%)}
.aura{background:radial-gradient(ellipse,rgba(60,190,140,.16),rgba(30,120,90,.06) 48%,transparent 70%)}

/* ===== v15: manuscript materials, type, page-turn, bookmarks ===== */
:root{--flip:1.05s}
.single{--flip:.7s}
@media (prefers-reduced-motion:reduce){:root{--flip:.01s}}
/* paper: hand-made stock with edge wear, foxing and a warm lit centre */
.pg:not(.cover){background:
  var(--pimg,url(../img/gen/paper.jpg)) var(--ppos,0 0)/620px auto,
  var(--stain,linear-gradient(transparent,transparent)),
  radial-gradient(ellipse at 50% 38%,rgba(255,248,222,.55),transparent 66%),
  radial-gradient(ellipse at 50% 50%,transparent 44%,rgba(118,82,42,.40) 100%),
  linear-gradient(#f0e0b6,#dcc593);
  background-blend-mode:multiply,normal,normal,normal,normal}
.pp1{--stain:radial-gradient(circle at 86% 10%,rgba(128,90,40,.17),transparent 8%),radial-gradient(circle at 10% 82%,rgba(128,90,40,.14),transparent 11%),radial-gradient(circle at 70% 90%,rgba(90,110,70,.10),transparent 14%)}
.pp2{--stain:radial-gradient(circle at 14% 14%,rgba(128,90,40,.15),transparent 10%),radial-gradient(circle at 90% 70%,rgba(128,90,40,.16),transparent 9%)}
.pp3{--stain:radial-gradient(circle at 60% 8%,rgba(128,90,40,.13),transparent 9%),radial-gradient(circle at 8% 60%,rgba(90,110,70,.11),transparent 13%),radial-gradient(circle at 92% 92%,rgba(128,90,40,.17),transparent 10%)}
.pp4{--stain:radial-gradient(circle at 80% 30%,rgba(128,90,40,.14),transparent 8%),radial-gradient(circle at 20% 94%,rgba(128,90,40,.15),transparent 12%)}
/* type: engraved titles, sturdy book text, illuminated drop caps */
.pg{font-family:'EB Garamond','Cormorant Garamond',Georgia,serif}
.pg h1,.pg h2,.pg h3{font-family:'Cinzel','Gloock',Georgia,serif;font-weight:500;letter-spacing:.015em}
.pg h2{font-size:1.9em;line-height:1.12}
.pg .title span{font-family:'Cinzel Decorative','Cinzel',serif;font-weight:700;letter-spacing:.02em}
.lede.drop::first-letter{font-family:'Cinzel Decorative','Cinzel',serif;font-weight:700;color:#682c35;float:left;font-size:3.9em;line-height:.82;padding:.04em .1em 0 0;text-shadow:.045em .045em 0 rgba(56,87,70,.55)}
.chap,.eyebrow{font-family:'Cinzel',serif;letter-spacing:.2em}
.pg p,.pg li{font-size:1.02em}
/* page turn: the free edge lags and bends, a band of light rolls across the sheet */
@keyframes bendF{0%{transform:none}30%{transform:perspective(1700px) rotateY(-7deg) skewY(.45deg)}62%{transform:perspective(1700px) rotateY(3.5deg)}100%{transform:none}}
@keyframes bendB{0%{transform:none}30%{transform:perspective(1700px) rotateY(7deg) skewY(-.45deg)}62%{transform:perspective(1700px) rotateY(-3.5deg)}100%{transform:none}}
.leaf.moving .face.front>.pg{transform-origin:0 50%;animation:bendF var(--flip) ease-in-out var(--dl,0ms) both}
.leaf.moving .face.back>.pg{transform-origin:100% 50%;animation:bendB var(--flip) ease-in-out var(--dl,0ms) both}
.face::after{content:"";position:absolute;inset:0;z-index:41;pointer-events:none;opacity:0;background:linear-gradient(100deg,transparent 38%,rgba(255,249,228,.42) 50%,transparent 62%);background-size:260% 100%;background-position:130% 0}
.leaf.moving .face::after{animation:sweep var(--flip) ease-in-out var(--dl,0ms) both}
@keyframes sweep{0%{opacity:0;background-position:130% 0}25%{opacity:.9}75%{opacity:.6}100%{opacity:0;background-position:-30% 0}}
/* ribbon bookmarks along the book's outer edge */
body:not(.lb-open) .index{left:var(--bk-left,100vw);top:var(--bk-top,12vh);bottom:auto;translate:none;flex-direction:column;gap:.55rem;align-items:flex-start}
.index .tab{all:unset;box-sizing:border-box;position:relative;cursor:pointer;display:block;min-width:7.4rem;padding:.55rem 1.4rem .55rem 1.1rem;margin-left:0;font:500 .78rem/1 'Cinzel',serif;letter-spacing:.16em;text-transform:uppercase;color:#efe6cf;text-shadow:0 1px 1px rgba(0,0,0,.55);
  background:linear-gradient(90deg,var(--bm1,#174e3e),var(--bm2,#0e3228));clip-path:polygon(0 0,100% 0,calc(100% - .7rem) 50%,100% 100%,0 100%);box-shadow:none;transition:translate .35s cubic-bezier(.2,.8,.2,1),filter .3s}
.index .tab:nth-child(4n+2){--bm1:#682c35;--bm2:#4a1d25}
.index .tab:nth-child(4n+3){--bm1:#2a2d2b;--bm2:#171918}
.index .tab:nth-child(4n+4){--bm1:#8d8268;--bm2:#6b6150}
.index .tab::after{display:none}
.index .tab:hover,.index .tab:focus-visible{translate:.55rem 0;color:#fff;filter:brightness(1.15)}
.index .tab.on{translate:.9rem 0;color:#fff}
.index .tab:focus-visible{outline:2px solid #d8c9a6;outline-offset:2px}
@media (max-width:1150px){body:not(.lb-open) .index{left:50%;top:auto;bottom:.4rem;translate:-50% 0;flex-direction:row;gap:.4rem;align-items:center}.index .tab{min-width:0;padding:.5rem .8rem;clip-path:none;border-radius:.2rem}.index .tab.on,.index .tab:hover{translate:0 -3px}}

/* ===== v16: painted home illustration ===== */
.frontis .pg-in{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding-bottom:2.6em}
.hero-art{margin:0;width:min(96%,29em);flex:0 1 auto;min-height:0;position:relative}
.hero-art img{display:block;width:100%;height:auto;max-height:calc(var(--ph) * .66);object-fit:contain;mix-blend-mode:multiply;
  -webkit-mask-image:radial-gradient(ellipse 50% 52% at 50% 50%,#000 62%,transparent 100%),radial-gradient(circle at 50% 62%,#000 calc(var(--ink-radius) - 40%),transparent var(--ink-radius));
  mask-image:radial-gradient(ellipse 50% 52% at 50% 50%,#000 62%,transparent 100%),radial-gradient(circle at 50% 62%,#000 calc(var(--ink-radius) - 40%),transparent var(--ink-radius));
  -webkit-mask-composite:source-in;mask-composite:intersect}
html.js .pg.show .hero-art img{animation:inkbloom 2.6s cubic-bezier(.35,.55,.3,1) .35s backwards,inkdry 3.2s ease-out .35s backwards}
.frontis .motto{margin-top:.2em}
@media (prefers-reduced-motion:reduce){html.js .pg.show .hero-art img{animation:none}}

/* ===== v17: painted vignettes (multiply onto the parchment, ink in on arrival) ===== */
.vig{position:absolute;margin:0;pointer-events:none;width:var(--vw,10.5em);left:calc(50% - var(--vw,10.5em) / 2);bottom:var(--vb,3.3em)}
.vig img{display:block;width:100%;height:auto;mix-blend-mode:multiply;opacity:.96;
  -webkit-mask-image:radial-gradient(circle at 50% 55%,#000 calc(var(--ink-radius) - 40%),transparent var(--ink-radius));mask-image:radial-gradient(circle at 50% 55%,#000 calc(var(--ink-radius) - 40%),transparent var(--ink-radius))}
html.js .pg.show .vig img{animation:inkbloom 2.2s cubic-bezier(.35,.55,.3,1) .6s backwards,inkdry 2.8s ease-out .6s backwards}






.v-seal{position:relative;left:auto;bottom:auto;--vw:8em;margin:0 auto .4em;width:var(--vw)}
.lastr .pg-in{padding-top:2em}
@media (prefers-reduced-motion:reduce){html.js .pg.show .vig img{animation:none}}

.v-bloom{--vw:6.2em;--vb:2.2em;left:calc(100% - var(--vw) - 3.2em)!important}
.v-scales{--vw:7.2em;--vb:1.7em}
.v-herbs{--vw:6.2em;--vb:1.5em}
.v-oracle{--vw:7em;--vb:2.6em;left:calc(100% - var(--vw) - 3em)!important}
.v-raven{--vw:5.8em;--vb:1.6em;left:calc(100% - var(--vw) - 3em)!important}
.v-machine{--vw:6.6em;--vb:2.4em;left:calc(100% - var(--vw) - 3em)!important}
.lastl .pg-in{padding-bottom:9em}

/* v18: no line-art behind the writing; no paper-corner triangles; vignettes are true-alpha PNGs */
.vine,.mark,.mg,.tw,.pg .circ-art,.pg .ritual,.m-realism,.m-portraits,.m-fantasy,.m-botanical,.m-great{display:none!important}
.turn::before,.turn::after{display:none!important;content:none!important}
.turn{background:none!important;box-shadow:none!important}
.vig img,.hero-art img{mix-blend-mode:normal!important}
.vig,.hero-art{mix-blend-mode:normal!important;background:none!important}

/* v19: the book is the whole site, so there are no controls outside it */

/* in-book bookmarks: three ribbons hanging from the top edge of the right page, never outside the book */
body:not(.lb-open) .index,.single body:not(.lb-open) .index{display:flex!important;left:var(--bk-left,50vw)!important;top:var(--bk-top,10vh)!important;bottom:auto!important;translate:-100% 0!important;flex-direction:row!important;gap:.45rem!important;align-items:flex-start!important}
.index .tab{min-width:0!important;padding:.5rem .55rem .95rem!important;font:500 .6rem/1 'Cinzel',serif!important;letter-spacing:.12em!important;clip-path:polygon(0 0,100% 0,100% 100%,50% calc(100% - .4rem),0 100%)!important;border-radius:0!important;translate:0 -.55rem!important;transition:translate .4s cubic-bezier(.2,.8,.2,1),filter .3s!important;box-shadow:none}
.index .tab:nth-child(1){--bm1:#8d8268;--bm2:#6b6150}
.index .tab:nth-child(2){--bm1:#174e3e;--bm2:#0e3228}
.index .tab:nth-child(3){--bm1:#682c35;--bm2:#4a1d25}
.index .tab:hover,.index .tab:focus-visible{translate:0 0!important}
.index .tab.on{translate:0 -.1rem!important}
@media (max-width:1150px){body:not(.lb-open) .index{flex-direction:row!important;gap:.45rem!important}.index .tab{padding:.5rem .55rem .95rem!important;clip-path:polygon(0 0,100% 0,100% 100%,50% calc(100% - .4rem),0 100%)!important}.index .tab.on,.index .tab:hover{translate:0 0!important}}
.frontis .motto{font:700 1.7em/1.1 'Cinzel',serif;letter-spacing:.16em;text-transform:uppercase;margin:.5em 0 .15em}
.plate-by{font:italic 500 1.05em/1.2 var(--serif);margin:.15em 0;color:#3a2c22}
.plate-loc{font:500 .8em/1.2 'Cinzel',serif;letter-spacing:.2em;text-transform:uppercase;margin:.3em 0 .7em;color:#4a3b30}
.plate-styles{font:500 .98em/1.5 var(--serif);margin:0 0 .6em;color:#2a211a}
.plate-styles i{font-style:normal;color:var(--oxb);margin:0 .25em}
.plate-appt{font:600 .72em/1 'Cinzel',serif;letter-spacing:.28em;text-transform:uppercase;color:var(--oxb);margin:.2em 0 0;padding-top:.7em;border-top:1px solid rgba(70,52,44,.3)}
.frontis .motto{font-size:1.2em;letter-spacing:.12em;white-space:nowrap;margin-top:1.1em}
.frontis .hero-art{margin-bottom:.4em}

/* v20: logo concentric with the rune ring (ring centre = 50% / 46.7% of the cover, outer ring r = 246/840 of height) */
.cover-btn .cover-logo{position:absolute!important;left:50%!important;top:46.67%!important;width:92%!important;height:auto!important;translate:-50% -47%!important;animation:none!important;transition:none!important}

/* directions: ink floods the facing page, then a real route is inked across it */
.dirbtn{all:unset;cursor:pointer;color:var(--oxb);border-bottom:1px solid currentColor;font-style:italic}
.dirbtn:hover,.dirbtn:focus-visible{color:#3a0f14}
.dirbtn:focus-visible{outline:2px solid var(--oxb);outline-offset:3px}
.routepg .pg-in{display:block;height:100%}
.route{position:relative;height:100%}
.route-idle{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:2em 2.4em;transition:opacity .7s ease .5s}
.route-idle h2{margin:.1em 0 .6em}
.compass{width:7.5em;height:auto;fill:none;stroke:#3a3028;stroke-width:1;opacity:.5;margin:.2em 0 1em}
.compass .thin{stroke-width:.5}.compass path{fill:rgba(58,48,40,.08)}.compass text{font:600 9px 'Cinzel',serif;fill:#3a3028;stroke:none}
.route-note{font:italic 1.05em/1.5 var(--serif);color:#4a3b30;max-width:17em;margin:0}
.route:not([data-state=idle]) .route-idle{opacity:0;pointer-events:none}
.route-live{position:absolute;inset:0;display:flex;flex-direction:column;min-height:0;opacity:0;visibility:hidden;transition:opacity .9s ease .7s,visibility 0s linear .7s}
.route:not([data-state=idle]) .route-live{opacity:1;visibility:visible}
.route-head h2{margin:.05em 0 .3em;font-size:1.35em}
.route-map{position:relative;flex:0 0 auto;border:1px solid rgba(70,52,44,.28);border-radius:.2em;background:radial-gradient(ellipse at 50% 40%,rgba(255,248,225,.55),rgba(214,190,140,.25));padding:.2em}
.route-map svg{display:block;width:100%;height:auto;max-height:11.5em}
.map-compass path{fill:rgba(58,48,40,.5);stroke:none}.map-compass text{font:600 8px 'Cinzel',serif;fill:#4a3b30}
#route-path{fill:none;stroke:#14402f;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round;opacity:.92}
.blot{fill:#16120f}
.route[data-state=locating] #route-path,.route[data-state=arriving] #route-path{opacity:0}
.seal-wax{opacity:0;transform-box:fill-box;transition:opacity .35s ease}
.seal-wax circle{fill:#7a1f24}.seal-wax .rim{fill:none;stroke:rgba(40,6,10,.55);stroke-width:.8}.seal-wax .pn{fill:#4a1116;stroke:none}
.seal-wax.on{opacity:1;animation:stamp .5s cubic-bezier(.3,1.6,.5,1) both}
@keyframes stamp{from{scale:1.7;opacity:0}to{scale:1;opacity:1}}
.map-note{margin:.25em 0 0;font:italic .72em var(--serif);color:#6a5a48;text-align:center}
.route-sum{margin:.6em 0 .2em;font:500 1em/1.3 var(--serif);color:#2a211a}
.route-sum em{display:block;font-style:italic;font-size:.85em;color:#6a5a48}
.route-steps{flex:1 1 auto;min-height:6.5em;overflow:auto;margin:.2em 0 .5em;padding:0 .4em 0 1.6em;font:.92em/1.4 var(--serif);color:#2a211a;list-style:decimal}
.route-steps li{margin:.15em 0;padding-left:.2em}
.route-steps li::marker{color:var(--oxb);font-style:italic}
.route-steps .gap{list-style:none;margin-left:-1.4em;font-style:italic;color:#6a5a48}
.route[data-state=drawn] .route-steps li{animation:inkin .8s ease backwards;animation-delay:calc(var(--n,0) * 90ms + 1.2s)}
.route-from label{display:block;font:500 .68em/1 'Cinzel',serif;letter-spacing:.16em;text-transform:uppercase;color:var(--plum);margin-bottom:.15em}
.route-from span{display:flex;gap:.7em;align-items:flex-end}
.route-from input{flex:1;min-width:0;font:italic 1.15em/1.3 var(--serif);padding:.3em .1em .25em;background:none;border:0;border-bottom:1.5px solid rgba(40,28,20,.55);border-radius:0;color:#1d1712;outline:none;
  background-image:linear-gradient(90deg,rgba(40,28,20,.0),rgba(40,28,20,.0));transition:border-color .3s,box-shadow .5s}
.route-from input::placeholder{color:rgba(74,59,48,.55)}
.route-from input:focus{border-bottom-color:var(--oxb);box-shadow:0 .5em .8em -.6em rgba(122,31,36,.55)}
.waxbtn{all:unset;box-sizing:border-box;cursor:pointer;flex:0 0 auto;width:2.9em;height:2.9em;border-radius:48% 52% 50% 46%/52% 46% 54% 48%;position:relative;
  background:radial-gradient(circle at 36% 30%,#a53038,#7a1f24 55%,#4d1217);box-shadow:0 .08em .22em rgba(30,8,10,.55),inset 0 0 0 .22em rgba(60,10,14,.35);transition:scale .25s cubic-bezier(.3,1.5,.5,1),rotate .4s}
.waxbtn i{position:absolute;inset:22%;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-6 -6 12 12'%3E%3Cg fill='%233a0c10'%3E%3Cpath d='M0-4.2c1.8 1 2.4 3 0 4.4-2.4-1.4-1.8-3.4 0-4.4zM0 .2c-2.4.4-4.2-.8-4.2-2.8 2.2-.2 3.8 1 4.2 2.8zM0 .2c2.4.4 4.2-.8 4.2-2.8-2.2-.2-3.8 1-4.2 2.8zM0 .4c-1.6 1.6-3.8 1.4-4.6-.4 2-.6 3.8-.2 4.6.4zM0 .4c1.6 1.6 3.8 1.4 4.6-.4-2-.6-3.8-.2-4.6.4z'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;opacity:.85}
.waxbtn:hover,.waxbtn:focus-visible{scale:1.08;rotate:-6deg}
.waxbtn:active{scale:.94}
.waxbtn:focus-visible{outline:2px solid #3a0f14;outline-offset:3px}
.route-open-wrap{margin:.5em 0 0}
.waxlink{display:inline-block;font:500 .74em/1 'Cinzel',serif;letter-spacing:.18em;text-transform:uppercase;color:#f1e2c4!important;text-decoration:none!important;padding:.85em 1.4em;border-radius:46% 54% 50% 50%/60% 50% 50% 40%;
  background:radial-gradient(circle at 30% 25%,#a53038,#7a1f24 60%,#4d1217);box-shadow:0 .1em .3em rgba(30,8,10,.5),inset 0 0 0 .2em rgba(60,10,14,.3);transition:scale .25s cubic-bezier(.3,1.5,.5,1)}
.waxlink:hover,.waxlink:focus-visible{scale:1.05}
.route-lost{display:none;margin:.6em auto .2em;width:7em}
.route[data-state=denied] .route-lost,.route[data-state=failed] .route-lost{display:block}
.route-steps:empty{display:none}
.route-map{border:0!important;background:radial-gradient(ellipse at 50% 46%,rgba(255,246,222,.7) 0,rgba(214,186,128,.38) 58%,rgba(190,160,100,0) 100%);padding:.9em 1em .4em;box-shadow:none;border-radius:0;-webkit-mask:none;mask:none}
.route-steps{min-height:4.5em!important}
.route-msg{min-height:1.3em;margin:.35em 0 0;font:italic .95em var(--serif);color:var(--oxb)}
.route[data-state=drawn] #route-map ~ .route-msg{color:#4a3b30}
.route[data-state=denied] .route-map,.route[data-state=failed] .route-map,.route[data-state=denied] .route-sum,.route[data-state=failed] .route-sum{display:none}
/* the ink arrives: a dark pool spreads from the facing page, then soaks in and leaves the folio */
.route-ink{position:absolute;inset:-2.4em;border-radius:3em;filter:blur(14px);pointer-events:none;opacity:0;
  background:radial-gradient(circle at 8% 52%,#0e0c0a 0,#14110e calc(var(--ink-radius) - 14%),rgba(20,17,14,.0) var(--ink-radius))}
.route[data-state=arriving] .route-ink,.route[data-state=locating] .route-ink,.route[data-state=drawn] .route-ink,.route[data-state=denied] .route-ink,.route[data-state=failed] .route-ink{animation:inkpool 2.4s cubic-bezier(.4,.1,.3,1) both}
@keyframes inkpool{0%{--ink-radius:0%;opacity:1}45%{--ink-radius:150%;opacity:1}100%{--ink-radius:150%;opacity:0}}
@media (prefers-reduced-motion:reduce){.route-ink{display:none}.route-live,.route-idle{transition:none}}

/* ================= v21: bookmaking, not website ================= */
/* --- page furniture: catchwords --- */
.catch{position:absolute;right:3.4em;bottom:1.35em;font:italic .78em/1 var(--serif);color:rgba(58,44,34,.75);pointer-events:none;z-index:2}
.pg.r .catch{right:8em}
.single .catch{display:none}

/* shared manuscript grid: wide inner margin, narrow outer, same everywhere */
.pg .pg-in{padding-top:2.3em!important}
.pg.l .pg-in{padding-left:2.5em!important;padding-right:3.4em!important}
.pg.r .pg-in{padding-left:3.4em!important;padding-right:2.5em!important}

/* --- four stages: two columns, rubricated numerals --- */
.pg[data-pg="L0"] .steps{display:grid;grid-template-columns:1fr 1fr;gap:1.1em 1.6em;margin-top:.8em}
.pg[data-pg="L0"] .steps li{display:block;margin:0;padding:0 0 0 0}
.pg[data-pg="L0"] .steps li>b{display:block;font:700 1.9em/1 'Cinzel Decorative','Cinzel',serif;color:var(--oxb);margin:0 0 .15em}
.pg[data-pg="L0"] .steps h3{margin-top:0}

/* --- pricing: stamped notices, not web cards --- */
.pick{background:none!important;border:0!important;box-shadow:none!important;padding:0!important;border-top:1px solid rgba(70,52,44,.4)!important;border-bottom:1px solid rgba(70,52,44,.4)!important;padding:.9em 0!important}
.pick-q{font:italic 1.15em var(--serif)!important;margin:0 0 .6em!important}
.pick-b{background:none!important;border:0!important;border-bottom:1px dashed rgba(70,52,44,.6)!important;border-radius:0!important;box-shadow:none!important;font:500 .78em 'Cinzel',serif!important;letter-spacing:.14em!important;text-transform:uppercase;color:#3a2c22!important;padding:.5em .2em!important;margin:0 1em .3em 0!important}
.pick-b:hover,.pick-b[aria-pressed=true],.pick-b.on{color:var(--oxb)!important;border-bottom:1px solid var(--oxb)!important}
.consult{background:none!important;border:1.5px double rgba(122,31,36,.55)!important;border-radius:0;padding:1em 1.2em!important;position:relative;box-shadow:inset 0 0 0 .3em rgba(228,214,179,.0)}
.consult .circ{border:0!important}.consult .circ svg{display:none!important}
.consult h3{font:600 1em 'Cinzel',serif!important;letter-spacing:.06em;color:var(--oxb)}

/* --- contact: a letter on ruled lines --- */
.form .field input,.form .field select,.form .field textarea{background:transparent!important;border:0!important;border-bottom:1px solid rgba(58,44,34,.55)!important;border-radius:0!important;box-shadow:none!important;color:#1d1712;font:italic 1.08em/1.5 var(--serif)!important;padding:.35em .15em!important}
.form .field textarea{background:repeating-linear-gradient(transparent 0 1.48em,rgba(58,44,34,.35) 1.48em calc(1.48em + 1px))!important;border-bottom:0!important;line-height:1.5em!important;padding:0 .15em!important;min-height:6.2em}
.form .field input:focus,.form .field select:focus,.form .field textarea:focus{outline:none!important;border-bottom-color:var(--oxb)!important;background-color:rgba(122,31,36,.04)!important}
.form .field select{-webkit-appearance:none;appearance:none;background-image:linear-gradient(45deg,transparent 50%,#3a2c22 50%),linear-gradient(135deg,#3a2c22 50%,transparent 50%)!important;background-position:calc(100% - 1em) 55%,calc(100% - .7em) 55%!important;background-size:.35em .35em!important;background-repeat:no-repeat!important}
.chips span{background:none!important;border:0!important;border-bottom:1px dashed rgba(58,44,34,.55)!important;border-radius:0!important;font:italic 1em/1.2 var(--serif)!important;letter-spacing:0!important;text-transform:none!important;padding:.2em .35em!important;color:#3a2c22!important}
.chips{gap:.2em .9em}
.chips input:checked+span{background:none!important;color:var(--oxb)!important;border-bottom:1.5px solid var(--oxb)!important;font-weight:600}
.form .btn.btn-dark[type=submit]{all:unset;box-sizing:border-box;cursor:pointer;display:inline-block;margin-top:.5em;font:500 .74em/1 'Cinzel',serif;letter-spacing:.18em;text-transform:uppercase;color:#f1e2c4;padding:1em 1.8em;border-radius:46% 54% 50% 50%/60% 50% 50% 40%;
  background:radial-gradient(circle at 30% 25%,#a53038,#7a1f24 60%,#4d1217);box-shadow:0 .1em .3em rgba(30,8,10,.5),inset 0 0 0 .2em rgba(60,10,14,.3);transition:scale .25s cubic-bezier(.3,1.5,.5,1)}
.form .btn.btn-dark[type=submit]:hover,.form .btn.btn-dark[type=submit]:focus-visible{scale:1.05}
.form .btn.btn-dark[type=submit]:focus-visible{outline:2px solid #3a0f14;outline-offset:3px}

/* --- ribbons that hang like cloth: woven grain, slight sway, frayed foot --- */
.index .tab{background-image:repeating-linear-gradient(90deg,rgba(255,255,255,.06) 0 1px,transparent 1px 3px),linear-gradient(90deg,var(--bm1,#174e3e),var(--bm2,#0e3228))!important;transform-origin:50% 0;
  filter:drop-shadow(0 .12rem .1rem rgba(0,0,0,.45));transition:translate .5s cubic-bezier(.2,.8,.2,1),rotate .6s cubic-bezier(.3,1.6,.5,1),filter .3s!important}
.index .tab:hover,.index .tab:focus-visible{rotate:-2.2deg}
.index .tab:nth-child(2):hover{rotate:2deg}
.stage.turning ~ .index .tab:nth-child(1){animation:sway 1.1s ease-out}
.stage.turning ~ .index .tab:nth-child(2){animation:sway 1.1s ease-out .08s}
.stage.turning ~ .index .tab:nth-child(3){animation:sway 1.1s ease-out .16s}
@keyframes sway{0%{rotate:0deg}25%{rotate:3.5deg}55%{rotate:-2deg}80%{rotate:.8deg}100%{rotate:0deg}}

/* --- deeper spine, a darker top/bottom gutter --- */
.pg.l::after,.pg.r::after{content:"";position:absolute;top:0;bottom:0;width:3.2em;pointer-events:none;z-index:1}
.pg.l::after{right:0;background:linear-gradient(to left,rgba(40,24,10,.38),rgba(40,24,10,.12) 40%,transparent)}
.pg.r::after{left:0;background:linear-gradient(to right,rgba(40,24,10,.38),rgba(40,24,10,.12) 40%,transparent)}

/* sound toggle, quiet, inside the contents page */
.soundline{margin-top:.6em;font:italic .85em var(--serif);color:#6a5a48}
.soundline button{all:unset;cursor:pointer;color:var(--oxb);border-bottom:1px dashed currentColor;margin-left:.3em}
.soundline button:focus-visible{outline:2px solid var(--oxb);outline-offset:3px}

/* ================= v22: no ribbons, no red capitals, words that drift like an echo until you touch them ================= */
.index,nav.index{display:none!important}
.pg .drop::first-letter,.pg .lede.drop::first-letter{float:none!important;font:inherit!important;font-size:inherit!important;line-height:inherit!important;color:inherit!important;-webkit-text-fill-color:currentColor!important;text-shadow:none!important;padding:0!important;margin:0!important;background:none!important;text-transform:none!important}

.pg-in p:not(.chap):not(.eyebrow):not(.small):not(.latin):not(.hand):not(.soundline):not(.route-note):not(.route-msg):not(.route-sum):not(.map-note):not(.plate-by):not(.plate-loc):not(.plate-styles):not(.plate-appt):not(.setnote):not(.open-now):not(.form-err),
.pg-in .facts li,.pg-in .steps li>div>p:not(.latin){
  --echo:rgba(60,40,28,.5);
  opacity:.5;filter:blur(.55px);
  text-shadow:.07em .05em .5em var(--echo),-.05em -.03em .45em rgba(122,31,36,.28);
  animation:drift 9s ease-in-out infinite alternate;animation-delay:calc(var(--i,0) * -1.3s);
  transition:opacity .7s ease,filter .7s ease,text-shadow .7s ease;
  will-change:translate}
.pg-in p:nth-of-type(2n){animation-duration:11s;animation-delay:-3s}
.pg-in p:nth-of-type(3n){animation-duration:13s;animation-delay:-6s}
@keyframes drift{from{translate:0 -1.2px}to{translate:.8px 1.6px}}

.pg-in p:not(.chap):hover,.pg-in p:not(.chap):focus-within,.pg-in .facts li:hover,.pg-in .steps li>div:hover>p:not(.latin){
  opacity:1!important;filter:none!important;text-shadow:none!important;animation-play-state:paused;translate:0 0;transition:opacity .35s ease,filter .35s ease,text-shadow .35s ease}
/* once you have touched a line it stays locked in for the visit */
.pg-in .locked{opacity:1!important;filter:none!important;text-shadow:none!important;animation:none!important}

@media (hover:none),(prefers-reduced-motion:reduce),(prefers-contrast:more){
  .pg-in p,.pg-in .facts li,.pg-in .steps li>div>p{opacity:1!important;filter:none!important;text-shadow:none!important;animation:none!important}
}

/* v23: the writing settles by itself, one line after another, while you are on the page */
@keyframes lockin{from{opacity:.5;filter:blur(.55px);text-shadow:.07em .05em .5em rgba(60,40,28,.5),-.05em -.03em .45em rgba(122,31,36,.28)}to{opacity:1;filter:blur(0);text-shadow:0 0 0 rgba(60,40,28,0),0 0 0 rgba(122,31,36,0)}}
html.js .pg.show .pg-in p:not(.chap):not(.eyebrow):not(.small):not(.latin):not(.hand):not(.soundline):not(.route-note):not(.route-msg):not(.route-sum):not(.map-note):not(.plate-by):not(.plate-loc):not(.plate-styles):not(.plate-appt):not(.setnote):not(.open-now):not(.form-err),
html.js .pg.show .pg-in .facts li,html.js .pg.show .pg-in .steps li>div>p:not(.latin){
  animation:inkin .95s cubic-bezier(.2,.7,.2,1) backwards calc(620ms + var(--i,0) * 90ms),lockin 1.7s ease-in-out forwards calc(.8s + var(--n,0) * .4s)!important}
html.js .pg.show .pg-in p:not(.chap):hover,html.js .pg.show .pg-in .facts li:hover{animation:none!important;opacity:1!important;filter:none!important;text-shadow:none!important}
@media (hover:none),(prefers-reduced-motion:reduce),(prefers-contrast:more){html.js .pg.show .pg-in p,html.js .pg.show .pg-in .facts li,html.js .pg.show .pg-in .steps li>div>p{animation:none!important}}

.catch{display:none!important}

/* ===== v24 open-book object: leather boards, page stacks, gutter ===== */
.board{left:-1.35em;right:-1.35em;top:-1.35em;bottom:-1.35em;border-radius:.7em;
  background:
    radial-gradient(circle at 0 0,rgba(168,146,92,.30),transparent 7%),
    radial-gradient(circle at 100% 0,rgba(168,146,92,.30),transparent 7%),
    radial-gradient(circle at 0 100%,rgba(168,146,92,.30),transparent 7%),
    radial-gradient(circle at 100% 100%,rgba(168,146,92,.30),transparent 7%),
    radial-gradient(ellipse at 50% 50%,transparent 60%,rgba(0,0,0,.38) 100%),
    url(../img/gen/leather.jpg) center/cover,#1c3a2e;
  box-shadow:0 0 0 1px rgba(0,0,0,.75),inset 0 0 0 1px rgba(255,255,255,.06),inset 0 .12em .25em rgba(255,255,255,.08),inset 0 0 1.3em rgba(0,0,0,.65),
    0 .35em .7em rgba(0,0,0,.5),0 1.8em 3.6em rgba(0,0,0,.6)}
.board::before{content:"";position:absolute;inset:.5em;border:1.5px dashed rgba(206,168,98,.36);border-radius:.45em;pointer-events:none}
.board::after{content:"";position:absolute;inset:1em;border:.28em solid rgba(4,10,7,.34);border-radius:.2em;filter:blur(.6px);pointer-events:none}
.base.l{box-shadow:-.14em .1em 0 #eadfc0,-.26em .2em 0 #b9a77a,-.38em .3em 0 #e3d6b2,-.5em .4em 0 #ae9d70,-.62em .5em 0 #dfd0a9,-.74em .6em 0 #a89668,-.86em .7em 0 #d6c79f,-.98em .8em 0 #8e7a52,-1.05em .85em .5em rgba(0,0,0,.35)}
.base.r{box-shadow:.14em .1em 0 #eadfc0,.26em .2em 0 #b9a77a,.38em .3em 0 #e3d6b2,.5em .4em 0 #ae9d70,.62em .5em 0 #dfd0a9,.74em .6em 0 #a89668,.86em .7em 0 #d6c79f,.98em .8em 0 #8e7a52,1.05em .85em .5em rgba(0,0,0,.35)}
.book::after{content:"";position:absolute;left:50%;top:0;bottom:0;width:11em;translate:-50% 0;pointer-events:none;z-index:60;
  background:linear-gradient(to right,transparent,rgba(60,38,14,.14) 28%,rgba(34,19,7,.46) 47.5%,rgba(14,7,2,.7) 50%,rgba(34,19,7,.46) 52.5%,rgba(60,38,14,.14) 72%,transparent);
  -webkit-mask-image:linear-gradient(transparent,#000 3%,#000 97%,transparent);mask-image:linear-gradient(transparent,#000 3%,#000 97%,transparent);
  transition:opacity .5s .5s}
.stage[data-open="0"] .book::after{opacity:0;transition-delay:0s}
.single .book::after{display:none}

/* ===== v25: board wears the new cover; photos +10% ===== */
.board{background:
    radial-gradient(ellipse at 50% 50%,transparent 62%,rgba(0,0,0,.34) 100%),
    url(../img/gen/cover-art.jpg) left top/50% 100% no-repeat,
    url(../img/gen/cover-art.jpg) right top/50% 100% no-repeat,#0c2219}
.print.plate.solo{width:81%}
.print.plate.small{width:calc(46% * 1.1)}
.print.plate.wide{width:72%}
.prints .print.tile{scale:1.1}
.lay0 .prints .print:nth-child(1){transform-origin:0 0}.lay0 .prints .print:nth-child(2){transform-origin:100% 100%}
.lay1 .prints .print:nth-child(1){transform-origin:100% 0}.lay1 .prints .print:nth-child(2){transform-origin:0 100%}
.lay2 .prints .print:nth-child(1){transform-origin:50% 0}.lay2 .prints .print:nth-child(2){transform-origin:0 100%}
.lay3 .prints .print:nth-child(1){transform-origin:0 0}.lay3 .prints .print:nth-child(2){transform-origin:100% 0}
.lay4 .prints .print:nth-child(1){transform-origin:100% 0}.lay4 .prints .print:nth-child(2){transform-origin:0 100%}
.single .prints .print.tile{scale:1}
.board{background:
    linear-gradient(rgba(34,120,80,.20),rgba(34,120,80,.20)),
    url(../img/gen/cover-art.jpg) -6.8% 50%/56% 112% no-repeat,
    url(../img/gen/cover-art.jpg) 107% 50%/56% 112% no-repeat,#0c2219;
  background-blend-mode:screen,normal,normal,normal}
.board{background:
    linear-gradient(to right,transparent 46%,rgba(4,12,8,.7) 50%,transparent 54%),
    linear-gradient(rgba(34,120,80,.20),rgba(34,120,80,.20)),
    url(../img/gen/cover-art.jpg) -6.8% 50%/56% 112% no-repeat,
    url(../img/gen/cover-art.jpg) 107% 50%/56% 112% no-repeat,#0c2219;
  background-blend-mode:normal,screen,normal,normal,normal}
.board{background:
    linear-gradient(to right,transparent 42%,rgba(4,12,8,.85) 48.5%,rgba(4,12,8,.85) 51.5%,transparent 58%),
    linear-gradient(rgba(34,120,80,.20),rgba(34,120,80,.20)),
    url(../img/gen/cover-art.jpg) -6.8% 50%/56% 112% no-repeat,
    url(../img/gen/cover-art.jpg) 107% 50%/56% 112% no-repeat,#0c2219;
  background-blend-mode:normal,screen,normal,normal,normal}

/* ===== v26: any page content can be inked in, the same way the photographs are ===== */
@property --mk{syntax:'<percentage>';inherits:false;initial-value:340%}
@keyframes textink{
  from{--mk:0%;filter:blur(2px) contrast(1.6) brightness(.75)}
  55%{filter:blur(.8px) contrast(1.2) brightness(.9)}
  to{--mk:240%;filter:blur(0) contrast(1) brightness(1)}}
html.js .pg.show .ans.on,html.js .pg.show .set.on .setcap,html.js .pg.show .set.on .setnote,html.js .pg.show .route:not([data-state=idle]) .route-live{
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-position:var(--mx,50%) var(--my,40%);mask-position:var(--mx,50%) var(--my,40%);
  -webkit-mask-size:var(--mk) var(--mk);mask-size:var(--mk) var(--mk);
  animation:textink 2.3s cubic-bezier(.45,.05,.4,1) both}
html.js .pg.show .ans.on{-webkit-mask-image:url(../img/gen/inkmask2.png);mask-image:url(../img/gen/inkmask2.png)}
html.js .pg.show .set.on .setcap{-webkit-mask-image:url(../img/gen/inkmask1.png);mask-image:url(../img/gen/inkmask1.png);animation-delay:.25s}
html.js .pg.show .set.on .setnote{-webkit-mask-image:url(../img/gen/inkmask3.png);mask-image:url(../img/gen/inkmask3.png);animation-delay:.55s}
html.js .pg.show .route:not([data-state=idle]) .route-live{-webkit-mask-image:url(../img/gen/inkmask1.png);mask-image:url(../img/gen/inkmask1.png);animation-duration:2.6s;--mx:30%;--my:30%}
/* directions: no black flood, the idle folio simply dries away while the route inks in */
.route-ink{display:none!important}
.route-live{transition:opacity .2s ease,visibility 0s!important}
.route-idle{transition:opacity .9s ease .2s!important}
@media (prefers-reduced-motion:reduce){html.js .pg.show .ans.on,html.js .pg.show .set.on .setcap,html.js .pg.show .set.on .setnote,html.js .pg.show .route:not([data-state=idle]) .route-live{animation:none;-webkit-mask-image:none;mask-image:none}}

/* ===== v27: the book feels like paper and ink ===== */
/* page turn: nothing fades, the sheet bends, light rolls across it, and it throws a shadow on the page below */
.leaf{transition-timing-function:cubic-bezier(.34,.04,.2,1)}
html.js .leaf.moving .pg:not(.cover) .pg-in{opacity:1!important;filter:none!important;transition:none!important}
@keyframes bendF{0%{transform:none}28%{transform:perspective(1500px) rotateY(-12deg) skewY(.8deg)}60%{transform:perspective(1500px) rotateY(5deg) skewY(-.3deg)}100%{transform:none}}
@keyframes bendB{0%{transform:none}28%{transform:perspective(1500px) rotateY(12deg) skewY(-.8deg)}60%{transform:perspective(1500px) rotateY(-5deg) skewY(.3deg)}100%{transform:none}}
.book::before{content:"";position:absolute;top:0;bottom:0;left:50%;width:36%;translate:-50% 0;opacity:0;pointer-events:none;z-index:58;filter:blur(7px);
  background:linear-gradient(90deg,transparent,rgba(48,34,24,.12) 22%,rgba(48,34,24,.36) 52%,rgba(48,34,24,.12) 78%,transparent)}
@keyframes castF{0%{left:92%;opacity:0}20%{opacity:.55}50%{left:50%;opacity:1}80%{opacity:.5}100%{left:8%;opacity:0}}
@keyframes castB{0%{left:8%;opacity:0}20%{opacity:.55}50%{left:50%;opacity:1}80%{opacity:.5}100%{left:92%;opacity:0}}
.stage.turning[data-dir=f] .book::before{animation:castF 1.15s cubic-bezier(.3,.05,.18,1) both}
.stage.turning[data-dir=b] .book::before{animation:castB 1.15s cubic-bezier(.3,.05,.18,1) both}
.stage[data-open="0"] .book::before,.single .book::before{display:none}
/* the page lifts when you reach for the corner */
.leaf.lift{transform:rotateY(-6deg);transition-duration:.3s;transition-delay:0s!important}
.leaf.lift.lift-b.flipped{transform:rotateY(-174deg)}
/* cursor: the pointer is invisible; a small glint of light moves with it and wakes up over anything magical */
@media (hover:hover) and (pointer:fine){
  html,html *{cursor:none!important}
  html input,html textarea,html [contenteditable]{cursor:text!important}
  html .lb-zoom{cursor:zoom-in!important}html .lb-zoom.zoomed{cursor:zoom-out!important}
}
#glint{position:fixed;left:0;top:0;width:0;height:0;pointer-events:none;z-index:99999;opacity:0;transition:opacity .2s}
#glint.on{opacity:1}
#glint i{position:absolute;left:-10px;top:-10px;width:20px;height:20px;display:block;scale:.55;transition:scale .22s cubic-bezier(.3,1.4,.4,1),opacity .2s;
  background:
    radial-gradient(circle,#fffdf2 0,#e9fff4 12%,rgba(150,240,205,.85) 26%,rgba(90,210,170,.28) 52%,transparent 72%),
    linear-gradient(90deg,transparent 0,rgba(235,255,245,.95) 50%,transparent 100%) center/100% 1.5px no-repeat,
    linear-gradient(0deg,transparent 0,rgba(235,255,245,.95) 50%,transparent 100%) center/1.5px 100% no-repeat;
  filter:drop-shadow(0 0 3px rgba(10,60,48,.85)) drop-shadow(0 0 7px rgba(110,235,190,.55))}
#glint.hot i{scale:1.5;animation:glintspin 3.2s linear infinite}
#glint.down i{scale:.8}
#glint.field{opacity:0!important}
@keyframes glintspin{to{rotate:90deg}}
#glint-sparks{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:99998}
@media (pointer:coarse),(prefers-reduced-motion:reduce){#glint,#glint-sparks{display:none}}

/* ===== v28: the closed book is a solid object ===== */
.closed-depth{position:absolute;left:50%;width:50%;top:0;height:100%;pointer-events:none;z-index:0;transition:opacity .45s ease}
.stage[data-open="1"] .closed-depth,.single .closed-depth{opacity:0}
.closed-depth i{position:absolute;display:block}
.cd-back{inset:.3em -1.3em -1.2em -.1em;border-radius:.4em .8em .8em .4em;
  background:linear-gradient(135deg,#2a4b3b 0,#10281f 40%,#06110d 100%);
  box-shadow:inset -1px -1px 0 rgba(120,200,165,.14),inset 1px 1px 0 rgba(150,230,190,.08),0 .5em .8em rgba(0,0,0,.4),0 1.8em 3.6em rgba(0,0,0,.4)}
.cd-pages-r{top:.55em;bottom:-.95em;left:calc(100% - .4em);width:1.15em;border-radius:0 .2em .2em 0;
  background:repeating-linear-gradient(to right,rgba(96,72,44,.34) 0 1px,transparent 1px 3px),linear-gradient(to right,#f1e6cb,#dfcfa9 45%,#b99e70 100%);
  box-shadow:inset 0 0 .5em rgba(70,48,24,.35)}
.cd-pages-b{left:.5em;right:-.9em;top:calc(100% - .4em);height:1.1em;border-radius:0 0 .2em .2em;
  background:repeating-linear-gradient(to bottom,rgba(96,72,44,.34) 0 1px,transparent 1px 3px),linear-gradient(to bottom,#eadfc3,#d3c29b 50%,#a88e62 100%);
  box-shadow:inset 0 0 .5em rgba(70,48,24,.35)}
.cd-pages-t{left:.6em;right:.2em;top:-.2em;height:.5em;border-radius:.2em .2em 0 0;
  background:repeating-linear-gradient(to bottom,rgba(96,72,44,.3) 0 1px,transparent 1px 3px),linear-gradient(to top,#d8c9a3,#f3ead1);opacity:.9}
.cd-spine{right:calc(100% - .4em);width:1.3em;top:.15em;bottom:.1em;border-radius:1em 0 0 1em/2em 0 0 2em;
  background:
    linear-gradient(rgba(0,0,0,.6),rgba(70,125,100,.42) 45%,rgba(0,0,0,.65)) 0 12%/100% 1em no-repeat,
    linear-gradient(rgba(0,0,0,.6),rgba(70,125,100,.42) 45%,rgba(0,0,0,.65)) 0 36%/100% 1em no-repeat,
    linear-gradient(rgba(0,0,0,.6),rgba(70,125,100,.42) 45%,rgba(0,0,0,.65)) 0 64%/100% 1em no-repeat,
    linear-gradient(rgba(0,0,0,.6),rgba(70,125,100,.42) 45%,rgba(0,0,0,.65)) 0 88%/100% 1em no-repeat,
    linear-gradient(to right,#06130e,#16382c 28%,#2b5646 52%,#0f2a20 82%,#08170f);
  box-shadow:inset 0 .15em .25em rgba(130,205,175,.2),-.3em .4em .9em rgba(0,0,0,.45)}
.pg.cover{box-shadow:0 1.6em 3em rgba(0,0,0,.6),0 .3em .8em rgba(0,0,0,.55),inset 0 0 3em rgba(0,0,0,.25),inset 1.5px 1.5px 0 rgba(150,235,195,.16),inset -1.5px 0 0 rgba(110,200,160,.10),inset 0 -2px 3px rgba(0,0,0,.3)}
/* the closed book leans toward the pointer (open book keeps its gentle float) */
.stage[data-open="0"] .book{animation:none;transform-origin:75% 50%;
  transform:perspective(1900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));
  transition:translate 1.05s cubic-bezier(.5,.1,.2,1),transform .2s ease-out}
@media (prefers-reduced-motion:reduce){.stage[data-open="0"] .book{transform:none}}

/* no shine sweeping across the cover */
.cover-btn::after{display:none!important;animation:none!important}
