/* A2UI for Elixir: the landing page's styles. Light or dark as the system
   asks, or as the visitor picks ([data-theme]). */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* The icons A2UI surfaces use (Icon draws Material Symbols ligatures):
   a subset holding the ones the replays show. */
@font-face {
  font-family: "Material Symbols Outlined";
  src: url("fonts/MaterialSymbolsOutlined-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #fafafb;
  --panel: #ffffff;
  --panel-2: #f7f7f9;
  --line: #e9e9ef;
  --line-2: #dadae2;
  --cross: #b4b4c2;
  --text: #0a0a10;
  --text-2: #33333f;
  --muted: #646475;
  --faint: #9696a6;
  --accent: #6d28d9;
  --accent-2: #0891b2;
  --accent-soft: rgba(109, 40, 217, 0.07);
  --accent-line: rgba(109, 40, 217, 0.28);
  --on-accent: #ffffff;
  --green: #059669;
  --green-soft: rgba(5, 150, 105, 0.1);
  --red: #dc2626;
  --grad: linear-gradient(92deg, #6d28d9 0%, #4f46e5 38%, #0891b2 78%);
  --button-bg: #0a0a10;
  --button-text: #ffffff;
  --grid: rgba(10, 10, 16, 0.055);
  --dot: rgba(10, 10, 16, 0.13);
  --beam: rgba(109, 40, 217, 0.55);
  --glow: rgba(124, 58, 237, 0.13);
  --glow-2: rgba(8, 145, 178, 0.1);
  --spot: rgba(109, 40, 217, 0.05);
  --chip: #f4f4f7;
  --code-inline: rgba(109, 40, 217, 0.06);
  --code-inline-text: #5b21b6;
  --header-bg: rgba(255, 255, 255, 0.8);
  --surface-card: #ffffff;
  --field: #fafafb;
  --skeleton-1: rgba(10, 10, 16, 0.05);
  --skeleton-2: rgba(10, 10, 16, 0.1);
  --shadow: 0 1px 2px rgba(10, 10, 16, 0.04), 0 8px 24px -12px rgba(10, 10, 16, 0.12);
  --shadow-lg: 0 2px 4px rgba(10, 10, 16, 0.03), 0 40px 80px -30px rgba(46, 16, 101, 0.28);
  --pkg-core: #6d28d9;
  --pkg-phoenix: #c2410c;
  --pkg-agent: #0e7490;
  --sun-display: none;
  --moon-display: block;

  /* Code stays dark in both themes. */
  --code-bg: #0b0b10;
  --code-bar: #111118;
  --code-line: rgba(255, 255, 255, 0.08);
  --code-text: #e6e6ee;
  --code-muted: #8a8a9c;
  --code-gutter: #454556;
  --t-s: #a7f3d0;
  --t-c: #6c6c80;
  --t-a: #f0abfc;
  --t-k: #c4b5fd;
  --t-m: #7dd3fc;
  --t-n: #fcd34d;
  --t-o: #a1a1b5;

  --frame: 1240px;
  --pad: 48px;
  --header-h: 64px;
  --radius: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #09090b;
    --bg-soft: #0c0c0f;
    --panel: #0e0e12;
    --panel-2: #121217;
    --line: #1d1d24;
    --line-2: #2a2a33;
    --cross: #4a4a58;
    --text: #ededf2;
    --text-2: #c6c6d1;
    --muted: #8f8f9f;
    --faint: #5f5f6e;
    --accent: #a78bfa;
    --accent-2: #22d3ee;
    --accent-soft: rgba(167, 139, 250, 0.1);
    --accent-line: rgba(167, 139, 250, 0.35);
    --on-accent: #0b0b10;
    --green: #34d399;
    --green-soft: rgba(52, 211, 153, 0.12);
    --red: #f87171;
    --grad: linear-gradient(92deg, #c4b5fd 0%, #a5b4fc 38%, #67e8f9 80%);
    --button-bg: #ededf2;
    --button-text: #09090b;
    --grid: rgba(255, 255, 255, 0.05);
    --dot: rgba(255, 255, 255, 0.12);
    --beam: rgba(167, 139, 250, 0.75);
    --glow: rgba(124, 58, 237, 0.2);
    --glow-2: rgba(8, 145, 178, 0.14);
    --spot: rgba(167, 139, 250, 0.07);
    --chip: #15151b;
    --code-inline: rgba(167, 139, 250, 0.1);
    --code-inline-text: #d8ccff;
    --header-bg: rgba(9, 9, 11, 0.78);
    --surface-card: #131318;
    --field: #0f0f14;
    --skeleton-1: rgba(255, 255, 255, 0.05);
    --skeleton-2: rgba(255, 255, 255, 0.1);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 40px 90px -30px rgba(76, 29, 149, 0.45);
    --pkg-core: #c4b5fd;
    --pkg-phoenix: #fdba74;
    --pkg-agent: #67e8f9;
    --sun-display: block;
    --moon-display: none;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b;
  --bg-soft: #0c0c0f;
  --panel: #0e0e12;
  --panel-2: #121217;
  --line: #1d1d24;
  --line-2: #2a2a33;
  --cross: #4a4a58;
  --text: #ededf2;
  --text-2: #c6c6d1;
  --muted: #8f8f9f;
  --faint: #5f5f6e;
  --accent: #a78bfa;
  --accent-2: #22d3ee;
  --accent-soft: rgba(167, 139, 250, 0.1);
  --accent-line: rgba(167, 139, 250, 0.35);
  --on-accent: #0b0b10;
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.12);
  --red: #f87171;
  --grad: linear-gradient(92deg, #c4b5fd 0%, #a5b4fc 38%, #67e8f9 80%);
  --button-bg: #ededf2;
  --button-text: #09090b;
  --grid: rgba(255, 255, 255, 0.05);
  --dot: rgba(255, 255, 255, 0.12);
  --beam: rgba(167, 139, 250, 0.75);
  --glow: rgba(124, 58, 237, 0.2);
  --glow-2: rgba(8, 145, 178, 0.14);
  --spot: rgba(167, 139, 250, 0.07);
  --chip: #15151b;
  --code-inline: rgba(167, 139, 250, 0.1);
  --code-inline-text: #d8ccff;
  --header-bg: rgba(9, 9, 11, 0.78);
  --surface-card: #131318;
  --field: #0f0f14;
  --skeleton-1: rgba(255, 255, 255, 0.05);
  --skeleton-2: rgba(255, 255, 255, 0.1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 40px 90px -30px rgba(76, 29, 149, 0.45);
  --pkg-core: #c4b5fd;
  --pkg-phoenix: #fdba74;
  --pkg-agent: #67e8f9;
  --sun-display: block;
  --moon-display: none;
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(124, 58, 237, 0.25);
}

svg {
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.15;
  text-wrap: balance;
}

code,
pre,
.mono {
  font-family: var(--font-mono);
  font-variant-ligatures: none;
}

:not(pre) > code {
  padding: 0.1em 0.38em;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--code-inline);
  color: var(--code-inline-text);
  font-size: 0.86em;
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

main:focus {
  outline: none;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.icon-sm {
  width: 15px;
  height: 15px;
}

.icon-xs {
  width: 12px;
  height: 12px;
}

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

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

.mini-label {
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--frame);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  text-decoration: none;
}

.logo {
  width: 26px;
  height: 26px;
}

.brand-name {
  font-size: 1.06rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.brand-tag {
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font: 500 12px/1.2 var(--font-mono);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.site-nav a {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
  background: var(--chip);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.version-badge {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 500 12px/1 var(--font-mono);
  text-decoration: none;
}

a.version-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.icon-button:hover {
  color: var(--text);
  border-color: var(--line-2);
}

.theme-icon-sun {
  display: var(--sun-display);
}

.theme-icon-moon {
  display: var(--moon-display);
}

.menu-toggle {
  display: none;
}

html:not(.js) .theme-toggle,
html:not(.js) .copy,
html:not(.js) .install-copy,
html:not(.js) .demo-replay {
  display: none;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), box-shadow 0.2s, background-color 0.2s, border-color 0.2s;
}

.button-sm {
  height: 34px;
  padding: 0 14px;
  font-size: 0.86rem;
}

.button-primary {
  background: var(--button-bg);
  color: var(--button-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(76, 29, 149, 0.55);
}

.button-secondary {
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--accent-line);
  transform: translateY(-1px);
}

/* The frame: two rails down the page, crossed by each section's top line. */

.frame {
  position: relative;
  max-width: var(--frame);
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.band,
.sec {
  position: relative;
  border-top: 1px solid var(--line);
}

.sec::before,
.sec::after,
.band::before,
.band::after {
  content: "";
  position: absolute;
  top: -6px;
  z-index: 2;
  width: 11px;
  height: 11px;
  background: linear-gradient(var(--cross), var(--cross)) center / 1px 100% no-repeat,
    linear-gradient(var(--cross), var(--cross)) center / 100% 1px no-repeat;
}

.sec::before,
.band::before {
  left: -6px;
}

.sec::after,
.band::after {
  right: -6px;
}

.sec {
  padding: 96px var(--pad) 0;
}

.sec > :last-child:not(.cells):not(.table-wrap) {
  margin-bottom: 96px;
}

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: end;
  gap: 24px 56px;
  margin-bottom: 56px;
}

.sec-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sec-label::after {
  content: "";
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}

.sec-num {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  letter-spacing: 0;
}

.sec-head h2,
.cta h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 620;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.sec-lead {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
  text-wrap: pretty;
}

/* Cells: full-width grids whose lines meet the rails. */

.cells {
  display: grid;
  gap: 1px;
  margin: 0 calc(-1 * var(--pad));
  padding: 0;
  border-top: 1px solid var(--line);
  background: var(--line);
  list-style: none;
}

.cells-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cells-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cell {
  position: relative;
  min-width: 0;
  padding: 32px;
  background: var(--bg);
  isolation: isolate;
}

.cell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, -40%), var(--spot), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.cell:hover::before {
  opacity: 1;
}

.span-2 {
  grid-column: span 2;
}

.cell-text {
  color: var(--text-2);
  font-size: 0.9375rem;
}

.tile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.tile-head h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tile-title p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.875rem;
}

.tile-meta {
  margin-left: auto;
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.tile-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  color: var(--accent);
  box-shadow: var(--shadow);
}

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

.list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 1.5px;
  background: var(--accent);
  opacity: 0.75;
  transform: rotate(45deg);
}

.list code {
  white-space: normal;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--text-2);
  font: 500 12px/1.3 var(--font-mono);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}

.package-tag {
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  background: color-mix(in srgb, currentColor 8%, transparent);
  font: 500 12px/1.4 var(--font-mono);
}

.pkg-core {
  color: var(--pkg-core);
}

.pkg-phoenix {
  color: var(--pkg-phoenix);
}

.pkg-agent {
  color: var(--pkg-agent);
}

.step-num {
  align-self: flex-start;
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font: 500 12px/1 var(--font-mono);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px var(--pad) 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 22%, #000 35%, transparent 80%);
  mask-image: radial-gradient(ellipse 75% 60% at 50% 22%, #000 35%, transparent 80%);
}

.hero-glow {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 1100px;
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side at 40% 50%, var(--glow), transparent),
    radial-gradient(closest-side at 65% 55%, var(--glow-2), transparent);
}

.beam {
  position: absolute;
  top: -160px;
  width: 1px;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--beam), transparent);
  animation: beam-down 7s linear infinite;
}

