:root {
  --bg: #f3f1ea;
  --ink: #11110f;
  --muted: #6f6c64;
  --line: #d6d2c8;
  --panel: #ebe8df;
  --body-copy: #4d4a43;
  --control-bg: rgba(255,255,255,.26);
  --card-bg: rgba(255,255,255,.24);
  --chip-bg: rgba(255,255,255,.22);
  --kbd-bg: #fff;
  --accent: #ff6b1a;
  --accent-dark: #d84900;
  --demo-home-bg: #f3f1ea;
  --demo-home-ink: #11110f;
  --demo-home-copy: #37352f;
  --demo-home-muted: #6f6c64;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color 520ms cubic-bezier(.22,1,.36,1), color 420ms ease;
}
body[data-theme="dark"] {
  --bg: #11110f;
  --ink: #f3f1ea;
  --muted: #969188;
  --line: #34332f;
  --panel: #232320;
  --body-copy: #c9c5bc;
  --control-bg: rgba(255,255,255,.06);
  --card-bg: rgba(255,255,255,.055);
  --chip-bg: rgba(255,255,255,.07);
  --kbd-bg: #232320;
  --accent-dark: #ff8a4a;
  --demo-home-bg: #11110f;
  --demo-home-ink: #f3f1ea;
  --demo-home-copy: #c9c5bc;
  --demo-home-muted: #969188;
}
button, a { font: inherit; }
a { color: inherit; }
button { cursor: pointer; }

.shell {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}
.multi-select-card {
  grid-column: 1 / -1;
  min-height: 240px;
}

.multi-select-card h3 {
  margin-top: auto;
}

.multi-select-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.multi-target {
  min-height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  transition: background-color 420ms ease, color 420ms ease, border-color 420ms ease;
}

.kbd {
  display: inline-block;
  padding: 3px 6px 2px;
  border: 1px solid var(--line);
  background: var(--kbd-bg);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  vertical-align: baseline;
  transition: background-color 420ms ease, color 420ms ease, border-color 420ms ease;
}
.site-header {
  position: relative;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--demo-home-bg);
  color: var(--demo-home-ink);
  box-shadow: 0 0 0 100vmax var(--demo-home-bg);
  clip-path: inset(0 -100vmax);
  transition: background-color 520ms cubic-bezier(.22,1,.36,1), color 420ms ease, box-shadow 520ms cubic-bezier(.22,1,.36,1);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.wordmark.small { font-size: 13px; }
.wordmark-version {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--demo-home-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 7px;
  line-height: 1.6;
}
.mark {
  width: 11px;
  height: 11px;
  border-radius: 2px 7px 7px 7px;
  background: var(--accent);
  transform: rotate(14deg);
}

.nav { display: flex; gap: 24px; align-items: center; }
.nav a, .footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
}
.site-header .nav a { color: var(--demo-home-muted); transition: color 420ms ease; }
.site-header .nav a:hover { color: var(--demo-home-ink); }
.nav a:hover, .footer-links a:hover { color: var(--ink); }
.nav a.icon-link { display: inline-flex; align-items: center; }
.nav a.icon-link svg { width: 16px; height: 16px; display: block; fill: currentColor; }

.demo-theme-switch {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  background: var(--panel);
  color: var(--demo-home-muted);
  z-index: 2;
  transition: background-color 420ms ease, border-color 420ms ease, color 420ms ease, transform 160ms ease;
}
.demo-theme-switch:hover { transform: translate(-50%, calc(-50% - 1px)); }
.demo-theme-switch:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--demo-home-bg), 0 0 0 3px var(--accent); }
.demo-theme-track {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: var(--line);
  transition: background-color 420ms ease;
}
.demo-theme-thumb {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--demo-home-ink);
  transition: transform 420ms cubic-bezier(.22,1,.36,1), background-color 420ms ease;
}
body[data-theme="dark"] .demo-theme-thumb { transform: translateX(12px); }
.demo-theme-icon {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  color: var(--demo-home-muted);
  transition: color 420ms ease, transform 420ms cubic-bezier(.22,1,.36,1);
}
.demo-theme-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body:not([data-theme="dark"]) .demo-theme-icon.sun,
body[data-theme="dark"] .demo-theme-icon.moon {
  color: var(--demo-home-ink);
  transform: scale(1.08);
}

