/* Larapilot — the docs site. Paper, ink, and one marker. */

@font-face { font-family: "Geist"; src: url("fonts/Geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/Caveat.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #fafaf7;
  --bg-2: #f2f1ec;
  --card: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #33332f;
  --muted: #6b6a63;
  --line: #e7e5de;
  --line-2: #d5d2c8;
  --marker: #fde047;
  --marker-line: #e2a400;
  --faint: #a8a29e;
  --ok: #15803d;
  --code-bg: #111111;
  --code-ink: #ededeb;
  --code-dim: #8b8b85;
  --code-key: #fde047;
  --code-str: #a7f3d0;
  --code-flag: #93c5fd;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 12px 32px -12px rgb(0 0 0 / .14);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / .04), 0 40px 90px -30px rgb(0 0 0 / .32);
  --radius: 16px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --wide: 1200px;
  --header: 64px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b0b0c;
  --bg-2: #111112;
  --card: #141415;
  --ink: #f4f4f2;
  --ink-2: #d2d2cc;
  --muted: #9d9d96;
  --line: #232322;
  --line-2: #34342f;
  --marker: #eab308;
  --marker-line: #facc15;
  --faint: #5c5a55;
  --ok: #4ade80;
  --code-bg: #161617;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -12px rgb(0 0 0 / .6);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / .4), 0 40px 90px -30px rgb(0 0 0 / .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 24px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 1.0625rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { max-width: 100%; }
a { color: inherit; }
::selection { background: var(--marker); color: #0a0a0a; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

h1, h2, h3, h4 { color: var(--ink); font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0 0 1.1em; text-wrap: pretty; }
code, kbd, pre { font-family: var(--mono); }
kbd {
  display: inline-block; min-width: 1.6em; padding: 0 .45em; border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 6px; background: var(--card); color: var(--ink); font-size: .78em; line-height: 1.7; text-align: center;
}
.hand { font-family: var(--hand); font-weight: 600; color: var(--ink); letter-spacing: 0; }

/* the marker */
.mark {
  color: inherit; padding: 0 .12em; margin: 0 -.06em;
  background: linear-gradient(104deg, transparent .2em, var(--marker) .4em, var(--marker) calc(100% - .4em), transparent calc(100% - .15em)) no-repeat 0 72% / 100% 58%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
:root[data-theme="dark"] .mark { color: #0a0a0a; background-size: 100% 92%; background-position: 0 60%; border-radius: .2em; }
.js .mark.draw { background-size: 0% 58%; transition: background-size .9s cubic-bezier(.65, 0, .35, 1) .25s; }
.js .mark.draw.in { background-size: 100% 58%; }
:root[data-theme="dark"].js .mark.draw.in { background-size: 100% 92%; }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-in { height: 100%; max-width: 1360px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.03em; font-size: 1.1rem; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand .ver { font: 500 .72rem/1 var(--mono); letter-spacing: 0; color: var(--muted); border: 1px solid var(--line-2); border-radius: 99px; padding: 4px 7px; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--ink); background: var(--bg-2); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px 0 12px; min-width: 220px;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer;
}
.search-btn:hover { border-color: var(--faint); color: var(--ink); }
.search-btn kbd { margin-left: auto; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid transparent; background: transparent;
  color: var(--ink); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--bg-2); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-light, :root[data-theme="dark"] .theme-dark { display: none; }
:root[data-theme="dark"] .theme-light { display: block; }
.menu-btn { display: none; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 46px; padding: 0 20px; border-radius: 14px;
  font: 600 1rem/1 var(--sans); letter-spacing: -0.01em; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .15s, background .15s, box-shadow .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--ink); color: var(--bg); box-shadow: 0 8px 24px -10px rgb(0 0 0 / .5); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--faint); }
.btn-sm { height: 36px; padding: 0 14px; border-radius: 11px; font-size: .9rem; }

/* ---------------------------------------------------------------- landing */

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.hero { position: relative; padding: 52px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40px 0 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(color-mix(in oklab, var(--ink) 16%, transparent) 1px, transparent 1.4px);
  background-size: 22px 22px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hero-in { text-align: center; max-width: 980px; margin: 0 auto; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--card);
  color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 500; box-shadow: var(--shadow);
}
.pill b { background: var(--ink); color: var(--bg); border-radius: 99px; padding: 3px 9px; font-size: .78rem; font-weight: 600; }
.pill:hover { border-color: var(--faint); }
.pill svg, .search-btn svg { width: 16px; height: 16px; flex: none; }
.hero h1 { font-size: clamp(2.9rem, 7vw, 5.6rem); letter-spacing: -0.058em; line-height: .96; margin: 24px 0 0; font-weight: 750; }
.hero h1 .line2 { display: block; }
.lede { font-size: clamp(1.1rem, 1.9vw, 1.28rem); line-height: 1.58; color: var(--muted); max-width: 780px; margin: 22px auto 0; }
.lede strong { color: var(--ink); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.install {
  position: relative; display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; padding: 8px 8px 8px 18px; border-radius: 14px;
  background: var(--code-bg); color: var(--code-ink); font: 500 .95rem/1 var(--mono); box-shadow: var(--shadow); max-width: 100%;
}
.install .prompt { color: var(--code-dim); user-select: none; }
.install code { white-space: nowrap; overflow: auto; scrollbar-width: none; }
.copy {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; border: 1px solid rgb(255 255 255 / .12);
  background: rgb(255 255 255 / .06); color: var(--code-ink); cursor: pointer;
}
.copy svg { width: 16px; height: 16px; }
.copy:hover { background: rgb(255 255 255 / .12); }
.copy .ok { display: none; } .copy.done .ok { display: block; } .copy.done .cp { display: none; }
.install-note { position: absolute; left: calc(100% + 14px); top: -26px; width: 230px; text-align: left; font-size: 1.55rem; line-height: 1.05; transform: rotate(-4deg); }
.install-note svg { display: block; width: 70px; height: 46px; margin: 4px 0 0 -6px; transform: scaleX(-1) rotate(-12deg); color: var(--ink); }

.showcase { position: relative; max-width: 1160px; margin: 44px auto 0; }
.frame {
  position: relative; border-radius: 18px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
}
.frame-bar { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.frame-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.frame-bar span { min-width: 0; max-width: calc(100% - 90px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0 auto; transform: translateX(-26px); font: 500 .78rem/1 var(--mono); color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; }
.frame img, .frame video { display: block; width: 100%; height: auto; }
.video-toggle {
  position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 99px;
  background: rgb(10 10 10 / .78); color: #fafafa; border: 0; font: 600 .85rem/1 var(--sans); cursor: pointer; backdrop-filter: blur(6px);
}
.video-toggle svg { width: 15px; height: 15px; }
.video-toggle .play, .video-toggle.paused .pause { display: none; } .video-toggle.paused .play { display: block; }
.annot { position: absolute; font-family: var(--hand); font-weight: 600; font-size: 1.6rem; line-height: 1.05; color: var(--ink); pointer-events: none; }
.annot svg { display: block; width: 74px; height: 50px; color: var(--ink); }
.annot-l { left: -150px; top: 22%; width: 140px; transform: rotate(-5deg); text-align: right; }
.annot-l svg { margin-left: auto; }
.annot-r { right: -160px; top: 54%; width: 150px; transform: rotate(4deg); }
.agents { margin: 56px auto 0; text-align: center; color: var(--muted); font-size: .95rem; }
.agents ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin: 16px 0 0; padding: 0; }
.agents li { font-weight: 650; color: var(--ink); letter-spacing: -0.02em; font-size: 1.12rem; opacity: .82; }

.section { padding: 120px 0; }
.section-tight { padding: 80px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 .82rem/1 var(--mono); color: var(--muted); letter-spacing: .02em; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--marker-line); border-radius: 2px; }
.section-head { max-width: 800px; margin: 0 auto 64px; text-align: center; }
.section-head h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); letter-spacing: -0.05em; line-height: 1.02; margin-top: 18px; }
.section-head p { font-size: 1.2rem; color: var(--muted); margin: 20px auto 0; max-width: 680px; }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.trio .card { padding: 30px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card h3 { font-size: 1.3rem; margin: 18px 0 10px; }
.card p { color: var(--muted); margin: 0; }
.card .was { font-family: var(--hand); font-size: 1.45rem; color: var(--faint); text-decoration: line-through; text-decoration-color: var(--marker-line); text-decoration-thickness: 2px; line-height: 1.1; }
.card-ico { width: 48px; height: 48px; color: var(--ink); }

.diagram { margin: 0 auto; color: var(--ink); }
.diagram .sketch { display: block; width: 100%; height: auto; overflow: visible; }
.diagram .d-mobile { display: none; }
.diagram figcaption, figure.shot figcaption { margin-top: 18px; text-align: center; color: var(--muted); font-size: .95rem; }
.sketch path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sketch .s { stroke: currentColor; stroke-width: 2.2; }
.sketch .s.m { stroke: var(--marker-line); }
.sketch .s.f { stroke: var(--faint); }
.sketch .h.m { stroke: var(--marker); opacity: .9; }
.sketch .h.f { stroke: var(--faint); opacity: .35; }
.sketch .mk { stroke: var(--marker); opacity: .8; }
:root[data-theme="dark"] .sketch .mk { opacity: .4; }
:root[data-theme="dark"] .sketch .h.m { opacity: .55; }
.sketch text { fill: currentColor; }
.sketch .hand { font-family: var(--hand); font-weight: 500; }
.sketch .mono { font-family: var(--mono); }
.sketch .sans { font-family: var(--sans); }
.sketch .faint { fill: var(--faint); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 64px; counter-reset: step; }
.step { position: relative; padding: 26px 26px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -16px; left: 22px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--marker); color: #0a0a0a; font: 700 .95rem/1 var(--sans); box-shadow: 0 0 0 4px var(--bg-2); }
.step h3 { font-size: 1.15rem; margin: 6px 0 8px; }
.step p { color: var(--muted); font-size: .98rem; margin: 0 0 12px; }
.step code { font-size: .84rem; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); border-radius: 7px; padding: 3px 7px; }

.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; }
.feature + .feature { margin-top: 140px; }
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip .feature-text { order: 2; }
.feature h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); letter-spacing: -0.045em; line-height: 1.04; margin: 16px 0 18px; }
.feature-text > p { font-size: 1.12rem; color: var(--muted); }
.feature-media { position: relative; }
.ticks { list-style: none; margin: 22px 0 26px; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 34px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .28em; width: 20px; height: 20px; border-radius: 6px; background: var(--marker); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 13l5 5L20 6' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.ticks code, .prose li code, .prose p code, .prose td code, .feature-text code { font-size: .86em; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.more { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--marker); padding-bottom: 2px; }
.more:hover { border-bottom-color: var(--ink); }
.more svg { width: 16px; height: 16px; transition: transform .15s; }
.more:hover svg { transform: translateX(3px); }
.shot-stack { position: relative; }
.shot-stack .frame + .frame { position: absolute; width: 58%; right: -6%; bottom: -14%; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.media-note { position: absolute; font-family: var(--hand); font-weight: 600; font-size: 1.5rem; line-height: 1.05; color: var(--ink); transform: rotate(-4deg); }
.media-note svg { display: block; width: 64px; height: 44px; }

.tour-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 28px; }
.tour-tabs button { height: 38px; padding: 0 15px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--card); color: var(--muted); font: 600 .9rem/1 var(--sans); cursor: pointer; }
.demo-tabs { margin-bottom: 18px; }
.tour-tabs button:hover { color: var(--ink); }
.tour-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tour-panel[hidden] { display: none; }
.tour-panel p { text-align: center; color: var(--muted); max-width: 760px; margin: 22px auto 0; }

