/* afk — goafk.dev
   Brand: monochrome-first, Inter, quiet grid. Tokens mirror afk-branding.json. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/InterVariable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --n-0: #ffffff;
  --n-50: #f7f7f5;
  --n-100: #efefec;
  --n-200: #dddeda;
  --n-300: #c7c9c6;
  --n-400: #a8abb0;
  --n-500: #8c929a;
  --n-600: #666c74;
  --n-700: #444950;
  --n-800: #2a2d31;
  --n-900: #1a1c1f;
  --n-950: #111315;
  --n-1000: #000000;

  --dot: var(--n-500);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 120ms;
  --t-normal: 180ms;
  --t-slow: 260ms;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-icon: 24px;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --max: 1160px;
  --gutter: 20px;
  --section: 96px;
  color-scheme: light;

  /* light (default) */
  --bg: var(--n-50);
  --surface: var(--n-0);
  --sunken: var(--n-100);
  --line: var(--n-200);
  --line-strong: var(--n-300);
  --text: var(--n-950);
  --text-2: var(--n-600);
  --text-3: var(--n-600); /* #8C929A is 2.9:1 on the light background: too faint for small text */
  --invert-bg: var(--n-950);
  --invert-text: var(--n-0);
  --frame: var(--n-950);
  --frame-ring: transparent;
  --shadow-phone: 0 1px 1px rgba(17, 19, 21, 0.04), 0 8px 16px -8px rgba(17, 19, 21, 0.12), 0 32px 64px -24px rgba(17, 19, 21, 0.22);
  --shadow-pop: 0 1px 2px rgba(17, 19, 21, 0.06), 0 12px 32px -12px rgba(17, 19, 21, 0.24);
  --term-bg: var(--n-950);
  --term-line: var(--n-800);
  /* Cards: a 1px ring + soft lift instead of solid borders, so edges adapt to any surface. */
  --ring: rgba(17, 19, 21, 0.09);
  --ring-strong: rgba(17, 19, 21, 0.28);
  --card-shadow: 0 0 0 1px var(--ring), 0 1px 2px rgba(17, 19, 21, 0.04), 0 8px 20px -14px rgba(17, 19, 21, 0.18);
  --img-outline: oklch(0 0 0 / 0.1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: var(--n-950);
    --surface: var(--n-900);
    --sunken: #15171a;
    --line: var(--n-800);
    --line-strong: var(--n-700);
    --text: var(--n-0);
    --text-2: var(--n-400);
    --text-3: var(--n-500);
    --invert-bg: var(--n-0);
    --invert-text: var(--n-950);
    --frame: var(--n-1000);
    --frame-ring: var(--n-800);
    --shadow-phone: 0 32px 64px -24px rgba(0, 0, 0, 0.6);
    --shadow-pop: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
    --term-bg: var(--n-900);
    --term-line: var(--n-800);
    --ring: rgba(255, 255, 255, 0.08);
    --ring-strong: rgba(255, 255, 255, 0.3);
    --card-shadow: 0 0 0 1px var(--ring), 0 1px 2px rgba(0, 0, 0, 0.32);
    --img-outline: oklch(1 0 0 / 0.1);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--n-950);
  --surface: var(--n-900);
  --sunken: #15171a;
  --line: var(--n-800);
  --line-strong: var(--n-700);
  --text: var(--n-0);
  --text-2: var(--n-400);
  --text-3: var(--n-500);
  --invert-bg: var(--n-0);
  --invert-text: var(--n-950);
  --frame: var(--n-1000);
  --frame-ring: var(--n-800);
  --shadow-phone: 0 32px 64px -24px rgba(0, 0, 0, 0.6);
  --shadow-pop: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  --term-bg: var(--n-900);
  --term-line: var(--n-800);
  --ring: rgba(255, 255, 255, 0.08);
  --ring-strong: rgba(255, 255, 255, 0.3);
  --card-shadow: 0 0 0 1px var(--ring), 0 1px 2px rgba(0, 0, 0, 0.32);
  --img-outline: oklch(1 0 0 / 0.1);
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --section: 128px;
  }
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.625 var(--font);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
::selection {
  background: var(--text);
  color: var(--bg);
}
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 6px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--invert-bg);
  color: var(--invert-text);
  font-size: 14px;
  text-decoration: none;
  transition: top var(--t-normal) var(--ease);
}
.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- type ---------- */
/* Sized so "Away from keyboard, / not away from control." always sets as two lines. */
.display {
  font-size: clamp(30px, 8.7vw, 72px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.025em;
}
.h2-sm {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
}
.h3 {
  font-size: 19px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--text-2);
  letter-spacing: -0.005em;
}
.muted {
  color: var(--text-2);
}
.faint {
  color: var(--text-3);
}
.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-2);
}
/* The brand's away dot, used as a quiet section marker. */
.label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot);
  flex: none;
}
.mono {
  font-family: var(--mono);
  font-size: 0.92em;
  letter-spacing: 0;
}
code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--sunken);
  border: 1px solid var(--line);
}

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-normal) var(--ease);
}
.header.is-scrolled {
  border-bottom-color: var(--line);
}
.header .wrap {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  height: 44px;
  margin-left: -2px;
  color: var(--text);
}
.brand svg {
  height: 26px;
  width: auto;
}
.nav {
  display: none;
  gap: 4px;
  margin-right: auto;
}
.nav a {
  padding: 10px 12px; /* 40px tall */
  border-radius: var(--r-sm);
  font-size: 14px;
  line-height: 20px;
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
@media (min-width: 900px) {
  .nav {
    display: flex;
  }
  .header-actions {
    margin-left: 0;
  }
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), scale var(--t-fast) var(--ease);
}
.icon-btn:active {
  scale: 0.96;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
.theme-toggle {
  position: relative;
}
.theme-toggle svg {
  position: absolute;
  inset: 0;
  margin: auto;
  opacity: 0;
  scale: 0.25;
  filter: blur(4px);
  transition-property: opacity, scale, filter;
  transition-duration: var(--t-normal);
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}
:root[data-theme-pref="light"] .theme-toggle .i-sun,
:root[data-theme-pref="dark"] .theme-toggle .i-moon,
:root:not([data-theme-pref]) .theme-toggle .i-auto,
:root[data-theme-pref="system"] .theme-toggle .i-auto {
  opacity: 1;
  scale: 1;
  filter: blur(0);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font: 500 15px/1 var(--font);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), color var(--t-fast) var(--ease), scale var(--t-fast) var(--ease);
}
.btn:active {
  scale: 0.96;
}
.btn-primary {
  background: var(--invert-bg);
  color: var(--invert-text);
}
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--card-shadow);
}
.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 10px;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn[aria-disabled="true"] {
  cursor: default;
}
.btn[aria-disabled="true"]:active {
  scale: 1;
}
.soon {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--sunken);
  color: var(--text-3);
  border: 1px solid var(--line);
}

