:root {
  --accent: #cf222e;
  --accent-dark: #a40e26;
  --accent-soft: #ffebe9;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --code-bg: #0f172a;
  --code-ink: #e2e8f0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, kbd { font-family: var(--mono); font-size: .9em; }
:not(pre) > code {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .08em .38em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); font-size: 14.5px; font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav .gh { display: inline-flex; align-items: center; gap: 6px; }
.nav .gh svg { width: 18px; height: 18px; }
@media (max-width: 860px) { .nav a:not(.gh) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 10px;
  font-weight: 600; font-size: 15.5px; border: 1px solid transparent;
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #cbd5e1; background: var(--bg-2); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 64px;
  background:
    radial-gradient(900px 420px at 85% -10%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
    radial-gradient(700px 360px at -10% 110%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%),
    var(--bg);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--accent-dark);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; letter-spacing: -.035em; }
.hero h1 .hl { color: var(--accent); }
.lede { font-size: 18px; color: var(--ink-2); margin-top: 18px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cta-note { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.cta-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

.video-frame {
  border-radius: 16px; overflow: hidden; background: #f1f5f9;
  border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .06);
  aspect-ratio: 16 / 9;
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; }

/* Code boxes */
.code {
  position: relative; background: var(--code-bg); color: var(--code-ink);
  border-radius: 12px; margin-top: 16px; overflow: hidden;
  border: 1px solid #1e293b;
}
.code-head {
  display: flex; align-items: center; gap: 4px; padding: 6px 6px 0 10px;
  border-bottom: 1px solid #1e293b; background: #111c33;
}
.tab {
  appearance: none; border: 0; background: transparent; color: #94a3b8;
  font: 600 12.5px var(--font); padding: 8px 10px; border-radius: 8px 8px 0 0; cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab[aria-selected="true"] { color: #fff; border-bottom-color: color-mix(in srgb, var(--accent) 70%, #fff); }
.code-label { color: #94a3b8; font: 600 12.5px var(--font); padding: 8px 4px; }
.code pre { margin: 0; padding: 16px 56px 16px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.65; }
.code pre code { color: var(--code-ink); white-space: pre; }
.code .c { color: #64748b; }
.code .k { color: #93c5fd; }
.code .s { color: #86efac; }
.copy {
  position: absolute; top: 7px; right: 8px;
  appearance: none; border: 1px solid #334155; background: #1e293b; color: #cbd5e1;
  font: 600 12px var(--font); padding: 5px 9px; border-radius: 7px; cursor: pointer;
}
.code.single .copy { top: 9px; }
.code-head { padding-right: 70px; }
.code.wrap-lines pre code { white-space: pre-wrap; word-break: break-all; }
.copy:hover { background: #334155; color: #fff; }
.copy.done { color: #86efac; border-color: #166534; }

/* Sections */
section { padding: 88px 0; }
section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 38px); font-weight: 800; }
.section-head p { margin-top: 14px; font-size: 17px; color: var(--muted); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat b { display: block; color: var(--ink); font-size: 22px; letter-spacing: -.02em; }
.stat span { font-size: 14px; color: var(--muted); }

/* Cards */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { font-size: 18.5px; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: 15.5px; }
.icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 16px;
}
.icon svg { width: 22px; height: 22px; }
.scenario .when { font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.scenario .code { margin-top: 18px; }
.scenario .code pre { padding: 12px 14px; font-size: 12.5px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px 20px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 12px;
}
.steps h3 { font-size: 16px; margin-bottom: 6px; }
.steps p { font-size: 14.5px; color: var(--ink-2); }

/* Safety */
.safety { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checklist li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.checklist li::before {
  content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.checklist b { color: var(--ink); }
.note {
  border-left: 4px solid #f59e0b; background: #fffbeb; border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 24px; border-top: 1px solid #fde68a; border-right: 1px solid #fde68a; border-bottom: 1px solid #fde68a;
}
.note h3 { font-size: 17px; margin-bottom: 10px; }
.note ul { margin: 10px 0 0; padding-left: 20px; }
.note li { margin: 4px 0; }

/* Downloads */
.dl-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dl-table th, .dl-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.dl-table tr:last-child td { border-bottom: 0; }
.dl-table th { background: var(--bg-2); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.dl-table td a { font-family: var(--mono); font-size: 13.5px; overflow-wrap: anywhere; }
.dl-table tr.mine td { background: var(--accent-soft); }
.install-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.install-grid h3 { font-size: 18px; margin: 0 0 4px; }
.install-grid .sub { font-size: 14.5px; color: var(--muted); }
.install-grid > div > h3:not(:first-child) { margin-top: 30px; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 36px 16px 0; position: relative;
  font-weight: 600; color: var(--ink); font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 18px; color: var(--ink-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 52px; background: #fff; font-size: 14.5px; color: var(--muted); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.footer-links a { color: var(--ink-2); font-weight: 500; }
.disclaimer { margin-top: 18px; font-size: 13px; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .safety, .install-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  section { padding: 64px 0; }
  .hero { padding: 44px 0 48px; }
  .lede { font-size: 16.5px; }
  .grid-2, .grid-3, .steps, .stats { grid-template-columns: minmax(0, 1fr); }
  .stats { margin-top: 36px; }
  .cta .btn { flex: 1 1 100%; }
  .card { padding: 22px; }
  .dl-table th, .dl-table td { padding: 10px 12px; }
  .dl-table th:nth-child(3), .dl-table td:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
