/* Rehearsal website. Monochrome: near black and white, Inter for everything, a mono for labels and data.
   Dark is the default. Red appears only where it means risk. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-2: #171717;
  --surface-3: #1f1f1f;
  --text: #fafafa;
  --muted: #a3a3a3;
  --border: #232323;
  --border-strong: #3a3a3a;
  --primary: #fafafa;
  --primary-hover: #e4e4e4;
  --on-primary: #0a0a0a;
  --mark: #fafafa;
  --on-mark: #0a0a0a;
  --high: #ff7a6e;
  --high-bg: #2b1311;
  --mark-bg: #3d1a16; /* highlighted attack text: red, because it is the risk */
  --grid-line: rgb(255 255 255 / 0.045);
  --grid-lit: rgb(255 255 255 / 0.11);
  --glow: rgb(255 255 255 / 0.07);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 30px 80px rgb(0 0 0 / 0.6);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --max: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  /* code boxes stay dark in both themes */
  --code-bg: #0f0f0f;
  --code-bar: #141414;
  --code-text: #f2f2f2;
  --code-muted: #9c9c9c;
  --code-border: #262626;
  --code-hover: rgb(255 255 255 / 0.08);
  --code-ok: #fafafa;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f6f6;
  --surface-3: #ececec;
  --text: #0a0a0a;
  --muted: #5e5e5e;
  --border: #e8e8e8;
  --border-strong: #cfcfcf;
  --primary: #0a0a0a;
  --primary-hover: #262626;
  --on-primary: #ffffff;
  --mark: #0a0a0a;
  --on-mark: #ffffff;
  --high: #c4251a;
  --high-bg: #fdeceb;
  --mark-bg: #fbdcd8;
  --grid-line: rgb(0 0 0 / 0.05);
  --grid-lit: rgb(0 0 0 / 0.1);
  --glow: rgb(0 0 0 / 0.04);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 4px 16px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.05), 0 30px 70px rgb(0 0 0 / 0.14);
  color-scheme: light;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font);
  font-feature-settings: "cv11", "ss03";
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

h1,
h2 {
  letter-spacing: -0.045em;
  line-height: 1;
}

h1 {
  font-size: clamp(44px, 7vw, 92px);
}

h2 {
  font-size: clamp(32px, 4.4vw, 56px);
}

h3 {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

code,
pre,
.mono {
  font-family: var(--mono);
  font-size: 0.88em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--on-primary);
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(var(--max), 100% - 40px);
  margin-inline: auto;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  min-height: 72px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.035em;
  margin-right: auto;
}

.brand svg {
  width: 30px;
  height: 30px;
}

.mark-draft {
  stroke: var(--text);
}

.mark-live {
  fill: var(--mark);
}

.mark-tick {
  stroke: var(--on-mark);
}

/* The links sit together in one rounded bar; the last one is the call to action. */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition-property: background-color, color;
  transition-duration: 150ms;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface-3);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-3);
}

.site-nav .nav-cta {
  margin-left: 4px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}

.site-nav .nav-cta:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
}

.theme-toggle {
  display: none;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition-property: background-color, border-color, transform;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.js .theme-toggle {
  display: inline-grid;
}

.theme-toggle:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
}

.theme-toggle:active {
  transform: scale(0.96);
}

.theme-toggle svg {
  grid-area: 1 / 1;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The icon shows what a click switches to: the sun on the dark default, the moon on light. */
.theme-toggle .moon,
:root[data-theme="light"] .theme-toggle .sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle .moon {
  display: block;
}

@media (max-width: 860px) {
  .theme-toggle {
    order: 2;
  }
  .site-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  .site-nav a {
    padding: 0 10px;
    font-size: 13.5px;
  }
  .site-nav .nav-gh {
    display: none;
  }
  .site-nav .nav-cta {
    margin-left: 0;
  }
}

@media (max-width: 400px) {
  .site-nav a {
    padding: 0 7px;
  }
}

/* phones: Security and Docs stay in the footer so the bar keeps one row */
@media (max-width: 480px) {
  .site-nav .nav-more {
    display: none;
  }
}

/* ---------------------------------------------------------------- buttons */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition-property: transform, background-color, border-color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.button:hover {
  border-color: var(--text);
  background: var(--surface-2);
}

.button:active {
  transform: scale(0.97);
}

.button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}

.button.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.button svg {
  width: 17px;
  height: 17px;
}

/* ---------------------------------------------------------------- sections */

