/* ─── DevTables · Editorial, keyboard-first ────────────────────────────── */

:root {
  --bg:        #fbfbfc;
  --bg-2:      #f3f4f6;
  --bg-3:      #ebecef;
  --ink:       #0f1115;
  --ink-2:     #1c1f24;
  --muted:     #6b7280;
  --hair:      rgba(15, 17, 21, 0.10);
  --hair-2:    rgba(15, 17, 21, 0.05);
  --paper:     #ffffff;
  --accent:    oklch(58% 0.18 256);
  --accent-2:  oklch(47% 0.17 256);
  --ok:        oklch(62% 0.15 155);
  --serif:     "Noto Serif", "Cambria", "Iowan Old Style", Georgia, serif;
  --sans:      "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mono:      "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --rad: 15px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--paper); }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(56, 124, 240, 0.12), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(56, 124, 240, 0.07), transparent 60%);
  z-index: 0;
}
main { position: relative; z-index: 1; }

/* ─── Keycaps ───────────────────────────────────────────────────────────── */
kbd, .kbd {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  color: var(--ink-2);
  background: var(--paper);
  border: 0.5px solid var(--hair);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 4px 6px 3px;
  vertical-align: middle;
  white-space: nowrap;
}

/* ─── Nav ───────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 0.5px solid var(--hair);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-family: var(--sans); font-weight: 600; letter-spacing: -0.005em;
  font-size: 16px;
}
.logo-img {
  border-radius: 6px;
  display: block;
  box-shadow: 0 1px 2px rgba(26,24,21,0.10), 0 4px 12px -4px rgba(56,124,240,0.35);
}
.nav-links {
  display: flex; gap: 28px;
  font-size: 14px;
}
.nav-links a {
  color: var(--ink-2); text-decoration: none;
  opacity: .72; transition: opacity .15s;
}
.nav-links a:hover { opacity: 1; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-kbd {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--sans); font-size: 13px; color: var(--muted);
  padding: 6px 8px; border-radius: 8px;
  transition: background .15s, color .15s;
}
.nav-kbd:hover { background: var(--bg-2); color: var(--ink); }
.nav-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  text-decoration: none; font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  transition: transform .12s, background .12s;
}
.nav-pill:hover { transform: translateY(-1px); background: var(--ink-2); }
.nav-progress {
  height: 2px; background: var(--accent);
  transform-origin: 0 50%; transition: transform .1s linear;
  transform: scaleX(0);
}
.nav-static .nav-progress {
  background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 10%, transparent));
  transform: scaleX(1);
  opacity: 0.5;
}
@media (max-width: 720px) {
  .nav-inner { padding: 12px 22px; }
  .nav-links, .nav-kbd { display: none; }
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 40px 48px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  position: relative;
  z-index: 1;
}
.hero-meta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.hero-meta span { min-width: 0; }
.meta-dot { flex: none; }
.meta-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 25%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 25%, transparent); }
  50%      { box-shadow: 0 0 0 8px color-mix(in oklab, var(--accent) 0%, transparent); }
}
.hero-h {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 8.2vw, 104px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.hero-h em {
  font-style: italic;
  color: var(--accent);
}
.hero-sub {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px;
  align-items: end; max-width: 1040px;
  border-top: 0.5px solid var(--hair);
  padding-top: 28px;
}
.hero-sub p {
  margin: 0;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 580px;
  text-wrap: pretty;
}
.hero-rot {
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--mono); font-size: 12px;
  text-align: right;
}
.rot-label { color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.rot-value {
  font-family: var(--serif); font-style: italic; font-size: 22px;
  color: var(--accent); letter-spacing: -0.01em;
  animation: rot-fade .5s ease;
  white-space: nowrap;
}
@keyframes rot-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  text-decoration: none; font-family: var(--sans); font-weight: 500; font-size: 15px;
  border: 0; cursor: pointer;
  transition: transform .12s, background .12s;
}
.btn-primary:hover { transform: translateY(-1px); background: var(--ink-2); }
.btn-primary.lg { padding: 16px 26px; font-size: 16px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px;
  border: 0.5px solid var(--hair);
  color: var(--ink); background: transparent;
  text-decoration: none; font-family: var(--sans); font-weight: 500; font-size: 15px; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.btn-ghost:hover { background: var(--bg-2); border-color: rgba(26,24,21,0.22); }
.btn-ghost.lg { padding: 16px 26px; font-size: 16px; }
.btn-ghost .kbd { margin-left: 2px; }

.hero-foot {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 0.5px solid var(--hair);
  padding-top: 28px;
  margin-top: 8px;
}
.hero-foot > div { display: flex; flex-direction: column; gap: 4px; }
.foot-num { font-family: var(--serif); font-size: 30px; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.foot-lbl { font-family: var(--sans); font-size: 13px; color: var(--muted); }

@media (max-width: 720px) {
  .hero { padding: 52px 22px 36px; gap: 28px; }
  .hero-h br { display: none; }
  .hero-sub { grid-template-columns: 1fr; gap: 18px; align-items: start; }
  .hero-rot { text-align: left; }
  .hero-foot { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

/* ─── App window mock ───────────────────────────────────────────────────── */
.stage {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 40px 24px;
  position: relative;
  z-index: 1;
}
.appwin {
  position: relative;
  border-radius: 14px;
  border: 0.5px solid var(--hair);
  background: var(--paper);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(0,0,0,0.02),
    0 32px 64px -20px color-mix(in oklab, var(--accent) 24%, transparent),
    0 10px 28px -10px rgba(15,17,21,0.12);
  font-family: var(--sans);
}
.aw-titlebar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--hair);
  background: var(--bg-2);
}
.aw-lights { display: flex; gap: 7px; }
.aw-lights span { width: 11px; height: 11px; border-radius: 50%; background: var(--bg-3); border: 0.5px solid var(--hair); }
.aw-lights span:nth-child(1) { background: #f6605c; border-color: #e0443e; }
.aw-lights span:nth-child(2) { background: #fbbf3f; border-color: #dea123; }
.aw-lights span:nth-child(3) { background: #44c648; border-color: #1eac29; }
.aw-title {
  flex: 1; text-align: center;
  font-size: 12.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aw-title strong { color: var(--ink-2); font-weight: 500; }
.aw-conn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em;
}
.aw-conn::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
}
.aw-body {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  min-height: 430px;
}
.aw-side {
  border-right: 0.5px solid var(--hair);
  background: color-mix(in oklab, var(--bg-2) 60%, var(--paper));
  padding: 12px 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.aw-side-h {
  font-family: var(--mono); font-size: 10px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 10px 8px;
}
.aw-tbl {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px; color: var(--ink-2);
}
.aw-tbl svg { color: var(--muted); flex: none; }
.aw-tbl.on { background: color-mix(in oklab, var(--accent) 14%, transparent); color: var(--accent-2); font-weight: 500; }
.aw-tbl.on svg { color: var(--accent); }
.aw-main { display: flex; flex-direction: column; min-width: 0; }
.aw-tabs {
  display: flex; gap: 2px;
  padding: 8px 10px 0;
  border-bottom: 0.5px solid var(--hair);
}
.aw-tab {
  padding: 7px 14px 8px;
  font-size: 12.5px; color: var(--muted);
  border: 0.5px solid transparent; border-bottom: 0;
  border-radius: 8px 8px 0 0;
  white-space: nowrap;
}
.aw-tab.on {
  background: var(--paper);
  border-color: var(--hair);
  color: var(--ink);
  position: relative;
  top: 0.5px;
}
.aw-grid { flex: 1; overflow: hidden; }
.aw-grid table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono); font-size: 12px;
}
.aw-grid th {
  font-family: var(--sans); font-size: 11px; font-weight: 500;
  color: var(--muted); text-align: left;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 8px 14px;
  border-bottom: 0.5px solid var(--hair);
  background: color-mix(in oklab, var(--bg-2) 50%, var(--paper));
  white-space: nowrap;
}
.aw-grid td {
  padding: 7px 14px;
  border-bottom: 0.5px solid var(--hair-2);
  color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 220px;
}
.aw-grid tr.sel td {
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  color: var(--ink);
}
.aw-grid .null { color: var(--muted); font-style: italic; }
.aw-grid .num { color: var(--accent-2); }
.aw-status {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 7px 14px;
  border-top: 0.5px solid var(--hair);
  font-family: var(--mono); font-size: 10.5px;
  color: var(--muted); letter-spacing: 0.03em;
  background: color-mix(in oklab, var(--bg-2) 50%, var(--paper));
}
.stage-hint {
  margin: 16px auto 0;
  text-align: center;
  font-family: var(--mono); font-size: 12px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
}
.stage-hint .kbd { text-transform: none; }

@media (max-width: 880px) {
  .aw-body { grid-template-columns: 1fr; }
  .aw-side { display: none; }
  .aw-hide-1 { display: none; }
}
@media (max-width: 560px) {
  .stage { padding: 0 22px 16px; }
  .aw-hide-2 { display: none; }
  .aw-conn { display: none; }
}

/* ─── Command palette (live demo) ───────────────────────────────────────── */
.palette {
  position: absolute;
  top: 52px; left: 50%;
  transform: translateX(-50%);
  width: min(480px, calc(100% - 32px));
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 0.5px solid var(--hair);
  border-radius: 12px;
  box-shadow:
    0 0 0 0.5px rgba(15,17,21,0.04),
    0 24px 60px -12px rgba(15,17,21,0.35),
    0 8px 20px -8px rgba(15,17,21,0.18);
  overflow: hidden;
  font-family: var(--sans);
  transition: box-shadow .25s;
}
.palette.flash {
  box-shadow:
    0 0 0 2px color-mix(in oklab, var(--accent) 60%, transparent),
    0 24px 60px -12px rgba(15,17,21,0.35);
}
.pal-input {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-bottom: 0.5px solid var(--hair);
  color: var(--muted);
}
.pal-input svg { flex: none; }
.pal-input input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  min-width: 0;
}
.pal-input input::placeholder { color: var(--muted); }
.pal-list {
  max-height: 248px;
  overflow-y: auto;
  padding: 6px;
}
.pal-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13.5px; color: var(--ink-2);
  cursor: pointer;
}
.pal-item .pal-name b { font-weight: 600; color: var(--accent-2); }
.pal-item.on { background: color-mix(in oklab, var(--accent) 13%, transparent); color: var(--ink); }
.pal-item .kbd { flex: none; opacity: 0.85; }
.pal-empty {
  padding: 20px 12px; text-align: center;
  font-size: 13px; color: var(--muted);
}
.pal-foot {
  display: flex; gap: 16px; justify-content: flex-end;
  padding: 8px 14px;
  border-top: 0.5px solid var(--hair);
  font-family: var(--mono); font-size: 10.5px;
  color: var(--muted); letter-spacing: 0.03em;
}
.pal-foot b { color: var(--ink-2); font-weight: 500; }

