/*
 * Getting started and your account. They continue the landing page: same black, same Geist, same
 * capsules. One column with no card, like the app's own sign-in. The top bar holds only the name and the
 * light and dark switch (Karl, 16 Nov 2026: no step rail, nothing about plans before signing up). Getting started has a film beside it, a shot per step; Download is the same quiet column as the
 * rest (Karl, 15 Nov 2026: the eclipse there looked wrong). This file stands alone, so changes to the
 * landing page's own styles cannot break signing up.
 *
 * Both pages have a light and a dark look, switched at the top right (Karl, 16 Nov 2026). Dark is the default, to
 * match the landing page; theme.js picks the saved one before the page paints. Colours come from the tokens below,
 * so a new rule uses them rather than white or black.
 */

@font-face {
  font-family: 'Geist';
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  src: url('assets/fonts/geist-latin-wght-normal.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --page: #000000;
  --ink: #ffffff;
  --muted: #a3a3a3;
  --line: rgba(255, 255, 255, 0.14);
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.09);
  --surface-3: rgba(255, 255, 255, 0.15);
  --underline: rgba(255, 255, 255, 0.28);
  --underline-strong: rgba(255, 255, 255, 0.4);
  /* The solid button: white on black, black on white. */
  --solid: #ffffff;
  --solid-hover: #ececec;
  --solid-ink: #000000;
  --quiet: rgba(255, 255, 255, 0.14);
  --quiet-hover: rgba(255, 255, 255, 0.22);
  --rail: #0c0c0c;
  --rail-edge: rgba(255, 255, 255, 0.26);
  /* A remembered address filled in by the browser: --surface-2 on the page, as one solid colour. */
  --filled: #171717;
  --reel-empty: #1a1a1a;
  --error: #ef476f;
  --warn: #ffd166;
  --pink: #ef476f;
  --yellow: #ffd166;
  --mint: #06d6a0;
  --blue: #118ab2;
  --spectrum-line: linear-gradient(
    100deg,
    var(--pink),
    var(--yellow),
    var(--mint),
    var(--blue),
    var(--pink)
  );
  --gutter: clamp(16px, 2.8vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.28, 0.64, 1);
  /* Getting started's motion, after R8D Athlete's first run: arriving settles, the picture opening out has weight. */
  --arrive: cubic-bezier(0.3, 0, 0.2, 1);
  --open: cubic-bezier(0.7, 0, 0.2, 1);
  --walk: 1.1s;
  /* The card the steps sit in once the picture fills the screen. */
  --glass: rgba(12, 12, 12, 0.74);
  --glass-edge: rgba(255, 255, 255, 0.12);
}

