:root {
  color-scheme: light dark;
  --bg: #f6f5f2;
  --bg-2: #eeece7;
  --card: #ffffff;
  --ink: #16161a;
  --ink-2: #55555d;
  --ink-3: #8b8b93;
  --line: rgba(22, 22, 26, 0.1);
  --line-2: rgba(22, 22, 26, 0.16);
  --accent: #b0562b;
  --accent-soft: rgba(176, 86, 43, 0.1);
  --btn-bg: #16161a;
  --btn-ink: #ffffff;
  --shadow-lg: 0 1px 2px rgba(0, 0, 0, 0.06), 0 24px 60px -20px rgba(40, 30, 20, 0.35);
  --radius: 14px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f11;
    --bg-2: #151518;
    --card: #19191c;
    --ink: #ededee;
    --ink-2: #a4a4ab;
    --ink-3: #6e6e76;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.14);
    --accent: #e08a5f;
    --accent-soft: rgba(224, 138, 95, 0.12);
    --btn-bg: #ededee;
    --btn-ink: #0f0f11;
    --shadow-lg: 0 1px 2px rgba(0, 0, 0, 0.4), 0 30px 80px -24px rgba(0, 0, 0, 0.8);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; text-wrap: balance; }
code { font-family: var(--mono); font-size: 0.86em; }

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.75em;
  height: 1.75em;
  padding: 0 0.45em;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  font: 500 0.78em/1 var(--sans);
  vertical-align: 0.12em;
}

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

.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: 8px;
  background: var(--btn-bg); color: var(--btn-ink); text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.bar { display: flex; align-items: center; gap: 32px; height: 60px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 650; letter-spacing: -0.01em; text-decoration: none;
}
.brand img { width: 28px; height: 28px; }
.brand-small { font-size: 15px; gap: 8px; }
.brand-small img { width: 20px; height: 20px; }

.site-nav { display: flex; gap: 26px; margin-left: auto; font-size: 14.5px; }
.bar-actions { display: flex; align-items: center; gap: 14px; }
.icon-link { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--ink-2); transition: color 0.15s, background 0.15s; }
.icon-link:hover { color: var(--ink); background: var(--bg-2); }
.icon-link svg { width: 20px; height: 20px; }
.site-nav a { color: var(--ink-2); text-decoration: none; transition: color 0.15s; }
.site-nav a:hover { color: var(--ink); }

.button {
  display: inline-flex; align-items: center; gap: 9px;
  height: 46px; padding: 0 20px;
  border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-ink);
  font-size: 15.5px; font-weight: 600; text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
}
.button:hover { opacity: 0.88; }
.button:active { transform: scale(0.98); }
.button .icon { width: 18px; height: 18px; }
.button-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.button-ghost:hover { opacity: 1; box-shadow: inset 0 0 0 1px var(--ink-3); }
.button-small { height: 34px; padding: 0 14px; font-size: 14px; gap: 7px; }
.button-small .icon { width: 16px; height: 16px; }

/* Hero */

.hero { padding: 72px 0 40px; }

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 56px;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 22px;
  color: var(--ink-2); font-size: 14px; font-weight: 500;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

h1 { font-size: clamp(2.7rem, 6.2vw, 5.1rem); letter-spacing: -0.042em; line-height: 0.98; }

.lead { color: var(--ink-2); font-size: 18.5px; line-height: 1.5; text-wrap: pretty; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 26px; }
.actions-center { justify-content: center; }
.meta { color: var(--ink-3); font-size: 14px; }
.hero-meta { margin-top: 14px; }

/* Demo stage */

.demo { margin: 0; }

.stage {
  container-type: inline-size;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  outline: 1px solid var(--line);
}