/* ─── Section heads ─────────────────────────────────────────────────────── */
.section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  align-items: start;
  padding: 12px 0 28px;
  border-top: 0.5px solid var(--hair);
}
.section-eyebrow {
  font-family: var(--mono); font-size: 12px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
  padding-top: 8px;
}
.section-h {
  margin: 0;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.section-h em { font-style: italic; color: var(--accent); }
.section-h .muted { color: var(--muted); }
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 14px; padding: 12px 0 20px; }
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 40px;
  position: relative;
  z-index: 1;
}
@media (max-width: 720px) { .section { padding: 44px 22px; } }
section[id] { scroll-margin-top: 80px; }

/* ─── Keyboard capabilities (caps grid) ─────────────────────────────────── */
.caps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 0.5px solid var(--hair);
}
.cap {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 18px;
  padding: 24px 28px 24px 0;
  border-bottom: 0.5px solid var(--hair);
}
.cap:nth-child(2n) { padding-left: 28px; padding-right: 0; border-left: 0.5px solid var(--hair); }
.cap-n {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 22px; line-height: 1; letter-spacing: -0.01em;
  color: var(--accent);
  padding-top: 2px;
}
.cap-body h4 {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--sans); font-weight: 500;
  font-size: 16px; letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 6px;
}
.cap-body p {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink-2);
  font-size: 14.5px; line-height: 1.55;
  max-width: 520px;
}
.cap-body code {
  font-family: var(--mono); font-size: 0.9em;
  background: var(--bg-2);
  border: 0.5px solid var(--hair);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--ink);
}
@media (max-width: 880px) {
  .caps { grid-template-columns: 1fr; }
  .cap, .cap:nth-child(2n) { padding: 18px 0; border-left: 0; }
}

