/* Argon v2 — Persistent chrome styles (Task C) */

.blend {
  color: var(--blend-ink);
}

.chrome {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.rail-mark,
.nav-link,
.sound-toggle,
.collabs-email,
.reel-btn,
.next-build,
.menu-toggle,
.mobile-mark {
  pointer-events: auto;
}

.chrome-marks {
  position: fixed;
  inset: 0;
  z-index: 201;
  pointer-events: none;
}

.chrome-marks > * {
  position: absolute;
}

/* Left rail */
.rail {
  position: absolute;
  left: 20px;
  top: 20px;
}

.rail-mark {
  display: block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* Menu column */
.menu-col {
  position: absolute;
  left: calc(200 / 1440 * 100vw);
  top: 20px;
}

.nav {
  margin-top: 5px;
}

.menu-col .nav-link {
  display: block;
  height: 20px;
}

.chrome-marks .nav-pointer {
  left: calc(200 / 1440 * 100vw - 20px);
  top: 38px;
}

/* Sound block */
.sound {
  position: absolute;
  left: calc(560 / 1440 * 100vw);
  top: 20px;
}

.sound-toggle {
  margin-top: 5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.sound-prefix {
  display: none;
}

.sound-dash {
  display: inline-block;
  width: 12px;
  height: 1.5px;
  background: currentColor;
  transform-origin: 50% 50%;
}

.sound-bars {
  position: absolute;
  right: 1px;
  bottom: 3px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.sound-bars i {
  display: block;
  width: 2px;
  height: 3px;
  background: currentColor;
  transform-origin: 50% 100%;
  transform: scaleY(0);
}

@keyframes wave {
  0%, 100% {
    height: 3px;
  }
  50% {
    height: 10px;
  }
}

html[data-sound="on"] .sound-bars i {
  animation: wave .9s ease-in-out infinite;
}

html[data-sound="on"] .sound-bars i:nth-child(2) {
  animation-duration: .7s;
  animation-delay: -.3s;
}

html[data-sound="on"] .sound-bars i:nth-child(3) {
  animation-duration: 1.1s;
  animation-delay: -.6s;
}

/* Collabs */
.collabs {
  position: absolute;
  right: 20px;
  top: 20px;
  text-align: right;
}

.collabs-email {
  display: inline-block;
  margin-top: 5px;
}

/* Bottom row */
.scroll-hint {
  position: absolute;
  left: 20px;
  bottom: 20px;
  white-space: nowrap;
}

.corner-br {
  position: absolute;
  right: 20px;
  bottom: 20px;
}

.reel-btn {
  padding-right: 17px;
  display: inline-block;
  white-space: nowrap;
}

.next-build {
  padding-right: 22px;
  display: inline-block;
  white-space: nowrap;
}

.reel-btn-label.blend.t-mono,
.next-build-label.blend.t-mono {
  color: #fff;
}

html[data-route-busy] .reel-btn-label.blend.t-mono,
html[data-route-busy] .next-build-label.blend.t-mono {
  color: #FBFAF6;
}

/* Bottom-right accent marks */
.chrome-marks .reel-tri {
  right: 20px;
  bottom: 21.5px;
  width: 0;
  height: 0;
  border-left: 9px solid var(--accent);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.chrome-marks .next-build-arrow {
  right: 20px;
  bottom: 21.5px;
}

html:has([data-next-build]:not([hidden])) .reel-tri {
  display: none;
}

html:not(:has([data-next-build]:not([hidden]))) .next-build-arrow {
  display: none;
}

/* Mobile toggle and wordmark (hidden at desktop) */
.menu-toggle {
  display: none;
}

.menu-toggle-line {
  position: absolute;
  left: 0;
  width: 22px;
  height: 1.5px;
  background: #fff;
  transition: background-color .2s linear;
}

.menu-toggle-line:first-child {
  top: 3px;
}

.menu-toggle-line:last-child {
  top: 9.5px;
}

html[data-route-busy] .menu-toggle-line {
  background: #FBFAF6;
}

.mobile-mark {
  display: none;
}

/* Drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: var(--dark);
  color: var(--paper);
  overflow: hidden;
}

@media (min-width: 1100px) {
  .drawer {
    display: none !important;
  }
}

.drawer-nav {
  position: absolute;
  left: 16px;
  top: 96px;
}

.drawer-list {
  padding-left: 38px;
}

.drawer-list .nav-link {
  display: block;
  height: auto;
}

.nav-pointer--drawer {
  position: absolute;
  left: 0;
  top: 0;
  width: 22.4px;
  height: 16px;
}

.drawer-foot {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 24px;
}

.drawer-email {
  margin-top: 6px;
  display: inline-block;
}

html[data-drawer-open] {
  overflow: hidden;
}

html[data-drawer-open] .scroll-hint,
html[data-drawer-open] .corner-br,
html[data-drawer-open] .chrome-marks {
  visibility: hidden;
}

/* Narrow chrome */
@media (max-width: 1099.98px) {
  .rail,
  .menu-col,
  .collabs,
  .chrome-marks .nav-pointer {
    display: none;
  }

  .menu-toggle {
    position: absolute;
    left: 16px;
    top: 16px;
    width: 22px;
    height: 14px;
    display: block;
  }

  .menu-toggle::before {
    content: "";
    position: absolute;
    inset: -15px -11px;
  }

  .mobile-mark {
    display: block;
    position: absolute;
    left: 50%;
    top: 16px;
    transform: translateX(-50%);
    white-space: nowrap;
  }

  .sound {
    left: auto;
    right: 16px;
    top: 17px;
  }

  .sound-label {
    display: none;
  }

  .sound-prefix {
    display: inline;
    color: rgba(255, 255, 255, .56);
  }

  html[data-route-busy] .sound-prefix {
    color: var(--busy-label);
  }

  .sound-toggle {
    margin-top: 0;
    gap: 6px;
    font-family: var(--mono);
    font-size: 10px;
    line-height: 13px;
    letter-spacing: .08em;
    font-weight: 400;
    text-transform: uppercase;
  }

  .scroll-hint {
    left: 16px;
    bottom: 19px;
  }

  .corner-br {
    right: 16px;
    bottom: 19px;
  }

  .chrome-marks .reel-tri,
  .chrome-marks .next-build-arrow {
    right: 16px;
    bottom: 20.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sound-bars i {
    animation: none !important;
  }
  .sound-bars i:nth-child(1) {
    height: 4px;
  }
  .sound-bars i:nth-child(2) {
    height: 8px;
  }
  .sound-bars i:nth-child(3) {
    height: 6px;
  }
}
