/* /products: the four product lines on one model. Page-only figures; the
   switchers, chips and states are kit.css, the frames and sections home.css. */

/* ── Cortex: the protocol beside the model, one block at a time ── */
.cx { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px; margin-top: 48px; }
.cx__doc { position: relative; padding: 22px 22px 24px; border-radius: 12px; background: #f4f3f0; color: #34332f; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55); }
.cx__doc small { display: flex; justify-content: space-between; font: 600 9px var(--font-mono); letter-spacing: 0.14em; color: #7a7973; }
.cx__doc p { margin: 14px 0 0; font: 400 16px/1.75 var(--font-display); color: #2b2a27; }
.cx__doc mark { padding: 1px 2px; border-radius: 3px; background: transparent; color: inherit; box-shadow: inset 0 -1px 0 rgba(26, 125, 255, 0.35); transition: background-color 260ms ease, box-shadow 260ms ease, color 260ms ease; }
.cx__model { display: grid; gap: 10px; align-content: start; }
.cx__track { display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--card); }
.cx__track > small { font: 500 9.5px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.cx__track > div { display: flex; flex-wrap: wrap; gap: 6px; }
.cx__track button {
  padding: 6px 10px;
  border: 1px solid rgba(92, 200, 255, 0.35);
  border-radius: 7px;
  background: rgba(92, 200, 255, 0.07);
  color: rgba(236, 239, 244, 0.92);
  font: 500 12px var(--font-ui);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 200ms ease;
}
.cx__track button[data-state="verified"] { border-color: rgba(110, 231, 183, 0.4); background: rgba(110, 231, 183, 0.07); }
.cx__track button[data-state="review"] { border-style: dashed; border-color: rgba(236, 239, 244, 0.35); background: transparent; }
.cx__track button[data-state="gap"] { border-color: rgba(255, 69, 58, 0.55); background: rgba(255, 69, 58, 0.1); color: #ffb0aa; }
.cx__track button.is-active { border-color: #5cc8ff; background: rgba(92, 200, 255, 0.2); color: #fff; box-shadow: 0 0 24px -6px rgba(92, 200, 255, 0.8); }
.cx__track button[data-state="gap"].is-active { border-color: #ff8a82; background: rgba(255, 69, 58, 0.22); box-shadow: 0 0 24px -6px rgba(255, 69, 58, 0.8); }
.cx__track--audit button { flex: 1; text-align: left; }
.cx__readout { grid-column: 1 / -1; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 8px 18px; padding: 14px 18px; border: 1px solid var(--edge); border-radius: 12px; background: #070b12; font-size: 13.5px; color: var(--muted); }
.cx__readout code { font: 500 12px var(--font-mono); color: #9fd8ff; }
.cx__readout b { font-weight: 600; color: var(--fg); }
.cx__readout em { font-style: normal; font: 500 10px var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--label); }
.cx__readout[data-state="gap"] { border-color: rgba(255, 69, 58, 0.45); }
.cx__readout[data-state="gap"] em { color: #ff8a82; }
.cx__readout[data-state="verified"] em { color: var(--live); }
.cx__hint { grid-column: 1 / -1; margin: 0; font: 500 10px var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }

/* the clause the chosen block came from lights in the document */
.cx[data-switch-current="sbp"] mark[data-src~="sbp"],
.cx[data-switch-current="hgb"] mark[data-src~="hgb"],
.cx[data-switch-current="ae"] mark[data-src~="ae"],
.cx[data-switch-current="dose"] mark[data-src~="dose"],
.cx[data-switch-current="vitals"] mark[data-src~="vitals"],
.cx[data-switch-current="labs"] mark[data-src~="labs"],
.cx[data-switch-current="aecrf"] mark[data-src~="aecrf"],
.cx[data-switch-current="range"] mark[data-src~="range"],
.cx[data-switch-current="sexref"] mark[data-src~="sexref"],
.cx[data-switch-current="esc"] mark[data-src~="esc"],
.cx[data-switch-current="audit"] mark[data-src~="audit"] { background: rgba(26, 125, 255, 0.18); box-shadow: inset 0 -2px 0 #1a7dff; color: #0b1a33; }
.cx[data-switch-current="gap"] mark[data-src~="gap"] { background: rgba(255, 69, 58, 0.18); box-shadow: inset 0 -2px 0 #ff453a; color: #3a0b08; }

.verbs { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 20px; margin: 48px 0 0; padding: 22px 0 0; list-style: none; border-top: 1px solid var(--line); }
.verbs li b { display: block; font: 500 20px var(--font-display); color: var(--fg); }
.verbs li span { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

/* ── Studio: four steps of a build, each a working fragment ── */
.studio { margin-top: 48px; }
.sfrag { padding: 20px 22px; border: 1px solid var(--edge); border-radius: 14px; background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(30, 120, 220, 0.12), transparent 70%), #070b12; }
.sfrag__bar { display: flex; justify-content: space-between; gap: 12px; margin: -20px -22px 16px; padding: 12px 22px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font: 500 10px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(154, 163, 178, 0.85); }
.sfrag__bar b { font-weight: 500; color: #9fd8ff; }
.sfrag ul { margin: 0; padding: 0; list-style: none; }
.sfrag li { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 14px; color: rgba(236, 239, 244, 0.9); }
.sfrag li:last-child { border-bottom: 0; }
.sfrag li span { margin-left: auto; font: 500 10.5px var(--font-mono); letter-spacing: 0.06em; color: var(--label); }
.sfrag li .ftag { margin-left: 0; padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; font: 600 9px var(--font-mono); letter-spacing: 0.1em; color: var(--muted); }
.sfrag li .ftag--phi { border-color: rgba(255, 69, 58, 0.4); color: #ff8a82; }
.sfrag li .ftag--calc { border-color: rgba(92, 200, 255, 0.4); color: #9fd8ff; }
.sfrag__foot { margin: 14px 0 0; font: 500 10.5px var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: #9fd8ff; }
.sfrag__foot--ok { color: var(--live); }
.sfrag__say { margin: 0; padding: 14px 16px; border-radius: 10px; background: #f4f3f0; color: #2b2a27; font: 400 17px/1.5 var(--font-display); }
.sfrag__arrow { display: block; width: 1px; height: 26px; margin: 8px 0 8px 22px; background: linear-gradient(180deg, rgba(92, 200, 255, 0.2), rgba(92, 200, 255, 0.8)); }
.sfrag__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sfrag__chips span { padding: 8px 11px; border: 1px solid rgba(92, 200, 255, 0.35); border-radius: 8px; background: rgba(92, 200, 255, 0.07); font: 500 12px var(--font-mono); color: #e6f6ff; }
.sfrag__chips span small { display: block; margin-bottom: 3px; font: 500 8.5px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.sfrag__branch { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.sfrag__branch > div { padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--card); font-size: 13.5px; color: var(--fg); }
.sfrag__branch > div small { display: block; margin-bottom: 4px; font: 500 9px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.sfrag__branch > i { width: 34px; height: 1px; background: rgba(92, 200, 255, 0.7); box-shadow: 0 0 8px rgba(92, 200, 255, 0.7); }
.sfrag__check { width: 16px; height: 16px; flex: none; border: 1px solid rgba(110, 231, 183, 0.6); border-radius: 50%; background: rgba(110, 231, 183, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.8 6.3 5 8.4 9.3 3.7' fill='none' stroke='%236ee7b7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat; }
.sfrag__wait { width: 16px; height: 16px; flex: none; border: 1px dashed rgba(236, 239, 244, 0.45); border-radius: 50%; }
.studio__shot { margin-top: 28px; }

/* ── OS: one model at the centre, every system around it ── */
.osm { margin-top: 40px; }
.osm__map { position: relative; height: 470px; margin-top: 22px; border: 1px solid var(--edge); border-radius: 16px; background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(30, 120, 220, 0.16), transparent 70%), #070b12; overflow: hidden; }
.osm__map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.osm__map svg line { stroke: rgba(92, 200, 255, 0.45); stroke-width: 1; vector-effect: non-scaling-stroke; transition: opacity 260ms ease; }
.osm__map svg line[data-tags~="live"] { stroke: rgba(110, 231, 183, 0.75); }
.osm__map svg line[data-tags~="road"] { stroke-dasharray: 3 5; stroke: rgba(236, 239, 244, 0.3); }
.osm__core { position: absolute; left: 50%; top: 50%; z-index: 2; display: grid; place-items: center; width: 168px; height: 168px; margin: -84px 0 0 -84px; border: 1px solid rgba(92, 200, 255, 0.5); border-radius: 50%; background: radial-gradient(circle, rgba(92, 200, 255, 0.18), #08111c 70%); box-shadow: 0 0 80px -10px rgba(92, 200, 255, 0.55); text-align: center; }
.osm__core b { display: block; font: 500 22px var(--font-display); color: #fff; }
.osm__core small { display: block; margin-top: 4px; font: 500 9px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: #9fd8ff; }
.osm__core::after { content: ""; position: absolute; inset: -14px; border: 1px dashed rgba(92, 200, 255, 0.25); border-radius: 50%; animation: osmSpin 40s linear infinite; }
@keyframes osmSpin { to { transform: rotate(360deg); } }
.osm__nodes { margin: 0; padding: 0; list-style: none; }
.osm__nodes li { position: absolute; z-index: 2; display: grid; justify-items: center; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0b1119; text-align: center; transform: translate(-50%, -50%); }
.osm__nodes li b { font: 500 13px var(--font-ui); color: var(--fg); white-space: nowrap; }
.osm__nodes li[data-tags~="live"] { border-color: rgba(110, 231, 183, 0.45); box-shadow: 0 0 30px -10px rgba(110, 231, 183, 0.6); }
.osm__nodes li[data-tags~="road"] { border-style: dashed; }
.osm__note { margin: 16px 0 0; max-width: 80ch; font-size: 13.5px; line-height: 1.6; color: var(--muted); }


@media (max-width: 980px) {
  .cx { grid-template-columns: 1fr; }
  .verbs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 700px) {
  .cx__readout { grid-template-columns: 1fr; }
  .verbs { grid-template-columns: 1fr; }
  .osm__map { height: auto; padding: 24px 16px; }
  .osm__map svg, .osm__core::after { display: none; }
  .osm__core { position: static; width: auto; height: auto; margin: 0 0 16px; padding: 18px; border-radius: 14px; }
  .osm__nodes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .osm__nodes li { position: static; transform: none; }
  .sfrag__branch { grid-template-columns: 1fr; }
  .sfrag__branch > i { width: 1px; height: 22px; margin-left: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .osm__core::after { animation: none; }
}
/* SVG wires fade in place: a CSS offset here would be in map units. */
.osm__map.is-armed svg line[data-at]:not(.is-on) { opacity: 0; transform: none; }
.osm__map svg line[data-at] { transition: opacity 0.6s var(--ease-out); }

/* ══ The page's own world: the exploded technical drawing. Isometric plates
   in pale cyan line work on a dot grid, dashed construction lines, callouts
   on leader lines, circled detail letters, square corners. ══ */
.page-xview { --draw: rgba(159, 216, 255, 0.78); --draw-soft: rgba(159, 216, 255, 0.3); }
.page-xview main { counter-reset: det; background-image: radial-gradient(rgba(159, 216, 255, 0.1) 1px, transparent 1.3px); background-size: 24px 24px; }

/* the hero: copy at left, the drawing larger at right */
.xview-hero { padding: 136px 0 80px; }
.xview-hero__grid { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: 40px 56px; align-items: center; }
.xview { position: relative; aspect-ratio: 560 / 470; animation: heroUp 0.9s var(--ease-out) 0.15s both; }
.xview svg { display: block; width: 100%; height: 100%; overflow: visible; }
.xview__face { fill: rgba(10, 22, 38, 0.94); stroke: var(--draw); stroke-width: 1; vector-effect: non-scaling-stroke; }
.xview__side { fill: rgba(4, 10, 18, 0.96); stroke: var(--draw-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.xview__detail * { fill: none; stroke: var(--draw-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.xview__detail .is-hot { fill: rgba(110, 231, 183, 0.12); stroke: rgba(110, 231, 183, 0.7); }
.xview__detail .is-gap { fill: rgba(255, 69, 58, 0.5); stroke: #ff8a82; }
.xview__plate--cortex .xview__face { fill: rgba(14, 54, 92, 0.75); stroke: #5cc8ff; filter: drop-shadow(0 0 18px rgba(92, 200, 255, 0.5)); }
.xview__plate--cortex .xview__detail * { stroke: rgba(182, 246, 255, 0.75); }
.xview__plate--cortex .xview__detail .is-gap { stroke: #ff8a82; }
.xview__plate--edc .xview__face { stroke: rgba(110, 231, 183, 0.85); }
.xview__cons { fill: none; stroke: var(--draw-soft); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.xview__lead { fill: none; stroke: var(--draw); vector-effect: non-scaling-stroke; }
.xview__block rect, .xview__block path { fill: none; stroke: var(--draw-soft); vector-effect: non-scaling-stroke; }
.xview__block text { fill: rgba(159, 216, 255, 0.75); font: 500 8px var(--font-mono); letter-spacing: 0.08em; }
/* the stack starts pressed together and comes apart */
.xview .xview__plate[data-at] { transition: transform 1.3s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.4s ease; }
.xview.is-armed .xview__plate[data-at]:not(.is-on) { opacity: 1; transform: translateY(var(--collapse)); }
.xview__calls { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.xview__calls li { position: absolute; left: 65%; top: var(--y); width: 35%; transform: translateY(-50%); pointer-events: auto; }
.xview__calls a { display: grid; justify-items: start; gap: 3px; padding: 6px 8px; border-radius: 2px; transition: background-color 160ms ease; }
.xview__calls a:hover, .xview__calls a:focus-visible { background: rgba(159, 216, 255, 0.07); outline: none; }
.xview__calls a:focus-visible { box-shadow: inset 0 0 0 1px #9fd8ff; }
.xview__calls small { font: 500 9px var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(159, 216, 255, 0.75); }
.xview__calls b { font: 500 18px/1.15 var(--font-display); color: #fff; }

/* every section is a detail of the drawing */
.page-xview .section { counter-increment: det; }
.page-xview .section-head .kicker { display: flex; align-items: center; gap: 12px; }
.page-xview .section-head .kicker::before { content: counter(det, upper-alpha); display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 1px solid var(--draw); border-radius: 50%; font: 500 14px var(--font-display); letter-spacing: 0; color: #fff; }
.page-xview .cx__doc, .page-xview .cx__model, .page-xview .cx__readout, .page-xview .sfrag, .page-xview .osm__map, .page-xview .kit-tabs,
.page-xview .edcview__window, .page-xview .studio__shot .panel { border-radius: 2px; }

@media (max-width: 1100px) {
  .xview-hero__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .xview-hero { padding-top: 112px; }
  .xview { aspect-ratio: auto; }
  .xview svg { height: auto; aspect-ratio: 560 / 470; width: 64%; }
  .xview__calls { position: static; display: grid; gap: 6px; margin-top: 12px; }
  .xview__calls li { position: static; width: auto; transform: none; }
  .xview__calls b { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .xview .xview__plate[data-at] { transition: opacity 0.2s ease; } }