/* ─── Keys strip ────────────────────────────────────────────────────────── */
.keys {
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  padding: 26px 0 6px;
}
.key-pair {
  display: inline-flex; align-items: baseline; gap: 9px;
  font-family: var(--sans); font-size: 13px; color: var(--muted);
}
.key-pair .kbd { font-size: 11.5px; }
.keys-note {
  margin: 18px 0 0;
  font-family: var(--mono); font-size: 11.5px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
}

/* ─── Database matrix ───────────────────────────────────────────────────── */
.dbm-wrap { overflow-x: auto; border-top: 0.5px solid var(--hair); }
.dbm {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.dbm th {
  font-family: var(--mono); font-size: 11px; font-weight: 400;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;
  text-align: left;
  padding: 16px 18px 14px;
  border-bottom: 0.5px solid var(--hair);
}
.dbm th:first-child { padding-left: 0; }
.dbm td {
  padding: 22px 18px;
  border-bottom: 0.5px solid var(--hair);
  font-family: var(--sans); font-size: 14px;
  color: var(--ink-2);
  vertical-align: middle;
}
.dbm td:first-child { padding-left: 0; }
.dbm-engine {
  font-family: var(--serif); font-size: 24px; font-weight: 400;
  letter-spacing: -0.015em; color: var(--ink);
  line-height: 1.1;
}
.dbm-engine small {
  display: block;
  font-family: var(--mono); font-size: 10.5px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
  margin-top: 5px;
}
.dbm-yes {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--ink);
}
.dbm-yes::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}
.dbm-part {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--muted);
}
.dbm-part::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: color-mix(in oklab, var(--accent) 45%, var(--bg));
  outline: 0.5px solid var(--accent);
}
.dbm-no { color: var(--hair); }
.dbm-note { font-size: 13px; color: var(--muted); max-width: 230px; }
.dbm-foot {
  margin: 20px 0 0;
  font-family: var(--sans); font-size: 13.5px; color: var(--muted);
  line-height: 1.6; max-width: 760px;
}
.dbm-foot strong { color: var(--ink-2); font-weight: 500; }

