:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f7f7f5;
  --text: #0a0a0a;
  --muted: #6b6b6b;
  --border: #e7e7e4;
  --accent: #0a0a0a;
  --on-accent: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.85);
  --glint: rgba(255, 255, 255, 0.28);
  --shadow: rgba(0, 0, 0, 0.18);
  --card: #ffffff;
  --add: #1a7f37;
  --del: #cf222e;
  --ok: #1f9d48;
  --add-bg: #effaf2;
  --add-border: #cdebd5;
  --line-no: #b5b5b0;
  --dash: #a3a39e;
  --graph-ink: 0, 0, 0; /* background vortex hairlines, read by main.js */
  /* The app's accent is azure-400 (#7aa2f7, set in the dark theme below). The app has no light
     theme, so on white the same hue goes deeper to hold its contrast. */
  --live: #3768e0;
  --live-rgb: 55, 104, 224; /* the same, for the background's canvas */
  --nav-h: 64px;
  --radius: 14px;
  --font:
    "Geist", "Inter", system-ui, -apple-system, sans-serif; /* Inter is the fallback if Geist fails to load */
  --mono: "Geist Mono", ui-monospace, monospace;
}

/* Dark theme: the default (set by the <head> script); toggled from the nav and saved in localStorage.
   Values follow the app's graphite theme (packages/ade/ui/src/global/colors) so the page and the
   product screenshot read as one surface. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0b; /* graphite-950, the app's backdrop */
  --bg-alt: #121214; /* graphite-910, the app's base surface */
  --text: #ededf0; /* graphite-50 */
  --muted: #91919b; /* graphite-400 */
  --border: #29292e; /* graphite-820, the app's outline */
  --accent: #ededf0; /* the app's primary action: light on the dark */
  --on-accent: #111113; /* graphite-1000 */
  --nav-bg: rgba(10, 10, 11, 0.8);
  --glint: rgba(0, 0, 0, 0.18);
  --shadow: rgba(0, 0, 0, 0.6);
  --card: #1a1a1e; /* graphite-870, the app's raised surface */
  --add: #5bbf8e; /* jade-400 */
  --del: #eb6f75; /* coral-400 */
  --ok: #5bbf8e;
  --add-bg: rgba(91, 191, 142, 0.12);
  --add-border: rgba(91, 191, 142, 0.3);
  --line-no: #6b6b73; /* graphite-500 */
  --dash: #45454d; /* graphite-720 */
  --graph-ink: 237, 237, 240;
  --live: #7aa2f7; /* azure-400, the app's accent: work under way, selection */
  --live-rgb: 122, 162, 247;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

html {
  background: var(--bg);
}

body {
  background: transparent; /* lets the background vortex show through */
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow {
  max-width: 760px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}

/* Background vortex (drawn by main.js), behind all content. */
.bg-graph {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
/* Solid backdrop above the nav, so pulling past the top of the page (elastic
   overscroll) shows plain background instead of the node graph. */
.nav::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 100vh;
  background: var(--bg);
}
/* Three columns with equal outer tracks, so the links sit at the true center of the page. */
.nav-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.nav-inner > .logo {
  grid-column: 1;
  justify-self: start;
}
.nav-inner > .nav-links {
  grid-column: 2;
}
.nav-inner > .nav-actions {
  grid-column: 3;
  justify-self: end;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.logo svg {
  display: block;
  width: 22px;
  height: auto;
  fill: currentColor;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
} /* matches the FEATURES section label */
.nav-links a {
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 500;
  border: 1px solid transparent;
  transition:
    opacity 0.15s,
    background 0.15s;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}
.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--accent);
  color: var(--on-accent);
}
/* Hover glint: a soft diagonal highlight sweeps across once, like light catching the button. */
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 60%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    var(--glint) 50%,
    transparent 80%
  );
  transform: translateX(-120%) skewX(-20deg);
  pointer-events: none;
}
.btn-primary:hover::after {
  transform: translateX(220%) skewX(-20deg);
  transition: transform 1200ms cubic-bezier(0.4, 0, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover::after {
    transition: none;
  }
}
.btn-secondary {
  background: var(--bg);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--bg-alt);
}
.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
}
.btn-icon img {
  display: block;
  width: 20px;
  height: 20px;
}

