/* JESD204B.COM | dark-tech engineering platform
   Brand tokens + components.
   Hand-crafted, no framework.
*/

/* ─────────────────────────────────────────────
   Tokens
───────────────────────────────────────────── */
:root {
  --bg: #050816;
  --bg-2: #0a0f24;
  --panel: rgba(255, 255, 255, 0.03);
  --panel-2: rgba(255, 255, 255, 0.05);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);

  --cyan: #42c7ff;
  --cyan-2: #00b4ff;
  --magenta: #d54dff;
  --magenta-2: #b033ff;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;

  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.72);
  --text-3: rgba(255, 255, 255, 0.55);
  --text-4: rgba(255, 255, 255, 0.4);

  --grad-brand: linear-gradient(90deg, var(--cyan), var(--magenta));
  --grad-brand-soft: linear-gradient(90deg, rgba(66, 199, 255, 0.18), rgba(213, 77, 255, 0.18));

  --shadow-glow-cyan: 0 0 32px rgba(66, 199, 255, 0.35);
  --shadow-glow-magenta: 0 0 32px rgba(213, 77, 255, 0.35);
  --shadow-glow-mix: 0 0 40px rgba(76, 166, 255, 0.3);
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.4);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

/* ─────────────────────────────────────────────
   Reset / base
───────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle ambient grid background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% -20%, rgba(66, 199, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(213, 77, 255, 0.10), transparent 60%);
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ─────────────────────────────────────────────
   Layout
───────────────────────────────────────────── */
.container {
  width: 92%;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.section-tight { padding: 48px 0; }

.section-title {
  text-align: center;
  margin-bottom: 56px;
}

.section-title .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}

.section-title h2 {
  font-size: 44px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-title p {
  margin-top: 16px;
  font-size: 18px;
  color: var(--text-2);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.gradient-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* ─────────────────────────────────────────────
   Navigation
───────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 5%;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 8, 22, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.logo {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo .b,
.logo .c {
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.logo .b {
  background-image: linear-gradient(90deg, #ffffff 0%, var(--cyan) 100%);
}

.logo .c {
  background-image: linear-gradient(90deg, #ffffff 0%, var(--magenta) 100%);
}

.logo .divider { color: var(--text-4); font-weight: 400; }
.logo .com { color: var(--text-3); font-size: 14px; font-weight: 500; margin-left: 4px; }

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

.nav-links a {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}

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

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

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 2px;
  background: var(--grad-brand);
}

.nav-cta {
  display: flex;
  gap: 12px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  color: var(--text);
  align-items: center;
  justify-content: center;
}

/* ─────────────────────────────────────────────
   Buttons
───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn.primary {
  background: var(--grad-brand);
  color: white;
  box-shadow: var(--shadow-glow-mix);
}
.btn.primary:hover { box-shadow: 0 0 48px rgba(76, 166, 255, 0.5); }

.btn.secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn.secondary:hover { background: var(--panel-2); border-color: var(--cyan); }

.btn.ghost {
  background: transparent;
  color: var(--text-2);
}
.btn.ghost:hover { color: var(--text); }

.btn.large {
  padding: 16px 30px;
  font-size: 16px;
  border-radius: 14px;
}

/* ─────────────────────────────────────────────
   Hero
───────────────────────────────────────────── */
.hero {
  position: relative;
  margin: 32px auto;
  width: 96%;
  max-width: 1400px;
  min-height: 560px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: rgb(1, 6, 17);
  isolation: isolate;
}

.hero-image {
  position: absolute;
  top: 0;
  right: 0;
  width: auto;
  max-width: 60%;
  height: auto;
  display: block;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(1, 6, 17, 0.95) 0%, rgba(1, 6, 17, 0.55) 35%, rgba(1, 6, 17, 0.0) 60%),
    linear-gradient(180deg, rgba(1, 6, 17, 0.0) 60%, rgba(1, 6, 17, 0.55) 100%);
}

.hero-content {
  position: absolute;
  left: 56px;
  bottom: 56px;
  max-width: 720px;
  z-index: 2;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(66, 199, 255, 0.35);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
  backdrop-filter: blur(8px);
}

.tag .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero h1 {
  font-size: 76px;
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.hero h1 .gradient-text {
  display: block;
}

.hero p.lead {
  margin-top: 24px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-2);
  max-width: 580px;
}

.hero-buttons {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────────
   Cards / panels
───────────────────────────────────────────── */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}

.panel:hover {
  border-color: var(--border-strong);
}

.panel.glow {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow-card);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.feature h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature p {
  color: var(--text-2);
  font-size: 15px;
}

/* How it works steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}

.step {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  position: relative;
}

.step .num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--cyan);
  margin-bottom: 14px;
  font-weight: 600;
}

.step h4 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* ─────────────────────────────────────────────
   Configurator
───────────────────────────────────────────── */
.configurator-shell {
  background: linear-gradient(180deg, var(--panel-2), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px;
  margin: 40px 0;
  box-shadow: var(--shadow-card);
}

.config-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 36px;
}

.config-progress .pip {
  flex: 1;
  height: 4px;
  background: var(--panel-strong);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.config-progress .pip.done::after,
.config-progress .pip.active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-brand);
}

.config-progress .pip.active::after {
  animation: fill 0.6s ease;
}

@keyframes fill {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.config-step-header {
  margin-bottom: 28px;
}

.config-step-header .label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--cyan);
  text-transform: uppercase;
  font-weight: 600;
}

.config-step-header h2 {
  font-size: 32px;
  font-weight: 800;
  margin-top: 8px;
  letter-spacing: -0.02em;
}

.config-step-header p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 16px;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.config-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.config-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

.field .hint {
  font-size: 12px;
  color: var(--text-3);
}

.input,
.select {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  width: 100%;
}

.select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%2342c7ff' stroke-width='1.5'><path d='M2 4l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(66, 199, 255, 0.18);
}

.input:disabled,
.select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.radio-group {
  display: flex;
  gap: 10px;
}

.radio-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.radio-pill input { display: none; }

.radio-pill.selected {
  border-color: var(--cyan);
  color: var(--text);
  background: rgba(66, 199, 255, 0.1);
}

.config-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.config-summary .pill {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-2);
}

