:root {
  --fg: #0f172a;
  --fg-muted: #475569;
  --fg-soft: #64748b;
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --bg-terminal: #0f172a;
  --bg-terminal-soft: #1e293b;
  --terminal-text: #e2e8f0;
  --accent: #10b981;
  --accent-dim: #059669;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --ok: #047857;
  --err: #b91c1c;
  --max-width: 760px;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 1px 3px rgba(15, 23, 42, 0.05), 0 2px 8px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}

/* --- topnav (sticky, brand presence) --- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 250, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.topnav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--fg);
  padding: 0.15rem 0.25rem;
  margin-left: -0.25rem;
  border-radius: 6px;
  transition: opacity 0.15s ease;
}

.brand-link:hover {
  opacity: 0.78;
  text-decoration: none;
}

.brand-logo {
  width: 1.6rem;
  height: 1.6rem;
  color: var(--fg);
  display: block;
  flex-shrink: 0;
}

.brand {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--fg);
}

.brand-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  background: rgba(16, 185, 129, 0.12);
  border-radius: 4px;
  align-self: center;
}

.topnav-link {
  margin-left: auto;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.topnav-link:hover {
  color: var(--fg);
  background: rgba(15, 23, 42, 0.06);
  text-decoration: none;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* --- typography --- */

h1,
h2,
h3 {
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  color: var(--fg);
}

h1 {
  font-size: 2.9rem;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 1.75rem;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.45rem;
  line-height: 1.3;
  font-weight: 600;
  margin: 3.5rem 0 1rem;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin: 1.75rem 0 0.5rem;
}

p {
  margin: 0 0 1.1rem;
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

a:hover {
  text-decoration-color: var(--accent);
}

strong {
  font-weight: 600;
}

/* --- hero --- */

.hero {
  padding: 0.5rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.eyebrow {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 1.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  background: rgba(16, 185, 129, 0.08);
  border-radius: 4px;
}

.lede {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 38rem;
}

.cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--fg);
  transition: all 0.15s ease;
  cursor: pointer;
}

.cta.primary {
  background: var(--fg);
  color: var(--bg-elevated);
}

.cta.primary:hover {
  background: #1e293b;
  border-color: #1e293b;
  text-decoration: none;
}

.cta.secondary {
  background: transparent;
  color: var(--fg);
}

.cta.secondary:hover {
  background: var(--fg);
  color: var(--bg-elevated);
  text-decoration: none;
}

/* --- bullets --- */

.bullets ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bullets li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 1rem;
  line-height: 1.55;
}

.bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}

.bullets li strong {
  font-weight: 600;
  color: var(--fg);
}

/* --- code / terminal blocks --- */

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: rgba(15, 23, 42, 0.06);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  color: var(--fg);
}

pre {
  background: var(--bg-terminal);
  color: var(--terminal-text);
  border: 1px solid var(--bg-terminal-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.6;
  margin: 1rem 0 0;
  box-shadow: var(--shadow-md);
}

pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
}

.how p {
  color: var(--fg-muted);
  font-size: 1rem;
}

/* --- pricing / tiers --- */

.pricing p {
  color: var(--fg-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.tier-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1rem;
}

@media (min-width: 720px) {
  .tier-grid {
    grid-template-columns: 1fr 1.05fr 1fr;
    gap: 1rem;
  }
}

.tier {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.tier.featured {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px var(--accent),
    var(--shadow-md);
  background: var(--bg-elevated);
}

.tier-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tier-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  padding: 0.18rem 0.4rem;
  background: rgba(16, 185, 129, 0.12);
  border-radius: 3px;
}

.tier-quota {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 0 0 0.85rem;
  line-height: 1.1;
}

.tier-quota-unit {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--fg-soft);
  letter-spacing: 0;
  margin-top: 0.2rem;
}

.tier-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--fg-muted);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tier-meta li {
  position: relative;
  padding-left: 1rem;
}

.tier-meta li::before {
  content: '•';
  position: absolute;
  left: 0.1rem;
  color: var(--fg-soft);
}