/* ─── Spotlight (editor / safety) ───────────────────────────────────────── */
.spotlight-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, 1fr);
  gap: 56px;
  align-items: start;
}
.spotlight-grid.flip { grid-template-columns: minmax(340px, 1fr) minmax(0, 1.15fr); }
.spotlight-grid.flip .spotlight-notes { order: -1; }
@media (max-width: 960px) {
  .spotlight-grid, .spotlight-grid.flip { grid-template-columns: 1fr; gap: 36px; }
  .spotlight-grid.flip .spotlight-notes { order: 0; }
}
.spotlight-notes {
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  border-top: 0.5px solid var(--hair);
  min-width: 0;
}
.note {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 0.5px solid var(--hair);
  position: relative;
  min-width: 0;
}
.note::before {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -0.5px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.note:hover::before { transform: scaleX(1); }
.note-body { min-width: 0; }
.note-mark {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 22px; line-height: 1; color: var(--accent);
  padding-top: 4px;
}
.note h4 {
  font-family: var(--serif); font-weight: 400; font-size: 22px;
  letter-spacing: -0.01em; margin: 0 0 6px; color: var(--ink);
  text-wrap: balance;
}
.note h4 .kbd { margin-left: 6px; }
.note p {
  margin: 0; font-family: var(--sans); font-size: 14.5px; color: var(--muted); line-height: 1.55;
  text-wrap: pretty;
}
@media (max-width: 520px) {
  .note { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }
  .note-mark { font-size: 18px; }
}

/* ─── SQL editor mock ───────────────────────────────────────────────────── */
.editor-mock {
  position: relative;
  border: 0.5px solid var(--hair);
  border-radius: var(--rad);
  background: var(--paper);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(0,0,0,0.02),
    0 24px 48px -16px color-mix(in oklab, var(--accent) 22%, transparent),
    0 8px 24px -8px rgba(15,17,21,0.10);
}
.em-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  border-bottom: 0.5px solid var(--hair);
  background: color-mix(in oklab, var(--bg-2) 60%, var(--paper));
  font-family: var(--sans); font-size: 12px; color: var(--muted);
}
.em-bar .kbd { font-size: 10px; }
.em-bar-spacer { flex: 1; }
.em-run {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: 11.5px; font-weight: 500;
}
.em-code {
  margin: 0;
  padding: 18px 0 22px;
  font-family: var(--mono); font-size: 13px; line-height: 1.7;
  overflow-x: auto;
  counter-reset: ln;
}
.em-code .ln {
  display: block;
  padding: 0 18px 0 54px;
  position: relative;
  white-space: pre;
}
.em-code .ln::before {
  counter-increment: ln;
  content: counter(ln);
  position: absolute; left: 0; width: 38px;
  text-align: right;
  color: var(--hair);
  font-size: 11px;
  line-height: inherit;
}
.em-code .sk { color: var(--accent-2); font-weight: 500; }   /* keyword */
.em-code .sf { color: oklch(55% 0.13 310); }                  /* function */
.em-code .ss { color: oklch(52% 0.12 150); }                  /* string */
.em-code .sn { color: oklch(55% 0.15 60); }                   /* number */
.em-code .sc { color: var(--muted); font-style: italic; }     /* comment */
.caret {
  display: inline-block;
  width: 1.5px; height: 1.05em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: caret-blink 1.1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.ac-pop {
  position: absolute;
  left: 196px; bottom: 22px;
  width: min(320px, 70%);
  background: var(--paper);
  border: 0.5px solid var(--hair);
  border-radius: 9px;
  box-shadow: 0 16px 40px -10px rgba(15,17,21,0.30), 0 4px 12px -4px rgba(15,17,21,0.12);
  font-family: var(--sans);
  overflow: hidden;
}
.ac-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
}
.ac-row.on { background: color-mix(in oklab, var(--accent) 13%, transparent); }
.ac-row b { font-weight: 600; color: var(--accent-2); }
.ac-type {
  margin-left: auto;
  font-family: var(--mono); font-size: 10px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em;
}
.ac-kind {
  flex: none;
  width: 16px; height: 16px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 9.5px; font-weight: 600;
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  color: var(--accent-2);
}
.ac-kind.t { background: color-mix(in oklab, var(--ok) 16%, transparent); color: oklch(45% 0.12 155); }
.ac-foot {
  padding: 6px 12px;
  border-top: 0.5px solid var(--hair);
  font-family: var(--mono); font-size: 10px;
  color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase;
}
@media (max-width: 560px) {
  .ac-pop { left: 22px; right: 22px; width: auto; }
}

