/* Archivo (SIL OFL 1.1, fonts/OFL.txt), served from this site: no request leaves edgevisor.eu. */
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Layout: one left-aligned engineering column (max 1240px). Sections alternate the camera's own
   lighting modes: "dark field" (graphite) and "bright field" (frost); the hardware chapter sits on
   the housing's anodized blue. Colour keeps the meaning it has on the device: green = PASS only,
   red = FAIL only, amber = fault only, cyan = what EdgeVISOR draws (ROI, overlays, brand). */
:root {
  --graphite: #0c1114;
  --graphite-2: #141b20;
  --graphite-3: #1e272e;
  --line-d: rgba(196, 222, 232, 0.13);
  --text-d: #e6edf0;
  --muted-d: #8fa0aa;

  --frost: #e7ecef;
  --frost-2: #d6dee3;
  --ink: #0d1418;
  --muted-l: #46545d;
  --line-l: rgba(13, 20, 24, 0.14);

  --anod: #2a84cf;
  --anod-deep: #1b5d97;
  --anod-ink: #04182a;

  --signal: #43e0f0;
  --signal-ink: #0a6f7c;
  --pass: #3bdb86;
  --fail: #ff5a5a;
  --fault: #ffb224;

  /* One family, three widths: expanded for display, normal for reading, condensed for readouts. */
  --f: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --w-display: 125%;
  --w-body: 100%;
  --w-data: 72%;

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.86rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.25rem + 1.2vw, 2.2rem);
  --step-3: clamp(2rem, 1.4rem + 2.8vw, 3.6rem);
  --step-4: clamp(2.6rem, 1.5rem + 5vw, 5.6rem);

  --col: 1240px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --gut: clamp(16px, 4vw, 48px);
  --sec-pad: clamp(72px, 10vw, 160px);
  --radius: 6px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--graphite);
  color: var(--text-d);
  font-family: var(--f);
  font-stretch: var(--w-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--graphite);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  max-width: calc(var(--col) + 2 * var(--gut));
  margin-inline: auto;
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
}

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; font-stretch: var(--w-display); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 800; }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
p { margin: 0; max-width: 62ch; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--muted-d); max-width: 54ch; }
.num { font-stretch: var(--w-data); font-variant-numeric: tabular-nums; }
.sec-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 6vw, 80px); max-width: 900px; }

/* ---------- surfaces ---------- */
.dark { background: var(--graphite); color: var(--text-d); }
.bright { background: var(--frost); color: var(--ink); }
.bright .lede { color: var(--muted-l); }
.anod { background: var(--anod); color: var(--anod-ink); }
.anod .lede { color: rgba(4, 24, 42, 0.78); }
section { padding-block: var(--sec-pad); position: relative; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 650; font-size: var(--step-0); text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--signal); color: #04161a; }
.btn-primary:hover { background: #7beaf5; }
.btn-ghost { border-color: var(--line-d); color: var(--text-d); background: transparent; }
.btn-ghost:hover { border-color: var(--signal); }
.bright .btn-ghost { border-color: var(--line-l); color: var(--ink); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 50;
  transition: background-color .3s, backdrop-filter .3s;
}
.nav.solid { background: rgba(12, 17, 20, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-d); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.wordmark { font-stretch: var(--w-display); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em; text-decoration: none; color: var(--text-d); }
.wordmark span { color: var(--signal); font-weight: 400; }
.nav-links { display: flex; gap: 22px; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a { text-decoration: none; color: var(--muted-d); font-size: var(--step--1); }
.nav-links a:hover { color: var(--text-d); }
.lang { display: flex; border: 1px solid var(--line-d); border-radius: 999px; padding: 2px; }
.lang button { background: none; border: 0; padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 650; color: var(--muted-d); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--text-d); color: var(--graphite); }
.nav .btn { padding: 9px 16px; font-size: var(--step--1); }
@media (max-width: 980px) { .nav-links { display: none; } .lang { margin-left: auto; } }
@media (max-width: 520px) { .nav .btn { display: none; } }
/* phones: the header has no CTA, so a sticky one stands in (site.js shows it between the hero CTA and #contact) */
.sticky-cta { display: none; }
@media (max-width: 520px) {
  .sticky-cta.on {
    display: inline-flex; position: fixed; z-index: 40; right: var(--gutter-r);
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    padding: 12px 20px; font-size: var(--step--1); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  }
  .sticky-cta.on:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; box-shadow: 0 0 0 3px #04161a, 0 6px 20px rgba(0, 0, 0, 0.35); }
}

/* ======================================================================
   STAGE: hero + dive through the lens + what the camera sees
   Without JS (or with reduced motion) both parts sit one after another.
   ====================================================================== */
.stage { padding: 0; }
.hero { padding-block: calc(64px + clamp(32px, 7vw, 96px)) clamp(48px, 6vw, 80px); position: relative; overflow: hidden; }
.hero-main { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 28px; position: relative; z-index: 2; }
.hero-copy h1 { max-width: 12ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line-d) 1px, transparent 1px), linear-gradient(90deg, var(--line-d) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 45%, #000 20%, transparent 75%);
}

.device { position: relative; width: min(100%, 480px); margin-inline: auto; aspect-ratio: 830 / 1032; }
.device-zoom { position: absolute; inset: 0; transform-origin: 28.3% 42.5%; will-change: transform; }
.device img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .55)); }
.glow {
  position: absolute; width: 26%; aspect-ratio: 1; border-radius: 50%; translate: -50% -50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .95) 0%, rgba(214, 246, 255, .55) 22%, rgba(67, 224, 240, .18) 48%, transparent 70%);
  mix-blend-mode: screen; opacity: 0; pointer-events: none;
}
.glow.q1 { left: 24.5%; top: 23%; } .glow.q2 { left: 36.5%; top: 24%; }
.glow.q3 { left: 25.5%; top: 62%; } .glow.q4 { left: 37%; top: 62.5%; }
.no-js .glow, .reduced .glow { opacity: .85; }
.viewfinder { position: absolute; inset: -6%; pointer-events: none; transform-origin: 28.3% 42.5%; }
.viewfinder i { position: absolute; width: 34px; height: 34px; border: 2px solid var(--signal); }
.viewfinder i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.viewfinder i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.viewfinder i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.viewfinder i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.lock-tag {
  position: absolute; left: 0; top: 0; translate: 0 calc(-100% - 10px);
  font-stretch: var(--w-data); font-size: var(--step--1); color: var(--signal); white-space: nowrap;
}

