/* io.training landing page: the studio's Forma-board look (light canvas,
   floating white surfaces, charcoal ink, burnt-orange accent) with the same
   three presets as the studio: Charcoal & Orange, Midnight and Mono. */

:root {
  --canvas: #f4f4f2;
  --grid: rgba(36, 41, 46, 0.07);
  --surface: #ffffff;
  --surface-2: #f7f7f5;
  --line: #e5e5e2;
  --line-2: #d4d4d0;
  --text: #3d434a;
  --strong: #1b1f23;
  --muted: #7a8088;
  --ink: #24292e;
  --on-ink: #ffffff;
  --accent: #ea580c;
  --accent-ink: #c2410c;
  --accent-soft: #fff1e8;
  --ok: #2e9e6f;
  --alarm: #d8392f;
  --hmi-bg: #d9dadb;
  --hmi-panel: #e6e7e8;
  --hmi-line: #a3a6aa;
  --hmi-ink: #2b2f33;
  --shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 14px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 6px 16px rgba(0, 0, 0, 0.06), 0 22px 48px rgba(0, 0, 0, 0.1);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --radius: 14px;
  color-scheme: light;
}
:root[data-theme="midnight"] {
  --canvas: #0b1220;
  --grid: rgba(231, 235, 243, 0.06);
  --surface: #131c2e;
  --surface-2: #18233a;
  --line: #222e46;
  --line-2: #2d3a55;
  --text: #c4cbd8;
  --strong: #f1f4f9;
  --muted: #8d97ab;
  --ink: #e7ebf3;
  --on-ink: #0b1220;
  --accent: #fb923c;
  --accent-ink: #fdba74;
  --accent-soft: rgba(251, 146, 60, 0.12);
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 4px 18px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 24px 60px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
:root[data-theme="mono"] {
  --canvas: #fafafa;
  --grid: rgba(0, 0, 0, 0.06);
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --line: #e6e6e6;
  --line-2: #d0d0d0;
  --text: #333;
  --strong: #0a0a0a;
  --muted: #777;
  --ink: #0a0a0a;
  --on-ink: #fff;
  --accent: #0a0a0a;
  --accent-ink: #0a0a0a;
  --accent-soft: #f0f0f0;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  margin: 0;
  color: var(--strong);
  letter-spacing: -0.025em;
  line-height: 1.12;
}
code,
.mono,
pre {
  font-family: var(--mono);
  font-variant-ligatures: none;
  font-feature-settings: "calt" 0, "liga" 0;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------------------------------------- pieces */

.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-size: var(--wm-size, 20px);
  letter-spacing: -0.035em;
  line-height: 1;
}
.wordmark b {
  font-weight: 800;
}
.wordmark i {
  display: inline-block;
  width: 0.2em;
  height: 0.2em;
  margin: 0 0.09em 0 0.11em;
  transform: rotate(45deg);
  border-radius: 1px;
}
.wordmark span {
  font-weight: 500;
}
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: var(--on-ink);
  font: 600 14.5px var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
:root[data-theme="midnight"] .btn-accent {
  color: #1b1208;
}
.btn-quiet {
  background: var(--surface);
  color: var(--strong);
  box-shadow: var(--shadow);
}
.btn-sm {
  height: 34px;
  padding: 0 13px;
  border-radius: 8px;
  font-size: 13.5px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-ink);
  font: 600 12px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  border-radius: 1px;
  background: var(--accent);
}

/* -------------------------------------------------------------- nav */

.nav {
  position: sticky;
  z-index: 20;
  top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 8px 8px 8px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--strong);
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 2px;
  margin: 0 auto;
}
.nav-links a {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.nav-links a:hover {
  background: var(--surface-2);
  color: var(--strong);
}
.theme-dots {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
}
.theme-dots button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}
.theme-dots button[aria-pressed="true"] {
  border-color: var(--accent);
}

