/* Portrait book: the original nine faces become full-width, turning leaves. */
.mobile-page-controls { display: none; }
.book-viewport { display: contents; }
.mobile-page-window, .mobile-page-content { display: contents; }
.mobile-privacy-link { display: none; }
.mobile-book .mobile-privacy-link { display: inline-block; font-size: 11px; text-decoration: underline; margin: 4px 0 18px; }

body.mobile-book {
  --mobile-page-width: min(440px, calc(100vw - 40px));
  --mobile-page-height: 540px;
  --mobile-nav-height: 62px;
}
.mobile-book .book-scroll { overflow-anchor: none; }

.mobile-book .masthead {
  position: fixed;
  height: 66px !important;
  margin: 0 20px;
  padding: 0 2px;
}
.mobile-book .brand { gap: 7px; font-size: 26px; }
.mobile-book .brand-symbol { width: 30px; transform: scale(.8); }
.mobile-book .brand-sub { margin-top: 5px; font-size: 7px; }
.mobile-book .masthead-note { display: none; }
.mobile-book .contact-link { min-height: 44px; gap: 16px; font-size: 12px; }

.mobile-book .book-stage {
  height: var(--mobile-stage-height, 100svh);
  width: 100%;
  min-height: 0;
  top: 0;
  left: 0;
  position: fixed;
  overflow: hidden;
}
.mobile-book .book-stage::after { display: none; }
.mobile-book .hero-intro {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}
.mobile-book .hero-intro .open-book { display: none; }
.mobile-book .edition-label {
  top: 77px;
  width: var(--mobile-page-width);
  opacity: 1;
  text-align: center;
  font-size: 7px;
  letter-spacing: .15em;
  line-height: 1;
}
.mobile-book .edition-label span { margin-left: 18px; }
.mobile-book .ambient { display: none; }

