/* nekodot site — the Windows client's black and white, where only the bots have color. */
@font-face {
  font-family: 'Nunito';
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/nunito-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/nunito-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/nunito-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/nunito-800.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-500.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --side: #f7f7f7;
  --ink: #000000;
  --ink2: #5c5c5c;
  --ink3: #767676;
  --line: #e6e6e6;
  --bubble: #f2f2f2;
  --raised: #eaeaea;
  --hover: #f0f0f0;
  /* raised surfaces (cards, pills, the composer) and the panel a picture sits in */
  --surface: #ffffff;
  --stage: #f7f7f7;
  --sans:
    'Nunito', 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans CJK SC',
    'Noto Sans SC', sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Mono', Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav: 56px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #000000;
    --side: #101010;
    --ink: #ffffff;
    --ink2: #b0b0b0;
    --ink3: #8c8c8c;
    --line: #2a2a2a;
    --bubble: #1c1c1c;
    --raised: #2a2a2a;
    --hover: #1e1e1e;
    --surface: #161616;
    --stage: #0b0b0b;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #000000;
  --side: #101010;
  --ink: #ffffff;
  --ink2: #b0b0b0;
  --ink3: #8c8c8c;
  --line: #2a2a2a;
  --bubble: #1c1c1c;
  --raised: #2a2a2a;
  --hover: #1e1e1e;
  --surface: #161616;
  --stage: #0b0b0b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav) + 16px);
  scrollbar-color: var(--raised) transparent;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  caret-color: var(--ink);
}
::selection {
  background: var(--ink);
  color: var(--bg);
}
h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}
ol,
ul {
  list-style: none;
}
img,
svg {
  display: block;
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.container {
  width: min(1200px, 100%);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}
h1,
h2 {
  font-weight: 800;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.4rem, 6.6vw, 5.5rem);
  line-height: 1.06;
}
h2 {
  font-size: clamp(1.9rem, 4.2vw, 3.25rem);
  line-height: 1.12;
}
h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.section {
  padding-block: clamp(72px, 11vw, 144px);
}
.section-lead,
.lead {
  color: var(--ink2);
  max-width: 34em;
}
.fine {
  font-size: 13.5px;
  color: var(--ink3);
  line-height: 1.55;
}

/* controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding-inline: 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s,
    color 0.15s,
    border-color 0.15s,
    transform 0.2s var(--ease);
}
.btn:active {
  transform: scale(0.98);
}
.btn-ink {
  background: var(--ink);
  color: var(--bg);
}
.btn-ink:hover {
  background: var(--ink2);
}
.btn-line {
  border-color: var(--line);
}
.btn-line:hover {
  background: var(--hover);
}
.icon-btn,
.text-btn {
  display: inline-grid;
  place-items: center;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  transition: background-color 0.15s;
}
.icon-btn:hover,
.text-btn:hover {
  background: var(--hover);
}
.text-btn {
  padding-inline: 8px;
  font-size: 14px;
  font-weight: 600;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn .i-gh {
  fill: currentColor;
  stroke: none;
}
.i-moon {
  display: none;
}
:root[data-theme='dark'] .i-sun {
  display: none;
}
:root[data-theme='dark'] .i-moon {
  display: block;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .i-sun {
    display: none;
  }
  :root:not([data-theme='light']) .i-moon {
    display: block;
  }
}

/* avatars: geometry mirrors the client's painter */
.avatar {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.avatar .ear {
  transform-box: view-box;
  transform-origin: var(--px) var(--py);
}
.avatar .petals,
.avatar .lid {
  transform-box: view-box;
}
.avatar .petals {
  transform-origin: 20px 20px;
}
.avatar .lid {
  transform-origin: 20px var(--ey);
}
.avatar.working .ear {
  animation: lean 1.2s ease-in-out infinite;
}
.avatar.working .lid {
  animation: scan 3.2s ease-in-out infinite;
}
.avatar.working .petals {
  animation: spin 9.6s linear infinite;
}
.avatar.working .ghost {
  animation: bob 1.2s ease-in-out infinite;
}
@keyframes lean {
  50% {
    transform: rotate(8deg);
  }
}
@keyframes scan {
  25% {
    transform: translateX(1.5px);
  }
  75% {
    transform: translateX(-1.5px);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes bob {
  50% {
    transform: translateY(-1.2px);
  }
}
@keyframes flick {
  40% {
    transform: rotate(-12deg);
  }
}
@keyframes blink {
  0%,
  96%,
  100% {
    transform: scaleY(1);
  }
  98% {
    transform: scaleY(0.1);
  }
}
[data-avatar] {
  display: block;
}

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
}
.nav-inner {
  height: var(--nav);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand [data-avatar] {
  width: 24px;
  height: 24px;
  color: var(--ink);
}
.nav-links {
  display: flex;
  gap: 2px;
  margin-left: 8px;
}
.nav-links a {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink2);
  text-decoration: none;
  transition:
    background-color 0.15s,
    color 0.15s;
}
.nav-links a:hover {
  background: var(--hover);
  color: var(--ink);
}
.nav-links a.is-active {
  color: var(--ink);
}
.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* opening: the app pops up, its Bots hop out from behind it, and scrolling
   grows the name card into the page itself */
.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.downloads[data-primary='android'] [data-platform='android'] {
  order: -1;
}
/* Scroll through this track; the stage stays put while it plays. --p runs 0 → 1. */
.intro {
  --p: 0;
  --recede: clamp(0, var(--p) / 0.45, 1);
  --rise: clamp(0, (var(--p) - 0.18) / 0.34, 1);
  --fill: clamp(0, (var(--p) - 0.52) / 0.34, 1);
  position: relative;
  height: 300vh;
  height: 300svh;
}
.intro-stage {
  position: sticky;
  top: var(--nav);
  height: calc(100vh - var(--nav));
  height: calc(100svh - var(--nav));
  display: grid;
  place-items: center;
  overflow: clip;
}
.intro-stage > * {
  grid-area: 1 / 1;
}
.intro-window {
  --w: min(1360px, 94vw, (100svh - var(--nav) - 48px) * 1.6);
  z-index: 2;
  width: var(--w);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg);
  box-shadow:
    0 2px 6px rgb(0 0 0 / 0.06),
    0 30px 80px -20px rgb(0 0 0 / 0.28);
  transform: translateY(calc(var(--recede) * -4%)) scale(calc(1 - var(--recede) * 0.14));
  opacity: calc(1 - var(--recede) * 0.8);
  filter: blur(calc(var(--recede) * 3px));
  animation: pop 0.85s cubic-bezier(0.34, 1.4, 0.5, 1) 0.1s backwards;
}
@keyframes pop {
  from {
    transform: translateY(6%) scale(0.82);
    opacity: 0;
  }
}
/* No z-index here: each Bot stacks against the window and the card itself. */
.intro-bots {
  position: relative;
  width: 0;
  height: 0;
  pointer-events: none;
}
/* Each Bot waits behind the window, hops up over its edge and lands in front;
   x and y run on separate curves so the hop arcs. */
.intro-bots > span {
  --delay: calc(0.75s + var(--i) * 110ms);
  position: absolute;
  z-index: 5;
  left: 0;
  top: 0;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  /* Round the window first, then round the name as the card rises. */
  transform: translateX(calc(var(--x) + (var(--cx) - var(--x)) * var(--rise)));
  animation: hop-x 0.9s cubic-bezier(0.3, 0.6, 0.4, 1) var(--delay) backwards;
}
.intro-bots .bot-y {
  position: absolute;
  inset: 0;
  transform: translateY(calc(var(--y) + (var(--cy) - var(--y)) * var(--rise)));
  animation: hop-y 0.9s linear var(--delay) backwards;
}
.intro-bots .bot-body {
  position: absolute;
  inset: 0;
  rotate: var(--r);
  transform-origin: 50% 100%;
  animation:
    land 0.9s linear var(--delay) backwards,
    drift 4.8s ease-in-out calc(2s + var(--i) * -0.7s) infinite;
}
@keyframes hop-x {
  from {
    transform: translateX(var(--sx));
    z-index: 1;
  }
  40% {
    z-index: 1;
  }
  41% {
    z-index: 5;
  }
}
@keyframes hop-y {
  from {
    transform: translateY(var(--sy));
    animation-timing-function: cubic-bezier(0.2, 0.7, 0.4, 1);
  }
  45% {
    transform: translateY(calc(var(--y) - var(--jump)));
    animation-timing-function: cubic-bezier(0.6, 0, 0.9, 0.5);
  }
}
@keyframes land {
  from {
    scale: 0.8;
    rotate: 0deg;
  }
  80% {
    scale: 1.1 0.86;
  }
  90% {
    scale: 0.96 1.06;
  }
}
@keyframes drift {
  50% {
    translate: 0 -7%;
  }
}
.intro-bots .lid {
  animation: blink 7s linear infinite;
  animation-delay: calc(var(--i, 0) * -0.9s);
}
.intro-bots .ear {
  animation: flick 0.45s var(--ease) calc(var(--delay) + 0.8s) backwards;
}
/* The name card rises over the receding window, then grows to fill the
   screen and becomes the page the features continue on. */
.intro-card {
  position: relative;
  z-index: 4;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  pointer-events: none;
  transform: translateY(calc((1 - var(--rise)) * 34vh)) scale(calc(0.9 + var(--rise) * 0.1));
  /* Opaque early in the rise, so the faded window never shows through it. */
  opacity: clamp(0, var(--rise) * 3, 1);
}
.intro-card > * {
  grid-area: 1 / 1;
}
.intro-panel {
  width: calc(var(--cw, 0px) + (100% - var(--cw, 0px)) * var(--fill));
  height: calc(var(--ch, 0px) + (100% - var(--ch, 0px)) * var(--fill));
  border-radius: calc(28px * (1 - var(--fill)));
  background: var(--bg);
  box-shadow:
    0 2px 8px rgb(0 0 0 / calc(0.06 * (1 - var(--fill)))),
    0 40px 90px -24px rgb(0 0 0 / calc(0.3 * (1 - var(--fill))));
}
.intro-card-face {
  position: relative;
  width: min(860px, 88vw);
  padding: clamp(32px, 5vw, 64px) clamp(24px, 5vw, 64px);
  text-align: center;
  pointer-events: auto;
}
.intro-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.22em;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 1;
  letter-spacing: -0.045em;
}
.intro-name [data-avatar] {
  width: 0.78em;
  height: 0.78em;
  color: var(--ink);
}
.intro-line {
  margin-top: clamp(16px, 2.4vw, 26px);
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-wrap: balance;
}
.intro-lead {
  margin: 14px auto 0;
  max-width: 30em;
  color: var(--ink2);
  font-size: clamp(0.98rem, 1.3vw, 1.08rem);
}
.intro-card .downloads {
  justify-content: center;
  margin-top: clamp(24px, 3.4vw, 36px);
}
.intro-hint {
  z-index: 6;
  align-self: end;
  margin-bottom: 14px;
  width: 28px;
  height: 28px;
  color: var(--ink3);
  opacity: calc(1 - var(--p) * 12);
  animation: hint 1.8s ease-in-out 2.4s infinite;
}
.intro-hint svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes hint {
  50% {
    translate: 0 6px;
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .intro-window {
    box-shadow:
      0 0 0 1px var(--line),
      0 40px 90px -24px rgb(0 0 0 / 0.9);
  }
  :root:not([data-theme='light']) .intro-panel {
    box-shadow: 0 0 0 1px rgb(255 255 255 / calc(0.16 * (1 - var(--fill))));
  }
}
:root[data-theme='dark'] .intro-window {
  box-shadow:
    0 0 0 1px var(--line),
    0 40px 90px -24px rgb(0 0 0 / 0.9);
}
:root[data-theme='dark'] .intro-panel {
  box-shadow: 0 0 0 1px rgb(255 255 255 / calc(0.16 * (1 - var(--fill))));
}
.window {
  position: relative;
  z-index: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.shot {
  width: 100%;
}
.only-narrow {
  display: none;
}

/* each highlight: what it does in plain words beside a working picture of it */
.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 40px clamp(32px, 6vw, 96px);
}
.feature-flip .feature-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}
.feature-flip .feature-copy {
  order: 1;
}
.nowrap {
  white-space: nowrap;
}
.feature-copy h2 {
  margin-bottom: 20px;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
}
.feature-copy .fine {
  margin-top: 18px;
  max-width: 34em;
}
.points {
  margin-top: 24px;
  display: grid;
  gap: 10px;
  color: var(--ink2);
}
.points li {
  position: relative;
  padding-left: 20px;
}
.points li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}
.where {
  margin-top: 26px;
  display: grid;
}
.where > div {
  display: grid;
  grid-template-columns: 8.5em minmax(0, 1fr);
  gap: 12px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
}
.where > div:first-child {
  border-top: 0;
}
.where dt {
  font-weight: 700;
}
.where dd {
  color: var(--ink2);
}