.section {
  padding-block: clamp(72px, 10vw, 128px);
  border-top: 1px solid var(--border);
}

.section.tinted {
  background: var(--surface);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 400 12px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 20px;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--text);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 28px;
}

.pill b {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 999px;
  padding: 2px 10px;
  font: 400 11.5px/1.6 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  .pill-extra {
    display: none;
  }
}

.lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 62ch;
  margin-top: 22px;
}

.section-head {
  max-width: 800px;
  margin-bottom: 52px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head.center .lead {
  margin-inline: auto;
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding-block: clamp(56px, 8vw, 104px) clamp(64px, 8vw, 96px);
  overflow: hidden;
  isolation: isolate;
}

/* a faint engineering grid behind the headline, fading out towards the edges */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 20%, #000 30%, transparent 80%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: -20% 10% auto;
  height: 70%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, var(--glow), transparent 70%);
}

/* a stage light drifting over the grid: it brightens only the lines it passes, like a lamp crossing a stage floor */
.hero-light {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-lit) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-lit) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(closest-side, #000, transparent);
  mask-size: 720px 460px;
  mask-repeat: no-repeat;
  mask-position: 10% 0%;
  animation: stage-light 24s ease-in-out infinite alternate;
}

@keyframes stage-light {
  50% {
    mask-position: 62% 22%;
  }
  100% {
    mask-position: 92% 2%;
  }
}

.hero h1 {
  max-width: 15ch;
  font-size: clamp(44px, 7.4vw, 96px);
  letter-spacing: -0.05em;
}

/* under the headline: what it is on the left, what to do on the right */
.hero-grid {
  display: grid;
  gap: 28px clamp(32px, 6vw, 80px);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: end;
  margin-top: clamp(28px, 4vw, 44px);
}

.hero .lead {
  margin-top: 0;
}

.hero-actions {
  justify-self: end;
}

.hero-note {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--muted);
}

@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-actions {
    justify-self: start;
  }
}

.window {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
}

.hero-window {
  margin-top: clamp(44px, 6vw, 72px);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--muted);
}

.window-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.window-bar span {
  margin-left: 10px;
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window img {
  width: 100%;
}

/* the hero's numbers: one row of figures between hairlines (two classes, to outrank .stats further down) */
.stats.hero-stats {
  margin-top: clamp(40px, 5vw, 64px);
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  background: transparent;
}

.hero-stats .stat {
  padding: 28px 24px 28px 0;
}

.hero-stats .stat:last-child {
  border-right: 0;
}

.hero-stats .stat dd {
  font-size: clamp(32px, 3.4vw, 46px);
  white-space: nowrap;
}

.hero-stats .stat + .stat {
  padding-left: 24px;
}

@media (max-width: 1020px) {
  .hero-stats .stat,
  .hero-stats .stat + .stat {
    padding: 24px 20px;
  }
}

/* ---------------------------------------------------------------- film */

/* a black band in both themes, so the film reads the same */
.film-section {
  --text: #fafafa;
  --muted: #a3a3a3;
  --border: #232323;
  background: radial-gradient(55% 50% at 50% 0%, rgb(255 255 255 / 0.08), transparent 70%), #050505;
  color: var(--text);
}

.film-section .eyebrow::before {
  background: #fafafa;
}

.film {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.6);
  overflow: hidden;
}

.film video {
  display: block;
  width: 100%;
  height: 100%;
}

/* covers the poster until the film first plays; the browser's own controls take over from there */
.film-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fafafa;
  font: inherit;
  cursor: pointer;
}

.film-play[hidden] {
  display: none;
}

/* sized with the poster, so it always sits in the poster's clear centre; the whole poster is the tap target */
.film-play-icon {
  display: grid;
  place-items: center;
  width: clamp(40px, 8.5%, 88px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.96);
  color: #0a0a0a;
  box-shadow: 0 10px 36px rgb(0 0 0 / 0.5), 0 0 0 10px rgb(255 255 255 / 0.12);
  transition: transform 150ms ease-out;
}

.film-play-icon svg {
  width: 40%;
  height: 40%;
  margin-left: 7%;
}

.film-play:hover .film-play-icon {
  transform: scale(1.06);
}

.film-play:active .film-play-icon {
  transform: scale(0.97);
}

.film-play:focus-visible {
  outline: none;
}

.film-play:focus-visible .film-play-icon {
  outline: 3px solid #fafafa;
  outline-offset: 6px;
}

