:root{--paper:#f7f9fa;--muted:rgb(0 0 0 / 30%);--ui-scale:.8;--tile:calc(clamp(86px,7.8125vw,150px) * var(--ui-scale));--gap:calc(var(--tile) / 3);--radius:calc(var(--tile) * .16);--beat:175ms}
*{box-sizing:border-box}body{margin:0;color:#000;background:white;font:400 calc(clamp(16px,1.25vw,24px) * var(--ui-scale))/normal "SF Pro Display",-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;font-optical-sizing:auto}
/* A 2% #000614 tint follows each image's clipping, transforms and opacity. */
img{filter:url('#image-tint')}
/* These illustrations already use the tinted gray as their outer background;
   preserve the white component surfaces instead of tinting them a second time. */
img[src$="this-web/03-date-time.png"],img[src$="this-web/04-form-study.png"],img[src$="this-web/05-typography-study.png"]{filter:none}
button,a{color:inherit;font:inherit;letter-spacing:inherit}a{text-decoration:none}button{border:0;padding:0;background:none;cursor:pointer}button:focus-visible,a:focus-visible{outline:2px solid #555;outline-offset:3px}
header{position:relative;z-index:2;padding:min(3.8021vw,73px) min(4.84375vw,93px);display:grid;grid-template-columns:1fr auto 1fr;align-items:baseline;pointer-events:none}
header a{grid-column:1;grid-row:1;justify-self:start;pointer-events:auto}header p{grid-column:2;grid-row:1;margin:0;text-align:center;width:60vw;min-height:1.2em}
main{position:absolute;inset:0;min-height:460px}
#deck{--pitch:calc(var(--tile) + calc(clamp(8px,1vw,16px) * var(--ui-scale)));position:absolute;z-index:3;top:50%;left:50%;width:calc(4 * var(--tile) + 3 * var(--gap));height:var(--tile);transform:translate(-50%,-50%)}
.card{position:absolute;display:flex;align-items:flex-end;justify-content:flex-end;width:var(--tile);height:var(--tile);padding:calc(var(--tile) * 16 / 150);border-radius:var(--radius);background:var(--paper);left:calc(var(--order) * (var(--tile) + var(--gap)));top:0;transform-origin:top left;transition:transform 220ms cubic-bezier(.22,.75,.22,1),opacity 180ms ease}
.card span{transition:opacity 150ms}
.card{color:var(--muted)}
.card[aria-current]{color:#000}
@media(hover:hover){
  body:not(.inside) .card:hover,.inside #deck.open .card:hover{transform:scale(1.035);color:#000}
}
body:not(.inside) .card,.inside #deck.open .card{transform-origin:center}
.inside #deck{left:calc(9.4% + var(--tile) / 2);width:var(--tile)}
.inside .card{left:0;top:calc(var(--depth) * var(--tile) * -.065);scale:calc(1 - var(--depth) * .055);transform-origin:center top;z-index:calc(5 - var(--depth));background:var(--paper)}
.inside #deck:not(.open) .card{opacity:calc(1 - var(--depth) * .2)}
.inside .card[data-depth="0"],.inside #deck.open .card{background:var(--paper)}
.inside #deck:not(.open) .card:not([data-depth="0"]) span{opacity:0}
.inside #deck.open::before{content:"";position:absolute;inset:calc(-1.5 * var(--pitch) - 6px) -6px}
.inside #deck.open .card:not([aria-current]){background:rgb(247 249 250 / 55%)}
.inside #deck.open .card[aria-current]{opacity:1}
.inside #deck.open .card{left:0;top:calc((var(--depth) - 1.5) * var(--pitch));scale:1}
@media(hover:hover){.inside #deck.open .card:not([aria-current]):hover{background:var(--paper)}}
#detail{display:grid;grid-template-columns:16% 7% 29% 10% 38%;align-items:center;margin:0 10.8% 0 23.4%;height:100%;min-height:0;grid-template-rows:minmax(0,1fr);padding:8rem 0}
[hidden]{display:none!important}#chapters{grid-column:1;display:grid}#copy{grid-column:3}#media{grid-column:5;display:grid;gap:.65em}
.chapter{display:flex;justify-content:space-between;align-items:center;min-height:2em;color:var(--muted);padding-right:9%}.chapter[aria-current],.chapter:hover{color:#000}
.line{margin:.55em 0}.line small{display:block;color:var(--muted);margin-top:.32em;font-size:.82em}.line a:hover{text-decoration:underline}
.copy-group+.copy-group{margin-top:1.7em}
.linkmark{display:inline-block;height:.65em;width:1.05em;vertical-align:middle;margin-left:.35em;fill:none;stroke:currentColor;stroke-width:1.6;color:var(--muted)}
.picture,.thumb,.blank{display:block;width:100%;background:var(--paper);border-radius:var(--radius);overflow:hidden}.picture{aspect-ratio:1.6}.picture img,.thumb img{width:100%;height:100%;object-fit:cover;display:block}
.gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:.65em}.thumb,.blank{aspect-ratio:1}
.widget{padding:.7em 1em;background:var(--paper);border-radius:var(--radius);color:var(--muted);font-size:.83333em}
.dates,.transport,.meta{display:flex;align-items:center;justify-content:space-between}.arc{display:flex;justify-content:space-evenly;align-items:flex-end;height:3.3em;padding:0 8%}.arc i{width:.42em;height:.42em;border-radius:50%;background:#dadada;transform:translateY(var(--y))}.arc .on{background:#ff5858}
.transport button{padding:.55em}.meta{margin-top:1.4em}.meta i{width:.45em;height:.45em;background:#ed5b5b;border-radius:50%;display:inline-block;margin-right:.4em}
.skeleton{height:.42em;border-radius:.25em;background:var(--paper);width:76%;margin:.9em 0}.skeleton.short{width:46%}
@media(max-width:760px){:root{--tile:calc(clamp(62px,18vw,108px) * var(--ui-scale));--gap:calc(clamp(8px,3vw,18px) * var(--ui-scale))}header{padding:24px;align-items:start}header p{margin:0;width:60vw;min-height:3.6em}
main{min-height:0}.inside main{position:relative;inset:auto;margin:1rem 6vw 3rem}.inside #deck{position:relative;top:0;left:0;transform:none}.inside #deck.open::before{inset:-4px calc(-3 * var(--pitch) - 4px) -4px -4px}.inside #deck.open .card{top:0;left:calc(var(--depth) * var(--pitch))}
#detail{transition:margin-top 350ms cubic-bezier(.22,.75,.22,1);margin:2rem 0 0;height:auto;min-height:0;padding:0;grid-template-columns:1fr;grid-template-rows:none;gap:1.25rem}#chapters,#copy,#media{grid-column:1}#chapters{display:flex;flex-wrap:wrap;gap:.8rem}.chapter{gap:.45rem;padding:0;min-height:44px}.chapter span{font-size:.8em}#media{width:min(100%,420px)}
}
@media(min-width:761px) and (max-height:650px){.inside{--tile:calc(min(7.8125vw,18vh) * var(--ui-scale))}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important}}

header{z-index:5}
#identity{grid-column:1;grid-row:1;position:relative;justify-self:start;display:inline-block;pointer-events:auto;cursor:default}
.profile{display:grid;position:fixed;inset:0;z-index:4;place-items:center;pointer-events:none;opacity:0;visibility:hidden;transition:opacity 220ms ease,visibility 0s 220ms}
.profile-card{scale:.985;transition:scale 280ms cubic-bezier(.2,.7,.25,1)}
main,#thought{transition:opacity 160ms ease,visibility 0s 160ms}
body.show-profile .profile{visibility:visible;opacity:1;transition-delay:0s}
body.show-profile .profile-card{scale:1}
body.show-profile main{opacity:0;visibility:hidden;pointer-events:none}
body:not(.show-profile) main,body:not(.show-profile) #thought{transition-delay:0s}
.typed::after{content:"";display:inline-block;width:1px;height:.9em;background:currentColor;margin-left:3px;vertical-align:-.05em;opacity:0}
.typing .typed::after{opacity:1;animation:cursor 750ms step-end infinite}
@keyframes cursor{50%{opacity:0}}
.chapter{transition:color 160ms}
@media(prefers-reduced-motion:reduce){.typed::after{display:none}}

.profile-card{width:min(25.792em,calc(100vw - 48px));min-height:6.25em;display:flex;justify-content:space-between;align-items:center;gap:1em;padding:1.5em;background:var(--paper);border-radius:1em;transform:translateX(-.604em)}
.profile-copy{display:grid;gap:.833em}
.profile-image{position:relative;flex:0 0 3.25em;aspect-ratio:1;overflow:hidden;border-radius:.667em}
.profile-image img{position:absolute;width:192.08%;height:284.05%;left:-87.72%;top:-7.81%}
@media(max-width:760px){.profile-card{transform:none}}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

#media{align-content:start}
.media-stage{display:grid;align-items:center;min-width:0}

/* Media controls share the image's footprint and retain the source layout. */
.gallery.mosaic{grid-auto-rows:calc((100cqw - 1.3em) / 3)}
#media{container-type:inline-size}
.mosaic .thumb{aspect-ratio:auto;height:100%;position:relative}
.mosaic .product-crop img{position:absolute;width:103.11%;height:85.33%;left:.08%;top:14.67%}
.mosaic .portrait-crop img{position:absolute;inset:-10.22% 0 auto;height:135.66%}
.thumb{transition:transform 200ms ease}
@media(hover:hover){.thumb:hover{transform:scale(1.025)}}
.media-frame{position:relative;touch-action:pan-y;flex:none}
.media-frame-portrait{width:min(100%,calc(min(52dvh,480px) * var(--frame-ratio)));justify-self:center}
.media-frame video{width:100%;height:100%;object-fit:cover}
.education-crop{background:#fafafa}
.education-window{position:absolute;width:86.5%;height:86.39%;left:7.59%;top:13.61%;overflow:hidden;border-radius:var(--radius)}
.education-window>img{position:absolute;width:157.88%;height:100%;left:.08%;top:0;object-fit:fill}
.media-back,.media-zoom,.media-play,.close-image{position:absolute;display:grid;place-items:center;min-width:32px;min-height:32px;color:white;background:rgb(0 0 0 / 22%);border-radius:10px;z-index:1}
.media-back{top:.65em;left:.65em}.media-zoom,.media-play{bottom:.65em;right:.65em}
.media-zoom::before,.close-image::before{content:"";display:block;width:18px;height:18px;background:currentColor;mask:url('assets/icons/maximize.svg') center / contain no-repeat;-webkit-mask:url('assets/icons/maximize.svg') center / contain no-repeat}
.media-navigation{display:flex;justify-content:center;align-items:center;gap:.9em;color:var(--muted);font-size:.85em}
.media-navigation button{display:grid;place-items:center;min-width:32px;min-height:32px;border-radius:8px;color:#777}
.media-navigation [aria-live]{font-variant-numeric:tabular-nums;min-width:3em;text-align:center}
[data-icon]::before{content:"";display:block;width:18px;height:18px;background:currentColor;mask:var(--control-icon) center / contain no-repeat;-webkit-mask:var(--control-icon) center / contain no-repeat}
[data-icon="chevron-left"]{--control-icon:url('assets/icons/chevron-left.svg')}
[data-icon="chevron-right"]{--control-icon:url('assets/icons/chevron-right.svg')}
[data-icon="play"]{--control-icon:url('assets/icons/play.svg')}
[data-icon="pause"]{--control-icon:url('assets/icons/pause.svg')}
[data-icon="grid-2x2"]{--control-icon:url('assets/icons/grid-2x2.svg')}
.media-navigation [data-icon]::before{width:clamp(14px,1.1vw,18px);height:clamp(14px,1.1vw,18px)}
.media-navigation button:hover{color:black}
.image-dots{position:absolute;bottom:.65em;left:50%;transform:translateX(-50%);display:flex;max-width:70%;flex-wrap:wrap;justify-content:center}
.image-dots button{width:14px;height:20px;display:grid;place-items:center}
.image-dots button::after{content:"";width:5px;height:5px;background:white;opacity:.4;border-radius:50%;transition:opacity 180ms,scale 180ms}
.image-dots button[aria-pressed="true"]::after{opacity:1;scale:1.3}
.caption-widget,.video-widget{min-height:5.8em}
.date-widget{min-height:6em}
.date-widget .arc{padding:0 8%;height:3.9em}
.date-value{position:relative;display:block;overflow:hidden;line-height:1.25em;font-variant-numeric:tabular-nums}
.date-number{display:block}
.date-number-outgoing{position:absolute;inset:0}
.date-widget .arc i{transition:background-color 220ms ease}
.date-widget .arc i.on{transition-delay:180ms}
.video-progress{display:block;width:100%;height:20px;margin:1em 0 .2em;accent-color:#ff5858}
.video-progress:disabled{opacity:.4}
.video-status{position:absolute;bottom:1.3em;left:1em;color:white;font-size:.85em;text-shadow:0 1px 4px #333}
.media-play:disabled{opacity:.4;cursor:default}
.image-dialog{padding:0;border:0;background:transparent;max-width:92vw;max-height:92dvh;overflow:visible}
.image-dialog::backdrop{background:rgb(255 255 255 / 94%)}
.image-dialog>img{display:block;max-width:90vw;max-height:88dvh;object-fit:contain;border-radius:var(--radius)}
.close-image{right:.65em;top:.65em;min-width:36px;min-height:36px}
.close-image::before{mask-image:url('assets/icons/x.svg');-webkit-mask-image:url('assets/icons/x.svg')}
.playlist-card{display:flex;flex-direction:column;gap:0;padding:5.5%;border-radius:var(--radius);background:#121409;color:white}
.playlist-artwork{overflow:hidden;border-radius:calc(var(--radius) * .42);aspect-ratio:1}
.playlist-artwork>img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:calc(var(--radius) * .42)}
.playlist-title{font-size:8.4cqw;line-height:1.2;margin-top:6.6%;font-weight:650}
.playlist-author{font-size:6.8cqw;line-height:1.3;margin-top:2.4%;color:#b7b9b1}
.playlist-brand{width:29%;height:auto;display:block;margin-top:10%;margin-bottom:1%}
@media(max-width:760px){.media-navigation button{min-width:44px;min-height:44px}.image-dots button{width:18px;min-height:24px}}

/* Project reading keeps its broad column separate from the stationary menu. */
body.project-open{overflow:hidden}
.project-open #thought,.project-open #copy,.project-open #media{display:none}
.project-open #chapters{width:19vw;max-width:260px}
.project-open .chapter{justify-content:flex-start;padding:0}
#project-reader{position:fixed;top:var(--reader-top,0px);bottom:0;left:42.34375%;right:11.875%;isolation:isolate}
.project-scroll{height:100%;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:none;padding:18.611vh 0 20vh;outline-offset:-3px}
.project-scroll::-webkit-scrollbar{display:none}
.project-outgoing{position:absolute;inset:0;pointer-events:none;z-index:1}
.project-block{margin:0 0 2em}
.project-figure{position:relative;width:100%;aspect-ratio:879 / 414;border-radius:var(--radius);background:#fafafa;overflow:hidden}
.project-image{display:block;width:100%;height:auto;border-radius:var(--radius)}
.project-image-frame{position:relative}
.project-image-frame .media-zoom{min-width:36px;min-height:36px}
.pdf-project .project-scroll{padding-top:var(--pdf-top,150px);padding-bottom:0;overflow:hidden}
.pdf-project .project-block{margin-bottom:0}
.pdf-reader{width:min(100%,calc(var(--pdf-height,70dvh) * var(--pdf-ratio)));margin-inline:auto}
.pdf-stage{width:100%;background:var(--paper);border-radius:var(--radius);overflow:hidden}
.pdf-message{position:absolute;inset:0;display:grid;place-content:center;text-align:center;padding:2em;color:#888}
.pdf-previous,.pdf-next{position:absolute;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:36px;height:44px;border-radius:10px;background:rgb(0 0 0 / 22%);color:white}
.pdf-previous{left:.65em}.pdf-next{right:.65em}
.pdf-previous::before,.pdf-next::before{content:"";width:20px;height:20px;background:currentColor;mask:center / contain no-repeat;-webkit-mask:center / contain no-repeat}
.pdf-previous::before{mask-image:url('assets/icons/chevron-left.svg');-webkit-mask-image:url('assets/icons/chevron-left.svg')}
.pdf-next::before{mask-image:url('assets/icons/chevron-right.svg');-webkit-mask-image:url('assets/icons/chevron-right.svg')}
.pdf-stage button:disabled{opacity:.25;cursor:default}
.pdf-footer{display:flex;justify-content:center;align-items:center;margin-top:6px;line-height:20px;color:#888;font-size:.85em}
.pdf-download{position:absolute;display:grid;place-items:center;bottom:.65em;right:calc(.65em + 44px);width:36px;height:36px;border-radius:10px;background:rgb(0 0 0 / 22%);color:white;z-index:1}
.pdf-download::before{content:"";display:block;width:18px;height:18px;background:currentColor;mask:url('assets/icons/download.svg') center / contain no-repeat;-webkit-mask:url('assets/icons/download.svg') center / contain no-repeat}
.project-block.project-text h2{margin-top:0}
.project-text>p{white-space:pre-line}
.project-text>p+p{margin-top:1.3em}
.project-dots{position:absolute;bottom:.65em;left:50%;transform:translateX(-50%);display:flex}
.project-dots button{width:1.3em;height:1.3em;min-width:18px;min-height:18px;display:grid;place-items:center}
.project-dots button::after{content:"";width:4px;height:4px;border-radius:50%;background:#aaa}
.project-dots button[aria-pressed="true"]::after{background:#666}
.project-figure.dark .project-dots button::after{background:#aaa}
.project-figure.dark .project-dots button[aria-pressed="true"]::after{background:white}
.project-block h2{font:inherit;margin:1.6em 0 .8em}
.project-block>p{color:var(--muted);line-height:1.3;margin:0}
.project-fade{position:absolute;left:0;right:0;pointer-events:none;z-index:2;background:#fff}
.project-fade-top{top:0;height:clamp(60px,9vh,105px)}
.project-fade-bottom{bottom:0;height:18.8vh}
.project-heading{position:fixed;top:min(3.8021vw,73px);left:42.34375%;right:11.875%;text-align:center;pointer-events:none;z-index:3}
.project-heading h1,.project-category{font:inherit;line-height:1.3;margin:0}
.project-category{margin-top:.7em;color:#999}
@media(max-width:760px){
 .project-open header{min-height:94px}
 .project-open main{position:fixed;top:110px;bottom:0;left:6vw;right:6vw;margin:0;min-height:0}
 .project-open #detail{display:block}
 .project-open #chapters{width:100%;max-width:none;gap:.3rem .9rem}
 .project-open .chapter{min-height:32px}
 #project-reader{left:6vw;right:6vw}
 .project-heading{top:24px;left:20vw;right:20vw}
 .project-heading h1{font-size:inherit}
 .project-category{font-size:.85em;margin-top:.4em}
 .project-scroll{padding:24px 0 90px}
 .project-fade-top{height:24px}
 .project-fade-bottom{height:64px}
 .project-dots button{width:28px;height:28px}
}

/* Solid white protection keeps scrolling content clear of the header. */
.project-heading-surface{display:inline-block;max-width:100%;position:relative;padding:16px 24px;margin:-16px 0;vertical-align:top}
.project-heading h1{color:#000}
.project-heading .project-category{color:#888}
.project-fade-bottom{height:40px}
#project-reader .project-fade-top{height:var(--header-cover-height,150px)}
@media(max-width:760px){
 .project-heading-surface{padding:12px 14px;margin-top:-12px;margin-bottom:-12px;width:100%}
 .project-heading{left:19vw;right:19vw}
 .project-heading .project-category{font-size:.85em}
 .project-fade-bottom{height:48px}
}

/* Reserve the complete concept line so typing cannot move the white cover. */
.project-heading h1{position:relative}
.project-heading h1 .type-reserve{display:block;visibility:hidden}
.project-heading h1 .typed{position:absolute;inset:0}

/* Match the desktop card-to-type ratio (150/24), including its corner radius. */
@media(max-width:760px) and (orientation:portrait){
 #deck{--tile:6.25em;--radius:1em}
 body:not(.inside) #deck{display:grid;grid-template-columns:repeat(2,var(--tile));gap:var(--gap);width:calc(2 * var(--tile) + var(--gap));height:calc(2 * var(--tile) + var(--gap))}
 body:not(.inside) .card{position:relative;left:auto;top:auto}
 .inside #deck{--pitch:calc(var(--tile) + 8px);width:min(100%,calc(4 * var(--tile) + 24px));height:var(--tile);overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
 .inside #deck::-webkit-scrollbar{display:none}
 .inside #deck.open .card{left:calc(var(--order) * var(--pitch));top:0;scale:1}
 .inside #deck.open::before{display:none}
 .inside header{padding-bottom:12px}
 .inside main{margin-top:8px}
 .inside #detail{margin-top:16px;gap:16px}
 .project-open main{top:var(--mobile-nav-top,94px);margin-top:0}
 .project-scroll{padding-top:8px}
 .project-fade-bottom{display:none}
}

#chapter-navigation{grid-column:1;min-width:0}
#chapter-toggle{display:none}
@media(max-width:760px) and (orientation:portrait){
 header{grid-template-columns:1fr;row-gap:16px;padding-inline:6vw}
 header p{grid-column:1;grid-row:2;width:100%;min-height:0;text-align:left}
 .project-heading{top:64px;left:6vw;right:6vw;text-align:left}
 .project-heading-surface{padding-inline:0}
 .project-open header{min-height:0}
 #chapter-navigation{position:relative;padding-right:36px;min-height:36px}
 .inside #chapters,.project-open #chapters{display:flex;flex-wrap:nowrap;gap:16px;overflow-x:auto;scrollbar-width:none;width:100%;max-width:none;align-items:center}
 #chapters::-webkit-scrollbar{display:none}
 .inside .chapter{flex:none;white-space:nowrap;min-height:36px;gap:8px}
 #chapter-toggle{position:absolute;right:0;top:0;display:grid;place-items:center;width:32px;height:36px;color:#888;border-radius:8px}
 #chapter-toggle::before{content:"";width:16px;height:16px;background:currentColor;mask:url('assets/icons/chevron-right.svg') center / contain no-repeat;-webkit-mask:url('assets/icons/chevron-right.svg') center / contain no-repeat;transform:rotate(90deg)}
 #chapter-toggle[aria-expanded="true"]::before{transform:rotate(-90deg)}
 #chapter-navigation.expanded #chapters{flex-wrap:wrap;max-height:32dvh;overflow-y:auto;gap:4px 16px}
 #chapter-navigation.expanded .chapter{white-space:normal;max-width:100%}
 .reading-focused #deck,.reading-focused #chapter-navigation{visibility:hidden;pointer-events:none}
}

/* Focus surfaces follow content, leaving the original alignment and hit areas intact. */
:root{--focus-paper:var(--paper);--focus-inset-y:.3em;--focus-inset-x:.5em;--focus-radius:.4em}
.chapter .focus-label{display:block;font-size:inherit;line-height:1.2;min-width:0}
.focus-label,#identity,#home,.line a,.project-heading h1{position:relative;isolation:isolate}
#identity,#home,.line a{display:inline-block}
.project-heading h1{display:inline-block;max-width:100%}
.focus-label::before,#identity::before,#home::before,.line a::before,.project-heading h1::before{
 content:"";position:absolute;inset:calc(-1 * var(--focus-inset-y)) calc(-1 * var(--focus-inset-x));
 background:var(--focus-paper);border-radius:var(--focus-radius);z-index:-1;pointer-events:none;opacity:0;transition:opacity 140ms ease;
}
body.keyboard-mode .chapter:focus .focus-label::before,
body.keyboard-mode :is(#identity,#home,.line a):focus::before,
body.keyboard-mode #project-reader:has(.project-scroll:focus) .project-heading h1::before{opacity:1}
body.keyboard-mode :is(.chapter,#identity,#home,.line a,.card,.thumb,.media-navigation button,#chapter-toggle,.media-zoom,.media-back,.media-play,.close-image,.pdf-previous,.pdf-next,.pdf-download,.media-frame,.pdf-stage,.project-scroll,.project-dots button,.image-dots button):focus{outline:none}
body.keyboard-mode :is(.media-navigation button,#chapter-toggle,.media-zoom,.media-back,.media-play,.close-image,.pdf-previous,.pdf-next,.pdf-download):focus,
body.keyboard-mode :is(.media-frame,.pdf-stage):focus .media-zoom{background:var(--focus-paper);color:#555}
.card::after,.thumb::after{content:"";position:absolute;inset:0;border-radius:inherit;background:rgb(0 6 20 / 5%);opacity:0;pointer-events:none;transition:opacity 140ms ease}
.thumb{position:relative}
body.keyboard-mode :is(.card,.thumb):focus::after{opacity:1}
body.keyboard-mode :is(.project-dots,.image-dots) button:focus{background:var(--focus-paper);border-radius:.4em}
body.keyboard-mode .image-dots button:focus::after{background:#777}
:is(.media-navigation button,#chapter-toggle,.media-zoom,.media-back,.media-play,.close-image,.pdf-previous,.pdf-next,.pdf-download){transition:color 140ms ease,background-color 140ms ease}
/* Scrollable rows reserve space for focus padding so the first label isn't clipped. */
@media(max-width:760px) and (orientation:portrait){
 .inside #chapters{padding-inline:var(--focus-inset-x);margin-left:calc(-1 * var(--focus-inset-x));width:calc(100% + var(--focus-inset-x))}
}
@media(forced-colors:active){body.keyboard-mode :is(button,a,[tabindex]):focus{outline:2px solid Highlight;outline-offset:3px}}
/* Keep focused image actions outside the reader's fixed fade covers. */
.project-scroll{scroll-padding-top:calc(var(--header-cover-height,150px) + 16px);scroll-padding-bottom:56px}
body.keyboard-mode :is(.transport button,.video-progress):focus{outline:none;border-radius:.4em;background:var(--focus-paper)}
.playlist-card{position:relative}
.playlist-card::after{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:rgb(247 249 250 / 8%);opacity:0;transition:opacity 140ms ease}
body.keyboard-mode .playlist-card:focus{outline:none}
body.keyboard-mode .playlist-card:focus::after{opacity:1}
@media(forced-colors:active){body.keyboard-mode :is(button,a,input,[tabindex]):focus{outline:2px solid Highlight;outline-offset:3px}}
/* In a short, narrow window keep PDF controls usable instead of shrinking
   the whole page below the size of its buttons. The reader can scroll. */
@media(max-width:760px) and (orientation:landscape){
 .pdf-reader{min-width:min(100%,180px)}
 .pdf-project .project-scroll{overflow-y:auto;padding-bottom:56px}
}

/* The loading surface shares the card color and the image's existing clipping. */
.project-image-frame,.image-dialog{border-radius:var(--radius)}
.loading-image{transition:opacity 320ms ease}
.loading-image.image-pending,.loading-image.image-failed{opacity:0;transition:none}
.loading-image.image-ready:not(.image-failed){opacity:1}
.image-loading{background:var(--paper);animation:image-breathe 1800ms ease-in-out infinite}
.image-load-failed{background:var(--paper)}
@keyframes image-breathe{0%,100%{background-color:var(--paper)}50%{background-color:#fcfdfe}}
.image-dialog.image-loading:has(>img:not([width])){min-width:min(70vw,800px);min-height:40vh}
@media(prefers-reduced-motion:reduce){.image-loading{animation:none}.loading-image{transition:none}}
