/* WA Bridges - design tokens (mood-pixels palette) */

:root {
  /* ── core palette: warm dark ── */
  --background: oklch(0.105 0.007 75); /* #1a1814 */
  --foreground: oklch(0.95 0.007 85); /* warm near-white */
  --card: oklch(0.13 0.007 75);
  --card-foreground: oklch(0.95 0.007 85);
  --popover: oklch(0.13 0.007 75);
  --popover-foreground: oklch(0.95 0.007 85);
  --primary: oklch(0.95 0.007 85);
  --primary-foreground: oklch(0.105 0.007 75);
  --secondary: oklch(0.185 0.007 75);
  --secondary-foreground: oklch(0.95 0.007 85);
  --muted: oklch(0.185 0.007 75);
  --muted-foreground: oklch(0.56 0.006 80);
  --accent: oklch(0.185 0.007 75);
  --accent-foreground: oklch(0.95 0.007 85);
  --destructive: oklch(0.62 0.22 22);
  --destructive-bg: oklch(0.62 0.22 22 / 0.1);
  --destructive-border: oklch(0.62 0.22 22 / 0.25);
  --border: oklch(0.95 0.007 85 / 0.08);
  --border-strong: oklch(0.95 0.007 85 / 0.13);
  --input: oklch(0.185 0.007 75);
  --ring: oklch(0.95 0.007 85 / 0.25);

  /* ── semantic colors ── */
  --success: oklch(0.69 0.17 142);
  --success-bg: oklch(0.69 0.17 142 / 0.1);
  --success-border: oklch(0.69 0.17 142 / 0.2);
  --warning: oklch(0.8 0.16 86);
  --warning-bg: oklch(0.8 0.16 86 / 0.1);
  --warning-border: oklch(0.8 0.16 86 / 0.2);
  --info: oklch(0.62 0.19 255);
  --info-bg: oklch(0.62 0.19 255 / 0.1);
  --info-border: oklch(0.62 0.19 255 / 0.2);
  --purple: oklch(0.67 0.22 304);
  --purple-bg: oklch(0.67 0.22 304 / 0.1);
  --purple-border: oklch(0.67 0.22 304 / 0.2);
  --dim: oklch(0.38 0.006 75);

  /* ── radius ── */
  --radius: 0.5rem; /* 8px default */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* ── layout ── */
  --topbar-height: 52px;
  --sidebar-width: 220px;

  /* ── code / logs ── */
  --code-bg: oklch(0.08 0.006 75);
  --code-text: oklch(0.75 0.07 145);
  --log-text: oklch(0.62 0.08 145);
  --code-label-bg: oklch(0.95 0.007 85 / 0.03);

  /* ── misc ── */
  --row-hover: oklch(0.95 0.007 85 / 0.025);
  --surface-tint: oklch(0.95 0.007 85 / 0.015);
  --sidebar-shadow: oklch(0 0 0 / 0.5);

  /* ── mood-pixels: core ── */
  --bg: #1a1814;
  --bg-rgb: 26, 24, 20;
  --ink: #f5f2eb;
  --ink-rgb: 245, 242, 235;
  --error: #e05c4f;

  /* ── mood-pixels: tinted surfaces ── */
  --surface-1: rgba(var(--ink-rgb), 0.03);
  --surface-2: rgba(var(--ink-rgb), 0.04);
  --surface-3: rgba(var(--ink-rgb), 0.06);
  --surface-4: rgba(var(--ink-rgb), 0.08);
  --surface-5: rgba(var(--ink-rgb), 0.12);
  --line: rgba(var(--ink-rgb), 0.08);
  --hairline: rgba(var(--ink-rgb), 0.06);

  /* ── mood-pixels: text tone ── */
  --tone-strong: var(--ink);
  --tone: rgba(var(--ink-rgb), 0.65);
  --tone-muted: rgba(var(--ink-rgb), 0.5);
  --tone-faint: rgba(var(--ink-rgb), 0.35);

  /* ── mood-pixels: typography ── */
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;

  /* ── mood-pixels: shadows ── */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 1px 12px rgba(0, 0, 0, 0.2);
  --shadow-dialog: 0 20px 40px rgba(0, 0, 0, 0.4);
  --shadow-sheet: 0 -8px 30px rgba(0, 0, 0, 0.3);

  /* ── mood-pixels: motion ── */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 0.15s;
  --dur: 0.22s;
  --dur-slow: 0.65s;

  /* ── mood-pixels: spacing ── */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
}

html.light {
  /* ── core palette: warm light ── */
  --background: oklch(0.94 0.012 88); /* #f4f1ea warm paper */
  --foreground: oklch(0.115 0.01 72); /* #1c1a17 near-black */
  --card: oklch(0.97 0.01 88);
  --card-foreground: oklch(0.115 0.01 72);
  --popover: oklch(0.97 0.01 88);
  --popover-foreground: oklch(0.115 0.01 72);
  --primary: oklch(0.115 0.01 72);
  --primary-foreground: oklch(0.96 0.01 88);
  --secondary: oklch(0.89 0.01 82);
  --secondary-foreground: oklch(0.115 0.01 72);
  --muted: oklch(0.89 0.01 82);
  --muted-foreground: oklch(0.42 0.008 75);
  --accent: oklch(0.89 0.01 82);
  --accent-foreground: oklch(0.115 0.01 72);
  --destructive: oklch(0.55 0.22 22);
  --destructive-bg: oklch(0.55 0.22 22 / 0.1);
  --destructive-border: oklch(0.55 0.22 22 / 0.25);
  --border: oklch(0.115 0.01 72 / 0.08);
  --border-strong: oklch(0.115 0.01 72 / 0.14);
  --input: oklch(0.89 0.01 82);
  --ring: oklch(0.115 0.01 72 / 0.25);
  --dim: oklch(0.58 0.008 75);

  --success-bg: oklch(0.69 0.17 142 / 0.12);
  --success-border: oklch(0.69 0.17 142 / 0.25);
  --warning-bg: oklch(0.8 0.16 86 / 0.12);
  --warning-border: oklch(0.8 0.16 86 / 0.25);
  --info-bg: oklch(0.62 0.19 255 / 0.12);
  --info-border: oklch(0.62 0.19 255 / 0.25);

  --code-bg: oklch(0.9 0.01 80);
  --code-text: oklch(0.28 0.07 145);
  --log-text: oklch(0.33 0.1 145);
  --code-label-bg: oklch(0 0 0 / 0.03);

  --row-hover: oklch(0 0 0 / 0.02);
  --surface-tint: oklch(0 0 0 / 0.015);
  --sidebar-shadow: oklch(0 0 0 / 0.15);

  /* ── mood-pixels overrides ── */
  --bg: #f4f1ea;
  --bg-rgb: 244, 241, 234;
  --ink: #1c1a17;
  --ink-rgb: 28, 26, 23;
  --error: #c0392b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 1px 12px rgba(0, 0, 0, 0.08);
  --shadow-dialog: 0 20px 40px rgba(0, 0, 0, 0.18);
  --shadow-sheet: 0 -8px 30px rgba(0, 0, 0, 0.12);
}

