/* ═══════════════════════════════════════════════════════════
   AKBAR STUDIOS — dark mechanical command console.
   Gunmetal steel · rust-orange heat · cyan coolant lines.
   The Iron Serpent is the interface: channels are served as
   holographic panels projected from its crown.
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg:        #0b0e11;
  --bg-2:      #11151a;
  --panel:     #141a20;
  --ink:       #e8edf2;   /* foreground on dark */
  --ink-soft:  #8b98a5;
  --rust:      #ff7b1c;   /* primary — furnace orange */
  --rust-hot:  #ffab45;
  --cyan:      #38e1ff;   /* secondary — coolant */
  --cyan-soft: #9ff0ff;
  --line:      rgba(232, 237, 242, 0.10);
  --line-soft: rgba(232, 237, 242, 0.05);
  --line-rust: rgba(255, 123, 28, 0.35);
  --glow-rust: 0 0 10px rgba(255, 123, 28, .6), 0 0 32px rgba(255, 123, 28, .28);
  --glow-cyan: 0 0 10px rgba(56, 225, 255, .55), 0 0 30px rgba(56, 225, 255, .25);
  --font-display: "Audiowide", sans-serif;
  --font-body: "Bai Jamjuree", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --cut: 16px;
  --nav-h: 62px;
  --status-h: 34px;
  --hazard: repeating-linear-gradient(-45deg,
    var(--rust) 0 8px, transparent 8px 16px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; overflow: hidden; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--rust); color: #0b0e11; }
.mono { font-family: var(--font-mono); }
.blink { color: var(--rust); animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }

/* ── Backdrop: dark plate + heat glow + drifting scan ─────── */
.grid-bg {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 100% 56px,
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px) 0 0 / 56px 100%,
    radial-gradient(1100px 650px at 80% -8%, rgba(255, 123, 28, .08), transparent 60%),
    radial-gradient(900px 600px at -8% 110%, rgba(56, 225, 255, .06), transparent 60%),
    var(--bg);
}
.grid-bg::after {
  content: ""; position: absolute; left: 0; right: 0;
  top: -900px; bottom: -900px;
  background: repeating-linear-gradient(180deg,
    transparent 0, rgba(255, 123, 28, .035) 450px, transparent 900px);
  animation: scan 10s linear infinite;
  will-change: transform;
}
@keyframes scan { to { transform: translateY(900px); } }

.noise {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.6 0 0 0 0 0.3 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── NAV ───────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 3vw, 44px);
  background: rgba(11, 14, 17, .8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav::after { /* hazard strip under the nav */
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: var(--hazard);
  opacity: .5;
}

.nav__brand { display: flex; align-items: center; text-decoration: none; color: var(--ink); }
.nav__word { font-family: var(--font-display); font-size: 15px; letter-spacing: .08em; }
.nav__word em { color: var(--rust); font-style: normal; }
.nav__word span { display: block; font-family: var(--font-mono); font-size: 8px; letter-spacing: .3em; color: var(--ink-soft); }

.nav__links { display: flex; gap: clamp(16px, 3vw, 44px); }
.nav__links a {
  position: relative;
  font-family: var(--font-display);
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none;
  padding: 8px 2px;
  transition: color .2s ease, text-shadow .2s ease;
}
.nav__links a::before {
  content: attr(data-i); position: absolute; top: -4px; right: -15px;
  font-family: var(--font-mono); font-size: 8.5px; color: var(--cyan);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--rust); box-shadow: var(--glow-rust);
  transition: width .25s ease;
}
.nav__links a:hover { color: var(--rust-hot); text-shadow: 0 0 12px rgba(255,123,28,.5); }
.nav__links a:hover::after, .nav__links a.is-active::after { width: 100%; }
.nav__links a.is-active { color: var(--rust); }

.nav__status { font-size: 10px; letter-spacing: .2em; color: var(--ink-soft); }