/* Hero */
.hero {
  padding: 108px 0 80px;
  text-align: center;
}
.hero-logo {
  display: block;
  height: 70px;
  width: auto;
  margin: 18px auto 38px;
  fill: currentColor;
}
h1 {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 600;
  text-wrap: balance;
}
h2 {
  font-size: clamp(30px, 4.5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
}
h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
/* Typed custom properties so the intro can transition each one on its own. */
@property --x {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@property --dx {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@property --dy {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@property --s {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

/* Hero intro (main.js): the logo's strokes open as "Work isn't a straight line"
   types out, snap closed as it wipes away, then the logo slides up to .hero-logo and the
   tagline, buttons and screenshot fade in. Without JS or with reduced motion,
   the end state shows directly. */
.hero-title {
  position: relative;
}
.hero-tagline {
  display: block;
}
.hero-stage {
  display: none;
}
.intro .hero-stage {
  display: flex;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
}
.hero-slash {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 0.9em;
  width: auto;
  fill: currentColor;
  pointer-events: none;
  transform: translate(-50%, -50%) translate(var(--dx, 0px), var(--dy, 0px))
    scale(var(--s, 1)) translateX(var(--x, 0px));
}
/* Hidden until web fonts load: the headline's height changes when Inter swaps in,
   which would make the centered strokes jump. */
.intro .hero-stage:not(.is-ready) .hero-slash {
  visibility: hidden;
}
/* Start position: the two strokes together form the logo (offsets from its geometry). */
.hero-slash-left {
  --x: -0.3232em;
}
.hero-slash-right {
  --x: 0.3232em;
}
/* Close and slide as independent channels: the strokes close horizontally (--x)
   while, from 80% of the way through, the logo eases up and shrinks into place
   (--dx/--dy/--s). Each channel keeps its own curve, so there's no handoff. */
.hero-slash.is-finishing {
  transition:
    --x 450ms cubic-bezier(0.65, 0, 0.35, 1),
    --dx 500ms cubic-bezier(0.55, 0, 0.25, 1) 360ms,
    --dy 500ms cubic-bezier(0.55, 0, 0.25, 1) 360ms,
    --s 500ms cubic-bezier(0.55, 0, 0.25, 1) 360ms;
}
/* While closing, the text is wiped toward the center just inside the strokes. */
.hero-typed {
  clip-path: inset(-0.3em -0.1em);
} /* room for descenders and overhangs */
.hero-typed.is-closing {
  clip-path: inset(-0.3em 50%);
  transition: clip-path 450ms cubic-bezier(0.65, 0, 0.35, 1);
}
/* Untyped letters take no space, so the text grows from and shrinks to the center. */
/* Hidden until main.js has split it into letters, so the full sentence never flashes on load. */
.intro .hero-typed:not(.is-ready) {
  visibility: hidden;
}
.intro .hero-typed .ch {
  display: none;
}
.intro .hero-typed .ch.is-on,
.intro .hero-typed.is-measuring .ch {
  display: inline;
}
/* One block per measured line; its height is reserved so lines never shift. */
.hero-line {
  display: block;
  height: 1.05em;
  white-space: nowrap;
}

.intro .hero-logo,
.intro .hero-tagline,
.intro .hero-lead,
.intro .hero-actions,
.intro .mockup {
  opacity: 0;
}
.intro.intro-done .hero-stage {
  display: none;
}
.intro.intro-done .hero-logo {
  opacity: 1;
} /* identical shape, swaps in exactly where the strokes landed */
.intro.intro-done .hero-tagline,
.intro.intro-done .hero-lead,
.intro.intro-done .hero-actions,
.intro.intro-done .mockup {
  opacity: 1;
  transition: opacity 700ms ease;
}
.intro.intro-done .hero-lead {
  transition-delay: 150ms;
}
.intro.intro-done .hero-actions {
  transition-delay: 300ms;
}
.intro.intro-done .mockup {
  transition-delay: 500ms;
}

.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
  margin: 20px auto 0;
}
.hero-lead {
  font-size: 20px;
  max-width: 620px;
  margin-top: 24px;
  text-wrap: balance;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 36px;
  flex-wrap: wrap;
}
.mockup {
  /* Extends past the container to halve the side gutters. */
  --bleed: max(12px, calc((100vw - 1120px) / 4 + 12px));
  display: block;
  width: calc(100% + 2 * var(--bleed));
  max-width: none;
  height: auto;
  margin: 72px calc(-1 * var(--bleed)) 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px var(--shadow);
}

/* Logos */
.logos {
  padding: 40px 0 80px;
  text-align: center;
}
.eyebrow {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.logo-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 56px;
  flex-wrap: wrap;
  margin-top: 24px;
}
/* Logos sit muted and static (not links); multiply drops white JPEG backgrounds. */
.logo-row img {
  display: block;
  height: 56px;
  width: auto;
  mix-blend-mode: multiply;
  opacity: 0.5;
  filter: grayscale(1);
  pointer-events: none;
  user-select: none;
}

/* Sections */
.section {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}
.section-head {
  margin-bottom: 56px;
}
.section-head .lead {
  margin-left: 0;
}
.counter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}
.counter i {
  width: 1px;
  height: 12px;
  background: var(--border);
}

/* CTA */
.cta {
  padding: 140px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}
.cta .btn {
  margin-top: 36px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 56px 0;
  font-family: var(--mono);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-cols {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}
.footer-cols div {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}
.copyright {
  font-size: 13px;
}
.footer-cols h4 {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
} /* same size as the links; caps and color set them apart */
.footer-cols a:hover {
  color: var(--muted);
}

/* Short copy for phones; the long version shows everywhere else. */
.copy-short {
  display: none;
}

@media (max-width: 800px) {
  .nav-links {
    display: none;
  }
  /* No centered links on phones, so let the right side take the room it needs. */
  .nav-inner {
    grid-template-columns: 1fr auto;
  }
  .nav-inner > .nav-actions {
    grid-column: 2;
  }
  .hero {
    padding: 64px 0 56px;
  }
  .section {
    padding: 72px 0;
  }
  .footer-cols {
    gap: 40px;
  }
  .copy-long {
    display: none;
  }
  .copy-short {
    display: inline;
  }
  h1 {
    font-size: 34px;
  }
  .hero-lead {
    font-size: 17px;
    margin-top: 18px;
  }
  .cta {
    padding: 96px 0;
  }
}

/* Features: sticky list on the left, panels scroll on the right */
.features-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 64px;
  align-items: start;
}
.features-nav {
  position: sticky;
  top: calc(var(--nav-h) + 48px);
}
.features-nav h2 {
  font-size: clamp(30px, 3.5vw, 40px);
}
.feature-list {
  list-style: none;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.feature-list a {
  display: block;
  padding: 16px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  transition:
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s,
    color 0.2s;
}
.feature-list a:hover {
  color: var(--text);
}
.feature-list a.active {
  background: var(--bg);
  border-color: var(--border);
  box-shadow: 0 6px 20px -10px var(--shadow);
  color: var(--text);
}
.feature-list h3 {
  font-size: 16px;
  color: inherit;
}
.feature-list p {
  font-size: 14px;
  margin-top: 4px;
  color: var(--muted);
}

.feature-panels {
  display: flex;
  flex-direction: column;
  gap: 96px;
}
.feature-panel {
  scroll-margin-top: calc(var(--nav-h) + 48px);
}
.feature-visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  margin-bottom: 28px;
  container-type: inline-size;
}

/* Feature mockups: HTML stand-ins for the product, sized in em off the panel width
   (1em = 2.3% of it) so they scale as one unit. Each loops while its panel is in view
   (main.js adds .is-playing). */
.mk {
  position: absolute;
  inset: 0;
  font-size: 2.3cqw;
  line-height: 1.35;
  color: var(--text);
  --cycle: 10s;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}
.mk * {
  animation-duration: var(--cycle);
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  animation-timing-function: var(--ease);
  animation-play-state: paused;
}
.feature-visual.is-playing .mk * {
  animation-play-state: running;
}
.mk p {
  margin: 0;
  color: inherit;
  font-size: inherit;
  max-width: none;
}
.mk code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-alt);
  border-radius: 0.25em;
  padding: 0 0.25em;
}
.mk-card {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.8em;
  box-shadow: 0 0.8em 2em -1em var(--shadow);
  overflow: hidden;
}
.mk-head {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1em;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.mk-body {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  padding: 0.9em 1em;
}
.mk-ico {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  color: var(--muted);
}
.mk-muted {
  color: var(--muted);
  font-weight: 400;
}
.mk-mono {
  font-family: var(--mono);
  font-size: 0.9em;
}
.mk-right {
  margin-left: auto;
}
.mk-add {
  color: var(--add);
  font-family: var(--mono);
  font-size: 0.9em;
}
.mk-del {
  color: var(--del);
  font-family: var(--mono);
  font-size: 0.9em;
}
.mk-msg {
  align-self: flex-start;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 0.6em;
  padding: 0.55em 0.75em;
}
.mk-agent {
  color: var(--muted);
}
.mk-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  border: 1px solid var(--border);
  border-radius: 0.5em;
  padding: 0.3em 0.65em;
  font-size: 0.9em;
}
.mk-row {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.9em;
}
.mk-merged {
  color: var(--add);
  background: var(--add-bg);
  border: 1px solid var(--add-border);
  border-radius: 0.5em;
  padding: 0.4em 0.65em;
}
.mk-dot {
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--ok);
  flex: none;
}
.mk-check {
  color: var(--ok);
  width: 1em;
  text-align: center;
}
.mk-swap {
  display: inline-grid;
  align-items: center;
}
.mk-swap > * {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}
.mk-btn {
  align-self: flex-start;
  font-size: 0.85em;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 0.45em;
  padding: 0.35em 0.7em;
}
.mk-dots {
  display: inline-flex;
  gap: 0.2em;
}
.mk-dots i {
  width: 0.35em;
  height: 0.35em;
  border-radius: 50%;
  background: var(--ok);
  animation: mk-blink 1.2s infinite both;
}
.mk-dots i:nth-child(2) {
  animation-delay: 0.2s;
}
.mk-dots i:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes mk-blink {
  0%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
}
.mk-spin {
  width: 0.8em;
  height: 0.8em;
  border: 0.15em solid var(--live);
  border-top-color: transparent;
  border-radius: 50%;
  animation: mk-rot 0.9s linear infinite;
}
@keyframes mk-rot {
  to {
    transform: rotate(360deg);
  }
}

