@property --ufo-field-pulse {
  syntax: "<number>";
  inherits: true;
  initial-value: .56;
}

:root[data-ufo-system="active"] {
  --ufo-division: #dfff00;
  --ufo-division-rgb: 223 255 0;
  --ufo-division-soft: color-mix(in oklab, var(--ufo-division) 38%, transparent);
  --ufo-paper: #eceae2;
  --ufo-ink: #050604;
  --ufo-line: rgb(236 234 226 / .13);
  color-scheme: dark;
  background: var(--ufo-ink);
}

:root[data-ufo-division="signal"] { --ufo-division: #dfff00; --ufo-division-rgb: 223 255 0; }
:root[data-ufo-division="media"] { --ufo-division: #ff593f; --ufo-division-rgb: 255 89 63; }
:root[data-ufo-division="archive"] { --ufo-division: #ffc857; --ufo-division-rgb: 255 200 87; }
:root[data-ufo-division="terminal"] { --ufo-division: #62ff88; --ufo-division-rgb: 98 255 136; }
:root[data-ufo-division="field"] { --ufo-division: #55e6f2; --ufo-division-rgb: 85 230 242; }
:root[data-ufo-division="labs"] { --ufo-division: #b994ff; --ufo-division-rgb: 185 148 255; }

:root[data-ufo-global-chrome="active"] {
  --ufo-global-header-h: 78px;
  --ufo-paper: #eceae2;
  --ufo-ink: #050604;
  --ufo-line: rgb(236 234 226 / .13);
}

:root[data-ufo-global-chrome="active"] body {
  box-sizing: border-box;
  padding-top: var(--ufo-global-header-h) !important;
}

:root[data-ufo-global-chrome="active"] body > .gear-header,
:root[data-ufo-global-chrome="active"] body > .site-header {
  display: none !important;
}

:root[data-ufo-global-chrome="active"] .rolf-nav,
:root[data-ufo-global-chrome="active"] .rolf-menu-panel {
  display: none !important;
}

:root[data-ufo-global-chrome="active"] body > .signal-header {
  top: var(--ufo-global-header-h) !important;
  z-index: 80 !important;
}

#ufo-global-header,
#ufo-global-menu,
#ufo-global-tuner {
  box-sizing: border-box;
  font-family: "Space Mono", ui-monospace, monospace;
}

#ufo-global-header {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto max-content;
  column-gap: clamp(28px, 3vw, 58px);
  align-items: center;
  width: 100%;
  min-height: var(--ufo-global-header-h);
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--ufo-line);
  background: color-mix(in oklab, var(--ufo-ink) 82%, transparent);
  box-shadow: 0 12px 42px rgb(0 0 0 / .22);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
}

.ufo-global-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--ufo-paper);
  text-decoration: none;
}

.ufo-global-brand__seal {
  display: block;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 50%;
  filter: grayscale(1) contrast(1.18) brightness(1.2);
}

.ufo-global-brand__seal img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ufo-global-brand__type {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
  white-space: nowrap;
}

.ufo-global-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
}

.ufo-global-nav a,
.ufo-global-status,
.ufo-global-cta {
  color: rgb(236 234 226 / .56);
  font-size: 10px;
  letter-spacing: .11em;
  text-decoration: none;
  text-transform: uppercase;
}

.ufo-global-nav a {
  position: relative;
  padding-block: 10px;
}

.ufo-global-nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--ufo-division);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s ease;
}

.ufo-global-nav a:hover,
.ufo-global-nav a:focus-visible {
  color: var(--ufo-paper);
}

.ufo-global-nav a:hover::after,
.ufo-global-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.ufo-global-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 1.4vw, 22px);
}

.ufo-global-tune {
  display: inline-grid;
  grid-template-columns: 26px auto;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--ufo-line);
  background: rgb(7 8 6 / .8);
  color: var(--ufo-paper);
  cursor: pointer;
  font: inherit;
}

.ufo-global-tune[aria-expanded="true"] {
  border-color: var(--ufo-division);
  background: rgb(var(--ufo-division-rgb) / .08);
}

.ufo-global-tune__dial {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
  border: 1px solid rgb(var(--ufo-division-rgb) / .55);
  border-radius: 50%;
}