/* -------------------------------------------------------------- layout */

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 0;
}
.section-head {
  display: grid;
  gap: 14px;
  max-width: 720px;
  margin-bottom: 34px;
}
.section-head h2 {
  font-size: clamp(30px, 4.2vw, 44px);
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: center;
}
.card {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.points {
  display: grid;
  gap: 14px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.points li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
}
.points li::before {
  content: "";
  width: 9px;
  height: 9px;
  margin: 8px 0 0 5px;
  transform: rotate(45deg);
  border-radius: 1px;
  background: var(--accent);
}
.points b {
  color: var(--strong);
}

/* -------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 30px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--grid) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  gap: 26px;
  justify-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  text-align: center;
}
.hero h1 {
  max-width: 15ch;
  font-size: clamp(42px, 7vw, 82px);
  font-weight: 750;
  letter-spacing: -0.045em;
}
.hero h1 em {
  color: var(--accent);
  font-style: normal;
}
.hero-sub {
  max-width: 60ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* The journey board in the hero. */
.board {
  position: relative;
  width: 100%;
  margin-top: 26px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.board-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
}
.board-bar .crumb {
  color: var(--muted);
}
.board-bar strong {
  color: var(--strong);
}
.board-bar .spacer {
  flex: 1;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font: 500 12px var(--font);
  white-space: nowrap;
}
.chip-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 6px transparent;
  }
}
.board-canvas {
  position: relative;
  height: 430px;
  overflow: hidden;
  background-image: radial-gradient(var(--grid) 1.2px, transparent 1.3px);
  background-size: 18px 18px;
  cursor: grab;
  touch-action: none;
}
.board-canvas.is-dragging {
  cursor: grabbing;
}
.board-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 1180px;
  height: 430px;
  transform-origin: 0 0;
}
.board-world svg.routes {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}
.routes path {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 2;
}
.routes path.is-fail {
  stroke: var(--alarm);
  stroke-dasharray: 6 6;
  opacity: 0.6;
}
.routes path.is-walked {
  stroke: var(--accent);
}
.routes text {
  fill: var(--alarm);
  font: 600 11px var(--font);
}
.learner-dot {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 3;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}
.jcard {
  position: absolute;
  display: grid;
  gap: 9px;
  width: 220px;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}
.jcard:hover {
  transform: translateY(-2px);
}
.jcard.is-selected {
  box-shadow: 0 0 0 2px var(--accent), var(--shadow-lg);
}
.jcard.is-current .jcard-num {
  background: var(--accent);
  color: #fff;
}
.jcard-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--strong);
  font-size: 14px;
  font-weight: 650;
}
.jcard-num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  font: 600 11px var(--mono);
  transition: background 0.3s;
}
.jcard-exam {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
}
.jcard-mini {
  position: relative;
  height: 92px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-2);
}
.jcard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.jcard-meta span {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 11.5px;
}
.jcard-task {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--strong);
  font-size: 11.5px;
  font-weight: 600;
}
.jcard-task code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-2);
  font-size: 10.5px;
  font-weight: 500;
}
.board-inspector {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 250px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
}
.board-inspector h3 {
  margin-bottom: 8px;
  font-size: 15px;
}
.board-inspector dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin: 0;
}
.board-inspector dt {
  color: var(--muted);
}
.board-inspector dd {
  margin: 0;
  color: var(--strong);
  font-weight: 500;
}
.board-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.board-zoom button {
  width: 30px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--strong);
  font: 600 15px var(--font);
  cursor: pointer;
}
.board-zoom button:hover {
  background: var(--surface-2);
}
.board-hint {
  position: absolute;
  bottom: 16px;
  left: 16px;
  color: var(--muted);
  font-size: 12px;
}

