/* The notebook collection is a book: paper, a shared spine and turning leaves. */
.notebook-book{--paper:#f1ecdf;--paper-ink:#202e22;--paper-copy:#43503e;--page-height:640px;--book-closed-pose:translateX(-25%) rotateX(12deg) rotateY(-13deg) rotateZ(6deg);--book-open-pose:translateX(0%) rotateX(4deg) rotateY(2deg) rotateZ(2deg);position:relative;margin:18px 0 0}
.book-stage{perspective:2200px;outline-offset:12px;padding:52px 30px 70px;touch-action:pan-y pinch-zoom}
.book-float{position:relative;transform-style:preserve-3d;pointer-events:none}
.book-page,.book-closed-cover{pointer-events:auto}
.book-leaf .book-page{pointer-events:none}
.book-pose{position:relative;transform-style:preserve-3d}
.notebook-book.is-enhanced .book-pose{transform:var(--book-open-pose)}
.notebook-book[data-open-state=closed] .book-pose{transform:var(--book-closed-pose)}
.notebook-book[data-open-state=closed] .book-float{animation:book-float 5s ease-in-out infinite;animation-play-state:paused}
.notebook-book[data-open-state=closed][data-visible=true] .book-float{animation-play-state:running}
.notebook-book[data-open-state=closed] .book-float:has(.book-closed-cover:is(:hover,:focus-visible)){animation-play-state:paused}
@keyframes book-float{0%,100%{transform:translateY(0) rotateZ(0deg)}50%{transform:translateY(-11px) rotateZ(.3deg)}}
.book-pose::before{content:"";display:none;position:absolute;inset:13% 2% -12px 2%;background:#0009;filter:blur(24px);transform:translate3d(12px,24px,-22px);pointer-events:none}
.notebook-book[data-open-state=closed] .book-pose::before{left:50%}
.book-back-cover,.book-page-edges{display:none}
.notebook-book.is-enhanced :is(.book-back-cover,.book-page-edges),.notebook-book.is-enhanced .book-pose::before{display:block}
.book-back-cover{position:absolute;inset:0;transform:translateZ(-7px);transform-style:preserve-3d;pointer-events:none}
.book-back-cover>span{position:absolute;top:0;bottom:0;left:50%;width:50%;background:#283e2b;border-radius:3px;box-shadow:0 14px 24px -18px #0009}
.book-back-cover .book-board-left{transform-origin:left center;transform:rotateY(-180deg)}
.book-page-edges{position:absolute;inset:4px 4px -3px;transform:translateZ(-3px);pointer-events:none}
.book-page-edges>span{position:absolute;top:0;bottom:0;width:calc(50% - 1px);background:#e4ddca;border-radius:2px;box-shadow:inset 0 -1px #b7b09b,inset 0 -3px #f6efde}
.book-stack-left{left:0}.book-stack-right{right:0}
.book-volume{position:relative;padding:4px;transform-style:preserve-3d}
.book-volume::after{content:"";position:absolute;top:4px;bottom:4px;left:calc(50% - 9px);width:18px;background:linear-gradient(90deg,transparent,#463c282b 47%,#fff3 52%,transparent);pointer-events:none;z-index:2}
#notebook-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;position:relative}
.notebook-book[data-open-state=closed] .book-board-left{transform:rotateY(0deg)}
.notebook-book[data-open-state=closed] .book-stack-left{opacity:0}
.notebook-book[data-open-state=closed] #notebook-list>.book-page{visibility:hidden}
.notebook-book[data-open-state=closed] .book-volume::after{visibility:hidden}
.book-closed-cover{position:absolute;left:50%;top:0;bottom:0;width:50%;z-index:6;transform:translateZ(0);transform-origin:left center}
.notebook-book[data-open-state=opening] #notebook-list>[data-side=left]{visibility:hidden}
.notebook-book[data-open-state=closing] #notebook-list>[data-side=left]{visibility:hidden}
.book-page{box-sizing:border-box;position:relative;display:flex;flex-direction:column;min-width:0;min-height:var(--page-height);padding:32px 32px 54px;background:var(--paper);color:var(--paper-ink);border:0;border-radius:3px;overflow-wrap:anywhere}
.book-page:nth-child(odd),.book-page[data-side=left]{background:linear-gradient(90deg,#eee8d7,var(--paper) 7%,#f6f1e5 89%,#ddd5bf)}
.book-page:nth-child(even),.book-page[data-side=right]{background:linear-gradient(90deg,#ddd5bf,#f6f1e5 11%,var(--paper) 93%,#eee8d7)}
.book-page::after{content:"";position:absolute;right:0;bottom:0;width:18px;height:18px;background:linear-gradient(135deg,#c9c0a7,#e1d8bf 50%,#f9f6ed 51%);clip-path:polygon(100% 0,100% 100%,0 100%);transition:width 220ms ease-out,height 220ms ease-out;pointer-events:none}
.book-page:hover::after,.book-page:focus-within::after{width:28px;height:28px}
.book-page[data-side=left]::after{left:0;right:auto;clip-path:polygon(0 0,100% 100%,0 100%);background:linear-gradient(225deg,#c9c0a7,#e1d8bf 50%,#f9f6ed 51%)}
.notebook-book.is-enhanced .book-page{cursor:grab}
.notebook-book.is-enhanced .book-page :is(a,button){cursor:pointer}
.notebook-book.is-enhanced .book-page :is(h3,p,li){cursor:text}
.book-page .notebook-cover{flex:1}
.book-page h3{font-family:var(--display);font-size:clamp(24px,2.3vw,29px);font-weight:550;line-height:1.2;letter-spacing:-.03em;margin:0 0 14px;color:var(--paper-ink)}
.book-page .notebook-title{display:flex;align-items:start;justify-content:space-between;gap:16px;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:5px;color:var(--paper-ink)}
.book-page .notebook-title:hover{color:#19381f;text-decoration-color:#546e42}
.book-page .notebook-title svg{width:18px;height:18px;flex:none;margin-top:4px}
.book-page p{font-size:15px;line-height:1.65;margin:0;color:var(--paper-copy)}
.book-page .notebook-approach{margin-top:12px}
.notebook-details{margin:14px 0 0;padding-left:18px;font-size:13px;line-height:1.6;color:#40543a}
.notebook-details li{margin:0}
.notebook-details li+li{margin-top:6px}
.notebook-details li::marker{color:#657951}
.book-page .notebook-subject{font-size:13px;color:#526a43;margin:0 0 16px}
.book-page .notebook-note{font-size:13px;line-height:1.65;margin-top:12px;color:#4c5b41}
.book-page .inline-credit{display:inline;color:#294824;text-decoration:underline;text-underline-offset:3px}
.book-page .inline-credit:hover{color:#172f18}
.book-page .inline-credit svg{display:none}
.book-page :is(a,button):focus-visible{outline:2px solid #6b542a;outline-offset:5px}
.book-page .notebook-bottom{border-top:1px solid #b9bea9;padding-top:14px;margin-top:20px}
.book-page .notebook-meta{font-size:12px;line-height:1.6;color:#4b5741}
.book-page .notebook-meta>span{font-weight:500;color:#263c27}
.book-page .notebook-status{display:flex;flex-wrap:wrap;gap:5px 16px;font-size:12px;line-height:1.7;margin-top:8px}
.book-page .notebook-medal{color:#505340}
.book-page .medal-bronze{color:#804c25}
.book-page .run-complete{color:#385c31}
.book-page-number{position:absolute;left:0;right:0;bottom:20px;text-align:center;font-size:12px;font-variant-numeric:tabular-nums;color:#5c624d}
.book-grab{display:none;position:absolute;bottom:5px;width:46px;height:46px;border-radius:4px;color:#5a6c46;cursor:grab;touch-action:pan-y pinch-zoom;background:transparent;z-index:2}
.book-grab:active{cursor:grabbing}
.book-grab-prev{left:3px}.book-grab-next{right:3px}
.book-grab-prev svg{transform:rotate(180deg)}
.notebook-book.is-enhanced .book-page[data-side=left]>.book-grab-prev,.notebook-book.is-enhanced .book-page[data-side=right]>.book-grab-next{display:grid;place-items:center}
.book-page .book-grab:hover{color:#1c3f25;background:#c6cdb540}
.book-grab:disabled{opacity:.2;cursor:default}
.book-leaf .book-grab{visibility:hidden}
.book-axis{position:absolute;width:0;height:0;visibility:hidden;pointer-events:none}
.notebook-book[data-dragging] .book-stage{cursor:grabbing;user-select:none}
.book-ending{justify-content:center;gap:20px}
.book-ending h3{max-width:10ch;font-size:38px;margin:0}
.book-ending p{max-width:32ch}
.notebook-book.is-enhanced #notebook-list>.book-page{grid-row:1}
.notebook-book.is-enhanced .book-page{height:var(--page-height);min-height:0}
.notebook-book.is-enhanced .book-page .notebook-cover{touch-action:pan-y pinch-zoom;min-height:0;overflow:auto;overscroll-behavior:auto;scrollbar-width:thin;scrollbar-color:#a5ae8c transparent;padding-right:8px;scrollbar-gutter:stable}
.notebook-book.is-enhanced .notebook-bottom{flex:none}
.notebook-book.is-enhanced #notebook-list>[data-side=left]{grid-column:1}
.notebook-book.is-enhanced #notebook-list>[data-side=right]{grid-column:2}
.book-navigation{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-top:14px}
.book-close{min-height:44px;font-size:13px;color:var(--work-copy);text-decoration:underline;text-underline-offset:5px}
.book-turn-controls{display:flex;align-items:center;gap:18px}
.book-turn-controls button{display:grid;place-items:center;width:48px;height:48px;border:1px solid #54634a;border-radius:50%;color:#d0dcc5;transition:background 160ms ease-out}
.book-turn-controls button:hover:not(:disabled){background:#2d3b28}
.book-turn-controls button:disabled{opacity:.3;cursor:default}
#book-prev svg{transform:rotate(180deg)}
#book-position{font-size:13px;line-height:1.6;color:var(--work-copy);min-width:130px;text-align:center;margin:0;font-variant-numeric:tabular-nums}
.book-contents{display:flex;align-items:center;gap:14px;font-size:13px;color:var(--work-copy);min-width:0;max-width:46%}
.book-contents select{font-family:var(--sans);font-size:14px;color:var(--ink);background:#1c291d;border:1px solid #4e5e44;border-radius:8px;padding:10px 28px 10px 12px;min-height:44px;width:min(350px,100%);max-width:100%;text-overflow:ellipsis}
.book-leaf{position:absolute;z-index:5;transform-style:preserve-3d;pointer-events:none;will-change:transform}
.book-leaf-face{position:absolute;inset:0;backface-visibility:hidden;overflow:hidden;border-radius:3px}
.book-leaf-face>.book-page{width:100%;height:100%;min-height:0}
.book-leaf-back{transform:rotateY(180deg);visibility:hidden}
.book-leaf-light{position:absolute;inset:0;background:linear-gradient(90deg,#0b150966,transparent 65%,#0b150922);opacity:0;pointer-events:none}
.book-cover-leaf>.book-leaf-back{background:#283e2b;padding:4px 1px 4px 4px;border-radius:9px 5px 5px 9px}
.book-cover-leaf>.book-leaf-back>.book-page{height:100%}
.notebook-book:is([data-open-state=opening],[data-open-state=closing]) .book-navigation{visibility:hidden;pointer-events:none}
.book-stage:focus:not(:focus-visible){outline:none}
@media(max-width:1000px){.book-page{padding:30px 28px 56px}.book-page h3{font-size:27px}.book-contents{max-width:45%}.book-contents select{width:240px}}
/* Full-size notes remain in the DOM; compact spreads have a readable companion. */
.book-gesture-hint{display:none;margin:0 0 8px;text-align:center;font-size:12px;color:#afbea4}
.book-reading{border-top:1px solid #3d4e35;margin-top:18px}
.book-reading summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px;padding:12px 0;color:var(--ink);font-size:15px;cursor:pointer;list-style:none}
.book-reading summary::-webkit-details-marker{display:none}
.book-reading summary svg{width:18px;height:18px;transition:transform 180ms ease-out}
.book-reading[open] summary svg{transform:rotate(180deg)}
.book-reading summary:focus-visible{outline:2px solid var(--orange);outline-offset:4px}
.book-reading-note{padding:16px 0 24px}
.book-reading-note+.book-reading-note{border-top:1px solid #3d4e35;padding-top:26px}
.book-reading-note h3{font:550 24px/1.2 var(--display);letter-spacing:-.025em;margin:0 0 14px}
.book-reading-note .notebook-title{display:inline-flex;align-items:start;gap:10px;text-decoration:underline;text-decoration-color:#849575;text-underline-offset:5px}
.book-reading-note .notebook-title svg{flex:none;margin-top:4px;width:18px;height:18px}
.book-reading-note p{font-size:16px;line-height:1.75;color:var(--work-copy);margin:12px 0}
.book-reading-note .notebook-subject{font-size:14px;color:#b4c8a2}
.book-reading-note .notebook-details{font-size:15px;line-height:1.75;color:var(--work-copy);padding-left:20px;margin:14px 0}
.book-reading-note .notebook-note{font-size:14px}
.book-reading-note .notebook-meta,.book-reading-note .notebook-status{font-size:13px;line-height:1.7;color:#b4c8a2}
.book-reading-note .notebook-status{display:flex;flex-wrap:wrap;gap:8px 16px}
.book-reading-note .notebook-bottom{padding-top:4px}
@media(max-width:700px), (max-width:1100px) and (max-height:500px){
 .notebook-book{--page-height:280px;--book-closed-pose:translateX(-25%) rotateX(7deg) rotateY(-12deg) rotateZ(4deg);--book-open-pose:translateX(0%) rotateX(2deg) rotateY(0deg) rotateZ(0deg);margin-top:12px}
 .book-stage{padding:22px 8px 26px;perspective:1600px;outline-offset:2px}
 .book-pose::before{filter:blur(12px);transform:translate3d(3px,12px,-16px)}
 .book-volume::after{width:12px;left:calc(50% - 6px)}
 /* No-JavaScript readers keep automatic-height, complete notes. */
 .notebook-book:not(.is-enhanced) #notebook-list{grid-template-columns:1fr}
 .notebook-book.is-enhanced .book-page{padding:16px 13px 34px}
 .notebook-book.is-enhanced .book-page .notebook-cover{overflow:hidden;padding:0;scrollbar-gutter:auto;overscroll-behavior:auto}
 .notebook-book.is-enhanced .book-page h3{font-size:clamp(14px,4.2vw,19px);line-height:1.2;letter-spacing:-.025em;margin-bottom:9px}
 .notebook-book.is-enhanced .book-page .notebook-title{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;min-height:44px}
 .notebook-book.is-enhanced .book-page .notebook-title svg{display:none}
 .notebook-book.is-enhanced .book-page .notebook-subject{font-size:11px;line-height:1.4;margin-bottom:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .notebook-book.is-enhanced .book-page .notebook-cover>p:not([class]){display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.5;margin:0}
 .notebook-book.is-enhanced .book-page :is(.notebook-approach,.notebook-details,.notebook-note,.notebook-status){display:none}
 .notebook-book.is-enhanced .book-page .notebook-bottom{padding-top:8px;margin-top:10px}
 .notebook-book.is-enhanced .book-page .notebook-meta{font-size:0}
 .notebook-book.is-enhanced .book-page .notebook-meta>span{font-size:11px}
 .notebook-book.is-enhanced .book-ending h3{font-size:20px;max-width:9ch}
 .notebook-book.is-enhanced .book-ending p{font-size:12px;line-height:1.5}
 .notebook-book.is-enhanced .book-ending p:last-child{display:none}
 .book-page-number{font-size:11px;bottom:13px}
 .book-grab{bottom:0;width:44px;height:44px}
 .book-grab-prev{left:0}.book-grab-next{right:0}
 .book-page::after,.book-page:hover::after,.book-page:focus-within::after{width:12px;height:12px}
 .notebook-book.is-enhanced:not([data-open-state=closed]) .book-gesture-hint{display:block}
 .book-navigation{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 12px;margin-top:4px}
 .book-turn-controls{grid-column:1;gap:4px;justify-content:space-between;min-width:0}
 .book-turn-controls button{width:44px;height:44px;flex:none}
 #book-position{min-width:0;font-size:12px;line-height:1.4}
 .book-close{grid-column:2;font-size:13px;white-space:nowrap;min-height:44px}
 .book-contents{grid-column:1/-1;grid-row:2;max-width:none;gap:12px;width:100%;font-size:14px}
 .book-contents select{font-size:16px;flex:1;width:0;min-width:0;min-height:44px;padding-block:8px}
 .book-reading-note .notebook-title{min-height:44px}
}
@media(max-width:360px){
 .book-stage{padding-inline:4px}
 .notebook-book.is-enhanced .book-page{padding:13px 10px 32px}
 .notebook-book.is-enhanced .book-page h3{font-size:14px;margin-bottom:7px}
 .notebook-book.is-enhanced .book-page .notebook-subject{margin-bottom:8px}
 .notebook-book.is-enhanced .book-page .notebook-cover>p:not([class]){font-size:11px}
 #book-position{font-size:11px}
 .book-navigation{column-gap:8px}
}
@media(min-width:541px) and (max-width:1100px) and (max-height:500px){
 .book-stage{padding-block:12px 18px}
 .notebook-book.is-enhanced .book-gesture-hint{display:none}
 .book-navigation{grid-template-columns:minmax(180px,1fr) minmax(0,1.2fr) auto;gap:10px}
 .book-turn-controls{grid-column:1;grid-row:1}
 .book-contents{grid-column:2;grid-row:1;font-size:13px;gap:8px}
 .book-close{grid-column:3;grid-row:1}
 .notebook-book.is-enhanced .book-page .notebook-cover>p:not([class]){-webkit-line-clamp:3}
}
@media(prefers-reduced-motion:reduce){.book-page::after,.book-turn-controls button,.book-reading summary svg{transition:none}.book-leaf{will-change:auto}.notebook-book[data-open-state=closed] .book-float{animation:none}}
