/* Deck: layout for the overlay copy. The look (ink, teal, keys, grooves) comes from the kit. */

html {
  scroll-behavior: auto;
}

/* --- Light and dark. Dark is the kit's default; light takes the live site's light tokens. --- */
:root {
  --scrim: 6 12 15; /* behind copy, so it reads over the scene */
  --scrim-a: 0.72;
  --scrim-b: 0.56;
  --header-veil: 10 17 21;
  --link: var(--accent-bright);
}
:root.theme-light {
  color-scheme: light;
  --bg: #f6f7f2;
  --bg-deep: #eef1eb;
  --surface: #fff;
  --surface-2: #e8efea;
  --text: #172e31;
  --muted: #3a5053; /* darker than the rest of the site's light theme: here the copy sits over the deck, not a flat page */
  --faint: #48605f;
  --accent: #066a78;
  --accent-bright: #0a8493;
  --sheen: #1fc0d1;
  --line: #1c454822;
  --link: #066a78;
  --scrim: 246 247 242;
  --scrim-a: 0.84;
  --scrim-b: 0.62;
  --header-veil: 246 247 242;
  --lit-shadow: 0 2px 8px #0003, inset 0 1px #ffffff40;
  --track: color-mix(in srgb, var(--bg-deep) 72%, var(--surface-2));
  --track-border: color-mix(in srgb, var(--text) 17%, transparent);
  --track-shadow: inset 0 2px 5px #00000038, inset 0 -1px 0 #ffffff99, 0 1px 0 #ffffffe6;
  --key: var(--surface);
  --key-border: color-mix(in srgb, var(--text) 14%, transparent);
  --raised: 0 1px 2px #0000001a, inset 0 1px 0 #ffffffb3;
}

/* --- Fit. The side-by-side page is drawn for a window 1280px wide or more. A narrower one (a
   tablet on its side, a small laptop) shows that same page drawn smaller, not the stacked one:
   layout.js sets --fit before first paint (window width / 1280; 1 when stacked or wider)
   and everything laid over the scene is zoomed by it. A zoomed box scales every length inside it,
   so lengths that follow the window (--gutter, --vw, vh) have --fit divided back out there, and
   lengths outside that leave room for a zoomed box are multiplied by it. --- */
:root {
  --fit: 1;
  --vw: calc(1vw / var(--fit));
  --gutter-drawn: calc(var(--gutter) / var(--fit));
}
/* The view's height. A phone's browser folds its toolbars away on the first scroll and the view
   grows by a tenth or more. The 3D picture fills the grown view, so whatever is laid over the
   picture is measured against the picture's own height (--view-h, set by the scene), never
   against the small viewport the browser reports (svh): copy placed by that sits too high, across
   the hardware it belongs under. --sh is a hundredth of it. */
:root {
  --sh: calc(var(--view-h, 100svh) / 100);
}
.site-header,
.page-rail,
.hero-head,
.hero-skip,
.stage-ready .beat-copy,
.site-footer {
  zoom: var(--fit);
  --gutter: var(--gutter-drawn);
}
.site-header {
  gap: 18px;
  background: linear-gradient(rgb(var(--header-veil) / 0.9), rgb(var(--header-veil) / 0));
}
.site-nav {
  margin-right: 10px;
}

