:root {
  color-scheme: light;
  /* Mirrors the desktop app's "Quiet Workbench" tokens in DESIGN.md. */
  --ink: #37352f;
  --muted: #6b6a67;
  --soft: #8d8c88;
  --paper: #f7f7f5;
  --surface: #ffffff;
  --surface-muted: #f1f1ef;
  --field: #ededeb;
  --border: #e6e6e3;
  --border-strong: #d0d0cc;
  --accent: #2f6f8f;
  --accent-hover: #285f7b;
  --accent-soft: rgba(47, 111, 143, 0.08);
  --accent-border: rgba(47, 111, 143, 0.24);
  --prompt: #a97822;
  --skill: #4c63a1;
  --mcp: #2f7651;
  --orange: #f06438;
  --success: #2f7651;
  --shadow: 0 12px 32px rgba(55, 53, 47, 0.08);
  --radius-large: 14px;
  --radius-medium: 10px;
  --radius-small: 7px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

main section[id] {
  scroll-margin-top: 80px;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

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

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 64px;
  border-bottom: 1px solid var(--border);
  background: rgba(247, 247, 245, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 760;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

nav a,
footer a {
  text-decoration: none;
}

nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

nav a:hover,
.language-switch button:hover {
  color: var(--ink);
  background: var(--surface-muted);
}

.language-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}

.language-switch button {
  min-width: 42px;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.language-switch button.active {
  color: #fff;
  background: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: start;
  gap: clamp(32px, 3.6vw, 44px);
  min-height: 0;
  padding: 54px 0 72px;
}

.hero-copy {
  padding-top: clamp(20px, 3vw, 40px);
}

.hero-copy,
.section-heading,
.api-band > div:first-child,
.download-section > div:first-child {
  min-width: 0;
}

.hero-kicker,
.section-tag {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.section-tag {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-small);
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(38px, 4.4vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

html[lang="zh-CN"] h1 {
  letter-spacing: -0.01em;
}

.hero-title span {
  display: block;
}

/* The three beats read as one sentence; the last one carries the name. */
.hero-title span + span {
  margin-top: 0.06em;
}

.hero-title span:not(:last-child) {
  color: var(--muted);
}

h2 {
  margin: 0;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.32;
}

.lede {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
}

.mascot-swap {
  --mascot-frame-cycle: 2.4s;
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}

.mascot-swap-ding {
  --mascot-frame-cycle: 1.4s;
}

.mascot-frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mascot-frame-one {
  animation: mascot-frame-one var(--mascot-frame-cycle) steps(1, end) infinite;
}

.mascot-frame-two {
  animation: mascot-frame-two var(--mascot-frame-cycle) steps(1, end) infinite;
}

@keyframes mascot-frame-one {
  0%, 49.999% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes mascot-frame-two {
  0%, 49.999% { opacity: 0; }
  50%, 100% { opacity: 1; }
}

.actions,
.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.primary,
.secondary,
.github-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.primary {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

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

.secondary,
.github-star {
  color: var(--ink);
  background: var(--surface);
}

.github-star {
  gap: 8px;
}

.github-star img {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.secondary:hover,
.github-star:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
}

.primary:active,
.secondary:active,
.github-star:active {
  transform: translateY(1px);
}

.product-stage {
  position: relative;
  width: 390px;
  max-width: 100%;
  min-width: 0;
  justify-self: end;
}

.macos-menu-bar {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.02em;
}

.macos-alert-palette {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.menu-alert {
  display: inline-flex;
  min-width: 42px;
  height: 24px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px 7px 2px 4px;
  border-radius: 999px;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.menu-alert-mascot {
  width: 16px;
  height: 16px;
}

.menu-alert.is-orange {
  background: #db7333;
}

.menu-alert.is-pink {
  background: #e85991;
}

.menu-alert.is-blue {
  background: #3b7ddd;
}

.menu-alert.is-green {
  background: #2f9d68;
}

.menu-alert.is-purple {
  min-width: 50px;
  background: #8c5bd6;
}

.demo-window {
  --ink: #1b242c;
  --muted: #6d7274;
  --soft: #a09f9a;
  --surface: #fffefc;
  --surface-muted: #f8f7f4;
  --chrome: #eef0ef;
  --field: #f0efec;
  --border: #dcdddc;
  --border-strong: #d2d4d3;
  --accent: #2b5877;
  --accent-hover: #244d69;
  --accent-soft: #e7f0f5;
  --accent-border: #bfd1dc;
  --success: #739477;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 700px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 15px;
  color: var(--ink);
  background: #f5f5f2;
  box-shadow: 0 10px 28px rgba(39, 43, 46, 0.07);
}

.demo-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 55px;
  padding: 10px 16px 7px 19px;
  background: var(--chrome);
}

.demo-title strong {
  display: block;
  font-size: 19px;
  font-weight: 760;
  line-height: 1;
}

.demo-title-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.demo-mascot {
  display: inline-flex;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  appearance: none;
  cursor: pointer;
}

.demo-mascot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.demo-mascot img {
  display: block;
  width: 35px;
  height: 35px;
  transform-origin: 50% 70%;
}

.demo-mascot.is-shaking img {
  animation: dingdong-mascot-shake 520ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.demo-title-lockup {
  display: inline-flex;
  min-width: 0;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}

.demo-version {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

@keyframes dingdong-mascot-shake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  18% { transform: translateX(-1px) rotate(-9deg); }
  36% { transform: translateX(1px) rotate(8deg); }
  54% { transform: translateX(-1px) rotate(-6deg); }
  72% { transform: translateX(1px) rotate(4deg); }
  88% { transform: translateX(0) rotate(-2deg); }
}

/* Connected devices, Settings, Hide: the same three buttons as the app header. */
.demo-title-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.demo-title-actions span {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-muted);
}

.demo-title-actions img {
  width: 15px;
  height: 15px;
  opacity: 0.58;
}

.demo-agent-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 8px;
}

.demo-agent-heading .demo-section-label {
  margin: 0;
}

.demo-agent-window {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
  font-size: 9px;
  font-weight: 700;
}

.demo-agent-clock {
  width: 8px;
  height: 8px;
  border: 1.2px solid currentColor;
  border-radius: 50%;
}

.demo-connections b {
  position: absolute;
  top: -1px;
  right: -2px;
  display: inline-flex;
  min-width: 15px;
  height: 15px;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1.5px solid var(--chrome);
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
}

.demo-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px 17px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--chrome);
}

.demo-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 36px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.demo-tabs button img {
  width: 17px;
  height: 17px;
  opacity: 0.58;
}

.demo-tabs button:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-soft);
}

.demo-tabs button.active {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-soft);
}

.demo-tabs button.active img {
  opacity: 0.92;
}

.demo-panel {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.demo-today-view,
.demo-library-view,
.demo-clipboard-view {
  height: 100%;
  min-height: 0;
}

.demo-today-view {
  padding: 14px 16px 12px;
  overflow-y: auto;
  scrollbar-width: none;
}

.demo-today-view::-webkit-scrollbar {
  display: none;
}

.demo-status-card,
.demo-metric-card,
.demo-agent-row,
.demo-resource-row,
.demo-clipboard-toolbar,
.demo-clipboard-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.demo-status-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 61px;
  padding: 10px 12px 9px;
}

.demo-status-copy {
  min-width: 0;
}

.demo-status-copy b {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-status-time {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.demo-ready-state {
  margin-left: 12px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.demo-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.demo-metric-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 72px;
  padding: 8px 6px;
}

.demo-metric-value {
  display: flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.demo-metric-symbol {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

.demo-metric-card b,
.demo-metric-card span {
  display: block;
}

.demo-metric-card b {
  overflow: hidden;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-metric-card span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.demo-section-label {
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.demo-agent-list {
  display: grid;
  gap: 7px;
}

.demo-agent-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 55px;
  padding: 9px 11px;
}

.demo-agent-symbol {
  width: 18px;
  height: 18px;
  opacity: 0.82;
}

.demo-agent-copy {
  min-width: 0;
}

.demo-agent-copy b {
  display: block;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-agent-copy p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-agent-row time {
  color: var(--soft);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 8px;
  font-weight: 600;
}

.demo-enabled-list {
  display: grid;
  gap: 7px;
}

.demo-enabled-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 8px;
  min-height: 92px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.demo-enabled-card.type-prompt {
  background: #fbf7ed;
}

.demo-enabled-card.type-skill {
  background: #f2f5fb;
}

.demo-enabled-card.type-mcp {
  background: #fbe9e3;
}

.demo-enabled-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
}

.demo-library-view {
  padding: 14px 16px 16px;
}

.demo-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.demo-library-context {
  color: var(--soft);
  font-size: 10px;
  font-weight: 600;
}

.demo-manage-button,
.demo-library-filters button,
.demo-filter-button,
#demo-copy-action {
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.demo-manage-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 96px;
  min-height: 34px;
  padding: 0 12px;
  border-color: var(--accent);
  border-radius: 9px;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
}

.demo-manage-symbol {
  width: 17px;
  height: 17px;
  filter: brightness(0) invert(1);
}

.demo-search-surface {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 36px;
  margin-top: 10px;
  gap: 8px;
  padding: 0 12px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-search-symbol {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  opacity: 0.58;
}

.demo-search-surface span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-library-filters,
.demo-library-groups {
  display: flex;
  gap: 6px;
  margin-top: 9px;
  overflow: hidden;
}

.demo-library-filters button {
  flex: 1 1 0;
  min-width: 0;
  height: 33px;
  padding: 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-library-filters button.active {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 11px;
}

.demo-library-groups button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.demo-library-groups button b {
  min-width: 19px;
  padding: 2px 6px;
  border-radius: 6px;
  color: #fff;
  background: var(--muted);
  font-size: 9px;
  line-height: 1.2;
}

.demo-library-groups button.active {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-soft);
}

.demo-library-groups button.active b {
  background: var(--accent);
}

.demo-resource-tags span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--muted);
  background: var(--field);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.demo-resource-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.demo-resource-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 8px;
  min-height: 116px;
  padding: 12px 11px 10px 14px;
  border-radius: 9px;
}

.demo-resource-row.type-prompt {
  background: #fbf7ed;
}

.demo-resource-row.type-skill {
  background: #f2f5fb;
}

.demo-resource-row.type-mcp {
  background: #fbe9e3;
}

.demo-resource-row.is-disabled {
  opacity: 0.58;
}

.demo-clipboard-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--accent);
  background: var(--field);
  font-size: 9px;
  font-weight: 780;
}

.demo-resource-symbol {
  width: 20px;
  height: 20px;
  justify-self: center;
  opacity: 0.72;
}

.demo-resource-copy,
.demo-clipboard-copy {
  min-width: 0;
}

.demo-resource-copy b,
.demo-resource-copy p,
.demo-clipboard-copy b,
.demo-clipboard-copy p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-resource-copy b,
.demo-clipboard-copy b {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.demo-resource-copy p,
.demo-clipboard-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.demo-resource-tags {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  overflow: hidden;
}

.demo-resource-tags span {
  font-size: 9px;
}

.demo-resource-row.type-prompt .demo-resource-tags span:first-child {
  color: #75684f;
  background: #f0ebdd;
}

.demo-resource-row.type-skill .demo-resource-tags span:first-child {
  color: #4c63a1;
  background: #e9ebf7;
}

.demo-resource-row.type-mcp .demo-resource-tags span:first-child {
  color: #d65332;
  background: #fbe9e3;
}

.demo-resource-actions {
  display: grid;
  grid-template-columns: repeat(2, 30px);
  gap: 4px;
}

.demo-resource-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(240, 239, 236, 0.72);
}

.demo-resource-action img {
  width: 16px;
  height: 16px;
  opacity: 0.58;
}

.demo-resource-action.action-status.is-enabled {
  color: var(--success);
  background: rgba(115, 148, 119, 0.13);
}

.demo-resource-action.action-status.is-disabled {
  color: var(--soft);
  background: var(--field);
}

.demo-enabled-status-icon {
  width: 16px;
  height: 16px;
}

.demo-resource-action.action-delete img {
  opacity: 0.5;
}

.demo-clipboard-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
}

.demo-clipboard-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.demo-clipboard-toolbar .demo-search-surface {
  height: 34px;
  margin-top: 0;
  background: var(--field);
}

.demo-clipboard-filters {
  display: flex;
  min-height: 30px;
  flex: 0 0 30px;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.demo-clipboard-filters::-webkit-scrollbar {
  display: none;
}

.demo-clipboard-filters button {
  flex: 0 0 auto;
  min-width: 0;
  height: 30px;
  padding: 0 5px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.demo-clipboard-filters button.active {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-soft);
}

.demo-filter-button {
  min-height: 34px;
  padding: 0 9px;
}

.demo-filter-button {
  position: relative;
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.demo-filter-button img {
  width: 17px;
  height: 17px;
  opacity: 0.62;
}

.demo-filter-indicator {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--accent-soft);
  border-radius: 50%;
  background: var(--accent);
}

.demo-filter-button.active {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-soft);
}

.demo-clipboard-list {
  display: grid;
  gap: 8px;
}

.demo-clipboard-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 9px;
  min-height: 68px;
  padding: 9px 10px;
}

.demo-clipboard-kind img {
  width: 17px;
  height: 17px;
  opacity: 0.62;
}

.demo-clipboard-row.is-new {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  animation: demo-row-in 260ms ease-out;
}

@keyframes demo-row-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.demo-clipboard-thumbnail {
  width: 38px;
  height: 38px;
  padding: 5px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--field);
}

