/* ============================================
   Dexton AI — Design System
   ============================================ */

:root {
  /* ---- Light mode (default, matches Dexton dashboard light) ---- */
  --bg: #f8f7f5;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f0ee;
  --border: #dedbd8;
  --border-subtle: #e8e5e2;

  /* Text */
  --text: #171717;
  --text-secondary: #525252;
  --text-muted: #737373;

  /* Accent — neutral primary (dashboard-aligned) */
  --accent: #171717;
  --accent-dim: #262626;
  --accent-hover: #333333;

  /* Link / interactive blue — used sparingly */
  --link: #3b82f6;

  /* Token accent — warm amber */
  --token: #d97706;
  --token-dim: #b45309;

  /* Status */
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --gray: #6b7280;

  /* Nav */
  --nav-bg: rgba(248, 247, 245, 0.85);

  /* Card shadow */
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);

  /* Spacing */
  --section-pad: clamp(4rem, 8vw, 8rem);
  --container: 1200px;

  /* Font */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ---- Dark mode ---- */
.dark {
  --bg: #0f1219;
  --bg-elevated: #151b27;
  --bg-card: #1c2333;
  --bg-card-hover: #222a3c;
  --border: #2a3347;
  --border-subtle: #1e2638;

  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --accent: #e5e5e5;
  --accent-dim: #d4d4d4;
  --accent-hover: #f5f5f5;

  --link: #60a5fa;

  --token: #f59e0b;
  --token-dim: #d97706;

  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --gray: #6b7280;

  --nav-bg: rgba(15, 18, 25, 0.85);
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text); }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.gradient-text {
  color: var(--accent);
}

.gradient-text-token {
  color: var(--token);
}

.gradient-text-green {
  color: #10b981;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 640px;
}

/* ============================================
   Navigation
   ============================================ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo img {
  height: 28px;
  width: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-logo span { color: var(--text-secondary); }

.token-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: block;
  object-fit: cover;
}

.token-logo-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-cta {
  padding: 0.5rem 1.25rem;
  background: var(--token);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: opacity 0.2s;
}

.nav-cta:hover { opacity: 0.9; color: #fff !important; }

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  transition: all 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--text-secondary);
  background: var(--bg-card-hover);
}

/* Show moon in light mode, sun in dark mode */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
.dark .theme-toggle .icon-sun { display: block; }
.dark .theme-toggle .icon-moon { display: none; }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: calc(var(--section-pad) + 64px) 0 var(--section-pad);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  display: none;
}

.hero h1 {
  margin-bottom: 1.5rem;
  position: relative;
}

.hero .subtitle {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-elevated);
}

.btn-primary:hover { background: var(--accent-hover); color: var(--bg-elevated); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--text-secondary);
  background: var(--bg-card);
  color: var(--text);
}

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

.btn-token:hover { opacity: 0.9; color: #fff; }

.btn-green {
  background: #10b981;
  color: #fff;
}
.btn-green:hover { opacity: 0.9; color: #fff; }

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  border-radius: 8px;
}

/* ============================================
   Stats Bar
   ============================================ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin: 3rem 0;
}

.stat {
  background: var(--bg-card);
  padding: 1.5rem;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ============================================
   Section
   ============================================ */
section {
  padding: var(--section-pad) 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header .section-desc {
  margin: 0.75rem auto 0;
}

/* ============================================
   Feature Grid
   ============================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.25s;
  box-shadow: var(--card-shadow);
}

.feature-card:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Feature card variants */
.feature-card--future {
  border-style: dashed;
  opacity: 0.7;
}
.feature-card--future:hover {
  opacity: 1;
}
.feature-card--future h3::after {
  content: 'Coming Soon';
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 0.2em 0.6em;
  border-radius: 4px;
  vertical-align: middle;
}

/* ============================================
   Comparison Table
   ============================================ */
.comparison-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9375rem;
}

.comparison-table thead th {
  background: var(--bg-card);
  font-weight: 700;
  color: var(--text);
  position: sticky;
  top: 0;
}

.comparison-table thead th:first-child { border-radius: 16px 0 0 0; }
.comparison-table thead th:last-child { border-radius: 0 16px 0 0; }

.comparison-table tbody tr:hover { background: var(--bg-card); }

.comparison-table .check { color: var(--green); font-weight: 700; }
.comparison-table .cross { color: var(--text-muted); }
.comparison-table .highlight-col { background: var(--bg-card); font-weight: 600; }

/* ============================================
   Architecture
   ============================================ */
.arch-layers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.arch-layer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: all 0.2s;
}

