/* Databench · databench.hotbunny.dev
   The palette, radii and type here are the application's own tokens, so the
   page and the product look like the same thing. Deliberately no transitions:
   the application has none either. */

/* ── Tokens ─────────────────────────────────────────────────────────── */

:root {
  --font-ui: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont,
             system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace,
               "SF Mono", "Liberation Mono", Menlo, monospace;

  --radius: 4px;
  --radius-sm: 3px;
  --radius-lg: 8px;

  --maxw: 1120px;
  --maxw-wide: 1300px;
  --maxw-narrow: 760px;

  --pad: clamp(20px, 5vw, 40px);
  --section-y: clamp(64px, 9vw, 116px);
}

/* Dark is the default, and also the fallback if the inline script never ran. */
:root,
[data-theme="dark"] {
  color-scheme: dark;

  --bg: #1a1a1a;
  --bg-layer: #1f1f1f;
  --bg-subtle: #262626;
  --bg-raised: #2d2d2d;
  --bg-hover: #333333;
  --bg-active: #3a3a3a;
  --bg-selected: #2e3f52;
  --grid-stripe: #272727;

  --border: #383838;
  --border-strong: #4a4a4a;

  --text: #f2f2f2;
  --text-secondary: #a6a6a6;
  --text-disabled: #6e6e6e;

  --accent: #4c8ce6;
  --accent-hover: #5f9aeb;
  --accent-text: #ffffff;
  --accent-muted: #2b4569;
  --accent-faint: rgba(76, 140, 230, 0.12);

  --danger: #ff99a4;
  --warning: #e0a336;
  --success: #6ccb8e;

  --diff-insert: #1f3326;
  --diff-insert-border: #3f9c62;
  --diff-update: #342c17;
  --diff-update-border: #b58200;
  --diff-delete: #3a2020;
  --diff-delete-border: #c94a3d;

  --data-number: #79b8ff;
  --data-bool: #e0a336;
  --data-temporal: #c9a0ff;
  --data-uuid: #5ecfd8;
  --data-json: #ffab70;
  --data-enum: #6ccb8e;
  --data-null: #6e6e6e;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
  --texture: rgba(255, 255, 255, 0.035);
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #ffffff;
  --bg-layer: #f7f7f7;
  --bg-subtle: #f0f0f0;
  --bg-raised: #ffffff;
  --bg-hover: #ededed;
  --bg-active: #e3e3e3;
  --bg-selected: #e6effa;
  --grid-stripe: #f6f6f6;

  --border: #e2e2e2;
  --border-strong: #cfcfcf;

  --text: #1a1a1a;
  --text-secondary: #5c5c5c;
  --text-disabled: #9a9a9a;

  --accent: #2f6fd0;
  --accent-hover: #2a63bb;
  --accent-text: #ffffff;
  --accent-muted: #cfe0f7;
  --accent-faint: rgba(47, 111, 208, 0.08);

  --danger: #c42b1c;
  --warning: #9d5d00;
  --success: #0f7b3f;

  --diff-insert: #e7f6ec;
  --diff-insert-border: #3f9c62;
  --diff-update: #fdf4e3;
  --diff-update-border: #b58200;
  --diff-delete: #fdecea;
  --diff-delete-border: #c94a3d;

  --data-number: #1a5fb4;
  --data-bool: #7a4a00;
  --data-temporal: #6f42a1;
  --data-uuid: #0b6d75;
  --data-json: #a3521a;
  --data-enum: #0f7b3f;
  --data-null: #9a9a9a;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 25, 45, 0.16), 0 2px 8px rgba(15, 25, 45, 0.08);
  --texture: rgba(0, 0, 0, 0.035);
}

/* ── Reset ──────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

code, pre, kbd { font-family: var(--font-mono); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--accent-muted); color: var(--text); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: var(--radius);
  font-weight: 600;
}

.skip-link:focus { top: 12px; }

/* ── Layout ─────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.wrap-wide { max-width: var(--maxw-wide); }
.wrap-narrow { max-width: var(--maxw-narrow); }

.section { padding-block: var(--section-y); }

.section-alt {
  background: var(--bg-layer);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  text-align: center;
}

.section-head-left { margin-inline: 0; text-align: left; }

.section-head p {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

/* ── Type ───────────────────────────────────────────────────────────── */