/* the chat: a small working copy of the client's conversation */
.chat {
  display: flex;
  flex-direction: column;
  height: 560px;
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg);
  box-shadow:
    0 2px 6px rgb(0 0 0 / 0.06),
    0 30px 70px -24px rgb(0 0 0 / 0.26);
}
.app-faces {
  position: relative;
}
.app-faces > span {
  position: absolute;
  width: 19px;
  height: 19px;
}
.app-faces > span:first-child {
  left: 0;
  top: 0;
}
.app-faces > span:last-child {
  right: 0;
  bottom: 0;
}
.app-top {
  position: relative;
  flex: none;
  height: 60px;
  display: grid;
  place-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding-inline: 8px 14px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow:
    0 1px 3px rgb(0 0 0 / 0.08),
    0 4px 14px rgb(0 0 0 / 0.06);
  max-width: calc(100% - 32px);
  white-space: nowrap;
}
.pill-face {
  display: block;
  flex: none;
  width: 20px;
  height: 20px;
}
.pill-face .app-faces > span {
  width: 13px;
  height: 13px;
}
.pill strong {
  font-size: 14px;
  font-weight: 700;
}
.pill small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink3);
  min-width: 0;
}
.chain {
  display: inline-flex;
  gap: 2.5px;
}
.chain i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--ink3);
}
.chain i.on {
  background: var(--ink);
  border-color: var(--ink);
}
.app-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 clamp(14px, 3vw, 36px) 12px;
  font-size: 15px;
  line-height: 1.5;
}
.m {
  animation: rise 0.35s var(--ease) both;
  flex: none;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.m-user {
  align-self: flex-end;
  max-width: 78%;
  padding: 7px 13px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 16px;
  overflow-wrap: anywhere;
}
.m-bubble {
  align-self: flex-start;
  max-width: 88%;
  padding: 7px 13px;
  background: var(--bubble);
  border-radius: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.m-bubble .at {
  font-weight: 700;
}
.caret {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--ink);
  vertical-align: 2px;
  animation: pulse 0.9s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}
.m-block {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  column-gap: 10px;
}
.m-block .m-face {
  width: 26px;
  height: 26px;
}
.m-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.m-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink2);
  line-height: 1.2;
}
.m-tool {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-inline: 4px;
  max-width: 88%;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink3);
  white-space: nowrap;
}
.m-tool::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink3);
  transform: translateY(-1px);
}
.m-tool.running::before {
  background: var(--ink);
  animation: pulse 0.9s ease-in-out infinite;
}
.m-tool b {
  font-weight: 400;
  color: var(--ink);
}
.m-tool span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-tool em {
  margin-left: auto;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}
