/* Onyx product site. One stylesheet, no framework, system fonts. */

:root {
  --bg: #0b0b0d; --panel: #131316; --raised: #1a1a1e; --line: #26262c; --line-soft: #1c1c21;
  --ink: #ececf0; --muted: #a0a0ab; --faint: #70707b;
  --accent: #5eead4; --accent-ink: #06201c; --accent-soft: rgba(94, 234, 212, .1);
  --warn: #f5c56b; --good: #86e0a0; --bad: #ff8a80;
  --kw: #c4a7ff; --str: #9be3a8; --com: #7d7d89; --num: #ffb86b;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --width: 1120px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfbf9; --panel: #f3f3ef; --raised: #ffffff; --line: #dedfd8; --line-soft: #e9e9e3;
    --ink: #15151a; --muted: #5c5c66; --faint: #8a8a94;
    --accent: #0f766e; --accent-ink: #ffffff; --accent-soft: rgba(15, 118, 110, .08);
    --warn: #8a5a00; --good: #1f7a3a; --bad: #b3261e;
    --kw: #7a3eb1; --str: #1f7a3a; --com: #84848f; --num: #a85400;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; font-weight: 650; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.1rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
code, pre, kbd { font-family: var(--mono); font-size: .88em; }
:not(pre) > code { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 5px; padding: .08em .35em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { max-width: var(--width); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.mark { width: 24px; height: 24px; color: var(--accent); }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-by { color: var(--faint); font-size: .85rem; }
.nav { display: flex; align-items: center; gap: 28px; font-size: .95rem; }
.nav a:not(.btn) { color: var(--muted); }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }
.menu { display: none; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: .9rem; cursor: pointer; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 1rem; background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; transition: filter .15s; }
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--panel); filter: none; }
.btn-small { padding: 7px 14px; font-size: .9rem; border-radius: 8px; }

/* ---- sections ---- */
section { padding: 88px 0; }
section + section { border-top: 1px solid var(--line-soft); }
.eyebrow { font: 600 .8rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 44em; }
.section-head { margin-bottom: 44px; max-width: 46em; }
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--muted); margin: 0; }

.hero { padding: 96px 0 72px; }
.hero h1 { max-width: 15em; margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-bottom: 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.status { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 14px 6px 12px; font-size: .85rem; color: var(--muted); margin-bottom: 28px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.page-head { padding: 72px 0 56px; }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: 20px; max-width: 18em; }

/* ---- grids and cards ---- */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 14px; padding: 26px; }
.gap-top { margin-top: 28px; }
.gap-wide { margin-top: 48px; }
.card > .ticks { margin-top: 6px; }
.card > .ticks li:last-child { padding-bottom: 0; }
.card > .ticks li { font-size: .96rem; }
.table-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
table.cmds td:first-child { white-space: nowrap; width: 1%; }
table.cmds td { padding: 9px 16px; color: var(--muted); }
.caption.note { margin-top: 28px; font-size: .9rem; color: var(--muted); max-width: 60em; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }
.card p + p { margin-top: .8em; }
.card .tag { margin-bottom: 14px; }
.tag { display: inline-block; font: 600 .72rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
p.legend, .section-head p.legend, .page-head p.legend { display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--muted); font-size: .88rem; margin: 26px 0 0; max-width: none; }
.legend .item { display: block; }
.card > .tag { margin-right: 6px; }
.tagrow { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 14px; }
.card .tagrow .tag { margin: 0; }
td code { white-space: nowrap; }
.caps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 18px; }
.caps li { color: var(--muted); font-size: .96rem; }
.caps strong { color: var(--ink); font-weight: 600; }
.card .caps .tag { display: table; margin: 0 0 7px; }
.caption .tag, .small .tag, .legend .tag { margin-right: 6px; }
.card p .tag { margin: 0 4px 0 0; }
.tag.plan { background: transparent; border: 1px solid var(--line); color: var(--faint); }
.tag.now { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; }
.split h2 { margin-bottom: 16px; }
.split p { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; }
.ticks li { position: relative; padding: 0 0 12px 26px; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.ticks.open li::before { left: 3px; top: .5em; width: 9px; height: 9px; border: 1.5px solid var(--faint); border-radius: 50%; transform: none; }
.ticks strong { color: var(--ink); font-weight: 600; }

/* ---- numbers ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; background: var(--panel); }
.stat { padding: 24px 26px; border-left: 1px solid var(--line-soft); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.03em; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .88rem; }

/* ---- terminal and code ---- */
.term { background: #0a0a0c; color: #dcdce2; border: 1px solid #26262c; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .7); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #151518; border-bottom: 1px solid #26262c; font: .78rem var(--mono); color: #7d7d89; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2e2e35; }
.term-bar span { margin-left: 8px; }
.term pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: .82rem; line-height: 1.6; }
.term .p { color: #5eead4; } .term .c { color: #7d7d89; } .term .k { color: #c4a7ff; } .term .s { color: #9be3a8; } .term .g { color: #86e0a0; } .term .w { color: #f5c56b; }
.caption { color: var(--faint); font-size: .84rem; margin-top: 12px; }

.code { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line-soft); }
.tabs button { background: none; border: 0; color: var(--muted); font: 600 .82rem var(--mono); padding: 7px 12px; border-radius: 7px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--raised); color: var(--ink); }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: .84rem; line-height: 1.6; }
.code .k { color: var(--kw); } .code .s { color: var(--str); } .code .c { color: var(--com); } .code .n { color: var(--num); }

