/* Home page: one pinned camera move, then calm sections on the dark ground. */
.home {
  font-size: 18px;
  line-height: 1.6;
}
.rail {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.14);
}
.rail i {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--ribbon), var(--bright));
}
.home {
  --story: calc(800 * var(--vh));
  position: relative;
}
#story {
  height: var(--story);
}
/* Stops in the middle of the last two scenes: the inventory at p = 0.855 and the hand-over at p = 0.95 (SCENE in
   home-story.js switches to them at 0.815 and 0.895). With a mouse or trackpad they are gentle: proximity only pulls
   when the scroll comes to rest nearby. */
html:has(#story) {
  scroll-snap-type: y proximity;
}
.stop,
#story::before,
.home::after {
  position: absolute;
  left: 0;
  width: 1px;
  pointer-events: none;
}
/* Each stop is a 1 px mark at the bottom edge of the screen it stands for, aligned by its end: it comes into view
   only when the page reaches it. (Chromium will not rest inside a free area while another stop is in view; a mark at
   the top edge was in view for a whole screen before the inventory and made the end of the camera move jump.) */
.stop {
  height: 1px;
  scroll-snap-align: end;
}
#stopLedger {
  top: calc(0.855 * (var(--story) - var(--scene-h)) + var(--scene-h) - 1px);
}
#stopHand {
  top: calc(0.95 * (var(--story) - var(--scene-h)) + var(--scene-h) - 1px);
}
/* On touch screens the two scenes turn like pages: one swipe from the end of the camera move brings the inventory,
   the next the hand-over, the next the company section, and the same backwards. A gentle stop held a swipe back as if
   it were cancelled, and a swipe out of the hand-over needed two. So the page snaps mandatorily, but only these hold
   it: #story::before covers the camera move (p 0 to 0.80, the map with its last layer), so it scrolls freely; the two
   stops cannot be passed by a swipe (scroll-snap-stop: always); and .home::after covers everything from the company
   section to the end of the page, which scrolls freely again from a stop at its top. Between them the page is always
   on its way to one of them, so it never rests between two scenes. */
@media (pointer: coarse) {
  /* No scroll padding here (base.css keeps 84 px for links to a section; the home page has none): WebKit treats an
     area as not covering the end of the page when the html has scroll padding (2026-11-08, WebKit 26), so the page
     could not be scrolled to its footer. */
  html:has(#story) {
    scroll-snap-type: y mandatory;
    scroll-padding-top: 0;
  }
  #story::before,
  .home::after {
    content: "";
    scroll-snap-align: start;
  }
  /* aligned by its end, the camera move's one snap position is its last screen (p 0.80), not the top of the page: a
     swipe back from the inventory goes there. Aligned by its start, WebKit sent that swipe to the top of the page
     (Ted's iPhone, 2026-11-08) */
  #story::before {
    scroll-snap-align: end;
    top: 0;
    height: calc(0.8 * (var(--story) - var(--scene-h)) + var(--scene-h));
  }
  .stop,
  .home::after {
    scroll-snap-stop: always;
  }
  .home::after {
    top: var(--story);
    bottom: 0;
  }
  /* The two free areas reach past the page's ends. At the very end of the page a browser may look a little
     beyond it: Chrome on an iPhone rested 1 px past the end (its visual viewport 1 px down), and its thumb pulls the
     page some 70 to 110 px further before letting go. The area then no longer covered the screen, so the page had
     to snap, and the nearest place it could was the area's own start: the reader at the foot of the page was thrown
     back to the top of the company section, half-way up (Ted's iPhone, Chrome 156, 2026-11-11; with the area reaching
     60 screen-hundredths further it stayed). The same at the top of the page, for the camera move's area. */
  .home::after {
    scroll-margin-bottom: calc(60 * var(--vh));
  }
  #story::before {
    scroll-margin-top: calc(60 * var(--vh));
  }
}
/* the home story's frame (base.css, .pinned) */
.stage {
  --scene-bg: radial-gradient(
    120% calc(0.9 * var(--scene-h)) at 50% calc(var(--bleed) + 0.4 * var(--scene-h)),
    var(--ground2) 0%,
    var(--ground) 70%
  );
}
.layer {
  position: absolute;
  inset: 0;
}
/* Everything in the pinned stage lets clicks through, except the controls that ask for them */
.stage > * {
  pointer-events: none;
}
.stage > #hand {
  pointer-events: auto;
}
.z1 {
  z-index: 1;
}
.z2 {
  z-index: 2;
}
.z3 {
  z-index: 3;
}