.m-card {
  align-self: flex-start;
  width: min(100%, 520px);
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow:
    0 1px 3px rgb(0 0 0 / 0.08),
    0 6px 18px rgb(0 0 0 / 0.07);
}
.m-card code {
  display: block;
  padding: 6px 9px;
  background: var(--bubble);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}
.m-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.m-actions span {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding-inline: 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  transition:
    transform 0.2s var(--ease),
    background-color 0.15s;
}
.m-actions .ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.m-actions .pressed {
  transform: scale(0.95);
}
.m-result {
  font-size: 13px;
  color: var(--ink3);
}
.thinking {
  display: inline-flex;
  gap: 3px;
  padding: 11px 13px;
  background: var(--bubble);
  border-radius: 16px;
  align-self: flex-start;
}
.thinking i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink3);
  animation: hop 1s ease-in-out infinite;
}
.thinking i:nth-child(2) {
  animation-delay: 0.14s;
}
.thinking i:nth-child(3) {
  animation-delay: 0.28s;
}
@keyframes hop {
  30% {
    transform: translateY(-3px);
  }
}
.app-composer {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
  margin: 0 clamp(14px, 3vw, 36px) 16px;
  padding: 0 7px 0 16px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow:
    0 1px 3px rgb(0 0 0 / 0.08),
    0 4px 14px rgb(0 0 0 / 0.06);
  color: var(--ink3);
  font-size: 15px;
}
.app-send {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--raised);
  transition: background-color 0.15s;
}
.app-send::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--ink3);
}
.app-send.running {
  background: var(--ink);
}
.app-send.running::after {
  background: var(--bg);
}

