:root {
  color-scheme: light;
  --paper: #f6f0e6;
  --ivory: #fbf8f1;
  --ink: #292528;
  --muted: #595252;
  --rust: #944428;
  --line: #cdbcad;
  --rule: #ab9081;
  --plum: #2b252e;
  --light-ink: #fff4e8;
  --light-rust: #efb597;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: Roboto, Arial, sans-serif;
  --gutter: clamp(18px, 4.5vw, 72px);
  --reading-size: 1.0625rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-padding-block-end: max(.85rem, env(safe-area-inset-bottom, 0px));
}
html:has(.site-header) { --site-header-height: calc(84px + env(safe-area-inset-top, 0px)); }
:where(main, main [id], main :is(a, button, input, select, textarea, summary, [tabindex]),
  .breadcrumbs a, .site-footer a):not(dialog, dialog *) {
  scroll-margin-block-start: calc(var(--site-header-height, 0px) + .85rem);
}
body {
  margin: 0;
  font: 1rem/1.65 var(--sans);
  color: var(--ink);
  background: var(--paper);
}

body[data-reader-size="large"] { --reading-size: 1.3rem; }
body[data-reader-size="larger"] { --reading-size: 1.58rem; }

img { display: block; max-inline-size: 100%; height: auto; }
figure, blockquote, ol, ul, dl, dd, p { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.12; font-family: var(--serif); font-weight: 500; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.6rem, 6.35vw, 5.7rem); letter-spacing: -0.045em; text-wrap: balance; }
h2 { font-size: clamp(1.95rem, 3.45vw, 3.4rem); letter-spacing: -0.035em; text-wrap: balance; }
h3 { font-size: clamp(1.2rem, 2.1vw, 1.65rem); }
a { color: inherit; }
button, select { font: inherit; }
button { cursor: pointer; }
address { font-style: normal; }

:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }
main:focus, section:focus, article:focus { outline: none; }
section:focus-visible > h2, article:focus-visible > h1 { text-decoration: underline; text-decoration-color: var(--rust); text-underline-offset: .18em; }

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 6;
  inset-block-start: calc(.75rem + env(safe-area-inset-top, 0px));
  inset-inline-start: .75rem;
  padding: .8rem 1rem;
  background: var(--ink);
  color: var(--ivory);
}
.anchor-alias { display: block; block-size: 0; }
.frame {
  width: min(100% - 2 * var(--gutter), 1280px);
  margin-inline: auto;
  min-width: 0;
}
.prose, .reading-flow { max-inline-size: 66ch; }
.prose > p + p, .reading-flow > p + p { margin-top: .9em; }
.intro { max-inline-size: 57ch; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.2rem); }
.eyebrow { color: var(--rust); font: 700 .76rem/1.45 var(--sans); letter-spacing: .075em; text-transform: uppercase; }
.link {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule);
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
}
.link:hover { text-decoration-color: currentColor; }
.link > span, .button > span { flex: 0 0 auto; color: var(--rust); margin-inline-start: .15em; }

.actions, .jump-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem 1rem;
}
.actions { margin-top: 1.25rem; }
.jump-list { margin-top: 1.1rem; }
.actions > .link, .jump-list > .link, .zoom-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-inline-size: 0;
  min-block-size: 44px;
  font-size: .88rem;
  font-weight: 600;
}
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  max-inline-size: 100%;
  padding: .65rem 1rem;
  border: 1px solid transparent;
  font: 650 .91rem/1.35 var(--sans);
  text-decoration: none;
  overflow-wrap: anywhere;
  background: transparent;
  color: inherit;
}
.button--primary { background: var(--ink); color: var(--light-ink); }
.button--primary > span { color: var(--light-rust); }
.button--primary:hover { background: #3b333a; }
.button--outline { border-color: var(--rule); }
.button--outline:hover { background: var(--ivory); border-color: var(--rust); }
.button--text { padding-inline: 0; color: var(--rust); text-decoration: underline; text-underline-offset: .2em; }

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 5;
}
.site-header-panel {
  background: var(--paper);
  padding-block-start: env(safe-area-inset-top, 0px);
}
.site-header.is-scrolled .site-header-panel,
.site-header.is-menu-open .site-header-panel {
  background: var(--ivory);
  box-shadow: 0 3px 12px rgb(41 37 40 / .11);
}
.site-header-inner {
  min-height: 84px;
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(.8rem, 3vw, 2.4rem);
  border-bottom: 1px solid var(--line);
  padding-block: .55rem;
}
.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 144px;
  height: 58px;
}
.brand-lockup img { width: 100%; height: 100%; object-fit: contain; object-position: left center; }
.primary-nav, .languages { display: flex; flex-wrap: wrap; align-items: center; }
.primary-nav { justify-content: end; gap: 0 clamp(.65rem, 2vw, 1.75rem); }
.nav-link, .language-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  line-height: 1.3;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}
.nav-link:hover, .nav-link[aria-current="page"], .language-link[aria-current="page"] { color: var(--rust); text-decoration: underline; text-underline-offset: .32em; }
.languages { justify-content: end; gap: .04rem .2rem; }
.language-link { padding-inline: .44rem; inline-size: 4.9rem; color: var(--muted); }
.language-link + .language-link { border-inline-start: 1px solid var(--line); }
.menu-toggle { display: none; }