/* 1. Threads & branches: in the main line an agent asks three open questions; one is
   branched into a thread, answered and merged back, then the other two follow.
   main.js scripts it with classes (the .mk1-live rules below only apply once it adds
   that class). Without JS, or with reduced motion, the still below shows: the thread
   open with a finished conversation. */
.mk1-main {
  left: 1.4em;
  top: 2em;
  bottom: 2em;
  width: 23em;
}
.mk1-main .mk-head {
  position: relative;
  z-index: 1;
  background: var(--card);
} /* the chat slides up under it */
.mk1-user {
  align-self: flex-end;
  max-width: 85%;
  font-size: 0.95em;
  background: color-mix(in srgb, var(--text) 8%, var(--card));
  border: 0;
  border-radius: 1em;
  padding: 0.7em 1em;
} /* chat bubble, right side like a sent message */
/* "Thinking": a bright sweep runs across the letters, under the user's message at the start of a turn. */
.mk1-working {
  display: none;
  position: absolute;
  left: 1em;
  top: 7.1em;
  color: var(--muted);
}
.mk1-shimmer {
  color: transparent;
  background: linear-gradient(
      100deg,
      var(--muted) 38%,
      var(--text) 50%,
      var(--muted) 62%
    )
    100% 0 / 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
}
.mk-threads .mk1-shimmer,
.mk-queue .mk1-shimmer,
.mk-rewind .mk1-shimmer {
  animation-name: mk1-shimmer;
  animation-duration: 1.7s;
  animation-timing-function: linear;
}
@keyframes mk1-shimmer {
  to {
    background-position: 0 0;
  }
}
.mk1-intro {
  margin-top: 0.1em !important;
}
.mk1-qs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}
.mk1-q {
  position: relative;
  display: grid;
  grid-template-columns: 1.3em 1fr;
  padding: 0.15em 0;
  transition:
    opacity 350ms,
    transform 350ms;
}
/* The branched question looks selected, like highlighted text in Slack: a tight
   highlight behind the words, no bar or box. */
