/* ═══════════════════════════════════════════════════════
   MDC Docs — shared styles for /docs/* routes.
   Mirrors the design tokens of the landing page so sub-pages
   feel like one coherent site.
   ═══════════════════════════════════════════════════════ */

@font-face { font-family: 'Inter';          font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter';          font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter';          font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2'); }

:root {
  --bg:         #020b1c;
  --bg-raised:  #061229;
  --bg-card:    rgba(6, 22, 52, 0.85);
  --bg-card-hi: rgba(8, 28, 62, 0.92);
  --border:     rgba(0, 200, 255, 0.1);
  --border-med: rgba(0, 200, 255, 0.18);
  --border-hi:  rgba(0, 200, 255, 0.3);
  --cyan:       #00e5ff;
  --cyan-dim:   rgba(0, 229, 255, 0.5);
  --cyan-bg:    rgba(0, 229, 255, 0.06);
  --gold:       #f0b429;
  --gold-dim:   rgba(240, 180, 41, 0.3);
  --gold-bg:    rgba(240, 180, 41, 0.06);
  --text:       #c8ddf0;
  --text-hi:    #e4eef8;
  --text-sec:   rgba(170, 210, 245, 0.7);
  --text-mut:   rgba(140, 185, 225, 0.45);
  --white:      #ffffff;
  --mono:       'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --sans:       'Inter', -apple-system, system-ui, sans-serif;
  --max-w:      1200px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--text-hi); }

/* ═══ Top nav (mirrors landing) ═══ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(2, 11, 28, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.5px;
}
.nav-brand span { color: var(--cyan); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-mut);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  font-size: 11px !important;
  padding: 8px 18px !important;
  color: var(--cyan) !important;
  border: 1px solid var(--border-hi);
  border-radius: 4px;
  transition: all 0.2s;
}
.nav-cta:hover {
  background: rgba(0, 229, 255, 0.08) !important;
  border-color: var(--cyan) !important;
}

/* ═══ Docs shell: sidebar + content ═══ */
.docs-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 40px 80px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
}
.docs-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 12px;
}
.docs-sb-group {
  margin-bottom: 28px;
}
.docs-sb-group-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-mut);
  padding: 0 12px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.docs-sb-item {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-sec);
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.docs-sb-item:hover {
  color: var(--text);
  background: rgba(0, 229, 255, 0.03);
}
.docs-sb-item.is-active {
  color: var(--cyan);
  border-left-color: var(--cyan);
  background: var(--cyan-bg);
}

/* ═══ Content column ═══ */
.docs-content {
  min-width: 0;
}
.docs-breadcrumb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--text-mut);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.docs-breadcrumb a { color: var(--text-sec); }
.docs-breadcrumb a:hover { color: var(--text); }
.docs-breadcrumb span { color: var(--text-mut); }
.docs-breadcrumb .current { color: var(--text-hi); }

.docs-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--text-sec);
  margin-bottom: 28px;
  transition: color 0.15s;
}
.docs-back:hover { color: var(--cyan); }

.docs-header { margin-bottom: 40px; }
.docs-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
  display: inline-block;
}
.docs-title {
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  color: var(--white);
  font-weight: 600;
}
.docs-subtitle {
  font-size: 17px;
  color: var(--text-sec);
  margin: 0;
  max-width: 720px;
  line-height: 1.55;
}
.docs-meta-note {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-mut);
  font-style: italic;
  margin: 16px 0 0;
  max-width: 720px;
}
.docs-meta-note a {
  color: var(--text-sec);
  border-bottom: 1px dotted var(--text-mut);
}
.docs-meta-note a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* ═══ Hero graphic block ═══ */
.docs-hero-graphic {
  position: relative;
  background: linear-gradient(160deg, rgba(8, 28, 62, 0.9), rgba(4, 14, 34, 0.95));
  border: 1px solid var(--border-med);
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 48px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 60px rgba(0, 229, 255, 0.03);
}
.docs-hero-graphic::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(0, 229, 255, 0.06), transparent 60%);
  pointer-events: none;
}
.docs-hero-graphic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--text-sec);
  position: relative;
  z-index: 1;
}
.docs-hero-graphic-head .hv-live {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.docs-hero-graphic-head .hv-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: docs-hv-pulse 2s ease-in-out infinite;
}
@keyframes docs-hv-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--cyan); }
  50%      { opacity: 0.35; box-shadow: none; }
}
.docs-hero-graphic svg {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
}
/* TODO placeholder frame around scaled-up mini icons */
.docs-hero-placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.docs-hero-placeholder svg {
  width: 42%;
  max-width: 320px;
  height: auto;
}
.docs-hero-placeholder-tag {
  position: absolute;
  top: 12px;
  right: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--gold);
  background: var(--gold-bg);
  border: 1px solid var(--gold-dim);
  padding: 4px 10px;
  border-radius: 3px;
  z-index: 2;
}

/* ═══ Prose sections ═══ */
.docs-section {
  margin-bottom: 48px;
}
.docs-section h2 {
  font-size: 22px;
  color: var(--white);
  margin: 0 0 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.docs-section p {
  color: var(--text-sec);
  font-size: 15px;
  line-height: 1.75;
  margin: 0 0 14px;
  max-width: 720px;
}
.docs-section p strong {
  color: var(--text-hi);
  font-weight: 600;
}
.docs-todo {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--gold);
  background: var(--gold-bg);
  border-left: 2px solid var(--gold-dim);
  padding: 8px 14px;
  margin: 0 0 16px;
  display: block;
  max-width: 720px;
}
.docs-section ul {
  padding-left: 20px;
  color: var(--text-sec);
  max-width: 720px;
}
.docs-section li {
  margin-bottom: 8px;
  line-height: 1.65;
}

/* ═══ See also (cross-links between docs, landing anchors, DOI) ═══ */
.docs-seealso {
  margin: 56px 0 0;
  padding: 24px 28px;
  background: rgba(6, 22, 52, 0.55);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.docs-seealso h2 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 14px;
}
.docs-seealso ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.docs-seealso li {
  font-size: 13px;
  color: var(--text-sec);
  line-height: 1.5;
}
.docs-seealso a {
  color: var(--text-sec);
  border-bottom: 1px dotted var(--text-mut);
}
.docs-seealso a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* ═══ Bottom CTA ═══ */
.docs-cta {
  margin-top: 56px;
  padding: 32px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-med);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.docs-cta-text h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--white);
  font-weight: 600;
}
.docs-cta-text p {
  margin: 0;
  color: var(--text-sec);
  font-size: 14px;
}
.docs-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.docs-btn {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 11px 22px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
  display: inline-block;
}
.docs-btn--primary {
  background: var(--cyan);
  color: #021121;
  border-color: var(--cyan);
}
.docs-btn--primary:hover {
  background: #5bf0ff;
  color: #021121;
}
.docs-btn--outline {
  background: transparent;
  color: var(--cyan);
  border-color: var(--border-hi);
}
.docs-btn--outline:hover {
  background: var(--cyan-bg);
  border-color: var(--cyan);
}

/* ═══ Footer ═══ */
.docs-footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mut);
}
.docs-footer a {
  color: var(--text-sec);
  text-decoration: none;
  letter-spacing: 0.5px;
}
.docs-footer a:hover { color: var(--text); }
.docs-footer-org { flex: 1 1 auto; }

/* ═══ Responsive ═══ */
@media (max-width: 900px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .docs-shell {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 20px 60px;
  }
  .docs-sidebar {
    position: static;
    max-height: none;
    padding-right: 0;
  }
  .docs-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}