.config-summary .pill .key {
  color: var(--text-3);
  margin-right: 6px;
}

.config-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  gap: 12px;
}

/* Mock generation output */
.mock-output {
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  margin-top: 20px;
}

.mock-output .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-sans);
}

.mock-output .filename {
  color: var(--cyan);
  font-weight: 600;
  font-size: 15px;
}

.mock-output .badge {
  background: rgba(52, 211, 153, 0.15);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.mock-output ul { list-style: none; padding: 0; }

.mock-output li {
  color: var(--text-2);
  padding: 4px 0;
}

.mock-output li::before {
  content: "├─ ";
  color: var(--text-4);
}

.mock-output li:last-child::before {
  content: "└─ ";
}

.mock-output .size {
  color: var(--text-4);
  margin-left: 12px;
  font-size: 11px;
}

/* ─────────────────────────────────────────────
   Tables (devices)
───────────────────────────────────────────── */
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-controls {
  display: flex;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  flex-wrap: wrap;
}

.table-controls .input,
.table-controls .select {
  width: auto;
  min-width: 180px;
  padding: 10px 14px;
  font-size: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-2);
}

tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

tbody tr:last-child td { border-bottom: none; }

td .mono { font-family: var(--font-mono); color: var(--cyan); }

.chip {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.02);
}

.chip.cyan { color: var(--cyan); border-color: rgba(66, 199, 255, 0.35); background: rgba(66, 199, 255, 0.08); }
.chip.magenta { color: var(--magenta); border-color: rgba(213, 77, 255, 0.35); background: rgba(213, 77, 255, 0.08); }
.chip.green { color: var(--green); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); }

/* ─────────────────────────────────────────────
   Pricing
───────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.price-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.price-card.featured {
  border-color: rgba(66, 199, 255, 0.4);
  background: linear-gradient(180deg, rgba(66, 199, 255, 0.05), var(--panel));
  box-shadow: var(--shadow-glow-cyan);
}

.price-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-brand);
  color: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.price-card .tier {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}

.price-card .price {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.price-card .price-detail {
  color: var(--text-3);
  font-size: 14px;
  margin-bottom: 24px;
}

.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  flex: 1;
}

.price-card li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-2);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.price-card li::before {
  content: "✓";
  color: var(--green);
  font-weight: 700;
}

.price-card li.dim { color: var(--text-4); }
.price-card li.dim::before { content: "·"; color: var(--text-4); }

/* ─────────────────────────────────────────────
   Docs
───────────────────────────────────────────── */
.doc-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.doc-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.2s, transform 0.15s;
}

.doc-item:hover { border-color: var(--cyan); transform: translateY(-2px); }

.doc-item .cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--magenta);
  text-transform: uppercase;
  font-weight: 600;
}

.doc-item h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 8px 0 8px;
  color: var(--text);
}

.doc-item p {
  font-size: 14px;
  color: var(--text-2);
}

.article {
  max-width: 760px;
  margin: 0 auto;
}