.demo-clipboard-row time {
  color: var(--soft);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 8px;
  font-weight: 650;
  text-align: right;
}

.demo-footer {
  flex: 0 0 auto;
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  font-size: 9px;
  font-weight: 600;
}

.demo-copy-simulator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px 10px;
  width: 100%;
  max-width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.demo-copy-sample {
  min-width: 0;
}

.demo-copy-sample span,
.demo-copy-sample code {
  display: block;
}

.demo-copy-sample span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.demo-copy-sample code {
  margin-top: 5px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#demo-copy-action {
  min-width: 68px;
  min-height: 38px;
  padding: 0 12px;
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

#demo-copy-action.is-copied {
  border-color: #b9cdbd;
  color: var(--success);
  background: #f1f7f3;
}

#demo-copy-action:active {
  transform: translateY(1px);
}

.demo-feedback {
  grid-column: 1 / -1;
  min-height: 16px;
  margin: 0;
  color: var(--soft);
  font-size: 9px;
  line-height: 1.45;
}

.demo-feedback.is-success {
  color: var(--success);
}


.setup-card,
.api-band,
.download-section,
.download-card {
  border: 1px solid var(--border);
  background: var(--surface);
}

.section-heading p,
.setup-card p,
.tool-grid p,
.api-band p,
.download-section p,
.download-card span {
  color: var(--muted);
  line-height: 1.58;
}