/* ─── Review changes mock ───────────────────────────────────────────────── */
.review-mock {
  border: 0.5px solid var(--hair);
  border-radius: var(--rad);
  background: var(--paper);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(0,0,0,0.02),
    0 24px 48px -16px color-mix(in oklab, var(--accent) 22%, transparent),
    0 8px 24px -8px rgba(15,17,21,0.10);
}
.rv-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 14px 18px;
  border-bottom: 0.5px solid var(--hair);
}
.rv-head h4 {
  margin: 0;
  font-family: var(--serif); font-weight: 400;
  font-size: 19px; letter-spacing: -0.01em; color: var(--ink);
}
.rv-count {
  font-family: var(--mono); font-size: 10.5px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
}
.rv-sql {
  margin: 0;
  padding: 16px 18px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75;
  overflow-x: auto;
  background: color-mix(in oklab, var(--bg-2) 45%, var(--paper));
}
.rv-sql .ln { display: block; white-space: pre; }
.rv-sql .sk { color: var(--accent-2); font-weight: 500; }
.rv-sql .ss { color: oklch(52% 0.12 150); }
.rv-sql .sn { color: oklch(55% 0.15 60); }
.rv-sql .del .sk { color: oklch(55% 0.19 25); }
.rv-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 18px;
  border-top: 0.5px solid var(--hair);
  font-family: var(--sans);
}
.rv-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500;
  border: 0.5px solid var(--hair); color: var(--ink-2);
}
.rv-btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.rv-btn .kbd { font-size: 10px; border-color: rgba(255,255,255,0.25); background: transparent; color: inherit; }