h1 {
  font-size: clamp(2.15rem, 6.2vw, 4.15rem);
  line-height: 1.04;
  letter-spacing: -0.033em;
  font-weight: 700;
  text-wrap: balance;
}

/* Let the headline find its own break once the forced one stops fitting. */
@media (max-width: 640px) {
  .wide-only { display: none; }
}

h2 {
  font-size: clamp(1.65rem, 3.4vw, 2.35rem);
  line-height: 1.14;
  letter-spacing: -0.024em;
  font-weight: 650;
  text-wrap: balance;
}

h3 {
  font-size: 1.0625rem;
  line-height: 1.35;
  letter-spacing: -0.012em;
  font-weight: 640;
}

p code, li code, dd code {
  font-size: 0.875em;
  padding: 1px 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}

kbd {
  display: inline-block;
  min-width: 22px;
  padding: 1px 6px;
  margin-inline: 1px;
  font-size: 0.75em;
  line-height: 1.5;
  text-align: center;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* ── Buttons ────────────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding-inline: 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 560;
  letter-spacing: -0.006em;
  white-space: nowrap;
}

.button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-lg {
  height: 48px;
  padding-inline: 24px;
  font-size: 1.0625rem;
}

.button-lg svg { width: 19px; height: 19px; }

.button-accent {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.button-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.button-quiet {
  background: var(--bg-layer);
  border-color: var(--border-strong);
  color: var(--text);
}

.button-quiet:hover { background: var(--bg-hover); }

.button-disabled {
  background: var(--bg-subtle);
  border-color: var(--border);
  color: var(--text-disabled);
  cursor: default;
}

.button-block { display: flex; width: 100%; }

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-secondary);
}

.icon-button:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border); }

.icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-theme="dark"] .icon-when-dark,
[data-theme="light"] .icon-when-light { display: block; }

[data-theme="dark"] .icon-when-light,
[data-theme="light"] .icon-when-dark { display: none; }

/* ── Nav ────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}

.brand { display: flex; align-items: center; gap: 10px; }

/* No border-radius: the artwork carries its own corners. */
.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
}

.brand-name {
  font-size: 1.0625rem;
  font-weight: 660;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-inline: auto;
}

.nav-links a {
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.nav-links a:hover { color: var(--text); background: var(--bg-hover); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .nav-actions .button-quiet { display: none; }
}

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(56px, 8vw, 88px);
  text-align: center;
  overflow: hidden;
}

/* A faint dotted field, fading out downward. Static, like everything else. */
.hero::before {
  content: "";
  position: absolute;
  inset: -1px 0 auto;
  height: 620px;
  background-image: radial-gradient(var(--texture) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 92%);
  pointer-events: none;
}

.hero > * { position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 11px;
  margin-bottom: 26px;
  background: var(--bg-layer);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 520;
  color: var(--text-secondary);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent);
}

.lede {
  max-width: 660px;
  margin: 24px auto 0;
  font-size: clamp(1.0625rem, 1.7vw, 1.1875rem);
  line-height: 1.62;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.cta-note {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--text-disabled);
}

.platform-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--warning);
}

