:root {
  /* Warm limestone base — drifting washes sit on top */
  --void: #e9e2d8;
  --surface: #f7f3ed;
  --surface-2: #e3ddd4;
  --ink: 32,28,25;
  --indigo: #6366f1;
  --periwinkle: #818cf8;
  --active-text: #4338ca;
  --border: rgba(var(--ink),0.1);
  --backdrop: rgba(0,0,0,0.72);
  --toast-bg: #e8e2d9;
  --shadow: rgba(55,42,30,0.14);
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace;
  --ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --label: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;

  /* Muted-text tiers — see "Theming implementation" note in CLAUDE.md for why
     light mode needs higher alpha than dark mode at the same nominal tier.
     :root's plain values are the LIGHT (boosted) set, since light is default. */
  --t-icon: rgba(var(--ink),0.58);
  --t-placeholder: rgba(var(--ink),0.64);
  --t-clear: rgba(var(--ink),0.68);
  --t-tab: rgba(var(--ink),0.68);
  --t-cat: rgba(var(--ink),0.64);
  --t-desc: rgba(var(--ink),0.68);
  --t-hint: rgba(var(--ink),0.84);
  --t-empty: rgba(var(--ink),0.64);
  --t-empty-strong: rgba(var(--ink),0.78);
  --t-footer-hint: rgba(var(--ink),0.66);
  --t-footer-credit: rgba(var(--ink),0.72);
  --t-footer-support: rgba(var(--ink),0.78);
  --section-gap: 80px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --void: #0b0b0f;
    --surface: #18181b;
    --surface-2: #1f1f24;
    --ink: 255,255,255;
    --active-text: #c7d2fe;
    --toast-bg: #27272a;
    --shadow: rgba(0,0,0,0.6);
    --t-icon: rgba(var(--ink),0.46);
    --t-placeholder: rgba(var(--ink),0.54);
    --t-clear: rgba(var(--ink),0.62);
    --t-tab: rgba(var(--ink),0.66);
    --t-cat: rgba(var(--ink),0.56);
    --t-desc: rgba(var(--ink),0.6);
    --t-hint: rgba(var(--ink),0.78);
    --t-empty: rgba(var(--ink),0.56);
    --t-empty-strong: rgba(var(--ink),0.74);
    --t-footer-hint: rgba(var(--ink),0.58);
    --t-footer-credit: rgba(var(--ink),0.62);
    --t-footer-support: rgba(var(--ink),0.72);
  }
}
:root[data-theme="dark"] {
  --void: #0b0b0f; --surface: #18181b; --surface-2: #1f1f24; --ink: 255,255,255;
  --active-text: #c7d2fe; --toast-bg: #27272a; --shadow: rgba(0,0,0,0.6);
  --t-icon: rgba(var(--ink),0.46); --t-placeholder: rgba(var(--ink),0.54);
  --t-clear: rgba(var(--ink),0.62); --t-tab: rgba(var(--ink),0.66);
  --t-cat: rgba(var(--ink),0.56); --t-desc: rgba(var(--ink),0.6);
  --t-hint: rgba(var(--ink),0.78); --t-empty: rgba(var(--ink),0.56);
  --t-empty-strong: rgba(var(--ink),0.74); --t-footer-hint: rgba(var(--ink),0.58);
  --t-footer-credit: rgba(var(--ink),0.62);
  --t-footer-support: rgba(var(--ink),0.72);
}
:root[data-theme="light"] {
  --void: #e9e2d8; --surface: #f7f3ed; --surface-2: #e3ddd4; --ink: 32,28,25;
  --active-text: #4338ca; --toast-bg: #e8e2d9; --shadow: rgba(55,42,30,0.14);
  --t-icon: rgba(var(--ink),0.58); --t-placeholder: rgba(var(--ink),0.64);
  --t-clear: rgba(var(--ink),0.68); --t-tab: rgba(var(--ink),0.68);
  --t-cat: rgba(var(--ink),0.64); --t-desc: rgba(var(--ink),0.68);
  --t-hint: rgba(var(--ink),0.84); --t-empty: rgba(var(--ink),0.64);
  --t-empty-strong: rgba(var(--ink),0.78); --t-footer-hint: rgba(var(--ink),0.66);
  --t-footer-credit: rgba(var(--ink),0.72);
  --t-footer-support: rgba(var(--ink),0.78);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  color-scheme: light dark;
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  background: transparent;
  color: rgba(var(--ink),0.92);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
}
/* Atmosphere — static washes (no animated blur blobs; those jitter on scroll). */
html {
  background-color: var(--void);
  background-image:
    radial-gradient(ellipse 90% 55% at 12% -8%, rgba(99,102,241,0.11), transparent 58%),
    radial-gradient(ellipse 70% 50% at 96% 108%, rgba(129,140,248,0.09), transparent 55%),
    linear-gradient(165deg, rgba(99,102,241,0.03) 0%, transparent 42%, rgba(129,140,248,0.025) 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) html {
    background-image:
      radial-gradient(ellipse 90% 55% at 12% -8%, rgba(99,102,241,0.14), transparent 58%),
      radial-gradient(ellipse 70% 50% at 96% 108%, rgba(129,140,248,0.1), transparent 55%),
      linear-gradient(165deg, rgba(99,102,241,0.04) 0%, transparent 42%, rgba(129,140,248,0.03) 100%);
  }
}
:root[data-theme="dark"] html {
  background-image:
    radial-gradient(ellipse 90% 55% at 12% -8%, rgba(99,102,241,0.14), transparent 58%),
    radial-gradient(ellipse 70% 50% at 96% 108%, rgba(129,140,248,0.1), transparent 55%),
    linear-gradient(165deg, rgba(99,102,241,0.04) 0%, transparent 42%, rgba(129,140,248,0.03) 100%);
}
:root[data-theme="light"] html {
  background-image:
    radial-gradient(ellipse 90% 55% at 12% -8%, rgba(99,102,241,0.11), transparent 58%),
    radial-gradient(ellipse 70% 50% at 96% 108%, rgba(129,140,248,0.09), transparent 55%),
    linear-gradient(165deg, rgba(99,102,241,0.03) 0%, transparent 42%, rgba(129,140,248,0.025) 100%);
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ── Top bar ── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 22px 28px 0;
}
.topbar-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: rgba(var(--ink),0.88);
  text-decoration: none;
  line-height: 1;
}
.topbar-mark .topbar-logo {
  height: 26px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .topbar-mark .topbar-logo {
    filter: invert(1);
  }
}
:root[data-theme="dark"] .topbar-mark .topbar-logo {
  filter: invert(1);
}
:root[data-theme="light"] .topbar-mark .topbar-logo {
  filter: none;
}
.topbar-install {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--indigo), var(--periwinkle));
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(99,102,241,0.28);
  transition: transform 0.1s, box-shadow 0.1s;
}
.topbar-install:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99,102,241,0.36);
}
.topbar-install svg { flex-shrink: 0; }

