:root {
  color-scheme: dark;
  --bg: #08100f;
  --surface: #0d1715;
  --surface-2: #111e1b;
  --line: rgba(201, 230, 220, 0.13);
  --line-strong: rgba(201, 230, 220, 0.24);
  --text: #edf6f1;
  --muted: #91a69f;
  --cyan: #4fe0c0;
  --cyan-dark: #173f38;
  --amber: #ffb454;
  --red: #ff756f;
  --mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 18px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(rgba(79, 224, 192, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 224, 192, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 16, 15, 0) 70%, var(--bg));
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }

.ambient {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.11;
  pointer-events: none;
  z-index: -1;
}

.ambient-one { top: -210px; right: 2vw; background: var(--cyan); }
.ambient-two { top: 620px; left: -380px; background: var(--amber); opacity: 0.07; }

.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.topbar {
  width: min(1240px, calc(100% - 32px));
  min-height: 72px;
  margin: 16px auto 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 28px;
  position: sticky;
  top: 12px;
  z-index: 20;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8, 16, 15, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 34px rgba(0, 0, 0, 0.2);
}

.brand { display: inline-flex; align-items: center; gap: 11px; min-width: max-content; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #05100d;
  background: var(--cyan);
  border-radius: 10px;
  font: 800 12px/1 var(--mono);
  box-shadow: 0 0 28px rgba(79, 224, 192, 0.2);
}
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: -0.02em; }
.brand small { color: var(--muted); font: 10px/1.5 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }

.topbar nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.topbar nav a { color: var(--muted); font-size: 13px; transition: color 160ms ease; }
.topbar nav a:hover, .footer a:hover { color: var(--text); }