/* Mini schematics inside journey cards. */
.mini-doc i,
.mini-3d i,
.mini-hmi i,
.mini-exam i {
  position: absolute;
  display: block;
  border-radius: 3px;
  background: var(--line-2);
}
.mini-doc i:nth-child(1) { left: 14%; top: 16%; width: 52%; height: 9px; background: var(--strong); opacity: 0.6; }
.mini-doc i:nth-child(2) { left: 14%; top: 36%; width: 72%; height: 5px; }
.mini-doc i:nth-child(3) { left: 14%; top: 48%; width: 64%; height: 5px; }
.mini-doc i:nth-child(4) { left: 14%; top: 64%; width: 72%; height: 22%; background: var(--accent-soft); }
.mini-3d { background: linear-gradient(180deg, var(--surface-2) 45%, color-mix(in srgb, var(--line-2) 55%, var(--surface-2)) 45%) !important; }
.mini-3d i:nth-child(1) { left: 22%; top: 50%; width: 58%; height: 10px; transform: skewX(-30deg); background: var(--muted); }
.mini-3d i:nth-child(2) { left: 32%; top: 30%; width: 14px; height: 14px; background: #e9d68a; }
.mini-3d i:nth-child(3) { left: 8%; bottom: 10%; width: 34%; height: 28%; background: var(--surface); box-shadow: var(--shadow); }
.mini-3d i:nth-child(4) { right: 8%; top: 12%; width: 30%; height: 34%; background: var(--hmi-panel); box-shadow: var(--shadow); }
.mini-hmi { background: var(--hmi-bg) !important; }
.mini-hmi i:nth-child(1) { left: 8%; top: 12%; width: 84%; height: 8px; background: var(--hmi-line); }
.mini-hmi i:nth-child(2) { left: 8%; top: 32%; width: 22%; height: 20px; background: var(--hmi-panel); border: 1px solid var(--hmi-line); }
.mini-hmi i:nth-child(3) { left: 34%; top: 32%; width: 22%; height: 20px; background: var(--hmi-ink); }
.mini-hmi i:nth-child(4) { right: 8%; top: 32%; width: 22px; height: 22px; border-radius: 50%; background: var(--alarm); box-shadow: 0 0 0 3px #f2c200; }
.mini-exam { display: grid; place-items: center; }
.mini-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0 80%, var(--line-2) 0);
  -webkit-mask: radial-gradient(circle, transparent 21px, #000 22px);
  mask: radial-gradient(circle, transparent 21px, #000 22px);
}

/* -------------------------------------------------------------- task demo (ISA-101 HMI) */

.task-demo {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  overflow: hidden;
  padding: 0;
}
.hmi {
  padding: 16px;
  background: var(--hmi-bg);
  color: var(--hmi-ink);
  font: 600 11px var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hmi-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
}
.hmi-alarm {
  margin-bottom: 12px;
  padding: 6px 9px;
  border: 1px solid var(--hmi-line);
  background: var(--hmi-panel);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.hmi-alarm.is-active {
  border-color: #b8860b;
  background: #f2c200;
  color: #1b1b1b;
  font-weight: 700;
}
.hmi-belt {
  position: relative;
  height: 54px;
  margin: 6px 0 16px;
  border: 2px solid var(--hmi-ink);
  border-radius: 28px;
  background: repeating-linear-gradient(90deg, var(--hmi-panel) 0 16px, #c8cacc 16px 18px);
  background-size: 18px 100%;
}
.hmi-belt.is-running {
  animation: belt 0.6s linear infinite;
}
@keyframes belt {
  to {
    background-position: 18px 0;
  }
}
.hmi-belt::before,
.hmi-belt::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border: 2px solid var(--hmi-ink);
  border-radius: 50%;
  background: var(--hmi-panel);
}
.hmi-belt::before {
  left: 8px;
}
.hmi-belt::after {
  right: 8px;
}
.hmi-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.hmi-btn {
  min-width: 82px;
  height: 38px;
  border: 1px solid var(--hmi-line);
  background: var(--hmi-panel);
  color: var(--hmi-ink);
  font: 700 11.5px var(--font);
  letter-spacing: 0.05em;
  cursor: pointer;
}
.hmi-btn:active {
  transform: translateY(1px);
}
.hmi-btn.is-on {
  border-color: var(--hmi-ink);
  background: var(--hmi-ink);
  color: #f2f2f2;
}
.hmi-motor {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--hmi-ink);
  border-radius: 50%;
  background: var(--hmi-panel);
  font-weight: 800;
  font-size: 13px;
  transition: background 0.2s, color 0.2s;
}
.hmi-motor.is-on {
  background: var(--hmi-ink);
  color: #f2f2f2;
}
.hmi-label {
  display: grid;
  justify-items: center;
  gap: 3px;
  font-size: 9.5px;
}
.hmi-analog {
  display: grid;
  gap: 4px;
  min-width: 150px;
}
.hmi-bar {
  position: relative;
  height: 16px;
  border: 1px solid var(--hmi-line);
  background: var(--hmi-panel);
}
.hmi-bar .band {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 40%;
  width: 35%;
  background: #c4c6c9;
}
.hmi-bar .pointer {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 3px;
  margin-left: -1.5px;
  background: var(--hmi-ink);
  transition: left 0.35s, background 0.2s;
}
.hmi-bar .pointer.is-abnormal {
  background: #e06a00;
  box-shadow: 0 0 0 2px rgba(224, 106, 0, 0.35);
}
.hmi-value {
  font: 600 12px var(--mono);
  text-transform: none;
}
.hmi-estop {
  width: 52px;
  height: 52px;
  margin-left: auto;
  border: 5px solid #f2c200;
  border-radius: 50%;
  background: #d8392f;
  color: #fff;
  font: 800 8.5px var(--font);
  cursor: pointer;
}
.hmi-estop.is-on {
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.45);
}
.hmi-door {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--hmi-line);
  background: var(--hmi-panel);
  font-weight: 600;
  cursor: pointer;
}
.hmi-door {
  font: 700 11px var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hmi-ink);
}
.hmi-door-icon {
  width: 22px;
  height: 14px;
  border: 2px solid var(--hmi-ink);
  background: linear-gradient(90deg, var(--hmi-ink) 0 50%, transparent 50%);
  transition: background 0.2s;
}
.hmi-door[aria-pressed="false"] .hmi-door-icon {
  background: var(--hmi-ink);
}
.hmi input[type="range"] {
  accent-color: var(--hmi-ink);
}
.task-side {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
  border-left: 1px solid var(--line);
}
.mini-path {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
}
.mini-path li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 5px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}
.mini-path li b {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--line);
  color: var(--text);
  font: 600 10px var(--mono);
}
.mini-path li.is-done b,
.mini-path li.is-current b {
  background: var(--accent);
  color: #fff;
}
.mini-path li.is-current {
  color: var(--strong);
  font-weight: 600;
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.task-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--strong);
  font-weight: 600;
  transition: background 0.3s, border-color 0.3s;
}
.task-card small {
  color: var(--muted);
  font: 500 11.5px var(--mono);
}
.task-card.is-met {
  border-style: solid;
  border-color: color-mix(in srgb, var(--ok) 60%, transparent);
  background: color-mix(in srgb, var(--ok) 13%, transparent);
}
.task-step h3 {
  margin-bottom: 6px;
  font-size: 18px;
}
.task-step p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}
.task-actions {
  display: flex;
  gap: 8px;
}
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* -------------------------------------------------------------- 3D cell + CCTV */

