/* Wmux website. Colors follow the app's own palette (apps/desktop/src/index.css). */
:root {
  --bg: #0b0d12;
  --panel: #10131a;
  --elev: #171b24;
  --line: #212633;
  --line-strong: #2d3343;
  --fg: #e3e6ee;
  --muted: #9aa1b4;
  --faint: #6b7287;
  --accent: #7c8cff;
  --accent-ink: #0b0d12;
  --teal: #5eead4;
  --ok: #9ece6a;
  --warn: #e0af68;
  --radius: 12px;
  --ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, "SFMono-Regular", Menlo, monospace;
  --wrap: 1120px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 var(--ui);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
}

code,
kbd,
pre {
  font-family: var(--mono);
  font-size: 0.9em;
}
code {
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.1em 0.4em;
}
kbd {
  display: inline-block;
  min-width: 1.7em;
  text-align: center;
  background: var(--elev);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.05em 0.45em;
  color: var(--fg);
  font-size: 0.82em;
  white-space: nowrap;
}
pre {
  margin: 0;
  background: #0e1015;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.55;
  color: #cfd3de;
}
pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 1em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font: 600 18px var(--display);
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 28px;
  height: 28px;
}
.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  font-size: 14.5px;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--fg);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 10px;
  padding: 12px 20px;
  font: 600 15.5px var(--ui);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 84%, white);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
  background: var(--panel);
}
.btn-ghost:hover {
  border-color: var(--faint);
}
.btn-sm {
  padding: 8px 14px;
  font-size: 14px;
}
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover {
  color: var(--accent-ink);
}
.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

/* ----------------------------------------------------------------- hero */
.hero {
  position: relative;
  padding: 84px 0 0;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -200px 0 auto;
  height: 720px;
  background:
    radial-gradient(520px 320px at 30% 40%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(460px 300px at 72% 30%, color-mix(in srgb, var(--teal) 13%, transparent), transparent 70%);
  pointer-events: none;
}
.hero > .wrap {
  position: relative;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13.5px;
}
.pill:hover {
  color: var(--fg);
  text-decoration: none;
}
.pill b {
  color: var(--teal);
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(38px, 6.4vw, 68px);
  font-weight: 700;
  margin: 26px auto 0;
}
.hero h1 em {
  display: block;
  font-style: normal;
  color: var(--accent);
}
.lede {
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  max-width: 62ch;
  margin: 22px auto 0;
}
.cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
}
.cta-note {
  color: var(--faint);
  font-size: 13.5px;
  margin-top: 16px;
}

/* An app screenshot inside a soft frame. */
.shot {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 30px 90px rgb(0 0 0 / 0.6), 0 0 0 1px rgb(255 255 255 / 0.02) inset;
}
.shot img {
  width: 100%;
}
.hero .shot {
  margin: 60px auto 0;
  max-width: 1080px;
}

/* ------------------------------------------------------------- sections */
section {
  padding: 96px 0;
}
.eyebrow {
  color: var(--teal);
  font: 600 13px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-head {
  max-width: 62ch;
  margin-bottom: 44px;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin-top: 12px;
}
.section-head p {
  color: var(--muted);
  font-size: 17.5px;
  margin-top: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 14px;
}
.card p {
  color: var(--muted);
  font-size: 15px;
  margin-top: 8px;
}
.icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}
.icon svg {
  width: 20px;
  height: 20px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: 56px;
  align-items: center;
}
.split.flip > :first-child {
  order: 2;
}
.split h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 700;
  margin-top: 12px;
}
.split > div > p {
  color: var(--muted);
  font-size: 17px;
  margin-top: 16px;
}
.checks {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 18px;
}
.checks li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
}
.checks svg {
  width: 20px;
  height: 20px;
  color: var(--teal);
  margin-top: 3px;
}
.checks strong {
  display: block;
  font-weight: 600;
}
.checks span {
  color: var(--muted);
  font-size: 15px;
}
.fineprint {
  color: var(--faint);
  font-size: 13.5px;
  margin-top: 22px;
}

.band {
  background: var(--panel);
  border-block: 1px solid var(--line);
}

/* --------------------------------------------------------------- tables */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--faint);
  font: 600 12.5px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--panel);
}
tr:last-child td {
  border-bottom: 0;
}
td:first-child {
  white-space: nowrap;
}
.keys td:last-child {
  white-space: nowrap;
}

.callout {
  border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line));
  background: color-mix(in srgb, var(--warn) 7%, var(--panel));
  border-radius: var(--radius);
  padding: 16px 18px;
  color: #d6d0c2;
  font-size: 15px;
  margin-top: 20px;
}
.callout strong {
  color: var(--warn);
}
.callout.info {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
  color: #cdd2e6;
}
.callout.info strong {
  color: var(--accent);
}