/* ---------- install command ---------- */
.cmd {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: min(520px, 100%);
  height: 56px;
  padding: 0 6px 0 18px;
  border-radius: 14px; /* copy button: 8px radius + 6px inset */
  background: var(--surface);
  font-family: var(--mono);
  font-size: 14.5px;
  letter-spacing: -0.01em;
  box-shadow: var(--card-shadow);
}
.cmd-prompt {
  color: var(--text-3);
  user-select: none;
}
.cmd-text {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  color: var(--text);
}
.cmd-text::-webkit-scrollbar {
  display: none;
}
@media (max-width: 639px) {
  .cmd {
    height: auto;
    min-height: 56px;
    padding-top: 6px;
    padding-bottom: 6px;
    align-items: center;
  }
  .cmd-text {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.5;
  }
}
.copy {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
}
.copy svg {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 17px;
  height: 17px;
  transition: opacity var(--t-normal) var(--ease), scale var(--t-normal) var(--ease), filter var(--t-normal) var(--ease);
}
.copy .i-check {
  opacity: 0;
  scale: 0.25;
  filter: blur(4px);
}
.copy.is-copied .i-copy {
  opacity: 0;
  scale: 0.25;
  filter: blur(4px);
}
.copy.is-copied .i-check {
  opacity: 1;
  scale: 1;
  filter: blur(0);
}
.copy-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  translate: -50% 4px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--invert-bg);
  color: var(--invert-text);
  font: 500 12px/1 var(--font);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-normal) var(--ease), translate var(--t-normal) var(--ease);
}
.copy.is-copied .copy-tip {
  opacity: 1;
  translate: -50% 0;
}

/* ---------- hero ---------- */
.hero {
  padding: 56px 0 var(--section);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  justify-items: start;
  min-width: 0;
}

.hero .lead {
  max-width: 44ch;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--text-3);
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
@media (max-width: 639px) {
  .hero-meta {
    gap: 6px 14px;
  }
  .hero-meta span + span::before {
    display: none;
  }
}
.hero-meta span + span::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
  margin-right: 8px;
}
.stores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}
.stores > :first-child {
  grid-column: span 2;
}
@media (max-width: 639px) {
  .stores {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .stores .btn {
    min-width: 0;
    padding: 0 10px;
    gap: 6px;
    font-size: 14px;
  }
}
@media (min-width: 640px) {
  .stores {
    display: flex;
    flex-wrap: wrap;
    width: auto;
  }
}
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
}
@media (min-width: 960px) {
  .display {
    font-size: min(5.6vw, 72px);
  }
  .hero {
    padding-top: 72px;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    gap: 40px;
  }
}

/* ---------- phone ---------- */
.phone {
  --w: 300px;
  --sb-bg: #f7f7f5;
  --sb-fg: #111315;
  position: relative;
  width: var(--w);
  padding: calc(var(--w) * 0.03);
  border-radius: calc(var(--w) * 0.16);
  background: var(--frame);
  box-shadow: 0 0 0 1px var(--frame-ring), var(--shadow-phone);
  flex: none;
}
/* The screenshot (924×2000) sits under a 90-unit status bar: 924 / 2090. */
.phone-screen {
  --sb: 4.306%; /* 90 / 2090 */
  position: relative;
  width: 100%;
  aspect-ratio: 924 / 2090;
  overflow: hidden;
  border-radius: calc(var(--w) * 0.13);
  background: var(--sb-bg);
  isolation: isolate;
  container-type: inline-size;
}
/* Status bar: time left, signal / wi-fi / battery right (masks follow the theme colour). */
.phone-screen::before {
  content: "9:41";
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--sb);
  padding: 0 7.5cqw 0 8cqw;
  display: flex;
  align-items: center;
  font: 600 4.1cqw/1 var(--font);
  letter-spacing: -0.01em;
  color: var(--sb-fg);
  z-index: 3;
}
.sb-icons {
  position: absolute;
  top: 0;
  right: 7.5cqw;
  height: var(--sb);
  width: 16cqw;
  background: var(--sb-fg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 16'%3E%3Cpath d='M2 12h2.5v2H2zM6 9.5h2.5V14H6zM10 7h2.5v7H10zM14 4.5h2.5V14H14z'/%3E%3Cpath d='M30 13.6 26.8 10a4.6 4.6 0 0 1 6.4 0zM24.3 7.4a8.2 8.2 0 0 1 11.4 0l-1.6 1.7a5.9 5.9 0 0 0-8.2 0z'/%3E%3Crect x='42' y='4' width='17' height='9.5' rx='2.6' fill='none' stroke='black' stroke-width='1.4'/%3E%3Crect x='43.8' y='5.8' width='11' height='5.9' rx='1.3'/%3E%3Crect x='59.8' y='7' width='1.6' height='3.5' rx='.8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 16'%3E%3Cpath d='M2 12h2.5v2H2zM6 9.5h2.5V14H6zM10 7h2.5v7H10zM14 4.5h2.5V14H14z'/%3E%3Cpath d='M30 13.6 26.8 10a4.6 4.6 0 0 1 6.4 0zM24.3 7.4a8.2 8.2 0 0 1 11.4 0l-1.6 1.7a5.9 5.9 0 0 0-8.2 0z'/%3E%3Crect x='42' y='4' width='17' height='9.5' rx='2.6' fill='none' stroke='black' stroke-width='1.4'/%3E%3Crect x='43.8' y='5.8' width='11' height='5.9' rx='1.3'/%3E%3Crect x='59.8' y='7' width='1.6' height='3.5' rx='.8'/%3E%3C/svg%3E") center / contain no-repeat;
  z-index: 4;
}
/* Front camera: a small dot centred in the status bar, echoing the mark. */
.phone-screen::after {
  content: "";
  position: absolute;
  top: calc(var(--sb) / 2);
  left: 50%;
  width: 3.4cqw;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--n-1000);
  z-index: 5;
}
.phone-screen img {
  position: absolute;
  inset: var(--sb) 0 0 0;
  width: 100%;
  height: calc(100% - var(--sb));
  object-fit: cover;
  object-position: top;
  /* subtle outline keeps screenshots crisp against the frame */
  outline: 1px solid var(--img-outline);
  outline-offset: -1px;
}
.scene {
  position: absolute;
  inset: 0;
  transition: opacity var(--t-slow) var(--ease), filter var(--t-slow) var(--ease);
}
.scene.is-hidden {
  opacity: 0;
  filter: blur(2px);
}
.phone-lg {
  --w: min(340px, 78vw);
}
.phone-md {
  --w: min(290px, 66vw);
}
.phone-sm {
  --w: min(250px, 58vw);
}