/* ---- tables ---- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; background: var(--panel); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
tr.total td { font-weight: 650; background: var(--panel); }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--line); min-width: 90px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.w22 { width: 22%; } .w57 { width: 57%; } .w64 { width: 64%; } .w67 { width: 67%; } .w70 { width: 70%; }

/* ---- steps and notes ---- */
.steps { counter-reset: step; display: grid; gap: 0; border-left: 1px solid var(--line); margin-left: 14px; }
.step { counter-increment: step; position: relative; padding: 0 0 34px 34px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: counter(step); position: absolute; left: -15px; top: -2px; width: 29px; height: 29px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; font: 600 .8rem var(--mono); color: var(--accent); }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); margin: 0; font-size: .96rem; }
.step.done::before { content: ""; background: var(--accent); border-color: var(--accent); }
.note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 16px 20px; border-radius: 0 10px 10px 0; color: var(--ink); font-size: .96rem; }
.note p:last-child { margin: 0; }
.cta { text-align: center; }
.cta h2 { margin: 0 auto 14px; max-width: 18em; }
.cta p { color: var(--muted); max-width: 36em; margin: 0 auto 28px; }
.cta .actions { justify-content: center; }

/* ---- prose pages ---- */
.prose h2 { font-size: 1.35rem; margin: 2.2em 0 .6em; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 1.2em; }
.prose strong { color: var(--ink); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 0; }
dl.facts dt { color: var(--faint); font-size: .9rem; }
dl.facts dd { margin: 0; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--line-soft); padding: 56px 0 36px; background: var(--panel); margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot a { display: block; color: var(--muted); font-size: .92rem; padding: 3px 0; }
.foot a:hover { color: var(--ink); text-decoration: none; }
.foot .brand { margin-bottom: 12px; }
.foot-h { font: 600 .76rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.foot-end { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-soft); }

@media (max-width: 900px) {
  section { padding: 64px 0; }
  .hero { padding: 64px 0 56px; }
  .g3, .g4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .menu { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 18px 18px; }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .nav .btn { margin-top: 14px; justify-content: center; }
  dl.facts { grid-template-columns: 1fr; gap: 2px; }
  dl.facts dd { margin-bottom: 12px; }
  table.cmds thead { display: none; }
  table.cmds tr { display: block; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
  table.cmds tr:last-child { border-bottom: 0; }
  table.cmds td, table.cmds td:first-child { display: block; padding: 0; border: 0; width: auto; }
  table.cmds td + td { margin-top: 4px; }
  table.stack thead { display: none; }
  table.stack tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td, table.stack td.num { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 5px 0; border: 0; text-align: right; }
  table.stack td::before { content: attr(data-label); flex: none; color: var(--faint); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; text-align: left; }
  table.stack td > span { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.split > *, .grid > * { min-width: 0; }