/* ─────────────────────────────────────────
   KEYFRAMES
───────────────────────────────────────── */

@keyframes mood-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes mood-slide-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes mood-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─────────────────────────────────────────
   BASE
───────────────────────────────────────── */

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

body {
  font-family: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

a {
  color: inherit;
  text-decoration: none;
}
code {
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 12px;
}

/* ─────────────────────────────────────────
   TOPBAR
───────────────────────────────────────── */

.topbar {
  background: var(--background);
  border-bottom: 1px solid var(--hairline);
  height: var(--topbar-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar .landing-container,
.topbar .topbar-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 1px;
}
.brand-wa {
  font-size: 18px;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: -0.01em;
}
.brand-bridges {
  font-size: 18px;
  font-weight: 400;
  color: var(--muted-foreground);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-link {
  font-size: 13px;
  color: var(--muted-foreground);
  transition: color 0.15s;
}
.topbar-link:hover,
.topbar-link.active {
  color: var(--foreground);
}
.topbar-plan {
  font-size: 12px;
  color: var(--dim);
  font-family: ui-monospace, monospace;
}

/* ─────────────────────────────────────────
   SIDEBAR / APP SHELL
───────────────────────────────────────── */

.app-shell {
  display: flex;
  min-height: calc(100vh - var(--topbar-height));
}
.sidebar {
  width: var(--sidebar-width);
  border-right: 1px solid var(--hairline);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
  flex-shrink: 0;
}
.sidebar-nav {
  flex: 1;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  transition:
    background 0.12s,
    color 0.12s;
  cursor: pointer;
}
.sidebar-item:hover {
  background: var(--surface-3);
  color: var(--foreground);
}
.sidebar-item.active {
  background: var(--surface-4);
  color: var(--foreground);
}
.sidebar-item svg {
  flex-shrink: 0;
  opacity: 0.6;
}
.sidebar-item.active svg,
.sidebar-item:hover svg {
  opacity: 1;
}
.sidebar-bottom {
  padding: 12px 8px 8px;
  border-top: 1px solid var(--hairline);
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar-account {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius);
  transition: background 0.12s;
}
.sidebar-account:hover {
  background: var(--surface-3);
}
.sidebar-account.active {
  background: var(--surface-4);
}
.sidebar-account-link {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
}
.account-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--muted);
  border: 1px solid var(--border);
}
.account-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted-foreground);
  background: var(--secondary);
}
.account-info {
  flex: 1;
  min-width: 0;
}
.account-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-email {
  display: none;
}
.account-signout {
  color: var(--dim);
  transition: color 0.12s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
}
.account-signout:hover {
  color: var(--muted-foreground);
}
.account-avatar-lg {
  width: 44px;
  height: 44px;
  font-size: 18px;
}
.account-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}
.account-profile-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--foreground);
}
.account-profile-email {
  font-size: 13px;
  margin-top: 2px;
}
.app-main {
  flex: 1;
  min-width: 0;
}

/* ─────────────────────────────────────────
   ACCOUNT PAGE
───────────────────────────────────────── */

.acct-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
}

.acct-card {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.acct-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--hairline);
}
.acct-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.acct-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}
.acct-avatar-fallback {
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 18px;
  font-weight: 600;
}
.acct-avatar-badge {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--card);
}
.acct-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}
.acct-card-email {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
}
.acct-section-head {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.acct-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
}
.acct-section-desc {
  font-size: 12px;
  color: var(--muted-foreground);
}
.acct-rows {
  display: flex;
  flex-direction: column;
}
.acct-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  border-bottom: 1px solid var(--hairline);
  gap: 16px;
}
.acct-row:last-child {
  border-bottom: none;
}
.acct-row-empty {
  justify-content: flex-start;
}
.acct-row-label {
  font-size: 12px;
  color: var(--muted-foreground);
}
.acct-row-value {
  font-size: 13px;
  color: var(--foreground);
  text-align: right;
}
.acct-row-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--muted);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
  letter-spacing: 0.02em;
}
.acct-legal {
  margin-top: 32px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.acct-legal a {
  color: var(--muted-foreground);
  text-decoration: none;
}
.acct-legal a:hover {
  color: var(--foreground);
}
.acct-legal-sep {
  margin: 0 6px;
}

/* ─────────────────────────────────────────
   PAGE CONTENT
───────────────────────────────────────── */

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 32px 64px;
}
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 32px 64px;
}

/* ─────────────────────────────────────────
   PAGE HEADERS
───────────────────────────────────────── */

.pg-head {
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.pg-title {
  font-size: 20px;
  font-weight: 500;
  font-family: var(--font-display);
  color: var(--foreground);
  letter-spacing: -0.3px;
}
.pg-sub {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-top: 4px;
}
.page-narrow {
  max-width: 560px;
}
.pg-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 640px) {
  .pg-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ─────────────────────────────────────────
   SC-CARD SYSTEM
───────────────────────────────────────── */

.sc-card {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.sc-card-warn {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
}
.sc-card-danger-zone {
  border: 1px solid var(--destructive-border);
}
.sc-card-danger-zone .sc-card-head {
  border-bottom-color: var(--destructive-border);
}
.danger-zone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: mood-fade var(--dur-fast) var(--ease);
}
.modal {
  background: var(--background);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-dialog);
}
.modal-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--hairline);
}
.modal-title {
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-display);
  color: var(--foreground);
}
.modal-body {
  padding: 18px 20px;
  font-size: 13px;
  color: var(--tone);
  line-height: 1.6;
}
.modal-confirm-field {
  margin-top: 16px;
}
.modal-confirm-label {
  display: block;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 6px;
}
.modal-confirm-input {
  width: 100%;
  box-sizing: border-box;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--hairline);
}
.sc-card-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}
.sc-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hairline);
  gap: 12px;
}
.sc-card-warn .sc-card-head {
  border-bottom-color: var(--warning-border);
}
.sc-card-success .sc-card-head {
  border-bottom-color: var(--success-border);
}
.sc-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
}
.sc-card-desc {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
}
.sc-card-body {
  padding: 20px;
}
.sc-card-body-center {
  padding: 32px 24px;
  text-align: center;
}
.sc-card-body-center p {
  margin: 0 auto 20px;
  max-width: 360px;
}
.sc-card-heading {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}
.sc-row-tall {
  align-items: flex-start;
  padding-top: 14px;
  padding-bottom: 14px;
}
.sc-row-code-wrap {
  max-width: 200px;
  word-break: break-all;
  text-align: right;
}

.pg-grid-2 .acct-card,
.pg-grid-2 .sc-card {
  margin-bottom: 0;
}
.sc-rows {
  display: flex;
  flex-direction: column;
}
.sc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--hairline);
  gap: 16px;
  min-height: 46px;
}
.sc-row:last-child {
  border-bottom: none;
}
.sc-row-label {
  font-size: 12px;
  color: var(--muted-foreground);
  flex-shrink: 0;
}
.sc-row-val {
  font-size: 13px;
  color: var(--foreground);
  text-align: right;
}
.sc-row-mono {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--muted-foreground);
}
.wh-event-name {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--foreground);
  background: var(--muted);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.wh-error-text {
  font-size: 11px;
  margin-left: 6px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}