.tier.featured .tier-meta li::before {
  color: var(--accent);
}

.tier-cta {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.tier-cta a {
  color: var(--accent-dim);
  text-decoration: none;
}

.tier-cta a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* --- waitlist form --- */

form {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow-sm);
}

fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

legend {
  font-weight: 600;
  margin: 0 0 0.6rem;
  padding: 0;
  font-size: 0.98rem;
  color: var(--fg);
}

legend .req,
legend .opt {
  font-weight: 400;
  color: var(--fg-soft);
  font-size: 0.85rem;
  margin-left: 0.3rem;
}

form label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.96rem;
  color: var(--fg);
  padding: 0.15rem 0;
}

form input[type='checkbox'],
form input[type='radio'] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.email-row,
.message-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0 0 1.5rem;
  font-weight: 600;
  font-size: 0.98rem;
}

.email-row input,
.message-row textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 400;
  background: var(--bg-elevated);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  color: var(--fg);
}

.email-row input {
  max-width: 340px;
}

.message-row textarea {
  resize: vertical;
  min-height: 4rem;
  line-height: 1.5;
}

.email-row input:focus,
.message-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

button[type='submit'] {
  background: var(--fg);
  color: var(--bg-elevated);
  border: 1px solid var(--fg);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.4rem;
  font-size: 0.98rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

button[type='submit']:hover {
  background: var(--bg-terminal-soft);
}

button[type='submit']:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.status {
  margin-top: 1rem;
  min-height: 1.4em;
  font-size: 0.95rem;
  font-weight: 500;
}

.status.ok {
  color: var(--ok);
}

.status.err {
  color: var(--err);
}

/* --- usage counter --- */

.usage {
  margin-top: 4rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--fg-soft);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.usage #usage-count {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
  color: var(--fg);
  font-size: 1.05rem;
}

.muted {
  color: var(--fg-soft);
  font-size: 0.88rem;
}

/* --- blog --- */

.blog-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.blog-header {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.post-link {
  display: block;
  padding: 1.4rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.post-link:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.post-link time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-soft);
  font-weight: 500;
}

.post-link h2 {
  margin: 0.4rem 0 0.6rem;
  font-size: 1.4rem;
}

.post-link p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.97rem;
}

.post {
  /* article container — inherits .blog-main width */
}

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  margin: 0.75rem 0 0.85rem;
}

.post-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--fg-soft);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-meta time {
  color: var(--fg-muted);
  font-weight: 500;
}

.post p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--fg);
  margin: 0 0 1.25rem;
}

.post .lede {
  font-size: 1.18rem;
  color: var(--fg);
  margin-bottom: 1.75rem;
}

.post h2 {
  font-size: 1.45rem;
  margin: 3rem 0 1rem;
  letter-spacing: -0.015em;
}

.post-bullets {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.post-bullets li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 1.02rem;
  line-height: 1.6;
}

.post-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}

.post a {
  color: var(--accent-dim);
  text-decoration: underline;
  text-decoration-color: rgba(16, 185, 129, 0.4);
  text-underline-offset: 3px;
}

.post a:hover {
  text-decoration-color: var(--accent);
}

.back-link {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--fg-muted);
}

.back-link a {
  color: var(--fg-muted);
}

.back-link a:hover {
  color: var(--fg);
}

/* --- footer --- */

footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--fg-soft);
  letter-spacing: 0.02em;
}

/* --- mobile --- */

@media (max-width: 540px) {
  .topnav-inner {
    padding: 0.8rem 1.25rem;
  }
  .brand {
    font-size: 1.1rem;
  }
  .brand-logo {
    width: 1.5rem;
    height: 1.5rem;
  }
  main {
    padding: 2rem 1.25rem 3rem;
  }
  h1 {
    font-size: 2.1rem;
  }
  h2 {
    font-size: 1.3rem;
    margin-top: 2.75rem;
  }
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .cta {
    justify-content: center;
  }
  form {
    padding: 1.25rem;
  }
}