.theme-toggle {
  appearance: none;
  -webkit-appearance: none;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: rgba(var(--ink),0.78);
  box-shadow: 0 8px 24px var(--shadow);
  cursor: pointer;
}
.theme-toggle:hover {
  color: rgba(var(--ink),0.95);
  filter: brightness(1.03);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--active-text);
  outline-offset: 3px;
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ── Hero ── */

.hero {
  position: relative;
  padding: 56px 0 56px;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  left: 50%; top: 72%;
  width: min(640px, 120%);
  height: 220px;
  transform: translate(-50%, -40%);
  background:
    radial-gradient(ellipse at center, rgba(99,102,241,0.06), transparent 68%);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
@media (min-width: 800px) {
  .hero::before {
    top: 78%;
    height: 260px;
  }
}
.eyebrow {
  font-family: var(--label); font-size: 12px; font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(var(--ink),0.4);
  margin-bottom: 22px;
}
h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(32px, 5.2vw, 52px); line-height: 1.12;
  letter-spacing: -0.025em;
  /* Non-zero letter-spacing disables optional ligatures by default;
     re-enable so "fi" in "fingertips" uses Playfair's ligature. */
  font-feature-settings: "liga" 1;
  white-space: nowrap;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  color: rgba(var(--ink),0.92);
}
.lede {
  font-family: var(--sans); font-size: 18px; font-weight: 400;
  color: rgba(var(--ink),0.58);
  white-space: nowrap;
  width: fit-content;
  max-width: 100%;
  margin: 28px auto 0;
}

@media (max-width: 720px) {
  h1, .lede { white-space: normal; }
  h1 { font-size: clamp(28px, 7vw, 40px); }
}