.film-len {
  position: absolute;
  right: 14px;
  bottom: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgb(0 0 0 / 0.7);
  font: 600 12.5px/1.4 var(--mono);
}

.film-note {
  margin-top: 18px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

@media (max-width: 600px) {
  .film-play-icon {
    box-shadow: 0 6px 20px rgb(0 0 0 / 0.5), 0 0 0 5px rgb(255 255 255 / 0.12);
  }
  .film-len {
    right: 8px;
    bottom: 8px;
    padding: 2px 6px;
    font-size: 11px;
  }
}

/* ---------------------------------------------------------------- tour */

.tour {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.tour li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

/* step numbers are small mono tiles: 01, 02, ... */
.tour .num,
.steps .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  font: 400 14px/1 var(--mono);
}

.tour .num::before,
.steps .num::before {
  content: "0";
}

.tour p,
.card p {
  color: var(--muted);
  margin-top: 8px;
}

/* ---------------------------------------------------------------- cards and grids */

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: border-color 200ms ease;
}

.card:hover {
  border-color: var(--border-strong);
}

.section.tinted .card,
.section.tinted .tour li {
  background: var(--bg);
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  color: var(--text);
  margin-bottom: 22px;
}

.icon-tile svg {
  width: 21px;
  height: 21px;
}

