:root {
  color-scheme: dark;
  --bg: #000000;
  --ink: #f4f1ea;
  --muted: #a8abb2;
  --dim: #4a4c52;
  --line: rgba(244, 241, 234, 0.14);
  --line-strong: rgba(244, 241, 234, 0.32);
  --brass: #d4b483;
  --t-red: #ff2b3f;
  --t-orange: #ff7a1a;
  --t-yellow: #ffd43b;
  --t-cyan: #2ee6ff;
  --t-blue: #1c3dff;
  --navy: #071233;
  --hud: 48px;
  --rail: 56px;
  --font: "Helvetica Neue", Helvetica, "Arimo", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --hash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='14'%3E%3Cpath d='M4.5 3v8M7.5 3v8M2.5 5.5h7M2.5 8.5h7' stroke='%233a3c42' stroke-width='1'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, video, canvas, svg { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* ---------- global texture ---------- */

.grain {
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.8s steps(5) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 89;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.22) 2px 3px);
  mix-blend-mode: multiply;
}

.cross {
  position: absolute;
  width: 13px;
  height: 13px;
  pointer-events: none;
}
.cross::before, .cross::after {
  content: "";
  position: absolute;
  background: var(--ink);
}
.cross::before { left: 6px; top: 0; width: 1px; height: 13px; }
.cross::after { top: 6px; left: 0; height: 1px; width: 13px; }
.cross-tl { top: -7px; left: -7px; }
.cross-tr { top: -7px; right: -7px; }
.cross-bl { bottom: -7px; left: -7px; }
.cross-br { bottom: -7px; right: -7px; }

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--t-red);
  box-shadow: 0 0 10px var(--t-red);
  animation: blink 1.4s steps(2, jump-none) infinite;
}

@keyframes blink { 50% { opacity: 0.15; } }

.sig { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.sig i {
  width: 3px;
  background: var(--ink);
  animation: sig 1.6s ease-in-out infinite;
}
.sig i:nth-child(1) { height: 30%; animation-delay: -0.2s; }
.sig i:nth-child(2) { height: 50%; animation-delay: -0.5s; }
.sig i:nth-child(3) { height: 70%; animation-delay: -0.9s; }
.sig i:nth-child(4) { height: 85%; animation-delay: -1.1s; }
.sig i:nth-child(5) { height: 100%; animation-delay: -1.4s; }

@keyframes sig { 50% { opacity: 0.25; } }

.barcode {
  display: inline-block;
  height: 14px;
  width: 92px;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 1px, transparent 1px 3px, var(--ink) 3px 5px, transparent 5px 6px,
    var(--ink) 6px 7px, transparent 7px 10px, var(--ink) 10px 13px, transparent 13px 14px);
  opacity: 0.85;
}

.caret {
  display: inline-block;
  width: 0.5em;
  height: 0.82em;
  margin-left: 0.08em;
  background: currentColor;
  vertical-align: -0.06em;
  animation: blink 1s steps(2, jump-none) infinite;
}

/* ---------- HUD chrome ---------- */

.hud {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--hud);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 0 0 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.logo {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--rail);
  height: var(--hud);
  color: var(--ink);
  border-right: 1px solid var(--line);
}
.logo svg { width: 30px; height: 30px; }
.logo:hover svg path { stroke: var(--brass); }

.ruler { position: relative; pointer-events: none; }
.ruler-x {
  flex: 1;
  height: 100%;
  background:
    linear-gradient(90deg, var(--line-strong) 1px, transparent 1px) 0 100% / 80px 14px repeat-x,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 100% / 8px 6px repeat-x;
}
.ruler-mark {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid var(--brass);
  transform: translateX(calc(var(--p, 0) * (100cqw - 10px)));
}
.ruler-x { container-type: inline-size; }

.hud-status { display: flex; align-items: center; gap: 12px; flex: none; }

.x-link {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 32px;
  margin-right: 12px;
  background: var(--ink);
  color: #000;
  transition: background 0.2s, color 0.2s;
}
.x-link svg { width: 16px; height: 16px; }
.x-link:hover { background: var(--brass); }