/* Tappable "Allow" over the hero screenshot (button at 334–474 × 1576–1658 of 924×2000). */
.hotspot {
  position: absolute;
  z-index: 3;
  left: 36.15%;
  width: 15.15%;
  top: calc(var(--sb) + (100% - var(--sb)) * 0.788);
  height: calc((100% - var(--sb)) * 0.041);
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 0 2px var(--sb-bg), 0 0 0 3.5px var(--n-500);
  transition: opacity var(--t-normal) var(--ease), scale var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.hotspot.is-on {
  opacity: 1;
  pointer-events: auto;
  animation: hotspot-ring 1.6s var(--ease) infinite;
}
.hotspot:active,
.hotspot.is-pressed {
  scale: 0.96;
  background: rgba(255, 255, 255, 0.18);
}
@keyframes hotspot-ring {
  50% {
    box-shadow: 0 0 0 2px var(--sb-bg), 0 0 0 6px color-mix(in srgb, var(--n-500) 30%, transparent);
  }
}
.hero-visual {
  gap: 16px;
}
.hero-hint {
  font-size: 13px;
  color: var(--text-3);
  opacity: 0;
  transition: opacity var(--t-normal) var(--ease);
}
.hero-hint.is-on {
  opacity: 1;
}
.hero-hint strong {
  color: var(--text);
  font-weight: 500;
}

/* Heads-up notification (hero animation). */
.notif {
  position: absolute;
  z-index: 4;
  top: calc(var(--w) * 0.075);
  left: calc(var(--w) * 0.035);
  right: calc(var(--w) * 0.035);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  padding: 12px;
  border-radius: 20px; /* app icon 8px + 12px padding */
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-pop), 0 0 0 1px var(--line);
  translate: 0 -60%;
  opacity: 0;
  transition: translate var(--t-slow) var(--ease), opacity var(--t-normal) var(--ease);
  font-size: 12px;
  line-height: 1.35;
}
.notif.is-in {
  translate: 0 0;
  opacity: 1;
}
/* Exits are softer than entries: a small lift and a quicker fade, not a full slide back. */
.notif.is-out {
  translate: 0 -8px;
  opacity: 0;
  transition: translate var(--t-normal) var(--ease), opacity var(--t-normal) var(--ease);
}
.notif-icon {
  grid-row: span 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--n-950);
  color: var(--n-0);
}
.notif-icon svg {
  width: 16px;
  height: auto;
}
.notif-app {
  font-size: 11px;
  color: var(--text-3);
}
.notif-title {
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-body {
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- sections ---------- */
.section {
  padding: var(--section) 0;
}
.section + .section {
  border-top: 1px solid var(--line);
}
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  max-width: 720px;
  margin-bottom: 56px;
}
.section-head .lead {
  max-width: 56ch;
}
.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  justify-items: center;
}

/* Problem statement */
.problem {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.problem-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.problem-row .n {
  font: 500 13px/1 var(--mono);
  color: var(--text-3);
}
.problem-row p {
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.problem-row p span {
  color: var(--text-3);
}
.problem-row.is-answer p {
  color: var(--text);
}
@media (min-width: 768px) {
  .problem-row {
    grid-template-columns: 120px 1fr;
  }
}

/* Feature rows */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.feature + .feature {
  margin-top: 112px;
}
.feature-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-content: start;
}
.feature-copy .lead {
  font-size: 18px;
}
.ticks {
  display: grid;
  gap: 12px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.ticks li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
}
.ticks li strong {
  color: var(--text);
  font-weight: 500;
}
.ticks svg {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: var(--text);
}
.stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 48px 20px;
  border-radius: var(--r-lg);
  background: var(--sunken);
  border: 1px solid var(--line);
  min-height: 520px;
  overflow: hidden;
}
.stage-pair .phone:nth-child(2) {
  margin-top: 64px;
}
.stage-pair .phone:nth-child(1) {
  margin-bottom: 64px;
}
@media (max-width: 639px) {
  .stage-pair .phone:nth-child(2) {
    display: none;
  }
  .stage-pair .phone:nth-child(1) {
    margin: 0;
  }
}
@media (min-width: 960px) {
  .feature {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 72px;
  }
  .feature.is-flipped {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
  .feature.is-flipped .feature-copy {
    order: 2;
  }
  .stage {
    min-height: 640px;
  }
}

/* Small feature grid */
.grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.cell {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 28px;
  background: var(--bg);
}
.cell svg {
  width: 22px;
  height: 22px;
  color: var(--text);
  margin-bottom: 8px;
}
.cell p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
}
@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .cell {
    padding: 28px;
  }
}