.icon-tile.risk {
  border-color: transparent;
  background: var(--high-bg);
  color: var(--high);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps .num {
  margin-bottom: 22px;
}

/* ---------------------------------------------------------------- stats */

.stats {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.stat {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0 -1px -1px 0;
}

.stat dd {
  margin: 0;
  font-size: clamp(38px, 4.2vw, 56px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat dt {
  order: 2;
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 14px;
  max-width: 30ch;
}

.stat.risk dd {
  color: var(--high);
}

/* ---------------------------------------------------------------- split, quote, lists */

.split {
  display: grid;
  gap: clamp(32px, 6vw, 80px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  align-items: center;
}

.quote {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 28px;
  box-shadow: var(--shadow);
  font-size: 15.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.quote mark {
  background: var(--mark-bg);
  color: inherit;
  border-radius: 4px;
  padding: 1px 3px;
}

.quote footer {
  margin-top: 16px;
  font: 400 12.5px/1.5 var(--mono);
  color: var(--muted);
  white-space: normal;
}

.checklist {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.checklist li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
}

.checklist svg {
  width: 19px;
  height: 19px;
  margin-top: 4px;
  color: var(--text);
}

/* ---------------------------------------------------------------- code, diagram, tables */

/* A code box: a bar with what the code is and a copy button, then the code. The bar keeps the button
   clear of the code at every width. */
.code {
  margin: 16px 0 0;
  min-width: 0;
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  background: var(--code-bg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 4px 6px 4px 18px;
  background: var(--code-bar);
  border-bottom: 1px solid var(--code-border);
}

.code-label {
  color: var(--code-muted);
  font: 400 12.5px/1.2 var(--mono);
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

pre {
  margin: 0;
  padding: 18px 20px 20px;
  color: var(--code-text);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
  tab-size: 2;
}

pre code {
  font-size: inherit;
}

/* On phones, wrap long commands so all of them is visible; the copy button gives the exact text. */
@media (max-width: 560px) {
  pre {
    padding: 16px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}

pre .comment {
  color: var(--code-muted);
}

.copy {
  display: none;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--code-muted);
  font: 500 13.5px/1 var(--font);
  cursor: pointer;
  transition-property: background-color, color, transform;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.js .copy {
  display: inline-flex;
}

.copy:hover {
  background: var(--code-hover);
  color: var(--code-text);
}

.copy:active {
  transform: scale(0.96);
}

.copy:focus-visible {
  outline-color: var(--code-ok);
  outline-offset: 0;
}

.copy svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy .i-check,
.copy[data-copied] .i-copy {
  display: none;
}

.copy[data-copied] .i-check {
  display: block;
}

.copy[data-copied] {
  color: var(--code-ok);
}

:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}

.diagram {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 3vw, 32px);
  overflow-x: auto;
}

.diagram svg {
  min-width: 640px;
  width: 100%;
}

.diagram .box {
  fill: var(--surface-2);
  stroke: var(--border-strong);
}

.diagram .box-brand {
  fill: var(--surface-3);
  stroke: var(--text);
}

.diagram .box-live {
  fill: var(--surface);
  stroke: var(--text);
  stroke-width: 1.6;
}

.diagram text {
  fill: var(--text);
  font-family: var(--font);
  font-size: 14px;
}

.diagram .small {
  fill: var(--muted);
  font-size: 12px; /* the labels were placed for a proportional font, so not the mono */
}

.diagram .arrow {
  stroke: var(--muted);
  stroke-width: 1.6;
  fill: none;
  marker-end: url(#arrowhead);
}

.diagram .arrow-brand {
  stroke: var(--text);
}

.diagram .dashed {
  stroke-dasharray: 5 4;
}

.diagram #arrowhead path {
  fill: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--surface-2);
  font: 400 12px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

tbody tr:last-child td {
  border-bottom: 0;
}

td.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* the comparison: one approach per row, Rehearsal's row lifted out */
table.compare tbody th {
  background: transparent;
  color: var(--text);
  font: 600 15px/1.5 var(--font);
  letter-spacing: -0.01em;
  text-transform: none;
  white-space: nowrap;
}

table.compare td {
  color: var(--muted);
}

table.compare tbody tr:last-child th {
  border-bottom: 0;
}

table.compare tr.ours th,
table.compare tr.ours td {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 500;
}

@media (max-width: 640px) {
  table.compare tbody th {
    display: block;
    padding: 6px 16px 2px;
    border: 0;
  }
}

.section.tinted .table-wrap {
  background: var(--bg);
}

.gallery-note {
  max-width: 780px;
  margin: 20px auto 0;
  text-align: center;
  color: var(--muted);
}

/* On phones a table of four columns becomes one card per row, each value with its label. */
@media (max-width: 640px) {
  table.stack thead {
    display: none;
  }
  table.stack,
  table.stack tbody,
  table.stack tr,
  table.stack td {
    display: block;
    width: 100%;
  }
  table.stack tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }
  table.stack tr:last-child {
    border-bottom: 0;
  }
  table.stack td {
    padding: 4px 16px;
    border: 0;
    white-space: normal;
  }
  table.stack td::before {
    content: attr(data-label);
    display: block;
    font: 400 11.5px/1.6 var(--mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

/* ---------------------------------------------------------------- faq */

.faq {
  max-width: 840px;
  margin-inline: auto;
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  padding: 22px 0;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font: 400 22px/1 var(--mono);
  color: var(--muted);
  transition: transform 150ms ease-out;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding: 0 0 22px;
  color: var(--muted);
  max-width: 68ch;
}

/* ---------------------------------------------------------------- closing band */

.band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-lg);
  padding: clamp(44px, 7vw, 88px);
  text-align: center;
}

.band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(color-mix(in srgb, var(--on-primary) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--on-primary) 7%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(60% 70% at 50% 50%, #000, transparent 85%);
}

.band h2 {
  color: var(--on-primary);
}

.band p {
  color: color-mix(in srgb, var(--on-primary) 72%, transparent);
  max-width: 56ch;
  margin: 18px auto 0;
  font-size: 18px;
}

.band .cta-row {
  justify-content: center;
  margin-top: 32px;
}

.band .button {
  background: var(--on-primary);
  color: var(--primary);
  border-color: var(--on-primary);
}

.band .button.ghost {
  background: transparent;
  color: var(--on-primary);
  border-color: color-mix(in srgb, var(--on-primary) 40%, transparent);
}

/* ---------------------------------------------------------------- inner pages */

.page-head {
  padding-block: clamp(56px, 8vw, 104px) 8px;
}

.page-head h1 {
  font-size: clamp(44px, 6vw, 76px);
}

.breadcrumb {
  font: 400 12.5px/1.4 var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 22px;
}

/* long text keeps a readable measure, lined up with the page heading on the left */
.prose > * {
  max-width: 760px;
}

/* a wide table between two runs of text */
.wrap.prose + .wrap {
  margin-top: 22px;
}

.prose h2 {
  margin-top: 64px;
  margin-bottom: 16px;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.035em;
}

.prose h3 {
  margin-top: 32px;
  margin-bottom: 8px;
}

.prose p,
.prose ul,
.prose ol {
  margin-top: 14px;
}

.prose li + li {
  margin-top: 8px;
}

.note {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 15px;
}

.hero-cta-gap {
  margin-top: 32px;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 48px 64px;
  color: var(--muted);
  font-size: 14.5px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 48px;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer .brand {
  font-size: 19px;
  margin-bottom: 8px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--text);
}

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