.tag {
  padding: 1px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ── The window ─────────────────────────────────────────────────────── */

.window {
  position: relative;
  margin-top: clamp(44px, 6vw, 72px);
}

.window-glow {
  position: absolute;
  inset: -12% 6% 30%;
  background: radial-gradient(60% 60% at 50% 40%, var(--accent-faint), transparent 72%);
  filter: blur(40px);
  pointer-events: none;
}

.win {
  position: relative;
  text-align: left;
  background: var(--bg-layer);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-size: 12px;
  line-height: 1.5;
  user-select: none;
}

.win-title {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding-left: 10px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.win-title-mark { width: 14px; height: 14px; flex: none; }

.win-title-text {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.win-buttons {
  display: flex;
  margin-left: auto;
  align-self: stretch;
  color: var(--text-secondary);
}

.win-buttons i {
  display: grid;
  place-items: center;
  width: 42px;
  font-size: 10px;
  font-style: normal;
}

.win-buttons i:hover { background: var(--bg-hover); }
.win-buttons .win-close:hover { background: #c42b1c; color: #fff; }

.win-menu {
  display: flex;
  gap: 2px;
  align-items: center;
  height: 26px;
  padding-inline: 6px;
  background: var(--bg-layer);
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.win-menu span { padding: 2px 8px; border-radius: var(--radius-sm); }
.win-menu span:hover { background: var(--bg-hover); color: var(--text); }

.win-body { display: flex; align-items: stretch; }

/* Sidebar */

.win-side {
  flex: none;
  width: 220px;
  background: var(--bg-layer);
  border-right: 1px solid var(--border);
  padding: 6px;
}

.side-search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding-inline: 8px;
  margin-bottom: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-disabled);
  font-size: 11.5px;
}

.side-search kbd {
  margin-left: auto;
  font-size: 9.5px;
  padding: 0 4px;
  border-bottom-width: 1px;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding-inline: 6px;
  border-radius: var(--radius-sm);
  color: var(--text);
  white-space: nowrap;
}

.tree-row.is-selected { background: var(--bg-selected); }
.tree-conn { font-weight: 600; margin-top: 4px; }
.tree-conn:first-child { margin-top: 0; }

.indent-1 { padding-left: 18px; }
.indent-2 { padding-left: 34px; }

.tree-label { overflow: hidden; text-overflow: ellipsis; }

.tree-meta {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--text-disabled);
  font-family: var(--font-mono);
}

.caret {
  width: 9px;
  height: 9px;
  flex: none;
  border-right: 1.4px solid var(--text-disabled);
  border-bottom: 1.4px solid var(--text-disabled);
  transform: rotate(-45deg);
  margin-left: 2px;
  margin-right: 2px;
}

.caret-open { transform: rotate(45deg); margin-top: -3px; }

.swatch { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.swatch-prod { background: #c94a3d; }
.swatch-stage { background: #b58200; }
.swatch-dev { background: #3f9c62; }

.ico {
  width: 11px;
  height: 11px;
  flex: none;
  border-radius: 2px;
}

.ico-schema { border: 1.3px solid var(--text-disabled); border-radius: 2px 2px 4px 4px; }
.ico-table { background: var(--text-disabled); -webkit-mask: linear-gradient(#000 0 0) padding-box; }
.ico-table { background: linear-gradient(var(--text-disabled) 0 0) top/100% 3px no-repeat, linear-gradient(var(--border-strong) 0 0); }
.ico-view { background: linear-gradient(var(--data-temporal) 0 0) top/100% 3px no-repeat, linear-gradient(var(--border-strong) 0 0); }
.ico-query { background: linear-gradient(var(--data-number) 0 0) top/100% 3px no-repeat, linear-gradient(var(--border-strong) 0 0); }

/* Main pane */

.win-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.win-tabs {
  display: flex;
  align-items: stretch;
  height: 30px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-inline: 12px;
  border-right: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}

.tab.is-active {
  background: var(--bg);
  color: var(--text);
  box-shadow: inset 0 2px 0 var(--accent);
}

.tab-add {
  display: grid;
  place-items: center;
  width: 28px;
  color: var(--text-disabled);
}

.win-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding-inline: 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.toolbar-gap { flex: 1; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding-inline: 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-layer);
  color: var(--text-secondary);
  font-size: 11px;
  white-space: nowrap;
}

.chip-on {
  background: var(--bg-selected);
  border-color: var(--accent-muted);
  color: var(--text);
  font-family: var(--font-mono);
}

.chip:nth-child(2) { font-family: var(--font-mono); }

.chip-ghost { background: transparent; border-style: dashed; }

.chip-staged {
  background: var(--diff-update);
  border-color: var(--diff-update-border);
  color: var(--warning);
}

.chip-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

/* Grid */

.grid { background: var(--bg); }

.grid-row {
  display: grid;
  grid-template-columns: 40px 76px 176px 66px 74px 84px 128px 66px minmax(110px, 1fr);
  align-items: center;
  height: 24px;
  border-bottom: 1px solid var(--border);
  border-left: 2px solid transparent;
}

.grid-row > span {
  padding-inline: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-right: 1px solid var(--border);
}

.grid-row > span:last-child { border-right: none; }

.grid-head {
  height: 26px;
  background: var(--bg-subtle);
  position: sticky;
  top: 0;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 11.5px;
}

.grid-head span { display: flex; align-items: center; gap: 5px; }

.t {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  padding: 2px 3px;
  border-radius: 2px;
  color: var(--bg);
  flex: none;
}

.t-num { background: var(--data-number); }
.t-txt { background: var(--text-disabled); }
.t-enum { background: var(--data-enum); }
.t-time { background: var(--data-temporal); }
.t-bool { background: var(--data-bool); }
.t-json { background: var(--data-json); }

.grid-body .grid-row:nth-child(even) { background: var(--grid-stripe); }

.c-num {
  color: var(--text-disabled);
  text-align: right;
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: var(--bg-subtle);
}

.grid-body .grid-row { font-family: var(--font-mono); font-size: 11.5px; }

.v-num { color: var(--data-number); text-align: right; }
.v-bool { color: var(--data-bool); }
.v-false { opacity: 0.72; }
.v-time { color: var(--data-temporal); }
.v-json { color: var(--data-json); }
.v-enum { color: var(--data-enum); }
.v-null { color: var(--data-null); font-style: italic; }

.grid-row.is-update { background: var(--diff-update) !important; border-left-color: var(--diff-update-border); }
.grid-row.is-insert { background: var(--diff-insert) !important; border-left-color: var(--diff-insert-border); }
.grid-row.is-delete { background: var(--diff-delete) !important; border-left-color: var(--diff-delete-border); }
.grid-row.is-delete > span { text-decoration: line-through; opacity: 0.66; }

.cell-edited {
  box-shadow: inset 0 0 0 1px var(--accent);
  background: var(--accent-faint);
  font-weight: 700;
}

.win-status {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 22px;
  padding-inline: 10px;
  background: var(--bg-layer);
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-secondary);
}

.status-staged { color: var(--warning); }

.sep { width: 1px; height: 11px; background: var(--border-strong); }

/* Shed columns rather than shrink them, the way the real grid would. */
@media (max-width: 1080px) {
  .grid-row { grid-template-columns: 36px 70px 176px 62px 54px 78px 120px minmax(60px, 1fr); }
  .grid-row > span:nth-child(9) { display: none; }
}

@media (max-width: 900px) {
  .win-side { display: none; }
  .grid-row { grid-template-columns: 34px 66px minmax(140px, 1fr) 60px 56px 78px; }
  .grid-row > span:nth-child(7),
  .grid-row > span:nth-child(8) { display: none; }
  .win-menu { display: none; }
}

@media (max-width: 560px) {
  .win { font-size: 11px; }
  .grid-row { grid-template-columns: 34px minmax(120px, 1fr) 54px 74px; }
  .grid-row > span:nth-child(2),
  .grid-row > span:nth-child(5) { display: none; }
  /* From the fourth child on, so the run does not end on a separator. */
  .win-status span:nth-child(n + 4) { display: none; }
  .win-toolbar .chip-primary,
  .win-toolbar .chip-ghost { display: none; }
  .win-tabs .tab:nth-child(3) { display: none; }
}

/* ── Engines ────────────────────────────────────────────────────────── */

.engines {
  padding-block: 30px;
  border-block: 1px solid var(--border);
  background: var(--bg-layer);
}

.engines-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 620;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-disabled);
}

.engine-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 40px;
  margin-top: 18px;
  list-style: none;
}

.engine-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.engine-list strong { font-size: 1.0625rem; font-weight: 640; letter-spacing: -0.015em; }
.engine-list span { font-size: 0.8125rem; color: var(--text-disabled); }

/* ── Stats ──────────────────────────────────────────────────────────── */

.stats { padding-block: clamp(48px, 6vw, 72px); }

/* Fixed counts rather than auto-fit: four items should never land as 3 + 1. */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 32px;
}

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 430px) {
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
}

.stat strong {
  display: block;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--accent);
}