:root[data-theme='light'] {
  color-scheme: light;
  --page: #ffffff;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --line: rgba(0, 0, 0, 0.12);
  --surface: rgba(0, 0, 0, 0.03);
  --surface-2: rgba(0, 0, 0, 0.055);
  --surface-3: rgba(0, 0, 0, 0.09);
  --underline: rgba(0, 0, 0, 0.25);
  --underline-strong: rgba(0, 0, 0, 0.4);
  --solid: #0a0a0a;
  --solid-hover: #262626;
  --solid-ink: #ffffff;
  --quiet: rgba(0, 0, 0, 0.07);
  --quiet-hover: rgba(0, 0, 0, 0.12);
  --rail: #f4f4f4;
  --rail-edge: rgba(0, 0, 0, 0.14);
  --filled: #f2f2f2;
  --reel-empty: #ececec;
  --glass: rgba(255, 255, 255, 0.9);
  --glass-edge: rgba(0, 0, 0, 0.06);
  /* The spectrum's pink and yellow are too faint as words on white. */
  --error: #d42a55;
  --warn: #9a6400;
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family:
    'Geist',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Helvetica Neue',
    sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
p,
ol,
ul {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

svg {
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

h1 {
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  text-wrap: balance;
}

/* Capsules, as in the app. Pointing at one grows the pill, and the words stay still. */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  isolation: isolate;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  transition:
    transform 0.28s var(--ease),
    background-color 0.28s var(--ease);
}

.btn:hover::before {
  transform: scale(1.035);
}

.btn:active::before {
  transform: scale(0.98);
}

.btn-small {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.btn-large {
  height: 56px;
  padding: 0 32px;
  font-size: 16px;
}

.btn-primary {
  color: var(--solid-ink);
}

.btn-primary::before {
  background: var(--solid);
}

.btn-primary:hover::before {
  background: var(--solid-hover);
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: var(--spectrum-line);
  background-size: 220% 100%;
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: transform 0.28s var(--ease);
}

.btn-primary:hover::after {
  transform: scale(1.035);
  animation: sheen 3.6s linear infinite;
}

@keyframes sheen {
  to {
    background-position: -220% 0;
  }
}

.btn-quiet::before {
  background: var(--quiet);
}

.btn-quiet:hover::before {
  background: var(--quiet-hover);
}

.flow-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.page-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 72px;
  padding: 0 var(--gutter);
}

.page-brand {
  justify-self: start;
  display: block;
  color: var(--ink);
}

.page-brand svg {
  height: 23.5px;
  width: auto;
}

.page-end {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.page-top .page-link {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--muted);
}

.page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px var(--gutter) 96px;
}

.page-main-top {
  justify-content: flex-start;
  padding-top: clamp(32px, 8vh, 88px);
}

.page-col {
  width: min(400px, 100%);
  margin: 0 auto;
}

.page-col-wide {
  width: min(620px, 100%);
}

.page-col h1 {
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1.04;
  outline: none;
}

.page-line {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.page-line strong {
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.page-tight {
  margin-top: 2px;
}

.page-warn {
  color: var(--warn);
}

.page-wide {
  width: 100%;
  margin-top: 28px;
}

.page-g {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  flex: none;
}

.page-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 13px;
  color: var(--muted);
}

.page-or::before,
.page-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.page-form {
  display: flex;
  flex-direction: column;
}

.page-input {
  width: 100%;
  height: 48px;
  margin-top: 28px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

#or:not([hidden]) + .page-form .page-input {
  margin-top: 0;
}

.page-input::placeholder {
  color: var(--muted);
}

/* A browser filling in a remembered address paints the field light blue. It keeps its own colours (--filled), and
   Chrome's own fill is held back so it never shows. */
.page-input:-webkit-autofill,
.page-input:autofill {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow:
    inset 0 0 0 1px var(--line),
    inset 0 0 0 48px var(--filled);
  transition: background-color 600000s 0s;
}

.page-input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.page-form .page-wide {
  margin-top: 12px;
}

.page-error {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--error);
}

[aria-busy='true'] {
  pointer-events: none;
  opacity: 0.6;
}

.page-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-underline-offset: 3px;
  transition: color 0.2s linear;
}

.page-link:hover {
  color: var(--ink);
}

.page-link[disabled] {
  text-decoration: none;
  cursor: default;
  color: var(--muted);
}

/* Under the sign-up form: signing up is agreeing to the terms (Karl, 16 Nov 2026). */
.page-agree {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: balance;
}

.page-agree a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-underline-offset: 3px;
  transition: color 0.2s linear;
}

.page-agree a:hover {
  color: var(--ink);
}