.feature-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.6fr);
  gap: 40px;
  padding: 56px 0 24px;
}

.feature-list {
  display: grid;
  gap: 22px;
  margin: 0;
}

.feature-list > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(0, 1.45fr);
  gap: 24px;
}

.feature-list dt {
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.feature-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* Shortcut sheet: every default shortcut at a glance, by platform. */
.shortcut-sheet {
  margin-top: 26px;
}

.shortcut-platform {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-small);
  background: var(--surface-muted);
}

.shortcut-platform button {
  min-height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.shortcut-platform button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(55 53 47 / 12%);
}

.shortcut-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 40px;
  margin-top: 22px;
}

.shortcut-group h3 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.shortcut-group dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.shortcut-group dl > div {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.shortcut-group dt {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.shortcut-group dt kbd {
  display: inline-flex;
  min-width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 -2px 0 var(--border);
  font: 700 12px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

.shortcut-group dd {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.shortcut-sheet[data-platform="mac"] .shortcut-win,
.shortcut-sheet[data-platform="win"] .shortcut-mac,
.shortcut-sheet[data-platform="win"] .is-mac-only {
  display: none;
}

.shortcut-mac,
.shortcut-win {
  display: contents;
}

.defaults-details {
  margin-top: 22px;
}

.defaults-details > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  color: var(--ink);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.defaults-details > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.defaults-details[open] > summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.defaults-details > summary:hover {
  background: var(--surface-muted);
}

.device-section {
  padding: 62px 0 32px;
}

.device-section-heading {
  max-width: 940px;
}

.device-section-heading h2 {
  max-width: 900px;
  text-wrap: balance;
}

.device-showcase {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.48fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-top: 28px;
  padding: 48px 30px 30px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background:
    radial-gradient(circle at 50% 8%, rgb(39 118 154 / 9%), transparent 36%),
    linear-gradient(150deg, #f7fbfc 0%, var(--surface) 52%, #fff8f5 100%);
}

.illustration-label {
  position: absolute;
  top: 16px;
  right: 18px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--soft);
  background: rgb(255 255 255 / 78%);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.connected-device-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 18px 48px rgb(36 49 55 / 8%);
}

.connected-device-title {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
}

.connected-device-title > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.connected-device-title small {
  color: var(--soft);
  font-size: 11px;
  font-weight: 680;
}

.connected-device-title strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connected-device-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--surface-muted);
}

.connected-device-icon img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.connected-device-app-icon {
  overflow: hidden;
  background: #e8f3f6;
}

.connected-device-app-icon img {
  width: 44px;
  height: 44px;
}

.device-online {
  padding: 5px 8px;
  border-radius: 999px;
  color: #287452;
  background: #eaf6ef;
  font-size: 10px;
  font-weight: 780;
}

.connected-setting-list {
  display: grid;
  gap: 0;
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

.connected-setting-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.connected-setting-list b {
  color: var(--ink);
  font-size: 11px;
  text-align: right;
}

.device-route {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--muted);
  text-align: center;
}

.device-route-line {
  position: relative;
  width: 100%;
  height: 1px;
  margin-bottom: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.device-route-line::before,
.device-route-line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
  transform: translateY(-50%);
}

.device-route-line::before {
  left: 0;
}

.device-route-line::after {
  right: 0;
}

.device-route strong {
  color: var(--ink);
  font-size: 12px;
}

.device-route small {
  max-width: 170px;
  font-size: 10px;
  line-height: 1.45;
}

.mobile-agent-card,
.mobile-clipboard-card {
  display: grid;
  align-items: center;
  margin-top: 12px;
  border-radius: 14px;
}

.mobile-agent-card {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  background: #fff2f5;
}

.mobile-agent-card img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.mobile-agent-card div {
  min-width: 0;
}

.mobile-agent-card strong,
.mobile-clipboard-card span {
  display: block;
  font-size: 12px;
}

.mobile-agent-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.mobile-clipboard-card {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--border);
}

.mobile-clipboard-card img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.mobile-clipboard-card b {
  color: var(--accent);
  font-size: 10px;
}

.device-guardrails {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.device-guardrails article {
  padding: 14px 0 0;
}

.device-guardrails strong {
  font-size: 14px;
}

.device-guardrails p,
.device-platform-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.device-guardrails p {
  margin: 7px 0 0;
}

.device-platform-note {
  max-width: 940px;
  margin: 14px 0 0;
}

.resource-system {
  padding: 58px 0 26px;
}

.resource-map {
  display: grid;
  grid-template-columns: minmax(210px, 0.9fr) minmax(230px, 0.92fr) minmax(240px, 1fr);
  gap: 42px;
  align-items: stretch;
  margin-top: 26px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface-muted);
}

.resource-stack,
.resource-delivery {
  position: relative;
  display: grid;
  gap: 8px;
}

.resource-stack::after,
.resource-bridge-node::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -32px;
  color: var(--soft);
  font-size: 18px;
  font-weight: 720;
  transform: translateY(-50%);
}

.resource-node {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 10px;
  background: var(--surface);
}

.resource-node img {
  width: 24px;
  height: 24px;
  justify-self: center;
  opacity: 0.72;
}

.resource-node strong,
.resource-node span,
.resource-delivery strong,
.resource-delivery small {
  display: block;
}

.resource-node strong {
  font-size: 13px;
}

.resource-node span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.resource-prompt {
  border-left-color: #b08d60;
}

.resource-skill {
  border-left-color: #7185a7;
}

.resource-mcp {
  border-left-color: #ad725f;
}

.resource-bridge-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 20px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
}

.resource-bridge-node > img {
  width: 44px;
  height: 44px;
}

.resource-bridge-node > span {
  margin-top: 9px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 760;
}

.resource-bridge-node > strong {
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.25;
}

.resource-bridge-node > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.scope-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 12px;
}

.scope-chips span {
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 9px;
  font-weight: 700;
}

