/* =============================================================================
   ngxctl — stylesheet
   Design system: dark charcoal surface, off-white text, restrained nginx-green
   accent. Sharp, technical, low-decoration. See tokens below.
   ============================================================================= */

:root {
  /* ---- Color tokens ---- */
  --bg: #0b0d0c;
  --bg-raised: #111411;
  --bg-inset: #0e100f;
  --border: #23271f;
  --border-strong: #33382e;
  --text: #ecefe9;
  --text-dim: #9aa196;
  --text-faint: #656c61;
  --accent: #3fb765;
  --accent-strong: #55d17c;
  --accent-dim: #2b6d41;
  --accent-wash: rgba(63, 183, 101, 0.09);
  --danger: #d97757;

  /* ---- Type ---- */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* ---- Scale ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --radius-sm: 3px;
  --radius-md: 5px;

  --container: 1160px;
  --header-h: 64px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure { margin: 0; }

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

::selection {
  background: var(--accent-dim);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =============================================================================
   Header / Navigation
   ============================================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(11, 13, 12, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--accent);
  background: var(--bg-raised);
}

.brand-mark svg { width: 15px; height: 15px; }

.brand-mark-img {
  width: 17px;
  height: auto;
  display: block;
}

.brand-name .dim { color: var(--text-faint); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-dim);
  padding: var(--space-2) 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

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

.nav-links a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-gh {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
}

.nav-gh:hover {
  color: var(--text);
  border-color: var(--text-faint);
  background: var(--bg-raised);
}

.nav-gh svg { width: 14px; height: 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
}

.nav-toggle svg { width: 18px; height: 18px; }

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--bg);
  z-index: 99;
  padding: var(--space-6) var(--space-5);
  display: none;
  flex-direction: column;
  gap: var(--space-2);
  overflow-y: auto;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-size: 17px;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}

.mobile-menu a[aria-current="page"] { color: var(--accent); }

.mobile-menu .nav-gh {
  margin-top: var(--space-4);
  justify-content: center;
}

/* =============================================================================
   Buttons
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease), transform 0.1s var(--ease);
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #06110a;
  border-color: var(--accent);
}

.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

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

.btn svg { width: 15px; height: 15px; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* =============================================================================
   Hero
   ============================================================================= */

.hero {
  padding: var(--space-9) 0 var(--space-8);
  border-bottom: 1px solid var(--border);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-5);
}

.hero-lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 46ch;
  margin-bottom: var(--space-6);
}

/* =============================================================================
   Terminal
   ============================================================================= */

.terminal {
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 50px -25px rgba(0, 0, 0, 0.6);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}

