:root {
  --bg: #080225;
  --surface: #0b0628;
  --surface-2: #110b33;
  --line: #2c2450;
  --text: #f4f2f8;
  --body: #d9d6e6;
  --muted: #a3a8ae;
  --accent: #7233f7;
  --accent-2: #c7adfc;
  --ok: #3dbe7a;
  --bad: #e15b4a;
  --font: "Segoe UI", "Avenir Next", "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --max: 1120px;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: var(--body); font: 17px/1.55 var(--font); }
body { min-height: 100%; overflow-x: hidden; }
a { color: var(--accent-2); }
.light a { color: #5b2ad6; }
a:focus-visible, button:focus-visible, summary:focus-visible, .compare-scroll:focus-visible {
  outline: 2px solid var(--accent-2); outline-offset: 3px;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 30; background: var(--surface); color: var(--text); padding: 8px 12px; }
.wrap { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
.top {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; gap: 22px; min-height: 68px; }
.brand { margin: 0; font-size: 13px; font-weight: 680; letter-spacing: 0.12em; text-transform: uppercase; }
.brand a { color: var(--text); text-decoration: none; }
.nav { display: flex; gap: 18px; flex: 1; }
.nav a { color: var(--body); text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--text); }
.nav-box { display: none; }
.nav-toggle { list-style: none; cursor: pointer; color: var(--text); }
.nav-toggle::-webkit-details-marker { display: none; }
.cta { display: flex; gap: 8px; margin-left: auto; }
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 16px; border-radius: 8px; border: 0;
  background: var(--accent); color: #fff; text-decoration: none;
  font: 600 14px/1 var(--font); cursor: pointer;
}
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.cta-auth, form.cta-auth, .btn.cta-auth { display: none; }
html.is-auth .cta-guest, html.is-auth .btn.cta-guest { display: none; }
html.is-auth .cta-auth, html.is-auth .btn.cta-auth, html.is-auth form.cta-auth { display: inline-flex; }
.hero, .section, .foot { background: var(--bg); color: var(--body); }
.light {
  --bg: #fff; --surface: #f6f5f8; --surface-2: #eceaf2; --line: #d9d5e4;
  --text: #12101a; --body: #2e2a3a; --muted: #5c5670;
}
.hero {
  position: relative;
  padding: 64px 0 80px;
  background:
    radial-gradient(520px 420px at 78% 42%, rgba(114, 51, 247, 0.16), transparent 70%),
    var(--bg);
}
.hero-grid { display: grid; align-items: center; gap: 64px; grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr); }
.hero-copy { max-width: 34rem; }
.hero-line { display: block; }
h1 { margin: 0 0 20px; color: var(--text); font-size: clamp(52px, 5.6vw, 80px); line-height: 0.92; letter-spacing: -0.05em; font-weight: 600; }
h2 { margin: 0 0 12px; color: var(--text); font-size: clamp(36px, 4vw, 52px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; }
.sch-panel { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
h3 { margin: 0 0 8px; color: var(--text); font-size: 18px; }
.lede { margin: 0 0 28px; max-width: 36rem; font-size: 20px; color: var(--body); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.section { padding: 88px 0; }
.stage, .preview, .example article, .plan, .band article {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.stage {
  margin: 0;
  padding: 0;
  background: #0c0724;
  border: 1px solid #3d3468;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.stage-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 11px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.stage-chip { color: var(--text); letter-spacing: 0; text-transform: none; font-size: 12px; }
.stage-split { display: grid; grid-template-columns: 1.2fr 0.8fr; }
.editor, .traces { padding: 16px 16px 18px; min-width: 0; }
.traces { border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.editor .file, .traces .file {
  margin: 0 0 8px;
  color: #b7b0c9;
  letter-spacing: 0.01em;
  text-transform: none;
  font-size: 12px;
}
.editor .code {
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-size: 11.5px;
  line-height: 1.62;
  white-space: pre;
  overflow: hidden;
}
.ln { display: inline-block; width: 1.5em; margin-right: 0.85em; color: #6d6588; text-align: right; }
.kw { color: #c4b5fd; }
.num { color: #f0d090; }
.wave .grid { stroke: #2a2348; stroke-width: 1; }
.wave .trace { stroke: #f4f1fa; stroke-width: 1.6; }
.wave .trace-hot { stroke: #c7adfc; }
.wave .cursor { stroke: #7233f7; stroke-width: 1; }
.mini .sym { fill: #140c32; stroke: #c7adfc; stroke-width: 1.25; }
.mini .wire { stroke: #a79fbe; stroke-width: 1.25; }
.mini .ck { fill: none; stroke: #c7adfc; stroke-width: 1.25; }
.mini .junc { fill: #f4f1fa; stroke: none; }
.mini .bus { fill: #a79fbe; }
.code {
  margin: 0; padding: 12px; overflow: auto; color: var(--text);
  background: #080225; border-radius: 8px; font: 13px/1.5 var(--mono);
  white-space: pre-wrap;
}
.light .code { background: #12101a; color: #f4f2f8; }
.wave, .mini, .floor, .sch-panel svg { width: 100%; height: auto; display: block; }
.wave text, .mini text, .floor text, .sch-panel text {
  fill: #e8e4f4;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.wave text { font-size: 13px; }
.floor text, .sch-panel text { font-size: 12px; }
.wave path, .mini path, .floor rect, .sch-panel .wire { fill: none; stroke: #8d86a8; stroke-width: 1.4; }
.mini rect, .floor rect, .sch-panel rect, .sch-panel polygon { fill: #110b33; stroke: #8d86a8; }
.targets {
  display: inline-flex;
  grid-column: 1 / -1;
  gap: 0;
  margin: 0 0 18px;
  padding: 3px;
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.targets button {
  min-height: 34px;
  border: 0;
  background: transparent;
}
.flow, .seq { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.targets button, .flow button, .sch-actions button {
  min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--text); font: 600 14px/1.2 var(--font); cursor: pointer;
}
.targets button { border: 0; min-height: 34px; }
.targets button[aria-pressed="true"], .flow button[aria-current="true"], .sch-actions button.is-on {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
[data-flow] { display: grid; grid-template-columns: repeat(5, 1fr); column-gap: 8px; }
.flow { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); grid-column: 1 / -1; justify-content: stretch; gap: 0; margin: 0; }
.flow li { display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.flow li:not(:last-child)::after { display: none; }
.flow::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 1px;
  background: #d9d5e4;
}
.light .flow button { background: #fff; }
.light .flow button[aria-current="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.loop {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 8px;
  grid-column: 1 / 3;
  position: relative;
  margin: 12px 0 28px;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--accent);
  color: var(--muted); font-size: 13px;
}
.loop::before, .loop::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 1px;
  height: 8px;
  background: var(--accent);
}
.loop::before { left: 0; }
.loop::after { right: 0; }
.loop span { padding: 0; border: 0; color: var(--text); font-weight: 600; }
.loop .to { width: 22px; height: 1px; background: var(--accent); }
[data-flow][data-target="fpga"] button[data-stage="impl"]::after {
  content: "Not live"; display: block; margin-top: 4px; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
}
.file { display: block; }
.light .wave text, .light .floor text { fill: #2e2a3a; }
.light .wave path, .light .floor rect { stroke: #5c5670; }
.light .floor rect { fill: #fff; }
.preview {
  grid-column: 1 / -1;
  padding: 0;
  min-height: 0;
  overflow: hidden;
  background: #0c0724;
  border: 1px solid #3d3468;
  border-radius: 18px;
  color: #d9d6e6;
  box-shadow: 0 24px 60px rgba(18, 16, 26, 0.08);
}
.preview article { display: none; }
.preview p { margin: 0; padding: 14px 18px 0; color: #b7b0c9; }
.preview .code { background: transparent; color: #f4f2f8; padding: 8px 18px 18px; white-space: pre; }
.plate-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid #2c2450;
  color: #a79fbe;
  font: 11px/1 ui-monospace, Consolas, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.plate-link { padding-bottom: 16px; }
.preview a { color: #c7adfc; }
.preview .wave { padding: 8px 18px 18px; }
.preview .mini { width: min(100%, 520px); margin: 8px 18px 18px; }
.preview .floor { padding: 8px 18px 18px; }
.preview .wave text, .preview .floor text, .preview .mini text { fill: #e8e4f4; }
.preview .wave .grid path { stroke: #2a2448; stroke-width: 1; }
.preview .wave .trace { stroke: #f4f1fa; stroke-width: 1.5; }
.preview .wave .trace-hot { stroke: #c7adfc; }
.preview .wave .cursor { stroke: #7233f7; stroke-width: 1.25; }
.preview .wave .gutter, .preview .wave .lane { fill: #100a28; stroke: none; }
.preview .wave .lane.alt { fill: #0c0822; }
.preview .wave .rule { stroke: #3a3260; stroke-width: 1; }
.preview .wave .break path { stroke: #6d6588; stroke-width: 1.25; fill: none; }
.preview .wave .bus { stroke: #c7adfc; stroke-width: 1.35; fill: none; }
.preview .wave .name { font-size: 13px; }
.preview .wave .val { font-size: 12px; fill: #f4f1fa; }
.preview .wave .tick { font-size: 11px; fill: #8d86a8; }
.preview .wave .hot { fill: #c7adfc; }
.preview .floor .die { fill: #0e0824; stroke: #5c5478; stroke-width: 1.4; }
.preview .floor .seal { fill: none; stroke: #2a2448; stroke-width: 4; }
.preview .floor .pad { fill: #221a40; stroke: #6d6588; stroke-width: 0.8; }
.preview .floor .pwr { fill: #3a2c14; stroke: #c6a56a; stroke-width: 0.8; }
.preview .floor .gnd { fill: #15222e; stroke: #8aa0b4; stroke-width: 0.8; }
.preview .floor .core { fill: none; stroke: #3a335c; stroke-width: 1; }
.preview .floor .row { fill: #1a1236; stroke: none; }
.preview .floor .row.alt { fill: #140e2c; }
.preview .floor .cell { fill: #5b3ec4; stroke: #d4c4ff; stroke-width: 0.4; }
.preview .floor .straps path { fill: none; stroke: #6b5430; stroke-width: 1.25; }
.preview .floor .tag { fill: #c7adfc; }
.preview .floor text { font-size: 11px; }
.readout { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 18px 20px; }
.readout div { padding: 16px 18px; border: 1px solid #2c2450; border-radius: 12px; }
.readout dt { color: #a79fbe; font: 12px/1 ui-monospace, Consolas, monospace; letter-spacing: 0.08em; }
.readout dd { margin: 8px 0 0; color: #f4f2f8; font-size: 36px; letter-spacing: -0.04em; font-weight: 600; }
[data-flow][data-stage="rtl"] [data-pane="rtl"],
[data-flow][data-stage="verify"] [data-pane="verify"],
[data-flow][data-stage="synth"] [data-pane="synth"],
[data-flow][data-stage="impl"] [data-pane="impl"],
[data-flow][data-stage="inspect"] [data-pane="inspect"] { display: block; }
.fpga-note { display: none; }
[data-flow][data-target="fpga"][data-stage="impl"] .asic-note,
[data-flow][data-target="fpga"][data-stage="impl"] .floor { display: none; }
[data-flow][data-target="fpga"][data-stage="impl"] .fpga-note { display: block; }
.metrics { display: flex; gap: 28px; margin: 12px 0 0; }
.metrics div { display: flex; gap: 12px; }
.metrics dt { color: var(--muted); }
.metrics dd { margin: 0; font-family: var(--mono); color: var(--text); }
.sch-side { display: flex; flex-direction: column; gap: 14px; }
.sch-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sch-actions button:last-child:nth-child(odd) { grid-column: 1 / -1; }
.sch-panel text { fill: #d9d6e6; }
[data-circuit][data-cell="en"] .cell-en rect,
[data-circuit][data-cell="add"] .cell-add polygon,
[data-circuit][data-cell="mux"] .cell-mux polygon,
[data-circuit][data-cell="cnt"] .cell-cnt rect,
[data-circuit][data-cell="cmp"] .cell-cmp rect { stroke: var(--accent-2); stroke-width: 2; }
[data-circuit][data-trace="in"][data-cell="en"] .w-clk,
[data-circuit][data-trace="in"][data-cell="en"] .w-rst,
[data-circuit][data-trace="in"][data-cell="cnt"] .w-clk,
[data-circuit][data-trace="in"][data-cell="cnt"] .w-rst,
[data-circuit][data-trace="in"][data-cell="cnt"] .w-d,
[data-circuit][data-trace="in"][data-cell="add"] .w-cnt,
[data-circuit][data-trace="in"][data-cell="add"] .w-one,
[data-circuit][data-trace="in"][data-cell="cmp"] .w-cnt,
[data-circuit][data-trace="in"][data-cell="mux"] .w-sum,
[data-circuit][data-trace="in"][data-cell="mux"] .w-en,
[data-circuit][data-trace="out"][data-cell="en"] .w-en,
[data-circuit][data-trace="out"][data-cell="add"] .w-sum,
[data-circuit][data-trace="out"][data-cell="mux"] .w-d,
[data-circuit][data-trace="out"][data-cell="cnt"] .w-cnt,
[data-circuit][data-trace="out"][data-cell="cmp"] .w-done { stroke: var(--accent-2); stroke-width: 2; }
.seq-wrap { position: relative; margin: 8px 0 28px; }
.seq-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
  pointer-events: none;
}
.seq-track span {
  display: block;
  height: 100%;
  width: 8px;
  background: var(--accent);
  position: relative;
}
.seq-wrap.is-live .seq-track span {
  width: calc(4px + var(--on, 0) / 4 * (100% - 8px));
  transition: width 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}
.seq-track span::after {
  content: "";
  position: absolute;
  right: 0;
  top: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(50%, -50%);
  box-shadow: 0 0 0 4px rgba(114, 51, 247, 0.16);
}
.seq-wrap.is-live .seq-track span::after {
  animation: seq-dot 1.6s ease-out infinite;
}
@keyframes seq-dot {
  0% { box-shadow: 0 0 0 0 rgba(114, 51, 247, 0.32); }
  70% { box-shadow: 0 0 0 9px rgba(114, 51, 247, 0); }
  100% { box-shadow: 0 0 0 0 rgba(114, 51, 247, 0); }
}
.seq {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.seq li {
  position: relative;
  margin: 0;
  padding: 16px 0 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  transition: color 0.35s ease;
}
.seq li::before {
  content: counter(step, decimal-leading-zero);
  counter-increment: step;
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.08em;
  transition: color 0.35s ease;
}
.seq-wrap.is-live .seq li,
.seq-wrap.is-live .seq li::before { color: var(--muted); }
.seq-wrap.is-live .seq li.is-done,
.seq-wrap.is-live .seq li.is-on { color: var(--text); }
.seq-wrap.is-live .seq li.is-done::before,
.seq-wrap.is-live .seq li.is-on::before { color: var(--accent); }
.example { display: grid; grid-template-columns: 1.2fr 0.8fr 1fr; gap: 12px; }
.example article { padding: 16px; transition: border-color 0.35s ease, box-shadow 0.35s ease; }
.example article.is-on {
  border-color: var(--accent);
  box-shadow: 0 14px 32px rgba(114, 51, 247, 0.12);
}
.diff .del { color: #ffb4a8; }
.diff .add { color: #b6f0d0; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan, .band article { display: flex; flex-direction: column; gap: 8px; padding: 20px; }
.plan p, .band p { margin: 0; }
.price { color: var(--text); }
.price strong { font-size: 40px; letter-spacing: -0.04em; }
.price span { font-size: 16px; color: var(--muted); }
.plan .btn, .plan form, .band .btn { margin-top: auto; }
.plan form { display: none; }
html.is-auth .plan form.cta-auth { display: block; }
html.is-auth .plan form.cta-auth .btn { width: 100%; }
.band { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.limits { margin-top: 22px; }
.limits summary { cursor: pointer; color: var(--text); font-weight: 650; }
.limit-lists { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.limit-lists ul, .plan ul { margin: 8px 0 0; padding: 0; list-style: none; }
.limit-lists li { padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.compare-scroll { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 14px; }
.foot a { color: var(--body); text-decoration: none; font-size: 14px; }
.legal { margin: 0 0 0 auto; color: var(--muted); font-size: 13px; }
@media (max-width: 980px) {
  .hero-grid, .sch-panel, .example, .plans, .band, .limit-lists { grid-template-columns: 1fr; }
  .stage-split { grid-template-columns: 1fr; }
  .traces { border-left: 0; border-top: 1px solid var(--line); }
  .editor .code, .preview .code { white-space: pre-wrap; }
  .nav-desk { display: none; }
  .nav-box { display: block; }
  .nav-box .nav { flex-direction: column; padding: 8px 0 12px; }
}
@media (max-width: 680px) {
  .wrap { width: min(var(--max), calc(100% - 28px)); }
  .hero { padding-top: 48px; }
  h1 { font-size: 48px; }
  .top-inner { flex-wrap: wrap; row-gap: 8px; padding: 8px 0; }
  .cta { width: 100%; margin-left: 0; justify-content: flex-start; }
  .brand { letter-spacing: 0.04em; font-size: 11px; white-space: nowrap; }
  .btn, button.btn { white-space: nowrap; }
  .flow { display: flex; flex-direction: column; align-items: flex-start; gap: 0; grid-column: 1 / -1; }
  .flow::before { display: none; }
  .flow li { align-items: stretch; justify-content: flex-start; border-left: 1px solid var(--line); margin-left: 18px; padding: 0 0 10px 14px; }
  .loop { grid-column: 1 / -1; margin: 4px 0 22px 18px; flex-wrap: wrap; }
  [data-flow] { grid-template-columns: 1fr; }
  .seq-track { display: none; }
  .seq { grid-template-columns: 1fr; gap: 0; }
  .seq li { border-top: 0; border-left: 1px solid var(--line); padding: 0 0 14px 14px; }
  .seq-wrap.is-live .seq li.is-on { border-left-color: var(--accent); }
  .flow li:not(:last-child)::after { display: none; }
  .sch-actions { grid-template-columns: 1fr; }
  .legal { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .seq-track span,
  .seq li,
  .seq li::before,
  .example article { transition: none; }
  .seq-track span::after { animation: none; }
}

.docs {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 48px;
  padding: 48px 0 88px;
}
.docs-nav { display: flex; flex-direction: column; gap: 2px; align-self: start; }
.docs-nav a {
  color: var(--text); text-decoration: none; font-size: 15px;
  padding: 8px 10px; border-radius: 8px; border-left: 2px solid transparent;
}
.docs-nav a.on { border-left-color: var(--text); font-weight: 650; }
.docs h1 { font-size: clamp(36px, 4vw, 52px); letter-spacing: -0.035em; }
.docs h2 { font-size: 22px; letter-spacing: -0.02em; margin: 32px 0 8px; }
.docs p, .docs li { max-width: 62ch; }
.docs .lede { font-size: 18px; margin-bottom: 8px; }
.docs-limits { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.docs-limits li {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline;
  margin: 0; padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
@media (max-width: 800px) {
  .docs { grid-template-columns: 1fr; gap: 20px; padding-top: 28px; }
  .docs-nav { flex-direction: row; flex-wrap: wrap; }
}

.docs, .docs p, .docs li { color: #2e2a3a; }
.docs h1, .docs h2, .docs strong { color: #12101a; }

.docs-steps { margin: 8px 0 18px; padding-left: 1.3rem; max-width: 68ch; }
.docs-steps li { margin: 0 0 8px; }
.docs-table-wrap { overflow-x: auto; margin: 8px 0 20px; max-width: 100%; }
.docs table { width: 100%; border-collapse: collapse; font-size: 15px; }
.docs th, .docs td {
  text-align: left; vertical-align: top; padding: 10px 12px;
  border-bottom: 1px solid var(--line); color: #2e2a3a;
}
.docs th { color: #12101a; font-weight: 650; }
.docs td:first-child { font-weight: 650; color: #12101a; white-space: nowrap; }
.docs-code {
  margin: 8px 0 18px; padding: 14px 16px; max-width: 100%;
  overflow-x: auto; white-space: pre-wrap;
  background: #f6f5f8; color: #12101a;
  border: 1px solid #d9d5e4; border-radius: 10px;
  font: 14px/1.5 var(--mono);
}
@media (max-width: 800px) {
  .docs td:first-child { white-space: normal; }
}

.docs-index { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 14px; }
.docs-index a { font-weight: 650; }
.docs-index span { display: block; max-width: 62ch; font-weight: 400; }
.docs-next { margin-top: 28px; }

/* nelix:landing-2 */
/* ---- Landing page, second design. Everything is under .lp ---- */
.lp h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 12px; }
.lp .lede { max-width: 44rem; }
.lp-hero { padding: 72px 0 80px; }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.lp-hero h1 { margin: 0 0 18px; font-size: clamp(38px, 5.2vw, 62px); line-height: 1.03; letter-spacing: -0.03em; color: var(--text); }
.lp-eyebrow { display: inline-block; margin: 0 0 18px; padding: 4px 12px; border: 1px solid #3d2f7a; border-radius: 999px; background: rgba(114,51,247,0.16); color: #cdbfff; font-size: 13px; font-weight: 600; }
.lp-fine { margin: 16px 0 0; color: var(--muted); font-size: 13.5px; }
.lp .actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* The card in the first screen: a real design and its results */
.lp-card { margin: 0; border: 1px solid var(--line); border-radius: 18px; background: #0d0730; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.45); }
.lp-card-head { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.lp-card-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 0; }
.lp-chip { position: relative; aspect-ratio: 1 / 1; background: #070418; border-right: 1px solid var(--line); overflow: hidden; }
.lp-chip img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lp-chip-diagram { display: none; position: absolute; inset: 0; }
.lp-chip.no-photo .lp-chip-diagram { display: block; }
.lp-chip.no-photo::after { content: "diagram"; position: absolute; left: 10px; bottom: 8px; padding: 1px 8px; border: 1px solid #3d2f7a; border-radius: 999px; background: #0d0730; color: #a79fd0; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; }
/* The drawing is wider than the die inside it; enlarge and shift it so the die fills the square. */
.lp-chip-diagram svg { position: absolute; width: 168%; max-width: none; height: auto; left: -29%; top: 0; }
.lp-chip-diagram svg text, .lp-chip-diagram svg line.s-muted, .lp-chip-diagram svg [marker-end] { display: none; }
.lp-stages { list-style: none; margin: 0; padding: 18px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.lp-stages li { display: flex; align-items: flex-start; gap: 12px; }
.lp-stages svg { flex: 0 0 auto; margin-top: 3px; }
.lp-stages b { display: block; color: var(--text); font-size: 15.5px; }
.lp-stages span { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.4; }

/* The strip of four facts */
.lp-strip { background: #0b0628; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lp-strip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.lp-strip-grid > div { padding: 22px 20px; border-left: 1px solid var(--line); }
.lp-strip-grid > div:first-child { border-left: 0; padding-left: 0; }
.lp-strip b { display: block; color: var(--text); font-size: 15px; margin-bottom: 3px; }
.lp-strip span { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.45; }

/* How it works */
.lp-steps { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-direction: column; gap: 40px; }
.lp-steps > li { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 44px; align-items: center; }
.lp-steps > li:nth-child(even) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.lp-steps > li:nth-child(even) .lp-step-copy { order: 2; }
.lp-num { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; }
.lp-step-copy h3 { margin: 14px 0 8px; font-size: 24px; letter-spacing: -0.01em; color: var(--text); }
.lp-step-copy p { margin: 0; color: var(--body); font-size: 16.5px; line-height: 1.6; }
.lp-step-art { min-width: 0; }
.lp-cap { margin: 10px 2px 0; color: var(--muted); font-size: 13.5px; }
.lp-code { margin: 0; padding: 18px 20px; border-radius: 14px; background: #12101a; color: #e9e6f4; font-family: var(--mono); font-size: 13.5px; line-height: 1.65; overflow-x: auto; }
.lp-code .k { color: #c9a4ff; } .lp-code .n { color: #f4c95d; }
.lp-phases { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lp-phases li { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--body); font-size: 12.5px; }

/* Figures: drawings shared with the docs, coloured for this page */
.lp-fig { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow-x: auto; }
.lp-fig.paper { background: #fff; }
.lp-fig svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.lp .fg:not(.paper) text { font-family: var(--font); font-size: 12px; fill: var(--body); }
.lp .fg .t-ink { fill: var(--text); font-weight: 600; } .lp .fg .t-muted { fill: var(--muted); } .lp .fg .t-accent { fill: #5b2ad6; } .lp .fg .t-mono { font-family: var(--mono); fill: var(--text); }
.lp .fg .s-ink { stroke: var(--text); stroke-width: 1.4; fill: none; } .lp .fg .s-muted { stroke: var(--muted); stroke-width: 1.2; fill: none; } .lp .fg .s-grid { stroke: var(--line); stroke-width: 1; }
.lp .fg .s-accent { stroke: var(--accent); stroke-width: 1.3; fill: none; } .lp .fg .s-wave { stroke: #5b2ad6; stroke-width: 1.8; fill: none; stroke-linejoin: round; }
.lp .fg .f-muted { fill: var(--muted); }
.lp .fg .b-surface { fill: #fff; stroke: var(--line); stroke-width: 1.2; } .lp .fg .b-page { fill: #fff; stroke: var(--line); stroke-width: 1; }
.lp .fg .b-accent { fill: var(--accent); } .lp .fg .b-accent-soft { fill: #f1ecff; stroke: var(--accent); stroke-width: 1; }
.lp .fg .b-ink { fill: var(--text); } .lp .fg .b-warn { fill: #efdcb1; stroke: #7d5300; stroke-width: 0.8; }
.lp .fg .b-bus { fill: #f1ecff; stroke: #5b2ad6; stroke-width: 1.2; } .lp .fg .b-unknown { fill: var(--surface); stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 2; }
/* the small diagram in the first screen sits on a dark card */
.lp-chip-diagram .fg .b-surface { fill: #130b3a; stroke: #3d2f7a; } .lp-chip-diagram .fg .b-page { fill: #090522; stroke: #3d2f7a; }
.lp-chip-diagram .fg .b-accent-soft { fill: #1d1350; stroke: #6a4fd8; } .lp-chip-diagram .fg .b-accent { fill: #8f6bff; }
.lp-chip-diagram .fg .b-ink { fill: #e9e6f4; } .lp-chip-diagram .fg .b-warn { fill: #a9843a; stroke: #d9b160; }

/* Nelix AI */
.lp-rule { margin: 26px 0 22px; padding: 18px 22px; border: 1px solid #3d2f7a; border-radius: 14px; background: rgba(114,51,247,0.12); }
.lp-rule p { margin: 0; color: var(--body); font-size: 17px; line-height: 1.6; }
.lp-rule b { color: var(--text); }
.lp-agents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lp-agents article, .lp-who article { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.lp-agents h3, .lp-who h3 { margin: 0 0 6px; font-size: 17px; color: var(--text); }
.lp-agents p, .lp-who p { margin: 0; color: var(--body); font-size: 15px; line-height: 1.55; }
.lp-more { margin: 18px 0 0; }
.lp-more a, .lp-who a { color: #cdbfff; font-weight: 600; }

/* Learn */
.lp-two { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: start; }
.lp-rungs { list-style: none; counter-reset: rung; margin: 26px 0 0; padding: 0; }
.lp-rungs li { counter-increment: rung; position: relative; padding: 14px 0 14px 50px; border-top: 1px solid var(--line); }
.lp-rungs li:last-child { border-bottom: 1px solid var(--line); }
.lp-rungs li::before { content: counter(rung); position: absolute; left: 0; top: 14px; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--accent); color: #5b2ad6; font-weight: 700; font-size: 14px; }
.lp-rungs b { display: block; color: var(--text); font-size: 16.5px; }
.lp-rungs span { display: block; color: var(--muted); font-size: 14.5px; }
.lp-learn-side { display: flex; flex-direction: column; gap: 14px; }
.lp-panel { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.lp-panel h3 { margin: 0 0 8px; font-size: 19px; color: var(--text); }
.lp-panel p { margin: 0 0 16px; color: var(--body); font-size: 15.5px; line-height: 1.6; }
.lp-panel p:last-child { margin-bottom: 0; }
.light .lp-panel .btn-ghost { color: var(--text); }

/* Who it is for */
.lp-who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.lp-who p { margin-bottom: 14px; }
.lp-mission { margin: 28px 0 0; color: var(--muted); font-size: 15px; }

/* Questions */
.lp-faq { max-width: 820px; }
.lp-faq details { border-top: 1px solid var(--line); }
.lp-faq details:last-of-type { border-bottom: 1px solid var(--line); }
.lp-faq summary { padding: 18px 0; color: var(--text); font-size: 18px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 22px; line-height: 1; }
.lp-faq details[open] summary::after { content: "\2212"; }
.lp-faq details p { margin: 0 0 20px; max-width: 46rem; color: var(--body); font-size: 16.5px; line-height: 1.65; }

/* The closing call */
.lp-final { text-align: center; border-top: 1px solid var(--line); }
.lp-final .lede { margin-left: auto; margin-right: auto; }
.lp-final .actions { justify-content: center; }

@media (max-width: 980px) {
  .lp-hero-grid, .lp-two { grid-template-columns: 1fr; gap: 36px; }
  .lp-steps > li, .lp-steps > li:nth-child(even) { grid-template-columns: 1fr; gap: 20px; }
  .lp-steps > li:nth-child(even) .lp-step-copy { order: 0; }
  .lp-agents, .lp-who { grid-template-columns: 1fr 1fr; }
  .lp-strip-grid { grid-template-columns: 1fr 1fr; }
  .lp-strip-grid > div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .lp-strip-grid > div:nth-child(-n+2) { border-top: 0; }
}
@media (max-width: 620px) {
  .lp-hero { padding: 44px 0 52px; }
  .lp-card-body { grid-template-columns: 1fr; }
  .lp-chip { border-right: 0; border-bottom: 1px solid var(--line); aspect-ratio: 16 / 10; }
  .lp-agents, .lp-who, .lp-strip-grid { grid-template-columns: 1fr; }
  .lp-strip-grid > div:nth-child(2) { border-top: 1px solid var(--line); }
  .lp-faq summary { font-size: 16.5px; }
}

/* Phones: every tap target at least 44 px tall (design standard). */
@media (max-width: 680px) {
  .nav-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
  .nav-box .nav a { display: flex; align-items: center; min-height: 44px; }
  .btn, button.btn { min-height: 44px; }
}