/* hamburger — hidden on desktop, shown on mobile */
.nav__burger {
  display: none;
  width: 34px; height: 30px; padding: 6px;
  background: none; border: 1px solid var(--line); cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.nav__burger i { display: block; height: 2px; width: 100%; background: var(--rust); transition: transform .25s ease, opacity .2s ease; }
.nav__burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── STAGE ─────────────────────────────────────────────────── */
.stage {
  position: fixed;
  top: var(--nav-h); bottom: var(--status-h); left: 0; right: 0;
}
#titanCanvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#titanCanvas:active { cursor: grabbing; }

.corner { position: absolute; width: 30px; height: 30px; pointer-events: none; z-index: 5; }
.corner::before, .corner::after { content: ""; position: absolute; background: var(--rust); box-shadow: var(--glow-rust); }
.corner::before { width: 100%; height: 2px; }
.corner::after { width: 2px; height: 100%; }
.corner--tl { top: 12px; left: 12px; }
.corner--tr { top: 12px; right: 12px; transform: scaleX(-1); }
.corner--bl { bottom: 12px; left: 12px; transform: scaleY(-1); }
.corner--br { bottom: 12px; right: 12px; transform: scale(-1); }

.stage__readout {
  position: absolute; top: 22px; left: 26px; z-index: 5;
  font-size: 10px; line-height: 1.9; letter-spacing: .14em;
  color: var(--ink-soft);
  background: rgba(17, 21, 26, .78);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-left: 2px solid var(--rust);
  padding: 8px 12px;
  pointer-events: none;
}
.stage__readout b { color: var(--rust); margin-right: 8px; }
.stage__readout--bl { top: auto; bottom: 18px; left: 26px; border-left-color: var(--cyan); }
.stage__readout--bl b { color: var(--cyan); }

/* ── HUD reticle (rides beside the native cursor) ──────────── */
.reticle {
  position: absolute; z-index: 12;
  width: 0; height: 0;
  pointer-events: none;
  display: none;
}
.reticle.is-on { display: block; }
.reticle i { position: absolute; background: var(--rust); box-shadow: 0 0 6px rgba(255, 123, 28, .8); }
.reticle i:first-child  { width: 8px; height: 1.5px; left: -25px; top: -0.75px; }
.reticle i:last-of-type { width: 1.5px; height: 8px; left: -0.75px; top: -25px; }
.reticle::before {
  content: ""; position: absolute;
  width: 34px; height: 34px; left: -17px; top: -17px;
  border: 1px solid rgba(255, 123, 28, .5);
  border-radius: 50%;
}
.reticle span {
  position: absolute; left: 14px; top: 12px;
  font-size: 8.5px; letter-spacing: .1em;
  color: var(--rust-hot);
  white-space: nowrap;
}

/* ── HOME OVERLAY ──────────────────────────────────────────── */
.home {
  position: absolute; z-index: 6;
  left: clamp(20px, 4vw, 60px); top: 50%;
  transform: translateY(-50%);
  max-width: min(46vw, 640px);
  pointer-events: none;
  transition: opacity .5s ease, transform .5s ease;
}
.home.is-hidden { opacity: 0; transform: translateY(-50%) translateX(-36px); }

.home__meta { font-size: 11px; letter-spacing: .2em; color: var(--ink-soft); margin-bottom: 20px; }
.home__sep { color: var(--cyan); margin: 0 8px; }

.home__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.2vw, 92px);
  line-height: 1.04;
  letter-spacing: .02em;
  user-select: none;
  margin-bottom: 22px;
}
.home__line { display: block; white-space: nowrap; }
.home__line--indent { padding-left: clamp(20px, 3.5vw, 70px); }
.home__line .ltr {
  display: inline-block;
  color: rgba(255, 123, 28, calc(var(--p, 0) * .95));
  -webkit-text-stroke: 1.6px var(--ink);
  text-shadow:
    0 0 calc(var(--p, 0) * 16px) rgba(255, 140, 40, calc(var(--p, 0) * .9)),
    0 0 calc(var(--p, 0) * 46px) rgba(255, 123, 28, calc(var(--p, 0) * .5));
  transform: translateY(calc(var(--p, 0) * -5px));
  transition: transform .18s ease;
  animation: ltr-in .7s cubic-bezier(.2, .85, .25, 1) both;
  animation-delay: calc(var(--i) * 50ms + 300ms);
}
.home__line .ltr--space { padding: 0 .18em; }
@keyframes ltr-in {
  from { opacity: 0; transform: translateY(.35em) rotateX(50deg); }
  to   { opacity: 1; transform: translateY(0); }
}

