/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5 */
/* Hallmark · genre: editorial · macrostructure: horizontal mobile story · theme: Claude Design paper · enrichment: original collage art · nav: N9 · footer: none · contrast: pass (46–50) · slop: pass (51–55) · honest: pass (56) · chrome: pass (57) · tokens: pass (58) · responsive: pass (59) · icons: pass (60) · mobile: pass (36, 59, 61–69) */

:root {
  --color-paper: oklch(97% 0.012 84);
  --color-print: oklch(99% 0.006 84);
  --color-print-edge: oklch(88% 0.015 80);
  --color-ink: oklch(18% 0.024 247);
  --color-muted: oklch(43% 0.025 242);
  --color-nav-muted: oklch(52% 0.022 242);
  --color-accent: oklch(48% 0.15 29);
  --color-accent-blue: oklch(48% 0.13 245);
  --color-focus: oklch(48% 0.16 29);
  --color-shadow: oklch(28% 0.025 70 / 0.18);
  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Newsreader", "Iowan Old Style", "Palatino Linotype", serif;
  --font-outlier: "DM Mono", ui-monospace, monospace;
  --font-hand: "Bradley Hand", "Segoe Print", cursive;
  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 9rem;
  --radius-print: 0.18rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-short: 220ms;
  --z-sticky: 200;
  --z-sticky-nav: 300;
  --banner-height: 3rem;
}

html,
body {
  overflow-x: clip;
  background: var(--color-paper);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-nav {
  box-shadow: 0 1px 0 color-mix(in oklch, var(--color-ink) 7%, transparent);
}

.site-nav-inner {
  position: relative;
}

.site-identity {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: clamp(0.55rem, 2vw, 1.5rem);
  display: inline-flex;
  align-items: center;
  gap: 0.78rem;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.5vw, 1.34rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  transform: translateY(-50%);
}

.face-logo {
  position: relative;
  display: block;
  width: 4.7rem;
  height: 4.6rem;
  flex: none;
  isolation: isolate;
  overflow: visible;
}

.face-logo::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0.18rem;
  left: 0;
  width: 3.55rem;
  height: 3.55rem;
  background: url("./art/identity/orange-sun.png") center / contain no-repeat;
}

.face-logo img[data-face-image] {
  position: absolute;
  z-index: 1;
  top: 0.48rem;
  right: 0;
  display: block;
  width: 4.05rem;
  height: 4.05rem;
  object-fit: contain;
  object-position: center bottom;
  opacity: 1;
}

.face-logo > img:not([data-face-image]) {
  display: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
  width: min(100%, 66rem);
  box-sizing: border-box;
  margin: var(--space-4xl) auto 0;
  padding: var(--space-lg) 0 0;
  border-top: 1px solid color-mix(in oklch, var(--color-ink) 12%, transparent);
  color: var(--color-muted);
  font-family: var(--font-outlier);
  font-size: 0.68rem;
  letter-spacing: 0.045em;
}

.site-footer-identity {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.site-footer-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin-inline: auto;
}

.site-footer-contact a,
.site-footer-next {
  color: var(--color-accent);
  box-shadow: inset 0 -1px 0 currentColor;
}

.site-footer-linkedin {
  display: inline-grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 0.12rem;
  box-shadow: none !important;
}

.site-footer-linkedin svg {
  width: 1rem;
  height: 1rem;
}


body:not(.journey-page) main,
body:not(.journey-page) .site-footer {
  animation: site-enter 520ms var(--ease-out) both;
}

body:not(.journey-page) .site-footer {
  animation-delay: 80ms;
}