/* The live site's appearance switch: a lit thumb that slides between sun and moon. */
.theme-toggle {
  flex: none;
  width: 66px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: none;
  cursor: pointer;
}
.theme-switch-track {
  position: relative;
  width: 62px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border: 1px solid var(--track-border);
  border-radius: 13px;
  background: var(--track);
  box-shadow: var(--track-shadow);
}
.theme-switch-track svg {
  width: 17px;
  height: 17px;
  z-index: 1;
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s, transform 0.5s;
}
.theme-switch-thumb {
  position: absolute;
  inset: 3px auto 3px 3px;
  width: 29px;
  border: 1px solid var(--lit-border);
  border-radius: 10px;
  background: var(--lit);
  box-shadow: var(--lit-shadow);
  transform: translateX(26px);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.theme-light .theme-switch-thumb {
  transform: translateX(0);
}
.theme-switch-track .theme-moon,
.theme-light .theme-switch-track .theme-sun {
  stroke: #fff;
}
.theme-light .theme-switch-track .theme-sun {
  transform: rotate(90deg);
}
.theme-light .theme-switch-track .theme-moon {
  stroke: var(--faint);
}

/* The live site's position rail, on the left edge: where you are, and how much is left. */
.page-rail {
  position: fixed;
  left: 12px;
  top: 50%;
  z-index: 35;
  width: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  transform: translateY(-50%);
}
.rail-stops {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rail-track {
  position: absolute;
  top: 19px;
  bottom: 19px;
  width: 1px;
  background: var(--line);
}
#railFill {
  display: block;
  width: 1px;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  transform: scaleY(0);
  transform-origin: top;
}
.page-rail a {
  position: relative;
  width: 36px;
  height: 38px;
  display: grid;
  place-items: center;
  text-decoration: none;
}
.page-rail a::before {
  content: "";
  width: 5px;
  height: 5px;
  border: 1px solid var(--faint);
  border-radius: 1px;
  background: var(--bg);
  transform: rotate(45deg);
  transition: box-shadow 0.3s, background 0.3s, transform 0.3s;
}
.page-rail a[aria-current="location"]::before {
  border-color: var(--accent);
  background: var(--accent);
  transform: rotate(45deg) scale(1.3);
  box-shadow: 0 0 0 4px #0aa4b517, 0 0 14px #0aa4b53b;
}
.page-rail a span {
  position: absolute;
  left: 40px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  box-shadow: 0 4px 18px #0002;
}
.page-rail a:hover span,
.page-rail a:focus-visible span {
  opacity: 1;
  transform: none;
}
/* A section's parts: small stops that open under its own stop while it is in view. */
.rail-subs {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rail-subs a {
  height: 0;
  opacity: 0;
  pointer-events: none;
  transition: height 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.25s;
}
.rail-subs.is-open a {
  height: 17px;
  opacity: 1;
  pointer-events: auto;
}
.rail-subs a::before {
  width: 4px;
  height: 4px;
}
.rail-subs a[aria-current]::before {
  border-color: var(--accent);
  background: var(--accent);
  transform: rotate(45deg) scale(1.7);
  box-shadow: 0 0 0 3px #0aa4b526, 0 0 10px #0aa4b566;
}
.rail-subs a span {
  padding: 3px 10px;
  font-size: 11px;
}
#railFill {
  transition: transform 0.3s ease;
}
.rail-step {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--faint);
  cursor: pointer;
}
.rail-step:hover {
  color: var(--accent);
  background: #0aa4b512;
}
.rail-step:disabled {
  opacity: 0.35;
  cursor: default;
}
.rail-step svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 1023px), (max-aspect-ratio: 23/20) {
  .page-rail {
    display: none;
  }
}

/* --- Scroll bar: the brighter teal, in both finishes. With a mouse it is the browser's own bar,
   recoloured, so it can still be dragged. --- */
:root {
  --scroll-teal: #41d3e2;
}
:root.theme-light {
  --scroll-teal: #0aa4b5;
}
html {
  scrollbar-color: var(--scroll-teal) transparent;
}
.scroll-bar {
  display: none;
}
/* A phone or an upright tablet has no page rail, and its own bar shows only while the page moves:
   at rest, in a section that holds still, nothing says the page goes on. There the page draws the
   bar itself and keeps it on (scroll-bar.js): a thumb on a track in the right gutter, and under it
   a cue that bobs while more remains. It comes in with the first scroll; the first screen has the
   word Scroll under the reel, which runs edge to edge. */