.mk1-sel {
  border-radius: 0.15em;
  transition: background 200ms;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.mk1-q.is-hl .mk1-sel {
  background: rgba(var(--live-rgb), 0.32);
}
.mk1-bullet {
  width: 0.36em;
  height: 0.36em;
  margin: 0.5em 0 0 0.25em;
  border-radius: 50%;
  background: var(--text);
  transition:
    background 300ms,
    transform 300ms;
} /* plain list dot */
.mk1-qtext,
.mk1-qdone {
  grid-column: 2;
  grid-row: 1;
  transition:
    opacity 300ms,
    transform 300ms;
}
.mk1-qdone {
  display: flex;
  align-items: center;
  align-self: stretch;
  color: var(--add);
  background: var(--add-bg);
  border: 1px solid var(--add-border);
  border-radius: 0.5em;
  padding: 0 0.65em;
  font-size: 0.95em;
  opacity: 0;
  transform: translateX(1.2em);
}
.mk1-q.is-resolved .mk1-qtext {
  opacity: 0;
}
.mk1-q.is-resolved .mk1-qdone {
  opacity: 1;
  transform: none;
}
.mk1-q.is-resolved .mk1-bullet {
  background: var(--ok);
  transform: translateY(0.67em);
} /* centered on the two-line result row */
.mk1-qchip {
  position: absolute;
  z-index: 2;
  top: -1.05em;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.8em;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.45em;
  padding: 0.2em 0.55em;
  box-shadow: 0 0.15em 0.5em -0.2em var(--shadow);
  opacity: 0;
  transform: translateY(0.3em);
  transition:
    opacity 250ms,
    transform 250ms,
    background 150ms;
}
.mk1-qchip.is-hover {
  background: var(--bg-alt);
}

.mk1-thread {
  left: 25.8em;
  top: 2em;
  bottom: 2em;
  width: 16.4em;
  display: flex;
  flex-direction: column;
}
.mk1-tbody {
  flex: 1;
  min-height: 0;
  padding: 0.9em;
  font-size: 0.9em;
  overflow: hidden;
}
/* Like a Slack thread: new messages land at the bottom and, once the thread is full, older ones scroll up and out. */
.mk1-tstack {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  transition: transform 400ms var(--ease);
}
.mk1-tmsg {
  display: flex;
  gap: 0.55em;
}
.mk1-t1:not(.is-on) {
  display: none;
} /* the first exchange only plays in the animation */
.mk1-tmsg b {
  display: block;
  font-size: 0.85em;
  margin-bottom: 0.1em;
}
.mk1-av {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.9em;
  height: 1.9em;
  border-radius: 0.5em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 0.85em;
  font-weight: 600;
}
.mk1-av-a {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.mk1-av svg {
  width: 0.95em;
  height: 0.75em;
}
.mk1-treply {
  white-space: pre-line;
}
.mk1-tdots {
  display: none;
}
.mk1-merge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.9em;
  transition:
    background 150ms,
    color 150ms,
    border-color 150ms;
}
.mk1-merge .mk-ico {
  color: inherit;
}
.mk1-merge.is-hover {
  border-color: var(--text);
}
.mk1-merge.is-pressed {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.mk1-composer {
  display: flex;
  align-items: flex-start;
  gap: 0.4em;
  margin: 0 0.8em 0.8em;
  min-height: 3.9em;
  padding: 0.55em 0.6em;
  font-size: 0.88em;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.6em;
}
.mk1-ph {
  color: var(--muted);
}
.mk1-ctext {
  display: none;
}
.mk1-send {
  align-self: flex-end;
  margin-left: auto;
  flex: none;
  width: 1.3em;
  height: 1.3em;
  padding: 0.2em;
  color: var(--muted);
  border-radius: 0.35em;
  transition:
    background 150ms,
    color 150ms;
}
.mk1-composer.has-text .mk1-ph {
  display: none;
}
.mk1-composer.has-text .mk1-ctext {
  display: inline;
}
.mk1-composer.has-text .mk1-send {
  background: var(--text);
  color: var(--bg);
}

/* Typed text: the full string is laid out from the start (the untyped part is invisible),
   so lines never re-wrap and nothing shifts while typing. */
.mk1-off {
  visibility: hidden;
}
.mk1-caret {
  display: inline-block;
  position: relative;
  width: 0;
  height: 1em;
  vertical-align: text-bottom;
}
.mk1-caret::after {
  content: "";
  position: absolute;
  left: 0.04em;
  top: 0.1em;
  bottom: 0.02em;
  width: 0.1em;
  background: currentColor;
  animation: mk1-caret 1s steps(1) infinite;
}
.mk1-caret[hidden] {
  display: none;
}
@keyframes mk1-caret {
  50% {
    opacity: 0;
  }
}

/* Merging back: the thread shrinks down to the question's row, slides left into the main line and turns into its green result. */
.mk1-fly {
  --fly-ease: cubic-bezier(0.45, 0, 0.15, 1);
  display: none;
  position: absolute;
  z-index: 3;
  box-sizing: border-box;
  align-items: center;
  padding: 0 0.65em;
  overflow: hidden;
  color: var(--add);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.8em;
  font-size: 0.95em;
  transition:
    top 650ms var(--fly-ease),
    height 650ms var(--fly-ease),
    left 650ms var(--fly-ease) 350ms,
    width 650ms var(--fly-ease) 350ms,
    border-radius 500ms var(--fly-ease),
    border-color 400ms,
    opacity 200ms;
}
.mk1-fly::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--add-bg);
  opacity: 0;
  transition: opacity 400ms;
}
.mk1-fly > span {
  position: relative;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 250ms 250ms;
}
.mk1-fly.is-green {
  border-color: var(--add-border);
  border-radius: 0.5em;
}
.mk1-fly.is-green::before {
  opacity: 1;
}
.mk1-fly.is-green > span {
  opacity: 1;
}
.mk1-live .mk1-fly {
  display: flex;
  opacity: 0;
  pointer-events: none;
}
.mk1-live .mk1-fly.is-on {
  opacity: 1;
}
.mk1-cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  width: 1.4em;
  height: 1.4em;
  fill: var(--text);
  stroke: var(--bg);
  pointer-events: none;
  opacity: 0;
  transition:
    transform 520ms cubic-bezier(0.45, 0, 0.2, 1),
    opacity 200ms;
  filter: drop-shadow(0 0.1em 0.15em rgba(0, 0, 0, 0.3));
}
.mk1-cursor path {
  transition: transform 120ms;
  transform-origin: 2px 1.5px;
}
.mk1-cursor.is-click path {
  transform: scale(0.8);
}

/* Scripted states (class-driven by main.js). */
.mk1-live .mk1-intro,
.mk1-live .mk1-q {
  opacity: 0;
  transform: translateY(0.4em);
}
.mk1-live .mk1-intro.is-on,
.mk1-live .mk1-q.is-on {
  opacity: 1;
  transform: none;
}
/* Sending: the bubble rises from the bottom of the chat like a message leaving the composer,
   growing out of its bottom-right corner, and settles with a slight overshoot. */
.mk1-live .mk1-user {
  opacity: 0;
  transform: translateY(5em) scale(0.9);
  transform-origin: 100% 100%;
  transition:
    opacity 260ms ease-out,
    transform 650ms cubic-bezier(0.22, 1.2, 0.36, 1);
}
.mk1-live .mk1-user.is-on {
  opacity: 1;
  transform: none;
}
.mk1-live .mk1-working {
  display: block;
  opacity: 0;
  transition: opacity 300ms;
}
.mk1-live .mk1-working.is-on {
  opacity: 1;
}
.mk1-live .mk1-main .mk-body {
  transition:
    opacity 600ms,
    transform 700ms var(--ease);
}
.mk1-live .mk1-main.is-away .mk-body {
  opacity: 0;
  transform: translateY(-2.4em);
}
.mk1-live .mk1-qchip.is-on {
  opacity: 1;
  transform: none;
}
.mk1-live .mk1-thread {
  opacity: 0;
  transform: translateX(2em);
  transition:
    opacity 400ms,
    transform 450ms var(--ease);
  pointer-events: none;
}
.mk1-live .mk1-thread.is-open {
  opacity: 1;
  transform: none;
}
.mk1-live .mk1-thread.is-merged {
  transform: none;
  transition: opacity 250ms;
} /* merging: the fly carries it left, so it doesn't slide right */
.mk1-live .mk1-tmsg:not(.mk1-tp):not(.is-on),
.mk1-live .mk1-merge:not(.is-on) {
  display: none;
}
.mk1-live .mk1-tmsg.is-on:not(.mk1-tp),
.mk1-live .mk1-merge.is-on {
  animation: mk1-in 350ms var(--ease) both;
}
@keyframes mk1-in {
  from {
    opacity: 0;
  }
}
.mk1-live .mk1-ta.is-waiting .mk1-tdots {
  display: inline-flex;
}
.mk1-live .mk1-ta.is-waiting .mk1-treply {
  display: none;
}
.mk1-live .mk1-cursor.is-on {
  opacity: 1;
}
.mk-threads.is-snap * {
  transition: none !important;
}