/* How it works */
.flow {
  display: grid;
  gap: 12px;
}
.node {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 24px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
.node-k {
  font: 500 12px/1 var(--mono);
  color: var(--text-3);
}
.node-t {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.node p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
}
.node.is-afk {
  background: var(--invert-bg);
  border-color: var(--invert-bg);
  color: var(--invert-text);
}
.node.is-afk p,
.node.is-afk .node-k {
  color: color-mix(in srgb, var(--invert-text) 62%, var(--invert-bg));
}
.link {
  display: grid;
  place-items: center;
  height: 28px;
  font: 500 11px/1 var(--mono);
  color: var(--text-3);
  letter-spacing: 0.02em;
}
.link::before {
  content: "";
  position: absolute;
}
.facts {
  display: grid;
  gap: 24px;
  margin-top: 56px;
}
.fact {
  display: grid;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.fact p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
}
@media (min-width: 960px) {
  .flow {
    grid-template-columns: 1fr 72px 1fr 72px 1fr 72px 1fr;
    align-items: stretch;
    gap: 0;
  }
  .link {
    height: auto;
    position: relative;
  }
  .link span {
    position: relative;
    z-index: 1;
    padding: 4px 6px;
    background: var(--bg);
  }
  .link::before {
    left: 8px;
    right: 8px;
    top: 50%;
    border-top: 1px dashed var(--line-strong);
  }
  .facts {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

/* Privacy */
.trust {
  display: grid;
  gap: 16px;
}
.trust-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
.trust-card svg {
  width: 22px;
  height: 22px;
  margin-bottom: 6px;
}
.trust-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
}
.note {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-strong);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}
.note svg {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--text-3);
}
@media (min-width: 768px) {
  .trust {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .trust {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Install */
.install {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  counter-increment: step;
}
.steps li:last-child {
  border-bottom: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font: 500 13px/1 var(--mono);
  color: var(--text-2);
}
.steps h3 {
  margin-bottom: 6px;
}
.steps p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
}
.reqs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-2);
}
a.chip {
  text-decoration: none;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.chip svg {
  width: 14px;
  height: 14px;
}
@media (min-width: 960px) {
  .install {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 72px;
  }
}

/* Terminal */
.term {
  margin: 0;
  border-radius: var(--r-lg);
  background: var(--term-bg);
  border: 1px solid var(--term-line);
  color: #e6e7e5;
  overflow: hidden;
  box-shadow: var(--shadow-pop);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid var(--term-line);
}
.term-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--n-700);
}
.term-bar span {
  margin-left: auto;
  margin-right: auto;
  translate: -26px 0;
  font: 500 12px/1 var(--font);
  color: var(--n-500);
}
.term pre {
  margin: 0;
  padding: 20px 22px 24px;
  min-height: 420px;
  font: 400 13px/1.7 var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
.term .p {
  color: var(--n-500);
}
.term .ok {
  color: #ffffff;
}
.term .dim {
  color: var(--n-500);
}
.term .qr {
  display: block;
  width: 116px;
  height: 116px;
  margin: 12px 0;
  padding: 6px;
  background: #fff;
  border-radius: 6px;
}
.caret {
  display: inline-block;
  width: 8px;
  height: 15px;
  margin-left: 2px;
  vertical-align: -3px;
  background: #e6e7e5;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* FAQ */
.faq {
  max-width: 820px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  margin-left: auto;
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 14px no-repeat;
  color: var(--text-3);
  transition: rotate var(--t-normal) var(--ease);
}
.faq details[open] summary::after {
  rotate: 45deg;
}
.faq .a {
  padding: 0 40px 24px 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-2);
}
.faq .a p + p {
  margin-top: 10px;
}

/* Final CTA */
.cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 28px;
  text-align: center;
}
.cta-mark {
  width: 56px;
  height: auto;
  color: var(--text);
}

/* Footer */
.footer {
  padding: 56px 0 48px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-2);
}
.footer-top {
  display: grid;
  gap: 32px;
}
.footer-brand {
  display: grid;
  gap: 14px;
  justify-items: start;
}
.footer-brand svg {
  height: 22px;
  width: auto;
  color: var(--text);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.footer-h {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
}
.footer-cols ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-cols a {
  text-decoration: none;
}
.footer-legal {
  display: grid;
  gap: 8px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-3);
}
@media (min-width: 768px) {
  .footer-top {
    grid-template-columns: 1.2fr 2fr;
  }
  .footer-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-legal {
    grid-template-columns: 1fr auto;
  }
}

/* Docs / prose pages */
.page-head {
  padding: 72px 0 40px;
  display: grid;
  gap: 16px;
}
.prose {
  max-width: 720px;
  padding-bottom: var(--section);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-2);
}
.prose h2 {
  margin: 56px 0 14px;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}
