/* ═══════════════════════════════════════════════════
   Refract — Scroll-Driven Product Page Prototype
   ═══════════════════════════════════════════════════ */

/* ── Trace Palette ── */
:root {
  --trace-red:     rgba(235, 97, 92, 0.8);
  --trace-orange:  rgba(245, 140, 77, 0.8);
  --trace-amber:   rgba(242, 191, 82, 0.8);
  --trace-lime:    rgba(184, 224, 77, 0.8);
  --trace-green:   rgba(77, 209, 115, 0.8);
  --trace-emerald: rgba(51, 191, 140, 0.8);
  --trace-teal:    rgba(56, 199, 173, 0.8);
  --trace-cyan:    rgba(71, 199, 235, 0.8);
  --trace-azure:   rgba(77, 166, 242, 0.8);
  --trace-blue:    rgba(82, 133, 242, 0.8);
  --trace-indigo:  rgba(107, 115, 224, 0.8);
  --trace-slate:   rgba(97, 107, 166, 0.8);
  --trace-violet:  rgba(158, 115, 230, 0.8);
  --trace-purple:  rgba(199, 107, 217, 0.8);
  --trace-magenta: rgba(230, 97, 184, 0.8);
  --trace-rose:    rgba(242, 115, 140, 0.8);
  --trace-pink:    rgba(242, 140, 166, 0.8);
  --trace-salmon:  rgba(242, 153, 128, 0.8);

  --proto-bg: #141414;
  --proto-surface: #1c1c1e;
  --proto-sidebar-bg: #1a1a1a;
  --proto-plot-bg: #1e1e20;
  --proto-border: rgba(255, 255, 255, 0.06);
  --proto-border-strong: rgba(255, 255, 255, 0.1);
  --proto-text: #f5f5f7;
  --proto-text-muted: #a1a1a6;
  --proto-text-dim: #6e6e73;
  --proto-accent: #5b7a9a;
  --proto-accent-soft: rgba(91, 122, 154, 0.15);
}

/* ── Page ── */
.proto-page {
  background: var(--proto-bg);
  color: var(--proto-text);
  overflow-x: hidden;
}
.proto-page .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* ── Stage Container (creates sticky context) ── */
.proto-stage-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

/* ── App Stage ── */
.proto-app-stage {
  position: relative;
  width: min(920px, 85vw);
  pointer-events: none;
}

/* ── Oscilloscope Backdrop ── */
.proto-scope-backdrop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Match navbar content area: 980px - 3rem padding, then widen by
     housing inset (x=6 in viewBox 800 = 0.75% each side → ×800/788) */
  width: min(calc((980px - 3rem) * 800 / 788), calc((100vw - 3rem) * 800 / 788));
  z-index: 25;
  opacity: 0;
  /* Positioning context for the logo */
}
.proto-scope-backdrop::before {
  /* Force aspect ratio to match SVG viewBox 800x580 */
  content: '';
  display: block;
  padding-top: calc(580 / 800 * 100%);
}
.proto-scope-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
/* Grid visibility */
.scope-grid {
  opacity: 0.18;
}
/* Wave draw-on + scroll */
.scope-wave {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
}
.scope-wave.is-drawn {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.scope-wave-1.is-drawn { transition-delay: 0s; }
.scope-wave-2.is-drawn { transition-delay: 0.3s; }
.scope-wave-3.is-drawn { transition-delay: 0.5s; }
/* Continuous drift — translateX matches wave period (200) for seamless loop */
.scope-wave.is-scrolling {
  animation: scope-drift 4s linear infinite;
}
.scope-wave-2.is-scrolling {
  animation-duration: 5.5s;
  animation-direction: reverse;
}
.scope-wave-3.is-scrolling {
  animation-duration: 7s;
}
@keyframes scope-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-200px); }
}
/* Glow */
.scope-wave-1 { filter: drop-shadow(0 0 6px var(--trace-cyan)); }
.scope-wave-2 { filter: drop-shadow(0 0 4px var(--trace-violet)); }
.scope-wave-3 { filter: drop-shadow(0 0 3px var(--trace-amber)); }

/* ── Logo (positioned inside the oscilloscope backdrop) ── */
.proto-logo {
  position: absolute;
  /* Center in housing top panel: between inner bevel y=14 and bezel y=90 in viewBox 580 */
  top: calc(14 / 580 * 100%);
  left: 50%;
  height: calc((90 - 14) / 580 * 100%);
  transform: translateX(-50%);
  transform-origin: center center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  z-index: 30;
  opacity: 0;
}
.proto-logo-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.proto-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: none;
}
.proto-logo-text {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--proto-text-muted);
  white-space: nowrap;
  transition: none;
}
.proto-logo-extras {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: 2px;
  opacity: 1;
  transition: opacity 0.4s ease;
}
.proto-logo-subtitle {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--proto-text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
}

