@font-face{font-family:Epilogue;src:url('../assets/fonts/epilogue-400.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:Epilogue;src:url('../assets/fonts/epilogue-600.ttf') format('truetype');font-weight:600;font-display:swap}
@font-face{font-family:JetBrains;src:url('../assets/fonts/jetbrains-mono-400.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:JetBrains;src:url('../assets/fonts/jetbrains-mono-700.ttf') format('truetype');font-weight:700;font-display:swap}
:root{color-scheme:dark;--bg:#20120e;--panel:#2a1a14;--ink:#e8dfd0;--muted:#b7a594;--line:#ffffff25;--accent:#ff7e27;--paper:#eee5d7;--mono:JetBrains,monospace}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:400 14px/1.6 Epilogue,Arial,sans-serif;-webkit-font-smoothing:antialiased}a{color:inherit;text-decoration:none}button,select{font:inherit;color:inherit}button,a,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.28;cursor:default}button:focus-visible,a:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:4px}button[hidden],a[hidden],[hidden]{display:none!important}img{max-width:100%}.icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}.mono{font-family:var(--mono)}
.site-shell{max-width:1440px;margin:auto;padding:0 48px}.masthead{min-height:95px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:24px}.brand{display:flex;align-items:center;min-height:44px}.brand img{width:122px;height:40px;object-fit:contain}.back-link{display:flex;align-items:center;gap:12px;font:400 10px var(--mono);letter-spacing:.04em;min-height:44px}.back-link:hover{color:var(--accent)}.back-link .icon{width:17px;height:17px}.brand-line{font:400 9px var(--mono);letter-spacing:.14em;color:var(--muted)}
.menu-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:28px;padding:31px 0 27px}.eyebrow{font:400 9px var(--mono);letter-spacing:.1em;color:var(--muted);margin:0 0 10px}.eyebrow::before{content:"";display:inline-block;width:18px;height:1px;background:var(--accent);vertical-align:middle;margin-right:10px}h1{font:700 clamp(28px,3.3vw,46px)/1.14 var(--mono);letter-spacing:-.07em;margin:0}.menu-switch{display:flex;gap:5px;padding:4px;border:1px solid var(--line);border-radius:4px;flex-wrap:wrap}.menu-switch a{font:400 10px var(--mono);padding:11px 13px;min-height:40px;border-radius:2px;display:flex;align-items:center;justify-content:center;white-space:nowrap;color:var(--muted)}.menu-switch a[aria-current=page]{background:var(--ink);color:var(--bg)}.menu-switch a:not([aria-current]):hover{background:var(--panel);color:var(--ink)}
.reader{border:1px solid var(--line);border-radius:5px;overflow:hidden;background:var(--panel)}.reader-topline{display:flex;align-items:center;justify-content:space-between;gap:15px;min-height:44px;padding:11px 20px;border-bottom:1px solid var(--line);font:400 9px var(--mono);color:var(--muted);letter-spacing:.03em}.reader-topline strong{font-weight:400;color:var(--ink)}.reader-dot{display:inline-block;width:5px;height:5px;background:var(--accent);border-radius:50%;margin-right:8px;vertical-align:middle}
.reader-viewport{position:relative;height:clamp(420px,67svh,920px);overflow:auto;overscroll-behavior:contain;touch-action:pan-y pinch-zoom;background-color:#180d09;background-image:radial-gradient(#ffffff10 .7px,transparent .7px),radial-gradient(ellipse at center,#5c38294d,transparent 75%);background-size:12px 12px,100% 100%;scrollbar-color:#82634d #20120e;scrollbar-width:thin}.reader-viewport[data-zoomed=true]{touch-action:pan-x pan-y pinch-zoom;cursor:grab}.reader-viewport.is-panning{cursor:grabbing}.zoom-canvas{display:grid;place-items:center;min-width:100%;min-height:100%;padding:22px;position:relative}.book{position:relative;display:flex;flex:none;background:var(--paper);box-shadow:0 18px 60px #0008,0 2px 5px #0008;isolation:isolate;user-select:none;-webkit-user-select:none;outline:none}.book.is-spread::after{content:"";position:absolute;left:50%;top:0;bottom:0;width:26px;transform:translateX(-50%);background:linear-gradient(90deg,transparent,#00000018 44%,#0000002d 50%,#ffffff18 54%,transparent);pointer-events:none;z-index:2}.page{position:relative;flex:1;min-width:0;height:100%;background:var(--paper);display:grid;place-items:center;overflow:hidden}.page img{display:block;width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none;pointer-events:none}.page.is-empty{background:linear-gradient(90deg,#ddd2bf,#eee5d7);color:#735c4b;font:400 10px var(--mono)}.page.is-loading::after{content:"";position:absolute;width:20px;height:20px;border:2px solid #3e231a30;border-top-color:#ac3e16;border-radius:50%;animation:loading-turn .8s linear infinite}.page-error{position:absolute;inset:0;padding:24px;display:flex;flex-direction:column;gap:16px;align-items:center;justify-content:center;text-align:center;color:#3e231a;font:400 12px/1.8 var(--mono);background:var(--paper)}.page-error button{color:#3e231a;background:none;border:1px solid #3e231a66;padding:9px 16px;border-radius:3px}.page-error button:focus-visible{outline-color:#ac3e16}
.turn-layer{position:absolute;inset:0;z-index:3;perspective:2200px;pointer-events:none;overflow:clip}.turn-still,.turn-leaf{position:absolute;top:0;width:50%;height:100%}.turn-still{background:var(--paper)}.turn-leaf{transform-style:preserve-3d;will-change:transform;z-index:2}.turn-face{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;background:var(--paper);overflow:hidden;box-shadow:0 0 12px #0003}.turn-face.back{transform:rotateY(180deg)}.turn-face::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#00000013,transparent 15%,transparent 90%,#ffffff08);pointer-events:none}.turn-still img,.turn-face img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}.book:not(.is-spread) .turn-leaf{width:100%}
.reader-toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:15px 19px;border-top:1px solid var(--line);background:var(--panel)}.page-controls,.view-controls{display:flex;align-items:center;gap:9px}.tool-button{width:42px;height:42px;border:1px solid var(--line);border-radius:3px;background:transparent;display:grid;place-items:center;flex:none}.tool-button:not(:disabled):hover{border-color:var(--accent);color:var(--accent)}.tool-button[data-next]{background:var(--accent);color:#3e231a;border-color:var(--accent)}.tool-button[data-next]:not(:disabled):hover{background:#ff984e;color:#3e231a}.page-select-wrap{display:flex;align-items:center;gap:8px;font:400 10px var(--mono);padding:0 5px}.page-select-wrap select{min-width:62px;height:40px;background:var(--panel);border:1px solid var(--line);border-radius:3px;padding:0 9px;cursor:pointer}.page-total{color:var(--muted);white-space:nowrap}.zoom-value{min-width:48px;font:400 10px var(--mono);text-align:center;font-variant-numeric:tabular-nums}.tool-divider{height:20px;width:1px;background:var(--line);margin:0 3px}.reader-hint{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:14px 0 0;font:400 9px/1.8 var(--mono);color:var(--muted)}.reader-hint p{margin:0}.pdf-link{display:flex;gap:8px;align-items:center;min-height:36px;color:var(--ink);white-space:nowrap}.pdf-link:hover{color:var(--accent)}.pdf-link .icon{width:15px;height:15px}.reader-status{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;color:var(--ink);text-align:center;padding:30px;font:400 12px/1.8 var(--mono)}.reader-status p{max-width:320px;margin:0}.reader-status button{padding:11px 18px;border:1px solid var(--line);background:var(--panel);border-radius:3px}.loading-mark{width:30px;height:30px;border:1px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:loading-turn 1s linear infinite}
.site-footer{margin-top:37px;padding:22px 0 27px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:24px;font:400 8px/1.8 var(--mono);color:var(--muted)}.site-footer a{color:var(--ink)}.site-footer a:hover{color:var(--accent)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:absolute;top:-100px;left:20px;z-index:20;padding:12px 18px;background:var(--ink);color:var(--bg)}.skip-link:focus{top:12px}.reader:fullscreen{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;border:0;border-radius:0;background:var(--bg)}.reader:fullscreen .reader-viewport{height:auto;min-height:0;flex:1}.reader:fullscreen .reader-toolbar{flex:none}.reader:fullscreen .reader-topline{flex:none}
@keyframes loading-turn{to{transform:rotate(360deg)}}
@media(max-width:900px){.site-shell{padding:0 28px}.masthead{min-height:83px}.menu-heading{align-items:flex-start;flex-direction:column;gap:23px;padding:28px 0 23px}.menu-switch{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}.menu-switch a{padding:9px 5px}.reader-viewport{height:clamp(450px,68svh,900px)}.reader-topline{padding-inline:15px}.brand-line{display:none}.reader-hint{align-items:flex-start}.reader-toolbar{gap:12px;padding:12px}.page-controls,.view-controls{gap:7px}.tool-button{width:38px;height:38px}.page-select-wrap{gap:6px;padding:0}.page-select-wrap select{height:38px}.tool-divider{margin-inline:0}.zoom-value{min-width:42px}}
@media(max-width:560px){.site-shell{padding:0 16px}.masthead{min-height:76px}.brand img{width:106px;height:34px}.back-link{font-size:8px;gap:8px}.back-link .icon{width:15px;height:15px}.menu-heading{padding-top:25px;gap:20px}.eyebrow{font-size:8px}h1{font-size:30px}.menu-switch a{font-size:9px}.reader-viewport{height:max(390px,calc(100svh - 340px))}.zoom-canvas{padding:12px}.reader-topline{font-size:8px;gap:8px;padding:10px 12px;min-height:38px}.reader-topline>span:last-child{font-size:7px}.reader-toolbar{flex-wrap:wrap;justify-content:center;gap:11px;padding:12px}.page-controls{width:100%;justify-content:space-between;gap:12px}.view-controls{justify-content:center;gap:10px}.tool-button{width:40px;height:40px}.page-select-wrap{font-size:10px}.page-select-wrap select{width:80px}.view-controls .tool-button{width:36px;height:36px}.view-controls .icon{width:17px;height:17px}.reader-hint{font-size:8px;gap:10px;flex-direction:column;margin-top:12px}.reader-hint .pdf-link{min-height:30px}.site-footer{margin-top:26px;font-size:7px;gap:14px;padding-bottom:22px}.book.is-spread::after{width:18px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.book:focus-visible{outline:2px solid var(--accent);outline-offset:4px}

/* The local paper engine clips each leaf along its moving fold line. */
.book{display:block;overflow:visible;touch-action:pan-y pinch-zoom}
.book.is-spread::after{content:none}
.book .stf__wrapper{position:relative;width:100%;height:100%}
.book .stf__block{overflow:visible}
.menu-page{background:var(--paper);overflow:hidden;user-select:none;-webkit-user-select:none}
.menu-page img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none;-webkit-user-drag:none}
.menu-page.is-empty{background:linear-gradient(90deg,#ddd2bf,#eee5d7)}
.menu-page.is-loading::after{content:"";position:absolute;top:50%;left:50%;width:20px;height:20px;margin:-10px;border:2px solid #3e231a30;border-top-color:#ac3e16;border-radius:50%;animation:loading-turn .8s linear infinite}
.reader-viewport[data-zoomed=true] .book{touch-action:pan-x pan-y pinch-zoom}
.reader-viewport[data-zoomed=false] .book{cursor:grab}
.reader-viewport[data-zoomed=false]{overflow:hidden}
.reader-viewport[data-dragging=true] .book{cursor:grabbing}

/* Keep the paper, rather than the surrounding interface, dominant on phones. */
@media(max-width:560px){
  .site-shell{padding-inline:12px}
  .masthead{min-height:54px;gap:12px}
  .brand img{width:92px;height:30px}
  .back-link{min-height:42px}
  .menu-heading{padding:15px 0 13px;gap:12px}
  .eyebrow{display:none}
  h1{font-size:24px;letter-spacing:-.055em}
  .menu-switch{padding:3px;gap:3px}
  .menu-switch a{min-height:38px;padding:8px 3px;font-size:8px}
  .reader{margin-inline:-12px;border-inline:0;border-radius:0}
  .reader-topline{min-height:31px;padding:7px 12px}
  .reader-viewport{height:calc((100vw - 12px)*1.41422 + 12px);max-height:none}
  .zoom-canvas{padding:6px}
  .reader-toolbar{padding:9px 12px;gap:7px}
  .page-controls{justify-content:center;gap:20px}
  .page-select-wrap{gap:8px}
  .page-select-wrap select{width:62px;min-width:62px;height:40px}
  .page-controls .tool-button{width:44px;height:42px}
  .view-controls{gap:10px}
  .view-controls .tool-button{width:36px;height:36px}
  .reader-hint{margin-top:10px;font-size:8px}
  .site-footer{margin-top:18px;padding-top:16px}
  .reader:fullscreen{margin:0}
  .reader:fullscreen .reader-viewport{height:auto}
}

/* A fixed reading surface: gestures move the paper, never the webpage. */
html,body{height:100%;overflow:hidden;overscroll-behavior:none}
body{position:fixed;inset:0;width:100%;height:100vh;height:100dvh}
.site-shell{width:100%;height:100%;display:flex;flex-direction:column;padding-inline:24px}
.masthead{min-height:58px;flex:0 0 58px}
.brand img{width:106px;height:34px}
.site-shell>main{display:flex;flex-direction:column;flex:1;min-height:0;padding-bottom:max(8px,env(safe-area-inset-bottom))}
.menu-heading{flex:none;flex-direction:row;align-items:center;padding:12px 0;gap:16px}
.menu-heading .eyebrow{display:none}
h1{font-size:clamp(24px,2.5vw,34px)}
.menu-switch{width:auto}
.reader{display:flex;flex-direction:column;flex:1;min-height:0}
.reader-topline,.reader-toolbar{flex:none}
.reader-viewport{flex:1;min-height:0;height:auto!important;max-height:none;touch-action:none}
.reader-viewport[data-zoomed=true],.reader-viewport .book,.reader-viewport[data-zoomed=true] .book{touch-action:none}
.reader-viewport[data-zoomed=true]{overscroll-behavior:none}
.reader-hint,.site-footer{display:none}
@media(max-width:560px){
  .site-shell{padding-inline:0}
  .masthead{padding-inline:12px;min-height:44px;flex-basis:44px}
  .brand img{width:88px;height:28px}
  .site-shell>main{padding-bottom:env(safe-area-inset-bottom,0px)}
  .menu-heading{padding:6px 8px;gap:0}
  .menu-heading>div{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
  .menu-switch{width:100%;padding:2px}
  .menu-switch a{min-height:34px;padding:6px 2px}
  .reader{margin:0}
  .reader-topline{min-height:26px;padding:5px 10px}
  .reader-toolbar{flex-wrap:nowrap;justify-content:space-between;padding:7px 6px;gap:6px}
  .page-controls{width:auto;gap:5px}
  .page-select-wrap{gap:4px;font-size:9px}
  .page-select-wrap>span:first-child{display:none}
  .page-select-wrap select{width:46px;min-width:46px;height:38px;padding-inline:4px}
  .page-total{font-size:8px}
  .page-controls .tool-button,.view-controls .tool-button{width:34px;height:40px}
  .view-controls{gap:3px}
  .view-controls .zoom-value,.view-controls .tool-divider{display:none}
}
@media(max-height:500px){
  .masthead{display:none}
  .menu-heading{padding-block:5px}
  .reader-topline{min-height:25px;padding-block:5px}
  .reader-toolbar{padding-block:5px}
}