/* 2. Queued forks: while the agent works, messages wait in a queue, each with its own
   timing. "End of turn" lands in the main line, "new branch" forks a parallel thread that
   is worked on and merged back. main.js scripts it with classes (the .mk2-live rules only apply
   once it adds that class); without JS, or with reduced motion, the still below shows the
   finished state. */
.mk2-main {
  left: 1.4em;
  top: 2em;
  bottom: 2em;
  width: 23em;
  display: flex;
  flex-direction: column;
}
.mk2-main .mk-head {
  position: relative;
  z-index: 1;
  background: var(--card);
} /* the chat slides up under it */
.mk2-slide {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  transition:
    opacity 600ms,
    transform 700ms var(--ease);
}
.mk2-chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  padding: 0.9em 1em;
  overflow: hidden;
}
.mk2-tools {
  display: flex;
  flex-direction: column;
  gap: 0.45em;
}
/* The agent's turn, muted like Claude and Codex: a "Working for Ns" line over a rule, then quiet tool lines. */
.mk2-work {
  color: var(--muted);
  font-size: 0.95em;
  padding-bottom: 0.55em;
  border-bottom: 1px solid var(--border);
}
.mk2-tool {
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: var(--muted);
  font-size: 0.92em;
}
.mk2-tool .mk-ico {
  color: var(--muted);
}
.mk2-trun {
  display: none;
}
.mk2-think {
  display: none;
  color: var(--muted);
}
.mk-label {
  display: flex;
  padding: 0.4em 1em;
  border-top: 1px solid var(--border);
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.mk2-qs {
  padding: 0 1em 0.9em;
}
.mk2-q {
  display: flex;
  align-items: center;
  gap: 0.55em;
  margin-top: 0.4em;
  max-height: 2.9em;
  overflow: hidden;
  padding: 0.4em 0.5em 0.4em 0.8em;
  border: 1px solid var(--border);
  border-radius: 0.7em;
  font-size: 0.88em;
  transition:
    max-height 700ms cubic-bezier(0.45, 0, 0.15, 1),
    margin 700ms cubic-bezier(0.45, 0, 0.15, 1),
    padding 700ms cubic-bezier(0.45, 0, 0.15, 1),
    opacity 350ms,
    border-color 250ms,
    background 250ms;
}
.mk2-fired {
  display: none;
} /* already sent in the still */
.mk2-qtext {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mk2-edit {
  flex: none;
  width: 1.1em;
  height: 1.1em;
  color: var(--muted);
}
/* The timing menu: every pill has the same width, so the icons, labels and chevrons line up in a column. */
.mk2-pill {
  flex: none;
  box-sizing: border-box;
  width: 9.4em;
  display: grid;
  grid-template-columns: 1.1em 1fr 1.1em;
  align-items: center;
  gap: 0.35em;
  padding: 0.28em 0.45em 0.28em 0.6em;
  font-size: 0.9em;
  line-height: 1.35;
  white-space: nowrap;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 5%, var(--card));
}
.mk2-pill .mk-ico {
  width: 1em;
  height: 1em;
}
.mk2-pill .mk2-chev {
  justify-self: end;
}
/* The timing menu the cursor opens above a queued message's pill. */
.mk2-menu {
  display: none;
  position: absolute;
  z-index: 4;
  box-sizing: border-box;
  width: 10.6em;
  padding: 0.3em;
  font-size: 0.88em;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.7em;
  box-shadow: 0 0.8em 2em -0.8em var(--shadow);
}
.mk2-mi {
  display: flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.4em 0.55em;
  border-radius: 0.45em;
  transition: background 120ms;
}
.mk2-mi .mk-ico {
  width: 1em;
  height: 1em;
}
.mk2-mi.is-hover {
  background: color-mix(in srgb, var(--text) 10%, var(--card));
}

/* The fork: the queued message lifts out of the queue, slides right and then up, and opens into the thread.
   main.js places it over its row and moves it to the thread card's box. */
.mk2-fly {
  --fly-ease: cubic-bezier(0.45, 0, 0.15, 1);
  display: none;
  position: absolute;
  z-index: 3;
  box-sizing: border-box;
  align-items: center;
  gap: 0.55em;
  padding: 0.4em 0.5em 0.4em 0.8em;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.7em;
  font-size: 0.88em;
  box-shadow: 0 0.6em 1.4em -0.8em var(--shadow);
  transition:
    left 650ms var(--fly-ease),
    width 650ms var(--fly-ease),
    top 700ms var(--fly-ease) 300ms,
    height 700ms var(--fly-ease) 300ms,
    border-radius 700ms var(--fly-ease) 300ms,
    border-color 400ms,
    color 400ms,
    opacity 250ms;
}
.mk2-fly::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--add-bg);
  opacity: 0;
  transition: opacity 400ms;
  pointer-events: none;
}
.mk2-fly > * {
  position: relative;
  transition: opacity 250ms 250ms;
}
.mk2-fly.is-expand {
  border-radius: 0.8em;
}
.mk2-fly.is-expand > * {
  opacity: 0;
}
.mk2-fm {
  display: none;
  align-items: center;
  gap: 0.45em;
  white-space: nowrap;
}
.mk2-fly.is-merge {
  padding: 0.45em 0.65em;
  font-size: 0.95em;
  box-shadow: none;
}
.mk2-fly.is-merge > :not(.mk2-fm) {
  display: none;
}
.mk2-fly.is-merge .mk2-fm {
  display: flex;
}
.mk2-fly.is-merge .mk-ico {
  color: inherit;
}
.mk2-fly.is-back {
  transition:
    top 650ms var(--fly-ease),
    height 650ms var(--fly-ease),
    left 650ms var(--fly-ease) 350ms,
    width 650ms var(--fly-ease) 350ms,
    border-radius 500ms var(--fly-ease),
    border-color 400ms,
    color 400ms,
    opacity 250ms;
}
.mk2-fly.is-green {
  color: var(--add);
  border-color: var(--add-border);
  border-radius: 0.5em;
}
.mk2-fly.is-green::before {
  opacity: 1;
}
/* The branch reuses the first feature's thread (.mk1-thread and friends); only its states are scripted here. */
.mk2-merged {
  display: none;
  align-items: center;
  gap: 0.45em;
  color: var(--add);
  background: var(--add-bg);
  border: 1px solid var(--add-border);
  border-radius: 0.5em;
  padding: 0.45em 0.65em;
  font-size: 0.95em;
}
.mk2-merged .mk-ico {
  color: inherit;
}
.mk2-queue.mk2-fired {
  display: none;
}