/* ── App Frame ── */
.proto-app-frame {
  border-radius: 12px;
  border: 1px solid var(--proto-border-strong);
  background: var(--proto-surface);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  opacity: 0;
  transform: scale(0.95);
  transform-origin: center center;
  transition: opacity 0.01s linear, transform 0.01s linear;
}

/* ── Titlebar ── */
.proto-titlebar {
  height: 38px;
  background: #2a2a2c;
  border-bottom: 1px solid var(--proto-border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  position: relative;
}
.proto-traffic-lights {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tl {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3a3a3c;
}
.tl-close { background: #ff5f57; }
.tl-minimize { background: #febc2e; }
.tl-zoom { background: #28c840; }

.proto-titlebar-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--proto-text-muted);
  font-weight: 400;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.proto-titlebar-logo img {
  border-radius: 3px;
}

.proto-toolbar-buttons {
  margin-left: auto;
  display: flex;
  gap: 4px;
  align-items: center;
}
.proto-tb-btn {
  width: 28px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--proto-text-muted);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.proto-tb-btn.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--proto-accent);
}

/* ── App Body ── */
.proto-app-body {
  display: flex;
  height: 440px;
}

/* ── Sidebar ── */
.proto-sidebar {
  width: 200px;
  min-width: 200px;
  background: var(--proto-sidebar-bg);
  border-right: 1px solid var(--proto-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.proto-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--proto-text);
  letter-spacing: -0.01em;
}
.proto-sidebar-plus {
  font-size: 1.1rem;
  color: var(--proto-text-muted);
  font-weight: 400;
  cursor: default;
}

.proto-source-group {
  padding: 0 0 4px;
}
.proto-source-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 12px 3px 8px;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", monospace;
  font-size: 0.6875rem;
  color: var(--proto-text);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.proto-source-item.is-visible {
  opacity: 1;
  transform: translateX(0);
}
.proto-source-chevron {
  font-size: 0.5rem;
  color: var(--proto-text-dim);
  width: 10px;
  display: inline-flex;
  justify-content: center;
}
.proto-source-icon {
  color: var(--proto-text-dim);
  flex-shrink: 0;
}
.proto-source-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proto-source-status {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 1px 12px 3px 28px;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", monospace;
  font-size: 0.5625rem;
  color: #28c840;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.proto-source-status.is-visible {
  opacity: 1;
  transform: translateX(0);
}
.proto-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #28c840;
  flex-shrink: 0;
}

.proto-source-traces {
  padding: 0 12px 2px 28px;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.proto-source-traces.is-visible {
  opacity: 1;
  transform: translateX(0);
}
.proto-trace-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 1px 0;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", monospace;
  font-size: 0.625rem;
  color: var(--proto-text-muted);
}
.proto-trace-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot-color);
  flex-shrink: 0;
}