/* ─── Feature index ─────────────────────────────────────────────────────── */
.tools-controls {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.search {
  position: relative;
  flex: 1; min-width: 280px; max-width: 480px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  background: var(--paper);
  border: 0.5px solid var(--hair);
  border-radius: 999px;
  height: 44px;
  color: var(--muted);
}
.search:focus-within { border-color: var(--accent); color: var(--ink); }
.search input {
  flex: 1; background: transparent; border: 0; outline: 0;
  font-family: var(--sans); font-size: 14.5px; color: var(--ink);
  height: 100%;
}
.search input::placeholder { color: var(--muted); }
.search-clear {
  border: 0; background: transparent; color: var(--muted);
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  font-size: 14px;
}
.search-clear:hover { background: var(--bg-2); color: var(--ink); }

.cats { display: flex; flex-wrap: wrap; gap: 6px; }
.cat {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  border: 0.5px solid var(--hair);
  color: var(--ink-2);
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.cat:hover { border-color: rgba(26,24,21,0.22); background: var(--bg-2); }
.cat.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cat.on .cat-n { color: rgba(250, 247, 240, 0.55); }
.cat-n { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 0.5px solid var(--hair);
  border-left: 0.5px solid var(--hair);
}
@media (max-width: 960px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tools-grid { grid-template-columns: 1fr; } }

.tool {
  display: flex; flex-direction: column;
  padding: 26px 26px 22px;
  border-right: 0.5px solid var(--hair);
  border-bottom: 0.5px solid var(--hair);
  color: var(--ink);
  background: transparent;
  position: relative;
  min-height: 196px;
  transition: background .2s;
}
.tool:hover { background: var(--paper); }
.tool::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -0.5px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .25s cubic-bezier(.2,.7,.3,1);
}
.tool:hover::after { transform: scaleX(1); }
.tool-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px;
}
.tool-n {
  font-family: var(--mono); font-size: 11px;
  color: var(--accent); letter-spacing: 0.04em;
}
.tool-cat {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
}
.tool-name {
  font-family: var(--serif); font-weight: 400;
  font-size: 24px; line-height: 1.12; letter-spacing: -0.015em;
  margin: 0 0 10px;
  color: var(--ink);
}
.tool:hover .tool-name { color: var(--accent-2); }
.tool-blurb {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px; color: var(--muted);
  line-height: 1.5;
  text-wrap: pretty;
}
.tool-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
}
.tool-tag::before { content: "● "; color: var(--accent); margin-right: 2px; }
.tools-empty {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
  border-right: 0.5px solid var(--hair);
  border-bottom: 0.5px solid var(--hair);
}
.tools-empty p { margin: 0 0 14px; font-family: var(--serif); font-size: 22px; color: var(--ink); }

/* ─── Changelog (homepage condensed) ────────────────────────────────────── */
.changes {
  list-style: none; margin: 0; padding: 0;
  border-top: 0.5px solid var(--hair);
}
.changes li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 30px;
  padding: 28px 0;
  border-bottom: 0.5px solid var(--hair);
}
.ver {
  font-family: var(--serif); font-size: 36px;
  color: var(--accent); letter-spacing: -0.02em; line-height: 1;
}
.changes h4 {
  font-family: var(--serif); font-weight: 400; font-size: 24px;
  letter-spacing: -0.015em; margin: 0 0 6px; color: var(--ink);
}
.changes p { margin: 0 0 8px; font-family: var(--sans); font-size: 14.5px; color: var(--ink-2); line-height: 1.55; max-width: 720px; }
.when { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
@media (max-width: 720px) {
  .changes li { grid-template-columns: 1fr; gap: 8px; }
}

/* ─── Download ──────────────────────────────────────────────────────────── */
.dl-card {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px;
  padding: 60px;
  border-radius: 24px;
  background: var(--paper);
  border: 0.5px solid var(--hair);
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(26, 24, 21, 0.15);
}
.dl-card::before {
  content: "";
  position: absolute; right: -120px; top: -120px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 22%, transparent), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}