/* Direct child only: the number itself is wrapped in a span the script fills. */
.stat > span {
  display: block;
  margin-top: 10px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-wrap: pretty;
}

/* ── Cards ──────────────────────────────────────────────────────────── */

/* Rules are drawn by each card and clipped by the container, so a row that
   does not fill up leaves background rather than a slab of border colour. */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card {
  padding: 28px 26px 30px;
  background: var(--bg);
  box-shadow: 1px 0 0 var(--border), 0 1px 0 var(--border);
}

.card:hover { background: var(--bg-layer); }

.card-icon {
  width: 22px;
  height: 22px;
  margin-bottom: 16px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card p {
  margin-top: 10px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-wrap: pretty;
}

/* ── Split showcases ────────────────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

/* The visual moves to the first column, so the wide track has to move with it. */
.split-reverse {
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr);
}

.split-reverse .split-text { order: 2; }

/* minmax(0, …) rather than 1fr: the code panels have wide, unbreakable
   content and would otherwise hold the column open past the viewport. */
@media (max-width: 900px) {
  .split,
  .split-reverse { grid-template-columns: minmax(0, 1fr); }
  .split-reverse .split-text { order: 0; }
}

.kicker {
  font-size: 0.75rem;
  font-weight: 620;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.split-text h2 { margin-bottom: 18px; }

.split-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  text-wrap: pretty;
}