body.site-leaving main,
body.site-leaving #journey-section,
body.site-leaving .site-footer {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

@keyframes site-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

nav a,
nav button {
  white-space: nowrap;
}

h1,
h2,
h3 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.book-grid--current {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.book-grid--library {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (min-width: 60rem) {
  :root {
    --banner-height: 4.5rem;
  }

  .site-nav-inner {
    height: var(--banner-height) !important;
  }

  .site-identity {
    font-size: 1.55rem;
    transform: translateY(-50%);
  }

  .face-logo {
    width: 4.75rem;
    height: 4.5rem;
  }

  .face-logo::before {
    top: 0.15rem;
    width: 3.65rem;
    height: 3.65rem;
  }

  .face-logo img[data-face-image] {
    top: 0.42rem;
    width: 4.05rem;
    height: 4.05rem;
  }
}

.library-title {
  position: relative;
  display: inline-block;
  isolation: isolate;
}

.currently-reading-title {
  position: relative;
  display: inline-block;
}

.currently-reading-title > img {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 1.48em;
  width: 6.3rem;
  height: auto;
  pointer-events: none;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
}

.ideas-bird-field {
  position: absolute;
  z-index: 0;
  top: var(--banner-height);
  right: 0;
  bottom: 0;
  left: 0;
  height: auto;
  overflow: clip;
  pointer-events: none;
}

.ideas-bird-field img {
  position: absolute;
  left: var(--bird-left);
  top: var(--bird-top);
  width: var(--bird-width);
  height: auto;
  opacity: 0.86;
  transform: translate(-50%, -50%) rotate(var(--bird-rotate));
}

body:has(.ideas-sheet) main {
  position: relative;
  z-index: 1;
}

body:has(.ideas-sheet) {
  position: relative;
  isolation: isolate;
}

.ideas-flying-bird {
  position: fixed;
  z-index: 0;
  top: 0;
  left: 0;
  width: clamp(2.7rem, 4.2vw, 4rem);
  height: auto;
  opacity: 0.9;
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform;
}

.now-landscape {
  pointer-events: none;
}

.now-landscape--back {
  background: url("./art/now/grass-front-loop.png") left bottom / auto 100% repeat-x;
}

.now-landscape--front {
  background: url("./art/now/grass-bots-back-loop.png") left bottom / auto 100% repeat-x;
}

.now-hero {
  margin-left: clamp(0.5rem, 2vw, 2rem);
}

.now-portrait {
  display: block;
  z-index: 1;
  width: 100%;
  height: auto;
  pointer-events: none;
}

@media (min-width: 60rem) {
  .journey-page #journey-stage {
    top: var(--banner-height) !important;
    height: calc(100dvh - var(--banner-height)) !important;
  }

  .now-hero {
    margin-left: clamp(0.4rem, 1.4vw, 1.3rem);
  }
}

.ideas-sheet {
  clip-path: polygon(0 100%, 0 7px, 3% 3px, 6% 8px, 10% 2px, 14% 6px, 18% 1px, 22% 5px, 26% 2px, 30% 7px, 34% 3px, 38% 6px, 42% 1px, 46% 5px, 50% 2px, 54% 7px, 58% 3px, 62% 6px, 66% 2px, 70% 5px, 74% 1px, 78% 6px, 82% 3px, 86% 7px, 90% 2px, 94% 5px, 97% 1px, 100% 6px, 100% 100%);
  filter: drop-shadow(0 1.3rem 1.4rem color-mix(in oklch, var(--color-ink) 13%, transparent));
  box-shadow: none !important;
}

.ideas-meta span {
  color: var(--color-nav-muted) !important;
}

@media (min-width: 44rem) and (max-width: 59.99rem) {
  .book-grid--current,
  .book-grid--library {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.family-page {
  box-sizing: border-box;
  min-height: 100dvh;
  padding: calc(var(--banner-height) + var(--space-xl)) clamp(var(--space-md), 5vw, var(--space-2xl)) var(--space-4xl);
}

.family-shell {
  width: min(100%, 66rem);
  margin-inline: auto;
}

.family-header {
  display: grid;
  grid-template-columns: minmax(12rem, 0.75fr) minmax(18rem, 1.25fr);
  align-items: end;
  gap: clamp(var(--space-lg), 4vw, var(--space-2xl));
  margin-block-end: clamp(var(--space-xl), 7vw, var(--space-3xl));
}

.family-heading-copy {
  align-self: center;
}

.family-title {
  max-width: 10ch;
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.family-intro {
  max-width: 58ch;
  margin: 0;
  color: var(--color-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.55;
}

.family-parade {
  display: block;
  width: 100%;
  height: auto;
  margin-block-end: -0.35rem;
}

.family-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: clamp(var(--space-xl), 8vw, var(--space-3xl));
}

.family-print {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: clamp(var(--space-sm), 2.4vw, var(--space-md));
  padding-block-end: clamp(3.1rem, 8vw, 4.7rem);
  background: var(--color-print);
  border: 1px solid var(--color-print-edge);
  border-radius: var(--radius-print);
  box-shadow: 0 1.25rem 2.5rem -1.8rem var(--color-shadow);
  transform: rotate(var(--tilt, 0deg));
  transform-origin: 50% 70%;
  transition: transform var(--dur-short) var(--ease-out);
}

.family-print:nth-child(3n + 1) { --tilt: -0.45deg; }
.family-print:nth-child(3n + 2) { --tilt: 0.55deg; }
.family-print:nth-child(3n) { --tilt: -0.25deg; }

.family-photo-link {
  display: block;
  color: inherit;
}

.family-photo {
  display: block;
  width: 100%;
  height: auto;
  background: var(--color-print-edge);
}

.family-caption {
  position: absolute;
  inset-inline: clamp(var(--space-md), 3vw, var(--space-lg));
  inset-block-end: clamp(var(--space-sm), 2.2vw, var(--space-lg));
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  margin: 0;
  color: var(--caption-color, var(--color-accent-blue));
  font-family: var(--font-hand);
  font-size: clamp(1rem, 3.2vw, 1.45rem);
  line-height: 1.1;
  transform: rotate(var(--caption-tilt, -1deg));
}

.family-caption small {
  color: var(--color-muted);
  font-family: var(--font-outlier);
  font-size: 0.64rem;
  letter-spacing: 0.03em;
  line-height: 1.3;
  text-transform: uppercase;
}

.family-print--red { --caption-color: var(--color-accent); --caption-tilt: 0.8deg; }
.family-print--blue { --caption-color: var(--color-accent-blue); --caption-tilt: -1.3deg; }
.family-print--wide { grid-column: auto; }

.family-print--artist .family-caption::after {
  content: "↗";
  display: inline-block;
  margin-inline-start: var(--space-xs);
}

.family-scribble {
  display: inline-block;
  margin-inline-start: var(--space-xs);
  font-size: 1.15em;
  transform: rotate(7deg);
}

@media (hover: hover) and (pointer: fine) {
  .family-print:hover,
  .family-print:focus-within {
    transform: rotate(0deg) translateY(-2px);
  }
}

@media (min-width: 44rem) {
  .family-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(var(--space-xl), 5vw, var(--space-2xl));
  }

}

@media (max-width: 59.99rem) {
  .site-identity-name {
    display: none;
  }

  .face-logo {
    width: 3.25rem;
    height: 3rem;
  }

  .face-logo::before {
    top: 0.15rem;
    width: 2.4rem;
    height: 2.4rem;
  }

  .face-logo img[data-face-image] {
    top: 0.24rem;
    width: 2.7rem;
    height: 2.7rem;
  }

  .journey-page {
    min-height: 100%;
    height: auto;
    overflow-x: clip;
    overflow-y: auto;
  }

  #journey-stage .now-ground-prop {
    display: none !important;
  }

  #journey-section {
    height: 100dvh !important;
    padding-block-start: var(--banner-height);
    overflow: hidden;
  }

  #journey-stage {
    position: relative !important;
    top: auto !important;
    display: flex !important;
    width: 100%;
    height: calc(100dvh - var(--banner-height)) !important;
    min-height: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }

  #journey-stage::-webkit-scrollbar {
    display: none;
  }

  #journey-stage > article[data-chapter] {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-height: 0 !important;
    overflow-x: clip;
    overflow-y: auto;
    overscroll-behavior-block: contain;
    visibility: visible !important;
    border: 0 !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    -webkit-overflow-scrolling: touch;
  }

  #journey-stage > article[data-chapter]::before {
    content: attr(data-screen-label);
    position: absolute;
    z-index: 5;
    top: 1rem;
    inset-inline-start: clamp(var(--space-md), 6vw, var(--space-xl));
    color: var(--color-nav-muted);
    font-family: var(--font-outlier);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  #journey-stage [data-wheel="frame"] {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-height: 100%;
    box-sizing: border-box;
    padding: 19rem clamp(var(--space-md), 6vw, var(--space-xl)) 7.5rem;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none;
    mask: none !important;
    overflow: clip;
  }

  #journey-stage [data-wheel="frame"] > div:not([data-wheel]) {
    position: relative !important;
    inset: auto !important;
    z-index: 4 !important;
    width: auto !important;
    translate: none !important;
    margin-block-end: var(--space-xl);
  }

  #journey-stage [data-wheel="frame"] > div:not([data-wheel]) + div:not([data-wheel]) {
    margin-block-start: var(--space-xl);
  }

  #journey-stage [data-wheel="frame"] > [data-wheel="prop"] {
    left: 50%;
    right: auto !important;
    bottom: auto !important;
    top: 3.35rem !important;
    width: min(72%, 19rem) !important;
    max-width: none !important;
    height: 13.5rem !important;
    translate: -50% 0;
    opacity: 1 !important;
    transform: none;
    transform-origin: 50% 70%;
    background-position: center bottom !important;
  }

  #journey-stage [data-wheel="frame"] > .now-hero[data-wheel="prop"] {
    top: 2.35rem !important;
    width: min(88%, 21.5rem) !important;
    height: auto !important;
    margin-left: 0;
  }

  #journey-stage [data-wheel="prop"][data-sun="1"] {
    display: block !important;
    left: 76%;
    top: 1rem !important;
    width: 4.25rem !important;
    height: 4.25rem !important;
    translate: -50% 0;
    opacity: 0.78 !important;
  }

  #journey-stage [data-wheel="layer"] {
    left: -10% !important;
    bottom: auto !important;
    top: 14.5rem !important;
    width: 120% !important;
    max-width: none !important;
    height: 4.5rem !important;
    opacity: 0.82 !important;
    transform: none;
    transform-origin: center;
  }

  #journey-stage [data-wheel="layer"][data-depth="1"] {
    top: 11.5rem !important;
    height: 5.5rem !important;
    opacity: 0.5 !important;
  }

  /* Two arrows flanking the chapter's sun, rather than a bar across the art.
     Fixed, not absolute: the stage is the horizontal scroller, so an absolutely
     positioned child would slide away with the chapters. */
  #journey-stage .journey-controller {
    position: fixed !important;
    z-index: 18;
    top: calc(var(--banner-height) + 0.6rem) !important;
    right: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    /* Sized so the pair straddles the sun rather than the screen edges.
       !important: the element carries an inline gap from the desktop layout. */
    gap: clamp(4.5rem, 22vw, 8rem) !important;
    width: auto;
    translate: none !important;
    pointer-events: none;
  }

  /* The band around the sun is bare paper on every chapter, so the glyphs need
     no plate behind them. */
  #journey-stage .journey-controller button {
    width: 2.75rem !important;
    height: 2.75rem !important;
    background: transparent !important;
    color: var(--color-ink) !important;
    font-size: 1.15rem !important;
    pointer-events: auto;
  }

  /* The sun sits between the arrows; the chapter name would collide with it. */
  #journey-stage .journey-controller p {
    display: none !important;
  }

  #journey-stage h2 {
    font-size: clamp(1.8rem, 8vw, 2.8rem) !important;
    line-height: 1.05 !important;
  }

  #journey-stage p,
  #journey-stage dd {
    font-size: 1rem !important;
    line-height: 1.55 !important;
  }

  #journey-stage dt {
    font-size: 1.25rem !important;
    line-height: 1.15 !important;
  }

  /* The first two chapters use a single mobile reading column: story first,
     achievements below it, then the original parallax scene at the bottom. */
  #journey-stage > article[data-mobile-layout="scene"] {
    overflow: hidden;
  }

  #journey-stage > article[data-mobile-layout="scene"]::before {
    display: none;
  }

  #journey-stage article[data-mobile-layout="scene"] [data-wheel="frame"] {
    height: 100%;
    min-height: 100%;
    padding: 0;
    overflow: hidden;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-copy {
    position: absolute !important;
    z-index: 7 !important;
    top: 4rem !important;
    right: 2.25rem !important;
    bottom: 14rem !important;
    left: 2.25rem !important;
    box-sizing: border-box;
    padding: 0 0.3rem 0.35rem 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in oklch, var(--color-ink) 18%, transparent) transparent;
    touch-action: pan-x pan-y;
    transform-origin: 50% 35%;
    will-change: transform, opacity;
    -webkit-overflow-scrolling: touch;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-copy::-webkit-scrollbar {
    width: 2px;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-copy::-webkit-scrollbar-track {
    background: transparent;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-copy::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in oklch, var(--color-ink) 18%, transparent);
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-story,
  #journey-stage article[data-mobile-layout="scene"] .journey-achievements {
    position: static !important;
    z-index: 7 !important;
    inset: auto !important;
    translate: none !important;
    margin: 0 !important;
    width: auto !important;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-story {
    transform: none !important;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-story h2 {
    max-width: 17rem;
    margin: 0 0 0.52rem !important;
    font-size: clamp(1.16rem, 5.1vw, 1.28rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.04em !important;
    text-wrap: balance;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-story > p {
    display: block;
    margin: 0 0 0.56rem !important;
    color: var(--color-muted);
    font-size: clamp(0.68rem, 3vw, 0.74rem) !important;
    line-height: 1.32 !important;
    text-wrap: pretty;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-story > p:last-child {
    margin-block-end: 0 !important;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-achievements {
    margin-block-start: 2.1rem !important;
    padding-block-end: 0.25rem;
    transform: none !important;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-achievements > div,
  #journey-stage article[data-mobile-layout="scene"] .journey-achievements > dl {
    gap: 0.5rem !important;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-achievements p,
  #journey-stage article[data-mobile-layout="scene"] .journey-achievements dt {
    font-size: clamp(0.78rem, 3.45vw, 0.88rem) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.015em !important;
    text-wrap: pretty;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-achievements p:first-child,
  #journey-stage article[data-mobile-layout="scene"] .journey-achievements dd {
    font-family: var(--font-outlier) !important;
    font-size: clamp(0.52rem, 2.35vw, 0.59rem) !important;
    line-height: 1.24 !important;
    letter-spacing: 0.045em !important;
  }

  #journey-stage article[data-mobile-layout="scene"] [data-wheel="prop"][data-sun="1"] {
    top: 0.8rem !important;
    left: 50% !important;
    width: 2.25rem !important;
    height: 2.25rem !important;
    min-width: 0 !important;
    translate: -50% 0 !important;
    opacity: 1 !important;
  }

  #journey-stage article[data-mobile-layout="scene"] [data-wheel="prop"]:not([data-sun="1"]) {
    top: auto !important;
    left: 50% !important;
    bottom: 5rem !important;
    width: min(60%, 14.5rem) !important;
    height: 13.4rem !important;
    translate: -50% 0 !important;
    opacity: 1 !important;
    background-position: left bottom !important;
  }

  #journey-stage article[data-chapter="docplus"][data-mobile-layout="scene"] [data-wheel="prop"]:not([data-sun="1"]) {
    left: 50% !important;
    top: auto !important;
    bottom: 6.85rem !important;
    width: min(48%, 12rem) !important;
    height: 12.5rem !important;
  }

  #journey-stage article[data-chapter="docplus"][data-mobile-layout="scene"] .journey-copy {
    bottom: 19.75rem !important;
  }

  #journey-stage article[data-chapter="profi"][data-mobile-layout="scene"] [data-wheel="prop"]:not([data-sun="1"]) {
    left: 50% !important;
    bottom: 4.25rem !important;
    width: min(54%, 13.2rem) !important;
    height: 13.6rem !important;
    background-position: center bottom !important;
  }

  #journey-stage article[data-chapter="lisbon"][data-mobile-layout="scene"] [data-wheel="prop"]:not([data-sun="1"]) {
    left: 51% !important;
    bottom: 4.15rem !important;
    width: min(57%, 13.8rem) !important;
    height: 13.9rem !important;
    background-position: center bottom !important;
  }

  #journey-stage article[data-chapter="bina"][data-mobile-layout="scene"] [data-wheel="prop"]:not([data-sun="1"]) {
    left: 50% !important;
    bottom: 7.05rem !important;
    width: min(70%, 17rem) !important;
    height: 10.65rem !important;
    background-position: center bottom !important;
  }

  #journey-stage article[data-chapter="bina"][data-mobile-layout="scene"] .journey-copy {
    bottom: 17.5rem !important;
  }

  #journey-stage article[data-chapter="now"][data-mobile-layout="scene"] [data-wheel="prop"]:not([data-sun="1"]) {
    left: 50% !important;
    bottom: 3.25rem !important;
    width: min(62%, 15.5rem) !important;
    height: auto !important;
    background-position: center bottom !important;
  }

  #journey-stage article[data-chapter="now"][data-mobile-layout="scene"] .journey-copy {
    bottom: 20rem !important;
  }

  #journey-stage article[data-mobile-layout="scene"] [data-wheel="layer"] {
    left: -18% !important;
    top: auto !important;
    bottom: 0.8rem !important;
    width: 145% !important;
    height: 5.2rem !important;
    opacity: 1 !important;
    background-size: auto 100% !important;
    background-position: left bottom !important;
  }

  #journey-stage article[data-mobile-layout="scene"] [data-wheel="layer"][data-depth="1"] {
    top: auto !important;
    bottom: 2.3rem !important;
    height: 4.5rem !important;
    opacity: 1 !important;
  }

  #journey-stage article[data-chapter="now"][data-mobile-layout="scene"] .now-landscape--back {
    bottom: 2.62rem !important;
    height: 5.35rem !important;
  }

  #journey-stage article[data-chapter="now"][data-mobile-layout="scene"] .now-landscape--front {
    bottom: 0.65rem !important;
    height: 5.25rem !important;
  }

  #journey-stage article[data-chapter="docplus"][data-mobile-layout="scene"] [data-wheel="layer"][data-depth="1"] {
    top: auto !important;
    bottom: 2.1rem !important;
    height: 4.8rem !important;
  }

  #journey-stage article[data-chapter="docplus"][data-mobile-layout="scene"] [data-wheel="layer"]:not([data-depth="1"]) {
    top: auto !important;
    bottom: 0.8rem !important;
    height: 5.3rem !important;
  }
}

