/* ---------- Tokens ---------- */
:root {
  --bg: oklch(0.985 0.003 240);
  --bg-soft: oklch(0.97 0.004 240);
  --surface: #ffffff;
  --border: oklch(0.9 0.005 240);
  --border-strong: oklch(0.82 0.008 240);
  --text: oklch(0.2 0.012 240);
  --text-muted: oklch(0.45 0.012 240);
  --text-dim: oklch(0.6 0.01 240);

  --accent: oklch(0.55 0.13 195);
  --accent-hover: oklch(0.48 0.14 195);
  --accent-soft: oklch(0.96 0.03 195);
  --accent-border: oklch(0.85 0.06 195);
  --accent-text: oklch(0.4 0.13 195);

  --row-pad: 12px;

  --radius-sm: 2px;
  --radius: 4px;
  --radius-lg: 6px;

  --shadow-sm: 0 1px 0 rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(15, 23, 42, 0.03);

  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    sans-serif;
  --font-mono:
    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

button {
  font-family: inherit;
}
a {
  color: var(--accent-text);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.mono,
code,
.cell-id,
.cell-date,
.breadcrumb,
.info-list dd.mono,
.record-meta {
  font-family: var(--font-mono);
  font-feature-settings: "calt" 0;
}

/* ---------- Layout shell ---------- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  flex-shrink: 0;
}
.topbar-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: auto;
}
.brand {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}
.brand-name {
  font-feature-settings: "ss01";
}

/* ---------- Doc / FAQ / Imprint screens ---------- */
.screen-doc {
  padding-top: 32px;
  max-width: 720px;
  flex: 1;
}
.doc-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  margin: 16px 0 12px;
}
.doc-title {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  text-wrap: balance;
}
.doc-lede {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0 0 32px;
  max-width: 60ch;
  text-wrap: pretty;
}
.doc-section {
  margin-bottom: 28px;
}
.doc-h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.005em;
}
.doc-p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 8px;
  line-height: 1.6;
  text-wrap: pretty;
}
.doc-dl {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.doc-dl > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  font-size: 13px;
}
.doc-dl dt {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
  font-family: var(--font-mono);
  padding-top: 2px;
}
.doc-dl dd {
  margin: 0;
  color: var(--text);
}

/* FAQ — flat layout, no accordion */
.faq {
  margin-top: 8px;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}
.faq-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: 24px 4px;
  border-bottom: 1px solid var(--border);
}
.faq-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  padding-top: 4px;
}
.faq-q {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.faq-a {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 62ch;
  text-wrap: pretty;
}
.faq-a code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--bg-soft);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text);
  border: 1px solid var(--border);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  text-align: center;
}
.footer-brand {
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  margin-right: 8px;
}
.footer-sep {
  color: var(--border-strong);
  font-size: 11px;
  margin: 0 4px;
}
.footer-links {
  display: flex;
  gap: 2px;
  align-items: center;
}
.footer-links button,
.footer-links a {
  background: none;
  border: 0;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition:
    color 0.12s ease,
    background 0.12s ease;
}
.footer-links button:hover,
.footer-links a:hover {
  color: var(--text);
  background: var(--bg-soft);
}