.split-text p + p { margin-top: 14px; }

.ticks {
  margin-top: 22px;
  list-style: none;
  display: grid;
  gap: 9px;
}

.ticks li {
  position: relative;
  padding-left: 26px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  width: 10px;
  height: 5px;
  border-left: 1.8px solid var(--success);
  border-bottom: 1.8px solid var(--success);
  transform: rotate(-45deg);
}

/* ── Panels ─────────────────────────────────────────────────────────── */

.panel {
  background: var(--bg-layer);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head,
.panel-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding-inline: 12px;
  background: var(--bg-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.panel-head { border-bottom: 1px solid var(--border); }
.panel-foot { border-top: 1px solid var(--border); }

.panel-meta {
  margin-left: auto;
  font-weight: 400;
  color: var(--text-disabled);
  font-size: 11px;
}

.code {
  padding: 16px 18px;
  background: var(--bg);
  font-size: 12.5px;
  line-height: 1.72;
  overflow-x: auto;
  tab-size: 2;
}

.code code { color: var(--text); }

.code .k { color: var(--data-number); font-weight: 600; }
.code .n { color: var(--text); }
.code .f { color: var(--data-temporal); }
.code .s { color: var(--data-enum); }
.code .num { color: var(--data-json); }
.code .c { color: var(--text-disabled); font-style: italic; }

.code-lines { border-bottom: 1px solid var(--border); }

/* Plan tree */

.plan { background: var(--bg-layer); padding: 12px 14px 14px; }

.plan-head {
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-disabled);
  margin-bottom: 8px;
}

.plan-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  padding-inline: 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11.5px;
  overflow: hidden;
}

.plan-row .indent-1,
.plan-row.indent-1 { margin-left: 16px; }
.plan-row.indent-2 { margin-left: 32px; }

.plan-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: var(--accent-faint);
  border-left: 2px solid var(--accent);
}

.plan-name { position: relative; color: var(--text); }
.plan-cost { position: relative; margin-left: auto; color: var(--text-secondary); }

/* ── Shortcuts ──────────────────────────────────────────────────────── */

