:root {
  --bg: #0c0f14;
  --bg-raised: #111520;
  --panel: #131920;
  --panel-raised: #1c2333;
  --border: #1e2d3d;
  --border-strong: #2d4055;
  --text: #dce4f0;
  --muted: #506070;
  --muted-light: #7a90a8;
  --accent: #3fb950;
  --accent-dim: rgba(63, 185, 80, 0.1);
  --accent-soft: rgba(63, 185, 80, 0.18);
  --red: #ff5f57;
  --yellow: #febc2e;
  --green-dot: #28c840;
  --terminal-bg: #090c11;
  --terminal-border: #192030;
  --prompt: #3fb950;
  --ok: #3fb950;
  --danger: #e05252;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.marketing {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  font-weight: 400;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(circle at center, rgba(63, 185, 80, 0.09) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p {
  margin: 0;
}

code,
pre {
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
}

code {
  font-size: 0.92em;
}

/* ── Corner CTA ── */

.corner-cta {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 50;
  padding: 7px 13px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  transition: color 130ms ease, border-color 130ms ease, background 130ms ease;
}

.corner-cta:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* ── Layout ── */

.page-shell {
  position: relative;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 24px 80px;
}

/* ── Nav ── */

.site-nav {
  padding: 22px 24px 0;
}

.site-nav__inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-nav__brand {
  font-family: "IBM Plex Mono", monospace;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 120ms ease;
}

.site-nav__brand:hover {
  color: var(--accent);
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav__link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: color 120ms ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--text);
  outline: none;
}

/* ── Hero typography ── */

.hero-kicker {
  margin-bottom: 18px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--prompt);
  letter-spacing: 0.04em;
}

.hero-title {
  margin: 0 0 20px;
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.04;
  color: var(--text);
}

.hero-sub {
  max-width: 38rem;
  color: var(--muted-light);
  font-size: 1rem;
  line-height: 1.78;
  font-weight: 300;
}

.lede {
  max-width: 42rem;
  color: var(--muted-light);
  font-size: 1rem;
  line-height: 1.78;
  font-weight: 300;
}

/* ── Shell padding ── */

.simple-shell {
  padding-top: 32px;
}

.docs-shell {
  padding-top: 36px;
}

.legal-shell {
  padding-top: 36px;
}

/* ── Terminal window (hero) ── */

.terminal-window {
  margin-top: 36px;
  border: 1px solid var(--terminal-border);
  border-radius: 10px;
  background: var(--terminal-bg);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 8px 40px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(63, 185, 80, 0.04);
  overflow: hidden;
}

.terminal-window .terminal-chrome {
  background: #13192a;
  border-bottom: 1px solid var(--terminal-border);
}

.terminal-window .terminal-dot:nth-child(1) { background: var(--red); }
.terminal-window .terminal-dot:nth-child(2) { background: var(--yellow); }
.terminal-window .terminal-dot:nth-child(3) { background: var(--green-dot); }

.terminal-window .command-line code {
  color: #b8ccdf;
}

.terminal-window .command-entry + .command-entry {
  border-top: 1px solid rgba(25, 32, 48, 0.9);
}

/* ── Terminal chrome (shared) ── */

