:root {
  --bg: #050a12;
  --bg-2: #0b1624;
  --ice: #cfe6ff;
  --ice-dim: rgba(207, 230, 255, .62);
  --ice-faint: rgba(207, 230, 255, .28);
  --cyan: #8fd8ff;
  --line: rgba(170, 205, 240, .30);
  --line-strong: rgba(190, 220, 250, .55);
  --glass: rgba(120, 160, 205, .10);
  --glass-2: rgba(70, 100, 140, .12);
  --side: rgba(30, 48, 74, .78);
  --amber: #ffc069;
  --display: 'Jura', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --gutter: clamp(16px, 3vw, 44px);

}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ice);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul, ol, dl, dd, pre { margin: 0; padding: 0; }
ul, ol { list-style: none; }
:focus-visible { outline: 1px solid var(--cyan); outline-offset: 3px; }

.dot {
  display: inline-block; width: 5px; height: 5px; margin-right: 9px;
  border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
  animation: blink 2.4s ease-in-out infinite; vertical-align: middle;
}
@keyframes blink { 50% { opacity: .3; } }

/* ───────── Пространство ───────── */

.space, .space > * { position: fixed; inset: 0; pointer-events: none; }
.space { background: radial-gradient(120% 90% at 50% 110%, var(--bg-2), var(--bg) 60%); }
.space-grid {
  background-image:
    linear-gradient(rgba(170, 205, 240, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170, 205, 240, .07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 100%);
  transform: perspective(900px) rotateX(58deg) translateY(18%) scale(1.6);
  transform-origin: 50% 100%;
  opacity: .8;
}
.space-beam {
  background: radial-gradient(45% 30% at 62% 8%, rgba(143, 216, 255, .22), transparent 70%);
  animation: beam 18s ease-in-out infinite alternate;
}
@keyframes beam { to { transform: translate3d(-6%, 3%, 0); opacity: .7; } }
/* Пыль: два слоя точек, плывущих вверх. Двигаются через transform — без перерисовки. */
.space-dust, .space-dust::after {
  inset: 0 0 -480px 0 !important;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(207, 230, 255, .55), transparent 100%),
    radial-gradient(1px 1px at 68% 9%, rgba(207, 230, 255, .4), transparent 100%),
    radial-gradient(1.4px 1.4px at 41% 47%, rgba(207, 230, 255, .5), transparent 100%),
    radial-gradient(.9px .9px at 87% 62%, rgba(207, 230, 255, .45), transparent 100%),
    radial-gradient(1.1px 1.1px at 23% 81%, rgba(207, 230, 255, .35), transparent 100%),
    radial-gradient(1.3px 1.3px at 57% 93%, rgba(207, 230, 255, .5), transparent 100%);
  background-size: 480px 480px;
  animation: dust 90s linear infinite;
  will-change: transform;
}
.space-dust::after {
  content: '';
  position: absolute;
  inset: 0 !important;
  background-size: 310px 310px;
  opacity: .6;
  animation: none;
  transform: translate3d(70px, 40px, 0);
}
@keyframes dust { to { transform: translate3d(0, -480px, 0); } }
.space-grain {
  inset: -6% !important; /* небольшой запас под сдвиги; огромный слой зря ест видеопамять */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .07;
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-2%, 1.5%); } 40% { transform: translate(1.5%, -2%); }
  60% { transform: translate(-1.5%, -1%); } 80% { transform: translate(2%, 2%); } 100% { transform: translate(0, 0); }
}
.space-vignette { background: radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(3, 6, 12, .8) 100%); }

/* ───────── Декор ───────── */

.deco {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 4; pointer-events: none;
  color: var(--ice-faint);
  transition: opacity 1.2s var(--ease-out);
}
.deco .strong { color: var(--ice-dim); }
.deco .accent { color: var(--cyan); }
.deco text { font-family: var(--mono); font-size: 8px; letter-spacing: .18em; fill: currentColor; }
/* Кольца: каждое — свой маленький слой, вращается целиком. Раньше они крутились внутри
   полноэкранного SVG, и браузер перерисовывал весь экран 60 раз в секунду. */