.terminal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.terminal-title {
  margin-left: var(--space-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

.terminal-body {
  padding: var(--space-5);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
  overflow-x: auto;
}

.terminal-body .line { white-space: pre; }
.terminal-prompt { color: var(--accent); }
.terminal-cmd { color: var(--text); }
.terminal-flag { color: #8ab4f8; }
.terminal-out { color: var(--text-dim); }
.terminal-ok { color: var(--accent-strong); }
.terminal-muted { color: var(--text-faint); }

.cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* =============================================================================
   Comparison ("old way" vs "ngxctl way")
   ============================================================================= */

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.compare-col {
  background: var(--bg-inset);
  display: flex;
  flex-direction: column;
}

.compare-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
}

.compare-head .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.compare-col.is-old .dot { background: var(--text-faint); }
.compare-col.is-new .dot { background: var(--accent); }

.compare-head span.label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.compare-col.is-new .compare-head span.label { color: var(--accent-strong); }

.compare-body {
  padding: var(--space-5);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.85;
  overflow-x: auto;
  flex: 1;
}

.compare-body .line { white-space: pre; color: var(--text-dim); }
.compare-col.is-old .compare-body .cmt { color: var(--text-faint); }
.compare-col.is-old .compare-body .kw { color: #8ab4f8; }
.compare-col.is-new .compare-body .terminal-prompt { color: var(--accent); }
.compare-col.is-new .compare-body .terminal-flag { color: #8ab4f8; }
.compare-col.is-new .compare-body .terminal-cmd { color: var(--text); }
.compare-col.is-new .compare-body .terminal-ok { color: var(--accent-strong); }
.compare-col.is-new .compare-body .terminal-out { color: var(--text-faint); }

.compare-foot {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-faint);
}

.compare-col.is-new .compare-foot { color: var(--text-dim); }

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

/* =============================================================================
   CLI reference block (ngxctl --help style)
   ============================================================================= */

.cli-ref {
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cli-ref-body {
  padding: var(--space-6);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.9;
  overflow-x: auto;
}

.cli-ref-body .cmd-row {
  display: flex;
  gap: var(--space-5);
  white-space: pre;
}

.cli-ref-body .cmd-name { color: var(--accent-strong); min-width: 220px; flex-shrink: 0; }
.cli-ref-body .cmd-desc { color: var(--text-dim); }
.cli-ref-body .cmd-group {
  color: var(--text-faint);
  margin-top: var(--space-4);
  margin-bottom: var(--space-1);
}
.cli-ref-body .cmd-group:first-child { margin-top: 0; }

@media (max-width: 640px) {
  .cli-ref-body .cmd-row { flex-direction: column; gap: 2px; }
  .cli-ref-body .cmd-name { min-width: 0; }
  .cli-ref-body .cmd-row { margin-bottom: var(--space-2); }
}

/* =============================================================================
   Section scaffolding
   ============================================================================= */

section.section {
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--border);
}

section.section:last-of-type { border-bottom: none; }

.section-head {
  max-width: 60ch;
  margin-bottom: var(--space-6);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  display: block;
}

.section-head h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.section-head p {
  color: var(--text-dim);
  font-size: 15px;
}

/* =============================================================================
   Feature grid
   ============================================================================= */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.feature {
  background: var(--bg);
  padding: var(--space-5);
}

.feature-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.feature-icon svg { width: 16px; height: 16px; }

.feature h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.feature p {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* =============================================================================
   Tech categories
   ============================================================================= */

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.tech-cat {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.tech-cat h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-4);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tech-tag {
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-family: var(--font-mono);
}

/* =============================================================================
   How it works
   ============================================================================= */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  position: relative;
}

.step {
  position: relative;
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-strong);
}

.step-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: var(--space-3);
  display: block;
}

.step h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.step p {
  font-size: 14px;
  color: var(--text-dim);
}

/* =============================================================================
   CTA
   ============================================================================= */

.cta {
  text-align: center;
  padding: var(--space-9) 0;
}

.cta h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-5);
}

.cta .btn-row { justify-content: center; }

/* =============================================================================
   Footer
   ============================================================================= */

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-7) 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.footer-brand .brand { margin-bottom: var(--space-2); }

.footer-tag {
  font-size: 13.5px;
  color: var(--text-dim);
  max-width: 32ch;
}

.footer-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  font-size: 13.5px;
  color: var(--text-dim);
  transition: color 0.15s var(--ease);
}

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

.footer-meta {
  font-size: 12.5px;
  color: var(--text-faint);
  text-align: right;
}

.footer-bottom {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

/* =============================================================================
   Page header (Docs / About)
   ============================================================================= */

.page-header {
  padding: var(--space-8) 0 var(--space-6);
  border-bottom: 1px solid var(--border);
}

.page-header .eyebrow { margin-bottom: var(--space-3); }

.page-header h1 {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.page-header p {
  margin-top: var(--space-3);
  color: var(--text-dim);
  font-size: 15.5px;
  max-width: 60ch;
}

/* =============================================================================
   Documentation layout
   ============================================================================= */

.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-8);
  padding: var(--space-7) 0 var(--space-9);
  align-items: start;
}

.docs-toc {
  position: sticky;
  top: calc(var(--header-h) + var(--space-6));
}

.docs-toc-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-3);
  display: block;
}

.docs-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.docs-toc a {
  display: block;
  font-size: 13.5px;
  color: var(--text-dim);
  padding: var(--space-2) 0 var(--space-2) var(--space-4);
  border-left: 1px solid transparent;
  margin-left: -1px;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.docs-toc a:hover { color: var(--text); }

.docs-toc a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

.docs-mobile-toc {
  display: none;
}

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

.doc-section {
  padding-bottom: var(--space-8);
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}

.doc-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.doc-section h2 {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
}

.doc-section h3 {
  font-size: 21px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
}

.doc-section > p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.doc-sub {
  margin-top: var(--space-5);
}

.doc-sub h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.doc-sub p {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: var(--space-3);
}

/* ---- Option tables ---- */

.opt-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
  font-size: 13.5px;
}

.opt-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-strong);
}

