*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--q1); outline-offset: 2px; border-radius: 4px; }
code, .mono { font-family: var(--mono); }
code { font-size: .88em; background: var(--band); padding: .1em .35em; border-radius: 5px; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.015em; margin-bottom: 12px; }
h3 { font-size: 17px; margin-bottom: 8px; }
p { margin: 0 0 14px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--faint); }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 16px; }
.mark { font-family: var(--mono); font-weight: 700; font-size: 15px; text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.mark .dim, .dim { color: var(--muted); font-weight: 400; }
.top nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }
.theme { background: none; border: 1px solid var(--faint); color: var(--ink); border-radius: 8px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; }

.hero { padding-top: 52px; padding-bottom: 8px; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px; align-items: end; }
.hero-r h2 { font-size: 20px; margin-bottom: 8px; }
.hero-r > div > p { color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.hero-r .readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hero-r .readout > div { min-width: 0; }
.hero-r .readout .btn { min-height: 0; }
.eyebrow { font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: .04em; margin-bottom: 18px; }
.hero h1 { font-size: clamp(32px, 4.2vw, 54px); letter-spacing: -.03em; max-width: 21ch; margin-bottom: 18px; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink); max-width: 64ch; opacity: .88; }
.cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 22px; }
.cmd { display: flex; align-items: center; gap: 4px; background: var(--ink); color: var(--bg); border-radius: 10px; padding: 6px 6px 6px 18px; max-width: 100%; }
.cmd code { background: none; color: inherit; font-size: 15px; padding: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd code::before { content: "$ "; color: var(--q1); }
.cmd .copy { background: color-mix(in srgb, var(--bg) 16%, transparent); color: var(--bg); border: 0; }
.hint { font-size: 14px; color: var(--muted); }

.copy { font: 600 12px var(--sans); border: 1px solid var(--faint); background: var(--panel); color: var(--ink); border-radius: 7px; padding: 7px 11px; cursor: pointer; white-space: nowrap; }
.copy:hover { border-color: var(--muted); }

.stage { padding-top: 28px; padding-bottom: 24px; }
.stage-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 18px; }
.stage-head p { color: var(--muted); max-width: 62ch; margin: 0; }
.readout { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; justify-content: flex-end; }
.readout > div { background: var(--panel); border: 1px solid var(--faint); border-radius: 10px; padding: 7px 12px; min-width: 82px; }
.readout .k { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.readout .v { display: block; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.readout #r-clock { min-width: 9ch; }
.st.ok { color: var(--q1); } .st.bad { color: var(--bad); }
.btn { font: 600 14px var(--sans); background: var(--ink); color: var(--bg); border: 0; border-radius: 10px; padding: 0 18px; cursor: pointer; min-height: 44px; }
.flow-card { background: var(--panel); border: 1px solid var(--faint); border-radius: 16px; padding: 18px 18px 10px; overflow-x: auto; }
.flow-host { min-width: 760px; }
.source { font-size: 12px; color: var(--muted); margin-top: 10px; }
.source code { font-size: 1em; }

.feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 36px; padding-bottom: 56px; }
.feat { border-top: 2px solid var(--ink); padding-top: 16px; }
.feat p { font-size: 15px; color: var(--ink); opacity: .9; }
.feat b { font-weight: 700; }
.api { font-size: 12.5px; color: var(--muted); margin: 0; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 9px; vertical-align: 1px; }
.sw.q0 { background: var(--q0); } .sw.q1 { background: var(--q1); } .sw.bad { background: var(--bad); } .sw.ink { background: var(--ink); }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center; padding-top: 40px; padding-bottom: 56px; }
.split.rev { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.split.out { grid-template-columns: minmax(0, 1fr); gap: 20px; }
.split.out > div:first-child { max-width: 75ch; }
.split p { color: var(--ink); opacity: .9; }
.arrow { font-weight: 600; text-decoration: none; }
.arrow::after { content: " \2192"; }
.note { font-size: 14px; border-left: 3px solid var(--q0); padding: 4px 0 4px 12px; color: var(--muted); }
.shot { width: 100%; max-width: 1184px; height: auto; display: block; }

.term { background: #121417; border: 1px solid #2a2f35; border-radius: 12px; overflow: hidden; color: #d9d6cf; }
.tbar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #1b1e22; border-bottom: 1px solid #2a2f35; }
.tbar i { width: 10px; height: 10px; border-radius: 50%; background: #3a4047; }
.tbar span { font: 12px var(--mono); color: #7f848c; margin-left: 8px; }
.term pre { margin: 0; padding: 16px 18px; font-size: 12.5px; line-height: 1.6; overflow-x: auto; }
.term .p { color: #2cc7a6; } .term .c { color: #fff; } .term .e { color: #ff8a73; }

.arch { padding-top: 24px; padding-bottom: 56px; }
.arch > p { max-width: 75ch; opacity: .9; }
.arch img { width: 100%; height: auto; display: block; margin-top: 12px; border-radius: 14px; border: 1px solid var(--faint); }

.qs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.step p { font-size: 15px; color: var(--muted); min-height: 3.2em; }
.step p code { overflow-wrap: anywhere; }
.n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 700 13px var(--mono); margin-right: 10px; }
.code { position: relative; background: var(--panel); border: 1px solid var(--faint); border-radius: 12px; }
.code pre { margin: 0; padding: 16px 18px; font-size: 13px; line-height: 1.6; overflow-x: auto; }
.qs .code pre { white-space: pre-wrap; overflow-wrap: anywhere; padding-top: 48px; }
.code .copy { position: absolute; top: 10px; right: 10px; }
.code.wide { margin-top: 16px; }
.code .kw { color: var(--q2); } .code .st { color: var(--q1); } .code .at { color: var(--q0); }
#quick-start { padding-bottom: 56px; scroll-margin-top: 70px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 8px; padding-bottom: 56px; }
.cell { background: var(--panel); border: 1px solid var(--faint); border-radius: 14px; padding: 20px 22px; }
.cell p { font-size: 15px; opacity: .9; }
pre.small { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; background: var(--band); border-radius: 8px; padding: 10px 12px; overflow-x: auto; margin: 0 0 12px; line-height: 1.5; }

.table-wrap { overflow-x: auto; margin-bottom: 64px; }
table { border-collapse: collapse; width: 100%; max-width: 820px; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--faint); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
td.r, th.r { text-align: right; white-space: nowrap; }

.foot { display: flex; justify-content: space-between; gap: 32px; border-top: 1px solid var(--faint); padding-top: 28px; padding-bottom: 48px; font-size: 14px; color: var(--muted); }
.foot p { max-width: 60ch; margin-top: 10px; }
.foot nav { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 24px; align-content: start; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--ink); }
.mark.small { font-size: 14px; color: var(--ink); }

@media (max-width: 980px) {
  .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split.rev { grid-template-columns: 1fr; gap: 24px; }
  .qs { grid-template-columns: minmax(0, 1fr); }
  .step p { min-height: 0; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .top nav a:not(:last-of-type) { display: none; }
  .hero { padding-top: 44px; }
  .feats, .grid { grid-template-columns: minmax(0, 1fr); }
  .readout > div { padding: 6px 10px; }
  .flow-card { padding: 10px; border-radius: 12px; }
  .term pre { min-height: 0; font-size: 11.5px; }
  .foot { flex-direction: column; }
  .cmd code { font-size: 13.5px; }
}