.grid-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-shots a { text-decoration: none; color: inherit; }
.grid-shots .frame { border-radius: 14px; }
.grid-shots h3 { font-size: 1.08rem; margin: 16px 0 4px; }
.grid-shots p { color: var(--muted); font-size: .95rem; margin: 0; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; text-align: center; }
.stats div { padding: 22px 10px; }
.stats b { display: block; font-size: clamp(2.2rem, 4vw, 3.4rem); letter-spacing: -0.05em; color: var(--ink); line-height: 1; }
.stats span { display: block; margin-top: 10px; color: var(--muted); font-size: .95rem; }

.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case { display: flex; flex-direction: column; padding: 28px; text-decoration: none; color: inherit; transition: transform .2s, border-color .2s; }
.case:hover { transform: translateY(-3px); border-color: var(--line-2); }
.case .who { font: 500 .8rem/1 var(--mono); color: var(--muted); }
.case h3 { font-size: 1.3rem; margin: 14px 0 10px; }
.case p { color: var(--muted); flex: 1; }
.case code { display: inline-block; margin-top: 18px; font-size: .85rem; color: var(--ink); }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: q; }
.quick > div { position: relative; display: flex; flex-direction: column; min-width: 0; }
.quick .code { margin-top: auto; margin-bottom: 0; }
.quick h3 { font-size: 1.15rem; margin: 0 0 12px; display: flex; gap: 12px; align-items: center; }
.quick h3::before { counter-increment: q; content: counter(q); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink); font-size: .9rem; }
.quick p { color: var(--muted); font-size: .98rem; }