.cell-card {
  position: relative;
  margin-bottom: 16px;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, var(--surface) 0%, var(--surface-2) 70%);
}
.cell-view {
  position: relative;
  height: clamp(340px, 46vw, 540px);
  cursor: grab;
}
.cell-view:active {
  cursor: grabbing;
}
.cell-view canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.cell-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}
.cell-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}
.cell-badges .chip {
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.cctv {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: min(32%, 340px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.3);
  color: #e8efe9;
  font: 600 10px var(--mono);
  letter-spacing: 0.06em;
  pointer-events: none;
  /* The 3D renders the CCTV view underneath; this washes it into a camera feed. */
  backdrop-filter: grayscale(0.75) contrast(1.18) brightness(1.06) sepia(0.12);
  -webkit-backdrop-filter: grayscale(0.75) contrast(1.18) brightness(1.06) sepia(0.12);
}
.cctv-fx {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px),
    radial-gradient(120% 120% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  animation: grain 0.5s steps(4) infinite;
}
@keyframes grain {
  25% { background-position: 0 0, 0 0, -30px 20px; }
  50% { background-position: 0 1px, 0 0, 40px -10px; }
  75% { background-position: 0 0, 0 0, -10px -40px; }
}
.cctv span {
  position: absolute;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.cctv-name {
  top: 7px;
  left: 9px;
}
.cctv-time {
  bottom: 7px;
  left: 9px;
}
.cctv-rec {
  top: 7px;
  right: 9px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.cctv-rec i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  animation: rec 1.2s steps(2) infinite;
}
@keyframes rec {
  50% { opacity: 0.2; }
}
@media (max-width: 600px) {
  .cctv {
    width: 46%;
  }
  .cell-badges .chip:last-child {
    display: none;
  }
  .cell-badges .chip-live {
    max-width: none;
  }
  .cctv {
    font-size: 8px;
  }
  .cctv-rec {
    font-size: 0;
  }
}

/* -------------------------------------------------------------- exam gate */

.gate {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: center;
  padding: 26px;
}
.score {
  --score: 33;
  --pass: 80;
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(var(--ring, var(--alarm)) calc(var(--score) * 1%), var(--line) 0);
  transition: --score 0.4s;
}
.score::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: var(--surface);
}
.score::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 18px;
  margin-left: -1.5px;
  transform: rotate(calc(var(--pass) * 3.6deg));
  transform-origin: 50% 75px;
  border-radius: 2px;
  background: var(--strong);
}
.score b,
.score span {
  position: relative;
}
.score b {
  color: var(--strong);
  font-size: 34px;
  letter-spacing: -0.03em;
}
.score span {
  margin-top: -36px;
  color: var(--muted);
  font-size: 12px;
}
.score-inner {
  position: relative;
  display: grid;
  justify-items: center;
}
.gate h3 {
  font-size: 24px;
}
.gate p {
  margin: 6px 0 14px;
  color: var(--muted);
}
.gate-routes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gate-slider {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}
.gate-slider input {
  width: 100%;
  accent-color: var(--accent);
}