.home__lede { max-width: 46ch; font-size: clamp(14px, 1.3vw, 17px); color: var(--ink-soft); }
.home__lede strong { color: var(--ink); }

.home__stats { display: flex; gap: clamp(20px, 3vw, 44px); margin-top: 24px; }
.home__stats dt {
  font-size: clamp(20px, 2.2vw, 28px);
  color: var(--rust);
  text-shadow: 0 0 18px rgba(255, 123, 28, .4);
}
.home__stats dd { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }

.home__hint {
  margin-top: 24px;
  font-size: 10.5px; letter-spacing: .26em; color: var(--cyan);
  text-shadow: 0 0 14px rgba(56, 225, 255, .5);
  animation: hint-pulse 2.4s ease-in-out infinite;
}
@keyframes hint-pulse { 50% { opacity: .35; } }

/* ── CLAW ANCHOR + LEADER ──────────────────────────────────── */
.anchor {
  position: absolute; z-index: 7;
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border: 2px solid var(--cyan);
  transform: rotate(45deg);
  box-shadow: var(--glow-cyan), inset 0 0 6px rgba(56, 225, 255, .6);
  opacity: 0; transition: opacity .3s ease;
  pointer-events: none;
}
.anchor.is-on { opacity: 1; }
.anchor::after {
  content: ""; position: absolute; inset: -8px;
  border: 1px solid rgba(56, 225, 255, .45);
  animation: anchor-ping 1.8s ease-out infinite;
}
@keyframes anchor-ping {
  0% { transform: scale(.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.leader {
  position: absolute; z-index: 7;
  height: 1.5px;
  background: linear-gradient(90deg, var(--cyan), rgba(56, 225, 255, .2));
  box-shadow: 0 0 8px rgba(56, 225, 255, .5);
  transform-origin: 0 50%;
  opacity: 0; transition: opacity .3s ease;
  pointer-events: none;
}
.leader.is-on { opacity: 1; }

/* ── HOLO PANELS — dark glass, furnace-lit ─────────────────── */
.holo {
  position: absolute; z-index: 8;
  left: 0; top: 0;
  width: min(410px, 92vw);
  max-height: calc(100% - 40px);
  overflow: hidden auto;
  background: rgba(17, 22, 28, .94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(56, 225, 255, .35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .04), 0 0 30px rgba(56, 225, 255, .08);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  padding: 18px 22px 22px;
  visibility: hidden;
}
.holo::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(56, 225, 255, .05) 0 1px, transparent 1px 4px);
}
.holo.is-on {
  visibility: visible;
  animation: holo-in .5s cubic-bezier(.2, .9, .25, 1) both;
}
@keyframes holo-in {
  0%   { opacity: 0; clip-path: polygon(var(--cut) 0, 100% 0, 100% 0, 100% 0, 0 0, 0 var(--cut)); }
  35%  { opacity: 1; }
  60%  { clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
  72%  { opacity: .55; }
  100% { opacity: 1; clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
}

.holo__head {
  display: flex; justify-content: space-between;
  font-size: 9.5px; letter-spacing: .22em; color: var(--rust);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 9px; margin-bottom: 12px;
}
.holo__head b { color: var(--cyan); }

.holo__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  letter-spacing: .05em;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--rust);
  text-shadow: 0 0 20px rgba(255, 123, 28, .45);
  margin-bottom: 14px;
}

.holo__list { list-style: none; }
.holo__list li {
  display: flex; gap: 12px;
  padding: 9px 4px;
  border-top: 1px solid var(--line-soft);
  transition: background .2s ease, padding-left .2s ease;
}
.holo__list li:hover { background: rgba(255, 123, 28, .07); padding-left: 10px; }
.holo__list li > span { font-size: 9.5px; letter-spacing: .12em; color: var(--rust); padding-top: 4px; flex: none; }
.holo__list li.is-alt > span { color: var(--cyan); }
.holo__list b { display: block; font-family: var(--font-display); font-size: 12px; letter-spacing: .04em; margin-bottom: 2px; color: var(--ink); }
.holo__list p { font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
.holo__list i { display: block; font-style: normal; font-size: 9px; letter-spacing: .18em; color: var(--cyan); margin-top: 4px; }

.holo__rows { display: flex; flex-direction: column; }
.holo__rows a {
  display: grid; grid-template-columns: 58px 1fr auto;
  align-items: center; gap: 12px;
  padding: 13px 4px;
  border-top: 1px solid var(--line-soft);
  text-decoration: none; color: var(--ink);
  transition: background .2s ease, padding-left .25s ease;
}
.holo__rows a:hover { background: rgba(255, 123, 28, .08); padding-left: 12px; }
.holo__rows span { font-size: 9px; letter-spacing: .24em; color: var(--cyan); }
.holo__rows b { font-family: var(--font-display); font-size: 12px; font-weight: 400; letter-spacing: .02em; word-break: break-word; }
.holo__rows i { font-style: normal; font-size: 18px; color: var(--rust); transition: transform .25s ease; }
.holo__rows a:hover i { transform: translateX(6px); }
.holo__rows a:hover b { color: var(--rust-hot); }
.holo__foot { margin-top: 14px; font-size: 9px; letter-spacing: .18em; color: var(--ink-soft); }
.holo__more { color: var(--rust); text-decoration: none; }
.holo__more:hover { color: var(--rust-hot); text-shadow: 0 0 10px rgba(255,123,28,.5); }
.holo__sub { border-top: none; padding-top: 12px; }
.holo__sub > span { color: var(--cyan); }
.holo__sub b { color: var(--cyan); font-family: var(--font-display); font-size: 11px; letter-spacing: .1em; }
.holo__sub:first-child { padding-top: 2px; }
.holo__badge { width: 34px; height: 34px; object-fit: contain; flex: none; }
.holo__snap { flex: none; display: block; width: 66px; height: 44px; overflow: hidden; border: 1px solid var(--line); border-radius: 2px; }
.holo__snap img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform .3s ease; }
.holo__snap:hover img { transform: scale(1.15); }
.holo__lede { font-size: 11px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 12px; }
.holo__lede strong { color: var(--cyan); }

/* ── SERPENT CTRL DRAWER ───────────────────────────────────── */
.ctrl { position: absolute; right: 0; bottom: 18px; z-index: 9; display: flex; align-items: flex-end; }
.ctrl__tab {
  writing-mode: vertical-rl;
  font-size: 9px; letter-spacing: .22em;
  background: rgba(17, 22, 28, .85);
  border: 1px solid var(--line); border-right: none;
  border-left: 2px solid var(--rust);
  color: var(--ink-soft);
  padding: 12px 5px; cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.ctrl__tab:hover { color: var(--rust-hot); }
.ctrl__body {
  width: 0; overflow: hidden;
  background: rgba(17, 22, 28, .9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  transition: width .35s cubic-bezier(.2, .8, .2, 1), padding .35s ease;
  padding: 12px 0;
}
.ctrl.is-open .ctrl__body { width: 236px; padding: 12px 14px; }
.ctrl.is-open .ctrl__tab { color: var(--rust); }

.ctrl__head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 9px; letter-spacing: .2em; color: var(--cyan);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px; margin-bottom: 8px;
  white-space: nowrap;
}
.ctrl__pose {
  font-size: 8.5px; letter-spacing: .1em;
  background: none; border: 1px solid var(--line); color: var(--ink-soft);
  padding: 3px 6px; cursor: pointer;
  transition: all .2s ease;
}
.ctrl__pose.is-on { border-color: var(--rust); color: var(--rust); box-shadow: 0 0 10px rgba(255,123,28,.3); }
.ctrl__pose:hover { border-color: var(--rust); color: var(--rust-hot); }

.joint { display: grid; grid-template-columns: 70px 1fr 36px; align-items: center; gap: 8px; padding: 4px 0; }
.joint__name { font-size: 8.5px; letter-spacing: .1em; color: var(--ink-soft); white-space: nowrap; }
.joint__val { font-size: 9px; color: var(--rust); text-align: right; }

.joint input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--rust), var(--rust-hot));
  outline: none; cursor: pointer;
}
.joint input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px;
  background: var(--bg-2);
  border: 2px solid var(--rust);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(255, 123, 28, .5);
}
.joint input[type="range"]::-webkit-slider-thumb:hover { background: var(--rust); }
.joint input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 0;
  background: var(--bg-2); border: 2px solid var(--rust);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(255, 123, 28, .5);
}

