/* CloudBridge uses one brand accent throughout the official New API UI. These
   semantic tokens are also used by the console (primary CTAs, active sidebar
   entries, keyboard focus rings, links and selected controls), not just by the
   public landing page. */
:root,
html.light,
html.dark {
  --primary: #F0B90B !important;
  --primary-foreground: #171303 !important;
  --ring: #F0B90B !important;
  --sidebar-primary: #F0B90B !important;
  --sidebar-primary-foreground: #171303 !important;
  --sidebar-ring: #F0B90B !important;
}

html.dark {
  /* A gold-tinted surface keeps an active menu item visible without making
     the whole sidebar as bright as a primary action button. */
  --accent: #352B0D !important;
  --accent-foreground: #F0B90B !important;
  --sidebar-accent: #352B0D !important;
  --sidebar-accent-foreground: #F0B90B !important;
  --sidebar-border: #F0B90B2E !important;
}

html.light {
  --accent: #FFF5D5 !important;
  --accent-foreground: #735800 !important;
  --sidebar-accent: #FFF5D5 !important;
  --sidebar-accent-foreground: #735800 !important;
  --sidebar-border: #E6D7A8 !important;
}

:root {
  --model-relay-banner-height: 44px;
}

#model-relay-banner {
  --relay-banner-gold: #F0B90B;
  --relay-banner-ink: #171303;
  position: sticky;
  top: 0;
  z-index: 51;
  background-color: var(--relay-banner-gold);
  color: var(--relay-banner-ink);
  box-shadow: inset 0 -1px transparent;
  font: 500 14px/1.45 ui-sans-serif, system-ui, "Microsoft YaHei", sans-serif;
}

@media (prefers-reduced-motion: no-preference) {
  #model-relay-banner {
    animation: relay-banner-palette 12s ease-in-out infinite;
  }
}

@keyframes relay-banner-palette {
  0%, 45%, 100% {
    background-color: var(--relay-banner-gold);
    color: var(--relay-banner-ink);
    box-shadow: inset 0 -1px transparent;
  }

  50%, 95% {
    background-color: #000;
    color: #F5F5F5;
    box-shadow: inset 0 -1px var(--relay-banner-gold);
  }
}

#model-relay-banner + #root :is(header.fixed.top-0, [data-slot="sidebar-wrapper"] > header.sticky.top-0) {
  top: var(--model-relay-banner-height);
}

html.relay-home #model-relay-banner + #root header.fixed {
  background: var(--background);
}

html.dark.relay-home {
  --background: #000;
}

/* The console has its own viewport-height shell and scrollable content. */
#model-relay-banner + #root [data-slot="sidebar-wrapper"] {
  --relay-console-height: calc(100svh - var(--model-relay-banner-height));
  min-height: var(--relay-console-height);
}

#model-relay-banner + #root [data-slot="sidebar-container"] {
  top: calc(var(--model-relay-banner-height) + var(--app-header-height, 0px));
  height: auto;
}

#model-relay-banner + #root [data-slot="sidebar-inset"] {
  max-height: calc(var(--relay-console-height) - var(--app-header-height, 0px));
}

#model-relay-banner + #root [data-variant="inset"] ~ [data-slot="sidebar-inset"] {
  max-height: calc(var(--relay-console-height) - var(--app-header-height, 0px) - var(--spacing) * 4);
}

.relay-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  min-height: 44px;
  padding: 8px 16px;
  text-align: center;
}

.relay-banner-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 14px;
  border-right: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  font-weight: 700;
}

.relay-banner-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

#model-relay-banner a {
  padding: 2px 9px;
  border-radius: 999px;
  background-color: var(--relay-banner-ink);
  color: var(--relay-banner-gold);
  font-weight: 650;
  white-space: nowrap;
  text-underline-offset: 3px;
}

#model-relay-banner a:hover,
#model-relay-banner a:focus-visible {
  text-decoration: underline;
}

.relay-suppressed,
#root header a:is([href="/rankings"], [href="/about"]),
#root header.fixed button[aria-label*="v1.0.0-rc."] {
  display: none !important;
}

#root header {
  --relay-toolbar-surface: color-mix(in srgb, var(--foreground) 8%, var(--background));
  --relay-toolbar-hover: color-mix(in srgb, var(--foreground) 11%, var(--background));
}

