:root {
  --bg: #fff;
  --fg: oklch(0.145 0 0);
  --muted: oklch(0.49 0 0);
  --muted-bg: oklch(0.97 0 0);
  --line: oklch(0.93 0 0);
  --primary: oklch(0.692 0.141 243.716);
  --primary-fg: #fff;
  --success: oklch(0.596 0.145 163.225);
  --shadow: 0 20px 50px -25px rgba(15, 23, 42, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.landing {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Public Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

body.landing a { color: inherit; text-decoration: none; }

body.landing :focus-visible {
  outline: 2px solid oklch(0.708 0.16 249);
  outline-offset: 2px;
}

.wrap {
  width: min(72rem, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  pointer-events: none;
}

.topbar-inner {
  pointer-events: auto;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 24px;
  transition: max-width 0.7s cubic-bezier(0.16, 1, 0.3, 1), padding 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
  padding: 0 8px;
  transition: height 0.7s cubic-bezier(0.16, 1, 0.3, 1), background 0.7s, box-shadow 0.7s, border-radius 0.7s;
}

.topbar.is-scrolled .topbar-inner {
  max-width: 52rem;
  padding: 12px 12px 0;
}

.topbar.is-scrolled .nav {
  height: 48px;
  padding: 0 6px 0 16px;
  border-radius: 16px;
  background: color-mix(in oklch, var(--bg) 60%, transparent);
  box-shadow: 0 2px 16px -6px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(24px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover { color: var(--fg); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-sm {
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 12px;
}

body.landing a.btn-primary,
body.landing a.btn-primary:hover,
.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { filter: brightness(0.96); }

.btn-primary svg { transition: transform 0.2s; }

.btn-primary:hover svg { transform: translateX(2px); }

.btn-outline {
  border-color: color-mix(in oklch, var(--fg) 12%, transparent);
  background: transparent;
  color: var(--fg);
}

.btn-outline:hover { background: var(--muted-bg); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 128px 0 72px;
}

.hero-glow,
.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-glow {
  opacity: 0.25;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, oklch(0.72 0.18 250 / 80%) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 15%, oklch(0.65 0.15 200 / 60%) 0%, transparent 70%),
    radial-gradient(ellipse 40% 35% at 40% 80%, oklch(0.7 0.12 280 / 40%) 0%, transparent 70%);
}

.hero-grid {
  opacity: 0.08;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 4rem 4rem;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 20%, transparent 100%);
}

.hero-grid { z-index: 0; }

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  padding: 6px 12px;
  border: 1px solid oklch(0.62 0.16 250 / 20%);
  border-radius: 999px;
  background: oklch(0.62 0.16 250 / 6%);
  color: oklch(0.45 0.16 250);
  font-size: 11px;
  font-weight: 500;
}

.dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #3b82f6;
}

.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #60a5fa;
  animation: ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% { transform: scale(2.4); opacity: 0; }
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.gradient {
  background: linear-gradient(90deg, #60a5fa, #a78bfa, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 36rem;
  margin: 20px 0 0;
  color: color-mix(in oklch, var(--muted) 85%, var(--fg));
  font-size: 15px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.clients {
  margin-top: 40px;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: color-mix(in oklch, var(--muted) 70%, transparent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.clients p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pills span {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  border: 1px solid color-mix(in oklch, var(--line) 80%, transparent);
  border-radius: 999px;
  background: color-mix(in oklch, var(--muted-bg) 50%, transparent);
  font-size: 14px;
  font-weight: 500;
}

.terminal {
  overflow: hidden;
  border: 1px solid color-mix(in oklch, var(--line) 90%, transparent);
  border-radius: 16px;
  background: color-mix(in oklch, white 95%, transparent);
  box-shadow: var(--shadow);
}

.term-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid color-mix(in oklch, var(--line) 80%, transparent);
}

.term-tabs strong {
  border-bottom: 2px solid #10b981;
  padding: 10px 8px;
  color: #059669;
  font-size: 12px;
  font-weight: 500;
}

.term-ok {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: color-mix(in oklch, var(--fg) 40%, transparent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.term-ok i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.45);
}

.term-path {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid color-mix(in oklch, var(--line) 70%, transparent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
}

.method {
  border-radius: 6px;
  padding: 2px 6px;
  background: oklch(0.7 0.14 163 / 12%);
  color: #059669;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.term-body {
  padding: 16px 20px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.55;
}

.term-label {
  color: var(--muted);
  font-family: "Public Sans", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.term-body pre {
  margin: 8px 0 16px;
  white-space: pre-wrap;
}

.k { color: #7c3aed; }
.s { color: #047857; }
.flag { color: #2563eb; }

.term-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  border-top: 1px solid color-mix(in oklch, var(--line) 70%, transparent);
  background: color-mix(in oklch, var(--muted-bg) 70%, white);
  color: color-mix(in oklch, var(--fg) 45%, transparent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats {
  border-top: 1px solid color-mix(in oklch, var(--line) 70%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--line) 70%, transparent);
  background: color-mix(in oklch, var(--muted-bg) 35%, white);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  padding: 40px 0;
}

.stats-grid div { text-align: center; }

.stats-grid strong {
  display: block;
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stats-grid span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.rates {
  padding: 96px 0;
  scroll-margin-top: 88px;
}

.rates-head {
  max-width: 32rem;
  margin-bottom: 32px;
}

.rates-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.filters {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 10px;
  background: var(--muted-bg);
}

.filters button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 6px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.filters button[aria-pressed="true"] {
  background: white;
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.table-card {
  overflow: auto;
  border: 1px solid color-mix(in oklch, var(--line) 80%, transparent);
  border-radius: 12px;
}

.rate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rate-table th:nth-child(2),
.rate-table td:nth-child(2) { display: none; }

.rate-table th,
.rate-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid color-mix(in oklch, var(--line) 80%, transparent);
}

.rate-table th {
  background: color-mix(in oklch, var(--fg) 1.5%, white);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.rate-table th.num,
.rate-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

.rate-table td.cut {
  text-align: right;
  color: var(--success);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rate-table tbody tr:last-child td { border-bottom: 0; }

.rate-table tbody tr:hover { background: color-mix(in oklch, var(--muted-bg) 65%, white); }

.rate-table tr[hidden] { display: none; }

.rate-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
}

.rate-table .unit {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.rate-table.is-filtering tbody { opacity: 0.45; }

.foot-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.rates-sub {
  max-width: 36rem;
  margin: 56px 0 16px;
  scroll-margin-top: 88px;
}

.rates-sub h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.rates-sub p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .rate-table th,
  .rate-table td { padding: 12px 10px; }
}

.steps {
  border-top: 1px solid color-mix(in oklch, var(--line) 70%, transparent);
  padding: 96px 0;
}

.steps-head { margin-bottom: 48px; text-align: center; }

.steps-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.step-grid {
  display: grid;
  gap: 32px;
}

.step {
  text-align: center;
}

.step-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border: 1px solid color-mix(in oklch, var(--line) 90%, transparent);
  border-radius: 16px;
  background: color-mix(in oklch, var(--muted-bg) 55%, white);
  color: var(--muted);
}

.step-num {
  position: absolute;
  top: -8px;
  right: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--fg);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.step h3 { margin: 0 0 8px; font-size: 16px; }

.step p {
  margin: 0 auto;
  max-width: 28ch;
  color: var(--muted);
  font-size: 14px;
}

.colophon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 28px 0 40px;
  border-top: 1px solid color-mix(in oklch, var(--line) 70%, transparent);
  color: var(--muted);
  font-size: 14px;
}

.colophon a:hover { color: var(--fg); }

.nav-links a[aria-current="page"] {
  color: var(--fg);
  background: var(--muted-bg);
}

.doc {
  padding: 120px 0 72px;
}

.doc-card { max-width: 44rem; }

.doc .lede { max-width: 40rem; }

.doc section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid color-mix(in oklch, var(--line) 85%, transparent);
}

.doc h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.doc p {
  margin: 0;
  color: var(--muted);
}

body.landing .doc a {
  color: oklch(0.45 0.14 250);
}

body.landing .doc a:hover { text-decoration: underline; }

.doc code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--muted-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}

.code-card {
  margin: 22px 0 0;
  padding: 18px 20px;
  overflow: auto;
  border: 1px solid color-mix(in oklch, var(--line) 90%, transparent);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.doc .note {
  margin-top: 12px;
  font-size: 13px;
}

.facts {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid color-mix(in oklch, var(--line) 85%, transparent);
  border-radius: 12px;
}

.facts div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 16px;
  padding: 16px 18px;
  border-top: 1px solid color-mix(in oklch, var(--line) 85%, transparent);
}

.facts div:first-child { border-top: 0; }

.facts dt { font-weight: 600; }

.facts dd { margin: 0; color: var(--muted); }

@media (max-width: 720px) {
  .doc { padding-top: 104px; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
}

.rise {
  animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 800px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .step-grid { grid-template-columns: repeat(3, 1fr); gap: 48px; }
}

@media (min-width: 1024px) {
  .hero { padding: 144px 0 96px; }
  .hero-layout { grid-template-columns: 1fr 1fr; gap: 32px; }
}

html.in-frame .topbar { display: none; }

html.in-frame .hero { padding-top: 96px; }

@media (min-width: 1024px) {
  html.in-frame .hero { padding-top: 104px; }
}

@media (max-width: 720px) {
  html.in-frame .hero { padding-top: 88px; }
}

@media (max-width: 720px) {
  .wrap { width: min(72rem, calc(100% - 32px)); }
  .nav-links a:not(.btn) { padding: 6px 8px; }
  .hero { padding-top: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; }
  .dot::after { animation: none; }
  html { scroll-behavior: auto; }
}
