:root {
  --bg: 42 27% 97%;
  --bg-soft: 40 24% 94%;
  --surface: 0 0% 100%;
  --surface-strong: 36 24% 98%;
  --surface-muted: 42 31% 93%;
  --text: 190 10% 18%;
  --text-muted: 222 12% 45%;
  --text-soft: 220 12% 64%;
  --border: 38 22% 89%;
  --border-strong: 37 17% 82%;
  --ring: 119 18% 58%;
  --accent: 119 18% 58%;
  --accent-strong: 118 15% 48%;
  --accent-soft: 118 22% 90%;
  --warm: 31 38% 82%;
  --orange: 31 91% 48%;
  --blue: 222 84% 56%;
  --success: 119 18% 48%;
  --warning: 33 90% 45%;
  --danger: 358 74% 58%;
  --button: 119 18% 58%;
  --button-text: 0 0% 100%;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 24px 70px rgba(54, 48, 38, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, "SF Pro Display", "Segoe UI", sans-serif;
  color: hsl(var(--text));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), transparent 340px),
    hsl(var(--bg));
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.page {
  min-height: 100vh;
  padding: 96px 24px 36px;
}

.page-center {
  display: grid;
  place-items: center;
}

.site-shell,
.container {
  width: min(100%, 1320px);
  margin: 0 auto;
}

.narrow {
  width: min(100%, 640px);
  margin: 0 auto;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  min-height: 76px;
  padding: 0 max(24px, calc((100vw - 1320px) / 2));
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid hsl(var(--border));
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: hsl(var(--text));
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: hsl(var(--accent));
  color: hsl(var(--button-text));
  display: grid;
  place-items: center;
  font-size: 0;
  font-weight: 800;
}

.brand-mark::before {
  content: "O";
  font-size: 1.05rem;
  letter-spacing: 0;
}

.brand-copy {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-copy::first-letter {
  color: hsl(var(--text));
}

.topnav {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-link,
.nav-button {
  position: relative;
  color: hsl(var(--text-muted));
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 700;
  background: transparent;
  cursor: pointer;
  padding: 26px 0;
  transition: color 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active,
.nav-button:hover,
.nav-button:focus-visible {
  color: hsl(var(--accent-strong));
}

.nav-link.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: hsl(var(--accent));
}

.stack {
  display: grid;
  gap: 1rem;
}

.inline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-shell {
  width: min(100%, 720px);
}

.card,
.panel,
.notice {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow);
}

.card {
  border-radius: 26px;
}

.card-body {
  padding: clamp(30px, 4vw, 56px);
}

.form-card .card-body {
  padding-inline: clamp(28px, 4vw, 74px);
  padding-block: clamp(34px, 5vw, 60px);
}

.hero-card {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.hero-card .card-body {
  padding: clamp(42px, 6vw, 92px) 0 34px;
}

.eyebrow {
  width: fit-content;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  color: hsl(var(--orange));
  background: hsl(31 90% 95%);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
  font-weight: 800;
}

.title {
  margin: 0;
  max-width: 720px;
  font-size: clamp(3.2rem, 6.7vw, 6.1rem);
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.title em {
  color: hsl(var(--accent));
  font-style: italic;
}

.section-title {
  margin: 0;
  font-size: clamp(2.2rem, 4.2vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.form-title {
  margin: 0;
  font-size: clamp(2.3rem, 4.8vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.description,
.muted {
  margin: 0;
  color: hsl(var(--text-muted));
  line-height: 1.58;
}

.lead {
  max-width: 620px;
  font-size: clamp(1.08rem, 1.55vw, 1.32rem);
  font-weight: 500;
}

.centered {
  text-align: center;
}

.centered .eyebrow,
.centered .lead {
  margin-inline: auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--text-muted));
  background: hsl(var(--surface));
}

.pill strong {
  color: hsl(var(--text));
}

.hero-grid,
.metrics-grid,
.sidebar-grid,
.summary-grid,
.quick-grid {
  display: grid;
  gap: 28px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.96fr);
  align-items: center;
}

.metrics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sidebar-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
}

.summary-grid,
.quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  border-radius: 22px;
  padding: 28px;
}

.panel h2,
.panel h3,
.panel h4,
.panel p {
  margin-top: 0;
}

.mock-shell {
  border-radius: 72px;
  background: hsl(var(--warm));
  padding: clamp(34px, 4vw, 54px);
  box-shadow: 0 34px 90px rgba(118, 94, 62, 0.14);
}

.mock-window {
  min-height: 456px;
  border-radius: 42px;
  background: hsl(var(--surface));
  padding: clamp(28px, 4vw, 42px);
  display: grid;
  align-content: start;
  gap: 26px;
}

.mock-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: hsl(var(--text-soft));
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.86rem;
  font-weight: 700;
}

.traffic {
  display: flex;
  gap: 9px;
}

.traffic span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: block;
}