.rings { position: fixed; left: 50px; bottom: 50px; width: 120px; height: 120px; z-index: 4; pointer-events: none; color: var(--ice-faint); transition: opacity 1.2s var(--ease-out); }
.rings svg { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; }
.rings .ring-a { animation: spin 24s linear infinite; }
.rings .ring-b { animation: spin 16s linear infinite reverse; color: var(--ice-dim); }
.rings .ring-c { animation: spin 40s linear infinite; }
.rings i { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--cyan); }
.rings b { position: absolute; left: 100%; top: 50%; margin: -6px 0 0 4px; font: 400 8px var(--mono); letter-spacing: .18em; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Прицел за курсором — тоже отдельный маленький слой */
.cross { position: fixed; left: -40px; top: -40px; width: 80px; height: 80px; z-index: 4; pointer-events: none; color: var(--ice-dim); will-change: transform; transition: transform .35s var(--ease-out), opacity 1.2s var(--ease-out); }
.cross svg { width: 100%; height: 100%; overflow: visible; }
.cross text { font-family: var(--mono); font-size: 8px; letter-spacing: .18em; fill: var(--cyan); }

/* Выноски в 3D вокруг главного диалога */
.tags { position: absolute; inset: 0; pointer-events: none; transform-style: preserve-3d; }
.tag {
  position: absolute;
  display: inline-flex; gap: 8px; align-items: baseline;
  padding: 5px 9px 4px;
  font-size: 8.5px; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap;
  color: var(--ice-dim);
  border: 1px solid var(--line);
  background: rgba(5, 10, 18, .55);
  transform: translateZ(60px);
  transition: opacity 1.2s var(--ease-out);
}
.tag b { font-weight: 400; color: var(--cyan); }
.tag i { font-style: normal; font-variant-numeric: tabular-nums; }
/* линия-выноска к диалогу */
.tag::before { content: ''; position: absolute; background: var(--line-strong); }
.tag::after { content: ''; position: absolute; width: 4px; height: 4px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.tag-1 { left: 9%; top: 24%; }
.tag-1::before { left: 100%; top: 50%; width: 70px; height: 1px; }
.tag-1::after { left: calc(100% + 68px); top: calc(50% - 2px); }
.tag-2 { right: 8%; top: 20%; }
.tag-2::before { right: 100%; top: 50%; width: 56px; height: 1px; }
.tag-2::after { right: calc(100% + 54px); top: calc(50% - 2px); }
.tag-3 { right: 12%; bottom: 20%; }
.tag-3::before { right: 100%; top: 50%; width: 90px; height: 1px; transform: rotate(-14deg); transform-origin: right center; }
.tag-3::after { right: calc(100% + 86px); top: calc(50% - 24px); }
.tag-4 { left: 12%; bottom: 25%; }
.tag-4::before { left: 100%; top: 50%; width: 60px; height: 1px; transform: rotate(18deg); transform-origin: left center; }
.tag-4::after { left: calc(100% + 56px); top: calc(50% + 16px); }
body:not([data-current="main"]) .tag { opacity: 0; }

/* Плиты: точечная матрица и каркас */
.matrix {
  position: absolute; right: 14px; top: 14px; width: 42%; height: 40%;
  background-image: radial-gradient(rgba(207, 230, 255, .35) .7px, transparent .8px);
  background-size: 9px 9px;
  mask-image: linear-gradient(135deg, #000 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(135deg, #000 30%, transparent 100%);
}
.wire { position: absolute; right: 14px; bottom: 12px; width: 34%; color: var(--ice-faint); opacity: .8; }

/* Внутри диалога */
.hatch {
  position: absolute; left: 34px; right: 34px; top: 52px; height: 4px;
  background: repeating-linear-gradient(-45deg, var(--line) 0 2px, transparent 2px 8px);
  opacity: .8;
}
.dialog-body-split { display: grid; grid-template-columns: 1fr 120px; gap: 26px; align-items: start; }
.side { display: grid; gap: 14px; justify-items: stretch; padding-top: 6px; }
.wire-side { position: static; width: 100%; color: var(--ice-dim); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 34px; border-bottom: 1px solid var(--line); }
.bars b { flex: 1; height: 100%; background: var(--ice-faint); transform: scaleY(.1); transform-origin: bottom; transition: transform .9s var(--ease-out); }
.bars b.hot { background: var(--cyan); }
.side-label { font-size: 7.5px; letter-spacing: .2em; line-height: 1.6; color: var(--ice-faint); }
.scan {
  position: absolute; left: 0; right: 0; top: 0; height: 26px;
  background: linear-gradient(180deg, transparent, rgba(143, 216, 255, .08) 60%, rgba(143, 216, 255, .22) 100%);
  border-bottom: 1px solid rgba(143, 216, 255, .35);
  opacity: 0;
  will-change: transform, opacity;
  pointer-events: none;
}
/* идёт только в активном окне: на фоновых плитах её всё равно не видно */
.dialog.is-active .scan { animation: scan 7s var(--ease-in-out) infinite 2s; }
@keyframes scan {
  0%, 15% { transform: translate3d(0, -30px, 0); opacity: 0; }
  20% { opacity: 1; }
  60% { transform: translate3d(0, var(--scan-h, 420px), 0); opacity: 1; }
  62%, 100% { transform: translate3d(0, var(--scan-h, 420px), 0); opacity: 0; }
}

/* ───────── HUD ───────── */

.hud {
  position: fixed; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: calc(var(--gutter) * .7) var(--gutter);
  font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ice-dim);
  transition: opacity 1.2s var(--ease-out), transform 1.4s var(--ease-out);
}
.hud-top { top: 0; }
.hud-bottom { bottom: 0; }
.hud-top.hud { transform: translate3d(0, 0, 0); }
.orbit .hud { opacity: .35; }

.brand { display: grid; grid-template-columns: auto auto; column-gap: 12px; align-items: center; color: var(--ice); }
.brand-glyph {
  grid-row: span 2; width: 22px; height: 22px;
  background: var(--ice);
  clip-path: polygon(50% 0, 100% 100%, 65% 100%, 50% 62%, 35% 100%, 0 100%);
  box-shadow: 0 0 20px rgba(207, 230, 255, .5);
}
.brand-mark { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .3em; line-height: 1; text-transform: uppercase; }
.brand-sub { font-size: 8.5px; letter-spacing: .24em; color: var(--ice-faint); }

.hud-mid { flex: 1; text-align: center; }
.idle { opacity: 0; transition: opacity .6s var(--ease-out); }
.idle.is-on { opacity: 1; }
.idle b { color: var(--cyan); font-weight: 400; font-variant-numeric: tabular-nums; }

.lang { display: inline-flex; gap: 2px; }
.lang button {
  min-width: 30px; min-height: 28px; padding: 0 6px;
  font-size: 9.5px; letter-spacing: .16em; color: var(--ice-faint);
  border: 1px solid transparent;
  transition: color .5s var(--ease-out), border-color .5s var(--ease-out), background .5s var(--ease-out);
}
.lang button:hover { color: var(--ice); }
.lang button[aria-pressed="true"] { color: var(--cyan); border-color: var(--line); background: rgba(143, 216, 255, .08); }

.hud-cell { white-space: nowrap; }
.hud-bottom .hud-cell:nth-child(2) { font-variant-numeric: tabular-nums; }

/* ───────── Сцена ───────── */

.scene {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  perspective: 1500px;
  perspective-origin: 50% 45%;
}
.rig {
  position: relative;
  width: min(1100px, 100vw);
  height: min(700px, 100vh);
  transform-style: preserve-3d;
  /* базовый разворот сцены + наклон за курсором */
  transform: rotateX(calc(var(--rx, 0deg) + 3deg)) rotateY(calc(var(--ry, 0deg) - 7deg));
  will-change: transform;
}
.orbit .rig { animation: orbit 60s ease-in-out infinite alternate; }
@keyframes orbit {
  0% { transform: rotateX(4deg) rotateY(-14deg) translateZ(-40px); }
  50% { transform: rotateX(-3deg) rotateY(10deg) translateZ(20px); }
  100% { transform: rotateX(5deg) rotateY(-8deg) translateZ(-60px); }
}

/* Фоновые плиты */
.slab {
  position: absolute;
  transform-style: preserve-3d;
  background: linear-gradient(135deg, rgba(120, 160, 205, .07), rgba(70, 100, 140, .03));
  border: 1px solid rgba(170, 205, 240, .16);
  overflow: hidden;
  transition: opacity 1.4s var(--ease-out), transform 1.6s var(--ease-out);
}
.slab-a { width: 46%; height: 34%; left: -22%; top: -8%; transform: translateZ(-900px) rotateY(24deg); }
.slab-b { width: 30%; height: 52%; right: -20%; bottom: -10%; transform: translateZ(-1000px) rotateY(-26deg); }
.slab .micro { padding: 14px; font-size: 7px; line-height: 1.7; color: var(--ice-faint); }

/* ───────── Диалог ───────── */

.dialog {
  position: absolute; left: 50%; top: 50%;
  width: min(640px, calc(100vw - var(--gutter) * 2));
  max-height: calc(100vh - 150px);
  overflow: auto;
  transform-style: preserve-3d;
  /* Окна раскиданы по пространству: у каждого своё место и свой разворот.
     main.js ставит --x/--y/--z/--ry/--rx как положение окна относительно активного,
     поэтому активное всегда в центре, а остальные висят вокруг на разной высоте и глубине. */
  --x: 0px; --y: 0px; --z: 0px; --ry: 0deg; --rx: 0deg;
  transform:
    translate(-50%, -50%)
    translate3d(var(--x), var(--y), var(--z))
    rotateY(var(--ry))
    rotateX(var(--rx));
  padding: 22px 34px 26px;
  background: linear-gradient(120deg, var(--glass), var(--glass-2) 70%);
  border: 1px solid var(--line-strong);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .03),
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 40px 120px rgba(0, 0, 0, .55);
  opacity: 1;
  transition:
    transform 1.7s cubic-bezier(.7, 0, .15, 1),
    opacity 1.2s var(--ease-in-out),
    border-color .6s var(--ease-out);
  scrollbar-width: none;
}
.dialog::-webkit-scrollbar { display: none; }
/* Толщина плиты: тёмная грань позади и сбоку */
.dialog::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--side);
  border: 1px solid rgba(170, 205, 240, .18);
  transform: translate3d(-12px, 10px, -22px);
  z-index: -1;
}
/* Блик — точка следует за курсором (--gx, --gy) */
.dialog::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at var(--gx, 30%) var(--gy, 20%), rgba(255, 255, 255, .14), transparent 60%),
    linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .06) 50%, transparent 60%);
}
.dialog-wide { width: min(860px, calc(100vw - var(--gutter) * 2)); }