/* Scripted states (class-driven by main.js). */
.mk2-live .mk2-in:not(.is-on),
.mk2-live .mk2-q:not(.is-on),
.mk2-live .mk2-queue:not(.is-on) {
  display: none;
}
.mk2-live .mk2-in.is-on {
  animation: mk2-in 350ms var(--ease) both;
}
.mk2-live .mk2-q.is-on {
  display: flex;
  animation: mk2-in 350ms var(--ease) both;
}
.mk2-live .mk2-queue.is-on {
  display: block;
}
.mk2-live .mk2-menu.is-on {
  display: block;
  animation: mk2-in 200ms var(--ease) both;
}
.mk2-live .mk2-merged.is-on {
  display: flex;
  animation: mk2-in 350ms var(--ease) both;
}
.mk2-live .mk1-user.mk2-in.is-on {
  animation: mk2-send 650ms cubic-bezier(0.22, 1.2, 0.36, 1) both;
  transform-origin: 100% 100%;
}
@keyframes mk2-in {
  from {
    opacity: 0;
    transform: translateY(0.5em);
  }
}
@keyframes mk2-send {
  from {
    opacity: 0;
    transform: translateY(4em) scale(0.9);
  }
  40% {
    opacity: 1;
  }
}
.mk2-live .mk2-think.is-on {
  display: block;
}
.mk2-live .mk2-tool:not(.is-done) .mk2-tdo {
  display: none;
}
.mk2-live .mk2-tool:not(.is-done) .mk2-trun {
  display: inline;
}
.mk2-live .mk2-q.is-sent {
  max-height: 0;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  opacity: 0;
}
.mk2-live .mk2-fly {
  display: flex;
  opacity: 0;
  pointer-events: none;
}
.mk2-live .mk2-fly.is-on {
  opacity: 1;
}
.mk2-live .mk2-branch {
  opacity: 0;
  transition: opacity 250ms;
  pointer-events: none;
}
.mk2-live .mk2-branch.is-open {
  opacity: 1;
  transform: none;
}
.mk2-live .mk2-main.is-away .mk2-slide {
  opacity: 0;
  transform: translateY(-2.4em);
}
.mk2-live .mk1-tmsg:not(.is-on),
.mk2-live .mk1-merge:not(.is-on) {
  display: none;
}
.mk2-live .mk1-tmsg.is-on,
.mk2-live .mk1-merge.is-on {
  animation: mk1-in 350ms var(--ease) both;
}
.mk2-live .mk1-ta.is-waiting .mk1-tdots {
  display: inline-flex;
}
.mk2-live .mk1-ta.is-waiting .mk1-treply {
  display: none;
}
.mk2-live .mk1-cursor.is-on {
  opacity: 1;
}
.mk-queue.is-snap * {
  transition: none !important;
}

/* 3. Attributed changes: highlighted lines reveal the tool call and reasoning
   that produced them. */
.mk3-code {
  left: 1.6em;
  top: 2em;
  width: 29em;
}
.mk3-lines {
  position: relative;
  padding: 0.5em 0;
  font-size: 0.86em;
}
.mk3-ln {
  position: relative;
  height: 2.1em;
  line-height: 2.1em;
  padding-left: 3.2em;
  white-space: pre;
}
.mk3-ln i {
  position: absolute;
  left: 0;
  width: 2.4em;
  text-align: right;
  font-style: normal;
  color: var(--line-no);
}
.mk3-add {
  background: var(--add-bg);
}
.mk3-add::before {
  content: "+";
  position: absolute;
  left: 2.6em;
  color: var(--add);
}
.mk3-hl {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 0.5em;
  height: 2.1em;
  background: rgba(var(--live-rgb), 0.12);
  box-shadow: inset 0.2em 0 0 var(--live);
  pointer-events: none;
  transform: translateY(8.4em);
}
.mk3-pop {
  right: 1.6em;
  width: 15.5em;
  font-size: 0.95em;
}
.mk3-pop-a {
  top: 11.4em;
}
.mk3-pop-b {
  top: 18.6em;
}
.mk3-pop-head {
  display: flex;
  padding: 0.6em 0.9em;
  border-bottom: 1px solid var(--border);
  font-size: 0.8em;
}
.mk3-pop-body {
  padding: 0.7em 0.9em 0.8em;
}
.mk3-pop-body p {
  color: var(--muted);
  margin-top: 0.3em;
  font-size: 0.92em;
}
.mk3-src {
  display: flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 0.6em;
  font-size: 0.8em;
  color: var(--muted);
}
.mk3-hl {
  animation-name: mk3-hl;
}
.mk3-pop-a {
  animation-name: mk3-pop-a;
}
.mk3-pop-b {
  animation-name: mk3-pop-b;
}
@keyframes mk3-hl {
  0%,
  10% {
    opacity: 0;
    transform: translateY(8.4em);
  }
  14%,
  48% {
    opacity: 1;
    transform: translateY(8.4em);
  }
  54%,
  88% {
    opacity: 1;
    transform: translateY(16.8em);
  }
  94%,
  100% {
    opacity: 0;
    transform: translateY(16.8em);
  }
}
@keyframes mk3-pop-a {
  0%,
  16% {
    opacity: 0;
    transform: translateX(0.8em);
  }
  20%,
  46% {
    opacity: 1;
    transform: none;
  }
  50%,
  100% {
    opacity: 0;
    transform: translateX(0.8em);
  }
}
@keyframes mk3-pop-b {
  0%,
  56% {
    opacity: 0;
    transform: translateX(0.8em);
  }
  60%,
  88% {
    opacity: 1;
    transform: none;
  }
  94%,
  100% {
    opacity: 0;
    transform: translateX(0.8em);
  }
}

/* 4. Rewind: three versions of a screen time chart (bars, a line, both), a rewind to the second
   and a pull of the goal line from the abandoned third. The chat is on the left and a phone
   simulator on the right; main.js scripts both with classes (the .mk4-live rules only apply
   once it adds that class). Without JS, or with reduced motion, the still below shows the
   finished state. */