.ufo-global-tune__dial::after {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 1px;
  height: 9px;
  content: "";
  background: var(--ufo-division);
  box-shadow: 0 0 7px rgb(var(--ufo-division-rgb) / .65);
  transform: translateX(-50%) rotate(calc(-120deg + var(--ufo-global-energy, .74) * 240deg));
  transform-origin: 50% 9px;
}

.ufo-global-tune__copy {
  display: grid;
  gap: 3px;
  text-align: left;
}

.ufo-global-tune__copy small {
  color: rgb(236 234 226 / .56);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .15em;
}

.ufo-global-tune__copy output {
  color: var(--ufo-division);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
}

.ufo-global-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ufo-global-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ufo-division);
  box-shadow: 0 0 14px rgb(var(--ufo-division-rgb) / .52);
}

.ufo-global-cta {
  padding: 12px 15px;
  border: 1px solid var(--ufo-line);
  color: var(--ufo-paper);
}

.ufo-global-cta:hover,
.ufo-global-cta:focus-visible {
  border-color: var(--ufo-division);
  background: var(--ufo-division);
  color: var(--ufo-ink);
}

.ufo-global-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--ufo-line);
  background: transparent;
  color: var(--ufo-paper);
  cursor: pointer;
  font: 700 8px/1 "Space Mono", ui-monospace, monospace;
  letter-spacing: .12em;
}

.ufo-global-menu-toggle b {
  display: grid;
  gap: 5px;
  width: 18px;
}

.ufo-global-menu-toggle i {
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: transform .2s ease;
}

.ufo-global-menu-toggle[aria-expanded="true"] i:first-child {
  transform: translateY(3px) rotate(45deg);
}

.ufo-global-menu-toggle[aria-expanded="true"] i:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

#ufo-global-menu {
  position: fixed;
  z-index: 990;
  inset: 0;
  background: rgb(0 0 0 / .46);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

#ufo-global-menu[hidden],
#ufo-global-tuner[hidden] {
  display: none;
}

.ufo-global-menu__panel {
  position: absolute;
  top: var(--ufo-global-header-h);
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(520px, calc(100% - 28px));
  padding: 24px clamp(20px, 4vw, 64px) max(28px, env(safe-area-inset-bottom));
  border-left: 1px solid var(--ufo-line);
  background: color-mix(in oklab, var(--ufo-ink) 97%, transparent);
  box-shadow: -28px 0 70px rgb(0 0 0 / .38);
  overflow-y: auto;
}

.ufo-global-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: rgb(236 234 226 / .44);
  font-size: 8px;
  letter-spacing: .12em;
}

.ufo-global-menu__close {
  border: 0;
  background: transparent;
  color: var(--ufo-division);
  cursor: pointer;
  font: 700 8px/1 "Space Mono", ui-monospace, monospace;
  letter-spacing: .12em;
}

.ufo-global-menu nav {
  display: grid;
  align-content: center;
  min-height: 100%;
}

.ufo-global-menu nav a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--ufo-line);
  color: var(--ufo-paper);
  font: 400 clamp(32px, 11vw, 64px)/.92 "Archivo Black", Impact, sans-serif;
  letter-spacing: -.045em;
  text-decoration: none;
  text-transform: uppercase;
}

.ufo-global-menu nav a span {
  color: var(--ufo-division);
  font: 400 10px/1 "Space Mono", ui-monospace, monospace;
  letter-spacing: .1em;
}

.ufo-global-menu__tune {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 13px 0 0;
  border: 0;
  border-top: 1px solid var(--ufo-line);
  background: transparent;
  color: var(--ufo-paper);
  cursor: pointer;
  text-align: left;
}

.ufo-global-menu__tune > span {
  display: grid;
  gap: 7px;
  font: 700 12px/1 "Space Mono", ui-monospace, monospace;
  letter-spacing: .1em;
}

.ufo-global-menu__tune small {
  color: rgb(236 234 226 / .48);
  font: 400 8px/1 "Space Mono", ui-monospace, monospace;
}

.ufo-global-menu__tune output {
  color: var(--ufo-division);
  font: 700 10px/1 "Space Mono", ui-monospace, monospace;
}