/* opening: the logo fades up, then the caption, then the scroll cue. All of it is HTML and CSS from the first paint,
   whenever the scripts arrive: the veil is painted in CSS (the same gradient home-veil.js draws) and the logo is
   sized by the script in its markup, so the forest under the veil never shows before the logo. Once the canvas has
   drawn the veil with the letters cut out, home-story.js marks the veil .drawn and the CSS paint steps aside.
   (Hidden until the scripts ran, the veil let the forest flash and then popped in on the live host, 2026-11-08.) */
#veil {
  z-index: 5;
  /* the same ground as the canvas that takes over from it (home-veil.js GRADIENT, measured from the frame's top) */
  background: radial-gradient(
    circle 3000px at 2000px calc(1680px + var(--bleed)),
    #0a4552 0%,
    #062b34 55%,
    #04222a 100%
  );
  transform-origin: 50% 50%;
  animation: logo-settle 2.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
#veil.drawn {
  background: none;
}
#veil canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* the white logo over its own outline, at the logo file's own size (img/SENRA_rev.svg); home-story.js scales it */
#face {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1121px;
  height: 167px;
  max-width: none;
  translate: -50% -50%;
  will-change: opacity;
}
/* The dark cover the logo fades in from. It is the stage's first element, so on a slow connection, where the
   browser paints the page while it is still arriving, it is there before anything it covers: placed after the logo,
   the logo was painted a moment before the cover arrived and then faded in again (journey.mjs, 2026-11-08). */
#intro {
  z-index: 6;
  pointer-events: none;
  background: radial-gradient(
    75% calc(0.75 * var(--scene-h)) at 50% calc(var(--bleed) + 0.42 * var(--scene-h)),
    #0a4552 0%,
    #062b34 55%,
    #04222a 100%
  );
  animation: fade-out 1.9s ease-in-out 0.15s both;
}
#cap {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + 13vw);
  z-index: 6;
  text-align: center;
  padding: 0 24px;
  font-size: clamp(16px, 1.7vw, 24px);
  color: var(--fg2);
}
#cap .in {
  animation: fade-up 1.1s ease-out 1.25s both;
}
#cap b {
  font-family: var(--disp);
  font-style: italic;
  font-weight: 900;
  color: var(--ital);
}
html.zh #cap b {
  font-style: normal;
  font-weight: 700;
}
#cap small {
  font-size: 0.78em;
  color: var(--fg3);
}
#cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--scene-bottom) + 28px);
  z-index: 6;
  display: flex;
  justify-content: center;
}
#cue .in {
  animation: fade-up 0.8s ease-out 2.1s both;
}
#cue svg {
  animation: bob 2.2s ease-in-out infinite;
}
/* The opening film (js/opening.js). The head script (content/home.py) sets html.opening before the first paint when
   the film is to play: a cover in the film's own dark opening colour then hides the first screen, whose own
   opening waits underneath, and the navigation stays out of the picture. The film is shown at the screen's width,
   centred on the frame, which is how its last frame lands on the first screen's logo; where the screen is taller
   than the film, the film's upper and lower edges fade into the cover. The cover's colour is its text colour, so
   the edges follow it: the film's own dark at first, the page's ground once the film has reached it (.lit).
   When the film is over the cover fades (.out, --leave from opening.js), and html.opened shows the first screen
   complete: the film has already brought the logo, so nothing settles in again; only the caption and the cue,
   which the film does not have, come in. If the film never showed, html.opening simply goes and the first screen
   opens as it always has. */