.page-pair {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.page-under {
  display: block;
  width: fit-content;
  margin: 18px auto 0;
}

.page-scan {
  height: 2px;
  margin-top: 28px;
  border-radius: 2px;
  background: var(--spectrum-line);
  background-size: 220% 100%;
  animation: sheen 2.4s linear infinite;
}

/* Plans. Each is a choice, so each is one selectable row. */

.page-plans {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 28px;
}

.page-plans-spaced {
  margin-top: 20px;
}

.page-choice {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  padding: 12px 20px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  transition: background-color 0.2s linear;
}

.page-choice:hover {
  background: var(--surface-2);
}

.page-choice input {
  position: absolute;
  opacity: 0;
}

.page-choice:has(input:checked) {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.page-choice:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.page-choice strong {
  font-weight: 500;
}

.page-choice > span {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

/* A plan's name, with what it comes with under it. */
.page-choice-say {
  min-width: 0;
  text-align: left;
}

.page-choice-say strong {
  display: block;
}

.page-choice-say small {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

/* Your account: the same grouped rows as Settings in the app. */

.page-group {
  margin-top: 48px;
}

.page-group h2 {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--muted);
}

.page-plan {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.page-plan-name {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-rows li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.page-rows .page-soon {
  font-size: 14px;
  color: var(--muted);
}

/* A smaller heading inside a group: Buy credits, Recently. */
.page-sub {
  margin: 32px 0 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.page-sub + .page-plans {
  margin-top: 12px;
}

/* Top-up amounts: dollars over the credits they buy, three to a row, then a field for any other amount. */
.page-amounts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.page-amounts .page-choice {
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 18px;
}

.page-amount-other {
  position: relative;
  display: block;
  margin-top: 8px;
}

.page-amount-other .page-input {
  margin-top: 0;
  padding-left: 36px;
}

.page-amount-other > span {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--muted);
  pointer-events: none;
}

@media (max-width: 520px) {
  .page-amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.page-uses {
  margin-top: 4px;
}

.page-uses li {
  min-height: 56px;
}

.page-uses li > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.page-uses li > div span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-uses small {
  flex: none;
  font-size: 14px;
  color: var(--muted);
}

.page-amount {
  flex: none;
  font-size: 15px;
  color: var(--muted);
}

/* Getting started has a picture beside it: one short film, the next shot at each step (Karl, 15 Nov 2026: the page
   looked bare, so a picture on the left, like his other apps' sign-in). Only the name sits on it. On a phone there is
   no picture, and the name goes back in the top bar. Your account keeps its one column. */

.flow-split {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
}

.reel {
  /* Its own cell, so the steps can take the whole row over it once signed in. */
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  isolation: isolate;
}

.reel-shots {
  position: fixed;
  top: 12px;
  bottom: 12px;
  left: 12px;
  width: calc(46% - 12px);
  z-index: -1;
  overflow: hidden;
  border-radius: 28px;
  background: var(--reel-empty);
  transition:
    top var(--walk) var(--open),
    bottom var(--walk) var(--open),
    left var(--walk) var(--open),
    width var(--walk) var(--open),
    border-radius var(--walk) var(--open);
}

/* Shade under the name, so it reads on any shot. */
.reel-shots::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent 22%);
  pointer-events: none;
}

/* Once the picture fills the screen, a little more shade toward the card and the switch. */
.reel-shots::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 52%, rgba(0, 0, 0, 0.3), transparent 70%),
    linear-gradient(to top, rgba(0, 0, 0, 0.24), transparent 35%);
  opacity: 0;
  transition: opacity var(--walk) var(--open);
  pointer-events: none;
}

/* The film walks on, after R8D Athlete's first run: the shot here sits a touch close, the one passed zooms on by as
   it fades, so going forward feels like moving into the picture; one ahead waits further back. */
.reel-shot {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform-origin: 50% 46%;
  transition:
    opacity var(--walk) var(--ease),
    transform var(--walk) var(--arrive);
}

.reel-shot[data-place='here'] {
  opacity: 1;
  transform: scale(1.03);
}

.reel-shot[data-place='past'] {
  transform: scale(1.14);
}

.reel-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.7s var(--ease);
}

/* Filling a wide screen, each tall shot keeps its own band: the horizon, the girl from the face down, the field
   under the rainbow. */
.reel-shot[data-shot='2'] img {
  object-position: 50% 40%;
}

.reel-shot[data-shot='3'] img {
  object-position: 50% 60%;
}

/* theme.js marks each picture once it has loaded, so it fades in rather than popping in. Without it, they just show. */
[data-theme] .reel-shot img:not(.is-ready) {
  opacity: 0;
}

.reel .page-brand {
  position: absolute;
  color: #fff;
  top: 40px;
  left: 44px;
}

.reel .page-brand svg {
  height: 26px;
}

.split-side {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

.split-side .page-top {
  height: 84px;
}

/* The name is on the picture, so the bar has it only where the picture is gone. */
.page-brand-top {
  display: none;
}

/* Once signed in (Karl, 16 Nov 2026: like R8D Athlete's first run, a clean path, the picture opening out and
   changing). The panel opens out to the whole screen, and the steps sit in a card centred on it (Karl, same day:
   centre the card). The path of three is at the card's head, in plain ink with no spectrum (Karl: no rainbow in the
   timeline, super clean). */

.path {
  display: none;
}

[data-phase='path'] .path {
  display: flex;
  width: min(360px, 100%);
  margin: 0 auto 36px;
}

/* On the path the step reads down the middle, under the path's own centre line (Karl, 16 Nov 2026: the text looked
   big and off to one side). The heading is a card's heading, not the sign-in page's. Plan rows keep their own
   left-to-right reading. */
[data-phase='path'] .page-col > h1,
[data-phase='path'] .page-col > .page-line {
  text-align: center;
}

[data-phase='path'] .page-col > h1 {
  font-size: 34px;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

[data-phase='path'] .page-col > .page-line {
  max-width: 40ch;
  margin-right: auto;
  margin-left: auto;
  font-size: 15px;
  line-height: 1.55;
  text-wrap: balance;
}

[data-phase='path'] .page-plans {
  margin-top: 32px;
}

[data-phase='path'] .page-choice {
  min-height: 64px;
  padding: 12px 22px;
}

.path li {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--muted);
  transition: color 0.3s linear;
}

.path li[data-state='here'] {
  color: var(--ink);
}

/* The line from the step before: a hairline, and ink drawn along it once this step is reached. */
.path li + li::before,
.path li + li::after {
  content: '';
  position: absolute;
  top: 13px;
  right: calc(50% + 20px);
  width: calc(100% - 40px);
  height: 1.5px;
  border-radius: 2px;
}

.path li + li::before {
  background: var(--line);
}

.path li + li::after {
  background: var(--ink);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.7s var(--arrive);
}

.path li + li:is([data-state='here'], [data-state='done'])::after {
  clip-path: inset(0);
}

.path-node {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  transition:
    background-color 0.3s linear,
    color 0.3s linear,
    box-shadow 0.3s linear;
}

.path-node > * {
  grid-area: 1 / 1;
}

/* Where you are: solid ink, with a soft halo of it. */
[data-state='here'] .path-node {
  background: var(--ink);
  box-shadow: 0 0 0 4px var(--surface-3);
  color: var(--page);
}

/* Done: quieter than where you are, with a check that draws. */
[data-state='done'] .path-node {
  background: var(--surface-3);
  box-shadow: none;
  color: var(--ink);
}

.path-check {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 16;
  stroke-dashoffset: 16;
  transition: stroke-dashoffset 0.45s var(--arrive) 0.15s;
}

[data-state='done'] .path-check {
  stroke-dashoffset: 0;
}

.path-num {
  transition: opacity 0.2s linear;
}

[data-state='done'] .path-num {
  opacity: 0;
}

@media (min-width: 900px) {
  [data-phase='path'] .reel-shots {
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    border-radius: 0;
  }

  [data-phase='path'] .reel-shots::before {
    opacity: 1;
  }

  /* The steps take the whole width, so the card sits in the middle of the screen. The bar keeps the switch at the
     right edge, where it was. */
  [data-phase='path'] .split-side {
    grid-column: 1 / -1;
    grid-row: 1;
    pointer-events: none;
  }

  /* It lies over the name on the picture, so only the switch and the card take a click. */
  [data-phase='path'] .page-end,
  [data-phase='path'] .page-card {
    pointer-events: auto;
  }

  [data-phase='path'] .page-main {
    padding: 0 var(--gutter) 84px;
  }

  [data-phase='path'] .page-card {
    width: min(540px, 100%);
    margin: 0 auto;
    padding: 40px 48px 44px;
    overflow: hidden;
    border-radius: 32px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(28px) saturate(1.5);
    backdrop-filter: blur(28px) saturate(1.5);
    box-shadow:
      inset 0 0 0 1px var(--glass-edge),
      0 40px 120px rgba(0, 0, 0, 0.32);
    transition: height 0.4s var(--arrive);
    animation: card-rise 0.7s var(--arrive) 0.75s both;
  }

  [data-phase='path'] .page-card .page-col {
    width: 100%;
  }

  /* The switch sits on the picture now. */
  [data-phase='path'] .page-theme {
    color: rgba(255, 255, 255, 0.86);
  }
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* The other computers, under the one download button. */
.page-others {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  color: var(--muted);
}

.page-others:empty {
  display: none;
}

.page-others a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--underline-strong);
  text-underline-offset: 3px;
}

.page-others + .page-under {
  margin-top: 12px;
}

@media (max-width: 899px) {
  .flow-split {
    display: flex;
    flex-direction: column;
  }

  .reel {
    display: none;
  }

  .page-brand-top {
    display: block;
  }

  .split-side .page-top {
    height: 72px;
  }
}

@media (max-width: 699px) {
  .page-top,
  .split-side .page-top {
    grid-template-columns: auto 1fr;
    height: 64px;
  }

  .page-end {
    grid-column: 2;
    grid-row: 1;
  }

  .page-main {
    justify-content: flex-start;
    padding-top: 40px;
  }
}

/* Light or dark, at the top right. The icon is the look you're in, as in the app, and it turns into the other. */
.page-theme {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--muted);
  transition:
    color 0.2s linear,
    background-color 0.2s linear;
}