.rail {
  position: fixed;
  top: var(--hud);
  bottom: 0;
  left: 0;
  z-index: 40;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 20px;
  border-right: 1px solid var(--line);
  background: #000;
}
.ruler-y {
  position: absolute;
  inset: 0 0 0 auto;
  width: 14px;
  background:
    linear-gradient(180deg, var(--line-strong) 1px, transparent 1px) 100% 0 / 14px 80px repeat-y,
    linear-gradient(180deg, var(--line) 1px, transparent 1px) 100% 0 / 6px 8px repeat-y;
}
.rail a {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
}
.rail a span {
  width: 10px;
  height: 10px;
  border: 1px solid var(--muted);
  transition: all 0.25s;
}
.rail a:hover span { border-color: var(--ink); transform: rotate(45deg); }
.rail a.is-active { background: var(--ink); }
.rail a.is-active span { background: #000; border-color: #000; }

main, .end { margin-left: var(--rail); }

/* ---------- reticle cursor ---------- */

.reticle {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 95;
  width: 34px;
  height: 34px;
  pointer-events: none;
  opacity: 0;
  transition: width 0.25s, height 0.25s, opacity 0.25s;
  mix-blend-mode: difference;
}
.reticle.is-on { opacity: 1; }
.reticle.is-lock { width: 64px; height: 64px; }
.reticle i { position: absolute; width: 9px; height: 9px; border: 0 solid #fff; }
.reticle i:nth-child(1) { top: 0; left: 0; border-width: 1.5px 0 0 1.5px; }
.reticle i:nth-child(2) { top: 0; right: 0; border-width: 1.5px 1.5px 0 0; }
.reticle i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1.5px 1.5px; }
.reticle i:nth-child(4) { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; }

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

.hero {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--hud) + 28px) 20px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  z-index: -1;
  pointer-events: none;
}
.field line { stroke: rgba(244, 241, 234, 0.12); stroke-width: 1; vector-effect: non-scaling-stroke; }
.field rect { fill: rgba(244, 241, 234, 0.55); }
.field rect.hot { fill: var(--t-red); }

.streaks i {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 241, 234, 0.9) 30%, rgba(244, 241, 234, 0.9) 70%, transparent);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
}

.figure {
  --size: min(60svh, 600px, 86vw);
  position: relative;
  width: var(--size);
  aspect-ratio: 1;
  flex: none;
}
.figure-img, .ascii {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.figure-img { object-fit: cover; }
.figure.is-ascii .figure-img { opacity: 0; }
.ascii { background: #000; }

.callouts {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.callouts polyline {
  fill: none;
  stroke: rgba(244, 241, 234, 0.45);
  stroke-width: 0.25;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: draw 1.6s 0.6s cubic-bezier(0.7, 0, 0.2, 1) forwards;
}
.callouts polyline:nth-of-type(2) { stroke: var(--t-red); animation-delay: 0.8s; }
.callouts polyline:nth-of-type(4) { animation-delay: 1s; }
.callouts polyline:nth-of-type(5) { animation-delay: 1.15s; }
.callouts rect { fill: var(--ink); opacity: 0; animation: fade 0.3s 2s forwards; }
.callouts .ping {
  fill: none;
  stroke: var(--t-red);
  stroke-width: 0.35;
  transform-origin: 45px 60px;
  animation: ping 2s ease-out infinite;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes ping {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(3.4); opacity: 0; }
}

.band {
  position: relative;
  z-index: 2;
  width: calc(100% + 40px);
  margin: calc(var(--band-pull, -0.09) * min(60svh, 600px, 86vw)) -20px 0;
  display: flex;
  justify-content: center;
  background: var(--hash) center / 12px 14px;
  border-block: 1px solid var(--line);
}

.wordmark {
  margin: 0;
  padding: 0.04em 0.16em 0.1em;
  background: #000;
  color: var(--ink);
  font-weight: 700;
  font-size: clamp(2.6rem, 9.6vw, 10.5rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
  text-transform: lowercase;
  white-space: nowrap;
  position: relative;
}
.wordmark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 43, 63, 0.0) 40%, rgba(255, 43, 63, 0.55) 50%, rgba(255, 212, 59, 0) 60%, transparent);
  background-size: 300% 100%;
  mix-blend-mode: screen;
  animation: sweep 5s 1.2s cubic-bezier(0.6, 0, 0.2, 1) infinite;
  pointer-events: none;
}
.wordmark.is-glitch { text-shadow: -0.03em 0 var(--t-red), 0.03em 0 var(--t-cyan); transform: translateX(0.01em) skewX(-4deg); }

@keyframes sweep {
  0% { background-position: 100% 0; }
  45%, 100% { background-position: 0 0; }
}

.ca {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  max-width: 100%;
  padding: 10px 10px 10px 16px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.75);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.ca-dot {
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--brass);
  box-shadow: 0 0 10px var(--brass);
}
.ca-text {
  min-width: 0;
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1.05vw, 0.98rem);
  letter-spacing: 0.02em;
  color: var(--ink);
  user-select: all;
  word-break: break-all;
}
.ca-copy {
  flex: none;
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 36px;
  border: 0;
  background: var(--ink);
  color: #000;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.ca-copy:hover { background: var(--brass); }
.ca-copy:active { transform: scale(0.94); }
.ca-copy svg { width: 18px; height: 18px; grid-area: 1 / 1; transition: transform 0.25s, opacity 0.25s; }
.ca-copy .ico-check { opacity: 0; transform: scale(0.4); }
.ca.is-copied { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass), 0 0 34px rgba(212, 180, 131, 0.35); }
.ca.is-copied .ca-copy { background: var(--brass); }
.ca.is-copied .ico-copy { opacity: 0; transform: scale(0.4); }
.ca.is-copied .ico-check { opacity: 1; transform: scale(1); }
.ca.is-copied .ca-text { animation: flash 0.6s steps(3); }