.health-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 88px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font: 11px/1 var(--mono);
}
.health-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.health-pill.ok .health-dot { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.health-pill.error .health-dot { background: var(--red); box-shadow: 0 0 10px var(--red); }

.hero { padding: 118px 0 82px; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 72px; align-items: center; }
.eyebrow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.eyebrow span, .kicker {
  color: var(--cyan);
  font: 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow span { padding: 7px 9px; border: 1px solid rgba(79, 224, 192, 0.18); border-radius: 999px; background: rgba(79, 224, 192, 0.05); }
.hero h1 { margin: 0; font-size: clamp(48px, 7.2vw, 92px); line-height: 0.96; letter-spacing: -0.065em; font-weight: 720; }
.hero h1 em { color: var(--cyan); font-style: normal; }
.hero-lead { max-width: 690px; margin: 28px 0 0; color: #b2c3bd; font-size: 17px; line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.legal-line { margin: 18px 0 0; color: #6f837c; font-size: 12px; }

.button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button.primary { color: #06110e; background: var(--cyan); box-shadow: 0 10px 35px rgba(79, 224, 192, 0.15); }
.button.ghost { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.025); }
.button.compact { min-height: 34px; padding: 0 12px; border-color: rgba(79, 224, 192, 0.25); background: rgba(79, 224, 192, 0.08); color: var(--cyan); }
.button:disabled { cursor: not-allowed; opacity: 0.45; }

.contract-card { border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: rgba(13, 23, 21, 0.84); box-shadow: var(--shadow); transform: rotate(1.3deg); }
.contract-head, .contract-foot, .panel-head, .response-head, .code-head { display: flex; align-items: center; justify-content: space-between; }
.contract-head { padding: 15px 18px; border-bottom: 1px solid var(--line); color: #b8c8c3; font: 11px/1 var(--mono); }
.status-code { color: var(--cyan); }
.contract-card pre { min-height: 250px; padding: 28px 24px; margin: 0; font: 12px/2 var(--mono); overflow: auto; }
.contract-foot { padding: 14px 18px; border-top: 1px solid var(--line); color: var(--muted); font: 10px/1 var(--mono); }
.contract-foot span { display: flex; align-items: center; gap: 7px; }
.mini-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.mini-dot.cyan { background: var(--cyan); }.mini-dot.amber { background: var(--amber); }
.key { color: #8dcfc0; }.string { color: #e8c991; }.bool { color: #8fb9ed; }.number { color: #d7a5e8; }

.flow { padding: 22px; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 18px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13, 23, 21, 0.62); }
.flow article { display: flex; align-items: flex-start; gap: 15px; }
.flow .step { color: var(--cyan); font: 11px/1.4 var(--mono); }
.flow strong { display: block; font-size: 14px; margin-bottom: 5px; }
.flow p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.flow-arrow { color: #445b54; }

.workbench, .reference { padding-top: 120px; scroll-margin-top: 80px; }
.section-heading { margin-bottom: 30px; display: flex; align-items: end; justify-content: space-between; gap: 50px; }
.section-heading h2, .quickstart h2 { margin: 8px 0 0; font-size: clamp(32px, 4.3vw, 54px); line-height: 1; letter-spacing: -0.045em; }
.section-heading > p { max-width: 470px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 15px 15px 0 0; overflow: hidden; }
.mode-tab { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 0; background: rgba(13, 23, 21, 0.7); color: var(--muted); cursor: pointer; text-align: left; }
.mode-tab + .mode-tab { border-left: 1px solid var(--line); }
.mode-tab span { font-weight: 700; }
.mode-tab small { color: #667b74; font: 10px/1 var(--mono); }
.mode-tab.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px var(--cyan); }
.mode-tab.active small { color: var(--cyan); }

.console-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; border: 1px solid var(--line); border-top: 0; background: rgba(13, 23, 21, 0.7); }
.request-panel { padding: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-right: 1px solid var(--line); }
.panel-head { grid-column: 1 / -1; min-height: 28px; }
.panel-head > div { display: flex; align-items: center; gap: 10px; }
.panel-head code, .endpoint-title code { font: 12px/1 var(--mono); color: #c2d1cc; }
.method { display: inline-flex; padding: 6px 8px; border-radius: 6px; background: var(--cyan-dark); color: var(--cyan); font: 800 10px/1 var(--mono); }
.required-note { color: var(--muted); font-size: 11px; }.required-note b, .field label b { color: var(--amber); }
.full, .conditional-fields { grid-column: 1 / -1; }
.conditional-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.conditional-fields[hidden], [hidden] { display: none !important; }
.field label { display: block; margin: 0 0 8px; color: #c7d5d0; font-size: 12px; font-weight: 650; }
.field small { display: block; margin-top: 7px; color: #6f837c; font-size: 10px; line-height: 1.45; }
.field small code { font-family: var(--mono); color: #8da49c; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: 0;
  background: #091310;
  color: var(--text);
  font: 12px/1.5 var(--mono);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
input { height: 43px; padding: 0 12px; }
textarea { padding: 10px 12px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: rgba(79, 224, 192, 0.62); box-shadow: 0 0 0 3px rgba(79, 224, 192, 0.08); }
input::placeholder, textarea::placeholder { color: #40534d; }
.secret-input { position: relative; }.secret-input input { padding-right: 60px; }
.secret-input button { position: absolute; right: 5px; top: 5px; height: 33px; padding: 0 10px; border: 0; background: transparent; color: var(--cyan); font-size: 11px; cursor: pointer; }
.unit-input { position: relative; }.unit-input input { padding-right: 42px; }.unit-input span { position: absolute; right: 12px; top: 13px; color: var(--muted); font-size: 11px; }

.advanced { padding-top: 4px; border-top: 1px solid var(--line); }
.advanced summary { padding: 16px 0 0; display: flex; justify-content: space-between; color: #b9cac4; font-size: 12px; cursor: pointer; list-style: none; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before { content: "+"; color: var(--cyan); margin-right: 8px; font-family: var(--mono); }
.advanced[open] summary::before { content: "−"; }
.advanced summary span { margin-left: auto; color: #63766f; font-size: 10px; }
.advanced-grid { padding-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.check { min-height: 38px; padding: 9px 10px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 9px; color: #9fb1ab; font-size: 11px; cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--cyan); }
.form-actions { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.button.submit { min-width: 132px; }
.spinner { width: 13px; height: 13px; border: 2px solid rgba(6, 17, 14, 0.3); border-top-color: #06110e; border-radius: 50%; display: none; animation: spin 0.75s linear infinite; }
.is-loading .spinner { display: block; }.is-loading .button-label { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }
.elapsed { margin-left: auto; color: #667b74; font: 10px/1 var(--mono); }
.form-error { grid-column: 1 / -1; padding: 11px 13px; border: 1px solid rgba(255, 117, 111, 0.3); border-radius: 9px; background: rgba(255, 117, 111, 0.07); color: #ffaaa6; font-size: 12px; }

.preview-panel { min-width: 0; display: flex; flex-direction: column; }
.preview-panel .panel-head { padding: 20px 22px; border-bottom: 1px solid var(--line); font: 11px/1 var(--mono); }
.text-button { padding: 5px; border: 0; background: transparent; color: var(--cyan); cursor: pointer; font-size: 11px; }
.preview-panel pre, #response-json { margin: 0; padding: 22px; overflow: auto; color: #b8c9c3; font: 11px/1.75 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-panel pre { min-height: 380px; flex: 1; }
.preview-note { padding: 13px 22px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-block: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.preview-note code { color: #9ec1b6; font-family: var(--mono); }
.guard-list { padding: 20px 22px; display: grid; gap: 14px; }
.guard-list div { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.guard-list i { width: 24px; height: 24px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--cyan); font: normal 9px/1 var(--mono); }
.guard-list strong { color: #b9cac4; }

.response-panel { border: 1px solid var(--line); border-top: 0; background: #091310; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.response-empty { min-height: 150px; display: flex; justify-content: center; align-items: center; gap: 15px; color: var(--muted); }
.terminal-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--cyan); font: 18px/1 var(--mono); }
.response-empty strong { color: #bdcdc8; font-size: 13px; }.response-empty p { margin: 5px 0 0; font-size: 11px; }
.response-head { padding: 17px 22px; border-bottom: 1px solid var(--line); }
.response-head > div { display: flex; align-items: center; gap: 10px; }
.response-head strong { font-size: 13px; }
.response-status { padding: 6px 8px; border-radius: 6px; background: rgba(79, 224, 192, 0.1); color: var(--cyan); font: 800 10px/1 var(--mono); }
.response-status.error { background: rgba(255, 117, 111, 0.1); color: var(--red); }
.response-actions { gap: 18px !important; }
.switch { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { width: 30px; height: 17px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 999px; background: #13201d; }
.switch span::after { content: ""; width: 11px; height: 11px; display: block; border-radius: 50%; background: #71877f; transition: transform 150ms ease, background 150ms ease; }
.switch input:checked + span::after { transform: translateX(13px); background: var(--cyan); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.metric { padding: 16px 20px; }.metric + .metric { border-left: 1px solid var(--line); }
.metric span { display: block; color: #647871; font: 9px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.metric strong { display: block; margin-top: 7px; color: #d6e2de; font: 13px/1.2 var(--mono); overflow: hidden; text-overflow: ellipsis; }
.token-card { margin: 20px 22px 0; padding: 14px; display: flex; align-items: center; gap: 14px; border: 1px solid rgba(79, 224, 192, 0.18); border-radius: 10px; background: rgba(79, 224, 192, 0.04); }
.token-card > div { min-width: 0; flex: 1; }.token-card span { display: block; margin-bottom: 6px; color: var(--cyan); font: 9px/1 var(--mono); text-transform: uppercase; }.token-card code { display: block; overflow: hidden; text-overflow: ellipsis; color: #b8cbc4; font: 10px/1 var(--mono); white-space: nowrap; }
#response-json { max-height: 440px; }

.endpoint-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.endpoint-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13, 23, 21, 0.72); }
.endpoint-card.accent { border-color: rgba(79, 224, 192, 0.25); background: linear-gradient(150deg, rgba(79, 224, 192, 0.07), rgba(13, 23, 21, 0.78) 45%); }
.endpoint-title { display: flex; align-items: center; gap: 10px; }
.endpoint-card h3 { margin: 28px 0 10px; font-size: 24px; letter-spacing: -0.035em; }
.endpoint-card > p { min-height: 50px; margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.endpoint-card dl { margin: 0; border-top: 1px solid var(--line); }
.endpoint-card dl div { padding: 12px 0; display: grid; grid-template-columns: 70px 1fr; gap: 12px; border-bottom: 1px solid var(--line); }
.endpoint-card dt { color: #687c75; font-size: 11px; }.endpoint-card dd { margin: 0; color: #adbfba; font-size: 11px; line-height: 1.7; }.endpoint-card dd code { color: var(--cyan); font-family: var(--mono); }
.semantics { margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.semantics article { padding: 22px 4px 0; border-top: 1px solid var(--line-strong); }
.semantics span { color: var(--cyan); font: 10px/1 var(--mono); }.semantics h3 { margin: 14px 0 8px; font-size: 15px; }.semantics p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }.semantics code { color: #b5c9c2; font-family: var(--mono); }

.quickstart { padding: 120px 0; display: grid; grid-template-columns: 0.65fr 1.35fr; gap: 70px; align-items: center; }
.quickstart p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.code-block { min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: #08110f; box-shadow: var(--shadow); }
.code-head { padding: 12px 16px; border-bottom: 1px solid var(--line); color: #6f837c; font: 10px/1 var(--mono); }
.code-block pre { margin: 0; padding: 22px; overflow: auto; color: #bfd1cb; font: 11px/1.8 var(--mono); }

.footer { min-height: 120px; padding: 30px 0; display: flex; align-items: center; gap: 40px; border-top: 1px solid var(--line); }
.footer-brand { min-width: 150px; }.footer p { flex: 1; margin: 0; color: #667a73; font-size: 11px; }.footer > div:last-child { display: flex; gap: 18px; }.footer a { color: var(--muted); font-size: 11px; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; padding: 11px 14px; border: 1px solid rgba(79, 224, 192, 0.3); border-radius: 9px; background: #10211d; color: #cde1da; box-shadow: var(--shadow); font-size: 11px; animation: toast-in 180ms ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 900px) {
  .topbar nav { display: none; }
  .health-pill { margin-left: auto; }
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 90px; }
  .contract-card { transform: none; }
  .flow { grid-template-columns: 1fr; }.flow-arrow { transform: rotate(90deg); justify-self: center; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .console-grid { grid-template-columns: 1fr; }.request-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .preview-panel pre { min-height: 260px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }.metric:nth-child(3) { border-left: 0; }.metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .quickstart { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 24px, 1180px); }
  .topbar { width: calc(100% - 16px); top: 8px; margin-top: 8px; }
  .hero { padding-top: 72px; }.hero h1 { font-size: 48px; }.hero-lead { font-size: 15px; }
  .mode-tabs { grid-template-columns: 1fr; }.mode-tab + .mode-tab { border-left: 0; border-top: 1px solid var(--line); }.mode-tab small { display: none; }
  .request-panel { padding: 20px; grid-template-columns: 1fr; }.field, .conditional-fields, .advanced-grid { grid-column: 1; grid-template-columns: 1fr; }
  .advanced summary span { display: none; }.form-actions { flex-wrap: wrap; }.elapsed { width: 100%; margin: 4px 0 0; }
  .response-head { align-items: flex-start; gap: 12px; flex-direction: column; }.response-actions { width: 100%; justify-content: space-between; }
  .metric-grid { grid-template-columns: 1fr; }.metric + .metric { border-left: 0; border-top: 1px solid var(--line); }
  .token-card { align-items: stretch; flex-direction: column; }
  .user-menu-trigger { max-width: 145px; }
  .guest-actions { gap: 8px; }
  .nav-register { padding-inline: 11px; }
  .endpoint-grid, .semantics { grid-template-columns: 1fr; }.endpoint-card > p { min-height: 0; }
  .quickstart { padding: 88px 0; }.footer { align-items: flex-start; flex-direction: column; gap: 20px; }.footer > div:last-child { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Multi-page product, account and admin surfaces. */
.topbar nav a.active { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.guest-actions { display: flex; align-items: center; gap: 12px; }
.nav-login { color: #b8cac4; font-size: 12px; }
.nav-register { min-height: 36px; padding-inline: 14px; font-size: 12px; }
.account-email { max-width: 220px; overflow: hidden; color: var(--muted); font: 11px/1 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.user-menu { position: relative; }
.user-menu-trigger { max-width: 250px; min-height: 38px; padding: 0 11px 0 13px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(255, 255, 255, 0.025); color: #c5d4cf; cursor: pointer; }
.user-menu-trigger span { overflow: hidden; font: 11px/1 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.user-menu-trigger svg { width: 14px; height: 14px; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-width: 1.7; transition: transform 150ms ease; }
.user-menu-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.user-menu-dropdown { position: absolute; top: calc(100% + 9px); right: 0; width: 170px; padding: 7px; border: 1px solid var(--line-strong); border-radius: 11px; background: #0d1815; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42); }
.user-menu-dropdown a, .user-menu-dropdown button { width: 100%; min-height: 38px; padding: 0 11px; display: flex; align-items: center; border: 0; border-radius: 7px; background: transparent; color: #b8c9c3; cursor: pointer; font-size: 11px; text-align: left; }
.user-menu-dropdown a:hover, .user-menu-dropdown button:hover { background: rgba(79, 224, 192, 0.08); color: var(--cyan); }
.user-menu-dropdown button { border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; color: #e3938f; }

.home-section { padding-top: 130px; }
.trust-strip { margin-top: 72px; display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.trust-strip article { padding: 26px 22px; }
.trust-strip article + article { border-left: 1px solid var(--line); }
.trust-strip strong, .trust-strip span { display: block; }
.trust-strip strong { color: var(--cyan); font-size: 13px; }
.trust-strip span { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.cta { margin-block: 120px; padding: 50px; display: flex; align-items: center; justify-content: space-between; gap: 40px; border: 1px solid rgba(79, 224, 192, 0.24); border-radius: var(--radius); background: linear-gradient(120deg, rgba(79, 224, 192, 0.08), rgba(13, 23, 21, 0.82)); }
.cta h2 { max-width: 700px; margin: 10px 0 0; font-size: clamp(32px, 4.5vw, 58px); line-height: 1; letter-spacing: -0.05em; }
.cta p { margin: 18px 0 0; color: var(--muted); }
.cta > div:last-child { display: flex; gap: 10px; flex: 0 0 auto; }

.page-hero { padding: 110px 0 50px; }
.page-hero h1 { margin: 14px 0 22px; font-size: clamp(48px, 7vw, 86px); line-height: 0.98; letter-spacing: -0.06em; }
.page-hero p { max-width: 760px; color: #b2c3bd; font-size: 16px; line-height: 1.8; }
.page-hero code, .code-examples code { font-family: var(--mono); color: var(--cyan); }
.docs-reference { padding-top: 40px; }
.code-examples { padding: 120px 0; }

.simple-header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; }
.simple-header > a:last-child { color: var(--muted); font-size: 12px; }
.auth-body { background-color: #07100e; }
.auth-layout { min-height: calc(100vh - 92px); padding: 70px 0 120px; display: grid; grid-template-columns: 1fr 470px; gap: 100px; align-items: center; }
.auth-context h1 { margin: 16px 0 25px; font-size: clamp(50px, 7vw, 88px); line-height: 0.96; letter-spacing: -0.065em; }
.auth-context h1 em { color: var(--cyan); font-style: normal; }
.auth-context > p { max-width: 620px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.auth-points { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 9px; }
.auth-points span { padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; color: #9db1aa; font: 10px/1 var(--mono); }
.auth-card { padding: 38px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: rgba(13, 23, 21, 0.88); box-shadow: var(--shadow); }
.auth-card h2 { margin: 8px 0; font-size: 34px; letter-spacing: -0.04em; }
.auth-card > div > p { margin: 0 0 28px; color: var(--muted); font-size: 12px; }
.auth-card form { display: grid; gap: 20px; }
.auth-submit { width: 100%; margin-top: 5px; }
.auth-switch { margin: 22px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.auth-switch a { color: var(--cyan); }

.console-page { padding: 90px 0 120px; }
.console-heading { margin-bottom: 36px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.console-heading h1 { margin: 8px 0 10px; font-size: clamp(44px, 6vw, 72px); letter-spacing: -0.055em; }
.console-heading p { margin: 0; color: var(--muted); }
.new-key-banner { margin-bottom: 24px; padding: 24px; display: flex; align-items: center; gap: 24px; border: 1px solid rgba(255, 180, 84, 0.35); border-radius: 14px; background: rgba(255, 180, 84, 0.07); }
.new-key-banner > div { min-width: 0; flex: 1; }
.new-key-banner span, .new-key-banner p { display: block; color: #bfa781; font-size: 11px; }
.new-key-banner code { display: block; margin-top: 9px; overflow: auto; color: #ffe0b0; font: 12px/1.6 var(--mono); white-space: nowrap; }
.new-key-banner p { margin: 7px 0 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-grid article { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: rgba(13, 23, 21, 0.72); }
.stat-grid article.accent-stat { border-color: rgba(79, 224, 192, 0.3); background: rgba(79, 224, 192, 0.06); }
.stat-grid span, .stat-grid strong { display: block; }
.stat-grid span { color: var(--muted); font-size: 11px; }
.stat-grid strong { margin-top: 13px; font: 28px/1 var(--mono); }
.dashboard-panel { margin-top: 24px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13, 23, 21, 0.72); }
.panel-title { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.panel-title h2 { margin: 8px 0 0; font-size: 28px; letter-spacing: -0.035em; }
.panel-note, .table-note { color: var(--muted); font-size: 11px; }
.panel-note { margin: 14px 0 22px; }
.key-list { display: grid; gap: 10px; }
.key-row { padding: 17px 18px; display: grid; grid-template-columns: 1.5fr 0.7fr 1fr; gap: 20px; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: #091310; }
.key-row.inactive { opacity: 0.5; }
.key-row > div:first-child { min-width: 0; }
.key-row code { display: block; overflow: hidden; color: #c5d8d1; font: 12px/1.4 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.key-row span { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.key-row > div:not(:first-child) span { margin: 0 0 6px; }
.key-row strong { color: #c2d3cd; font: 11px/1.4 var(--mono); }
.table-wrap { margin-top: 20px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: #6f837c; font: 9px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
td { color: #adbfba; font: 11px/1.4 var(--mono); }
td.status-success { color: var(--cyan); }
td.status-failure { color: var(--red); }
td.usage-reason { min-width: 190px; max-width: 360px; white-space: normal; word-break: break-word; }
td.charge-paid { color: var(--amber); }
td.charge-free { color: var(--muted); }
.empty-table { padding: 32px; color: var(--muted); font-size: 12px; text-align: center; }
.admin-table td:first-child strong, .admin-table td:first-child small { display: block; }
.admin-table td:first-child small { margin-top: 5px; color: #647871; font-size: 9px; }
.credit-form { display: flex; gap: 7px; }
.credit-form input { width: 78px; height: 34px; }
.admin-row-actions, .review-actions { display: flex; align-items: center; gap: 8px; }
.admin-row-actions { flex-wrap: wrap; }
.button.reject { border-color: rgba(255, 117, 111, 0.3); background: rgba(255, 117, 111, 0.06); color: #ff9792; }
.status-filter { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; }
.status-filter select { width: 110px; height: 34px; padding: 0 9px; }
.admin-stats { grid-template-columns: repeat(5, 1fr); }
.console-page > .form-error { margin-top: 20px; }

@media (max-width: 1060px) {
  .topbar { gap: 16px; }
  .topbar nav { gap: 14px; }
  .health-pill { display: none; }
  .auth-layout { grid-template-columns: 1fr 420px; gap: 45px; }
  .trust-strip { grid-template-columns: 1fr 1fr; }
  .trust-strip article:nth-child(3) { border-left: 0; }
  .trust-strip article:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .account-email { display: none; }
  .auth-layout { grid-template-columns: 1fr; gap: 45px; padding-top: 45px; }
  .auth-context h1 { font-size: 54px; }
  .auth-card { padding: 26px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .key-row { grid-template-columns: 1fr; }
  .cta { padding: 30px; align-items: flex-start; flex-direction: column; }
  .console-heading, .new-key-banner { align-items: flex-start; flex-direction: column; }
  .new-key-banner .button { width: 100%; }
}

@media (max-width: 520px) {
  .trust-strip, .stat-grid { grid-template-columns: 1fr; }
  .trust-strip article + article { border-left: 0; border-top: 1px solid var(--line); }
  .page-hero { padding-top: 75px; }
  .page-hero h1 { font-size: 48px; }
  .console-page { padding-top: 60px; }
  .dashboard-panel { padding: 20px; }
  .panel-title { align-items: flex-start; flex-direction: column; }
}

/* Personal account center: compact sidebar inspired by modern API consoles. */
.account-layout { padding: 52px 0 110px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 34px; align-items: start; }
.account-sidebar { position: sticky; top: 104px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(11, 20, 18, 0.92); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18); }
.sidebar-user { padding: 22px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.sidebar-avatar, .profile-avatar { display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: linear-gradient(145deg, var(--cyan), #249a83); color: #05110e; font: 800 15px/1 var(--mono); }
.sidebar-avatar { width: 40px; height: 40px; }
.sidebar-user div { min-width: 0; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { color: #dce9e4; font-size: 12px; }
.sidebar-user small { margin-top: 6px; color: var(--muted); font-size: 10px; }
.account-sidebar > nav { padding: 10px; display: grid; gap: 5px; }
.account-sidebar > nav a { min-height: 50px; padding: 0 13px; display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; border: 1px solid transparent; border-radius: 11px; color: #9eb0aa; font-size: 13px; font-weight: 650; transition: color 150ms ease, background 150ms ease, border-color 150ms ease; }
.account-sidebar > nav a:hover { color: #dce9e4; background: rgba(255, 255, 255, 0.025); }
.account-sidebar > nav a.active { border-color: rgba(79, 224, 192, 0.16); background: rgba(79, 224, 192, 0.09); color: var(--cyan); }
.account-sidebar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.account-sidebar nav b { min-width: 24px; height: 22px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: rgba(79, 224, 192, 0.12); color: var(--cyan); font: 9px/1 var(--mono); }
.account-sidebar nav b.empty { background: rgba(145, 166, 159, 0.1); color: #758a83; }
.sidebar-foot { padding: 18px 22px 21px; border-top: 1px solid var(--line); }
.sidebar-foot span, .sidebar-foot strong { display: block; }
.sidebar-foot span { color: #657971; font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; }
.sidebar-foot strong { margin-top: 6px; color: #adbfba; font: 11px/1.4 var(--mono); }
.sidebar-foot a { display: inline-block; margin-top: 15px; color: var(--cyan); font-size: 10px; }
.account-content { min-width: 0; }
.account-panel { animation: account-panel-in 180ms ease; }
.account-panel[hidden] { display: none !important; }
@keyframes account-panel-in { from { opacity: 0; transform: translateY(5px); } }
.account-panel .console-heading { min-height: 116px; margin-bottom: 26px; }
.account-panel .console-heading h1 { font-size: clamp(42px, 5.4vw, 66px); }
.overview-grid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.overview-card { min-height: 210px; padding: 25px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 15px; background: rgba(13, 23, 21, 0.72); }
.overview-card-line { margin-top: 28px; display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.overview-card h2 { margin: 0; font-size: 21px; }
.overview-card p { max-width: 280px; margin: 8px 0 0; overflow: hidden; color: var(--muted); font: 10px/1.5 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.overview-card > a { margin-top: auto; color: var(--cyan); font-size: 11px; }
.state-badge { padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font: 9px/1 var(--mono); white-space: nowrap; }
.state-badge.online { border-color: rgba(79, 224, 192, 0.28); background: rgba(79, 224, 192, 0.08); color: var(--cyan); }
.key-management { margin-top: 0; padding: 0; overflow: hidden; }
.key-primary { padding: 27px 28px; display: grid; grid-template-columns: 48px 1fr auto; gap: 17px; align-items: center; border-bottom: 1px solid var(--line); }
.key-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(79, 224, 192, 0.25); border-radius: 13px; background: rgba(79, 224, 192, 0.07); color: var(--cyan); font: 28px/1 var(--mono); }
.key-primary > div { min-width: 0; }
.key-primary > div > span, .key-primary small { display: block; color: var(--muted); font-size: 10px; }
.key-primary code { display: block; margin: 7px 0; overflow: hidden; color: #d4e4de; font: 13px/1.4 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.key-facts { display: grid; grid-template-columns: repeat(3, 1fr); }
.key-facts > div { padding: 20px 28px; }
.key-facts > div + div { border-left: 1px solid var(--line); }
.key-facts span, .key-facts strong { display: block; }
.key-facts span { color: #657971; font-size: 9px; text-transform: uppercase; letter-spacing: 0.07em; }
.key-facts strong { margin-top: 8px; color: #b6c7c1; font: 11px/1.4 var(--mono); }
.danger-zone { padding: 20px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid rgba(255, 117, 111, 0.18); background: rgba(255, 117, 111, 0.025); }
.danger-zone strong { font-size: 12px; }
.danger-zone p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.button.danger { min-height: 38px; border-color: rgba(255, 117, 111, 0.35); background: rgba(255, 117, 111, 0.07); color: #ff9792; }
.key-empty { min-height: 350px; padding: 50px 24px; display: grid; justify-items: center; align-content: center; text-align: center; }
.empty-key-icon { width: 56px; height: 56px; display: grid; place-items: center; border: 1px dashed rgba(79, 224, 192, 0.38); border-radius: 16px; color: var(--cyan); font: 26px/1 var(--mono); }
.key-empty h2 { margin: 20px 0 8px; }
.key-empty p { max-width: 410px; margin: 0 0 23px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.usage-panel { margin-top: 0; }
.profile-card { margin-top: 0; padding: 32px; display: grid; grid-template-columns: 90px 1fr; gap: 34px; align-items: start; }
.profile-avatar { width: 90px; height: 90px; border-radius: 23px; font-size: 28px; }
.profile-card dl { margin: 0; }
.profile-card dl div { padding: 15px 0; display: grid; grid-template-columns: 130px 1fr; gap: 24px; border-bottom: 1px solid var(--line); }
.profile-card dt { color: var(--muted); font-size: 11px; }
.profile-card dd { margin: 0; color: #cfddd8; font: 12px/1.5 var(--mono); }
.recharge-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); gap: 18px; }
.recharge-layout .dashboard-panel { margin-top: 0; }
.recharge-form-card form { margin-top: 28px; display: grid; gap: 20px; }
.recharge-form-card .field > span { display: block; margin-bottom: 8px; color: #c7d5d0; font-size: 12px; font-weight: 650; }
.recharge-form-card .field small { display: block; margin-top: 7px; color: #6f837c; font-size: 10px; line-height: 1.45; }
.recharge-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.recharge-presets button { min-height: 38px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, 0.025); color: #aebfba; cursor: pointer; font: 11px/1 var(--mono); }
.recharge-presets button:hover { border-color: rgba(79, 224, 192, 0.34); color: var(--cyan); }
.recharge-notice h2 { margin: 8px 0 22px; }
.recharge-notice ol { margin: 0; padding: 0; display: grid; gap: 18px; list-style: none; }
.recharge-notice li { display: flex; align-items: center; gap: 13px; }
.recharge-notice li > b { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(79, 224, 192, 0.25); border-radius: 50%; color: var(--cyan); font: 10px/1 var(--mono); }
.recharge-notice li strong, .recharge-notice li small { display: block; }
.recharge-notice li strong { font-size: 12px; }
.recharge-notice li small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.recharge-notice > p { margin: 25px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: #80958e; font-size: 10px; line-height: 1.7; }
.order-status { display: inline-flex; padding: 6px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font: 9px/1 var(--mono); }
.order-status.pending { border-color: rgba(255, 180, 84, 0.32); background: rgba(255, 180, 84, 0.07); color: var(--amber); }
.order-status.approved { border-color: rgba(79, 224, 192, 0.3); background: rgba(79, 224, 192, 0.07); color: var(--cyan); }
.order-status.rejected { border-color: rgba(255, 117, 111, 0.3); background: rgba(255, 117, 111, 0.06); color: #ff9792; }
.admin-section-panel { margin-top: 0; }
.admin-summary-heading { margin: 42px 0 18px; padding-top: 32px; border-top: 1px solid var(--line); }
.admin-summary-heading h2 { margin: 8px 0 0; font-size: 30px; letter-spacing: -0.04em; }
.admin-overview-grid .overview-card-line > strong { color: var(--cyan); font: 24px/1 var(--mono); }
.detail-backdrop { position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, 0.58); backdrop-filter: blur(3px); }
.admin-detail { position: fixed; inset: 0 0 0 auto; z-index: 40; width: min(720px, 94vw); overflow-y: auto; border-left: 1px solid var(--line-strong); background: #091310; box-shadow: -30px 0 80px rgba(0, 0, 0, 0.4); }
.admin-detail > header { position: sticky; top: 0; z-index: 2; padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(9, 19, 16, 0.94); backdrop-filter: blur(16px); }
.admin-detail h2 { margin: 7px 0 0; font-size: 28px; }
.detail-close { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font-size: 24px; }
.detail-body { padding: 26px 28px 60px; display: grid; gap: 34px; }
.detail-body h3 { margin: 0; font-size: 18px; }
.detail-summary { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.detail-summary div { min-width: 0; padding: 17px 18px; border-bottom: 1px solid var(--line); }
.detail-summary div:nth-child(odd) { border-right: 1px solid var(--line); }
.detail-summary span, .detail-summary strong { display: block; }
.detail-summary span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.detail-summary strong { margin-top: 7px; overflow-wrap: anywhere; color: #c4d5cf; font: 11px/1.5 var(--mono); }
body.detail-open { overflow: hidden; }

@media (max-width: 1100px) {
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 920px) {
  .account-layout { grid-template-columns: 1fr; padding-top: 28px; }
  .account-sidebar { position: static; }
  .sidebar-user, .sidebar-foot { display: none; }
  .account-sidebar > nav { grid-template-columns: repeat(3, 1fr); }
  .admin-account-layout .account-sidebar > nav { grid-template-columns: repeat(4, 1fr); }
  .account-sidebar > nav a { min-height: 64px; grid-template-columns: 1fr; grid-template-rows: 25px auto; justify-items: center; gap: 4px; padding: 8px 4px; font-size: 10px; }
  .account-sidebar nav b { display: none; }
}

@media (max-width: 660px) {
  .account-layout { width: min(100% - 24px, 1180px); gap: 22px; }
  .account-panel .console-heading { min-height: 0; }
  .overview-grid { grid-template-columns: 1fr; }
  .account-sidebar > nav { grid-template-columns: repeat(2, 1fr); }
  .admin-account-layout .account-sidebar > nav { grid-template-columns: repeat(2, 1fr); }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .recharge-layout { grid-template-columns: 1fr; }
  .recharge-presets { grid-template-columns: 1fr 1fr; }
  .key-primary { grid-template-columns: 44px 1fr; padding: 22px 20px; }
  .key-primary > .state-badge { grid-column: 2; justify-self: start; }
  .key-facts { grid-template-columns: 1fr; }
  .key-facts > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .danger-zone { align-items: stretch; flex-direction: column; }
  .profile-card { grid-template-columns: 1fr; }
  .profile-card dl div { grid-template-columns: 1fr; gap: 7px; }
  .detail-summary { grid-template-columns: 1fr; }
  .detail-summary div:nth-child(odd) { border-right: 0; }
  .admin-detail > header, .detail-body { padding-inline: 18px; }
}

@media (max-width: 520px) {
  .admin-stats { grid-template-columns: 1fr; }
}