.article h1 { font-size: 42px; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 16px; }
.article h2 { font-size: 26px; margin: 36px 0 14px; letter-spacing: -0.01em; }
.article h3 { font-size: 18px; margin: 24px 0 10px; }
.article p { color: var(--text-2); margin-bottom: 14px; line-height: 1.7; }
.article ul, .article ol { color: var(--text-2); margin: 0 0 16px 22px; }
.article li { margin: 6px 0; }
.article code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--cyan);
}

.article pre {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 16px 0;
  color: var(--text-2);
}

.article pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

/* ─────────────────────────────────────────────
   Forms
───────────────────────────────────────────── */
.form {
  display: grid;
  gap: 16px;
}

.form .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form textarea {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  min-height: 140px;
  width: 100%;
}

.form textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(66, 199, 255, 0.18); }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-2);
}

.consent input { margin-top: 4px; }

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ─────────────────────────────────────────────
   Footer
───────────────────────────────────────────── */
footer.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  padding: 56px 0 24px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-brand .logo { margin-bottom: 14px; }

.footer-brand p {
  color: var(--text-3);
  font-size: 14px;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-col ul { list-style: none; }

.footer-col li {
  padding: 4px 0;
}

.footer-col a {
  color: var(--text-2);
  font-size: 14px;
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-4);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom .legal a { color: var(--text-3); margin-left: 18px; }
.footer-bottom .legal a:hover { color: var(--text); }

/* ─────────────────────────────────────────────
   CTA strip
───────────────────────────────────────────── */
.cta-strip {
  margin: 64px auto;
  padding: 48px;
  background: linear-gradient(135deg, rgba(66, 199, 255, 0.08), rgba(213, 77, 255, 0.08));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  text-align: center;
  max-width: 1200px;
  position: relative;
  overflow: hidden;
}

.cta-strip::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: var(--grad-brand);
  z-index: -1;
  opacity: 0.15;
  filter: blur(40px);
}

.cta-strip h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.cta-strip p {
  color: var(--text-2);
  font-size: 17px;
  max-width: 600px;
  margin: 0 auto 28px;
}

.cta-strip .buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────────
   Breadcrumbs
───────────────────────────────────────────── */
.breadcrumbs {
  padding: 24px 0;
  font-size: 13px;
  color: var(--text-3);
}

.breadcrumbs a { color: var(--text-2); }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs .sep { margin: 0 10px; color: var(--text-4); }

/* ─────────────────────────────────────────────
   Responsive
───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero { min-height: 480px; }
  .hero h1 { font-size: 56px; }
  .hero-image { max-width: 70%; opacity: 0.55; }
  .hero-content { left: 32px; right: 32px; bottom: 32px; max-width: none; }
  .hero p.lead { font-size: 17px; }
  .feature-grid, .feature-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .config-grid, .config-grid.cols-3, .config-grid.cols-4 { grid-template-columns: 1fr; }
  .doc-list { grid-template-columns: 1fr; }
  .form .row-2 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .hero { min-height: 420px; }
  .hero h1 { font-size: 40px; }
  .hero p.lead { font-size: 15px; }
  .hero-image { max-width: 90%; opacity: 0.35; }
  .section { padding: 56px 0; }
  .section-title h2 { font-size: 32px; }
  .feature-grid, .feature-grid.cols-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .nav-links { display: none; }
  .mobile-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: rgba(5, 8, 22, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 20px 5%;
    gap: 18px;
  }
  .nav-links.open a.active::after { display: none; }
  .nav-cta .btn:not(.primary) { display: none; }
  .configurator-shell { padding: 28px 22px; }
  .config-step-header h2 { font-size: 24px; }
  .container { width: 94%; }
  .cta-strip { padding: 32px 22px; margin: 32px auto; }
  .cta-strip h2 { font-size: 26px; }
  table { font-size: 12px; }
  thead th, tbody td { padding: 10px 12px; }
}

/* ─────────────────────────────────────────────
   Utilities
───────────────────────────────────────────── */
.text-mono { font-family: var(--font-mono); }
.text-cyan { color: var(--cyan); }
.text-magenta { color: var(--magenta); }
.text-muted { color: var(--text-3); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.center { text-align: center; }
.flex { display: flex; }
.gap-2 { gap: 12px; } .gap-3 { gap: 18px; }
.flex-wrap { flex-wrap: wrap; }
[hidden] { display: none !important; }

/* ─────────────────────────────────────────────
   Docs page (wiki-style)
───────────────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 80px;
}

.docs-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.docs-toc-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
  padding: 0 6px;
  font-weight: 600;
}

.docs-toc {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: docs;
}

.docs-toc li {
  counter-increment: docs;
}

.docs-toc a {
  display: block;
  padding: 7px 6px 7px 30px;
  color: var(--text-2);
  border-left: 2px solid transparent;
  position: relative;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  border-radius: 0 4px 4px 0;
}

.docs-toc a::before {
  content: counter(docs);
  position: absolute;
  left: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-4);
}

.docs-toc a:hover,
.docs-toc a:focus-visible {
  color: var(--text);
  border-left-color: var(--cyan);
  background: rgba(66, 199, 255, 0.04);
}

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

.docs-toc-foot {
  margin-top: 18px;
  padding: 14px 6px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

/* Article body */
.docs-content {
  min-width: 0; /* allow children to break long content */
}

.docs-section {
  padding: 36px 0 8px;
  scroll-margin-top: 96px; /* anchor-target offset under sticky navbar */
}

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

.docs-section h2 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.docs-num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--cyan);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.docs-section h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 12px;
  letter-spacing: -0.01em;
}