/* ---------- Loading ---------- */
.loading-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.loading-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  animation: loading-spin 0.8s linear infinite;
  flex-shrink: 0;
}
.loading-spinner--inline {
  width: 13px;
  height: 13px;
  border-width: 2px;
  margin-right: 8px;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Error screen ---------- */
.error-screen {
  position: relative;
  border: 1px solid oklch(0.85 0.08 25);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, oklch(0.98 0.025 25) 0%, var(--surface) 140px),
    var(--surface);
  padding: 32px;
  margin-top: 24px;
  overflow: hidden;
}
.error-screen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, oklch(0.62 0.2 25), oklch(0.7 0.18 35));
}
.error-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid oklch(0.92 0.04 25);
  margin-bottom: 20px;
}
.error-icon {
  width: 44px;
  height: 44px;
  border: 1px solid oklch(0.75 0.14 25);
  background: oklch(0.62 0.2 25);
  color: white;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 22px;
  border-radius: var(--radius);
  flex-shrink: 0;
  box-shadow:
    0 1px 3px oklch(0.62 0.2 25 / 0.25),
    inset 0 1px 0 oklch(1 0 0 / 0.15);
}
.error-title-wrap {
  flex: 1;
}
.error-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: oklch(0.5 0.18 25);
  margin-bottom: 6px;
  font-weight: 600;
}
.error-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.015em;
  color: oklch(0.3 0.1 25);
}
.error-summary {
  font-size: 13.5px;
  color: var(--text-muted);
  text-wrap: pretty;
  max-width: 56ch;
  line-height: 1.55;
}
.error-trace {
  background: oklch(0.2 0.04 25);
  border: 1px solid oklch(0.32 0.08 25);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: oklch(0.88 0.02 25);
  margin-bottom: 20px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.05);
}
.error-trace .et-key {
  color: oklch(0.6 0.06 25);
}
.error-trace .et-val {
  color: oklch(0.85 0.1 60);
}
.error-trace .et-status {
  color: oklch(0.78 0.18 25);
  font-weight: 600;
}
.error-checks {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}
.error-check {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}
.error-check.is-fail-row {
  background: oklch(0.98 0.02 25);
  border-color: oklch(0.88 0.06 25);
}
.error-check-icon {
  font-family: var(--font-mono);
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
}
.error-check-icon.is-fail {
  color: oklch(0.55 0.2 25);
}
.error-check-icon.is-warn {
  color: oklch(0.6 0.15 75);
}
.error-check-icon.is-ok {
  color: oklch(0.55 0.15 145);
}
.error-check-text strong {
  font-weight: 600;
  color: var(--text);
}
.error-check-text small {
  display: block;
  color: var(--text-muted);
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.5;
}

.error-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.btn-danger {
  background: oklch(0.62 0.2 25);
  border-color: oklch(0.62 0.2 25);
  color: white;
}
.btn-danger:hover {
  background: oklch(0.55 0.2 25);
  border-color: oklch(0.55 0.2 25);
}

/* topbar search */
.tb-search {
  flex: 1;
  min-width: 0;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  height: 34px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    border-color 0.12s ease,
    background 0.12s ease,
    box-shadow 0.15s ease;
}
.tb-search:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}
.tb-search:focus-within {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.tb-search-icon {
  color: var(--text-dim);
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1;
}
.tb-search-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12.5px;
  color: var(--text);
  min-width: 0;
  padding: 0;
  font-family: var(--font-mono);
}
.tb-search-input::placeholder {
  color: var(--text-dim);
}
.tb-search-go {
  border: 0;
  background: var(--accent);
  color: white;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.tb-search-go:hover {
  background: var(--accent-hover);
}

.tb-new {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  padding: 5px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.12s ease;
}
.tb-new:hover {
  background: var(--bg-soft);
  border-color: var(--border-strong);
}
.tb-new-plus {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--accent-text);
  font-size: 14px;
  line-height: 1;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.topbar-meta .tb-new {
  margin-right: 8px;
}
.topbar-meta a.topbar-link,
.topbar-meta button.topbar-link {
  background: none;
  border: 0;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition:
    color 0.12s ease,
    background 0.12s ease;
}
.topbar-meta a.topbar-link:hover,
.topbar-meta button.topbar-link:hover {
  color: var(--text);
  background: var(--bg-soft);
}
.topbar-meta .topbar-link.is-active {
  color: var(--text);
  background: var(--bg-soft);
  font-weight: 500;
}

.brand-logo {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-name-dim {
  color: var(--text-dim);
  font-weight: 400;
  margin-left: 4px;
}
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: var(--bg-soft);
}

.screen {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  width: 100%;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius);
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    transform 0.04s ease;
}
.btn:hover {
  background: var(--bg-soft);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-lg {
  padding: 14px 20px;
  font-size: 15px;
}
.btn-arrow {
  display: inline-block;
  transition: transform 0.15s ease;
}
.btn:hover .btn-arrow {
  transform: translateX(2px);
}

.btn-ghost {
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 13px;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.btn-ghost:hover {
  color: var(--text);
  background: var(--bg-soft);
}
.btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- Screen 1 — Start ---------- */
.screen-start {
  padding-top: 80px;
}
.hero {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  margin-bottom: 24px;
}
.hero-title {
  font-size: 48px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  text-wrap: balance;
}
.hero-title em {
  font-style: italic;
  font-family: "Newsreader", "Source Serif Pro", Georgia, serif;
  font-weight: 400;
  color: var(--accent-text);
}
.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 48px;
  max-width: 540px;
  text-wrap: pretty;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}
.field-hint {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 4px;
}
.field-hint code {
  font-size: 11.5px;
  padding: 1px 5px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.search-row {
  display: flex;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--radius);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  overflow: hidden;
}
.search-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 18px 20px;
  font-size: 16px;
  font-family: var(--font-mono);
  color: var(--text);
  min-width: 0;
}
.search-input::placeholder {
  color: var(--text-dim);
}
.search-row .btn-primary {
  border-radius: 0;
  border: 0;
  border-left: 1px solid var(--accent-hover);
  padding: 0 24px;
}

