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

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --green: #22c55e;
  --red: #ef4444;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --max-width: 1200px;
  --header-height: 64px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

code, pre {
  font-family: var(--font-mono);
}

/* === Header === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  z-index: 100;
  display: flex;
  align-items: center;
}

.header-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--black);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-outline {
  border-color: var(--gray-300);
  background: var(--white);
  color: var(--black);
}

.btn-outline:hover {
  border-color: var(--black);
  background: var(--gray-50);
}

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

.btn-primary:hover {
  background: var(--gray-800);
}

.btn-large {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

/* === Mobile Nav === */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .header-nav.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 2rem;
    gap: 1rem;
  }
}

/* === Hero === */
.hero {
  padding-top: calc(var(--header-height) + 2.5rem);
  padding-bottom: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 1rem;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.hero-top {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
}

.hero-left {
  flex-shrink: 0;
}

.hero-right {
  flex: 1;
  min-width: 0;
  padding-top: 0.25rem;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.375rem;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: var(--gray-500);
  margin-bottom: 0;
  letter-spacing: -0.02em;
}

.hero-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gray-700);
  max-width: 600px;
  margin-bottom: 1.25rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero-top {
    flex-direction: column;
    gap: 1rem;
  }
  .hero-subtitle {
    margin-bottom: 0.5rem;
  }
}

/* === Terminal Demo === */
.hero-terminal {
  margin-top: 1.5rem;
}

.terminal-demo {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  background: var(--gray-900);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.terminal-chrome {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--gray-800);
  border-bottom: 1px solid var(--gray-700);
  gap: 1rem;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dots span:nth-child(1) { background: #ff5f57; }
.terminal-dots span:nth-child(2) { background: #febc2e; }
.terminal-dots span:nth-child(3) { background: #28c840; }

.terminal-tabs {
  display: flex;
  gap: 0.25rem;
  flex: 1;
}

.terminal-tab {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.15s;
}

.terminal-tab:hover {
  color: var(--gray-300);
}

.terminal-tab.active {
  background: var(--gray-700);
  color: var(--gray-200);
  border-color: var(--gray-600);
}

.terminal-replay {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  font-size: 1.125rem;
  padding: 0.25rem 0.5rem;
  transition: color 0.15s;
  line-height: 1;
}

.terminal-replay:hover {
  color: var(--white);
}

.terminal-body {
  padding: 1rem 1.25rem;
  height: 280px;
  overflow-y: auto;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--gray-300);
}

.terminal-line {
  white-space: pre;
  min-height: 1.7em;
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--gray-400);
  vertical-align: text-bottom;
  animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

.t-prompt { color: var(--gray-500); }
.t-cmd { color: var(--white); }
.t-green { color: var(--green); }
.t-dim { color: var(--gray-500); }
.t-bright { color: var(--white); font-weight: 500; }
.t-spinner { color: #facc15; }
.t-blue { color: #60a5fa; }

.terminal-annotation {
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 1rem;
  transition: opacity 0.2s;
  min-height: 1.5em;
}

/* === Section Layout === */
.section {
  padding: 5rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-full {
  padding: 5rem 2rem;
}

.section-full-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-dark {
  background: var(--gray-900);
  color: var(--white);
}

.section-alt {
  background: var(--gray-50);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 3rem;
}

.section-dark .section-description {
  color: var(--gray-400);
}

/* === Code Block === */
.code-block-wrapper {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  margin: 2rem 0;
  max-width: 720px;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.code-block-title {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-600);
}

.code-block-copy {
  background: none;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--gray-500);
  transition: all 0.2s;
}

.code-block-copy:hover {
  border-color: var(--black);
  color: var(--black);
}

.code-block {
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  background: var(--white);
}

.code-block pre {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--gray-800);
}

.code-block .comment {
  color: var(--gray-400);
}

.code-block .keyword {
  color: var(--gray-900);
  font-weight: 600;
}

.code-block .string {
  color: var(--gray-600);
}

/* === Architecture Diagram === */
.architecture {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 2rem;
  background: var(--gray-50);
  overflow-x: auto;
  margin: 2rem 0;
}

.architecture pre {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--gray-700);
  white-space: pre;
}

/* === Feature Grid === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  padding: 2rem;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: var(--gray-400);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

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

/* === Principles === */
.principles {
  display: grid;
  gap: 0;
  margin: 2rem 0;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
}

.principle {
  display: flex;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  border-bottom: 1px solid var(--gray-200);
  align-items: flex-start;
}

.principle:last-child {
  border-bottom: none;
}

.principle-number {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gray-400);
  min-width: 2rem;
  padding-top: 0.1rem;
}

.principle h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.principle p {
  font-size: 0.9375rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* === Comparison Table === */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  margin: 2rem 0;
  font-size: 0.875rem;
}

.comparison-table th {
  text-align: left;
  padding: 1rem 1.25rem;
  background: var(--gray-50);
  font-weight: 600;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

.comparison-table td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: top;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background: var(--gray-50);
}

/* === Flow Diagram === */
.flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.flow-step {
  flex: 1;
  min-width: 200px;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  position: relative;
}

.flow-step:first-child {
  border-radius: 12px 0 0 12px;
}

.flow-step:last-child {
  border-radius: 0 12px 12px 0;
}

.flow-step-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-400);
  margin-bottom: 0.75rem;
}