#open {
  z-index: 8;
  display: none;
  overflow: hidden;
  color: #020d11;
  background: currentColor;
  transition:
    color 0.6s linear,
    opacity var(--leave, 0.3s) ease-out;
}
html.opening #open,
#open.out {
  display: block;
}
#open.lit {
  color: var(--ground);
}
#open.out {
  opacity: 0;
}
.reel {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.reel video {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.15s linear;
}
#open.on video {
  opacity: 1;
}
.reel::before,
.reel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 72px;
}
.reel::before {
  top: -1px;
  background: linear-gradient(180deg, currentColor, transparent);
}
.reel::after {
  bottom: -1px;
  background: linear-gradient(0deg, currentColor, transparent);
}
.home .nav,
.rail {
  transition: opacity 0.5s ease-out;
}
html.opening .nav,
html.opening .rail {
  opacity: 0;
  pointer-events: none;
}
html.opening #veil,
html.opening #intro,
html.opening #cap .in,
html.opening #cue .in,
html.opened #veil {
  animation: none;
}
html.opened #intro {
  display: none;
}
html.opened #cap .in {
  animation-delay: 0.25s;
}
html.opened #cue .in {
  animation-delay: 0.9s;
}
@keyframes logo-settle {
  from {
    transform: scale(1.035);
  }
  to {
    transform: scale(1);
  }
}
@keyframes fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(7px);
  }
}

/* forest and scan */
#forest {
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  overflow: hidden;
}
/* the forest photographs are layers of their own: the forest is scaled on every step, never beyond 1.18 times */
#forest img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  will-change: transform;
}
/* the scanned overlay is revealed by a sliding frame: #ovw moves right to left, #ov moves back by the same amount */
#ovw {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: translateX(-100%);
  will-change: transform;
}
#ov {
  transform: translateX(100%);
  will-change: transform;
}
#band {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 240px;
  margin-left: -240px;
  background: linear-gradient(
    90deg,
    rgba(63, 211, 220, 0) 0%,
    rgba(63, 211, 220, 0.1) 55%,
    rgba(127, 239, 242, 0.34) 97%,
    rgba(190, 245, 245, 0.7) 100%
  );
  opacity: 0;
  will-change: transform, opacity;
}
/* everything the scroll moves gets its own layer, so a scroll step only recomposites. Not the map: it is scaled from
   seven times its size, and a layer told to expect transforms is painted by Chrome at the scale it starts with and
   kept there, which on a large 2x window is more graphics memory than there is (map.js, bitmap). Its pictures are
   bitmaps, which need no painting at any scale; its outlines and labels are painted as the scale changes. */
#maskL,
#t1,
#t2,
#hud,
#ledger,
#hand {
  will-change: transform, opacity;
}
#maskL {
  background: linear-gradient(
    90deg,
    rgba(4, 34, 41, 0.94) 0%,
    rgba(4, 34, 41, 0.84) 24%,
    rgba(4, 34, 41, 0.56) 42%,
    rgba(4, 34, 41, 0.24) 60%,
    rgba(4, 34, 41, 0) 78%
  );
  opacity: 0;
}
#t1 {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  opacity: 0;
}
#t1 h1 {
  font-size: clamp(46px, 7.2vw, 112px);
  line-height: 1.04;
  font-weight: 900;
  max-width: 9.6em;
}
html.zh #t1 h1 {
  font-size: clamp(40px, 6vw, 92px);
  line-height: 1.22;
  max-width: none;
}
#t1 p {
  font-size: clamp(18px, 1.9vw, 26px);
  margin-top: 20px;
  color: var(--fg2);
  max-width: 30em;
}
#chips {
  position: absolute;
  right: max(24px, 4vw);
  bottom: calc(var(--scene-bottom) + 36px);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(247, 251, 251, 0.94);
  color: #10292e;
  font-size: 12.5px;
  letter-spacing: 0.1em;
}
.pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ribbon);
}
#chips .note {
  font-size: 13px;
  color: #fff;
  background: rgba(4, 34, 41, 0.72);
  padding: 4px 12px;
  border-radius: 999px;
}

/* full-screen system view */
#homeMap {
  position: absolute;
  inset: 0;
  transform-origin: var(--fx, 70%) var(--fy, 50%);
}
#homeMap .map-note {
  left: auto;
  right: max(24px, (100% - var(--column)) / 2);
  bottom: auto;
  top: calc(env(safe-area-inset-top, 0px) + 196px);
}
/* darkens the map behind the text on the left; it is measured on the page column (--c is where the column starts,
   --w its width), so on wide screens it stays with the text */