@media (max-width: 23rem), (max-height: 44rem) {
  #journey-stage article[data-mobile-layout="scene"] .journey-story {
    top: 12.6rem !important;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-achievements {
    top: 3.7rem !important;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-achievements > div,
  #journey-stage article[data-mobile-layout="scene"] .journey-achievements > dl {
    gap: 0.38rem !important;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-achievements p,
  #journey-stage article[data-mobile-layout="scene"] .journey-achievements dt {
    font-size: 0.7rem !important;
  }

  #journey-stage article[data-mobile-layout="scene"] .journey-achievements p:first-child,
  #journey-stage article[data-mobile-layout="scene"] .journey-achievements dd {
    font-size: 0.5rem !important;
  }

  #journey-stage article[data-mobile-layout="scene"] [data-wheel="prop"][data-sun="1"] {
    top: 0.65rem !important;
  }

  #journey-stage article[data-mobile-layout="scene"] [data-wheel="prop"]:not([data-sun="1"]) {
    top: auto !important;
    bottom: 3.45rem !important;
    height: 10.4rem !important;
  }

  #journey-stage article[data-mobile-layout="scene"] [data-wheel="layer"] {
    top: auto !important;
    bottom: 3.55rem !important;
    height: 4.2rem !important;
  }

  #journey-stage article[data-mobile-layout="scene"] [data-wheel="layer"][data-depth="1"] {
    top: auto !important;
    bottom: 5rem !important;
    height: 3.8rem !important;
  }

  #journey-stage article[data-chapter="docplus"][data-mobile-layout="scene"] [data-wheel="prop"]:not([data-sun="1"]) {
    top: auto !important;
    bottom: 7.6rem !important;
    width: min(44%, 10.8rem) !important;
    height: 9.7rem !important;
  }

  #journey-stage article[data-chapter="docplus"][data-mobile-layout="scene"] .journey-copy {
    bottom: 18.75rem !important;
  }

  #journey-stage article[data-chapter="bina"][data-mobile-layout="scene"] [data-wheel="prop"]:not([data-sun="1"]) {
    top: auto !important;
    bottom: 9.2rem !important;
    height: 7.8rem !important;
  }

  #journey-stage article[data-chapter="bina"][data-mobile-layout="scene"] .journey-copy {
    bottom: 17.8rem !important;
  }

  #journey-stage article[data-chapter="docplus"][data-mobile-layout="scene"] [data-wheel="layer"]:not([data-depth="1"]) {
    top: auto !important;
    bottom: 3.55rem !important;
    height: 4.9rem !important;
  }

  #journey-stage article[data-chapter="docplus"][data-mobile-layout="scene"] [data-wheel="layer"][data-depth="1"] {
    top: auto !important;
    bottom: 5rem !important;
    height: 4.3rem !important;
  }
}

