:root {
  --paper: #f3f0e8;
  --ink: #171717;
  --violet: #6558f5;
  --violet-dark: #27204d;
  --lime: #d9ff57;
  --white: #fffef9;
  --line: rgba(23, 23, 23, 0.18);
  --radius: 1.35rem;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.5rem;
  padding: 1rem clamp(1.25rem, 4vw, 4.5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 232, 0.9);
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 0.7rem; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.12em; }

.brand-mark { display: grid; width: 2rem; aspect-ratio: 1; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font-size: 0.75rem; }

.header-actions { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.75rem); }
.language-switch { display: flex; padding: 0.2rem; border: 1px solid var(--ink); border-radius: 999px; }
.language-switch button { min-width: 2rem; border: 0; border-radius: 999px; padding: 0.45rem 0.55rem; background: transparent; color: var(--ink); font: inherit; font-size: 0.65rem; font-weight: 800; cursor: pointer; }
.language-switch button[aria-pressed="true"] { background: var(--ink); color: var(--white); }

nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; }

.nav-cta { padding: 0.9rem 1.15rem; border-radius: 999px; background: var(--ink); color: var(--white); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(30rem, 1.08fr);
  min-height: calc(100vh - 5.5rem);
  border-bottom: 1px solid var(--line);
}

.hero-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(3.5rem, 7vw, 8rem) clamp(1.25rem, 5vw, 6rem); }

.eyebrow { margin: 0 0 2rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }

.live-dot { display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.45rem; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 5px rgba(101, 88, 245, 0.13); }

h1, h2, h3, p { margin-top: 0; }

h1 { margin-bottom: 2.25rem; font-size: clamp(4.2rem, 8.6vw, 9.5rem); line-height: 0.8; letter-spacing: -0.085em; font-weight: 900; }
h1 span, h2 span { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }

.hero-summary { max-width: 31rem; margin-bottom: 2.25rem; font-size: clamp(1rem, 1.35vw, 1.25rem); line-height: 1.55; }