.sc-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.sc-row-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--hairline);
  background: var(--surface-1);
}
.sc-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
  font-style: italic;
}
.sc-new-bridge {
  padding: 20px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--hairline);
}
.sc-connected-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px oklch(0.69 0.17 142 / 0.5);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  background: var(--surface-3);
  color: var(--foreground);
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform var(--dur-fast) var(--ease),
    opacity var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
  text-decoration: none;
  font-family: inherit;
  letter-spacing: 0;
  line-height: 1.4;
  outline: none;
  touch-action: manipulation;
}
.btn:hover {
  background: var(--surface-4);
}
.btn:active {
  transform: scale(0.97);
}
.btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-md);
}
.btn-lg {
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  border-radius: var(--radius-xl);
}
.btn-primary {
  background: var(--foreground);
  color: var(--background);
  font-family: var(--font-display);
}
.btn-primary:hover {
  opacity: 0.88;
  background: var(--foreground);
}
.btn-secondary {
  background: var(--muted);
  color: var(--foreground);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover {
  background: var(--border);
}
.btn-danger {
  background: var(--destructive);
  color: #fff;
}
.btn-danger:hover {
  opacity: 0.88;
  background: var(--destructive);
}
.btn-warn {
  background: var(--warning);
  color: oklch(0.15 0.05 86);
}
.btn-warn:hover {
  opacity: 0.88;
  background: var(--warning);
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-outline-light {
  background: transparent;
  border: 1px solid oklch(1 0 0 / 0.15);
  color: oklch(1 0 0 / 0.7);
}
.btn-outline-light:hover {
  background: oklch(1 0 0 / 0.05);
  color: oklch(1 0 0);
  border-color: oklch(1 0 0 / 0.3);
}
html.light .btn-outline-light {
  border-color: oklch(0 0 0 / 0.2);
  color: oklch(0 0 0 / 0.7);
}
html.light .btn-outline-light:hover {
  background: oklch(0 0 0 / 0.05);
  color: oklch(0 0 0);
  border-color: oklch(0 0 0 / 0.4);
}

/* ─────────────────────────────────────────
   CARDS
───────────────────────────────────────── */

.card {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
}
.card-flat {
  background: transparent;
}
.card-accent {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
}
.card-connected {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}

.panel {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.panel-accent {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
}
.panel-flat {
  background: transparent;
}
.panel-connected {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}
.panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 16px;
}
.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel-title-row .panel-title {
  margin-bottom: 0;
}
.panel-logs {
  background: var(--code-bg);
  padding: 0;
}
.panel-logs .panel-title {
  color: var(--foreground);
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}

/* ─────────────────────────────────────────
   STATS
───────────────────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-box {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}
.stat-cost {
  border-color: var(--warning-border);
}
.stat-number {
  font-size: 32px;
  font-weight: 500;
  font-family: var(--font-display);
  line-height: 1;
  color: var(--foreground);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.stat-cost .stat-number {
  color: var(--warning);
}
.stat-label {
  font-size: 11px;
  color: var(--muted-foreground);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─────────────────────────────────────────
   TABLES
───────────────────────────────────────── */

.tbl {
  width: 100%;
  border-collapse: collapse;
}
.tbl th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--tone-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-bottom: 1px solid var(--hairline);
}
.tbl td {
  padding: 12px;
  border-bottom: 1px solid var(--hairline);
  color: var(--foreground);
  font-size: 13px;
  vertical-align: middle;
}
.tbl tr:last-child td {
  border-bottom: none;
}
.tbl tbody tr:hover td {
  background: var(--row-hover);
}
.tbl-right {
  text-align: right;
}
.tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 540px) {
  .tbl-col-hide {
    display: none;
  }
}
.tbl-scroll-wrap {
  max-height: 360px;
  overflow-y: auto;
}
.key-input-wrap {
  display: flex;
  align-items: center;
  background: var(--surface-4);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.key-input-value {
  flex: 1;
  padding: 7px 10px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.key-input-actions {
  display: flex;
  align-items: center;
  border-left: 1px solid var(--hairline);
  flex-shrink: 0;
}
.key-action-btn {
  background: transparent;
  border: none;
  border-left: 1px solid var(--hairline);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 500;
  padding: 0 10px;
  height: 32px;
  cursor: pointer;
  font-family: inherit;
  transition:
    background 0.12s,
    color 0.12s;
  white-space: nowrap;
}
.key-action-btn:first-child {
  border-left: none;
}
.key-action-btn:hover {
  background: var(--surface-5);
  color: var(--foreground);
}
.acct-row--col {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.kv-table {
  width: 100%;
  border-collapse: collapse;
}
.kv-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.kv-table td:first-child {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: 120px;
}
.kv-table tr:last-child td {
  border-bottom: none;
}

/* ─────────────────────────────────────────
   BADGES
───────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-4);
  color: var(--tone);
  border: none;
}
.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.link-ref {
  font-family: ui-monospace, monospace;
  font-size: 13px;
}
.ref-chip {
  display: inline-flex;
  align-items: center;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ref-chip:hover {
  border-color: var(--muted-foreground);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.badge-lg {
  font-size: 12px;
  padding: 3px 10px;
}
.badge-running {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}
.badge-provisioning {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}
.badge-exited {
  background: var(--destructive-bg);
  color: var(--destructive);
  border-color: var(--destructive-border);
}
.badge-suspended {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}
.badge-paused {
  background: var(--muted);
  color: var(--muted-foreground);
  border-color: var(--border);
}
.badge-cancelling {
  background: var(--muted);
  color: var(--muted-foreground);
  border-color: var(--border);
}
.badge-paid {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}
.badge-open {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}
.badge-void {
  background: var(--muted);
  color: var(--dim);
  border-color: var(--border);
}
.badges-cell {
  vertical-align: middle;
}
.badges-cell-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.badge-health-healthy {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}
.badge-health-unhealthy {
  background: var(--destructive-bg);
  color: var(--destructive);
  border-color: var(--destructive-border);
}
.badge-health-starting {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}
.badge-wa-connected {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}
.badge-wa-disconnected {
  background: var(--destructive-bg);
  color: var(--destructive);
  border-color: var(--destructive-border);
}
.badge-wa-unpaired {
  background: var(--muted);
  color: var(--muted-foreground);
  border-color: var(--border);
}
.badge-trial {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info-border);
}

/* ─────────────────────────────────────────
   FORMS
───────────────────────────────────────── */

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-inline {
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
}
.form-inline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
@media (max-width: 700px) {
  .form-inline-grid {
    grid-template-columns: 1fr;
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}
.field-hint {
  font-size: 13px;
  color: var(--dim);
}
.ob-skip-link {
  font-size: 13px;
  color: var(--dim);
  text-decoration: none;
}
.ob-skip-link:hover {
  color: var(--muted-foreground);
}

input[type="text"],
input[type="url"],
input[type="tel"],
input[type="email"] {
  background: var(--surface-4);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  color: var(--foreground);
  outline: none;
  width: 100%;
  font-family: inherit;
  transition: box-shadow var(--dur-fast) var(--ease);
}
input::placeholder {
  color: var(--tone-faint);
}
input:focus {
  box-shadow: 0 0 0 2px var(--ring);
}

/* ─────────────────────────────────────────
   ALERTS
───────────────────────────────────────── */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid;
}
.alert::before {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1.4;
}
.alert-error {
  background: var(--destructive-bg);
  border-color: var(--destructive-border);
  color: var(--foreground);
}
.alert-error::before {
  content: "✕";
  color: var(--destructive);
}
.alert-info {
  background: var(--info-bg);
  border-color: var(--info-border);
  color: var(--foreground);
}
.alert-info::before {
  content: "✓";
  color: var(--info);
}
.alert-warn {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--foreground);
}
.alert-warn::before {
  content: "⚠";
  color: var(--warning);
}
.alert a,
.alert .link {
  color: var(--foreground);
  text-decoration: underline;
}
.alert-secret {
  background: var(--muted);
  border-color: var(--warning-border);
  padding: 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid;
}
.alert-secret strong {
  display: block;
  margin-bottom: 12px;
  color: var(--warning);
  font-size: 12px;
  font-weight: 600;
}
.secret-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 8px;
}
.secret-row span {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  min-width: 130px;
}
.secret-row code {
  font-size: 12px;
  color: var(--warning);
  word-break: break-all;
}

/* ─────────────────────────────────────────
   API KEY
───────────────────────────────────────── */

.api-key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.api-key {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: var(--tone-muted);
  flex: 1;
  background: var(--surface-4);
  padding: 8px 12px;
  border-radius: var(--radius-md);
}

/* ─────────────────────────────────────────
   CODE BLOCKS
───────────────────────────────────────── */

.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 8px 0 12px;
  position: relative;
  overflow: hidden;
}
.code-label {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  background: var(--code-label-bg);
  color: var(--dim);
  border-bottom: 1px solid var(--border);
}
.code-block pre {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.65;
  color: var(--code-text);
  padding: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.copy-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  background: var(--surface-4);
  color: var(--tone-muted);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}