#root header.fixed.top-0 > div {
  max-width: 82rem;
  padding: 0 clamp(12px, 3vw, 32px);
}

#root header.fixed.top-0 > div > nav {
  min-height: 3.5rem;
  padding-inline: 0;
  border-radius: 0;
  background: var(--background);
  box-shadow: none;
}

.relay-console-toolbar,
.relay-public-toolbar {
  column-gap: clamp(4px, 0.7vw, 12px);
  reading-flow: flex-visual;
}

.relay-console-toolbar > :has(> nav) {
  margin-inline-end: 0;
}

.relay-console-toolbar nav {
  gap: clamp(12px, 1.45vw, 24px);
  white-space: nowrap;
}

.relay-console-toolbar nav > a {
  margin-inline: 0;
}

.relay-public-toolbar > .h-4.w-px {
  display: none;
}

#root header button:has(.lucide-search) {
  order: -1;
  justify-content: center;
  border-color: transparent;
  border-radius: 8px;
  background: var(--relay-toolbar-surface);
}

#root header button:has(.lucide-search) > svg {
  inset-inline-start: 50%;
  translate: -50% -50%;
}

@media (min-width: 640px) {
  #root header button:has(.lucide-search) {
    width: clamp(9rem, 18vw, 17.5rem);
    justify-content: flex-start;
  }

  #root header button:has(.lucide-search) > svg {
    inset-inline-start: 0.75rem;
    translate: 0 -50%;
  }

  #root header button:has(.lucide-search) > span {
    margin-inline-start: 1.45rem;
  }

  #root header button:has(.lucide-search) > kbd {
    inset-block-start: 50%;
    inset-inline-end: 0.6rem;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .relay-console-toolbar > button:has(.lucide-search) {
    margin-inline-end: clamp(2px, 0.8vw, 12px);
  }

  .relay-console-toolbar > button[data-relay-language],
  .relay-public-toolbar > button[data-relay-language] {
    order: 1;
  }

  .relay-console-toolbar > button:has(.lucide-bell),
  .relay-public-toolbar > button:has(.lucide-bell) {
    order: 2;
  }

  .relay-console-toolbar > button:has([data-slot="avatar"]),
  .relay-public-toolbar > button:has([data-slot="avatar"]) {
    order: 3;
  }
}

#root header button[data-relay-language] {
  width: auto;
  gap: 6px;
  padding-inline: 7px;
  font-weight: 500;
}

#root header button[data-relay-language] > .lucide-languages {
  display: none;
}

#root header button[data-relay-language]::before {
  width: 17px;
  height: 17px;
  flex: none;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cellipse cx='12' cy='12' rx='4' ry='9'/%3E%3Cpath d='M3 12h18'/%3E%3C/svg%3E") center / contain no-repeat;
  content: "";
}

@media (min-width: 640px) {
  #root header button[data-relay-language]::after {
    content: attr(data-relay-language) / "";
  }
}

#root header button:has(> [data-slot="avatar"]) {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
}

#root header button > [data-slot="avatar"] {
  width: 100%;
  height: 100%;
}

#root header button > [data-slot="avatar"] > [data-slot="avatar-fallback"] {
  font-size: 0.8rem;
}

.relay-price-currency {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 3.75rem;
  min-height: 2rem;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
}

.relay-price-currency::after {
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  content: "";
  opacity: 0.7;
  transform: translateY(-1px) rotate(45deg);
}

#root header button:has(:is(.lucide-search, .lucide-bell, .lucide-languages, .lucide-palette, .lucide-sun, .lucide-moon, [data-slot="avatar"])) {
  border-color: transparent;
  color: var(--muted-foreground);
  box-shadow: none;

  &:hover {
    background: var(--relay-toolbar-hover);
    color: var(--foreground);
  }

  &:is(:active, :focus-visible, [aria-expanded="true"], [data-open]) {
    --relay-toolbar-outline: var(--ring);
  }

  outline: 2px solid var(--relay-toolbar-outline, transparent);
  outline-offset: 1px;
}

body:has([data-slot="dialog-content"][data-open] [data-slot="command-input"])
  #root .relay-console-toolbar > button:has(.lucide-search) {
  --relay-toolbar-outline: var(--ring);
}

.relay-price-currency:hover {
  background: var(--relay-toolbar-hover, var(--muted));
  color: var(--foreground);
}