.beam-1 {
  left: calc(48px * 4 - 1px);
}

.beam-2 {
  left: calc(48px * 13 - 1px);
  animation-delay: 2.4s;
  animation-duration: 9s;
}

.beam-3 {
  left: calc(48px * 21 - 1px);
  animation-delay: 4.6s;
}

.beam-h {
  top: calc(48px * 4 - 1px);
  left: -200px;
  width: 200px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--beam), transparent);
  animation: beam-right 10s linear 1.2s infinite;
}

@keyframes beam-down {
  to {
    transform: translateY(1400px);
  }
}

@keyframes beam-right {
  to {
    transform: translateX(1700px);
  }
}

.hero-copy {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--text-2);
  font-size: 0.875rem;
  text-decoration: none;
  transition: border-color 0.2s;
}

.status-chip:hover {
  border-color: var(--accent-line);
}

.status-chip .mono {
  font-size: 0.78rem;
}

.status-sep {
  width: 1px;
  height: 14px;
  background: var(--line-2);
}

.hero h1 {
  margin-top: 28px;
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.055em;
}

.cursor {
  display: inline-block;
  width: 0.08em;
  height: 0.82em;
  margin-left: 0.06em;
  vertical-align: -0.04em;
  background: var(--accent-2);
  animation: blink 1.1s steps(1) infinite;
}

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

.hero-lead {
  max-width: 660px;
  margin: 26px auto 0;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.install-line {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  box-shadow: var(--shadow);
  font-size: 0.86rem;
}

.install-label {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-right: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
}

.install-line .install-code {
  padding: 9px 12px;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text);
  font-size: 0.84rem;
}

.install-copy {
  display: inline-grid;
  place-items: center;
  align-self: stretch;
  width: 36px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.install-copy:hover,
.install-copy.is-copied {
  color: var(--text);
  background: var(--panel-2);
}

.install-copy.is-copied {
  color: var(--green);
}

/* Editor windows */

.ide {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}

.ide-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.dots {
  display: inline-flex;
  flex: none;
  gap: 6px;
}

.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-2);
}