.hero {
  padding: 112px 0 84px;
  border-bottom: 1px solid var(--line);
  background: var(--demo-home-bg);
  color: var(--demo-home-ink);
  box-shadow: 0 0 0 100vmax var(--demo-home-bg);
  clip-path: inset(0 -100vmax);
  transition: background-color 520ms cubic-bezier(.22,1,.36,1), color 420ms ease, border-color 420ms ease, box-shadow 520ms cubic-bezier(.22,1,.36,1);
}
.eyebrow, .kicker, .quick-label, .section-index, .demo-label {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.eyebrow { font-size: 20px; }
.kicker { font-size: 14px; }
.quick-label, .section-index, .demo-label { font-size: 11px; }
.eyebrow, .kicker { color: var(--accent-dark); }
.hero h1 {
  margin: 22px 0 28px;
  max-width: 980px;
  font-size: clamp(58px, 8.6vw, 126px);
  line-height: 1.023;
  letter-spacing: -0.072em;
  font-weight: 500;
  color: var(--demo-home-ink);
  transition: color 420ms ease;
}
.hero-copy {
  width: min(720px, 100%);
  margin: 0;
  color: var(--demo-home-copy);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
  letter-spacing: -0.022em;
  transition: color 420ms ease;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.microcopy, .note {
  margin: 16px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
}
.hero .microcopy { color: var(--demo-home-muted); transition: color 420ms ease; }

.button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--ink); color: var(--bg); }
.button.primary:hover { background: var(--accent); color: #170700; border-color: var(--accent); }
.button.secondary { background: transparent; }
.button.secondary:hover { background: var(--panel); }
.hero .button.primary {
  border-color: var(--demo-home-ink);
  background: var(--demo-home-ink);
  color: var(--demo-home-bg);
  transition-duration: 420ms;
}
.hero .button.secondary {
  border-color: var(--demo-home-ink);
  color: var(--demo-home-ink);
  transition-duration: 420ms;
}
.hero .button.primary:hover { background: var(--accent); color: #170700; border-color: var(--accent); }
.hero .button.secondary:hover { background: color-mix(in srgb, var(--demo-home-ink) 9%, transparent); }

.quick {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.quick,
.section,
.playground,
.closing,
.footer {
  background: var(--bg);
  box-shadow: 0 0 0 100vmax var(--bg);
  clip-path: inset(0 -100vmax);
  transition: background-color 520ms cubic-bezier(.22,1,.36,1), color 420ms ease, border-color 420ms ease, box-shadow 520ms cubic-bezier(.22,1,.36,1);
}
.quick-label { color: var(--muted); }
.quick-label,
.section-index,
.microcopy,
.note,
.details-body p,
.or-note,
.drag-note,
.authorization-line .arrow,
.demo-label,
.demo-card p,
.footer-links a {
  transition: color 420ms ease;
}
.command-row {
  min-height: 48px;
  border: 1px solid var(--line);
  background: var(--control-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 9px 0 15px;
  transition: background-color 420ms ease, color 420ms ease, border-color 420ms ease;
}
.command-row.compact { margin-top: 10px; }
.command-row code, pre {
  font-family: var(--mono);
  font-size: 12px;
}
.copy-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  padding: 8px;
}
.copy-button:hover { color: var(--ink); }
.copy-button .copy-icon {
  width: 14px;
  height: 14px;
  display: block;
  flex: 0 0 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quick .copy-button {
  background: rgb(13, 13, 13);
  color: rgb(255, 255, 255);
}
.quick .copy-button:hover {
  background: rgb(255, 107, 26);
  color: rgb(0, 0, 0);
}

.section {
  display: grid;
  grid-template-columns: 170px minmax(0, 720px);
  gap: 20px;
  padding: 92px 0;
  border-bottom: 1px solid var(--line);
}
.section-index { color: var(--muted); padding-top: 9px; }
.section-copy h2, .playground h2, .closing h2 {
  margin: 8px 0 22px;
  font-size: clamp(38px, 5vw, 72px);
  line-height: .98;
  letter-spacing: -0.055em;
  font-weight: 500;
}
.section-copy > p:not(.kicker):not(.note), .closing > p:last-child {
  margin: 0;
  max-width: 680px;
  color: var(--body-copy);
  font-size: 17px;
  line-height: 1.65;
  transition: color 420ms ease;
}

.prompt-box {
  margin-top: 32px;
  border: 1px solid #d6d2c8;
  background: #fff;
  color: #11110f;
}
.prompt-head {
  min-height: 43px;
  border-bottom: 1px solid #d6d2c8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: #6f6c64;
}
.prompt-head .copy-button {
  color: #11110f;
  background: #ebe8df;
}
.prompt-head .copy-button:hover {
  color: #170700;
  background: var(--accent);
}
pre {
  margin: 0;
  padding: 20px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
  color: #11110f;
}

details {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  transition: border-color 420ms ease;
}
summary {
  padding: 18px 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 16px;
}
.details-body { padding: 0 0 14px; }
.details-body p { color: var(--muted); font-size: 13px; margin: 18px 0 0; }

.bookmarklet-wrap {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.bookmarklet-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
.bookmarklet-or-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bookmarklet-copy-button {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--body-copy);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  transition: color 420ms ease;
}
.bookmarklet-copy-button:hover { color: var(--ink); }
.or-note {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}
.bookmarklet {
  min-width: 0;
  min-height: 44px;
  padding: 8px 14px;
  gap: 10px;
  border: 1px solid rgba(216, 73, 0, 0.25);
  background: rgba(255, 107, 26, 0.08);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  cursor: grab;
  box-shadow: none;
  transition: background 140ms ease, border-color 140ms ease;
}
.bookmarklet:hover {
  background: rgba(255, 107, 26, 0.14);
  border-color: rgba(216, 73, 0, 0.38);
  transform: none;
}
.bookmarklet:active { cursor: grabbing; }
.bookmarklet.dragging {
  background: transparent;
  border: 1px dashed rgba(216, 73, 0, 0.5);
  color: transparent;
  box-shadow: none;
  cursor: grabbing;
}
.bookmarklet.dragging * {
  visibility: hidden;
}
.bookmarklet-logo {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 4px;
  display: block;
}
.drag-note { color: var(--muted); font-family: var(--mono); font-size: 11px; }

.authorization-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
  font-family: var(--mono);
  font-size: 12px;
}
.authorization-line > span:not(.arrow) {
  border: 1px solid var(--line);
  padding: 9px 11px;
  background: var(--chip-bg);
  transition: background-color 420ms ease, color 420ms ease, border-color 420ms ease;
}
.authorization-line .arrow { color: var(--muted); }
.authorization-line .authorize-chip { border-color: var(--accent); background: var(--accent); }

.playground { padding: 92px 0; border-bottom: 1px solid var(--line); }
.playground-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.playground h2 { max-width: 760px; margin-bottom: 0; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 38px; }
.demo-card {
  min-height: 280px;
  border: 1px solid var(--line);
  padding: 24px;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  transition: background-color 420ms ease, color 420ms ease, border-color 420ms ease;
}
.demo-card h3 { margin: auto 0 10px; font-size: 24px; letter-spacing: -0.035em; font-weight: 500; }
.demo-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.demo-label { color: var(--muted); }
.motion-card h3 { margin-top: auto; }
.motion-track { height: 44px; margin-top: 22px; position: relative; border-top: 1px solid var(--line); }
.motion-dot {
  position: absolute;
  top: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  animation: travel 2540ms linear(0, 0.331 5%, 0.552 10%, 0.701 15%, 0.799 20%, 0.866 25%, 0.91 30%, 0.94 35%, 0.96 40%, 0.973 45%, 0.982 50%, 0.988 55%, 0.992 60%, 0.995 65%, 0.996 70%, 0.998 80%, 0.999 90%, 1) infinite alternate;
}
@keyframes travel { from { left: 0; } to { left: calc(100% - 30px); } }

.closing { padding: 120px 0 132px; }
.closing h2 { max-width: 930px; }
.closing > p:last-child { max-width: 650px; }

.footer {
  min-height: 92px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; gap: 20px; }

/* ── Annotation fixes ── */
header.site-header.shell { border-bottom-width: 0; }
#install,
#bookmarklet,
#mcp { border-bottom-width: 0; }
.motion-track { border-top-width: 0; }
#try.playground,
.playground.shell { border-bottom-width: 0; }
footer.footer.shell { border-top-width: 0; }
.section-index { font-size: 16px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--bg);
  padding: 9px 12px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  transition: 160ms ease;
  z-index: 1000000;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 1160px); }
  .site-header { min-height: 102px; align-items: flex-start; padding-top: 14px; }
  .demo-theme-switch { top: auto; bottom: 10px; }
  .nav { gap: 14px; overflow-x: auto; white-space: nowrap; }
  .nav a { font-size: 11px; }
  .hero { padding: 82px 0 64px; }
  .hero h1 { font-size: clamp(52px, 16vw, 86px); line-height: 1.02; }
  .quick, .section { grid-template-columns: 1fr; }
  .quick { gap: 10px; }
  .section { padding: 68px 0; }
  .section-index { padding-top: 0; }
  .demo-grid { grid-template-columns: 1fr; }
  .playground-head { align-items: flex-start; flex-direction: column; }
  .bookmarklet-wrap { align-items: flex-start; flex-direction: column; justify-content: center; }
  .command-row code { overflow-x: auto; white-space: nowrap; }
  .footer { min-height: 78px; }
}

/* ── Staggered entrance (matches portfolio-new editorial) ── */
@keyframes fmIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.site-header,
.hero .eyebrow,
.hero h1,
.hero-copy,
.hero-actions,
.microcopy,
.quick,
.section,
.playground,
.closing,
.footer {
  animation: fmIn 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.site-header       { animation-delay: 0ms; }
.hero .eyebrow    { animation-delay: 60ms; }
.hero h1          { animation-delay: 120ms; }
.hero-copy        { animation-delay: 180ms; }
.hero-actions     { animation-delay: 240ms; }
.microcopy        { animation-delay: 300ms; }
.quick            { animation-delay: 360ms; }
#install          { animation-delay: 420ms; }
#bookmarklet      { animation-delay: 480ms; }
#mcp              { animation-delay: 540ms; }
.playground       { animation-delay: 600ms; }
.closing          { animation-delay: 660ms; }
.footer           { animation-delay: 720ms; }

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