.prose h3 {
  margin: 32px 0 8px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
}
.prose p + p {
  margin-top: 14px;
}
.prose ul,
.prose ol {
  padding-left: 20px;
}
.prose li + li {
  margin-top: 6px;
}
.prose strong {
  color: var(--text);
  font-weight: 500;
}
.prose pre {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--term-bg);
  border: 1px solid var(--term-line);
  color: #e6e7e5;
  font: 13.5px/1.7 var(--mono);
  overflow-x: auto;
}
.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
}
.prose table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 14.5px;
}
.prose th,
.prose td {
  text-align: left;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose th {
  color: var(--text);
  font-weight: 500;
}
.prose td:first-child {
  white-space: nowrap;
}
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* 404 */
.notfound {
  min-height: calc(100vh - 64px - 220px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 96px 0;
}
.notfound .inner {
  display: grid;
  gap: 20px;
  justify-items: center;
}

/* ---------- logo motion (brand: the status dot appears before the bar) ---------- */
.play-logo .brand .lg-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: lg-dot var(--t-slow) var(--ease) 80ms both;
}
.play-logo .brand .lg-bar {
  animation: lg-bar 420ms var(--ease) 260ms both;
}
.play-logo .brand .lg-word {
  animation: lg-word var(--t-slow) var(--ease) 560ms both;
}
@keyframes lg-dot {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}
@keyframes lg-bar {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes lg-word {
  from {
    opacity: 0;
    translate: -4px 0;
  }
}
/* Large marks (CTA, 404) draw the same way when they scroll into view. */
.mark-anim circle {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
.mark-anim path {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 520ms var(--ease) 220ms;
}
.mark-anim.is-in circle {
  opacity: 1;
  transform: none;
}
.mark-anim.is-in path {
  clip-path: inset(0 0 0 0);
}
@media (prefers-reduced-motion: reduce) {
  .play-logo .brand * {
    animation: none !important;
  }
  .mark-anim circle,
  .mark-anim path {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
  }
}

/* Section labels: the dot settles in just before the words, like the logo. */
.label.reveal::before {
  scale: 0.4;
  opacity: 0;
  transition: scale var(--t-slow) var(--ease), opacity var(--t-slow) var(--ease);
}
.label.reveal.is-in::before {
  scale: 1;
  opacity: 1;
}
.label.reveal {
  transition-delay: calc(var(--d, 0ms) + 80ms);
}
.label.reveal::before {
  transition-delay: var(--d, 0ms);
}

/* FAQ: answers open smoothly where the browser supports animating to auto height. */
@supports (interpolate-size: allow-keywords) {
  :root {
    interpolate-size: allow-keywords;
  }
  .faq details::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size var(--t-slow) var(--ease), content-visibility var(--t-slow) allow-discrete;
  }
  .faq details[open]::details-content {
    block-size: auto;
  }
}
.faq .a {
  opacity: 0;
  translate: 0 -4px;
  transition: opacity var(--t-slow) var(--ease), translate var(--t-slow) var(--ease);
}
.faq details[open] .a {
  opacity: 1;
  translate: 0 0;
}

/* Theme switch: one quick cross-fade of the whole page (View Transitions). */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: var(--t-slow);
  animation-timing-function: var(--ease);
}

/* ---------- reveal motion ---------- */
.reveal {
  opacity: 0;
  translate: 0 12px;
  transition: opacity var(--t-slow) var(--ease), translate var(--t-slow) var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.is-in {
  opacity: 1;
  translate: 0 0;
}
.no-js .reveal {
  opacity: 1;
  translate: 0 0;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  /* Gentler, not zero: keep the fade, drop the movement. */
  .reveal {
    translate: 0 0;
    transition: opacity var(--t-slow) ease;
  }
  .faq .a,
  .label.reveal::before {
    translate: 0 0;
    scale: 1;
  }
  .notif,
  .scene,
  .hotspot,
  .caret {
    transition: none;
    animation: none;
  }
}

/* Screenshots exist in both themes; show the one matching the page (status bar follows). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .phone {
    --sb-bg: #111315;
    --sb-fg: #ffffff;
  }
}
:root[data-theme="dark"] .phone {
  --sb-bg: #111315;
  --sb-fg: #ffffff;
}
.shot-dark {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-dark {
    display: block;
  }
  :root:not([data-theme="light"]) .shot-light {
    display: none;
  }
}
:root[data-theme="dark"] .shot-dark {
  display: block;
}
:root[data-theme="dark"] .shot-light {
  display: none;
}

/* ---------- live sync demo ---------- */
.sync {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 0;
  padding: 28px 16px;
  border-radius: var(--r-lg);
  background: var(--sunken);
  border: 1px solid var(--line);
}
@media (min-width: 900px) {
  .sync {
    grid-template-columns: minmax(0, 1fr) 96px auto;
    align-items: center;
    padding: 48px;
  }
  .win {
    height: 540px;
  }
}
.win {
  width: 100%;
  max-width: 680px;
  height: 380px;
  display: grid;
  grid-template-rows: 36px 1fr;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--ring), var(--shadow-pop);
  overflow: hidden;
  font-size: 13px;
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.win-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}
.win-bar span {
  margin: 0 auto;
  translate: -24px 0;
  font-size: 12px;
  color: var(--text-3);
}
.win-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}
.win-side {
  display: none;
}
@media (min-width: 640px) {
  .win-body {
    grid-template-columns: 196px minmax(0, 1fr);
  }
  .win-side {
    display: grid;
    align-content: start;
    gap: 2px;
    padding: 10px 8px;
    border-right: 1px solid var(--line);
    background: var(--bg);
  }
}
.side-h {
  padding: 4px 8px 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-3);
}
.side-row {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-row span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-row.is-active {
  background: var(--sunken);
  color: var(--text);
}
/* Thread status: idle ring, spinner (working), filled (done), dot (needs you). */
.st {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
}
.st-done {
  background: var(--text-3);
  border-color: var(--text-3);
}
.st-run {
  border-color: var(--line-strong);
  border-top-color: var(--text);
  animation: spin 0.9s linear infinite;
}
.st-wait {
  border: 0;
  background: var(--text);
  animation: none;
}
@keyframes spin {
  to {
    rotate: 360deg;
  }
}
.panel {
  display: grid;
  grid-template-rows: 40px 1fr auto;
  min-height: 0;
}
.panel-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  white-space: nowrap;
}
.panel-h span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-chip {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.msgs {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  min-height: 0;
  padding: 14px 16px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 28px);
  mask-image: linear-gradient(transparent, #000 28px);
}
.m {
  flex: none;
  animation: m-in var(--t-slow) var(--ease) both;
}
@keyframes m-in {
  from {
    opacity: 0;
    translate: 0 6px;
  }
}
.m-user {
  padding: 9px 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--sunken);
  font-family: var(--mono);
  font-size: 0.92em;
  line-height: 1.55;
}
.m-agent {
  line-height: 1.6;
  color: var(--text);
}
.m-tool {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--text-2);
}
.m-tool .t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-tool .s {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  border-top-color: var(--text);
  animation: spin 0.9s linear infinite;
}
.m-tool.is-done .s {
  border: 0;
  animation: none;
  background: no-repeat center / 12px 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8.5 3 3 6-7' fill='none' stroke='%238C929A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.m-tool .r {
  color: var(--text-3);
  font-size: 0.95em;
}
.m-perm {
  display: grid;
  gap: 9px;
  padding: 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--text);
  background: var(--surface);
}
.m-perm .q {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}
.m-perm .q::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot);
}
.m-perm .cmdline {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--text-2);
}
.m-perm .btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pbtn {
  height: 28px;
  padding: 0 11px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: 500 12px/1 var(--font);
  cursor: pointer;
  transition: scale var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.pbtn.is-primary {
  background: var(--invert-bg);
  border-color: var(--invert-bg);
  color: var(--invert-text);
}
.pbtn:active,
.pbtn.is-pressed {
  scale: 0.96;
}
.m-perm.is-resolved {
  opacity: 0.55;
  border-color: var(--line);
}
.m-perm.is-resolved .btns {
  display: none;
}
.m-perm .verdict {
  font-size: 12px;
  color: var(--text-3);
}
.composer {
  border-top: 1px solid var(--line);
  padding: 10px 12px 10px 16px;
  display: grid;
  gap: 8px;
}
.comp-input {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 12px;
}
.comp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.model {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  margin-left: -8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: 500 12px/1 var(--font);
  cursor: pointer;
  transition: background-color var(--t-normal) var(--ease), scale var(--t-fast) var(--ease);
}
.model svg {
  width: 12px;
  height: 12px;
  color: var(--text-3);
}
.model.is-flash {
  background: var(--sunken);
}
.model:active {
  scale: 0.96;
}
.send-sq {
  display: grid;
  place-items: center;
  width: 28px;
  height: 26px;
  border-radius: 7px;
  background: var(--sunken);
  color: var(--text-3);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.send-sq.is-ready {
  background: var(--invert-bg);
  color: var(--invert-text);
}
.send-sq svg {
  width: 14px;
  height: 14px;
}

/* The wire: the brand dot carries each change between the Mac and the phone. */
.wire {
  position: relative;
  width: 2px;
  height: 56px;
}
.wire-line {
  position: absolute;
  inset: 0;
  border-left: 1px dashed var(--line-strong);
}
.wire-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--dot);
  opacity: 0;
}
@media (min-width: 900px) {
  .wire {
    width: 100%;
    height: 2px;
  }
  .wire-line {
    border-left: 0;
    border-top: 1px dashed var(--line-strong);
  }
}