.flow-step h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.flow-step p {
  font-size: 0.8125rem;
  color: var(--gray-500);
  line-height: 1.5;
}

.flow-arrow {
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  color: var(--gray-300);
  font-size: 1.25rem;
}

/* === Architecture Diagram === */
.arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 3rem 0 2rem;
  padding: 2rem 2rem 1.5rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
}

.arch-agents-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.arch-funnel-svg {
  width: 80%;
  max-width: 480px;
  height: 28px;
  display: block;
  margin: 0 auto;
}

.arch-vert-connector {
  display: block;
  margin: 0 auto;
}

.arch-horiz-connector {
  display: block;
  flex-shrink: 0;
}

.arch-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.arch-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.875rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
  background: var(--white);
}

.arch-node--sm {
  padding: 0.625rem 1rem;
}

.arch-node--agent {
  background: var(--white);
  border: 1px solid var(--gray-300);
  padding: 0.5rem 0.875rem;
}

.arch-node--agent .arch-node-label {
  font-size: 0.75rem;
  margin-bottom: 0;
}

.arch-node--agent-more {
  border-style: dashed;
  color: var(--gray-400);
  padding: 0.5rem 0.625rem;
}

.arch-node--interface {
  background: var(--white);
  border: 1px solid var(--gray-300);
}

.arch-node--policy {
  border-color: var(--green);
  background: #f0fdf4;
}

.arch-node--enclave {
  border-color: var(--gray-800);
  background: var(--gray-900);
  color: var(--white);
}

.arch-node--enclave .arch-node-sub {
  color: var(--gray-400);
}

.arch-node--vault {
  border-color: var(--gray-400);
  background: var(--gray-100);
}

.arch-node--return {
  background: var(--white);
  border: 1.5px dashed var(--gray-300);
}

.arch-node-icon {
  margin-bottom: 0.375rem;
}

.arch-node-label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
}

.arch-node-sub {
  font-size: 0.6875rem;
  color: var(--gray-500);
  font-family: var(--font-mono);
}

.arch-node-sub code {
  font-size: 0.6875rem;
  color: var(--gray-500);
}

/* Access Layer box */
.arch-access-layer {
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: var(--white);
  padding: 0;
  overflow: hidden;
}

.arch-boundary-inline {
  width: 100%;
  padding: 0.5rem 0;
  border-bottom: 1.5px dashed var(--red);
  text-align: center;
  background: rgba(239, 68, 68, 0.03);
}

.arch-boundary-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--red);
  letter-spacing: 0.02em;
}

/* Internal flow inside access layer */
.arch-internal {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1.5rem;
  gap: 0;
}