.dl-h {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.0; letter-spacing: -0.025em; margin: 16px 0 18px;
  text-wrap: balance; color: var(--ink);
}
.dl-h em { font-style: italic; color: var(--accent); }
.dl-p { font-family: var(--sans); font-size: 15.5px; color: var(--muted); margin: 0 0 28px; max-width: 460px; line-height: 1.6; }
.dl-actions { display: flex; flex-wrap: wrap; gap: 14px; position: relative; }
.dl-right { display: flex; flex-direction: column; gap: 24px; position: relative; }
.dl-spec {
  display: grid; grid-template-columns: 1fr 1.4fr;
  border-top: 0.5px solid var(--hair);
  font-size: 13.5px;
}
.dl-spec span {
  padding: 14px 0;
  border-bottom: 0.5px solid var(--hair);
  font-family: var(--sans);
}
.spec-k { font-family: var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 11.5px; }
.spec-v { color: var(--ink); }
.spec-v a { color: var(--accent); text-decoration: none; }
.spec-v a:hover { text-decoration: underline; }
.dl-built {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.dl-built strong { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 18px; color: var(--accent); text-transform: none; letter-spacing: 0; }
@media (max-width: 960px) {
  .dl-card { grid-template-columns: 1fr; gap: 36px; padding: 36px; }
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
.foot {
  max-width: 1280px; margin: 60px auto 0;
  padding: 48px 40px 36px;
  border-top: 0.5px solid var(--hair);
  position: relative; z-index: 1;
}
.foot-inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 40px;
}
.foot-brand p { margin: 12px 0 0; font-family: var(--sans); font-size: 13.5px; color: var(--muted); }
.foot-cols {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
.foot-cols h5 {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin: 0 0 14px;
}
.foot-cols a {
  display: block;
  color: var(--ink-2); text-decoration: none;
  font-family: var(--sans); font-size: 14px;
  padding: 4px 0;
}
.foot-cols a:hover { color: var(--accent); }
.foot-rule { height: 0.5px; background: var(--hair); margin: 32px 0 16px; }
.foot-bottom {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
@media (max-width: 720px) {
  .foot-inner { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: repeat(2, 1fr); }
  .foot { padding: 36px 22px 24px; }
}

/* ─── Reveal ────────────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .meta-dot, .caret { animation: none; }
}

/* ─── Page header (sub-pages) ───────────────────────────────────────────── */
.page-head {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 40px 40px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  align-items: end;
}
.page-eyebrow {
  font-family: var(--mono); font-size: 12px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
  padding-bottom: 10px;
}
.page-h {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.98; letter-spacing: -0.025em;
  margin: 0; color: var(--ink); text-wrap: balance;
}
.page-h em { font-style: italic; color: var(--accent); }
.page-sub {
  max-width: 1280px; margin: 0 auto;
  padding: 0 40px 32px;
  display: grid; grid-template-columns: 220px 1fr; gap: 30px;
}
.page-sub p {
  margin: 0; max-width: 640px;
  color: var(--ink-2);
  font-size: clamp(15px, 1.3vw, 18px); line-height: 1.6;
}
.page-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 40px 80px;
}

/* ─── Changelog (full page) ─────────────────────────────────────────────── */
.cl-list { display: flex; flex-direction: column; }
.cl-entry {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  padding: 36px 0 40px;
  border-top: 0.5px solid var(--hair);
}
.cl-meta {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 12px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
}
.cl-version {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 30px; line-height: 1; letter-spacing: -0.01em;
  color: var(--accent); text-transform: none;
}
.cl-tag {
  display: inline-flex; align-items: center;
  width: fit-content;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; letter-spacing: 0.08em;
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  color: var(--accent);
  border: 0.5px solid color-mix(in oklab, var(--accent) 30%, transparent);
  margin-top: 6px;
}
.cl-tag.muted {
  background: var(--bg-2);
  color: var(--muted);
  border-color: var(--hair);
}
.cl-body h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.18; letter-spacing: -0.015em;
  margin: 0 0 18px; color: var(--ink); text-wrap: balance;
}
.cl-body h4 {
  font-family: var(--sans); font-weight: 500;
  font-size: 15px; color: var(--ink);
  margin: 18px 0 6px;
  letter-spacing: -0.005em;
}
.cl-body p {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 15px; line-height: 1.6;
  max-width: 720px;
}
.cl-body ul {
  margin: 4px 0 12px; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.cl-body li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 14.5px; line-height: 1.55;
  max-width: 720px;
}
.cl-body li::before {
  content: "";
  position: absolute;
  left: 4px; top: 9px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.6;
}
.cl-body li strong { color: var(--ink); font-weight: 500; }
.cl-body code {
  font-family: var(--mono); font-size: 0.9em;
  background: var(--bg-2);
  border: 0.5px solid var(--hair);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--ink);
}
.cl-body a { color: var(--accent); }
.cl-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 0.5px dashed var(--hair);
}
.cl-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.cl-section-eyebrow {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;
  margin: 0 0 10px;
}