.examples {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.examples-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-soft);
}
.chip-broken {
  color: oklch(0.55 0.1 25);
  border-style: dashed;
}
.chip-broken:hover {
  color: oklch(0.45 0.15 25);
  border-color: oklch(0.75 0.1 25);
}
.chip-broken-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: oklch(0.65 0.18 25);
  margin-right: 8px;
  vertical-align: middle;
}

.hero-feat {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.feat {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.feat-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  padding-top: 2px;
}
.feat-h {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.feat-p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}
.feat-p code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--bg-soft);
  padding: 1px 4px;
  border-radius: 2px;
}

/* ---------- Screen 2 — Explore ---------- */
.explore-grid {
  display: grid;
  grid-template-columns: 30% 1fr;
  gap: 32px;
  align-items: start;
}

.info-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 80px;
}
.info-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.info-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.info-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.status-dot {
  width: 7px;
  height: 7px;
  background: oklch(0.65 0.17 145);
  border-radius: 50%;
  box-shadow: 0 0 0 3px oklch(0.65 0.17 145 / 0.18);
}
.info-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  text-wrap: balance;
}
.info-url {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  word-break: break-all;
  padding: 6px 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}

.info-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.info-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
}
.info-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.info-row dt {
  color: var(--text-dim);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}
.info-row dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  word-break: break-all;
}
.info-row dd.info-explain {
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
  word-break: normal;
}
.info-row dd.info-explain code {
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 1px 4px;
  border-radius: 2px;
}

.info-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.count {
  padding: 0 4px;
}
.count + .count {
  border-left: 1px solid var(--border);
}
.count-num {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-family: var(--font-mono);
}
.count-lbl {
  font-size: 10.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Filters */
.explore-main {
  min-width: 0;
}
.filters {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.filter-row:last-child {
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
}
.filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.filter-action {
  display: flex;
  align-items: end;
}
.lbl {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}
.lbl-opt {
  color: var(--text-dim);
  font-weight: 400;
  font-family: var(--font-mono);
  font-size: 11px;
  margin-left: 4px;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
input[type="date"].select {
  background-image: none;
  padding-right: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Combobox */
.combobox {
  position: relative;
}
.combo-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
}
.combo-trigger:hover {
  background: var(--bg-soft);
}
.combobox.is-open .combo-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.combo-spec {
  font-size: 12px;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 2px;
  color: var(--text);
  flex-shrink: 0;
}
.combo-name {
  color: var(--text-muted);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.combo-caret {
  color: var(--text-dim);
  font-size: 10px;
  flex-shrink: 0;
}

.combo-pop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.1),
    0 2px 6px rgba(15, 23, 42, 0.04);
  z-index: 20;
  overflow: hidden;
}
.combo-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.combo-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
}
.combo-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 2px;
}
.combo-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 4px 0;
}
.combo-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font-size: 12.5px;
}
.combo-item:hover {
  background: var(--bg-soft);
}
.combo-item.is-active {
  background: var(--accent-soft);
}
.combo-item-spec {
  font-size: 11.5px;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 110px;
}
.combo-item-name {
  color: var(--text);
}
.combo-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12.5px;
}

