/*
  Duorama's website. Every section is a leaf folded once: a wall that stands, a ground that lies in
  front of it. Pictures stand so that their own crease is the leaf's, headings stand on the wall, and
  details lie on the ground.
*/

:root {
  color-scheme: light dark;
  --ink: #17112f;
  --soft: #524b6e;
  --link: #2347c5;
  --button: #2347c5;
  --on-button: #ffffff;
  --wall: #f7f5fd;
  --wall-mid: #efe6f6;
  --wall-foot: #fadfe0;
  --ground-back: #cfc8e6;
  --ground: #e3def2;
  --ground-edge: #ebe7f7;
  --ridge: #ffffff;
  --line: #bdb5d8;
  --panel: #f7f5fd;
  --spill-strength: 0.34;
  --sky-share: 48%;
  --gutter: clamp(1rem, 4vw, 4rem);
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  /* How far down a stage's picture its crease is, as a share of its width. */
  --crease: 0.55555;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f1ff;
    --soft: #b4adcf;
    --link: #a3bdff;
    --button: #a3bdff;
    --on-button: #140f2c;
    --wall: #1b1538;
    --wall-mid: #2a1a4a;
    --wall-foot: #5a2f5c;
    --ground-back: #080515;
    --ground: #0e0a20;
    --ground-edge: #150f2c;
    --ridge: #2b2350;
    --line: #463c70;
    --panel: #1b1538;
    --spill-strength: 0.34;
    --sky-share: 40%;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground-edge);
  color: var(--ink);
  font: 1.0625rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Type */

h1, h2 {
  margin: 0;
  font-stretch: 125%;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.06;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 10.6vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 1.15rem + 2.6vw, 3.125rem); }
h3 { margin: 0; font-size: 1.1875rem; line-height: 1.3; font-weight: 650; text-wrap: balance; }
p, ul, ol { margin: 0 0 1rem; }
h1, h2, h3, p, li { overflow-wrap: break-word; }
p { text-wrap: pretty; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }
mark { background: #ffe08a; color: #4a3200; padding: 0.05em 0.3em; border-radius: 0.3em; }
.lead { font-size: clamp(1.0625rem, 0.98rem + 0.45vw, 1.3125rem); line-height: 1.5; }
.soft { color: var(--soft); }
.small { font-size: 0.9375rem; line-height: 1.5; }

:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 0.3rem; }

