:root {
  color-scheme: dark;
  --ink: #090b0a;
  --ink-soft: #0d100e;
  --graphite: #131713;
  --graphite-2: #191d19;
  --ivory: #f2eee2;
  --ivory-dim: #d4d1c7;
  --muted: #92988f;
  --muted-2: #697069;
  --line: rgba(238, 235, 222, 0.13);
  --line-strong: rgba(238, 235, 222, 0.22);
  --lime: #c8f169;
  --lime-soft: rgba(200, 241, 105, 0.12);
  --lime-dark: #17200f;
  --copper: #c47b54;
  --copper-soft: rgba(196, 123, 84, 0.14);
  --danger: #ed8c79;
  --danger-soft: rgba(237, 140, 121, 0.12);
  --success: #a6d77c;
  --warning: #e1b86d;
  --sans: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --shell: min(1280px, calc(100vw - 40px));
  --header-height: 72px;
  --radius: 8px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  scroll-behavior: smooth;
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  color: var(--ivory);
  background:
    radial-gradient(circle at 15% 6%, rgba(90, 117, 42, 0.08), transparent 30rem),
    radial-gradient(circle at 88% 32%, rgba(152, 78, 44, 0.08), transparent 35rem),
    var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

#site-root,
#main-content,
main,
section {
  max-width: 100%;
  min-width: 0;
}

body.modal-open {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

::selection {
  color: var(--ink);
  background: var(--lime);
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--lime);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.shader-canvas,
.ambient-grid {
  position: fixed;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.shader-canvas {
  opacity: 0.72;
}

.ambient-grid {
  z-index: -1;
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(242, 238, 226, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 238, 226, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0.7) 60%, transparent 100%);
}

.no-webgl .shader-canvas {
  display: none;
}

.shell {
  width: var(--shell);
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
}

.eyebrow {
  margin: 0;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow.copper {
  color: var(--copper);
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--mono);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-header {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 10, 0.72);
  backdrop-filter: blur(18px) saturate(120%);
}

.site-header-inner {
  display: flex;
  width: var(--shell);
  min-height: var(--header-height);
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-header.is-sticky {
  position: sticky;
  top: 0;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  color: var(--ivory);
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.brand-mark {
  display: grid;
  position: relative;
  width: 31px;
  height: 31px;
  place-items: center;
  color: var(--lime);
  border: 1px solid var(--line-strong);
  background: rgba(200, 241, 105, 0.04);
}

.brand-mark::after {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--lime);
  border-bottom: 1px solid var(--lime);
  content: "";
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-slash {
  color: var(--muted-2);
}

.public-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.public-nav a {
  position: relative;
  color: var(--ivory-dim);
  font-size: 0.8rem;
  font-weight: 600;
}

.public-nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: var(--lime);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.public-nav a:hover::after,
.public-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  padding: 0 17px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.48;
}

.btn svg,
.icon-btn svg,
.nav-icon svg,
.inline-icon svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.btn-primary {
  color: #10140c;
  border-color: var(--lime);
  background: var(--lime);
  box-shadow: 0 10px 35px rgba(200, 241, 105, 0.1);
}

.btn-primary:hover:not(:disabled) {
  background: #d5fa7d;
}

.btn-secondary {
  color: var(--ivory);
  border-color: var(--line-strong);
  background: rgba(242, 238, 226, 0.04);
}

.btn-secondary:hover:not(:disabled) {
  border-color: rgba(200, 241, 105, 0.48);
  background: var(--lime-soft);
}

.btn-quiet {
  min-height: 38px;
  padding-inline: 11px;
  color: var(--ivory-dim);
  border-color: transparent;
  background: transparent;
}

.btn-quiet:hover:not(:disabled) {
  color: var(--lime);
  background: var(--lime-soft);
}

.btn-danger {
  color: #ffd8cf;
  border-color: rgba(237, 140, 121, 0.26);
  background: var(--danger-soft);
}

.btn-danger:hover:not(:disabled) {
  border-color: rgba(237, 140, 121, 0.55);
  background: rgba(237, 140, 121, 0.18);
}

.btn-sm {
  min-height: 36px;
  padding-inline: 12px;
  font-size: 0.72rem;
}

.icon-btn {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(242, 238, 226, 0.025);
  cursor: pointer;
  transition: 160ms ease;
}

.icon-btn:hover {
  color: var(--lime);
  border-color: rgba(200, 241, 105, 0.35);
  background: var(--lime-soft);
}

.hero {
  display: grid;
  min-height: min(780px, calc(100svh - var(--header-height)));
  padding-block: 88px 64px;
  align-items: center;
  gap: 72px;
  grid-template-columns: minmax(0, 1.02fr) minmax(390px, 0.78fr);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: flex;
  margin-bottom: 25px;
  align-items: center;
  gap: 12px;
}

.live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(200, 241, 105, 0.08);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.25rem, 5.2vw, 5.1rem);
  font-weight: 400;
  letter-spacing: -0.048em;
  line-height: 0.96;
}

.hero h1 em {
  color: var(--lime);
  font-weight: 400;
}

.hero-lead {
  max-width: 620px;
  margin: 28px 0 0;
  color: var(--ivory-dim);
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  margin-top: 34px;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
}

.hero-facts {
  display: flex;
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
  gap: 0;
}

.hero-facts li {
  min-width: 145px;
  padding: 3px 24px 3px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  line-height: 1.6;
  text-transform: uppercase;
}

.hero-facts li + li {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.hero-facts strong {
  display: block;
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
}

.hero-visual {
  position: relative;
  min-width: 0;
  perspective: 1200px;
}

.console-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(13, 16, 14, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.console-frame::before {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 84px;
  height: 1px;
  background: var(--lime);
  content: "";
}

.console-bar {
  display: flex;
  min-height: 47px;
  padding: 0 17px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 238, 226, 0.025);
}

.console-dots {
  display: flex;
  gap: 7px;
}

.console-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
}

.console-dots span:first-child {
  background: var(--copper);
}

.console-path {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
}

.console-body {
  padding: 27px 26px 24px;
}

.request-label {
  display: flex;
  margin-bottom: 17px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.request-method {
  color: var(--lime);
}

.code-block {
  overflow-x: auto;
  margin: 0;
  color: #cbcfc4;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.85;
  tab-size: 2;
  scrollbar-width: thin;
}

.token-key {
  color: #b4cc80;
}

.token-string {
  color: #d89b79;
}

.token-fade {
  color: var(--muted-2);
}

.response-row {
  display: grid;
  margin-top: 24px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
  grid-template-columns: 1fr auto;
  gap: 20px;
}

.response-copy {
  color: var(--ivory-dim);
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.55;
}

.response-meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.61rem;
  line-height: 1.75;
  text-align: right;
}

.response-meta strong {
  display: block;
  color: var(--lime);
  font-weight: 500;
}

.console-foot {
  display: flex;
  min-height: 44px;
  padding-inline: 18px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-2);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.status-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.status-inline::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  content: "";
}