.copy-btn:hover {
  background: var(--surface-5);
  color: var(--foreground);
}

/* ─────────────────────────────────────────
   MISC / UTILS
───────────────────────────────────────── */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 20px;
  transition: color 0.15s;
}
.back-link:hover {
  color: var(--foreground);
}
.link {
  color: var(--info);
  text-decoration: none;
}
.link:hover {
  text-decoration: underline;
}
.dim {
  color: var(--muted-foreground);
  font-size: 13px;
}
.empty {
  color: var(--dim);
  font-style: italic;
  padding: 24px 0;
  text-align: center;
}

/* ─────────────────────────────────────────
   INSTANCE LAYOUT
───────────────────────────────────────── */

.inst-head {
  margin-bottom: 24px;
}
.inst-head-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 4px;
}
.breadcrumb-link {
  color: var(--muted-foreground);
  text-decoration: none;
}
.breadcrumb-link:hover {
  color: var(--foreground);
}
.breadcrumb-sep {
  margin: 0 4px;
  opacity: 0.5;
}
.inst-title {
  font-size: 22px;
  font-weight: 400;
  font-family: var(--font-display);
  color: var(--foreground);
  letter-spacing: -0.3px;
}
.inst-head-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.instance-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  align-items: start;
}
.instance-left,
.instance-right {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
@media (max-width: 860px) {
  .instance-grid {
    grid-template-columns: 1fr;
  }
}
.action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.connected-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.connected-icon {
  color: var(--success);
  font-size: 16px;
  font-weight: 700;
}
.connected-reveal-btn {
  margin-left: auto;
}
.pii-field {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.04em;
}

/* ─────────────────────────────────────────
   QR
───────────────────────────────────────── */

.qr-wrap {
  margin-top: 12px;
}
.pair-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}
@media (max-width: 540px) {
  .pair-layout {
    flex-direction: column;
  }
  .pair-layout .qr-wrap {
    align-self: center;
  }
}
.qr-img {
  width: 180px;
  height: 180px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block;
  object-fit: contain;
  background: #fff;
}

/* ─────────────────────────────────────────
   LOGS
───────────────────────────────────────── */

.log-output {
  height: 360px;
  overflow-y: auto;
  padding: 12px 16px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--log-text);
  background: var(--code-bg);
}
.log-line {
  white-space: pre-wrap;
  word-break: break-all;
}
.log-err {
  color: var(--destructive);
}

/* ─────────────────────────────────────────
   BILLING
───────────────────────────────────────── */

.billing-total-row td {
  border-top: 1px solid var(--border);
  font-weight: 600;
}
.billing-summary {
  display: flex;
  gap: 32px;
  padding: 20px 24px;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.billing-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.billing-summary-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-foreground);
}
.billing-summary-value {
  font-size: 20px;
  font-weight: 400;
  font-family: var(--font-display);
  color: var(--foreground);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

/* ─────────────────────────────────────────
   LOGIN
───────────────────────────────────────── */

.login-page {
  min-height: calc(100vh - var(--topbar-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-box {
  width: 100%;
  max-width: 360px;
  background: var(--surface-2);
  border-radius: var(--radius-2xl);
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-md);
}
.login-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  margin-bottom: 20px;
  font-size: 20px;
}
.login-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
}
.login-heading {
  font-size: 18px;
  font-weight: 400;
  font-family: var(--font-display);
  color: var(--foreground);
  letter-spacing: -0.2px;
  margin-bottom: 20px;
}
.login-sub {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 28px;
  line-height: 1.55;
}
.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.login-divider span {
  font-size: 10px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.login-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.pricing-note {
  font-size: 12px;
  color: var(--dim);
  font-family: ui-monospace, monospace;
}
.tagline {
  font-size: 14px;
  color: var(--muted-foreground);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ─────────────────────────────────────────
   TICKER
───────────────────────────────────────── */

.ticker-section {
  position: relative;
  overflow: hidden;
  padding: 14px 0;
}
.ticker-wrap {
  overflow: hidden;
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  animation: ticker-scroll 80s linear infinite;
}
.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.tick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid;
  flex-shrink: 0;
}
.tick-feat {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--muted-foreground);
}
.tick-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}
.tick-price {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning);
  font-weight: 600;
}
.tick-mock {
  background: var(--destructive-bg);
  border-color: var(--destructive-border);
  color: var(--dim);
}
.tick-mock em {
  font-style: normal;
  text-decoration: line-through;
  opacity: 0.6;
}
.tick-x {
  font-size: 10px;
  color: var(--destructive);
  opacity: 0.7;
  flex-shrink: 0;
}
.ticker-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.ticker-fade-left {
  left: 0;
  background: linear-gradient(to right, var(--background), transparent);
}
.ticker-fade-right {
  right: 0;
  background: linear-gradient(to left, var(--background), transparent);
}

/* ─────────────────────────────────────────
   LANDING FEAT GRID
───────────────────────────────────────── */