.arch-layer:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
}

.arch-layer-name {
  font-weight: 700;
  min-width: 200px;
  color: var(--text);
  font-size: 0.875rem;
  font-family: var(--font-mono);
}

.arch-layer-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ============================================
   Token Section
   ============================================ */
.token-section {
  background: var(--bg-elevated);
  position: relative;
}

.token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  position: relative;
}

.token-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.25s;
}

.token-card:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
}

.token-card h3 { color: var(--token); margin-bottom: 0.5rem; }
.token-card p { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.6; }

.tokenomics-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
}

.tokenomics-table td,
.tokenomics-table th {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9375rem;
}

.tokenomics-table td:first-child {
  color: var(--text-muted);
  font-weight: 500;
}

.tokenomics-table td:last-child {
  text-align: right;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--token);
}

.tokenomics-table thead th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tokenomics-table thead th:last-child {
  text-align: right;
}

/* ============================================
   Integrations
   ============================================ */
.integrations-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.integration-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.integration-badge:hover {
  border-color: var(--border);
  color: var(--text);
  background: var(--bg-card-hover);
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  text-align: center;
  padding: var(--section-pad) 0;
  position: relative;
}

.cta-section::before {
  display: none;
}

/* ============================================
   Footer
   ============================================ */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand .nav-logo { margin-bottom: 0.75rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.875rem; line-height: 1.6; max-width: 280px; }

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul a { color: var(--text-muted); font-size: 0.875rem; }
.footer-col ul a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

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

.footer-social {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.footer-social a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-social a:hover { color: var(--text); }

.footer-contract {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-contract .copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  transition: all 0.2s;
}
.footer-contract .copy-btn:hover { color: var(--text); background: var(--bg-card); }

.footer-base { color: var(--text-muted); font-size: 0.75rem; }

/* Legacy footer compat */
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
}

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

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Page Headers (for sub-pages)
   ============================================ */
.page-header {
  padding: calc(var(--section-pad) + 64px) 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.page-header h1 { margin-bottom: 1rem; }
.page-header p { color: var(--text-secondary); font-size: 1.125rem; max-width: 640px; margin: 0 auto; }

/* Prose content */
.prose { max-width: 800px; margin: 0 auto; }
.prose h2 { margin-top: 3rem; margin-bottom: 1rem; font-size: 1.75rem; }
.prose h3 { margin-top: 2rem; margin-bottom: 0.75rem; font-size: 1.25rem; color: var(--text); }
.prose p { margin-bottom: 1.25rem; color: var(--text-secondary); }
.prose ul, .prose ol { margin-bottom: 1.25rem; padding-left: 1.5rem; color: var(--text-secondary); }
.prose li { margin-bottom: 0.5rem; }
.prose strong { color: var(--text); }
.prose code { font-family: var(--font-mono); background: var(--bg-card); padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.875em; }
.prose pre { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; overflow-x: auto; margin-bottom: 1.5rem; }
.prose pre code { background: none; padding: 0; }

/* ============================================
   Contract Address Badge
   ============================================ */
.contract-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--token);
  word-break: break-all;
  max-width: 100%;
}

.contract-badge .copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.contract-badge .copy-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text);
  background: var(--bg-elevated);
}

.contract-badge .copy-btn.copied {
  border-color: var(--green);
  color: var(--green);
}

/* ============================================
   Step Cards
   ============================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  transition: all 0.25s;
}

.step-card:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
}

.step-card h3 { margin-bottom: 0.5rem; }
.step-card p { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.6; }

/* Step flow (horizontal connecting arrows) */
.steps-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  position: relative;
}

.steps-flow .step-card {
  text-align: center;
}

.steps-flow .step-card::after {
  content: '\2192';
  position: absolute;
  right: -0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.25rem;
  font-weight: 700;
}

.steps-flow .step-card:last-child::after { display: none; }