.breadcrumbs { padding-block: .56rem; color: var(--muted); font-size: .83rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .2em .6em; align-items: center; padding: 0; }
.breadcrumbs li + li::before { content: '/'; color: var(--rule); padding-inline-end: .5em; }
.breadcrumbs a { display: inline-flex; min-block-size: 44px; align-items: center; }
.breadcrumbs li { min-inline-size: 0; overflow-wrap: anywhere; }

.figure { min-inline-size: 0; }
.figure img, .figure picture { display: block; width: 100%; }
.figure figcaption { padding-top: .55rem; color: var(--muted); font: 400 .82rem/1.5 var(--sans); }
.figure picture:has(img) { line-height: 0; }
.section-icon { width: 32px; height: 32px; flex: 0 0 32px; object-fit: contain; }

.quotation { margin-block: 1.2em; padding-inline-start: clamp(.8rem, 2vw, 1.35rem); border-inline-start: 2px solid var(--rust); }
.quotation blockquote { font: 500 clamp(1.14rem, 2.3vw, 1.7rem)/1.48 var(--serif); color: var(--ink); }
.quotation figcaption { color: var(--muted); font-size: .83rem; margin-top: .55rem; }
.reading-flow { font-size: var(--reading-size); }
.reading-flow .quotation blockquote { font-size: max(1.15em, clamp(1.15rem, 2vw, 1.7rem)); }

.chapter, .section, .gallery-section { padding-block: clamp(2.25rem, 6vw, 5.3rem); }
.chapter > h2, .section > h2, .gallery-section h2 { margin-bottom: clamp(.9rem, 2.6vw, 1.65rem); }
.chapter-spread + .chapter-spread, .chapter-spread + .chapter, .chapter + .chapter-spread, .chapter + .chapter,
.section + .section, .gallery-section + .gallery-section { border-top: 1px solid var(--line); }
.home-opening { padding-top: clamp(1.8rem, 5vw, 4.8rem); padding-bottom: clamp(1.5rem, 4.1vw, 3.6rem); }
.home-spread, .chapter-spread, .reader-spread, .debut-spread {
  display: grid;
  grid-template-columns: minmax(0, .97fr) minmax(0, 1.03fr);
  align-items: center;
  gap: clamp(1.4rem, 4.7vw, 4.4rem);
}
.home-spread h1 { max-inline-size: 13ch; margin-bottom: 1.05rem; }
.home-title .intro { max-inline-size: 53ch; }
.home-scene img { aspect-ratio: 4/3; object-fit: cover; }
.chapter-spread--reverse { grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); }
.chapter-spread--reverse > .figure { grid-area: 1 / 1; }
.chapter-spread--reverse > .chapter { grid-area: 1 / 2; }
.chapter-spread .figure { margin-block: 1.7rem; }
.chapter-spread .portrait-illustration { width: min(100%, 410px); justify-self: center; }
.home-film .wide-still { margin-block: 1.25rem; }
.home-toc {
  position: relative;
  display: flex;
  align-items: start;
  flex-wrap: wrap;
  gap: 0 1.45rem;
  border-block: 1px solid var(--line);
  color: var(--muted);
  font-size: .91rem;
  font-weight: 550;
}
.home-toc > .link, .home-toc summary { min-block-size: 44px; line-height: 44px; }
.home-toc summary { cursor: pointer; color: var(--ink); }
.home-toc nav { padding: .15rem .75rem .8rem 0; }
.home-toc li { padding-inline-start: .2rem; }
.home-toc li > a { display: inline-flex; min-height: 42px; align-items: center; }