.mk-rewind {
  --ch: #c57b43;
} /* the app's chart color: the copper of the background graph's highlights */
.mk4-chat {
  left: 1.4em;
  top: 1.6em;
  bottom: 1.6em;
  width: 22em;
  display: flex;
  flex-direction: column;
}
.mk4-chat .mk-head {
  position: relative;
  z-index: 1;
  background: var(--card);
}
.mk4-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.9em 1em;
  overflow: hidden;
  transition:
    opacity 600ms,
    transform 700ms var(--ease);
}
.mk4-body > .mk-msg,
.mk4-body > .mk4-ag {
  margin-top: 0.7em;
}
.mk4-body > :first-child {
  margin-top: 0;
}
.mk4-think {
  display: none;
  color: var(--muted);
}
.mk4-arow {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
}
.mk4-r {
  flex: 1;
  min-width: 0;
}
/* Each agent turn ends with its version: hover it to restore. */
.mk4-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  margin-top: 0.1em;
  padding: 0.1em 0.55em 0.1em 0.45em;
  font-family: var(--mono);
  font-size: 0.8em;
  color: var(--muted);
  background: color-mix(in srgb, var(--text) 5%, var(--card));
  border: 1px solid var(--border);
  border-radius: 999px;
  transition:
    color 150ms,
    border-color 150ms,
    opacity 300ms;
}
.mk4-pill .mk-ico {
  width: 1em;
  height: 1em;
  color: inherit;
}
.mk4-pill.is-current {
  color: var(--text);
  border-color: color-mix(in srgb, var(--text) 35%, var(--border));
}
.mk4-pill.is-hover {
  color: var(--text);
  border-color: var(--text);
}
.mk4-pr {
  display: none;
}
.mk4-pill.is-hover .mk4-pl {
  display: none;
}
.mk4-pill.is-hover .mk4-pr {
  display: inline;
}
/* Rewound turns fold away (a grid row easing to 0fr) and leave a quiet marker; the version is kept. */
.mk4-fold {
  display: grid;
  grid-template-rows: 1fr;
  transition:
    grid-template-rows 650ms var(--ease),
    opacity 450ms;
}
.mk4-fold > div {
  min-height: 0;
  overflow: hidden;
}
.mk4-pad {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  padding-top: 0.7em;
}
.mk4-t3 {
  display: none;
} /* the rewound turn only plays in the animation */
.mk4-rw {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.4em 0.65em;
  font-size: 0.92em;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 0.5em;
}
.mk4-rw .mk-ico {
  color: inherit;
}
.mk4-ref {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  vertical-align: middle;
  line-height: 1.5;
  padding: 0 0.5em;
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--text);
  background: color-mix(in srgb, var(--text) 7%, var(--card));
  border: 1px solid var(--border);
  border-radius: 999px;
}
.mk4-rw .mk4-ref {
  color: var(--muted);
}
.mk1-user .mk4-ref {
  background: color-mix(in srgb, var(--text) 15%, var(--card));
  border-color: color-mix(in srgb, var(--text) 18%, var(--card));
}
.mk4-ref .mk-ico {
  width: 0.95em;
  height: 0.95em;
  color: inherit;
}