.relay-price-currency:focus-within {
  outline: 2px solid var(--ring);
  outline-offset: 1px;
}

.relay-price-currency select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  appearance: none;
  border: 0;
  border-radius: inherit;
  outline: none;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.relay-price-currency option {
  background: var(--popover);
  color: var(--popover-foreground);
}

.relay-price-currency option:disabled {
  color: var(--muted-foreground);
}

.relay-home-hero {
  --relay-hero-gold: #886300;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: max(33rem, calc(100svh - var(--model-relay-banner-height)));
  padding: clamp(92px, 12vh, 144px) 24px clamp(60px, 11vh, 116px);
  overflow: hidden;
  background: var(--background);
}

html.dark .relay-home-hero {
  --relay-hero-gold: #F0B90B;
}

html.dark .relay-hero-title {
  color: #fff;
}

.relay-hero-points,
.relay-hero-cursor-field {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}

.relay-hero-cursor-field {
  width: 100%;
  height: 100%;
}

.relay-hero-points {
  mask-image: radial-gradient(ellipse at center, transparent 22%, #000 75%);
}

.relay-hero-points span {
  position: absolute;
  width: 4px;
  height: 2px;
  border-radius: 99px;
  transform: rotate(-28deg);
  background: #c29223;
  opacity: 0.62;
}

.relay-hero-points span:nth-child(3n) {
  width: 2px;
  background: #7996ca;
  transform: rotate(38deg);
}

.relay-hero-points span:nth-child(5n) {
  width: 5px;
  background: #a183a4;
  transform: rotate(24deg);
}

.relay-hero-lockup {
  width: min(100%, 100rem);
  min-width: 0;
  text-align: center;
}

.relay-hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: clamp(24px, 4vw, 48px);
  color: var(--foreground);
  font-size: clamp(1.125rem, 2vw, 1.625rem);
  font-weight: 650;
  letter-spacing: -0.025em;
}

.relay-hero-brand img {
  flex: 0 0 auto;
  object-fit: contain;
}

.relay-brand-logo {
  filter: brightness(0);
}

html.dark .relay-brand-logo {
  filter: brightness(0) invert(1);
}

.relay-hero-title {
  margin: 0;
  color: var(--foreground);
  font-size: clamp(2.125rem, 5.2vw, 6.25rem);
  font-weight: 740;
  line-height: 1.1;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.relay-hero-phrase {
  display: inline-block;
  max-width: 100%;
}

.relay-hero-accent {
  /* Keep the complete hero headline on one consistent foreground color. */
  color: inherit;
}

.relay-hero-zh,
:is(.relay-home-hero, .relay-home-details)[lang|="zh"] .relay-hero-en {
  display: none;
}

:is(.relay-home-hero, .relay-home-details)[lang|="zh"] .relay-hero-zh {
  display: inline;
}

.relay-hero-description {
  max-width: 38rem;
  margin: clamp(14px, 2vw, 26px) auto 0;
  color: var(--muted-foreground);
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  line-height: 1.65;
}

.relay-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(24px, 3.1vw, 42px);
}

.relay-hero-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none;
}

.relay-hero-actions .relay-action-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.relay-hero-actions .relay-action-outline {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
}

.relay-hero-actions a:focus-visible {
  outline: 2px solid var(--relay-hero-gold);
  outline-offset: 4px;
}

.relay-hero-actions a:hover {
  filter: brightness(1.08);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.relay-example {
  --terminal-border: #34363c;
  --terminal-muted: #b9bbc4;
  --terminal-gold: #f0b90b;
  container-type: inline-size;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--terminal-border);
  border-radius: 16px;
  background: #1a1b1f;
  color: #edeef2;
  font-family: ui-monospace, Consolas, monospace;
}

.relay-example-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--terminal-border);
  background: #23252a;
  color: var(--terminal-muted);
  font-size: 0.75rem;
}

.relay-example-top strong {
  color: #edeef2;
  font-size: 0.8125rem;
}

.relay-example-lights {
  display: inline-flex;
  gap: 6px;
}

.relay-example-lights i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f36b68;
}

.relay-example-lights i:nth-child(2) {
  background: #f0b90b;
}

.relay-example-lights i:nth-child(3) {
  background: #57be81;
}