@media (hover: hover) {
  .page-theme:hover {
    color: var(--ink);
    background: var(--surface-2);
  }
}

.page-theme svg {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition:
    transform 0.5s var(--spring),
    opacity 0.25s linear;
}

.page-theme .theme-sun,
[data-theme='light'] .page-theme .theme-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

[data-theme='light'] .page-theme .theme-sun {
  opacity: 1;
  transform: none;
}

/* While the new look opens out from the switch, the old one holds still under it. */
.theme-turning::view-transition-old(root),
.theme-turning::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

.theme-turning .page-brand {
  view-transition-name: none;
}

/* Each step comes in the same way: the heading, then what's under it, rising a little as it fades in. A step shown
   again replays it, because it was hidden in between. */
.page-col > * {
  animation: page-rise 0.45s var(--arrive) both;
}

.page-col > :nth-child(2) {
  animation-delay: 60ms;
}

.page-col > :nth-child(n + 3) {
  animation-delay: 120ms;
}

@keyframes page-rise {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(6px);
  }
}

/* The step going away fades where it is before the next comes in (start.js waits for it). */
.page-col.is-leaving > * {
  animation: page-leave 0.2s var(--ease) both;
}

@keyframes page-leave {
  to {
    opacity: 0;
  }
}

/* From the landing page to here, and between here and your account, the pages fade into each other and the name
   glides to its new place, instead of the screen going blank (Karl, 16 Nov 2026). main.js lets only these through. */
@view-transition {
  navigation: auto;
}

::view-transition-group(root) {
  animation-duration: 0.45s;
  animation-timing-function: var(--ease);
}

::view-transition-group(brand) {
  animation-duration: 0.6s;
  animation-timing-function: var(--ease);
}

.reel .page-brand,
.page-top > .page-brand {
  view-transition-name: brand;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }

  .page-col > *,
  .page-col.is-leaving > *,
  .page-card,
  .page-theme svg,
  .reel-shot img {
    animation: none;
    transition: none;
  }

  .reel-shot,
  .reel-shots,
  .reel-shots::before,
  .page-card,
  .path li,
  .path li::after,
  .path-node,
  .path-check,
  .path-num,
  .page-link,
  .page-choice,
  .btn::before,
  .btn-primary::after {
    transition: none;
  }

  .page-scan {
    animation: none;
  }
}
