:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --ink: #0c0c0d;
  --muted: #5f5f66;
  --line: #e7e5e4;
  --code-bg: #f4f4f3;
  --pink: #f0245e;
  --k: #f0245e;
  --b: #4a6fc4;
  --pm: #8b8f98;
  --ok: #15803d;
  --edge: rgb(0 0 0 / 0.07);
  --radius: 12px;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --surface: #141416;
    --ink: #f4f4f5;
    --muted: #a1a1aa;
    --line: #26262a;
    --code-bg: #151518;
    --b: #6f8fdc;
    --pm: #7a7f88;
    --ok: #4ade80;
    --edge: rgb(255 255 255 / 0.06);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--pink); text-underline-offset: 3px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
code, pre { font-family: "JetBrains Mono", ui-monospace, monospace; }
:not(pre) > code {
  font-size: 0.88em;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1em 0.35em;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; }
.brand img { display: block; }
.foot-brand { display: inline-flex; align-items: center; gap: 16px; }
.foot-brand img { display: block; }
.nav nav { display: flex; align-items: center; gap: 24px; font-size: 15px; }
.nav .gh { display: flex; align-items: center; gap: 6px; }
.nav nav a { text-decoration: none; color: var(--muted); }
.nav nav a:hover { color: var(--ink); }

.hero { padding-top: 88px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 20px; padding: 5px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); font-size: 14px; font-weight: 600;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pink); }
h1 {
  font-size: clamp(44px, 7.5vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 auto;
  max-width: 14ch;
  text-wrap: balance;
}
.lead {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--muted);
  max-width: 30em;
  margin: 24px auto 0;
  text-wrap: balance;
}
.cta { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.release { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.release a { text-decoration: none; white-space: nowrap; }
.release a:hover { color: var(--ink); }
.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn:hover { transform: translateY(-1px); }
.btn.primary:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 35%, transparent); }
.btn:focus-visible, .tabs button:focus-visible, .copy:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* The hero's product shot: an agent conversation using keyline. */
.app {
  margin: 64px 0 0;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 30px 80px -30px rgb(0 0 0 / 0.35);
  overflow: hidden;
}
.app-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.app-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.app-bar em { font-style: normal; font-size: 13px; color: var(--muted); margin-left: 10px; }
.app-body { padding: 28px clamp(16px, 4vw, 40px) 36px; }
.msg { margin: 0; font-size: 16px; max-width: 46em; }
.msg.user {
  margin-left: auto;
  width: fit-content;
  max-width: 34em;
  background: var(--code-bg);
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 14px 14px 4px 14px;
}
.msg.agent { margin-top: 18px; }
.calls {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font: 12.5px/1.5 "JetBrains Mono", ui-monospace, monospace;
  grid-template-columns: minmax(0, 1fr);
}
.calls li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
.calls b { color: var(--ink); font-weight: 500; }
.calls b::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 0.95em;
  margin-right: 8px;
  vertical-align: -0.1em;
  border-radius: 2px;
  background: var(--pink);
}
.calls i { font-style: normal; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.calls s { flex-shrink: 0; }
.calls s { text-decoration: none; margin-left: auto; color: var(--ok); }
.app .sizes { margin-top: 22px; }
.size { margin: 0; min-width: 0; }
.size figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; white-space: nowrap; }
/* The skyscraper column is narrow: its caption spills left rather than wrapping. */
.size:last-child figcaption { display: flex; justify-content: flex-end; gap: 0.3em; overflow: visible; }