/* -------------------------------------------------------------- ISA-101 */

.isa {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.isa-panel {
  overflow: hidden;
}
.isa-panel header {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--strong);
  font-size: 14px;
  font-weight: 600;
}
.isa-panel header span {
  color: var(--muted);
  font-weight: 500;
}
.isa-panel svg {
  display: block;
  width: 100%;
  height: auto;
}
.isa-control {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}
.isa-control input {
  flex: 1;
  accent-color: var(--accent);
}

/* -------------------------------------------------------------- roles */

.roles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.role {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px;
}
.role-tag {
  justify-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
}
.role h3 {
  font-size: 21px;
}
.role p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.role ul {
  display: grid;
  gap: 9px;
  margin: 6px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 14px;
}
.role li {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 8px;
  align-items: baseline;
  color: var(--strong);
}
.role li::before {
  content: "✓";
  color: var(--ok);
  font-weight: 800;
}
.role li.is-soon {
  color: var(--muted);
}
.role li.is-soon::before {
  content: "◇";
  color: var(--muted);
}
.role li em {
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
@media (max-width: 980px) {
  .roles {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -------------------------------------------------------------- brand demo */

.brand-demo {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  overflow: hidden;
  padding: 0;
}
.brand-form {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
  border-right: 1px solid var(--line);
}
.brand-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.brand-form input[type="text"] {
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--strong);
  font: 500 14px var(--font);
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.swatches button {
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.swatches button[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--strong);
}
.seg {
  display: flex;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface-2);
}
.seg button {
  flex: 1;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: 500 13px var(--font);
  cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--strong);
}
.player-preview {
  --pv-bg: #0b1220;
  --pv-surface: #131c2e;
  --pv-text: #e7ebf3;
  --pv-muted: #8d97ab;
  --pv-accent: #fb923c;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 360px;
  background: var(--pv-bg);
  color: var(--pv-text);
  transition: background 0.3s;
}
.pv-path {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--pv-text) 10%, transparent);
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
}
.pv-org {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 14px;
  border-right: 1px solid color-mix(in srgb, var(--pv-text) 14%, transparent);
  font-weight: 700;
}
.pv-org-badge {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--pv-accent);
  color: var(--pv-bg);
  font-size: 12px;
  font-weight: 800;
}
.pv-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pv-muted);
}
.pv-step b {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pv-text) 14%, transparent);
  font-size: 10px;
}
.pv-step.is-done b,
.pv-step.is-current b {
  background: var(--pv-accent);
  color: var(--pv-bg);
}
.pv-step.is-current {
  color: var(--pv-text);
  font-weight: 600;
}
.pv-stage {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 90% at 70% 10%, color-mix(in srgb, var(--pv-text) 8%, transparent), transparent 60%);
}
.pv-card {
  position: absolute;
  bottom: 18px;
  left: 18px;
  width: min(300px, calc(100% - 36px));
  padding: 16px;
  border-radius: 12px;
  background: var(--pv-surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.pv-card small {
  color: var(--pv-accent);
  font: 700 11px var(--mono);
  letter-spacing: 0.06em;
}
.pv-card h4 {
  margin: 6px 0 4px;
  font-size: 16px;
}
.pv-card p {
  margin: 0 0 12px;
  color: var(--pv-muted);
  font-size: 13px;
}
.pv-card button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--pv-accent);
  color: var(--pv-bg);
  font: 700 13px var(--font);
}
.pv-belt {
  position: absolute;
  top: 44%;
  right: 8%;
  width: 52%;
  height: 26px;
  transform: skewX(-28deg);
  border-radius: 5px;
  background: color-mix(in srgb, var(--pv-text) 26%, transparent);
}
.pv-box {
  position: absolute;
  top: 31%;
  right: 34%;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  background: #e9d68a;
}