@media (pointer: coarse) and (max-width: 1023px), (pointer: coarse) and (max-aspect-ratio: 23/20) {
  html:not(.no-stage) {
    scrollbar-width: none;
  }
  html:not(.no-stage) .scroll-bar {
    position: fixed;
    right: 2px;
    top: 50%;
    z-index: 35;
    width: 16px;
    display: grid;
    justify-items: center;
    gap: 7px;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
  }
  html:not(.no-stage) .scroll-bar.is-on {
    opacity: 1;
  }
  .scroll-track {
    width: 4px;
    height: calc(50 * var(--sh));
    border-radius: 2px;
    background: color-mix(in srgb, var(--scroll-teal) 24%, transparent);
  }
  .scroll-thumb {
    display: block;
    width: 100%;
    border-radius: 2px;
    background: var(--scroll-teal);
    box-shadow: 0 0 9px color-mix(in srgb, var(--scroll-teal) 75%, transparent);
  }
  .scroll-more {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--scroll-teal);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    transition: opacity 0.4s ease;
  }
  .scroll-bar.has-more .scroll-more {
    opacity: 1;
    animation: cue 2.2s ease-in-out infinite;
  }
}
@media (max-width: 600px) {
  .site-header .header-cta {
    display: none; /* the same key is the first thing under the headline */
  }
}

/* --- Hero: the live homepage's first view. The reel's box is where the 3D screen lands. --- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: calc((var(--header-h) + 2px) * var(--fit));
}
.hero-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px 32px;
}
.hero-head .display {
  /* The second term keeps the headline and its keys in one row down to 1200px: the keys are a
     fixed 417px, and the line is about 16.2 times its type size. */
  font-size: clamp(30px, min(calc(3.62 * var(--vw)), calc(5.6 * var(--vw) - 28px)), 52px);
  white-space: nowrap;
  padding-top: 2px;
}
.hero-actions {
  display: grid;
  justify-items: end;
  gap: 5px;
}
.license-line {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
/* The reel is the first view: as wide as the window's height allows, with only the headline
   above it and the chapter keys below. */
.hero-reel {
  --reel-h: min(calc(100vh - (var(--header-h) + 184px) * var(--fit)), 80vh);
  width: min(calc(var(--reel-h) * 1.713), 100%);
  aspect-ratio: 1480 / 864;
  margin-top: 8px;
  border: 1px solid #41d3e259;
  border-radius: 3.2% / 5.5%; /* the 3D screen's corner, so the handover from this flat one is invisible */
  overflow: hidden;
  background: #0c1a20;
  box-shadow: 0 0 0 3px #05090b, 0 0 0 4px #ffffff14, 0 30px 80px #000c, 0 0 90px #0aa4b526;
}
.theme-light .hero-reel {
  border-color: #066a7840;
  background: #eef1eb;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px #1c454822, 0 25px 65px #1239321c;
}
.hero-reel {
  padding: 0.56%; /* the 3D screen's bezel, so the two pictures sit on the same pixels */
}
.hero-reel video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2.7% / 4.7%;
}
.hero-skip {
  margin-top: 22px;
  transition: opacity 0.4s;
}
/* The headline and the skip key belong to the arrival view: they fade as the first scroll
   starts the screen moving, so they never ride up over it. */
.stage-ready .hero-head,
.stage-ready .hero-skip {
  opacity: var(--copy, 1);
}
.hero-skip .key {
  gap: 12px;
}
.hero-caption,
.scroll-cue {
  display: none; /* phones only */
}
@keyframes cue {
  0%, 100% { transform: translateY(-2px); opacity: 0.5; }
  50% { transform: translateY(3px); opacity: 1; }
}
.hero-skip .count {
  color: var(--muted);
  font: 500 12px/1 var(--mono);
}
/* With the stage running on a desktop, the seven 3D keys under the reel do this job. */
@media (min-width: 721px) and (pointer: fine) {
  .stage-pending .hero-skip,
  .stage-ready .hero-skip {
    opacity: 0;
    pointer-events: none;
  }
}

/* --- Copy inside a beat -------------------------------------------------------------- */
.beat-copy {
  gap: 16px;
}
/* While the stage runs a section's copy does not scroll with the page: it is held in place for
   as long as the camera is on that section's hardware (the scene sets .is-shown and --copy),
   then fades where it stands. */