.ide-title {
  margin: 0 auto;
  color: var(--muted);
  font: 500 12px/1 var(--font-mono);
}

.ide-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font: 500 12px/1 var(--font-mono);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.ide-button:hover {
  color: var(--text);
  border-color: var(--line-2);
}

.ide-tabs {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 10px 0 0;
  border-bottom: 1px solid var(--line);
}

.ide-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: stretch;
  padding: 0 14px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font: 500 12px/1 var(--font-mono);
}

.ide-tab.is-active {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.ide-tab-meta {
  margin-left: auto;
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
}

.ide-status {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 28px;
  padding: 0 12px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font: 500 12px/1 var(--font-mono);
}

.ide-status > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.ide-status .status-dot {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.ide-status-end {
  margin-left: auto;
  gap: 12px !important;
}

/* The hero's demo */

.demo {
  --step: 65ms;
  --start: 450ms;
  --done: calc(var(--lines) * var(--step) + var(--start));
  position: relative;
  max-width: 1100px;
  margin: 64px auto 0;
}

.demo.is-reset *,
.demo.is-reset *::before,
.demo.is-reset *::after {
  animation: none !important;
}

.demo-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.demo-code {
  min-width: 0;
  background: var(--code-bg);
  color: var(--code-text);
}

.demo-code .ide-tabs {
  border-bottom-color: var(--code-line);
  background: var(--code-bar);
}

.demo-code .ide-tab {
  border-right-color: var(--code-line);
  color: var(--code-text);
}

.demo-code .ide-tab-meta {
  color: var(--code-muted);
}

.stream-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  overflow: hidden;
}

.stream-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #22d3ee);
  transform-origin: left;
  animation: grow calc(var(--lines) * var(--step)) linear var(--start) both;
}

.demo-code pre {
  margin: 0;
  padding: 16px 16px 20px 0;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}

.demo-code .line {
  display: block;
  min-height: 1.7em;
  white-space: pre;
  animation: line-in 0.45s var(--ease) both;
  animation-delay: calc(var(--i) * var(--step) + var(--start));
}

.ln {
  display: inline-block;
  width: 3.4em;
  padding-right: 1.4em;
  color: var(--code-gutter);
  text-align: right;
  -webkit-user-select: none;
  user-select: none;
}

.demo-preview {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--line);
  background: var(--bg-soft);
}

.status {
  display: grid;
  margin-left: auto;
  font: 500 12px/1 var(--font-mono);
}

.status > * {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.status-wait {
  color: var(--muted);
  animation: fade-out 0.3s ease var(--done) both;
}

.status-done {
  color: var(--green);
  animation: fade-in 0.4s ease var(--done) both;
}

.status-valid {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  animation: fade-in 0.4s ease var(--done) both;
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1s ease-in-out infinite;
}

.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  flex: 1;
  padding: 28px 24px;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 16px 16px;
  background-position: 8px 8px;
}

.skeleton {
  position: absolute;
  inset: 28px 24px;
  display: grid;
  align-content: center;
  gap: 12px;
  max-width: 340px;
  margin: 0 auto;
  pointer-events: none;
  animation: fade-out 0.35s ease var(--done) both;
}

.skeleton i {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--skeleton-1), var(--skeleton-2), var(--skeleton-1));
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

.skeleton i:nth-child(1) {
  width: 50%;
  height: 20px;
}

.skeleton i:nth-child(2),
.skeleton i:nth-child(4) {
  width: 28%;
}

.skeleton i:nth-child(3),
.skeleton i:nth-child(5) {
  height: 38px;
}

.surface {
  width: 100%;
  max-width: 340px;
  padding: 22px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface-card);
  box-shadow: var(--shadow-lg);
  animation: surface-in 0.6s var(--ease) var(--done) both;
}

.surface-title {
  margin-bottom: 16px;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 550;
}

.field input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 0.93rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.surface-button {
  width: 100%;
  height: 40px;
  margin-top: 6px;
  border: 0;
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--button-text);
  font: inherit;
  font-size: 0.93rem;
  font-weight: 550;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s;
}

.surface-button:hover {
  box-shadow: 0 8px 18px -8px rgba(76, 29, 149, 0.55);
}

.surface-button:active {
  transform: translateY(1px);
}

.preview-foot {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  font: 400 12px/1.5 var(--font-mono);
}

.preview-foot .mini-label {
  margin-bottom: 8px;
}

.data-model {
  display: grid;
  gap: 3px;
  margin: 0;
}

.data-model div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.data-model dt {
  color: var(--muted);
}

.data-model dd {
  margin: 0;
  overflow: hidden;
  color: var(--accent);
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: fade-in 0.4s ease var(--done) both;
}

.sent {
  margin-top: 12px;
  animation: fade-up 0.35s var(--ease) both;
}

.sent[hidden] {
  display: none;
}

.sent pre {
  margin: 0;
  padding: 10px 12px;
  overflow-x: auto;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--t-s);
  font-size: 12px;
  line-height: 1.6;
}

.flash {
  animation: flash 0.7s ease;
}

@keyframes line-in {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes surface-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

@keyframes flash {
  from {
    background-color: rgba(124, 58, 237, 0.22);
  }
}

/* The video: a poster that becomes YouTube's player when played. */

.video-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: center;
  padding: 72px var(--pad);
}

.video-copy h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 620;
  letter-spacing: -0.04em;
}

.video-lead {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.65;
  text-wrap: pretty;
}

.video-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  color: var(--accent);
  font-weight: 550;
  text-decoration: none;
}

.video-link:hover {
  text-decoration: underline;
}

.video-player {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--code-bg);
  box-shadow: var(--shadow-lg);
}

.video-player img,
.video-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 12px 32px -8px rgba(76, 29, 149, 0.7);
  transform: translate(-50%, -50%);
  transition: transform 0.2s var(--ease);
}

.video-play .icon {
  width: 30px;
  height: 30px;
  margin-left: 4px;
  fill: currentColor;
}

.video-player:hover .video-play,
.video-player:focus-visible .video-play {
  transform: translate(-50%, -50%) scale(1.08);
}

.video-duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 12px;
}

@media (max-width: 900px) {
  .video-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 56px var(--pad);
  }
}

/* Standards and figures */

.standards {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  background: var(--line);
  list-style: none;
}

.standards li {
  display: grid;
  gap: 4px;
  padding: 18px 16px;
  background: var(--bg);
  text-align: center;
}

