:root {
  --bg: #0c0e11;
  --bg-2: #111418;
  --surface: #161a1f;
  --surface-2: #1b2026;
  --line: #2a3038;
  --line-soft: #22272e;
  --text: #f2f5f7;
  --muted: #98a2ad;
  --accent: #a8f04b;
  --accent-2: #8fa6ff;
  --danger: #ff7a7a;
  --radius: 14px;
  --radius-sm: 9px;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 8%, rgba(143, 166, 255, 0.09), transparent 34%),
    radial-gradient(circle at 8% 30%, rgba(168, 240, 75, 0.055), transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg-2) 55%, #0a0c0f);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, #fff 3px 4px);
  z-index: 0;
}

.container {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(12, 14, 17, 0.88);
  backdrop-filter: blur(12px);
}

.nav-shell {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent);
  color: #10130f;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.06em;
  animation: mark-in 0.7s cubic-bezier(.2,.8,.2,1) both;
}

.brand-name { font-size: 19px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link,
.nav-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 13px;
  border-radius: 9px;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-button:hover { color: var(--text); background: var(--surface); }

.nav-link:focus-visible,
.nav-button:focus-visible,
.btn:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.nav-cta {
  color: #10130f;
  background: var(--accent);
  margin-left: 4px;
}

.nav-cta:hover { color: #10130f; background: #b9ff5f; transform: translateY(-1px); }

.nav-form { display: inline; }

.page-main { padding: 44px 0 80px; min-height: calc(100vh - 330px); }

.notice {
  margin-bottom: 24px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  animation: fade-up .4s ease both;
}

.notice-error { border-left-color: var(--danger); }
.notice-success { border-left-color: var(--accent); }

.notice-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  border-left-color: var(--accent);
}

.notice-key code {
  color: var(--accent);
  word-break: break-all;
  font-size: 13px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 56px;
  align-items: center;
  padding: 44px 0 76px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.035em; margin: 0 0 14px; }
h1 { font-size: clamp(42px, 6vw, 76px); font-weight: 820; }
h2 { font-size: clamp(25px, 3vw, 38px); font-weight: 760; }
h3 { font-size: 18px; font-weight: 700; }

.hero-accent { color: var(--accent); }

.lede {
  color: var(--muted);
  font-size: 17px;
  max-width: 620px;
  margin: 0 0 28px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.btn:hover { transform: translateY(-2px); border-color: #3a424c; background: #20262d; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #10130f; }
.btn-primary:hover { background: #b9ff5f; border-color: #b9ff5f; }
.btn-secondary { background: transparent; }
.btn-block { width: 100%; }
.btn-small { min-height: 34px; padding: 0 12px; font-size: 12px; }
.btn-danger { color: var(--danger); background: #231719; border-color: #3b2428; }
.btn-danger:hover { background: #2d1b1e; border-color: #573138; }

.hero-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hero-meta span::before { content: "•"; color: var(--accent); margin-right: 8px; }

.hero-visual { min-width: 0; }

.terminal {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #171b20, #101317);
  overflow: hidden;
  animation: float 7s ease-in-out infinite;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--muted);
}

.terminal-bar span { width: 9px; height: 9px; border-radius: 50%; background: #3b434d; }
.terminal-bar span:first-child { background: #5a6672; }
.terminal-bar b { margin-left: auto; font-weight: 600; letter-spacing: .02em; }

.terminal-code,
.terminal-json,
.code-block,
pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: #d8e0e8;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-code { color: var(--accent); }
.terminal-json { border-top: 1px solid var(--line-soft); color: #a9b7c7; }

.section { padding: 44px 0; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-head h2 { margin-bottom: 0; }

.text-link { color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 700; }
.text-link:hover { text-decoration: underline; }

.feature-grid,
.limit-grid,
.dash-grid,
.quick-links {
  display: grid;
  gap: 16px;
}

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

.feature-card,
.doc-card,
.dash-card,
.auth-card,
.quick-link {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(27, 32, 38, .9), rgba(19, 23, 27, .9));
  padding: 24px;
}

.feature-card p,
.quick-link p,
.muted { color: var(--muted); }

.feature-card p { margin: 0; font-size: 14px; }

.feature-index {
  display: block;
  color: var(--accent-2);
  font-family: monospace;
  font-size: 12px;
  margin-bottom: 22px;
}

.endpoint-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(100deg, #171c22, #11151a);
}

.endpoint-copy h2 { font-family: "SFMono-Regular", Consolas, monospace; font-size: 26px; }
.endpoint-copy p { color: var(--muted); margin: 0; }

.page-head { padding: 26px 0 36px; }
.page-head h1 { font-size: clamp(38px, 5vw, 62px); }

.docs-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 10px;
  border-left: 2px solid var(--line);
  transition: color .2s ease, border-color .2s ease;
}

.docs-nav a:hover { color: var(--text); border-left-color: var(--accent); }

.docs-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.doc-card h2 { font-size: 24px; }
.doc-card p { color: var(--muted); }
.doc-card code,
.method-row code {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.steps { padding-left: 20px; color: var(--muted); }
.steps li { margin: 8px 0; }

.code-block {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #0d1014;
  margin-top: 12px;
}

.copy-btn {
  float: right;
  margin: -46px 10px 0 0;
  position: relative;
  z-index: 2;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #191e24;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  cursor: pointer;
}
.copy-btn:hover { color: var(--text); border-color: #3c4550; }
.copy-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.method-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; }

.method {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  background: rgba(168, 240, 75, .12);
  color: var(--accent);
  font-family: monospace;
  font-size: 12px;
  font-weight: 800;
}

.limit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0; }
.limit-grid div { padding: 18px; border: 1px solid var(--line-soft); border-radius: 10px; background: #12161a; }
.limit-grid strong { display: block; color: var(--text); font-size: 30px; letter-spacing: -.04em; }
.limit-grid span { color: var(--muted); font-size: 13px; }

.table-wrap { overflow-x: auto; margin-top: 12px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th,
.data-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line-soft); }
.data-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.data-table td { color: #d4dce4; }
.data-table tr:last-child td { border-bottom: 0; }

.auth-wrap { display: grid; place-items: center; padding: 40px 0; }
.auth-card { width: min(100%, 480px); }
.auth-card h1 { font-size: 38px; }
.auth-switch { color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.auth-switch a,
.inline-error a { color: var(--accent); }

.stack-form { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.stack-form label { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .03em; margin-top: 6px; }

.stack-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0f1216;
  color: var(--text);
  padding: 0 13px;
  font: inherit;
  font-size: 14px;
  transition: border-color .2s ease, background .2s ease;
}

.stack-form input:hover { border-color: #3c4550; }
.stack-form input:focus { border-color: var(--accent-2); background: #11151a; }

.inline-error {
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid #4a2a2f;
  border-radius: 8px;
  background: #211517;
  color: var(--danger);
  font-size: 13px;
}

.dash-grid { grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr); }
.dash-card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.dash-card-head h2 { font-size: 21px; margin: 0; }

.badge {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(168, 240, 75, .1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.badge-soft { background: rgba(143, 166, 255, .1); color: var(--accent-2); }
.key-prefix { color: var(--accent); font-family: monospace; font-size: 12px; }
.empty-state { color: var(--muted); text-align: center; padding: 24px 10px; }
.dash-note { color: var(--muted); font-size: 13px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }

.quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.quick-link { text-decoration: none; color: var(--text); transition: transform .2s ease, border-color .2s ease; }
.quick-link:hover { transform: translateY(-3px); border-color: #3a424c; }
.quick-link span { color: var(--accent-2); font-family: monospace; font-size: 12px; }
.quick-link p { font-size: 14px; margin: 0; }

.legal-body h2 { font-size: 21px; margin-top: 26px; }
.legal-body p { color: var(--muted); }

.empty-page { display: grid; place-items: center; text-align: center; padding: 80px 0; }
.empty-page .btn { margin-top: 16px; }

.site-footer { border-top: 1px solid var(--line-soft); padding: 42px 0 24px; background: #0a0c0f; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.footer-grid p { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.footer-grid h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }
.footer-grid a { display: block; color: #c8d1da; text-decoration: none; font-size: 13px; margin: 7px 0; }
.footer-grid a:hover { color: var(--accent); }
.footer-brand { margin-bottom: 4px; }
.footer-bottom { color: #66707c; font-size: 12px; padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--line-soft); }

.reveal { animation: fade-up .6s cubic-bezier(.2,.8,.2,1) both; }
.reveal-delay { animation-delay: .12s; }

@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes mark-in { from { opacity: 0; transform: scale(.82) rotate(-8deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .55; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 24px; }
  .feature-grid { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .nav-shell { min-height: 64px; }
  .site-nav { gap: 0; }
  .nav-link { padding: 8px 9px; font-size: 13px; }
  h1 { font-size: 42px; }
  .section-head, .endpoint-strip { flex-direction: column; align-items: flex-start; }
  .endpoint-strip { padding: 24px; }
  .quick-links, .limit-grid, .footer-grid { grid-template-columns: 1fr; }
  .page-main { padding-top: 28px; }
}

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