.arch-internal-step {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.arch-step-label {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-600);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .arch-agents-row {
    flex-wrap: wrap;
    gap: 0.375rem;
  }

  .arch-funnel-svg {
    width: 100%;
  }

  .arch-internal-step {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .arch-horiz-connector {
    display: none;
  }

  .arch-node {
    min-width: auto;
  }

  .arch-diagram {
    padding: 1.5rem 1rem;
  }

  .arch-internal {
    padding: 1rem;
  }
}

/* === Spec Cards === */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.spec-card {
  display: block;
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  transition: all 0.2s;
  text-decoration: none;
}

.spec-card:hover {
  border-color: var(--black);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.spec-card-number {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.spec-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.spec-card p {
  font-size: 0.8125rem;
  color: var(--gray-500);
  line-height: 1.5;
}

/* === Prior Art === */
.prior-art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.prior-art-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
}

.prior-art-item h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.prior-art-item p {
  font-size: 0.8125rem;
  color: var(--gray-500);
  line-height: 1.4;
}

/* === Footer === */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 4rem 2rem 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-description {
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 300px;
}

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

.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-400);
  margin-bottom: 0.625rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

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

/* === Docs Page === */
.docs-layout {
  display: flex;
  min-height: 100vh;
}

.docs-sidebar {
  width: 260px;
  min-width: 260px;
  border-right: 1px solid var(--gray-100);
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--white);
  display: flex;
  flex-direction: column;
}

.docs-sidebar-brand {
  padding: 1.25rem 1.5rem 1.125rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.docs-sidebar-brand a {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--black);
  transition: opacity 0.15s;
}

.docs-sidebar-brand a:hover {
  opacity: 0.7;
}

.docs-sidebar-brand .version {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--gray-400);
  background: var(--gray-100);
  padding: 0.125rem 0.5rem;
  border-radius: 100px;
  letter-spacing: 0.01em;
}

.docs-sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.docs-sidebar-title {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  margin-bottom: 0.375rem;
  padding: 0 0.75rem;
}

.docs-sidebar-nav > a,
.docs-sidebar a {
  display: block;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--gray-500);
  border-radius: 6px;
  margin-bottom: 1px;
  transition: all 0.12s ease;
  border-left: 2px solid transparent;
}

.docs-sidebar a:hover {
  color: var(--black);
  background: var(--gray-50);
}

.docs-sidebar a.active {
  color: var(--black);
  font-weight: 500;
  background: rgba(34, 197, 94, 0.06);
  border-left-color: var(--green);
}

.docs-sidebar-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--gray-100);
  flex-shrink: 0;
}

.docs-sidebar-footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-400);
  transition: color 0.15s;
}

.docs-sidebar-footer a:hover {
  color: var(--black);
}

.docs-content {
  flex: 1;
  padding: 2.5rem 3.5rem 4rem;
  max-width: 780px;
  min-width: 0;
  overflow-wrap: break-word;
}

@media (max-width: 900px) {
  .docs-sidebar {
    display: none;
  }
  .docs-content {
    padding: 2rem 1.5rem;
  }
}

/* === Docs Content Typography === */
.docs-content h1 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
  line-height: 1.15;
  color: var(--black);
}

.docs-content .subtitle {
  font-size: 1rem;
  color: var(--gray-500);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.docs-content h2 {
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 0.625rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--black);
}

.docs-content h2:first-of-type {
  margin-top: 0;
}

.docs-content h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--black);
}

.docs-content h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.375rem;
  color: var(--gray-800);
}

.docs-content p {
  margin-bottom: 1rem;
  color: var(--gray-600);
  line-height: 1.7;
  font-size: 0.9375rem;
}

.docs-content ul, .docs-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.docs-content li {
  margin-bottom: 0.375rem;
  color: var(--gray-600);
  line-height: 1.6;
  font-size: 0.9375rem;
}

.docs-content > a,
.docs-content p a,
.docs-content li a,
.docs-content td a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-color: var(--gray-300);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}

.docs-content p a:hover,
.docs-content li a:hover,
.docs-content td a:hover {
  text-decoration-color: var(--black);
}

.docs-content hr {
  border: none;
  border-top: 1px solid var(--gray-100);
  margin: 2rem 0;
}

.docs-content code:not(pre code) {
  background: var(--gray-50);
  padding: 0.125rem 0.4rem;
  border-radius: 5px;
  font-size: 0.8125rem;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.docs-content pre {
  background: #0f0f0f;
  color: var(--gray-200);
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

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

.code-copy-btn {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 0.25rem 0.625rem;
  cursor: pointer;
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--gray-500);
  opacity: 0;
  transition: all 0.15s;
  backdrop-filter: blur(8px);
}

div:hover > .code-copy-btn { opacity: 1; }
.code-copy-btn:hover { background: rgba(255, 255, 255, 0.12); color: var(--gray-300); border-color: rgba(255, 255, 255, 0.15); }

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.8125rem;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
}