/* Results */
.results {
}
.results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.results-caption {
  font-size: 12.5px;
  color: var(--text-muted);
}
.results-caption strong {
  color: var(--text);
  font-weight: 600;
}
.results-sep {
  margin: 0 8px;
  color: var(--border-strong);
}
.results-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.results-actions {
  display: flex;
  gap: 4px;
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 500;
  padding: 10px var(--row-pad);
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  font-family: var(--font-mono);
}
.table td {
  padding: var(--row-pad) var(--row-pad);
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  vertical-align: middle;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table tbody tr {
  cursor: pointer;
  transition: background 0.08s ease;
}
.table tbody tr.row-hover {
  background: var(--accent-soft);
}
.cell-id-text {
  color: var(--text);
}
.cell-date {
  color: var(--text-muted);
  white-space: nowrap;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid;
}
.badge-deleted {
  color: oklch(0.45 0.15 25);
  border-color: oklch(0.85 0.06 25);
  background: oklch(0.97 0.02 25);
}
.badge-empty {
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.skeleton {
  display: inline-block;
  height: 10px;
  background: linear-gradient(
    90deg,
    var(--bg-soft),
    var(--border),
    var(--bg-soft)
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 2px;
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.empty {
  padding: 40px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.pager-info {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}

/* ---------- Screen 3 — Record ---------- */
.screen-record {
  padding-top: 32px;
}
.back-link {
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}
.back-link:hover {
  color: var(--text);
}
.back-arrow {
  transition: transform 0.15s ease;
  display: inline-block;
}
.back-link:hover .back-arrow {
  transform: translateX(-2px);
}

.breadcrumb {
  font-size: 12px;
  color: var(--text-dim);
  word-break: break-all;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.bc-base {
  color: var(--text-muted);
}
.bc-sep {
  margin: 0 8px;
  color: var(--border-strong);
}
.bc-cur {
  color: var(--text);
  font-weight: 500;
}

.record-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.record-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  margin-bottom: 8px;
}
.record-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  text-wrap: balance;
}
.record-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--text-muted);
}
.record-url {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-size: 11.5px;
  color: var(--text-muted);
  word-break: break-all;
}
.record-url-label {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.record-url a {
  color: var(--accent-text);
  text-decoration: none;
}
.record-url a:hover {
  text-decoration: underline;
}
.record-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}
.record-prefix-switcher {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}
.record-prefix-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding-left: 2px;
}
.record-prefix-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background-color: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 8px 34px 8px 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}
.record-prefix-select:hover {
  background-color: var(--bg-soft);
}
.record-prefix-select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.code-block {
  border: 1px solid #2a3340;
  border-radius: var(--radius);
  background: #0f1620;
  overflow: hidden;
  margin-bottom: 24px;
}
.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #161e2a;
  border-bottom: 1px solid #2a3340;
}
.code-tabs {
  display: flex;
  gap: 2px;
}
.code-tab {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 2px;
  color: #8b96a8;
  cursor: pointer;
}
.code-tab.is-active {
  background: #232d3d;
  color: #d8dee9;
}
.code-meta {
  font-size: 11px;
  color: #6b7585;
}

.code {
  margin: 0;
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: #c8d0dc;
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}
.x-decl {
  color: #6b7585;
}
.x-com {
  color: #6b7585;
  font-style: italic;
}
.x-tag {
  color: oklch(0.78 0.13 200);
} /* teal-ish */
.x-attr {
  color: oklch(0.8 0.12 80);
} /* warm */
.x-val {
  color: oklch(0.78 0.1 145);
} /* greenish */
.x-punct {
  color: #6b7585;
}

