/*
Theme Name: Shaopei Cheng — Folio
Version: 3.0
*/
:root {
    --words-accent:#a3634c; --works-accent:#56705f;
    --paper:#f5f3ee; --stone:#e6e3db; --white:#faf9f6; --ink:#242420; --quiet:#66645c;
    --rail:clamp(54px,5.2vw,102px); --bar:72px; --admin:var(--wp-admin--admin-bar--height,0px);
    --move:680ms cubic-bezier(.65,0,.16,1);
}
*{box-sizing:border-box}
html,body{margin:0;color:var(--ink);background:var(--paper);font:16px/1.45 "Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased}
a,button{color:inherit;text-decoration:none}button,input{font:inherit}button{cursor:pointer;border:0;background:none;padding:0}
figure,h1,h2,h3,p{margin:0}img{display:block;max-width:100%;height:auto}small,figcaption{font-size:13px;line-height:1.45}
[hidden]{display:none!important}:focus-visible{outline:1px solid currentColor;outline-offset:5px}
.screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body.home{overflow:hidden}
.mast{position:fixed;z-index:10;top:var(--admin);left:0;right:0;height:var(--bar);padding:0 2.1vw;display:grid;align-items:center;grid-template-columns:1fr auto 1fr;pointer-events:none}
.mast>*{pointer-events:auto}.mast>a:first-child{justify-self:start}.mast>a:last-child{justify-self:end}
.mast>[data-open],.detail-mast>a:not(.signature),.rails a{text-transform:uppercase;font-size:12px;font-weight:500;letter-spacing:.075em}
.mast h1,.signature{font:500 26px/1.15 "Helvetica Neue",Helvetica,Arial,sans-serif;letter-spacing:-.055em}
.mast a:hover,.text-link:hover,.rails a:hover span,.mast [aria-expanded=true]{text-decoration:underline;text-underline-offset:5px}
.rails a{position:fixed;z-index:8;inset:var(--admin) auto 0 0;width:var(--rail);display:grid;place-items:center;transition:background-color var(--move)}
.rails a span{writing-mode:vertical-rl}.rails a:first-child span{transform:rotate(180deg)}
.rails a:last-child{inset:var(--admin) 0 0 auto}
body[data-view=works] .rails a:first-child,body[data-view=search] .rails a:first-child{background:var(--white)}
body[data-view=words] .rails a:last-child,body[data-view=about] .rails a:last-child{background:var(--stone)}
.rails [aria-expanded=true] span::after{content:' ×'}
.stage{position:fixed;inset:var(--admin) 0 0;isolation:isolate;overflow:clip}
/* Keep the two entrance labels tied to the centres of the moving pages. */
.home:not([data-view]) .rails, .home[data-view="landing"] .rails { display: none; }
.home[data-view="landing"] .mast { pointer-events: auto; }
.spread {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 50% 50%;
    transition: grid-template-columns 760ms cubic-bezier(.46,0,.22,1), transform var(--move);
}
.spread[data-preview="words"] { grid-template-columns: 60% 40%; }
.spread[data-preview="works"] { grid-template-columns: 40% 60%; }
body:is([data-view=works],[data-view=search]) .spread { transform: translateX(-12%); }
body:is([data-view=words],[data-view=about]) .spread { transform: translateX(12%); }
.entry-link {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    overflow: hidden;
}
.entry-link:focus-visible { outline-offset: -6px; }
.entry-words { background: #fff; }
.entry-works { background: var(--stone); }
.entry-name {
    position: relative;
    font-size: clamp(20px, 1.5vw, 30px);
    line-height: 1;
    letter-spacing: .025em;
    transition: transform 480ms cubic-bezier(.4,0,.2,1), color 550ms ease;
}
.entry-disciplines {
    position: absolute;
    top: 50%;
    display: grid;
    justify-items: center;
    color: var(--quiet);
    font-size: clamp(16px, 1.12vw, 22px);
    letter-spacing: -.018em;
    line-height: 1.58;
    opacity: 0;
    transform: translateY(-24%);
    transition: opacity 420ms ease, transform 480ms cubic-bezier(.4,0,.2,1);
}
.spread[data-preview="words"] .entry-words .entry-name { transform: translateY(-4.1em); }
.spread[data-preview="words"] .entry-disciplines { opacity: 1; transform: translateY(-35%); }
/* Use the same fade value for the photograph and the tone beneath its label. */
@property --entry-exposure {
    syntax: "<percentage>";
    inherits: true;
    initial-value: 0%;
}
.entry-works {
    --entry-photo-tone: #625349;
    transition: --entry-exposure 570ms cubic-bezier(.45,0,.25,1);
}
.spread[data-preview="works"] .entry-works.photo-ready { --entry-exposure: 100%; }
.entry-photo {
    position: absolute;
    width: min(55.2vw, 98.4vh);
    height: 76.8%;
    object-fit: contain;
    max-width: none;
    opacity: var(--entry-exposure);
    pointer-events: none;
}
.spread[data-preview="works"] .photo-ready .entry-name { color: #fff; }
@supports (color: contrast-color(white)) {
    .entry-works.photo-ready .entry-name,
    .spread[data-preview="works"] .entry-works.photo-ready .entry-name {
        color: contrast-color(color-mix(in srgb, var(--stone), var(--entry-photo-tone) var(--entry-exposure)));
        transition: none;
    }
}
/* Letter accents belong only to the landing entrance labels. */
#landing .entry-name { color: #242424; }
#landing .entry-name .entry-letter-d { color: var(--words-accent); }
#landing .entry-name .entry-letter-k { color: var(--works-accent); }
.gallery a { display:block; }
.entry small, .project-info small { color:var(--quiet); }
.sheet{position:absolute;inset:0;background:var(--white);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;transform:translateX(-100%);visibility:hidden;transition:transform var(--move),visibility 0s 680ms;padding:calc(var(--bar) + 5vh) var(--rail) 10vh}
.sheet:focus{outline:none}.sheet:is(#works,#search){background:var(--stone);transform:translateX(100%)}
.sheet.open{z-index:2;transform:translateX(0)!important;visibility:visible;transition-delay:0s}
.panel-inner{width:min(77vw,1500px);margin:auto}
.section-label{display:flex;align-items:baseline;gap:26px;margin:0 0 5vh}
.section-label h2{font-size:clamp(34px,3.8vw,74px);font-weight:400;letter-spacing:-.06em;line-height:1}
.section-label span,.text-link,.results small,#result-count{font-size:13px;color:var(--quiet)}
/* The text starts at the height of the gallery, below its category navigation. */
#words { padding-top: calc(var(--bar) + var(--filter-height, 54px)); }
.reading > [data-position] {
    min-width: 0;
    min-height: var(--plate-height, auto);
}
.reading .entry {
    container-type: inline-size;
    overflow-wrap: anywhere;
}
.entry h2 {
    margin: 0 0 clamp(20px, 4.6cqi, 34px);
    font-size: clamp(32px, 7.6cqi, 48px);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -.048em;
}
.entry .abstract {
    max-width: min(92%, 29ch);
    font-size: clamp(21px, 4.5cqi, 29px);
    line-height: 1.28;
    letter-spacing: -.024em;
    text-wrap: pretty;
}
.entry .design-note {
    max-width: min(91%, 43ch);
    color: var(--quiet);
    font-size: clamp(16px, 3cqi, 19px);
    line-height: 1.55;
    letter-spacing: -.009em;
}
.entry .abstract + .design-note { margin-top: 1.25em; }
.entry .design-note p + p { margin-top: .8em; }
@container (min-width: 660px) {
    .entry[data-position="2"] .note-copy:has(.abstract + .design-note) {
        display: grid;
        grid-template-columns: 1.25fr 1fr;
        gap: 7cqi;
        align-items: baseline;
    }
    .entry[data-position="2"] .note-copy > * { max-width: 100%; }
    .entry[data-position="2"] .abstract + .design-note { margin-top: 0; }
}
.results a:hover strong,.adjacent a:hover strong{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.09em}
#works{padding-top:0}.filters{margin-top:var(--bar)}
.filters{position:sticky;z-index:3;top:var(--bar);background:var(--stone);display:flex;justify-content:center;gap:clamp(20px,2.6vw,55px);padding:14px 0 18px}
.filters :is(button,a){font-size:15px}.filters [aria-pressed=true],.filters [aria-current=true],.filters button:hover{text-decoration:underline;text-underline-offset:6px}
.archive-grid{margin:7vh auto 0;width:min(73vw,1450px);display:grid;grid-template-columns:repeat(12,minmax(0,1fr));align-items:start;column-gap:1.4vw;row-gap:10vh}
.archive-grid > [data-position="0"]{grid-column:1/7}.archive-grid > [data-position="1"]{grid-column:8/13;margin-top:27vh}
.archive-grid > [data-position="2"]{grid-column:3/12}.archive-grid > [data-position="3"]{grid-column:1/6}.archive-grid > [data-position="4"]{grid-column:7/13;margin-top:27vh}
.gallery a{position:relative;background:var(--white)}
.gallery img{width:100%}
.plate-title{background:var(--plate-color,var(--white));color:var(--plate-ink,var(--ink));position:absolute;inset:0;display:grid;place-items:center;padding:1em;text-align:center;pointer-events:none;opacity:0;transition:opacity 500ms ease;font-size:clamp(20px,1.7vw,32px);font-weight:400;letter-spacing:-.035em}
.gallery a:is(:hover,:focus-visible) .plate-title{opacity:1}
.empty{text-align:center;margin:18vh auto;color:var(--quiet)}
#about .panel-inner{--heading-gap:3vh;width:min(82vw,1570px)}
#about .section-label{margin-bottom:var(--heading-gap)}
#about .section-label h2{font-size:16px;letter-spacing:-.01em}
.profile{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5.5vw;align-items:start}
.portrait img{width:100%;height:auto}
.profile article{order:-1;max-width:65ch;color:var(--quiet)}
.profile article h2{font-size:15px;line-height:1.4;font-weight:500;margin:1.6em 0 var(--heading-gap)}
.profile article p{font-size:clamp(16px,1.05vw,21px);line-height:1.55;margin:.85em 0}
.profile article>p:first-child{margin-top:0}
.profile article h2:not(:first-child)+p{margin:0 0 .1em;color:var(--quiet);font-size:15px}
#query{width:100%;border:0;border-bottom:1px solid #99968f;border-radius:0;background:none;font-size:clamp(34px,4vw,72px);letter-spacing:-.05em;color:inherit;padding:14px 0;margin:0 0 22px}
#query::placeholder{color:#747167}.results a{display:grid;grid-template-columns:1fr 30% auto;align-items:center;padding:17px 0;border-bottom:1px solid #c6c3ba;gap:1em}
.results strong,.adjacent strong{font-weight:400;font-size:clamp(22px,2.2vw,45px);letter-spacing:-.04em}#result-count{margin-top:20px}
.placeholder{display:grid;aspect-ratio:4/3;background:#dedbd4;place-items:center;font-size:13px}
.detail-mast{position:relative;top:0}.detail-mast .signature{grid-column:2;justify-self:center!important}
body.single-sc_project{background:var(--white)}
.detail-discipline {
    position: static;
    z-index: auto;
    margin: 0;
    background: var(--white);
}
body.single-sc_project:has(.detail-discipline + .magazine) {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--admin));
}
body:has(.detail-discipline + .magazine) > :is(.detail-mast, .detail-discipline) { flex: none; }
.detail-discipline + .magazine { flex: 1 1 0; height: auto; }
.project{padding:3vh 0 0}
.project h1{font-weight:400;font-size:clamp(28px,2.5vw,48px);line-height:1.1;letter-spacing:-.055em;margin:0 0 4vh 6vw}
.album{display:grid;row-gap:clamp(68px,12vh,160px)}
.album-row{margin:auto;max-width:100%}
.album-row :is(img,video){display:block;width:100%;height:auto}
.album-wide{width:min(86vw,1620px)}
.album-full{width:100%}
.album-inset{width:min(52vw,950px)}
.album-left,.album-right{width:min(50vw,880px)}
.album-left{margin-left:11vw}.album-right{margin-right:11vw}
.album-pair{width:78vw;display:grid;grid-template-columns:1fr 1fr;gap:5vw;align-items:center}
.album-pair figure:last-child{margin-top:7vh}
.album-staggered{width:81vw;display:grid;grid-template-columns:1.56fr 1fr;gap:7vw;align-items:start}
.album-staggered figure:last-child{margin-top:clamp(105px,15vw,255px)}
.album-row figure[class^="ratio-"]:not(.ratio-original) :is(img,video){height:100%;object-fit:cover}
.album-row .ratio-landscape{aspect-ratio:3/2}.album-row .ratio-portrait{aspect-ratio:4/5}.album-row .ratio-square{aspect-ratio:1}
.project .adjacent{margin:12vh 6vw 0}
.adjacent{border-top:1px solid #cbc8c0;display:flex;justify-content:space-between;padding:4vh 0 6vh}.adjacent a{display:grid;gap:8px}.adjacent a:last-child{text-align:right}
.detail{padding:6vh 9vw}.detail article{margin:4vh 0}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}

body[data-view]:not([data-view=landing]) .mast::before{content:"";position:absolute;z-index:-1;inset:0 var(--rail);background:var(--white)}
body[data-view]:is([data-view=works],[data-view=search]) .mast::before{background:var(--stone)}

#query:focus-visible{outline:none;border-bottom:2px solid var(--ink);padding-bottom:13px}

/* Animate a single inherited surface for the gallery, sticky filters and masthead. */
@property --works-surface {
    syntax:"<color>";
    inherits:true;
    initial-value:#e6e3db;
}
body[data-view=works]{
    --works-surface:var(--work-field,var(--stone));
    --works-ink:var(--work-type,var(--ink));
    transition:--works-surface 500ms ease;
}
@supports (color:contrast-color(white)){
    body[data-view=works]{--works-ink:contrast-color(var(--works-surface))}
}
body[data-view=works] #works,body[data-view=works] .filters,
body[data-view=works][data-view] .mast::before{background-color:var(--works-surface)}
body[data-view=works] #works,body[data-view=works] .mast,body[data-view=works] .rails a:last-child{color:var(--works-ink)}
body[data-view=works] .mast>[data-open=about]{color:var(--ink)}
.gallery .plate-title{box-shadow:inset 0 0 0 1px currentColor}

/* WORDS titles and active discipline keywords share the entrance accents. */
#words .entry h2, #project-words-title { color: var(--words-accent); }
.filters :is([aria-pressed="true"], [aria-current="true"]) .discipline-keyword { color: var(--works-accent); }

/* RITORNA: keep the existing WORDS panel legible on small screens. */
@media (max-width: 600px) {
    body.postid-190 #project-words { width: 100%; }
    body.postid-190 .project-words-scroll { padding: 48px 28px 56px 48px; }
    body.postid-190 .project-words-copy h2 { font-size: clamp(36px, 10vw, 50px); }
    body.postid-190 .project-words-lead { font-size: 22px; line-height: 1.35; }
    body.postid-190 .project-words-note { font-size: 16px; line-height: 1.65; }
}

/* Give the panoramic CANOPY cover a full archive row. */
#works .gallery > figure[data-project="13"],
#words .reading > .entry[data-project="13"] {
    grid-column: 1 / -1;
    margin-top: 0;
}

/* RITORNA: right-aligned portrait, fully visible below the navigation. */
#works .gallery > figure[data-project="190"],
#words .reading > .entry[data-project="190"] {
    grid-column: 1 / -1;
    justify-self: end;
    width: min(100%, calc(max(180px, 100dvh - var(--admin) - var(--bar) - 102px) * 0.7861328125));
    margin-top: 0;
    scroll-margin-top: calc(var(--bar) + 78px);
}
#works .gallery > figure[data-project="190"] img {
    width: 100%;
    height: auto;
}