.roadmap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 40px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.roadmap li {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 15.5px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.roadmap b {
  color: var(--fg);
  font-weight: 600;
}
.tag {
  flex: none;
  align-self: flex-start;
  font: 600 11.5px var(--mono);
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--faint);
  margin-top: 3px;
}
.tag.done {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 45%, var(--line));
}

.final {
  text-align: center;
}
.final h2 {
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 700;
}
.final p {
  color: var(--muted);
  font-size: 18px;
  margin: 16px auto 0;
  max-width: 52ch;
}

footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  color: var(--faint);
  font-size: 14px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
}
footer a {
  color: var(--muted);
}
footer .spacer {
  margin-left: auto;
}
footer p {
  flex-basis: 100%;
  max-width: 78ch;
}

/* ----------------------------------------------------------------- docs */
.docs {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 56px;
  padding: 44px 24px 96px;
  max-width: var(--wrap);
  margin: 0 auto;
}
.side {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  font-size: 14.5px;
}
.side h4 {
  font: 600 12px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 22px 0 8px;
}
.side h4:first-child {
  margin-top: 0;
}
.side a {
  display: block;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 7px;
  border-left: 2px solid transparent;
}
.side a:hover {
  color: var(--fg);
  background: var(--panel);
  text-decoration: none;
}
.side a.active {
  color: var(--fg);
  border-left-color: var(--accent);
  background: var(--panel);
}
.doc {
  min-width: 0;
  max-width: 760px;
}
.doc h1 {
  font-size: clamp(32px, 4.4vw, 42px);
  font-weight: 700;
}
.doc .intro {
  color: var(--muted);
  font-size: 18px;
  margin-top: 14px;
}
.doc h2 {
  font-size: 26px;
  font-weight: 700;
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.doc h3 {
  font-size: 18.5px;
  font-weight: 600;
  margin-top: 32px;
}
.doc p,
.doc ul,
.doc ol,
.doc pre,
.doc .table-scroll,
.doc .shot {
  margin-top: 16px;
}
.doc p,
.doc li {
  color: #c3c8d6;
}
.doc ul,
.doc ol {
  padding-left: 22px;
}
.doc li {
  margin-top: 7px;
}
.doc li::marker {
  color: var(--faint);
}
.doc strong {
  color: var(--fg);
}
.doc .shot {
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.5);
}
.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split,
  .split.flip {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .split.flip > :first-child {
    order: 0;
  }
  .docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .side {
    position: static;
    max-height: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--panel);
  }
}
@media (max-width: 640px) {
  .wrap,
  .docs {
    padding-left: 16px;
    padding-right: 16px;
  }
  .nav .wrap {
    gap: 14px;
  }
  .nav-links {
    gap: 14px;
  }
  .nav-links .hide-sm {
    display: none;
  }
  .hero {
    padding-top: 56px;
  }
  section {
    padding: 64px 0;
  }
  .grid,
  .roadmap {
    grid-template-columns: minmax(0, 1fr);
  }
  td:first-child {
    white-space: normal;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}

/* ------------------------------------------------------------ animation */
/* The `js` class is set in <head>, so content is only hidden for reveal when
   the script that reveals it is going to run. */
.js :where(.hero .wrap > *, .section-head, .card, .split > *, .table-scroll, .callout, .roadmap li, .final .wrap > *, section > .wrap > .fineprint) {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms);
}
.js .hero .shot {
  transform: perspective(1600px) rotateX(9deg) translateY(36px) scale(0.97);
  transform-origin: 50% 0;
  transition-duration: 1.1s;
}
.js .in:where(.hero .wrap > *, .section-head, .card, .split > *, .table-scroll, .callout, .roadmap li, .final .wrap > *, section > .wrap > .fineprint) {
  opacity: 1;
  transform: none;
}

/* Slow drift of the glow behind the hero. */
.hero::before {
  animation: drift 18s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  from {
    transform: translate3d(-3%, 0, 0) scale(1);
  }
  to {
    transform: translate3d(4%, 3%, 0) scale(1.1);
  }
}

/* A terminal caret after the headline. */
.hero h1 em::after {
  content: "";
  display: inline-block;
  width: 0.34em;
  height: 0.82em;
  margin-left: 0.12em;
  vertical-align: -0.06em;
  background: var(--accent);
  border-radius: 2px;
  animation: blink 1.15s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

.pill b::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--teal);
  vertical-align: 1px;
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 55%, transparent);
  }
  100% {
    box-shadow: 0 0 0 9px transparent;
  }
}