@media (max-width: 23rem) {
  .face-logo {
    width: 3.05rem;
    height: 2.9rem;
  }

  .face-logo::before {
    top: 0.1rem;
    width: 2.2rem;
    height: 2.2rem;
  }

  .face-logo img[data-face-image] {
    top: 0.3rem;
    width: 2.42rem;
    height: 2.42rem;
  }

  .site-identity {
    inset-inline-start: 0.35rem;
  }

  nav > div {
    gap: var(--space-xs) !important;
  }

  #journey-stage [data-wheel="frame"] {
    padding-block-start: 17.5rem;
  }

  #journey-stage [data-wheel="frame"] > [data-wheel="prop"] {
    width: min(70%, 16.5rem) !important;
    height: 11.7rem !important;
  }

  #journey-stage [data-wheel="layer"] {
    top: 13rem !important;
    height: 4rem !important;
  }

  #journey-stage [data-wheel="layer"][data-depth="1"] {
    top: 10.4rem !important;
    height: 4.8rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .face-logo img[data-face-image] { transition: none; }
}

@media (max-width: 43.99rem) {
  .currently-reading-title > img {
    width: 5.2rem;
    bottom: 1.7em;
  }

  .ideas-bird-field img {
    width: min(var(--bird-width), 1.5rem);
    opacity: 0.72;
  }

  .family-header {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
  }

  .family-parade {
    width: min(115%, 38rem);
    max-width: none;
    margin-inline-start: -7.5%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    width: min(calc(100% - 2rem), 66rem);
    gap: 0.8rem;
  }

  .site-footer-identity {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }

  .site-footer-contact {
    justify-content: flex-start;
    margin-inline: 0;
  }

  [data-bk-shelf] > section:first-child > div {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: var(--space-xl) !important;
  }

  [data-bk-shelf] > section:last-child > div {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    column-gap: var(--space-lg) !important;
  }

  .book-detail {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 2.8rem !important;
  }

  .book-detail > div:first-child {
    display: grid;
    justify-items: center;
  }

  [data-bk-hero] {
    width: min(58vw, 14rem) !important;
  }

  .book-hero-static {
    display: block !important;
    width: 100%;
    height: 100%;
    border-radius: 1px 3px 3px 1px;
    background-position: center;
    background-size: cover;
    box-shadow: 0 1.6rem 2.5rem -1.4rem rgba(28, 20, 12, 0.5), 0 2px 6px rgba(28, 20, 12, 0.16);
    transform: perspective(1200px) rotateY(7deg);
    transform-origin: 50% 50%;
  }

  [data-bk-fly] {
    display: none !important;
  }

  [data-bk-read] {
    transition-duration: 420ms !important;
  }

  ::view-transition-group(book-cover) {
    animation-duration: 420ms;
    animation-timing-function: cubic-bezier(0.2, 0.75, 0.18, 1);
  }
}

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

  .family-print {
    transform: none !important;
  }

  body:not(.journey-page) main,
  body:not(.journey-page) .site-footer {
    animation: none !important;
  }

  #journey-stage [data-wheel="prop"],
  #journey-stage [data-wheel="layer"] {
    transform: none !important;
  }
}