.out {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: var(--gutter); top: 0.5rem;
  z-index: 10;
  padding: 0.65rem 1rem;
  background: var(--button);
  color: var(--on-button);
  border-radius: 0.5rem;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* Leaves */

.in { width: min(100% - 2 * var(--gutter), 82.5rem); margin-inline: auto; }

.leaf { position: relative; scroll-margin-top: 0; }
.wall {
  position: relative;
  padding-top: clamp(3.5rem, 8vw, 6rem);
  background: linear-gradient(var(--wall), var(--wall) max(30%, 100% - 26rem), var(--wall-mid) max(60%, 100% - 8rem), var(--wall-foot));
}
/* The edge where one leaf's ground ends and the next one's wall begins. */
.leaf + .leaf > .wall { box-shadow: inset 0 1px 0 var(--ridge); }
.ground {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  background: linear-gradient(var(--ground-back), var(--ground) 10rem, var(--ground-edge));
}
.wall > .in { display: flex; flex-direction: column; justify-content: flex-end; gap: 1rem; padding-bottom: clamp(1.25rem, 2.5vw, 2rem); }
/* A heading that stands on the crease, on its letters' feet. */
.stands { position: relative; z-index: 1; text-box: trim-both cap alphabetic; }
@supports not (text-box: trim-both cap alphabetic) { .stands { margin-bottom: -0.2em; } }
.ground > .in { display: flow-root; padding-top: clamp(1.5rem, 3vw, 2.5rem); }

/* A stage: two planes that meet at a crease, and what stands on them. */

.stage { position: relative; align-self: start; width: var(--w); margin-inline: auto; container-type: inline-size; }
.stage::before {  /* what the planes' light does to the page's ground */
  content: "";
  position: absolute;
  z-index: -1;
  left: -9%; right: -9%; top: 62%; bottom: -16%;
  background: radial-gradient(closest-side, var(--spill, #e58fa0), transparent);
  opacity: var(--spill-strength);
}
.view {
  position: relative;
  aspect-ratio: 1200 / 1140;
  overflow: hidden;
  background: #0c0a1a;
  clip-path: polygon(3.714% 1.031%, 96.286% 1.031%, 92.882% 58.479%, 98.359% 98.997%, 1.641% 98.997%, 7.118% 58.479%);
}
.view img, .view video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.view video { opacity: 0; }  /* it starts where the still stands, so it can simply take over */
.view.is-moving video { opacity: 1; }
.lit { filter: brightness(var(--bright, 1)); }

[data-scene="tokyo"] { --spill: #ee8f8a; }
[data-scene="snowy-pass"] { --spill: #dfe8f5; }
[data-scene="harbor-expressway"] { --spill: #e59a86; }
[data-scene="racetrack"] { --spill: #9db8d8; }
[data-scene="coast-road"] { --spill: #8fb9e6; }
[data-scene="desert-highway"] { --spill: #e8834f; }
[data-scene="autumn-forest"] { --spill: #e89a3c; }
[data-scene="moon"] { --spill: #a8a8ad; }
[data-scene="mars"] { --spill: #d08a4e; }
[data-scene="space-dock"] { --spill: #b8b09a; }

.pause {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}
.pause:hover { border-color: var(--link); }
.pause:active { transform: translateY(1px); }
.pause[hidden] { display: none; }
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .pause[hidden] { display: inline-flex; visibility: hidden; }  /* its place is kept, so nothing moves when it comes */
}
.pause::before {
  content: "";
  width: 0.7rem; height: 0.8rem;
  background: linear-gradient(90deg, currentColor 0 36%, transparent 36% 64%, currentColor 64%);
}
.pause[data-stopped]::before { background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }

/* Header and footer */

.top { position: absolute; z-index: 5; inset: 0 0 auto; }
.top .in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; min-height: 4.25rem; }
.mark { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; color: var(--ink); font-weight: 700; font-stretch: 118%; text-decoration: none; }
.mark img { display: block; width: 2rem; height: 2rem; }
.top ul { display: flex; flex-wrap: wrap; gap: clamp(0.25rem, 2vw, 1.25rem); margin: 0 -0.35rem 0 0; padding: 0; list-style: none; }
.top li a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.35rem; color: var(--ink); text-decoration: none; }
.top li a:hover, .top li a[aria-current] { text-decoration: underline; }
.top .wide { display: none; }
@media (min-width: 34rem) { .top .wide { display: block; } }

.foot { background: var(--ground-edge); padding: clamp(2rem, 4vw, 3rem) 0 3rem; }
.foot .in { display: grid; gap: 1.5rem; border-top: 1px solid var(--line); padding-top: clamp(1.5rem, 3vw, 2rem); }
.foot ul { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin: 0; padding: 0; list-style: none; }
.foot li a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.foot .legal p { margin: 0 0 0.5rem; max-width: 46rem; }
@media (min-width: 56rem) {
  .foot .in { grid-template-columns: 1fr auto; align-items: center; }
  .foot .legal { grid-column: 1 / -1; }
}

/* A line of text until there is a link to the App Store, and a button after. */
.store { margin: 0; font-weight: 650; }
a.store {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.5rem 1.4rem;
  border-radius: 1.5rem;
  background: var(--button);
  color: var(--on-button);
  text-decoration: none;
}
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; margin: 0 0 1.25rem; }
.acts a:not(.store) { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* Hero */

.hero { --w: min(100vw - 1rem, 52rem, max((100svh - 17.5rem) * 1.0526, 17rem)); }
.hero > .wall { padding-top: 5.25rem; }
.hero > .wall > .in { padding-bottom: calc(var(--w) * var(--crease) + 1.25rem); }
.hero .stage { margin-top: calc(var(--w) * var(--crease) * -1); margin-left: calc(50% - var(--w) / 2); }
.hero > .ground > .in { padding-top: 0; }
.hero .copy { position: relative; padding-top: 1.75rem; max-width: 34rem; }
@media (min-width: 34rem) { .hero { --w: min(100vw - 1rem, 52rem, max((100svh - 22rem) * 1.0526, 17rem)); } }
.hero .store { font-size: 1.1875rem; }

@media (min-width: 56rem), (min-width: 40rem) and (max-height: 32rem) {
  .hero { --w: min(56vw, 54rem, (100svh - 6.5rem) * 1.0526); }
  .hero h1 { font-size: clamp(2rem, 4.9vw, 5.25rem); max-width: calc(100% - var(--w) - var(--gap)); }
  .hero > .wall { padding-top: 4.75rem; }
  .hero > .wall > .in { min-height: calc(var(--w) * var(--crease)); padding-bottom: 0; }
  .hero > .ground > .in { display: grid; grid-template-columns: minmax(0, 1fr) var(--w); column-gap: var(--gap); }
  .hero .stage { grid-column: 2; grid-row: 1; margin-left: 0; }
  .hero .copy { grid-column: 1; grid-row: 1; margin: 0; max-width: 30rem; padding-top: clamp(1.25rem, 3vh, 2.25rem); }
}

/* Flat, then folded, then set down. Only when there is motion and script to finish it. */
.folding { position: absolute; inset: 0; perspective: 451.613cqw; transition: opacity 0.4s; }
.folding::before, .mini::before { content: ""; position: absolute; left: 7.12%; right: 7.12%; top: calc(58.479% - 1.5px); height: 3px; background: #2c2723; }  /* no gap at the crease */
.view .folding img { inset: auto; left: calc(50% - 44.677cqw); width: 89.355cqw; height: 63.548cqw; }
.view .folding .f-wall {
  top: calc(50% + 8.392cqw - 63.548cqw);
  transform-origin: 50% 100%;
  transform: translateZ(-18.912cqw) rotateX(-33deg);
}
.view .folding .f-ground {
  top: calc(50% + 8.392cqw);
  transform-origin: 50% 0;
  transform: translateZ(-18.912cqw) rotateX(57deg);
}
.view .folding .f-car { left: 0; top: 0; width: 100%; height: 100%; }
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .view[data-fold]:not(.is-set) { background: none; }
  .view[data-fold] > picture { opacity: 0; animation: show 0.01s 2.6s forwards; }
  .view[data-fold].is-set > picture { opacity: 1; animation: none; }
  .view[data-fold].is-set > .folding { opacity: 0; }
  .folding .f-wall { animation: rise 1.15s 0.1s cubic-bezier(0.45, 0.02, 0.12, 1) both; }
  .folding .f-car { animation: place 0.75s 1.05s cubic-bezier(0.16, 0.8, 0.3, 1) both; }
}
@keyframes show { to { opacity: 1; } }
@keyframes rise { from { transform: translateZ(-18.912cqw) rotateX(57deg); } }
@keyframes place { from { opacity: 0; transform: translateY(-13%); } 40% { opacity: 1; } }

/* How it works */

.steps { display: grid; gap: 2.5rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; --w: 100%; counter-increment: step; }
.steps .stage { flex: 0 0 min(8.5rem, 34%); margin: 0; }
.steps .stage + div { flex: 1 1 9rem; }
.steps h3::before { content: counter(step) ". "; }
.steps p { margin: 0.35rem 0 0; }
.steps .stage::before { display: none; }
.mini { perspective: 451.613cqw; clip-path: none; overflow: visible; background: none; }
.mini img { inset: auto; left: calc(50% - 44.677cqw); width: 89.355cqw; height: 63.548cqw; }
.mini .f-wall { top: calc(50% + 8.392cqw - 63.548cqw); transform-origin: 50% 100%; transform: translateZ(-18.912cqw) rotateX(-33deg); }
.mini .f-ground { top: calc(50% + 8.392cqw); transform-origin: 50% 0; transform: translateZ(-18.912cqw) rotateX(57deg); }
.mini .f-car { left: 0; top: 0; width: 100%; height: 100%; }
.mini::before { background: #685b54; }
.mini.half .f-wall { transform: translateZ(-18.912cqw) rotateX(33deg); }
.mini.lowering .f-car { transform: translateY(-13%); }
.mini.lowering::after {
  content: "";
  position: absolute;
  left: 19%; right: 17%; top: 73%; height: 12%;
  background: radial-gradient(closest-side, rgb(10 6 30 / 0.6), transparent);
}
.tap { position: relative; }
.tap::after {
  content: "";
  position: absolute;
  left: 50%; top: 24%;
  width: 13%; aspect-ratio: 1;
  margin: -6.5% 0 0 -6.5%;
  border-radius: 50%;
  border: 0.16rem solid #fff;
  background: rgb(255 255 255 / 0.4);
  box-shadow: 0 0 0 0.45rem rgb(255 255 255 / 0.22);
}
@media (min-width: 44rem) {
  .how { --w: min((100vw - 2 * var(--gutter) - 2 * var(--gap)) / 3, 25rem); }
  .how > .wall > .in { padding-bottom: calc(var(--w) * var(--crease) + 2rem); }
  .how > .ground > .in { padding-top: 0; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
  .steps li { display: block; --w: inherit; }
  .steps .stage { margin: calc(var(--w) * var(--crease) * -1) auto 1.25rem; }
}

/* Ten scenes */

.scenes { --w: min(100vw - 1rem, 46rem, max((100svh - 15rem) * 1.0526, 18rem)); }
.scenes > .wall > .in { padding-bottom: calc(var(--w) * var(--crease) + 1.25rem); }
.scenes > .ground > .in { padding-top: 0; }
.scenes .stages { margin-top: calc(var(--w) * var(--crease) * -1); margin-left: calc(50% - var(--w) / 2); width: var(--w); }
.pick { display: none; }
.caps { padding-top: 1.5rem; text-align: center; }
/* All ten lie on each other, so nothing below moves when another is chosen. */
.captions { display: grid; margin-bottom: 0.75rem; }
.captions .pick { display: block; visibility: hidden; grid-area: 1 / 1; }
.caps h3 { font-size: 1.375rem; font-stretch: 118%; }
.caps p { margin: 0.25rem 0 0; }
.scenes:not(:has(:checked)) .pick[data-scene="harbor-expressway"],
.scenes:has(#s-tokyo:checked) .pick[data-scene="tokyo"],
.scenes:has(#s-snowy-pass:checked) .pick[data-scene="snowy-pass"],
.scenes:has(#s-harbor-expressway:checked) .pick[data-scene="harbor-expressway"],
.scenes:has(#s-racetrack:checked) .pick[data-scene="racetrack"],
.scenes:has(#s-coast-road:checked) .pick[data-scene="coast-road"],
.scenes:has(#s-desert-highway:checked) .pick[data-scene="desert-highway"],
.scenes:has(#s-autumn-forest:checked) .pick[data-scene="autumn-forest"],
.scenes:has(#s-moon:checked) .pick[data-scene="moon"],
.scenes:has(#s-mars:checked) .pick[data-scene="mars"],
.scenes:has(#s-space-dock:checked) .pick[data-scene="space-dock"],
.demo:has(#d-right:checked) .pick[data-way="right"],
.demo:has(#d-left:checked) .pick[data-way="left"],
.demo:has(#d-away:checked) .pick[data-way="away"],
.demo:has(#d-towards:checked) .pick[data-way="towards"] { display: block; visibility: visible; }

/* The horizon takes the light of the scene that was chosen. */
@property --sky { syntax: "<color>"; inherits: true; initial-value: #f0a184; }
.scenes {
  --sky: #f0a184;
  --wall-mid: color-mix(in oklab, var(--sky) calc(var(--sky-share) * 0.4), var(--wall));
  --wall-foot: color-mix(in oklab, var(--sky) var(--sky-share), var(--wall));
  transition: --sky 0.6s;
}
.scenes:has(#s-tokyo:checked) { --sky: #c4608c; }
.scenes:has(#s-snowy-pass:checked) { --sky: #c3d3e6; }
.scenes:has(#s-racetrack:checked) { --sky: #a9c4e4; }
.scenes:has(#s-coast-road:checked) { --sky: #78b2e8; }
.scenes:has(#s-desert-highway:checked) { --sky: #e8875a; }
.scenes:has(#s-autumn-forest:checked) { --sky: #eeb266; }
.scenes:has(#s-moon:checked) { --sky: #8f8f98; }
.scenes:has(#s-mars:checked) { --sky: #dfa267; }
.scenes:has(#s-space-dock:checked) { --sky: #4c86e0; }

@supports not selector(:has(*)) {
  .pick[data-scene="harbor-expressway"], .pick[data-way="right"] { display: block; visibility: visible; }
}

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; font-weight: 650; }
.thumbs { margin-top: 1.5rem; }
.thumbs legend { margin: 0 auto 0.75rem; }
.thumbs > div { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.6rem; max-width: 34rem; margin-inline: auto; }
.thumb { position: relative; display: block; cursor: pointer; }
.thumb img { display: block; width: 100%; height: auto; border-radius: 0.3rem; transition: transform 0.2s; }
.thumb:hover img { transform: translateY(-2px); }
@media (max-width: 55.99rem) {  /* the name is above, and here for screen readers */
  .thumb span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.thumb .free { position: absolute; left: 0; top: 0; max-width: 100%; overflow: hidden; padding: 0.05rem 0.35rem; border-radius: 0.3rem 0 0.3rem 0; background: #ffc97f; color: #2a1600; font-size: 0.75rem; font-weight: 650; }
.thumb:has(:checked) img { outline: 3px solid var(--link); outline-offset: 2px; }
.thumb:has(:focus-visible) img { outline: 3px solid var(--ink); outline-offset: 4px; }

@media (min-width: 56rem) {
  .scenes { --w: min(50vw, 46rem, (100svh - 13rem) * 1.0526); }
  .scenes > .wall > .in { min-height: calc(var(--w) * var(--crease)); padding-bottom: 0; }
  .scenes h2 { max-width: calc((100% - var(--w)) / 2 - var(--gap) / 2); font-size: clamp(1.75rem, 2.9vw, 2.875rem); }
  .scenes > .ground > .in { display: grid; grid-template-columns: minmax(0, 1fr) var(--w) minmax(0, 1fr); column-gap: calc(var(--gap) / 2); }
  .scenes .stages { grid-area: 1 / 2; margin-left: 0; }
  .caps { grid-area: 1 / 3; padding-top: 2rem; text-align: left; }
  .thumbs { grid-area: 2 / 1 / 3 / 4; }
  .thumbs > div { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: clamp(0.5rem, 1.2vw, 1.1rem); max-width: none; }
  .thumbs legend { margin-left: 0; }
  .thumb span { display: block; margin-top: 0.55rem; font-size: 0.875rem; line-height: 1.3; }
}

/* Set the scene */

.demo { --w: min(100vw - 1rem, 40rem, max((100svh - 15rem) * 1.0526, 18rem)); }
.demo > .wall > .in { padding-bottom: calc(var(--w) * var(--crease) + 1rem); }
.demo > .ground > .in { padding-top: 0; }
.demo .stages { margin-top: calc(var(--w) * var(--crease) * -1); margin-left: calc(50% - var(--w) / 2); width: var(--w); }
.desk { max-width: 34rem; margin: 1.5rem 0 0; }
.panel { display: grid; gap: 1.1rem; margin-bottom: 1.75rem; }
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(4.2rem, 1fr)); margin-top: 0.5rem; padding: 0.2rem; border-radius: 0.75rem; background: var(--panel); border: 1px solid var(--line); }
.ways label { position: relative; display: grid; place-items: center; min-height: 2.75rem; border-radius: 0.55rem; font-size: 0.9375rem; cursor: pointer; }
.ways label:hover { text-decoration: underline; }
.ways label:has(:checked) { background: var(--button); color: var(--on-button); font-weight: 650; text-decoration: none; }
.ways label:has(:focus-visible) { outline: 3px solid var(--link); outline-offset: 3px; }
.slide { display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 1rem; }
.slide[hidden] { display: none; }
.slide label { font-weight: 650; }
.slide output { font-variant-numeric: tabular-nums; }
.slide input { grid-column: 1 / -1; width: 100%; height: 2.25rem; margin: 0; accent-color: var(--button); cursor: pointer; }

@media (min-width: 56rem) {
  .demo { --w: min(52vw, 46rem, (100svh - 9rem) * 1.0526); }
  .demo h2 { max-width: calc(100% - var(--w) - var(--gap)); margin-left: calc(var(--w) + var(--gap)); }
  .demo .under { margin-left: calc(var(--w) + var(--gap)); }
  .demo > .wall > .in { min-height: calc(var(--w) * var(--crease)); padding-bottom: 1.75rem; }
  .demo > .ground > .in { display: grid; grid-template-columns: var(--w) minmax(0, 1fr); column-gap: var(--gap); }
  .demo .stages { margin-left: 0; }
  .desk { margin: 0; padding-top: 1.75rem; max-width: 30rem; }
}

/* What's free: one line stands on the wall, the other lies on the ground. */

.price > .wall > .in, .care > .wall > .in, .faq > .wall > .in, .page > .wall > .in { padding-bottom: 0; }
.big { font-size: clamp(1.75rem, 5vw, 4.5rem); font-stretch: 125%; font-weight: 700; letter-spacing: -0.015em; line-height: 1.06; margin: 0; text-wrap: balance; }
.price .note { max-width: 38rem; margin: clamp(1.25rem, 2.5vw, 2rem) 0 0; }

/* Other models */

.slab { --w: 116vw; }
.slab > .wall > .in { padding-bottom: calc(var(--w) * 0.374 + 2rem); }
.slab > .ground > .in { padding-top: 0; }
.slab picture { display: block; width: var(--w); margin: calc(var(--w) * -0.374) 0 1.5rem calc(50% - var(--w) / 2); }
.slab img { display: block; width: 100%; height: auto; }
.slab p { max-width: 40rem; }
@media (min-width: 56rem) {
  .slab { --w: min((100vw - 2 * var(--gutter)) * 1.2, 98rem, (100svh - 14rem) * 2.3); }
  .slab picture { margin-left: calc(var(--w) * -0.087); }
}

/* Care, questions */

.care ul { display: grid; gap: 0 var(--gap); margin: 0 0 1.5rem; padding: 0; list-style: none; }
.care li { padding: 0.5rem 0; font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.6875rem); line-height: 1.25; font-weight: 650; text-wrap: balance; }
.care p { max-width: 44rem; }
@media (min-width: 56rem) { .care ul { grid-template-columns: 1fr 1fr 1.35fr; } }

.faq .all { display: grid; gap: 1.75rem var(--gap); }
.faq .all p { margin: 0.35rem 0 0; max-width: 38rem; }
.faq .more { margin: 2rem 0 0; }
@media (min-width: 56rem) { .faq .all { grid-template-columns: 1fr 1fr; gap: 2.25rem var(--gap); } }

/* Support, privacy, not found */

.page > .wall { padding-top: clamp(7rem, 18vh, 11rem); }
.page h1 { font-size: clamp(2.25rem, 1.4rem + 4.4vw, 4.25rem); }
.prose { max-width: 42rem; }
.prose h2 { font-size: 1.3125rem; font-stretch: 112%; letter-spacing: -0.005em; line-height: 1.25; margin: 2.25rem 0 0.4rem; }
.prose li { margin-bottom: 0.35rem; }
.prose ol { padding-left: 1.4rem; }

.lost { --w: min(100vw - 1rem, 34rem, (100svh - 17rem) * 1.0526); }
.lost > .wall { padding-top: 5.5rem; }
.lost > .wall > .in { padding-bottom: calc(var(--w) * var(--crease) + 1.25rem); }
.lost .stage { margin-top: calc(var(--w) * var(--crease) * -1); margin-left: calc(50% - var(--w) / 2); }
@media (min-width: 56rem) {
  .lost { --w: min(56vw, 46rem, (100svh - 7rem) * 1.0526); }
  .lost h1 { max-width: calc(100% - var(--w) - var(--gap)); }
  .lost > .wall { padding-top: 4.75rem; }
  .lost > .wall > .in { min-height: calc(var(--w) * var(--crease)); padding-bottom: 0; }
  .lost > .ground > .in { display: grid; grid-template-columns: minmax(0, 1fr) var(--w); column-gap: var(--gap); }
  .lost .stage { grid-area: 1 / 2; margin-left: 0; }
  .lost .copy { grid-area: 1 / 1; }
}
.lost > .ground > .in { padding-top: 0; }
.lost .copy { max-width: 34rem; margin: 1.75rem 0 0; }

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

@media (forced-colors: active) {
  .ways label:has(:checked) { outline: 2px solid Highlight; }
  .thumb:has(:checked) img { outline-color: Highlight; }
  .pause::before { forced-color-adjust: none; background: CanvasText; }
}

/* Chrome 158 stops answering when it prints about a dozen large WebP or AVIF pictures, so only the first is printed. */
@media print {
  .how .stage, .scenes .stages, .scenes .captions .pick, .thumbs, .demo .stages, .panel, .slab picture, .pause, .skip { display: none !important; }
  .how > .wall > .in, .scenes > .wall > .in, .demo > .wall > .in, .slab > .wall > .in { min-height: 0; padding-bottom: 1rem; }
}