.cta-row {
  margin-top: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 56px;
}
.cta-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  color: #fff; background: linear-gradient(135deg, var(--indigo), var(--periwinkle));
  padding: 13px 26px; border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(99,102,241,0.35);
  transition: transform 0.1s, box-shadow 0.1s;
  border: none;
  cursor: pointer;
}
.cta-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(99,102,241,0.42); }
.cta-btn svg { flex-shrink: 0; }
.cta-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--label);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(var(--ink),0.55);
  background: transparent;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
}
.cta-btn-secondary:hover { color: var(--active-text); }
.hero-try-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}
.hero-try-label {
  font-family: var(--label);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(var(--ink),0.4);
  margin-bottom: 6px;
}
.hero-try-keys {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}
.hero-try-keys:hover .keycap {
  color: var(--active-text);
  border-color: rgba(99,102,241,0.35);
}
.hero-try-keys .keycap {
  font-size: 18px;
  padding: 10px 16px;
}
.hero-try-wrap > .trigger-aside {
  margin-top: 10px;
}

.trigger {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.keycap-row { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
button.keycap-row {
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}
button.keycap-row:hover .keycap {
  color: var(--active-text);
  border-color: rgba(99,102,241,0.35);
}
.keycap {
  font-family: var(--mono); font-weight: 600; font-size: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 11px;
  box-shadow: 0 2px 0 var(--border);
  color: rgba(var(--ink),0.7);
}
.keycap-plus { font-family: var(--mono); color: rgba(var(--ink),0.3); font-size: 13px; }
.trigger-aside {
  font-family: var(--label);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(var(--ink),0.42);
  text-align: center;
}

/* ── Capability sections ── */

.capabilities {
  margin: 0 0 var(--section-gap);
  padding-top: 16px;
}
.capability {
  padding: 104px 0;
}
.cap-stack + .cap-lead {
  padding-top: 96px;
}
.cap-stack:has(+ .cap-lead) {
  padding-bottom: 96px;
}
.cap-stack + .cap-mirror {
  padding-top: 104px;
}
.cap-lead + .cap-mirror {
  padding-top: 96px;
}
.cap-mirror + .cap-lead {
  padding-top: 96px;
}
.cap-mirror + .cap-stack {
  padding-top: 96px;
}
.cap-lead + .cap-stack {
  padding-top: 96px;
}
.cap-lead:has(+ .cap-mirror),
.cap-mirror:has(+ .cap-lead),
.cap-mirror:has(+ .cap-stack),
.cap-lead:has(+ .cap-stack) {
  padding-bottom: 96px;
}
.capability h3 {
  font-family: var(--display);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0 0 14px;
  white-space: nowrap;
}
.capability .cap-lede {
  font-size: 17px;
  line-height: 1.45;
  color: rgba(var(--ink),0.55);
  margin: 0 0 4px;
  max-width: 18em;
}
.cap-lead {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 48px;
  justify-content: flex-start;
  padding-bottom: 104px;
}
.cap-lead .cap-viz {
  flex: 1 1 auto;
  max-width: 660px;
  min-width: 0;
}
.cap-lead .cap-copy {
  flex: 0 1 340px;
  min-width: min(100%, 12.5em);
  padding-left: 0;
}
.cap-lead .cap-lede {
  max-width: none;
}
.cap-mirror {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 48px;
  justify-content: space-between;
}
.cap-mirror .cap-copy {
  flex: 0 1 340px;
  padding-right: 0;
}
.cap-mirror .cap-viz {
  flex: 1 1 auto;
  max-width: 660px;
  min-width: 0;
}
.cap-mirror .cap-lede {
  max-width: none;
}
@media (min-width: 721px) {
  #commands .cap-copy {
    flex: 0 1 auto;
    max-width: none;
  }
  #commands .cap-lede {
    /* Fits “…menu, minus”; wraps before “digging…” */
    max-width: 34ch;
  }
  :root[data-platform="pc"] #recently-closed .cap-copy {
    flex: 0 1 auto;
    max-width: none;
  }
  :root[data-platform="pc"] #recently-closed .cap-lede {
    /* Fits “…biased,”; wraps before “Summon…” */
    max-width: 36ch;
  }
  #downloads .cap-copy {
    flex: 0 1 auto;
    max-width: none;
  }
  #downloads .cap-lede {
    /* Fits “…somewhere…”; wraps before “Summon…” */
    max-width: 32ch;
  }
  #downloads .cap-viz {
    flex: 1 1 auto;
    max-width: 660px;
  }
}
#recently-closed .try-chips,
#commands .try-chips,
#downloads .try-chips {
  flex-wrap: wrap;
}
#recently-closed .try-chips .try-label,
#commands .try-chips .try-label,
#downloads .try-chips .try-label {
  flex: 0 0 100%;
  margin: 0 0 8px;
}
#recently-closed .try-chip,
#commands .try-chip,
#downloads .try-chip {
  flex-shrink: 0;
  padding: 7px 10px 6px;
  font-size: 12px;
}
.cap-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 72px;
}
.cap-stack h3 {
  margin-bottom: 8px;
}
#search-everything h3 {
  margin-bottom: 20px;
}
#page-actions h3 {
  margin-bottom: 20px;
}
.cap-stack .cap-lede {
  max-width: none;
  white-space: nowrap;
  font-size: 16px;
  margin: 0;
}
#page-actions .cap-lede,
#search-everything .cap-lede {
  white-space: normal;
}
.cap-viz {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.cap-viz .palette.palette-shot {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: none;
  pointer-events: none;
  user-select: none;
  box-sizing: border-box;
}
.cap-viz .palette-shot .footer { display: none; }
.cap-viz .palette-shot .results {
  overflow: hidden;
  flex: none;
  max-height: none;
}
/* Tab strip matches the live demo (.tabs-row / .tab) — no compact overrides. */
.cap-viz .palette-shot .tabs-row {
  /* Extra end gutter so Settings isn’t flush when the strip is scrolled right */
  padding-right: 18px;
}
.cap-viz .palette-shot .search-input.shot-query {
  display: flex;
  align-items: center;
  cursor: default;
}
@media (max-width: 720px) {
  .cap-viz .palette-shot .search-row {
    padding: 10px 12px;
    gap: 8px;
  }
}

.try-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 28px;
}
.try-chips .try-label {
  font-family: var(--label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--ink),0.38);
  margin-right: 4px;
}
.cap-stack > .try-chips {
  margin-top: 16px; /* keep preview→chips closer to the original 48px rhythm */
  justify-content: center;
  row-gap: 12px;
}
.cap-stack > .try-chips .try-label {
  flex: 0 0 100%;
  text-align: center;
  margin: 10px 0 6px;
}
.try-chip {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgba(var(--ink),0.88);
  background: var(--surface);
  border: 1px solid rgba(var(--ink),0.14);
  border-bottom-width: 2px;
  border-radius: 7px;
  padding: 8px 12px 7px;
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.12s, color 0.12s, background 0.12s;
}
.try-chip:hover {
  border-color: rgba(99,102,241,0.5);
  color: var(--active-text);
}
.try-chip:active {
  transform: translateY(1px);
  border-bottom-width: 1px;
  padding-bottom: 8px;
}