.sysmask {
  --c: max(0px, (100% - var(--column)) / 2 - 24px);
  --w: min(100%, var(--column) + 48px);
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
      90deg,
      rgba(4, 34, 41, 0.95) 0,
      rgba(4, 34, 41, 0.95) var(--c),
      rgba(4, 34, 41, 0.82) calc(var(--c) + 0.26 * var(--w)),
      rgba(4, 34, 41, 0.28) calc(var(--c) + 0.46 * var(--w)),
      rgba(4, 34, 41, 0) calc(var(--c) + 0.58 * var(--w))
    ),
    linear-gradient(
      0deg,
      rgba(3, 26, 32, 0.88) var(--bleed),
      rgba(3, 26, 32, 0.42) calc(var(--bleed) + 0.15 * var(--scene-h)),
      rgba(3, 26, 32, 0) calc(var(--bleed) + 0.28 * var(--scene-h))
    ),
    linear-gradient(
      180deg,
      rgba(3, 26, 32, 0.62) var(--bleed),
      rgba(3, 26, 32, 0) calc(var(--bleed) + 0.26 * var(--scene-h))
    );
}
.sysin {
  position: absolute;
  inset: 0;
  max-width: calc(var(--column) + 48px); /* the column plus its gutters */
  margin: 0 auto;
  /* The system view's two columns: text and inventory on the left, the system panel on the right. The panel gives
     way so the two are never closer than --split-gap: as two shares of the width (42% and 52%) they met on narrow
     wide-screens (5 px apart on an unfolded iPhone Duo, 890 wide; 14 px at 1024). From about 1240 px up nothing
     changes. Phones stack them instead (below). */
  --left-x: max(24px, env(safe-area-inset-left, 0px));
  --left-w: min(42%, 560px);
  --right-x: max(24px, env(safe-area-inset-right, 0px));
  --split-gap: 48px;
}
#left {
  position: absolute;
  left: var(--left-x);
  width: var(--left-w);
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
}
#t2 {
  position: absolute;
  left: 0;
  right: 0;
  opacity: 0;
  display: grid;
}
/* one caption per data layer, stacked in one cell so the block keeps its height; the current one fades in */
.t2s {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.45s ease-out,
    transform 0.45s ease-out;
}
.t2s.on {
  opacity: 1;
  transform: none;
  transition-delay: 0.12s;
}
#t2 h2 {
  font-size: clamp(32px, 3.9vw, 58px);
  line-height: 1.14;
  margin-top: 10px;
}
html.zh #t2 h2 {
  line-height: 1.35;
  font-size: clamp(28px, 3.1vw, 44px);
}
#t2 p {
  margin-top: 16px;
  color: var(--fg2);
  font-size: 17px;
  max-width: 30em;
}
#ledger {
  position: absolute;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease-out,
    visibility 0s 0.3s;
}
/* the last scenes are switched by home-story.js (stage[data-scene]) and faded here */
[data-scene="ledger"] #ledger {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease-out 0.08s;
}
#ledger .eyebrow {
  margin-bottom: 8px;
}
#ledger .row {
  padding: 12px 0;
}
/* the lines build by themselves once the panel is in; leaving resets them (rows are div 2 to 5) */
#ledger .row,
#ledger .net {
  opacity: 0;
  transform: translateX(-18px);
  transition:
    opacity 0.32s ease-out,
    transform 0.32s ease-out;
}
#ledger .net {
  transform: translateY(14px);
}
[data-scene="ledger"] #ledger .row,
[data-scene="ledger"] #ledger .net {
  opacity: 1;
  transform: none;
}
[data-scene="ledger"] #ledger .row:nth-of-type(3) {
  transition-delay: 0.1s;
}
[data-scene="ledger"] #ledger .row:nth-of-type(4) {
  transition-delay: 0.2s;
}
[data-scene="ledger"] #ledger .row:nth-of-type(5) {
  transition-delay: 0.3s;
}
[data-scene="ledger"] #ledger .net {
  transition-delay: 0.42s;
}
#ledger .row b.plus {
  color: var(--bright);
}
#ledger .row b.minus {
  color: var(--fg3);
}
#hud {
  position: absolute;
  right: var(--right-x);
  top: calc(env(safe-area-inset-top, 0px) + 84px);
  bottom: calc(var(--scene-bottom) + 26px);
  width: min(52%, 620px, 100% - var(--left-x) - var(--left-w) - var(--split-gap) - var(--right-x));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
}
.hudtop .chead {
  text-shadow: 0 1px 6px rgba(3, 26, 32, 0.8);
}
#hud .chead small {
  color: var(--fg2);
}
#hud .seg {
  margin-top: 10px;
  background: rgba(3, 26, 32, 0.8);
}
#hud .seg button {
  color: var(--fg2);
  min-height: 38px;
}
#hud .seg button:hover,
#hud .seg button[aria-selected="true"] {
  color: #fff;
}
#hud .seg button,
#hud .years button {
  pointer-events: auto;
  cursor: pointer;
}
.hudkeys {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 10px;
}
/* a legend that carries a line of text sits on a plate, as the keys on the SENRA page's map do: small type straight
   on the map's colours does not read */