.resource-delivery article {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.resource-delivery article > span {
  color: var(--accent);
  font-size: 9px;
  font-weight: 790;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.resource-delivery strong {
  margin-top: 4px;
  font-size: 12px;
}

.resource-delivery small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.agent-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 11px 2px;
}

.agent-strip > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.agent-strip strong,
.agent-strip-request {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}

.agent-support-note {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.conversation-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
  align-items: end;
  margin-top: 28px;
}

.conversation-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.conversation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.conversation-example {
  min-width: 0;
  padding: 16px 0 0;
}

.example-kind {
  color: var(--accent);
  font-size: 10px;
  font-weight: 790;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.user-message {
  min-height: 68px;
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 680;
  line-height: 1.55;
}

.example-result {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.conversation-receipt {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: 22px;
  align-items: center;
  margin-top: 10px;
  padding: 18px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-medium);
  background: var(--accent-soft);
}

.hero .conversation-receipt {
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  max-width: 680px;
  margin-top: 28px;
  padding: 16px;
}

.conversation-receipt h4 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.conversation-receipt-copy > p {
  max-width: 68ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.conversation-receipt-copy > .conversation-receipt-note {
  color: var(--ink);
  font-size: 12px;
}

.conversation-receipt-sample {
  --terminal-copy-size: 13px;
  --terminal-copy-line-height: 1.55;
  min-width: 0;
  overflow: hidden;
  padding: 14px 14px 10px;
  border: 1px solid #243b4d;
  border-radius: 8px;
  color: #f5f7f8;
  background: #132636;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.terminal-demo-intro {
  min-height: 54px;
  color: #6f94b7;
}

.terminal-demo-intro p {
  margin: 0;
  font-size: var(--terminal-copy-size);
  line-height: var(--terminal-copy-line-height);
}

.terminal-demo-intro p + p {
  margin-top: 7px;
}

.terminal-demo-intro strong {
  color: #ff7417;
  font-size: inherit;
  font-weight: 700;
}

.terminal-demo-intro span {
  margin-left: 4px;
}

.terminal-demo-prompt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 7px 0;
  border-top: 1px solid #e86a20;
  border-bottom: 1px solid #e86a20;
}

.terminal-demo-prompt > span {
  color: #ff7417;
  font-size: 18px;
  line-height: 1;
}

.terminal-demo-prompt input {
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 0;
  outline: 0;
  color: #f5f7f8;
  background: transparent;
  caret-color: #f5f7f8;
  font: inherit;
  font-size: var(--terminal-copy-size);
  line-height: 1.5;
}

.terminal-demo-prompt button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #31506a;
  border-radius: 6px;
  color: #f5f7f8;
  background: #1b3549;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.terminal-demo-prompt button:hover {
  border-color: #4d708d;
  background: #23435a;
}

.terminal-demo-prompt button:focus-visible {
  outline: 2px solid #79a0c3;
  outline-offset: 2px;
}

.terminal-demo-prompt input:focus,
.terminal-demo-prompt input:focus-visible {
  border: 0;
  outline: 0;
  box-shadow: none;
}

.terminal-demo-prompt button:disabled,
.terminal-demo-prompt input:disabled {
  cursor: wait;
  opacity: 0.58;
}

.terminal-demo-input-hint {
  display: block;
  margin-top: 7px;
  color: #6f94b7;
  font-size: 9.5px;
  line-height: 1.4;
}

.terminal-demo-output {
  min-height: 120px;
  padding: 8px 0 12px;
}

.terminal-demo-output > p {
  margin: 0;
  color: #79a0c3;
  font-size: var(--terminal-copy-size);
  line-height: var(--terminal-copy-line-height);
}

.terminal-demo-output > .terminal-demo-submitted {
  margin-bottom: 8px;
  color: #f5f7f8;
  overflow-wrap: anywhere;
}

.terminal-demo-output.is-thinking > p {
  color: #d8a64a;
  animation: terminal-thinking 1s ease-in-out infinite;
}

.terminal-demo-output.is-thinking > .terminal-demo-submitted {
  color: #f5f7f8;
  animation: none;
}

@keyframes terminal-thinking {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.terminal-demo-dingdong {
  display: block;
  margin-top: 8px;
  color: #c5d2dd;
  font-size: var(--terminal-copy-size);
  line-height: var(--terminal-copy-line-height);
  overflow-wrap: anywhere;
  white-space: normal;
}

.terminal-demo-dingdong b {
  color: #6f94b7;
  font-weight: 500;
}

.terminal-demo-dingdong .is-prompt {
  color: #d8a64a;
}

.terminal-demo-dingdong .is-skill {
  color: #91a8e8;
}

.terminal-demo-dingdong .is-mcp {
  color: #8bb29e;
}

.terminal-demo-dingdong .is-token {
  color: #d8c489;
  font-variant-numeric: tabular-nums;
}

.terminal-demo-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  color: #6f94b7;
  font-size: 10px;
  line-height: 1.4;
}

.terminal-demo-status span:last-child {
  text-align: right;
}

@media (prefers-reduced-motion: reduce) {
  .terminal-demo-output.is-thinking > p {
    animation: none;
  }
}

.defaults-section {
  padding: 54px 0 24px;
}

.defaults-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 30px;
  margin-top: 26px;
}

.defaults-panel {
  min-width: 0;
  padding-top: 18px;
}

.defaults-panel > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.defaults-table-scroll {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.defaults-panel table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.4;
}

.defaults-panel th,
.defaults-panel td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.defaults-panel tr:last-child td {
  border-bottom: 0;
}