/* Размытие того, что за стеклом, — самая дорогая операция на странице, поэтому оно только у активного окна */
.dialog.is-active { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* Окна вне центра — те самые плиты на фоне: приглушены, содержимое не нажимается,
   но клик по самой плите привозит её в центр */
.dialog[hidden] { display: block; }
.dialog:not(.is-active) {
  opacity: .34;
  cursor: pointer;
  overflow: hidden;
}
.dialog:not(.is-active) > * { pointer-events: none; }
.dialog:not(.is-active):hover { opacity: .62; border-color: var(--ice); }
.dialog.is-far { opacity: .14; }
/* Приехавшее окно: по стеклу проходит вспышка */
.dialog.is-arriving { animation: arrive 1.6s var(--ease-out); }
@keyframes arrive {
  0% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03), inset 0 1px 0 rgba(255, 255, 255, .12), 0 40px 120px rgba(0, 0, 0, .55); }
  55% { box-shadow: inset 0 0 0 1px rgba(143, 216, 255, .5), inset 0 0 80px rgba(143, 216, 255, .22), 0 0 90px rgba(143, 216, 255, .35); }
  100% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03), inset 0 1px 0 rgba(255, 255, 255, .12), 0 40px 120px rgba(0, 0, 0, .55); }
}

.dialog-head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 14px; margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ice-dim);
}
.glyph {
  width: 14px; height: 14px; flex: none;
  background: var(--ice);
  clip-path: polygon(50% 0, 100% 100%, 65% 100%, 50% 62%, 35% 100%, 0 100%);
}
.kicker { flex: 1; }
.head-meta { display: flex; gap: 18px; color: var(--ice-faint); }
.head-meta b { font-weight: 400; font-variant-numeric: tabular-nums; color: var(--ice-dim); }
.head-meta i { font-style: normal; }
.head-btn { display: inline-flex; gap: 8px; color: var(--ice-dim); padding: 6px 0; transition: color .4s; }
.head-btn:hover { color: var(--ice); }
.head-btn i { font-style: normal; color: var(--cyan); }