.stage-ready .beat-copy {
  position: fixed;
  top: 0;
  left: var(--gutter);
  width: min(480px, calc(100vw - var(--gutter) * 2));
  height: calc(100 * var(--sh) / var(--fit));
  min-height: 0;
  visibility: hidden;
}
.stage-ready .beat-copy.right {
  left: auto;
  right: var(--gutter);
}
.stage-ready .beat.is-shown .beat-copy {
  visibility: visible;
}
/* A section that is not in view shows none of its copy: display, not visibility, because the
   active step inside sets its own visibility and would show through. Before the stage is ready
   the copy is kept out of sight too, so nothing flashes while the scene starts. */
.stage-ready .beat:not(.is-shown) .beat-copy {
  display: none;
}
.stage-pending:not(.stage-ready) .beat-copy {
  opacity: 0;
}

/* Arrival. The flat reel is plain markup, so it is on the page in its frame at first paint, long
   before the 3D stage has loaded on a first visit. The stage then fades in underneath with its
   own screen in the same place, and the scene says which of the two shows the picture
   (reel-native: this flat one). The flat frame gives way to the 3D one as the stage fades in. */
.stage-ready .hero-reel.still {
  /* A hair above invisible: its <video> feeds the 3D screen, and some browsers stop decoding (or
     never start) a video they consider not shown. */
  opacity: 0.004;
  border-color: transparent;
  background-color: transparent;
  box-shadow: none;
  transition: opacity 0.3s ease, border-color 0.6s ease, background-color 0.6s ease, box-shadow 0.6s ease;
}
/* The flat picture stays until the 3D screen is fully there, and on phones whenever the page is
   at rest: the same picture, scaled by the browser, so the recording's small text is crisp. */
.stage-ready.reel-native .hero-reel.still {
  opacity: 1;
}
.stage {
  transition: opacity 0.6s ease;
}
.stage-ready .closing .beat-copy {
  left: var(--gutter);
  right: var(--gutter);
  width: auto;
}
/* Clear of the hardware beside them: the film's screen, and the three manuals. */
@media (min-width: 1024px) and (min-aspect-ratio: 23/20) {
  /* The film takes the window; its copy is one row across the top, under the header. */
  .stage-ready #film .beat-copy {
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
    max-width: none;
    margin: 0;
    height: auto;
    top: var(--header-h);
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 22px;
    padding: 12px 0 0;
  }
  #film .beat-copy::before {
    display: none;
  }
  .stage-ready #film .title {
    font-size: clamp(24px, calc(2.35 * var(--vw)), 34px);
    white-space: nowrap;
  }
  .stage-ready #film .lead {
    flex: 1;
    max-width: none;
    font-size: 15px;
  }
  .stage-ready #guide .beat-copy {
    width: 430px;
  }
}
/* The scene sets --copy per beat: 1 while the beat is pinned, 0 soon after it lets go. */
.stage-ready .beat-copy > * {
  opacity: var(--copy, 0);
  transform: translateY(calc((1 - var(--copy, 0)) * 14px));
}
/* The last key is a real one on the deck; its HTML twin shows only without the stage. */
.stage-ready .still-only {
  display: none;
}
.beat-copy::before {
  content: "";
  position: absolute;
  inset: 0 calc(-9 * var(--vw)) 0 calc(var(--gutter) * -1);
  z-index: -1;
  background: linear-gradient(90deg, rgb(var(--scrim) / var(--scrim-a)) 0%, rgb(var(--scrim) / var(--scrim-b)) 62%, rgb(var(--scrim) / 0) 100%);
  opacity: var(--copy, 0);
  pointer-events: none;
}
.beat-copy.right::before {
  inset: 0 calc(var(--gutter) * -1) 0 calc(-9 * var(--vw));
  background: linear-gradient(270deg, rgb(var(--scrim) / var(--scrim-a)) 0%, rgb(var(--scrim) / var(--scrim-b)) 62%, rgb(var(--scrim) / 0) 100%);
}
.no-stage .beat-copy::before {
  display: none;
}
/* The row of switches slides past behind this copy, so its side of the frame goes darker
   (side-by-side layout only; stacked copy has its own scrim below). */
