:root {
  --bg: #0b0b0f;
  --bg-raised: #12121a;
  --bg-code: #161620;
  --text: #c8c8d0;
  --text-bright: #e8e8f0;
  --text-dim: #6a6a78;
  --accent: #5af0b1;
  --accent-dim: #2a7a55;
  --border: #1e1e2a;
  --border-bright: #2a2a3a;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', monospace;
  --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
  --max-w: 720px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Layout ── */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  padding: 48px 0 0;
  margin-bottom: 64px;
}

.site-header .brand {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
}

.site-header .brand:hover { opacity: 0.8; }

.site-header .version {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-left: 12px;
}

.site-nav {
  margin-top: 16px;
  display: flex;
  gap: 24px;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.site-nav a:hover { color: var(--text-bright); }

/* ── Typography ── */

h1 {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-bright);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

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

.subtitle {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 48px;
  font-style: italic;
}

h2 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-top: 56px;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

h2::before {
  content: '## ';
  color: var(--text-dim);
  font-weight: 400;
}

h3 {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-top: 32px;
  margin-bottom: 12px;
}

h3::before {
  content: '### ';
  color: var(--text-dim);
  font-weight: 400;
}

p {
  margin-bottom: 16px;
  max-width: 65ch;
}

strong { color: var(--text-bright); font-weight: 600; }

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

/* ── Lists ── */

ul, ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

li {
  margin-bottom: 6px;
  max-width: 65ch;
}

li::marker { color: var(--text-dim); }

/* ── Code ── */

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-code);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 3px;
}

pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px 24px;
  overflow-x: auto;
  margin-bottom: 24px;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.8rem;
  color: var(--text);
}

/* ── Dividers ── */

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* ── Shift Table ── */

.shift-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0 32px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.shift-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.shift-table td:first-child {
  color: var(--text-dim);
  width: 140px;
  padding-right: 16px;
}

.shift-table .arrow {
  color: var(--text-dim);
  padding: 0 10px;
}

.shift-table .new { color: var(--accent); }

/* ── Highlight Box ── */

.highlight-box {
  background: var(--bg-raised);
  border-left: 2px solid var(--accent);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 4px 4px 0;
}

.highlight-box p { margin-bottom: 8px; }
.highlight-box p:last-child { margin-bottom: 0; }

/* ── Revenue callout ── */

.revenue-callout {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 600;
  margin: 16px 0 24px;
}

/* ── Flow diagram ── */

.flow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  margin: 16px 0 24px;
  line-height: 2;
}

.flow .step {
  display: inline;
}

.flow .arrow {
  color: var(--text-dim);
  margin: 0 4px;
}

/* ── Trust levels ── */

.trust-levels {
  margin: 24px 0;
}

.trust-level {
  padding: 16px 20px;
  border-left: 2px solid var(--border);
  margin-bottom: 12px;
  border-radius: 0 4px 4px 0;
}

.trust-level.level-1 { border-left-color: var(--accent); }
.trust-level.level-2 { border-left-color: #f0c05a; }
.trust-level.level-3 { border-left-color: #f05a5a; }

.trust-level .level-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-bright);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.trust-level p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ── Email capture ── */

.email-section {
  margin: 64px 0;
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.email-section h2 { border-bottom: none; margin-top: 0; }
.email-section h2::before { content: ''; }

.email-form {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  max-width: 480px;
}

.email-form input[type="email"] {
  flex: 1;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 14px;
  color: var(--text-bright);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.2s;
}

.email-form input[type="email"]::placeholder { color: var(--text-dim); }
.email-form input[type="email"]:focus { border-color: var(--accent); }

.email-form button {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.email-form button:hover { opacity: 0.85; }

/* ── Footer ── */

.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  margin-top: 64px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text); }

/* ── Responsive ── */

@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  .email-form { flex-direction: column; }
  .footer-content { flex-direction: column; gap: 12px; }
  .site-header { margin-bottom: 40px; }
  .shift-table td:first-child { width: 110px; }
}

/* ── Page transitions ── */

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

.fade-in {
  animation: fadeUp 0.5s ease-out both;
}

.fade-in-1 { animation-delay: 0.05s; }
.fade-in-2 { animation-delay: 0.1s; }
.fade-in-3 { animation-delay: 0.15s; }
