@layer reset, tokens, base, layout, components, utilities, overrides;

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

  :where(body, h1, h2, h3, p, figure, blockquote, ul, ol, dl, dd, fieldset) {
    margin: 0;
  }

  :where(fieldset) {
    padding: 0;
    border: 0;
    min-inline-size: 0;
  }

  :where(ul[role="list"], ol[role="list"]) {
    padding-inline-start: 0;
    list-style: none;
  }

  :where(img, svg, video) {
    display: block;
    max-inline-size: 100%;
    block-size: auto;
  }

  :where(button, input, select, textarea) {
    font: inherit;
    color: inherit;
  }

  :where(button, summary, label) {
    cursor: pointer;
  }

  [hidden] {
    display: none;
  }
}

@layer tokens {
  :root {
    --white: oklch(100% 0 0);
    --shadow-ink: oklch(8% 0.04 262);

    --navy-450: oklch(33.5% 0.088 258.5);
    --navy-500: oklch(32.3% 0.097 257.7);
    --navy-900: oklch(16% 0.057 257);
    --navy-950: oklch(15.4% 0.058 261);

    --ink-700: oklch(23% 0.055 259);
    --ink-750: oklch(21.8% 0.057 261);
    --ink-800: oklch(20.8% 0.04 266);
    --ink-850: oklch(18.6% 0.041 265);
    --ink-900: oklch(16.5% 0.042 264);

    --slate-800: oklch(28% 0.036 262);
    --slate-700: oklch(36.7% 0.037 260);
    --slate-600: oklch(45% 0.035 253);
    --slate-400: oklch(70.5% 0.035 258.4);
    --slate-300: oklch(80% 0.028 257);
    --slate-100: oklch(96.5% 0.01 255);
    --steel-700: oklch(37.7% 0.057 259.3);
    --indigo-700: oklch(36.5% 0.132 280);
    --indigo-500: oklch(58% 0.16 280);
    --azure-700: oklch(41.2% 0.109 260);
    --grape-700: oklch(39.9% 0.126 294);

    --rose-500: oklch(65.6% 0.21 16.3);
    --rose-400: oklch(72.2% 0.173 14.3);
    --rose-650: oklch(56.9% 0.175 13);
    --rose-550: oklch(62.5% 0.14 10.1);
    --sky-400: oklch(75.8% 0.134 230.5);
    --blue-400: oklch(72.4% 0.14 253.3);
    --amber-500: oklch(77.3% 0.167 68.7);
    --amber-450: oklch(80.2% 0.152 74.5);
    --amber-400: oklch(83.3% 0.163 83.2);
    --violet-500: oklch(63.9% 0.223 304.7);
    --violet-400: oklch(72.6% 0.18 306.3);
    --emerald-500: oklch(70.5% 0.149 162.6);
    --emerald-400: oklch(77.1% 0.157 162.3);
    --emerald-650: oklch(62.2% 0.125 166);
    --emerald-550: oklch(68.4% 0.127 166.5);

    --tile-violet-a: oklch(54% 0.2 302);
    --tile-violet-b: oklch(64% 0.15 304);
    --tile-blue-a: oklch(66% 0.125 235);
    --tile-blue-b: oklch(62% 0.14 256);
    --tile-emerald-a: oklch(60% 0.128 164);
    --tile-emerald-b: oklch(67% 0.128 165);
    --tile-amber-a: oklch(66% 0.145 70);
    --tile-amber-b: oklch(69% 0.11 90);

    --traffic-red: oklch(55.4% 0.164 23.8);
    --traffic-amber: oklch(67.6% 0.14 71.2);
    --traffic-green: oklch(61.3% 0.123 166);
    --led-green: oklch(72.7% 0.221 146.2);

    --color-page: var(--navy-900);
    --color-page-deep: var(--navy-950);
    --color-page-glow: var(--navy-500);
    --color-surface: var(--ink-800);
    --color-surface-raised: var(--slate-800);
    --color-line: var(--slate-700);
    --color-line-accent: var(--indigo-700);
    --color-line-accent-strong: var(--indigo-500);
    --color-text: var(--slate-100);
    --color-text-muted: var(--slate-300);
    --color-text-subtle: var(--slate-400);
    --color-text-on-accent: var(--ink-900);
    --color-accent: var(--sky-400);
    --color-accent-strong: var(--blue-400);
    --color-positive: var(--emerald-400);
    --color-focus: var(--amber-400);
    --color-header: color-mix(in oklch, var(--navy-900) 82%, transparent);
    --color-glare: color-mix(in oklch, var(--white) 4.5%, transparent);
    --color-shadow: color-mix(in oklch, var(--shadow-ink) 70%, transparent);

    --color-art-cam: var(--slate-800);
    --color-art-led: var(--led-green);
    --color-art-close: var(--traffic-red);
    --color-art-minimize: var(--traffic-amber);
    --color-art-zoom: var(--traffic-green);
    --color-art-titlebar: var(--ink-850);
    --color-art-nav-blue: var(--azure-700);
    --color-art-nav-violet: var(--grape-700);
    --color-art-chart-start: var(--sky-400);
    --color-art-chart-end: var(--blue-400);
    --color-art-chart-dot: var(--sky-400);
    --color-art-chart-peak: var(--amber-450);
    --color-art-cursor: var(--sky-400);

    --fill-bezel: linear-gradient(to bottom, var(--navy-500), var(--navy-950));
    --fill-screen: linear-gradient(to bottom, var(--navy-450), var(--navy-900));
    --fill-sidebar: linear-gradient(to bottom, var(--ink-700), var(--ink-900));
    --fill-minimap: linear-gradient(to bottom, var(--ink-750), var(--ink-850));
    --fill-rose: linear-gradient(to right, var(--rose-500), var(--rose-400));
    --fill-sky: linear-gradient(to right, var(--sky-400), var(--blue-400));
    --fill-slate: var(--slate-400);
    --fill-amber: linear-gradient(to right, var(--amber-500), var(--amber-400));
    --fill-violet: linear-gradient(to right, var(--violet-500), var(--violet-400));
    --fill-emerald: linear-gradient(
      to right,
      var(--emerald-500),
      var(--emerald-400)
    );
    --fill-comment: var(--steel-700);
    --fill-rose-muted: linear-gradient(
      to right,
      var(--rose-650),
      var(--rose-550)
    );
    --fill-emerald-muted: linear-gradient(
      to right,
      var(--emerald-650),
      var(--emerald-550)
    );
    --fill-bar: var(--slate-600);
    --fill-bar-dim: var(--slate-700);
    --fill-tile-violet: linear-gradient(
      135deg,
      var(--tile-violet-a),
      var(--tile-violet-b)
    );
    --fill-tile-blue: linear-gradient(
      135deg,
      var(--tile-blue-a),
      var(--tile-blue-b)
    );
    --fill-tile-emerald: linear-gradient(
      135deg,
      var(--tile-emerald-a),
      var(--tile-emerald-b)
    );
    --fill-tile-amber: linear-gradient(
      135deg,
      var(--tile-amber-a),
      var(--tile-amber-b)
    );
    --fill-button: linear-gradient(
      to right,
      var(--color-accent),
      var(--color-accent-strong)
    );

    --space-3xs: 0.25rem;
    --space-2xs: 0.375rem;
    --space-xs: 0.5rem;
    --space-s: 0.75rem;
    --space-m: 1rem;
    --space-l: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-section: clamp(4rem, 2.5rem + 6vw, 8rem);
    --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);

    --font-sans:
      ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial,
      sans-serif;
    --font-mono:
      ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, monospace;
    --text-xs: 0.75rem;
    --text-s: 0.875rem;
    --text-m: 1rem;
    --text-l: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
    --text-2xl: clamp(1.75rem, 1.25rem + 2.2vw, 2.75rem);
    --text-3xl: clamp(2.25rem, 1.2rem + 4.6vw, 4.75rem);
    --leading-tight: 1.08;
    --leading-snug: 1.3;
    --leading-normal: 1.6;
    --tracking-tight: -0.025em;
    --tracking-label: 0.14em;
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;

    --line-hairline: 1px;
    --line-thick: 2px;
    --radius-s: 0.5rem;
    --radius-m: 0.875rem;
    --radius-l: 1.5rem;
    --radius-pill: 999px;
    --shadow-card: 0 1.5rem 3rem -1.5rem var(--color-shadow);
    --shadow-device: 0 2.5rem 5rem -1.5rem var(--color-shadow);

    --size-target-min: 24px;
    --size-control: 2.75rem;
    --size-icon: 1.125rem;
    --measure-page: 76rem;
    --measure-text: 40rem;
    --measure-art: 70rem;
    --header-offset: 7.5rem;

    --z-header: 10;

    --motion-fast: 160ms;
    --ease-out: cubic-bezier(0.2, 0.8, 0.3, 1);
    --ease-pop: cubic-bezier(0.3, 1.5, 0.5, 1);
    --color-live: var(--rose-500);
    --color-caption-bg: color-mix(in oklch, var(--shadow-ink) 82%, transparent);
    --fill-hype: linear-gradient(
      to right,
      var(--emerald-500),
      var(--sky-400),
      var(--violet-500),
      var(--rose-500),
      var(--amber-400)
    );
    --loop-duration: 8s;

    --focus-ring-width: 2px;
    --focus-ring-offset: 3px;

    @media (width >= 48rem) {
      --header-offset: 5.5rem;
    }
  }

  @media (prefers-contrast: more) {
    :root {
      --color-line: var(--slate-600);
      --color-text-muted: var(--slate-100);
      --color-text-subtle: var(--slate-300);
    }
  }
}

