: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; /* node graph base color, read by main.js */
  --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. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0c;
  --bg-alt: #151517;
  --text: #f2f2f0;
  --muted: #9a9a96;
  --border: #26262a;
  --accent: #f2f2f0;
  --on-accent: #0b0b0c;
  --nav-bg: rgba(11, 11, 12, 0.8);
  --glint: rgba(0, 0, 0, 0.18);
  --shadow: rgba(0, 0, 0, 0.6);
  --card: #1a1a1d;
  --add: #4ac26b;
  --del: #ff7b72;
  --ok: #3fb950;
  --add-bg: rgba(46, 160, 67, 0.12);
  --add-border: rgba(46, 160, 67, 0.3);
  --line-no: #55555a;
  --dash: #55555a;
  --graph-ink: 255, 255, 255;
}

* { 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 node graph 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 node graph (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;
  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 "Build faster than you can think"
   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 { display: inline; }

.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; }
  .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-working { position: absolute; left: 1em; bottom: 0.9em; display: flex; align-items: center; gap: 0.5em; font-size: 0.85em; color: var(--muted); }
.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 #e3c766; border-top-color: transparent; border-radius: 50%; animation: mk-rot 0.9s linear infinite; }
@keyframes mk-rot { to { transform: rotate(360deg); } }

/* 1. Threads & branches: a question splits into a thread, the main line keeps
   working, and only the conclusion merges back. */
.mk1-main { left: 2em; top: 2em; bottom: 2em; width: 22.5em; }
.mk1-thread { left: 26.5em; top: 10em; width: 15em; }
.mk1-thread .mk-body p b { display: block; font-size: 0.85em; margin-bottom: 0.1em; }
.mk1-thread .mk-body { font-size: 0.92em; }
/* Elbow connector from the chip (y 16.95em) up to the thread's header (y 11.3em). */
.mk1-link { position: absolute; left: 24.5em; top: 11.3em; width: 1em; height: 5.65em; border: 0 dashed var(--dash); border-width: 0 0.15em 0.15em 0; }
.mk1-link::after { content: ""; position: absolute; left: 100%; top: -0.075em; width: 1em; border-top: 0.15em dashed var(--dash); }
.mk1-chip { animation-name: mk1-chip; }
.mk1-link { animation-name: mk1-link; }
.mk1-thread { animation-name: mk1-thread; }
.mk1-t1 { animation-name: mk1-t1; }
.mk1-t2 { animation-name: mk1-t2; }
.mk1-btn { animation-name: mk1-btn; }
.mk1-tools { animation-name: mk1-tools; }
.mk1-merged { animation-name: mk1-merged; }
@keyframes mk1-chip { 0%, 9% { opacity: 0; transform: translateY(0.4em); } 13%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes mk1-link { 0%, 14% { opacity: 0; } 19%, 57% { opacity: 1; } 62%, 100% { opacity: 0; } }
@keyframes mk1-thread { 0%, 16% { opacity: 0; transform: translateX(1.5em); } 22%, 56% { opacity: 1; transform: none; } 63%, 100% { opacity: 0; transform: translateX(-3em) scale(0.92); } }
@keyframes mk1-t1 { 0%, 24% { opacity: 0; transform: translateY(0.4em); } 28%, 100% { opacity: 1; transform: none; } }
@keyframes mk1-t2 { 0%, 34% { opacity: 0; transform: translateY(0.4em); } 38%, 100% { opacity: 1; transform: none; } }
@keyframes mk1-btn { 0%, 43% { opacity: 0; } 46%, 50% { opacity: 1; background: var(--bg); color: var(--text); } 52%, 100% { opacity: 1; background: var(--text); color: var(--bg); } }
@keyframes mk1-tools { 0%, 29% { opacity: 0; transform: translateY(0.4em); } 33%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes mk1-merged { 0%, 62% { opacity: 0; transform: translateY(0.4em); } 66%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* 2. The queue: messages wait with a timing, fire at the next step or end of turn,
   and "hold" stays parked. */
.mk-queue { --cycle: 11s; }
.mk2-card { left: 2em; right: 2em; top: 2.4em; }
.mk2-card .mk-body { gap: 0.55em; }
.mk2-card .mk-msg { font-size: 0.9em; }
.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-queue { display: flex; flex-direction: column; gap: 0.4em; padding: 0 1em 0.9em; }
.mk-qrow { display: flex; align-items: center; gap: 0.6em; border: 1px solid var(--border); border-radius: 0.5em; padding: 0.4em 0.6em; font-size: 0.88em; }
.mk-tag { font-size: 0.85em; border: 1px solid var(--border); border-radius: 0.4em; padding: 0.1em 0.45em; color: var(--muted); }
.mk2-q1 { animation-name: mk2-q1; }
.mk2-q2 { animation-name: mk2-q2; }
.mk2-q3 { animation-name: mk2-q3; }
.mk2-spin { animation-name: mk2-hide-34, mk-rot !important; animation-duration: var(--cycle), 0.9s !important; animation-timing-function: step-end, linear !important; }
.mk2-done { animation-name: mk2-show-34; animation-timing-function: step-end; }
.mk2-q1a { animation-name: mk2-hide-40; animation-timing-function: step-end; }
.mk2-q1b { animation-name: mk2-show-40; animation-timing-function: step-end; }
.mk2-b1 { animation-name: mk2-b1; }
.mk2-s1 { animation-name: mk2-hide-62; animation-timing-function: step-end; }
.mk2-s2 { animation-name: mk2-show-62; animation-timing-function: step-end; }
.mk2-q2a { animation-name: mk2-hide-68; animation-timing-function: step-end; }
.mk2-q2b { animation-name: mk2-show-68; animation-timing-function: step-end; }
.mk2-b2 { animation-name: mk2-b2; }
@keyframes mk2-q1 { 0%, 3% { opacity: 0; transform: translateY(0.5em); } 7%, 39% { opacity: 1; transform: none; } 43%, 95% { opacity: 0.45; } 100% { opacity: 0; } }
@keyframes mk2-q2 { 0%, 10% { opacity: 0; transform: translateY(0.5em); } 14%, 67% { opacity: 1; transform: none; } 71%, 95% { opacity: 0.45; } 100% { opacity: 0; } }
@keyframes mk2-q3 { 0%, 17% { opacity: 0; transform: translateY(0.5em); } 21%, 95% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes mk2-b1 { 0%, 40% { opacity: 0; transform: translateY(0.5em); } 44%, 95% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes mk2-b2 { 0%, 68% { opacity: 0; transform: translateY(0.5em); } 72%, 95% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes mk2-hide-34 { 0% { opacity: 1; } 34% { opacity: 0; } }
@keyframes mk2-show-34 { 0% { opacity: 0; } 34% { opacity: 1; } }
@keyframes mk2-hide-40 { 0% { opacity: 1; } 40% { opacity: 0; } }
@keyframes mk2-show-40 { 0% { opacity: 0; } 40% { opacity: 1; } }
@keyframes mk2-hide-62 { 0% { opacity: 1; } 62% { opacity: 0; } }
@keyframes mk2-show-62 { 0% { opacity: 0; } 62% { opacity: 1; } }
@keyframes mk2-hide-68 { 0% { opacity: 1; } 68% { opacity: 0; } }
@keyframes mk2-show-68 { 0% { opacity: 0; } 68% { opacity: 1; } }

/* 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(9, 105, 218, 0.12); box-shadow: inset 0.2em 0 0 #0969da; 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); } }

@media (prefers-reduced-motion: reduce) {
  .mk * { animation: 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; }