.opt-table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: top;
}

.opt-table code {
  font-family: var(--font-mono);
  color: var(--accent-strong);
  font-size: 13px;
  white-space: nowrap;
}

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

/* ---- Code blocks ---- */

.code-block {
  position: relative;
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  margin: var(--space-4) 0;
  overflow: hidden;
}

.code-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}

.code-block-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
}

.copy-btn:hover { color: var(--text); border-color: var(--text-faint); background: var(--bg); }

.copy-btn svg { width: 12px; height: 12px; }

.copy-btn.copied { color: var(--accent-strong); border-color: var(--accent-dim); }

.code-block pre {
  margin: 0;
  padding: var(--space-4);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text);
}

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

.tok-comment { color: var(--text-faint); }
.tok-flag { color: #8ab4f8; }
.tok-string { color: var(--accent-strong); }
.tok-prompt { color: var(--accent); }

.env-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: 13px;
  margin: var(--space-4) 0;
}

.env-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-4);
  padding: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.env-item:last-child { border-bottom: none; }

.env-name { color: var(--accent-strong); }
.env-default { color: var(--text-faint); font-size: 12px; }

.callout {
  border: 1px solid var(--border-strong);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  font-size: 14px;
  color: var(--text-dim);
  background: var(--accent-wash);
  margin: var(--space-4) 0;
}

.callout strong { color: var(--text); }

/* =============================================================================
   About page
   ============================================================================= */

.about-body {
  padding: var(--space-7) 0 var(--space-9);
  max-width: 68ch;
}

.about-banner {
  display: inline-flex;
  align-items: center;
  padding: var(--space-5) var(--space-6);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-7);
}

.about-banner img {
  height: 42px;
  width: auto;
  display: block;
}

@media (max-width: 480px) {
  .about-banner { padding: var(--space-4) var(--space-5); }
  .about-banner img { height: 32px; }
}

.about-body > p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-dim);
  margin-bottom: var(--space-5);
}

.about-quote {
  border-left: 2px solid var(--accent);
  padding-left: var(--space-5);
  margin: var(--space-6) 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

.dev-card {
  margin-top: var(--space-7);
  padding-top: var(--space-7);
  border-top: 1px solid var(--border);
}

.dev-card .section-label { margin-bottom: var(--space-4); }

.dev-name {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.dev-desc {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: var(--space-5);
  max-width: 60ch;
}

.dev-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.dev-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 14px;
  color: var(--text-dim);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
  width: fit-content;
  min-width: 320px;
  max-width: 100%;
}

.dev-link:hover { border-color: var(--text-faint); color: var(--text); background: var(--bg-raised); }

.dev-link svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }

.dev-link .dev-link-label { color: var(--text-faint); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; min-width: 52px; }

/* =============================================================================
   Back to top
   ============================================================================= */

.back-to-top {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.15s var(--ease);
  z-index: 90;
}

.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { border-color: var(--text-faint); }
.back-to-top svg { width: 16px; height: 16px; }

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 980px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: var(--space-5); }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-toc { display: none; }
  .docs-mobile-toc { display: block; margin-bottom: var(--space-6); }
}

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
}

@media (max-width: 720px) {
  .nav-links, .nav-right .nav-gh { display: none; }
  .nav-toggle { display: flex; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; }
  .footer-bottom { flex-direction: column; gap: var(--space-2); }
  .hero { padding: var(--space-7) 0 var(--space-6); }
  section.section { padding: var(--space-7) 0; }
  .env-item { grid-template-columns: 1fr; gap: var(--space-1); }
  .dev-link { min-width: 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-4); }
  .hero h1 { font-size: 28px; }
  .cta h2 { font-size: 22px; }
}

/* ---- Mobile TOC (details/summary) ---- */

.docs-mobile-toc details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.docs-mobile-toc summary {
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.docs-mobile-toc summary::-webkit-details-marker { display: none; }

.docs-mobile-toc summary::after {
  content: "+";
  color: var(--text-faint);
  font-size: 16px;
}

.docs-mobile-toc details[open] summary::after { content: "\2212"; }

.docs-mobile-toc ol {
  list-style: none;
  margin: 0;
  padding: 0 var(--space-4) var(--space-3);
}

.docs-mobile-toc a {
  display: block;
  padding: var(--space-2) 0;
  font-size: 14px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

.docs-mobile-toc li:first-child a { border-top: none; }