.relay-example-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "mark path"
    "command command";
  align-items: center;
  gap: 11px 14px;
  padding: clamp(12px, 3.5cqi, 20px);
}

.relay-example-mark {
  grid-area: mark;
  justify-self: center;
  width: 42px;
  height: auto;
  image-rendering: pixelated;
}

@container (min-width: 30rem) {
  .relay-example-body {
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-areas:
      "mark path"
      "mark command";
    column-gap: 19px;
  }

  .relay-example-mark {
    align-self: start;
    width: 84px;
    margin-top: 6px;
  }
}

.relay-example-path {
  grid-area: path;
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  color: #e2e4ea;
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.relay-example-path > span {
  flex: none;
  padding: 2px 7px;
  border: 1px solid #f0b90b35;
  border-radius: 4px;
  background: #f0b90b12;
  color: var(--terminal-gold);
  font-weight: 650;
}

.relay-example pre {
  grid-area: command;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--terminal-border);
  border-radius: 7px;
  background: #121316;
  font-size: 0.8125rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.relay-example code {
  font: inherit;
}

.relay-code-command {
  color: var(--terminal-gold);
  font-weight: 650;
}

.relay-code-flag {
  color: #aebbd3;
}

.relay-code-value {
  color: #f4d58b;
}

.relay-docs-code pre {
  margin: 0;
  overflow-x: auto;
  padding: 16px 20px;
  font: 0.8125rem/1.65 ui-monospace, Consolas, monospace;
}

.relay-docs-config [hidden],
.relay-catalog [hidden] {
  display: none !important;
}

.relay-example-tabs,
.relay-docs-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.relay-example-tabs {
  margin-inline-end: auto;
}

.relay-example-tabs button,
.relay-basic-button,
.relay-text-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 4px 10px;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.relay-example-tabs button[aria-pressed="true"],
.relay-basic-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-foreground);
}

.relay-example-tabs button:focus-visible,
.relay-basic-button:focus-visible,
.relay-text-button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.relay-copy-feedback {
  color: var(--accent-foreground);
  font-size: .8125rem;
}

.relay-copy-feedback:empty {
  display: none;
}

.relay-docs-config {
  scroll-margin-top: calc(var(--model-relay-banner-height, 44px) + 24px);
  margin-top: 22px;
  border: 1px solid var(--docs-border);
  border-radius: 14px;
  padding: clamp(16px, 3vw, 26px);
  background: var(--docs-surface);
}

.relay-docs-tabs {
  margin-top: 14px;
}

html.relay-pricing-list .relay-catalog-stock {
  display: none !important;
}

.relay-catalog {
  position: relative;
  width: min(100%, 82rem);
  margin-inline: auto;
  padding: 92px clamp(16px, 3vw, 42px) 56px;
}

.relay-catalog h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 720;
  letter-spacing: -.04em;
}

.relay-catalog-lead {
  margin: 8px 0 24px;
  color: var(--muted-foreground);
}

.relay-catalog-guide {
  float: right;
  padding-block: 10px;
  color: var(--accent-foreground);
  font-size: .875rem;
}

.relay-catalog-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--card);
}

.relay-catalog-filters > label,
.relay-catalog-currency {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--muted-foreground);
  font-size: .8rem;
}

.relay-catalog-filters :is(input, select):not(.relay-price-currency select),
.relay-catalog-currency .relay-price-currency {
  min-width: 0;
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding-inline: 10px;
  background: var(--background);
  color: var(--foreground);
}

.relay-catalog-filters select option {
  background: var(--popover);
  color: var(--popover-foreground);
}

.relay-catalog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-block: 16px 10px;
  color: var(--muted-foreground);
  font-size: .8125rem;
}

.relay-catalog-count {
  color: var(--foreground);
  font-weight: 650;
}

.relay-catalog-results {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.relay-catalog-state {
  padding: clamp(26px, 6vw, 64px) 18px;
  text-align: center;
}

.relay-catalog-state h2 {
  font-size: 1.15rem;
  font-weight: 680;
}

.relay-catalog-state p {
  margin-block: 6px 14px;
  color: var(--muted-foreground);
}

.relay-price-table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
}

.relay-price-table :is(th, td) {
  border-bottom: 1px solid var(--border);
  padding: 11px clamp(8px, 1.1vw, 16px);
  text-align: start;
  vertical-align: top;
}