@media (min-width: 1024px) and (min-aspect-ratio: 23/20) {
  /* The feature keys run along the bottom of the workspace view. The scrim stops above them:
     a key under it looks switched off, and these are meant to be pressed. */
  #product .beat-copy::before {
    bottom: calc(22vh / var(--fit));
    -webkit-mask-image: linear-gradient(#000 72%, transparent);
    mask-image: linear-gradient(#000 72%, transparent);
  }
  #security .beat-copy::before {
    background: linear-gradient(90deg, rgb(var(--scrim) / 0.98) 0%, rgb(var(--scrim) / 0.94) 66%, rgb(var(--scrim) / 0) 100%);
  }
}
.lead.small {
  font-size: 15px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  color: var(--link);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.text-link svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}
.text-link:hover svg {
  transform: translateX(3px);
}
.key svg path[d^="M8 5.5"] {
  fill: currentColor;
  stroke: none;
}

/* The eight capabilities as keys in a groove, for the stacked layout (see the stacked rules);
   side by side they are real keys on the deck, and without the stage every capability is listed. */
.feature-keys {
  display: none;
}

/* Steps: one visible at a time while the stage runs; a plain list without it. */
.steps {
  display: grid;
  margin-top: 6px;
}
.step {
  grid-area: 1 / 1;
  display: grid;
  gap: 10px;
  align-content: start;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s 0.3s;
}
.step.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0.12s, 0.12s, 0s;
}
.step h3 {
  font-size: clamp(21px, calc(1.75 * var(--vw)), 26px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
}
.step h3 a {
  color: inherit;
  text-decoration: none;
}
.step p {
  color: var(--muted);
  max-width: 30.75em; /* 42 characters (in em: see .lead) */
}
.ticks {
  display: grid;
  gap: 5px;
  margin: 2px 0 4px;
  padding: 0;
  list-style: none;
  font-size: 15px;
}
.ticks li {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.ticks li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 10px var(--accent);
  transform: translateY(-2px);
}
.no-stage .steps {
  gap: 56px;
}
.no-stage .step {
  grid-area: auto;
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Governance: each role's controls read out its fader live (scene/modules-governance.js).
   Granted keeps the lit dot; not granted is a hollow dot; closed at this level is a small lock,
   struck through, with who closed it. Without the stage the list stays plain. */
#governance .step .reading {
  max-width: none;
  min-height: 2lh; /* the sentence changes length as a thumb moves: reserve its lines */
  color: var(--text);
  text-wrap: pretty;
}
.no-stage #governance .step .reading {
  min-height: 0;
}
#governance .readout li {
  transition: color 0.3s ease;
}
#governance .readout li::before {
  box-sizing: border-box;
  border: 1.5px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
#governance .readout .is-off,
#governance .readout .is-closed {
  color: var(--muted);
}
#governance .readout .is-off::before {
  border-color: currentColor;
  background: transparent;
  box-shadow: none;
}
#governance .readout .is-closed::before {
  width: 9px;
  height: 10px;
  border: 0;
  border-radius: 0;
  background: currentColor;
  box-shadow: none;
  opacity: 0.75;
  transform: translateY(0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 10'%3E%3Cpath d='M2 4.5V3a2.5 2.5 0 0 1 5 0v1.5' fill='none' stroke='black' stroke-width='1.3'/%3E%3Crect x='0.5' y='4.5' width='8' height='5.5' rx='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 10'%3E%3Cpath d='M2 4.5V3a2.5 2.5 0 0 1 5 0v1.5' fill='none' stroke='black' stroke-width='1.3'/%3E%3Crect x='0.5' y='4.5' width='8' height='5.5' rx='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
}
#governance .readout .is-closed span {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
}
#governance .readout small {
  display: none;
  margin-left: -4px;
  font-size: 13px;
  color: var(--faint);
}
#governance .readout .is-closed small {
  display: inline;
}
#governance .drag-hint {
  display: none;
  margin-top: 4px;
  font-size: 13px;
  color: var(--faint);
}
@media (hover: hover) and (pointer: fine) {
  html:not(.no-stage) #governance .drag-hint {
    display: block;
  }
}
/* Stacked, the copy has less room: the lock and the strike say closed without the note, and on
   phones the live sentence stands in for the role's description. */