.case { margin-top: 64px; }
.case header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; }
.case h3 { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -0.02em; }
.case h3 span { font-weight: 500; color: var(--muted); font-size: 17px; margin-left: 8px; }
.proves span { white-space: nowrap; }
.proves { margin: 0; font: 500 13px/1.4 "JetBrains Mono", ui-monospace, monospace; color: var(--muted); }
.case-lead { margin: 6px 0 18px; color: var(--muted); font-size: 15px; }
/* One row per case; each item grows with its aspect ratio, so all share one height. */
.strip { display: flex; gap: 14px; align-items: flex-start; }
.m { margin: 0; min-width: 0; }
.strip-wide { margin-top: 14px; }
.m img, .m video, .size img, .size video, .vs img { outline: 1px solid var(--edge); outline-offset: -1px; }
.m img, .m video { width: 100%; height: auto; display: block; border-radius: 10px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 10px 28px -14px rgb(0 0 0 / 0.35); }
.m figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.credit { margin: 10px 0 0; font-size: 12px; color: var(--muted); opacity: 0.8; }
.showcase { margin: 72px 0 0; }
/* Heights line up: each size's width follows its aspect ratio. */
.sizes {
  display: grid;
  /* Widths in proportion to each size's aspect ratio: portrait, banner, skyscraper. */
  grid-template-columns: 0.8fr 1.911fr 0.5fr;
  gap: 20px;
  align-items: end;
}
.size { display: flex; flex-direction: column; }
.size img, .size video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 12px 40px -12px rgb(0 0 0 / 0.25);
}
.showcase figcaption { margin-top: 24px; color: var(--muted); font-size: 15px; }

section h2 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}
.section-lead { color: var(--muted); max-width: 40em; margin: 12px 0 0; }
.section-lead, .case-lead, .vs-note, .panel p, .feature p, .steps p { text-wrap: pretty; }
.how, .features, .gallery, .versus, .faq, .install { padding-top: 120px; }
.hero { padding-bottom: 8px; }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto auto 1fr; gap: 0 20px; }
.steps li {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 0;
}
.steps pre { margin: 0; align-self: start; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.steps h3 { font-size: 17px; margin: 0; display: flex; align-items: center; gap: 10px; }
.steps h3 span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
}
.steps p { color: var(--muted); font-size: 15px; margin: 10px 0 16px; }
pre {
  margin: auto 0 0;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 12.5px;
  line-height: 1.55;
  overflow-x: auto;
}

/* keyline vs a headless browser. Series colours validated for CVD in both modes. */
.vs-stat { margin: 28px 0 0; font-size: clamp(24px, 3vw, 34px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; max-width: 24em; text-wrap: balance; }
.vs-stat strong { color: var(--k); font-weight: 800; }
.vs-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; margin-top: 40px; align-items: start; }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.vs figure { margin: 0; min-width: 0; }
.vs img { width: 100%; height: auto; display: block; border-radius: 10px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 10px 28px -14px rgb(0 0 0 / 0.35); }
.vs figcaption { margin-top: 10px; font-size: 14px; font-weight: 600; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; font-weight: 600; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }
.sw.k, .bar.k { background: var(--k); }
.sw.b, .bar.b { background: var(--b); }
.sw.pm, .bar.pm { background: var(--pm); }
.vs-stats { margin-top: 16px; width: 100%; border-collapse: collapse; font-size: 14px; }
.vs-stats caption { caption-side: bottom; text-align: left; padding-top: 10px; font-size: 12.5px; color: var(--muted); }
.vs-stats th, .vs-stats td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.vs-stats tbody th { color: var(--muted); font-weight: 400; white-space: nowrap; }
.vs-stats td { width: 100%; font-variant-numeric: tabular-nums; }
.bar-row { display: flex; align-items: center; gap: 8px; line-height: 1.5; }
.bar-row + .bar-row { margin-top: 4px; }
.bar-row > span:last-child { white-space: nowrap; }
.bar { display: block; flex: none; height: 10px; width: calc(var(--w) * 0.78); border-radius: 0 4px 4px 0; }
.vs-note { margin: 16px 0 0; color: var(--muted); font-size: 15px; }

.feature h3 a { text-decoration: none; }
.feature h3 a:hover { text-decoration: underline; }
.faq-list { margin-top: 32px; border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 0; font-size: 17px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq summary:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.faq details p { margin: 0 0 18px; color: var(--muted); font-size: 15px; max-width: 46em; text-wrap: pretty; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 40px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--surface); padding: 28px; }
.feature h3 { font-size: 17px; margin: 0 0 8px; }
.feature p { color: var(--muted); font-size: 15px; margin: 0; }