.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 720px) {
  .feat-grid {
    grid-template-columns: 1fr;
  }
}
.feat-grid .sc-card {
  margin-bottom: 0;
}
.feat-card {
  padding: 24px;
}
.feat-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--surface-4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--tone-muted);
  flex-shrink: 0;
}
.feat-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}
.feat-desc {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.65;
  margin: 0;
}

/* ─────────────────────────────────────────
   AI CALLOUT
───────────────────────────────────────── */

.ai-callout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 760px) {
  .ai-callout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
.ai-callout-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 400;
  font-family: var(--font-display);
  color: var(--foreground);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 16px;
}
.ai-callout-sub {
  font-size: 14px;
  color: var(--muted-foreground);
  line-height: 1.7;
  margin-bottom: 24px;
}

/* ─────────────────────────────────────────
   PRICING
───────────────────────────────────────── */

.pricing-hook {
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 400;
  font-family: var(--font-display);
  color: var(--foreground);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

/* ─────────────────────────────────────────
   LANDING
───────────────────────────────────────── */

.landing-hero {
  background: var(--background);
  padding: 80px 24px;
}
.hero-inner {
  max-width: 760px;
  margin: 0 auto;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-strong);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 28px;
  text-transform: uppercase;
}
.hero-title {
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.06;
  color: var(--foreground);
  font-weight: 400;
  font-family: var(--font-display);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: 17px;
  color: var(--muted-foreground);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.hero-price {
  font-size: 12px;
  color: var(--dim);
  font-family: ui-monospace, monospace;
}

.landing-section {
  padding: 64px 24px;
  border-bottom: 1px solid var(--hairline);
}
.landing-section:last-of-type {
  border-bottom: none;
}
.landing-section-alt {
  background: var(--surface-1);
}
.landing-section-yellow {
  background: var(--warning-bg);
  border-top: 1px solid var(--warning-border);
  border-bottom: 1px solid var(--warning-border);
}
.landing-section-dark {
  background: var(--background);
}
.landing-container {
  max-width: 960px;
  margin: 0 auto;
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 32px;
  color: var(--muted-foreground);
}
.section-sub {
  font-size: 15px;
  color: var(--muted-foreground);
  margin-bottom: 28px;
  line-height: 1.65;
  max-width: 560px;
}

/* ─────────────────────────────────────────
   HOW IT WORKS TIMELINE
───────────────────────────────────────── */

.hiw-steps {
  display: flex;
  flex-direction: column;
  max-width: 680px;
  width: 100%;
}
.hiw-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
}
.hiw-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.hiw-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--muted);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-foreground);
  flex-shrink: 0;
  z-index: 1;
}
.hiw-circle-done {
  background: var(--success-bg);
  border-color: oklch(0.69 0.17 142 / 0.3);
  color: var(--success);
}
.hiw-line {
  width: 1px;
  flex: 1;
  background: var(--surface-5);
  margin: 6px 0;
  min-height: 24px;
}
.hiw-content {
  padding-bottom: 40px;
  min-width: 0;
}
.hiw-step-last .hiw-content {
  padding-bottom: 0;
}
.hiw-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 6px;
  margin-top: 6px;
  letter-spacing: -0.2px;
}
.hiw-desc {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.65;
  margin-bottom: 16px;
}
.hiw-terminal {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hiw-terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: var(--code-label-bg);
  border-bottom: 1px solid var(--border);
}
.hiw-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hiw-dot-red {
  background: #ff5f57;
}
.hiw-dot-yellow {
  background: #ffbd2e;
}
.hiw-dot-green {
  background: #28ca41;
}
.hiw-terminal-label {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--dim);
  margin-left: 4px;
}
.hiw-method {
  color: var(--warning);
  font-weight: 600;
  margin-right: 4px;
}
.hiw-terminal-body {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.65;
  color: var(--code-text);
  padding: 14px 16px;
  margin: 0;
  white-space: pre;
  overflow-x: auto;
}
.hiw-response {
  color: var(--dim);
}
.hiw-terminal-body .jk {
  color: #7ec8e3;
}
.hiw-terminal-body .js {
  color: #b8e6a0;
}
.hiw-terminal-body .ji {
  color: #f0c070;
}
html.light .hiw-terminal-body .jk {
  color: #0369a1;
}
html.light .hiw-terminal-body .js {
  color: #166534;
}
html.light .hiw-terminal-body .ji {
  color: #92400e;
}

@media (max-width: 600px) {
  .hiw-step {
    grid-template-columns: 36px 1fr;
    gap: 16px;
  }
  .hiw-circle {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }
  .hiw-terminal-body {
    font-size: 11px;
    padding: 12px;
  }
}

/* ─────────────────────────────────────────
   CAPABILITIES
───────────────────────────────────────── */

.caps-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.cap {
  border: 1px solid var(--border);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: var(--radius);
  background: var(--muted);
  letter-spacing: 0.02em;
}
.caps-note {
  font-size: 13px;
  color: var(--dim);
}

/* ─────────────────────────────────────────
   WEBHOOK EVENTS
───────────────────────────────────────── */

.webhook-events {
  display: flex;
  flex-direction: column;
}
.webhook-event {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.webhook-event:last-child {
  border-bottom: none;
}
.evt-name {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--info);
  min-width: 200px;
}
.evt-desc {
  font-size: 13px;
  color: var(--muted-foreground);
}

/* ─────────────────────────────────────────
   PRICING SECTION
───────────────────────────────────────── */

.pricing-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 640px) {
  .pricing-layout {
    grid-template-columns: 1fr;
  }
}
.pricing-desc {
  font-size: 15px;
  color: var(--muted-foreground);
  line-height: 1.65;
  margin-top: 8px;
}
.pricing-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.pricing-amount {
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  color: var(--foreground);
  margin-bottom: 4px;
  letter-spacing: -0.03em;
}
.pricing-unit {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 20px;
}
.pricing-list {
  list-style: none;
  padding: 0;
}
.pricing-list li {
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
}
.pricing-list li:last-child {
  border-bottom: none;
}
.pricing-list li::before {
  content: "→ ";
  color: var(--dim);
}

/* ─────────────────────────────────────────
   SELF-HOST
───────────────────────────────────────── */

.selfhost-code {
  border: 1px solid var(--border);
  background: var(--code-bg);
  border-radius: var(--radius);
  overflow: hidden;
}
.selfhost-code pre {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--log-text);
  padding: 20px;
  overflow-x: auto;
  line-height: 1.7;
}

/* ─────────────────────────────────────────
   LANDING FOOTER
───────────────────────────────────────── */

/* ── Site footer ── */
.site-footer {
  background: var(--surface-1);
  border-top: 1px solid var(--hairline);
  padding: 0 24px;
}
.site-footer-inner {
  max-width: 1040px;
  margin: 0 auto;
}

/* CTA strip */
.footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--hairline);
}
.footer-cta-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 400;
  color: var(--foreground);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.footer-cta-sub {
  font-size: 14px;
  color: var(--muted-foreground);
  line-height: 1.65;
}
.footer-cta-btn {
  flex-shrink: 0;
}

/* rule between CTA and cols */
.footer-rule {
  display: none;
}