/* Keep the side rails, but give touch navigation and reading their own space. */
@media (max-width: 700px) {
    :root { --rail: 44px; --bar: 64px; }
    .mast { padding-inline: 12px; }
    .mast h1, .mast .signature { font-size: 22px; }
    .mast > a, .mast h1 a { display: flex; align-items: center; min-height: 44px; }
    .mast > [data-open], .detail-mast > a:not(.signature) { font-size: 11px; }
    body.home[data-view]:not([data-view=landing]) .mast::before { inset-inline: 0; }
    .home .rails a { top: calc(var(--admin) + var(--bar)); }
    .home[data-view=works] .rails a {
        top: calc(var(--admin) + var(--bar) + var(--archive-filters-height, 104px));
    }
    .home #works > .filters {
        width: calc(100% + 2 * var(--rail));
        margin-inline: calc(-1 * var(--rail));
        padding: 4px 14px 12px;
        flex-wrap: wrap;
        gap: 0 12px;
    }
    .home #works > .filters button {
        flex: 0 0 calc((100% - 24px) / 3);
        min-height: 44px;
        font-size: 12.5px;
        line-height: 1.3;
        white-space: nowrap;
    }
    .home :is(#works, #words) .archive-grid {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
        column-gap: 0;
        row-gap: 56px;
        margin-top: 28px;
    }
    .home :is(#works, #words) .archive-grid > [data-position] {
        grid-column: 1 / -1;
        margin-top: 0;
    }
    .home .panel-inner, .home #about .panel-inner { width: 100%; }
    .home .profile { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .home .section-label { flex-wrap: wrap; gap: 12px; }
    .home #query { font-size: 28px; }
    .home .results a { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; min-height: 64px; }
    .home .results strong { font-size: 24px; overflow-wrap: break-word; }
    .home .results small { grid-column: 1; grid-row: 2; }
    .home .results a > span { grid-column: 2; grid-row: 1 / 3; }

    .detail-discipline { padding-block: 0 8px; }
    .detail-discipline a { display: flex; align-items: center; min-height: 44px; }
    .project .album { row-gap: 64px; }
    .project .album-inset { width: 78vw; }
    .project .album-left, .project .album-right { width: 80vw; }
    .project .album-left { margin-left: 6vw; }
    .project .album-right { margin-right: 6vw; }
    .project .album-pair, .project .album-staggered { width: 88vw; grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .project :is(.album-pair, .album-staggered) figure:last-child { margin-top: 0; }
    .project .adjacent { gap: 28px; }
    .project .adjacent a { flex: 1; min-width: 0; }
    .project .adjacent strong { font-size: 22px; overflow-wrap: break-word; }

    body.single-sc_project #project-words { width: 100%; }
    body.single-sc_project .project-words-scroll { padding: 56px 24px 56px calc(var(--rail) + 14px); }
    body.single-sc_project .project-words-copy h2 { font-size: clamp(34px, 9vw, 44px); }
    body.single-sc_project .project-words-lead { font-size: 21px; line-height: 1.4; }
    body.single-sc_project .project-words-note { font-size: 16px; line-height: 1.65; }
    body.single-sc_project .photo-reading-toggle { width: var(--rail); }

    .book-shelf .book-volumes { grid-template-columns: minmax(0, 1fr); gap: 48px; }
    .book-shelf .book-volume img { max-height: none; }
    .magazine .mag-heading { width: 88vw; gap: 16px; align-items: center; }
    .magazine .mag-heading > div { min-width: 0; }
    .magazine .mag-zoom { flex: none; min-height: 44px; }
    .magazine .mag-toolbar { display: grid; grid-template-columns: 44px 84px 44px; gap: 8px 18px; }
    .magazine .mag-toolbar button { width: 44px; height: 44px; }
    .magazine .mag-chapters { position: static; grid-column: 1 / -1; justify-self: center; width: 100%; min-height: 44px; font-size: 16px; }
    .magazine .mag-dialog-bar { padding: 8px 16px; gap: 16px; }
    .magazine .mag-dialog-bar button { min-height: 44px; }
}

/* A touchscreen tap follows the project immediately, without a latched hover. */
@media (hover: none) {
    .gallery a:hover:not(:focus-visible) .plate-title { opacity: 0; }
}

/* Mobile type is 60% of its previous size. Scale each explicit type role once;
   inherited text follows naturally, while image sizes and touch targets stay intact.
   The coarse-pointer condition also covers phones turned to landscape. */
@media (max-width: 700px), (max-width: 950px) and (pointer: coarse) {
    body { --mobile-type-scale: .6; font-size: calc(16px * var(--mobile-type-scale)); }
    body small, body figcaption { font-size: calc(13px * var(--mobile-type-scale)); }
    body .mast > [data-open], body .detail-mast > a:not(.signature), body .rails a { font-size: calc(12px * var(--mobile-type-scale)); }
    body .mast h1, body .signature { font-size: calc(26px * var(--mobile-type-scale)); }
    body .entry-name { font-size: calc(clamp(20px, 1.5vw, 30px) * var(--mobile-type-scale)); }
    body .entry-disciplines { font-size: calc(clamp(16px, 1.12vw, 22px) * var(--mobile-type-scale)); }
    body .section-label h2 { font-size: calc(clamp(34px, 3.8vw, 74px) * var(--mobile-type-scale)); }
    body .section-label span, body .text-link, body .results small, body #result-count, body .placeholder { font-size: calc(13px * var(--mobile-type-scale)); }
    body .entry h2 { font-size: calc(clamp(32px, 7.6cqi, 48px) * var(--mobile-type-scale)); }
    body .entry .abstract { font-size: calc(clamp(21px, 4.5cqi, 29px) * var(--mobile-type-scale)); }
    body .entry .design-note { font-size: calc(clamp(16px, 3cqi, 19px) * var(--mobile-type-scale)); }
    body .filters :is(button, a) { font-size: calc(15px * var(--mobile-type-scale)); }
    body .plate-title { font-size: calc(clamp(20px, 1.7vw, 32px) * var(--mobile-type-scale)); }
    body #about .section-label h2 { font-size: calc(16px * var(--mobile-type-scale)); }
    body .profile article h2, body .profile article h2:not(:first-child) + p { font-size: calc(15px * var(--mobile-type-scale)); }
    body .profile article p { font-size: calc(clamp(16px, 1.05vw, 21px) * var(--mobile-type-scale)); }
    body #query { font-size: calc(clamp(34px, 4vw, 72px) * var(--mobile-type-scale)); }
    body .results strong, body .adjacent strong { font-size: calc(clamp(22px, 2.2vw, 45px) * var(--mobile-type-scale)); }
    body .project h1 { font-size: calc(clamp(28px, 2.5vw, 48px) * var(--mobile-type-scale)); }
    body .project-words-toggle { font-size: calc(12px * var(--mobile-type-scale)); }
    body .project-words-close { font-size: calc(23px * var(--mobile-type-scale)); }
    body .project-words-copy h2 { font-size: calc(clamp(64px, 4.8vw, 84px) * var(--mobile-type-scale)); }
    body .project-words-lead { font-size: calc(clamp(26px, 1.925vw, 32px) * var(--mobile-type-scale)); }
    body .project-words-note { font-size: calc(clamp(18px, 1.19vw, 20px) * var(--mobile-type-scale)); }
    body .book-title { font-size: calc(2.65cqw * var(--mobile-type-scale)); }
    body .book-edition { font-size: calc(1.8cqw * var(--mobile-type-scale)); }
    body .book-preface { font-size: calc(clamp(12px, 2.45cqw, 16px) * var(--mobile-type-scale)); }
    body .photographic-project > h1 { font-size: calc(clamp(18px, 1.25vw, 24px) * var(--mobile-type-scale)); }
    body .photo-colophon { font-size: calc(13px * var(--mobile-type-scale)); }
    body .photographic-project .photo-imprint { font-size: calc(11.5px * var(--mobile-type-scale)); }
    body .photo-reading-text p, body .photo-inline-note,
    body .photographic-project.is-reading .photo-inline-note { font-size: calc(clamp(18px, 1.16vw, 19px) * var(--mobile-type-scale)); }
    body .book-shelf h1, body .mag-heading h1 { font-size: calc(clamp(20px, 1.65vw, 32px) * var(--mobile-type-scale)); }
    body .book-volume span { font-size: calc(clamp(16px, 1.12vw, 22px) * var(--mobile-type-scale)); }
    body .mag-zoom, body .mag-dialog-bar, body .mag-dialog-bar button, body .mag-message { font-size: calc(14px * var(--mobile-type-scale)); }
    body .mag-toolbar, body .mag-subtitle { font-size: calc(13px * var(--mobile-type-scale)); }
    body .mag-toolbar button { font-size: calc(18px * var(--mobile-type-scale)); }
}

/* Preserve the existing narrow-screen type hierarchy at the same 0.6 ratio. */
@media (max-width: 700px) {
    body .mast h1, body .mast .signature { font-size: calc(22px * var(--mobile-type-scale)); }
    body .mast > [data-open], body .detail-mast > a:not(.signature) { font-size: calc(11px * var(--mobile-type-scale)); }
    body.home #works > .filters button { font-size: calc(12.5px * var(--mobile-type-scale)); }
    body.home #query { font-size: calc(28px * var(--mobile-type-scale)); }
    body.home .results strong { font-size: calc(24px * var(--mobile-type-scale)); }
    body .project .adjacent strong { font-size: calc(22px * var(--mobile-type-scale)); }
    body.single-sc_project .project-words-copy h2 { font-size: calc(clamp(34px, 9vw, 44px) * var(--mobile-type-scale)); }
    body.single-sc_project .project-words-lead { font-size: calc(21px * var(--mobile-type-scale)); }
    body.single-sc_project .project-words-note { font-size: calc(16px * var(--mobile-type-scale)); }
    body .magazine .mag-chapters { font-size: calc(16px * var(--mobile-type-scale)); }
}