@layer base {
  :root {
    color-scheme: dark;
    scroll-padding-block-start: var(--header-offset);
    scrollbar-gutter: stable;

    @media (prefers-reduced-motion: no-preference) {
      scroll-behavior: smooth;
    }
  }

  :root:has(:where(.keynote)) {
    scroll-snap-type: y proximity;
  }

  :root:has(:where(.motion-switch :checked)) {
    --motion-state: paused;
  }

  body {
    min-block-size: 100dvh;
    background-color: var(--color-page);
    background-image: radial-gradient(
      ellipse 90% 50rem at 50% -10rem,
      var(--color-page-glow),
      transparent 70%
    );
    background-repeat: no-repeat;
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--text-m);
    line-height: var(--leading-normal);
  }

  :is(h1, h2, h3) {
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    text-wrap: balance;
  }

  p,
  li,
  dd {
    text-wrap: pretty;
    overflow-wrap: break-word;
  }

  :where(a) {
    color: inherit;
    text-decoration-thickness: from-font;
    text-underline-offset: 0.2em;
  }

  :where(a, button, summary, [tabindex]):focus-visible {
    outline: var(--focus-ring-width) solid var(--color-focus);
    outline-offset: var(--focus-ring-offset);
  }
}

@layer layout {
  .wrap {
    inline-size: 100%;
    max-inline-size: calc(var(--measure-page) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  .section {
    padding-block: var(--space-section);

    &[data-flush="top"] {
      padding-block-start: 0;
    }
  }
}

@layer components {
  .skip-link {
    position: absolute;
    inset-block-start: var(--space-s);
    inset-inline-start: var(--space-s);
    z-index: calc(var(--z-header) + 1);
    padding: var(--space-xs) var(--space-m);
    border-radius: var(--radius-s);
    background: var(--color-text);
    color: var(--color-page);
    font-weight: var(--weight-semibold);
    translate: 0 -200%;

    &:focus-visible {
      translate: 0 0;
    }
  }

  .site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: var(--z-header);
    padding-block: calc(env(safe-area-inset-top, 0px) + var(--space-s))
      var(--space-s);
    padding-left: max(env(safe-area-inset-left, 0px), var(--gutter));
    padding-right: max(env(safe-area-inset-right, 0px), var(--gutter));
    background: var(--color-header);
    backdrop-filter: blur(14px) saturate(140%);
    border-block-end: var(--line-hairline) solid
      color-mix(in oklch, var(--color-line) 60%, transparent);

    & :where(.inner) {
      display: grid;
      grid-template-columns: 1fr auto;
      grid-template-areas: "brand cta" "nav nav";
      align-items: center;
      gap: var(--space-s) var(--space-m);
      max-inline-size: var(--measure-page);
      margin-inline: auto;

      @media (width >= 48rem) {
        grid-template-columns: 1fr auto 1fr;
        grid-template-areas: "brand nav cta";
      }
    }

    & :where(.brand) {
      grid-area: brand;
    }

    & :where(nav) {
      grid-area: nav;
    }

    & :where(nav ul) {
      display: flex;
      flex-wrap: wrap;
      gap: var(--space-3xs) clamp(var(--space-s), 2vw, var(--space-l));
      justify-content: center;

      @media (width < 48rem) {
        justify-content: space-between;
      }
    }

    & :where(nav a) {
      display: inline-flex;
      align-items: center;
      min-block-size: var(--size-control);
      color: var(--color-text-muted);
      font-size: clamp(var(--text-xs), 0.6rem + 0.8vw, var(--text-s));
      font-weight: var(--weight-medium);
      text-decoration: none;

      &[aria-current="page"] {
        color: var(--color-text);
      }

      @media (hover: hover) {
        &:hover {
          color: var(--color-text);
        }
      }
    }

    & :where([data-slot="header-cta"]) {
      grid-area: cta;
      justify-self: end;
    }

    & :where(.actions) {
      display: flex;
      align-items: center;
      gap: var(--space-xs);
    }
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    justify-self: start;
    color: var(--color-text);
    font-size: var(--text-l);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-tight);
    text-decoration: none;

    & :where(.mark) {
      display: grid;
      place-items: center;
      inline-size: 2rem;
      aspect-ratio: 1;
      border-radius: var(--radius-s);
      background: var(--fill-bezel);
      box-shadow: inset 0 0 0 var(--line-hairline) var(--color-line);
    }
  }

  .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    min-block-size: var(--size-control);
    padding-inline: var(--space-l);
    border: var(--line-hairline) solid var(--button-border, transparent);
    border-radius: var(--radius-pill);
    background: var(--button-fill, var(--fill-button));
    color: var(--button-ink, var(--color-text-on-accent));
    font-size: var(--text-s);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    white-space: nowrap;
    transition:
      translate var(--motion-fast) var(--ease-out),
      box-shadow var(--motion-fast) var(--ease-out);

    & :where(svg) {
      inline-size: var(--size-icon);
      block-size: var(--size-icon);
      flex: none;
    }

    &[data-variant="ghost"] {
      --button-fill: color-mix(in oklch, var(--color-text) 4%, transparent);
      --button-border: var(--color-line);
      --button-ink: var(--color-text);
    }

    &[data-size="compact"] {
      padding-inline: var(--space-m);
    }

    @media (hover: hover) {
      &:hover {
        translate: 0 -1px;
        box-shadow: 0 0.5rem 1.5rem -0.75rem var(--color-accent);
      }
    }
  }

  .motion-switch {
    position: relative;
    display: inline-grid;
    place-items: center;
    inline-size: var(--size-control);
    block-size: var(--size-control);
    border: var(--line-hairline) solid var(--color-line);
    border-radius: var(--radius-pill);
    background: color-mix(in oklch, var(--color-text) 4%, transparent);
    color: var(--color-text-muted);

    & :where(input) {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }

    & :where(svg) {
      grid-area: 1 / 1;
      inline-size: var(--size-icon);
      block-size: var(--size-icon);
    }

    & :where(.play) {
      display: none;
    }

    &:has(:checked) {
      color: var(--color-focus);

      & :where(.pause) {
        display: none;
      }

      & :where(.play) {
        display: block;
      }
    }

    &:has(:focus-visible) {
      outline: var(--focus-ring-width) solid var(--color-focus);
      outline-offset: var(--focus-ring-offset);
    }

    @media (hover: hover) {
      &:hover {
        color: var(--color-text);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      display: none;
    }
  }

  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-text-subtle);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
  }

  .badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-3xs) var(--space-s) var(--space-3xs) var(--space-xs);
    border: var(--line-hairline) solid var(--color-line);
    border-radius: var(--radius-pill);
    background: color-mix(in oklch, var(--color-surface) 70%, transparent);
    color: var(--color-text-muted);
    font-size: var(--text-s);

    & :where(strong) {
      color: var(--color-text);
      font-weight: var(--weight-semibold);
    }
  }

  .hero {
    padding-block: var(--space-3xl) var(--space-section);
    overflow-x: clip;

    & :where(.copy) {
      display: grid;
      justify-items: center;
      gap: var(--space-l);
      text-align: center;
    }

    & :where(h1) {
      max-inline-size: 20ch;
      font-size: var(--text-3xl);
    }

    & :where(h1 span) {
      display: block;
      background: linear-gradient(
        to right,
        var(--color-accent),
        var(--color-accent-strong)
      );
      background-clip: text;
      color: transparent;
    }

    & :where(.lede) {
      max-inline-size: var(--measure-text);
      color: var(--color-text-muted);
      font-size: var(--text-l);
    }

    & :where(.actions) {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: var(--space-s);
    }

    & :where(.fine) {
      color: var(--color-text-subtle);
      font-size: var(--text-s);
    }

    & :where([data-slot="hero-art"]) {
      margin-block-start: var(--space-3xl);
    }
  }

  .device {
    position: relative;
    font-size: calc(100cqi / 17.76);
    aspect-ratio: 1776 / 1161;
    border-radius: 0.64em;
    background: var(--fill-bezel);
    box-shadow: var(--shadow-device);

    &::before {
      content: "";
      position: absolute;
      inset-block-start: 0.13em;
      inset-inline-start: 8.88em;
      inline-size: 0.2em;
      aspect-ratio: 1;
      border-radius: 50%;
      background: var(--color-art-cam);
      box-shadow: 0.28em 0 0 -0.07em var(--color-art-led);
    }

    &::after {
      content: "";
      position: absolute;
      inset: 0.48em;
      border-radius: 0.42em;
      background: var(--color-glare);
      clip-path: polygon(0 0, 7.62em 0, 0 7.72em);
      pointer-events: none;
    }

    & :where(.screen) {
      position: absolute;
      inset: 0.48em;
      overflow: hidden;
      border-radius: 0.42em;
      background: var(--fill-screen);
    }

    & :where(.titlebar) {
      position: absolute;
      inset-block-start: 0;
      inset-inline: 0;
      block-size: 1.09em;
      background: var(--color-art-titlebar);

      &::before {
        content: "";
        position: absolute;
        inset-block-start: 0.405em;
        inset-inline-start: 0.54em;
        inline-size: 0.28em;
        aspect-ratio: 1;
        border-radius: 50%;
        background: var(--color-art-close);
        box-shadow:
          0.475em 0 0 var(--color-art-minimize),
          0.95em 0 0 var(--color-art-zoom);
      }
    }

    & :where(.sidebar) {
      --pill-unit: 0.068em;
      --pill-block-size: 0.12em;
      --pill-radius: 1em;

      position: absolute;
      inset-block: 1.09em 0;
      inset-inline-start: 0;
      inline-size: 1.64em;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.22em;
      padding: 0.55em 0.48em;
      background: var(--fill-sidebar);
    }

    & :where(.nav-tile) {
      inline-size: 0.68em;
      block-size: 0.47em;
      margin-block-end: 0.06em;
      border-radius: 0.08em;
      background: var(--color-art-nav-blue);

      &[data-tone="violet"] {
        margin-block-start: 0.35em;
        background: var(--color-art-nav-violet);
      }
    }

    & :where(.minimap) {
      --pill-unit: 0.034em;
      --pill-block-size: 0.08em;
      --pill-radius: 0.02em;
      --pill-opacity: 0.55;

      position: absolute;
      inset-block: 1.37em 0.43em;
      inset-inline-end: 0.21em;
      inline-size: 0.6em;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.09em;
      padding: 0.21em 0.1em;
      border-radius: 0.08em;
      background: var(--fill-minimap);
    }

    & :where([data-slot="device-editor"]) {
      position: absolute;
      inset-block-start: 1.47em;
      inset-inline-start: 2.87em;
    }

    & :where([data-slot="device-chart"]) {
      position: absolute;
      inset-block-start: 1.89em;
      inset-inline-start: 10.43em;
    }

    & :where([data-slot="device-kit"]) {
      position: absolute;
      inset-block-start: 6.33em;
      inset-inline-start: 9.75em;
    }
  }

  .pill {
    display: block;
    flex: none;
    inline-size: calc(var(--span, 4) * var(--pill-unit, 0.171em));
    block-size: var(--pill-block-size, 0.27em);
    border-radius: var(--pill-radius, 0.1em);
    background: var(--pill-fill, var(--fill-slate));
    opacity: var(--pill-opacity, 1);
    transform-origin: var(--pill-origin, 50% 50%);
    animation: var(--pill-motion, none);
    animation-delay: calc(var(--loop-shift, 0s) + var(--step, 0) * 120ms);
    animation-play-state: var(--motion-state, running);

    &[data-tone="rose"] {
      --pill-fill: var(--fill-rose);
    }

    &[data-tone="sky"] {
      --pill-fill: var(--fill-sky);
    }

    &[data-tone="amber"] {
      --pill-fill: var(--fill-amber);
    }

    &[data-tone="violet"] {
      --pill-fill: var(--fill-violet);
    }

    &[data-tone="emerald"] {
      --pill-fill: var(--fill-emerald);
    }

    &[data-tone="comment"] {
      --pill-fill: var(--fill-comment);
    }

    &[data-tone="rose-muted"] {
      --pill-fill: var(--fill-rose-muted);
    }

    &[data-tone="emerald-muted"] {
      --pill-fill: var(--fill-emerald-muted);
    }

    &[data-tone="bar"] {
      --pill-fill: var(--fill-bar);
    }

    &[data-tone="bar-dim"] {
      --pill-fill: var(--fill-bar-dim);
    }

    &[data-size="thin"] {
      --pill-block-size: 0.19em;
    }
  }

  .editor {
    display: grid;
    justify-items: start;
    row-gap: 0.275em;

    & :where(.line) {
      --line-step: 0;

      display: flex;
      align-items: flex-start;
      gap: 0.17em;
      padding-inline-start: calc(var(--indent, 0) * 0.545em);
      animation: line-type var(--editor-motion);
      animation-delay: calc(var(--loop-shift, 0s) + var(--line-step) * 180ms);
      animation-play-state: var(--motion-state, running);

      &[data-indent="1"] {
        --indent: 1;
      }

      &[data-indent="2"] {
        --indent: 2;
      }
    }

    & :where(.line:nth-child(2)) {
      --line-step: 1;
    }
    & :where(.line:nth-child(3)) {
      --line-step: 2;
    }
    & :where(.line:nth-child(4)) {
      --line-step: 3;
    }
    & :where(.line:nth-child(5)) {
      --line-step: 4;
    }
    & :where(.line:nth-child(6)) {
      --line-step: 5;
    }
    & :where(.line:nth-child(7)) {
      --line-step: 6;
    }
    & :where(.line:nth-child(8)) {
      --line-step: 7;
    }
    & :where(.line:nth-child(9)) {
      --line-step: 8;
    }
    & :where(.line:nth-child(10)) {
      --line-step: 9;
    }
    & :where(.line:nth-child(11)) {
      --line-step: 10;
    }
    & :where(.line:nth-child(12)) {
      --line-step: 11;
    }

    & :where(.cursor) {
      flex: none;
      inline-size: 0.28em;
      block-size: 0.34em;
      border-radius: 0.03em;
      background: var(--color-art-cursor);
      animation: blink var(--cursor-motion);
      animation-play-state: var(--motion-state, running);
    }

    &[data-size="mark"] {
      row-gap: 0.14em;
      font-size: 1rem;
    }
  }

  .chart-card {
    --pill-block-size: 0.41em;
    --pill-radius: 1em;

    position: relative;
    inline-size: 5em;
    block-size: 3.79em;
    border: 0.03em solid var(--color-line);
    border-radius: 0.36em;
    background: var(--color-surface-raised);

    & :where(.plot) {
      position: absolute;
      inset: -0.03em;
      inline-size: 5em;
      block-size: 3.79em;
      overflow: visible;
    }

    & :where(.plot) {
      animation: plot-fade var(--chart-motion);
    }

    & :where(.cover) {
      fill: var(--color-surface-raised);
      scale: 0 1;
      transform-origin: 100% 50%;
      animation: cover-sweep var(--chart-motion);
      animation-timing-function: linear;
    }

    & :where(.ring) {
      fill: none;
      stroke: var(--color-art-chart-peak);
      stroke-width: 4;
      opacity: 0;
      transform-origin: 50% 50%;
      animation: ring-pulse var(--chart-motion);
    }

    & :where(.trace) {
      fill: none;
      stroke-width: 8.5;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    & :where(.stop-start) {
      stop-color: var(--color-art-chart-start);
    }

    & :where(.stop-end) {
      stop-color: var(--color-art-chart-end);
    }

    & :where(.dot) {
      fill: var(--color-art-chart-dot);
      transform-origin: 50% 50%;
      animation: var(--dot-name) var(--chart-motion);

      &[data-peak] {
        fill: var(--color-art-chart-peak);
      }

      &[data-dot="1"] {
        --dot-name: dot-1;
      }

      &[data-dot="2"] {
        --dot-name: dot-2;
      }

      &[data-dot="3"] {
        --dot-name: dot-3;
      }

      &[data-dot="4"] {
        --dot-name: dot-4;
      }

      &[data-dot="5"] {
        --dot-name: dot-5;
      }
    }

    & :where(.legend) {
      position: absolute;
      inset-block-start: 2.79em;
      inset-inline-start: 0.4em;
      display: flex;
      gap: 0.21em;
      --pill-motion: legend-grow var(--chart-motion);
    }

    & :where(.plot, .cover, .dot, .ring) {
      transform-box: fill-box;
      animation-delay: var(--loop-shift, 0s);
      animation-play-state: var(--motion-state, running);
    }
  }

  .kit-card {
    --pill-unit: 0.171em;
    --pill-origin: 0 50%;
    --pill-motion: line-grow var(--kit-motion);
    --tile-motion: tile-hop var(--kit-motion);

    display: grid;
    align-content: start;
    justify-items: start;
    inline-size: 5.67em;
    block-size: 3.45em;
    padding: 0.5em;
    border: 0.04em solid var(--color-line-accent);
    border-radius: 0.36em;
    background: var(--color-surface);

    & :where(.tiles) {
      display: flex;
      gap: 0.27em;
      margin-block-end: 0.38em;
    }

    & :where(.pill + .pill) {
      margin-block-start: 0.21em;
    }

    &[data-size="glyph"] {
      font-size: 0.5em;
      block-size: auto;
    }
  }

  .tile {
    display: grid;
    place-items: center;
    flex: none;
    inline-size: var(--tile-size, 0.82em);
    aspect-ratio: 1;
    border-radius: var(--tile-radius, 0.18em);
    background: var(--tile-fill, var(--fill-tile-violet));
    color: var(--color-text);
    font-size: var(--tile-text, inherit);
    font-weight: var(--weight-bold);
    animation: var(--tile-motion, none);
    animation-delay: calc(var(--loop-shift, 0s) + var(--step, 0) * 100ms);
    animation-play-state: var(--motion-state, running);

    &[data-tone="blue"] {
      --tile-fill: var(--fill-tile-blue);
    }

    &[data-tone="emerald"] {
      --tile-fill: var(--fill-tile-emerald);
    }

    &[data-tone="amber"] {
      --tile-fill: var(--fill-tile-amber);
    }
  }

  .stage {
    container-type: inline-size;
    overflow: hidden;
    border: var(--line-hairline) solid var(--color-line);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-card);

    & :where(.scene) {
      position: relative;
      display: grid;
      place-items: center;
      font-size: calc(100cqi / var(--stage-ref, 6.2));
      padding: var(--stage-pad, 0.6em);
      background: var(--fill-screen);

      &::after {
        content: "";
        position: absolute;
        inset: 0;
        background: var(--color-glare);
        clip-path: polygon(0 0, 64% 0, 0 72%);
        pointer-events: none;
      }
    }

    &[data-scene="editor"] {
      --stage-ref: 7.47;
      --stage-pad: 0.8em;
    }

    &[data-scene="kit"] {
      --stage-ref: 6.87;
    }
  }

  .logos {
    display: grid;
    gap: var(--space-l);
    justify-items: center;
    padding-block: var(--space-2xl);
    border-block: var(--line-hairline) solid
      color-mix(in oklch, var(--color-line) 50%, transparent);

    & :where(h2) {
      color: var(--color-text-subtle);
      font-size: var(--text-s);
      font-weight: var(--weight-medium);
      letter-spacing: 0;
    }

    & :where(ul) {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: var(--space-m) var(--space-2xl);
    }

    & :where(li) {
      --tile-size: 1.25rem;
      --tile-radius: 0.375rem;

      display: inline-flex;
      align-items: center;
      gap: var(--space-xs);
      color: var(--color-text-muted);
      font-size: var(--text-l);
      font-weight: var(--weight-bold);
      letter-spacing: var(--tracking-tight);
    }
  }

  .section-head {
    display: grid;
    justify-items: center;
    gap: var(--space-m);
    margin-block-end: var(--space-3xl);
    text-align: center;

    & :where(h2) {
      max-inline-size: 22ch;
      font-size: var(--text-2xl);
    }

    & :where(p:not(.eyebrow)) {
      max-inline-size: var(--measure-text);
      color: var(--color-text-muted);
      font-size: var(--text-l);
    }

    &[data-align="start"] {
      justify-items: start;
      text-align: start;
    }
  }

  .feature-list {
    display: grid;
    gap: var(--space-section);
  }

  .feature {
    display: grid;
    gap: var(--space-xl);
    align-items: center;

    @media (width >= 56rem) {
      grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
      gap: var(--space-3xl);

      &[data-flip] {
        grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);

        & :where(.copy) {
          order: 1;
        }
      }
    }

    & :where(.copy) {
      display: grid;
      gap: var(--space-m);
      justify-items: start;
    }

    & :where(h3) {
      font-size: var(--text-2xl);
    }

    & :where(.copy > p:not(.eyebrow)) {
      color: var(--color-text-muted);
      font-size: var(--text-l);
    }

    & :where(.stage-frame) {
      display: grid;
      justify-items: center;
    }

    &[data-scene="chart"] {
      --stage-max: 30rem;
    }

    &[data-scene="kit"] {
      --stage-max: 34rem;
    }

    & :where(.stage-frame > *) {
      inline-size: 100%;
      max-inline-size: var(--stage-max, none);
    }
  }

  .checks {
    display: grid;
    gap: var(--space-xs);
    margin-block-start: var(--space-xs);

    & :where(li) {
      display: flex;
      gap: var(--space-xs);
      align-items: flex-start;
    }

    & :where(svg) {
      flex: none;
      inline-size: var(--size-icon);
      block-size: var(--size-icon);
      margin-block-start: 0.2em;
      color: var(--color-positive);
    }
  }

  .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    gap: var(--line-hairline);
    overflow: hidden;
    border: var(--line-hairline) solid var(--color-line);
    border-radius: var(--radius-l);
    background: var(--color-line);

    & :where(div) {
      display: grid;
      gap: var(--space-2xs);
      padding: var(--space-xl) var(--space-l);
      background: var(--color-surface);
    }

    & :where(dt) {
      color: var(--color-text-muted);
      font-size: var(--text-s);
    }

    & :where(dd) {
      order: -1;
      font-size: var(--text-2xl);
      font-weight: var(--weight-bold);
      letter-spacing: var(--tracking-tight);
      line-height: var(--leading-tight);
      font-variant-numeric: tabular-nums;
    }
  }

  .steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: var(--space-l);
    counter-reset: step;
  }

  .step {
    display: grid;
    align-content: start;
    gap: var(--space-s);
    padding: var(--space-xl);
    border: var(--line-hairline) solid var(--color-line);
    border-radius: var(--radius-l);
    background: var(--color-surface);
    counter-increment: step;

    & :where(.glyph) {
      display: grid;
      align-content: center;
      block-size: 9rem;
      margin-block-end: var(--space-s);
      padding-inline: var(--space-l);
      border-radius: var(--radius-m);
      background: var(--fill-screen);
      font-size: 3.2rem;
    }

    & :where(h3) {
      display: flex;
      align-items: baseline;
      gap: var(--space-s);
      font-size: var(--text-xl);

      &::before {
        content: counter(step, decimal-leading-zero);
        color: var(--color-accent);
        font-family: var(--font-mono);
        font-size: var(--text-s);
        letter-spacing: 0;
      }
    }

    & :where(p) {
      color: var(--color-text-muted);
    }
  }

  .quotes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: var(--space-l);
  }

  .quote {
    --tile-size: 2.75rem;
    --tile-radius: var(--radius-s);
    --tile-text: var(--text-s);

    display: grid;
    align-content: space-between;
    gap: var(--space-xl);
    padding: var(--space-xl);
    border: var(--line-hairline) solid var(--color-line);
    border-radius: var(--radius-l);
    background: var(--color-surface);

    & :where(blockquote) {
      font-size: var(--text-l);
      line-height: var(--leading-snug);
    }

    & :where(figcaption) {
      display: flex;
      align-items: center;
      gap: var(--space-s);
      color: var(--color-text-muted);
      font-size: var(--text-s);
    }

    & :where(cite) {
      display: block;
      color: var(--color-text);
      font-style: normal;
      font-weight: var(--weight-semibold);
    }
  }

  .cta {
    position: relative;
    display: grid;
    justify-items: center;
    gap: var(--space-l);
    overflow: hidden;
    padding: clamp(2.5rem, 1.5rem + 5vw, 5rem) var(--space-l);
    border: var(--line-hairline) solid var(--color-line-accent);
    border-radius: var(--radius-l);
    background:
      radial-gradient(
        ellipse 70% 120% at 50% 0%,
        color-mix(in oklch, var(--color-line-accent) 55%, transparent),
        transparent 70%
      ),
      var(--color-surface);
    text-align: center;

    & :where(h2) {
      max-inline-size: 18ch;
      font-size: var(--text-2xl);
    }

    & :where(p) {
      max-inline-size: var(--measure-text);
      color: var(--color-text-muted);
      font-size: var(--text-l);
    }

    & :where(.actions) {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: var(--space-s);
    }
  }

  .billing {
    display: inline-flex;
    gap: var(--space-3xs);
    padding: var(--space-3xs);
    border: var(--line-hairline) solid var(--color-line);
    border-radius: var(--radius-pill);
    background: var(--color-surface);

    & :where(label) {
      position: relative;
      display: inline-flex;
      align-items: center;
      gap: var(--space-xs);
      min-block-size: var(--size-control);
      padding-inline: var(--space-l);
      border-radius: var(--radius-pill);
      color: var(--color-text-muted);
      font-size: var(--text-s);
      font-weight: var(--weight-semibold);

      &:has(:checked) {
        background: var(--color-surface-raised);
        color: var(--color-text);
        box-shadow: inset 0 0 0 var(--line-hairline) var(--color-line);
      }

      &:has(:focus-visible) {
        outline: var(--focus-ring-width) solid var(--color-focus);
        outline-offset: var(--focus-ring-offset);
      }
    }

    & :where(input) {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }

    & :where(.save) {
      padding: 0 var(--space-xs);
      border-radius: var(--radius-pill);
      background: color-mix(in oklch, var(--color-positive) 18%, transparent);
      color: var(--color-positive);
      font-size: var(--text-xs);
    }
  }

  .plans {
    display: grid;
    justify-items: center;
    gap: var(--space-2xl);

    &:has(:where(input[value="yearly"]:checked)) {
      --show-monthly: none;
      --show-yearly: inline;
    }
  }

  .plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: var(--space-l);
    inline-size: 100%;
  }

  .plan {
    position: relative;
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    gap: var(--space-m);
    padding: var(--space-xl);
    border: var(--line-hairline) solid var(--plan-border, var(--color-line));
    border-radius: var(--radius-l);
    background: var(--plan-fill, var(--color-surface));

    &[data-featured] {
      --plan-border: var(--color-line-accent-strong);
      --plan-fill: linear-gradient(
        to bottom,
        color-mix(in oklch, var(--color-line-accent) 45%, var(--color-surface)),
        var(--color-surface) 60%
      );

      box-shadow: var(--shadow-card);
    }

    & :where(header) {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: var(--space-xs);
    }

    & :where(h3) {
      font-size: var(--text-xl);
    }

    & :where(.summary) {
      color: var(--color-text-muted);
    }

    & :where(.price) {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: var(--space-xs);
      color: var(--color-text-subtle);
      font-size: var(--text-s);
    }

    & :where(.amount) {
      color: var(--color-text);
      font-size: var(--text-3xl);
      font-weight: var(--weight-bold);
      letter-spacing: var(--tracking-tight);
      line-height: 1;
      font-variant-numeric: tabular-nums;
    }

    & :where([data-period="monthly"]) {
      display: var(--show-monthly, inline);
    }

    & :where([data-period="yearly"]) {
      display: var(--show-yearly, none);
    }

    & :where(.checks) {
      align-content: start;
      padding-block-start: var(--space-m);
      border-block-start: var(--line-hairline) solid var(--color-line);
      color: var(--color-text-muted);
      font-size: var(--text-s);
    }

    & :where(.flag) {
      padding: var(--space-3xs) var(--space-s);
      border-radius: var(--radius-pill);
      background: var(--fill-violet);
      color: var(--color-text-on-accent);
      font-size: var(--text-xs);
      font-weight: var(--weight-bold);
    }
  }

  .table-scroll {
    position: relative;
    overflow-x: auto;
    border: var(--line-hairline) solid var(--color-line);
    border-radius: var(--radius-l);
    background: var(--color-surface);
    scrollbar-color: var(--color-line) transparent;
  }

  .compare {
    inline-size: 100%;
    min-inline-size: 40rem;
    border-collapse: collapse;
    font-size: var(--text-s);
    font-variant-numeric: tabular-nums;

    & :where(th, td) {
      padding: var(--space-s) var(--space-l);
      border-block-end: var(--line-hairline) solid var(--color-line);
      text-align: start;
    }

    & :where(thead th) {
      color: var(--color-text);
      font-size: var(--text-m);
      background: var(--color-surface-raised);
    }

    & :where(tbody th) {
      color: var(--color-text-muted);
      font-weight: var(--weight-regular);
    }

    & :where(tbody tr:last-child > *) {
      border-block-end: 0;
    }

    & :where(svg) {
      inline-size: var(--size-icon);
      block-size: var(--size-icon);
      color: var(--color-positive);
    }

    & :where(.no) {
      color: var(--color-text-subtle);
    }
  }

  .faq {
    display: grid;
    gap: var(--space-s);
    max-inline-size: 48rem;
    margin-inline: auto;

    & :where(details) {
      border: var(--line-hairline) solid var(--color-line);
      border-radius: var(--radius-m);
      background: var(--color-surface);
    }

    & :where(summary) {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: var(--space-m);
      min-block-size: var(--size-control);
      padding: var(--space-m) var(--space-l);
      font-weight: var(--weight-semibold);
      list-style: none;

      &::-webkit-details-marker {
        display: none;
      }
    }

    & :where(summary svg) {
      flex: none;
      inline-size: var(--size-icon);
      block-size: var(--size-icon);
      color: var(--color-text-subtle);
      transition: rotate var(--motion-fast) var(--ease-out);
    }

    & :where(details[open] summary svg) {
      rotate: 45deg;
    }

    & :where(details p) {
      padding: 0 var(--space-l) var(--space-l);
      color: var(--color-text-muted);
    }
  }

  .page-head {
    display: grid;
    justify-items: center;
    gap: var(--space-l);
    padding-block: var(--space-3xl) var(--space-2xl);
    text-align: center;

    & :where(h1) {
      max-inline-size: 18ch;
      font-size: var(--text-3xl);
    }

    & :where(p:not(.eyebrow)) {
      max-inline-size: var(--measure-text);
      color: var(--color-text-muted);
      font-size: var(--text-l);
    }
  }

  .showcase {
    position: relative;
    container-type: inline-size;
    max-inline-size: var(--measure-art);
    margin-inline: auto;
  }

  .opening {
    display: grid;
    justify-items: center;
    gap: var(--space-l);
    padding-block: var(--space-3xl) var(--space-section);
    text-align: center;
    scroll-snap-align: start;

    & :where(h1) {
      font-size: var(--text-3xl);
    }

    & :where(.lede) {
      max-inline-size: var(--measure-text);
      color: var(--color-text-muted);
      font-size: var(--text-l);
    }

    & :where(.fine) {
      max-inline-size: var(--measure-text);
      color: var(--color-text-subtle);
      font-size: var(--text-s);
    }
  }

  .live {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-3xs) var(--space-s);
    border: var(--line-hairline) solid var(--color-live);
    border-radius: var(--radius-pill);
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;

    & :where(.beacon) {
      inline-size: 0.6rem;
      aspect-ratio: 1;
      border-radius: 50%;
      background: var(--color-live);
      animation: blink var(--cursor-motion);
      animation-play-state: var(--motion-state, running);
    }
  }

  .act-nav {
    & :where(ol) {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: var(--space-xs);
    }

    & :where(a) {
      display: inline-flex;
      align-items: center;
      min-block-size: var(--size-control);
      padding-inline: var(--space-m);
      border: var(--line-hairline) solid var(--color-line);
      border-radius: var(--radius-pill);
      color: var(--color-text-muted);
      font-size: var(--text-s);
      text-decoration: none;

      @media (hover: hover) {
        &:hover {
          border-color: var(--color-accent);
          color: var(--color-text);
        }
      }
    }
  }

  .act {
    display: grid;
    align-content: center;
    gap: var(--space-2xl);
    min-block-size: calc(100dvh - var(--header-offset));
    padding-block: var(--space-section);
    border-block-start: var(--line-hairline) solid
      color-mix(in oklch, var(--color-line) 50%, transparent);
    scroll-snap-align: start;

    & :where(header) {
      display: grid;
      justify-items: center;
      gap: var(--space-s);
      padding-inline: var(--gutter);
      text-align: center;
    }

    & :where(h2) {
      font-size: var(--text-3xl);
    }

    & :where(.body) {
      display: grid;
      gap: var(--space-xl);
      align-items: center;
      justify-items: center;

      @media (width >= 60rem) {
        grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
      }
    }

    & :where([data-slot="act-stage"]) {
      inline-size: 100%;
      max-inline-size: var(--act-stage-max, 36rem);
    }

    & :where(.notes) {
      display: grid;
      gap: var(--space-l);
      inline-size: 100%;
      max-inline-size: var(--measure-text);
    }

    &[data-scene="chart"] {
      --act-stage-max: 32rem;
    }

    &[data-scene="kit"] {
      --act-stage-max: 38rem;
    }
  }

  .captions {
    display: grid;
    gap: var(--space-s);
    padding: var(--space-l);
    border-radius: var(--radius-m);
    background: var(--color-caption-bg);
    box-shadow: inset 0 0 0 var(--line-hairline) var(--color-line);
    font-size: var(--text-l);
    line-height: var(--leading-snug);

    & :where(.speaker) {
      display: block;
      margin-block-end: var(--space-3xs);
      color: var(--color-accent);
      font-family: var(--font-mono);
      font-size: var(--text-xs);
      font-weight: var(--weight-bold);
      letter-spacing: var(--tracking-label);
      text-transform: uppercase;
    }

    & :where(.direction) {
      color: var(--color-text-subtle);
      font-style: italic;
    }
  }

  .act-stats {
    display: grid;
    gap: var(--line-hairline);
    overflow: hidden;
    border: var(--line-hairline) solid var(--color-line);
    border-radius: var(--radius-m);
    background: var(--color-line);
    font-size: var(--text-s);

    & :where(div) {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      gap: var(--space-3xs) var(--space-m);
      padding: var(--space-s) var(--space-m);
      background: var(--color-surface);
    }

    & :where(dt) {
      color: var(--color-text-muted);
    }

    & :where(dd) {
      font-weight: var(--weight-bold);
      font-variant-numeric: tabular-nums;
    }
  }

  .finale {
    display: grid;
    gap: var(--space-2xl);
    padding-block: var(--space-section);
    overflow-x: clip;
    border-block-start: var(--line-hairline) solid
      color-mix(in oklch, var(--color-line) 50%, transparent);
    scroll-snap-align: start;

    & :where(header) {
      display: grid;
      justify-items: center;
      gap: var(--space-s);
      text-align: center;
    }

    & :where(h2) {
      font-size: var(--text-3xl);
    }

    & :where(.lede) {
      color: var(--color-text-muted);
      font-size: var(--text-xl);
    }

    & :where(.closing) {
      display: grid;
      justify-items: center;
      gap: var(--space-xl);
    }

    & :where(.captions) {
      max-inline-size: var(--measure-text);
      text-align: center;
    }

    & :where(.actions) {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: var(--space-s);
    }
  }

  .hype {
    display: grid;
    gap: var(--space-xs);
    inline-size: min(100%, 24rem);

    & :where(p) {
      display: flex;
      justify-content: space-between;
      color: var(--color-text-muted);
      font-family: var(--font-mono);
      font-size: var(--text-xs);
      letter-spacing: var(--tracking-label);
      text-transform: uppercase;
    }

    & :where(strong) {
      color: var(--color-text);
    }

    & :where(.track) {
      block-size: 0.75rem;
      border-radius: var(--radius-pill);
      background: var(--color-surface-raised);
      box-shadow: inset 0 0 0 var(--line-hairline) var(--color-line);
    }

    & :where(.fill) {
      display: block;
      inline-size: 312%;
      block-size: 100%;
      border-radius: var(--radius-pill);
      background: var(--fill-hype);
      transform-origin: 0 50%;
      animation: hype-fill var(--kit-motion);
      animation-play-state: var(--motion-state, running);
    }
  }

  .site-footer {
    padding-block: var(--space-3xl)
      calc(var(--space-2xl) + env(safe-area-inset-bottom, 0px));
    border-block-start: var(--line-hairline) solid var(--color-line);
    background: var(--color-page-deep);
    color: var(--color-text-subtle);
    font-size: var(--text-s);

    & :where(.inner) {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
      gap: var(--space-xl);
    }

    & :where(.about) {
      display: grid;
      align-content: start;
      gap: var(--space-s);
    }

    & :where(h2) {
      margin-block-end: var(--space-xs);
      color: var(--color-text);
      font-size: var(--text-s);
      letter-spacing: 0;
    }

    & :where(ul a) {
      display: inline-flex;
      align-items: center;
      min-block-size: var(--size-target-min);
      text-decoration: none;

      @media (hover: hover) {
        &:hover {
          color: var(--color-text);
          text-decoration: underline;
        }
      }
    }

    & :where(.legal) {
      grid-column: 1 / -1;
      padding-block-start: var(--space-l);
      border-block-start: var(--line-hairline) solid var(--color-line);
    }
  }
}

