/* A quiet, physical book; the actual cover and printed pages provide the texture. */
.book-stage{perspective:1400px}.book-spread.codex-object{position:relative;display:block;width:min(72%,310px);aspect-ratio:433/648;margin:32px auto 45px;padding:0;border:0;background:#361b16;transform:rotateY(-17deg) rotateX(4deg) rotateZ(-3deg);transform-style:preserve-3d;box-shadow:24px 24px 36px #0007;transition:transform .8s cubic-bezier(.2,.7,.2,1),box-shadow .8s;animation:codex-arrive 1.4s ease both;overflow:visible;border-radius:3px 7px 7px 3px;cursor:pointer}
.book-spread.codex-object>img{display:block;width:100%;height:100%;object-fit:cover;position:relative;z-index:2;border-radius:3px 7px 7px 3px;transform:none;box-shadow:none}.codex-object::after{content:'';position:absolute;inset:0;z-index:3;pointer-events:none;border-radius:inherit;background:linear-gradient(100deg,#0008,transparent 7%,#e4c68e18 13%,transparent 18%,transparent 75%,#0003);box-shadow:inset -2px 0 3px #f9dca333}.codex-block{position:absolute;inset:7px -17px 6px 4px;background:repeating-linear-gradient(0deg,#b8ab8e 0 1px,#f0e6cd 1px 3px);transform:translateZ(-13px);border-radius:0 6px 7px 0;box-shadow:4px 2px 0 #49261b}.codex-seam{position:absolute;z-index:4;inset:0 auto 0 5%;width:5px;background:linear-gradient(90deg,#0006,transparent);pointer-events:none}.codex-open-label{position:absolute;z-index:5;bottom:-45px;left:0;right:0;color:var(--gold,#b38f50);font:500 13px AdytonSans,sans-serif;letter-spacing:.08em;opacity:0;transform:translateY(-4px);transition:.3s}.codex-object:hover,.codex-object:focus-visible{transform:rotateY(-6deg) rotateX(1deg) rotateZ(-1deg) translateY(-9px);box-shadow:16px 35px 45px #0008}.codex-object:hover .codex-open-label,.codex-object:focus-visible .codex-open-label{opacity:1;transform:none}.codex-object:focus-visible{outline:2px solid #caad68;outline-offset:8px}.codex-reading{overflow:hidden}
.codex-dialog{box-sizing:border-box;width:min(1240px,96vw);max-width:none;height:min(940px,96dvh);max-height:96dvh;padding:22px 32px 16px;border:1px solid #aa87594d;border-radius:4px;color:#eee3cf;background:radial-gradient(ellipse at 50% 38%,#423327,#17110e 75%);box-shadow:0 30px 100px #000c;overflow:auto}.codex-dialog::backdrop{background:#080604e8;backdrop-filter:blur(7px)}.codex-dialog[open]{display:flex;flex-direction:column;animation:codex-dialog-in .5s ease}.codex-dialog button{font:inherit;cursor:pointer}.codex-dialog-top{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;flex-shrink:0}.codex-dialog-top h2{font-family:AdytonDisplay,Georgia,serif;font-size:30px;line-height:1.1;margin:4px 0}.codex-dialog-top p{font-size:12px;margin:5px 0;color:#baad96}.codex-dialog .small{font-size:10px;color:#bda578;letter-spacing:.13em}.codex-close{width:42px;height:42px;flex-shrink:0;background:transparent;border:1px solid #a18a654d;color:#e8d8b9;font-size:29px!important;border-radius:50%;line-height:1}.codex-view{position:relative;display:grid;place-items:center;flex:1;min-height:0;width:100%;margin:12px auto;perspective:1800px;isolation:isolate}.codex-closed{position:relative;height:100%;max-height:620px;aspect-ratio:433/648;max-width:100%;box-shadow:15px 20px 35px #0008;transform:rotateY(-8deg);border-radius:3px;animation:codex-arrive .7s ease both}.codex-closed>img{display:block;height:100%;width:100%;object-fit:contain}.codex-open-hit{position:absolute;inset:0;border:0;background:linear-gradient(0deg,#100704a8,transparent 26%);color:#ffe6a9;padding:0 15px 26px;display:flex;align-items:flex-end;justify-content:center;text-shadow:0 1px 4px #000;font-family:AdytonDisplay,Georgia,serif!important;font-size:23px!important}.codex-spread{display:grid;grid-template-columns:1fr 1fr;height:100%;aspect-ratio:4/3;max-height:620px;max-width:100%;box-shadow:0 18px 42px #0009;position:relative;background:#eee9dd;transform-style:preserve-3d}.codex-page{position:relative;display:block;min-width:0;min-height:0;width:100%;height:100%;padding:0;border:0;background:#fff;overflow:hidden}.codex-page img{display:block;width:100%;height:100%;object-fit:contain}.codex-spread::after{content:'';position:absolute;z-index:3;top:0;bottom:0;left:calc(50% - 14px);width:28px;pointer-events:none;background:linear-gradient(90deg,transparent,#0002 43%,#0005 50%,#0001 65%,transparent)}.codex-endpaper{display:grid;place-items:center;background:radial-gradient(ellipse,#ede5d5,#dfd5c1);color:#b8ab91;font:18px AdytonDisplay,Georgia,serif;text-align:center;letter-spacing:.15em;box-shadow:inset -10px 0 20px #0001}.codex-controls{display:flex;align-items:center;justify-content:center;gap:25px;flex-shrink:0}.codex-controls button{height:44px;width:44px;border:1px solid #b49b644d;border-radius:50%;background:#b4934c0a;color:#ddc083;font:30px Georgia,serif;transition:background .2s}.codex-controls button:hover:not(:disabled){background:#b4934c30}.codex-controls button:disabled{opacity:.25;cursor:default}.codex-controls span{font:12px AdytonSans,sans-serif;min-width:160px;text-align:center;color:#d2c2a7}.codex-reader-notes{text-align:center;flex-shrink:0}.codex-reader-notes p{font-size:11px;color:#ae9d85;margin:10px 0 5px}.codex-reader-notes button,.codex-again{font-size:12px!important;background:transparent;color:#c8b28a;border:0;text-decoration:underline;text-underline-offset:4px;padding:6px 10px}.codex-finish{display:grid;grid-template-columns:210px 1fr;align-items:center;gap:45px;max-width:770px;padding:20px}.codex-finish>img{width:100%;box-shadow:10px 15px 30px #0007;transform:rotate(-3deg)}.codex-finish h3{font:46px/1.05 AdytonDisplay,Georgia,serif;margin:18px 0}.codex-finish p{font:15px/1.6 AdytonReading,Georgia,serif;color:#cdbfa6}.codex-finish .codex-availability{color:#d9ba72;font-size:13px}.codex-finish .text-link{font-size:12px;text-align:center;white-space:normal}.codex-again{display:block;margin-top:16px}.codex-turning{position:absolute;inset:auto;pointer-events:none;z-index:5;backface-visibility:hidden;transform-style:preserve-3d;transform-origin:left center;animation:codex-turn-forward .75s cubic-bezier(.4,.1,.2,1) forwards}.codex-turning.codex-back{transform-origin:right center;animation-name:codex-turn-back}.codex-zoom{position:absolute;inset:0;z-index:10;padding:70px 20px 20px;background:#16110ff7;overflow:auto;text-align:center;overscroll-behavior:contain}.codex-overlay-back{position:sticky;top:0;z-index:2;display:block;margin:-50px auto 15px;padding:10px 20px;background:#30241b;border:1px solid #b49b6480;color:#ecd8ad;border-radius:2px;font-size:13px!important}.codex-zoom-image{display:block;padding:0;border:0;background:#fff;margin:auto;max-width:100%;width:800px}.codex-zoom-image img{display:block;width:100%;height:auto}.codex-zoom p{font-size:12px;color:#d2c2a7}.codex-readable{max-width:700px;text-align:left;margin:auto;padding:25px;background:#f4efdf;color:#30291f}.codex-readable h3{font:30px AdytonDisplay,Georgia,serif;margin:0 0 20px}.codex-readable [data-readable-content]{white-space:pre-wrap;font:17px/1.7 AdytonReading,Georgia,serif}.codex-dialog button:focus-visible,.codex-dialog a:focus-visible{outline:2px solid #e5c17b;outline-offset:4px}.codex-dialog [hidden]{display:none!important}
@keyframes codex-arrive{from{opacity:0;translate:0 25px}to{opacity:1;translate:0 0}}@keyframes codex-dialog-in{from{opacity:0;transform:translateY(18px) scale(.97)}to{opacity:1;transform:none}}@keyframes codex-turn-forward{0%{transform:rotateY(0);opacity:1}65%{opacity:.85}100%{transform:rotateY(-100deg);opacity:0}}@keyframes codex-turn-back{0%{transform:rotateY(0);opacity:1}100%{transform:rotateY(100deg);opacity:0}}
@media(max-width:720px){.book-spread.codex-object{width:min(65%,270px)}.codex-open-label{opacity:1}.codex-dialog{width:100vw;height:100dvh;max-height:100dvh;padding:15px 12px 12px;border:0;border-radius:0}.codex-dialog-top h2{font-size:25px}.codex-dialog-top p{font-size:10px}.codex-view{margin:10px auto;min-height:180px}.codex-single{height:100%;aspect-ratio:2/3;max-width:100%;box-shadow:0 15px 25px #0006}.codex-closed{max-height:none}.codex-finish{grid-template-columns:1fr;text-align:center;gap:20px;max-width:380px;padding:10px 20px}.codex-finish>img{width:105px;margin:auto}.codex-finish h3{font-size:36px;margin:12px 0}.codex-finish p{font-size:13px}.codex-finish .text-link{display:inline-flex}.codex-again{margin:12px auto 0}.codex-controls{gap:16px}.codex-controls span{min-width:145px}.codex-reader-notes p{font-size:10px}.codex-readable{padding:18px}.codex-readable [data-readable-content]{font-size:16px}.codex-zoom{padding:70px 10px 15px}}
@media(prefers-reduced-motion:reduce){.codex-dialog *,.book-spread.codex-object{animation:none!important;transition:none!important}.codex-turning{display:none}.book-spread.codex-object:hover{transform:rotateY(-17deg) rotateX(4deg) rotateZ(-3deg)}}
/* Definite stage height keeps percentage-sized sheets above the controls. */
.codex-view{flex:0 0 auto;height:min(620px,calc(96dvh - 235px));min-height:140px}.codex-closed,.codex-spread,.codex-single{height:100%}.codex-view>.codex-finish{height:100%;box-sizing:border-box}.codex-page{border-radius:0}.book-spread.codex-object>img{border:0}
@media(max-width:720px){.codex-view{height:calc(100dvh - 220px);min-height:160px}.codex-view>.codex-finish{overflow:auto}}
.codex-view{--codex-stage-height:max(140px,min(620px,calc(96dvh - 235px)));height:var(--codex-stage-height);grid-template-rows:minmax(0,1fr)}.codex-view>.codex-spread,.codex-view>.codex-closed,.codex-view>.codex-single{min-height:0;max-height:var(--codex-stage-height);height:var(--codex-stage-height);align-self:start}.codex-view>.codex-spread{width:min(100%,calc(var(--codex-stage-height)*4/3))}.codex-view>.codex-closed{width:min(100%,calc(var(--codex-stage-height)*433/648))}.codex-view>.codex-single{width:min(100%,calc(var(--codex-stage-height)*2/3))}
@media(max-width:720px){.codex-view{--codex-stage-height:max(160px,calc(100dvh - 220px))}}
/* Keep the closing cover proportional despite the print-resolution HTML height. */
.codex-finish{width:min(100%,770px);min-width:0;grid-template-columns:210px minmax(0,1fr)}
.codex-finish>img{height:auto;max-height:100%;object-fit:contain;min-width:0}
.codex-finish>div{min-width:0}
@media(max-width:720px){.codex-finish{grid-template-columns:minmax(0,1fr);max-width:380px}.codex-finish>img{max-height:none}}
/* Cream stock: multiply preserves the printed ink while replacing white paper. */
.codex-spread,.codex-page,.codex-single,.codex-zoom-image{background:#f0e5cb}
.codex-page img,.codex-zoom-image img{mix-blend-mode:multiply}
.codex-page::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#886d3820,transparent 12%,transparent 90%,#fff5);box-shadow:inset 0 0 28px #97724012}
.codex-spread>.codex-page:first-child::after{background:linear-gradient(90deg,#fff2,transparent 65%,#5d401f32)}
.codex-endpaper,.codex-cover-back{background:radial-gradient(ellipse at 38% 40%,#f4ead2,#ded0ad);color:#9e8557}
.codex-readable{background:#f0e5cb}
/* A real hinge at the spine; the book settles centrally as its cover opens. */
.codex-cover-leaf{position:absolute;z-index:7;top:0;left:50%;width:50%;height:100%;transform-origin:left center;transform-style:preserve-3d;animation:codex-cover-open 1.4s cubic-bezier(.25,.55,.18,1) both;pointer-events:none}
.codex-cover-front,.codex-cover-back{position:absolute;inset:0;backface-visibility:hidden;overflow:hidden}
.codex-cover-front{background:#351b18;box-shadow:7px 12px 24px #0008;border-radius:1px 5px 5px 1px;transform:translateZ(2px)}
.codex-cover-front img{display:block;width:100%;height:100%;object-fit:fill}
.codex-cover-back{display:grid;place-items:center;transform:rotateY(180deg) translateZ(2px);box-shadow:inset -10px 0 25px #6c4a2330;font:18px AdytonDisplay,Georgia,serif;text-align:center;letter-spacing:.16em}
.codex-opening{animation:codex-opening-settle 1.4s cubic-bezier(.25,.55,.18,1) both}
.codex-is-opening .codex-controls{pointer-events:none;opacity:.55}
@keyframes codex-cover-open{0%{transform:rotateY(-4deg)}15%{transform:rotateY(-12deg)}85%{transform:rotateY(-166deg)}100%{transform:rotateY(-180deg)}}
@keyframes codex-opening-settle{0%{transform:translateX(-25%) rotateX(7deg) rotateY(-9deg) scale(.94)}100%{transform:translateX(0) rotateX(0) rotateY(0) scale(1)}}
/* Only one leaf turns, leaving the facing page on the table. */
.codex-turning{inset:auto;left:50%;top:0;transform-origin:left center;animation:codex-leaf-forward .8s cubic-bezier(.35,.08,.18,1) both;background:#f0e5cb;box-shadow:5px 4px 18px #0004;overflow:visible}
.codex-turning.codex-back{left:auto;right:50%;transform-origin:right center;animation-name:codex-leaf-back}
.codex-turn-front,.codex-turn-reverse{position:absolute;inset:0;backface-visibility:hidden;overflow:hidden;background:#f0e5cb}
.codex-turn-front>*{width:100%;height:100%;margin:0;box-sizing:border-box}
.codex-turn-reverse{transform:rotateY(180deg);background:linear-gradient(90deg,#dbcba9,#f0e5cb 20%,#efe2c2);box-shadow:inset 0 0 20px #8d67301c}
@keyframes codex-leaf-forward{from{transform:rotateY(0)}to{transform:rotateY(-178deg)}}
@keyframes codex-leaf-back{from{transform:rotateY(0)}to{transform:rotateY(178deg)}}
/* The invitation is the right-hand printed page, not a separate end card. */
.codex-finish{width:100%;max-width:none;max-height:none;min-height:0;padding:0;gap:0;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;text-align:left;color:#352c20;background:#f0e5cb}
.codex-teaser{position:relative;overflow:hidden;background:#f0e5cb;min-height:0;box-shadow:inset -15px 0 24px #6a4b2525}
.codex-teaser img{display:block;width:100%;height:100%;object-fit:fill;mix-blend-mode:multiply;filter:blur(6px);opacity:.68;pointer-events:none;user-select:none}
.codex-teaser::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent 65%,#8061382c)}
.codex-teaser-seal{position:absolute;left:50%;top:50%;translate:-50% -50%;display:grid;place-items:center;width:108px;height:108px;border:1px solid #9c804e80;border-radius:50%;background:#eee0bfe8;color:#8a7046;font:15px/1.25 AdytonDisplay,Georgia,serif;letter-spacing:.15em;text-align:center;box-shadow:0 0 0 5px #eee0bf,0 0 0 6px #9c804e50}
.codex-invitation{min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:clamp(18px,3vw,46px);text-align:center;background:radial-gradient(ellipse at 65% 45%,#f7edd7,#e9dab8);box-shadow:inset 13px 0 23px #80603616;overflow:auto}
.codex-invitation .small{color:#806b48;font:10px/1.6 AdytonSans,sans-serif;letter-spacing:.12em}
.codex-printer-mark{color:#a08045;font-size:24px;margin:18px 0 0}
.codex-invitation h3{font:clamp(30px,3.6vw,48px)/1.05 AdytonDisplay,Georgia,serif;color:#3e3020;margin:16px 0}
.codex-invitation p{font:14px/1.65 AdytonReading,Georgia,serif;color:#65543c;margin:0 0 18px}
.codex-invitation .codex-edition{font:10px/1.5 AdytonSans,sans-serif;letter-spacing:.05em;margin-bottom:22px;color:#887147}
.codex-invitation .text-link{font-size:16px;line-height:1.25;white-space:normal;max-width:100%;flex-shrink:0}
.codex-invitation .codex-buy-pending{opacity:.78;cursor:default}
.codex-invitation .codex-pending-note{font:10px/1.5 AdytonSans,sans-serif;margin:12px 0 8px;color:#806b48;max-width:240px}
.codex-notify,.codex-invitation .codex-again{font:11px/1.5 AdytonSans,sans-serif!important;color:#77613e;text-underline-offset:4px}
.codex-invitation .codex-again{margin:14px auto 0}
@media(max-width:720px){
 .codex-cover-leaf{left:0;width:100%}.codex-opening{animation-name:codex-opening-mobile}
 .codex-turning,.codex-turning.codex-back{left:auto;right:auto;transform-origin:left center}
 .codex-turning.codex-back{transform-origin:right center}
 .codex-finish{grid-template-columns:minmax(0,24fr) minmax(0,76fr);max-width:none;padding:0;gap:0;text-align:center}
 .codex-invitation{padding:18px 14px}.codex-invitation h3{font-size:32px;margin:12px 0}.codex-invitation p{font-size:13px;line-height:1.55;margin-bottom:14px}.codex-invitation .text-link{font-size:14px}.codex-printer-mark{margin:10px 0 0}.codex-invitation .codex-edition{margin-bottom:16px}.codex-teaser-seal{width:60px;height:60px;font-size:10px;letter-spacing:.05em}.codex-invitation .codex-pending-note{font-size:9px}
 @keyframes codex-opening-mobile{from{transform:rotateY(-6deg) scale(.94)}to{transform:rotateY(0) scale(1)}}
}
@media(prefers-reduced-motion:reduce){.codex-opening,.codex-cover-leaf{animation:none!important}.codex-cover-leaf{display:none}.codex-is-opening .codex-controls{opacity:1}}
.codex-single{position:relative;transform-style:preserve-3d}.codex-turning{backface-visibility:visible}
@media(max-width:720px){.codex-finish::after{left:calc(24% - 14px)}}

/* End of excerpt (2026-11-15): plain endpaper instead of a blurred page,
   focus moved to the heading (the archive link no longer shows a focus box on arrival), balanced title. */
.codex-teaser{display:grid;place-items:center;background:radial-gradient(ellipse at 38% 40%,#f4ead2,#ded0ad);box-shadow:inset -15px 0 24px #6a4b251f}
.codex-teaser::after{display:none}
.codex-invitation h3{text-wrap:balance;outline:none}
.codex-invitation p{text-wrap:pretty}
@media(max-width:720px){.codex-finish{grid-template-columns:minmax(0,1fr)}.codex-finish .codex-teaser,.codex-finish::after{display:none}.codex-invitation{padding:28px 20px}}

/* Legible controls keep a full touch target around the quiet text links. */
.codex-dialog{font-family:AdytonSans,Arial,sans-serif}
.codex-close{width:44px;height:44px}
.codex-dialog-top p{font-size:13px;line-height:1.45;color:#c7b99f}
.codex-controls span{font-size:13px}
.codex-reader-notes p{font-size:12px;line-height:1.5;color:#c7b99f;margin:8px 0 0}
.codex-reader-notes button,.codex-again,.codex-invitation .codex-again{min-height:44px;padding:10px 12px;font:14px/1.4 AdytonSans,Arial,sans-serif!important}
.codex-overlay-back{min-height:44px;font-size:14px!important}
.codex-view{--codex-stage-height:max(140px,min(620px,calc(96dvh - 275px)))}
@media(max-width:720px){.codex-dialog-top p{font-size:12px}.codex-reader-notes p{font-size:12px}.codex-view{--codex-stage-height:max(160px,calc(100dvh - 260px))}}