@keyframes flash { 50% { color: var(--brass); background: rgba(212, 180, 131, 0.15); } }

.scroll-cue {
  position: absolute;
  bottom: 18px;
  left: 50%;
  width: 1px;
  height: 34px;
  background: var(--line-strong);
  overflow: hidden;
}
.scroll-cue i {
  position: absolute;
  left: -1px;
  width: 3px;
  height: 10px;
  background: var(--ink);
  animation: cue 1.8s cubic-bezier(0.7, 0, 0.3, 1) infinite;
}
@keyframes cue {
  0% { transform: translateY(-12px); }
  100% { transform: translateY(36px); }
}

/* ---------- gallery: the line ---------- */

.line {
  position: relative;
  border-top: 1px solid var(--line);
}
.line-pin {
  position: relative;
  padding: 72px 0 40px;
}
.line-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 28px;
  padding: 0 clamp(16px, 4vw, 56px);
}

.bay {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  background: #050506;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s, filter 0.5s;
}
.bay-head, .bay-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}
.bay-head { border-bottom: 1px solid var(--line); }
.bay-head .barcode { flex: 1; max-width: 120px; }
.bay-head .sig { margin-left: auto; }
.bay-screen {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #000;
}
.bay-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.28) 2px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55));
}
.clip {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15) contrast(1.05);
}
.bay-foot {
  height: 46px;
  align-items: flex-end;
  gap: 4px;
  border-top: 1px solid var(--line);
}
.bay-foot i {
  flex: 1;
  height: 70%;
  background: var(--ink);
  transform-origin: bottom;
  animation: meter 1.3s ease-in-out infinite alternate;
}
.bay-foot i:nth-child(2n) { animation-duration: 0.9s; background: var(--brass); }
.bay-foot i:nth-child(3n) { animation-duration: 1.7s; }
.bay-foot i:nth-child(5) { background: var(--t-red); }
.bay-foot i:nth-child(1) { animation-delay: -0.3s; }
.bay-foot i:nth-child(3) { animation-delay: -0.8s; }
.bay-foot i:nth-child(6) { animation-delay: -0.5s; }
.bay-foot i:nth-child(8) { animation-delay: -1.1s; }

@keyframes meter {
  0% { transform: scaleY(0.15); }
  100% { transform: scaleY(1); }
}

.bracket {
  position: absolute;
  inset: -9px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s, inset 0.4s;
  background:
    linear-gradient(var(--ink), var(--ink)) top left / 22px 2px,
    linear-gradient(var(--ink), var(--ink)) top left / 2px 22px,
    linear-gradient(var(--ink), var(--ink)) top right / 22px 2px,
    linear-gradient(var(--ink), var(--ink)) top right / 2px 22px,
    linear-gradient(var(--ink), var(--ink)) bottom left / 22px 2px,
    linear-gradient(var(--ink), var(--ink)) bottom left / 2px 22px,
    linear-gradient(var(--ink), var(--ink)) bottom right / 22px 2px,
    linear-gradient(var(--ink), var(--ink)) bottom right / 2px 22px;
  background-repeat: no-repeat;
}
.bay.is-active .bracket, .bay:hover .bracket { opacity: 1; }
.bay.is-active { border-color: var(--ink); }