#ufo-global-tuner {
  position: fixed;
  z-index: 1010;
  top: calc(var(--ufo-global-header-h) + 10px);
  right: clamp(20px, 4vw, 64px);
  width: min(360px, calc(100vw - 40px));
  padding: 20px;
  border: 1px solid var(--ufo-line);
  background: color-mix(in oklab, var(--ufo-ink) 97%, transparent);
  box-shadow: 0 26px 80px rgb(0 0 0 / .56);
}

.ufo-global-tuner__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.ufo-global-tuner__head strong {
  display: block;
  color: var(--ufo-paper);
  font-size: 9px;
  letter-spacing: .11em;
}

.ufo-global-tuner__head small {
  display: block;
  max-width: 250px;
  margin-top: 8px;
  color: rgb(236 234 226 / .5);
  font-size: 8px;
  line-height: 1.5;
}

.ufo-global-tuner__close {
  border: 0;
  background: transparent;
  color: var(--ufo-division);
  cursor: pointer;
  font: 700 8px/1 "Space Mono", ui-monospace, monospace;
  letter-spacing: .1em;
}

.ufo-global-stations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.ufo-global-stations button {
  --station-color: var(--ufo-division);
  display: grid;
  min-height: 52px;
  padding: 9px;
  border: 1px solid color-mix(in oklab, var(--station-color) 40%, transparent);
  background: transparent;
  color: var(--ufo-paper);
  cursor: pointer;
  font: 700 7px/1.35 "Space Mono", ui-monospace, monospace;
  letter-spacing: .07em;
  text-align: left;
}

.ufo-global-stations button:nth-child(1) { --station-color: #7db7c2; }
.ufo-global-stations button:nth-child(2) { --station-color: #dfff00; }
.ufo-global-stations button:nth-child(3) { --station-color: #b994ff; }
.ufo-global-stations button span { color: var(--station-color); }
.ufo-global-stations button[aria-pressed="true"] {
  border-color: var(--station-color);
  background: color-mix(in oklab, var(--station-color) 12%, transparent);
}

body.ufo-global-menu-open {
  overflow: hidden !important;
}

:root[data-ufo-system="active"] body,
:root[data-ufo-system="active"] #root {
  min-height: 100%;
  background: transparent !important;
}

:root[data-ufo-system="active"] body {
  overflow-x: clip;
  background: var(--ufo-ink) !important;
}

:root[data-ufo-system="active"] body > header,
:root[data-ufo-system="active"] body > main,
:root[data-ufo-system="active"] body > footer,
:root[data-ufo-system="active"] body > .scanlines {
  position: relative;
  z-index: 2;
}

::selection {
  background: var(--ufo-division);
  color: var(--ufo-ink);
}

#ufo-system-field {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--ufo-pointer-x, 74%) var(--ufo-pointer-y, 28%), rgb(var(--ufo-division-rgb) / .075), transparent 24rem),
    #050604;
}

#ufo-system-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: calc(.2 + var(--ufo-field-pulse) * .32);
  filter: saturate(1.08) contrast(1.08);
  transform: scale(1.02);
}

.ufo-system-field__seal {
  position: absolute;
  top: clamp(92px, 10vh, 170px);
  right: clamp(-180px, 2vw, 30px);
  width: clamp(500px, 58vw, 940px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: .047;
  filter: grayscale(1) contrast(1.48) brightness(.82);
  mix-blend-mode: screen;
  mask-image: radial-gradient(circle, #000 0 52%, rgb(0 0 0 / .82) 67%, transparent 85%);
  transform: rotate(-8deg) scale(1.02);
  transform-origin: 52% 48%;
  animation: ufo-system-seal-drift 26s ease-in-out infinite alternate;
}

.ufo-system-field__bloom,
.ufo-system-field__grain,
.ufo-system-field__scan {
  position: absolute;
  inset: 0;
}

.ufo-system-field__bloom {
  background:
    radial-gradient(circle at var(--ufo-pointer-x, 74%) var(--ufo-pointer-y, 28%), rgb(var(--ufo-division-rgb) / .1), transparent 18rem),
    radial-gradient(circle at 12% 78%, rgb(85 230 255 / .035), transparent 28rem),
    linear-gradient(180deg, transparent 0 48%, rgb(5 6 4 / .58) 82%, var(--ufo-ink) 100%);
  mix-blend-mode: screen;
}

.ufo-system-field__grain {
  opacity: .14;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}

.ufo-system-field__scan {
  opacity: .09;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgb(255 255 255 / .07) 3px 4px);
  mask-image: linear-gradient(to bottom, black, transparent 94%);
}

#ufo-system-division {
  position: fixed;
  z-index: 3;
  top: 50%;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ufo-division);
  font: 600 9px/1 "Space Mono", ui-monospace, monospace;
  letter-spacing: .22em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  pointer-events: none;
}