/* --- Loading screen -------------------------------------------------------
   site.css is render-blocking, so first paint already waits for it: the
   loader needs no inline copy in every page. Pages ship the markup only. */

.site-loader {
  position: fixed;
  z-index: 9000;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--space-md);
  background: var(--color-paper);
  /* Safety net: if site.js never runs, the overlay still clears itself. */
  animation: site-loader-bail 0s linear 6s forwards;
}

.site-loader-mark {
  width: clamp(9.5rem, 44vw, 13.5rem);
  height: auto;
  overflow: visible;
}

.site-loader-trail {
  fill: none;
  stroke: color-mix(in oklch, var(--color-ink) 26%, transparent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-dasharray: 2.5 6;
  animation: site-loader-trail 900ms linear infinite;
}

.site-loader-plane {
  fill: var(--color-accent);
  transform-box: view-box;
  transform-origin: 0 0;
  animation: site-loader-fly 1500ms cubic-bezier(0.5, 0.02, 0.4, 1) infinite;
}

.site-loader-word {
  margin: 0;
  color: var(--color-nav-muted);
  font-family: var(--font-outlier);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: site-loader-pulse 1500ms ease-in-out infinite;
}

.site-loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 360ms var(--ease-out), visibility 0s linear 360ms;
}

@keyframes site-loader-fly {
  0% { transform: translate(6px, 54px) rotate(-6deg); opacity: 0; }
  10% { opacity: 1; }
  25% { transform: translate(44px, 47px) rotate(-15deg); }
  50% { transform: translate(82px, 33px) rotate(-26deg); }
  75% { transform: translate(120px, 16px) rotate(-18deg); }
  90% { opacity: 1; }
  100% { transform: translate(154px, 6px) rotate(-10deg); opacity: 0; }
}