@media (max-width: 768px) {
  .steps-flow .step-card::after {
    content: '\2193';
    right: auto;
    bottom: -0.75rem;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ============================================
   Timeline / Roadmap
   ============================================ */
.timeline {
  position: relative;
  padding-left: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -2.35rem;
  top: 0.25rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: var(--bg);
  z-index: 1;
}

.timeline-item--completed .timeline-dot {
  background: var(--green);
  border-color: var(--green);
}

.timeline-item--current .timeline-dot {
  background: var(--amber);
  border-color: var(--amber);
  animation: pulse-amber 2s infinite;
}

.timeline-item--upcoming .timeline-dot {
  background: var(--bg);
  border-color: var(--gray);
}

.timeline-item--future .timeline-dot {
  background: var(--bg);
  border-color: #374151;
  border-style: dashed;
}

@keyframes pulse-amber {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.timeline-quarter {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
}

.timeline-title {
  color: var(--text-secondary);
  font-size: 1rem;
}

.timeline-badge {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
}

.timeline-badge--completed { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.timeline-badge--current { background: rgba(245, 158, 11, 0.15); color: var(--amber); }
.timeline-badge--upcoming { background: rgba(107, 114, 128, 0.15); color: var(--gray); }
.timeline-badge--future { background: rgba(55, 65, 81, 0.15); color: #374151; }

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
}

.timeline-item--current .timeline-card {
  border-color: var(--amber);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.08);
}

.timeline-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-card li {
  padding: 0.375rem 0;
  padding-left: 1.75rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.timeline-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--gray);
}

.timeline-item--completed .timeline-card li::before {
  background: var(--green);
  border-color: var(--green);
}

.timeline-card li.done::before {
  background: var(--green);
  border-color: var(--green);
}

.timeline-card li.todo::before {
  background: transparent;
  border-color: var(--gray);
}

.timeline-item--upcoming .timeline-card li::before,
.timeline-item--future .timeline-card li::before {
  border-color: #374151;
}

/* ============================================
   FAQ Accordion
   ============================================ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--bg-card);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  padding: 1.25rem 1.5rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}

.faq-question:hover { color: var(--text); }

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-question::after {
  content: '\2212';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ============================================
   Warning / Safety Boxes
   ============================================ */
.warning-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 4px solid var(--amber);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.warning-box h4 {
  color: var(--amber);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.warning-box ul {
  list-style: none;
  padding: 0;
}

.warning-box li {
  padding: 0.375rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.warning-box li::before {
  content: '\26A0';
  position: absolute;
  left: 0;
  color: var(--amber);
}

.info-box {
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-left: 4px solid var(--link);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.info-box p { color: var(--text-secondary); font-size: 0.9375rem; margin: 0; }

.success-box {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-left: 4px solid var(--green);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.success-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.success-box li {
  padding: 0.375rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.success-box li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* ============================================
   Donut Chart (CSS conic-gradient)
   ============================================ */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.donut {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.donut::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  background: var(--bg);
  border-radius: 50%;
}

.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  text-align: center;
}

.donut-center .donut-total {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text);
}

.donut-center .donut-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.donut-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.donut-legend-pct {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  margin-left: auto;
  min-width: 3rem;
  text-align: right;
}

/* ============================================
   Escrow State Diagram (CSS)
   ============================================ */
.state-diagram {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 2rem 0;
}

.state-node {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
}

.state-node--active { border-color: var(--link); color: var(--link); }
.state-node--success { border-color: var(--green); color: var(--green); }
.state-node--warning { border-color: var(--amber); color: var(--amber); }
.state-node--danger { border-color: var(--red); color: var(--red); }

.state-arrow {
  color: var(--text-muted);
  font-size: 1.25rem;
}

/* Full lifecycle diagram */
.escrow-diagram {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 700px;
  margin: 2rem auto;
  text-align: center;
}

.escrow-diagram .state-node {
  padding: 1rem;
}

@media (max-width: 640px) {
  .escrow-diagram {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Status Badges
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
}

.badge--green { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.badge--amber { background: rgba(245, 158, 11, 0.15); color: var(--amber); }
.badge--gray { background: rgba(107, 114, 128, 0.15); color: var(--gray); }
.badge--blue { background: rgba(96, 165, 250, 0.15); color: var(--link); }
.badge--red { background: rgba(239, 68, 68, 0.15); color: var(--red); }

/* ============================================
   TOC Sidebar (Desktop)
   ============================================ */
.page-with-toc {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.toc-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 1rem;
}

.toc-sidebar h4 {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.toc-sidebar ul {
  list-style: none;
  padding: 0;
}

.toc-sidebar li {
  margin-bottom: 0.25rem;
}

.toc-sidebar a {
  display: block;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: all 0.2s;
}

.toc-sidebar a:hover {
  color: var(--text);
  background: var(--bg-card);
}

.toc-sidebar a.active {
  color: var(--text);
  border-left-color: var(--text);
  background: var(--bg-card);
}

.toc-content {
  min-width: 0;
}

@media (max-width: 900px) {
  .page-with-toc {
    grid-template-columns: 1fr;
  }
  .toc-sidebar {
    position: static;
    max-height: none;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem;
    background: var(--bg-card);
    margin-bottom: 2rem;
  }
}

/* ============================================
   Code Blocks Enhanced
   ============================================ */
.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.code-block-header .copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  transition: all 0.2s;
}

.code-block-header .copy-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text);
}

.code-block pre {
  padding: 1.25rem;
  overflow-x: auto;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.code-block code {
  font-family: var(--font-mono);
}

/* Syntax coloring (basic) */
.code-block .kw { color: #c084fc; }
.code-block .str { color: #86efac; }
.code-block .fn { color: #60a5fa; }
.code-block .cm { color: #6b7280; }
.code-block .num { color: #fbbf24; }

/* ============================================
   Gantt Chart (CSS)
   ============================================ */
.gantt {
  overflow-x: auto;
  margin: 2rem 0;
}

.gantt-chart {
  min-width: 700px;
}

.gantt-header {
  display: grid;
  grid-template-columns: 180px repeat(7, 1fr);
  gap: 0;
  margin-bottom: 0.5rem;
}

.gantt-header span {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: center;
}

.gantt-header span:first-child { text-align: left; }

.gantt-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  align-items: center;
  margin-bottom: 0.375rem;
}

.gantt-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
  padding-right: 1rem;
}

.gantt-bar-wrap {
  position: relative;
  height: 24px;
  background: var(--bg-card);
  border-radius: 4px;
}

.gantt-bar {
  position: absolute;
  top: 2px;
  height: 20px;
  border-radius: 3px;
  opacity: 0.85;
}

/* ============================================
   Flow Diagram (CSS/HTML)
   ============================================ */
.flow-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 0;
}

.flow-node {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  text-align: center;
  min-width: 160px;
}

.flow-node h4 {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.flow-node p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.flow-arrow {
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
}

.flow-row {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.flow-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   Governance Stepper
   ============================================ */
.stepper {
  display: flex;
  gap: 0;
  align-items: flex-start;
  overflow-x: auto;
  padding: 1rem 0;
}

.stepper-item {
  flex: 1;
  min-width: 200px;
  text-align: center;
  position: relative;
  padding: 0 1rem;
}

.stepper-item::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
}

.stepper-item:first-child::before { left: 50%; }
.stepper-item:last-child::before { right: 50%; }

.stepper-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  position: relative;
  z-index: 1;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
}

.stepper-item--active .stepper-circle {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.stepper-item h4 {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.stepper-item p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .stepper {
    flex-direction: column;
    align-items: stretch;
  }
  .stepper-item { text-align: left; padding: 0.75rem 0 0.75rem 3rem; min-width: auto; }
  .stepper-item::before {
    top: 0; bottom: 0; left: 18px; right: auto;
    width: 2px; height: auto;
  }
  .stepper-item:first-child::before { top: 18px; left: 18px; }
  .stepper-item:last-child::before { bottom: auto; height: 18px; }
  .stepper-circle { position: absolute; left: 0; top: 0.5rem; margin: 0; }
}

/* ============================================
   Checklist
   ============================================ */
.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--border-subtle);
}

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

.checklist li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
  font-size: 1rem;
}

/* ============================================
   Data Table (general)
   ============================================ */
.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 1.5rem 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

.data-table th,
.data-table td {
  padding: 0.875rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9375rem;
}

.data-table thead th {
  background: var(--bg-card);
  font-weight: 600;
  color: var(--text);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tbody tr:hover { background: var(--bg-card); }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.data-table .pass { color: var(--green); font-weight: 600; }
.data-table .fail { color: var(--red); font-weight: 600; }

/* ============================================
   Contract Cards
   ============================================ */
.contract-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.contract-card h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.contract-card .badge { vertical-align: middle; }

.contract-card .contract-addr {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--token);
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* ============================================
   Summary Cards (stat-style)
   ============================================ */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.summary-card .summary-value {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1;
}

.summary-card .summary-value--green { color: var(--green); }
.summary-card .summary-value--amber { color: var(--amber); }
.summary-card .summary-value--accent { color: var(--link); }

.summary-card .summary-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ============================================
   Tag badges
   ============================================ */
.tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

.tag--green { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.tag--amber { background: rgba(245, 158, 11, 0.15); color: var(--amber); }

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-800 { max-width: 800px; }
.relative { position: relative; }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Separator */
.sep { height: 1px; background: var(--border-subtle); margin: 3rem 0; }