/* -------------------------------------------------------------- delivery */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.tile {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
}
.tile svg {
  width: 34px;
  height: 34px;
  color: var(--accent);
}
.tile h3 {
  font-size: 18px;
}
.tile p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* -------------------------------------------------------------- repo */

.repo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.tree {
  margin: 0;
  padding: 20px 22px;
  overflow: auto;
  color: var(--text);
  font: 13.5px/1.75 var(--mono);
  white-space: pre;
}
.tree .dir {
  color: var(--strong);
  font-weight: 600;
}
.tree .new {
  color: var(--accent-ink);
}
.tree .cm {
  color: var(--muted);
}

/* -------------------------------------------------------------- toolkit */

.toolkit {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tool {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 22px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
}
.tool:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.tool svg {
  flex: none;
}
.tool-body {
  display: grid;
  gap: 6px;
}
.tool h3 {
  font-size: 18px;
}
.tool p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}
.tool-arrow {
  color: var(--muted);
  font-weight: 500;
}
.tool.is-here {
  box-shadow: 0 0 0 1.5px var(--accent), var(--shadow);
}
.tool.is-soon:hover {
  transform: none;
  box-shadow: var(--shadow);
}
.soon-pill {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  vertical-align: middle;
}
@media (max-width: 980px) {
  .toolkit {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -------------------------------------------------------------- CTA + footer */

.cta {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  margin-top: 110px;
  padding: 64px 24px;
  overflow: hidden;
  border-radius: 22px;
  background: var(--ink);
  color: var(--on-ink);
  text-align: center;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--on-ink) 14%, transparent) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  mask-image: radial-gradient(70% 90% at 50% 0%, #000, transparent);
  -webkit-mask-image: radial-gradient(70% 90% at 50% 0%, #000, transparent);
}
.cta > * {
  position: relative;
}
.cta h2 {
  max-width: 18ch;
  color: var(--on-ink);
  font-size: clamp(32px, 5vw, 52px);
}
.cta p {
  max-width: 54ch;
  margin: 0;
  opacity: 0.72;
}
.cta .btn-quiet {
  background: transparent;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--on-ink) 30%, transparent);
  color: var(--on-ink);
}
footer.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 40px auto 0;
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}
footer.foot nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
}
footer.foot a {
  text-decoration: none;
}
footer.foot a:hover {
  color: var(--strong);
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }
  .nav-brand {
    margin-right: auto;
  }
  .split,
  .repo,
  .task-demo,
  .brand-demo,
  .isa {
    grid-template-columns: minmax(0, 1fr);
  }
  .task-side,
  .brand-form {
    border: 0;
    border-top: 1px solid var(--line);
  }
  .brand-form {
    order: 2;
  }
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .board-inspector {
    display: none;
  }
}
@media (max-width: 600px) {
  .nav .btn-label {
    display: none;
  }
  .section {
    padding-top: 72px;
  }
  .tiles {
    grid-template-columns: 1fr;
  }
  .gate {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .gate-routes {
    justify-content: center;
  }
  .board-canvas {
    height: 360px;
  }
  .board-bar .crumb {
    display: none;
  }
  .board-bar strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .chip-live {
    max-width: 46%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hmi-estop {
    margin-left: 0;
  }
}