.card {
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--elev);
}
.card .icon {
  transition: transform 0.25s ease, background 0.25s ease;
}
.card:hover .icon {
  transform: scale(1.08) rotate(-4deg);
  background: color-mix(in srgb, var(--accent) 26%, transparent);
}
.split .shot {
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.45s ease, border-color 0.45s ease;
}
.split .shot:hover {
  transform: translateY(-6px) scale(1.012);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line-strong));
  box-shadow: 0 40px 110px rgb(0 0 0 / 0.7), 0 0 60px color-mix(in srgb, var(--accent) 14%, transparent);
}
.btn-primary {
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent);
}
.btn-primary:hover {
  box-shadow: 0 10px 34px color-mix(in srgb, var(--accent) 38%, transparent);
}
.btn svg {
  transition: transform 0.2s ease;
}
.btn:hover svg {
  transform: translateY(2px);
}
.roadmap li {
  transition-property: opacity, transform, padding-left;
}
.roadmap li:hover {
  padding-left: 6px;
}


/* ---------------------------------------------------------- interaction */
/* Top-of-page reading progress. */
.progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 30;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
  pointer-events: none;
}

/* Motion switch in the nav. Only shown when the script that runs it is there. */
.motion-toggle {
  display: none;
  align-items: center;
  gap: 7px;
  font: 500 13px var(--ui);
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  white-space: nowrap;
}
.js .motion-toggle {
  display: inline-flex;
}
.motion-toggle:hover {
  color: var(--fg);
  border-color: var(--faint);
}
.motion-toggle i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}
.calm .motion-toggle i {
  background: var(--faint);
  box-shadow: none;
}
.motion-toggle.nudge {
  color: var(--fg);
  border-color: var(--accent);
}

.nav-links a.active {
  color: var(--fg);
}

/* Pointer-reactive dots behind the hero. */
.hero-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mask-image: linear-gradient(#000 55%, transparent);
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
}

/* Headline words rise one after another. */
.hero h1 .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em) rotate(3deg);
  animation: word 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(var(--i) * 70ms + 150ms);
}
@keyframes word {
  to {
    opacity: 1;
    transform: none;
  }
}

/* The hero screenshot leans toward the pointer and catches a highlight. */
.hero .shot {
  position: relative;
}
.js .hero .shot.in {
  transform: perspective(1600px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.25s ease-out, opacity 0.7s ease;
}
.hero .shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, -30%), rgb(255 255 255 / 0.1), transparent 60%);
  pointer-events: none;
}

/* A strip of what runs inside Wmux, scrolling slowly. */
.marquee {
  overflow: hidden;
  padding: 26px 0 0;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: slide 38s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee span {
  font: 500 13.5px var(--mono);
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
}
.marquee span b {
  color: var(--teal);
  font-weight: 500;
}
@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}

/* Cards light up under the pointer. */
.card {
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover::before {
  opacity: 1;
}
.card > * {
  position: relative;
}

/* Keys press down when their row is hovered. */
kbd {
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.keys tr {
  transition: background 0.15s ease;
}
.keys tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.keys tbody tr:hover kbd {
  transform: translateY(2px);
  background: color-mix(in srgb, var(--accent) 24%, var(--elev));
  border-color: var(--accent);
  color: var(--fg);
}

/* ------------------------------------------------------------ live demos */
.demo {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: 0 30px 90px rgb(0 0 0 / 0.6);
  overflow: hidden;
  font-size: 13px;
}
.demo-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
}
.demo-bar img {
  width: 16px;
  height: 16px;
}
.demo-bar .grow {
  flex: 1;
}
.demo-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 12px var(--mono);
}
.demo-state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}
.demo[data-state="off"] .demo-state::before {
  background: var(--faint);
}
.demo[data-state="starting"] .demo-state::before {
  background: var(--warn);
}
.demo-body {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 300px;
}
.demo-pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.demo-pane + .demo-pane {
  border-left: 1px solid var(--line);
}
.demo-tab {
  padding: 6px 12px;
  font: 500 12px var(--mono);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  align-items: center;
  gap: 7px;
}
.demo-tab i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.demo-tab i.busy {
  animation: pulse 1.4s ease-out infinite;
}
.demo pre {
  border: 0;
  border-radius: 0;
  background: transparent;
  margin: 0;
  padding: 10px 12px;
  font: 12.5px/1.6 var(--mono);
  color: #c9cede;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  flex: 1;
  height: 268px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.demo pre > span {
  display: block;
  animation: line 0.25s ease-out;
}
@keyframes line {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}
.demo .old {
  color: var(--faint);
}
.demo .mark {
  color: var(--accent);
}
.demo .ok {
  color: var(--ok);
}
.demo .note {
  color: var(--teal);
}
.demo .prompt {
  color: var(--muted);
}
.demo-off {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
  background: #05060a;
  color: var(--faint);
  font: 14px var(--ui);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
}
.demo-off b {
  color: var(--muted);
  font: 600 17px var(--display);
}
.demo[data-state="off"] .demo-off,
.demo[data-state="starting"] .demo-off {
  opacity: 1;
  visibility: visible;
}
.demo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.demo-controls button {
  font: 600 13.5px var(--ui);
  border-radius: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  background: var(--elev);
  color: var(--fg);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, opacity 0.2s ease;
}
.demo-controls button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--accent);
}
.demo-controls button:disabled {
  opacity: 0.4;
  cursor: default;
}
.demo-controls button.go {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.demo-controls button.go:not(:disabled) {
  animation: beckon 1.8s ease-in-out infinite;
}
@keyframes beckon {
  50% {
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 0%, transparent), 0 0 22px color-mix(in srgb, var(--accent) 45%, transparent);
  }
}
.demo-hint {
  color: var(--faint);
  font-size: 12.5px;
  margin-left: auto;
}

