@font-face{font-family:Instrument Sans;src:url('./assets/fonts/instrument-sans.woff2') format('woff2');font-style:normal;font-weight:400 700;font-stretch:75% 100%;font-display:swap}
:root{
  --paper:#fff9ef;--light:#fffcf6;--ink:#334a60;--muted:#4f6172;--sage:#304b3c;--rule:#e4dbcd;
  --sky:#e4f1f7;--meadow:#edf2dd;--butter:#f9e7b2;--butter-hover:#f4db95;
  --edge:clamp(18px,5vw,75px);--shell:1250px;--font:'Instrument Sans',-apple-system,BlinkMacSystemFont,Arial,sans-serif;
  --ease:cubic-bezier(.22,.77,.22,1);color-scheme:light
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:88px}
body{margin:0;background:var(--paper);color:var(--ink);font:400 16px/1.5 var(--font)}
img{display:block;max-width:100%}
button{font:inherit;color:inherit;cursor:pointer}
a{color:inherit;text-decoration:none}
p,h1,h2,figure{margin:0}
[hidden]{display:none!important}
::selection{background:#dce5d6;color:var(--ink)}
:focus-visible{outline:3px solid #52765e;outline-offset:4px}
button:disabled{cursor:default}
.shell{max-width:var(--shell);width:100%;margin-inline:auto;padding-inline:var(--edge)}
.defs{position:absolute;width:0;height:0;overflow:hidden}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.skip{position:fixed;z-index:20;top:8px;left:8px;background:var(--light);padding:10px 15px;transform:translateY(-170%)}
.skip:focus{transform:translateY(0)}
.icon{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.reverse{transform:rotate(180deg)}

.topbar{position:sticky;top:0;z-index:9;background:var(--paper);border-bottom:1px solid #2f382514}
.nav{min-height:66px;display:grid;grid-template-columns:1fr auto 1fr;gap:20px;align-items:center}
.brand{justify-self:start;display:grid;align-items:center;min-height:44px;width:124px}
.brand img{width:100%;height:auto}
.nav nav{display:flex;gap:clamp(23px,3vw,40px);font-size:.88rem;font-weight:520;white-space:nowrap}
.nav nav a,.sample-link,.footer a:last-child{display:inline-flex;align-items:center;min-height:44px}
.nav nav a:hover,.sample-link:hover,.footer a:last-child:hover{text-decoration:underline;text-underline-offset:5px}
.sample-link{justify-self:end;gap:8px;font-size:.9rem;font-weight:570;white-space:nowrap}
.sample-link .icon{width:17px;height:17px}

.studio{isolation:isolate;position:relative;text-align:center;padding:clamp(28px,4vw,53px) var(--edge) clamp(52px,6vw,83px);background:var(--sky);overflow:clip}
.studio::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:56% -10% 0;
  background:var(--meadow);
  border-radius:52% 48% 0 0 / 17% 13% 0 0;
  pointer-events:none;
}
.studio-copy{position:relative;z-index:2}
.series{font-size:clamp(.87rem,1.3vw,1rem);font-weight:550;color:var(--muted)}
.studio h1{font-size:clamp(3.55rem,6.5vw,6rem);line-height:.92;font-weight:610;letter-spacing:-.05em;margin:6px 0 12px;padding-right:.045em}
.intro{font-size:clamp(1rem,1.65vw,1.33rem);font-weight:460;line-height:1.25;text-wrap:balance}
.facts{display:flex;align-items:center;justify-content:center;gap:9px;margin-top:10px;font-size:.85rem;font-weight:520;color:var(--muted);font-variant-numeric:tabular-nums}
.facts span:first-child{font-weight:650;color:var(--ink)}
.facts .separator{height:3px;width:3px;background:#6e7568;border-radius:50%}

.book-room{--rest-scale:.86;position:relative;width:min(100%,710px,calc(51svh * 950 / 672));aspect-ratio:950/672;margin:13px auto 0;isolation:isolate}
.book-shadow{position:absolute;z-index:-1;inset:47% -10% -6% -10%;background:radial-gradient(ellipse 48% 32% at 52% 69%,#242a1f48,#242a1f19 47%,#242a1f00 100%);transform:translateY(8px) rotate(-3deg) scale(.92);pointer-events:none}
.book-pose{position:absolute;inset:0;isolation:isolate;transform-style:preserve-3d;transform:perspective(1650px) translateY(-3px) rotateX(10deg) rotateY(-11deg) rotateZ(-4deg) scale(var(--rest-scale))}
.book-edge,.book-cover,.book-engine{position:absolute;inset:0}
.book-edge{transform:translate(4px,8px);background:repeating-linear-gradient(0deg,#d1cabb 0 1px,#f5f0df 1px 2.5px);border:1px solid #bdb7a7;border-radius:2px 5px 5px 3px;box-shadow:4px 15px 27px #292e2344;pointer-events:none}
.book-edge::before{position:absolute;content:"";inset:0 auto 0 -2px;width:7px;background:#6b806b66;border-radius:2px 0 0 2px}
.book-cover{z-index:2;border-radius:2px 4px 4px 2px;overflow:hidden;isolation:isolate;background:#cfe4f5;border:1px solid #94a5aa4f}
.book-cover img{width:100%;height:100%;object-fit:cover}
.cover-light{position:absolute;inset:0;background:linear-gradient(96deg,#1c2a2e38,transparent 3%,#f7f8ec28 36%,transparent 68%),linear-gradient(180deg,#ffffff1c,transparent 34%);box-shadow:inset 0 1px 1px #fff9;pointer-events:none}
.book-engine{width:100%;height:100%;min-width:0!important;min-height:0!important;z-index:3;visibility:hidden;touch-action:pan-y pinch-zoom}
.book-engine.active{visibility:visible}
.settled-sheet,.book-problem{position:absolute;inset:0;z-index:4}
.settled-sheet{border:1px solid #b3b4a553;pointer-events:none;overflow:hidden;background:#fff}
.settled-sheet img{width:100%;height:100%;object-fit:contain}
.book-cover.foreground{z-index:6}
.book-problem{display:grid;place-items:center;z-index:5;background:var(--light);border:1px solid var(--rule);padding:16px}
.book-problem p{font-weight:640;margin-bottom:5px}
.book-problem a{display:inline-flex;align-items:center;min-height:44px;font-size:.86rem;text-decoration:underline;text-underline-offset:3px}
.book-engine .stf__wrapper{width:100%;height:100%;position:relative;overflow:hidden}
.book-engine .stf__block{overflow:visible;perspective:1650px}
.book-engine .sheet{overflow:hidden;background:#fcfaf4}
.book-engine .sheet img{width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none}
.book-engine.active:not(.busy){cursor:grab}
.book-engine.dragging{cursor:grabbing!important}
.book-room.can-open .book-cover{cursor:pointer}
.book-cover.swap-out{visibility:hidden}
.book-room[data-page]:not([data-page="0"]) .book-edge{transform:translate(2px,5px);box-shadow:3px 12px 22px #292e232b}

.controls{position:relative;margin:clamp(12px,1.4vw,19px) auto 0;min-height:125px;width:min(100%,660px)}
.closed-controls{display:grid;justify-items:center;align-content:start;gap:7px;min-height:51px}
.preview-scope{font-size:.83rem;color:var(--muted)}
.primary{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:10px 20px;border:1px solid #9d8454;border-radius:30px;background:var(--butter);color:var(--ink);white-space:nowrap;font-size:.94rem;font-weight:580;transition:background-color .2s var(--ease),transform .2s var(--ease)}
.primary:hover{background:var(--butter-hover);transform:translateY(-2px)}
.primary:active{transform:translateY(0)}
.primary:disabled{opacity:.73;transform:none}
.primary .icon{width:18px;height:18px}
.reader-controls{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:11px;min-height:51px}
.pagination{display:flex;gap:clamp(8px,1.5vw,19px);align-items:center;justify-content:center}
.round{width:46px;height:46px;display:grid;place-items:center;flex:none;padding:0;border:1px solid #70796d64;border-radius:50%;background:#faf9f3;color:var(--ink);transition:background-color .2s,transform .2s var(--ease)}
.round:not(:disabled):hover{background:#e6ece0;transform:translateY(-2px)}
.round:disabled{opacity:.44}
.round .icon{width:19px;height:19px}
.page-position{display:grid;width:112px;min-height:44px;place-content:center;justify-items:center;line-height:1.2;gap:3px;padding:3px 0;border:0;border-radius:9px;background:none;font-variant-numeric:tabular-nums}
.page-position{-webkit-tap-highlight-color:transparent}
.page-position:hover{background:#34483a12}
.picker-meta{white-space:nowrap}
.page-position strong{font-size:1rem;font-weight:620}
.page-position span{font-size:.79rem;color:var(--muted)}
.quiet{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:fit-content;min-width:44px;min-height:44px;padding:0 8px;border:0;background:transparent;border-radius:8px;white-space:nowrap;font-weight:540;font-size:.86rem}
.quiet:hover{background:#2f493011}
.quiet .icon{width:17px;height:17px}
.inspect{justify-self:end}
.page-note{margin:8px auto 0;max-width:38rem}
.page-note>p{font-size:.88rem;color:var(--muted);text-wrap:pretty}
.activity-line{margin-top:1px}
.reader-controls [aria-disabled="true"],.text-action[aria-disabled="true"]{opacity:.52;cursor:default}
.text-action{display:inline-flex;align-items:center;gap:7px;min-height:44px;padding:0 8px;border:0;background:transparent;color:var(--sage);font-weight:570;font-size:.86rem}
.text-action .icon{width:16px;height:16px}
.text-action:hover{text-decoration:underline;text-underline-offset:4px}

.families{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.85fr);gap:clamp(32px,8vw,117px);align-items:center;padding-block:clamp(62px,8.2vw,118px)}
.families-page{position:relative;isolation:isolate;margin:0 auto;max-width:520px;width:100%}
.families-page img{width:100%;height:auto;border:1px solid #8d998e47;box-shadow:0 11px 27px #30392921}
.families-page::before{content:"";position:absolute;z-index:-1;inset:2px 1px 30px;background:var(--butter);border:1px solid #84877328;transform:rotate(-3.5deg)}
.families-page figcaption{margin-top:9px;color:var(--muted);font-size:.79rem}
.families-label{margin-bottom:8px;font-size:.87rem;font-weight:620;color:var(--muted)}
.families-copy h2{font-size:clamp(2.7rem,5.05vw,4.5rem);font-weight:575;line-height:.99;letter-spacing:-.043em;max-width:11ch;text-wrap:balance}
.families-intro{max-width:39ch;font-size:clamp(1rem,1.45vw,1.15rem);margin:17px 0 21px;line-height:1.58;text-wrap:pretty}
.pdf-detail{font-size:.8rem;color:var(--muted);margin:8px 0 0 1px}
.footer{border-top:1px solid var(--rule)}
.footer-inner{display:flex;align-items:center;justify-content:space-between;gap:15px;min-height:83px;padding-block:13px}
.footer-inner p,.footer a:last-child{font-size:.82rem;color:var(--muted)}

.inspect-dialog{border:1px solid #a5a89d;border-radius:16px;padding:clamp(11px,1.7vw,20px);color:var(--ink);background:var(--light);box-shadow:0 25px 90px #1f281d44;width:fit-content;max-width:min(1040px,calc(100% - 18px));max-height:calc(100% - 18px);overflow:auto}
.inspect-dialog::backdrop{background:#22291ed2}
.inspect-head,.inspect-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px}
.inspect-head{padding-bottom:9px}
.inspect-head h2{font-size:clamp(1.2rem,2.25vw,1.8rem);line-height:1.03;font-weight:630;letter-spacing:-.037em}
.inspect-head p{font-size:.8rem;color:var(--muted);margin-top:2px}
.inspect-window{max-width:100%;max-height:min(70dvh,690px);overflow:auto;overscroll-behavior:contain;background:#fff;border-radius:3px;touch-action:pan-x pan-y pinch-zoom}
.inspect-window img{width:950px;max-width:none;height:auto}
.inspect-window.fit img{width:auto;max-width:100%;max-height:min(70dvh,690px);object-fit:contain;margin-inline:auto}
.inspect-bottom{padding-top:7px}
.inspect-bottom p{font-size:.84rem;color:var(--muted)}
.inspect-bottom button{flex:none}
#inspect-hint{margin-top:4px;font-weight:550}

@media(max-width:800px){
  html{scroll-padding-top:70px}
  .studio{padding-bottom:50px}
  .book-room{--rest-scale:.91;width:min(100%,660px,calc(52svh * 950 / 672))}
  .families{gap:34px}
}
@media(min-width:581px) and (max-height:820px){
  .studio{padding-top:25px}
  .book-room{width:min(100%,680px,calc(45svh * 950 / 672))}
  .controls{margin-top:11px}
}
@media(max-width:580px){
  .nav{min-height:58px;grid-template-columns:1fr auto;gap:10px}
  .nav nav{display:none}
  .brand{width:108px}
  .studio{padding-top:29px;padding-bottom:39px}
  .studio h1{font-size:clamp(3.65rem,15vw,4.75rem);margin:5px 0 9px}
  .facts{margin-top:8px}
  .book-room{--rest-scale:.94;width:100%;margin-top:17px}
  .book-pose{transform:perspective(1650px) translateY(-2px) rotateX(5deg) rotateY(-8deg) rotateZ(-3deg) scale(var(--rest-scale))}
  .book-edge{transform:translate(3px,5px);box-shadow:3px 10px 15px #292e2339}
  .controls{margin-top:20px}
  .reader-controls{gap:6px}
  .reader-controls .quiet{padding:0;min-width:44px;flex-direction:column;gap:3px}
  .reader-controls .quiet span{font-size:.68rem;line-height:1}
  .reader-controls .inspect .icon{order:-1}
  .round{width:44px;height:44px}
  .pagination{gap:6px}
  .page-position{width:80px}
  .page-position strong{font-size:.91rem}
  .activity-line{margin-top:1px}
  .families{grid-template-columns:1fr;gap:28px;padding-block:43px 53px}
  .families-copy{grid-row:1}
  .families-copy h2{max-width:100%;text-wrap:initial;font-size:clamp(2.55rem,10.9vw,3.55rem)}
  .families-intro{margin:12px 0 17px}
  .families-page{width:92%}
  .footer-inner{flex-wrap:wrap;gap:8px}
  .footer-inner p{order:3;width:100%}
}
@media(max-width:350px){.studio{padding-inline:16px}.controls{margin-top:16px}.reader-controls{gap:1px}.page-position{width:71px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

.pages-dialog{width:min(450px,calc(100% - 20px));max-height:calc(100dvh - 20px);overflow:auto;border:1px solid var(--rule);border-radius:16px;background:var(--light);color:var(--ink);padding:15px 17px;box-shadow:0 25px 90px #1f281d44}
.pages-dialog::backdrop{background:#22291ed2}
.page-list{list-style:none;margin:4px 0 0;padding:0;display:grid;gap:2px}
.page-choice{display:grid;grid-template-columns:66px minmax(0,1fr) auto;align-items:center;gap:11px;width:100%;min-height:56px;padding:5px 7px;border:1px solid transparent;border-radius:8px;background:none;text-align:left}
.page-choice:hover,.page-choice[aria-current="page"]{background:#e9eee3}
.page-choice[aria-current="page"]{border-color:#aebda9}
.page-choice img{width:66px;height:46px;object-fit:contain;background:#ebe8e0;border:1px solid #c7c8b9}
.page-choice strong{font-size:.94rem;font-weight:650}
.page-choice small{display:block;font-size:.78rem;color:var(--muted)}
.page-choice .icon{width:15px;height:15px}
@media(max-width:580px){.page-position{width:80px}.page-note>p{font-size:.84rem}}
@media(max-width:350px){.page-position{width:72px}}