.docs-content th {
  text-align: left;
  padding: 0.5rem 1rem;
  background: var(--gray-50);
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
}

.docs-content td {
  padding: 0.5625rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-600);
  vertical-align: top;
}

.docs-content tr:last-child td {
  border-bottom: none;
}

.docs-content tr:hover td {
  background: var(--gray-50);
}

.docs-content blockquote {
  border-left: 2px solid var(--green);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--gray-600);
  background: rgba(34, 197, 94, 0.03);
  border-radius: 0 8px 8px 0;
  font-size: 0.9375rem;
}

.docs-content blockquote p {
  color: inherit;
}

/* === Nav between docs === */
.docs-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-100);
  gap: 0.75rem;
}

.docs-nav a {
  display: flex;
  flex-direction: column;
  padding: 0.875rem 1.25rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  transition: all 0.15s;
  min-width: 0;
  flex: 1;
  text-decoration: none;
}

.docs-nav a:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
}

.docs-nav a .label {
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--gray-400);
  margin-bottom: 0.125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.docs-nav a .title {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--black);
}

.docs-nav a.next {
  text-align: right;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-200);
  border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-300);
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: var(--gray-100);
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--gray-200);
}

/* === Problem Section === */
.problem-terminals {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.25rem;
  margin: 2.5rem 0 3rem;
}

.problem-terminal {
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.problem-terminal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Chaos terminal — faded, red-tinted */
.problem-terminal--chaos {
  border: 1px solid rgba(239, 68, 68, 0.2);
  background: rgba(23, 23, 23, 0.7);
}

.problem-terminal--chaos.visible {
  opacity: 0.7;
}

.problem-terminal--chaos .problem-terminal-chrome {
  background: rgba(239, 68, 68, 0.04);
  border-bottom: 1px solid rgba(239, 68, 68, 0.12);
}

/* Unified terminal — bright, green-accented */
.problem-terminal--unified {
  border: 1px solid rgba(34, 197, 94, 0.3);
  background: var(--gray-900);
  box-shadow: 0 0 60px rgba(34, 197, 94, 0.08);
  animation: green-glow-pulse 3s ease-in-out infinite paused;
}

.problem-terminal--unified.visible {
  animation-play-state: running;
}

@keyframes green-glow-pulse {
  0%, 100% { box-shadow: 0 0 40px rgba(34, 197, 94, 0.06); }
  50% { box-shadow: 0 0 60px rgba(34, 197, 94, 0.12); }
}

.problem-terminal--unified .problem-terminal-chrome {
  background: rgba(34, 197, 94, 0.06);
  border-bottom: 1px solid rgba(34, 197, 94, 0.15);
}

/* Arrow divider */
.problem-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  color: var(--gray-600);
}

.problem-arrow.visible {
  opacity: 1;
}

.problem-arrow svg {
  width: 28px;
  height: 28px;
}

/* Chrome bar */
.problem-terminal-chrome {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  gap: 1rem;
}

.problem-terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
}

.problem-terminal--chaos .problem-terminal-title {
  color: var(--gray-600);
}

.problem-terminal--unified .problem-terminal-title {
  color: var(--green);
}

/* Body */
.problem-terminal-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--gray-300);
  overflow-x: auto;
}

