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

:root {
  --bg: #1a1a2e;
  --bg-surface: #16213e;
  --bg-elevated: #0f3460;
  --text: #e0e0e0;
  --text-muted: #8a8a9a;
  --accent: #e94560;
  --accent-green: #4ade80;
  --accent-red: #f87171;
  --accent-blue: #60a5fa;
  --border: #2a2a4a;
  --radius: 8px;
}

html, body {
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.nav-logo {
  width: 28px;
  height: 28px;
}

.nav-wordmark {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text);
}

.nav-btn {
  display: inline-block;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.nav-btn:hover {
  opacity: 0.9;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.2s, transform 0.1s;
  cursor: pointer;
  border: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
}

.btn-large {
  padding: 16px 32px;
  font-size: 18px;
}

.btn-disabled {
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: default;
  opacity: 0.6;
}

/* Hero */
.hero {
  padding: 60px 20px 40px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-headline {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  color: #fff;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-visual {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.hero-phone {
  width: 220px;
  height: 380px;
  background: #111;
  border-radius: 24px;
  border: 3px solid #333;
  padding: 16px 12px;
  position: relative;
}

.hero-screen {
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-screen-bar {
  height: 6px;
  width: 60%;
  background: var(--bg-surface);
  border-radius: 3px;
}

.hero-screen-line {
  height: 4px;
  width: 85%;
  background: var(--bg-elevated);
  border-radius: 2px;
}

.hero-screen-line-short {
  width: 50%;
}

.hero-screen-line-medium {
  width: 70%;
}

.hero-screen-diff {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
}

.hero-screen-diff-add {
  height: 4px;
  width: 75%;
  background: rgba(74, 222, 128, 0.3);
  border-left: 2px solid var(--accent-green);
  border-radius: 0 2px 2px 0;
}

.hero-screen-diff-del {
  height: 4px;
  width: 60%;
  background: rgba(248, 113, 113, 0.3);
  border-left: 2px solid var(--accent-red);
  border-radius: 0 2px 2px 0;
}

.hero-screen-actions {
  display: flex;
  gap: 6px;
}

.hero-screen-btn-reject {
  flex: 1;
  height: 20px;
  background: rgba(248, 113, 113, 0.2);
  border: 1px solid var(--accent-red);
  border-radius: 4px;
}

.hero-screen-btn-approve {
  flex: 1;
  height: 20px;
  background: rgba(74, 222, 128, 0.2);
  border: 1px solid var(--accent-green);
  border-radius: 4px;
}

/* Sections */
.section {
  padding: 60px 20px;
  max-width: 960px;
  margin: 0 auto;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: #fff;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 40px;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}

.step-card {
  text-align: center;
  padding: 24px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}

.step-desc {
  color: var(--text-muted);
  font-size: 15px;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.feature-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.feature-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #fff;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 640px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}

.pricing-card-highlighted {
  border-color: var(--accent);
  position: relative;
}

.pricing-tier {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #fff;
}

.pricing-price {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
}

.pricing-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}

.pricing-features li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li::before {
  content: "\2713";
  color: var(--accent-green);
  margin-right: 8px;
  font-weight: 700;
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 60px 20px 80px;
  background: var(--bg-surface);
  max-width: none;
}

.cta-headline {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}

.cta-sub {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Footer */
.footer {
  padding: 32px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-content {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}

.footer-logo {
  width: 20px;
  height: 20px;
}

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

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
}

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

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* Responsive: tablets and up */
@media (min-width: 640px) {
  .hero {
    padding: 80px 32px 60px;
  }

  .hero-headline {
    font-size: 48px;
  }

  .hero-sub {
    font-size: 20px;
  }

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

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 80px 32px;
  }
}

/* Docs */
.docs-container {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 53px);
}

.docs-sidebar {
  padding: 16px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.docs-sidebar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 8px;
}

.docs-nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.docs-nav-item:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.docs-nav-item-active {
  color: #fff;
  background: var(--bg-elevated);
}

.docs-main {
  flex: 1;
  padding: 32px 20px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.docs-title {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.docs-intro {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.docs-section {
  margin-bottom: 32px;
}

.docs-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  padding-top: 8px;
}

.docs-section p {
  margin-bottom: 12px;
  line-height: 1.6;
}

.docs-section a {
  color: var(--accent-blue);
  text-decoration: none;
}

.docs-section a:hover {
  text-decoration: underline;
}

.docs-code {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  overflow-x: auto;
  margin-bottom: 12px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: var(--accent-green);
}

.docs-code code {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.docs-list {
  padding-left: 24px;
  margin-bottom: 12px;
}

.docs-list li {
  margin-bottom: 6px;
  line-height: 1.5;
}

.docs-list-ordered {
  list-style: decimal;
}

.docs-list code,
.docs-section p code {
  background: var(--bg-surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  color: var(--accent-blue);
}

.docs-callout {
  background: var(--bg-surface);
  border-left: 3px solid var(--accent-blue);
  padding: 16px 20px;
  margin-bottom: 12px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text);
}

.docs-callout-warn {
  border-left-color: var(--accent-red);
}

.docs-diagram {
  text-align: center;
  padding: 20px;
  margin-bottom: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.docs-diagram code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px;
  color: var(--text-muted);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  font-size: 14px;
}

.docs-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.docs-table code {
  background: var(--bg-surface);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  color: var(--accent-blue);
  white-space: nowrap;
}

/* Desktop */
@media (min-width: 1024px) {
  .hero-headline {
    font-size: 56px;
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .nav {
    padding: 12px 40px;
  }

  .docs-container {
    flex-direction: row;
  }

  .docs-sidebar {
    width: 220px;
    flex-shrink: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 16px;
    border-bottom: none;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 53px;
    height: calc(100vh - 53px);
  }

  .docs-sidebar-title {
    margin-right: 0;
    margin-bottom: 8px;
  }

  .docs-nav-item {
    width: 100%;
    display: block;
  }

  .docs-main {
    padding: 40px;
  }
}