.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; color: var(--ink); font-weight: 650; font-size: 1.12rem; letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 400 1.6rem/1 var(--sans); color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 8px; }

.cta-band { position: relative; margin: 0 24px 24px; border-radius: 28px; background: #0a0a0a; color: #f4f4f2; padding: 96px 24px; text-align: center; overflow: hidden; }
:root[data-theme="dark"] .cta-band { background: #fafaf7; color: #0a0a0a; }
.cta-band h2 { color: inherit; font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -0.05em; line-height: 1; }
.cta-band p { color: color-mix(in oklab, currentColor 65%, transparent); font-size: 1.2rem; max-width: 620px; margin: 20px auto 0; }
.cta-band .install { background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .14); box-shadow: none; }
:root[data-theme="dark"] .cta-band .install { background: #0a0a0a; }
.cta-band .btn-primary { background: #fde047; color: #0a0a0a; }
.cta-band .btn-ghost { background: transparent; color: inherit; border-color: color-mix(in oklab, currentColor 30%, transparent); }
.cta-band .robot { width: 64px; height: 64px; margin: 0 auto 26px; display: block; color: #fde047; --bg: #0a0a0a; }
.cta-band .sketch-ring { position: absolute; width: 620px; height: 620px; left: -180px; bottom: -330px; color: rgb(253 224 71 / .5); }

/* ---------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; color: var(--muted); font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { font-size: .85rem; color: var(--ink); letter-spacing: 0; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid a, .footer-note a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover, .footer-note a:hover { color: var(--ink); }
.footer-grid .brand { margin-bottom: 14px; }
.footer-note { margin: 40px 0 0; font-size: .85rem; max-width: 820px; }
.footer-note a { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* ---------------------------------------------------------------- docs */

.docs { max-width: 1360px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 248px minmax(0, 1fr) 220px; gap: 56px; }
.docs-nav { position: sticky; top: var(--header); align-self: start; height: calc(100vh - var(--header)); overflow: auto; padding: 32px 4px 48px 0; scrollbar-width: thin; }
.docs-nav h5 { margin: 18px 0 6px; padding-left: 10px; font: 600 .78rem/1 var(--mono); color: var(--muted); letter-spacing: .02em; }
.docs-nav h5:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: block; padding: 6px 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: .93rem; line-height: 1.35; }
.docs-nav a:hover { background: var(--bg-2); color: var(--ink); }
.docs-nav a[aria-current="page"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow), inset 3px 0 0 var(--marker-line); }
.docs-main { padding: 40px 0 96px; min-width: 0; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: .88rem; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.docs-head h1 { font-size: clamp(2.3rem, 4vw, 3.3rem); letter-spacing: -0.05em; line-height: 1.02; }
.docs-head .lead { font-size: 1.22rem; color: var(--muted); margin-top: 18px; max-width: 760px; }
.toc { position: sticky; top: var(--header); align-self: start; padding: 40px 0; max-height: calc(100vh - var(--header)); overflow: auto; font-size: .87rem; }
.toc h5 { font: 600 .78rem/1 var(--mono); color: var(--muted); margin: 0 0 12px; }
.toc ul { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid var(--line); }
.toc li.sub { padding-left: 12px; }
.toc a { display: block; padding: 5px 0; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); font-weight: 600; box-shadow: -13px 0 0 -11px var(--marker-line); }
.toc .edit { display: inline-flex; gap: 6px; align-items: center; margin-top: 24px; color: var(--muted); text-decoration: none; }
.toc .edit:hover { color: var(--ink); }
.toc .edit svg, .crumbs svg { width: 15px; height: 15px; flex: none; }

.prose { max-width: 780px; margin-top: 36px; }
.prose > * + * { margin-top: 0; }
.prose h2 { font-size: 1.85rem; letter-spacing: -0.04em; margin: 64px 0 18px; padding-top: 8px; }
.prose h3 { font-size: 1.28rem; letter-spacing: -0.025em; margin: 40px 0 12px; }
.prose h2 a.anchor, .prose h3 a.anchor { margin-left: 8px; color: var(--faint); text-decoration: none; opacity: 0; transition: opacity .15s; font-weight: 400; }
.prose h2:hover a.anchor, .prose h3:hover a.anchor { opacity: 1; }
.prose p, .prose li { color: var(--ink-2); }
.prose a:not(.btn):not(.more):not(.anchor):not(.card) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--marker-line); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:not(.btn):not(.more):not(.anchor):not(.card):hover { text-decoration-color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--faint); }
.prose figure { margin: 34px 0; }
.prose .diagram { margin: 40px 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.prose blockquote { margin: 26px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--marker-line); font-size: 1.15rem; color: var(--ink); }