.desk {
  --win: #ffffff;
  --win-2: #f4f4f5;
  --win-ink: #1d1d1f;
  --win-ink-2: #6e6e73;
  --win-ink-3: #aeaeb2;
  --win-line: rgba(0, 0, 0, 0.09);
  --win-link: #1f6fd6;
  --sk: #e6e6e9;
  position: relative;
  font-size: calc(100cqw / 64);
  aspect-ratio: 64 / 34;
  font-family: var(--sans);
  color: var(--win-ink);
  background:
    radial-gradient(120% 90% at 12% 110%, #e59a6b 0%, rgba(229, 154, 107, 0) 55%),
    radial-gradient(90% 70% at 100% 100%, #7d5a74 0%, rgba(125, 90, 116, 0) 60%),
    linear-gradient(180deg, #2c3a4c 0%, #56657a 52%, #b98b78 100%);
  user-select: none;
  -webkit-user-select: none;
}

@media (prefers-color-scheme: dark) {
  .desk {
    --win: #232326;
    --win-2: #2b2b2f;
    --win-ink: #f2f2f4;
    --win-ink-2: #a1a1a8;
    --win-ink-3: #6b6b72;
    --win-line: rgba(255, 255, 255, 0.08);
    --win-link: #5ea2ff;
    --sk: #36363b;
    background:
      radial-gradient(120% 90% at 12% 110%, #9c5a37 0%, rgba(156, 90, 55, 0) 55%),
      radial-gradient(90% 70% at 100% 100%, #4d3548 0%, rgba(77, 53, 72, 0) 60%),
      linear-gradient(180deg, #121821 0%, #26303e 55%, #5b4136 100%);
  }
}

.menubar {
  position: absolute; inset: 0 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  height: 1.7em; padding: 0 1.1em;
  background: rgba(20, 20, 26, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff; font-size: 0.72em; font-weight: 500;
}
.mb-left, .mb-right { display: flex; align-items: center; gap: 1.4em; }
.mb-left span { opacity: 0.85; }
.mb-fork { width: 1.25em; height: 1.25em; }

.win {
  position: absolute;
  background: var(--win);
  border-radius: 0.8em;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.25), 0 1.4em 3em -0.8em rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.lights { display: inline-flex; gap: 0.4em; }
.lights i { width: 0.66em; height: 0.66em; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }

.win-bar {
  display: flex; align-items: center; gap: 1em;
  height: 2.3em; padding: 0 0.9em;
  border-bottom: 1px solid var(--win-line);
  background: var(--win-2);
}
.win-title { font-size: 0.72em; font-weight: 600; color: var(--win-ink-2); }

.chat { left: 3em; top: 3.6em; width: 29em; height: 21.5em; }

.msgs { display: grid; gap: 1.35em; padding: 1.4em 1.4em; font-size: 0.86em; line-height: 1.45; }
.msg { display: grid; grid-template-columns: 2.4em 1fr; gap: 0.8em; }
.av {
  display: grid; place-items: center;
  width: 2.4em; height: 2.4em; border-radius: 0.6em;
  background: var(--av); color: #fff; font-size: 0.9em; font-weight: 650;
}
.who { font-weight: 650; }
.who time { margin-left: 0.4em; color: var(--win-ink-3); font-weight: 400; font-size: 0.85em; }
.link {
  display: inline; color: var(--win-link);
  text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--win-link) 35%, transparent);
  text-underline-offset: 0.18em;
  word-break: break-all;
  border-radius: 0.2em;
  transition: background 0.2s;
}
.link s { text-decoration: none; transition: opacity 0.4s; }
.link.is-hot { background: color-mix(in srgb, var(--win-link) 16%, transparent); }
.demo[data-cleaned] .link[data-link="wiki"] s { opacity: 0.35; text-decoration: line-through; }

/* Browser window */

.browser {
  left: 21em; top: 4.8em; width: 40em; height: 27.2em;
  opacity: 0;
  transform: translateY(1.2em) scale(0.97);
  transform-origin: 50% 80%;
  transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.browser.is-open { opacity: 1; transform: none; }

.br-tabs {
  display: flex; align-items: flex-end; gap: 1.3em;
  height: 2.5em; padding: 0 0.9em;
  background: #dfe1e5;
}
.br-tabs .lights { align-self: center; }
.br-tab {
  display: flex; align-items: center; gap: 0.5em;
  width: 15em; height: 1.95em; padding: 0 0.8em;
  border-radius: 0.6em 0.6em 0 0;
  background: #fff;
  font-size: 0.7em; color: #3c4043;
}
.br-fav { width: 1.2em; height: 1.2em; border-radius: 50%; background: #24292f; }
.br-toolbar {
  display: flex; align-items: center; gap: 0.9em;
  height: 2.6em; padding: 0 0.9em;
  background: #fff; border-bottom: 1px solid #e3e3e6; color: #5f6368;
}
.br-toolbar .lights { display: none; }
.br-nav { font-size: 1.1em; letter-spacing: 0.3em; color: #9aa0a6; }
.br-url {
  flex: 1; display: flex; align-items: center; gap: 0.5em; min-width: 0;
  height: 1.8em; padding: 0 0.9em;
  border-radius: 999px; background: #f1f3f4;
  font-size: 0.74em; color: #202124;
}
.br-url svg { width: 0.9em; height: 0.9em; color: #5f6368; flex: none; }
.br-tab-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.br-url-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.br-profile {
  display: flex; align-items: center; gap: 0.4em;
  height: 1.8em; padding: 0 0.7em 0 0.25em;
  border-radius: 999px; background: #e8f0fe; color: #174ea6;
  font-size: 0.7em; font-weight: 600;
}
.br-avatar { width: 1.4em; height: 1.4em; border-radius: 50%; background: #c2703f; }
.browser[data-profile="Personal"] .br-profile { background: #e6f4ea; color: #137333; }
.browser[data-profile="Personal"] .br-avatar { background: #3f9a78; }

.browser[data-browser="safari"] .br-tabs { display: none; }
.browser[data-browser="safari"] .br-toolbar { height: 3em; background: #f6f6f7; }
.browser[data-browser="safari"] .br-toolbar .lights { display: inline-flex; margin-right: 0.6em; }
.browser[data-browser="safari"] .br-url { justify-content: center; flex: 0 1 22em; margin-inline: auto; background: #e9e9eb; border-radius: 0.5em; }
.browser[data-browser="safari"] .br-profile { display: none; }
.browser[data-browser="safari"] .br-nav { margin-right: auto; }

.br-page { display: none; padding: 1.6em 2em; background: #fff; color: #1f2328; height: 100%; }
.browser[data-page="pr"] .page-pr, .browser[data-page="wiki"] .page-wiki, .browser[data-page="issue"] .page-issue { display: block; }

.is-crumb { font-size: 0.72em; color: #6b6f76; }
.is-title { margin: 0.5em 0 0.7em; font-size: 1.3em; font-weight: 600; letter-spacing: -0.01em; }
.is-meta { display: flex; flex-wrap: wrap; gap: 0.5em; margin-bottom: 1.3em; font-size: 0.68em; color: #6b6f76; }
.is-meta span { padding: 0.3em 0.7em; border: 1px solid #e3e4e8; border-radius: 0.5em; }
.is-meta .is-state { border-color: #f2c94c; background: #fdf6dd; color: #8a6d00; font-weight: 600; }
.is-sub { margin: 1.6em 0 0.8em; font-size: 0.75em; font-weight: 600; color: #3c4149; }

.sk { display: grid; gap: 0.6em; }
.sk i { display: block; width: var(--w); height: 0.55em; border-radius: 0.3em; background: #eaeef2; }

.pr-repo { font-size: 0.78em; color: #59636e; }
.pr-title { margin-top: 0.5em; font-size: 1.35em; font-weight: 600; letter-spacing: -0.01em; }
.pr-title span { color: #818b98; font-weight: 400; }
.pr-state { display: flex; align-items: center; gap: 0.5em; margin: 0.7em 0 1.3em; font-size: 0.72em; color: #59636e; }
.pr-state span { padding: 0.3em 0.8em; border-radius: 999px; background: #1f883d; color: #fff; font-weight: 600; }
.pr-state code { padding: 0.1em 0.4em; border-radius: 0.3em; background: #ddf4ff; color: #0969da; font-size: 1em; }
.pr-diff { display: grid; gap: 0.25em; margin-top: 1.4em; padding: 0.7em; border: 1px solid #d1d9e0; border-radius: 0.5em; }
.pr-diff i { height: 0.9em; border-radius: 0.15em; background: #f6f8fa; }
.pr-diff i.add { background: #dafbe1; }
.pr-diff i.del { background: #ffebe9; }

.wk-title { font-family: "Linux Libertine", Georgia, "Times New Roman", serif; font-size: 1.8em; padding-bottom: 0.2em; border-bottom: 1px solid #a2a9b1; }
.wk-sub { margin: 0.5em 0 1.1em; font-size: 0.7em; color: #54595d; }
.wk-body { display: grid; grid-template-columns: 1fr 11em; gap: 1.4em; align-items: start; }
.wk-img {
  display: block; aspect-ratio: 4 / 3; border-radius: 0.2em;
  background:
    linear-gradient(170deg, transparent 52%, #2f5f58 53%, #1e4a4a 100%),
    linear-gradient(200deg, transparent 38%, #3b5d45 39%, #2c4a37 70%, transparent 71%),
    linear-gradient(180deg, #a8c6d8, #d9e6ea);
}

@media (prefers-color-scheme: dark) {
  .br-tabs { background: #1f1f22; }
  .br-tab { background: #35363a; color: #e8eaed; }
  .br-toolbar { background: #35363a; border-bottom-color: #1f1f22; color: #9aa0a6; }
  .br-url { background: #202124; color: #e8eaed; }
  .br-url svg { color: #9aa0a6; }
  .br-profile { background: #394457; color: #d2e3fc; }
  .browser[data-profile="Personal"] .br-profile { background: #2f4a3c; color: #ceead6; }
  .browser[data-browser="safari"] .br-toolbar { background: #2c2c2f; }
  .browser[data-browser="safari"] .br-url { background: #1f1f22; }
}

/* Callout that says what happened. Styled as an annotation, not as app UI. */
.note {
  position: absolute; left: 0; top: 0; z-index: 25;
  display: flex; align-items: center; gap: 0.5em;
  padding: 0.5em 0.9em 0.5em 0.6em;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78em; font-weight: 600; white-space: nowrap;
  box-shadow: 0 0.6em 1.6em -0.4em rgba(0, 0, 0, 0.45);
  transform: translate(var(--nx, 0), var(--ny, 0)) translateY(0.5em);
  opacity: 0;
  transition: opacity 0.25s, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.note.is-on { opacity: 1; transform: translate(var(--nx, 0), var(--ny, 0)); }
.note svg { width: 1.2em; height: 1.2em; }

/* Cursor, ripple, keys */

.cursor {
  position: absolute; left: 0; top: 0; z-index: 30;
  width: 1.3em; height: 1.8em;
  filter: drop-shadow(0 0.1em 0.2em rgba(0, 0, 0, 0.35));
  transform: translate(var(--cx, 50em), var(--cy, 34em));
  transition: transform 0.9s cubic-bezier(0.45, 0, 0.2, 1), scale 0.12s;
  pointer-events: none;
}
.cursor.is-down { scale: 0.86; }

.ripple {
  position: absolute; left: 0; top: 0; z-index: 29;
  width: 3em; height: 3em; margin: -1.5em 0 0 -1.5em;
  border-radius: 50%; border: 0.15em solid rgba(255, 255, 255, 0.9);
  transform: translate(var(--cx, 0), var(--cy, 0)) scale(0.2);
  opacity: 0; pointer-events: none;
}
.ripple.is-on { animation: ripple 0.6s ease-out; }
@keyframes ripple {
  0% { opacity: 0.9; transform: translate(var(--cx), var(--cy)) scale(0.2); }
  100% { opacity: 0; transform: translate(var(--cx), var(--cy)) scale(1); }
}

.keys {
  position: absolute; left: 50%; bottom: 1.6em; z-index: 31;
  display: flex; gap: 0.5em;
  transform: translateX(-50%);
}
.keys kbd {
  min-width: 2.6em; height: 2.6em; padding: 0 0.8em;
  font-size: 1em; font-weight: 600;
  border: none; border-radius: 0.55em;
  background: rgba(22, 22, 26, 0.78);
  color: #fff;
  box-shadow: inset 0 -0.14em 0 rgba(255, 255, 255, 0.12), 0 0.5em 1.4em -0.4em rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: key-in 0.2s ease-out;
  transition: opacity 0.3s, transform 0.12s;
}
.keys kbd.is-down { transform: translateY(0.12em) scale(0.95); background: var(--accent); }
.keys kbd.is-out { opacity: 0; }
@keyframes key-in { from { opacity: 0; transform: translateY(0.5em); } }

/* Picker (shared by the stage and the try-it section) */

.picker {
  --pk-bg: rgba(246, 246, 248, 0.72);
  --pk-ink: #1d1d1f;
  --pk-2: #6e6e73;
  --pk-3: #a1a1a6;
  --pk-tile: rgba(0, 0, 0, 0.045);
  --pk-tile-hover: rgba(0, 0, 0, 0.08);
  --pk-tile-sel: rgba(0, 0, 0, 0.12);
  --pk-border: rgba(255, 255, 255, 0.55);
  display: inline-block;
  padding: 1.05em 1.1em 0.9em;
  border-radius: 1.65em;
  background: var(--pk-bg);
  border: 1px solid var(--pk-border);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.18), 0 0.9em 2.2em -0.2em rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(28px) saturate(1.8);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  color: var(--pk-ink);
  font-family: var(--round);
  outline: none;
}
@media (prefers-color-scheme: dark) {
  .picker {
    --pk-bg: rgba(40, 40, 44, 0.62);
    --pk-ink: #f2f2f4;
    --pk-2: #a1a1a8;
    --pk-3: #707078;
    --pk-tile: rgba(255, 255, 255, 0.06);
    --pk-tile-hover: rgba(255, 255, 255, 0.1);
    --pk-tile-sel: rgba(255, 255, 255, 0.17);
    --pk-border: rgba(255, 255, 255, 0.16);
  }
}

.pk-head {
  display: flex; align-items: center; justify-content: center; gap: 0.35em;
  font-size: 1em; font-weight: 500; color: var(--pk-2); white-space: nowrap;
}
.pk-head svg { width: 0.8em; height: 0.8em; }
.pk-path { margin-left: -0.35em; color: var(--pk-3); }

.pk-row { display: flex; gap: 0.55em; margin-top: 0.85em; }

.pk-cell {
  display: flex; flex-direction: column; align-items: center;
  width: 6.4em; padding: 0; border: 0; background: none;
  color: inherit; font: inherit; text-align: center; cursor: pointer;
}
.pk-tile {
  display: grid; place-items: center;
  width: 5.6em; height: 5.6em; border-radius: 1.3em;
  background: var(--pk-tile);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.pk-tile svg { width: 3.3em; height: 3.3em; }
.pk-copy .pk-tile svg { width: 2.5em; height: 2.5em; color: var(--pk-2); }
.pk-cell:hover .pk-tile { background: var(--pk-tile-hover); }
.pk-cell.is-sel .pk-tile { background: var(--pk-tile-sel); }
.pk-cell.is-chosen .pk-tile { transform: scale(0.92); box-shadow: 0 0 0 0.18em var(--accent); }
.pk-label { margin-top: 0.55em; font-size: 1em; font-weight: 500; line-height: 1.2; }
.pk-label small { display: block; margin-top: 0.1em; color: var(--pk-2); font-size: 0.9em; }
.pk-num { margin-top: 0.45em; font-size: 0.9em; color: var(--pk-3); }

.picker-slot {
  position: absolute; left: 0; top: 0; z-index: 20;
  transform: translate(var(--px, 20em), var(--py, 12em));
}
.picker-slot .picker {
  font-size: 0.72em;
  opacity: 0;
  transform: scale(0.94) translateY(0.4em);
  transform-origin: 50% 0;
  transition: opacity 0.18s ease, transform 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  pointer-events: none;
}
.picker-slot .picker.is-open { opacity: 1; transform: none; }

/* Trace + scene controls */

.demo figcaption { margin-top: 18px; }

.trace {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0; padding: 0; list-style: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.trace li {
  display: grid; gap: 3px; padding: 14px 18px;
  border-left: 1px solid var(--line);
  transition: opacity 0.3s, background 0.3s;
}
.trace li:first-child { border-left: 0; }
.t-label { color: var(--ink-3); font-size: 12.5px; font-weight: 500; }
.t-val { font-size: 14.5px; font-weight: 550; min-height: 1.4em; }
.trace li.is-wait { opacity: 0.35; }
.trace li.is-wait .t-val { visibility: hidden; }
.trace li.is-miss .t-val { color: var(--ink-2); font-weight: 450; }
.trace li.is-hit { background: var(--accent-soft); }
.trace li.is-hit .t-val { color: var(--accent); }

.scenes { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; }
.scene-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.scene-tabs button, .pause {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: transparent; color: var(--ink-2);
  font: 500 14px/1 var(--sans); cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.scene-tabs button:hover, .pause:hover { color: var(--ink); border-color: var(--ink-3); }
.scene-tabs button[aria-pressed="true"] { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-ink); }
.scene-tabs button[aria-pressed="true"] kbd { background: transparent; color: inherit; border-color: currentColor; }
.scene-tabs kbd { font-size: 12px; height: 20px; min-width: 20px; }
.pause { width: 34px; padding: 0; justify-content: center; flex: none; }
.pause svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pause .p-play { display: none; fill: currentColor; }
.pause[aria-pressed="true"] .p-pause { display: none; }
.pause[aria-pressed="true"] .p-play { display: block; }

/* Sections */

.section { padding: 120px 0; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.kicker { margin-bottom: 14px; color: var(--accent); font-size: 14px; font-weight: 600; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -0.035em; line-height: 1.04; }
.section-head p:not(.kicker), .section-lead { margin-top: 18px; color: var(--ink-2); font-size: 18px; text-wrap: pretty; }

/* Flow */

.flow { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.flow li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.flow .n {
  align-self: start;
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line-2);
  color: var(--ink-2); font: 600 14px/1 var(--mono);
}
.flow li:last-child .n { background: var(--accent); border-color: var(--accent); color: #fff; }
.flow h3 { font-size: 21px; letter-spacing: -0.02em; }
.flow-text p { margin-top: 8px; color: var(--ink-2); font-size: 16px; max-width: 52ch; text-wrap: pretty; }
.flow-text code, .mini-rules code { padding: 1px 5px; border-radius: 5px; background: var(--bg-2); color: var(--ink); }

.flow-eg { display: flex; flex-direction: column; gap: 6px; }
.url {
  padding: 9px 12px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line);
  font: 13px/1.4 var(--mono); overflow-wrap: anywhere;
}
.url.before { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 60%, transparent); }
.url.after { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.url.after::before { content: "→ "; color: var(--accent); }

.keyrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.keyrow kbd { font-size: 15px; }
.arrow { margin: 0 6px; color: var(--ink-3); }
.chip {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line-2);
  font-size: 13.5px; font-weight: 550;
}
.chip-accent { background: var(--accent); border-color: var(--accent); color: #fff; }

.mini-card, .mini-rules {
  padding: 14px 16px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 14px;
}
.mini-title { display: flex; justify-content: space-between; gap: 12px; font-weight: 650; }
.mini-title span { color: var(--ink-3); font-weight: 450; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tags code { padding: 3px 8px; border-radius: 6px; background: var(--bg-2); font-size: 12.5px; }
.mini-rules { display: grid; gap: 0; padding: 4px 16px; }
.mini-rules p { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.mini-rules p:last-child { border-bottom: 0; }
.mini-rules p span:last-child { color: var(--ink-2); white-space: nowrap; }

/* Picker section */

.section-picker { background: var(--bg-2); border-block: 1px solid var(--line); }
.picker-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px; align-items: center; }

.keys-list { display: grid; margin: 32px 0 0; border-bottom: 1px solid var(--line); }
.keys-list div { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.keys-list dt { display: flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.keys-list dd { margin: 0; font-size: 15px; }
.fine { margin-top: 24px; color: var(--ink-2); font-size: 15px; text-wrap: pretty; }

.try { display: grid; justify-items: center; gap: 18px; }
.try-bg {
  display: grid; place-items: center;
  width: 100%;
  padding: 72px 24px;
  border-radius: 22px;
  background:
    radial-gradient(80% 90% at 15% 100%, #e59a6b 0%, rgba(229, 154, 107, 0) 60%),
    linear-gradient(180deg, #3a4a5e 0%, #6a7486 60%, #b98b78 100%);
  box-shadow: var(--shadow-lg);
}
@media (prefers-color-scheme: dark) {
  .try-bg {
    background:
      radial-gradient(80% 90% at 15% 100%, #9c5a37 0%, rgba(156, 90, 55, 0) 60%),
      linear-gradient(180deg, #151c26 0%, #2a3442 60%, #5b4136 100%);
  }
}
.try .picker { font-size: clamp(11px, 1.35vw, 15px); cursor: default; transition: opacity 0.2s, transform 0.25s; }
.try .picker:focus-visible { box-shadow: 0 0 0 3px var(--accent), 0 0.9em 2.2em -0.2em rgba(0, 0, 0, 0.35); }
.try .picker.is-gone { opacity: 0; transform: scale(0.96); }
.try-out { min-height: 1.6em; color: var(--ink-2); font-size: 15px; text-align: center; }
.try-out b { color: var(--ink); font-weight: 600; }

/* Settings tour */

.tour { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 48px; align-items: start; }
.tour-tabs { display: grid; gap: 4px; }
.tour-tabs button {
  display: grid; gap: 4px;
  padding: 16px 18px;
  border: 0; border-radius: 12px;
  background: transparent; color: var(--ink-3);
  font: inherit; text-align: left; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tour-tabs b { color: var(--ink-2); font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.tour-tabs span { font-size: 14.5px; line-height: 1.45; }
.tour-tabs button:hover b { color: var(--ink); }
.tour-tabs button[aria-selected="true"] { background: var(--card); color: var(--ink-2); box-shadow: 0 0 0 1px var(--line); }
.tour-tabs button[aria-selected="true"] b { color: var(--ink); }

.shot img {
  width: 100%; height: auto;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line-2), var(--shadow-lg);
  animation: shot-in 0.35s ease-out;
}
@keyframes shot-in { from { opacity: 0; transform: translateY(6px); } }

/* Details */

.section-details { padding-top: 40px; padding-bottom: 80px; }
.details-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 64px; align-items: start; }
.menubar-shot { margin: 36px 0 0; }
.menubar-shot img { width: 100%; max-width: 295px; height: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-2), 0 18px 40px -18px rgba(0, 0, 0, 0.4); }
.menubar-shot figcaption { margin-top: 12px; color: var(--ink-3); font-size: 14px; }

.details { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin: 0; }
.details div { padding: 20px 0; border-top: 1px solid var(--line); }
.details dt { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.details dd { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; text-wrap: pretty; }

/* Open source */

.oss {
  display: grid; justify-items: center; text-align: center;
  padding: 88px 32px;
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line);
}
.oss-icon { width: 112px; height: 112px; margin-bottom: 28px; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.28)); }
.oss p:not(.meta) { max-width: 560px; margin-top: 18px; color: var(--ink-2); font-size: 18px; text-wrap: pretty; }
.oss .meta { margin-top: 16px; }

.install {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  width: 100%; max-width: 900px; margin: 48px 0 0; padding: 32px 0 0; list-style: none;
  border-top: 1px solid var(--line);
  text-align: left;
}
.install li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.install .n {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--ink-2); font: 600 13px/1 var(--mono);
}
.oss .install p { max-width: none; margin: 4px 0 0; font-size: 15px; }

.oss-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 24px 40px;
  margin-top: 20px; padding: 32px 36px;
  border-radius: 20px; box-shadow: 0 0 0 1px var(--line);
}
.oss-foot h3 { font-size: 20px; letter-spacing: -0.02em; }
.oss-foot p { max-width: 560px; margin-top: 6px; color: var(--ink-2); font-size: 15.5px; text-wrap: pretty; }
.oss-foot-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }

/* Footer */

.site-footer { padding: 36px 0 48px; }
.footer-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; color: var(--ink-3); font-size: 14px; }
.footer-inner .brand { color: var(--ink); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-left: auto; }
.footer-nav { align-items: center; }
.footer-nav a, .footer-note a { text-decoration: none; }
.footer-note a:hover { color: var(--ink); }
.footer-x svg { width: 15px; height: 15px; }
.footer-nav a:hover { color: var(--ink); }

/* Responsive */

@media (max-width: 980px) {
  .hero-top, .picker-grid, .tour, .details-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-top { gap: 24px; margin-bottom: 40px; }
  .picker-grid, .details-grid { gap: 48px; }
  .tour { gap: 24px; }
  .tour-tabs { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none; }
  .tour-tabs span { display: none; }
  .tour-tabs button { padding: 10px 16px; border-radius: 999px; }
  .tour-tabs b { font-size: 15px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .site-nav { display: none; }
  .bar { justify-content: space-between; }
  .hero { padding: 40px 0 24px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 36px; }
  .trace { grid-template-columns: 1fr 1fr; }
  .trace li:nth-child(3) { border-left: 0; }
  .trace li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .scenes { align-items: flex-start; }
  .flow li { grid-template-columns: 40px minmax(0, 1fr); gap: 14px 16px; padding: 26px 0; }
  .flow-eg { grid-column: 2; }
  .details { grid-template-columns: 1fr; }
  .keys-list div { grid-template-columns: 110px 1fr; }
  .try-bg { padding: 48px 12px; }
  .oss { padding: 64px 20px; }
  .footer-nav { margin-left: 0; }
  .install { grid-template-columns: 1fr; margin-top: 36px; }
  .oss-foot { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
  .bar-actions { gap: 6px; }
}

/* On small screens the stage switches to a taller layout so the text stays readable. */
@container (max-width: 620px) {
  .desk { font-size: calc(100cqw / 30); aspect-ratio: 30 / 44; }
  .mb-left span { display: none; }
  .chat { left: 1em; top: 2.6em; width: 28em; height: 19em; }
  .msgs { padding: 1.1em; gap: 1.1em; }
  .browser { left: 1em; top: 16em; width: 28em; height: 26.5em; }
  .br-tab { width: 11em; }
  .br-nav { display: none; }
  .br-page { padding: 1.3em 1.4em; }
  .wk-body { grid-template-columns: 1fr; }
  .wk-img { display: none; }
  .keys { bottom: 1em; }
}

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