@media (max-width: 1023px), (max-aspect-ratio: 23/20) {
  html:not(.no-stage) #governance .readout .is-closed small {
    display: none;
  }
}
@media (max-width: 720px) {
  html:not(.no-stage) #governance .step > p:not(.reading) {
    display: none;
  }
}

/* Ledgers: short rows that light as the camera reaches their control. */
.ledger,
.paths {
  display: grid;
  gap: 2px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
}
.ledger li > *,
.paths a {
  display: grid;
  gap: 1px;
  padding: 9px 0 9px 16px;
  border-left: 2px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.3s, opacity 0.3s;
}
.ledger strong,
.paths strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ledger span,
.paths span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.stage-ready .ledger li {
  opacity: 0.42;
  transition: opacity 0.35s;
}
/* Each step in the list is a button for its key on the deck. */
.stage-ready [data-ledger="access"] li {
  pointer-events: auto;
  cursor: pointer;
}
.stage-ready [data-ledger="access"] li:hover {
  opacity: 1;
}
.stage-ready .ledger li.is-active,
.stage-ready .ledger li.was-active {
  opacity: 1;
}
.ledger li.is-active > * {
  border-left-color: var(--accent-bright);
}
.paths a:hover {
  border-left-color: var(--accent-bright);
}
.ledger.numbered {
  counter-reset: step;
}
.ledger.numbered li > * {
  counter-increment: step;
  grid-template-columns: 26px 1fr;
}
.ledger.numbered li > *::before {
  content: counter(step, decimal-leading-zero);
  grid-row: span 2;
  color: var(--faint);
  font: 500 12px/1.9 var(--mono);
}
.terms {
  max-width: 33.7em; /* 46 characters (in em: see .lead) */
  color: var(--muted);
  font-size: 14px;
}
.terms summary {
  width: fit-content;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}
.terms[open] {
  max-height: 34vh;
  overflow: auto;
  padding-right: 8px;
}
.terms p {
  margin-top: 8px;
}
.terms strong {
  color: var(--text);
}

/* --- Film -------------------------------------------------------------------------- */
.film-player {
  display: none;
}
/* Played on the deck's screen. The player is an anchor at the window's corner; its video is laid
   over the 3D screen by a transform the scene sets every frame (modules-film.js), so the film is
   drawn by the browser itself, in perspective, at the display's full resolution. Presses pass
   through it to the 3D controls. When the camera is elsewhere it is simply transparent. */