.floating-note {
  position: absolute;
  right: -24px;
  bottom: -31px;
  width: 190px;
  padding: 15px 17px;
  border: 1px solid var(--line-strong);
  background: rgba(24, 29, 24, 0.93);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.3);
  transform: rotate(-1.5deg);
}

.floating-note .eyebrow {
  font-size: 0.58rem;
}

.floating-note strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 1.13rem;
  font-weight: 400;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.model-rail-section {
  padding-block: 32px 86px;
}

.section-rule-title {
  display: flex;
  margin-bottom: 24px;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-rule-title::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.model-rail {
  display: grid;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rail-model {
  display: flex;
  min-width: 0;
  min-height: 90px;
  padding: 17px 19px;
  align-items: center;
  gap: 13px;
}

.rail-model + .rail-model {
  border-left: 1px solid var(--line);
}

.model-glyph {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--lime);
  border: 1px solid var(--line-strong);
  font-family: var(--serif);
  font-size: 1rem;
}

.model-glyph svg,
.model-brand-icon svg,
.breakdown-model-icon svg {
  width: 20px;
  height: 20px;
}

.model-official {
  overflow: hidden;
  padding: 4px;
  background: #090b0a;
}

.model-official img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
}

.model-official.model-brand-minimax {
  padding: 0;
  border-color: rgba(238, 141, 99, 0.35);
}