/* ── LAYOUT EDITOR ─────────────────────────────────────────── */
.editor {
  position: absolute; top: 22px; right: 26px; z-index: 14;
  width: 250px;
  background: rgba(17, 22, 28, .92);
  border: 1px solid var(--line);
  border-top: 2px solid var(--cyan);
  padding: 12px 14px;
  display: none;
}
.editor.is-on { display: block; }
.editor__head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 9.5px; letter-spacing: .22em; color: var(--cyan);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px; margin-bottom: 10px;
}
.editor__x { background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 11px; }
.editor__x:hover { color: var(--rust); }
.editor__row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.editor__row button {
  flex: 1 0 auto;
  font-family: var(--font-mono);
  font-size: 8.5px; letter-spacing: .08em;
  background: none; border: 1px solid var(--line); color: var(--ink-soft);
  padding: 5px 7px; cursor: pointer;
  transition: all .15s ease;
}
.editor__row button:hover { border-color: var(--rust); color: var(--rust-hot); }
.editor__row button.is-on { border-color: var(--rust); color: var(--rust); box-shadow: 0 0 8px rgba(255,123,28,.3); }
.editor__copy {
  width: 100%;
  font-size: 9.5px; letter-spacing: .14em;
  background: var(--rust); border: none; color: #0b0e11;
  padding: 8px; cursor: pointer; font-weight: 700;
}
.editor__copy:hover { background: var(--rust-hot); }
.editor__copy--cam { margin-top: 6px; background: var(--cyan); }
.editor__copy--cam:hover { background: var(--cyan-soft); }
.editor__hint { margin-top: 8px; font-size: 8px; letter-spacing: .1em; color: var(--ink-soft); line-height: 1.6; }