.docs-section p {
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 14px;
}

.docs-section ul,
.docs-section ol {
  color: var(--text-2);
  margin: 0 0 16px 22px;
  line-height: 1.7;
}

.docs-section li { margin: 6px 0; }

.docs-section pre {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 14px 0;
  color: var(--text-2);
  line-height: 1.55;
}
.docs-section pre code { background: none; border: none; padding: 0; color: inherit; }

.docs-section code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--cyan);
}

/* Callout box */
.callout {
  background: linear-gradient(180deg, rgba(66, 199, 255, 0.05), rgba(66, 199, 255, 0.02));
  border: 1px solid rgba(66, 199, 255, 0.25);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 18px 0;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
}
.callout strong { color: var(--text); }
.callout a { color: var(--cyan); }
.callout em { color: var(--text); font-style: italic; }

/* Timeline (revisions list) */
.timeline {
  list-style: none;
  padding: 0;
  margin: 22px 0 26px;
  position: relative;
  display: grid;
  gap: 14px;
}

.timeline li {
  display: grid;
  grid-template-columns: 160px 140px 1fr;
  gap: 18px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-sm);
  align-items: baseline;
}

.timeline-rev {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  letter-spacing: 0.02em;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.timeline-desc {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}

/* Comparison table tweaks */
.comparison-table th:first-child,
.comparison-table td:first-child {
  width: 220px;
  color: var(--text-3);
  font-weight: 600;
  font-size: 13px;
}

/* Layers (4 stacked panels) */
.layers {
  display: grid;
  gap: 12px;
  margin: 22px 0 26px;
}

.layer {
  display: grid;
  grid-template-columns: 64px 200px 1fr;
  gap: 20px;
  padding: 18px 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  align-items: center;
}

.layer-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: 0.04em;
}

.layer h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.layer p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}

/* Glossary definition list */
dl.glossary {
  margin: 16px 0 22px;
  display: grid;
  grid-template-columns: 200px 1fr;
  column-gap: 24px;
  row-gap: 10px;
  align-items: baseline;
}

dl.glossary dt {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  padding: 4px 0;
}

dl.glossary dd {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  padding: 4px 0;
}

/* Mini glossary table (control characters) */
table.glossary-mini th,
table.glossary-mini td {
  padding: 10px 16px;
}
table.glossary-mini td:nth-child(1),
table.glossary-mini td:nth-child(2) { width: 100px; }

/* Reading list */
ul.reading {
  list-style: none;
  margin: 8px 0 22px;
  padding: 0;
}

ul.reading li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.6;
}
ul.reading li:last-child { border-bottom: none; }
ul.reading a { color: var(--cyan); font-weight: 600; }
ul.reading a:hover { text-decoration: underline; }

/* Responsive: collapse sidebar on narrow */
@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .docs-sidebar {
    position: static;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
  }
  .timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .layer {
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto auto;
  }
  .layer h3 { grid-column: 2; }
  .layer p { grid-column: 1 / -1; padding-left: 0; }
  .layer-num { grid-row: 1 / 3; }
  dl.glossary {
    grid-template-columns: 1fr;
    row-gap: 4px;
  }
  dl.glossary dt {
    margin-top: 8px;
    color: var(--cyan);
  }
  dl.glossary dt:first-child { margin-top: 0; }
}

@media (max-width: 720px) {
  .docs-section h2 { font-size: 24px; flex-wrap: wrap; }
  .docs-section pre { font-size: 12px; padding: 14px; }
  .comparison-table th:first-child,
  .comparison-table td:first-child { width: 140px; font-size: 12px; }
}