/* columns area */
.footer-cols {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.4fr 1.8fr;
  gap: 40px;
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--hairline);
}
.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-brand {
  display: inline-flex;
  font-size: 18px;
  text-decoration: none;
}
.footer-brand-desc {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.6;
  max-width: 240px;
}
.footer-price-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 9999px;
  font-family: ui-monospace, monospace;
  width: fit-content;
}
.footer-nav-cols {
  display: contents;
}
.footer-nav-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-nav-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--foreground);
  margin-bottom: 4px;
}
.footer-nav-sublabel {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 8px;
  margin-bottom: 2px;
}
.footer-nav-link {
  font-size: 13px;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.15s;
  line-height: 1.6;
}
.footer-nav-link:hover {
  color: var(--foreground);
}

/* bottom bar */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 12px;
  color: var(--dim);
}
.footer-tagline {
  font-size: 12px;
  color: var(--dim);
  font-family: ui-monospace, monospace;
}

@media (max-width: 900px) {
  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  .footer-nav-cols {
    display: contents;
  }
}
@media (max-width: 480px) {
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─────────────────────────────────────────
   DOCS
───────────────────────────────────────── */

.docs-subnav {
  background: var(--background);
  border-bottom: 1px solid var(--border);
  padding: 0 8px;
  height: 44px;
  display: flex;
  align-items: stretch;
  position: sticky;
  top: var(--topbar-height);
  z-index: 99;
  overflow-x: auto;
  gap: 0;
}
.docs-subnav::-webkit-scrollbar {
  display: none;
}
.docs-subnav a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  text-decoration: none;
  padding: 0 12px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition:
    color 0.15s,
    border-color 0.15s;
  text-transform: uppercase;
}
.docs-subnav a:hover {
  color: var(--foreground);
  border-bottom-color: var(--border-strong);
}
.docs-subnav-end {
  margin-left: auto;
  padding-left: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 96px);
}
@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
}

.docs-sidebar {
  border-right: 1px solid var(--border);
  background: var(--background);
  padding: 16px 0;
  position: sticky;
  top: 96px;
  height: calc(100vh - 96px);
  overflow-y: auto;
}
.sidebar-section {
  padding: 0 0 12px;
}
.sidebar-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 6px 16px 4px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  padding: 5px 8px;
  margin: 1px 8px;
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 400;
  transition:
    background 0.12s,
    color 0.12s;
}
.sidebar-link:hover {
  color: var(--foreground);
  background: var(--muted);
}
.sidebar-link-sm {
  font-size: 11px;
  gap: 6px;
}
.sidebar-method {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  min-width: 36px;
  text-align: center;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  flex-shrink: 0;
}

.docs-main {
  padding: 40px 48px 80px;
  max-width: 860px;
}
@media (max-width: 900px) {
  .docs-main {
    padding: 24px 20px 60px;
  }
}
.docs-section {
  margin-bottom: 56px;
  scroll-margin-top: calc(var(--topbar-height) + 44px + 16px);
}
.docs-h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--foreground);
  letter-spacing: -0.01em;
}
.docs-h2 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--dim);
}
.docs-h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--foreground);
}
.docs-p {
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 14px;
  color: var(--muted-foreground);
}
.docs-p code {
  background: var(--muted);
  padding: 2px 6px;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--foreground);
  font-family: ui-monospace, monospace;
}

.endpoint {
  border: 1px solid var(--border);
  margin-bottom: 10px;
  scroll-margin-top: calc(var(--topbar-height) + 44px + 16px);
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s;
}
.endpoint:hover {
  border-color: var(--border-strong);
}
.endpoint-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--muted);
}
.endpoint-path {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--foreground);
  word-break: break-all;
  flex: 1;
}
.endpoint-desc {
  padding: 10px 14px 8px;
  font-size: 13px;
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.55;
}
.endpoint-params {
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface-tint);
}
.param-row {
  display: grid;
  grid-template-columns: 150px 110px 1fr;
  gap: 8px;
  font-size: 12px;
  align-items: baseline;
}
.param-name {
  font-family: ui-monospace, monospace;
  font-weight: 600;
  font-size: 11px;
  color: var(--foreground);
}
.param-type {
  color: var(--dim);
  font-size: 11px;
}
.param-desc {
  color: var(--muted-foreground);
  font-size: 12px;
}

/* ─────────────────────────────────────────
   METHOD BADGES
───────────────────────────────────────── */

.method-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  min-width: 54px;
  text-align: center;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}
.method-get {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid var(--info-border);
}
.method-post {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}
.method-delete {
  background: var(--destructive-bg);
  color: var(--destructive);
  border: 1px solid var(--destructive-border);
}
.method-patch {
  background: var(--purple-bg);
  color: var(--purple);
  border: 1px solid var(--purple-border);
}
.method-put {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}
.method-webhook {
  background: var(--muted);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
}

.sidebar-method.method-get {
  background: var(--info-bg);
  color: var(--info);
}
.sidebar-method.method-post {
  background: var(--warning-bg);
  color: var(--warning);
}
.sidebar-method.method-delete {
  background: var(--destructive-bg);
  color: var(--destructive);
}
.sidebar-method.method-patch {
  background: var(--purple-bg);
  color: var(--purple);
}
.sidebar-method.method-put {
  background: var(--success-bg);
  color: var(--success);
}

/* ─────────────────────────────────────────
   CODE BLOCKS IN DOCS
───────────────────────────────────────── */

.docs-section > .code-block {
  margin: 8px 0 12px;
}
.code-block.code-sm {
  margin: 4px 0 8px;
}
.endpoint .code-block {
  margin: 0 14px 12px;
  border-radius: var(--radius);
}

/* ─────────────────────────────────────────
   JSON HIGHLIGHT TOKENS
───────────────────────────────────────── */