/* the phone: a real screen, and the notification that brings you to it */
.phone-stage {
  display: grid;
  place-items: center;
}
.phone {
  position: relative;
  /* The whole phone fits on screen. */
  width: min(320px, 74vw, (100svh - 150px) / 2.17);
  border-radius: 44px;
  overflow: hidden;
  background: var(--bg);
  box-shadow:
    0 0 0 9px var(--ink),
    0 2px 6px rgb(0 0 0 / 0.06),
    0 40px 80px -24px rgb(0 0 0 / 0.35);
}
.phone img {
  width: 100%;
}
.notice {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 3%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow:
    0 2px 6px rgb(0 0 0 / 0.1),
    0 16px 36px -10px rgb(0 0 0 / 0.3);
  font-size: 13px;
  line-height: 1.35;
}
.notice-face {
  flex: none;
  width: 30px;
  height: 30px;
}
.notice-copy {
  display: grid;
  min-width: 0;
}
.notice-copy b {
  font-weight: 700;
}
.notice-copy > span {
  color: var(--ink2);
}
.is-playing .notice {
  animation: notice 7s var(--ease) infinite;
}
@keyframes notice {
  0%,
  8% {
    transform: translateY(-130%);
  }
  16%,
  72% {
    transform: none;
  }
  76% {
    transform: scale(0.96);
  }
  86%,
  100% {
    transform: translateY(-130%);
  }
}

/* the other abilities: one card each, its picture above its words */
#more h2 {
  margin-bottom: clamp(28px, 4vw, 48px);
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}
.card {
  padding: clamp(18px, 2.4vw, 28px);
  border-radius: 24px;
  background: var(--surface);
  box-shadow:
    0 2px 6px rgb(0 0 0 / 0.05),
    0 24px 60px -28px rgb(0 0 0 / 0.24);
}
.card h3 {
  margin-top: 22px;
}
.card p {
  margin-top: 8px;
  color: var(--ink2);
}
.card .fine {
  margin-top: 10px;
}
.card-stage {
  height: 260px;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 16px;
  background: var(--stage);
  overflow: hidden;
}
.also {
  margin-top: clamp(24px, 3vw, 36px);
  color: var(--ink2);
}
/* typed text appears a character at a time */
.type {
  display: inline-block;
  white-space: nowrap;
}
.is-playing .type {
  animation: type 1.4s steps(var(--n, 12)) both;
}
@keyframes type {
  from {
    clip-path: inset(0 100% 0 0);
  }
}