/* The phone in the demo is drawn, not a screenshot. */
.phone-demo {
  --w: min(250px, 74vw);
  --sb-bg: var(--surface);
  --sb-fg: var(--text);
}
.app {
  position: absolute;
  inset: var(--sb) 0 0 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
}
.app-h {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}
.app-h svg {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--text-3);
}
.app-h span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.app .msgs {
  padding: 12px;
  gap: 9px;
}
.app-comp {
  display: grid;
  gap: 8px;
  padding: 8px 10px 12px;
  border-top: 1px solid var(--line);
}
.chips {
  display: flex;
  gap: 6px;
}
.qchip {
  height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font: 400 11.5px/1 var(--font);
  cursor: pointer;
  transition: scale var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.qchip:active,
.qchip.is-pressed {
  scale: 0.96;
}
.app-input {
  position: relative;
  min-height: 34px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text);
}
.ph-placeholder {
  color: var(--text-3);
}
[data-typed]:not(:empty) ~ .ph-placeholder {
  display: none;
}
.ph-caret {
  display: none;
  width: 1.5px;
  height: 13px;
  margin-left: 1px;
  vertical-align: -2px;
  background: var(--text);
}
.app-input.is-typing .ph-caret {
  display: inline-block;
}
.app .comp-row .model {
  margin-left: -6px;
}
.app .m-perm {
  padding: 10px;
}
.app .m-perm .btns {
  gap: 5px;
}
.app .pbtn {
  height: 30px;
  padding: 0 10px;
}
/* "Tap Allow" hint ring */
.pbtn.is-hint {
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--text-3);
}

.sync-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 24px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-2);
  text-align: center;
}
.sync-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot);
}
@media (prefers-reduced-motion: reduce) {
  .m,
  .st-run,
  .m-tool .s {
    animation: none;
  }
}