.direction-index {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4,minmax(0, 1fr));
  gap: 1.15rem;
  margin-top: 1.25rem;
  padding: 0;
}
.direction-index li { display: flex; flex-direction: column; min-inline-size: 0; border-top: 2px solid var(--rule); padding-block: .65rem .1rem; }
.direction-index li > p { font-size: .93rem; color: var(--muted); }
.direction-index .section-icon { order: -1; margin-bottom: .25rem; }
.direction-index-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  font: 550 1.23rem/1.3 var(--serif);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  text-decoration-color: var(--rule);
  overflow-wrap: anywhere;
}
.direction-index-link > span { color: var(--rust); }
.process {
  margin-block: 1.15rem;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0;
}
.process li { display: flex; align-items: start; gap: .85rem; border-top: 1px solid var(--line); padding-block: .8rem; }
.process li h3 { font: 650 1rem/1.4 var(--sans); margin-bottom: .16em; }
.process li p { color: var(--muted); }
.process--ordered { counter-reset: process; }
.process--ordered > li::before { counter-increment: process; content: counter(process) "."; color: var(--rust); font-weight: 650; }
.home-film > .process, .studio-section .process { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.35rem; }

.contact-details { margin-block: 1.1rem 0; }
.contact-details > div { position: relative; padding-block: .6rem; padding-inline-start: calc(32px + .9rem); }
.contact-details dt .section-icon { position: absolute; inset-block-start: .6rem; inset-inline-start: 0; }
.contact-details dt { font-weight: 650; }
.contact-details dd { overflow-wrap: anywhere; }
.contact-details dd a { display: inline-flex; align-items: center; min-height: 44px; }