@keyframes site-loader-trail {
  to { stroke-dashoffset: -8.5; }
}

@keyframes site-loader-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}

@keyframes site-loader-bail {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  .site-loader-plane {
    transform: translate(82px, 33px) rotate(-26deg);
    animation: none;
  }

  .site-loader-trail,
  .site-loader-word {
    animation: none;
  }
}

/* --- Home ----------------------------------------------------------------
   index.html is plain HTML (no x-dc runtime), so its nav is styled here
   rather than inline the way the generated pages do it. */

.home-page {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.home-page a {
  text-decoration: none;
}

/* The masthead already carries the name; the greeting below says it again. */
.home-page .site-identity-name {
  display: none;
}

.home-page nav[aria-label="Sections"] {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  background: var(--color-paper);
}

.home-page nav[aria-label="Sections"] > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 3vw, 2rem);
  height: var(--banner-height);
  padding: 0 0.5rem;
}

.home-page nav[aria-label="Sections"] > div > a:not(.site-identity) {
  display: block;
  padding: 0.35rem 0;
  color: var(--color-nav-muted);
  font-family: var(--font-outlier);
  font-size: clamp(0.62rem, 2.2vw, 0.84rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-page nav[aria-label="Sections"] > div > a:not(.site-identity):hover {
  color: var(--color-ink);
}

.home {
  box-sizing: border-box;
  width: min(100%, 66rem);
  margin: 0 auto;
  padding: calc(var(--banner-height) + var(--space-2xl)) clamp(var(--space-md), 5vw, var(--space-xl)) var(--space-md);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
  gap: 0 var(--space-2xl);
  align-items: start;
}

.home-title {
  grid-column: 1;
  grid-row: 1;
  max-width: 16ch;
  margin: 0 0 var(--space-lg);
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 6.4vw, 3.9rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.home-intro {
  grid-column: 1;
  grid-row: 2;
}

.home-intro > p {
  margin: 0 0 var(--space-md);
  color: var(--color-muted);
  line-height: 1.55;
  text-wrap: pretty;
}

.home-intro > p:last-child {
  margin-block-end: 0;
}

.home-aside {
  margin-block-start: var(--space-lg) !important;
  padding-block-start: var(--space-md);
  border-top: 1px solid color-mix(in oklch, var(--color-ink) 12%, transparent);
  font-style: italic;
}

.home-elsewhere {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  gap: var(--space-lg);
  align-content: start;
}

.home-elsewhere a {
  display: block;
  color: var(--color-muted);
  line-height: 1.55;
  text-wrap: pretty;
}

.home-elsewhere a > span {
  display: block;
  margin-block-end: 0.28rem;
  color: var(--color-accent);
  font-family: var(--font-outlier);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-elsewhere a:hover {
  color: var(--color-ink);
}

.home-elsewhere a:hover > span {
  box-shadow: inset 0 -1px 0 currentColor;
}

/* A few paper birds drifting above the footer, in place of a full-width band. */
.home-birds {
  position: relative;
  width: min(100%, 66rem);
  height: clamp(8rem, 17vw, 12.5rem);
  margin: var(--space-xl) auto 0;
  padding-inline: clamp(var(--space-md), 5vw, var(--space-xl));
  box-sizing: border-box;
  pointer-events: none;
}

.home-birds img {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: auto;
  opacity: var(--o);
  transform: translate(-50%, -50%) rotate(var(--r));
}

.home-page .site-footer {
  margin-block-start: var(--space-xl);
  padding-inline: clamp(var(--space-md), 5vw, var(--space-xl));
  padding-block-end: var(--space-xl);
}

@media (max-width: 55.99rem) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-title,
  .home-intro,
  .home-elsewhere {
    grid-column: 1;
    grid-row: auto;
  }

  /* The aside already draws a rule above itself; a second one right below it
     needs breathing room, not a double gap. */
  .home-elsewhere {
    margin-block-start: var(--space-lg);
    padding-block-start: var(--space-lg);
    border-top: 1px solid color-mix(in oklch, var(--color-ink) 12%, transparent);
  }

  .home-aside {
    padding-block-end: 0;
  }
}