/* ---------- widgets showcase (HTML replica of the Android widgets) ---------- */
.phone-home {
  --sb-bg: var(--home-bg);
  --sb-fg: var(--home-fg);
  --home-bg: #dddeda;
  --home-fg: #111315;
  /* widget palette, from the app (light) */
  --w-base: #f7f7f5;
  --w-raised: #ffffff;
  --w-text: #111315;
  --w-muted: #666c74;
  --w-faint: #8c929a;
  --w-acc: #111315;
  --w-acc-bg: #e6e6e3;
  --w-warn: #9a5f00;
  --w-warn-bg: #f4e7cc;
  --w-bar: #111315;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .phone-home {
    --home-bg: #1a1c1f;
    --home-fg: #ffffff;
    --w-base: #1a1c1f;
    --w-raised: #2a2d31;
    --w-text: #f7f7f5;
    --w-muted: #a8abb0;
    --w-faint: #8c929a;
    --w-acc: #f7f7f5;
    --w-acc-bg: #2a2d31;
    --w-warn: #e3b868;
    --w-warn-bg: #3a3220;
    --w-bar: #ffffff;
  }
}
:root[data-theme="dark"] .phone-home {
  --home-bg: #1a1c1f;
  --home-fg: #ffffff;
  --w-base: #1a1c1f;
  --w-raised: #2a2d31;
  --w-text: #f7f7f5;
  --w-muted: #a8abb0;
  --w-faint: #8c929a;
  --w-acc: #f7f7f5;
  --w-acc-bg: #2a2d31;
  --w-warn: #e3b868;
  --w-warn-bg: #3a3220;
  --w-bar: #ffffff;
}
.home {
  position: absolute;
  inset: var(--sb) 0 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: min-content;
  align-content: start;
  gap: 4.5cqw;
  padding: 7cqw 5.5cqw;
  background: var(--home-bg);
  font-size: 4cqw;
}
.wd {
  border-radius: 7cqw;
  background: var(--w-base);
  color: var(--w-text);
  display: grid;
  align-content: start;
  gap: 2cqw;
}
.wd svg {
  width: 4.6cqw;
  height: auto;
  color: var(--w-bar);
  flex: none;
}
.wd-list {
  grid-column: span 2;
  padding: 1.5cqw 3.5cqw 3.5cqw;
}
.wd-head {
  display: flex;
  align-items: center;
  gap: 1.8cqw;
  height: 10cqw;
  font-size: 4.3cqw;
}
.wd-head b {
  font-weight: 600;
  margin-right: auto;
}
.wd-head-sm {
  height: auto;
  font-size: 3.8cqw;
  color: var(--w-muted);
}
.wd-pill {
  padding: 0.7cqw 2.2cqw;
  border-radius: 3cqw;
  font-size: 3.1cqw;
  font-weight: 600;
  background: var(--w-raised);
  color: var(--w-muted);
}
.wd-pill.wd-warn {
  background: var(--w-warn-bg);
  color: var(--w-warn);
}
.wd-row {
  display: grid;
  grid-template-columns: 7cqw 1fr;
  gap: 2.8cqw;
  align-items: center;
  padding: 2.4cqw 2.8cqw;
  border-radius: 3.5cqw;
  background: var(--w-raised);
}
.wd-row > span:last-child {
  display: grid;
  min-width: 0;
}
.wd-ico {
  display: grid;
  place-items: center;
  width: 7cqw;
  height: 7cqw;
  border-radius: 50%;
  font-size: 3.4cqw;
  font-weight: 700;
}
.wd-ico.wd-warn {
  background: var(--w-warn-bg);
  color: var(--w-warn);
}
.wd-ico.wd-acc {
  background: var(--w-acc-bg);
  color: var(--w-acc);
}
.wd-t {
  font-size: 3.9cqw;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wd-s {
  font-size: 3.1cqw;
  color: var(--w-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wd-btn {
  display: grid;
  place-items: center;
  height: 9.5cqw;
  border-radius: 3.5cqw;
  background: var(--w-raised);
  color: var(--w-acc);
  font-size: 3.6cqw;
  font-weight: 600;
}
.wd-count {
  aspect-ratio: 1;
  padding: 4cqw;
  align-content: stretch;
  grid-template-rows: auto 1fr auto auto auto;
  gap: 0;
}
.wd-count .wd-head {
  grid-row: 1;
}
.wd-n {
  grid-row: 3;
  font-size: 12cqw;
  line-height: 1;
  font-weight: 700;
  color: var(--w-warn);
}
.wd-l {
  grid-row: 4;
  font-size: 3.8cqw;
  font-weight: 500;
}
.wd-count .wd-s {
  grid-row: 5;
}
.icons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5cqw;
  align-content: center;
  justify-items: center;
}
.ico {
  width: 13cqw;
  aspect-ratio: 1;
  border-radius: 4cqw;
  background: color-mix(in srgb, var(--home-fg) 12%, transparent);
}
.ico-afk {
  display: grid;
  place-items: center;
  background: #111315;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.ico-afk svg {
  width: 7cqw;
  height: auto;
  color: #fff;
}
.wd-quick {
  grid-column: span 2;
  grid-template-columns: auto 1fr 1fr;
  align-items: center;
  gap: 2.4cqw;
  padding: 2.6cqw 3.2cqw;
}
.wd-new {
  display: inline-flex;
  align-items: center;
  gap: 1.6cqw;
  font-size: 4cqw;
  font-weight: 700;
  color: var(--w-text);
  padding-right: 1cqw;
}
.wd-chip {
  display: grid;
  place-items: center;
  height: 10cqw;
  border-radius: 3.5cqw;
  background: var(--w-raised);
  font-size: 3.5cqw;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2cqw;
}
.dock {
  grid-column: span 2;
  display: flex;
  justify-content: space-around;
  margin-top: 30cqw;
  padding: 3cqw;
  border-radius: 9cqw;
  background: color-mix(in srgb, var(--home-fg) 6%, transparent);
}
.dock span {
  width: 12cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: color-mix(in srgb, var(--home-fg) 14%, transparent);
}

/* ---------- notify me ---------- */
.notify {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: end;
}
@media (min-width: 960px) {
  .notify {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 72px;
  }
}
.notify-form {
  display: grid;
  gap: 14px;
}
.field {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: var(--r-lg); /* inner button 12px + 6px padding */
  background: var(--surface);
  transition: box-shadow var(--t-fast) var(--ease);
  box-shadow: var(--card-shadow);
}
.field:focus-within {
  box-shadow: 0 0 0 1px var(--ring-strong), 0 1px 2px rgba(17, 19, 21, 0.04);
}
.field input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 400 16px/1 var(--font);
  letter-spacing: -0.01em;
  outline: none;
}
.field input::placeholder {
  color: var(--text-3);
}
@media (max-width: 479px) {
  .field {
    flex-direction: column;
  }
}
.plats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
.plat {
  cursor: pointer;
}
.plat input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.plat span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 14px;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.plat span svg {
  width: 14px;
  height: 14px;
}
.plat input:checked + span {
  border-color: var(--text);
  color: var(--text);
  background: var(--surface);
}
.plat input:focus-visible + span {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.notify-status {
  min-height: 22px;
  font-size: 14px;
  color: var(--text-2);
}
.notify-status.is-ok {
  color: var(--text);
}
.notify-status.is-ok::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--dot);
  vertical-align: 1px;
}
.notify-fine {
  font-size: 13px;
  color: var(--text-3);
}
.btn.is-loading {
  color: transparent;
  position: relative;
  pointer-events: none;
}
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--invert-text) 35%, transparent);
  border-top-color: var(--invert-text);
  animation: spin 0.8s linear infinite;
}