/* the screen: the bot's browser, with your cursor in it */
.screen-mock {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  font-size: 13px;
}
.sm-strip {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  padding-inline: 10px 8px;
  background: #fff;
  color: #000;
}
.sm-who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.sm-face {
  width: 22px;
  height: 22px;
}
.sm-strip b {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding-inline: 12px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 12.5px;
}
.sm-view {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
}
.sm-page {
  width: min(64%, 260px);
  display: grid;
  gap: 7px;
  padding: 14px;
  border-radius: 10px;
  background: #fff;
  color: #000;
}
.sm-field {
  display: block;
  height: 28px;
  padding-inline: 9px;
  border: 1px solid #e6e6e6;
  border-radius: 7px;
  font-size: 12.5px;
  line-height: 26px;
  color: #5c5c5c;
}
.sm-focus {
  border-color: #000;
  color: #000;
  font-family: var(--mono);
}
.sm-typed {
  --n: 7;
  display: inline-block;
}
.sm-submit {
  display: block;
  height: 28px;
  border-radius: 999px;
  background: #000;
}
.sm-cursor {
  position: absolute;
  left: 56%;
  top: 62%;
  width: 20px;
  height: 20px;
  fill: #fff;
  stroke: #000;
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.is-playing .sm-cursor {
  animation: cursor 7s var(--ease) infinite;
}
.is-playing .sm-typed {
  animation: typed 7s steps(7) infinite;
}
@keyframes cursor {
  0% {
    translate: 120% 160%;
  }
  18%,
  48% {
    translate: 0 0;
  }
  62%,
  82% {
    translate: -10% 150%;
  }
  86% {
    translate: -10% 150%;
    scale: 0.85;
  }
  90%,
  100% {
    translate: -10% 150%;
  }
}
@keyframes typed {
  0%,
  22% {
    clip-path: inset(0 100% 0 0);
  }
  44%,
  100% {
    clip-path: inset(0 0 0 0);
  }
}

/* memory: a page of plain text you can edit */
.doc {
  width: min(100%, 360px);
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
}
.doc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.doc-face {
  width: 22px;
  height: 22px;
}
.doc-lines {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.doc-lines li {
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--bubble);
}
.doc-new {
  outline: 1.5px solid var(--ink);
  outline-offset: -1.5px;
}
.doc-new::after {
  content: '';
  display: inline-block;
  width: 1.5px;
  height: 1.05em;
  margin-left: 2px;
  background: var(--ink);
  vertical-align: -2px;
  animation: pulse 0.9s step-end infinite;
}

/* skills: a catalog row turns into an installed one */
.skills {
  width: min(100%, 400px);
  display: grid;
  gap: 8px;
}
.skills li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
}
.skill-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink2);
}
.skill-copy b {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}
.skill-btn {
  flex: none;
  display: inline-grid;
  place-items: center;
  height: 28px;
  padding-inline: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}
.skill-btn > span {
  grid-area: 1 / 1;
}
.skill-btn.is-done,
.skill-new .skill-btn {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}
.skill-idle {
  visibility: hidden;
}
.is-playing .skill-new .skill-btn {
  animation: install 6s step-end infinite;
}
.is-playing .skill-idle {
  animation: show-then-hide 6s step-end infinite;
}
.is-playing .skill-ok {
  animation: hide-then-show 6s step-end infinite;
}
@keyframes install {
  0% {
    border-color: var(--line);
    background: var(--bg);
    color: var(--ink);
  }
  40%,
  100% {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--bg);
  }
}
@keyframes show-then-hide {
  0% {
    visibility: visible;
  }
  40%,
  100% {
    visibility: hidden;
  }
}
@keyframes hide-then-show {
  0% {
    visibility: hidden;
  }
  40%,
  100% {
    visibility: visible;
  }
}