.proto-sidebar-footer {
  margin-top: auto;
  padding: 6px 12px;
  font-size: 0.625rem;
  color: var(--proto-text-dim);
  border-top: 1px solid var(--proto-border);
}
.proto-sidebar-footer span {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.proto-sidebar-footer span.is-visible {
  opacity: 1;
}

/* ── Main Area ── */
.proto-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── Ruler ── */
.proto-ruler {
  height: 40px;
  background: var(--proto-surface);
  border-bottom: 1px solid var(--proto-border);
  overflow: hidden;
  display: flex;
}
.proto-ruler-spacer {
  width: 151px; /* track-header(100) + y-axis(50) + border(1) */
  min-width: 151px;
  border-right: 1px solid var(--proto-border);
}
.proto-ruler-track {
  flex: 1;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.proto-ruler-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.ruler-ticks {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.ruler-ticks.is-visible {
  opacity: 1;
}

/* ── Tracks ── */
.proto-tracks {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.proto-track {
  flex: 1;
  display: flex;
  border-bottom: 1px solid var(--proto-border);
  opacity: 0;
  transition: opacity 0.6s ease;
  overflow: visible;
  position: relative;
}
.proto-track.is-visible {
  opacity: 1;
}

/* ── Track Header ── */
.proto-track-header {
  width: 100px;
  min-width: 100px;
  padding: 8px 6px;
  background: var(--proto-surface);
  border-right: 1px solid var(--proto-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}
.proto-track-title {
  display: flex;
  align-items: center;
  gap: 6px;
}
.proto-track-bar {
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: var(--bar-color);
  flex-shrink: 0;
}
.proto-track-name {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--proto-text);
}
.proto-track-items {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-left: 10px;
}
.proto-track-plot-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", monospace;
  font-size: 0.5625rem;
  color: var(--proto-text-muted);
}
.proto-track-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot-color);
  flex-shrink: 0;
}

/* ── Y Axis ── */
.proto-yaxis {
  width: 50px;
  min-width: 50px;
  background: var(--proto-surface);
  border-right: 1px solid var(--proto-border);
}
.proto-yaxis svg {
  width: 100%;
  height: 100%;
}

/* ── Plot Area ── */
.proto-plot {
  flex: 1;
  position: relative;
  background: var(--proto-plot-bg);
  overflow: visible;
}
.proto-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.proto-traces {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── Trace line draw-on ── */
.trace-line {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.trace-line.is-drawn {
  stroke-dashoffset: 0;
}

/* ── Streaming animation ── */
.proto-stream-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
/* Plot in track 2 needs clipping for stream scroll animation */
#plot2 {
  overflow: hidden;
}
/* Static traces — clipped during streaming/transforms, transform driven by JS */
#plot1.is-clipped {
  overflow: hidden;
}
.proto-stream-traces {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.proto-stream-traces.is-streaming {
  opacity: 1;
  animation: stream-scroll 4s linear infinite;
}
@keyframes stream-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Crosshair ── */
.proto-crosshair {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.proto-crosshair.is-visible {
  opacity: 1;
}
.crosshair-v {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 1px dashed rgba(255, 255, 255, 0.4);
  left: 48%;
  transition: left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.crosshair-h {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  border-top: 1px dashed rgba(255, 255, 255, 0.4);
  top: 35%;
  transition: top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.crosshair-snap-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot-color);
  border: 1.5px solid #fff;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.3s ease;
}
.crosshair-snap-dot.is-visible {
  opacity: 1;
}
.crosshair-tooltip {
  position: absolute;
  background: rgba(40, 40, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease, left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  left: 50%;
  top: 10%;
}
.crosshair-tooltip.is-visible {
  opacity: 1;
}
.tooltip-row {
  margin-bottom: 4px;
}
.tooltip-row:last-child {
  margin-bottom: 0;
}
.tooltip-name {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", monospace;
  font-size: 0.625rem;
  font-weight: 600;
}
.tooltip-val {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", monospace;
  font-size: 0.5625rem;
  color: var(--proto-text-muted);
}

/* ── Box Zoom ── */
.proto-box-zoom {
  position: absolute;
  border: 1.5px solid var(--proto-accent);
  background: var(--proto-accent-soft);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.3s ease,
              width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              height 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  top: 20%;
  left: 30%;
  width: 0;
  height: 0;
}
.proto-box-zoom.is-visible {
  opacity: 1;
  width: 35%;
  height: 50%;
}

/* ── Footer Bar ── */
.proto-footer-bar {
  height: 24px;
  background: var(--proto-surface);
  border-top: 1px solid var(--proto-border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.625rem;
  color: var(--proto-text-dim);
  font-family: ui-monospace, "SF Mono", "Cascadia Code", monospace;
}

/* ── Config Sheet Overlay ── */
.proto-config-sheet {
  position: absolute;
  inset: 38px 0 0 0; /* below titlebar */
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proto-config-sheet.is-visible {
  opacity: 1;
}

.proto-config-inner {
  width: 88%;
  max-width: 560px;
  background: var(--proto-surface);
  border: 1px solid var(--proto-border-strong);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  display: flex;
  overflow: hidden;
  max-height: 380px;
  transform: translateY(20px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.proto-config-sheet.is-visible .proto-config-inner {
  transform: translateY(0);
}

.proto-config-presets {
  width: 150px;
  min-width: 150px;
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid var(--proto-border);
  padding: 12px 0;
}
.proto-config-presets-header {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--proto-text-dim);
  letter-spacing: 0.08em;
  padding: 0 12px 8px;
}
.proto-config-preset-item {
  padding: 5px 12px;
  font-size: 0.75rem;
  color: var(--proto-text-muted);
  cursor: default;
}
.proto-config-preset-item.active {
  background: var(--proto-accent-soft);
  color: var(--proto-text);
}
.proto-config-divider {
  width: 1px;
  background: var(--proto-border);
}
.proto-config-content {
  flex: 1;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.proto-config-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.proto-config-field label {
  font-size: 0.6875rem;
  color: var(--proto-text-dim);
  font-weight: 500;
}
.proto-config-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--proto-border);
  border-radius: 6px;
  padding: 5px 8px;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", monospace;
  font-size: 0.75rem;
  color: var(--proto-text);
}
.proto-config-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--proto-text-dim);
  letter-spacing: 0.06em;
  padding-top: 4px;
}
.proto-config-tiles {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.proto-config-tile {
  padding: 4px 10px;
  font-size: 0.6875rem;
  color: var(--proto-text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--proto-border);
  border-radius: 6px;
  cursor: default;
}
.proto-config-tile.active {
  background: var(--proto-accent-soft);
  border-color: var(--proto-accent);
  color: var(--proto-text);
}
.proto-config-bottom-bar {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--proto-border);
}
.proto-config-btn {
  padding: 5px 14px;
  font-size: 0.75rem;
  border-radius: 6px;
  cursor: default;
}
.proto-config-btn.secondary {
  color: var(--proto-text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--proto-border);
}
.proto-config-btn.primary {
  color: #fff;
  background: var(--proto-accent);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════
   SCROLL SECTIONS (Layer B)
   ═══════════════════════════════════════════════════ */
.proto-scroll-track {
  position: relative;
  z-index: 20;
  pointer-events: none;
}
.proto-section {
  position: relative;
}
.proto-section-text {
  position: sticky;
  top: 50%;
  transform: translateY(-50%);
  max-width: 320px;
  padding: 24px;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.proto-section-text.is-visible {
  opacity: 1;
}

/* Side positioning */
.proto-section-text.text-right {
  margin-left: auto;
  margin-right: 32px;
  transform: translateY(-50%) translateX(20px);
}
.proto-section-text.text-right.is-visible {
  transform: translateY(-50%) translateX(0);
}
.proto-section-text.text-left {
  margin-left: 32px;
  margin-right: auto;
  transform: translateY(-50%) translateX(-20px);
}
.proto-section-text.text-left.is-visible {
  transform: translateY(-50%) translateX(0);
}
.proto-section-text.text-center {
  margin: 0 auto;
  text-align: center;
  transform: translateY(-50%) translateY(20px);
}
.proto-section-text.text-center.is-visible {
  transform: translateY(-50%) translateY(0);
}

/* ── Section Typography ── */
.proto-section-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--proto-accent);
  margin-bottom: 8px;
}
.proto-section-text h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 200;
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--proto-text);
}
.proto-section-copy {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--proto-text-muted);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.proto-format-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.proto-format-list li {
  padding: 4px 10px;
  font-size: 0.75rem;
  color: var(--proto-text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--proto-border);
  border-radius: 6px;
}

/* ── CTA Section Card — matches config sheet (.proto-config-inner) ── */
.proto-section-text.text-center {
  background: var(--proto-surface);
  border: 1px solid var(--proto-border-strong);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  padding: 40px 48px;
  width: 88%;
  max-width: 560px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Shift down to align with config sheet (which is centered below 38px titlebar) */
  top: calc(50% + 19px);
}

/* ── CTA Badge ── */
.proto-cta-badge {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--proto-text-muted);
  background: rgba(61, 81, 102, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 980px;
  letter-spacing: -0.01em;
}

/* ── Footer ── */
.proto-page .site-footer {
  position: relative;
  z-index: 20;
}

/* ═══════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .proto-scope-backdrop,
  .scope-wave,
  .proto-logo,
  .proto-app-frame,
  .proto-source-item,
  .proto-source-traces,
  .proto-source-status,
  .proto-track,
  .trace-line,
  .proto-stream-traces,
  .proto-crosshair,
  .crosshair-v,
  .crosshair-h,
  .crosshair-snap-dot,
  .crosshair-tooltip,
  .proto-box-zoom,
  .proto-config-sheet,
  .proto-config-inner,
  .proto-section-text,
  .proto-sidebar-footer span,
  .ruler-ticks,
  .proto-titlebar-logo,
  .proto-tb-btn,
  .site-header {
    transition: none !important;
    animation: none !important;
  }
  /* Show everything */
  .proto-logo,
  .proto-app-frame,
  .proto-source-item,
  .proto-source-traces,
  .proto-source-status,
  .proto-track,
  .proto-crosshair,
  .proto-section-text,
  .proto-sidebar-footer span,
  .ruler-ticks,
  .proto-titlebar-logo,
  .proto-tb-btn,
  .site-header {
    opacity: 1 !important;
    transform: none !important;
  }
  .trace-line {
    stroke-dashoffset: 0 !important;
  }
  .proto-stream-traces {
    opacity: 1 !important;
  }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .proto-section-text {
    max-width: 280px;
  }
}
@media (max-width: 900px) {
  .proto-app-stage {
    width: 90vw;
    transform: scale(0.85);
  }
  .proto-section-text {
    max-width: 240px;
    font-size: 0.875rem;
  }
  .proto-sidebar {
    width: 160px;
    min-width: 160px;
  }
}
@media (max-width: 600px) {
  .proto-app-stage {
    transform: scale(0.7);
  }
  .proto-section-text.text-right,
  .proto-section-text.text-left {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    max-width: 90vw;
  }
}