.line-progress { display: none; }

/* pinned horizontal mode, enabled by script on wide screens */
.line.is-pinned .line-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: calc(var(--hud) + 24px) 0 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.line.is-pinned .line-track {
  display: flex;
  gap: clamp(28px, 4vw, 64px);
  width: max-content;
  padding: 0 var(--pad, 30vw);
  will-change: transform;
}
.line.is-pinned .bay {
  width: var(--bay, min(56vh, 40vw));
  flex: none;
  opacity: 0.38;
  filter: grayscale(1) brightness(0.7);
  transform: scale(0.84);
}
.line.is-pinned .bay::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(45deg, transparent 0 10px, rgba(244, 241, 234, 0.06) 10px 11px);
  transition: opacity 0.4s;
}
.line.is-pinned .bay.is-active {
  opacity: 1;
  filter: none;
  transform: scale(1);
}
.line.is-pinned .bay.is-active::after { opacity: 0; }
.line.is-pinned .bay-head, .line.is-pinned .bay-foot { padding-block: 8px; }
.line.is-pinned .bay-foot { height: 38px; }
.line.is-pinned .line-progress {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(760px, 70%);
  margin: 34px auto 0;
}
.line-fill {
  position: relative;
  flex: 1;
  height: 12px;
  background:
    linear-gradient(90deg, var(--line-strong) 1px, transparent 1px) 0 100% / 10px 12px repeat-x;
}
.line-fill::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: calc(var(--lp, 0) * 100%);
  background: var(--ink);
}
.line-dots { display: flex; gap: 6px; }
.line-dots b { width: 10px; height: 10px; border: 1px solid var(--muted); transition: background 0.3s; }
.line-dots b.is-on { background: var(--t-red); border-color: var(--t-red); }

/* ---------- inverted strip ---------- */