/* Lines */
.problem-line {
  white-space: pre;
  min-height: 1.7em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.problem-line.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Icons */
.problem-line .t-x {
  color: var(--red);
  font-weight: 700;
  margin-right: 0.25em;
}

.problem-line .t-check {
  color: var(--green);
  font-weight: 700;
  margin-right: 0.25em;
  display: inline-block;
}

.problem-line .t-check.pop {
  animation: check-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes check-pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* Text colors */
.problem-line .t-leak {
  color: var(--gray-500);
}

.problem-line .t-danger {
  color: var(--red);
  font-weight: 500;
}

.problem-line .t-green-dim {
  color: rgba(34, 197, 94, 0.6);
}

/* Danger line — red highlight + pulsing glow */
.problem-line--danger {
  background: rgba(239, 68, 68, 0.08);
  margin: 0 -1.5rem;
  padding: 0 1.5rem;
  border-left: 2px solid var(--red);
}

.problem-line--danger.visible {
  animation: danger-pulse 2s ease-in-out 0.3s infinite;
}

@keyframes danger-pulse {
  0%, 100% { background: rgba(239, 68, 68, 0.06); }
  50% { background: rgba(239, 68, 68, 0.14); }
}

/* Summary line */
.problem-line--summary {
  margin-top: 0.5em;
  padding-top: 0.5em;
  border-top: 1px solid var(--gray-800);
}

/* Responsive */
@media (max-width: 768px) {
  .problem-terminals {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .problem-arrow {
    transform: rotate(90deg);
    padding: 0.25rem 0;
  }
  .problem-arrow svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 640px) {
  .problem-terminal-body {
    padding: 1rem 1rem;
    font-size: 0.6875rem;
    line-height: 1.6;
  }
  .problem-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .problem-line--danger {
    margin: 0 -1rem;
    padding: 0 1rem;
  }
  .problem-terminal-big-number {
    padding: 0.625rem 1rem;
    font-size: 0.6875rem;
  }
  .big-num {
    font-size: 1.375rem;
  }
  .problem-terminal-chrome {
    padding: 0.5rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .problem-terminal-body {
    font-size: 0.625rem;
    padding: 0.75rem 0.75rem;
  }
  .problem-line--danger {
    margin: 0 -0.75rem;
    padding: 0 0.75rem;
  }
  .problem-terminal-big-number {
    padding: 0.5rem 0.75rem;
    font-size: 0.625rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .problem-terminal {
    opacity: 1;
    transform: none;
  }
  .problem-terminal--chaos.visible {
    opacity: 0.7;
  }
  .problem-line {
    opacity: 1;
    transform: none;
  }
  .problem-line--danger.visible {
    animation: none;
  }
  .problem-terminal--unified.visible {
    animation: none;
  }
}

/* Big number footer on terminals */
.problem-terminal-big-number {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gray-500);
  border-top: 1px solid var(--gray-800);
}

.problem-terminal--chaos .problem-terminal-big-number {
  border-top-color: rgba(239, 68, 68, 0.1);
}

.problem-terminal--unified .problem-terminal-big-number {
  border-top-color: rgba(34, 197, 94, 0.15);
}

.big-num {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  margin-right: 0.25em;
}

.big-num--red {
  color: var(--red);
}

.big-num--green {
  color: var(--green);
}

/* Stat callouts */
.problem-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.problem-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--gray-800);
  background: rgba(23, 23, 23, 0.5);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.problem-stat.visible {
  opacity: 1;
  transform: translateY(0);
}

.problem-stat-before {
  color: var(--gray-600);
  text-decoration: line-through;
  text-decoration-color: var(--red);
}

.problem-stat-arrow {
  color: var(--gray-600);
  flex-shrink: 0;
}

.problem-stat-after {
  color: var(--green);
  font-weight: 600;
}

@media (max-width: 768px) {
  .problem-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .problem-stat {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    gap: 0.5rem;
  }
}

/* === Responsive === */
@media (max-width: 640px) {
  .hero {
    padding-top: calc(var(--header-height) + 1.5rem);
    padding-bottom: 1.5rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .hero-description {
    font-size: 0.9375rem;
  }
  .hero-actions {
    flex-direction: column;
  }
  .header-actions {
    display: none;
  }
  .section {
    padding: 3rem 1.25rem;
  }
  .section-full {
    padding: 3rem 1.25rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .flow {
    flex-direction: column;
  }
  .flow-step:first-child,
  .flow-step:last-child {
    border-radius: 12px;
  }
  .flow-arrow {
    justify-content: center;
    transform: rotate(90deg);
  }
  .spec-grid {
    grid-template-columns: 1fr;
  }
  .prior-art-grid {
    grid-template-columns: 1fr;
  }
  .hero-terminal {
    margin-top: 1.25rem;
  }
  .terminal-body {
    padding: 0.75rem;
    height: 300px;
    font-size: 0.6875rem;
  }
  .terminal-tab {
    font-size: 0.6875rem;
    padding: 0.2rem 0.5rem;
  }
  .terminal-annotation {
    font-size: 0.8125rem;
  }
}
