@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

@font-face {
  font-family: "DM Serif Text";
  src: url("/fonts/dm-serif-text.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #f6f0e6;
  --ink: #2c251f;
  --muted: #695c50;
  --rust: #914329;
  --line: #d3c6b5;
  --serif: "DM Serif Text", Georgia, serif;
  --sans: "DM Sans", "Segoe UI", sans-serif;
  --header-height: 72px;
  --rail-top: 102px;
  --chapter-offset: 82px;
  --figure-year-size: clamp(30px, 4.2vw, 59px);
  color-scheme: light;
  accent-color: var(--rust);
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  font-optical-sizing: auto;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
::selection { background: #ead2bd; color: var(--ink); }
body, h1, h2, h3, h4, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 5px; }
a:hover { text-decoration: underline; text-underline-offset: .22em; }

svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.shell { width: min(100% - clamp(40px, 11vw, 176px), 1256px); margin-inline: auto; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip:focus {
  position: fixed;
  z-index: 5;
  top: .7rem;
  left: .7rem;
  padding: .6rem 1rem;
  background: var(--paper);
}

.site-header { position: sticky; inset-block-start: 0; z-index: 4; background: var(--paper); }
.masthead {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 20px;
  border-block-end: 1px solid var(--line);
}

.brand { font: italic 32px/1 var(--serif); letter-spacing: -.09em; }
.brand span, .hero h1 em { color: var(--rust); }
.brand:hover { text-decoration: none; }
.chapter-links a, .site-footer a, .email-link {
  display: inline-flex;
  align-items: center;
  gap: .42em;
  font-weight: 650;
  font-size: .875rem;
}
.masthead-contact {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1vw, 8px);
  min-width: 0;
  margin-inline-start: auto;
}
.email-link, .site-footer .email-link {
  min-height: 44px;
  color: var(--rust);
  font-size: clamp(.75rem, 2.65vw, .875rem);
  overflow-wrap: anywhere;
}
.profile-link {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 4px;
}
.profile-link:hover { background: #ece2d5; }

.hero {
  display: grid;
  grid-template:
    ". portrait" 1fr
    "name portrait" auto
    "bio portrait" auto
    ". portrait" 1fr
    / minmax(0, 1.35fr) minmax(0, .85fr);
  column-gap: clamp(26px, 6.2vw, 92px);
  padding: clamp(39px, 4.6vw, 70px) 0 clamp(38px, 4.7vw, 68px);
}

.hero h1 {
  grid-area: name;
  font: 400 clamp(68px, 9.2vw, 136px)/.84 var(--serif);
  letter-spacing: -.051em;
}
.hero h1 em { display: block; font-weight: 400; }
.hero h1 em span { margin-inline-start: .035em; }
.introduction {
  grid-area: bio;
  max-width: 51ch;
  margin-block-start: clamp(22px, 3vw, 36px);
  color: #4e4237;
  font-size: clamp(1rem, 1.38vw, 1.17rem);
  line-height: 1.55;
}
.introduction p + p { margin-block-start: .72em; }
.hero-portrait { grid-area: portrait; width: 100%; max-width: 27rem; align-self: center; justify-self: end; }
.portrait-frame { overflow: hidden; aspect-ratio: 10 / 11; background: #e8ded0; }
.portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 52%;
  transform: scale(1.34);
  transform-origin: 50% 53%;
}

#main { scroll-margin-block-start: var(--header-height); }
.timeline { scroll-margin-block-start: var(--header-height); }
.timeline-head {
  display: flex;
  align-items: center;
  min-height: 65px;
  border-block-start: 2px solid var(--ink);
  border-block-end: 1px solid var(--line);
  padding: 9px 0;
}
.timeline-head h2 { font: 400 clamp(26px, 3vw, 38px)/1.2 var(--serif); letter-spacing: -.025em; }

.visual-rail {
  grid-area: visual;
  position: sticky;
  top: var(--rail-top);
  align-self: start;
  min-width: 0;
}
.figure-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-block-end: 11px;
}
.figure-year { color: var(--rust); font: italic 400 var(--figure-year-size)/1 var(--serif); letter-spacing: -.035em; }
.figure-number { color: var(--muted); white-space: nowrap; font-size: .74rem; font-variant-numeric: tabular-nums; }
:is(.artwork, .research-chart-visual) { position: relative; aspect-ratio: 12 / 7; overflow: hidden; }
.artwork { background: #e8d0aa; }
.artwork canvas, .artwork img { display: block; width: 100%; height: 100%; object-fit: cover; }
.artwork img { object-fit: cover; object-position: center 42%; }
.artwork[data-art="saint-john"] { background: #edebe7; }
.artwork[data-art="saint-john"] img { object-fit: contain; object-position: center; }
.artwork[data-art="course"] { background: #e4e7db; }
.artwork[data-art="course"] img { object-fit: contain; object-position: center; padding: 4%; }
.chapter-figure figcaption { margin-block: 11px 13px; font: 400 clamp(17px, 2vw, 24px)/1.16 var(--serif); }
.progress-track { height: 2px; background: var(--line); }
.progress-track span { display: block; width: 100%; height: 100%; background: var(--rust); transform: scaleX(.125); transform-origin: left; }

.chapters { min-width: 0; }
.chapter {
  scroll-margin-block-start: var(--chapter-offset);
  padding: clamp(30px, 4vw, 55px) 0 clamp(38px, 5vw, 68px);
  border-block-end: 1px solid var(--line);
}
.chapter:has(> .visual-rail) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "visual copy";
  gap: clamp(32px, 6.5vw, 96px);
}
.chapter:nth-child(even) { grid-template-areas: "copy visual"; }
.chapter-copy { grid-area: copy; min-width: 0; }
.chapter:has(> .visual-rail) .chapter-copy { padding-block-start: calc(var(--figure-year-size) + 11px); }
.chapter:last-child { border: 0; }
.chapter :is(a, button, [tabindex]) { scroll-margin-block-start: var(--chapter-offset); }
.chapter :is(h3, p) { max-width: 46ch; }
.metadata {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 13px;
  width: fit-content;
  color: var(--rust);
  font-size: .79rem;
  font-weight: 700;
}
.metadata span + span { color: var(--muted); font-weight: 520; }
.chapter h3 {
  margin-block: 12px 16px;
  font: 400 clamp(35px, 4.1vw, 62px)/1.01 var(--serif);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.chapter-copy > p:not(.metadata) { color: #4e4237; font-size: clamp(1rem, 1.3vw, 1.15rem); }
.chapter-copy > p:not(.metadata) + p { margin-block-start: .7em; }
.chapter-links { display: flex; flex-wrap: wrap; gap: 0 22px; margin-block-start: 14px; }
.chapter-links a { color: var(--rust); min-height: 44px; }
.project-flow {
  --flow-rule: var(--line);
  --flow-accent: var(--rust);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2.2vw, 19px) clamp(12px, 2.4vw, 23px);
  margin: clamp(18px, 2.5vw, 26px) 0 0;
  padding: 0;
  list-style: none;
}
.project-flow > li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: clamp(5px, 1vw, 10px);
  min-width: 0;
  padding-block-start: 8px;
  border-block-start: 1px solid var(--flow-rule);
  line-height: 1.3;
}
.flow-step {
  color: var(--flow-accent);
  font-size: .68rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.project-flow strong { display: block; font-size: clamp(.78rem, 1.5vw, .98rem); font-weight: 750; }
.project-flow small { display: block; margin-block-start: .24em; color: var(--muted); font-size: clamp(.75rem, 1.4vw, .89rem); }
.course-flow { --flow-rule: #bdc7b6; --flow-accent: #405f47; }
.research-chart { margin-block-start: 24px; }
.research-chart-visual { border: 1px solid var(--line); background: #fdfdfd; }
.research-chart img { display: block; width: 100%; height: 100%; object-fit: contain; }
.research-chart figcaption { margin-block-start: 8px; color: var(--muted); font-size: .85rem; }
.visual-expand {
  position: absolute;
  inset-inline-end: 2px;
  inset-block-end: 2px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
}
.visual-expand:focus-visible { outline-offset: -2px; }
.visual-expand svg {
  width: 33px;
  height: 33px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

@media (hover: hover) and (pointer: fine) {
  .visual-expand { opacity: 0; }
  :is(.artwork, .research-chart-visual):hover > .visual-expand,
  .visual-expand:focus-visible { opacity: 1; }
}

html:has(.image-viewer[open]) { overflow: hidden; }
.image-viewer {
  width: min(calc(100% - 24px), 96rem);
  max-width: none;
  max-height: calc(100% - 24px);
  padding: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  overscroll-behavior: contain;
}
.image-viewer::backdrop { background: rgb(44 37 31 / .72); }
.image-viewer-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding: 10px clamp(12px, 2vw, 23px);
  border-block-end: 1px solid var(--line);
  background: var(--paper);
}
.image-viewer-header h2 { font: 400 clamp(17px, 2.4vw, 25px)/1.2 var(--serif); }
.image-viewer-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding-inline: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--rust);
  cursor: pointer;
  font-size: .875rem;
  font-weight: 650;
}
.image-viewer-back:hover { border-color: var(--rust); }
.image-viewer > img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 105px);
  object-fit: contain;
}

.chapter-dakahlia { --dakahlia-stage-min-height: 15.5rem; }
.chapter-dakahlia[data-scroll-story] {
  grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr);
  grid-template-areas: "copy date" "copy visual" "steps visual";
  row-gap: 0;
}
.dakahlia-date { grid-area: date; }
.dakahlia-steps { grid-area: steps; min-width: 0; }
[data-scroll-story] .dakahlia-steps { margin-block-start: 28px; }
.dakahlia-step { display: grid; gap: 17px; margin-block-start: 24px; }
.dakahlia-step h4 {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 12px;
  font: 400 clamp(1.65rem, 3vw, 2.75rem)/1.08 var(--serif);
  letter-spacing: -.025em;
}
.dakahlia-step h4 > span:first-child {
  color: var(--rust);
  font: 650 .73rem/1 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
[data-scroll-story] .dakahlia-step {
  align-content: center;
  min-height: clamp(190px, 34svh, 320px);
  margin: 0;
  padding: 20px 0 20px clamp(12px, 1.8vw, 24px);
  border-inline-start: 1px solid var(--line);
}
[data-scroll-story] .dakahlia-step[aria-current="step"] { border-inline-start-color: var(--rust); }
[data-scroll-story] .dakahlia-step > .scene-diagram {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.dakahlia-stage { width: 100%; min-height: var(--dakahlia-stage-min-height); background: #dcebed; }
.dakahlia-stage > .scene-diagram {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 240ms ease, transform 240ms ease;
  pointer-events: none;
}
.dakahlia-stage > .scene-diagram[data-active="true"] {
  z-index: 1;
  opacity: 1;
  transform: none;
  transition: opacity 390ms ease-out, transform 390ms cubic-bezier(.22, 1, .36, 1);
}
.chapter-dakahlia .chapter-figure figcaption { margin-block: 8px; text-align: end; line-height: 1; }
.scene-count { display: block; color: var(--muted); font: 550 .77rem/1.25 var(--sans); font-variant-numeric: tabular-nums; }

.scene-diagram {
  --diagram-link: clamp(12px, 2vw, 28px);
  container-type: inline-size;
  display: grid;
  align-items: center;
  aspect-ratio: 12 / 7;
  min-width: 0;
  padding: clamp(11px, 2vw, 25px);
  color: var(--diagram-ink);
  background: var(--diagram-paper);
}
.scene-diagram strong { font-size: clamp(.72rem, 2.8cqw, 1.1rem); font-weight: 750; line-height: 1.16; }
.scene-diagram small { display: block; margin-top: .25em; font-size: clamp(.66rem, 2.25cqw, .88rem); line-height: 1.28; }
.foundation-diagram {
  --diagram-paper: #e2eef0;
  --diagram-ink: #214553;
  --diagram-line: #527786;
  grid-template-columns: minmax(0, 1fr) minmax(0, .86fr) minmax(0, .85fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(8px, 1.4vw, 18px) var(--diagram-link);
  background-image: radial-gradient(#54809038 1px, transparent 1px);
  background-size: 14px 14px;
}
.foundation-sources {
  --source-gap: clamp(15px, 5cqw, 33px);
  position: relative;
  display: grid;
  grid-auto-rows: 1fr;
  gap: var(--source-gap);
  text-align: right;
}
.foundation-sources > div { position: relative; padding-inline-end: 8px; }
.foundation-sources > div::after {
  position: absolute;
  top: 50%;
  left: 100%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--diagram-line);
  content: "";
  transform: translate(-50%, -50%);
}
.foundation-sources::after {
  position: absolute;
  inset-block: calc((100% - var(--source-gap)) / 4);
  left: 100%;
  width: calc(var(--diagram-link) / 2);
  border: 1px solid var(--diagram-line);
  border-left: 0;
  content: "";
}
.foundation-hub, .ai-hub {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 7px;
  border: 1px solid var(--diagram-line);
  border-radius: 50%;
  background: var(--hub-fill);
  text-align: center;
}
.foundation-hub { --hub-fill: #eef7f8; }
.foundation-hub strong, .ai-hub strong {
  font: 400 clamp(.83rem, 4.2cqw, 1.8rem)/1 var(--serif);
  letter-spacing: -.02em;
}
.foundation-hub::before, .foundation-output::before, .ai-hub::after, .ai-branches > li::before {
  position: absolute;
  top: 50%;
  left: 100%;
  width: var(--diagram-link);
  border-top: 1px solid var(--diagram-line);
  content: "";
}
.foundation-hub::before, .foundation-output::before, .ai-branches > li::before { left: auto; right: 100%; }
.foundation-hub::before { width: calc(var(--diagram-link) / 2); }
.foundation-output { position: relative; padding-inline-start: 4px; }
.gateway-functions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 9px 0 0;
  border-top: 1px solid #52778666;
  list-style: none;
  font-size: clamp(.66rem, 2.15cqw, .87rem);
  font-weight: 650;
  line-height: 1.22;
  text-align: center;
}

.platform-diagram {
  --diagram-paper: #efe4d3;
  --diagram-ink: #55382a;
  --diagram-line: #8a5d44;
  align-content: center;
  gap: clamp(10px, 2.6cqw, 21px);
  background-image: repeating-linear-gradient(0deg, transparent 0 20px, #97705715 20px 21px);
}
.platform-workflow + .platform-workflow {
  padding-block-start: clamp(9px, 2.2cqw, 18px);
  border-top: 1px solid #ab816273;
}
.workflow-heading {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.8cqw, 12px);
}
.workflow-title { line-height: 1.3; }
.workflow-title small { display: inline; margin: 0; }
.workflow-track, .ai-branches { list-style: none; padding: 0; margin: 0; }
.workflow-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(10px, 2.6cqw, 18px);
  font-size: clamp(.66rem, 2.4cqw, .94rem);
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
}
.workflow-track li {
  position: relative;
  padding: 7px 4px 0;
  border-top: 1px solid var(--diagram-line);
}
.workflow-track li::before {
  position: absolute;
  top: -1px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--diagram-line);
  content: "";
  transform: translate(-50%, -50%);
}
.workflow-track li:not(:last-child)::after {
  position: absolute;
  top: -1px;
  right: 1px;
  width: 5px;
  height: 5px;
  border-top: 1px solid var(--diagram-line);
  border-right: 1px solid var(--diagram-line);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}
.workflow-track small { margin-top: .13em; font-weight: 500; }
.platform-glyph {
  position: relative;
  flex: 0 0 auto;
  width: clamp(1.25rem, 6.8cqw, 2.75rem);
  aspect-ratio: 1.15;
  border: 1px solid var(--diagram-line);
  background: #fff7e9;
}
.glyph-portal, .glyph-performance { border-top: 5px solid var(--diagram-line); }
.glyph-portal::after, .glyph-performance::after {
  position: absolute;
  inset: 25% 17%;
  background: repeating-linear-gradient(transparent 0 4px, #9d7360 4px 5px);
  content: "";
}
.glyph-performance::after {
  background: repeating-linear-gradient(90deg, #9d7360 0 3px, transparent 3px 6px);
  clip-path: polygon(0 70%, 30% 50%, 55% 62%, 80% 15%, 100% 0, 100% 100%, 0 100%);
}

.ai-diagram {
  --diagram-paper: #ebe5ee;
  --diagram-ink: #423351;
  --diagram-line: #746083;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  gap: var(--diagram-link);
}
.ai-hub {
  --hub-fill: #f4eff6;
  box-shadow: inset 0 0 0 6px #e0d7e7, inset 0 0 0 7px #a99ab5;
}
.ai-hub::after, .ai-branches > li::before { width: calc(var(--diagram-link) / 2); }
.ai-branches { position: relative; display: grid; grid-auto-rows: 1fr; gap: 8px; }
.ai-branches::before {
  position: absolute;
  inset-block: calc((100% - 16px) / 6);
  right: calc(100% + var(--diagram-link) / 2);
  border-left: 1px solid var(--diagram-line);
  content: "";
}
.ai-branches > li {
  position: relative;
  display: grid;
  align-content: center;
  padding-inline-start: clamp(9px, 2cqw, 17px);
  border-inline-start: 1px solid var(--diagram-line);
}
.ai-branches > li small { margin-top: 2px; }

@container (max-width: 360px) {
  .foundation-sources > div { padding-inline-end: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .dakahlia-stage > .scene-diagram,
  .dakahlia-stage > .scene-diagram[data-active="true"] { transform: none; transition: none; }
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 104px;
  border-block-start: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.site-footer a { color: var(--rust); min-height: 44px; }

@media (min-width: 791px) and (max-height: 775px) {
  :is(.artwork, .research-chart-visual) { max-height: 44svh; }
}

@media (max-width: 790px) {
  :root { --header-height: 62px; --chapter-offset: 72px; --figure-year-size: clamp(27px, 6vw, 39px); }
  .shell { width: min(100% - clamp(36px, 8vw, 60px), 39rem); }
  .hero {
    grid-template: "name" "portrait" "bio" / minmax(0, 1fr);
    padding-block: 42px 30px;
    gap: 21px;
  }
  .hero h1 { font-size: clamp(60px, 12.2vw, 100px); }
  .hero-portrait { justify-self: start; }
  .portrait-frame { aspect-ratio: 6 / 5; }
  .portrait-frame img { object-position: 50% 41%; }
  .introduction { margin-block-start: 0; }
  .chapter:has(> .visual-rail), .chapter:nth-child(even) { grid-template: "visual" "copy" / minmax(0, 1fr); gap: 19px; }
  .visual-rail { position: static; }
  .chapter-dakahlia[data-scroll-story] { display: flex; flex-direction: column; gap: 0; }
  .chapter-dakahlia[data-scroll-story] .chapter-copy { margin-block-end: 18px; }
  [data-scroll-story] .dakahlia-steps { margin-block-start: 18px; }
  .chapter-dakahlia[data-scroll-story] .visual-rail {
    position: sticky;
    top: var(--header-height);
    z-index: 2;
    align-self: stretch;
    padding-block-end: 9px;
    background: var(--paper);
  }
  [data-scroll-story] .dakahlia-step { min-height: clamp(150px, 23svh, 215px); }
  .chapter:has(> .visual-rail) .chapter-copy { padding-block-start: 0; }
  .chapter-figure figcaption { font-size: clamp(17px, 3.7vw, 21px); }
  .artwork[data-art="course"] img { padding: 2%; }
  .chapter { padding-block: 28px 38px; }
  .chapter h3 { font-size: clamp(34px, 7.9vw, 48px); }
  .site-footer { min-height: 84px; }
}

@media (min-width: 560px) and (max-width: 790px) {
  .hero { grid-template: "name name" "bio portrait" / minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 27px; }
  .portrait-frame { aspect-ratio: 10 / 11; }
  .portrait-frame img { object-position: 50% 52%; }
}

@media (max-width: 470px) {
  .masthead { gap: 12px; }
  .hero h1 { font-size: clamp(50px, 14.6vw, 68px); }
  .chapter :is(h3, p) { max-width: none; }
}

@media (max-width: 350px) {
  .brand { font-size: 27px; }
  .timeline-head h2 { font-size: 23px; }
  .chapter-dakahlia { --dakahlia-stage-min-height: 17.75rem; }
}

@media (max-width: 790px) and (max-height: 500px) {
  :root { --chapter-offset: 14px; }
  .site-header { position: static; }
}

@media (max-width: 790px) and (max-height: 630px) {
  .chapter-dakahlia[data-scroll-story] .visual-rail { display: none; }
  [data-scroll-story] .dakahlia-step { min-height: 0; margin-block-start: 18px; padding: 0; border: 0; }
  [data-scroll-story] .dakahlia-step > .scene-diagram {
    position: relative;
    width: auto;
    height: auto;
    margin: 0;
    padding: clamp(11px, 2vw, 25px);
    clip-path: none;
    white-space: normal;
  }
  [data-scroll-story] .dakahlia-step > .platform-diagram { width: 100%; min-height: var(--dakahlia-stage-min-height); }
}