.title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.12;
  letter-spacing: .01em;
  text-wrap: balance;
  text-shadow: 0 0 30px rgba(207, 230, 255, .25);
}
.title em { font-style: normal; color: var(--cyan); text-shadow: 0 0 24px rgba(143, 216, 255, .7); }
.text { margin-top: 16px; max-width: 56ch; color: var(--ice-dim); font-size: 12.5px; }
.micro-inline { margin-top: 20px; font-size: 7px; line-height: 1.7; color: var(--ice-faint); columns: 3; column-gap: 18px; }
.hint { margin-top: 16px; font-size: 9px; letter-spacing: .14em; color: var(--ice-faint); text-transform: uppercase; }

.dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.action {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 46px; padding: 0 20px 0 14px;
  font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ice);
  background: linear-gradient(120deg, rgba(207, 230, 255, .10), rgba(207, 230, 255, .04));
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 8px 24px rgba(0, 0, 0, .3);
  transition: background .5s var(--ease-out), box-shadow .5s var(--ease-out), transform .5s var(--ease-out), border-color .5s var(--ease-out);
}
.action i { font-family: var(--mono); font-style: normal; font-size: 9.5px; color: var(--cyan); letter-spacing: .1em; }
.action:hover { background: linear-gradient(120deg, rgba(207, 230, 255, .22), rgba(207, 230, 255, .08)); border-color: var(--ice); transform: translate3d(0, -2px, 0); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 14px 34px rgba(0, 0, 0, .35), 0 0 30px rgba(143, 216, 255, .18); }
.action:active, .action.is-pressed { transform: translate3d(0, 1px, 0) scale(.985); background: rgba(207, 230, 255, .3); color: #06101c; transition-duration: .08s; }
.action::after {
  content: ''; position: absolute; right: 6px; top: 6px; width: 4px; height: 4px;
  background: var(--cyan); opacity: .5;
}

.mark { position: absolute; width: 14px; height: 14px; border-color: var(--ice-faint); border-style: solid; border-width: 0; pointer-events: none; }
.mark-tl { left: -1px; top: -1px; border-left-width: 1px; border-top-width: 1px; }
.mark-br { right: -1px; bottom: -1px; border-right-width: 1px; border-bottom-width: 1px; }

/* Списки и факты */
.list { margin-top: 24px; border-top: 1px solid var(--line); }
.item { border-bottom: 1px solid var(--line); }
.item-row {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: baseline;
  width: 100%; padding: 14px 0; text-align: left;
  transition: padding .5s var(--ease-out), background .5s var(--ease-out);
}
.item-row:hover, .item.is-open .item-row { background: linear-gradient(90deg, rgba(143, 216, 255, .08), transparent); padding-left: 10px; }
.item-row .n { font-size: 9.5px; letter-spacing: .16em; color: var(--cyan); }
.item-row .t { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: .04em; text-transform: uppercase; }
.item-row .t small { display: block; font-family: var(--mono); font-size: 11px; text-transform: none; letter-spacing: 0; color: var(--ice-dim); margin-top: 2px; }
.item-row .y { font-size: 9.5px; letter-spacing: .16em; color: var(--ice-faint); }
.item-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s var(--ease-out); }
.item.is-open .item-detail { grid-template-rows: 1fr; }
.item-detail > div { overflow: hidden; }
.item-detail .inner { padding: 4px 0 20px 54px; display: grid; gap: 14px; }
.item-detail .desc { color: var(--ice-dim); max-width: 60ch; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 22px; }
.facts div { background: rgba(5, 10, 18, .6); padding: 12px 14px; }
.facts dt, .cols h3 { font-size: 9px; letter-spacing: .22em; color: var(--ice-faint); text-transform: uppercase; font-weight: 400; }
.facts dd { margin-top: 4px; }
.cols { display: grid; gap: 18px; margin-top: 22px; }
.cols p { color: var(--ice-dim); margin-top: 6px; max-width: 60ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips li { padding: 4px 9px; border: 1px solid var(--line); font-size: 10px; letter-spacing: .12em; color: var(--cyan); }
.is-decoding { text-shadow: 0 0 14px rgba(143, 216, 255, .6); }

/* ───────── Развёртывание интерфейса при загрузке ─────────
   Пока на <body> стоит .boot, каждый слой спрятан до своего шага.
   main.js по таймеру добавляет классы b1…b10; правило вида `.boot:not(.bN) X`
   описывает, как X выглядит ДО шага N. Когда всё собрано, .boot снимается. */

.boot .dialog, .boot .dialog > *, .boot .tag, .boot .slab, .boot .hud, .boot .rings, .boot .cross, .boot .space-grid, .boot .space-beam, .boot .space-dust {
  transition: opacity .7s var(--ease-out), transform .9s var(--ease-out), clip-path .8s var(--ease-in-out);
}

/* b1 — в пустоте проявляется пол-сетка, по центру из точки вытягивается линия */
.boot:not(.b1) .space-grid { opacity: 0; }
.boot .space-grid { transition-duration: 2.4s; }
.seed {
  position: absolute; left: 50%; top: 50%;
  width: min(640px, calc(100vw - var(--gutter) * 2)); height: 1px;
  margin-left: calc(min(640px, calc(100vw - var(--gutter) * 2)) / -2);
  background: var(--ice);
  box-shadow: 0 0 18px var(--cyan);
  opacity: 0;
  transform: scaleX(0);
  transition: transform .5s var(--ease-in-out), opacity .3s;
  pointer-events: none;
}
.boot.b1:not(.b2) .seed { opacity: 1; transform: scaleX(1); }

/* b2 — линия раскрывается по вертикали в каркас главного окна: только контур и уголки */
.boot:not(.b2) #view-main { clip-path: inset(50% 0 50% 0); }
.boot #view-main { clip-path: inset(0 0 0 0); }
.boot:not(.b3) #view-main { background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.boot:not(.b3) #view-main::before, .boot:not(.b3) #view-main::after { opacity: 0; }
.boot #view-main::before { transition: opacity .6s var(--ease-out), transform .9s var(--ease-out); }
.boot:not(.b3) #view-main::before { transform: translate3d(0, 0, -22px); }

/* b3 — включается стекло (мерцанием), выезжает толщина плиты, появляется шапка */
.boot.b3:not(.b4) #view-main { animation: flick .45s steps(1); }
@keyframes flick { 0% { opacity: .3; } 25% { opacity: 1; } 40% { opacity: .5; } 60% { opacity: 1; } 75% { opacity: .75; } 100% { opacity: 1; } }
.boot:not(.b3) #view-main .dialog-head { opacity: 0; transform: translate3d(-10px, 0, 0); }
.boot:not(.b3) .space-beam { opacity: 0; }

/* b4 — штриховка проезжает слева направо, заголовок расшифровывается */
.boot:not(.b4) #view-main .hatch { clip-path: inset(0 100% 0 0); }
.boot #view-main .hatch { clip-path: inset(0 0 0 0); }
.boot:not(.b4) #view-main .title { opacity: 0; }

/* b5 — основной текст и колонки служебных данных */
.boot:not(.b5) #view-main .text { opacity: 0; transform: translate3d(0, 6px, 0); }
.boot:not(.b5) #view-main .micro-inline { clip-path: inset(0 100% 0 0); }
.boot #view-main .micro-inline { clip-path: inset(0 0 0 0); transition-duration: 1.1s; }

/* b6 — правая колонка: каркас куба прорисовывается линиями, вырастают столбики */
.boot:not(.b6) #view-main .side { opacity: 0; }
.wire path:not([stroke-dasharray]) { stroke-dasharray: 420; stroke-dashoffset: 0; transition: stroke-dashoffset 1.3s var(--ease-in-out); }
.boot:not(.b6) .wire-side path:not([stroke-dasharray]) { stroke-dashoffset: 420; }
.boot:not(.b6) .bars b { transform: scaleY(0) !important; }

/* b7 — кнопки, одна за другой, вытягиваются слева направо */
.boot:not(.b7) #view-main .action { clip-path: inset(0 100% 0 0); opacity: 0; }
.boot #view-main .action { clip-path: inset(0 0 0 0); transition: clip-path .5s var(--ease-in-out), opacity .3s; }
.boot #view-main .action:nth-child(2) { transition-delay: .14s; }
.boot #view-main .action:nth-child(3) { transition-delay: .28s; }
.boot:not(.b7) #view-main .hint { opacity: 0; }
.boot #view-main .hint { transition-delay: .5s; }
.boot:not(.b7) #view-main .scan { animation: none; }

/* b8 — выноски: сначала точка на окне, от неё тянется линия, потом появляется подпись */
.boot:not(.b8) .tag { opacity: 0; }
.boot .tag::before { transition: width .6s var(--ease-in-out); }
.boot:not(.b8) .tag::before { width: 0; }
.boot .tag::after { transition: opacity .3s; }
.boot:not(.b8) .tag::after { opacity: 0; }
.boot .tag-2 { transition-delay: .12s; } .boot .tag-2::before { transition-delay: .12s; }
.boot .tag-3 { transition-delay: .24s; } .boot .tag-3::before { transition-delay: .24s; }
.boot .tag-4 { transition-delay: .36s; } .boot .tag-4::before { transition-delay: .36s; }

/* b9 — в глубине раскрываются остальные окна и плиты */
.boot:not(.b9) .dialog:not(#view-main) { clip-path: inset(50% 0 50% 0); opacity: 0; }
.boot .dialog:not(#view-main) { clip-path: inset(0 0 0 0); }
.boot #view-about { transition-delay: .15s; }
.boot #view-contact { transition-delay: .3s; }
.boot:not(.b9) .slab { opacity: 0; }
.boot:not(.b9) .space-dust { opacity: 0; }

/* b10 — приборы по краям: линейки проезжают слева направо, кольца, прицел, строки HUD */
.boot .deco { transition: clip-path 1.3s var(--ease-in-out), opacity .6s; clip-path: inset(0 0 0 0); }
.boot:not(.b10) .deco { clip-path: inset(0 100% 0 0); opacity: 0; }
.boot:not(.b10) .rings { opacity: 0; transform: scale(.6) rotate(-90deg); }
.boot:not(.b10) .cross { opacity: 0; }
.boot:not(.b10) .hud { opacity: 0; }
.boot:not(.b10) .hud-top { transform: translate3d(0, -10px, 0); }
.boot:not(.b10) .hud-bottom { transform: translate3d(0, 10px, 0); }

/* Журнал загрузки */
.bootlog {
  position: fixed; left: var(--gutter); bottom: calc(var(--gutter) * .7 + 26px); z-index: 6;
  font: 400 9.5px/1.9 var(--mono); letter-spacing: .2em; text-transform: uppercase;
  color: var(--ice-dim);
  opacity: 0;
  transition: opacity .8s var(--ease-out);
  pointer-events: none;
}
.boot .bootlog { opacity: 1; }
.bootlog b { font-weight: 400; color: var(--cyan); }

/* ───────── Узкие экраны ───────── */
@media (max-width: 760px) {
  .brand-sub, .hud-mid, .hud-bottom .hud-cell:nth-child(2) { display: none; }
  .dialog { padding: 18px 20px 22px; max-height: calc(100vh - 120px); }
  .rig { transform: none; }
  .micro-inline { columns: 2; }
  .head-meta { display: none; }
  .item-row { grid-template-columns: 32px 1fr; }
  .item-row .y { display: none; }
  .item-detail .inner { padding-left: 0; }
  .slab, .tags, .deco, .rings, .cross, .side, .hatch { display: none; }
  .dialog-body-split { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