.table-wrap { overflow-x: auto; margin: 22px 0 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--ink); font-weight: 650; background: var(--bg-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td { color: var(--ink-2); }
td code { white-space: nowrap; }

.code { position: relative; margin: 22px 0 28px; border-radius: 14px; background: var(--code-bg); color: var(--code-ink); overflow: hidden; border: 1px solid rgb(255 255 255 / .06); }
.code-bar { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 8px 0 16px; border-bottom: 1px solid rgb(255 255 255 / .08); font: 500 .78rem/1 var(--mono); color: var(--code-dim); }
.code-bar .copy { width: 30px; height: 30px; }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: .87rem; line-height: 1.7; tab-size: 2; scrollbar-width: thin; }
.code .c { color: var(--code-dim); }
.code .k { color: var(--code-key); }
.code .s { color: var(--code-str); }
.code .f { color: var(--code-flag); }
.code pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; border-radius: 0; }
.code-plain { margin: 0; }

.callout { display: flex; gap: 14px; margin: 26px 0; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.callout > svg { flex: none; width: 22px; height: 22px; margin-top: 3px; color: var(--ink); }
.callout p:last-child { margin-bottom: 0; }
.callout.tip { border-color: color-mix(in oklab, var(--marker-line) 45%, var(--line)); background: color-mix(in oklab, var(--marker) 12%, var(--card)); }
.callout.warn { border-color: color-mix(in oklab, #dc2626 35%, var(--line)); }
.callout.warn > svg { color: #dc2626; }

figure.shot { margin: 34px 0; }
figure.shot .frame { border-radius: 14px; }
figure.shot a { display: block; cursor: zoom-in; }
.shot-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin: 34px 0; }
.shot-pair figure.shot { margin: 0; }
.shot-phones { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; max-width: 540px; margin: 34px auto; }
.shot-phones figure.shot { margin: 0; }
.shot-phones .frame { border-radius: 26px; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 28px 0; }
.cards a.card { display: block; padding: 22px 24px; text-decoration: none; transition: border-color .15s, transform .15s; }
.cards a.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.cards .card-title { display: block; margin: 0 0 6px; font-size: 1.08rem; color: var(--ink); letter-spacing: -0.02em; }
.cards .card p { font-size: .95rem; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 72px; }
.pager a { display: block; padding: 18px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-decoration: none; color: var(--ink); font-weight: 650; }
.pager a:hover { border-color: var(--line-2); }
.pager small { display: block; font: 500 .78rem/1 var(--mono); color: var(--muted); margin-bottom: 8px; }
.pager .next { text-align: right; grid-column: 2; }

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; font: 600 .74rem/1 var(--mono); background: var(--bg-2); border: 1px solid var(--line); color: var(--ink); vertical-align: 2px; }
.badge.new { background: var(--marker); border-color: transparent; color: #0a0a0a; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 3vw; background: rgb(10 10 10 / .82); backdrop-filter: blur(8px); cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 12px; box-shadow: var(--shadow-lg); }
.lightbox[hidden] { display: none; }

/* search */
.search-dialog { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgb(10 10 10 / .45); backdrop-filter: blur(4px); }
.search-dialog[hidden] { display: none; }
.search-panel { width: min(100%, 640px); max-height: 72vh; display: flex; flex-direction: column; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; }
.search-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.search-input svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search-input input { flex: 1; height: 58px; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 1.05rem/1 var(--sans); }
.search-results { overflow: auto; padding: 8px; }
.search-results a { display: block; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: var(--ink-2); }
.search-results a[aria-selected="true"] { background: var(--bg-2); }
.search-results b { display: block; color: var(--ink); font-weight: 650; }
.search-results small { display: block; font: 500 .75rem/1.3 var(--mono); color: var(--muted); margin: 3px 0 4px; }
.search-results span { display: block; font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-results mark { background: var(--marker); color: #0a0a0a; border-radius: 3px; padding: 0 2px; }
.search-empty { padding: 28px; text-align: center; color: var(--muted); }
.search-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .mark.draw { background-size: 100% 58%; }
}

/* ---------------------------------------------------------------- responsive */

@media (min-width: 981px) { .mobile-only { display: none !important; } }

@media (max-width: 1320px) {
  .annot-l, .annot-r { display: none; }
  .install-note { display: none; }
}
@media (max-width: 1180px) {
  .docs { grid-template-columns: 232px minmax(0, 1fr); gap: 44px; }
  .toc { display: none; }
}
@media (max-width: 980px) {
  .main-nav { display: none; }
  .search-btn { min-width: 0; }
  .search-btn .label, .search-btn kbd { display: none; }
  .menu-btn { display: inline-grid; }
  .feature, .feature.flip { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .feature.flip .feature-text { order: 0; }
  .trio, .cases, .quick { grid-template-columns: minmax(0, 1fr); }
  .steps, .grid-shots { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs-nav { display: none; position: fixed; inset: var(--header) 0 0; z-index: 50; height: auto; padding: 24px; background: var(--bg); }
  .docs-nav.open { display: block; }
  .shot-stack .frame + .frame { display: none; }
  .media-note { display: none; }
  .section { padding: 88px 0; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .header-in { padding: 0 16px; gap: 12px; }
  .brand .ver { display: none; }
  .wrap { padding: 0 18px; }
  .hero { padding-top: 48px; }
  .install { font-size: .78rem; padding-left: 12px; }
  .install-wrap { max-width: 100%; }
  table { min-width: 600px; }
  .diagram:not(:has(.d-mobile)) { overflow-x: auto; margin-left: -18px; margin-right: -18px; padding: 0 18px; }
  .diagram:not(:has(.d-mobile)) .sketch { min-width: 660px; }
  .steps, .grid-shots, .cards, .shot-pair { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: 1fr 1fr; }
  .diagram .d-desktop { display: none; }
  .diagram .d-mobile { display: block; max-width: 420px; margin: 0 auto; }
  .frame-bar span { display: none; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: auto; }
  .cta-band { margin: 0 12px 12px; border-radius: 22px; padding: 72px 18px; }
  .docs { padding: 0 18px; }
  .code pre { font-size: .8rem; }
}

/* ---------------------------------------------------------------- the family (footer) */

@property --fam-stage { syntax: '<color>'; inherits: true; initial-value: #8b5cf6; }

.family { --fam-time: 6s; margin: 0 0 48px; padding: 28px 0 36px; border-bottom: 1px solid var(--line); }
.family-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.family-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-family: var(--mono, ui-monospace, monospace); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.family-dots { display: inline-flex; gap: 3px; }
.family-dots i { display: block; width: 7px; height: 7px; border-radius: 99px; }
.family-head h4 { margin: 0; font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.25; letter-spacing: -.02em; color: var(--ink); font-weight: 650; max-width: 34ch; }
.family-controls { display: flex; gap: 8px; flex: none; }
.family-arrow { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 99px; border: 1px solid var(--line); background: var(--card, transparent); color: var(--ink); cursor: pointer; transition: border-color .2s, transform .2s, background .2s, color .2s; }
.family-arrow:hover { border-color: var(--fam-stage); color: var(--fam-stage); transform: translateY(-1px); }
.family-arrow:active { transform: scale(.94); }
.family-arrow:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.family-arrow .i-play, .family-arrow[aria-pressed="true"] .i-pause { display: none; }
.family-arrow[aria-pressed="true"] .i-play { display: block; }

/* The stage: one product at a time, in its colours, on a dark ground — like the sign-in of every app. */
.family-stage { position: relative; isolation: isolate; display: grid; overflow: hidden; border-radius: 24px; background: #09090b; color: #fafafa; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .07), 0 34px 70px -46px var(--fam-stage); transition: --fam-stage .9s ease; touch-action: pan-y; user-select: none; }
.family-stage::before { content: ""; position: absolute; inset: -35%; z-index: -2; background: radial-gradient(28% 42% at 22% 32%, color-mix(in srgb, var(--fam-stage) 58%, transparent), transparent 70%), radial-gradient(26% 38% at 80% 58%, color-mix(in srgb, var(--fam-stage) 42%, transparent), transparent 70%), radial-gradient(40% 46% at 55% 115%, color-mix(in srgb, var(--fam-stage) 36%, transparent), transparent 72%); filter: blur(22px); animation: family-drift 24s ease-in-out infinite alternate; }
.family-stage::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgb(255 255 255 / .05) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .05) 1px, transparent 1px); background-size: 40px 40px; background-position: center; -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 50%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 80% at 70% 50%, #000 20%, transparent 75%); }

.family-panel { grid-area: 1 / 1; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(20px, 4vw, 48px); padding: clamp(26px, 4vw, 44px) clamp(24px, 4.6vw, 56px); visibility: hidden; transition: visibility 0s .55s; }
.family-panel.is-active { visibility: visible; transition: none; }
.family-copy { min-width: 0; }
.family-copy > * { opacity: 0; transform: translateX(calc(var(--family-dir, 1) * 28px)); transition: opacity .45s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.family-panel.is-active .family-copy > * { opacity: 1; transform: none; }
.family-panel.is-leaving .family-copy > * { transform: translateX(calc(var(--family-dir, 1) * -28px)); }
.family-panel.is-active .family-copy > :nth-child(2) { transition-delay: .06s; }
.family-panel.is-active .family-copy > :nth-child(3) { transition-delay: .12s; }
.family-panel.is-active .family-copy > :nth-child(4) { transition-delay: .18s; }
.family-count { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-family: var(--mono, ui-monospace, monospace); font-size: .75rem; letter-spacing: .12em; color: rgb(255 255 255 / .55); }
.family-here { padding: 3px 9px; border-radius: 99px; font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--fam-tile); background: var(--fam); }
.family-name { margin: 0; font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 650; line-height: 1; letter-spacing: -.045em; background: linear-gradient(100deg, #fff 30%, color-mix(in srgb, var(--fam) 55%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.family-tagline { margin: 12px 0 0; max-width: 34ch; font-size: clamp(1rem, 1.7vw, 1.22rem); line-height: 1.45; color: rgb(255 255 255 / .74); text-wrap: balance; }
.family-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 10px 18px; border-radius: 99px; background: var(--fam); color: var(--fam-tile); font-size: .9rem; font-weight: 650; text-decoration: none; box-shadow: 0 10px 30px -12px var(--fam); transition: box-shadow .25s; }
.family-cta::after { content: ""; position: absolute; inset: 0; border-radius: 24px; }
.family-cta span { transition: transform .25s; }
.family-panel:hover .family-cta, .family-cta:focus-visible { box-shadow: 0 14px 40px -8px var(--fam); }
.family-panel:hover .family-cta span { transform: translateX(4px); }
.family-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* The logo, big, in rings that turn. */
.family-art { position: relative; display: grid; place-items: center; width: clamp(150px, 19vw, 220px); aspect-ratio: 1; }
.family-art::before, .family-art::after { content: ""; position: absolute; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--fam) 55%, transparent); animation: family-spin 40s linear infinite; }
.family-art::before { inset: 0; }
.family-art::after { inset: 15%; border-style: solid; border-color: rgb(255 255 255 / .1); animation-direction: reverse; animation-duration: 28s; }
.family-art i { position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--fam) 55%, transparent), transparent 70%); filter: blur(10px); }
.family-art img { position: relative; width: 46%; height: auto; border-radius: 24%; box-shadow: 0 22px 50px -14px var(--fam), 0 0 0 1px rgb(255 255 255 / .1); opacity: 0; transform: scale(.7) rotate(-12deg); transition: opacity .5s ease .08s, transform .8s cubic-bezier(.2, .8, .2, 1) .08s; }
.family-panel.is-active .family-art img { opacity: 1; transform: none; }

/* The tabs: every product, the selected one in its colour, a bar that fills while the stage waits. */
.family-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin-top: 12px; }
.family-tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card, transparent); color: var(--muted); font: inherit; font-size: .78rem; font-weight: 550; cursor: pointer; overflow: hidden; transition: border-color .3s, color .3s, background .3s, transform .3s; }
.family-tab img { width: 30px; height: 30px; border-radius: 8px; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.family-tab:hover { color: var(--ink); border-color: color-mix(in srgb, var(--fam) 60%, var(--line)); transform: translateY(-2px); }
.family-tab:hover img { transform: rotate(-6deg) scale(1.06); }
.family-tab:focus-visible { outline: 2px solid var(--fam); outline-offset: 2px; }
.family-tab[aria-selected="true"] { color: var(--ink); border-color: var(--fam); background: color-mix(in srgb, var(--fam) 12%, var(--card, transparent)); }
.family-tab[aria-selected="true"] img { transform: scale(1.1); }
.family-tab.is-here::before { content: ""; position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border-radius: 99px; background: var(--fam); }
.family-progress { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--fam); transform: scaleX(0); transform-origin: left; }
.family-tab[aria-selected="true"] .family-progress { transform: scaleX(1); opacity: .6; }
.family.is-playing .family-tab[aria-selected="true"] .family-progress { opacity: 1; animation: family-progress var(--fam-time) linear forwards; }
.family.is-playing:hover .family-progress, .family.is-playing:has(:focus-visible) .family-progress, .family.is-offscreen .family-progress { animation-play-state: paused !important; }

@keyframes family-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes family-spin { to { transform: rotate(360deg); } }
@keyframes family-drift { to { transform: translate3d(4%, -4%, 0) rotate(8deg); } }

@media (max-width: 720px) {
  .family-head { align-items: flex-start; flex-direction: column; }
  .family-panel { grid-template-columns: 1fr; }
  .family-art { position: absolute; top: 14px; right: 14px; width: 96px; opacity: .9; }
  .family-tagline { padding-right: 0; }
  .family-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
  .family-tabs::-webkit-scrollbar { display: none; }
  .family-tab { flex: none; width: 92px; }
}
@media (prefers-reduced-motion: reduce) {
  .family-stage, .family-stage::before, .family-art::before, .family-art::after { animation: none; transition: none; }
  .family-copy > *, .family-art img, .family-tab, .family-tab img { transition: none; }
}