.traffic span:nth-child(1) { background: #ff6666; }
.traffic span:nth-child(2) { background: #ffbd2e; }
.traffic span:nth-child(3) { background: #58d36b; }

.mock-line,
.mock-input,
.mock-button,
.mock-dot {
  border-radius: 8px;
  background: hsl(var(--bg-soft));
}

.mock-line {
  width: 34%;
  height: 16px;
}

.mock-input {
  width: 100%;
  height: 46px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--surface-strong));
}

.mock-button {
  height: 54px;
  background: hsl(var(--accent));
}

.mock-dots {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding-top: 10px;
}

.mock-dot {
  width: 46px;
  height: 46px;
  border-radius: 999px;
}

.quick-label {
  margin: 56px 0 8px;
  color: hsl(var(--text-soft));
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.9rem;
  font-weight: 800;
}

.action-card {
  min-height: 250px;
  display: grid;
  align-content: start;
  gap: 20px;
}

.action-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: hsl(var(--accent-strong));
  background: hsl(var(--accent-soft));
  font-size: 1.45rem;
  font-weight: 800;
}

.action-icon.orange {
  color: hsl(var(--orange));
  background: hsl(31 90% 94%);
}

.action-icon.blue {
  color: white;
  background: hsl(var(--blue));
}

.action-link {
  color: hsl(var(--accent-strong));
  font-weight: 800;
  text-decoration: none;
}

.action-link.orange {
  color: hsl(var(--orange));
}

.action-link.blue {
  color: hsl(var(--blue));
}

.field {
  display: grid;
  gap: 10px;
}

.field label,
.label {
  color: hsl(var(--text-muted));
  font-size: 0.95rem;
  font-weight: 700;
}

.helper {
  color: hsl(var(--text-soft));
  font-size: 0.94rem;
  line-height: 1.5;
  margin: 0;
}

.input,
.textarea,
.select,
.value-box {
  width: 100%;
  border: 1px solid hsl(var(--border-strong));
  background: hsl(var(--surface));
  color: hsl(var(--text));
  border-radius: 16px;
  padding: 17px 19px;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: hsl(var(--text-soft));
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 4px hsl(var(--accent) / 0.15);
}