.cmd-block {
  margin-bottom: 8px;
}
.cmd-block--sidebar {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.cmd-block--sidebar .cmd-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-weight: 400;
}
.cmd-block--sidebar .cmd-row {
  border-radius: var(--radius-sm);
}
.cmd-block--sidebar .cmd-line {
  padding: 10px 12px;
  font-size: 11.5px;
  white-space: pre-wrap;
  word-break: break-all;
}
.cmd-block--sidebar .cmd-line .cmd-text {
  white-space: pre-wrap;
  word-break: break-all;
}
.cmd-block--sidebar .cmd-hint {
  font-size: 10.5px;
  margin-top: 6px;
  padding: 0;
}
.cmd-copy-mini {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 2px;
  cursor: pointer;
}
.cmd-copy-mini:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-soft);
}

/* explore variant — sits between filters and results, full-width */
.cmd-block--explore {
  margin: 0 0 24px;
}
.cmd-block--explore .cmd-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-weight: 400;
}
.cmd-block--explore .cmd-row {
  border-radius: var(--radius);
}
.cmd-block--explore .cmd-line {
  padding: 12px 14px;
  font-size: 12.5px;
  white-space: nowrap;
  overflow-x: auto;
}
.cmd-block--explore .cmd-hint {
  font-size: 11px;
  margin-top: 6px;
  padding: 0 4px;
}

/* record variant — full-width, larger */
.record-cli {
  margin-bottom: 8px;
}
.record-cli > .cmd-label {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 8px;
}
.cmd-block--record {
  margin: 0;
  padding: 0;
  border: 0;
}
.cmd-block--record .cmd-label {
  display: none;
}
.cmd-block--record .cmd-line {
  padding: 14px 16px;
  font-size: 13px;
  white-space: nowrap;
}
.cmd-block--record .cmd-row {
  border-radius: var(--radius);
}
.cmd-block--record .cmd-hint {
  font-size: 11.5px;
  margin-top: 8px;
  padding: 0 4px;
}
.record-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  color: #d8dee9;
  text-decoration: none;
}
.record-link:hover {
  text-decoration: underline;
}
.cmd-label {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.cmd-row {
  display: flex;
  align-items: stretch;
  border: 1px solid #2a3340;
  background: #0f1620;
  border-radius: var(--radius);
  overflow: hidden;
}
.cmd-line {
  flex: 1;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #d8dee9;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  white-space: nowrap;
}
.cmd-prompt {
  color: oklch(0.78 0.13 200);
  user-select: none;
}
.cmd-text {
  color: #d8dee9;
}
.btn-copy {
  background: #161e2a;
  border: 0;
  border-left: 1px solid #2a3340;
  color: #d8dee9;
  font-size: 12.5px;
  padding: 0 18px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.btn-copy:hover {
  background: #1d2735;
}
.cmd-hint {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 8px;
  padding: 0 4px;
}
.cmd-hint code {
  font-size: 11px;
  background: var(--bg-soft);
  padding: 1px 4px;
  border: 1px solid var(--border);
  border-radius: 2px;
}
.cmd-hint a {
  color: var(--accent-text);
}

.cmd-hint-tooltip {
  position: relative;
  display: inline-block;
}
.cmd-hint-tooltip .tooltip-text {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f1620;
  color: #d8dee9;
  font-size: 11px;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: var(--radius);
  border: 1px solid #2a3340;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 10;
}
.cmd-hint-tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #2a3340;
}
.cmd-hint-tooltip:hover .tooltip-text {
  display: block;
}

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .explore-grid {
    grid-template-columns: 1fr;
  }
  .info-card {
    position: static;
  }
  .filter-row,
  .filter-row:last-child {
    grid-template-columns: 1fr;
  }
  .hero-feat {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .hero-title {
    font-size: 36px;
  }
  .record-head {
    flex-direction: column;
  }
  .tb-search {
    display: none;
  }
  .topbar-meta .topbar-link {
    display: none;
  }
}
