/* Team showcase — reuses catalog design tokens from styles.css */
.machine-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.machine-banner {
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: linear-gradient(90deg, rgba(232, 168, 56, 0.12), rgba(232, 168, 56, 0.22), rgba(232, 168, 56, 0.12));
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 4px 24px rgba(232, 168, 56, 0.08);
}

.machine-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1.15rem 1.5rem;
  background: rgba(15, 20, 25, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.machine-nav-inner {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.75rem 1rem;
}

.machine-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  min-width: 0;
}

.machine-nav-brand h1 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
}

.machine-nav-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  flex: 0 1 auto;
  min-width: 0;
}

.machine-nav a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.machine-nav a:hover,
.machine-nav a.nav-active {
  color: var(--text);
  background: var(--bg-elevated);
}

.machine-nav a.nav-active {
  color: var(--accent);
}

.machine-nav a.btn-primary {
  color: #0f1419;
  background: linear-gradient(135deg, var(--accent), #c47f20);
  font-weight: 600;
  white-space: nowrap;
}

.machine-nav a.btn-primary:hover {
  filter: brightness(1.05);
  color: #0f1419;
}

.machine-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.machine-hero {
  padding: 3.25rem 0 2.25rem;
  text-align: center;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  margin-bottom: 1.85rem;
}

.hero-subtitle-accent {
  display: inline-block;
  font-size: clamp(1.15rem, 2.8vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
  padding: 0.45rem 1.1rem;
  border-radius: 8px;
  color: var(--accent);
  background: linear-gradient(135deg, rgba(232, 168, 56, 0.18), rgba(232, 168, 56, 0.06));
  border: 1px solid rgba(232, 168, 56, 0.45);
  box-shadow: 0 0 28px rgba(232, 168, 56, 0.12);
  letter-spacing: 0.01em;
}

.machine-hero .lead {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0.75rem auto 2.5rem;
  line-height: 2;
  letter-spacing: 0.01em;
}

.hero-cta-block {
  margin-top: 0.5rem;
  padding-top: 3.25rem;
  overflow: visible;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 0.75rem;
}

.hero-cta-primary-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-product-callout {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-55%);
  margin-bottom: 0.15rem;
  width: max-content;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.callout-text {
  font-family: "Marck Script", "Caveat", "Segoe Script", cursive;
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  font-weight: 700;
  display: block;
  color: var(--accent);
  opacity: 1;
  transform: rotate(-10deg);
  white-space: nowrap;
  line-height: 1.1;
  text-shadow: 0 1px 0 rgba(15, 20, 25, 0.35);
}

.callout-arrow {
  width: 88px;
  height: 48px;
  margin: 0.1rem 0 0 2rem;
  color: var(--accent);
  opacity: 0.95;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(232, 168, 56, 0.4));
}

.btn-hero-primary {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  border-radius: 8px;
  text-decoration: none;
  color: #0f1419;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--accent), #c47f20);
  box-shadow: 0 4px 20px rgba(232, 168, 56, 0.25);
  transition: filter 0.15s, transform 0.15s;
}

.btn-hero-glow {
  animation: heroGlow 2.8s ease-in-out infinite;
}

@keyframes heroGlow {
  0%, 100% {
    box-shadow: 0 0 18px rgba(232, 168, 56, 0.35), 0 4px 16px rgba(232, 168, 56, 0.2);
  }
  50% {
    box-shadow: 0 0 32px rgba(232, 168, 56, 0.55), 0 4px 24px rgba(232, 168, 56, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-hero-glow {
    animation: none;
    box-shadow: 0 0 22px rgba(232, 168, 56, 0.4), 0 4px 18px rgba(232, 168, 56, 0.25);
  }
}

.btn-hero-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-hero-secondary {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  transition: border-color 0.15s, color 0.15s;
}

.btn-hero-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 767px) {
  .machine-nav-inner {
    flex-wrap: wrap;
  }

  .machine-nav-links {
    width: 100%;
    margin-left: 0;
    justify-content: center;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
  }

  .machine-nav-links::-webkit-scrollbar {
    display: none;
  }

  .callout-text {
    transform: rotate(-8deg);
  }

  .hero-product-callout {
    transform: translateX(-50%);
  }

  .callout-arrow {
    margin-left: 1.5rem;
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: center;
  }

  .demo-header-bleed {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-left: 0;
  }

  .demo-how-callout--edge {
    max-width: 100%;
    padding: 0 0 0.35rem;
    align-items: center;
  }

  .callout-text--how {
    text-align: center;
    max-width: 14rem;
  }

  .callout-arrow--how {
    margin-left: auto;
    margin-right: auto;
  }

  .demo-header-controls {
    justify-content: center;
    width: 100%;
  }
}

.machine-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.machine-section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.machine-section .section-lead {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  max-width: 640px;
}

.machine-problem {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 0;
}

@media (max-width: 700px) {
  .machine-problem { grid-template-columns: 1fr; }
}

.machine-problem li {
  list-style: none;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.machine-problem strong {
  display: block;
  color: var(--accent);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.track-toggle,
.demo-mode-toggle {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.track-toggle button,
.demo-mode-toggle button {
  font-family: var(--font);
  font-size: 0.78rem;
  padding: 0.4rem 0.85rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.track-toggle button.active,
.demo-mode-toggle button.active {
  background: var(--bg-elevated);
  color: var(--accent);
  font-weight: 600;
}

.engine-flow {
  display: grid;
  grid-template-columns: 1fr auto 200px auto 1fr;
  gap: 0.5rem 0.75rem;
  align-items: center;
}

@media (max-width: 900px) {
  .engine-flow {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .flow-merge,
  .flow-merge-bottom { display: none; }
  .flow-hub { order: -1; }
}

.flow-track {
  opacity: 0.45;
  transition: opacity 0.25s;
}

.engine-flow.highlight-both .flow-track,
.engine-flow.highlight-b2b .flow-b2b,
.engine-flow.highlight-opt .flow-opt {
  opacity: 1;
}

.flow-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.flow-b2b .flow-label { color: var(--tier-b); }
.flow-opt .flow-label { color: var(--accent); }

.flow-nodes {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .flow-nodes { flex-direction: column; align-items: stretch; }
  .flow-connector { width: 100%; height: 24px; }
}

.flow-node {
  flex: 1;
  min-width: 100px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  text-align: center;
}

.flow-node-out {
  border-color: rgba(232, 168, 56, 0.35);
}

.node-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
}

.node-desc,
.node-metric {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.node-metric {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--accent);
  margin-top: 0.35rem;
}

.node-metric.loading {
  opacity: 0.4;
  animation: pulse 1.2s ease-in-out infinite;
}

.flow-connector {
  width: 36px;
  height: 2px;
  background: var(--border);
  position: relative;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .flow-connector {
    width: 2px;
    height: 28px;
    margin: 0 auto;
  }
}

.flow-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  animation: flowMove 1.8s ease-in-out infinite;
}

@media (max-width: 900px) {
  .flow-dot {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    animation: flowMoveV 1.8s ease-in-out infinite;
  }
}

.engine-flow.highlight-b2b .flow-b2b .flow-dot,
.engine-flow.highlight-both .flow-dot {
  animation-play-state: running;
}

.engine-flow.highlight-opt .flow-opt .flow-dot {
  animation-play-state: running;
}

@keyframes flowMove {
  0% { left: 0; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: calc(100% - 6px); opacity: 0; }
}

@keyframes flowMoveV {
  0% { top: 0; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: calc(100% - 6px); opacity: 0; }
}

.flow-hub-inner {
  background: var(--bg-elevated);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.15rem;
  text-align: center;
  box-shadow: 0 0 32px rgba(232, 168, 56, 0.1);
}

.hub-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.hub-link {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent);
  margin: 0.35rem 0 0.85rem;
  text-decoration: none;
}

.hub-link:hover { text-decoration: underline; }

.hub-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.hub-stat .value {
  font-family: var(--mono);
  font-size: 1.25rem;
  color: var(--accent);
  display: block;
}

.hub-stat .value.loading {
  opacity: 0.4;
  animation: pulse 1.2s ease-in-out infinite;
}

.hub-stat .label {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.stat-note {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.65rem;
}

.merge-svg {
  width: 28px;
  height: 48px;
  color: var(--accent);
}

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.demo-header-bleed {
  display: grid;
  grid-template-columns:
    [full-start] minmax(1rem, 1fr)
    [content-start] min(100%, 960px)
    [content-end] minmax(1rem, 1fr)
    [full-end];
  align-items: end;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-bottom: 1.25rem;
}

.demo-how-callout {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

.demo-how-callout--edge {
  grid-column: full-start / content-start;
  justify-self: end;
  align-self: end;
  padding-right: 1.25rem;
  padding-left: 1rem;
  max-width: 11rem;
}

.demo-header-controls {
  grid-column: content-start / content-end;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem;
}

.callout-text--how {
  font-family: "Marck Script", "Caveat", "Segoe Script", cursive;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 700;
  color: var(--accent);
  transform: rotate(-8deg);
  white-space: normal;
  max-width: 10rem;
  line-height: 1.12;
  text-align: right;
  text-shadow: 0 1px 0 rgba(15, 20, 25, 0.35);
}

.callout-arrow--how {
  width: 108px;
  height: 52px;
  margin: 0.2rem 0 0 0.25rem;
  color: var(--accent);
  opacity: 0.95;
  filter: drop-shadow(0 0 4px rgba(232, 168, 56, 0.4));
  flex-shrink: 0;
}

.demo-mode-pills {
  flex-shrink: 0;
}

.btn-run-wave-lg {
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
}

.btn-run-wave {
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #0f1419;
  background: linear-gradient(135deg, var(--accent), #c47f20);
  transition: filter 0.15s, opacity 0.15s;
}

.btn-run-wave:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn-run-wave:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-run-wave-real {
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  border: 1px dashed var(--border);
  transition: border-color 0.15s, color 0.15s;
}

.btn-run-wave-real:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.wave-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.wave-modal.hidden {
  display: none;
}

.wave-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.wave-modal-panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.wave-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem;
}

.wave-modal-close:hover {
  color: var(--text);
}

.wave-modal-panel h4 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.wave-modal-lead {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.45;
}

.wave-modal-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.wave-modal-input {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.9rem;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 0.75rem;
}

.wave-modal-input:focus {
  outline: none;
  border-color: var(--accent);
}

.wave-modal-input.shake {
  animation: inputShake 0.4s ease;
}

@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.wave-modal-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-bottom: 0.75rem;
}

.wave-modal-error.hidden {
  display: none;
}

.wave-modal-panel .btn-run-wave {
  width: 100%;
}

.demo-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.demo-step {
  flex: 1 1 100px;
  min-width: 90px;
  padding: 0.85rem 0.5rem;
  text-align: center;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.demo-step.active {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(232, 168, 56, 0.2);
  background: var(--accent-dim);
}

.demo-step.done {
  border-color: var(--tier-a);
  opacity: 0.85;
}

.demo-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  display: block;
}

.demo-title {
  font-size: 0.82rem;
  font-weight: 600;
  display: block;
  margin-top: 0.2rem;
}

.demo-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.65rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-muted);
}

.demo-step.active .demo-num {
  animation: pulse 0.8s ease-in-out infinite;
}

.machine-log {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.85;
  background: #0a0e12;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  min-height: 8rem;
  max-height: 20rem;
  overflow-y: auto;
  color: #a8b8c8;
  margin: 0;
}

.log-line {
  margin-bottom: 0.7rem;
  min-height: 1.35em;
}

.log-line-hint {
  color: var(--text-muted);
  font-style: italic;
}

.log-line-typing .log-text {
  color: #e8ecf1;
}

.log-cursor {
  display: inline-block;
  color: var(--accent);
  margin-left: 1px;
  animation: cursorBlink 0.55s step-end infinite;
  font-weight: 500;
}

@keyframes cursorBlink {
  50% { opacity: 0; }
}

.log-line-success {
  color: var(--tier-a);
  margin-top: 0.35rem;
}

.log-line-success .log-text {
  color: var(--tier-a);
}

.log-line-step {
  font-family: var(--font);
  font-weight: 600;
  color: var(--text);
  margin-top: 0.5rem;
}

.log-line-step:first-child {
  margin-top: 0;
}

.log-line-step .log-text {
  color: var(--text);
}

.demo-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.85rem;
  line-height: 1.5;
}

.demo-real-link {
  display: inline;
  margin-left: 0.35rem;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 1px dashed var(--border);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.demo-real-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

@keyframes pulse {
  50% { opacity: 0.65; }
}

.machine-footer {
  text-align: center;
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

.machine-footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.machine-footer code {
  font-family: var(--mono);
  font-size: 0.72rem;
  background: var(--bg-elevated);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* Mechanics doc page */
.mechanics-page .machine-wrap {
  max-width: 720px;
}

.doc-toc {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
}

.doc-toc ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  columns: 2;
  gap: 0.35rem 1.5rem;
}

@media (max-width: 500px) {
  .doc-toc ul { columns: 1; }
}

.doc-toc a {
  color: var(--tier-b);
  text-decoration: none;
}

.doc-toc a:hover { color: var(--accent); }

.doc-article {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.doc-article h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.doc-article h3 {
  font-size: 0.95rem;
  margin: 1.25rem 0 0.5rem;
}

.doc-article p,
.doc-article li {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

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

.doc-article ul { padding-left: 1.25rem; margin: 0.5rem 0; }

.doc-table-wrap { overflow-x: auto; margin: 1rem 0; }

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.doc-table th,
.doc-table td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
}

.doc-table th {
  background: var(--bg-panel);
  color: var(--text);
}

.doc-table code {
  font-family: var(--mono);
  font-size: 0.75rem;
}

.doc-arch-svg {
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 1rem 0;
  color: var(--text-muted);
}

.doc-pre {
  font-family: var(--mono);
  font-size: 0.75rem;
  background: #0a0e12;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  color: #a8b8c8;
  margin: 0.75rem 0;
}

.doc-warn td:first-child { color: var(--danger); }

.doc-source {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 1rem;
  background: var(--bg-panel);
  border-radius: var(--radius);
  margin-top: 2rem;
}

.doc-source code {
  font-family: var(--mono);
  font-size: 0.72rem;
  word-break: break-all;
}

/* Wave = internet research */
.wave-split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: stretch;
}

@media (max-width: 720px) {
  .wave-split {
    grid-template-columns: 1fr;
  }
  .wave-split-arrow {
    flex-direction: row;
    padding: 0.5rem 0;
  }
  .wave-split-arrow svg {
    transform: rotate(90deg);
  }
}

.wave-zone {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.wave-zone-internet {
  border-color: rgba(91, 156, 245, 0.45);
}

.wave-zone-repo {
  border-color: rgba(232, 168, 56, 0.35);
}

.wave-zone-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.65rem;
}

.wave-zone-internet .wave-zone-label {
  color: var(--tier-b);
  background: rgba(91, 156, 245, 0.12);
}

.wave-zone-repo .wave-zone-label {
  color: var(--accent);
  background: var(--accent-dim);
}

.wave-zone h4 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.wave-zone-dl {
  font-size: 0.85rem;
  display: grid;
  gap: 0.65rem;
}

.wave-zone-dl dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.wave-zone-dl dd {
  margin: 0;
  line-height: 1.45;
  color: var(--text);
}

.wave-split-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  text-align: center;
  max-width: 100px;
  line-height: 1.35;
}

.research-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding: 0.55rem 1rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.research-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.research-toggle.is-open {
  border-style: solid;
  border-color: rgba(232, 168, 56, 0.45);
}

.research-toggle-icon {
  font-size: 0.65rem;
  opacity: 0.75;
}

.research-panel {
  margin-top: 1rem;
  padding-top: 0.5rem;
}

.channels-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.channel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.channel-chip {
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
}

.research-table-wrap {
  overflow-x: auto;
}

.research-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.research-table th,
.research-table td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.research-table th {
  background: var(--bg-panel);
  color: var(--text);
  font-weight: 600;
}

.research-table .log-path {
  font-family: var(--mono);
  font-size: 0.68rem;
  word-break: break-all;
  color: var(--tier-b);
}

.step-zone-legend {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.legend-internet {
  color: var(--tier-b);
  font-weight: 600;
}

.legend-repo {
  color: var(--accent);
  font-weight: 600;
}

.demo-step-internet {
  border-top: 2px solid rgba(91, 156, 245, 0.5);
}

.demo-step-repo {
  border-top: 2px solid rgba(232, 168, 56, 0.5);
}