.relay-price-table thead {
  color: var(--muted-foreground);
  font-size: .8125rem;
}

.relay-price-table tbody > tr:last-child > td {
  border-bottom: 0;
}

.relay-price-table td small {
  display: block;
  color: var(--muted-foreground);
  font-size: .75rem;
}

.relay-price-model {
  overflow-wrap: anywhere;
}

.relay-model-id {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.relay-model-id code {
  min-width: 0;
  font-weight: 600;
}

.relay-text-button {
  min-height: 28px;
  padding-block: 2px;
  color: var(--accent-foreground);
  white-space: nowrap;
}

.relay-price-value {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.relay-model-panel {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px;
  background: var(--popover);
}

.relay-model-panel p {
  margin: 0 0 8px;
  color: var(--muted-foreground);
}

.relay-model-panel .relay-docs-actions {
  margin-top: 12px;
}

.relay-model-guide {
  margin-top: 8px;
}

@media (max-width: 699px) {
  .relay-catalog-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .relay-catalog-search {
    grid-column: 1 / -1;
  }

  .relay-catalog-results > .relay-price-table > thead,
  .relay-model-panel .relay-price-table > thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .relay-price-table :is(tbody, tr, td) {
    display: block;
  }

  .relay-price-table tbody > tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }

  .relay-price-table tbody > tr:last-child,
  .relay-price-table tbody > tr > td {
    border-bottom: 0;
  }

  .relay-price-model,
  .relay-price-action,
  .relay-model-detail-row > td,
  .relay-model-panel td:first-child {
    grid-column: 1 / -1;
  }

  .relay-price-value::before {
    display: block;
    color: var(--muted-foreground);
    content: attr(data-label) / "";
    font-size: .75rem;
  }

}

.relay-pricing-note a {
  color: var(--accent-foreground);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.relay-example a {
  display: block;
  padding: 11px clamp(12px, 3.5cqi, 20px);
  border-top: 1px solid var(--terminal-border);
  color: var(--terminal-gold);
  font-size: 0.8125rem;
}

.relay-example a:hover,
.relay-example a:focus-visible {
  background: #f0b90b10;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.relay-example a:focus-visible {
  outline: 2px solid var(--terminal-gold);
  outline-offset: -3px;
}

/* Decorative icon band between the hero and the three steps. The list is wider
   than the viewport on purpose: the row slides within it, so icons glide in and
   out of the edges instead of leaving a gap. */
.relay-home-wave {
  position: relative;
  padding: clamp(88px, 11vw, 148px) 0 clamp(30px, 4.2vw, 50px);
  background: var(--background);
  /* Decorative only. The window below is taller than its visual box (mask
     headroom, see below); without this the transparent overhang would swallow
     pointerleave near the hero and stall its cursor particle field. */
  pointer-events: none;
}

/* The band replaced the hairline that used to separate the hero from the
   steps, so drop the rule on the section that now follows it. */
.relay-home-wave + .relay-home-details {
  border-top: 0;
}

/* The wave lifts and drops each bubble by about a third of its height, so the
   masking box needs vertical headroom of its own: a mask only covers the border
   box, and anything painted outside it is treated as fully transparent, which
   would slice the tops off the bubbles. The padding is cancelled by an equal
   negative margin, so the icons keep their position and only the paint box
   grows. */
.relay-wave-window {
  --wave-headroom: clamp(44px, 4.4vw, 54px);
  padding-block: var(--wave-headroom);
  margin-block: calc(var(--wave-headroom) * -1);
  overflow-x: clip;
  overflow-y: visible;
  mask-image: linear-gradient(90deg, transparent, #000 clamp(20px, 6vw, 88px), #000 calc(100% - clamp(20px, 6vw, 88px)), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 clamp(20px, 6vw, 88px), #000 calc(100% - clamp(20px, 6vw, 88px)), transparent);
}

.relay-wave-list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(8px, 0.7vw, 12px);
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}

.relay-wave-list > li {
  flex: none;
  padding: 0;
}

.relay-wave-icon {
  display: grid;
  place-items: center;
  width: clamp(54px, 5.4vw, 76px);
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  color: var(--muted-foreground);
  font-size: clamp(21px, 2.05vw, 27px);
  will-change: transform;
  backface-visibility: hidden;
}

html.dark .relay-wave-icon {
  border-color: color-mix(in srgb, #F0B90B 16%, transparent);
  background: color-mix(in srgb, #F0B90B 7%, #050505);
  color: #d3ab4c;
}

/* Brand marks are filled glyphs (simple-icons), not strokes: inherit the badge
   colour and drop the stroke settings the old geometry needed. */
.relay-wave-icon svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
  stroke: none;
}

.relay-wave-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* The band is only inserted on the landing page; hide it if a client-side
   navigation leaves the DOM behind. */
html:not(.relay-home) .relay-home-wave {
  display: none;
}

.relay-home-details {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  width: min(100% - 48px, 72rem);
  margin: 0 auto;
  padding: clamp(44px, 8vw, 88px) 0;
  border-top: 1px solid var(--border);
}

.relay-first-steps h2 {
  margin: 0 0 18px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 750;
}

.relay-first-steps ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.relay-first-steps a {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 4px 8px;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  color: var(--muted-foreground);
  font-size: .875rem;
}

.relay-first-steps a:hover {
  border-color: var(--primary);
}

.relay-first-steps strong {
  color: var(--foreground);
  font-size: 1rem;
}

.relay-step-number {
  grid-row: span 2;
  align-self: center;
  color: var(--accent-foreground);
  font: 600 0.75rem ui-monospace, Consolas, monospace;
}

.relay-footer-about {
  display: block;
  width: fit-content;
  margin: 0 auto 16px;
  color: var(--muted-foreground);
  font-size: .875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.relay-pricing-note {
  max-width: 19rem;
  color: var(--muted-foreground);
  font-size: .875rem;
}

.relay-pricing-note strong {
  color: var(--foreground);
  font-size: 1rem;
}

.relay-pricing-note p {
  margin: 6px 0 12px;
}

.relay-docs {
  --docs-bg: #0c0e11;
  --docs-surface: #171a20;
  --docs-fg: #f7f7f5;
  --docs-muted: #b9bcc4;
  --docs-border: #2e3139;
  --docs-accent: #F0B90B;
  --foreground: var(--docs-fg);
  --border: var(--docs-border);
  --accent-foreground: var(--docs-accent);
  box-sizing: border-box;
  margin: 0;
  background: var(--docs-bg);
  color: var(--docs-fg);
  font: 400 16px/1.65 ui-sans-serif, system-ui, "Microsoft YaHei", sans-serif;
}

.relay-docs *,
.relay-docs *::before,
.relay-docs *::after {
  box-sizing: inherit;
}

html.light .relay-docs {
  --docs-bg: #faf9f6;
  --docs-surface: #fff;
  --docs-fg: #1f2228;
  --docs-muted: #525760;
  --docs-border: #ddd9ce;
  --docs-accent: #735800;
}

.relay-docs-width {
  width: min(100% - 36px, 52rem);
  margin-inline: auto;
}

.relay-docs-header {
  border-bottom: 1px solid var(--docs-border);
}

.relay-docs-header nav,
.relay-docs-header nav > div,
.relay-docs-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.relay-docs-header nav {
  justify-content: space-between;
  min-height: 58px;
  padding-block: 8px;
}

.relay-docs a {
  color: var(--docs-accent);
  text-underline-offset: 3px;
}

.relay-docs .relay-docs-brand {
  color: var(--docs-fg);
  font-weight: 750;
  text-decoration: none;
}

.relay-docs main {
  padding-block: clamp(30px, 6vw, 68px);
}

.relay-docs h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
}

.relay-docs h2 {
  margin: 0;
  font-size: 1.15rem;
}

.relay-docs p,
.relay-docs ul {
  margin: 8px 0 0;
  color: var(--docs-muted);
}

.relay-docs .relay-docs-lead {
  margin: 12px 0 28px;
}

.relay-docs-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 0 0 0 1.6em;
}

.relay-docs-steps > li {
  min-width: 0;
  scroll-margin-top: 6rem;
  padding: 16px;
  border: 1px solid var(--docs-border);
  border-radius: 14px;
  background: var(--docs-surface);
}

.relay-docs-steps > li::marker {
  color: var(--docs-accent);
  font-weight: 700;
}

.relay-docs-code {
  min-width: 0;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--docs-border);
  border-radius: 10px;
  background: var(--docs-bg);
}

.relay-docs-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--docs-border);
  font-size: .875rem;
}