.mobile-book .book-viewport {
  display: block;
  position: absolute;
  top: 94px;
  right: 0;
  bottom: calc(144px + env(safe-area-inset-bottom, 0px));
  left: 0;
  overflow: hidden;
  overflow: clip;
}
.mobile-book .book-scene {
  width: var(--mobile-page-width);
  height: var(--mobile-page-height);
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  perspective: none;
}
.mobile-book .book {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  transform-origin: 50% 50%;
  transform-style: flat;
  -webkit-transform-style: flat;
  will-change: auto;
}
.mobile-book .sheet { display: contents; }
.mobile-book .book .face {
  inset: 0 auto auto 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 25px 25px 23px;
  aspect-ratio: auto;
  border-radius: 1px 4px 4px 1px;
  transform: rotateY(0deg);
  transform-origin: 0 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: auto;
  overflow: hidden;
  box-shadow: inset 1px 0 2px #fff9, 2px 2px 4px #21342616;
}
.mobile-book .book .face::after {
  background: linear-gradient(90deg, #132a203b, transparent 30%, #132a201a 90%, #132a204a);
}
.mobile-book .mobile-page-window {
  display: block;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  overflow: clip;
  margin-inline: -8px;
  padding-inline: 8px;
}
.mobile-book .mobile-page-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.mobile-book .mobile-page-content > * { flex-shrink: 0; }
.mobile-book .book.measuring-content .face { transform: none !important; visibility: hidden !important; }
.mobile-book .book-ground-shadow {
  left: 0 !important;
  width: 100% !important;
  height: 96%;
  top: 2%;
  filter: none;
  background: transparent;
  box-shadow: 6px 10px 22px #233d2c26;
  transform: translate(8px, 16px);
}
.mobile-book .back-board {
  left: -2px;
  top: -3px;
  width: calc(100% + 8px);
  height: calc(var(--mobile-page-height) + 8px);
  box-shadow: 12px 16px 28px #223c2829;
}
.mobile-book .paper-edges {
  left: 0;
  width: calc(100% + 4px);
  top: 3px;
  height: calc(var(--mobile-page-height) + 2px);
}
.mobile-book .book-binding {
  left: 0;
  width: 5px;
  height: var(--mobile-page-height);
  opacity: .55;
  z-index: 30;
}

/* Complete page compositions: spacing and artwork adapt to the fixed paper. */
.mobile-book .book .paper { padding: clamp(12px, calc(var(--mobile-page-height) * .035), 22px); }
.mobile-book .paper .page-top,
.mobile-book .paper .page-bottom {
  font-size: 7px;
  line-height: 1.5;
  letter-spacing: .075em;
}
.mobile-book .paper .page-top {
  padding-bottom: 7px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.mobile-book .paper .page-bottom {
  padding-top: 7px;
  margin-top: 8px;
  flex-shrink: 0;
}
.mobile-book .paper h2 {
  font-size: clamp(26px, calc(var(--mobile-page-height) * .06), 36px);
  line-height: 1.02;
  margin-bottom: 10px;
}
.mobile-book .paper p,
.mobile-book .paper .outcomes p,
.mobile-book .paper .impact-description {
  font-size: clamp(12.5px, calc(var(--mobile-page-height) / 40), 14px) !important;
  line-height: 1.4;
}
.mobile-book .paper .eyebrow {
  font-size: 8px !important;
  line-height: 1.6;
  letter-spacing: .1em;
  margin-bottom: 8px;
}
.mobile-book .story-left p + p { margin-top: 9px; }
.mobile-book .story-left .drop-cap::first-letter {
  font-size: 44px;
  line-height: .8;
  margin: 5px 8px 0 0;
}
.mobile-book .story-signature { padding: 12px 0 2px; }
.mobile-book .story-signature span { font-size: 11px; }
.mobile-book .story-signature strong { font-size: 21px; line-height: 1.2; }
.mobile-book .story-right h2 { font-size: clamp(25px, calc(var(--mobile-page-height) * .055), 34px); margin-bottom: 10px; }
.mobile-book .growth-illustration {
  height: clamp(70px, calc(var(--mobile-page-height) * .3), 220px);
  max-height: none;
  width: 90%;
  flex: 0 0 auto;
  margin: 10px 0;
}
.mobile-book .values-line {
  font-size: 6.1px;
  line-height: 1.5;
  letter-spacing: .035em;
  margin: auto 0 4px;
  gap: 5px;
}
.mobile-book .expertise-intro .orbit-diagram {
  height: clamp(65px, calc(var(--mobile-page-height) * .22), 150px);
  min-height: 0;
  max-height: none;
  flex: 0 0 auto;
  margin: 4px 0 12px;
}
.mobile-book .orbit-center { font-size: 23px; }
.mobile-book .orbit-label { font-size: 7px; padding: 4px; }
.mobile-book .expertise-intro p:not(.eyebrow) { margin: 0; }
.mobile-book .service-list { margin: 0; }
.mobile-book .service-list button { padding: 12px 0; min-height: 70px; gap: 12px; }
.mobile-book .service-list strong { font-size: 24px; line-height: 1.05; }
.mobile-book .service-list small { font-size: 12px; line-height: 1.4; margin-top: 5px; }
.mobile-book .service-number { font-size: 15px; padding-top: 3px; }
.mobile-book .service-arrow { font-size: 23px; }
.mobile-book .impact-page .page-top { margin-bottom: 10px; }
.mobile-book .impact-page h2 { margin-bottom: 10px; }
.mobile-book .impact-stat { margin-top: auto; }
.mobile-book .stat-over { font-size: 8px; margin-top: 9px; }
.mobile-book .impact-stat strong { font-size: clamp(62px, calc(var(--mobile-page-height) * .2), 120px); }
.mobile-book .impact-stat strong span { font-size: .75em; }
.mobile-book .stat-caption { font-size: 9px; margin-top: 7px; }
.mobile-book .impact-description { margin-top: 12px; max-width: 100%; }
.mobile-book .impact-flourish { font-size: 25px; margin: 8px 0; }
.mobile-book .outcomes { margin-bottom: 4px; }
.mobile-book .outcomes > div { padding: 9px 17px 9px 0; }
.mobile-book .outcomes h3 { font-size: 23px; line-height: 1.08; margin-bottom: 5px; }
.mobile-book .outcome-symbol { font-size: 20px; top: 14px; }
.mobile-book .small-link { font-size: 12px; min-height: 36px; margin-bottom: 2px; gap: 12px; }
.mobile-book .small-link > span { font-size: 21px; }
.mobile-book .contact-art-copy { margin-top: 12px; }
.mobile-book .contact-art h2 { font-size: clamp(32px, calc(var(--mobile-page-height) * .085), 50px); line-height: .98; }
.mobile-book .sunrise {
  position: relative;
  inset: auto;
  width: 100%;
  height: clamp(65px, calc(var(--mobile-page-height) * .22), 140px);
  min-height: 0;
  flex: 0 0 auto;
  margin: auto 0 4px;
}
.mobile-book .contact-page-content { margin-top: 4px; }
.mobile-book .contact-page-content h2 { font-size: clamp(26px, calc(var(--mobile-page-height) * .06), 36px); line-height: 1; }
.mobile-book .contact-page-content .button {
  margin: 12px 0 6px;
  padding: 10px 12px;
  min-height: 38px;
  font-size: 13px;
}
.mobile-book .contact-details a { padding: 7px 0; min-height: 34px; gap: 6px; font-size: 12px; }
.mobile-book .contact-details a span { font-size: 20px; }
.mobile-book .paper .contact-postscript { font-size: 18px !important; line-height: 1.2; margin-top: 12px; margin-bottom: 8px; }
.mobile-book .mobile-privacy-link { margin: 0; }

/* Compact composition is keyed to the frozen paper height, not toolbar motion. */
.mobile-book.compact-pages .paper h2 br { display: none; }
.mobile-book.compact-pages .paper h2 { font-size: 24px; line-height: 1; margin-bottom: 8px; }
.mobile-book.compact-pages .paper .eyebrow { font-size: 7px !important; margin-bottom: 6px; }
.mobile-book.compact-pages .story-left p + p { margin-top: 6px; }
.mobile-book.compact-pages .story-signature { padding-top: 8px; }
.mobile-book.compact-pages .service-list button { padding: 7px 0; min-height: 58px; }
.mobile-book.compact-pages .service-list strong { font-size: 21px; }
.mobile-book.compact-pages .outcomes > div { padding-block: 3px; }
.mobile-book.compact-pages .outcomes h3 { font-size: 18px; line-height: 1.05; margin-bottom: 3px; }
.mobile-book.compact-pages .paper .outcomes p { line-height: 1.25; }
.mobile-book.compact-pages .small-link { min-height: 28px; padding-bottom: 3px; margin-bottom: 0; }
.mobile-book.compact-pages .small-link > span { font-size: 16px; }
.mobile-book.compact-pages .contact-page-content h2 { font-size: 21px; margin-bottom: 6px; }
.mobile-book.compact-pages .contact-page-content { margin-top: 0; }
.mobile-book.compact-pages .contact-page-content .button { margin: 8px 0 2px; min-height: 30px; padding: 6px 10px; font-size: 12px; }
.mobile-book.compact-pages .contact-details a { min-height: 26px; padding-block: 4px; line-height: 1.2; }
.mobile-book.compact-pages .contact-page-content .button > span,
.mobile-book.compact-pages .contact-details a span { font-size: 16px; line-height: 1; }
.mobile-book.compact-pages .paper .contact-postscript { font-size: 15px !important; line-height: 1.1; margin: 8px 0 4px; }
.mobile-book.compact-pages .contact-page-content p:not(.eyebrow):not(.contact-postscript) { line-height: 1.25; }

.mobile-book .book .cover {
  container-type: size;
  padding: 32px 29px 23px;
  box-shadow: inset 6px 0 9px #071910a0, inset -2px 0 4px #071910b0, inset 0 0 1px 1px #c1c9a050, 6px 5px 9px #1e2c2740;
}
.mobile-book .cover-brand { font-size: min(20px, 5cqh); line-height: 1.1; }
.mobile-book .cover-brand span { font-size: min(8px, 2cqh); }
.mobile-book .cover-edition { font-size: min(7px, 1.7cqh); margin-top: 4cqh; }
.mobile-book .cover h2 { font-size: min(70px, 14.8cqh); line-height: .94; margin-top: 4cqh; }
.mobile-book .cover-emblem { width: min(118px, 30cqh); height: min(89px, 22cqh); margin-top: 3cqh; margin-bottom: 3cqh; flex-shrink: 0; }
.mobile-book .cover-emblem div { width: 70%; height: 93%; }
.mobile-book .cover-emblem div:nth-child(3) { width: 64%; height: 85%; left: 18%; }
.mobile-book .cover-emblem i { inset: -12% 49%; }
.mobile-book .cover-emblem span { font-size: min(43px, 11cqh); padding: 1.2cqh; }
.mobile-book .cover-bottom { font-size: min(7.5px, 1.8cqh); line-height: 1.8; margin-bottom: 2cqh; }
.mobile-book .cover-volume { font-size: min(7px, 1.7cqh); }

.mobile-book .mobile-page-controls {
  position: absolute;
  top: auto;
  bottom: calc(98px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: var(--mobile-page-width);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 26;
}
.mobile-page-controls button {
  width: 42px;
  height: 38px;
  border: 1px solid #aebb9f;
  border-radius: 50%;
  font-size: 21px;
  line-height: 1;
}
.mobile-page-controls button:active:not(:disabled) { background: #d6ddc9; }
.mobile-page-controls output,
.mobile-page-controls .mobile-page-count,
.mobile-page-controls #mobile-page-count,
.mobile-page-controls #mobile-page-counter {
  min-width: 84px;
  text-align: center;
  font-size: 9px;
  letter-spacing: .11em;
  color: #66765d;
  font-variant-numeric: tabular-nums;
}
.mobile-book .stage-bottom {
  top: auto;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: var(--mobile-page-width);
  min-height: 36px;
  gap: 10px;
}
.mobile-book .scroll-cue { min-width: 0; gap: 8px; font-size: 6.5px; letter-spacing: .09em; }
.mobile-book .mouse-icon { width: 11px; height: 18px; flex: 0 0 11px; }
.mobile-book .mouse-icon i { left: 4px; }
.mobile-book .handcrafted-note { display: none; }
.mobile-book .reader-toggle { min-height: 36px; padding: 4px 0 4px 8px; font-size: 10px; gap: 5px; white-space: nowrap; }
.mobile-book .reader-toggle span { font-size: 18px; }
.mobile-book .chapter-nav {
  top: calc(var(--mobile-stage-height, 100svh) - var(--mobile-nav-height));
  bottom: auto;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: #f0f0e6;
}
.mobile-book #reading-progress { width: 100% !important; transform-origin: left center; transition: none; }
.mobile-book .chapter-nav-inner { padding: 8px 13px; gap: 11px; }
.mobile-book .chapter-button { min-height: 43px; justify-content: center; font-size: 8.5px; gap: 3px; }
.mobile-book .chapter-button::after { bottom: -8px; }
.mobile-book .chapter-index { font-size: 12px; }
.mobile-book .contents-label,
.mobile-book .page-controls { display: none; }
.mobile-book .site-footer,
.mobile-book .site-footer.visible { display: none; }

@media (max-width: 350px) {
  body.mobile-book { --mobile-page-width: calc(100vw - 30px); }
  .mobile-book .masthead { margin: 0 15px; }
  .mobile-book .book .face { padding: 23px 20px 21px; }
  .mobile-book .book .paper { padding: 12px 14px; }
  .mobile-book .book .cover { padding: 28px 25px 21px; }
  .mobile-book .paper p,
  .mobile-book .paper .outcomes p,
  .mobile-book .paper .impact-description { font-size: 12px !important; }
  .mobile-book .contact-details a { font-size: 11px; }
  .mobile-book .chapter-nav-inner { padding-inline: 9px; gap: 9px; }
  .mobile-book .chapter-button { font-size: 8px; }
  .mobile-book .scroll-cue { font-size: 6px; }
}

@media (max-width: 800px), (max-height: 600px) {
  .reading-mode .stage-bottom {
    position: fixed;
    top: auto;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    left: auto;
    display: flex;
    width: auto;
    margin: 0;
    padding: 3px 12px;
    border: 1px solid #bbc5aa;
    border-radius: 3px;
    background: #f3f0e5f5;
    box-shadow: 0 3px 14px #233d2c14;
    z-index: 40;
  }
  .reading-mode .stage-bottom .reader-toggle {
    display: flex;
    min-height: 38px;
    font-size: 11px;
  }
  .reading-mode .stage-bottom .scroll-cue,
  .reading-mode .stage-bottom .handcrafted-note { display: none; }
  .reading-mode .stage-bottom .reader-toggle[hidden] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-book .book .face { will-change: auto; }
  .reading-mode .stage-bottom { display: none; }
}

/* Landscape keeps the book centre stage and moves its controls to the sides. */
@media (orientation: landscape) and (max-height: 600px) {
  body.mobile-book { --mobile-page-width: min(320px, calc(100vw - 260px)); }
  .mobile-book .masthead { left: 12px; right: auto; top: 16px; width: 100px; height: auto !important; margin: 0; padding: 0; border: 0; flex-direction: column; align-items: flex-start; gap: 18px; }
  .mobile-book .brand { font-size: 22px; gap: 3px; }
  .mobile-book .brand-symbol { display: none; }
  .mobile-book .brand-sub { font-size: 6px; }
  .mobile-book .contact-link { font-size: 11px; min-height: 36px; }
  .mobile-book .edition-label { display: none; }
  .mobile-book .book-viewport { top: 5px; bottom: calc(65px + env(safe-area-inset-bottom, 0px)); left: 115px; right: 115px; }
  .mobile-book .mobile-page-controls { top: 95px; bottom: auto; left: auto; right: 10px; width: 96px; transform: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 4px; }
  .mobile-book #mobile-page-counter { grid-column: 1 / -1; grid-row: 1; }
  .mobile-book #mobile-previous-page { grid-column: 1; grid-row: 2; }
  .mobile-book #mobile-next-page { grid-column: 2; grid-row: 2; }
  .mobile-book .stage-bottom { left: auto; right: 10px; bottom: 83px; transform: none; width: 96px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .mobile-book .reader-toggle { padding-left: 0; }
  .mobile-book .scroll-cue { line-height: 1.6; }
  .mobile-book .chapter-button { flex-direction: column; align-items: flex-start; }
}