.tabs { display: flex; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.tabs button {
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.panel { margin-top: 20px; }
.panel p { color: var(--muted); margin: 0 0 14px; }
.code { position: relative; }
.code pre { margin: 0; font-size: 14px; padding-right: 80px; }
.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  font: 500 13px Inter, sans-serif;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.footer { margin-top: 120px; border-top: 1px solid var(--line); }
.foot-row { display: flex; justify-content: space-between; align-items: center; padding: 28px 24px; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer nav a { white-space: nowrap; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .nav nav a:not(.gh) { display: none; }
  /* Each campaign scrolls sideways at one height, as on desktop. */
  .strip { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -24px; padding-inline: 24px; scroll-padding-inline: 24px; }
  .m { flex: 0 0 auto !important; scroll-snap-align: start; }
  .m img, .m video { height: 240px; width: auto; }
  .strip-wide .m img { height: auto; width: 100%; }
  .strip-wide .m { flex: 1 1 0 !important; }
  .case h3 span { display: block; margin: 2px 0 0; }
  .proves { font-size: 12px; margin-top: 4px; flex-basis: 100%; text-wrap: balance; }
  .hero { padding-top: 56px; }
  .calls i { display: none; }
  .how, .features, .gallery, .versus, .faq, .install { padding-top: 88px; }
  .steps { grid-template-columns: 1fr; grid-template-rows: none; gap: 16px; }
  .steps li { display: flex; flex-direction: column; grid-row: auto; }
  .steps pre { margin-top: 16px; align-self: stretch; }
  .vs-body { grid-template-columns: 1fr; gap: 28px; }
  .vs { gap: 12px; }
}
@media (max-width: 600px) {
  .sz-name { display: none; }
  .calls li { flex-wrap: wrap; row-gap: 2px; }
  .calls s { flex-basis: 100%; margin-left: 11px; white-space: normal; }
  .eyebrow { font-size: 13px; padding: 5px 12px; }
  .code pre { padding: 44px 16px 14px; white-space: pre; overflow-x: auto; font-size: 13px; }
  .bar { width: calc(var(--w) * 0.66); }
  .size figcaption { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sizes { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}

/* Docs pages (built by docs.mjs): sidebar, article, on-page contents. */
.doc { display: grid; grid-template-columns: 180px minmax(0, 1fr) 200px; gap: 48px; padding-top: 48px; padding-bottom: 40px; }
.doc-side, .doc-toc { position: sticky; top: 84px; align-self: start; display: flex; flex-direction: column; gap: 2px; font-size: 14px; max-height: calc(100vh - 100px); overflow-y: auto; }
.doc-side a, .doc-toc a { color: var(--muted); text-decoration: none; padding: 5px 10px; border-radius: 6px; }
.doc-side a:hover, .doc-toc a:hover { color: var(--ink); }
.doc-side a[aria-current="page"] { color: var(--ink); background: var(--code-bg); font-weight: 600; }
.doc-toc a { font-size: 13px; padding: 3px 10px; }
.toc-title { margin: 0 0 6px; padding: 0 10px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.prose { min-width: 0; max-width: 760px; font-size: 16px; }
.prose h1 { font-size: clamp(32px, 4.5vw, 44px); max-width: none; margin: 0 0 16px; text-align: left; }
.prose h2 { font-size: 26px; letter-spacing: -0.02em; margin: 48px 0 12px; scroll-margin-top: 80px; }
.prose h3 { font-size: 19px; margin: 32px 0 8px; scroll-margin-top: 80px; }
.prose h4 { font-size: 16px; margin: 24px 0 6px; scroll-margin-top: 80px; }
.prose .anchor { color: inherit; text-decoration: none; }
.prose .anchor:hover::after { content: " #"; color: var(--muted); }
.prose a:not(.anchor) { color: var(--ink); text-decoration-color: var(--pink); text-underline-offset: 3px; }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 86%, var(--muted)); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose pre { margin: 14px 0; font-size: 13px; }
.prose blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--pink); color: var(--muted); }
.prose .table { overflow-x: auto; margin: 16px 0; }
.prose table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; }
.prose td code, .prose th code { white-space: nowrap; }
.prose img { max-width: 100%; height: auto; }
.prose .license { white-space: pre-wrap; font-size: 13px; }
.doc-source { margin-top: 48px; font-size: 13px; color: var(--muted) !important; }
@media (max-width: 1100px) {
  .doc { grid-template-columns: 170px minmax(0, 1fr); }
  .doc-toc { display: none; }
}
@media (max-width: 760px) {
  .doc { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
  .doc-side { position: static; flex-direction: row; flex-wrap: wrap; max-height: none; }
}