/* ── LOADER / BOOT ─────────────────────────────────────────── */
.loader {
  position: absolute; inset: 0; z-index: 15;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(60% 70% at 50% 45%, #12161c 0%, var(--bg) 100%);
  transition: opacity .6s ease, visibility .6s ease;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__arc {
  width: 74px; height: 74px; border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--rust);
  border-right-color: var(--cyan);
  animation: spin 1s linear infinite;
  box-shadow: 0 0 24px rgba(255, 123, 28, .25);
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader p { font-size: 11.5px; letter-spacing: .28em; color: var(--ink-soft); }
.loader__bar { width: min(320px, 60%); height: 3px; background: var(--line-soft); overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--rust), var(--rust-hot)); box-shadow: var(--glow-rust); transition: width .2s ease; }
.loader__term {
  width: min(420px, 80%);
  min-height: 118px;
  font-size: 10px; line-height: 1.9; letter-spacing: .08em;
  color: var(--rust-hot);
  text-align: left;
}
.loader__term div { animation: term-in .12s steps(2) both; }
.loader__term div b { color: var(--cyan); font-weight: 600; }
@keyframes term-in { from { opacity: 0; } }

/* ── STATUS BAR ────────────────────────────────────────────── */
.status {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: var(--status-h);
  display: flex; align-items: center; gap: 22px;
  background: #07090b;
  border-top: 1px solid var(--line);
  padding: 0 16px;
  font-size: 10px; letter-spacing: .16em;
  color: rgba(232, 237, 242, .55);
  overflow: hidden;
}
.status__left { display: flex; gap: 22px; white-space: nowrap; align-items: center; }
.status__left b { color: var(--rust); margin-right: 5px; }
.status__snd { cursor: pointer; color: var(--cyan); user-select: none; }
.status__snd.is-off { color: rgba(232, 237, 242, .3); }
.status__hint { color: rgba(232, 237, 242, .3); }
.status__tick { flex: 1; overflow: hidden; }
.status__track { display: flex; white-space: nowrap; animation: tick 30s linear infinite; }
.status__track span {
  font-size: 10px; letter-spacing: .28em;
  color: var(--rust);
  text-shadow: 0 0 12px rgba(255, 123, 28, .5);
}
@keyframes tick { to { transform: translateX(-50%); } }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .home { max-width: 82vw; }
  .nav__status { display: none; }
  .status__hint { display: none; }
}
@media (max-width: 640px) {
  :root { --nav-h: 54px; --status-h: 30px; }

  .nav { padding: 0 14px; gap: 8px; }
  .nav__word { font-size: 13px; margin-right: auto; }
  .nav__word span { display: none; }
  .nav__burger { display: flex; }

  /* channel links become a slide-down overlay */
  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 19;
    flex-direction: column; gap: 0;
    background: rgba(11, 14, 17, .97);
    backdrop-filter: blur(16px);
    border-bottom: 2px solid var(--rust);
    padding: 6px 0 10px;
    transform: translateY(-12px);
    opacity: 0; visibility: hidden;
    transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s ease, visibility .28s;
  }
  .nav__links.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__links a {
    font-size: 15px; letter-spacing: .12em;
    padding: 15px 22px;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav__links a::before {
    display: block; position: static; float: right;
    font-size: 10px; color: var(--cyan); margin-top: 5px;
  }
  .nav__links a::after { display: none; }
  .nav__links a.is-active { color: var(--rust); border-left: 3px solid var(--rust); padding-left: 19px; }

  .home {
    left: 16px; right: 16px; top: 18px;
    max-width: none;
    transform: none;
  }
  .home.is-hidden { transform: translateX(-24px); }
  .home__meta { font-size: 9px; margin-bottom: 12px; }
  .home__title { font-size: clamp(30px, 10vw, 46px); margin-bottom: 12px; }
  .home__lede { font-size: 13px; max-width: none; }
  .home__stats { gap: 18px; margin-top: 14px; }
  .home__stats dt { font-size: 18px; }
  .home__hint { font-size: 9px; letter-spacing: .18em; margin-top: 12px; }

  .stage__readout { display: none; }
  .corner { width: 20px; height: 20px; }

  .holo { width: min(410px, 94vw); max-height: 46vh; padding: 14px 16px 16px; }
  .holo__title {
    font-size: 18px;
    -webkit-text-stroke-width: 0.8px;
    text-shadow: 0 0 6px rgba(255, 123, 28, .25); /* softer glow on small screens */
  }
  .holo__list p { font-size: 11.5px; }
  .holo__rows a { grid-template-columns: 48px 1fr auto; gap: 8px; }
  .holo__rows b { font-size: 10.5px; }

  .ctrl { bottom: 10px; }
  .ctrl.is-open .ctrl__body { width: min(236px, 74vw); }

  .status { gap: 12px; padding: 0 10px; font-size: 9px; }
  .status__left { gap: 12px; }
  .status__left span:nth-child(2),
  .status__left span:nth-child(3) { display: none; }
}

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