.relay-docs-code button {
  min-height: 32px;
  padding: 3px 9px;
  border: 1px solid var(--docs-border);
  border-radius: 7px;
  background: var(--docs-surface);
  color: var(--docs-accent);
  font: inherit;
  cursor: pointer;
}

.relay-docs-code > code {
  display: block;
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

#relay-copy-feedback:empty {
  display: none;
}

.relay-docs-section {
  margin-top: 30px;
}

.relay-docs-footer {
  padding-block: 20px;
  border-top: 1px solid var(--docs-border);
  color: var(--docs-muted);
  font-size: .875rem;
}

@media (max-width: 760px) {
  .relay-home-details {
    grid-template-columns: minmax(0, 1fr);
  }
}

.relay-docs a.relay-basic-primary {
  color: var(--primary-foreground);
}

.relay-account-panel {
  flex-shrink: 0;
  margin: 12px 16px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  padding: 16px;
}

.relay-account-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.relay-account-top > div:not(.relay-docs-actions) {
  display: grid;
  gap: 2px;
  font-size: .85rem;
  color: var(--muted-foreground);
}

.relay-account-top strong {
  font-size: 1.3rem;
  color: var(--foreground);
}

.relay-account-recent h2 {
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 650;
}

.relay-account-log-list {
  overflow-x: auto;
  font-size: .825rem;
  color: var(--muted-foreground);
}