.model-brand-kimi { color: #d5dcff; }
.model-brand-zai { color: #f2eee2; }
.model-brand-minimax { color: #ee8d63; }
.model-brand-gemini { color: #8eb9ff; }
.model-brand-qwen3 { color: #bda4ff; }
.model-brand-deepseek { color: #759dff; }
.model-brand-mimo { color: #ef8978; }

.rail-model:nth-child(even) .model-glyph {
  color: var(--copper);
}

.rail-model-copy {
  min-width: 0;
}

.rail-model strong {
  display: block;
  overflow: hidden;
  color: var(--ivory-dim);
  font-size: 0.75rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-model span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-skeleton {
  height: 12px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.editorial-section {
  padding-block: 112px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  margin-bottom: 58px;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.5fr);
  gap: 50px;
}

.section-heading h2 {
  max-width: 750px;
  margin: 13px 0 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 4.2vw, 4.15rem);
  font-weight: 400;
  letter-spacing: -0.042em;
  line-height: 1;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.integration-grid {
  display: grid;
  align-items: stretch;
  grid-template-columns: minmax(0, 0.75fr) minmax(420px, 1.25fr);
  gap: 22px;
}

.steps-card,
.integration-code,
.trust-card,
.price-card,
.panel,
.metric-card {
  border: 1px solid var(--line);
  background: rgba(16, 19, 17, 0.72);
  backdrop-filter: blur(16px);
}

.steps-card {
  padding: 8px 28px;
}

.integration-step {
  display: grid;
  padding-block: 26px;
  grid-template-columns: 45px 1fr;
  gap: 12px;
}

.integration-step + .integration-step {
  border-top: 1px solid var(--line);
}

.step-index {
  color: var(--copper);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.integration-step h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
}

.integration-step p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.75;
}

.integration-code {
  position: relative;
  overflow: hidden;
  padding: 28px;
}

.integration-code::after {
  position: absolute;
  right: -100px;
  bottom: -130px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(200, 241, 105, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 32px rgba(200, 241, 105, 0.018), 0 0 0 64px rgba(200, 241, 105, 0.012);
  content: "";
}

.code-tabs {
  display: flex;
  margin: -5px 0 24px;
  gap: 4px;
}

.code-tab {
  min-height: 32px;
  padding: 0 10px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.65rem;
}

.code-tab.active {
  color: var(--lime);
  border-color: var(--lime);
}

.code-copy {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
}

.code-status {
  display: flex;
  position: relative;
  z-index: 2;
  margin-top: 28px;
  padding-top: 18px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.trust-ledger {
  display: grid;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.trust-card {
  position: relative;
  min-height: 260px;
  padding: 28px 25px;
  border-top: 0;
  border-left: 0;
  transition: background 180ms ease;
}

.trust-card:hover {
  background: rgba(25, 30, 25, 0.88);
}

.trust-index {
  position: absolute;
  top: 19px;
  right: 19px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.59rem;
}

.feature-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 48px;
  place-items: center;
  color: var(--lime);
  border: 1px solid var(--line-strong);
}

.trust-card:nth-child(even) .feature-icon {
  color: var(--copper);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.trust-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.38rem;
  font-weight: 400;
  line-height: 1.15;
}

.trust-card p {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.75;
}

.pricing-layout {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1.38fr);
  gap: 62px;
}

.pricing-intro {
  position: sticky;
  top: 112px;
}

.pricing-intro h2 {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 4vw, 3.8rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.pricing-intro p:not(.eyebrow) {
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.pricing-note {
  display: flex;
  margin-top: 32px;
  padding-top: 22px;
  align-items: flex-start;
  gap: 11px;
  color: var(--ivory-dim);
  border-top: 1px solid var(--line);
  font-size: 0.77rem;
}

.pricing-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--copper);
}

.pricing-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.price-card {
  position: relative;
  min-height: 460px;
  padding: 30px;
}

.price-card.highlight {
  border-color: rgba(200, 241, 105, 0.38);
  background:
    linear-gradient(145deg, rgba(200, 241, 105, 0.07), transparent 50%),
    rgba(16, 19, 17, 0.85);
}

.price-card.highlight::before {
  position: absolute;
  top: -1px;
  right: 28px;
  left: 28px;
  height: 1px;
  background: var(--lime);
  content: "";
}

.plan-badge {
  display: inline-flex;
  min-height: 25px;
  padding: 0 8px;
  align-items: center;
  color: var(--lime);
  border: 1px solid rgba(200, 241, 105, 0.27);
  border-radius: 3px;
  background: var(--lime-soft);
  font-family: var(--mono);
  font-size: 0.57rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-badge.neutral {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(242, 238, 226, 0.03);
}

.price-card h3 {
  margin: 26px 0 0;
  color: var(--ivory-dim);
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-price {
  display: flex;
  margin-top: 13px;
  align-items: flex-start;
  gap: 6px;
}

.plan-price .currency {
  padding-top: 11px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.plan-price strong {
  font-family: var(--serif);
  font-size: 4.7rem;
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.credit-value {
  margin: 16px 0 0;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.plan-description {
  min-height: 50px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.plan-features {
  display: grid;
  margin: 25px 0 28px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  gap: 11px;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ivory-dim);
  font-size: 0.76rem;
}

.plan-features svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--lime);
}

.price-card .btn {
  width: 100%;
}

.final-cta {
  padding-block: 90px 105px;
}

.final-cta-card {
  display: grid;
  position: relative;
  overflow: hidden;
  min-height: 330px;
  padding: 52px;
  align-items: end;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(100deg, rgba(200, 241, 105, 0.08), transparent 42%),
    rgba(15, 18, 16, 0.84);
  grid-template-columns: 1fr auto;
  gap: 40px;
}

.final-cta-card::after {
  position: absolute;
  top: -130px;
  right: -40px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(196, 123, 84, 0.15);
  transform: rotate(34deg);
  content: "";
}

.final-cta h2 {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.final-cta .btn {
  position: relative;
  z-index: 2;
}

.site-footer {
  padding-block: 31px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.71rem;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-meta span + span {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.session-notice {
  display: flex;
  width: var(--shell);
  margin: 12px auto 0;
  padding: 11px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--warning);
  border: 1px solid rgba(225, 184, 109, 0.2);
  background: rgba(225, 184, 109, 0.055);
  font-size: 0.7rem;
}

.session-notice button {
  color: var(--ivory);
}

.session-notice > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.session-notice > span svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

/* Authenticated application */
.app-shell {
  min-height: 100vh;
}

.app-topbar {
  position: sticky;
  z-index: 35;
  top: 0;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 10, 0.86);
  backdrop-filter: blur(20px) saturate(120%);
}

.app-topbar-inner {
  display: flex;
  width: var(--shell);
  min-height: 64px;
  margin-inline: auto;
  align-items: center;
  gap: 25px;
}

.app-nav {
  display: flex;
  min-width: 0;
  margin-left: 18px;
  align-self: stretch;
  align-items: center;
  gap: 3px;
}

.app-nav-button {
  display: inline-flex;
  position: relative;
  min-height: 40px;
  padding: 0 12px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.app-nav-button svg {
  width: 15px;
  height: 15px;
}

.app-nav-button:hover,
.app-nav-button[aria-current="page"] {
  color: var(--ivory);
  background: rgba(242, 238, 226, 0.045);
}

.app-nav-button[aria-current="page"]::after {
  position: absolute;
  right: 12px;
  bottom: -12px;
  left: 12px;
  height: 1px;
  background: var(--lime);
  content: "";
}

.topbar-spacer {
  flex: 1;
}

.balance-chip {
  display: flex;
  min-height: 39px;
  padding: 0 12px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: rgba(242, 238, 226, 0.025);
}

.balance-chip svg {
  width: 15px;
  color: var(--lime);
}

.balance-chip-copy {
  line-height: 1.1;
}

.balance-chip small {
  display: block;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.balance-chip strong {
  color: var(--ivory);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
}

.user-menu-wrap {
  position: relative;
}

.user-trigger {
  display: inline-flex;
  width: 40px;
  height: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(242, 238, 226, 0.03);
  cursor: pointer;
}

.avatar {
  display: grid;
  overflow: hidden;
  width: 29px;
  height: 29px;
  place-items: center;
  color: var(--ink);
  border-radius: 2px;
  background: var(--copper);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-popover {
  position: absolute;
  z-index: 50;
  top: calc(100% + 9px);
  right: 0;
  width: 248px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  background: #121512;
  box-shadow: var(--shadow);
}

.user-popover[hidden] {
  display: none;
}

.user-popover-head {
  padding: 13px 11px 15px;
  border-bottom: 1px solid var(--line);
}

.user-popover-head strong,
.user-popover-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-popover-head strong {
  font-size: 0.77rem;
}

.user-popover-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.66rem;
}

.role-label {
  display: inline-flex !important;
  width: auto;
  margin-top: 9px !important;
  padding: 2px 6px;
  color: var(--lime) !important;
  border: 1px solid rgba(200, 241, 105, 0.2);
  font-family: var(--mono);
  font-size: 0.51rem !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.popover-action {
  display: flex;
  width: 100%;
  min-height: 41px;
  margin-top: 7px;
  padding: 0 10px;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  text-align: left;
}

.popover-action:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.popover-action svg {
  width: 15px;
}

.app-main {
  width: var(--shell);
  margin-inline: auto;
  padding-block: 46px 88px;
}

.view-head {
  display: flex;
  margin-bottom: 31px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.view-head h1 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 4vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
}

.view-head-copy {
  max-width: 650px;
}

.view-head-copy > p:not(.eyebrow) {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.low-balance-alert {
  display: grid;
  margin-bottom: 18px;
  padding: 16px 17px;
  align-items: center;
  border: 1px solid rgba(225, 184, 109, 0.25);
  background: linear-gradient(90deg, rgba(225, 184, 109, 0.1), rgba(225, 184, 109, 0.025));
  grid-template-columns: auto 1fr auto;
  gap: 13px;
}

.low-balance-alert > svg {
  width: 20px;
  color: var(--warning);
}

.low-balance-alert strong {
  display: block;
  color: #f0d69f;
  font-size: 0.77rem;
}

.low-balance-alert p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.metrics-grid {
  display: grid;
  margin-bottom: 18px;
  grid-template-columns: 1.12fr repeat(3, 1fr);
  gap: 12px;
}

.metric-card {
  position: relative;
  min-height: 142px;
  padding: 20px;
}

.metric-card.primary {
  border-color: rgba(200, 241, 105, 0.25);
  background:
    linear-gradient(130deg, rgba(200, 241, 105, 0.075), transparent 58%),
    rgba(16, 19, 17, 0.8);
}

.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 600;
}

.metric-label svg {
  width: 16px;
  color: var(--muted-2);
}

.metric-value {
  display: block;
  margin-top: 24px;
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.metric-card.primary .metric-value {
  color: var(--lime);
}

.metric-foot {
  display: block;
  margin-top: 9px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.57rem;
}

.dashboard-grid {
  display: grid;
  margin-top: 12px;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.72fr);
  gap: 12px;
}

.panel {
  min-width: 0;
}

.panel-head {
  display: flex;
  min-height: 65px;
  padding: 17px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
}

.panel-subtitle {
  margin: 3px 0 0;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.56rem;
}

.panel-body {
  padding: 20px;
}

.chart-wrap {
  overflow: hidden;
  min-height: 310px;
  padding: 10px 2px 0;
}

.usage-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid-line {
  stroke: rgba(242, 238, 226, 0.08);
  stroke-width: 1;
}

.chart-axis-label {
  fill: #737a72;
  font-family: var(--mono);
  font-size: 9px;
}

.chart-area {
  fill: url(#usage-area-gradient);
}

.chart-line {
  fill: none;
  stroke: var(--lime);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  animation: draw-line 900ms ease both;
}

.chart-point {
  fill: var(--graphite);
  stroke: var(--lime);
  stroke-width: 1.5;
  transition: r 150ms ease;
}

.chart-point:hover {
  r: 5;
}

.chart-summary {
  display: flex;
  margin-top: 4px;
  padding: 14px 0 0;
  align-items: center;
  gap: 22px;
  border-top: 1px solid var(--line);
}

.chart-summary-item span,
.chart-summary-item strong {
  display: block;
}

.chart-summary-item span {
  color: var(--muted-2);
  font-size: 0.58rem;
}

.chart-summary-item strong {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 500;
}

.breakdown-list {
  display: grid;
  gap: 21px;
}

.breakdown-item {
  min-width: 0;
}

.breakdown-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.67rem;
}

.breakdown-name {
  display: flex;
  overflow: hidden;
  min-width: 0;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breakdown-model-icon {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
}

.breakdown-model-icon svg {
  width: 14px;
  height: 14px;
}

.breakdown-value {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.57rem;
}

.breakdown-track {
  height: 3px;
  margin-top: 9px;
  overflow: hidden;
  background: rgba(242, 238, 226, 0.07);
}

.breakdown-fill {
  height: 100%;
  background: var(--lime);
}

.breakdown-item:nth-child(even) .breakdown-fill {
  background: var(--copper);
}

.breakdown-meta {
  display: flex;
  margin-top: 7px;
  justify-content: space-between;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.54rem;
}

.endpoint-panel {
  margin-top: 12px;
}

.endpoint-layout {
  display: grid;
  padding: 20px;
  align-items: center;
  grid-template-columns: minmax(0, 0.72fr) minmax(360px, 1.28fr);
  gap: 28px;
}

.endpoint-copy,
.copy-field {
  max-width: 100%;
  min-width: 0;
}

.endpoint-copy h2 {
  margin: 9px 0 0;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
}

.endpoint-copy p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.copy-field {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(5, 7, 6, 0.48);
}

.copy-field code,
.copy-field input {
  min-width: 0;
  padding: 0 15px;
  flex: 1;
  overflow: hidden;
  color: var(--ivory-dim);
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-field .btn {
  min-height: 46px;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
}

.empty-state,
.error-state,
.loading-state {
  display: grid;
  min-height: 220px;
  padding: 34px;
  place-items: center;
  align-content: center;
  color: var(--muted);
  text-align: center;
}

.empty-state.compact,
.error-state.compact,
.loading-state.compact {
  min-height: 150px;
  padding: 24px;
}

.state-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  place-items: center;
  color: var(--muted-2);
  border: 1px solid var(--line);
}

.state-icon svg {
  width: 21px;
  height: 21px;
}

.error-state .state-icon {
  color: var(--danger);
  border-color: rgba(237, 140, 121, 0.25);
}

.empty-state h3,
.error-state h3,
.loading-state h3 {
  margin: 0;
  color: var(--ivory-dim);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
}

.empty-state p,
.error-state p,
.loading-state p {
  max-width: 400px;
  margin: 7px 0 0;
  font-size: 0.7rem;
}

.error-state .btn,
.empty-state .btn {
  margin-top: 17px;
}

.loader {
  position: relative;
  width: 31px;
  height: 31px;
  margin-bottom: 17px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.loader::after {
  position: absolute;
  inset: -1px;
  border: 1px solid transparent;
  border-top-color: var(--lime);
  border-radius: 50%;
  content: "";
  animation: spin 800ms linear infinite;
}

/* API keys */
.security-callout {
  display: flex;
  margin-bottom: 16px;
  padding: 15px 17px;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(196, 123, 84, 0.045);
  font-size: 0.7rem;
}

.security-callout svg {
  width: 18px;
  flex: 0 0 auto;
  color: var(--copper);
}

.security-callout strong {
  color: var(--ivory-dim);
}

.keys-panel {
  overflow: hidden;
}

.keys-head,
.key-row {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(170px, 1.2fr) minmax(170px, 0.85fr) minmax(150px, 0.72fr) minmax(150px, 0.72fr) 52px;
  gap: 18px;
}

.keys-head {
  min-height: 43px;
  padding: 0 20px;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
  background: rgba(242, 238, 226, 0.02);
  font-family: var(--mono);
  font-size: 0.53rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.key-row {
  min-height: 84px;
  padding: 15px 20px;
}

.key-row + .key-row {
  border-top: 1px solid var(--line);
}

.key-name {
  min-width: 0;
}

.key-name strong,
.key-name code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-name strong {
  font-size: 0.74rem;
}

.key-name code {
  margin-top: 5px;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.59rem;
}

.key-cell {
  color: var(--muted);
  font-size: 0.67rem;
}

.key-cell .cell-label {
  display: none;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.51rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Models */
.model-toolbar {
  display: flex;
  margin-bottom: 14px;
  align-items: center;
  gap: 10px;
}

.search-field {
  display: flex;
  min-height: 45px;
  flex: 1;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: rgba(16, 19, 17, 0.66);
}

.search-field svg {
  width: 17px;
  margin-left: 14px;
  flex: 0 0 auto;
  color: var(--muted-2);
}

.search-field input {
  width: 100%;
  min-height: 43px;
  padding: 0 14px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.72rem;
}

.search-field:focus-within {
  border-color: rgba(200, 241, 105, 0.45);
  box-shadow: 0 0 0 1px rgba(200, 241, 105, 0.1);
}

.model-count {
  display: inline-flex;
  min-height: 45px;
  padding-inline: 15px;
  align-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(16, 19, 17, 0.66);
  font-family: var(--mono);
  font-size: 0.58rem;
  white-space: nowrap;
}

.models-table {
  overflow: hidden;
}

.models-table-head,
.model-row {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(180px, 0.95fr) minmax(250px, 1.3fr) 115px 170px minmax(150px, 0.8fr);
  gap: 20px;
}

.models-table-head {
  min-height: 44px;
  padding: 0 20px;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
  background: rgba(242, 238, 226, 0.02);
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.model-row {
  min-height: 118px;
  padding: 20px;
  transition: background 160ms ease;
}

.model-row + .model-row {
  border-top: 1px solid var(--line);
}

.model-row:hover {
  background: rgba(242, 238, 226, 0.018);
}

.model-row[hidden] {
  display: none;
}

.model-id-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.model-id-copy {
  min-width: 0;
}

.model-brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
}

.model-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.75rem;
  font-weight: 700;
}

.model-id {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.55rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-description {
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.65;
}

.model-context,
.model-pricing {
  color: var(--ivory-dim);
  font-family: var(--mono);
  font-size: 0.59rem;
}

.model-pricing span {
  display: block;
  color: var(--muted-2);
}

.model-pricing span + span {
  margin-top: 5px;
}

.capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.capability {
  display: inline-flex;
  min-height: 22px;
  padding: 0 7px;
  align-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(242, 238, 226, 0.02);
  font-family: var(--mono);
  font-size: 0.49rem;
  text-transform: uppercase;
}

.filter-empty {
  display: none;
}

.filter-empty.is-visible {
  display: grid;
}

/* Credits and purchases */
.rate-card {
  display: grid;
  margin-bottom: 18px;
  padding: 18px 20px;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(16, 19, 17, 0.68);
  grid-template-columns: 1fr auto;
  gap: 20px;
}

.rate-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.67rem;
}

.rate-value {
  color: var(--copper);
  font-family: var(--mono);
  font-size: 0.77rem;
}

.app-plan-grid {
  display: grid;
  margin-bottom: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.app-plan-card {
  display: flex;
  position: relative;
  min-height: 390px;
  padding: 24px;
  flex-direction: column;
  border: 1px solid var(--line);
  background: rgba(16, 19, 17, 0.72);
}

.app-plan-card.highlight {
  border-color: rgba(200, 241, 105, 0.35);
  background:
    linear-gradient(145deg, rgba(200, 241, 105, 0.07), transparent 54%),
    rgba(16, 19, 17, 0.8);
}

.app-plan-card h2 {
  margin: 24px 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-plan-card .plan-price strong {
  font-size: 3.65rem;
}

.app-plan-card .plan-description {
  min-height: 46px;
}

.app-plan-card .plan-features {
  margin-bottom: 24px;
}

.app-plan-card .btn {
  width: 100%;
  margin-top: auto;
}

.purchases-panel {
  margin-top: 12px;
}

.purchase-list {
  display: grid;
}

.purchase-row {
  display: grid;
  min-height: 76px;
  padding: 15px 20px;
  align-items: center;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.55fr) minmax(130px, 0.6fr) minmax(140px, 0.65fr);
  gap: 18px;
}

.purchase-row + .purchase-row {
  border-top: 1px solid var(--line);
}

.purchase-code strong,
.purchase-code span {
  display: block;
}

.purchase-code strong {
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 500;
}

.purchase-code span {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 0.58rem;
}

.purchase-cell {
  color: var(--muted);
  font-size: 0.67rem;
}

.purchase-cell .cell-label {
  display: none;
}

.status-badge {
  display: inline-flex;
  min-height: 24px;
  padding: 0 8px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-badge::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-pending {
  color: var(--warning);
  border-color: rgba(225, 184, 109, 0.22);
  background: rgba(225, 184, 109, 0.07);
}

.status-approved,
.status-paid,
.status-completed {
  color: var(--success);
  border-color: rgba(166, 215, 124, 0.22);
  background: rgba(166, 215, 124, 0.07);
}

.status-rejected,
.status-cancelled,
.status-failed {
  color: var(--danger);
  border-color: rgba(237, 140, 121, 0.22);
  background: var(--danger-soft);
}

/* Admin */
.admin-summary {
  display: grid;
  margin-bottom: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-stat {
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: rgba(16, 19, 17, 0.68);
}

.admin-stat span,
.admin-stat strong {
  display: block;
}

.admin-stat span {
  color: var(--muted);
  font-size: 0.62rem;
}

.admin-stat strong {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
}

.admin-purchase {
  display: grid;
  min-height: 100px;
  padding: 18px 20px;
  align-items: center;
  grid-template-columns: minmax(190px, 1fr) minmax(160px, 0.7fr) minmax(130px, 0.5fr) auto;
  gap: 20px;
}

.admin-purchase + .admin-purchase {
  border-top: 1px solid var(--line);
}

.admin-buyer strong,
.admin-buyer span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-buyer strong {
  font-size: 0.72rem;
}

.admin-buyer span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.62rem;
}

.admin-detail {
  color: var(--muted);
  font-size: 0.66rem;
}

.admin-detail strong {
  display: block;
  color: var(--ivory-dim);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
}

.admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.mobile-bottom-nav {
  display: none;
}

/* Modal system */
.modal-backdrop {
  display: grid;
  position: fixed;
  z-index: 100;
  inset: 0;
  padding: 20px;
  overflow-y: auto;
  place-items: center;
  background: rgba(2, 3, 3, 0.76);
  backdrop-filter: blur(9px);
  animation: fade-in 150ms ease both;
}

.modal-card {
  position: relative;
  width: min(100%, 530px);
  max-height: calc(100svh - 40px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  background: #121512;
  box-shadow: 0 35px 110px rgba(0, 0, 0, 0.58);
  animation: modal-in 190ms ease both;
}

.modal-card.modal-wide {
  width: min(100%, 740px);
}

.modal-accent {
  position: absolute;
  z-index: 2;
  top: -1px;
  left: 27px;
  width: 75px;
  height: 1px;
  background: var(--lime);
}

.modal-head {
  display: flex;
  min-height: 76px;
  padding: 20px 21px 17px 25px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 5px 0 0;
  font-family: var(--serif);
  font-size: 1.62rem;
  font-weight: 400;
  line-height: 1.1;
}

.modal-close {
  width: 37px;
  height: 37px;
}

.modal-body {
  padding: 25px;
}

.modal-foot {
  display: flex;
  padding: 17px 25px;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
  background: rgba(242, 238, 226, 0.018);
}

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

.field + .field {
  margin-top: 18px;
}

.field label {
  color: var(--ivory-dim);
  font-size: 0.68rem;
  font-weight: 700;
}

.field-hint {
  color: var(--muted-2);
  font-size: 0.62rem;
}

.text-input,
.text-area {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  outline: 0;
  background: rgba(5, 7, 6, 0.5);
}

.text-input {
  min-height: 48px;
  padding: 0 14px;
}

.text-area {
  min-height: 88px;
  padding: 12px 14px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 0.64rem;
  line-height: 1.55;
}

.text-input:focus,
.text-area:focus {
  border-color: rgba(200, 241, 105, 0.5);
  box-shadow: 0 0 0 2px rgba(200, 241, 105, 0.08);
}

.form-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 0.65rem;
}

.secret-warning {
  display: flex;
  margin-bottom: 18px;
  padding: 13px 14px;
  align-items: flex-start;
  gap: 10px;
  color: #f0d69f;
  border: 1px solid rgba(225, 184, 109, 0.22);
  background: rgba(225, 184, 109, 0.065);
  font-size: 0.67rem;
}

.secret-warning svg {
  width: 18px;
  flex: 0 0 auto;
}

.secret-box {
  position: relative;
  padding: 18px;
  border: 1px solid rgba(200, 241, 105, 0.28);
  background: rgba(4, 7, 4, 0.65);
}

.secret-box code {
  display: block;
  overflow-wrap: anywhere;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.65;
}

.secret-box .btn {
  margin-top: 15px;
}

.confirm-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.8;
}

.confirm-copy strong {
  color: var(--ivory);
}

.pix-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 25px;
}

.pix-qr-wrap {
  display: grid;
  min-height: 220px;
  padding: 13px;
  place-items: center;
  background: #f5f2e9;
}

.pix-qr-wrap svg {
  width: 100%;
  height: auto;
  max-height: 194px;
}

.qr-fallback {
  color: #343a34;
  text-align: center;
}

.qr-fallback svg {
  width: 30px;
  margin: 0 auto 8px;
}

.qr-fallback span {
  display: block;
  font-size: 0.65rem;
}

.pix-details h3 {
  margin: 15px 0 0;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
}

.pix-details > p {
  margin: 8px 0 17px;
  color: var(--muted);
  font-size: 0.68rem;
}

.pix-code-row {
  margin-top: 18px;
}

.pix-code-row label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.62rem;
}

.pix-actions {
  display: flex;
  margin-top: 18px;
  flex-wrap: wrap;
  gap: 8px;
}

.transaction-note {
  margin-top: 20px;
  padding-top: 16px;
  color: var(--muted-2);
  border-top: 1px solid var(--line);
  font-size: 0.61rem;
  line-height: 1.7;
}

/* Toasts */
.toast-region {
  display: grid;
  position: fixed;
  z-index: 150;
  right: 18px;
  bottom: 18px;
  width: min(370px, calc(100vw - 36px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: grid;
  min-height: 56px;
  padding: 12px 14px;
  align-items: center;
  color: var(--ivory-dim);
  border: 1px solid var(--line-strong);
  background: #171b17;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.38);
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  pointer-events: auto;
  animation: toast-in 220ms ease both;
}

.toast.is-leaving {
  animation: toast-out 170ms ease both;
}

.toast-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--lime);
  border: 1px solid rgba(200, 241, 105, 0.18);
}

.toast-icon svg {
  width: 14px;
  height: 14px;
}

.toast.error .toast-icon {
  color: var(--danger);
  border-color: rgba(237, 140, 121, 0.2);
}

.toast.warning .toast-icon {
  color: var(--warning);
  border-color: rgba(225, 184, 109, 0.2);
}

.toast-message {
  font-size: 0.68rem;
}

.toast-close {
  display: grid;
  width: 27px;
  height: 27px;
  padding: 0;
  place-items: center;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.toast-close svg {
  width: 13px;
}

.boot-screen {
  display: grid;
  width: min(320px, calc(100vw - 40px));
  min-height: 100vh;
  margin-inline: auto;
  place-items: center;
  align-content: center;
}

.boot-mark {
  display: grid;
  width: 51px;
  height: 51px;
  margin-bottom: 22px;
  place-items: center;
  color: var(--lime);
  border: 1px solid var(--line-strong);
  font-family: var(--serif);
  font-size: 1.7rem;
}

.boot-line {
  width: 100%;
  height: 1px;
  margin-top: 17px;
  overflow: hidden;
  background: var(--line);
}

.boot-line span {
  display: block;
  width: 45%;
  height: 100%;
  background: var(--lime);
  animation: boot-progress 1.15s ease-in-out infinite alternate;
}

.boot-copy {
  margin: 11px 0 0;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.58rem;
}

.noscript-note {
  position: fixed;
  z-index: 200;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 14px;
  color: var(--ivory);
  border: 1px solid var(--danger);
  background: #17110f;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 620ms ease,
    transform 620ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

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

@keyframes draw-line {
  from { stroke-dasharray: 1200; stroke-dashoffset: 1200; }
  to { stroke-dasharray: 1200; stroke-dashoffset: 0; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(14px); }
}

@keyframes boot-progress {
  from { transform: translateX(-100%); }
  to { transform: translateX(220%); }
}

@media (max-width: 1120px) {
  :root {
    --shell: min(100% - 32px, 1080px);
  }

  .public-nav {
    gap: 20px;
  }

  .hero {
    gap: 42px;
    grid-template-columns: minmax(0, 1fr) minmax(350px, 0.82fr);
  }

  .floating-note {
    right: -8px;
  }

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

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

  .models-table-head,
  .model-row {
    grid-template-columns: minmax(170px, 0.9fr) minmax(220px, 1.1fr) 100px 150px;
  }

  .models-table-head > :last-child,
  .model-row > :last-child {
    display: none;
  }

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

@media (max-width: 980px) {
  .public-nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-block: 72px 95px;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-visual {
    width: min(100%, 620px);
    margin-inline: auto;
  }

  .section-heading,
  .pricing-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .section-heading > p {
    max-width: 600px;
  }

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

  .pricing-intro {
    position: static;
  }

  .pricing-intro p:not(.eyebrow) {
    max-width: 620px;
  }

  .app-nav {
    display: none;
  }

  .dashboard-grid,
  .endpoint-layout {
    grid-template-columns: 1fr;
  }

  .endpoint-layout {
    gap: 18px;
  }

  .models-table-head {
    display: none;
  }

  .model-row {
    grid-template-columns: 1fr 1fr;
  }

  .model-row > :last-child {
    display: flex;
  }

  .model-description {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .mobile-bottom-nav {
    display: grid;
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 67px;
    padding: 5px max(8px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid var(--line-strong);
    background: rgba(10, 12, 10, 0.96);
    backdrop-filter: blur(18px);
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
  }

  .mobile-nav-button {
    display: grid;
    min-width: 0;
    min-height: 53px;
    padding: 4px;
    place-items: center;
    align-content: center;
    gap: 4px;
    color: var(--muted-2);
    background: transparent;
    cursor: pointer;
    font-size: 0.52rem;
    font-weight: 600;
  }

  .mobile-nav-button svg {
    width: 18px;
    height: 18px;
  }

  .mobile-nav-button[aria-current="page"] {
    color: var(--lime);
  }

  .app-main {
    padding-bottom: 103px;
  }

  .admin-purchase {
    grid-template-columns: 1fr 1fr;
  }

  .admin-actions {
    justify-content: flex-start;
    grid-column: 1 / -1;
  }
}

@media (max-width: 800px) {
  :root {
    --shell: calc(100% - 28px);
    --header-height: 64px;
  }

  body {
    font-size: 14px;
  }

  .site-header-inner {
    gap: 12px;
  }

  .header-actions .btn-secondary {
    display: none;
  }

  .header-actions .btn {
    min-height: 39px;
    padding-inline: 12px;
    font-size: 0.68rem;
  }

  .hero {
    padding-block: 55px 78px;
    gap: 48px;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 12vw, 3.25rem);
  }

  .hero-lead {
    margin-top: 22px;
    font-size: 0.96rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-facts {
    margin-top: 31px;
    flex-wrap: wrap;
  }

  .hero-facts li {
    min-width: 50%;
    padding-right: 12px;
  }

  .hero-facts li + li {
    padding-left: 12px;
  }

  .console-body {
    padding: 22px 18px;
  }

  .response-row {
    grid-template-columns: 1fr;
  }

  .response-meta {
    text-align: left;
  }

  .floating-note {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 10px;
    transform: none;
  }

  .floating-note strong {
    font-family: var(--mono);
    font-size: 0.66rem;
    line-height: 1.55;
  }

  .model-rail-section {
    padding-bottom: 62px;
  }

  .model-rail {
    overflow: hidden;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rail-model {
    min-height: 78px;
    padding: 12px;
    gap: 10px;
  }

  .rail-model:nth-child(odd) {
    border-left: 0;
  }

  .rail-model:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .model-glyph {
    width: 32px;
    height: 32px;
  }

  .editorial-section {
    padding-block: 80px;
  }

  .section-heading {
    margin-bottom: 35px;
  }

  .section-heading h2 {
    font-size: clamp(2.15rem, 11vw, 2.65rem);
    overflow-wrap: anywhere;
  }

  .steps-card {
    padding-inline: 20px;
  }

  .integration-code {
    padding: 23px 18px;
  }

  .integration-code .code-block,
  .integration-code .code-block code {
    overflow-x: hidden;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .code-copy {
    top: 13px;
    right: 13px;
  }

  .trust-ledger,
  .pricing-cards {
    grid-template-columns: 1fr;
  }

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

  .price-card {
    min-height: auto;
  }

  .final-cta-card {
    min-height: 360px;
    padding: 32px 25px;
    align-items: end;
    grid-template-columns: 1fr;
  }

  .final-cta-card .btn {
    width: 100%;
  }

  .footer-inner,
  .footer-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-meta {
    gap: 7px;
  }

  .footer-meta span + span {
    padding-left: 0;
    border-left: 0;
  }

  .session-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-topbar-inner {
    gap: 10px;
  }

  .app-topbar .brand span:last-child {
    display: none;
  }

  .balance-chip {
    margin-left: auto;
  }

  .balance-chip small {
    display: none;
  }

  .app-main {
    padding-top: 31px;
  }

  .view-head {
    margin-bottom: 24px;
    align-items: stretch;
    flex-direction: column;
    gap: 17px;
  }

  .view-head h1 {
    font-size: 2.65rem;
  }

  .view-head > .btn {
    width: 100%;
  }

  .low-balance-alert {
    align-items: start;
    grid-template-columns: auto 1fr;
  }

  .low-balance-alert .btn {
    width: 100%;
    grid-column: 1 / -1;
  }

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

  .metric-card {
    min-height: 128px;
    padding: 16px;
  }

  .metric-value {
    margin-top: 20px;
    font-size: 1.72rem;
  }

  .panel-head,
  .panel-body {
    padding-inline: 16px;
  }

  .chart-wrap {
    min-height: 250px;
  }

  .endpoint-layout {
    padding: 17px;
  }

  .copy-field {
    align-items: stretch;
    flex-direction: column;
  }

  .copy-field code,
  .copy-field input {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    padding-top: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .copy-field .btn {
    min-height: 42px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .keys-head {
    display: none;
  }

  .key-row {
    padding: 18px;
    align-items: start;
    grid-template-columns: 1fr auto;
    gap: 16px;
  }

  .key-name {
    grid-column: 1;
  }

  .key-cell {
    grid-column: 1;
  }

  .key-cell .cell-label {
    display: block;
    margin-bottom: 3px;
  }

  .key-row .icon-btn {
    grid-column: 2;
    grid-row: 1;
  }

  .model-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .model-count {
    justify-content: center;
  }

  .model-row {
    min-height: 0;
    padding: 18px;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .model-id-wrap,
  .model-description,
  .capabilities {
    grid-column: 1 / -1;
  }

  .model-description {
    grid-row: auto;
  }

  .rate-card {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .app-plan-grid,
  .admin-summary {
    grid-template-columns: 1fr;
  }

  .app-plan-card {
    min-height: 0;
  }

  .purchase-row {
    padding: 18px;
    grid-template-columns: 1fr 1fr;
  }

  .purchase-code {
    grid-column: 1 / -1;
  }

  .purchase-cell .cell-label {
    display: block;
    margin-bottom: 3px;
    color: var(--muted-2);
    font-family: var(--mono);
    font-size: 0.5rem;
    text-transform: uppercase;
  }

  .admin-purchase {
    padding: 18px;
    grid-template-columns: 1fr;
  }

  .admin-actions {
    grid-column: auto;
  }

  .modal-backdrop {
    padding: 0;
    place-items: end center;
  }

  .modal-card,
  .modal-card.modal-wide {
    width: 100%;
    max-height: min(92svh, 800px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-right: 18px;
    padding-left: 18px;
  }

  .modal-foot {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .modal-foot .btn {
    width: 100%;
  }

  .pix-layout {
    grid-template-columns: 1fr;
  }

  .pix-qr-wrap {
    width: min(100%, 240px);
    min-height: 212px;
    margin-inline: auto;
  }

  .pix-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pix-actions .btn {
    width: 100%;
  }

  .toast-region {
    right: 12px;
    bottom: 78px;
    width: calc(100vw - 24px);
  }
}

@media (max-width: 410px) {
  .brand {
    gap: 7px;
    font-size: 0.81rem;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .header-actions .btn svg {
    display: none;
  }

  .hero h1 {
    font-size: clamp(2.25rem, 12vw, 2.65rem);
  }

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

  .metric-card {
    min-height: 120px;
  }

  .purchase-row,
  .model-row {
    grid-template-columns: 1fr;
  }

  .purchase-code,
  .model-id-wrap,
  .model-description,
  .capabilities {
    grid-column: 1;
  }

  .mobile-nav-button {
    font-size: 0.48rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .shader-canvas {
    opacity: 0.45;
  }
}