.hudkeys .map-legend.worded {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(3, 26, 32, 0.72);
  text-shadow: none;
}
.kpi {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 36px;
  font-size: 14px;
  color: var(--fg2);
}
.kpi b {
  font-weight: 600;
  font-size: clamp(24px, 2.5vw, 34px);
  color: #fff;
  line-height: 1.1;
}
.tl {
  position: relative;
  height: 12px;
  margin-top: 12px;
}
.tl:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 5px;
  height: 2px;
  background: rgba(214, 238, 240, 0.32);
}
#tlv {
  position: absolute;
  left: 0;
  top: 5px;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--bright);
}
#tld {
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--bright);
}
.years {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 13px;
  color: var(--fg2);
}
.years button {
  font: inherit;
  color: var(--fg2);
  background: none;
  border: 0;
  padding: 6px 6px 0;
  margin: -6px -6px 0;
  transition: color 0.15s;
}
.years button:hover,
.years button[aria-pressed="true"] {
  color: #fff;
}
.years button[aria-pressed="true"] {
  font-weight: 600;
}
#hand {
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px var(--bars); /* centred in the part of the screen the browser's bars never cover */
  background: radial-gradient(
    90% calc(0.7 * var(--scene-h)) at 50% calc(var(--bleed) + 0.46 * var(--scene-h)),
    var(--deep2) 0%,
    var(--ground2) 48%,
    var(--ground) 100%
  );
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.45s ease-out,
    visibility 0s 0.45s;
}
[data-scene="hand"] #hand {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease-out;
}
#hand > p {
  transform: translateY(24px);
  transition: transform 0.6s ease-out;
}
[data-scene="hand"] #hand > p {
  transform: none;
}
#hand p {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(30px, 4.8vw, 70px);
  line-height: 1.14;
  max-width: 15em;
  text-wrap: balance;
}
html.zh #hand p {
  line-height: 1.35;
  font-size: clamp(28px, 4.4vw, 62px);
}
#hand p {
  margin-bottom: clamp(52px, 5vw, 76px);
}
#hand img {
  margin-bottom: clamp(44px, 4.2vw, 64px);
  height: clamp(100px, 8vw, 104px);
  width: auto;
}
@media (max-width: 860px) {
  /* on a phone the inventory and the hand-over take the whole screen, so the map controls step aside */
  #hud > * {
    transition: opacity 0.3s ease-out;
  }
  [data-scene="ledger"] #hud > *,
  [data-scene="hand"] #hud > * {
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.3s ease-out,
      visibility 0s 0.3s;
  }
  /* The layer captions sit at the top; the inventory takes the place of the map controls at the bottom, under the
     map, so the map stays in view above it and the screen is filled from the bottom up on tall phones too. */
  #left {
    left: 24px;
    right: 24px;
    width: auto;
    top: calc(env(safe-area-inset-top, 0px) + 84px);
    bottom: calc(var(--scene-bottom) + 18px);
    display: block;
  }
  #t2 h2 {
    font-size: clamp(26px, 7.4vw, 38px);
    margin-top: 4px;
  }
  html.zh #t2 h2 {
    font-size: clamp(24px, 6.5vw, 34px);
  }
  #t2 p {
    display: none;
  }
  #ledger {
    top: auto;
    bottom: 0;
    padding: 16px;
    border-radius: 14px;
    background: rgba(3, 26, 32, 0.92);
  }
  #ledger .row {
    font-size: 15.5px;
    padding: 10px 0;
  }
  .sysmask {
    background: linear-gradient(
        180deg,
        rgba(3, 26, 32, 0.9) var(--bleed),
        rgba(3, 26, 32, 0.5) calc(var(--bleed) + 0.26 * var(--scene-h)),
        rgba(3, 26, 32, 0) calc(var(--bleed) + 0.38 * var(--scene-h))
      ),
      linear-gradient(
        0deg,
        rgba(3, 26, 32, 0.94) var(--bleed),
        rgba(3, 26, 32, 0.6) calc(var(--bleed) + 0.24 * var(--scene-h)),
        rgba(3, 26, 32, 0) calc(var(--bleed) + 0.36 * var(--scene-h))
      );
  }
  #hud {
    left: 24px;
    right: 24px;
    width: auto;
    top: auto;
    bottom: calc(var(--scene-bottom) + 18px);
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
  }
  #hud .chead {
    display: none;
  }
  #hud .seg {
    margin-top: 0;
  }
  #hud .seg button {
    font-size: 12px;
    min-height: 44px;
    line-height: 1.2;
  }
  .years button {
    min-height: 44px;
    padding: 12px 8px;
    margin: -8px -8px -10px;
  }
  .hudkeys {
    flex-wrap: wrap;
    gap: 6px 16px;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 0;
    border-radius: 10px;
    background: rgba(3, 26, 32, 0.72);
  }
  .hudkeys .map-legend.worded {
    padding: 0; /* the whole panel is a plate here */
    background: none;
  }
  .hudkeys .map-legend {
    flex: 1 1 60%;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    min-width: 0;
  }
  .hudkeys .map-legend .ramp,
  .hudkeys .map-legend .ends,
  .hudkeys .map-legend .legend-note {
    flex: 1 0 100%;
    max-width: none;
  }
  #homeMap .map-note {
    left: auto;
    right: 24px;
    bottom: auto;
    top: calc(env(safe-area-inset-top, 0px) + 84px);
  }
  #t1 h1 {
    font-size: clamp(44px, 13vw, 72px);
  }
  #chips {
    left: 24px;
    right: 24px;
    align-items: flex-start;
  }
  .pill {
    font-size: 12px;
    letter-spacing: 0.06em;
  }
  #maskL {
    background: linear-gradient(90deg, rgba(4, 34, 41, 0.82) 0%, rgba(4, 34, 41, 0.62) 60%, rgba(4, 34, 41, 0.38) 100%);
  }
  #cap {
    top: calc(50% + 15vw);
  }
}

