/* v55: existing v54 bookshelf styling only. The case-study stack has moved
   to case-study-stack.css. See COMPONENTS-V55.md for source and scope.
   No inherited versioned card rules are used by these components. */
.page-home #work.work-flip,
.page-home #writing.writing-shelf-section { padding-block: var(--space-narrative) !important; overflow: visible; }
.work-flip__heading,.writing-shelf-heading { display:grid; grid-template-columns: minmax(0,1.35fr) minmax(240px,.65fr); align-items:end; gap:28px 56px; }
.work-flip__heading h2,.writing-shelf-heading h2 { font:500 clamp(44px,5.7vw,86px)/.97 var(--font-display); letter-spacing:-.045em; margin-top:20px; }
.work-flip__heading > p,.writing-shelf-heading__aside > p { font-size:16px; line-height:1.55; color:var(--ink-soft); }
/* Textile covers. Text remains real, accessible HTML rather than a canvas. */
.writing-shelf-heading__aside { display:grid; gap:24px; justify-items:start; }
.bookshelf-filter { display:flex; flex-wrap:wrap; gap:6px; }
.bookshelf-filter button { min-height:44px; padding:10px 17px; border:1px solid rgba(41,46,38,.2); border-radius:999px; background:transparent; color:var(--ink); font:500 13px var(--font-body); }
.bookshelf-filter button[aria-pressed="true"] { background:var(--ink); color:var(--paper); border-color:var(--ink); }
.bookshelf-filter button:is(:hover,:focus-visible) { border-color:var(--orange); outline-offset:4px; }
.newsletter-bookshelf { position:relative; margin-top:48px; }
.bookshelf__stage { position:relative; }
.bookshelf__books { list-style:none; padding:0; width:min(1240px,calc(100% - 96px)); margin:auto; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:24px; }
.shelf-book { --book-height:360px; --book-depth:240px; --book-width:54px; min-width:0; position:relative; }
.shelf-book[hidden] { display:none !important; }
.shelf-book__button { display:block; width:100%; border:0; padding:0; background:transparent; color:var(--book-ink); text-align:left; font-family:var(--font-body); }
.shelf-book__cover { display:flex; flex-direction:column; height:340px; padding:24px; background:var(--book-color); border-radius:3px 7px 7px 3px; color:var(--book-ink); box-shadow:0 7px 12px rgba(41,46,38,.15); background-image:repeating-linear-gradient(0deg,transparent 0 2px,rgba(255,255,255,.03) 2px 3px),repeating-linear-gradient(90deg,transparent 0 2px,rgba(0,0,0,.035) 2px 3px); }
.shelf-book__category { font-size:12px; line-height:1.4; }
.shelf-book__cover-title { display:block; font:600 32px/1.08 var(--font-display); letter-spacing:-.02em; margin-top:46px; }
.shelf-book__cover-rule { width:48px; height:3px; background:currentColor; margin-top:24px; }
.shelf-book__byline { display:flex; justify-content:space-between; gap:12px; margin-top:auto; padding-top:20px; font-size:12px; }
.shelf-book__face:not(.shelf-book__cover),.bookshelf__ledge { display:none; }
.bookshelf__topline[hidden],.bookshelf__bottom[hidden],.bookshelf__focus-actions > [hidden] { display:none !important; }
.bookshelf__topline { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:48px; font-size:13px; }
.bookshelf__focus-actions { display:flex; gap:8px; }
.bookshelf__focus-actions button { min-height:44px; padding:10px 14px; background:transparent; color:var(--ink); border:1px solid rgba(41,46,38,.18); border-radius:999px; font:500 12px var(--font-body); }
.bookshelf__focus-actions button > span { margin-left:10px; font-size:18px; }
.bookshelf__focus-actions button:is(:hover,:focus-visible) { border-color:var(--orange); outline-offset:4px; }
.bookshelf__bottom { display:flex; align-items:center; justify-content:space-between; gap:24px; min-height:108px; padding-top:18px; }
.bookshelf__caption { min-width:0; }
.bookshelf__caption > span { font-size:12px; color:var(--ink-soft); }
.bookshelf__caption > p { font:500 clamp(20px,2.3vw,30px)/1.22 var(--font-display); margin-top:6px; }
.bookshelf__caption a { font-size:14px; display:inline-flex; align-items:center; gap:16px; min-height:44px; }
.bookshelf__caption a[hidden] { display:none; }
.bookshelf__caption a svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.6; }
.bookshelf__navigation { display:flex; align-items:center; flex-shrink:0; gap:14px; }
.bookshelf__navigation button { width:48px; height:48px; display:grid; place-items:center; border:1px solid rgba(41,46,38,.3); background:transparent; color:var(--ink); border-radius:50%; }
.bookshelf__navigation button:is(:hover,:focus-visible) { background:var(--ink); color:var(--paper); outline-offset:4px; }
.bookshelf__navigation button:disabled { opacity:.25; background:transparent; color:var(--ink); }
.bookshelf__navigation span { font-size:12px; font-variant-numeric:tabular-nums; }
.bookshelf__navigation svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.6; }
/* Progressive 3D stage. All dimensions are set together by ResizeObserver. */
.newsletter-bookshelf.is-enhanced .bookshelf__stage { overflow:hidden; height:520px; perspective:1100px; perspective-origin:50% calc(92px + var(--max-book-height,360px)); touch-action:pan-y; outline-offset:-3px; isolation:isolate; }
.newsletter-bookshelf.is-enhanced .bookshelf__stage:focus-visible { outline:2px solid var(--orange); }
.newsletter-bookshelf.is-enhanced .bookshelf__books { display:block; position:absolute; top:0; left:50%; width:0; height:100%; margin:0; padding:0; transform-style:preserve-3d; }
.newsletter-bookshelf.is-enhanced .shelf-book { position:absolute; top:92px; left:0; width:var(--book-width); height:var(--book-height); margin:0; transform-style:preserve-3d; }
.newsletter-bookshelf.is-enhanced .shelf-book__button { position:relative; width:var(--book-width); height:var(--book-height); transform-style:preserve-3d; outline:none; }
.newsletter-bookshelf.is-enhanced .shelf-book__object { display:block; position:absolute; inset:0; transform-style:preserve-3d; will-change:transform; }
.newsletter-bookshelf.is-enhanced .shelf-book__face { display:block; position:absolute; top:0; left:50%; backface-visibility:hidden; background-color:var(--book-color); color:var(--book-ink); }
.newsletter-bookshelf.is-enhanced .shelf-book__spine { width:var(--book-width); height:var(--book-height); transform:translateX(-50%) translateZ(calc(var(--book-depth) / 2)); border-radius:6px; box-shadow:inset 4px 0 5px rgba(255,255,255,.09),inset -7px 0 8px rgba(0,0,0,.2); display:flex; flex-direction:column; align-items:center; padding:18px 5px; background-image:linear-gradient(90deg,rgba(0,0,0,.21),transparent 25%,transparent 70%,rgba(0,0,0,.15)),repeating-linear-gradient(0deg,transparent 0 2px,rgba(255,255,255,.035) 2px 3px),repeating-linear-gradient(90deg,transparent 0 2px,rgba(0,0,0,.025) 2px 3px); }
.newsletter-bookshelf.is-enhanced .shelf-book__spine::before,.newsletter-bookshelf.is-enhanced .shelf-book__spine::after { content:""; position:absolute; left:10px; right:10px; height:1px; background:currentColor; opacity:.6; }
.newsletter-bookshelf.is-enhanced .shelf-book__spine::before { top:12px; }
.newsletter-bookshelf.is-enhanced .shelf-book__spine::after { bottom:12px; }
.shelf-book__number { font:500 12px/1 var(--font-body); }
.shelf-book__spine-title { white-space:nowrap; writing-mode:vertical-rl; font:600 19px/1.1 var(--font-display); letter-spacing:.005em; margin:18px auto auto; max-height:calc(var(--book-height) - 96px); }
.shelf-book__spine-mark { font:500 19px var(--font-display); padding-top:12px; }
.newsletter-bookshelf.is-enhanced .shelf-book__cover { display:flex; width:var(--book-depth); height:var(--book-height); transform:translateX(-50%) translateX(calc(var(--book-width) / 2)) rotateY(90deg); box-shadow:inset 6px 0 8px rgba(0,0,0,.22),inset -1px 0 2px rgba(0,0,0,.1); padding:26px; }
.newsletter-bookshelf.is-enhanced .shelf-book__cover-title { font-size:31px; margin-top:42px; }
.newsletter-bookshelf.is-enhanced .shelf-book__back { width:var(--book-depth); height:var(--book-height); transform:translateX(-50%) translateX(calc(var(--book-width) / -2)) rotateY(-90deg); border-radius:3px; }
.newsletter-bookshelf.is-enhanced .shelf-book__pages { width:calc(var(--book-width) - 8px); height:calc(var(--book-height) - 6px); transform:translateX(-50%) translateZ(calc(var(--book-depth) / -2 + 3px)) rotateY(180deg); top:3px; background:repeating-linear-gradient(90deg,#e4dfd2 0 1px,#ccc8b9 1px 2px,#f7f4e8 2px 3px); }
.newsletter-bookshelf.is-enhanced .shelf-book__top,.newsletter-bookshelf.is-enhanced .shelf-book__bottom { width:calc(var(--book-width) - 6px); height:calc(var(--book-depth) - 4px); background:repeating-linear-gradient(90deg,#e4dfd2 0 1px,#ccc8b9 1px 2px,#f7f4e8 2px 3px); }
.newsletter-bookshelf.is-enhanced .shelf-book__top { transform:translateX(-50%) translateY(-50%) rotateX(90deg); top:2px; }
.newsletter-bookshelf.is-enhanced .shelf-book__bottom { transform:translateX(-50%) translateY(-50%) rotateX(-90deg); top:calc(var(--book-height) - 2px); }
.newsletter-bookshelf.is-enhanced .shelf-book__button:focus-visible .shelf-book__spine,
.newsletter-bookshelf.is-enhanced .shelf-book.is-selected .shelf-book__button:focus-visible .shelf-book__cover { outline:3px solid var(--orange); outline-offset:3px; }
.newsletter-bookshelf.is-enhanced .bookshelf__ledge { display:block; position:absolute; z-index:-1; top:calc(92px + var(--max-book-height,360px) + 5px); left:0; width:100%; height:20px; background:linear-gradient(#e1ddd1,#d4cfc1 3px,#e4dfd2 4px,#e4dfd2); box-shadow:0 14px 22px rgba(41,46,38,.08); }
@media (max-width:900px) {
 .bookshelf__books { grid-template-columns:repeat(2,minmax(0,1fr)); width:calc(100% - 48px); }
 .work-flip__heading,.writing-shelf-heading { grid-template-columns:1fr; gap:24px; }
 .writing-shelf-heading__aside { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:20px; }
}
@media (max-width:620px) {
 .page-home #work.work-flip,.page-home #writing.writing-shelf-section { padding-block:72px !important; }
 .work-flip__heading h2,.writing-shelf-heading h2 { font-size:48px; }
 .newsletter-bookshelf { margin-top:32px; }
 .bookshelf__topline { flex-direction:column; align-items:flex-start; gap:8px; min-height:88px; }
 .bookshelf__focus-actions { min-height:44px; }
 .newsletter-bookshelf.is-enhanced .bookshelf__stage { height:480px; perspective:1000px; perspective-origin:50% calc(84px + var(--max-book-height,320px)); }
 .newsletter-bookshelf.is-enhanced .shelf-book { top:84px; }
 .newsletter-bookshelf.is-enhanced .bookshelf__ledge { top:calc(84px + var(--max-book-height,320px) + 5px); }
 .newsletter-bookshelf.is-enhanced .shelf-book__cover { padding:24px; }
 .newsletter-bookshelf.is-enhanced .shelf-book__cover-title { font-size:29px; margin-top:35px; }
 .bookshelf__bottom { flex-direction:column; align-items:flex-start; gap:16px; }
 .bookshelf__navigation { align-self:flex-end; }
 .bookshelf__caption { min-height:62px; }
 .bookshelf__books { width:calc(100% - 32px); gap:16px; }
 .shelf-book__cover { height:300px; padding:18px; }
 .shelf-book__cover-title { font-size:25px; }
 .bookshelf-filter button { padding-inline:14px; }
}
@media (max-width:370px) { .bookshelf__books { grid-template-columns:1fr; } }

.shelf-book__button:disabled { opacity:1; color:var(--book-ink); cursor:default; }
html:not(.js) .bookshelf-filter { display:none; }