.demo-stage .palette.demo-pulse {
  animation: demo-pulse 0.9s ease;
}
@keyframes demo-pulse {
  0% { box-shadow: 0 24px 48px var(--shadow), 0 0 0 0 rgba(99,102,241,0.55); }
  35% { box-shadow: 0 24px 48px var(--shadow), 0 0 0 4px rgba(99,102,241,0.35); }
  100% { box-shadow: 0 24px 48px var(--shadow), 0 0 0 1px rgba(var(--ink),0.04) inset; }
}

@media (max-width: 720px) {
  .cap-lead,
  .cap-mirror {
    flex-direction: column;
    align-items: stretch;
    gap: 36px;
  }
  .cap-lead .cap-viz,
  .cap-lead .cap-copy,
  .cap-mirror .cap-viz,
  .cap-mirror .cap-copy {
    max-width: none;
    flex: none;
    width: 100%;
  }
  /* Keep copy above the preview on mobile for both side-by-side layouts. */
  .cap-lead .cap-copy { order: -1; }
  .cap-lead,
  .cap-mirror {
    gap: 0;
  }
  /* Stack sections: title → Try in demo → preview (same as lead/mirror). */
  .cap-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .cap-stack > .cap-copy { order: 1; }
  .cap-stack > .try-chips { order: 2; }
  .cap-stack > .cap-viz { order: 3; margin-top: 0; }
  .cap-stack .cap-lede { white-space: normal; }
  .capability { padding: 40px 0; }
  .cap-stack + .cap-lead,
  .cap-lead + .cap-mirror,
  .cap-mirror + .cap-lead,
  .cap-mirror + .cap-stack,
  .cap-lead + .cap-stack {
    padding-top: 40px;
  }
  .cap-stack:has(+ .cap-lead),
  .cap-lead:has(+ .cap-mirror),
  .cap-mirror:has(+ .cap-lead),
  .cap-mirror:has(+ .cap-stack),
  .cap-lead:has(+ .cap-stack) {
    padding-bottom: 40px;
  }
  .cap-stack { padding-bottom: 32px; }
  .capabilities-head { margin-bottom: 28px; }
  .capability h3 { font-size: clamp(24px, 6vw, 30px); }
  /* Equal space above & below Try-in-demo chips. */
  .try-chips,
  .cap-stack > .try-chips,
  .cap-lead .try-chips,
  .cap-mirror .try-chips {
    margin-top: 20px;
    margin-bottom: 20px;
  }
  .cap-stack > .try-chips {
    justify-content: flex-start;
    row-gap: 8px;
  }
  .cap-stack > .try-chips .try-label {
    flex: 0 0 auto;
    text-align: left;
    margin: 0 4px 0 0;
  }
  #recently-closed .try-chips .try-label,
  #commands .try-chips .try-label,
  #downloads .try-chips .try-label {
    flex: 0 0 auto;
    margin: 0 4px 0 0;
  }
  .cap-viz .palette-shot .item-hint { display: none; }
  .cap-viz .palette-shot .result-item { gap: 9px; padding: 6px 10px; }
  .cap-viz .palette-shot .item-desc { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .try-chip { transition: none; }
  .try-chip:active { transform: none; }
  .demo-stage .palette.demo-pulse { animation: none; }
}

