:root {
  --black: #080808;
  --white: #ffffff;
  --blue: #146ef5;
  --blue-400: #3b89ff;
  --blue-300: #006acc;
  --blue-hover: #0055d4;
  --purple: #7a3dff;
  --pink: #ed52cb;
  --green: #00d722;
  --orange: #ff6b00;
  --yellow: #ffae13;
  --red: #ee1d36;
  --gray-800: #222222;
  --gray-700: #363636;
  --gray-500: #5a5a5a;
  --gray-300: #ababab;
  --border: #d8d8d8;
  --border-hover: #898989;
  --bg-subtle: #f8f8f8;
  --shadow-card: rgba(0,0,0,0) 0px 84px 24px, rgba(0,0,0,0.01) 0px 54px 22px, rgba(0,0,0,0.04) 0px 30px 18px, rgba(0,0,0,0.08) 0px 13px 13px, rgba(0,0,0,0.09) 0px 3px 7px;
  --font: 'WF Visual Sans Variable', Arial, sans-serif;
  --font-mono: 'Inconsolata', ui-monospace, SFMono-Regular, monospace;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--blue-hover);
}

img {
  max-width: 100%;
  height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.1;
  color: var(--black);
}

h1 {
  font-size: 80px;
  letter-spacing: -0.8px;
}

h2 {
  font-size: 56px;
  letter-spacing: -0.5px;
}

h3 {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.3;
}

h4 {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
}

p {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--gray-700);
}

.text-sm {
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.16px;
}

.text-muted {
  color: var(--gray-500);
}

.uppercase-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gray-500);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 32px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-brand {
  font-size: 20px;
  font-weight: 600;
  color: var(--black);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand span {
  color: var(--blue);
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue);
}

.nav-hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--black);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  z-index: 999;
}

.nav-mobile.open {
  display: block;
}

.nav-mobile a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-700);
  border-bottom: 1px solid var(--border);
}

.nav-mobile a:last-child {
  border-bottom: none;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.page-content {
  padding-top: calc(var(--nav-height) + 48px);
  padding-bottom: 80px;
}

.section {
  padding: 80px 0;
}

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

/* Hero */
.hero {
  text-align: center;
  padding: 120px 0 80px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero p {
  font-size: 20px;
  max-width: 640px;
  margin: 0 auto 48px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 48px;
  font-weight: 600;
  color: var(--blue);
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  margin-top: 8px;
}

/* Cards */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  background: var(--white);
  transition: box-shadow 0.3s, border-color 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-card);
  border-color: var(--border-hover);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.card h4 {
  margin-bottom: 8px;
}

.card p {
  font-size: 16px;
  line-height: 1.5;
}

/* Flow Steps */
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: start;
}

.flow-step {
  text-align: center;
  position: relative;
  padding: 24px 16px;
}

.flow-step::after {
  content: '';
  position: absolute;
  top: 40px;
  right: -8px;
  width: 16px;
  height: 2px;
  background: var(--border);
}

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

.flow-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.flow-step h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.flow-step p {
  font-size: 14px;
  color: var(--gray-500);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  font-family: var(--font);
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-hover);
  color: var(--white);
}

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

.btn-outline:hover {
  border-color: var(--border-hover);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 550;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.badge-blue {
  background: rgba(20, 110, 245, 0.1);
  color: var(--blue);
}

.badge-purple {
  background: rgba(122, 61, 255, 0.1);
  color: var(--purple);
}

.badge-green {
  background: rgba(0, 215, 34, 0.1);
  color: var(--green);
}

.badge-orange {
  background: rgba(255, 107, 0, 0.1);
  color: var(--orange);
}

.badge-pink {
  background: rgba(237, 82, 203, 0.1);
  color: var(--pink);
}

/* Doc Viewer Layout */
.doc-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

.doc-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  max-height: calc(100vh - var(--nav-height) - 48px);
  overflow-y: auto;
  padding-right: 16px;
}