.primary-action { display: inline-flex; align-items: center; gap: 2.5rem; padding: 1.15rem 1.35rem; background: var(--violet); color: var(--white); border-radius: 999px; font-size: 0.85rem; font-weight: 800; text-transform: uppercase; transition: transform 180ms ease, background 180ms ease; }
.primary-action:hover { transform: translateY(-3px); background: #5146d6; }

.system-status { display: flex; align-items: center; gap: 0.55rem; margin-top: 2.2rem; color: rgba(23,23,23,0.55); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }
.system-status span { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #9b9b9b; }
.system-status.is-online span { background: #31a657; box-shadow: 0 0 0 4px rgba(49,166,87,0.12); }

.hero-stage { position: relative; min-height: 42rem; overflow: hidden; isolation: isolate; background: var(--violet-dark); }
.hero-stage::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px); background-size: 4.5rem 4.5rem; mask-image: linear-gradient(to bottom, black, transparent 90%); }

.orb { position: absolute; border-radius: 50%; filter: blur(1px); }
.orb-one { top: 8%; right: 8%; width: min(28vw, 25rem); aspect-ratio: 1; background: radial-gradient(circle at 35% 30%, #fff 0 2%, #d9ff57 15%, #6558f5 58%, transparent 70%); opacity: 0.9; animation: drift 8s ease-in-out infinite; }
.orb-two { bottom: 4%; left: 4%; width: 14rem; aspect-ratio: 1; background: radial-gradient(circle at 45% 40%, #ffd3e1, #ff6cb2 38%, transparent 69%); opacity: 0.72; animation: drift 10s ease-in-out -3s infinite reverse; }

.flow-card { position: absolute; z-index: 2; border-radius: var(--radius); box-shadow: 0 1.5rem 4rem rgba(0,0,0,0.22); }
.flow-card-main { top: 15%; left: 8%; width: min(29rem, 62%); min-height: 23rem; padding: 1.5rem; background: var(--white); transform: translate3d(var(--card-x, 0), var(--card-y, 0), 0) rotate(-3deg); transition: transform 500ms cubic-bezier(.2,.8,.2,1); }
.card-topline { display: flex; justify-content: space-between; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.09em; }
.play-mark { display: grid; width: 6rem; aspect-ratio: 1; margin: 4rem auto 3rem; place-items: center; border-radius: 50%; background: var(--lime); font-size: 1.4rem; }
.flow-card-main p { max-width: 18rem; margin-bottom: 0; line-height: 1.4; font-weight: 700; }
.flow-card-score { right: 6%; bottom: 13%; width: min(19rem, 42%); padding: 1.5rem; background: var(--lime); transform: translate3d(var(--score-x, 0), var(--score-y, 0), 0) rotate(4deg); transition: transform 650ms cubic-bezier(.2,.8,.2,1); }
.card-label { display: block; margin-bottom: 2.4rem; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.12em; }
.flow-card-score strong { display: block; font-size: clamp(3.2rem, 6vw, 6.5rem); line-height: 0.8; letter-spacing: -0.08em; }
.flow-card-score strong span { font-size: 0.45em; }
.flow-card-score strong span.of { font-size: 0.34em; letter-spacing: -0.02em; }
.flow-card-score p, .flow-card-export p { margin: 1rem 0 0; font-size: 0.78rem; font-weight: 700; }
.flow-card-export { top: 8%; right: 4%; width: min(15rem, 34%); padding: 1.35rem; background: var(--violet); color: var(--white); transform: translate3d(var(--export-x, 0), var(--export-y, 0), 0) rotate(5deg); transition: transform 400ms cubic-bezier(.2,.8,.2,1); }
.flow-card-export strong { display: block; font-size: 1.7rem; letter-spacing: -0.04em; }

.method { padding: clamp(5rem, 10vw, 10rem) clamp(1.25rem, 4vw, 4.5rem); }
.section-heading { display: grid; grid-template-columns: 1fr 2fr; align-items: start; margin-bottom: 4rem; }
h2 { margin-bottom: 0; font-size: clamp(3.5rem, 7vw, 7.8rem); line-height: 0.87; letter-spacing: -0.075em; }
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.method-grid article { min-height: 23rem; padding: 1.5rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.method-grid article > span { font-size: 0.75rem; font-weight: 800; }
.method-grid h3 { margin-top: 8rem; margin-bottom: 1.25rem; font-size: clamp(1.8rem, 2.5vw, 3rem); letter-spacing: -0.06em; }
.method-grid p { margin-bottom: 0; line-height: 1.5; }
.accent-card { background: var(--violet); color: var(--white); }

.processing-section { padding: clamp(5rem, 9vw, 9rem) clamp(1.25rem, 4vw, 4.5rem); background: #d8ff57; color: var(--ink); }
.processing-heading { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.7fr); gap: 3rem; align-items: end; margin-bottom: 4rem; }
.processing-heading h2 span { -webkit-text-stroke-color: var(--ink); }
.processing-intro { max-width: 34rem; justify-self: end; }
.processing-intro p { margin-bottom: 1.7rem; font-size: 1.05rem; line-height: 1.6; }
.demo-trigger { display: inline-flex; align-items: center; gap: 2rem; border: 0; border-radius: 999px; padding: 1rem 1.25rem; background: var(--ink); color: var(--white); font: inherit; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.demo-trigger:hover { transform: translateY(-2px); }

.processing-console { overflow: hidden; border-radius: 1.5rem; background: #151515; color: var(--white); box-shadow: 0 2rem 5rem rgba(23,23,23,0.2); }
.console-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid rgba(255,255,255,0.15); }
.console-title { display: flex; align-items: center; gap: 0.65rem; font-size: 0.66rem; letter-spacing: 0.09em; }
.console-live-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(217,255,87,0.12); }
.processing-console.is-running .console-live-dot { animation: pulse 1.1s ease-in-out infinite; }
.demo-badge { padding: 0.5rem 0.7rem; border: 1px solid rgba(255,255,255,0.24); border-radius: 999px; color: rgba(255,255,255,0.6); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.1em; }
.process-progress { padding: 1.25rem 1.4rem; border-bottom: 1px solid rgba(255,255,255,0.15); }
.process-progress-meta { display: flex; justify-content: space-between; margin-bottom: 0.75rem; font-size: 0.72rem; }
.process-progress-meta span { color: rgba(255,255,255,0.62); }
.process-progress-track { height: 0.35rem; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,0.12); }
.process-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--lime)); transition: width 650ms cubic-bezier(.2,.8,.2,1); }

.console-grid { display: grid; grid-template-columns: 0.8fr 1fr 1.15fr; min-height: 34rem; }
.source-monitor, .pipeline-list, .extraction-panel { min-width: 0; padding: 1.4rem; }
.source-monitor, .pipeline-list { border-right: 1px solid rgba(255,255,255,0.15); }
.monitor-screen { position: relative; display: flex; min-height: 24rem; overflow: hidden; flex-direction: column; justify-content: space-between; padding: 1rem; border-radius: 1rem; background: radial-gradient(circle at 50% 45%, rgba(101,88,245,0.42), transparent 28%), linear-gradient(145deg, #312a63, #17152e 70%); }
.monitor-screen::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px); background-size: 2.2rem 2.2rem; }
.scan-line { position: absolute; z-index: 2; top: 0; left: 0; right: 0; height: 2px; opacity: 0; background: var(--lime); box-shadow: 0 0 1.5rem var(--lime); }
.processing-console.is-running .scan-line { opacity: 1; animation: scan 2.2s linear infinite; }
.monitor-tag, .monitor-caption { position: relative; z-index: 3; }
.monitor-tag { align-self: flex-start; padding: 0.45rem 0.55rem; border-radius: 999px; background: rgba(0,0,0,0.35); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.1em; }

/* Motion preview: the interface redraws validated joint angles on a side view. */
.motion-preview { position: relative; z-index: 1; display: flex; min-height: 0; flex: 1; flex-direction: column; margin: 0.35rem 0 0.2rem; }
#motion-canvas { width: 100%; min-height: 0; flex: 1; overflow: visible; }
.motion-floor { stroke: rgba(255,255,255,0.22); stroke-width: 1; }
.motion-pedestal { fill: rgba(255,255,255,0.1); stroke: rgba(255,255,255,0.28); }
.motion-trail-full { fill: none; stroke: rgba(255,255,255,0.2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 3 4; }
.motion-trail-live { fill: none; stroke: rgba(217,255,87,0.75); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.motion-waypoint-dot { fill: rgba(255,255,255,0.4); }
.motion-waypoint-dot.is-current { fill: var(--lime); }
.motion-link { stroke: var(--white); stroke-width: 7; stroke-linecap: round; }
.motion-link-shadow { stroke: rgba(101,88,245,0.55); stroke-width: 12; stroke-linecap: round; }
.motion-joint { fill: #17152e; stroke: var(--lime); stroke-width: 2; }
.motion-gripper { stroke: var(--lime); stroke-width: 3.5; stroke-linecap: round; fill: none; }
.motion-dial-ring { fill: rgba(0,0,0,0.28); stroke: rgba(255,255,255,0.3); stroke-width: 1; }
.motion-dial-needle { stroke: var(--lime); stroke-width: 2; stroke-linecap: round; }
.motion-dial-label { fill: rgba(255,255,255,0.55); font-size: 7px; font-weight: 700; letter-spacing: 0.06em; text-anchor: middle; }
.motion-dial-value { fill: var(--white); font-size: 7.5px; font-weight: 800; text-anchor: middle; }
.motion-preview.is-idle .motion-link, .motion-preview.is-idle .motion-link-shadow, .motion-preview.is-idle .motion-joint, .motion-preview.is-idle .motion-gripper { opacity: 0.35; }
.motion-preview.is-idle .motion-waypoint-dot, .motion-preview.is-idle .motion-trail-full, .motion-preview.is-idle .motion-trail-live, .motion-preview.is-idle .motion-dial-ring, .motion-preview.is-idle .motion-dial-needle, .motion-preview.is-idle .motion-dial-value, .motion-preview.is-idle .motion-dial-label { display: none; }
.motion-legend { margin: 0.55rem 0 0; color: rgba(255,255,255,0.42); font-size: 0.58rem; line-height: 1.45; }
.motion-controls { position: relative; z-index: 3; display: flex; align-items: center; gap: 0.7rem; margin-top: 0.85rem; }
.motion-play { display: grid; width: 2.2rem; height: 2.2rem; flex: none; place-items: center; border: 1px solid rgba(255,255,255,0.28); border-radius: 50%; background: transparent; color: var(--white); font: inherit; font-size: 0.7rem; cursor: pointer; }
.motion-play:hover:not(:disabled) { border-color: var(--lime); color: var(--lime); }
.motion-play[aria-pressed="true"] { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.motion-play:disabled { opacity: 0.4; cursor: not-allowed; }
.motion-track { position: relative; min-width: 0; flex: 1; }
#motion-scrubber { width: 100%; height: 1rem; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
#motion-scrubber:disabled { cursor: not-allowed; opacity: 0.45; }
#motion-scrubber::-webkit-slider-runnable-track { height: 0.3rem; border-radius: 999px; background: rgba(255,255,255,0.18); }
#motion-scrubber::-moz-range-track { height: 0.3rem; border-radius: 999px; background: rgba(255,255,255,0.18); }
#motion-scrubber::-webkit-slider-thumb { width: 0.85rem; height: 0.85rem; margin-top: -0.28rem; border: 0; border-radius: 50%; background: var(--lime); -webkit-appearance: none; appearance: none; }
#motion-scrubber::-moz-range-thumb { width: 0.85rem; height: 0.85rem; border: 0; border-radius: 50%; background: var(--lime); }
.motion-ticks { position: relative; height: 0.85rem; }
.motion-ticks button { position: absolute; top: 0; width: 1.1rem; height: 0.85rem; padding: 0; transform: translateX(-50%); border: 0; background: transparent; cursor: pointer; }
.motion-ticks button::before { content: ""; display: block; width: 2px; height: 0.4rem; margin: 0 auto; border-radius: 999px; background: rgba(255,255,255,0.3); }
.motion-ticks button:hover::before, .motion-ticks button.is-current::before { height: 0.6rem; background: var(--lime); }
.motion-clock { flex: none; min-width: 3.1rem; color: var(--white); font-size: 0.68rem; font-variant-numeric: tabular-nums; text-align: right; }
.motion-readout { display: flex; justify-content: space-between; gap: 0.8rem; margin: 0.5rem 0 0; color: rgba(255,255,255,0.72); font-size: 0.66rem; }
.motion-readout span:last-child { color: rgba(255,255,255,0.5); white-space: nowrap; }
.monitor-caption { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.7rem; }
.monitor-caption span { max-width: 15rem; }
.signal-row { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; color: rgba(255,255,255,0.5); font-size: 0.62rem; }
.signal-row span:first-child { color: var(--white); }
.signal-row i { display: inline-block; width: 0.4rem; height: 0.4rem; margin-right: 0.35rem; border-radius: 50%; background: var(--lime); }

.pipeline-list { margin: 0; list-style: none; }
.pipeline-list li { display: grid; grid-template-columns: 2rem 1fr auto; gap: 0.85rem; align-items: start; padding: 1.15rem 0; border-bottom: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.38); transition: color 250ms ease, transform 250ms ease; }
.pipeline-list li.is-active { color: var(--white); transform: translateX(0.35rem); }
.pipeline-list li.is-complete { color: rgba(255,255,255,0.7); }
.stage-index { display: grid; width: 1.8rem; aspect-ratio: 1; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 0.58rem; font-weight: 800; }
.pipeline-list li.is-active .stage-index { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.pipeline-list li.is-complete .stage-index { border-color: var(--violet); background: var(--violet); color: var(--white); }
.pipeline-list b { display: block; margin-bottom: 0.4rem; font-size: 0.8rem; }
.pipeline-list small { display: block; line-height: 1.4; }
.stage-state { align-self: center; font-size: 0.52rem; font-weight: 800; letter-spacing: 0.08em; }
.pipeline-list li.is-active .stage-state { color: var(--lime); }

.extraction-panel { display: flex; flex-direction: column; }
.panel-label { display: flex; justify-content: space-between; color: rgba(255,255,255,0.5); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.09em; }
.extraction-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 1.2rem; }
.extraction-metrics article { padding: 1rem; border-radius: 0.8rem; background: rgba(255,255,255,0.065); }
.extraction-metrics span { display: block; color: rgba(255,255,255,0.45); font-size: 0.6rem; text-transform: uppercase; }
.extraction-metrics strong { display: block; margin-top: 0.65rem; font-size: 2rem; letter-spacing: -0.05em; }
.process-log { height: 9rem; overflow: hidden; margin-top: 1rem; padding: 0.75rem; border: 1px solid rgba(255,255,255,0.12); border-radius: 0.8rem; background: #0d0d0d; font-family: Consolas, monospace; }
.process-log p { display: grid; grid-template-columns: 2.6rem 1fr; gap: 0.6rem; margin: 0 0 0.55rem; font-size: 0.59rem; line-height: 1.35; }
.process-log time { color: var(--violet); }
.process-log span { color: rgba(255,255,255,0.63); }
.process-result { display: flex; align-items: center; gap: 0.8rem; margin-top: auto; padding: 1rem; border-radius: 0.85rem; background: rgba(217,255,87,0.08); opacity: 0.35; }
.process-result.is-ready { opacity: 1; background: var(--lime); color: var(--ink); }
.result-icon { display: grid; flex: 0 0 auto; width: 2rem; aspect-ratio: 1; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-weight: 900; }
.process-result b, .process-result small { display: block; }
.process-result b { font-size: 0.72rem; }
.process-result small { margin-top: 0.3rem; font-size: 0.56rem; opacity: 0.62; }
.docker-chip { margin-left: auto; padding: 0.45rem 0.55rem; border: 1px solid currentColor; border-radius: 999px; font-size: 0.52rem; font-weight: 900; }
.demo-disclosure { display: flex; align-items: center; gap: 0.7rem; max-width: 54rem; margin: 1.25rem auto 0; font-size: 0.68rem; line-height: 1.45; }
.demo-disclosure > span { display: grid; flex: 0 0 auto; width: 1.4rem; aspect-ratio: 1; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-weight: 800; }

.trainer-preview { padding: clamp(5rem, 10vw, 10rem) clamp(1.25rem, 9vw, 10rem); background: var(--ink); color: var(--white); }
.trainer-intro { text-align: center; }
#trainer-intro-copy { max-width: 37rem; margin: 1.8rem auto 4rem; color: rgba(255,255,255,0.65); line-height: 1.55; }
.trainer-preview h2 { margin-bottom: 0; }
.trainer-preview h2 span { -webkit-text-stroke-color: var(--white); }
.trainer-form { max-width: 70rem; margin: 0 auto; border: 1px solid rgba(255,255,255,0.2); border-radius: 1.5rem; overflow: hidden; background: #222; }
.step-nav { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; border-bottom: 1px solid rgba(255,255,255,0.18); }
.step-nav li { color: rgba(255,255,255,0.42); border-right: 1px solid rgba(255,255,255,0.18); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.step-nav li:last-child { border-right: 0; }
.step-nav li button { display: block; width: 100%; padding: 1.2rem 1.4rem; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; text-transform: inherit; cursor: pointer; }
.step-nav li button:disabled { cursor: default; }
.step-nav li button:not(:disabled):hover { color: var(--white); }
.step-nav li span { margin-right: 0.55rem; }
.step-nav li.is-active, .step-nav li.is-complete { color: var(--white); }
.step-nav li.is-active { background: var(--violet); }
.step-nav li.is-complete span { color: var(--lime); }
.form-step { min-width: 0; margin: 0; padding: clamp(1.5rem, 4vw, 3rem); border: 0; }
.form-step legend { width: 100%; margin-bottom: 2rem; font-size: clamp(1.7rem, 3vw, 2.8rem); font-weight: 800; letter-spacing: -0.04em; }
.form-step > label, .form-step [data-source-panel] > label:not(.file-drop) { display: block; margin-bottom: 0.7rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.form-step textarea, .form-step input[type="url"], .form-step input[type="text"] { width: 100%; border: 1px solid rgba(255,255,255,0.24); border-radius: 1rem; padding: 1.2rem; background: #171717; color: var(--white); font: inherit; font-size: 1.05rem; line-height: 1.5; resize: vertical; }
.form-step textarea:focus, .form-step input:focus { border-color: var(--lime); outline: 2px solid transparent; box-shadow: 0 0 0 3px rgba(217,255,87,0.16); }
.field-help { margin: 0.65rem 0 0; color: rgba(255,255,255,0.48); font-size: 0.74rem; }
.field-error { min-height: 1.25rem; margin: 0.65rem 0 0; color: #ff9ab9; font-size: 0.75rem; }
.form-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.25rem; }
.form-actions-end { justify-content: flex-end; }
.form-button { border: 0; border-radius: 999px; padding: 1rem 1.3rem; color: var(--white); font: inherit; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.form-button-primary { background: var(--lime); color: var(--ink); }
.form-button-ghost { background: transparent; border: 1px solid rgba(255,255,255,0.28); }
.form-button:hover:not(:disabled) { transform: translateY(-2px); }
.form-button:disabled { opacity: 0.42; cursor: not-allowed; }
/* .form-button sets a white foreground but no background of its own, so a
   button that reaches the browser with no variant renders white-on-white and
   is invisible. This is the floor, not a variant: -primary, -ghost and
   -accent all still win on specificity. */
.form-button:not(.form-button-primary):not(.form-button-ghost):not(.form-button-accent) { background: transparent; border: 1px solid rgba(255,255,255,0.28); }
.form-button.is-busy:disabled { opacity: 0.75; cursor: progress; }
.source-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.destination-options { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.destination-option { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; min-height: 8rem; padding: 1.2rem; border: 1px solid rgba(255,255,255,0.2); border-radius: 1rem; cursor: pointer; transition: border-color 160ms ease, background 160ms ease, transform 160ms ease; }
.destination-option:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.45); }
.destination-option.is-selected { border-color: var(--lime); background: rgba(217,255,87,0.06); }
.destination-option input { position: absolute; inset: 1rem 1rem auto auto; accent-color: var(--lime); }
.destination-option > span:last-child { display: flex; flex-direction: column; gap: 0.4rem; }
.destination-option small { color: rgba(255,255,255,0.55); line-height: 1.4; }
.destination-icon { display: grid; width: 3rem; height: 3rem; place-items: center; border: 1px solid rgba(255,255,255,0.28); border-radius: 0.8rem; color: var(--lime); font-weight: 900; }
.destination-detail { margin-top: 0.5rem; padding: 1.2rem; border-radius: 1rem; background: rgba(255,255,255,0.045); }
.destination-detail > label { display: block; margin-bottom: 0.7rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.source-option { display: flex; gap: 0.85rem; align-items: flex-start; min-height: 6.5rem; padding: 1.2rem; border: 1px solid rgba(255,255,255,0.2); border-radius: 1rem; cursor: pointer; }
.source-option.is-selected { border-color: var(--lime); background: rgba(217,255,87,0.06); }
.source-option input { margin-top: 0.2rem; accent-color: var(--lime); }
.source-option span { display: flex; flex-direction: column; gap: 0.45rem; }
.source-option small { color: rgba(255,255,255,0.5); }
.search-control { display: grid; grid-template-columns: 1fr auto; gap: 0.75rem; align-items: stretch; }
.form-button-accent { border-color: var(--lime); background: var(--lime); color: #111; }
.source-candidates { display: grid; gap: 0.8rem; margin-top: 1.2rem; }
.source-candidate { display: grid; grid-template-columns: 7rem 1fr auto; gap: 1rem; align-items: start; padding: 0.9rem; border: 1px solid rgba(255,255,255,0.16); border-radius: 1rem; background: rgba(255,255,255,0.035); }
.source-candidate img { width: 7rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0.6rem; background: #252525; }
.source-candidate b, .source-candidate small, .source-candidate p { display: block; }
.source-candidate small { margin-top: 0.25rem; color: var(--lime); }
.source-candidate p { margin: 0.55rem 0 0; color: rgba(255,255,255,0.62); font-size: 0.85rem; line-height: 1.45; }
.source-candidate input { width: 1.1rem; height: 1.1rem; accent-color: var(--lime); }
.source-search-status { padding: 1rem; border: 1px dashed rgba(255,255,255,0.25); border-radius: 0.8rem; color: rgba(255,255,255,0.7); }
.source-search-status.is-error { border-color: #ff8c8c; color: #ffb4b4; }
.approve-sources { margin-top: 1rem; }
.file-drop { display: grid; min-height: 11rem; place-items: center; align-content: center; gap: 0.55rem; border: 1px dashed rgba(255,255,255,0.4); border-radius: 1rem; cursor: pointer; text-align: center; }
.file-drop small { color: rgba(255,255,255,0.5); }
.file-icon { display: grid; width: 2.5rem; aspect-ratio: 1; place-items: center; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 1.3rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.review-list { margin: 0; border-top: 1px solid rgba(255,255,255,0.18); }
.review-list div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding: 1.2rem 0; border-bottom: 1px solid rgba(255,255,255,0.18); }
.review-list dt { color: rgba(255,255,255,0.48); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.review-list dd { margin: 0; overflow-wrap: anywhere; }
.honesty-note { display: flex; gap: 1rem; margin-top: 1.5rem; padding: 1.1rem; border-radius: 1rem; background: rgba(101,88,245,0.18); }
.honesty-note > span { display: grid; flex: 0 0 auto; width: 1.7rem; height: 1.7rem; place-items: center; border-radius: 50%; background: var(--violet); font-weight: 800; }
.honesty-note p { margin: 0; line-height: 1.5; }
.project-feedback { margin-top: 1rem; padding: 1rem 1.15rem; border: 1px solid rgba(217,255,87,0.45); border-radius: 1rem; background: rgba(217,255,87,0.08); color: var(--lime); line-height: 1.5; }
.project-feedback.is-error { border-color: #ff8c8c; background: rgba(255,80,80,0.08); color: #ffb4b4; }
.form-success { display: flex; align-items: center; gap: 1.2rem; padding: clamp(1.5rem, 4vw, 3rem); }
.form-success p { margin: 0.35rem 0 0; color: rgba(255,255,255,0.55); }
.success-mark { display: grid; flex: 0 0 auto; width: 3rem; height: 3rem; place-items: center; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 1.3rem; font-weight: 900; }
.form-success button { margin-left: auto; border: 0; padding: 0.8rem 1rem; background: transparent; color: var(--lime); font: inherit; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; cursor: pointer; }
.video-procedure { max-width: 70rem; margin: 1.5rem auto 0; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid rgba(101,88,245,0.72); border-radius: 1.5rem; background: linear-gradient(145deg, rgba(101,88,245,0.22), rgba(255,255,255,0.035) 55%), #222; }
.video-procedure-heading { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: end; }
.video-procedure-heading .eyebrow { color: #aaa2ff; }
.video-procedure-heading h3 { max-width: 43rem; margin: 0.8rem 0 0; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 0.95; letter-spacing: -0.055em; }
.video-procedure-heading > p { margin: 0; color: rgba(255,255,255,0.62); line-height: 1.6; }
.video-source-card { display: grid; grid-template-columns: auto 1fr; gap: 1rem; margin-top: 1.5rem; padding: 1rem 1.2rem; border-radius: 1rem; background: rgba(0,0,0,0.2); }
.video-source-card span { color: #aaa2ff; font-size: 0.6rem; font-weight: 900; letter-spacing: 0.1em; }
.video-source-card a { min-width: 0; color: var(--white); font-size: 0.78rem; overflow-wrap: anywhere; }
.video-procedure-actions { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; margin-top: 1rem; }
.video-procedure-actions .practice-approval { padding: 0; }
.video-procedure-evidence { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 1.5rem; margin-top: 1.5rem; }
.video-procedure-status, .procedure-review { padding: 1.35rem; border: 1px solid rgba(255,255,255,0.16); border-radius: 1rem; background: rgba(0,0,0,0.15); }
.video-procedure-status { display: flex; flex-direction: column; }
.video-procedure-status > * { flex: none; }

/* Any run that keeps a person waiting shows that it is still working. */
.form-button.is-busy { position: relative; padding-right: 2.7rem; cursor: progress; }
.form-button.is-busy::after { content: ""; position: absolute; top: 50%; right: 1.05rem; width: 0.9rem; height: 0.9rem; margin-top: -0.45rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 750ms linear infinite; }
.activity-meter { margin-top: 0.9rem; }
.activity-track { height: 0.3rem; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,0.14); }
.activity-track span { display: block; width: 38%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--lime)); animation: indeterminate 1.5s ease-in-out infinite; }
.activity-meter p { display: flex; align-items: baseline; gap: 0.55rem; margin: 0.6rem 0 0; color: rgba(255,255,255,0.6); font-size: 0.72rem; line-height: 1.4; }
.activity-meter b { color: var(--lime); font-size: 0.95rem; font-variant-numeric: tabular-nums; }

/* The panel always states what the person can do next. */
.next-step { margin-top: auto; padding-top: 0.9rem; border-top: 1px solid rgba(255,255,255,0.14); }
.next-step > p:not(.practice-label) { margin: 0.5rem 0 0.9rem; color: rgba(255,255,255,0.74); font-size: 0.82rem; line-height: 1.5; }
.next-step .form-button { width: 100%; }
.video-procedure-status > strong { display: block; margin-top: 1rem; font-size: clamp(1.5rem, 3vw, 2.5rem); letter-spacing: -0.04em; }
.video-procedure-status > p:not(.practice-label) { color: rgba(255,255,255,0.62); line-height: 1.5; }
.procedure-review h4 { margin: 1rem 0 0.5rem; font-size: clamp(1.45rem, 2.5vw, 2.2rem); letter-spacing: -0.035em; }
.procedure-review > p:not(.practice-label) { color: rgba(255,255,255,0.68); line-height: 1.55; }
#procedure-steps { margin: 1.2rem 0 0; padding: 0; list-style: none; counter-reset: procedure-step; }
#procedure-steps li { position: relative; padding: 1rem 0 1rem 2.7rem; border-top: 1px solid rgba(255,255,255,0.13); line-height: 1.5; counter-increment: procedure-step; }
#procedure-steps li::before { content: counter(procedure-step, decimal-leading-zero); position: absolute; left: 0; top: 1rem; color: var(--lime); font-size: 0.62rem; font-weight: 900; }
#procedure-steps li small { display: block; margin-top: 0.4rem; color: rgba(255,255,255,0.48); }
.procedure-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 1rem; }
.procedure-details section { padding: 1rem; border-radius: 0.8rem; background: rgba(255,255,255,0.045); }
.procedure-details h5 { margin: 0; color: #aaa2ff; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; }
.procedure-details ul { margin: 0.7rem 0 0; padding-left: 1.1rem; color: rgba(255,255,255,0.66); font-size: 0.75rem; line-height: 1.5; }
.procedure-review > label { display: block; margin: 1.2rem 0 0.55rem; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.procedure-review textarea { width: 100%; border: 1px solid rgba(255,255,255,0.24); border-radius: 0.8rem; padding: 0.9rem 1rem; background: #171717; color: var(--white); font: inherit; resize: vertical; }
.procedure-review-actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1rem; }
.computer-practice { max-width: 70rem; margin: 1.5rem auto 0; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid rgba(217,255,87,0.42); border-radius: 1.5rem; background: linear-gradient(145deg, rgba(101,88,245,0.15), rgba(255,255,255,0.04) 55%), #222; }
.practice-heading { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: end; }
.practice-heading .eyebrow { color: var(--lime); }
.practice-heading h3 { max-width: 40rem; margin: 0.8rem 0 0; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 0.95; letter-spacing: -0.055em; }
.practice-heading > p { margin: 0; color: rgba(255,255,255,0.62); line-height: 1.6; }
.practice-disclosure { display: flex; gap: 0.85rem; margin-top: 1.5rem; padding: 1rem; border-radius: 1rem; background: rgba(217,255,87,0.08); color: rgba(255,255,255,0.78); }
.practice-disclosure span { display: grid; flex: 0 0 auto; width: 1.6rem; height: 1.6rem; place-items: center; border: 1px solid var(--lime); border-radius: 50%; color: var(--lime); font-weight: 800; }
.practice-disclosure p { margin: 0; line-height: 1.5; }
.practice-form { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 1.5rem; margin-top: 1.5rem; }
.practice-fields, .practice-plan, .practice-progress, .practice-result { padding: 1.35rem; border: 1px solid rgba(255,255,255,0.16); border-radius: 1rem; background: rgba(0,0,0,0.15); }
.practice-fields label { display: block; margin: 0 0 0.55rem; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.practice-fields label:not(:first-child) { margin-top: 1.25rem; }
.practice-fields input { width: 100%; border: 1px solid rgba(255,255,255,0.24); border-radius: 0.8rem; padding: 0.9rem 1rem; background: #171717; color: var(--white); font: inherit; }
.practice-fields input:focus { border-color: var(--lime); outline: 2px solid transparent; box-shadow: 0 0 0 3px rgba(217,255,87,0.16); }
.practice-label { margin: 0; color: var(--lime); font-size: 0.62rem; font-weight: 900; letter-spacing: 0.12em; }
.practice-plan { display: flex; flex-direction: column; }
.practice-plan > ol, .practice-action-results { margin: 1rem 0; padding: 0; list-style: none; }
.practice-plan > ol li { display: grid; grid-template-columns: 2rem 1fr; gap: 0.8rem; padding: 0.8rem 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.practice-plan > ol li > span { display: grid; width: 1.8rem; height: 1.8rem; place-items: center; border: 1px solid var(--lime); border-radius: 50%; color: var(--lime); font-size: 0.58rem; font-weight: 900; }
.practice-plan > ol p { margin: 0; color: rgba(255,255,255,0.72); line-height: 1.45; overflow-wrap: anywhere; }
.practice-approval { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; margin-top: auto; padding: 1rem 0; color: rgba(255,255,255,0.78); font-size: 0.78rem; line-height: 1.45; cursor: pointer; }
.practice-approval input { width: 1.1rem; height: 1.1rem; accent-color: var(--lime); }
.practice-plan .form-button { width: 100%; }
.practice-evidence { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 1.5rem; margin-top: 1.5rem; }
#practice-stages { display: grid; gap: 0.6rem; margin: 1rem 0 0; padding: 0; list-style: none; }
#practice-stages li { display: grid; grid-template-columns: 2rem 1fr auto; gap: 0.75rem; align-items: center; padding: 0.8rem; border-radius: 0.75rem; color: rgba(255,255,255,0.42); background: rgba(255,255,255,0.035); }
#practice-stages li > span { font-size: 0.62rem; font-weight: 900; }
#practice-stages li b { font-size: 0.76rem; }
#practice-stages li small { font-size: 0.55rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
#practice-stages li.is-active { color: var(--ink); background: var(--lime); }
#practice-stages li.is-complete { color: rgba(255,255,255,0.82); background: rgba(101,88,245,0.3); }
.practice-result > strong { display: block; margin-top: 1rem; font-size: clamp(1.5rem, 3vw, 2.5rem); letter-spacing: -0.04em; }
.practice-result > p:not(.practice-label) { color: rgba(255,255,255,0.62); line-height: 1.5; }
.practice-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; margin: 1.2rem 0; }
.practice-metrics div { padding: 0.85rem; border-radius: 0.75rem; background: rgba(255,255,255,0.055); }
.practice-metrics dt { color: rgba(255,255,255,0.48); font-size: 0.58rem; text-transform: uppercase; }
.practice-metrics dd { margin: 0.45rem 0 0; font-size: 1.35rem; font-weight: 800; }
.practice-action-results li { padding: 0.7rem 0; border-top: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.7); font-size: 0.75rem; overflow-wrap: anywhere; }
.practice-action-results b { margin-right: 0.5rem; color: var(--white); text-transform: uppercase; }
.privacy-note { margin: 1.5rem 0 0; text-align: center; font-size: 0.72rem; color: rgba(255,255,255,0.54); }
.privacy-note span { color: var(--lime); }

footer { display: flex; justify-content: space-between; padding: 2rem clamp(1.25rem, 4vw, 4.5rem); background: var(--ink); color: rgba(255,255,255,0.55); border-top: 1px solid rgba(255,255,255,0.18); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em; }

/* Focus workspace: the product workflow stays inside one desktop viewport. */
body.workspace-open { overflow: hidden; }

.trainer-preview {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(15rem, 0.32fr) minmax(0, 1fr);
  grid-template-rows: 4.25rem minmax(0, 1fr) 2.25rem;
  grid-template-areas:
    "toolbar toolbar"
    "intro content"
    "privacy privacy";
  height: 100dvh;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(2rem) scale(0.985);
  transform-origin: center bottom;
  transition: opacity 220ms ease, transform 320ms cubic-bezier(.2,.8,.2,1), visibility 0s linear 320ms;
}

body.workspace-open .trainer-preview {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.workspace-toolbar {
  grid-area: toolbar;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem clamp(1rem, 2vw, 1.75rem);
  border-bottom: 1px solid rgba(255,255,255,0.16);
  background: #171717;
}

.workspace-identity { display: flex; align-items: baseline; gap: 0.9rem; min-width: 0; }
.workspace-kicker { color: var(--lime); font-size: 0.58rem; font-weight: 900; letter-spacing: 0.12em; }
.workspace-identity strong { overflow: hidden; font-size: 0.82rem; text-overflow: ellipsis; white-space: nowrap; }
.workspace-actions { display: flex; align-items: center; gap: 0.75rem; }
.workspace-switcher { display: flex; padding: 0.2rem; border: 1px solid rgba(255,255,255,0.2); border-radius: 999px; }
.workspace-switcher button { border: 0; border-radius: 999px; padding: 0.5rem 0.75rem; background: transparent; color: rgba(255,255,255,0.5); font: inherit; font-size: 0.62rem; font-weight: 800; text-transform: uppercase; cursor: pointer; }
.workspace-switcher button[aria-pressed="true"] { background: var(--violet); color: var(--white); }
/* Only shown when the deployment configures a spend token. It is a service
   credential the operator holds, not a per-extraction choice, so it lives in
   the toolbar rather than beside any one button that spends. */
/* What is left of the operator's own ceiling. Turns amber then red as it goes,
   because a number nobody reads is not a warning. */
.spend-remaining { margin: 0; padding: 0.35rem 0.7rem; border: 1px solid rgba(255,255,255,0.2); border-radius: 999px; color: rgba(255,255,255,0.72); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.spend-remaining.is-low { border-color: rgba(255,196,84,0.6); color: #ffc454; }
.spend-remaining.is-spent { border-color: rgba(255,154,185,0.7); color: #ff9ab9; }

.spend-token { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.spend-token label { color: rgba(255,255,255,0.5); font-size: 0.58rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
.spend-token input { width: 9.5rem; min-width: 0; padding: 0.5rem 0.7rem; border: 1px solid rgba(255,255,255,0.2); border-radius: 999px; background: rgba(0,0,0,0.25); color: var(--white); font: inherit; font-size: 0.68rem; }
.spend-token input:focus-visible { border-color: var(--lime); outline: none; }
.spend-token.is-set input { border-color: rgba(190,242,100,0.55); }

.workspace-close { display: grid; width: 2.55rem; height: 2.55rem; place-items: center; border: 1px solid rgba(255,255,255,0.25); border-radius: 50%; background: transparent; color: var(--white); font: inherit; font-size: 1.25rem; cursor: pointer; }
.workspace-close:hover { border-color: var(--lime); color: var(--lime); }

.trainer-preview .trainer-intro {
  grid-area: intro;
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 4rem);
  text-align: left;
  background: linear-gradient(155deg, #262052, #171717 68%);
}

.trainer-preview .trainer-intro .eyebrow { margin-bottom: 1.25rem; color: var(--lime); }
.trainer-preview .trainer-intro h2 { font-size: clamp(2.7rem, 5.6vw, 6.2rem); }
.trainer-preview #trainer-intro-copy { max-width: 25rem; margin: 1.4rem 0 0; font-size: 0.9rem; }

/* Retained work: durable records are only useful if they can be reopened. */
.recent-work { display: flex; min-height: 0; flex-direction: column; gap: 0.55rem; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,0.18); }
.recent-work .practice-label { margin: 0; color: var(--lime); }
.recent-work ul { display: flex; min-height: 0; max-height: 13rem; flex-direction: column; gap: 0.4rem; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; list-style: none; scrollbar-width: thin; scrollbar-color: rgba(217,255,87,0.45) transparent; }
.recent-work button { display: grid; width: 100%; gap: 0.2rem; padding: 0.7rem 0.8rem; border: 1px solid rgba(255,255,255,0.16); border-radius: 0.7rem; background: rgba(255,255,255,0.04); color: var(--white); font: inherit; text-align: left; cursor: pointer; }
.recent-work button:hover { border-color: var(--lime); }
.recent-work b { overflow: hidden; font-size: 0.78rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.recent-work small { display: flex; gap: 0.5rem; color: rgba(255,255,255,0.5); font-size: 0.62rem; }
.recent-work small span:last-child { color: var(--lime); }
.recent-work-note { margin: 0; color: rgba(255,255,255,0.4); font-size: 0.62rem; }

.trainer-preview .trainer-form,
.trainer-preview .video-procedure,
.trainer-preview .computer-practice,
.trainer-preview .workspace-simulation,
.trainer-preview .workspace-teach {
  grid-area: content;
  min-width: 0;
  align-self: center;
  justify-self: center;
  width: min(calc(100% - 2rem), 70rem);
  max-height: calc(100% - 2rem);
  margin: 0;
}

.trainer-preview[data-workspace-view="video"] .trainer-form,
.trainer-preview[data-workspace-view="practice"] .trainer-form,
.trainer-preview[data-workspace-view="simulation"] .trainer-form { display: none; }
.trainer-preview[data-workspace-view="setup"] .video-procedure,
.trainer-preview[data-workspace-view="setup"] .computer-practice,
.trainer-preview[data-workspace-view="setup"] .workspace-simulation,
.trainer-preview[data-workspace-view="video"] .computer-practice,
.trainer-preview[data-workspace-view="video"] .workspace-simulation,
.trainer-preview[data-workspace-view="practice"] .video-procedure,
.trainer-preview[data-workspace-view="practice"] .workspace-simulation,
.trainer-preview[data-workspace-view="simulation"] .video-procedure,
.trainer-preview[data-workspace-view="simulation"] .computer-practice { display: none !important; }
/* The Teach view hides every other view, and every other view hides it. */
.trainer-preview[data-workspace-view="teach"] .trainer-form { display: none; }
.trainer-preview[data-workspace-view="teach"] .video-procedure,
.trainer-preview[data-workspace-view="teach"] .computer-practice,
.trainer-preview[data-workspace-view="teach"] .workspace-simulation,
.trainer-preview[data-workspace-view="setup"] .workspace-teach,
.trainer-preview[data-workspace-view="video"] .workspace-teach,
.trainer-preview[data-workspace-view="practice"] .workspace-teach,
.trainer-preview[data-workspace-view="simulation"] .workspace-teach { display: none !important; }

.trainer-preview .trainer-form { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.trainer-preview .form-step { min-height: 0; overflow: hidden; }
.trainer-preview .form-step.is-active { display: flex; flex-direction: column; }
.trainer-preview .form-step legend { margin-bottom: clamp(1rem, 2vh, 1.5rem); }
.trainer-preview .form-step textarea { min-height: 7rem; max-height: 10rem; resize: none; }
.trainer-preview .form-actions { margin-top: auto; padding-top: 1rem; }
.trainer-preview .source-options,
.trainer-preview .destination-options { margin-bottom: 1rem; }
.trainer-preview .destination-option { min-height: 6.5rem; }
.trainer-preview .source-option { min-height: 5.5rem; padding: 1rem; }
.trainer-preview .review-list div { padding: 0.8rem 0; }
.trainer-preview .honesty-note { margin-top: 1rem; padding: 0.85rem; font-size: 0.82rem; }
.trainer-preview .source-candidates { max-height: 13rem; overflow: auto; overscroll-behavior: contain; }
.trainer-preview .video-procedure,
.trainer-preview .computer-practice,
.trainer-preview .video-procedure-status,
.trainer-preview .procedure-review,
.trainer-preview .source-candidates,
.trainer-preview .procedure-details ul { scrollbar-width: thin; scrollbar-color: rgba(217,255,87,0.45) transparent; }

.trainer-preview .video-procedure,
.trainer-preview .computer-practice { height: calc(100% - 2rem); padding: clamp(1rem, 2vw, 1.5rem); overflow: hidden auto; overscroll-behavior: contain; }
.trainer-preview .video-procedure { display: grid; grid-template-rows: auto auto auto auto minmax(16rem, 1fr); }
.trainer-preview .video-procedure-heading { align-items: center; }
.trainer-preview .video-procedure-heading h3 { font-size: clamp(1.65rem, 2.6vw, 2.7rem); }
.trainer-preview .video-source-card { margin-top: 0.8rem; padding: 0.75rem 0.9rem; }
.trainer-preview .video-procedure-actions { margin-top: 0.75rem; }
.trainer-preview .video-procedure-evidence { min-height: 0; margin-top: 0.8rem; }
.video-procedure-evidence:has(> .procedure-review[hidden]) { grid-template-columns: minmax(0, 1fr); }
.video-procedure-evidence:has(> .procedure-review[hidden]) .practice-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trainer-preview .video-procedure.has-procedure { grid-template-rows: auto minmax(16rem, 1fr); }
.trainer-preview .video-procedure.has-procedure .video-source-card,
.trainer-preview .video-procedure.has-procedure .video-procedure-actions,
.trainer-preview .video-procedure.has-procedure > .field-error:empty { display: none; }
.trainer-preview .video-procedure-status,
.trainer-preview .procedure-review { min-height: 0; overflow: hidden auto; overscroll-behavior: contain; }
.trainer-preview .procedure-review { display: flex; flex-direction: column; }
.trainer-preview .procedure-review h4 { margin-top: 0.55rem; font-size: clamp(1.25rem, 2vw, 1.75rem); }
.trainer-preview .procedure-review > p:not(.practice-label) { margin-bottom: 0.4rem; font-size: 0.78rem; line-height: 1.4; }
.trainer-preview #procedure-steps { flex: 0 0 auto; margin-top: 0.4rem; }
.trainer-preview #procedure-steps li { min-height: 7.5rem; padding: 0.8rem 0.8rem 0.8rem 2.7rem; border: 1px solid rgba(255,255,255,0.13); border-radius: 0.8rem; background: rgba(255,255,255,0.035); }
.trainer-preview #procedure-steps li::before { top: 0.85rem; left: 0.8rem; }
.procedure-step-pager { display: flex; align-items: center; justify-content: center; gap: 0.8rem; margin-top: 0.45rem; }
.procedure-step-pager button { display: grid; width: 2rem; height: 2rem; place-items: center; border: 1px solid rgba(255,255,255,0.24); border-radius: 50%; background: transparent; color: var(--white); cursor: pointer; }
.procedure-step-pager button:disabled { opacity: 0.28; cursor: default; }
.procedure-step-pager span { min-width: 4rem; color: rgba(255,255,255,0.6); font-size: 0.64rem; font-weight: 800; text-align: center; }
.trainer-preview .procedure-details { grid-template-columns: repeat(4, 1fr); margin-top: 0.55rem; }
.trainer-preview .procedure-details details { min-width: 0; border-radius: 0.7rem; background: rgba(255,255,255,0.045); }
.trainer-preview .procedure-details summary { padding: 0.7rem; color: #aaa2ff; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; cursor: pointer; }
.trainer-preview .procedure-details details[open] { grid-column: 1 / -1; }
.trainer-preview .procedure-details ul { max-height: 5.5rem; margin: 0; padding: 0 1.8rem 0.8rem; overflow: auto; }
.trainer-preview .procedure-review > label { flex: none; margin-top: 0.65rem; }
.trainer-preview .procedure-review textarea { flex: none; height: 2.8rem; resize: none; }
.trainer-preview .procedure-review-actions { flex: none; margin-top: auto; padding-top: 0.6rem; }
.trainer-preview .procedure-details, .trainer-preview .procedure-step-pager { flex: none; }

.trainer-preview .privacy-note { grid-area: privacy; align-self: center; margin: 0; }

@media (max-height: 900px) and (min-width: 701px) {
  .trainer-preview .video-procedure-heading h3 { font-size: clamp(1.4rem, 2.1vw, 2rem); }
  .trainer-preview .video-procedure-heading > p { font-size: 0.8rem; }
  .trainer-preview .video-procedure-status > strong { font-size: clamp(1.2rem, 2vw, 1.7rem); }
  .trainer-preview .video-procedure-status > p:not(.practice-label) { font-size: 0.8rem; }
  .trainer-preview .practice-metrics { gap: 0.45rem; margin: 0.8rem 0; }
  .trainer-preview .practice-metrics div { padding: 0.6rem; }
  .trainer-preview .practice-metrics dd { font-size: 1.05rem; }
  .trainer-preview .procedure-review h4 { font-size: clamp(1.1rem, 1.7vw, 1.45rem); }
}

@media (max-height: 760px) and (min-width: 701px) {
  .trainer-preview { grid-template-rows: 3.75rem minmax(0, 1fr) 1.75rem; }
  .trainer-preview .trainer-intro { padding: 1.5rem 2rem; }
  .trainer-preview .trainer-intro h2 { font-size: clamp(2.4rem, 5vw, 4.5rem); }
  .trainer-preview .form-step { padding: 1.25rem 1.5rem; }
  .trainer-preview .step-nav li button { padding: 0.85rem 1rem; }
  .trainer-preview .video-procedure-heading > p { display: none; }
  .trainer-preview .video-procedure-status > strong { font-size: 1.5rem; }
}

@media (max-width: 700px) {
  .trainer-preview {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 4rem minmax(0, 1fr) 2rem;
    grid-template-areas: "toolbar" "content" "privacy";
  }
  .trainer-preview .trainer-intro { display: none; }
  .workspace-kicker { display: none; }
  .workspace-identity { min-width: 0; flex: 1; }
  .workspace-identity strong { max-width: 8.5rem; }
  .workspace-actions { flex: 0 0 auto; gap: 0.4rem; }
  .spend-token label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .spend-token input { width: 5.5rem; }
  .workspace-switcher button { padding-inline: 0.6rem; }
  .trainer-preview .trainer-form,
  .trainer-preview .video-procedure,
  .trainer-preview .computer-practice { width: calc(100% - 1rem); max-width: calc(100vw - 1rem); max-height: calc(100% - 1rem); }
  .trainer-preview .step-nav { min-width: 0; }
  .trainer-preview .step-nav li { min-width: 0; overflow: hidden; font-size: 0.6rem; }
  .trainer-preview .step-nav li button { min-width: 0; padding-inline: 0.35rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .trainer-preview .form-step textarea,
  .trainer-preview .form-step input { min-width: 0; }
  .trainer-preview .form-step,
  .trainer-preview .video-procedure,
  .trainer-preview .computer-practice { overflow-y: auto; overscroll-behavior: contain; }
  .trainer-preview .procedure-details { grid-template-columns: repeat(2, 1fr); }
  .trainer-preview .video-procedure-evidence { grid-template-columns: 1fr; overflow-y: auto; }
}

@keyframes drift { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-1.5rem, 1rem, 0) scale(1.06); } }
@keyframes pulse { 0%, 100% { opacity: 0.45; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(24rem); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes indeterminate { from { transform: translateX(-110%); } to { transform: translateX(370%); } }

@media (max-width: 900px) {
  nav > a:not(.nav-cta) { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-stage { min-height: 38rem; }
  .section-heading { grid-template-columns: 1fr; gap: 1rem; }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
  .processing-heading { grid-template-columns: 1fr; }
  .processing-intro { justify-self: start; }
  .console-grid { grid-template-columns: 1fr 1fr; }
  .source-monitor { border-bottom: 1px solid rgba(255,255,255,0.15); }
  .pipeline-list { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.15); }
  .extraction-panel { grid-column: 1 / -1; min-height: 28rem; }
}

@media (max-width: 560px) {
  .site-header { min-height: 4.5rem; }
  .header-actions { gap: 0.55rem; }
  .language-switch button { min-width: 1.8rem; padding: 0.4rem; }
  .nav-cta { display: grid; width: 2.75rem; height: 2.75rem; padding: 0; place-items: center; font-size: 0; }
  .nav-cta span { font-size: 1rem; }
  .hero-copy { padding-top: 5rem; padding-bottom: 5rem; }
  h1 { font-size: clamp(3.55rem, 18vw, 5rem); }
  .hero-stage { min-height: 32rem; }
  .flow-card-main { left: 5%; width: 70%; min-height: 20rem; }
  .flow-card-score { right: 4%; width: 48%; }
  .flow-card-export { width: 40%; }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid article { min-height: 18rem; }
  .method-grid h3 { margin-top: 5rem; }
  .processing-heading { margin-bottom: 2.5rem; }
  .processing-intro p { font-size: 0.95rem; }
  .demo-trigger { width: 100%; justify-content: space-between; }
  .console-header { align-items: flex-start; flex-direction: column; }
  .console-grid { grid-template-columns: 1fr; }
  .source-monitor, .pipeline-list { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.15); }
  .extraction-panel { grid-column: auto; }
  .monitor-screen { min-height: 19rem; }
  .process-progress-meta { gap: 1rem; }
  .pipeline-list li { grid-template-columns: 2rem 1fr; }
  .stage-state { grid-column: 2; }
  .process-result { align-items: flex-start; flex-wrap: wrap; }
  .docker-chip { margin-left: 2.8rem; }
  .task-shell { align-items: stretch; flex-direction: column; gap: 1.5rem; border-radius: 1.5rem; padding: 1.4rem; }
  .step-nav li button { padding: 1rem 0.7rem; text-align: center; }
  .step-nav li span { display: block; margin: 0 0 0.3rem; }
  .source-options, .destination-options { grid-template-columns: 1fr; }
  .search-control, .source-candidate { grid-template-columns: 1fr; }
  .source-candidate img { width: 100%; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .form-button { width: 100%; }
  .review-list div { grid-template-columns: 1fr; gap: 0.35rem; }
  .form-success { align-items: flex-start; flex-wrap: wrap; }
  .form-success button { width: 100%; margin-left: 0; text-align: left; }
  .video-procedure-heading, .video-procedure-evidence, .practice-heading, .practice-form, .practice-evidence { grid-template-columns: 1fr; }
  .video-procedure-actions, .video-source-card { grid-template-columns: 1fr; }
  .video-procedure-actions .form-button { width: 100%; }
  .procedure-details { grid-template-columns: 1fr; }
  .procedure-review-actions { align-items: stretch; flex-direction: column-reverse; }
  .practice-heading { align-items: start; }
  .practice-metrics { grid-template-columns: 1fr 1fr; }
  footer { gap: 1.5rem; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.motion-evidence { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid rgba(255,255,255,0.14); }
.motion-evidence > p:not(.practice-label) { margin: 0.5rem 0 0.75rem; color: rgba(255,255,255,0.74); font-size: 0.82rem; line-height: 1.5; }
.motion-evidence .form-button { width: 100%; }
.motion-ack { display: flex; gap: 0.55rem; align-items: flex-start; margin-bottom: 0.75rem; color: rgba(255,255,255,0.62); font-size: 0.74rem; line-height: 1.45; cursor: pointer; }
.motion-ack input { margin-top: 0.15rem; accent-color: var(--lime); }
#motion-result { margin-top: 1rem; padding: 0.9rem 1rem; border-radius: 0.8rem; background: rgba(255,255,255,0.045); }
.motion-verdict { margin: 0; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase; }
.motion-verdict[data-verdict="usable"] { color: var(--lime); }
.motion-verdict[data-verdict="suspect"] { color: #ffc46b; }
.motion-verdict[data-verdict="not_evidence"] { color: #ff8f7a; }
.motion-stats { margin: 0.5rem 0 0; color: rgba(255,255,255,0.6); font-size: 0.74rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.motion-estimate { margin: 0.35rem 0 0; color: rgba(255,255,255,0.44); font-size: 0.7rem; font-style: italic; line-height: 1.45; }
.motion-findings { margin: 0.7rem 0 0; padding-left: 1.1rem; color: rgba(255,255,255,0.66); font-size: 0.74rem; line-height: 1.5; }
.motion-findings:empty { display: none; }
.motion-findings li + li { margin-top: 0.4rem; }
.motion-retarget { margin: 0.75rem 0 0; padding-top: 0.7rem; border-top: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.58); font-size: 0.74rem; line-height: 1.5; }
.motion-retarget:empty { display: none; }

.upload-list { margin: 0.85rem 0 0; padding: 0; list-style: none; }
.upload-list li { display: flex; align-items: center; gap: 0.7rem; padding: 0.65rem 0; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.76rem; }
.upload-list li > span { flex: 1; min-width: 0; }
.upload-list b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.upload-list small { display: block; margin-top: 0.2rem; color: rgba(255,255,255,0.46); font-variant-numeric: tabular-nums; }
.upload-list button { flex: none; border: 1px solid rgba(255,255,255,0.24); border-radius: 0.6rem; padding: 0.35rem 0.7rem; background: transparent; color: rgba(255,255,255,0.72); font: inherit; font-size: 0.72rem; cursor: pointer; }
.upload-list button:hover { border-color: rgba(255,255,255,0.5); color: var(--white); }
.upload-list button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
#store-video-file { width: 100%; margin-top: 0.7rem; }

.evidence-history { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid rgba(255,255,255,0.14); }
.history-totals { margin: 0.5rem 0 0.8rem; color: rgba(255,255,255,0.6); font-size: 0.74rem; font-variant-numeric: tabular-nums; }
.history-sub { margin: 1rem 0 0.4rem; color: #aaa2ff; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.history-versions { margin: 0; padding: 0; list-style: none; }
.history-versions li { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.5rem 0; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.75rem; }
.history-versions b { flex: none; color: var(--lime); font-variant-numeric: tabular-nums; }
.history-versions span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,0.7); }
.history-versions small { flex: none; color: rgba(255,255,255,0.44); }
.history-diff-summary { margin: 0 0 0.5rem; color: rgba(255,255,255,0.66); font-size: 0.75rem; line-height: 1.5; }
.history-changes { margin: 0; padding-left: 1.1rem; color: rgba(255,255,255,0.62); font-size: 0.73rem; line-height: 1.5; }
.history-changes:empty { display: none; }
.history-changes li + li { margin-top: 0.35rem; }
.history-changes del { color: #ff8f7a; text-decoration: line-through; }
.history-changes ins { color: var(--lime); text-decoration: none; }
.reconciliation-independence { margin: 0 0 0.5rem; padding: 0.55rem 0.7rem; border-radius: 0.6rem; font-size: 0.73rem; line-height: 1.45; }
.reconciliation-independence[data-cross="false"] { background: rgba(255,143,122,0.12); color: #ffb9a8; }
.reconciliation-independence[data-cross="true"] { background: rgba(217,255,87,0.1); color: var(--lime); }


/* --- Simulation view ------------------------------------------------------
   Two columns that say different things on purpose: on the left what the video
   actually taught, on the right what this simulation actually runs. They are
   not the same thing and the layout should not let anyone read them as one. */
.trainer-preview .workspace-simulation {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: clamp(1.1rem, 2vw, 1.9rem);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 1.35rem;
  background: linear-gradient(158deg, rgba(38,32,82,0.62), rgba(23,23,23,0.9) 62%);
  overflow: hidden;
}
.simulation-heading { flex: none; margin-bottom: 1rem; }
.simulation-heading .eyebrow { margin: 0 0 0.5rem; color: var(--lime); }
.simulation-heading h3 { max-width: 46rem; margin: 0; font-size: clamp(1.2rem, 2.2vw, 1.9rem); letter-spacing: -0.02em; }
.simulation-columns { display: grid; min-height: 0; flex: 1; gap: 1.25rem; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); }
.simulation-learned,
.simulation-console-host { min-height: 0; padding: 1.2rem; border: 1px solid rgba(255,255,255,0.16); border-radius: 1rem; background: rgba(0,0,0,0.2); overflow: hidden auto; overscroll-behavior: contain; }
.simulation-note { margin: 0.45rem 0 1rem; color: rgba(255,255,255,0.62); font-size: 0.76rem; line-height: 1.5; }
.simulation-steps { display: grid; gap: 0.5rem; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.simulation-steps li { padding: 0.7rem 0.8rem; border: 1px solid rgba(255,255,255,0.13); border-radius: 0.7rem; background: rgba(255,255,255,0.035); font-size: 0.78rem; line-height: 1.45; }
.simulation-steps li b { display: block; margin-bottom: 0.2rem; }
.simulation-steps time { display: inline-block; margin-bottom: 0.3rem; color: var(--lime); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; }
/* The gap is the honest part of this screen, so it is the loud part. */
.simulation-gap { margin-top: 1.2rem; padding: 0.95rem; border: 1px solid rgba(255,196,84,0.42); border-radius: 0.8rem; background: rgba(255,196,84,0.07); }
.simulation-gap .practice-label { color: #ffc454; }
.simulation-gap ul { margin: 0.6rem 0 0; padding-left: 1.1rem; color: rgba(255,255,255,0.76); font-size: 0.75rem; line-height: 1.55; }
.simulation-gap li { margin-bottom: 0.35rem; }

/* --- Observed motion ---------------------------------------------------------
   Drawn in lime, next to the amber gap panel and above the built-in arm: the
   colour is the one this interface already uses for "this came from your
   source". Each row is one joint's angle over time, and the strokes stop
   where the joint stopped being visible. */
.observed-motion { margin-top: 0.4rem; padding: 0.85rem 0.9rem 0.9rem; border: 1px solid rgba(198,255,71,0.3); border-radius: 0.8rem; background: rgba(198,255,71,0.045); }
.observed-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 0.7rem; }
.observed-tag { flex: none; padding: 0.2rem 0.45rem; border-radius: 0.35rem; background: var(--lime); color: var(--ink); font-size: 0.55rem; font-weight: 800; letter-spacing: 0.08em; }
/* Samples the audit refused are still drawn -- seeing what a model returned
   is the point -- but never under the badge that means "measured here". */
.observed-motion[data-verdict="suspect"] { border-color: rgba(255,196,84,0.42); background: rgba(255,196,84,0.06); }
.observed-motion[data-verdict="not_evidence"] { border-color: rgba(255,143,122,0.45); background: rgba(255,143,122,0.06); }
.observed-motion[data-verdict="suspect"] .observed-tag { background: #ffc46b; }
.observed-motion[data-verdict="not_evidence"] .observed-tag { background: #ff8f7a; }
.observed-motion[data-verdict="not_evidence"] .observed-trace { stroke: #ff8f7a; }
.observed-motion[data-verdict="suspect"] .observed-trace { stroke: #ffc46b; }
.observed-verdict { margin: 0.6rem 0 0; color: rgba(255,255,255,0.8); font-size: 0.72rem; line-height: 1.5; }
.observed-summary { margin: 0; color: rgba(255,255,255,0.74); font-size: 0.72rem; line-height: 1.45; }
.observed-stage { margin-top: 0.75rem; overflow-x: auto; }
#observed-canvas { display: block; width: 100%; min-width: 19rem; height: auto; }
.observed-baseline { stroke: rgba(255,255,255,0.12); stroke-width: 1; stroke-dasharray: 2 3; }
.observed-label { fill: rgba(255,255,255,0.66); font-size: 9px; font-family: inherit; }
.observed-trace { fill: none; stroke: var(--lime); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.observed-lone-point { fill: var(--lime); }
/* A reading taken while the joint was hidden is marked, never smoothed away. */
.observed-occluded { fill: none; stroke: #ffc454; stroke-width: 1; }
.observed-dot { fill: var(--white); }
.observed-value { fill: var(--white); font-size: 9px; font-family: inherit; font-variant-numeric: tabular-nums; }
.observed-axis { fill: rgba(255,255,255,0.42); font-size: 8px; font-family: inherit; font-variant-numeric: tabular-nums; }
.observed-value.is-missing { fill: rgba(255,196,84,0.85); }
.observed-playhead { stroke: rgba(255,255,255,0.55); stroke-width: 1; }
.observed-controls { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.7rem; }
.observed-play { display: grid; width: 2rem; height: 2rem; flex: none; place-items: center; border: 1px solid rgba(255,255,255,0.28); border-radius: 50%; background: transparent; color: var(--white); font: inherit; font-size: 0.65rem; cursor: pointer; }
.observed-play:hover { border-color: var(--lime); color: var(--lime); }
.observed-play[aria-pressed="true"] { border-color: var(--lime); background: var(--lime); color: var(--ink); }
#observed-scrubber { min-width: 0; flex: 1; height: 1rem; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
#observed-scrubber::-webkit-slider-runnable-track { height: 0.3rem; border-radius: 999px; background: rgba(255,255,255,0.18); }
#observed-scrubber::-moz-range-track { height: 0.3rem; border-radius: 999px; background: rgba(255,255,255,0.18); }
#observed-scrubber::-webkit-slider-thumb { width: 0.8rem; height: 0.8rem; margin-top: -0.25rem; border: 0; border-radius: 50%; background: var(--lime); -webkit-appearance: none; appearance: none; }
#observed-scrubber::-moz-range-thumb { width: 0.8rem; height: 0.8rem; border: 0; border-radius: 50%; background: var(--lime); }
.observed-clock { flex: none; min-width: 3rem; color: var(--white); font-size: 0.66rem; font-variant-numeric: tabular-nums; text-align: right; }
.observed-legend { margin: 0.6rem 0 0; color: rgba(255,255,255,0.45); font-size: 0.6rem; line-height: 1.5; }

/* The console is moved here at runtime, so its landing-page framing is undone
   rather than restyled: inside the workspace it is a panel, not a section. */
.simulation-console-host > .processing-console { margin: 0.6rem 0 0; border-radius: 0.85rem; }
.simulation-console-host .console-grid { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 1100px) {
  .simulation-columns { grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; align-content: start; overflow: hidden auto; }
  /* Stacked, the two panels share one scroll. Two boxes of a few hundred
     pixels each, scrolling independently, hide most of both. */
  .simulation-learned,
  .simulation-console-host { overflow: visible; }
}


/* --- Teach view -------------------------------------------------------------
   The default path. A person says what to learn and from which video; the
   agent runs the stages that used to be five separate buttons; the person
   approves once; the result can be downloaded. The stages stay visible so the
   system is not reduced to video -> prompt. */
.trainer-preview .workspace-teach {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: clamp(1.1rem, 2vw, 1.9rem);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 1.35rem;
  background: linear-gradient(158deg, rgba(38,32,82,0.62), rgba(23,23,23,0.9) 62%);
  overflow: hidden auto;
  overscroll-behavior: contain;
}
.teach-form .eyebrow, .teach-result .eyebrow { margin: 0 0 0.5rem; color: var(--lime); }
.teach-form h3, .teach-result h3 { max-width: 40rem; margin: 0 0 1.1rem; font-size: clamp(1.3rem, 2.4vw, 2rem); letter-spacing: -0.02em; line-height: 1.1; }
.teach-label { display: block; margin: 0.9rem 0 0.35rem; color: rgba(255,255,255,0.62); font-size: 0.62rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.teach-form textarea, .teach-form input[type="text"], .teach-form input[type="url"] { width: 100%; box-sizing: border-box; padding: 0.8rem 0.9rem; border: 1px solid rgba(255,255,255,0.2); border-radius: 0.75rem; background: rgba(0,0,0,0.25); color: var(--white); font: inherit; font-size: 0.9rem; }
.teach-form textarea { min-height: 5rem; max-height: 9rem; resize: vertical; }
.teach-form textarea:focus-visible, .teach-form input:focus-visible { border-color: var(--lime); outline: none; }
.teach-destinations { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.teach-destination { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: center; padding: 0.85rem 0.95rem; border: 1px solid rgba(255,255,255,0.2); border-radius: 0.85rem; cursor: pointer; transition: border-color 160ms ease, background 160ms ease; }
.teach-destination:hover { border-color: rgba(255,255,255,0.45); }
.teach-destination.is-selected { border-color: var(--lime); background: rgba(217,255,87,0.08); }
.teach-destination input { accent-color: var(--lime); }
.teach-destination b { display: block; font-size: 0.86rem; }
.teach-destination small { color: rgba(255,255,255,0.6); font-size: 0.72rem; }
.teach-consent { margin-top: 1rem; padding: 0.9rem 0; }
.teach-form .form-actions { margin-top: 0.6rem; }
.teach-stages { display: grid; gap: 0.55rem; margin: 0.9rem 0 0; padding: 0; list-style: none; }
.teach-stages li { display: grid; grid-template-columns: 2rem 1fr auto; gap: 0.8rem; align-items: center; padding: 0.8rem 0.9rem; border: 1px solid rgba(255,255,255,0.13); border-radius: 0.8rem; background: rgba(255,255,255,0.035); color: rgba(255,255,255,0.5); }
.teach-stages li > span:first-child { font-size: 0.62rem; font-weight: 900; }
.teach-stages li b { display: block; font-size: 0.82rem; color: rgba(255,255,255,0.85); }
.teach-stages li small { display: block; font-size: 0.68rem; }
.teach-stage-state { font-size: 0.58rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.teach-stages li[data-state="running"] { border-color: rgba(101,88,245,0.7); background: rgba(101,88,245,0.16); color: var(--white); }
.teach-stages li[data-state="running"] .teach-stage-state { color: #b7aeff; }
.teach-stages li[data-state="waiting"] { border-color: rgba(255,196,84,0.6); background: rgba(255,196,84,0.08); color: var(--white); }
.teach-stages li[data-state="waiting"] .teach-stage-state { color: #ffc454; }
.teach-stages li[data-state="done"] { color: rgba(255,255,255,0.82); }
.teach-stages li[data-state="done"] .teach-stage-state { color: var(--lime); }
.teach-stages li[data-state="failed"] { border-color: rgba(255,154,185,0.6); }
.teach-stages li[data-state="failed"] .teach-stage-state { color: #ff9ab9; }
.teach-approval h4 { margin: 0.6rem 0 0.2rem; font-size: clamp(1.1rem, 2vw, 1.6rem); letter-spacing: -0.02em; }
.teach-approval .simulation-steps { margin-top: 0.9rem; }
.teach-result-summary { margin: 0.4rem 0 0.6rem; font-size: 0.92rem; line-height: 1.5; }
.teach-result .agent-missing { margin: 0 0 0.8rem; padding-left: 1.1rem; color: rgba(255,255,255,0.72); font-size: 0.8rem; line-height: 1.5; }
.teach-result-actions { flex-wrap: wrap; gap: 0.6rem; }
@media (max-width: 720px) { .teach-destinations { grid-template-columns: 1fr; } }