.interior-opening { padding-block: 1rem clamp(1.7rem, 4.8vw, 4rem); }
.interior-opening h1, .reader-spread h1, .privacy-copy h1 { margin-bottom: .95rem; }
.interior-opening .intro { max-inline-size: 60ch; }
.catalog-shortcut {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-block-size: 44px;
  margin-block-start: .4rem;
  font-weight: 650;
}
.gallery-section { border-top: 1px solid var(--line); }
.gallery-publishing, .gallery-painting, .gallery-objects {
  display: grid;
  column-gap: clamp(1.8rem, 6vw, 5rem);
  align-items: start;
}
.gallery-publishing { grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr); }
.gallery-publishing .eyebrow { margin-bottom: .55rem; }
.gallery-editorial-image { justify-self: end; width: min(100%, 430px); }
.gallery-book-entry {
  align-self: start;
  margin-top: 1.25rem;
  border-top: 2px solid var(--rule);
  padding: 1.05rem 1.15rem;
  background: var(--ivory);
}
.gallery-book-entry h3 { font-size: clamp(1.7rem, 3vw, 2.55rem); margin: .4rem 0 .65rem; }
.gallery-book-entry:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }
.gallery-book-entry .book-choices { margin-block: 0 1rem; }
.gallery-painting { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); grid-template-areas: "art title" "art copy"; grid-template-rows: auto 1fr; }
.gallery-objects { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); grid-template-areas: "title art" "copy art"; grid-template-rows: auto 1fr; }
.gallery-painting > h2, .gallery-objects > h2 { grid-area: title; }
.gallery-painting > .prose, .gallery-objects > .prose { grid-area: copy; }
.gallery-painting > .figure, .gallery-objects > .figure { grid-area: art; }
.gallery-portrait { justify-self: start; width: min(100%, 455px); }
.gallery-objects .gallery-portrait { justify-self: end; }
.studio-section { background: var(--plum); color: var(--light-ink); padding-block: clamp(2.25rem, 6vw, 5rem); }
.studio-heading { display: flex; flex-wrap: wrap; gap: 1rem 3.25rem; align-items: center; margin-bottom: 1.25rem; }
.studio-heading .eyebrow { color: var(--light-rust); }
.studio-heading h2 { font: 550 clamp(3.4rem, 10vw, 7.5rem)/1 var(--sans); letter-spacing: -.065em; }
.studio-section .intro, .studio-section .figure figcaption, .studio-section .process p { color: #ebdcd7; }
.studio-section .process li { border-color: #80717c; }
.studio-section .process li::before, .studio-section a > span { color: var(--light-rust); }
.studio-section .button--outline { border-color: #b1a0a3; }
.studio-section .button--outline:hover { background: #423945; }
.studio-section :focus-visible { outline-color: var(--light-rust); }
.album-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1.6rem;
  margin-top: 1.3rem;
}
.album-grid h3 { margin-top: .65rem; }
.album-grid p { margin-top: .35rem; }
.contact-end p { color: var(--muted); }

.book-hero {
  display: grid;
  align-items: start;
  align-content: start;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
  grid-template-rows: auto auto 1fr;
  grid-template-areas: "title cover" "actions cover" "copy cover";
  gap: clamp(1rem, 2vw, 1.45rem) clamp(1.6rem, 6vw, 6.2rem);
  padding-block: clamp(1rem, 4.7vw, 4.25rem) clamp(1rem, 3vw, 2.5rem);
}
.book-heading { grid-area: title; align-self: end; }
.book-heading .eyebrow { margin-bottom: .72rem; }
.book-heading h1 { max-inline-size: 10ch; text-wrap: normal; }
.book-heading h1 span { color: var(--rust); display: block; }
.book-subtitle { margin-top: .62rem; font: 500 clamp(1.12rem, 2.25vw, 1.8rem)/1.35 var(--serif); }
.book-cover { grid-area: cover; justify-self: center; width: 100%; }
.cover-mount {
  display: grid;
  justify-items: center;
  padding: clamp(.8rem, 2.65vw, 2.25rem);
  border: 1px solid var(--line);
  background: #e9dfd1;
}
.cover-mount img { width: min(100%, 340px); height: auto; box-shadow: 10px 12px 24px #5c3d382a; }
.book-cover figcaption { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 .75rem; }
.book-cover figcaption .zoom-link { flex: 0 0 auto; max-inline-size: 100%; color: var(--ink); }
.book-actions { grid-area: actions; }
.book-actions .actions { margin-top: 0; }
.book-copy { grid-area: copy; font-size: var(--reading-size); }
.edition-note { color: var(--muted); font-size: .85rem; line-height: 1.55; margin-block-start: .55rem; }
.book-display-title { font: 500 clamp(2.25rem, 4.3vw, 4.15rem)/1.06 var(--serif); color: var(--rust); }
.debut-prose > .prose { margin-top: 1rem; }
.cover-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; margin-top: 1.55rem; }
.cover-details .figure img { width: 100%; border: 1px solid var(--line); }
.cover-details .detail-caption { color: var(--ink); font-size: var(--reading-size); }
.cover-details .detail-caption h3 { margin-bottom: .35rem; }
.book-body #lectura { max-inline-size: 66ch; margin-inline: auto; }

.view-stage {
  display: grid;
  place-items: center;
  min-block-size: clamp(230px, 36vw, 420px);
  padding: 1.5rem;
  overflow: hidden;
  background: #e9dfd1;
  border: 1px solid var(--line);
  touch-action: pan-y;
}
.view-stage .view-cover { width: min(66%,250px); box-shadow: 9px 10px 20px #4e332f47; }
.view-stage .view-detail { display: none; }
[data-book-viewer][data-view="angle"] .view-cover { transform: perspective(720px) rotateY(-18deg); }
[data-book-viewer][data-view="detail"] .view-cover { display: none; }
[data-book-viewer][data-view="detail"] .view-detail { display: block; width: min(100%,460px); }
.viewer-controls, .view-note { display: flex; align-items: center; gap: .35rem .65rem; justify-content: space-between; flex-wrap: wrap; }
.viewer-controls fieldset { display: flex; flex-wrap: wrap; min-width: 0; padding: 0; border: 0; margin: 0; }
.viewer-controls label { position: relative; cursor: pointer; display: flex; }
.viewer-controls label span { padding: .5rem .6rem; min-height: 44px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; }
.viewer-controls input { position: absolute; opacity: 0; }
.viewer-controls input:checked + span { color: var(--rust); border-color: var(--rust); }
.viewer-controls input:focus-visible + span { outline: 2px solid var(--rust); outline-offset: -3px; }
.viewer-arrow { padding: .48rem .66rem; }

dialog {
  max-inline-size: min(96vw, 580px);
  max-block-size: 94vh;
  overflow: auto;
  padding: .85rem clamp(.8rem,2vw,1.2rem) 1.1rem;
  background: var(--ivory);
  color: var(--ink);
  border: 1px solid var(--rule);
}
dialog::backdrop { background: #221c22c7; }
body:has(dialog[open]) { overflow: hidden; }
dialog > img { margin-inline: auto; width: auto; max-width: 100%; max-height: 76vh; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding-bottom: .7rem; }
.dialog-header h2 { font-size: clamp(1.05rem, 3.6vw, 1.55rem); }

.reader-tools {
  border-block: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: start;
  flex-wrap: wrap;
  gap: .3rem 1rem;
  padding-block: .45rem;
  font-size: .88rem;
  color: var(--muted);
}
.reader-tools > label { display: flex; align-items: center; flex-wrap: wrap; gap: .15rem .55rem; }
.reader-tools select { max-inline-size: 100%; min-height: 44px; color: var(--ink); background: var(--ivory); border: 1px solid var(--rule); padding: .4rem .65rem; }
.reader-tools select:focus { border-color: var(--rust); }
#lectura .reader-tools { margin-block: 1rem; }
.reader-spread { padding-block: 1rem 2rem; align-items: start; }
.reader-spread .eyebrow { margin-bottom: .72rem; }
.reader-spread .intro { font-size: max(var(--reading-size), 1.14rem); }
.notebook-tools .edition-note { margin-top: .7rem; }
.notebook-screen > .reading-flow { margin-inline: auto; }
.reading-phases { display: grid; gap: .75rem; margin-top: 1rem; }
.reading-phase { padding: 1rem 1rem 1rem 1.15rem; border-inline-start: 2px solid var(--rule); background: var(--ivory); }
.reading-phase:nth-child(2) { border-color: var(--rust); }
.reading-phase:nth-child(3) { border-color: var(--plum); }
.reading-phase ul, .group-questions, .group-sources ul { padding-inline-start: 1.4rem; margin-top: .68rem; }
.reading-phase ul > li + li, .group-questions > li + li { margin-top: .45em; }
.notebook-conversation { grid-template-columns: minmax(0,.99fr) minmax(0,1.01fr); padding-block: 0; }
.conversation-steps { padding-inline-start: 1.2rem; margin-block: 1rem; }
.conversation-steps li { border-top: 1px solid var(--line); padding-block: .7rem; padding-inline-start: .35rem; }
.conversation-steps .eyebrow { margin-bottom: .24rem; }
.conversation-steps h3 { margin-bottom: .28rem; }
.conversation-prompt, .notes-section { background: var(--ivory); border-inline-start: 2px solid var(--rust); padding: .8rem 1rem; margin-block: 1rem; }
.notes-section h3 { margin-bottom: .35rem; }
.print-sheet { display: none; }

.group-cover { width: min(73%, 342px); justify-self: center; }
.group-opening { align-items: center; }
.group-narrative .reading-flow, .group-body article > .reading-flow, .group-sources { margin-inline: auto; }
.group-art { margin-inline: auto; width: min(100%, 890px); }
.group-sources li + li { margin-top: .4rem; }
.group-sources h3 { margin-top: 1.6rem; }
.group-sources > .link { display: inline-flex; align-items: center; min-height: 44px; }
.privacy-copy { margin-inline: auto; padding-block: 1.4rem 3.5rem; }
.privacy-copy > section { margin-top: 1.75rem; }
.privacy-copy h2 { margin-bottom: .45rem; font-size: clamp(1.35rem, 2.9vw, 2rem); }

.site-footer { border-top: 1px solid var(--line); background: var(--ivory); }
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1.25rem 1.7rem;
  padding-block: 1.4rem .85rem;
}
.footer-identities { display: flex; flex-wrap: wrap; gap: .35rem .6rem; }
.footer-identities .brand-lockup { width: 133px; height: 56px; }
.footer-nav { align-content: start; display: flex; gap: 0 1.1rem; flex-wrap: wrap; }
.footer-nav > .link, .footer-end > .link { display: inline-flex; align-items: center; min-height: 44px; font-size: .86rem; }
.footer-end { grid-column: 1/-1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .2rem 1rem; padding-top: .3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

.error-page { padding-block: 3rem; }
.error-page section { margin-top: 1rem; padding-block: 1.2rem; border-top: 1px solid var(--line); }
.error-page section p { margin-block: .65rem .95rem; }

@media (max-width: 950px) {
  html:has(.site-header) { --site-header-height: calc(106px + env(safe-area-inset-top, 0px)); }
  .site-header-inner { column-gap: .6rem; }
  .primary-nav { gap: 0 .75rem; }
  .languages { column-gap: 0; }
  .direction-index { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-inner { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 820px), (max-width: 1024px) and (max-height: 480px) {
  html:has(.site-header) { --site-header-height: 0px; }
  html.nav-js:has(.site-header) {
    --compact-header-height: calc(48px + 44px + .45rem + 1px + env(safe-area-inset-top, 0px));
    --site-header-height: var(--compact-header-height);
  }
  .site-header { position: relative; }
  .nav-js .site-header {
    position: sticky;
    block-size: var(--compact-header-height);
  }
  .nav-js .site-header.is-hidden:not(.is-menu-open):not(:has(:focus-visible)) {
    transform: translateY(calc(-100% - 1rem));
    transition: transform 150ms ease-in;
    pointer-events: none;
  }
  .site-header-inner {
    grid-template-columns: minmax(0,1fr) auto;
    min-height: 0;
    padding-block: .3rem .15rem;
  }
  .site-header .brand-lockup { width: min(100%, 112px); height: 48px; }
  .menu-toggle {
    display: flex;
    align-items: center;
    min-height: 44px;
    gap: .65rem;
    padding: .35rem .6rem;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: .88rem;
  }
  .menu-close-label, .menu-toggle[aria-expanded="true"] .menu-open-label { display: none; }
  .menu-toggle[aria-expanded="true"] .menu-close-label { display: inline; }
  .menu-mark { display: grid; align-items: center; width: 17px; height: 16px; }
  .menu-mark::before, .menu-mark::after {
    content: ""; grid-area: 1/1; width: 100%; border-top: 1.5px solid currentColor;
  }
  .menu-mark::before { transform: translateY(-3px); }
  .menu-mark::after { transform: translateY(3px); }
  .menu-toggle[aria-expanded="true"] .menu-mark::before { transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-mark::after { transform: rotate(-45deg); }
  .languages { grid-row: 3; grid-column: 1/-1; flex-wrap: nowrap; justify-content: end; }
  .language-link { min-inline-size: 0; padding-inline: clamp(.2rem, 1.65vw, .65rem); }
  .primary-nav {
    grid-row: 2; grid-column: 1/-1; display: grid; grid-template-columns: 1fr;
    justify-content: stretch; gap: 0; border-top: 1px solid var(--line);
  }
  .nav-js .primary-nav {
    max-block-size: max(0px, min(20rem, calc(100dvh - var(--compact-header-height) - env(safe-area-inset-bottom, 0px) - .5rem)));
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
  .primary-nav .nav-link {
    min-height: 48px; padding: .45rem .55rem; justify-content: space-between; gap: 1rem;
    border-bottom: 1px solid var(--line); text-align: start;
  }
  .primary-nav .nav-link::after {
    content: ""; flex: none; width: .4rem; height: .4rem; margin-inline-end: .22rem;
    border: solid currentColor; border-width: 1px 1px 0 0; transform: rotate(45deg);
  }
  .primary-nav .nav-link:focus-visible { outline-offset: -3px; }
  .nav-js .site-header:not(.is-menu-open) .primary-nav { display: none; }
}

@media (min-width: 560px) and (max-width: 1024px) and (max-height: 480px) and (orientation: landscape) {
  html.nav-js:has(.site-header) {
    --compact-header-height: calc(48px + .6rem + 1px + env(safe-area-inset-top, 0px));
  }
  .site-header-inner {
    grid-template-columns: minmax(0,1fr) auto auto;
    padding-block: .3rem;
  }
  .site-header .menu-toggle { grid-area: 1 / 2; }
  .site-header .languages { grid-area: 1 / 3; }
}

@media (max-width: 670px) {
  h1 { font-size: clamp(2.26rem, 10.4vw, 4.1rem); }
  h2 { font-size: clamp(1.85rem, 7.4vw, 2.6rem); }
  .home-spread, .chapter-spread, .chapter-spread--reverse, .reader-spread, .debut-spread,
  .gallery-publishing, .gallery-painting, .gallery-objects, .notebook-conversation { grid-template-columns: minmax(0,1fr); }
  .home-spread h1 { max-inline-size: 15ch; }
  .home-scene img { aspect-ratio: 680/570; }
  .chapter-spread { gap: 0; }
  .chapter-spread--reverse > .chapter, .chapter-spread--reverse > .figure { grid-area: auto; }
  .chapter-spread .chapter { padding-bottom: 0; }
  .chapter-spread .figure { margin-block: 1rem 2.2rem; }
  .home-toc { column-gap: .85rem; }
  .interior-opening .jump-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .interior-opening .jump-list .link { line-height: 1.35; }
  .home-film > .process, .studio-section .process { grid-template-columns: minmax(0,1fr); gap: 0; }
  .gallery-publishing, .gallery-objects, .gallery-painting { gap: 1rem; }
  .gallery-painting, .gallery-objects { grid-template-areas: "title" "art" "copy"; grid-template-rows: auto auto auto; }
  .gallery-section h2, .gallery-copy h2 { margin-bottom: .75rem; }
  .gallery-editorial-image, .gallery-objects .gallery-portrait { justify-self: start; }
  .gallery-book-entry { margin-top: 0; }
  .album-grid, .cover-details, .footer-inner { grid-template-columns: minmax(0,1fr); }
  .studio-heading { gap: .65rem; }
  .book-hero { grid-template-columns: minmax(0,1fr); grid-template-areas: "title" "cover" "actions" "copy"; row-gap: .8rem; padding-block: .6rem 1rem; }
  .book-heading h1 { max-inline-size: 13ch; }
  .book-heading h1 span { display: inline; }
  .book-heading .eyebrow { font-size: .7rem; margin-bottom: .55rem; }
  .book-cover { max-width: 390px; }
  .cover-mount { padding: .65rem; }
  .cover-mount img { width: min(65%, 238px); }
  .book-cover figcaption { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; padding-top: 0; }
  .book-cover figcaption .zoom-link { font-size: .85rem; }
  .book-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: .45rem; }
  .book-choices .button { min-inline-size: 0; gap: .35rem; padding: .45rem .65rem; font-size: .85rem; }
  :lang(ru) .privacy-copy h1 { font-size: clamp(1.7rem, 7.7vw, 3.2rem); }
  .group-cover { width: min(71%, 250px); justify-self: start; }
  .viewer-arrow { display: none; }
  .footer-inner { gap: .6rem; }
  .footer-identities .brand-lockup { width: 112px; height: 48px; }
}

@media (max-width: 360px) {
  .direction-index { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 285px) {
  .book-cover figcaption { grid-template-columns: minmax(0, 1fr); }
  .book-choices { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@page { size: A4; margin: 16mm; }

@media print {
  :root { --paper: #fff; --ivory: #fff; --ink: #161316; --rust: #68351f; --muted: #393434; }
  body { font-size: 10.5pt; background: #fff; color: #161316; }
  .site-header, .site-footer, .skip-link, .breadcrumbs, .actions, .jump-list, .reader-tools, dialog { display: none !important; }
  .frame { width: 100%; }
  h1, h2, h3 { break-after: avoid; }
  figure { break-inside: avoid; }
  body[data-page="notebook"] .notebook-screen { display: none; }
  .print-sheet { display: block; font-size: 10.4pt; line-height: 1.36; color: #161316; }
  .print-sheet * { break-inside: avoid; }
  .print-sheet > header { padding-bottom: 4mm; border-bottom: .3mm solid #795f51; }
  .print-brand { color: #68351f; font-weight: 700; }
  .print-sheet h2 { font-size: 24pt; line-height: 1.18; margin-block: 1mm 2mm; }
  .print-book { font: 550 12pt/1.35 var(--serif); }
  .print-language { margin-top: 2mm; font-size: 9pt; }
  .print-questions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4mm; margin-block: 5mm; }
  .print-sheet h3 { font: 700 11pt/1.22 var(--sans); margin-bottom: 2mm; }
  .print-sheet ul, .print-sheet ol { padding-inline-start: 4.5mm; }
  .print-sheet li + li { margin-top: 1.4mm; }
  .print-conversation { border-block: .25mm solid #a4998e; padding-block: 3mm; }
  .print-conversation ol { margin-block: 2mm; }
  .print-note-space { margin-top: 4mm; }
  .print-lines { margin-top: 1mm; }
  .print-lines > span { display: block; block-size: 7mm; border-bottom: .22mm solid #a4998e; }
  .print-sheet > footer { margin-top: 3mm; font-size: 8pt; }
}