@media (max-width: 860px) and (max-height: 620px) {
  #left {
    top: calc(env(safe-area-inset-top, 0px) + 70px);
  }
  #ledger {
    padding: 12px 14px;
  }
  #ledger .row {
    padding: 6px 0;
    font-size: 14.5px;
  }
  #ledger .net {
    padding: 12px 14px;
    margin-top: 10px;
  }
  #ledger .net p {
    font-size: 13px;
    line-height: 1.45;
  }
}

/* calm sections */
.home .sec {
  padding-block: clamp(80px, 11vw, 150px);
}
.home .sec.tight {
  padding-top: clamp(40px, 5vw, 70px);
}
.photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.photo img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
}
.photo:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      180deg,
      var(--ground) 0%,
      rgba(4, 34, 41, 0.62) 14%,
      rgba(4, 34, 41, 0.22) 42%,
      rgba(4, 34, 41, 0.5) 80%,
      var(--ground) 100%
    ),
    linear-gradient(90deg, rgba(4, 34, 41, 0.84) 0%, rgba(4, 34, 41, 0.56) 46%, rgba(4, 34, 41, 0.04) 100%);
}
.rel {
  position: relative;
}
.big {
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1.1;
  margin-top: 12px;
  max-width: 17em;
}
html.zh .big {
  line-height: 1.35;
  font-size: clamp(27px, 4.6vw, 66px);
}
.home .lead {
  margin-top: 22px;
  max-width: 40em;
  font-size: clamp(17px, 1.5vw, 20px);
}
.home .lead + .lead {
  margin-top: 12px;
}
.tri {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  margin-top: 64px;
}
.tri > div,
.four > div {
  min-width: 0;
}
.tri h3 {
  font-size: 23px;
  line-height: 1.28;
  margin-bottom: 10px;
}
.tri p {
  font-size: 16px;
  color: var(--fg2);
}
.four {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin-top: 64px;
}
.four h3 {
  font-size: 21px;
  line-height: 1.28;
  margin-bottom: 8px;
}
.four p {
  font-size: 15.5px;
  color: var(--fg2);
}
.cols2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 56px;
}
.line {
  min-width: 0;
}
.line h3 {
  font-size: 26px;
  line-height: 1.25;
  margin-bottom: 8px;
}
.line p {
  font-size: 16px;
  color: var(--fg2);
}
.line .label {
  display: block;
  margin-bottom: 8px;
}
.label {
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg3);
}
.flag {
  margin-top: 18px;
  font-size: 15.5px;
  color: var(--fg2);
}
.flag b {
  color: var(--fg);
}
.home .acts {
  margin-top: 26px;
}
#fcs {
  height: calc(320 * var(--vh));
}
/* a shorter statement on phones: the same lines need less scrolling */
@media (max-width: 860px) {
  #fcs {
    height: calc(230 * var(--vh));
  }
}
/* the statement's frame (base.css, .pinned) */
.fstage {
  padding-bottom: var(--bars); /* centred in the part of the screen the browser's bars never cover */
  display: flex;
  flex-direction: column;
  justify-content: center;
  --scene-bg: linear-gradient(170deg, var(--deep2) 0%, var(--ground) 72%);
}
#fbig {
  font-family: var(--disp);
  font-weight: 900;
  font-size: clamp(40px, 8.4vw, 128px);
  line-height: 1.08;
  transform-origin: 0 0;
  will-change: transform;
}
html.zh #fbig {
  font-size: clamp(46px, 8vw, 120px);
  line-height: 1.25;
}
#fbig span {
  display: block;
}
#fbig span span {
  display: inline;
}
html:not(.zh) #fbig .zh,
html.zh #fbig .en {
  display: none !important;
}
#frest {
  margin-top: 30px;
}
#frest .lead {
  margin-top: 0;
}
#frest .tri {
  margin-top: 30px;
}
.close {
  padding-block: clamp(80px, 10vw, 130px) 60px;
  background: linear-gradient(180deg, var(--ground) 0%, var(--ground3) 100%);
}
/* after the partner band, on the same ground: the band's own bottom padding is the gap */
.partners-sec + .close {
  padding-top: 0;
}
.close h2 {
  font-size: clamp(34px, 5.4vw, 78px);
  line-height: 1.1;
  max-width: 15em;
}
html.zh .close h2 {
  line-height: 1.35;
}
.close .eyebrow {
  margin-top: 14px;
}
@media (max-width: 980px) {
  .four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  .tri {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    margin-top: 40px;
  }
  #frest .tri {
    gap: 10px;
    margin-top: 14px;
  }
  #frest .tri h3 {
    font-size: 17px;
    margin-bottom: 2px;
  }
  #frest .tri p {
    font-size: 14px;
  }
  #frest .lead {
    display: none;
  }
  #frest {
    margin-top: 14px;
  }
}
@media (max-width: 760px) {
  .cols2 {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 520px) {
  .four {
    grid-template-columns: minmax(0, 1fr);
  }
}
html.rm #story {
  height: auto;
}
html.rm #story::before,
html.rm #story::after {
  display: none;
}
html.rm #fcs {
  height: auto;
}
html.rm .fstage {
  height: auto;
  padding-block: 90px;
}
@media (prefers-reduced-motion: reduce) {
  .t2s,
  #ledger,
  #hand,
  #hand > p,
  #hud > * {
    transition: none;
  }
  #veil,
  #intro,
  #cap .in,
  #cue .in,
  #cue svg {
    animation: none;
  }
  #intro {
    display: none;
  }
}