/* ─── Prose page (privacy) ─────────────────────────────────────────────── */
.prose {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  gap: 40px;
  padding-top: 12px;
}
.prose-aside {
  position: sticky; top: 84px;
  align-self: start;
  font-family: var(--mono); font-size: 12px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
  display: flex; flex-direction: column; gap: 6px;
}
.prose-aside a {
  color: var(--ink-2); text-decoration: none;
  padding: 4px 0;
  text-transform: none; letter-spacing: 0;
  font-family: var(--sans); font-size: 13.5px;
}
.prose-aside a:hover { color: var(--accent); }
.prose-aside .aside-h { margin-bottom: 4px; }
.prose-content h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15; letter-spacing: -0.02em;
  margin: 36px 0 14px;
  scroll-margin-top: 84px;
  color: var(--ink); text-wrap: balance;
}
.prose-content h2:first-child { margin-top: 0; }
.prose-content h3 {
  font-family: var(--sans); font-weight: 500;
  font-size: 17px; letter-spacing: -0.005em;
  color: var(--ink);
  margin: 24px 0 8px;
}
.prose-content p {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 15.5px; line-height: 1.65;
  text-wrap: pretty;
}
.prose-content p strong { color: var(--ink); font-weight: 500; }
.prose-content ul {
  margin: 6px 0 16px; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.prose-content li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 15px; line-height: 1.6;
}
.prose-content li::before {
  content: "";
  position: absolute;
  left: 4px; top: 9px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.55;
}
.prose-content li strong { color: var(--ink); font-weight: 500; }
.prose-content code {
  font-family: var(--mono); font-size: 0.9em;
  background: var(--bg-2);
  border: 0.5px solid var(--hair);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--ink);
}
.prose-content a {
  color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 0.5px;
}
.prose-callout {
  margin: 16px 0 22px;
  padding: 16px 20px;
  border: 0.5px solid var(--hair);
  border-left: 2px solid var(--accent);
  border-radius: 6px;
  background: color-mix(in oklab, var(--accent) 5%, var(--bg));
}
.prose-callout p { margin: 0; font-size: 15px; }
.prose-rule {
  border: 0;
  height: 0.5px;
  background: var(--hair);
  margin: 28px 0;
}

@media (max-width: 880px) {
  .page-head, .page-sub { grid-template-columns: 1fr; padding: 48px 22px 24px; gap: 12px; }
  .page-sub { padding-top: 0; }
  .page-body { padding: 12px 22px 60px; }
  .cl-entry { grid-template-columns: 1fr; gap: 14px; padding: 28px 0; }
  .prose { grid-template-columns: 1fr; gap: 18px; }
  .prose-aside { position: static; }
}