/* the secret box: typed in, sent encrypted, never shown again */
.secret {
  width: min(100%, 340px);
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
  font-size: 13.5px;
}
.secret-title {
  font-size: 15px;
}
.secret-why {
  color: var(--ink2);
}
.secret-field {
  display: grid;
  padding: 6px 11px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  font-family: var(--mono);
  line-height: 1.4;
}
.secret-field small {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink3);
}
.is-playing .secret-field .type {
  animation: typed 6s steps(16) infinite;
}
.secret-save {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink2);
}
.secret-save::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--ink);
}
.secret-btn {
  display: inline-grid;
  place-items: center;
  justify-self: start;
  height: 32px;
  padding-inline: 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
}
.secret-btn > span {
  grid-area: 1 / 1;
}
.secret-idle {
  visibility: hidden;
}
.is-playing .secret-btn {
  animation: press 6s var(--ease) infinite;
}
.is-playing .secret-idle {
  animation: show-then-hide 6s step-end infinite;
}
.is-playing .secret-ok {
  animation: hide-then-show 6s step-end infinite;
}
@keyframes press {
  36% {
    scale: 1;
  }
  39% {
    scale: 0.94;
  }
  42% {
    scale: 1;
  }
}

/* On black, shadows vanish: windows and cards keep a hairline edge. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) :is(.chat, .card) {
    box-shadow: 0 0 0 1px var(--line);
  }
}
:root[data-theme='dark'] :is(.chat, .card) {
  box-shadow: 0 0 0 1px var(--line);
}

/* open source */
.open-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px clamp(32px, 6vw, 96px);
}
.open-links {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* the last section inverts the page */
.start {
  --muted: color-mix(in srgb, var(--bg) 62%, var(--ink));
  background: var(--ink);
  color: var(--bg);
  padding-block: clamp(72px, 10vw, 136px);
}
.start ::selection {
  background: var(--bg);
  color: var(--ink);
}
.start-layout {
  text-align: center;
}
.start .downloads {
  margin-top: 28px;
  justify-content: center;
}
.btn-paper {
  background: var(--bg);
  color: var(--ink);
}
.btn-paper:hover {
  background: var(--raised);
}
.btn-ghost {
  border-color: var(--ink2);
  color: var(--bg);
}
.btn-ghost:hover {
  border-color: var(--bg);
}
.start .fine {
  margin-top: 14px;
  color: var(--muted);
}

.footer {
  padding-block: 32px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 14.5px;
  color: var(--ink2);
}
.footer-links a {
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.footer .fine {
  flex-basis: 100%;
}

@media (max-width: 1000px) {
  .feature-layout,
  .open-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-flip .feature-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-flip .feature-copy {
    order: 0;
  }
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }
  .nav-links {
    display: none;
  }
  .only-wide {
    display: none;
  }
  .only-narrow {
    display: block;
  }
  .intro-window {
    --w: min(360px, 80vw, (100svh - var(--nav) - 40px) * 0.46);
    border-radius: 26px;
  }
  .downloads {
    width: 100%;
  }
  .downloads .btn {
    flex: 1 1 150px;
  }
  .chat {
    height: 520px;
  }
  .m-user,
  .m-bubble,
  .m-tool {
    max-width: 100%;
  }
  .where > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .card-stage {
    height: 230px;
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  /* No choreography: the window, then the card, as plain blocks. */
  .intro {
    height: auto;
  }
  .intro-stage {
    position: static;
    height: auto;
    display: block;
    padding-block: 32px 64px;
  }
  .intro-window {
    margin-inline: auto;
    transform: none;
    opacity: 1;
    filter: none;
  }
  .intro-bots,
  .intro-hint,
  .intro-panel {
    display: none;
  }
  .intro-card {
    margin: 40px auto 0;
    transform: none;
    opacity: 1;
  }
}