#ufo-system-division::before {
  width: 1px;
  height: 46px;
  content: "";
  background: linear-gradient(var(--ufo-division), transparent);
  box-shadow: 0 0 18px rgb(var(--ufo-division-rgb) / .3);
}

#ufo-system-division::after {
  content: attr(data-memory);
  color: rgb(236 234 226 / .3);
  font-size: 7px;
  letter-spacing: .18em;
}

:root[data-ufo-system="active"] #root {
  position: relative;
  z-index: 2;
  isolation: isolate;
}

.ufo-system-shell,
.ufo-system-scroll {
  background-color: transparent !important;
}

.ufo-system-scroll {
  scrollbar-color: var(--ufo-division) rgb(255 255 255 / .05);
}

:root[data-ufo-system="active"] .ufo-system-scroll [style*="background-color: rgb(5, 5, 5)"],
:root[data-ufo-system="active"] .ufo-system-scroll [style*="background-color: rgb(0, 0, 0)"] {
  background-color: rgb(5 6 4 / .78) !important;
}

.ufo-system-topbar {
  border-bottom-color: rgb(var(--ufo-division-rgb) / .2) !important;
  background: rgb(5 6 4 / .78) !important;
  box-shadow: 0 12px 46px rgb(0 0 0 / .28) !important;
}

.ufo-system-topbar a:hover,
.ufo-system-topbar a:focus-visible {
  color: var(--ufo-division) !important;
}

.ufo-system-route-rail {
  border-bottom-color: rgb(var(--ufo-division-rgb) / .72) !important;
  background: color-mix(in oklab, var(--ufo-ink) 92%, var(--ufo-division) 8%) !important;
}

.ufo-system-route-prefix {
  color: var(--ufo-division) !important;
  text-shadow: 0 0 16px rgb(var(--ufo-division-rgb) / .34);
}

.ufo-system-footer {
  border-top-color: rgb(var(--ufo-division-rgb) / .2) !important;
}

@keyframes ufo-system-seal-drift {
  0% { opacity: .035; transform: rotate(-8deg) scale(1.02) translate3d(0, 0, 0); }
  46% { opacity: .055; }
  100% { opacity: .043; transform: rotate(-2deg) scale(1.08) translate3d(-2.4%, 1.7%, 0); }
}

@media (max-width: 900px) {
  #ufo-system-division { display: none; }
  .ufo-system-field__seal { top: 132px; right: -44%; width: 128vw; opacity: .036; }
}

@media (max-width: 1180px) {
  #ufo-global-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ufo-global-nav,
  .ufo-global-tune,
  .ufo-global-status,
  .ufo-global-cta {
    display: none;
  }

  .ufo-global-menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 540px) {
  :root[data-ufo-global-chrome="active"] {
    --ufo-global-header-h: 68px;
  }

  #ufo-global-header {
    padding-inline: 20px;
  }

  .ufo-global-brand {
    gap: 9px;
  }

  .ufo-global-brand__seal {
    width: 34px;
    height: 34px;
  }

  .ufo-global-brand__type {
    font-size: 9px;
    letter-spacing: .12em;
  }

  #ufo-global-tuner {
    top: calc(var(--ufo-global-header-h) + 8px);
    right: 8px;
    width: calc(100vw - 16px);
  }

  .ufo-system-field__seal { top: 176px; right: -58%; width: 150vw; opacity: .03; }
  #ufo-system-canvas { opacity: .3; }
}

@media (prefers-reduced-motion: reduce) {
  .ufo-system-field__seal { animation: none; }
}

@supports (animation-timeline: scroll()) {
  #ufo-system-field {
    animation: ufo-system-field-breathe linear both;
    animation-timeline: scroll();
  }

  @keyframes ufo-system-field-breathe {
    from { --ufo-field-pulse: .44; }
    to { --ufo-field-pulse: .72; }
  }
}