.strip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 40px 0 0;
  padding: clamp(36px, 6vw, 80px) 20px;
  background: var(--ink);
  color: #000;
  overflow: hidden;
}
.strip::before, .strip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 7px;
  background: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 7px);
}
.strip::before { top: 0; }
.strip::after { bottom: 0; }
.strip-text {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 8.6rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-align: center;
}
.strip-code {
  position: absolute;
  left: 22px;
  top: 50%;
  translate: 0 -50%;
  --ink: #000;
  width: 70px;
}
.strip-nodes {
  position: absolute;
  right: 22px;
  top: 50%;
  translate: 0 -50%;
  display: flex;
  gap: 5px;
}
.strip-nodes b { width: 9px; height: 9px; background: #000; }
.strip-nodes b:nth-child(2) { background: var(--t-red); }
.strip .type .ch { display: inline; }
.strip .type .ch.is-hidden { display: none; }

/* ---------- scan ---------- */

.scan {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  padding: clamp(80px, 10vw, 140px) clamp(20px, 6vw, 96px);
  border-bottom: 1px solid var(--line);
}

.scan-frame {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 10% 10%,
    linear-gradient(180deg, var(--line) 1px, transparent 1px) 0 0 / 10% 10%;
}
.scan-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scan-base { filter: grayscale(1) contrast(1.6) brightness(0.55); }
.scan-heat {
  clip-path: inset(0 0 calc(100% - var(--sp, 100%)) 0);
  filter: saturate(1.25);
}
.scan-bar {
  position: absolute;
  left: -14px;
  right: -14px;
  top: var(--sp, 100%);
  height: 2px;
  background: var(--t-yellow);
  box-shadow: 0 0 18px var(--t-orange), 0 0 4px var(--t-yellow);
}
.scan-bar::before {
  content: "";
  position: absolute;
  inset: -40px 14px 2px;
  background: linear-gradient(to top, rgba(255, 122, 26, 0.28), transparent);
}

.scan-side { display: grid; gap: 28px; }
.wire-frame {
  position: relative;
  aspect-ratio: 1.15;
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 50% 46%, rgba(28, 61, 255, 0.16), transparent 62%);
}
.wire, .dial {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.dial { opacity: 0.6; }
.dial line { stroke: var(--muted); stroke-width: 0.6; }
.dial .major { stroke: var(--ink); stroke-width: 1; }
.dial g { transform-origin: 100px 100px; animation: spin 40s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

.boot {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.boot li {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 40px;
  border-bottom: 1px solid var(--line);
}
.boot b {
  flex: none;
  position: relative;
  width: 36px;
  height: 14px;
  border-inline: 2px solid var(--ink);
}
.boot b::after {
  content: "";
  position: absolute;
  inset: 3px 9px;
  background: var(--brass);
  transform: scale(0);
  transition: transform 0.25s steps(3);
  transition-delay: var(--d, 0s);
}
.boot i {
  flex: 1;
  height: 6px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.boot i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--w, 70%);
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.9s cubic-bezier(0.7, 0, 0.2, 1);
  transition-delay: var(--d, 0s);
}
.boot li:nth-child(1) { --d: 0.1s; --w: 92%; }
.boot li:nth-child(2) { --d: 0.4s; --w: 64%; }
.boot li:nth-child(3) { --d: 0.7s; --w: 80%; }
.boot li:nth-child(4) { --d: 1s; --w: 48%; }
.boot li:nth-child(5) { --d: 1.3s; --w: 72%; }
.boot li:nth-child(5) i::after { background: var(--t-red); }
.boot-last { color: var(--ink); font-size: 18px; }
.boot-last b { border-color: var(--brass); }
.boot.is-on b::after, .boot.is-on i::after { transform: none; }

/* ---------- end ---------- */

.end {
  position: relative;
  overflow: hidden;
  padding-top: 64px;
}
.hashband {
  height: 28px;
  background: var(--hash) 0 0 / 12px 14px;
  border-block: 1px solid var(--line);
}
.end-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(16px, 4vw, 56px);
}
.end-row .logo { border: 1px solid var(--line); width: 56px; height: 56px; }
.end-row .barcode { flex: 1; max-width: 340px; opacity: 0.4; }
.x-link-lg { width: 64px; height: 56px; margin: 0; }
.x-link-lg svg { width: 24px; height: 24px; }

.pixelmark {
  height: var(--pm-h, 18vw);
  overflow: hidden;
  padding: 0 clamp(16px, 4vw, 56px);
}
.pixel-canvas { width: 100%; height: auto; }

/* ---------- mobile ---------- */

@media (max-width: 760px) {
  :root { --rail: 0px; --hud: 52px; }
  .rail {
    top: auto;
    bottom: 14px;
    left: 50%;
    width: auto;
    height: auto;
    flex-direction: row;
    padding: 4px;
    transform: translateX(-50%);
    border: 1px solid var(--line-strong);
    background: rgba(0, 0, 0, 0.85);
    transition: opacity 0.3s, visibility 0.3s, translate 0.3s;
  }
  .rail.is-away { opacity: 0; visibility: hidden; translate: 0 20px; }
  .ruler-y { display: none; }
  .logo { width: 52px; height: 52px; }
  .hud-status .sig { display: none; }
  .hero { padding: calc(var(--hud) + 28px) 16px 96px; min-height: 0; }
  .figure { --size: min(86vw, 52svh); }
  .callouts polyline:nth-of-type(n + 4), .callouts rect:nth-of-type(n + 4) { display: none; }
  .band { width: calc(100% + 32px); margin-inline: -16px; }
  .wordmark {
    font-size: 17.5vw;
    white-space: normal;
    text-align: center;
    line-height: 0.86;
    padding: 0.06em 0.12em 0.12em;
  }
  .ca { width: 100%; padding: 10px; gap: 10px; }
  .ca-text { flex: 1; font-size: 0.8rem; line-height: 1.45; }
  .scroll-cue { display: none; }
  .line-pin { padding-top: 56px; }
  .line-track { gap: 34px; }
  .strip-code, .strip-nodes { display: none; }
  .strip-text { font-size: 15vw; }
  .scan { grid-template-columns: 1fr; padding-top: 72px; }
  .end { padding-bottom: 0; }
  .end-row .barcode { display: none; }
  .end-row { padding-bottom: 20px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .grain { animation: none; }
  .reticle, .streaks { display: none; }
  .wordmark::after { display: none; }
  .live-dot, .caret { animation: none !important; }
  .scan-heat { clip-path: none; }
  .scan-bar { display: none; }
}