.terminal-chrome {
  padding: 10px 14px;
  background: var(--panel-raised);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 7px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

/* ── Command panel (docs / inline) ── */

.command-panel {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.command-entry {
  display: block;
}

.command-entry + .command-entry {
  border-top: 1px solid var(--border);
}

.command-entry--copyable {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-right: 12px;
}

.command-line {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
}

.command-line code {
  font-size: 0.9rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
}

.command-prompt {
  flex: 0 0 auto;
  font-family: "IBM Plex Mono", monospace;
  color: var(--prompt);
  font-size: 0.9rem;
  user-select: none;
}

/* ── Copy button ── */

.copy-button {
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 130ms ease, color 130ms ease, background 130ms ease;
}

.copy-button:hover,
.copy-button:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  outline: none;
}

/* ── Docs ── */

.docs-header {
  margin-bottom: 48px;
}

.docs-title {
  margin: 0 0 12px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.docs-sections {
  display: grid;
  gap: 52px;
  min-width: 0;
}

.docs-section h2 {
  margin: 0 0 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--prompt);
  text-transform: uppercase;
}

.docs-section p {
  color: var(--muted-light);
  font-size: 0.96rem;
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: 0;
}

/* ── Config block ── */

.config-block-wrap {
  margin-top: 16px;
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  overflow: hidden;
}

.config-block-label {
  padding: 8px 16px;
  background: #13192a;
  border-bottom: 1px solid var(--terminal-border);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.config-block {
  margin: 0;
  padding: 20px 22px;
  background: var(--terminal-bg);
  color: #7a9dbf;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.85;
  overflow-x: auto;
  white-space: pre;
}

/* ── Legal ── */

.legal-header {
  margin-bottom: 32px;
}

.legal-kicker {
  margin-bottom: 10px;
  font-family: "IBM Plex Mono", monospace;
  color: var(--prompt);
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal-title {
  margin: 0 0 12px;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.legal-meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.legal-sections {
  display: grid;
  gap: 12px;
}

.legal-section {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.legal-section h2 {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}

.legal-section p {
  color: var(--muted-light);
  font-size: 0.92rem;
  line-height: 1.75;
  font-weight: 300;
}

.legal-section a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.legal-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.legal-list li {
  position: relative;
  padding-left: 16px;
  color: var(--muted-light);
  font-size: 0.92rem;
  line-height: 1.72;
  font-weight: 300;
}

.legal-list li::before {
  content: "";
  position: absolute;
  top: 0.76em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-strong);
  transform: translateY(-50%);
}

/* ── Auth ── */

.auth-center {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
  padding: 32px 0 0;
}

.auth-panel {
  width: 100%;
  max-width: 360px;
}

.auth-title {
  margin: 0 0 18px;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.auth-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

/* ── Buttons ── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  font: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 500;
  color: var(--text);
  background: var(--panel);
  cursor: pointer;
  transition: border-color 130ms ease, background 130ms ease;
}

.button:hover,
.button:focus-visible {
  outline: none;
  border-color: var(--text);
  background: var(--panel-raised);
}

.button--primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

.button--primary:hover {
  background: #50cc60;
  border-color: #50cc60;
}

.button--full {
  width: 100%;
}

/* ── Flash ── */

.flash {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted-light);
}

.flash--notice {
  color: var(--ok);
  border-color: rgba(63, 185, 80, 0.25);
  background: rgba(63, 185, 80, 0.05);
}

/* ── Provider button ── */

.provider-button {
  width: 100%;
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background 130ms ease, border-color 130ms ease;
}

.provider-button:hover,
.provider-button:focus-visible {
  outline: none;
  border-color: var(--text);
  background: var(--panel-raised);
}

/* ── Input ── */

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.input:focus {
  border-color: var(--accent);
  outline: none;
}

/* ── Footer ── */

.public-footer {
  padding: 0 24px 32px;
}

.public-footer__inner {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.public-footer__brand {
  font-family: "IBM Plex Mono", monospace;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.public-footer__links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.public-footer__link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 400;
  transition: color 120ms ease;
}

.public-footer__link:hover,
.public-footer__link:focus-visible {
  color: var(--text);
  outline: none;
}

/* ── Page-load animation ── */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.simple-shell .hero-kicker {
  animation: fade-up 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.05s;
}

.simple-shell .hero-title {
  animation: fade-up 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.1s;
}

.simple-shell .hero-sub {
  animation: fade-up 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.16s;
}

.simple-shell .terminal-window {
  animation: fade-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.22s;
}

/* ── Responsive ── */

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.1rem;
  }

  .docs-title {
    font-size: 1.5rem;
  }

  .legal-title {
    font-size: 1.4rem;
  }

  .site-nav {
    padding: 16px 16px 0;
  }

  .page {
    padding: 24px 16px 60px;
  }

  .public-footer {
    padding: 0 16px 28px;
  }

  .command-entry--copyable {
    grid-template-columns: 1fr;
    padding-right: 0;
  }

  .command-entry--copyable .copy-button {
    margin: 0 16px 14px;
  }

  .public-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-footer__links {
    flex-wrap: wrap;
    gap: 14px;
  }
}