/* The iPhone simulator: a drawn phone running the app, showing whichever version is checked out. */
.mk4-vtag {
  position: absolute;
  left: 26.2em;
  width: 14.2em;
  top: 1.2em;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.5em;
}
.mk4-vtag > * {
  font-size: 0.85em;
}
.mk4-ver {
  color: var(--text);
}
.mk4-phone {
  position: absolute;
  left: 26.2em;
  top: 3.1em;
  width: 14.2em;
  height: 28.3em;
  padding: 0.5em;
  background: #0d0d0f;
  border-radius: 2.5em;
  box-shadow:
    0 0 0 0.14em color-mix(in srgb, var(--text) 20%, transparent),
    0 1.2em 2.4em -1em var(--shadow);
}
.mk4-island {
  position: absolute;
  z-index: 2;
  top: 1em;
  left: 50%;
  width: 4.2em;
  height: 1.25em;
  background: #000;
  border-radius: 999px;
  transform: translateX(-50%);
}
.mk4-screen {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 1em;
  overflow: hidden;
  border-radius: 2.05em;
  background: var(--card);
  font-size: 0.9em;
}
.mk4-sbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2.8em;
  padding: 0.2em 0.5em 0;
  font-size: 0.85em;
  font-weight: 600;
}
.mk4-batt {
  width: 1.6em;
  height: 0.75em;
  border: 0.12em solid var(--muted);
  border-radius: 0.28em;
  background: linear-gradient(var(--text), var(--text)) left / 70% 100%
    no-repeat content-box;
  padding: 0.1em;
  box-sizing: border-box;
}
.mk4-ptitle {
  margin-top: 0.4em;
  font-size: 1.25em;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.mk4-ptitle span {
  display: block;
  font-size: 0.65em;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}
.mk4-stat {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  margin-top: 0.8em;
}
.mk4-stat b {
  font-size: 1.7em;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.mk4-stat span {
  font-size: 0.8em;
  color: var(--muted);
}
.mk4-chart {
  position: relative;
  flex: none;
  margin-top: 0.7em;
  aspect-ratio: 120 / 76;
  overflow: hidden;
}
.mk4-chart svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.mk4-grid line {
  stroke: var(--border);
}
.mk4-ax text {
  fill: var(--muted);
  font-family: var(--font);
}
.mk-rewind:not(.mk4-live) .mk4-ch-b,
.mk-rewind:not(.mk4-live) .mk4-ch-c {
  display: none;
} /* the still shows the bar chart with its goal line */
.mk4-bar {
  fill: var(--ch);
}
.mk4-ch-c .mk4-bar {
  opacity: 0.3;
}
.mk4-line {
  fill: none;
  stroke: var(--ch);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mk4-area {
  fill: var(--ch);
  opacity: 0.14;
}
.mk4-dots circle {
  fill: var(--card);
  stroke: var(--ch);
  stroke-width: 1.4;
}
.mk4-goal line {
  stroke: var(--text);
  stroke-width: 0.9;
  stroke-dasharray: 2.6 2.2;
  opacity: 0.85;
}
.mk4-goal text {
  font-size: 5px;
}
.mk4-goal text {
  fill: var(--text);
  font-family: var(--font);
  font-weight: 500;
  opacity: 0.85;
}
.mk4-rows {
  margin-top: 0.8em;
  border: 1px solid var(--border);
  border-radius: 0.8em;
  font-size: 0.85em;
}
.mk4-rows div {
  display: flex;
  justify-content: space-between;
  padding: 0.55em 0.8em;
}
.mk4-rows div + div {
  border-top: 1px solid var(--border);
}
.mk4-rows span {
  color: var(--muted);
}
.mk4-tabs {
  display: flex;
  justify-content: space-around;
  margin: auto -1em 0;
  padding: 0.8em 1em 1.7em;
  border-top: 1px solid var(--border);
}
.mk4-tabs i {
  width: 1.3em;
  height: 1.3em;
  border-radius: 0.4em;
  background: var(--border);
}
.mk4-tabs i.is-active {
  background: var(--ch);
}
.mk4-home {
  position: absolute;
  bottom: 0.5em;
  left: 50%;
  width: 4.6em;
  height: 0.28em;
  border-radius: 999px;
  background: var(--text);
  opacity: 0.8;
  transform: translateX(-50%);
}

/* Scripted states (class-driven by main.js). */
.mk4-live .mk4-in:not(.is-on) {
  display: none;
}
.mk4-live .mk4-in.is-on {
  animation: mk2-in 350ms var(--ease) both;
}
.mk4-live .mk1-user.mk4-in.is-on {
  animation: mk2-send 650ms cubic-bezier(0.22, 1.2, 0.36, 1) both;
  transform-origin: 100% 100%;
}
.mk4-live .mk4-ag.is-thinking .mk4-think {
  display: block;
}
.mk4-live .mk4-ag.is-thinking .mk4-arow {
  display: none;
}
.mk4-live .mk4-pill {
  opacity: 0;
}
.mk4-live .mk4-ag.is-done .mk4-pill {
  opacity: 1;
}
.mk4-live .mk4-t3 {
  display: grid;
}
.mk4-live .mk4-t3.is-rewound,
.mk4-live .mk4-rwf {
  grid-template-rows: 0fr;
  opacity: 0;
}
.mk4-live .mk4-rwf.is-on {
  grid-template-rows: 1fr;
  opacity: 1;
}
.mk4-live .mk4-chat.is-away .mk4-body {
  opacity: 0;
  transform: translateY(-2.4em);
}
.mk4-live .mk4-vtag,
.mk4-live .mk4-phone {
  transition:
    opacity 500ms,
    transform 700ms var(--ease);
}
.mk4-live .mk4-vtag {
  opacity: 0;
}
.mk4-live .mk4-vtag.is-on {
  opacity: 1;
}
.mk4-live .mk4-vtag.is-away,
.mk4-live .mk4-phone.is-away {
  opacity: 0;
  transform: translateY(-1em);
}
/* Each version of the chart slides in from the right and, when rewinding, back in from the left. */
.mk4-live .mk4-ch {
  opacity: 0;
  transform: translateX(14%);
  transition:
    opacity 500ms var(--ease),
    transform 650ms var(--ease);
}
.mk4-live .mk4-ch.is-on {
  opacity: 1;
  transform: none;
}
.mk4-live .mk4-ch.is-gone {
  opacity: 0;
  transform: translateX(-14%);
}
.mk4-live .mk4-bar {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(0);
  transition: transform 600ms cubic-bezier(0.3, 0.9, 0.3, 1)
    calc(var(--i) * 55ms);
}
.mk4-live .is-draw .mk4-bar {
  transform: none;
}
.mk4-live .mk4-line {
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1000ms var(--ease) 100ms;
}
.mk4-live .is-draw .mk4-line {
  stroke-dashoffset: 0;
}
.mk4-live .mk4-area,
.mk4-live .mk4-dots {
  opacity: 0;
  transition: opacity 500ms 700ms;
}
.mk4-live .is-draw .mk4-area {
  opacity: 0.14;
}
.mk4-live .is-draw .mk4-dots {
  opacity: 1;
}
.mk4-live .mk4-goal {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition:
    transform 700ms var(--ease),
    opacity 300ms;
}
.mk4-live .mk4-ch-c .mk4-goal {
  transition-delay: 700ms;
}
.mk4-live .is-goal .mk4-goal {
  opacity: 1;
  transform: none;
}
.mk4-live .mk1-cursor.is-on {
  opacity: 1;
}
.mk-rewind.is-snap * {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .mk * {
    animation: none !important;
    transition: none !important;
  }
  .mk .rm-hide {
    display: none !important;
  }
}
.feature-panel > h3 {
  font-size: 22px;
}
.feature-panel > p {
  color: var(--muted);
  font-size: 16px;
  margin-top: 10px;
  max-width: 520px;
}

@media (max-width: 900px) {
  .features-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .features-nav {
    position: static;
  }
  .feature-list {
    display: none;
  }
  .feature-panels {
    gap: 64px;
  }
}

@media (max-width: 600px) {
  /* Mockups run edge to edge on phones so their contents stay as large as possible. */
  .feature-visual {
    margin-left: -24px;
    margin-right: -24px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    margin-bottom: 22px;
  }
  .feature-panel > h3 {
    font-size: 20px;
  }
  .feature-panel > p {
    font-size: 15px;
  }
  .features-nav h2 {
    font-size: 30px;
  }
}

/* Theme toggle in the nav */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.theme-toggle:hover {
  background: var(--bg-alt);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
.theme-toggle .icon-sun {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* Dark-mode fixes for images drawn black-on-white */
:root[data-theme="dark"] .logo-row img {
  filter: grayscale(1) invert(1);
  mix-blend-mode: screen;
}
:root[data-theme="dark"] .btn-icon img {
  filter: invert(1);
}

/* Tally waitlist popup: Tally adds these elements to our page, so we can match the
   dark form (#151517) and the site's 14px card radius. Tally's own styles load
   later, hence !important. */
.tally-loading-indicator {
  background: #151517 !important;
  color: #f2f2f0 !important; /* spinner lines use currentColor */
  border: 1px solid #26262a !important;
}
.tally-popup,
.tally-popup > div,
.tally-popup iframe {
  border-radius: 14px !important;
}
.tally-popup > div {
  overflow: hidden;
}

/* Waitlist: joined state and confirmation toast */
.btn.is-joined::before {
  content: "";
  width: 14px;
  height: 14px;
  margin-right: 8px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%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 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  width: max-content; /* centered with left: 50%, so size to the text, not half the screen */
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 12px 32px -12px var(--shadow);
  opacity: 0;
  transform: translate(-50%, 8px);
  transition:
    opacity 0.2s,
    transform 0.2s;
  pointer-events: none;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