html:not(.no-stage) .film-player.film-embedded {
  position: fixed;
  left: 0;
  top: 0;
  display: block;
  width: 0;
  height: 0;
  pointer-events: none;
}
html:not(.no-stage):not(.film-open) .film-player.film-embedded video {
  position: absolute;
  left: 0;
  top: 0;
  width: 960px;
  height: 540px;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 7px;
  background: none;
  object-fit: fill;
  transform-origin: 0 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
html.film-native:not(.film-open) .film-player.film-embedded video {
  opacity: 1;
}
html:not(.film-open) .film-player.film-embedded .film-close {
  display: none;
}
html.film-open .film-player video {
  transform: none !important;
}
html.film-open .film-player.film-embedded {
  display: grid;
  width: auto;
  height: auto;
  overflow: visible;
  opacity: 1;
  pointer-events: auto;
}
/* The full-window player. Its surround is a veil in the finish's own colour over a blur of the
   page, as on the rest of the site: dark over dark, soft and light over light, never a black
   slab. It sits above the header and the page rail, so they blur with everything else. */
.film-open main {
  z-index: 60;
}
.film-open .film-player {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  padding: 24px;
  background: rgb(2 9 13 / 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}
.theme-light.film-open .film-player {
  background: rgb(233 240 240 / 0.68);
  -webkit-backdrop-filter: blur(14px) saturate(0.85);
  backdrop-filter: blur(14px) saturate(0.85);
}
.film-player video {
  width: min(1180px, 100%);
  max-height: 78vh;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #000;
}
.film-open .film-player video {
  box-shadow: 0 40px 120px #000b;
}
.theme-light.film-open .film-player video {
  border-color: #bccfd2;
  background: #eef1eb;
  box-shadow: 0 28px 90px rgb(31 64 70 / 0.18);
}
.no-stage .film-player {
  display: block;
  max-width: 720px;
  margin-top: 28px;
}
.no-stage .stage-only {
  display: none;
}

img.still-media,
.still-media img {
  width: 100%;
  height: auto;
}

/* --- Gear, closing, footer ------------------------------------------------------------ */
.prints {
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.no-stage .prints {
  display: grid;
}
/* Closing: the headline stands above the last key, both centred. */
html:not(.no-stage) .closing .beat-copy {
  max-width: none;
  align-items: center;
  justify-content: flex-start;
  padding: calc(23vh / var(--fit)) 0 0;
  text-align: center;
}
html:not(.no-stage) .closing .beat-copy::before {
  display: none;
}
.site-footer .copyright {
  flex-basis: 100%;
  color: var(--faint);
  font-size: 13px;
}

/* --- Narrower windows: the headline over its keys. Side by side this never applies: that page
   is drawn for 1280px or more (see Fit), where the headline and its keys share a row. --------- */
@media (max-width: 1023px), (max-width: 1199px) and (max-aspect-ratio: 23/20) {
  .hero-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-head .display {
    font-size: clamp(27px, 5vw, 46px);
    white-space: normal;
  }
  .hero-actions {
    justify-items: start;
  }
  .hero-reel {
    --reel-h: min(calc(100vh - var(--header-h) - 300px), 60vh);
    margin-top: 16px;
  }
}

/* Stacked: on phones and on narrow or tall windows the scene takes the upper part of the view
   and the copy sits under it on a soft scrim. The same rule picks the camera's stacked poses
   (layout.js). */
@media (max-width: 1023px), (max-aspect-ratio: 23/20) {
  /* The copy starts right under the part of the view the scene uses (--scene, per section), so
     it reads as that picture's caption; whatever height is left over stays at the bottom. */
  /* --scene: where each subject sits in the view, plus how far it reaches below that. A wider
     window zooms the lens in on the subject (--zoom, set by the scene), so the reach grows. */
  .beat {
    --scene: calc(30 * var(--sh) + 16 * var(--sh) * var(--zoom, 1));
  }
  /* The monitor is as wide as the window, so what the scene needs grows with the width. */
  #product {
    --scene: calc(27 * var(--sh) + 28vw + 104px);
  }
  html:not(.no-stage) .feature-keys {
    display: grid;
    grid-template-columns: repeat(4, auto); /* each column as wide as its longer name needs */
    width: 100%;
    margin-bottom: 6px;
  }
  .beat-copy .groove.feature-keys .key {
    min-width: 0;
    min-height: 40px;
    gap: 4px;
    padding: 0 5px;
    font-size: clamp(10.5px, 2.75vw, 14px);
    letter-spacing: -0.02em;
  }
  .beat-copy .groove.feature-keys .key svg {
    flex: none;
    width: clamp(12px, 3.2vw, 15px);
    height: clamp(12px, 3.2vw, 15px);
    stroke-width: 2;
  }
  #film {
    --scene: calc(36 * var(--sh) + 18.5 * var(--sh) * var(--zoom, 1));
  }
  #governance {
    --scene: calc(31 * var(--sh) + 18.5 * var(--sh) * var(--zoom, 1));
  }
  #security {
    --scene: calc(29 * var(--sh) + 19 * var(--sh) * var(--zoom, 1));
  }
  #guide {
    --scene: calc(34.5 * var(--sh) + 7.5 * var(--sh) * var(--zoom, 1));
  }
  #access {
    --scene: calc(27 * var(--sh) + 15.5 * var(--sh) * var(--zoom, 1));
  }
  #gear {
    --scene: calc(30 * var(--sh) + 20 * var(--sh) * var(--zoom, 1));
  }
  .stage-ready .beat-copy,
  .stage-ready .beat-copy.right {
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
  }
  html:not(.no-stage) .beat-copy,
  html:not(.no-stage) .beat-copy.right {
    justify-content: flex-start;
    max-width: none;
    margin: 0;
    padding: var(--scene) 0 26px;
    gap: 10px;
  }
  html:not(.no-stage) .beat-copy::before,
  html:not(.no-stage) .beat-copy.right::before {
    inset: calc(var(--scene) - 3 * var(--sh)) calc(var(--gutter) * -1) 0;
    background: linear-gradient(rgb(var(--scrim) / 0), rgb(var(--scrim) / 0.88) calc(9 * var(--sh)), rgb(var(--scrim) / 0.96));
  }
  html:not(.no-stage) .beat-copy:has(.steps) .lead,
  html:not(.no-stage) .beat-copy .lead.small {
    display: none;
  }
  .title {
    font-size: clamp(25px, 3.4vw, 34px);
  }
  .step h3 {
    font-size: clamp(19px, 2.3vw, 23px);
  }
  .ledger li > *,
  .paths a {
    padding: 5px 0 5px 12px;
  }
  .terms[open] {
    max-height: 22vh;
  }
}