.spec-rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line-d); }
.spec-rail div { padding: 18px 16px 0 0; display: grid; gap: 2px; }
.spec-rail dt { order: 2; color: var(--muted-d); font-size: var(--step--1); line-height: 1.35; }
.spec-rail dd { order: 1; margin: 0; font-size: var(--step-2); font-weight: 700; font-stretch: var(--w-data); font-variant-numeric: tabular-nums; line-height: 1.1; }
.spec-rail { margin-inline: 0; }
@media (max-width: 860px) {
  .hero-main { grid-template-columns: 1fr; }
  .hero-copy h1 { max-width: 14ch; }
  .device { width: min(78%, 380px); }
  .spec-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
}
@media (max-width: 480px) { .spec-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* stage exit: bright field switches on row by row (a rolling-shutter wipe) into the LIGHT section */
.stage-out { display: none; }
.motion .stage-out {
  display: block; position: absolute; inset: 0; z-index: 6; pointer-events: none; visibility: hidden;
  background: var(--frost);
}
/* iris: the ring the camera view opens through (motion mode only) */
.iris { display: none; }
.motion .iris {
  display: block; position: absolute; left: 0; top: 0; z-index: 5; border-radius: 50%; pointer-events: none; opacity: 0;
  border: 2px solid var(--signal); box-shadow: 0 0 28px rgba(67, 224, 240, .45), inset 0 0 36px rgba(67, 224, 240, .22);
  will-change: transform, width, height;
}

/* ---- the camera view ---- */
.see { background: #020405; padding-block: clamp(64px, 8vw, 120px); }
.see .wrap { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.see-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.see-steps li { display: grid; gap: 8px; }
.see-steps .k { font-stretch: var(--w-data); color: var(--signal); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.see-steps p { color: var(--muted-d); font-size: var(--step-0); }

.view { display: grid; gap: 12px; min-width: 0; }
.frame { position: relative; aspect-ratio: 4056 / 3040; border-radius: 4px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line-d); }
.frame img { width: 100%; height: 100%; object-fit: cover; will-change: filter; }
.frame .flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; mix-blend-mode: soft-light; }
.overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.overlay .roi { fill: rgba(59, 219, 134, .08); stroke: var(--pass); stroke-width: 2; vector-effect: non-scaling-stroke; }
.overlay .ring { fill: none; stroke: var(--pass); stroke-width: 2; vector-effect: non-scaling-stroke; }
.overlay .fix { fill: none; stroke: var(--signal); stroke-width: 1.5; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
/* The overlay is drawn in sensor pixels (4056 x 3040), so type is sized in sensor pixels too. */
.overlay .edge { fill: var(--fault); }
.overlay .cross { stroke: var(--fault); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.overlay .tag rect { fill: rgba(0, 0, 0, .78); stroke: var(--pass); stroke-width: 1; vector-effect: non-scaling-stroke; }
.overlay .tag text { fill: #fff; font: 600 64px var(--f); font-stretch: var(--w-data); }
.overlay .fixtag rect { stroke: var(--signal); }
.overlay .fixtag text { fill: var(--signal); }
.hud { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-stretch: var(--w-data); font-variant-numeric: tabular-nums; font-size: var(--step--1); color: var(--muted-d); }
.hud b { color: var(--text-d); font-weight: 650; }
.hud .verdict { margin-left: auto; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--pass); color: var(--pass); font-weight: 700; font-stretch: var(--w-body); letter-spacing: .06em; }
.hud .light-on { color: var(--signal); }
.focus-chart { width: 100%; height: 56px; display: block; }
.focus-chart .curve { fill: none; stroke: var(--line-d); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.focus-chart .c { fill: var(--muted-d); }
.focus-chart .f { fill: var(--signal); }
.focus-chart .now { stroke: var(--signal); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tools-live { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 14px; font-stretch: var(--w-data); font-size: 0.78rem; color: var(--muted-d); font-variant-numeric: tabular-nums; }
.tools-live li { display: flex; justify-content: space-between; gap: 6px; border-top: 1px solid var(--line-d); padding-top: 4px; }
.tools-live li b { color: var(--pass); font-weight: 600; }
@media (max-width: 860px) {
  .see .wrap { grid-template-columns: 1fr; }
  .tools-live { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* pinned mode (JS + motion allowed) */
.motion .stage-pin { height: 100vh; height: 100svh; position: relative; overflow: hidden; }
.motion .stage-pin .hero { height: 100%; display: flex; flex-direction: column; justify-content: safe center; padding-block: 72px 20px; }
.motion .stage-pin .hero h1 { font-size: min(var(--step-4), 8.4svh); }
.motion .stage-pin .device { width: min(100%, 480px, 52svh); }
.motion .stage-pin .hero > .wrap { width: 100%; }
.motion .stage-pin .see { position: absolute; inset: 0; z-index: 4; visibility: hidden; will-change: clip-path; display: flex; align-items: center; padding-block: 72px 20px; }
.motion .stage-pin .see > .wrap { width: 100%; }
.motion .see-steps { position: relative; min-height: 13em; }
.motion .see-steps li { position: absolute; inset: 0 0 auto 0; opacity: 0; transition: opacity .35s, translate .35s; translate: 0 10px; }
.motion .see-steps li.on { opacity: 1; translate: 0 0; }
.motion .view { width: min(100%, calc((100svh - 250px) * 1.334)); justify-self: center; }
.motion .see-steps h2 { font-size: var(--step-2); }
.motion .overlay [data-draw] { opacity: 0; }
@media (max-width: 860px) {
  .motion .see-steps { min-height: 8.5em; order: 2; }
  .motion .see .wrap { gap: 14px; }
  .motion .tools-live { display: none; }
  .motion .view { width: min(100%, calc((100svh - 360px) * 1.334)); }
}
.motion .spec-rail { margin-top: clamp(24px, 4vh, 56px); }
@media (max-height: 760px) and (min-width: 861px) { .motion .hero .lede { font-size: var(--step-0); } }

/* ======================================================================
   LIGHT
   ====================================================================== */
.light-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 8px 0 0; border-top: 1px solid var(--line-l); padding-top: 20px; max-width: 460px; }
.light-facts dd { margin: 0; font-size: var(--step-2); font-weight: 700; font-stretch: var(--w-data); font-variant-numeric: tabular-nums; }
.light-facts dt { color: var(--muted-l); font-size: var(--step--1); }
.light-facts div { display: grid; }
.light-facts dt { order: 2; } .light-facts dd { order: 1; }

.quad-lab { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.quad-ctrl { display: grid; gap: 18px; }
.quad-ctrl h2 { font-size: var(--step-2); }
.strobe-lab { display: grid; gap: 20px; max-width: 900px; }
.quad-face { position: relative; width: min(100%, 300px); aspect-ratio: 1; background: #121a1f; border-radius: 14px; padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; box-shadow: inset 0 0 0 8px #0a0f12; }
.quad-face button {
  border: 1px solid #2c3840; border-radius: 6px; background: #19232a; cursor: pointer;
  display: grid; place-items: center; font-size: var(--step--1); color: #8fa0aa; font-stretch: var(--w-data);
  transition: background-color .2s, box-shadow .2s, color .2s;
}
.quad-face button[aria-pressed="true"] { background: #f4fbfd; color: var(--ink); box-shadow: 0 0 28px rgba(200, 245, 255, .55); }
.quad-face .lens { position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #33424c, #05080a 70%); box-shadow: 0 0 0 6px #0a0f12; pointer-events: none; }
.quad-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line-l); background: transparent; border-radius: 999px; padding: 6px 14px; font-size: var(--step--1); cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--ink); }
.sample {
  position: relative; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; display: grid; place-items: center;
  background: #8d979d; transition: background .4s;
}
.sample .emb {
  font-stretch: var(--w-display); font-weight: 800; font-size: clamp(1.6rem, 1rem + 3vw, 3.2rem); letter-spacing: .04em;
  color: #8d979d; transition: text-shadow .4s, color .4s; text-align: center; line-height: 1.05;
}
.sample .scr { position: absolute; inset: 0; pointer-events: none; transition: opacity .4s; }
.sample-cap { font-size: var(--step--1); color: var(--muted-l); margin-top: 10px; }
@media (max-width: 860px) {
  .quad-lab { grid-template-columns: 1fr; }
}

/* ======================================================================
   CYCLE (horizontal)
   ====================================================================== */
.cycle { overflow: hidden; }
.cycle-track { display: flex; gap: 16px; padding-bottom: 8px; }
.cycle-step {
  flex: 0 0 clamp(250px, 26vw, 330px); display: grid; align-content: start; gap: 12px;
  padding: 24px 22px 28px; border: 1px solid var(--line-d); border-radius: var(--radius); background: var(--graphite-2);
  position: relative;
}
.cycle-step .n { font-stretch: var(--w-data); color: var(--signal); font-variant-numeric: tabular-nums; font-size: var(--step--1); }
.cycle-step p { color: var(--muted-d); font-size: 0.95rem; }
.cycle-step.decide { border-color: rgba(59, 219, 134, .5); }
.cycle-step.decide .vv { display: flex; gap: 6px; flex-wrap: wrap; font-size: .78rem; font-weight: 700; letter-spacing: .05em; }
.vv span { padding: 3px 9px; border-radius: 999px; border: 1px solid; }
.vv .p { color: var(--pass); } .vv .f { color: var(--fail); } .vv .e { color: var(--fault); }
.cycle-rule { position: relative; height: 2px; background: var(--line-d); margin: 34px 0 14px; }
.cycle-rule i { position: absolute; inset: 0 auto 0 0; width: 100%; background: var(--signal); transform-origin: left; box-shadow: 0 0 12px var(--signal); }
.cycle-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; font-size: var(--step--1); color: var(--muted-d); }
.cycle-meta b { color: var(--text-d); font-stretch: var(--w-data); }
.cycle-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: clamp(48px, 6vw, 80px); }
.cycle-notes p { color: var(--muted-d); font-size: .95rem; margin-top: 8px; }
@media (min-width: 861px) { .motion .cycle .cycle-track { width: max-content; } }
@media (max-width: 860px) {
  .cycle-track { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; }
  .cycle-step { scroll-snap-align: start; flex-basis: 78%; }
  .cycle-notes { grid-template-columns: 1fr; }
}

/* ======================================================================
   TOOLS
   ====================================================================== */
/* The browser: the tool list on the left, the viewer (a camera screen) on the right. js/tools.js plays each
   tool on its own synthetic frame; the list auto-advances until the visitor picks a tool. */
.tools-ui { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); align-items: start; }
.tool-groups { display: grid; gap: 0; }
.tgroup { padding: 14px 0; display: grid; align-content: start; gap: 2px; }
.tgroup + .tgroup { border-top: 1px solid var(--line-l); }
.tgroup:first-child { padding-top: 0; }
.tgroup h3 {
  font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-stretch: var(--w-data);
  color: var(--muted-l); margin-bottom: 6px; display: flex; justify-content: space-between; gap: 8px;
}
.tgroup h3 small { font-weight: 600; color: var(--muted-l); opacity: .7; }
.tool {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 1px solid transparent;
  padding: 6px 10px; border-radius: 8px; cursor: pointer; color: var(--ink); font-size: .93rem; line-height: 1.25;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
/* The glyphs are the HMI's own tool icons (Material Icons, Apache 2.0, as NiceGUI ships them), so a
   tool looks the same here as in the camera's Tools tab. */
.tool svg { flex: none; width: 22px; height: 22px; fill: var(--signal-ink); transition: fill .2s; }
.tool:hover { background: #fff; border-color: var(--line-l); }
.tool[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 8px 20px rgba(13, 20, 24, .18); }
.tool[aria-pressed="true"] svg { fill: var(--signal); }
.tool .npu { margin-left: auto; font-size: .66rem; color: var(--muted-l); border: 1px solid var(--line-l); border-radius: 4px; padding: 1px 5px; }
.tool[aria-pressed="true"] .npu { color: #c9d6dc; border-color: rgba(255, 255, 255, .25); }
/* the auto-tour's time on the current tool */
.tool::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; border-radius: 1px; background: var(--signal);
  transform: scaleX(var(--tour, 0)); transform-origin: left; opacity: .9; pointer-events: none;
}

.tool-viewer {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); min-width: 0;
  background: var(--graphite); color: var(--text-d); border-radius: 16px; overflow: hidden;
  box-shadow: 0 40px 80px -20px rgba(13, 20, 24, .45), 0 0 0 1px rgba(13, 20, 24, .1);
}
@media (min-width: 1181px) { .tool-viewer { position: sticky; top: 88px; } }
.tv-screen { position: relative; background: #020405; display: flex; flex-direction: column; min-width: 0; }
.tv-frame { position: relative; flex: 1 0 auto; aspect-ratio: 4 / 3; overflow: hidden; background: #0a0e10; }
.tv-frame img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s, filter .35s; }
.tv-frame.loading img { opacity: .35; filter: blur(6px); }
.tv-svg { position: absolute; inset: 0; width: 100%; height: 100%; font-family: var(--f); --u: 1; }
.tv-hud {
  position: absolute; left: 12px; right: 12px; top: 12px; display: flex; justify-content: space-between; gap: 8px;
  font-stretch: var(--w-data); font-size: .76rem; font-weight: 600; letter-spacing: .02em; pointer-events: none;
}
.tv-hud > span { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 999px; background: rgba(2, 4, 5, .62); color: var(--text-d); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tv-rec i { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 8px var(--signal); animation: tv-blink 1.6s ease-in-out infinite; }
.tool-viewer.npu .tv-rec::after { content: "NPU"; font-size: .66rem; color: var(--muted-d); border: 1px solid var(--line-d); border-radius: 4px; padding: 0 5px; }
.tv-step:empty { display: none; }
@keyframes tv-blink { 50% { opacity: .25; } }
.tv-corners { position: absolute; inset: 10px; pointer-events: none; }
.tv-corners i { position: absolute; width: 18px; height: 18px; border: 2px solid rgba(67, 224, 240, .55); }
.tv-corners i:nth-child(1) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.tv-corners i:nth-child(2) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.tv-corners i:nth-child(3), .tv-corners i:nth-child(4) { display: none; }
.tv-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-top: 1px solid var(--line-d); font-stretch: var(--w-data); min-height: 56px; }
.tv-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; font-weight: 600; color: var(--text-d); }
.tv-v {
  flex: none; padding: 4px 13px; border-radius: 999px; border: 1px solid var(--line-d); color: var(--muted-d);
  font-weight: 750; letter-spacing: .07em; font-size: .78rem; font-stretch: var(--w-body); transition: color .25s, border-color .25s, box-shadow .25s;
}
.tv-v.pass { color: var(--pass); border-color: var(--pass); box-shadow: 0 0 18px rgba(59, 219, 134, .35); }
.tv-v.fail { color: var(--fail); border-color: var(--fail); box-shadow: 0 0 18px rgba(255, 90, 90, .35); }
.tv-replay { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-d); background: none; cursor: pointer; display: grid; place-items: center; transition: border-color .2s; }
.tv-replay svg { width: 17px; height: 17px; fill: var(--muted-d); transition: fill .2s; }
.tv-replay:hover { border-color: var(--signal); }
.tv-replay:hover svg { fill: var(--signal); }
.tv-progress { height: 2px; background: var(--line-d); }
.tv-progress i { display: block; height: 100%; background: var(--signal); transform: scaleX(0); transform-origin: left; box-shadow: 0 0 8px var(--signal); }
.no-js .tv-bar, .no-js .tv-progress, .no-js .tv-hud { display: none; }

.tv-info { padding: clamp(20px, 2.4vw, 32px); display: grid; gap: 14px; align-content: start; grid-template-rows: auto auto auto auto 1fr; border-left: 1px solid var(--line-d); }
.tv-group { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--signal); font-stretch: var(--w-data); }
.tv-info h3 { font-size: var(--step-2); }
.tv-info > p { color: var(--muted-d); font-size: .95rem; line-height: 1.55; }
.tv-steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: tvs; }
.tv-steps li {
  counter-increment: tvs; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 6px 12px; align-items: center;
  font-size: .9rem; line-height: 1.35; color: var(--muted-d); transition: color .3s;
}
.tv-steps li::before {
  content: counter(tvs); grid-row: 1 / span 2; align-self: start; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line-d); display: grid; place-items: center; font-size: .76rem; font-weight: 700; font-stretch: var(--w-data);
  transition: background-color .3s, color .3s, border-color .3s, box-shadow .3s;
}
.tv-steps li span { grid-column: 2; grid-row: 1; }
.tv-steps li i { grid-column: 2; grid-row: 2; height: 2px; border-radius: 1px; background: var(--line-d); position: relative; overflow: hidden; }
.tv-steps li i::after { content: ""; position: absolute; inset: 0; background: var(--signal); transform: scaleX(var(--p, 0)); transform-origin: left; }
.tv-steps li.on, .tv-steps li.done { color: var(--text-d); }
.tv-steps li.on::before { border-color: var(--signal); color: var(--signal); box-shadow: 0 0 14px rgba(67, 224, 240, .35); }
.tv-steps li.done::before { background: var(--signal); border-color: var(--signal); color: #04161a; }
.tv-note { align-self: end; font-size: .76rem; color: var(--muted-d); border-top: 1px solid var(--line-d); padding-top: 12px; }

/* what the tools draw, in the frame's pixels; --u is frame pixels per screen pixel (set by tools.js) */
.tv-svg .tv-roi { fill: none; stroke: var(--signal); stroke-width: calc(var(--u) * 1.6px); }
.tv-svg .dash { stroke-dasharray: calc(var(--u) * 7px) calc(var(--u) * 5px); }
.tv-svg .tv-ok { fill: none; stroke: var(--pass); stroke-width: calc(var(--u) * 2px); }
.tv-svg .tv-ok.thin { stroke-width: calc(var(--u) * 1.3px); }
.tv-svg .tv-bad { fill: rgba(255, 90, 90, .1); stroke: var(--fail); stroke-width: calc(var(--u) * 2px); }
.tv-svg .tv-badx { fill: none; stroke: var(--fail); stroke-width: calc(var(--u) * 3px); stroke-linecap: round; }
.tv-svg .tv-fit { fill: none; stroke: var(--pass); stroke-width: calc(var(--u) * 2.4px); filter: drop-shadow(0 0 calc(var(--u) * 4px) rgba(59, 219, 134, .7)); }
.tv-svg .tv-cal { fill: none; stroke: rgba(67, 224, 240, .8); stroke-width: calc(var(--u) * 1.2px); }
.tv-svg .tv-pt { fill: var(--fault); stroke: rgba(0, 0, 0, .55); stroke-width: calc(var(--u) * 1px); }
.tv-svg .tv-dim, .tv-svg .tv-path { fill: none; stroke: var(--signal); stroke-width: calc(var(--u) * 1.8px); }
.tv-svg .tv-cross { fill: none; stroke: var(--fault); stroke-width: calc(var(--u) * 1.8px); }
.tv-svg .tv-mk { fill: rgba(67, 224, 240, .15); stroke: var(--signal); stroke-width: calc(var(--u) * 2px); }
.tv-svg .tv-scan { fill: none; stroke: var(--signal); stroke-width: calc(var(--u) * 2px); filter: drop-shadow(0 0 calc(var(--u) * 6px) var(--signal)); }
.tv-svg .tv-scan.wide { stroke-width: calc(var(--u) * 3px); }
.tv-svg .tv-win { fill: rgba(67, 224, 240, .1); stroke: var(--signal); stroke-width: calc(var(--u) * 2px); filter: drop-shadow(0 0 calc(var(--u) * 8px) rgba(67, 224, 240, .8)); }
.tv-svg .tv-ghost path { fill: none; stroke: rgba(230, 237, 240, .6); stroke-width: calc(var(--u) * 1.4px); stroke-dasharray: calc(var(--u) * 6px) calc(var(--u) * 5px); }
.tv-svg .tv-cand path { fill: rgba(67, 224, 240, .1); stroke: var(--signal); stroke-width: calc(var(--u) * 2px); transition: stroke .3s, fill .3s; }
.tv-svg .tv-cand.lock path { fill: rgba(59, 219, 134, .12); stroke: var(--pass); }
.tv-svg .tv-axes path { fill: none; stroke-width: calc(var(--u) * 2.4px); stroke-linecap: round; stroke-linejoin: round; }
.tv-svg .tv-axes .x { stroke: var(--signal); }
.tv-svg .tv-axes .y { stroke: #fff; }
.tv-svg .tv-axes .o { fill: var(--signal); }
.tv-svg .tv-track { fill: rgba(255, 255, 255, .14); }
.tv-svg .tv-band { fill: rgba(59, 219, 134, .55); }
.tv-svg .tv-bandv { fill: rgba(59, 219, 134, .16); }
.tv-svg .tv-mark { fill: #fff; }
.tv-svg .tv-panel { fill: rgba(4, 8, 10, .82); stroke: rgba(196, 222, 232, .2); stroke-width: calc(var(--u) * 1px); }
.tv-svg .tv-hbar { fill: var(--signal); }
.tv-svg .tv-pbar { fill: var(--pass); }
.tv-svg .tv-axis { stroke: rgba(196, 222, 232, .4); stroke-width: calc(var(--u) * 1px); }
.tv-svg .tv-swatch { stroke: rgba(255, 255, 255, .85); stroke-width: calc(var(--u) * 1.5px); }
.tv-svg .tv-cut { fill: none; stroke: var(--signal); stroke-width: calc(var(--u) * 2.4px); stroke-linecap: round; }
.tv-svg .tv-curve { fill: none; stroke: var(--signal); stroke-width: calc(var(--u) * 2px); stroke-linejoin: round; }
.tv-svg .tv-pk { fill: var(--pass); }
.tv-svg .tv-tick { stroke: var(--pass); stroke-width: calc(var(--u) * 2.4px); }
.tv-svg .tv-wire { fill: none; stroke: rgba(67, 224, 240, .65); stroke-width: calc(var(--u) * 1.5px); }
.tv-svg .tv-find { fill: none; stroke: var(--signal); stroke-width: calc(var(--u) * 2.4px); filter: drop-shadow(0 0 calc(var(--u) * 4px) rgba(67, 224, 240, .8)); }
.tv-svg .tv-mod { fill: var(--signal); }
.tv-svg .tv-tile { fill: rgba(67, 224, 240, .05); stroke: rgba(67, 224, 240, .55); stroke-width: calc(var(--u) * 1px); }
.tv-svg .tv-fill { fill: rgba(67, 224, 240, .08); }
.tv-svg .tv-brk { fill: none; stroke: var(--signal); stroke-width: calc(var(--u) * 2.6px); stroke-linecap: round; }
.tv-svg .tv-mask-o { fill: none; stroke: #fff; stroke-width: calc(var(--u) * 1.4px); opacity: .85; }
.tv-svg .tv-bone { fill: none; stroke: var(--signal); stroke-width: calc(var(--u) * 3px); stroke-linecap: round; }
.tv-svg .tv-kp { fill: rgba(67, 224, 240, .2); stroke: var(--signal); stroke-width: calc(var(--u) * 2px); }
.tv-svg .tv-kpc { fill: #fff; }
.tv-svg text { font-stretch: var(--w-data); font-weight: 600; }
.tv-svg .tv-code, .tv-svg .tv-lbl { fill: var(--text-d); }
.tv-svg .tv-code.dim { fill: var(--muted-d); }
.tv-svg .tv-ch, .tv-svg .tv-pr { paint-order: stroke; stroke: rgba(2, 4, 5, .85); stroke-width: calc(var(--u) * 3.5px); stroke-linejoin: round; }
.tv-svg .tv-ch { fill: var(--signal); font-weight: 750; }
.tv-svg .tv-pr { fill: #e6edf0; }
.tv-svg .tv-tag rect { fill: rgba(2, 4, 5, .8); stroke: var(--signal); stroke-width: calc(var(--u) * 1px); }
.tv-svg .tv-tag text { fill: #fff; }
.tv-svg .tv-tag.cyan text { fill: var(--signal); }
.tv-svg .tv-tag.pass rect { stroke: var(--pass); }
.tv-svg .tv-tag.fail rect { stroke: var(--fail); }
.tv-svg .tv-tag.fail text { fill: #ffd0d0; }
.tv-svg .tv-tag.ghost rect { stroke: rgba(230, 237, 240, .5); }
.tv-svg .tv-tag.ghost text { fill: #c9d6dc; }
.tv-svg .tv-tag.muted rect { fill: none; stroke: none; }
.tv-svg .tv-tag.muted text { fill: var(--muted-d); }

.proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin-top: clamp(48px, 7vw, 96px); }
.proof div { display: grid; gap: 6px; padding-top: 18px; border-top: 2px solid var(--ink); }
.proof dd { order: 1; margin: 0; font-size: var(--step-3); font-weight: 800; font-stretch: var(--w-data); line-height: 1; font-variant-numeric: tabular-nums; }
.proof dt { order: 2; color: var(--muted-l); font-size: .95rem; line-height: 1.4; }
@media (max-width: 1180px) {
  .tool-viewer { grid-template-columns: 1fr; }
  .tv-info { border-left: 0; border-top: 1px solid var(--line-d); }
}
@media (max-width: 1060px) { .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* phones and narrow tablets: the list becomes one swipeable row of chips above the viewer */
@media (max-width: 860px) {
  .tools-ui { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tool-groups {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
    margin-inline: calc(-1 * max(var(--gut), env(safe-area-inset-left, 0px))) calc(-1 * max(var(--gut), env(safe-area-inset-right, 0px)));
    padding: 2px max(var(--gut), env(safe-area-inset-right, 0px)) 10px max(var(--gut), env(safe-area-inset-left, 0px));
    scrollbar-width: none;
  }
  .tool-groups::-webkit-scrollbar { display: none; }
  .tgroup, .tgroup:first-child { flex: none; display: flex; align-items: center; gap: 6px; padding: 0; }
  .tgroup + .tgroup { border-top: 0; border-left: 1px solid var(--line-l); padding-left: 14px; }
  .tgroup h3 { margin: 0 4px 0 0; }
  .tgroup h3 small { display: none; }
  .tool { flex: none; width: auto; white-space: nowrap; scroll-snap-align: start; border-color: var(--line-l); border-radius: 999px; padding: 7px 13px 7px 9px; background: rgba(255, 255, 255, .55); }
  .tool svg { width: 18px; height: 18px; }
  .tool .npu { display: none; }
  .tool-viewer { border-radius: 12px; }
}
@media (max-width: 520px) {
  .tv-hud { font-size: .7rem; left: 8px; right: 8px; top: 8px; }
  .tv-bar { padding: 8px 8px 8px 12px; gap: 8px; }
  .tv-val { font-size: .84rem; }
  .proof { gap: 22px; }
}

/* ======================================================================
   AI
   ====================================================================== */
.ai-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.ai-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.ai-list li { display: grid; gap: 4px; padding-left: 18px; border-left: 2px solid var(--line-d); }
.ai-list li p { color: var(--muted-d); font-size: .95rem; }
.trainer { background: var(--graphite-2); border: 1px solid var(--line-d); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); display: grid; gap: 18px; }
.trainer-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: var(--step--1); color: var(--muted-d); }
.trainer-head b { color: var(--text-d); }
.cls { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.cls .name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; }
.cls .name i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cls .samples { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.cls .samples span { aspect-ratio: 1; border-radius: 3px; background: var(--graphite-3); border: 1px solid var(--line-d); }
.cls .samples span.f { background: var(--c); border-color: transparent; opacity: .8; }
.cls .cnt { font-stretch: var(--w-data); color: var(--muted-d); font-size: var(--step--1); font-variant-numeric: tabular-nums; min-width: 3.4em; text-align: right; }
.train-bar { height: 6px; border-radius: 3px; background: var(--graphite-3); overflow: hidden; }
.train-bar i { display: block; height: 100%; width: 100%; background: var(--signal); transform-origin: left; }
.trainer-out { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line-d); padding-top: 16px; font-size: .95rem; }
.trainer-out .res { font-weight: 700; color: var(--pass); }
.trainer-note { font-size: var(--step--1); color: var(--muted-d); }
@media (max-width: 860px) { .ai-grid { grid-template-columns: 1fr; } .cls { grid-template-columns: 1fr auto; } .cls .samples { grid-column: 1 / -1; grid-row: 2; } }

/* ======================================================================
   IMAGE PREP STUDIO (bright)
   ====================================================================== */
.eyebrow { font-size: var(--step--1); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--signal-ink); font-stretch: var(--w-data); }
.prep-demo { display: grid; gap: 18px; }
.prep-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.prep-flow li { display: grid; gap: 4px; align-content: start; position: relative; container-type: inline-size; }
.prep-flow img { width: 100%; aspect-ratio: 4 / 3; border-radius: 4px; background: #000; box-shadow: 0 0 0 1px var(--line-l); margin-bottom: 6px; }
.prep-flow b { font-size: .95rem; font-weight: 700; line-height: 1.3; }
.prep-flow span { font-size: var(--step--1); color: var(--muted-l); line-height: 1.4; }
/* the arrow from one stage to the next */
.prep-flow li + li::before {
  content: ""; position: absolute; left: -12px; top: 37.5cqw; width: 10px; height: 12px;
  background: var(--signal-ink); clip-path: polygon(0 0, 100% 50%, 0 100%); translate: 0 -50%;
}
.prep-result { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--graphite); color: var(--text-d); }
.prep-rh { font-size: var(--step--1); color: var(--muted-d); max-width: 16em; }
.prep-r { display: grid; grid-template-columns: 64px auto auto; justify-content: start; grid-template-rows: auto auto; column-gap: 14px; align-items: center; }
.prep-r img { grid-row: 1 / span 2; width: 64px; aspect-ratio: 4 / 3; border-radius: 3px; }
.prep-r span { font-size: var(--step--1); color: var(--muted-d); }
.prep-r b { font-size: var(--step-1); font-weight: 700; grid-column: 2; }
.prep-r i { grid-column: 3; grid-row: 1 / span 2; font-style: normal; font-weight: 750; font-size: .8rem; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor; }
.prep-r.fail i { color: var(--fail); }
.prep-r.pass i { color: var(--pass); }
.prep-demo figcaption { font-size: var(--step--1); color: var(--muted-l); }
.prep-feats { margin-top: clamp(56px, 8vw, 96px); }
.prep-lib { margin-top: clamp(56px, 8vw, 96px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line-l); display: grid; gap: 28px; }
.prep-lib-head { display: grid; gap: 10px; }
.prep-lib-head p, .prep-ll { color: var(--muted-l); font-size: .95rem; }
.prep-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.prep-groups > div { display: grid; gap: 10px; align-content: start; }
.prep-groups h4 { margin: 0; font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-l); font-stretch: var(--w-data); }
.prep-groups .metrics { margin-top: 0; }
@media (max-width: 900px) {
  .prep-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
  .prep-flow li:nth-child(3)::before { display: none; }
  .prep-result { grid-template-columns: 1fr 1fr; }
  .prep-rh { grid-column: 1 / -1; max-width: none; }
  .prep-groups { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .prep-result { grid-template-columns: 1fr; }
  .prep-groups { grid-template-columns: 1fr; }
}

/* ======================================================================
   HARDWARE (anodized)
   ====================================================================== */
.hw-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.hw-col { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(22px, 4vw, 48px); }
.hw-col li { display: grid; gap: 4px; }
.hw-col li h3 { font-size: var(--step-0); }
.hw-col li p { font-size: .95rem; color: rgba(4, 24, 42, .78); }
.hw-col.l li { text-align: right; justify-items: end; }
.hw-col.l li p { margin-left: auto; }
.hw-fig { position: relative; }
.hw-fig::before { content: ""; position: absolute; inset: -10% -20%; background: radial-gradient(closest-side, rgba(255,255,255,.28), transparent 70%); pointer-events: none; }
.hw-fig img { width: 100%; filter: drop-shadow(0 30px 50px rgba(2, 20, 40, .45)); }
.hw-fig .pin { position: absolute; width: 14px; height: 14px; border-radius: 50%; translate: -50% -50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .35); }
.hw-fig .pin.laser { background: #ff3b30; box-shadow: 0 0 0 4px rgba(255, 59, 48, .3), 0 0 18px #ff3b30; }
.hw-specs { margin-top: clamp(56px, 8vw, 100px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(4, 24, 42, .25); }
.hw-specs div { padding: 18px 18px 0 0; display: grid; gap: 4px; }
.hw-specs dt { font-size: var(--step--1); color: rgba(4, 24, 42, .7); order: 2; }
.hw-specs dd { margin: 0; font-weight: 700; font-size: var(--step-1); font-stretch: var(--w-data); font-variant-numeric: tabular-nums; order: 1; line-height: 1.2; }
@media (max-width: 900px) {
  .hw-stage { grid-template-columns: 1fr 1fr; }
  .hw-fig { grid-column: 1 / -1; grid-row: 1; width: min(70%, 340px); margin-inline: auto; }
  .hw-col.l li { text-align: left; justify-items: start; }
  .hw-col.l li p { margin-left: 0; }
  .hw-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
}
@media (max-width: 520px) { .hw-stage { grid-template-columns: 1fr; } }

/* ======================================================================
   CONNECT
   ====================================================================== */
.conn-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.links-tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.links-tbl th, .links-tbl td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line-d); vertical-align: top; }
.links-tbl th { font-weight: 500; color: var(--muted-d); font-size: var(--step--1); }
.links-tbl td:first-child { font-weight: 650; white-space: nowrap; }
.links-tbl td:last-child { color: var(--muted-d); }
.tbl-scroll { overflow-x: auto; }
.timing { background: var(--graphite-2); border: 1px solid var(--line-d); border-radius: var(--radius); padding: clamp(16px, 3vw, 28px); }
.timing svg { width: 100%; height: auto; display: block; overflow: visible; }
.timing .sig { fill: none; stroke: var(--signal); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.timing .sig.tr { stroke: #c9d6dc; }
.timing .sig.ok { stroke: var(--pass); }
.timing .lbl { fill: var(--text-d); font: 600 13px var(--f); font-stretch: var(--w-data); }
.timing .grid { stroke: var(--line-d); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 5; }
.timing .ann { fill: var(--muted-d); font: 500 11px var(--f); font-stretch: var(--w-data); }
.timing figcaption { margin-top: 14px; font-size: var(--step--1); color: var(--muted-d); }
.iiot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: clamp(48px, 6vw, 80px); }
.iiot div { display: grid; gap: 6px; border-top: 1px solid var(--line-d); padding-top: 18px; }
.iiot p { color: var(--muted-d); font-size: .95rem; }
@media (max-width: 900px) { .conn-grid { grid-template-columns: 1fr; } .iiot { grid-template-columns: 1fr; } }

/* ======================================================================
   HMI + RECIPES + DATA
   ====================================================================== */
.browser { border-radius: 10px; overflow: hidden; background: #1a2228; box-shadow: 0 40px 80px rgba(13, 20, 24, .25), 0 0 0 1px var(--line-l); }
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #222c33; }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a464e; }
.browser-bar span { margin-left: 8px; padding: 4px 14px; border-radius: 999px; background: #121a1f; color: #a9b7bf; font-size: .8rem; font-stretch: var(--w-data); }
.hmi-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; margin-top: clamp(40px, 6vw, 72px); }
.hmi-feats div { display: grid; gap: 6px; }
.hmi-feats p { color: var(--muted-l); font-size: .95rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); margin-top: clamp(72px, 10vw, 140px); }
.split > div { display: grid; gap: 18px; align-content: start; }
.revs { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 0; font-size: .95rem; }
.revs li { display: grid; grid-template-columns: 4.2em minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-l); align-items: baseline; }
.revs li .r { font-stretch: var(--w-data); font-weight: 700; font-variant-numeric: tabular-nums; }
.revs li .d { color: var(--muted-l); }
.revs li .x { font-size: .8rem; font-weight: 700; }
.revs li .x.ok { color: #12804a; } .revs li .x.chg { color: #b4660a; }
.revs-note { font-size: var(--step--1); color: var(--muted-l); margin-top: -6px; }
.metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.metrics span { border: 1px solid var(--line-l); border-radius: 4px; padding: 4px 10px; font-size: .88rem; font-stretch: var(--w-data); }
@media (max-width: 900px) { .hmi-feats { grid-template-columns: 1fr 1fr; } .split { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .hmi-feats { grid-template-columns: 1fr; } }

/* ======================================================================
   COMPARE + SPECS
   ====================================================================== */
.cmp { width: 100%; border-collapse: collapse; min-width: 640px; }
.cmp th, .cmp td { text-align: left; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line-d); vertical-align: top; font-size: .95rem; }
.cmp thead th { font-size: var(--step--1); color: var(--muted-d); font-weight: 500; }
.cmp thead th.us { color: var(--signal); font-weight: 700; }
.cmp tbody th { font-weight: 650; width: 22%; }
.cmp td.us { color: var(--text-d); width: 42%; }
.cmp td.them { color: var(--muted-d); }
/* Phone: the row name spans both columns, so the commercial-sensor column is never scrolled out of view */
@media (max-width: 640px) {
  .cmp { min-width: 0; }
  .cmp tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; border-bottom: 1px solid var(--line-d); }
  .cmp th, .cmp td, .cmp td.us, .cmp tbody th { border-bottom: 0; width: auto; padding: 0; }
  .cmp thead tr { padding-bottom: 12px; }
  .cmp thead th:first-child { display: none; }
  .cmp tbody tr { padding: 14px 0; row-gap: 6px; }
  .cmp tbody th { grid-column: 1 / -1; width: auto; }
}
.specs-tbl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 80px); margin-top: clamp(64px, 9vw, 120px); }
.specs-tbl div { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-d); font-size: .95rem; }
.specs-tbl dt { color: var(--muted-d); }
.specs-tbl dd { margin: 0; }
@media (max-width: 860px) { .specs-tbl { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .specs-tbl div { grid-template-columns: 1fr; gap: 2px; } }

/* ======================================================================
   CONTACT + FOOTER
   ====================================================================== */
.contact { overflow: hidden; }
.contact .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.contact h2 { font-size: var(--step-4); }
.contact-box { display: grid; gap: 16px; justify-items: start; }
.mailrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mail { font-size: var(--step-1); font-weight: 650; user-select: all; }
.copy-btn { border: 1px solid var(--line-d); background: none; border-radius: 999px; padding: 6px 14px; font-size: var(--step--1); cursor: pointer; color: var(--text-d); }
.copy-btn:hover { border-color: var(--signal); }
.dl { display: flex; gap: 12px; align-items: baseline; color: var(--muted-d); font-size: .95rem; }
.dl a { color: var(--text-d); }
.contact .vf { position: absolute; inset: clamp(16px, 3vw, 40px); pointer-events: none; }
.contact .vf i { position: absolute; width: 40px; height: 40px; border: 2px solid var(--line-d); }
.contact .vf i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.contact .vf i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.contact .vf i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.contact .vf i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
@media (max-width: 860px) { .contact .wrap { grid-template-columns: 1fr; } }
footer { padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-d); font-size: var(--step--1); color: var(--muted-d); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* pinned hero on phones: everything has to fit one screen */
@media (max-width: 860px) {
  .motion .stage-pin .hero { justify-content: flex-start; padding-block: 76px 16px; }
  .motion .stage-pin .hero-main { gap: 18px; }
  .motion .stage-pin .device { order: -1; width: min(62%, 30svh); }
  .motion .stage-pin .hero h1 { font-size: min(var(--step-4), 5.6svh); }
  .motion .stage-pin .hero-copy { gap: 16px; }
  .motion .stage-pin .hero .lede { font-size: 0.98rem; }
  .motion .stage-pin .hero-cta .btn { padding: 11px 18px; }
  .motion .stage-pin .spec-rail { display: none; }
  .motion .stage-pin .lock-tag { display: none; }
}

/* ======================================================================
   CAMERA VERSION: html[data-model] picks the hardware edition. Without it (and without JS) the page is
   the ED-AIC3000; the inline script in <head> sets it from ?model= or the saved choice before paint.
   Shared text swaps through i18n variant keys ("key@3100"); hardware-only blocks carry data-only.
   ====================================================================== */
html:not([data-model="aic3100"]) [data-only="aic3100"],
html[data-model="aic3100"] [data-only="aic3000"] { display: none !important; }
.no-js .model-pick, .no-js .model-mini { display: none; }

/* The picker sits over the photo it changes: column 2 of the hero, above the device. */
.hero-copy { grid-column: 1; grid-row: 1 / span 2; }
.hero-main > .device { grid-column: 2; grid-row: 2; }
.model-pick {
  grid-column: 2; grid-row: 1; justify-self: center; align-self: end; position: relative; z-index: 3;
  display: grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: 4px; padding: 4px;
  border: 1px solid var(--line-d); border-radius: 10px; background: rgba(20, 27, 32, .7); max-width: 100%;
}
.model-pick button {
  display: grid; gap: 1px; text-align: left; background: none; border: 0; border-radius: 7px; padding: 8px 14px; cursor: pointer;
  color: var(--muted-d); font-family: inherit; transition: background-color .2s, color .2s;
}
.model-pick button b { font-size: 0.95rem; font-weight: 750; font-stretch: var(--w-data); letter-spacing: .02em; color: var(--text-d); }
.model-pick button span { font-size: 0.78rem; line-height: 1.3; }
.model-pick button:hover { background: var(--graphite-3); }
.model-pick button[aria-pressed="true"] { background: var(--text-d); color: var(--graphite-3); }
.model-pick button[aria-pressed="true"] b { color: var(--graphite); }
.model-mini { display: flex; border: 1px solid var(--line-d); border-radius: 999px; padding: 2px; }
.model-mini button { background: none; border: 0; padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 650; font-stretch: var(--w-data); color: var(--muted-d); cursor: pointer; }
.model-mini button[aria-pressed="true"] { background: var(--signal); color: var(--graphite); }
@media (max-width: 980px) { .model-mini { margin-left: auto; } .model-mini + .lang { margin-left: 0; } }
@media (max-width: 860px) {
  .hero-copy, .hero-main > .device, .model-pick { grid-column: 1; grid-row: auto; }
  .model-pick { order: -2; justify-self: start; }
}
@media (max-width: 520px) { .model-pick button span { display: none; } }

/* the AIC3100 photo is landscape, its lens at the upper left */
html[data-model="aic3100"] .device { aspect-ratio: 1000 / 812; width: min(100%, 560px); }
html[data-model="aic3100"] .device-zoom,
html[data-model="aic3100"] .viewfinder { transform-origin: 14.8% 37%; }
html.motion[data-model="aic3100"] .stage-pin .device { width: min(100%, 580px, 72svh); }
/* manual focus on a C-Mount lens: the curve and the peak line, without the autofocus sample points */
html[data-model="aic3100"] #focusChart circle { display: none; }


@media (max-width: 860px) {
  html.motion[data-model="aic3100"] .stage-pin .device { width: min(80%, 36svh); }
  /* the pinned phone hero has no height to spare: the nav switch (3000 | 3100) picks the camera there */
  .motion .stage-pin .model-pick { display: none; }
}
@media (max-width: 520px) { .nav .wrap { gap: 12px; } }

/* ======================================================================
   POLISH: light on the dark fields, card accents, the nav's current section
   ====================================================================== */
.btn { transition: background-color .2s, color .2s, border-color .2s, box-shadow .25s, transform .2s; }
.btn-primary:hover { box-shadow: 0 10px 30px -8px rgba(67, 224, 240, .6); transform: translateY(-1px); }
.btn-ghost:hover { background: rgba(67, 224, 240, .06); }

/* the dark fields carry a faint lens glow, as if lit by the camera's own light */
#ai, #connect, #specs, .cycle, .contact { isolation: isolate; }
#ai::before, #connect::before, #specs::before, .cycle::before, .contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 88% 8%, rgba(67, 224, 240, .075), transparent 70%),
    radial-gradient(ellipse 45% 40% at 4% 96%, rgba(42, 132, 207, .09), transparent 70%);
}
.contact::before { background: radial-gradient(ellipse 60% 70% at 85% 60%, rgba(67, 224, 240, .1), transparent 70%); }
/* the bright fields: a fine measuring grid fading out from the top */
#tools, #hmi { isolation: isolate; }
#tools::before, #hmi::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 520px; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line-l) 1px, transparent 1px), linear-gradient(90deg, var(--line-l) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .45;
  -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent);
}

.cycle-step { transition: border-color .25s, background-color .25s; }
.cycle-step:hover { border-color: rgba(67, 224, 240, .45); background: #172027; }
.cycle-step .n {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(67, 224, 240, .45); box-shadow: inset 0 0 10px rgba(67, 224, 240, .12);
}
.iiot h3::before, .hmi-feats h3::before, .cycle-notes h3::before {
  content: ""; display: block; width: 26px; height: 2px; margin-bottom: 14px; background: var(--signal);
}
.hmi-feats h3::before { background: var(--signal-ink); }
.ai-list li { transition: border-color .25s; }
.ai-list li:hover { border-left-color: var(--signal); }
.browser { transform-origin: 50% 0%; }
.timing, .trainer { box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }

.nav-links a { position: relative; transition: color .2s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; border-radius: 1px; background: var(--signal);
  transform: scaleX(0); transform-origin: left; transition: transform .35s;
}
.nav-links a.on { color: var(--text-d); }
.nav-links a.on::after { transform: scaleX(1); }

/* ======================================================================
   GRAPHICS: dither, softer light, small fixes
   ====================================================================== */
/* A fine grain under the dark fields. An 8-bit screen has only a dozen levels between the
   graphite and black, so a soft shadow or glow on it draws visible rings (banding); a +/- 1-2 level
   noise breaks the rings up. The tile is mid-grey noise (0.41-0.59) blended as overlay, so it keeps
   each surface's average colour. Inline SVG (img-src allows data:), tiled, never animated. */
:root {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='.3 0 0 0 .35 .3 0 0 0 .35 .3 0 0 0 .35 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.dark, .cycle-step, .cycle-step:hover { background-image: var(--grain); background-blend-mode: overlay; }
/* the glows over the dark fields: eased fall-offs; they are faint, so the section's grain shows through */
#ai::before, #connect::before, #specs::before, .cycle::before {
  background:
    radial-gradient(ellipse 55% 45% at 88% 8%, rgba(67, 224, 240, .075), rgba(67, 224, 240, .03) 40%, transparent 72%),
    radial-gradient(ellipse 45% 40% at 4% 96%, rgba(42, 132, 207, .09), rgba(42, 132, 207, .035) 40%, transparent 72%);
}
.contact::before { background: radial-gradient(ellipse 60% 70% at 85% 60%, rgba(67, 224, 240, .1), rgba(67, 224, 240, .04) 40%, transparent 72%); }

/* the camera: a two-layer shadow (a tight contact shadow and a wide, faint one) instead of one deep
   60px blur, whose long dark ramp is what banded; and a faint backlight that lifts the housing off
   the graphite */
.device img {
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .42)) drop-shadow(0 44px 80px rgba(0, 0, 0, .26));
}
.device::before {
  content: ""; position: absolute; inset: -12% -16%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(67, 224, 240, .085), rgba(67, 224, 240, .045) 38%, rgba(42, 132, 207, .018) 66%, transparent);
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent);
  mask-image: radial-gradient(closest-side, #000 55%, transparent);
}
.device { isolation: isolate; }
/* the LED glows: an eased fall-off (more stops) instead of three straight ramps, so no ring shows
   where one ramp meets the next */
.glow {
  background: radial-gradient(circle,
    rgba(255, 255, 255, .95) 0%, rgba(236, 251, 255, .78) 10%, rgba(214, 246, 255, .52) 21%,
    rgba(160, 236, 248, .3) 32%, rgba(67, 224, 240, .15) 44%, rgba(67, 224, 240, .065) 55%,
    rgba(67, 224, 240, .02) 64%, transparent 71%);
}
/* the viewfinder's label sits on the frame's top edge, beside the corner, instead of above it,
   where it ran into the camera picker */
.lock-tag {
  left: 46px; top: 0; translate: 0 -50%;
  padding: 1px 8px; border-radius: 3px; background: rgba(12, 17, 20, .86);
  box-shadow: 0 0 0 1px rgba(67, 224, 240, .35);
}

/* the light lab's sample: a brushed plate with a slight bevel, not a flat panel */
.sample { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(0, 0, 0, .18), 0 24px 40px -28px rgba(13, 20, 24, .55); }
.sample::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  /* the grain stretched along one axis reads as brushing; overlay keeps the lit colour from site.js */
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, transparent 55%, rgba(0, 0, 0, .14)),
    var(--grain) 0 0 / 900px 30px;
  mix-blend-mode: overlay; opacity: .5;
}

/* the hardware call-outs: a ring with a dark core edge, readable on the blue and on the housing */
.hw-fig .pin { box-shadow: 0 0 0 2px rgba(4, 24, 42, .55), 0 0 0 6px rgba(255, 255, 255, .28); }
.hw-fig .pin::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .7);
  animation: pin-pulse 2.6s ease-out infinite; opacity: 0;
}
.hw-fig .pin.laser::after { border-color: rgba(255, 59, 48, .8); }
@keyframes pin-pulse { 0% { opacity: .8; transform: scale(.7); } 100% { opacity: 0; transform: scale(2); } }
@media (prefers-reduced-motion: reduce) { .hw-fig .pin::after { animation: none; } }

/* type: no orphaned words in the short paragraphs, and finer hairlines on the readouts */
p, .lede, dt { text-wrap: pretty; }
::selection { background: rgba(67, 224, 240, .35); color: inherit; }