.relay-account-log-table {
  width: 100%;
  text-align: start;
  border-collapse: collapse;
}

.relay-account-log-table :is(th, td) {
  border-bottom: 1px solid var(--border);
  padding: 8px;
  text-align: start;
}

.relay-account-log-table td {
  color: var(--foreground);
}

.relay-account-log-table tr:last-child td {
  border-bottom: 0;
}

.relay-account-log-table :is(th, td):not(:nth-child(2)) {
  white-space: nowrap;
}

.relay-key-continuation,
.relay-playground-request,
.relay-request-lookup {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.relay-key-continuation,
.relay-playground-request {
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  margin: 12px 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--card);
}

.relay-key-continuation code,
.relay-playground-request code,
.relay-request-fields dd {
  overflow-wrap: anywhere;
}

.relay-request-lookup {
  margin-block: 8px 12px;
}

.relay-request-lookup label,
.relay-key-group-filter {
  display: grid;
  gap: 4px;
  color: var(--muted-foreground, var(--docs-muted));
  font-size: .8125rem;
}

.relay-request-lookup label {
  flex: 1 1 18rem;
  min-width: 0;
}

.relay-request-lookup input,
.relay-key-group-filter select {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 8px;
  background: var(--background, var(--docs-bg));
  color: var(--foreground);
}

.relay-request-lookup [disabled] {
  opacity: .55;
  cursor: default;
}

.relay-request-lookup .relay-copy-feedback {
  flex-basis: 100%;
}

.relay-request-fields {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 16px;
  margin: 12px 0;
}

.relay-request-fields dd {
  margin: 0;
  color: var(--foreground);
}

.relay-wallet-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.relay-wallet-heading h2 {
  font-size: 1rem;
  font-weight: 650;
}

.relay-wallet-status {
  margin: 8px 0 0;
  color: var(--muted-foreground);
}

.relay-wallet-status[data-order-status="pending"] {
  color: var(--relay-gold, #f0b90b);
}

.relay-wallet-fields[hidden] {
  display: none;
}

.relay-wallet-fields dd {
  overflow-wrap: anywhere;
}

.relay-model-access {
  margin-top: 14px;
}

.relay-model-access h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 650;
}

.relay-key-group-filter {
  max-width: 20rem;
  margin: 10px 0;
}

.relay-price-table td .relay-group-access {
  color: var(--accent-foreground);
}

.relay-group-access:empty {
  display: none;
}

@media (max-width: 700px) {
  .relay-account-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .relay-account-top .relay-docs-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .relay-banner-inner {
    gap: 3px 9px;
    font-size: 13px;
  }

  .relay-banner-label {
    padding-right: 9px;
  }

  .relay-hero-title {
    font-size: clamp(1.875rem, 8.8vw, 2.75rem);
  }

  .relay-hero-actions {
    gap: 8px;
  }

  .relay-hero-actions a {
    min-height: 46px;
    padding-inline: 13px;
    font-size: .875rem;
  }
}