.code-block pre .jk {
  color: #7ec8e3;
}
.code-block pre .js {
  color: #b8e6a0;
}
.code-block pre .ji {
  color: #f0c070;
}
.code-block pre .jb {
  color: #d48bff;
}
.code-block pre .jn {
  color: #ff7b7b;
}
html.light .code-block pre .jk {
  color: #0369a1;
}
html.light .code-block pre .js {
  color: #166534;
}
html.light .code-block pre .ji {
  color: #92400e;
}
html.light .code-block pre .jb {
  color: #6b21a8;
}
html.light .code-block pre .jn {
  color: #b91c1c;
}
.code-block pre .jc { color: #6b7280; }
.code-block pre .jf { color: #5eead4; }
html.light .code-block pre .jc { color: #9ca3af; }
html.light .code-block pre .jf { color: #0d9488; }

/* highlight.js token colors — scoped to code blocks */
.code-block pre .hljs-keyword,
.code-block pre .hljs-selector-tag,
.code-block pre .hljs-type { color: #7ec8e3; }
.code-block pre .hljs-string,
.code-block pre .hljs-regexp,
.code-block pre .hljs-attribute { color: #b8e6a0; }
.code-block pre .hljs-number,
.code-block pre .hljs-literal { color: #f0c070; }
.code-block pre .hljs-comment { color: #6b7280; font-style: italic; }
.code-block pre .hljs-built_in,
.code-block pre .hljs-title.function_,
.code-block pre .hljs-title.function_.invoke__ { color: #5eead4; }
.code-block pre .hljs-meta,
.code-block pre .hljs-variable.language_ { color: #d48bff; }
.code-block pre .hljs-title.class_,
.code-block pre .hljs-title { color: #f0c070; }
.code-block pre .hljs-params { color: inherit; }
html.light .code-block pre .hljs-keyword,
html.light .code-block pre .hljs-selector-tag,
html.light .code-block pre .hljs-type { color: #0369a1; }
html.light .code-block pre .hljs-string,
html.light .code-block pre .hljs-regexp,
html.light .code-block pre .hljs-attribute { color: #15803d; }
html.light .code-block pre .hljs-number,
html.light .code-block pre .hljs-literal { color: #b45309; }
html.light .code-block pre .hljs-comment { color: #9ca3af; font-style: italic; }
html.light .code-block pre .hljs-built_in,
html.light .code-block pre .hljs-title.function_,
html.light .code-block pre .hljs-title.function_.invoke__ { color: #0d9488; }
html.light .code-block pre .hljs-meta,
html.light .code-block pre .hljs-variable.language_ { color: #6b21a8; }
html.light .code-block pre .hljs-title.class_,
html.light .code-block pre .hljs-title { color: #b45309; }

/* ─────────────────────────────────────────
   THEME TOGGLE
───────────────────────────────────────── */

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  cursor: pointer;
  transition:
    background 0.12s,
    color 0.12s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--muted);
  color: var(--foreground);
}
.theme-toggle .icon-sun {
  display: none;
}
.theme-toggle .icon-moon {
  display: block;
}
html.light .theme-toggle .icon-sun {
  display: block;
}
html.light .theme-toggle .icon-moon {
  display: none;
}

/* ─────────────────────────────────────────
   MENU TOGGLE + OVERLAYS
───────────────────────────────────────── */

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  cursor: pointer;
  transition:
    background 0.12s,
    color 0.12s;
  flex-shrink: 0;
}
.menu-toggle:hover {
  background: var(--muted);
  color: var(--foreground);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.65);
  z-index: 149;
  backdrop-filter: blur(2px);
}
.sidebar-backdrop.open {
  display: block;
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */

@media (max-width: 768px) {
  .page,
  .container {
    padding: 20px 16px 48px;
  }
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .app-menu-toggle {
    display: flex;
    margin-right: 8px;
  }
  .sidebar {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 150;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    background: var(--card);
    border-right: 1px solid var(--border-strong);
    box-shadow: 8px 0 32px var(--sidebar-shadow);
    padding-top: var(--topbar-height);
    overflow: hidden;
  }
  .sidebar .sidebar-nav {
    overflow-y: auto;
  }
  .sidebar .sidebar-bottom {
    flex-shrink: 0;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .app-main {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .docs-menu-toggle {
    display: flex;
  }
  .docs-sidebar {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    z-index: 150;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    background: var(--card);
    border-right: 1px solid var(--border-strong);
    box-shadow: 8px 0 32px var(--sidebar-shadow);
    padding-top: 16px;
  }
  .docs-sidebar.open {
    transform: translateX(0);
  }
  .docs-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .docs-subnav {
    padding: 0 4px;
    height: 40px;
  }
  .docs-subnav a {
    padding: 0 8px;
    font-size: 10px;
    letter-spacing: 0.03em;
  }
  .docs-subnav-end {
    display: none;
  }
  .docs-main {
    padding: 20px 16px 48px;
  }
  .docs-section {
    margin-bottom: 40px;
  }
  .docs-h1 {
    font-size: 22px;
  }
  .endpoint-head {
    flex-wrap: wrap;
    gap: 6px;
  }
  .endpoint-path {
    font-size: 11px;
    word-break: break-all;
  }
  .endpoint-params {
    padding: 10px 12px;
  }
  .param-row {
    grid-template-columns: 1fr;
    gap: 1px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
  }
  .param-row:last-child {
    border-bottom: none;
  }
  .param-name {
    font-size: 12px;
  }
  .param-type {
    display: inline;
    margin-left: 6px;
  }
  .param-desc {
    color: var(--dim);
    padding-top: 2px;
  }
  .code-block pre {
    font-size: 11px;
    padding: 10px;
  }
  .endpoint .code-block {
    margin: 0 10px 10px;
  }
  .docs-section > .code-block {
    font-size: 11px;
  }
}

/* ── Comparison pages ── */
/* Brand wordmark inherits the surrounding type size so "WABridges" matches
   the competitor name it sits beside (hero title, price label, table head). */
.vs-title .brand-wa,
.vs-title .brand-bridges,
.vs-price-label .brand-wa,
.vs-price-label .brand-bridges,
.vs-th-us .brand-wa,
.vs-th-us .brand-bridges {
  font-size: inherit;
}
.vs-hero {
  background: var(--background);
  padding: 80px 24px 64px;
  border-bottom: 1px solid var(--hairline);
}
.vs-hero-index {
  padding-bottom: 80px;
}
.vs-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}
.vs-title {
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.08;
  color: var(--foreground);
  font-weight: 400;
  font-family: var(--font-display);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.vs-sub {
  font-size: 16px;
  color: var(--muted-foreground);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 36px;
}
.vs-section {
  padding: 64px 24px;
  border-bottom: 1px solid var(--hairline);
}
.vs-container {
  max-width: 860px;
  margin: 0 auto;
}
.vs-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin: 48px 0 20px;
}
.vs-section-title:first-child {
  margin-top: 0;
}
.vs-price-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 48px;
}
.vs-price-side {
  text-align: center;
}
.vs-price-divider {
  font-size: 12px;
  color: var(--dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vs-price-label {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.vs-price-amount {
  font-size: 22px;
  font-weight: 500;
  font-family: var(--font-display);
  word-break: break-word;
  overflow-wrap: break-word;
}
.vs-price-them {
  color: var(--muted-foreground);
}
.vs-price-us {
  color: var(--foreground);
}
.vs-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.vs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.vs-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}
.vs-th-feature {
  width: 30%;
}
.vs-th-them {
  width: 35%;
}
.vs-th-us {
  width: 35%;
}
.vs-tr {
  border-bottom: 1px solid var(--hairline);
}
.vs-tr:last-child {
  border-bottom: none;
}
.vs-td-feature {
  padding: 12px 16px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
}
.vs-td-them {
  padding: 12px 16px;
  color: var(--muted-foreground);
}
.vs-td-us {
  padding: 12px 16px;
  color: var(--foreground);
  font-weight: 500;
}
.vs-advantages {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vs-advantage {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--foreground);
  line-height: 1.5;
}
.vs-adv-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  color: var(--muted-foreground);
}
.vs-cta-section {
  padding: 64px 24px;
}
.vs-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  background: var(--surface-2);
  border-radius: var(--radius-xl);
  padding: 40px 48px;
}
.vs-cta-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 400;
  font-family: var(--font-display);
  color: var(--foreground);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.vs-cta-sub {
  font-size: 14px;
  color: var(--muted-foreground);
  line-height: 1.65;
  max-width: 420px;
}
.vs-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  flex-shrink: 0;
}
.vs-cta-note {
  font-size: 11px;
  color: var(--dim);
  font-family: ui-monospace, monospace;
}
.vs-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.vs-index-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  transition: border-color 0.15s;
}
.vs-index-card:hover {
  border-color: var(--border-strong);
}
.vs-index-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
}
.vs-index-card-tag {
  font-size: 12px;
  color: var(--muted-foreground);
  line-height: 1.4;
}
.vs-index-card-prices {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 4px;
  font-size: 12px;
  font-family: ui-monospace, monospace;
}
.vs-index-them {
  color: var(--muted-foreground);
  text-decoration: line-through;
}
.vs-index-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vs-index-arrow {
  color: var(--dim);
}
.vs-index-us {
  color: var(--foreground);
  font-weight: 600;
}
.vs-index-cta {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: auto;
  padding-top: 8px;
}

/* ── Legal pages ── */
.legal-page {
  padding: 60px 20px 80px;
}
.legal-container {
  max-width: 680px;
  margin: 0 auto;
}
.legal-title {
  font-family: "Fraunces", serif;
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 4px;
  color: var(--foreground);
}
.legal-updated {
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 40px;
}
.legal-section {
  margin-bottom: 32px;
}
.legal-section h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}
.legal-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--dim);
  margin: 14px 0 6px;
}
.legal-section p,
.legal-section li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--dim);
}
.legal-section ul {
  padding-left: 20px;
  margin: 8px 0;
}
.legal-section li {
  margin-bottom: 4px;
}
.legal-section a {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-section a:hover {
  opacity: 0.7;
}

/* login legal line */
.login-legal {
  margin-top: 10px;
  font-size: 11px;
  color: var(--dim);
  line-height: 1.5;
}
.login-legal a {
  color: var(--dim);
  text-decoration: underline;
}
.login-legal a:hover {
  color: var(--foreground);
}

/* ─────────────────────────────────────────
   ONBOARDING WIZARD
───────────────────────────────────────── */

.ob-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 80px;
}
.ob-logo {
  margin-bottom: 40px;
}
.ob-logo .brand-wa,
.ob-logo .brand-bridges {
  font-size: 30px;
}
.ob-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 40px;
}
.ob-progress-step {
  width: 32px;
  height: 3px;
  border-radius: 99px;
  background: var(--border);
}
.ob-progress-step-active {
  background: var(--foreground);
}
.ob-progress-step-done {
  background: var(--success);
}
.ob-card {
  width: 100%;
  max-width: 480px;
}
.ob-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid oklch(0.69 0.17 142 / 0.25);
  border-radius: var(--radius);
  padding: 4px 10px;
  margin-bottom: 20px;
}
.ob-step-indicator {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}
.ob-title {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 400;
  color: var(--foreground);
  letter-spacing: -0.4px;
  margin-bottom: 12px;
}
.ob-sub {
  font-size: 15px;
  color: var(--muted-foreground);
  line-height: 1.65;
  margin-bottom: 0;
}
.ob-steps-preview {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.ob-step-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--foreground);
}
.ob-step-row:last-child {
  border-bottom: none;
}
.ob-step-row-done {
  color: var(--dim);
}
.ob-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--muted);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-foreground);
  flex-shrink: 0;
}
.ob-step-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 1px solid oklch(0.69 0.17 142 / 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--success);
  flex-shrink: 0;
}
.ob-key-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-top: 24px;
  overflow: hidden;
}
.ob-key-text {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: var(--code-text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ob-key-copy {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--foreground);
  background: var(--muted);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 5px 12px;
  cursor: pointer;
}
.ob-key-copy:hover {
  background: var(--border);
}
.ob-key-copy-done {
  background: var(--success) !important;
  color: #fff !important;
  border-color: var(--success) !important;
}
.ob-key-hint {
  font-size: 15px;
  color: var(--dim);
  margin-top: 8px;
}

/* ─────────────────────────────────────────
   HOW IT WORKS PAGE
───────────────────────────────────────── */

.hiw-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--muted-foreground);
  text-decoration: none;
  margin-bottom: 24px;
}
.hiw-back:hover {
  color: var(--foreground);
}