.doc-sidebar::-webkit-scrollbar {
  width: 3px;
}

.doc-sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.toc-list {
  list-style: none;
}

.toc-list li {
  margin-bottom: 4px;
}

.toc-list a {
  display: block;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--gray-500);
  border-left: 2px solid transparent;
  border-radius: 0;
  transition: color 0.2s, border-color 0.2s;
  line-height: 1.4;
}

.toc-list a:hover {
  color: var(--black);
}

.toc-list a.active {
  color: var(--blue);
  border-left-color: var(--blue);
  font-weight: 500;
}

.toc-list .toc-h3 {
  padding-left: 24px;
  font-size: 12px;
}

/* Doc Content */
.doc-content {
  min-width: 0;
}

.doc-content h1 {
  font-size: 40px;
  margin-bottom: 16px;
}

.doc-content h2 {
  font-size: 32px;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.doc-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.doc-content h3 {
  font-size: 24px;
  margin-top: 32px;
  margin-bottom: 12px;
}

.doc-content h4 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}

.doc-content p {
  font-size: 16px;
  margin-bottom: 16px;
}

.doc-content ul,
.doc-content ol {
  font-size: 16px;
  margin-bottom: 16px;
  padding-left: 24px;
  color: var(--gray-700);
}

.doc-content li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.doc-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 14px;
}

.doc-content th,
.doc-content td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.doc-content th {
  background: var(--bg-subtle);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.doc-content code {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 2px 6px;
  background: var(--bg-subtle);
  border-radius: 3px;
  color: var(--purple);
}

.doc-content pre {
  background: #1a1a1a;
  color: #e0e0e0;
  padding: 20px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
}

.doc-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.doc-content blockquote {
  border-left: 3px solid var(--blue);
  padding: 12px 20px;
  margin-bottom: 16px;
  background: rgba(20, 110, 245, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.doc-content blockquote p {
  margin-bottom: 0;
  color: var(--gray-700);
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.table-wrap table {
  margin-bottom: 0;
  border: none;
}

.table-wrap th:first-child,
.table-wrap td:first-child {
  border-left: none;
}

.table-wrap th:last-child,
.table-wrap td:last-child {
  border-right: none;
}

/* Loading State */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  color: var(--gray-500);
  font-size: 16px;
}

.loading::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  margin-right: 12px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Timeline (Roadmap) */
.timeline {
  position: relative;
  padding-left: 48px;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-dot {
  position: absolute;
  left: -48px;
  top: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  z-index: 1;
}

.timeline-item.active .timeline-dot {
  background: var(--blue);
  color: var(--white);
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.timeline-header h3 {
  margin: 0;
  font-size: 24px;
}

.timeline-body {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.timeline-body p {
  font-size: 16px;
  margin-bottom: 16px;
}

.timeline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.timeline-table th,
.timeline-table td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.timeline-table th {
  background: var(--bg-subtle);
  font-weight: 600;
}

/* Milestones */
.milestones {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.milestone {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}

.milestone-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px;
  text-align: center;
}

.footer p {
  font-size: 14px;
  color: var(--gray-500);
}

/* Responsive */
@media (max-width: 992px) {
  h1 { font-size: 56px; }
  h2 { font-size: 40px; }
  .hero { padding: 80px 0 60px; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow-step::after { display: none; }
  .doc-layout { grid-template-columns: 220px 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
  h3 { font-size: 24px; }
  .container { padding: 0 20px; }
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .hero { padding: 60px 0 40px; }
  .hero-stats { gap: 24px; }
  .stat-value { font-size: 36px; }
  .section { padding: 48px 0; }
  .flow { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .doc-layout { grid-template-columns: 1fr; }
  .doc-sidebar {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 32px;
  }
}

@media (max-width: 479px) {
  h1 { font-size: 32px; }
  .flow { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 16px; }
}