/* A working copy of the command palette. */
.palette {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--elev);
  box-shadow: 0 30px 90px rgb(0 0 0 / 0.6);
  overflow: hidden;
}
.palette-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
}
.palette-input svg {
  width: 17px;
  height: 17px;
  flex: none;
}
.palette-input input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--fg);
  font: 15px var(--ui);
}
.palette-input input::placeholder {
  color: var(--faint);
}
.palette ul {
  list-style: none;
  margin: 0;
  padding: 6px;
  height: 292px;
  overflow: auto;
}
.palette li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14.5px;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
}
.palette li small {
  color: var(--faint);
  font: 12px var(--mono);
  width: 86px;
  flex: none;
}
.palette li .keysq {
  margin-left: auto;
  white-space: nowrap;
}
.palette li mark {
  background: none;
  color: var(--accent);
  font-weight: 600;
}
.palette li[aria-selected="true"] {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.palette li.ran {
  transform: scale(0.985);
  background: color-mix(in srgb, var(--teal) 22%, transparent);
}
.palette .empty {
  color: var(--faint);
  cursor: default;
}
.palette-foot {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 12.5px;
  min-height: 38px;
}
.palette-foot span {
  white-space: nowrap;
}
.palette-foot output {
  margin-left: auto;
  color: var(--teal);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dark and light screenshots behind one draggable divider. */
.compare {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgb(0 0 0 / 0.6);
  --pos: 50%;
  touch-action: pan-y;
}
.compare img {
  width: 100%;
  user-select: none;
  -webkit-user-drag: none;
}
.compare .top {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--pos));
}
.compare .handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--accent);
  pointer-events: none;
}
.compare .handle::after {
  content: "‹ ›";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 15px var(--ui);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.5);
}
.compare input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.compare .tagl,
.compare .tagr {
  position: absolute;
  bottom: 10px;
  font: 600 11.5px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.6);
  color: #fff;
  pointer-events: none;
}
.compare .tagl {
  left: 10px;
}
.compare .tagr {
  right: 10px;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.swatches button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--c);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.swatches button:hover {
  transform: scale(1.15);
}
.swatches button[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c);
}
@media (max-width: 640px) {
  .demo-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .demo-pane + .demo-pane {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .demo pre {
    height: 170px;
  }
  .demo-hint {
    margin-left: 0;
    width: 100%;
  }
  .motion-toggle span {
    display: none;
  }
  .palette li small {
    display: none;
  }
}

/* ----------------------------------------------------------- calm mode */
/* Set on <html> when motion is switched off: by the visitor with the switch
   in the nav, or by their system's reduced-motion setting until they choose.
   Everything is shown in its final state and nothing moves by itself. */
.calm *,
.calm *::before,
.calm *::after {
  animation: none !important;
  transition: none !important;
}
.calm {
  scroll-behavior: auto;
}
.calm.js :where(.hero .wrap > *, .section-head, .card, .split > *, .table-scroll, .callout, .roadmap li, .final .wrap > *, section > .wrap > .fineprint, .marquee),
.calm.js .hero .shot,
.calm .hero h1 .w {
  opacity: 1;
  transform: none;
}
.calm .card:hover,
.calm .card:hover .icon,
.calm .split .shot:hover,
.calm .btn:hover,
.calm .btn:hover svg,
.calm .keys tbody tr:hover kbd {
  transform: none;
}
.calm .hero-fx {
  display: none;
}
.calm .marquee {
  mask-image: none;
  -webkit-mask-image: none;
}
.calm .marquee-track {
  width: auto;
  flex-wrap: wrap;
  justify-content: center;
}
.calm .marquee-track [aria-hidden="true"] {
  display: none;
}