@layer utilities {
  .visually-hidden {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  [data-step="1"] {
    --step: 1;
  }
  [data-step="2"] {
    --step: 2;
  }
  [data-step="3"] {
    --step: 3;
  }

  [data-shift="chart"] {
    --loop-shift: -2s;
  }
  [data-shift="kit"] {
    --loop-shift: -3.6s;
  }

  @media (prefers-reduced-motion: no-preference) {
    [data-motion="loop"] {
      --editor-motion: var(--loop-duration) var(--ease-out) infinite both;
      --chart-motion: var(--loop-duration) var(--ease-out) infinite both;
      --kit-motion: var(--loop-duration) var(--ease-out) infinite both;
      --cursor-motion: 1.1s steps(1) infinite;
    }
  }

  [data-span="3.5"] {
    --span: 3.5;
  }
  [data-span="4"] {
    --span: 4;
  }
  [data-span="5"] {
    --span: 5;
  }
  [data-span="6"] {
    --span: 6;
  }
  [data-span="6.5"] {
    --span: 6.5;
  }
  [data-span="7"] {
    --span: 7;
  }
  [data-span="8"] {
    --span: 8;
  }
  [data-span="9"] {
    --span: 9;
  }
  [data-span="10"] {
    --span: 10;
  }
  [data-span="11"] {
    --span: 11;
  }
  [data-span="12"] {
    --span: 12;
  }
  [data-span="13"] {
    --span: 13;
  }
  [data-span="14"] {
    --span: 14;
  }
  [data-span="16"] {
    --span: 16;
  }
  [data-span="17"] {
    --span: 17;
  }
  [data-span="18"] {
    --span: 18;
  }
  [data-span="22"] {
    --span: 22;
  }
  [data-span="28"] {
    --span: 28;
  }
}

@layer components {
  @keyframes line-type {
    0% {
      opacity: 0;
      translate: -0.3em 0;
    }
    4% {
      opacity: 1;
      translate: 0 0;
    }
    80% {
      opacity: 1;
    }
    88%,
    100% {
      opacity: 0;
    }
  }

  @keyframes blink {
    50% {
      opacity: 0;
    }
  }

  @keyframes plot-fade {
    0%,
    84% {
      opacity: 1;
    }
    92%,
    100% {
      opacity: 0;
    }
  }

  @keyframes cover-sweep {
    0%,
    28% {
      scale: 1 1;
    }
    46%,
    92% {
      scale: 0 1;
    }
    92.5%,
    100% {
      scale: 1 1;
    }
  }

  @keyframes dot-1 {
    0%,
    29% {
      scale: 0;
    }
    32% {
      scale: 1.45;
    }
    35%,
    100% {
      scale: 1;
    }
  }

  @keyframes dot-2 {
    0%,
    32.5% {
      scale: 0;
    }
    35.5% {
      scale: 1.45;
    }
    38.5%,
    100% {
      scale: 1;
    }
  }

  @keyframes dot-3 {
    0%,
    36% {
      scale: 0;
    }
    39% {
      scale: 1.45;
    }
    42%,
    100% {
      scale: 1;
    }
  }

  @keyframes dot-4 {
    0%,
    40% {
      scale: 0;
    }
    43% {
      scale: 1.7;
    }
    46%,
    100% {
      scale: 1;
    }
  }

  @keyframes dot-5 {
    0%,
    44.5% {
      scale: 0;
    }
    47.5% {
      scale: 1.45;
    }
    50.5%,
    100% {
      scale: 1;
    }
  }

  @keyframes ring-pulse {
    0%,
    46% {
      opacity: 0;
      scale: 1;
    }
    47% {
      opacity: 0.9;
      scale: 1;
    }
    58% {
      opacity: 0;
      scale: 2.8;
    }
    59% {
      opacity: 0;
      scale: 1;
    }
    60% {
      opacity: 0.9;
      scale: 1;
    }
    71%,
    100% {
      opacity: 0;
      scale: 2.8;
    }
  }

  @keyframes legend-grow {
    0%,
    45% {
      opacity: 0;
      scale: 0 1;
    }
    52% {
      opacity: 1;
      scale: 1 1;
    }
    84% {
      opacity: 1;
    }
    92%,
    100% {
      opacity: 0;
      scale: 1 1;
    }
  }

  @keyframes tile-hop {
    0%,
    48% {
      opacity: 0;
      scale: 0.3;
    }
    53% {
      opacity: 1;
      scale: 1.12;
    }
    56% {
      scale: 1;
    }
    66% {
      translate: 0 0;
      rotate: 0deg;
    }
    69% {
      translate: 0 -0.16em;
      rotate: -8deg;
    }
    72% {
      translate: 0 0;
      rotate: 0deg;
    }
    84% {
      opacity: 1;
      scale: 1;
    }
    92%,
    100% {
      opacity: 0;
      scale: 0.85;
    }
  }

  @keyframes hype-fill {
    0%,
    10% {
      scale: 0 1;
    }
    40%,
    88% {
      scale: 1 1;
    }
    100% {
      scale: 0 1;
    }
  }

  @keyframes line-grow {
    0%,
    55% {
      opacity: 0;
      scale: 0 1;
    }
    62% {
      opacity: 1;
      scale: 1 1;
    }
    74% {
      scale: 1 1;
    }
    77% {
      scale: 0.55 1;
    }
    81% {
      scale: 1 1;
    }
    84% {
      opacity: 1;
    }
    92%,
    100% {
      opacity: 0;
    }
  }
}

@layer overrides {
  @media (forced-colors: active) {
    .button,
    .billing :where(label:has(:checked)) {
      border: var(--line-hairline) solid CanvasText;
    }

    .stage,
    .device {
      forced-color-adjust: none;
    }
  }
}