/* Phones. */
@media (max-width: 720px) {
  .hero-head .display {
    font-size: 34px;
  }
  .hero-head .display .line {
    display: block;
  }
  /* The reel runs almost edge to edge: on a phone its width is all the size it can have. */
  .hero {
    padding-top: calc(var(--header-h) + 10px);
  }
  .hero-head {
    gap: 14px;
  }
  .hero-head .display {
    font-size: clamp(34px, 10.2vw, 44px);
  }
  .hero-reel {
    width: calc(100% + var(--gutter) * 2 - 16px);
    max-width: none;
    margin-top: 26px;
    box-shadow: 0 0 0 4px #05090b, 0 0 0 5px #ffffff14, 0 20px 50px #000c;
  }
  .hero-skip {
    display: grid;
    justify-items: center;
    gap: 14px;
    margin-top: 20px;
  }
  .hero-caption {
    display: block;
    max-width: 30ch;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.4;
    text-align: center;
    text-wrap: balance;
  }
  /* More below: a small cue at the foot of the first screen. */
  html:not(.no-stage) .scroll-cue {
    position: absolute;
    top: calc(100svh - 54px);
    left: 50%;
    display: grid;
    justify-items: center;
    gap: 2px;
    color: var(--faint);
    font: 500 11px/1 var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform: translateX(-50%);
    opacity: var(--copy, 1);
  }
  .scroll-cue svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: cue 2.2s ease-in-out infinite;
  }
  .hero-actions .key {
    min-height: 42px;
    gap: 6px;
    padding: 0 11px;
    font-size: 13.5px;
  }
  .lead,
  .step p,
  .ticks {
    font-size: 14px;
  }
  .ledger strong,
  .paths strong {
    font-size: 14px;
  }
  .ledger span,
  .paths span {
    font-size: 12.5px;
    line-height: 1.35;
  }
  .beat-copy .groove .key {
    min-height: 40px;
    padding: 0 13px;
    font-size: 14px;
  }
  .closing .display {
    font-size: 30px;
  }
  /* Low enough that the footer, arriving last, cannot push the headline under the header. */
  html:not(.no-stage) .closing .beat-copy {
    padding-top: calc(31 * var(--sh));
  }
}
/* Short phones: keep every section's copy inside the screen. */
@media (max-width: 720px) and (max-height: 760px) {
  .scroll-cue,
  html:not(.no-stage) #access .lead,
  html:not(.no-stage) #product .title,
  html:not(.no-stage) #product .ticks {
    display: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue svg,
  .scroll-bar.has-more .scroll-more {
    animation: none;
  }
  .step,
  .ledger li {
    transition: none;
  }
}