.defaults-panel th {
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.defaults-panel td:first-child {
  color: var(--ink);
  font-weight: 680;
}

.defaults-panel td:not(:first-child) {
  color: var(--muted);
}

.defaults-panel kbd,
.defaults-panel code {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  color: var(--ink);
  background: var(--surface-muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.94em;
  font-weight: 700;
  white-space: nowrap;
}

html[lang="zh-CN"] .defaults-panel th {
  letter-spacing: 0;
  text-transform: none;
}

.sound-section {
  margin: 28px 0 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
}

.sound-heading {
  max-width: 760px;
}

.section-heading .sound-life-note {
  display: block;
  max-width: 680px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  color: var(--soft);
  background: transparent;
  font-size: 11px;
  line-height: 1.5;
}

.sound-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.sound-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 10px;
  min-width: 0;
  min-height: 110px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  color: var(--muted);
  background: var(--surface-muted);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.sound-card:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.sound-card:active {
  transform: translateY(1px);
}

.sound-card.is-playing {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.sound-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink);
}

.sound-card-title img {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.sound-card-title strong {
  font-size: 15px;
  line-height: 1.3;
}

.sound-card > span:nth-child(2) {
  grid-column: 1 / -1;
  font-size: 12px;
  line-height: 1.45;
}

.sound-listen {
  align-self: center;
  padding: 4px 8px;
  border: 1px solid var(--accent-border);
  border-radius: 7px;
  color: var(--accent);
  background: var(--surface);
  font-size: 11px;
  font-weight: 760;
}

.sound-card.is-playing .sound-listen {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.voice-library {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-top: 16px;
  padding: 22px 24px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-medium);
  background: var(--accent-soft);
}

.voice-library h3 {
  margin: 0;
  font-size: 19px;
}

.voice-library p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.voice-library-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.voice-library-samples li {
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  font-size: 12px;
  font-weight: 650;
}

.voice-library-actions {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.voice-library-open {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 18px;
  border-radius: var(--radius-small);
  color: #fff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
  white-space: nowrap;
}

.voice-library-open:hover {
  background: var(--accent-hover);
}

.voice-library-submit {
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
}

.sound-custom {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(160px, auto);
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: var(--paper);
}

.sound-custom-mascot {
  width: 42px;
  height: 42px;
}

.sound-custom p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

#sound-status {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 720;
  text-align: right;
}

.mcp-section {
  padding: 56px 0 18px;
}

.section-heading {
  max-width: 820px;
}

.section-heading.resource-system-heading {
  max-width: 1080px;
}

.resource-system-heading h2 {
  max-width: 1080px;
  text-wrap: balance;
}

.section-heading p {
  max-width: 760px;
  margin: 14px 0 0;
  font-size: 17px;
}

/* The generic paragraph margin above would pull the heading up against it. */
.section-heading .section-tag {
  margin: 0 0 18px;
  font-size: 12px;
}

.agent-prompt-card {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
}

.agent-prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px 18px;
  border-bottom: 1px solid var(--border);
}

.agent-prompt-header > div {
  min-width: 0;
}

.agent-prompt-kicker {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.agent-prompt-header h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.agent-prompt-header p:not(.agent-prompt-kicker) {
  max-width: 680px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.agent-prompt-copy {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.agent-prompt-copy:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.agent-prompt-copy:active {
  transform: translateY(1px);
}

.agent-prompt-copy.is-copied {
  border-color: var(--success);
  background: var(--success);
}

.agent-prompt-copy.has-error {
  border-color: #a24f48;
  background: #a24f48;
}

.agent-prompt-copy img {
  width: 18px;
  height: 18px;
  filter: invert(1);
}

.agent-prompt-content {
  max-height: 390px;
  padding: 18px 22px;
  border: 0;
  border-radius: 0;
  background: var(--surface-muted);
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.agent-prompt-content code {
  display: block;
}

.agent-prompt-status {
  min-height: 38px;
  margin: 0;
  padding: 10px 22px;
  border-top: 1px solid var(--border);
  color: var(--soft);
  background: var(--surface);
  font-size: 12px;
  line-height: 1.45;
}

/* Stays in the accessibility tree as a live region; takes no space until it has a message. */
.agent-prompt-status:empty {
  min-height: 0;
  padding: 0;
  border-top: 0;
}

.setup-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(0, 1.18fr);
  gap: 24px;
  align-items: start;
  margin-top: 22px;
  padding: 22px;
  border-radius: var(--radius-large);
}

.setup-steps {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
}

html[lang="zh-CN"] .agent-prompt-kicker {
  letter-spacing: 0.04em;
  text-transform: none;
}

html[lang="zh-CN"] .hero h1 {
  max-width: 100%;
  font-size: clamp(38px, 3.8vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.045em;
  overflow-wrap: normal;
  word-break: keep-all;
}

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

.setup-snippets {
  display: grid;
  gap: 10px;
  min-width: 0;
}

pre {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 15px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #2c3339;
  background: var(--surface-muted);
  font-size: 12px;
  line-height: 1.55;
}

code,
kbd,
pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
  row-gap: 18px;
  margin-top: 26px;
}

.tool-grid article {
  min-width: 0;
}

.tool-grid code {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
  white-space: normal;
}

.tool-grid p {
  margin: 8px 0 0;
  font-size: 13px;
}

.api-band,
.download-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  margin-top: 28px;
  padding: 24px;
  border-radius: var(--radius-large);
}

.api-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.api-title img {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
  .mascot-frame-one,
  .mascot-frame-two {
    animation: none;
  }

  .mascot-frame-one {
    opacity: 1;
  }

  .mascot-frame-two {
    opacity: 0;
  }
}

.endpoint-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.endpoint-list code {
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
  background: var(--surface-muted);
  font-size: 12px;
  font-weight: 700;
}

.download-section {
  grid-template-columns: 1fr;
  margin-bottom: 56px;
}

.download-section p {
  margin: 12px 0 0;
}

.download-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: stretch;
  margin-top: 0;
}

.download-stats[hidden] {
  display: none;
}

.download-stats {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: var(--surface);
}

.download-stat-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.download-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.download-stat-row b {
  color: var(--ink);
}

.download-card {
  display: block;
  flex: 1 1 200px;
  min-width: 0;
  padding: 16px;
  border-radius: var(--radius-medium);
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.download-card:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.download-card strong,
.download-card span {
  display: block;
}

.download-card-heading {
  display: flex !important;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.download-card-heading strong,
.download-card-heading .download-badge {
  display: inline-block;
}

.download-card strong {
  font-size: 15px;
}

.download-card span {
  margin-top: 5px;
  font-size: 12px;
}

.download-card-heading,
.download-card-heading .download-badge {
  margin-top: 0 !important;
}

.download-badge {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 10px !important;
  font-weight: 760;
  line-height: 1.3;
}

.download-badge[hidden] {
  display: none !important;
}

.recommendation-badge {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.download-card.is-recommended {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.download-notes {
  display: grid;
  gap: 4px;
}

.download-notes .download-help {
  margin: 0;
}

.download-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 26px 0 34px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

footer span {
  color: var(--ink);
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 28px;
  }

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

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  nav {
    display: none;
  }

  .hero,
  .feature-section,
  .device-showcase,
  .resource-map,
  .conversation-heading,
  .conversation-receipt,
  .defaults-grid,
  .setup-card,
  .api-band,
  .download-section {
    grid-template-columns: 1fr;
  }

  .device-route-line {
    width: min(72%, 320px);
  }

  .agent-prompt-header {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
  }

  .agent-prompt-copy {
    width: 100%;
  }

  .agent-prompt-content {
    max-height: 340px;
    padding: 16px 18px;
  }

  .agent-prompt-status {
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero {
    min-height: 0;
    gap: 52px;
    padding: 58px 0 52px;
  }

  .hero-copy {
    padding-top: 0;
  }

  .product-stage {
    width: min(100%, 390px);
    margin: 0 auto;
  }

  .resource-map {
    gap: 10px;
  }

  .resource-stack::after,
  .resource-bridge-node::after {
    display: none;
  }

  .conversation-grid {
    grid-template-columns: 1fr;
  }

  .user-message {
    min-height: 0;
  }

  .agent-strip > span {
    flex-basis: 100%;
  }

  .sound-custom {
    grid-template-columns: auto 1fr;
  }

  .voice-library {
    grid-template-columns: 1fr;
  }

  .connect-paths {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .shortcut-groups {
    grid-template-columns: 1fr;
  }

  .shortcut-group dl > div {
    grid-template-columns: minmax(120px, auto) minmax(0, 1fr);
  }

  .voice-library-actions {
    justify-items: start;
  }

  #sound-status {
    grid-column: 1 / -1;
    text-align: left;
  }

  .download-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }
}

@media (max-width: 620px) {
  .feature-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    gap: 10px;
    min-height: 58px;
  }

  .brand span {
    font-size: 17px;
  }

  .language-switch button {
    min-width: 38px;
    min-height: 28px;
    padding: 0 7px;
    font-size: 11px;
  }

  .hero {
    padding-top: 44px;
  }

  h1 {
    font-size: clamp(30px, 8.4vw, 38px);
    line-height: 1.08;
  }

  html[lang="zh-CN"] .hero h1 {
    font-size: clamp(32px, 9vw, 38px);
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .lede {
    font-size: 16px;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary,
  .secondary,
  .github-star {
    width: 100%;
  }

  .terminal-demo-prompt {
    min-height: 58px;
  }

  .terminal-demo-prompt input {
    font-size: 16px;
  }

  .terminal-demo-prompt button {
    min-width: 48px;
    min-height: 44px;
    font-size: 11px;
  }

  .demo-window {
    height: 680px;
  }

  .macos-menu-bar,
  .macos-alert-palette {
    justify-content: center;
  }

  .macos-alert-palette {
    width: 100%;
  }

  .menu-alert {
    flex: 1 1 0;
    min-width: 0;
    max-width: 58px;
  }

  .menu-alert.is-purple {
    min-width: 0;
  }

  .demo-title strong {
    font-size: 17px;
  }

  .demo-tabs {
    gap: 5px;
  }

  .demo-tabs button {
    min-height: 36px;
    padding: 0 5px;
    font-size: 11px;
  }

  .demo-today-view,
  .demo-library-view,
  .demo-clipboard-view {
    padding-right: 12px;
    padding-left: 12px;
  }

  .demo-agent-row {
    min-height: 70px;
  }

  .demo-resource-row {
    min-height: 76px;
    padding: 8px;
  }

  .demo-clipboard-row {
    min-height: 62px;
    padding: 7px 8px;
  }

  .demo-copy-simulator {
    padding: 10px;
  }

  #demo-copy-action {
    min-width: 64px;
  }

  .device-guardrails,
  .conversation-grid,
  .tool-grid,
  .sound-grid {
    grid-template-columns: 1fr;
  }

  .device-section {
    padding-top: 44px;
  }

  .device-showcase {
    gap: 16px;
    padding: 46px 14px 16px;
  }

  .connected-device-card {
    padding: 14px;
  }

  .sound-section {
    padding: 20px 16px;
  }

  .resource-system {
    padding-top: 44px;
  }

  .resource-map {
    padding: 14px;
  }

  .defaults-section {
    padding-top: 42px;
  }

  .defaults-panel table {
    font-size: 11px;
  }

  .api-band,
  .download-section,
  .setup-card {
    padding: 18px;
  }

  .download-card {
    flex-basis: 100%;
  }

  .download-actions {
    grid-template-columns: 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}



/* Scroll story: on wide, tall screens with motion allowed (see storyQuery in
   index.html) the popover stays on the right and acts out each section.
   Resource Manager opens in the middle of the screen with a short intro on
   either side; closing it shows the full sections again. */
html.is-story-page :is(.site-header, main, footer) {
  width: min(1440px, calc(100% - 96px));
}

main.is-story {
  --story-popover: 390px;
  --story-gap: 64px;
  --story-window-w: clamp(600px, 54vw, 780px);
  --story-window-h: clamp(520px, calc(100svh - 150px), 700px);
  --story-devices-w: min(var(--story-window-w), 580px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

main.is-story > section {
  grid-column: 1;
  min-width: 0;
  margin-right: calc(var(--story-popover) + var(--story-gap));
}

main.is-story > :is(.api-band, .download-section) {
  margin-right: 0;
}

main.is-story .hero {
  grid-template-columns: minmax(0, 1fr);
}

main.is-story .resource-map {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

main.is-story .resource-bridge-node {
  grid-column: 1 / -1;
  grid-row: 1;
}

main.is-story .resource-stack::after,
main.is-story .resource-bridge-node::after {
  display: none;
}

main.is-story .sound-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Brief mode: the window sections keep only their heading and a short intro,
   placed on either side of the centred window. */
.story-brief {
  display: none;
}

main.is-story.is-brief > :is(#devices, #resources, #token-history, #plugins, #mcp) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--story-window-w) minmax(0, 1fr);
  column-gap: 40px;
  align-items: start;
  min-height: 130svh;
  margin-right: 0;
  padding: 30svh 0 0;
  border: 0;
  background: none;
}

main.is-story.is-brief > :is(#devices, #resources, #token-history, #plugins, #mcp) > :not(.section-heading, .story-brief) {
  display: none;
}

main.is-story.is-brief > :is(#devices, #resources, #token-history, #plugins, #mcp) > .section-heading {
  position: sticky;
  top: 34svh;
  grid-column: 1;
}

main.is-story.is-brief > :is(#devices, #resources, #token-history, #plugins, #mcp) > .section-heading > p:not(.section-tag) {
  display: none;
}

main.is-story.is-brief > :is(#devices, #resources, #token-history, #plugins, #mcp) > .story-brief {
  position: sticky;
  top: 34svh;
  display: block;
  grid-column: 3;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms ease, transform 320ms ease;
}

main.is-story.is-window-open > :is(#devices, #resources, #token-history, #plugins, #mcp) > .story-brief {
  opacity: 1;
  transform: none;
}

.story-brief p {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
}

.story-brief-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 16px;
}

.story-brief-copy {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-small);
  color: #fff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
}

.story-brief-copy:hover {
  background: var(--accent-hover);
}

.story-brief-actions a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
}

.story-agents-missing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: #6d7274;
  font-size: 10px;
  animation: story-row-in 360ms ease 900ms both;
}

.story-agents-missing b {
  padding: 4px 9px;
  border: 1px solid #e3e3e0;
  border-radius: 6px;
  color: #2b5877;
  font-size: 10px;
}

/* Agent section: the three ways to connect. */
.connect-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: connect-path;
}

.connect-paths li {
  counter-increment: connect-path;
}

.connect-paths li::before {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  content: counter(connect-path);
  font-size: 12px;
  font-weight: 780;
}

.connect-paths strong {
  display: block;
  font-size: 16px;
}

.connect-paths p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.connect-paths a {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 650;
}

.story-brief .story-brief-hint {
  margin-top: 14px;
  color: var(--soft);
  font-size: 12px;
}

/* The stage covers the whole story column; only its own controls take clicks. */
.story-rail {
  position: relative;
  z-index: 3;
  grid-column: 1;
  align-self: stretch;
  padding: 54px 0 72px;
  pointer-events: none;
}

.story-rail .product-stage {
  position: sticky;
  top: 84px;
  width: 100%;
}

.story-rail .product-stage > :is(.macos-menu-bar, .demo-window, .demo-copy-simulator) {
  width: var(--story-popover);
  margin-left: auto;
  pointer-events: auto;
}

main.is-story .demo-window {
  position: relative;
  height: clamp(480px, calc(100svh - 290px), 700px);
}

.demo-manage-button,
.story-install {
  transition: transform 140ms ease, background-color 140ms ease;
}

.demo-manage-button.is-story-pressed {
  transform: scale(0.94);
  background: var(--accent-hover);
}

.story-pointer {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  width: 22px;
  height: 22px;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgb(27 36 44 / 28%));
  transition: transform 520ms cubic-bezier(0.22, 0.8, 0.24, 1), opacity 180ms ease;
}

.story-pointer.is-instant {
  transition: none;
}

.story-pointer.is-visible {
  opacity: 1;
}

.story-pointer svg {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 20% 15%;
  transition: transform 140ms ease;
}

.story-pointer path {
  fill: #1b242c;
  stroke: #fff;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.story-pointer.is-pressing svg {
  transform: scale(0.82);
}

.story-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--surface-muted);
  animation: story-row-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms + 180ms);
}