.keys {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.keys-group {
  padding: 22px 24px 24px;
  background: var(--bg);
  box-shadow: 1px 0 0 var(--border), 0 1px 0 var(--border);
}

.keys-group h3 {
  font-size: 0.75rem;
  font-weight: 620;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-disabled);
  margin-bottom: 14px;
}

.keys-group dl { display: grid; gap: 2px; }

.keys-group dl > div {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.keys-group dl > div:last-child { border-bottom: none; }

.keys-group dt { flex: none; min-width: 118px; }
.keys-group dd { font-size: 0.9375rem; color: var(--text-secondary); }

/* ── Pitch ──────────────────────────────────────────────────────────── */

.pitch { text-align: center; }

/* The prose is held to a readable measure; the grid below is not. */
.pitch h2,
.pitch > p {
  max-width: 820px;
  margin-inline: auto;
}

.pitch > p {
  margin-top: 18px;
  font-size: 1.0625rem;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.pitch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 28px;
  margin-top: 44px;
  text-align: left;
}

@media (max-width: 900px) {
  .pitch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 430px) {
  .pitch-grid { grid-template-columns: minmax(0, 1fr); }
}

.pitch-grid > div {
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}

.pitch-grid strong { display: block; font-size: 0.9375rem; font-weight: 640; }

.pitch-grid span {
  display: block;
  margin-top: 5px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ── Downloads ──────────────────────────────────────────────────────── */

.downloads {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 880px) {
  .downloads { grid-template-columns: minmax(0, 1fr); }
}

.dl {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.dl-ready { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-faint); }

.dl-os { display: flex; align-items: center; gap: 12px; }

.dl-logo { width: 26px; height: 26px; flex: none; color: var(--text); }

.dl-soon .dl-logo,
.dl-links .dl-logo { color: var(--text-secondary); }

.dl-os p { font-size: 0.8125rem; color: var(--text-disabled); }

.dl-alt {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: center;
}

.dl-alt span { color: var(--accent); font-weight: 560; }
.dl-alt:hover span { text-decoration: underline; }

.dl-note {
  margin-top: auto;
  padding-top: 4px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-disabled);
  text-wrap: pretty;
}

/* ── FAQ ────────────────────────────────────────────────────────────── */

.faq { border-top: 1px solid var(--border); }

.faq details { border-bottom: 1px solid var(--border); }

.faq summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  font-size: 1.0625rem;
  font-weight: 580;
  letter-spacing: -0.012em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  flex: none;
  margin-left: auto;
  width: 9px;
  height: 9px;
  border-right: 1.6px solid var(--text-disabled);
  border-bottom: 1.6px solid var(--text-disabled);
  transform: rotate(45deg) translate(-2px, -2px);
}

.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }

.faq summary:hover { color: var(--accent); }

.faq p {
  padding-bottom: 20px;
  max-width: 66ch;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.faq a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ── Closer ─────────────────────────────────────────────────────────── */

.closer {
  padding-block: clamp(72px, 10vw, 128px);
  text-align: center;
  background: var(--bg-layer);
  border-top: 1px solid var(--border);
}

.closer p { margin-top: 14px; color: var(--text-secondary); font-size: 1.0625rem; }
.closer .button { margin-top: 30px; }
.closer .cta-note { margin-top: 16px; font-size: 0.875rem; }

/* ── Footer ─────────────────────────────────────────────────────────── */

.foot {
  padding-top: 52px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  padding-bottom: 44px;
}

.foot-brand { display: flex; gap: 12px; max-width: 320px; }
.foot-brand strong { display: block; font-size: 0.9375rem; font-weight: 640; }

.foot-brand span {
  display: block;
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.foot-links { display: flex; gap: 56px; }
.foot-links > div { display: grid; gap: 8px; align-content: start; }

.foot-links h3 {
  font-size: 0.75rem;
  font-weight: 620;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-disabled);
  margin-bottom: 2px;
}

.foot-links a { font-size: 0.875rem; color: var(--text-secondary); }
.foot-links a:hover { color: var(--text); }

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding-block: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-disabled);
}