/* Architecture diagram */
.arch-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -8px;
  padding: 0 8px;
}
.arch-svg {
  display: block;
  width: 100%;
  min-width: 580px;
  height: auto;
}

/* SVG box styles */
.arch-box {
  fill: var(--surface-3);
  stroke: var(--border);
  stroke-width: 1.5;
}
.arch-box-center {
  fill: var(--surface-3);
  stroke: var(--warning);
  stroke-width: 1.5;
  opacity: 0.95;
}
html.light .arch-box {
  stroke: var(--border-strong);
}
html.light .arch-box-center {
  stroke: oklch(0.48 0.10 195);
  stroke-opacity: 1;
}
html.light .arch-sublabel-brand {
  fill: oklch(0.48 0.10 195);
}
html.light .arch-arrow-out {
  stroke: oklch(0.48 0.10 195);
}
html.light .arch-arrowhead-out {
  fill: oklch(0.48 0.10 195);
}
html.light .arch-arrow-label-out {
  fill: oklch(0.48 0.10 195);
}
html.light .arch-legend-dot-out {
  background: oklch(0.48 0.10 195);
}

/* SVG text styles */
.arch-label {
  font-family: 'Hanken Grotesk', ui-sans-serif, sans-serif;
  font-size: 15px;
  font-weight: 600;
  fill: var(--foreground);
  text-anchor: middle;
}
.arch-sublabel {
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: 11px;
  fill: var(--muted-foreground);
  text-anchor: middle;
}
.arch-sublabel-brand {
  fill: var(--warning);
  font-weight: 600;
}

/* SVG arrow styles */
.arch-arrow-out {
  stroke: var(--warning);
  stroke-width: 1.5;
  fill: none;
}
.arch-arrowhead-out {
  fill: var(--warning);
  stroke: none;
}
.arch-arrow-in {
  stroke: var(--success);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 5 3;
}
.arch-arrowhead-in {
  fill: var(--success);
  stroke: none;
}
.arch-arrow-label {
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: 11px;
  text-anchor: middle;
}
.arch-arrow-label-out {
  fill: var(--warning);
}
.arch-arrow-label-in {
  fill: var(--success);
}

/* Diagram legend */
.arch-legend {
  display: flex;
  gap: 28px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.arch-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.arch-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.arch-legend-dot-out {
  background: var(--warning);
}
.arch-legend-dot-in {
  background: var(--success);
}

/* Language tabs */
.lang-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.lang-tab {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  background: none;
  border: none;
  padding: 8px 16px 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--dur-fast);
}
.lang-tab:hover {
  color: var(--foreground);
}
.lang-tab.active {
  color: var(--foreground);
  border-bottom-color: var(--foreground);
}

/* CTA block */
.hiw-page-cta {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.hiw-page-cta-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 400;
  color: var(--foreground);
  line-height: 1.2;
  margin-bottom: 16px;
}
.hiw-page-cta-sub {
  font-size: 15px;
  color: var(--muted-foreground);
  line-height: 1.65;
  margin-bottom: 28px;
}