/* ---------- hit areas on touch: 44px without changing the visuals ---------- */
@media (pointer: coarse) {
  .icon-btn {
    width: 44px;
    height: 44px;
  }
  .footer-cols a {
    display: inline-block;
    padding: 11px 0;
    margin: -11px 0;
  }
  .footer-cols ul {
    gap: 22px;
  }
  .qchip,
  .pbtn,
  .model,
  .plat span,
  a.chip {
    position: relative;
  }
  .qchip::before,
  .pbtn::before,
  .model::before,
  .plat span::before,
  a.chip::before {
    content: "";
    position: absolute;
    inset: -9px -2px;
  }
}

/* ---------- press feedback on the remaining controls ---------- */
.plat span,
a.chip {
  transition-property: border-color, color, background-color, scale;
  transition-duration: var(--t-fast);
  transition-timing-function: var(--ease);
}
.plat:active span,
a.chip:active {
  scale: 0.96;
}

/* Hover belongs to pointers: touch devices would otherwise keep a sticky hover after a tap. */
@media (hover: hover) and (pointer: fine) {
  .nav a:hover {
    color: var(--text);
    background: var(--sunken);
  }
  .icon-btn:hover {
    color: var(--text);
    background: var(--sunken);
  }
  .btn-primary:hover {
    background: color-mix(in srgb, var(--invert-bg) 86%, var(--bg));
  }
  .btn-ghost:hover {
    box-shadow: 0 0 0 1px var(--ring-strong), 0 1px 2px rgba(17, 19, 21, 0.04);
  }
  a.chip:hover {
    border-color: var(--line-strong);
    color: var(--text);
  }
  .footer-cols a:hover {
    color: var(--text);
  }
  .qchip:hover {
    background: var(--sunken);
  }
  .model:hover {
    background: var(--sunken);
  }
}

/* Sync demo phone: the app's rounded composer (+ · settings pill · round send). */
.app-comp {
  border-top: 0;
  background: var(--bg);
  padding: 6px 8px 10px;
}
.app-card {
  display: grid;
  gap: 8px;
  padding: 8px 8px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.app-card .app-input {
  border: 0;
  padding: 2px 2px 4px;
  min-height: 22px;
  font-family: var(--font);
  font-size: 12px;
}
.app .comp-row {
  justify-content: flex-start;
  gap: 6px;
}
.app .comp-row .model {
  margin-left: 0;
  height: 24px;
  padding: 0 9px;
  border-radius: 12px;
  background: var(--sunken);
  font-size: 11px;
}
.model-sub {
  color: var(--text-2);
  font-weight: 400;
}
.app-plus {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sunken);
  color: var(--text-2);
}
.app-plus svg {
  width: 12px;
  height: 12px;
}
.app-spacer {
  flex: 1;
}
.app .send-sq {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.app .send-sq svg {
  width: 12px;
  height: 12px;
}

/* Themes: one phone crossfading through themes, with the theme's name below. */
.theme-cycle {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 12px;
}
[data-theme-cycle] .phone-screen picture {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease);
}
[data-theme-cycle] .phone-screen picture.is-on {
  opacity: 1;
}
[data-theme-cycle] .phone-screen {
  transition: background-color var(--t-slow) var(--ease), color var(--t-slow) var(--ease);
}
.theme-name {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
  min-height: 1.4em;
}
.theme-name::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--dot);
  vertical-align: 2px;
}
.stage-pair .theme-cycle {
  margin-top: 64px;
}
.stage-pair .theme-cycle .phone {
  margin: 0;
}
@media (max-width: 639px) {
  .stage-pair:has(.theme-cycle) > .phone {
    display: none;
  }
  .stage-pair .theme-cycle {
    margin-top: 0;
  }
}

/* ---------- notify me: one card ---------- */
.notify-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-radius: var(--r-icon);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
@media (min-width: 640px) {
  .notify-card {
    padding: 28px;
  }
}
.notify-app {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.notify-app b {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.notify-app small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-2);
}
.notify-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--n-950);
  color: var(--n-0);
}
:root[data-theme="dark"] .notify-icon {
  box-shadow: 0 0 0 1px var(--ring);
}
.notify-icon svg {
  width: 26px;
  height: 24px;
}
.notify-fields {
  display: grid;
  gap: 10px;
}
.notify-label {
  padding: 0;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.notify-card .plats {
  display: block;
  margin-bottom: 8px;
}
.notify-card .plats legend {
  margin-bottom: 10px;
}
.plat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.notify-card .plat span {
  width: 100%;
  height: 44px;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 12px 0 14px;
  border-radius: var(--r-md);
  font-size: 15px;
}
.plat-tick {
  margin-left: auto;
  opacity: 0;
  scale: 0.6;
  transition: opacity var(--t-fast) var(--ease), scale var(--t-fast) var(--ease);
}
.plat input:checked + span .plat-tick {
  opacity: 1;
  scale: 1;
}
.notify-card .plat input:checked + span {
  border-color: var(--text);
  background: var(--sunken);
}
.notify-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1 var(--font);
  letter-spacing: -0.01em;
  outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.notify-input::placeholder {
  color: var(--text-3);
}
.notify-input:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px var(--ring);
}
.notify-btn {
  width: 100%;
  height: 52px;
  margin-top: 4px;
  font-size: 16px;
}
.notify-btn:active {
  scale: 0.98;
}
.notify-card .notify-status {
  min-height: 0;
  margin: -6px 0 0;
}
.notify-card .notify-status:empty {
  display: none;
}
.notify-card .notify-fine {
  margin: 0;
  line-height: 1.5;
}
/* Signed up: the form gives way to a clear confirmation. */
.notify-card.is-done .notify-fields {
  display: none;
}
.notify-card.is-done .notify-status {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--sunken);
  font-size: 15px;
}