.story-row > img {
  width: 20px;
  height: 20px;
}

.story-row b {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.story-status svg {
  width: 13px;
  height: 13px;
}

.story-avatar {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 780;
}

.story-install {
  padding: 5px 10px;
  border: 1px solid var(--accent-border);
  border-radius: 7px;
  color: var(--accent);
  background: var(--surface);
  font-size: 11px;
  font-weight: 720;
}

.story-install.is-story-pressed {
  transform: scale(0.94);
  background: var(--accent-soft);
}

.story-install.is-done {
  border-color: transparent;
  color: var(--success);
  background: transparent;
}

.story-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--soft);
  font-size: 10px;
  font-weight: 700;
  transition: color 200ms ease;
}

.story-row.is-connected .story-status {
  color: var(--accent);
}

.story-heatmap {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, auto);
  grid-template-columns: repeat(18, minmax(0, 1fr));
  gap: 3px;
}

.story-heatmap .level-0,
.story-heatmap-legend .level-0 {
  background: var(--field);
}

.story-heatmap .level-1,
.story-heatmap-legend .level-1 {
  background: rgb(43 88 119 / 22%);
}

.story-heatmap .level-2,
.story-heatmap-legend .level-2 {
  background: rgb(43 88 119 / 42%);
}

.story-heatmap .level-3,
.story-heatmap-legend .level-3 {
  background: rgb(43 88 119 / 66%);
}