/* ── Category rail ── */

.rail { padding: 0 0 var(--section-gap); }
.rail-head { margin-bottom: 36px; }
.rail-head .eyebrow { margin-bottom: 10px; }
.rail-head h2 {
  font-family: var(--display); font-size: clamp(22px, 3vw, 28px); font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}
.capabilities-head {
  text-align: center;
  margin-bottom: 56px;
}
.capabilities-head .eyebrow { margin-bottom: 10px; }
.capabilities-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-feature-settings: "liga" 1;
  color: rgba(var(--ink),0.92);
  text-wrap: pretty;
}
.capabilities-head + .capability {
  padding-top: 56px;
}
@media (max-width: 720px) {
  .capabilities-head h2 { font-size: clamp(26px, 6.5vw, 36px); }
}
.trophies {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 640px) {
  .trophies { grid-template-columns: 1fr 1fr; }
}
.trophy {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}
.trophy:active {
  transform: translateY(-1px);
}
.trophy:focus-visible {
  outline: 2px solid var(--active-text);
  outline-offset: 3px;
}
.trophy.is-pressed {
  border-color: rgba(99,102,241,0.5);
  background: rgba(99,102,241,0.07);
}
.trophy .g {
  width: 40px;
  height: 40px;
  margin: 0 auto 15px;
  border-radius: 10px;
  background: rgba(var(--ink),0.04);
  color: rgba(var(--ink),0.55);
  display: grid;
  place-items: center;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.trophy:focus-visible .g,
.trophy.is-pressed .g {
  background: rgba(99,102,241,0.14);
  color: var(--active-text);
  transform: scale(1.06);
}
.trophy .g svg {
  width: 20px;
  height: 20px;
  display: block;
}
.trophy .t {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
  line-height: 1.25;
}
.trophy .s {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.4;
  color: rgba(var(--ink),0.55);
  max-width: 22ch;
  margin: 0 auto;
}
.trophy .try {
  display: block;
  margin-top: 12px;
  font-family: var(--label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--active-text);
  opacity: 0.85;
}
.trophy:focus-visible .try,
.trophy.is-pressed .try {
  opacity: 1;
}
/* Hover-only polish: gate so touch doesn't get sticky :hover. */
@media (hover: hover) and (pointer: fine) {
  .trophy:hover {
    transform: translateY(-3px);
    border-color: rgba(99,102,241,0.32);
    box-shadow: 0 10px 28px var(--shadow);
  }
  .trophy:hover .g {
    background: rgba(99,102,241,0.14);
    color: var(--active-text);
    transform: scale(1.06);
  }
  .trophy:hover .try {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .trophy,
  .trophy .g {
    transition: none;
  }
  .trophy:hover,
  .trophy:active {
    transform: none;
  }
  .trophy:hover .g,
  .trophy:focus-visible .g,
  .trophy.is-pressed .g {
    transform: none;
  }
}

/* ── Install (closing CTA) ── */

.install {
  position: relative;
  padding: 0 0 var(--section-gap);
  text-align: center;
}
.install::before {
  content: '';
  position: absolute;
  left: 50%; top: 20%;
  width: min(720px, 120%);
  height: 240px;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at center, rgba(99,102,241,0.06), transparent 68%);
  pointer-events: none;
  z-index: 0;
}
@media (min-width: 800px) {
  .install::before {
    top: 60%;
    transform: translate(-50%, -40%);
    height: 280px;
  }
}
.install-inner {
  position: relative; z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: none;
  margin: 0 auto;
}
.install .eyebrow { margin-bottom: 16px; }
.install h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(28px, 3.8vw, 38px); line-height: 1.2;
  letter-spacing: -0.025em;
  white-space: nowrap;
  margin: 0 0 28px;
}
.install-lede {
  font-family: var(--sans); font-size: 17px; font-weight: 400;
  color: rgba(var(--ink),0.55);
  white-space: nowrap;
  margin: 0;
  line-height: 1.45;
}
.install-lede a {
  color: var(--active-text);
  text-decoration: none;
  border-bottom: 1.5px solid rgba(99,102,241,0.45);
}
.install-lede a:hover {
  border-bottom-color: var(--indigo);
}
.install .cta-row { margin-top: 32px; }