.standard-name {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.standard-note {
  color: var(--faint);
  font: 500 12px/1.3 var(--font-mono);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 22px 26px;
  background: var(--bg);
}

.metric-key {
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 8px;
  font-size: clamp(1.375rem, 2vw, 1.625rem);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.metric-label {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.metric-bar {
  position: relative;
  height: 3px;
  margin-top: auto;
  border-radius: 2px;
  background: var(--line);
}

.metric-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.metric-bar b {
  position: absolute;
  top: -3px;
  width: 1px;
  height: 9px;
  background: var(--text);
}

.metric-label + .metric-bar {
  margin-top: 14px;
}

/* Architecture */

.system {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "agent wire renderer"
    "core core core";
  align-items: center;
  gap: 44px 0;
  margin-bottom: 56px;
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background-color: var(--bg-soft);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 18px 18px;
}

.sys-node {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.sys-agent {
  grid-area: agent;
}

.sys-renderer {
  grid-area: renderer;
}

.sys-node::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 45px;
  background: repeating-linear-gradient(to bottom, var(--accent-line) 0 4px, transparent 4px 8px);
}

.sys-kicker {
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sys-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font: 600 1rem/1.3 var(--font-mono);
  letter-spacing: -0.02em;
}

.sys-name .icon {
  color: var(--accent);
}

.sys-modules {
  display: grid;
  gap: 4px;
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px dashed var(--line-2);
  list-style: none;
  color: var(--muted);
  font: 400 12px/1.4 var(--font-mono);
}

.sys-modules li::before {
  content: "› ";
  color: var(--faint);
}

.sys-wire {
  grid-area: wire;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 0 18px;
}

.wire-label {
  color: var(--muted);
  font: 500 12px/1.3 var(--font-mono);
  text-align: center;
}

.wire-track {
  position: relative;
  width: 100%;
  height: 1px;
  overflow: hidden;
  background: var(--line-2);
}

.wire-track i {
  position: absolute;
  top: 0;
  left: -30%;
  width: 30%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
  animation: packet-right 2.6s linear infinite;
}

.wire-track i:nth-child(2) {
  animation-delay: 0.85s;
}

.wire-track i:nth-child(3) {
  animation-delay: 1.7s;
}

.wire-back i {
  left: 100%;
  background: linear-gradient(270deg, transparent, var(--accent-2));
  animation-name: packet-left;
  animation-duration: 3.2s;
}

.wire-back i:nth-child(2) {
  animation-delay: 1.6s;
}

@keyframes packet-right {
  to {
    left: 100%;
  }
}

@keyframes packet-left {
  to {
    left: -30%;
  }
}

.wire-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wire-chips li {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  font: 500 12px/1 var(--font-mono);
}

.sys-core {
  grid-area: core;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 18px 20px;
  border-radius: 10px;
  border: 1px solid var(--accent-line);
  background: linear-gradient(90deg, var(--accent-soft), transparent 60%), var(--panel);
  box-shadow: var(--shadow);
}

.sys-core .sys-name {
  margin-top: 0;
}

.sys-modules-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.sys-note {
  width: 100%;
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
}

.package {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.package .tile-head {
  margin-bottom: 0;
}

.package h3.mono {
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
}

.module-chips .mini-label {
  margin-bottom: 10px;
}

.dep-line {
  display: flex;
  align-items: stretch;
  margin-top: auto;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--code-line);
  background: var(--code-bg);
}

.dep-line code {
  flex: 1;
  padding: 9px 12px;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--code-text);
  font-size: 0.78rem;
}

.dep-line .install-copy {
  border-left-color: var(--code-line);
  color: var(--code-muted);
}

.dep-line .install-copy:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.harness {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 32px;
}

.harness p {
  color: var(--muted);
  font-size: 0.9375rem;
}

.harness strong {
  margin-right: 8px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
}

/* Lifecycle */

.lanes {
  display: grid;
  grid-template-columns: 4fr 2fr;
  gap: 16px;
  margin-bottom: 18px;
}

.lane {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.04em;
}

.lane span {
  color: var(--text-2);
}

.lane::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}

.lane-renderer span {
  color: var(--pkg-phoenix);
}

.lane-agent span {
  color: var(--pkg-agent);
}

.steps {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  counter-reset: step;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 22px 24px;
}

.step + .step::after {
  content: "";
  position: absolute;
  top: 31px;
  left: -6px;
  width: 11px;
  height: 11px;
  border-top: 1px solid var(--line-2);
  border-right: 1px solid var(--line-2);
  background: var(--bg);
  transform: rotate(45deg);
}

.step h3 {
  margin-top: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.step p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.step-module {
  margin-top: auto;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: var(--faint) !important;
  font-size: 0.75rem !important;
  white-space: normal !important;
}

.step-agent .step-num {
  border-color: color-mix(in srgb, var(--pkg-agent) 40%, transparent);
  color: var(--pkg-agent);
}

.step-renderer .step-num {
  border-color: color-mix(in srgb, var(--pkg-phoenix) 40%, transparent);
  color: var(--pkg-phoenix);
}

/* Features */

.bento {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tile {
  display: flex;
  flex-direction: column;
}

.tile > .tags {
  margin-top: auto;
  padding-top: 20px;
}

.tile.span-2.has-visual {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "body viz"
    "tags viz";
  align-items: start;
  column-gap: 32px;
}

.tile.span-2.has-visual .tile-body {
  grid-area: body;
}

.tile.span-2.has-visual .viz {
  grid-area: viz;
}

.tile.span-2.has-visual > .tags {
  grid-area: tags;
  align-self: end;
}

.tile.span-1.has-visual .viz {
  margin-top: 22px;
}

.viz {
  min-width: 0;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background-color: var(--bg-soft);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 14px 14px;
  font: 400 12px/1.5 var(--font-mono);
}

.viz-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.viz-caption .bad {
  color: var(--red);
}

.viz-messages {
  overflow-x: auto;
}

.matrix {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden;
}

.matrix th,
.matrix td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 400;
}

.matrix thead th {
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.matrix tbody tr:last-child th,
.matrix tbody tr:last-child td {
  border-bottom: 0;
}

.matrix tbody th code {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 12px;
}

.matrix .mark {
  width: 46px;
  text-align: center;
}

.matrix .yes {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green);
}

.matrix .no {
  color: var(--faint);
}

.from {
  font-size: 12px;
}

.from-agent {
  color: var(--pkg-agent);
}

.from-renderer {
  color: var(--pkg-phoenix);
}

.binding {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.binding + .binding {
  margin-top: 6px;
}

.binding-value {
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: var(--text-2) !important;
  font-size: 12px !important;
  white-space: normal !important;
  word-break: break-word;
}

.binding-result {
  color: var(--green);
}

.seq {
  position: relative;
  padding: 4px 0 2px;
}

.seq::before,
.seq::after {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--line-2) 0 3px, transparent 3px 6px);
}

.seq::before {
  left: 30px;
}

.seq::after {
  right: 22px;
}

.seq-heads {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: 12px;
}

.seq-heads span {
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background: var(--panel);
}

.seq-row {
  position: relative;
  display: grid;
  gap: 2px;
  margin: 0 22px 8px 30px;
  padding-top: 2px;
}

.seq-label {
  justify-self: center;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: var(--text-2) !important;
  font-size: 12px !important;
}

.seq-arrow {
  position: relative;
  height: 1px;
  background: var(--accent);
}

.to-renderer .seq-arrow {
  background: var(--accent-2);
}

.seq-arrow::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}