.story-heatmap .level-4,
.story-heatmap-legend .level-4 {
  background: rgb(43 88 119 / 90%);
}

.story-heatmap .is-unknown,
.story-heatmap-legend .is-unknown {
  background: repeating-linear-gradient(135deg, #cfd1cf 0 1.5px, var(--field) 1.5px 4px);
}

.story-heatmap-legend {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 9px 0 0;
  color: #8b8f90;
  font-size: 9px;
}

.story-heatmap-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.story-selection {
  margin: 4px 12px 10px;
  padding: 14px;
  border-radius: 9px;
  background: var(--surface-muted);
  font-size: 12px;
  line-height: 1.6;
  animation: story-row-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.story-selection p {
  margin: 0;
}

.story-selection mark {
  padding: 1px 0;
  color: inherit;
  background: rgb(43 88 119 / 18%);
}

.story-selection-actions {
  display: inline-flex;
  gap: 2px;
  margin: 8px 0;
  padding: 3px;
  border-radius: 8px;
  background: #1b242c;
  animation: story-drop-in-plain 300ms cubic-bezier(0.2, 0.8, 0.2, 1) 300ms both;
}

.story-selection-actions span {
  padding: 3px 8px;
  border-radius: 5px;
  color: rgb(255 255 255 / 78%);
  font-size: 10px;
  font-weight: 700;
}

.story-selection-actions .is-active {
  color: #1b242c;
  background: #fff;
}

.story-selection-result {
  color: var(--accent);
  font-weight: 700;
  animation: story-row-in 360ms ease 900ms both;
}

.story-heatmap-legend span {
  margin: 0 3px 0 2px;
}

.story-float {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.story-keys {
  position: absolute;
  top: 46%;
  left: calc(100% - var(--story-popover) / 2);
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgb(27 36 44 / 88%);
  box-shadow: 0 14px 36px rgb(27 36 44 / 22%);
  animation: story-toast 1.6s ease both;
}

.story-keys kbd {
  display: inline-flex;
  min-width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 7px;
  color: #1b242c;
  background: #fff;
  box-shadow: inset 0 -2px 0 rgb(0 0 0 / 12%);
  font: 700 13px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

.demo-connections.is-story-pressed {
  background: var(--accent-soft);
  transform: scale(0.92);
}

.demo-title-actions span {
  transition: transform 140ms ease, background-color 140ms ease;
}

.story-phone {
  position: absolute;
  right: -14px;
  bottom: 30px;
  width: 214px;
  min-height: 228px;
  padding: 32px 8px 12px;
  border-radius: 30px;
  background: #1b242c;
  box-shadow: 0 24px 54px rgb(27 36 44 / 30%);
  animation: story-phone-in 560ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.story-phone::before {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 56px;
  height: 7px;
  border-radius: 7px;
  background: rgb(255 255 255 / 16%);
  content: "";
  transform: translateX(-50%);
}

.story-notice {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  padding: 9px;
  border-radius: 15px;
  background: rgb(255 255 255 / 95%);
  animation: story-notice-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i) * 900ms + 560ms);
}

.story-notice + .story-notice {
  margin-top: 6px;
}

.story-notice img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.story-notice-meta {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
}

.story-notice b {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}

.story-notice p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.story-ring {
  position: absolute;
  top: 40px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 14px 36px rgb(27 36 44 / 16%);
  white-space: nowrap;
  animation: story-drop-in-plain 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.story-ring i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #db7333;
  box-shadow: 0 0 0 4px rgb(219 115 51 / 18%);
}

.story-ring b,
.story-ring small {
  display: block;
}

.story-ring b {
  font-size: 12px;
}

.story-ring small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.menu-alert.is-story-ringing {
  animation: story-ring 900ms ease both;
}

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

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

@keyframes story-row-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes story-cell-in {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}

@keyframes story-phone-in {
  from {
    opacity: 0;
    transform: translate(24px, 40px) rotate(4deg);
  }
}

@keyframes story-notice-in {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
}

@keyframes story-drop-in-plain {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes story-toast {
  0% {
    opacity: 0;
    transform: translate(-50%, 8px) scale(0.96);
  }

  14%,
  76% {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
}

@keyframes story-ring {
  20% {
    transform: scale(1.18);
  }

  40% {
    transform: scale(0.96);
  }

  60% {
    transform: scale(1.08);
  }
}

main.is-story .product-stage > :is(.macos-menu-bar, .demo-window, .demo-copy-simulator) {
  transition: opacity 240ms ease, transform 240ms ease;
}

main.is-story .product-stage.is-window-open > :is(.macos-menu-bar, .demo-window, .demo-copy-simulator) {
  pointer-events: none;
  opacity: 0;
  transform: scale(0.96);
}

/* Resource Manager as its own macOS window, drawn after the real app:
   traffic lights over the sidebar, the page on a white canvas. */
.story-mac {
  position: absolute;
  top: max(0px, calc((100svh - 84px - var(--story-window-h)) / 2 - 12px));
  left: calc(50% - var(--story-window-w) / 2);
  z-index: 4;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  width: var(--story-window-w);
  height: var(--story-window-h);
  overflow: hidden;
  border-radius: 12px;
  color: #1b242c;
  background: #fffefc;
  box-shadow:
    0 0 0 0.5px rgb(0 0 0 / 22%),
    0 24px 64px rgb(27 36 44 / 26%),
    0 6px 16px rgb(27 36 44 / 10%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.story-mac.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: story-mac-in 460ms cubic-bezier(0.16, 0.9, 0.24, 1) both;
}

.story-mac.is-closing {
  animation: story-mac-out 220ms ease both;
}

.story-mac-sidebar {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 12px 8px;
  background: #f1f0ed;
  box-shadow: inset -0.5px 0 0 rgb(0 0 0 / 10%);
}

.story-mac-lights {
  display: flex;
  gap: 7px;
  padding: 0 4px 14px;
}

.story-mac-lights :is(i, button) {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 0 0 0.5px rgb(0 0 0 / 14%);
}

/* The close light is a real button; like macOS it shows its glyph on hover. */
.story-mac-close {
  position: relative;
  cursor: pointer;
}

.story-mac-close::after {
  position: absolute;
  inset: 0;
  color: rgb(77 0 0 / 70%);
  content: "×";
  font-size: 11px;
  font-weight: 800;
  line-height: 12px;
  opacity: 0;
}

.story-mac-lights:hover .story-mac-close::after,
.story-mac-close:focus-visible::after {
  opacity: 1;
}

.story-mac-lights i:nth-child(2) {
  background: #febc2e;
}

.story-mac-lights i:nth-child(3) {
  background: #28c840;
}

.story-mac-sidebar-items {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.story-mac-nav[data-story-page="resources"],
.story-mac-nav[data-story-page="plugins"],
.story-mac-nav[data-story-page="tokens"],
.story-mac-nav[data-story-page="agents"] {
  cursor: pointer;
}

.story-mac-brand {
  padding: 0 6px 12px;
  font-size: 13px;
  font-weight: 780;
}

.story-mac-label {
  padding: 0 6px 5px;
  color: #8b8f90;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.story-mac-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border-radius: 7px;
  color: #3b4247;
  font-size: 11px;
  white-space: nowrap;
  transition: background-color 200ms ease, transform 140ms ease;
}

.story-mac-nav span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-mac-nav svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.story-mac-nav path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.story-mac-nav.is-active {
  color: #1b242c;
  background: #e1e7ea;
  font-weight: 700;
}

.story-mac-nav.is-story-pressed {
  background: #d3dde2;
  transform: scale(0.97);
}

.story-mac-foot {
  margin-top: auto;
  padding: 0 6px;
  color: #8b8f90;
  font-size: 9px;
}

.story-mac-main {
  min-width: 0;
  padding: 18px 18px 14px;
  overflow: hidden;
}

.story-mac-main > * {
  animation: story-fade 260ms ease both;
}

.story-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.story-page-head strong {
  display: block;
  font-size: 18px;
  font-weight: 780;
}

.story-mac-button {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 7px;
  color: #fff;
  background: #2b5877;
  font-size: 10px;
  font-weight: 700;
}

.story-mac-search {
  display: flex;
  height: 28px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border-radius: 7px;
  color: #8b8f90;
  background: #f0efec;
  font-size: 10px;
}

.story-mac-search img {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

.story-mac-filters {
  display: flex;
  gap: 4px;
  margin: 8px 0 10px;
}

.story-mac-filters span {
  padding: 4px 8px;
  border: 1px solid #e3e3e0;
  border-radius: 6px;
  color: #6d7274;
  font-size: 10px;
  font-weight: 650;
}

.story-mac-filters .is-active {
  border-color: #bfd1dc;
  color: #2b5877;
  background: #e7f0f5;
}

.story-mac-table {
  margin: 0 -18px;
}

.story-mac-thead,
.story-mac-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 96px 44px 28px;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
}

.story-cell {
  overflow: hidden;
  color: #6d7274;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-mac-thead {
  height: 26px;
  color: #8b8f90;
  background: #f8f7f4;
  font-size: 9px;
  font-weight: 700;
}

.story-mac-row {
  min-height: 46px;
  box-shadow: inset 0 -1px 0 #efefec;
  animation: story-row-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms + 200ms);
}

.story-mac-row b {
  display: block;
  overflow: hidden;
  font-size: 11px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-mac-row small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #6d7274;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
}

.story-type img {
  width: 13px;
  height: 13px;
}

.story-type.is-prompt {
  color: var(--prompt);
}

.story-type.is-skill {
  color: var(--skill);
}

.story-type.is-mcp {
  color: var(--mcp);
}

.story-switch {
  position: relative;
  width: 26px;
  height: 15px;
  border-radius: 999px;
  background: #2b5877;
}

.story-switch::after {
  position: absolute;
  top: 2px;
  left: 13px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.story-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.story-stats span {
  display: block;
  color: #6d7274;
  font-size: 9px;
}

.story-stats b {
  display: block;
  margin-top: 3px;
  font-size: 16px;
  font-weight: 780;
}

.story-card {
  padding: 10px;
  border: 1px solid #e6e6e3;
  border-radius: 9px;
}

.story-card-title {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 750;
}

.story-heatwrap {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 4px;
}

.story-weekdays {
  display: grid;
  grid-template-rows: repeat(7, minmax(0, 1fr));
  gap: 2px;
  color: #8b8f90;
  font-size: 7px;
  line-height: 1;
}

.story-weekdays span {
  display: flex;
  align-items: center;
}

.story-heatmap {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, auto);
  grid-template-columns: repeat(26, minmax(0, 1fr));
  gap: 3px;
}

.story-heatmap span {
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 2px;
  animation: story-cell-in 300ms ease both;
  animation-delay: calc(var(--col) * 26ms + 220ms);
}

.story-heatmap .is-future {
  background: #f6f6f4;
}

.story-heatmap .is-selected {
  outline: 1.5px solid #1b242c;
  outline-offset: 1px;
}

.story-legend-gap {
  margin-left: auto !important;
}

.story-day {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #f6f5f2;
  font-size: 10px;
  animation: story-row-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) 700ms both;
}

.story-day > div {
  display: flex;
  justify-content: space-between;
  color: #6d7274;
}

.story-day .story-day-head {
  justify-content: flex-start;
  gap: 6px;
  color: #1b242c;
}

.story-day-head small {
  color: #8b8f90;
}

.story-mac-list {
  display: grid;
  gap: 6px;
}

.story-mac .story-row {
  background: #f6f5f2;
}

.story-mac .story-selection {
  margin: 10px 0 0;
}

/* Connected devices: a plain window with the real screen inside. */
.story-mac.is-devices {
  top: max(0px, calc((100svh - 84px - var(--story-devices-w) * 610 / 620 - 38px) / 2 - 12px));
  left: calc(50% - var(--story-devices-w) / 2);
  display: block;
  width: var(--story-devices-w);
  height: auto;
}

.story-mac-titlebar {
  position: relative;
  display: flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: #f1f0ed;
  box-shadow: inset 0 -0.5px 0 rgb(0 0 0 / 10%);
  color: #3b4247;
  font-size: 12px;
  font-weight: 650;
}

.story-mac-titlebar .story-mac-lights {
  position: absolute;
  top: 13px;
  left: 14px;
  padding: 0;
}

.story-devices-shot {
  position: relative;
  aspect-ratio: 620 / 610;
  background: #fff;
}

.story-devices-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 320ms ease;
}

.story-devices-shot img.is-active {
  opacity: 1;
}

.story-devices-target {
  position: absolute;
  border-radius: 8px;
  transition: background-color 140ms ease;
}

.story-devices-target.is-story-pressed {
  background: rgb(0 0 0 / 12%);
}

.story-phone.is-beside-window {
  right: calc(50% + var(--story-devices-w) / 2 - 70px);
}

@keyframes story-mac-in {
  from {
    opacity: 0;
    transform: scale(0.42);
  }

  55% {
    opacity: 1;
  }
}

@keyframes story-mac-out {
  to {
    opacity: 0;
    transform: scale(0.94);
  }
}