.textarea {
  resize: vertical;
  min-height: 126px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 58px;
  padding: 0.9rem 1.45rem;
  border-radius: 16px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.button-primary {
  background: hsl(var(--button));
  color: hsl(var(--button-text));
  box-shadow: 0 16px 34px hsl(var(--accent) / 0.18);
}

.button-secondary {
  background: hsl(var(--surface));
  color: hsl(var(--text));
  border-color: hsl(var(--border));
}

.button-ghost {
  background: transparent;
  color: hsl(var(--text-muted));
  border-color: hsl(var(--border));
}

.full-width {
  width: 100%;
}

.error,
.success,
.warning-card {
  border-radius: 16px;
  padding: 14px 16px;
}

.error {
  display: none;
  border: 1px solid hsl(var(--danger) / 0.26);
  background: hsl(var(--danger) / 0.08);
  color: hsl(var(--danger));
}

.notice {
  border-radius: 22px;
  padding: 24px;
  color: hsl(var(--text-muted));
}

.success {
  border: 1px solid hsl(var(--success) / 0.25);
  background: hsl(var(--success) / 0.09);
  color: hsl(var(--success));
}

.warning-card {
  border: 1px solid hsl(var(--warning) / 0.25);
  background: hsl(var(--warning) / 0.08);
  color: hsl(var(--warning));
}

.splitter {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: hsl(var(--text-soft));
  font-weight: 700;
}

.splitter::before,
.splitter::after {
  content: "";
  height: 1px;
  background: hsl(var(--border));
}

.mono {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}

.output {
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
}

.stat-card {
  min-height: 230px;
}

.stat-label {
  margin: 0;
  color: hsl(var(--text-soft));
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  font-weight: 800;
}

.stat-value {
  margin: 14px 0 10px;
  font-size: clamp(1.65rem, 2.2vw, 2.3rem);
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.profile-card {
  display: grid;
  gap: 22px;
}

.profile-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.avatar,
.avatar-fallback {
  width: 82px;
  height: 82px;
  border-radius: 999px;
}

.avatar {
  object-fit: cover;
  background: hsl(var(--bg-soft));
  border: 1px solid hsl(var(--border));
}

.avatar-fallback {
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  background: hsl(var(--accent));
}

.profile-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.value-list {
  display: grid;
  gap: 12px;
}

.value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.value-box {
  min-height: 68px;
  overflow-wrap: anywhere;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 16px;
  align-items: start;
}

.auth-links {
  display: grid;
  gap: 24px;
}

.footer {
  margin-top: 50px;
  padding-top: 22px;
  border-top: 1px solid hsl(var(--border));
  text-align: center;
  color: hsl(var(--text-soft));
}

.hidden {
  display: none !important;
}

.code {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  background: hsl(var(--bg-soft));
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  padding: 0.12rem 0.44rem;
}

/* ── Landing page: who-grid ── */
.who-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.who-card {
  display: grid;
  align-content: start;
  gap: 24px;
}

.feature-list {
  margin: 0;
  padding: 0 0 0 20px;
  display: grid;
  gap: 8px;
  color: hsl(var(--text-muted));
  line-height: 1.55;
  font-size: 0.97rem;
}

/* ── Landing page: services grid ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.service-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.service-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.endpoint-badge {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: hsl(var(--accent-strong));
  background: hsl(var(--accent-soft));
  border: 1px solid hsl(var(--accent) / 0.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.endpoint-badge.orange {
  color: hsl(var(--orange));
  background: hsl(31 90% 94%);
  border-color: hsl(var(--orange) / 0.25);
}

.endpoint-badge.blue {
  color: hsl(var(--blue));
  background: hsl(222 84% 96%);
  border-color: hsl(var(--blue) / 0.25);
}

.service-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

/* ── Landing page: how-it-works steps ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.step-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.step-num {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 800;
  background: hsl(var(--accent));
  color: white;
  flex-shrink: 0;
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-block: 10px;
  }

  .page {
    padding-top: 152px;
  }

  .hero-grid,
  .sidebar-grid,
  .summary-grid,
  .quick-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .who-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page {
    padding: 146px 16px 24px;
  }

  .topnav {
    gap: 16px;
  }

  .nav-link,
  .nav-button {
    padding: 8px 0;
  }

  .form-card .card-body,
  .card-body {
    padding-inline: 22px;
    padding-block: 28px;
  }

  .copy-row,
  .profile-row {
    grid-template-columns: 1fr;
  }

  .mock-shell {
    border-radius: 38px;
    padding: 22px;
  }

  .mock-window {
    border-radius: 28px;
    min-height: 360px;
  }
}

@media (max-width: 520px) {
  .brand-copy {
    font-size: 1.12rem;
  }

  .button {
    min-height: 54px;
    width: 100%;
  }
}