.to-agent .seq-arrow::after {
  right: 0;
  transform: rotate(45deg);
}

.to-renderer .seq-arrow::after {
  left: 0;
  border-color: var(--accent-2);
  transform: rotate(-135deg);
}

.chunks {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chunk {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.chunk-num {
  grid-row: span 2;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chunk-text {
  overflow: hidden;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

.chunk-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.part {
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
}

.part::before {
  content: "✓ ";
}

.part-text {
  border-color: var(--line-2);
  background: var(--chip);
  color: var(--muted);
}

.part-text::before {
  content: "¶ ";
}

.tree,
.nodes {
  margin: 0;
  padding: 4px 0;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line);
  list-style: none;
}

.tree li {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 6px 10px 6px 26px;
}

.tree li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-2);
}

.tree li:last-child::before {
  bottom: 50%;
}

.tree li::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--line-2);
}

.tree-key {
  color: var(--accent);
}

.tree-value {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.tree-value b {
  margin-right: 6px;
  color: var(--text);
  font-weight: 600;
}

.node {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 10px 5px calc(12px + var(--depth) * 18px);
  white-space: nowrap;
}

.node + .node::before {
  content: "";
  position: absolute;
  left: calc(4px + var(--depth) * 18px);
  top: 0;
  width: 7px;
  height: 50%;
  border-left: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}

.node-type {
  color: var(--text);
  font-weight: 500;
}

.node-id {
  color: var(--faint);
}

.node-shows {
  overflow: hidden;
  margin-left: auto;
  color: var(--green);
  text-overflow: ellipsis;
}

.viz-error {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
}

.viz-pane {
  min-width: 0;
  padding: 12px;
  border-radius: 10px;
  background: var(--code-bg);
  color: var(--code-text);
}

.viz-pane .viz-caption {
  color: var(--code-muted);
}

.viz-pane pre {
  margin: 0;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.6;
}

.viz-pane pre.wrap {
  white-space: pre-wrap;
  word-break: break-word;
}

.t-err {
  text-decoration: underline wavy #f87171;
  text-underline-offset: 3px;
}

/* Catalog */

.components {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.component {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 24px 12px 18px;
  text-align: center;
  transition: background-color 0.2s;
}

.wireframe {
  width: 64px;
  height: 40px;
  margin-bottom: 10px;
  color: var(--muted);
  transition: color 0.2s, transform 0.3s var(--ease);
}

.component:hover .wireframe {
  color: var(--accent);
  transform: translateY(-2px);
}

.component-name {
  font: 500 12.5px/1.2 var(--font-mono);
}

.component-kind {
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fn-table {
  display: grid;
  margin: 0;
}

.fn-table div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.fn-table div:last-child {
  border-bottom: 0;
}

.fn-table dt {
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fn-table dd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  margin: 0;
}

.fn-table code {
  padding: 3px 7px;
  border-color: var(--line);
  background: var(--chip);
  color: var(--text);
  font-size: 0.78rem;
}

.fn-note {
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
}

.catalogs-side .tile-head-sub {
  margin-top: 26px;
}

.mcp-version {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.version-tag {
  flex: none;
  padding: 4px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 600 12px/1.2 var(--font-mono);
}

/* Transports */

.table-wrap {
  margin: 0 calc(-1 * var(--pad));
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table th,
.spec-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.spec-table th:first-child,
.spec-table td:first-child {
  padding-left: var(--pad);
}

.spec-table th:last-child,
.spec-table td:last-child {
  padding-right: var(--pad);
}

.spec-table thead th {
  padding-top: 12px;
  padding-bottom: 12px;
  background: var(--bg-soft);
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spec-table tbody tr {
  transition: background-color 0.15s;
}

.spec-table tbody tr:hover {
  background: var(--bg-soft);
}

.transport-name {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.spec-table td {
  color: var(--text-2);
  font-size: 0.9375rem;
}

.spec-table td code {
  white-space: normal;
}

.spec-table .where {
  white-space: nowrap;
}

.format {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.format .tile-head {
  margin-bottom: 0;
}



/* Code panels */

.code-panel {
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--code-line);
  background: var(--code-bg);
  color: var(--code-text);
}

.code-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 8px 0 12px;
  border-bottom: 1px solid var(--code-line);
  background: var(--code-bar);
}

.code-head .dots i {
  width: 9px;
  height: 9px;
  background: rgba(255, 255, 255, 0.13);
}

.code-title {
  overflow: hidden;
  color: var(--code-text);
  font: 500 12px/1 var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-lang {
  margin-left: auto;
  color: var(--code-muted);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.04em;
}

.copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--code-line);
  background: transparent;
  color: var(--code-muted);
  font: 500 12px/1 var(--font-mono);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.copy:hover,
.copy.is-copied {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.code-body {
  display: flex;
  min-width: 0;
}

.gutter {
  flex: none;
  padding: 16px 0 18px;
  min-width: 3em;
  padding-right: 1em;
  border-right: 1px solid var(--code-line);
  color: var(--code-gutter);
  font: 400 13px/1.7 var(--font-mono);
  text-align: right;
  white-space: pre;
  -webkit-user-select: none;
  user-select: none;
}

.code-body pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 16px 18px 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  tab-size: 2;
}

.code-compact .gutter,
.code-compact .code-body pre {
  padding-top: 12px;
  padding-bottom: 14px;
  font-size: 12px;
}

.code-compact .code-body pre {
  padding-left: 14px;
}

.t-s {
  color: var(--t-s);
}

.t-c {
  color: var(--t-c);
  font-style: italic;
}

.t-a {
  color: var(--t-a);
}

.t-k {
  color: var(--t-k);
}

.t-m {
  color: var(--t-m);
}

.t-n {
  color: var(--t-n);
}

.t-o {
  color: var(--t-o);
}

/* Code section */

.code-layout {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.install-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.install-steps h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.875rem;
}

.guides {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guides li {
  display: grid;
  gap: 3px;
  padding-left: 12px;
  border-left: 2px solid var(--line-2);
}

.guides a {
  justify-self: start;
  font-weight: 500;
  text-decoration: none;
}

.guides a:hover {
  color: var(--accent);
}

.guides code {
  justify-self: start;
  white-space: normal;
  overflow-wrap: anywhere;
}

.guides span {
  color: var(--muted);
  font-size: 0.875rem;
}

.requirements {
  display: grid;
  margin: 28px 0 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.requirements div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}

.requirements div:first-child {
  border-top: 0;
}

.requirements dt {
  font-family: var(--font-mono);
  font-weight: 500;
}

.requirements dd {
  margin: 0;
  color: var(--muted);
}

.editor-cell {
  padding: 32px;
  background-color: var(--bg-soft);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 18px 18px;
}

.editor {
  border-color: var(--code-line);
  background: var(--code-bg);
  color: var(--code-text);
}

.editor .ide-bar {
  padding-right: 8px;
  border-bottom-color: var(--code-line);
  background: var(--code-bar);
}

.editor .dots i {
  background: rgba(255, 255, 255, 0.13);
}

.file-tabs {
  display: flex;
  align-self: stretch;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.file-tabs [role="tab"] {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--code-line);
  background: transparent;
  color: var(--code-muted);
  font: 500 12px/1 var(--font-mono);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.file-tabs [role="tab"]:first-child {
  border-left: 1px solid var(--code-line);
}

.file-tabs [role="tab"]:hover {
  color: var(--code-text);
}

.file-tabs [role="tab"][aria-selected="true"] {
  background: var(--code-bg);
  color: #fff;
  box-shadow: inset 0 2px 0 #a78bfa;
}

.file-tabs [role="tab"] .icon {
  color: #a78bfa;
}

.editor .copy {
  margin-left: auto;
}

.tabs-ready .tab-panel[hidden],
.tab-panel[hidden] {
  display: none;
}

.editor:not(.tabs-ready) .file-tabs,
.editor:not(.tabs-ready) .copy {
  display: none;
}

.editor:not(.tabs-ready) .tab-panel + .tab-panel {
  border-top: 1px solid var(--code-line);
}

.ide-path {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--code-line);
  color: var(--code-muted);
  font: 500 12px/1.3 var(--font-mono);
}

.editor .ide-status {
  border-top-color: var(--code-line);
  background: var(--code-bar);
  color: var(--code-muted);
}

/* Examples */

.example {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.example .tile-head {
  margin-bottom: 0;
}

.example .tile-title p {
  color: var(--faint);
  font-size: 0.76rem;
}

.example .code-panel {
  margin-top: auto;
}

.scenarios-head {
  margin-top: 0;
}

.scenarios-head .cell {
  padding: 14px var(--pad);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.86rem;
}

.scenarios-head .mono {
  color: var(--text);
}

.scenarios {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 0;
}

.scenario {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 20px;
}

.scenario h3 {
  margin-top: 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.scenario p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.scenario code {
  white-space: normal;
}

/* Replays: recorded runs of the examples, played step by step */

.replay-head .cell {
  padding: 14px var(--pad);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.875rem;
}

.replay-head .mono {
  color: var(--text);
}

.replay {
  margin: 0 calc(-1 * var(--pad));
  padding: 40px var(--pad);
  border-top: 1px solid var(--line);
  background-color: var(--bg-soft);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 18px 18px;
}

.replay-window {
  display: flex;
  flex-direction: column;
}

.replay-bar {
  gap: 14px;
  padding-right: 14px;
}

.replay-tabs {
  display: flex;
  align-self: stretch;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.replay-tabs::-webkit-scrollbar {
  display: none;
}

.replay-tabs [role="tab"] {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 500 12px/1 var(--font-mono);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.replay-tabs [role="tab"]:first-child {
  border-left: 1px solid var(--line);
}

.replay-tabs [role="tab"]:hover {
  color: var(--text);
}

.replay-tabs [role="tab"][aria-selected="true"] {
  background: var(--panel);
  color: var(--text);
  box-shadow: inset 0 2px 0 var(--accent);
}

.replay-tabs [role="tab"] .icon {
  color: var(--accent);
}

.replay-source {
  margin-left: auto;
  overflow: hidden;
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replay-summary {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.replay-body {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-rows: minmax(0, 1fr);
  height: 620px;
}

.replay-main,
.replay-side,
.replay-messages {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.replay-chat {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-soft);
  scrollbar-width: thin;
}

.chat-item {
  flex: none;
  margin: 0;
}

.chat-who {
  display: block;
  margin-bottom: 5px;
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
}

.chat-user,
.chat-action {
  align-self: flex-end;
  max-width: 80%;
  text-align: right;
}

.chat-agent {
  align-self: flex-start;
  max-width: 85%;
}

.chat-item > p {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 14px;
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: left;
}

.chat-user > p {
  border-bottom-right-radius: 4px;
  background: var(--button-bg);
  color: var(--button-text);
}

.chat-agent > p {
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  background: var(--panel);
  color: var(--text);
}

.chat-action > p {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  border: 1px dashed var(--accent-line);
  border-bottom-right-radius: 4px;
  background: var(--accent-soft);
  color: var(--text);
}

.chat-action code {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 12px;
}

.chat-surface {
  align-self: stretch;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface-card);
  box-shadow: var(--shadow);
  transition: border-color 0.4s, box-shadow 0.4s;
}

.chat-surface figcaption {
  display: flex;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font: 500 12px/1 var(--font-mono);
}

.chat-surface figcaption span {
  color: var(--faint);
}

.chat-surface.is-changed {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
}

.chat-deleted {
  align-self: center;
  display: inline-flex;
  gap: 8px;
  padding: 7px 12px;
  border: 1px dashed var(--line-2);
  border-radius: 999px;
  color: var(--muted);
  font: 500 12px/1 var(--font-mono);
}

.chat-deleted span {
  color: var(--red);
}

.chat-typing > p {
  display: inline-flex;
  gap: 5px;
  padding: 14px 16px;
}

.chat-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
  animation: replay-typing 1s ease-in-out infinite;
}

.chat-typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-typing i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes replay-typing {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* A surface as the renderer drew it: a2ui_phoenix.css (and the gallery's
   catalog.css), themed with the page's colors and fonts. */

.replay-stage {
  --a2ui-font-family: var(--font-sans);
  --a2ui-font-family-monospace: var(--font-mono);
  --a2ui-color-primary: var(--accent);
  --a2ui-color-on-primary: var(--on-accent);
  --a2ui-color-on-background: var(--text);
  --a2ui-color-surface: var(--panel);
  --a2ui-color-on-surface: var(--text);
  --a2ui-color-muted: var(--muted);
  --a2ui-color-border: var(--line);
  --a2ui-color-border-strong: var(--line-2);
  --a2ui-color-input: var(--field);
  --a2ui-color-on-input: var(--text);
  --a2ui-color-error: var(--red);
  padding: 16px;
  overflow-x: auto;
}

/* What the user does next, and doing it. */

.replay-stage .replay-hint {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  animation: replay-hint 1.6s ease-in-out infinite;
}

.replay-stage .replay-press {
  transform: scale(0.95);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.replay-stage .replay-typing {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

@keyframes replay-hint {
  50% {
    outline-color: var(--accent-line);
    outline-offset: 5px;
  }
}

/* The inspector: the model's output and the messages. */

.replay-side {
  border-left: 1px solid var(--code-line);
  background: var(--code-bg);
  color: var(--code-text);
}

.replay-side .ide-tabs {
  border-bottom-color: var(--code-line);
  background: var(--code-bar);
}

.replay-side .ide-tab {
  border-right-color: var(--code-line);
  color: var(--code-muted);
}

.replay-side .ide-tab.is-active {
  color: #fff;
  box-shadow: inset 0 -2px 0 #a78bfa;
}

.replay-side .ide-tab .icon {
  color: #a78bfa;
}

.replay-side .ide-tab-meta {
  color: var(--code-muted);
}

.replay-stream {
  display: flex;
  flex: none;
  flex-direction: column;
  border-bottom: 1px solid var(--code-line);
}

.replay-stream[hidden] {
  display: none;
}

.replay-stream-text {
  height: 190px;
  margin: 0;
  padding: 12px 14px;
  overflow-y: auto;
  color: var(--code-muted);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  scrollbar-width: thin;
}

.replay-stream-text mark {
  border-radius: 2px;
  background: rgba(167, 139, 250, 0.25);
  color: #fff;
}

.replay-messages {
  flex: 1;
}

.replay-log {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
}

.log-entry {
  border-bottom: 1px solid var(--code-line);
  transition: opacity 0.2s;
}

.log-entry:not(.is-current) {
  opacity: 0.6;
}

.log-entry:not(.is-current):hover,
.log-entry:not(.is-current):focus-within {
  opacity: 1;
}

.log-entry summary {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--code-text);
  font: 500 12px/1.3 var(--font-mono);
  list-style: none;
  cursor: pointer;
}

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

.log-entry summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--code-muted);
  border-bottom: 1.5px solid var(--code-muted);
  transform: rotate(-45deg);
  transition: transform 0.2s;
}

.log-entry details[open] > summary::after {
  transform: rotate(45deg);
}

.log-entry.is-current summary {
  background: rgba(167, 139, 250, 0.08);
}

.log-from {
  padding: 3px 6px;
  border-radius: 4px;
}

.from-agent .log-from {
  background: rgba(167, 139, 250, 0.16);
  color: #c4b5fd;
}

.from-renderer .log-from {
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
}

.log-kind {
  color: #fff;
}

.log-note {
  overflow: hidden;
  color: var(--code-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-entry pre {
  max-height: 260px;
  margin: 0;
  padding: 4px 14px 14px;
  overflow: auto;
  color: var(--code-text);
  font-size: 12px;
  line-height: 1.6;
  scrollbar-width: thin;
}

/* The caption and the controls. */

.replay-foot {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}

.replay-caption {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  min-height: 3em;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.replay-controls {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.replay-icon-button {
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
}

.replay-icon-button[hidden] {
  display: none;
}

.replay-icon-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.replay-position {
  min-width: 88px;
  color: var(--muted);
  font: 500 12px/1 var(--font-mono);
  text-align: center;
}

.replay-next {
  max-width: 300px;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.replay-next > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.replay-next .icon {
  display: none;
}

.replay-next[data-mode="next"] .replay-icon-next,
.replay-next[data-mode="play"] .replay-icon-play,
.replay-next[data-mode="pause"] .replay-icon-pause,
.replay-next[data-mode="again"] .replay-icon-again {
  display: block;
}

html:not(.js) .replay-tabs [role="tab"]:not([aria-selected="true"]),
html:not(.js) .replay-controls {
  display: none;
}

.replay-apps {
  border-top: 1px solid var(--line);
}

@media (max-width: 1060px) {
  .replay-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    height: auto;
  }

  .replay-chat {
    flex: none;
    height: 540px;
  }

  .replay-side {
    border-top: 1px solid var(--code-line);
    border-left: 0;
  }

  .replay-log {
    flex: none;
    height: 320px;
  }

  .replay-stream-text {
    height: 150px;
  }
}

@media (max-width: 640px) {
  .replay {
    padding: 24px var(--pad);
  }

  .replay-chat {
    height: 480px;
    padding: 14px;
  }

  .replay-stage {
    padding: 12px;
  }

  .replay-source {
    display: none;
  }

  .replay-summary {
    padding: 10px 14px;
  }

  .replay-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .replay-caption {
    min-height: 4.5em;
  }

  .replay-position {
    min-width: 0;
    margin-right: auto;
  }

  .replay-next {
    flex: 1;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .replay-stage .replay-hint,
  .chat-typing i {
    animation: none;
  }
}

/* Conformance */

.pipeline {
  margin-bottom: 40px;
}

.pipeline .mini-label {
  margin-bottom: 16px;
  text-align: center;
}

.pipeline-steps {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipe-step {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  padding: 0 8px;
  text-align: center;
}

.pipe-step::before {
  content: "";
  position: absolute;
  top: 11px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 1px;
  background: color-mix(in srgb, var(--green) 45%, transparent);
}

.pipe-step:last-child::before {
  display: none;
}

.pipe-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--green) 45%, transparent);
  background: var(--bg);
  color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.pipe-name {
  margin-top: 4px;
  font: 600 12.5px/1 var(--font-mono);
}

.pipe-detail {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.pipe-detail code {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.95em;
  white-space: normal;
}

.report-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
}

.report-figure {
  font-size: clamp(2.25rem, 4vw, 2.75rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}

.report-figure .of {
  color: var(--faint);
  font-size: 0.5em;
  letter-spacing: -0.03em;
}

.report-caption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.report-caption strong {
  color: var(--text);
  font-weight: 600;
}

.report-head > div {
  flex: 1 1 360px;
  max-width: 560px;
}

.report-meta {
  align-self: flex-start;
  flex: none;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

.skip-reasons {
  display: grid;
  margin: 0 0 28px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  list-style: none;
}

.skip-reasons li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.skip-reasons li:first-child {
  border-top: 0;
}

.skip-count {
  color: var(--text);
  font: 600 1rem/1.4 var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.skip-text {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.skip-text strong {
  color: var(--text);
  font-weight: 600;
}

.skip-suites {
  grid-column: 2;
  color: var(--faint);
  font: 500 12px/1.5 var(--font-mono);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
}

.report-table th,
.report-table td {
  padding: 11px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.report-table thead th {
  padding-top: 0;
  border-top: 0;
  color: var(--faint);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-table tbody th {
  width: 34%;
  padding-right: 12px;
  font-weight: 400;
}

.report-table tbody th code {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 0.8rem;
}

.report-table .num {
  width: 14%;
  font: 600 0.82rem/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.report-table .of {
  color: var(--faint);
  font-weight: 400;
}

.bar-cell {
  display: grid;
  gap: 5px;
}

.bar {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: repeating-linear-gradient(-45deg, var(--line) 0 3px, transparent 3px 6px), var(--bg-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transform-origin: left;
  transition: transform 1s var(--ease) 0.15s;
}

.reveal-ready .report:not(.is-visible) .bar i {
  transform: scaleX(0);
}

.skip {
  color: var(--faint);
  font-size: 0.75rem;
  line-height: 1.4;
}

.key {
  display: inline-block;
  width: 14px;
  height: 6px;
  margin-right: 6px;
  border-radius: 3px;
  vertical-align: 1px;
}

.key-run {
  background: var(--green);
}

.key-skip {
  margin-left: 12px;
  background: repeating-linear-gradient(-45deg, var(--line-2) 0 2px, transparent 2px 4px);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.side-stack {
  display: grid;
  align-content: start;
  gap: 32px;
}

.side-stack a {
  color: var(--accent);
  text-underline-offset: 3px;
}

/* Call to action */

.cta {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
  padding-bottom: 96px;
  overflow: hidden;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}

.cta > :last-child:not(.cells):not(.table-wrap) {
  margin-bottom: 0;
}

.cta .sec-lead {
  max-width: 520px;
  margin-top: 16px;
}

.cta .hero-actions {
  justify-content: flex-start;
}

.cta-terminal {
  box-shadow: var(--shadow-lg);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding: 48px var(--pad);
}

.footer-brand p {
  max-width: 420px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-col {
  display: grid;
  align-content: start;
  gap: 9px;
}

.footer-col .mini-label {
  margin-bottom: 6px;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  color: var(--text-2);
  font-size: 0.9375rem;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 16px var(--pad);
  border-top: 1px solid var(--line);
  color: var(--faint);
  font: 400 12px/1.6 var(--font-mono);
}

/* Reveal on scroll */

.reveal-ready [data-reveal] {
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal-ready [data-reveal]:not(.is-visible) {
  opacity: 0;
  transform: translateY(16px);
}

/* Responsive */

@media (max-width: 1260px) {
  .sec::before,
  .sec::after,
  .band::before,
  .band::after {
    display: none;
  }
}

@media (max-width: 1180px) {
  .site-nav a {
    padding: 6px 8px;
  }

  .version-badge {
    display: none;
  }
}

@media (max-width: 1060px) {
  :root {
    --pad: 32px;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .site-nav {
    position: absolute;
    top: calc(var(--header-h) - 1px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    box-shadow: var(--shadow);
  }

  .site-header.nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 11px 10px;
    font-size: 0.98rem;
  }

  .header-actions {
    margin-left: auto;
  }

  .standards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bento .span-2 {
    grid-column: span 2;
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .step:nth-child(4)::after {
    display: none;
  }

  .lanes {
    display: none;
  }

  .components {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .scenarios {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 24px;
  }

  .pipe-step:nth-child(4)::before {
    display: none;
  }

  .code-layout,
  .cta {
    grid-template-columns: minmax(0, 1fr);
  }

  .cells-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .cells-3 .span-2 {
    grid-column: auto;
  }
}

@media (max-width: 860px) {
  .sec-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .demo-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .demo-preview {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .demo-code pre {
    max-height: 340px;
  }

  .tile.span-2.has-visual {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "body"
      "viz"
      "tags";
    row-gap: 22px;
  }

  .tile.span-2.has-visual > .tags {
    padding-top: 0;
  }

  .system {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "agent"
      "wire"
      "renderer"
      "core";
    gap: 0;
    padding: 24px;
  }

  .sys-node::after {
    display: none;
  }

  .sys-wire {
    padding: 22px 0;
  }

  .wire-track {
    width: 70%;
  }

  .sys-renderer {
    margin-bottom: 24px;
  }

  .cells-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --pad: 20px;
    --header-h: 58px;
  }

  .header-inner {
    padding: 0 16px;
  }

  .header-cta {
    display: none;
  }

  .sec {
    padding-top: 72px;
  }

  .sec > :last-child:not(.cells):not(.table-wrap) {
    margin-bottom: 72px;
  }

  .sec-head {
    margin-bottom: 40px;
  }

  .hero {
    padding-top: 64px;
    padding-bottom: 56px;
  }

  .hero h1 br {
    display: none;
  }

  .hero-actions .button {
    flex: 1 1 100%;
  }

  .status-chip {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 12px;
  }

  .status-sep {
    display: none;
  }

  .demo {
    margin-top: 44px;
  }

  .ide-title,
  .hide-sm,
  .ide-tab-meta {
    display: none;
  }

  .demo-replay {
    margin-left: auto;
  }

  .demo-code pre {
    font-size: 12px;
  }

  .standards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    padding: 20px 16px;
  }

  .bento {
    grid-template-columns: minmax(0, 1fr);
  }

  .bento .span-2 {
    grid-column: auto;
  }

  .cell {
    padding: 24px 20px;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .step::after {
    display: none;
  }

  .components {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .scenarios {
    grid-template-columns: minmax(0, 1fr);
  }

  .pipeline-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipe-step:nth-child(2n)::before {
    display: none;
  }

  .fn-table div {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .matrix th,
  .matrix td {
    padding: 5px 4px;
  }

  .matrix th:first-child {
    padding-left: 8px;
  }

  .matrix tbody th code {
    font-size: 12px;
  }

  .matrix .mark {
    width: 34px;
  }

  .tree li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .spec-table,
  .spec-table tbody,
  .spec-table tr,
  .spec-table th,
  .spec-table td {
    display: block;
  }

  .spec-table thead {
    display: none;
  }

  .spec-table tr {
    padding: 16px var(--pad);
    border-bottom: 1px solid var(--line);
  }

  .spec-table th,
  .spec-table td,
  .spec-table th:first-child,
  .spec-table td:first-child,
  .spec-table th:last-child,
  .spec-table td:last-child {
    padding: 4px 0;
    border: 0;
  }

  .editor-cell {
    padding: 16px;
  }

  .harness {
    align-items: flex-start;
    padding: 20px;
  }

  .report-table .skip {
    display: none;
  }


  .report-table tbody th {
    width: auto;
  }

  .report-table .num {
    width: auto;
    padding-right: 12px;
    white-space: nowrap;
  }

  .footer-inner {
    padding: 36px var(--pad);
  }
}

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

  .install-line {
    font-size: 0.8rem;
  }
}

@supports not (overflow: clip) {
  body {
    overflow-x: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }

  .beam,
  .wire-track i,
  .demo-replay {
    display: none;
  }

  .cursor {
    animation: none !important;
  }
}