.install-note {
  margin-top: 40px;
  font-family: var(--label); font-size: 12.5px; font-weight: 500;
  color: rgba(var(--ink),0.38);
  line-height: 1.5;
  white-space: nowrap;
}
.install-note a {
  font-family: var(--label); font-size: 12px; font-weight: 500;
  color: rgba(var(--ink),0.55);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.install-note a:hover {
  color: var(--indigo);
  border-color: var(--indigo);
}

@media (max-width: 800px) {
  .install h2, .install-lede, .install-note { white-space: normal; }
}
@media (max-width: 640px) {
  :root { --section-gap: 64px; }
  .hero { padding-top: 48px; }
}

footer {
  padding: 0 0 48px; text-align: center;
  font-family: var(--label); font-size: 12px; font-weight: 500;
  color: rgba(var(--ink),0.35);
}
footer .footer-line { display: block; }
footer .footer-line + .footer-line { margin-top: 6px; }
footer a { color: rgba(var(--ink),0.5); text-decoration: none; border-bottom: 1px solid var(--border); }
footer a:hover { color: var(--indigo); border-color: var(--indigo); }
footer .love-flip {
  font: inherit; font-weight: 500; color: rgba(var(--ink),0.5);
  background: none; border: none; padding: 0; cursor: pointer;
  border-bottom: 1px solid var(--border);
}
footer .love-flip:hover { color: var(--indigo); border-color: var(--indigo); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--indigo); outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════════════════════
   Command palette — copied class-for-class from the real extension's
   content.js STYLES, not reimagined for the site. Same markup, same CSS,
   same search/navigate/select behavior, embedded directly in the page
   (rather than the extension's own hidden-until-triggered overlay) so it's
   visible as part of the page itself.
   ══════════════════════════════════════════════════════════════════════ */

.demo-stage {
  /* Break out of .wrap (960px) so language-fitted palettes can grow. */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0 24px var(--section-gap);
  box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; gap: 36px;
}
.demo-sponsor {
  font-family: var(--label); font-size: 12.5px; font-weight: 500;
  color: rgba(var(--ink),0.38);
  line-height: 1.5;
  text-align: center;
}
.demo-sponsor a {
  color: rgba(var(--ink),0.55);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.demo-sponsor a:hover {
  color: var(--indigo);
  border-color: var(--indigo);
}

.palette {
  background: var(--surface);
  border: 1px solid rgba(var(--ink),0.1);
  border-radius: 14px;
  /* --palette-w: 920 for English; other langs grow only if the footer overflows.
     Don't use 100% here — .wrap would cap us at ~912px. */
  width: min(var(--palette-w, 920px), calc(100vw - 48px));
  max-width: min(var(--palette-w, 920px), calc(100vw - 48px));
  max-height: min(560px, calc(100vh - 14vh - 48px));
  display: flex; flex-direction: column;
  box-shadow: 0 24px 48px var(--shadow), 0 0 0 1px rgba(var(--ink),0.04) inset;
  overflow: hidden;
  font-family: var(--ui);
  line-height: normal;
  overscroll-behavior: none;
}

.search-row {
  display: flex; align-items: center; padding: 13px 16px; gap: 10px;
  border-bottom: 1px solid rgba(var(--ink),0.07); flex-shrink: 0;
}
.search-icon { flex-shrink: 0; color: var(--t-icon); }
.search-input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: rgba(var(--ink),0.92); font-size: 15px; font-family: inherit;
  caret-color: var(--periwinkle);
}
/* No selection ring on the search box — matches the real extension, which
   never shows one here either. Higher specificity than the generic
   button/link focus-visible rule above so it reliably wins. */
.search-input:focus, .search-input:focus-visible { outline: none; }
.search-input::placeholder { color: var(--t-placeholder); }
/* Shrink the hint on narrow palettes so the full placeholder still fits. */
@media (max-width: 720px) {
  .search-input { font-size: 13px; }
}
@media (max-width: 480px) {
  .search-input { font-size: 12px; }
}
/* iOS Safari zooms the page when focusing inputs under 16px. Keep the live
   demo field at 16px so tapping the preview doesn’t zoom the viewport.
   Static capability shots use a div.shot-query, not this input. */
.demo-stage input.search-input {
  font-size: 16px;
}
.clear-btn {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(var(--ink),0.12); border: none; color: var(--t-clear);
  font-size: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
}
.clear-btn.visible { opacity: 1; pointer-events: auto; }
.clear-btn:hover { background: rgba(var(--ink),0.2); }

.tabs-row {
  display: flex; gap: 2px; padding: 6px 10px;
  border-bottom: 1px solid rgba(var(--ink),0.07); flex-shrink: 0;
  overflow-x: auto; scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.tabs-row::-webkit-scrollbar { display: none; }
.tab {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 100px;
  border: none; background: transparent; color: var(--t-tab);
  font-size: 12px; font-weight: 500; cursor: pointer; font-family: inherit;
  transition: background 0.08s, color 0.08s; user-select: none; white-space: nowrap;
}
.tab:hover { background: rgba(var(--ink),0.07); color: rgba(var(--ink),0.82); }
.tab.active { background: rgba(99,102,241,0.18); color: var(--active-text); }
.tab-count {
  background: rgba(var(--ink),0.1);
  border-radius: 100px; padding: 1px 5px;
  font-size: 10px; min-width: 18px; text-align: center;
  display: none;
}
.tab-count.visible { display: inline-block; }
.tab.active .tab-count { background: rgba(99,102,241,0.3); }

.results { overflow-x: hidden; overflow-y: auto; flex: 1; padding: 4px 0 6px; overscroll-behavior: none; }
.results::-webkit-scrollbar { width: 5px; }
.results::-webkit-scrollbar-track { background: transparent; }
.results::-webkit-scrollbar-thumb { background: rgba(var(--ink),0.1); border-radius: 3px; }

.category-label {
  padding: 10px 18px 3px; font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--t-cat); user-select: none;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.category-label .cat-sep {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  vertical-align: middle;
  position: relative;
  top: -0.12em;
  margin: 0 0.35em;
  opacity: 0.9;
}
.result-item {
  display: flex; align-items: center; gap: 11px;
  padding: 7px 12px; margin: 1px 6px; border-radius: 8px; cursor: pointer; user-select: none;
}
.result-item:hover  { background: rgba(var(--ink),0.065); }
.result-item.active { background: rgba(99,102,241,0.2); }
.result-item.active .item-label { color: var(--active-text); }

.item-icon {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 7px;
  background: rgba(var(--ink),0.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1; color: rgba(var(--ink),0.74); overflow: hidden;
  position: relative;
}
.item-icon img { width: 18px; height: 18px; object-fit: contain; }
.item-icon svg { width: 16px; height: 16px; display: block; flex-shrink: 0; }
.item-icon .icon-letter {
  font-size: 13px; font-weight: 600; line-height: 1;
  user-select: none;
}
.item-icon .icon-fav {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px; height: 18px;
  opacity: 0;
}
.item-icon .icon-fav.is-loaded { opacity: 1; }
.item-icon:has(.icon-fav.is-loaded) .icon-letter { visibility: hidden; }
.item-body { flex: 1; min-width: 0; }
.item-label {
  display: flex; align-items: center; gap: 6px;
  color: rgba(var(--ink),0.88); font-size: 13.5px;
  min-width: 0;
}
.item-label-text {
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.item-label mark { background: rgba(129,140,248,0.28); color: inherit; border-radius: 2px; }
.item-desc {
  color: var(--t-desc); font-size: 11.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 5px;
}
@media (max-width: 640px) {
  .demo-stage .result-item {
    align-items: flex-start;
  }
  .demo-stage .item-hint {
    margin-top: 4px;
  }
  .demo-stage .item-label-text {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  .demo-stage .hint-key {
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
  }
  .demo-stage .hint-key svg {
    width: 12px;
    height: 12px;
  }
  .demo-stage .hint-key.hint-text {
    font-size: 11px;
  }
}
.item-hint {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: none;
  padding: 0;
  color: var(--t-hint);
}
.hint-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(var(--ink),0.1);
  color: inherit;
}
.hint-key svg {
  width: 13px;
  height: 13px;
  display: block;
  flex-shrink: 0;
}
.hint-key.hint-text {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--ui);
  letter-spacing: 0.2px;
  line-height: 1;
}
.item-audible {
  flex-shrink: 0; width: 18px; height: 18px; color: rgba(var(--ink),0.68);
  display: flex; align-items: center; justify-content: center;
}
.item-audible svg { width: 16px; height: 16px; display: block; }
.result-item.active .item-audible { color: var(--active-text); }
.item-group-dot {
  flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(var(--ink),0.12);
}

.empty { padding: 44px 24px; text-align: center; color: var(--t-empty); font-size: 13.5px; }
.empty strong { color: var(--t-empty-strong); font-weight: 500; }

.footer {
  padding: 8px 16px; border-top: 1px solid rgba(var(--ink),0.06);
  display: flex; align-items: center; flex-shrink: 0;
  flex-wrap: wrap;
  row-gap: 10px; column-gap: 14px;
}
.footer-hint {
  font-size: 13px; color: var(--t-footer-hint);
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0; white-space: nowrap;
}
@media (max-width: 900px) {
  .footer {
    justify-content: center;
    row-gap: 14px;
    column-gap: 10px;
    padding: 14px 12px;
  }
  .footer-credits {
    margin-left: 0;
    flex-basis: 100%;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 10px;
    column-gap: 10px;
  }
}
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(var(--ink),0.12);
  color: rgba(var(--ink),0.76);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--ui);
  line-height: 1;
}
.kbd svg {
  width: 12px;
  height: 12px;
  display: block;
  flex-shrink: 0;
  color: inherit;
}
.footer-credits {
  margin-left: auto; display: flex; align-items: center; gap: 5px;
  flex-shrink: 0;
}
.footer-credit {
  font-size: 12px; font-weight: 500; color: var(--active-text);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--active-text) 45%, transparent);
  text-underline-offset: 2.5px;
  white-space: nowrap; cursor: pointer;
  transition: color 0.1s, text-decoration-color 0.1s, opacity 0.1s;
}
button.footer-credit {
  font-family: inherit; font-weight: 500; font-size: 12px;
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--active-text);
}
.footer-credit:hover {
  text-decoration-color: var(--active-text);
  opacity: 0.85;
}
.footer-credit:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
  border-radius: 2px;
}
.footer-credit .love-flip {
  font: inherit; color: inherit; background: none; border: none; padding: 0;
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.footer-credit .love-flip:hover { opacity: 0.85; }
.footer-credit a { color: inherit; text-decoration: inherit; text-underline-offset: 2.5px; }
.footer-support { display: inline-flex; align-items: center; gap: 5px; }
.footer-support svg { width: 13px; height: 13px; flex-shrink: 0; display: block; }
.footer-credits-sep { color: rgba(var(--ink),0.45); font-size: 13px; font-weight: 600; user-select: none; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--toast-bg); border: 1px solid rgba(var(--ink),0.1);
  border-radius: 8px; padding: 10px 16px;
  color: rgba(var(--ink),0.85); font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 1000; white-space: nowrap; font-family: var(--ui);
  animation: cp-toast-in 0.12s ease-out; pointer-events: none;
  display: none;
}
.toast.visible { display: block; }
@keyframes cp-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(5px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.confetti-layer {
  position: fixed; inset: 0;
  pointer-events: none; overflow: hidden;
  z-index: 1100;
}
.confetti-piece {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--w); height: var(--h);
  background: var(--c);
  border-radius: 1px;
  opacity: 1;
  animation: confetti-fly var(--dur) cubic-bezier(0.15, 0.75, 0.35, 1) forwards;
  animation-delay: var(--delay);
}
@keyframes confetti-fly {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .confetti-layer { display: none; }
}
