@font-face {
  font-family: "PF BeauSans Pro";
  src: url("./assets/PFBeauSansPro-Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --light-blue: #8aedff;
  --light-blue-rgba: 138, 237, 255;
  --dark-blue: 8, 31, 56;
  --light-orange: #ffc580;
  --light-orange-rgba: 255, 197, 128;
  --bg-deep: #07111f;
  --bg-panel: #0b1a2e;
  --bg-cell: #0d2035;
  --bg-cell-hover: #112640;
  --border: #1a3a5c;
  --border-bright: #1e4d78;
  --accent: #f0a500;
  --accent-dim: #a87000;
  --accent-glow: rgba(240, 165, 0, 0.1);
  --locked: #c8d8e8;
  --registered: #88e788;
  --impact: #e03c3c;
  --grid-line: rgba(26, 90, 140, 0.22);
  --axis: rgba(200, 50, 50, 0.55);
  --text-head: #6ec6f5;
  --text-dim: #3a6080;
  --scanline: rgba(0, 200, 255, 0.03);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

a {
  color: inherit;
  text-decoration: none;
}

body {
  font-family: "PF BeauSans Pro", sans-serif;
  background: linear-gradient(135deg, #1a3a52 0%, #2d5770 100%);
  background-image: url(assets/background.webp);
  background-size: cover; /* Makes image cover entire area */
  background-position: bottom; /* Keeps image centered */
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

@media screen and (max-width: 768px) {
  .terminal-body, .coordinates-body {
    height: 110vh;
  }
  .terminal-body{
    margin-top: 10px;
    align-items: flex-start;
  }
}

.bg {
  position: fixed;
  inset: 0;
  background-image: url(assets/background.webp);
  background-size: cover;
  background-position: bottom;
  background-repeat: no-repeat;
  z-index: -1;
}

/* ── OVERLAY (when used inline in index.html) ────── */
#noa-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-deep);
  background: rgb(var(--dark-blue));
  background-size: cover;
  background-position: bottom;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

#noa-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* ── PANEL ───────────────────────────────────────── */
.loader-panel {
  width: min(480px, calc(100vw - 40px));
  border: 1px solid var(--light-blue);
  outline: 1px solid var(--light-blue);
  outline-offset: 5px;
  border-radius: 24px;
  padding-block: 30px;
  background:
    linear-gradient(to top, rgba(173, 216, 255, 0.15), transparent),
    radial-gradient(
      ellipse 70% 50% at 50% 0%,
      rgba(173, 216, 255, 0.18),
      transparent
    ),
    rgba(var(--dark-blue), 0.6);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── BOOT LOG ────────────────────────────────────── */
.boot-log {
  display: flex;
  padding-inline: 30px;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  min-height: 112px;
}

.log-line {
  display: flex;
  gap: 10px;
  opacity: 0; /* this alone doesn't hold during delay */
  animation: log-reveal 0.3s ease forwards;
  animation-delay: calc(var(--i) * 535ms);
}

@keyframes log-reveal {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.log-prefix {
  color: var(--text-dim);
  flex-shrink: 0;
  font-size: 11px;
}
.log-ok {
  color: var(--light-blue);
}
.log-warn {
  color: var(--light-orange);
}
.log-err {
  color: #e03c3c;
}
.log-sys {
  color: #80deea;
}

/* blinking cursor on last active line */
.log-cursor {
  display: inline-block;
  width: 7px;
  height: 12px;
  background: var(--light-blue);
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 0.9s step-end infinite;
}
@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* ── PROGRESS ────────────────────────────────────── */
.progress-section {
  display: flex;
  padding-inline: 30px;
  flex-direction: column;
  gap: 10px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
}
.progress-labels .pct {
  color: var(--light-blue);
  font-weight: bold;
}

.progress-track {
  position: relative;
  height: 6px;
  background: rgba(var(--dark-blue), 0.8);
  border: 1px solid var(--border-bright);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--light-blue);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(138, 237, 255, 0.5);
  transition: width 0.25s ease;
}

/* segmented tick marks */
.progress-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent calc(10% - 1px),
    rgba(var(--dark-blue), 0.6) calc(10% - 1px),
    rgba(var(--dark-blue), 0.6) 10%
  );
  border-radius: 3px;
  pointer-events: none;
}

/* ── FOOTER ──────────────────────────────────────── */
.loader-footer {
  text-align: center;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.terminal-container {
  width: 100%;
  max-width: 950px;
  background:
    linear-gradient(to top, rgba(173, 216, 255, 0.25), transparent),
    radial-gradient(
      ellipse 60% 40% at 50% 0%,
      rgba(173, 216, 255, 0.25),
      transparent
    );
  border: 1px solid var(--light-blue);
  outline: 1px solid var(--light-blue);
  outline-offset: 5px;
  border-radius: 30px;
  padding: 30px 0;
  position: relative;
}

.main-terminal-container {
  max-height: 250px; /* starting height */
  overflow: hidden;
  transition: max-height 0.6s ease-out;
}

.main-terminal-container.is-expanded {
  max-height: 1000px; /* above actual height */
}

.main-content-index {
  opacity: 0;
  transition: opacity 0.4s ease-out 0.3s; /* delay so it starts after container expands */
}

.main-content-index.is-visible {
  opacity: 1;
}

@media screen and (max-width: 768px) {
  .terminal-container {
    padding: 25px 0 10px;
  }
}

.terminal-container-landing {
  height: 60%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-inline: 30px;
}

@media screen and (min-width: 769px) {
  .terminal-container-landing {
    margin-top: auto;
  }
}

.coordinates-container {
  max-width: 90%;
}

@media screen and (max-width: 768px) {
  .coordinates-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--light-blue-rgba), 0.625) transparent;
  }
  .coordinates-table::-webkit-scrollbar {
    width: 4px;
  }
  .coordinates-table::-webkit-scrollbar-track {
    background: var(--bg-deep);
  }
  .coordinates-table::-webkit-scrollbar-thumb {
    background: var(--border-bright);
  }
}

/* .terminal-container::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border: 1px solid var(--light-blue);
  border-radius: 40px;
} */

.header {
  display: flex;
  position: relative;
  gap: 10px;
  align-items: flex-end;
  padding-bottom: 20px;
}

.loader-header {
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.main-header {
  gap: 10px;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
}

.logo-section h1 {
  color: var(--light-blue);
  text-align: right;
  font-size: 36px;
  font-weight: bold;
  line-height: 0.8;
  padding-inline-end: 10px;
  margin-block-end: 5px;
}

.logo-section span {
  position: relative;
  display: inline-block;
  padding-block: 5px;
}

.logo-section span:before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 0;
  background-color: #4c90b9;
  opacity: 0.3;
}

.logo-section span:after {
  content: "";
  position: absolute;
  bottom: -15%;
  left: 10%;
  height: 20%;
  width: 25%;
  z-index: 0;
  background-color: var(--light-blue);
}

.logo-section p {
  position: relative;
  white-space: nowrap;
  color: var(--light-blue);
  font-size: 12px;
  text-transform: uppercase;
  padding-inline-start: 20px;
  padding-inline-end: 10px;
  z-index: 1;
}

.status-section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  letter-spacing: 1px;
  font-size: 12px;
}

.status-section::after {
  content: "";
  position: absolute;
  height: 100%;
  width: 10%;
  top: 0;
  right: -20px;
  pointer-events: none;
  background:
    linear-gradient(to left, var(--light-blue) 2px, transparent 2px) 100% 0,
    linear-gradient(to bottom, var(--light-blue) 2px, transparent 2px) 100% 0,
    linear-gradient(to left, var(--light-blue) 2px, transparent 2px) 100% 100%,
    linear-gradient(to top, var(--light-blue) 2px, transparent 2px) 100% 100%;
  background-repeat: no-repeat;
  background-size: 10px 10px; /* adjust corner size */
}

.status-badge {
  position: relative;
  color: white;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-badge::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1px;
  width: 100%;
  z-index: 0;
  background-color: #4dd0e1;
}

.status-badge::after {
  color: var(--light-orange);
  content: "▼";
  font-size: 18px;
}

.loader-header .status-section::after {
  right: -15%;
}

.loader-header .status-badge::after {
  content: none;
}

.access-label {
  color: var(--light-orange);
  font-weight: bold;
}

.lang-wrapper {
  position: absolute;
  z-index: 99;
  top: 0;
  right: 3%;
  display: inline-flex;
  padding-right: 8px;
  align-items: center;
  border: 1px solid var(--light-blue);
  background: rgba(var(--dark-blue), 0.6);
  border-radius: 5px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.lang-arrow {
  width: 10px;
  height: 10px;
  pointer-events: none;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.lang-wrapper.open .lang-arrow {
  transform: rotate(90deg);
}

.lang-selector {
  display: inline-flex;
  color: var(--light-orange);
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 5px 10px;
  font-weight: bold;
  text-transform: uppercase;
  outline: none;
  appearance: none;
  border: none;
  background: rgba(var(--dark-blue), 0.3);
  border-radius: 5px;
  -webkit-appearance: none;
  transition: all 0.3s ease;
}

.lang-wrapper:focus,
.lang-wrapper:hover {
  border-color: var(--light-orange);
  box-shadow: 0 0 8px rgba(255, 197, 128, 0.25);
}

.lang-selector option {
  background: var(--bg-panel);
  color: var(--light-orange);
}

@media screen and (max-width: 500px) {
  .lang-wrapper {
    transform: translateY(-60%) translateX(-20%);
  }
}

.header-coordinates {
  position: relative;
  padding-right: 30px;
}

.header-coordinates::after {
  content: "";
  flex: 1;
  height: 1px;
  width: 100%;
  background-color: var(--light-blue);
}

.coordinates-header {
  position: relative;
  display: flex;
  padding-left: 90px;
  flex-direction: column;
  gap: 5px;
}

.coordinates-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: -10px;
  height: 6px;
  width: 6px;
  transform: translate(50%, 50%);
  background-color: var(--light-blue);
}

.coordinates-header h2 {
  color: white;
  font-size: 18px;
  letter-spacing: 1px;
  text-align: center;
}

.coordinates-header span {
  background-color: var(--light-blue);
  height: 5px;
}

@media screen and (max-width: 768px) {
  .header-coordinates {
    margin-bottom: 20px;
    padding-bottom: 0;
  }
  .coordinates-header,
  .header-coordinates::after {
    display: none;
  }
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 350px;
  padding-inline: 30px;
  gap: 40px;
  margin-bottom: 20px;
}

.main-content-landing {
  color: white;
  font-size: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  gap: unset;
  justify-content: space-evenly;
}

@media screen and (max-width: 768px) {
  .main-content-landing span {
    text-align: start;
  }
}

.terminal-link {
  color: var(--light-orange);
  cursor: pointer;
  border: 1px solid var(--light-blue);
  padding: 20px;
  border-radius: 20px;
}

.terminal-output {
  position: relative;
  font-size: 14px;
  /* background: rgba(29, 66, 104, 0.3); */
  background-color: rgba(var(--dark-blue), 0.5);
  border-radius: 20px;
  outline: 1px solid var(--light-blue);
  outline-offset: -5px;
  padding: 10px 15px 5px;
  scroll-padding-top: 25px;
  min-height: 500px;
  max-height: 500px;
}

.terminal-output-wrapper {
  position: absolute;
  min-height: 475px;
  max-height: 475px;
  overflow-y: auto;
  padding: 10px 30px 5px 5px;
  margin-right: -15px;
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--light-blue-rgba), 0.625) transparent;
}

/* Chrome, Edge, Safari */
.terminal-output-wrapper::-webkit-scrollbar {
  width: 4px;
  position: absolute;
  right: 100%;
}

.terminal-output-wrapper::-webkit-scrollbar-track {
  background: transparent;
  position: absolute;
  right: 100%;
}

.terminal-output-wrapper::-webkit-scrollbar-thumb {
  background: rgba(var(--light-blue-rgba), 0.625);
  border-radius: 4px;
}

@media screen and (max-width: 768px) {
  .terminal-output {
    min-height: 350px;
    max-height: 350px;
  }
  .terminal-output-wrapper {
    min-height: 325px;
    max-height: 325px;
  }
}

/* .terminal-output::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border: 1px solid var(--light-blue);
  border-radius: 15px;
} */

.main-view-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.main-view-wrapper-landing {
  justify-content: center;
}

@media screen and (max-width: 768px) {
  .main-view-wrapper {
    margin-inline: 15px;
    align-items: center;
    margin-top: 15px;
  }
  .main-view-wrapper-landing {
    justify-content: space-around;
  }
}

.terminal-info {
  color: #ffffff;
  margin-bottom: 20px;
}

.terminal-info-orange {
  color: var(--light-orange);
  margin-bottom: 20px;
}

.emergency-text,
.protocol-text,
.terminal-info-orange {
  color: var(--light-blue);
  font-weight: 600;
  letter-spacing: 2px;
}

.user-prompt {
  color: #ffffff;
  font-size: 14px;
}

#output {
  margin-bottom: 10px;
}

.terminal-line {
  margin-bottom: 10px;
  line-height: 1.5;
}

.input-line {
  display: flex;
  align-items: center;
  color: #ffffff;
}

.prompt {
  color: #ffffff;
  margin-right: 5px;
  font-size: 14px;
}

#commandInput {
  background: transparent;
  border: none;
  outline: none;
  color: var(--light-orange);
  font-family: "PF BeauSans Pro", sans-serif;
  font-size: 14px;
  caret-color: #4dd0e1;
  caret-shape: block;
}

/* .cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #4dd0e1;
  margin-left: 5px;
  animation: blink 1s infinite;
} */

#commandInput:focus {
  outline: none;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sidebar-button {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: 1px solid var(--light-blue);
  border-radius: 15px;
  padding: 15px;
  font-size: 14px;
  text-align: left;
}

.sidebar-button .title {
  color: #ffffff;
}
.sidebar-button .subtitle {
  color: lightgrey;
}

.secondary .sidebar-text {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.secondary.active-sidebar-button .sidebar-text {
  opacity: 1;
}

.disabled-sidebar-button {
  pointer-events: none;
}

.active-sidebar-button {
  position: relative;
}

.active-sidebar-button, .code-button {
  transition: 0.4s;
  background-image: repeating-linear-gradient(
    229deg,
    rgba(255,92,0, 0.35)  0,
    rgba(255,92,0, 0.35)  calc(25% - 1px),
    rgba(255,92,0, 0.25)  calc(25% + 1px),
    rgba(255,92,0, 0.25)  calc(50% - 1px),
    rgba(255,92,0, 0.35)  calc(50% + 1px),
    rgba(255,92,0, 0.35)  calc(75% - 1px),
    rgba(255,92,0, 0.25)  calc(75% + 1px),
    rgba(255,92,0, 0.25)  100%
  );
  background-size: 80px 92px;
  animation: stripes 4s linear infinite;
}

@keyframes stripes {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 160px 0;
  }
}

.active-sidebar-button::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  box-shadow: 0 0 14px 5px var(--light-orange);
  opacity: 0.4;
  animation: sidebar-glow 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sidebar-glow {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

.footer {
  text-align: center;
  padding-top: 15px;
}

.command-prompt {
  color: #80deea;
  font-size: 11px;
  letter-spacing: 1px;
}

.hard-drive-prompt {
  color: var(--light-blue);
  text-align:center;
  width: 100%;
}

.hard-drive-prompt-text {
  white-space: pre-line;
  font-size: 18px;
}

.hard-drive-prompt-link {
  font-size: 14px;
}

.hard-drive-prompt a {
  color: var(--light-orange);
  text-decoration: underline;
}

@media screen and (min-width: 769px) {
  .main-terminal-container {
    margin-top: auto;
  }
  .hard-drive-prompt {
    margin-top: auto;
    margin-bottom: 20px;
  }
}

@media screen and (max-width: 768px) {
  .footer {
    padding-top: 0;
  }
  .hard-drive-prompt {
    margin-top: 20px;
    margin-bottom: 5px;
  }
  .coordinates-footer {
    padding-block: 10px;
  }
}

.code-button-container {
  height: 50px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.code-button {
  display: inline-block;
  position: relative;
  font-size: 18px;
  color: #fff;
  border: 1px solid var(--light-blue);
  border-radius: 15px;
  padding-block: 20px;
  width: 60%;
}

.code-button.glow-once::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: glow-once 2s ease-out forwards;
}

@keyframes glow-once {
  0% {
    box-shadow: 0 0 0px 0px var(--light-orange);
    border-color: var(--light-orange);
  }
  40% {
    box-shadow: 0 0 18px 6px var(--light-orange);
    border-color: var(--light-orange);
  }
  100% {
    box-shadow: 0 0 0px 0px transparent;
    border-color: var(--light-blue);
  }
}

.code-cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--light-blue);
  vertical-align: middle;
  margin-left: 3px;
  animation: blink 1s step-end infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-inline: 10px;
    margin-bottom: 10px;
  }

  .main-content-landing {
    padding-inline: 25px;
  }

  .main-content-landing span {
    font-size: 26px;
  }

  .logo-section h1 {
    font-size: 36px;
  }

  .status-section {
    text-align: left;
  }

  .code-button {
    width: 80%;
  }
}

.coordinates-content {
  grid-template-columns: 1fr 2fr;
}

@media screen and (min-width: 900px) and (max-width: 1500px) {
  .coordinates-content {
    grid-template-columns: 1.5fr 2fr;
  }
}

.frame-container {
  position: relative;
  border-radius: 15px;
  outline: 1px solid var(--border-bright);
  outline-offset: -6px;
  background: rgba(var(--dark-blue), 0.5);
}

@media screen and (max-width: 768px) {
  .coordinates-content {
    grid-template-columns: 1fr;
    gap: 15px;
    max-height: 625px;
    overflow-y: scroll;
    margin-bottom: 0;
  }
}

.frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 15px;
}

details.noa-toggle {
  display: none; /* hidden on desktop */
}

details.noa-toggle summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: white;
  padding: 4px 10px;
  width: fit-content;
}

details.noa-toggle summary::-webkit-details-marker {
  display: none;
}

/* The arrow — mimics the filled triangle in the UI */
details.noa-toggle summary::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid var(--light-orange);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.2s ease;
}

details.noa-toggle[open] summary::after {
  transform: rotate(90deg);
}

details.noa-toggle .frame-container {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out; /* closing */
  transition: opacity 0.5s ease-in-out; /* fade */
}

details.noa-toggle .frame-container.is-open {
  max-height: 350px;
  height: 350px;
  opacity: 1;
  transition: opacity 0.5s ease-in-out; /* fade */
  transition: max-height 0.35s ease-out; /* opening */
}
details.noa-toggle .frame-container.is-closed {
  max-height: 0;
  height: 0;
  opacity: 0;
  transition: all 0.3s ease-in-out; /* closing */
}

@media (max-width: 767px) {
  details.noa-toggle {
    display: block;
  }
}

/* Grid */
.grid {
  position: absolute;
  inset: 30px;
  background-image:
    linear-gradient(rgba(30, 80, 160, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 80, 160, 0.25) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 2.5px solid var(--text-head);
  border-radius: 10px;
}

/* Axes */
.axis-x,
.axis-y {
  position: absolute;
  background: rgba(220, 60, 60, 0.75);
}
.axis-x {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  transform: translateY(-50%);
}
.axis-y {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
}

/* Axis labels */
.label {
  position: absolute;
  color: rgba(220, 60, 60, 0.8);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
}
.label.x-left {
  left: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%);
}
.label.x-right {
  right: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%);
}
.label.y-top {
  top: calc(100% + 2.5px);
  left: 50%;
  transform: translateX(-50%);
}
.label.y-bot {
  bottom: calc(100% + 2.5px);
  left: 50%;
  transform: translateX(-50%);
}

/* Blip base */
.blip {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

/* Standard blip: inner dot + outer ring */
.blip .inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #f5a800;
  box-shadow:
    0 0 6px #f5a800,
    0 0 14px rgba(245, 168, 0, 0.5);
}
.blip .ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid #f5a800;
  box-shadow: 0 0 6px rgba(245, 168, 0, 0.4);
}

/* Small blip */
.blip.sm .inner {
  width: 6px;
  height: 6px;
}
.blip.sm .ring {
  width: 18px;
  height: 18px;
}
.blip.sm {
  width: 22px;
  height: 22px;
}

/* Medium blip */
.blip.md .inner {
  width: 8px;
  height: 8px;
}
.blip.md .ring {
  width: 24px;
  height: 24px;
}
.blip.md {
  width: 28px;
  height: 28px;
}

/* Large blip (target/crosshair) */
.blip.lg {
  width: 48px;
  height: 48px;
}
.blip.lg .inner {
  width: 10px;
  height: 10px;
}
.blip.lg .ring {
  width: 30px;
  height: 30px;
}
.blip.lg .ring2 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(245, 168, 0, 0.45);
}
/* Crosshair ticks */
.blip.lg .tick {
  position: absolute;
  background: #f5a800;
  opacity: 0.8;
}
.blip.lg .tick.h {
  width: 8px;
  height: 1.5px;
  top: 50%;
  transform: translateY(-50%);
}
.blip.lg .tick.h.l {
  left: 0;
}
.blip.lg .tick.h.r {
  right: 0;
}
.blip.lg .tick.v {
  height: 8px;
  width: 1.5px;
  left: 50%;
  transform: translateX(-50%);
}
.blip.lg .tick.v.t {
  top: 0;
}
.blip.lg .tick.v.b {
  bottom: 0;
}

/* Top blip with star/arrow indicator */
.blip.top-marker {
  width: 22px;
  height: 26px;
}
.blip.top-marker .arrow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid #f5a800;
  filter: drop-shadow(0 0 3px #f5a800);
}
.blip.top-marker .inner {
  width: 8px;
  height: 8px;
  top: calc(50% + 4px);
}
.blip.top-marker .ring {
  width: 20px;
  height: 20px;
  top: calc(50% + 4px);
}

#blip-frontier {
  transition:
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.5s ease;
  /* remove left and top from transition */
}

#blip-frontier.frontier--final {
  transform: translate(-50%, -50%) scale(1.6);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#blip-frontier.frontier--final .inner {
  background: #f5a800;
  box-shadow: 0 0 10px 3px rgba(245, 168, 0, 0.7);
}
#blip-frontier.frontier--final .pulse {
  animation-duration: 1s;
  border-color: #f5a800;
  opacity: 0.6;
}
#blip-frontier.frontier--final .ring2 {
  border-color: rgba(245, 168, 0, 0.5);
}
#blip-frontier.frontier--final .tick {
  background: #f5a800;
}

@media screen and (max-width: 768px) {
  #blip-frontier.frontier--final {
    transform: translate(-50%, -50%) scale(1.2);
  }
}

/* Dashed trail line */
.trail {
  position: absolute;
  border-left: 1.5px dashed rgba(245, 168, 0, 0.45);
  transform-origin: top center;
  pointer-events: none;
}

/* Pulse animation on large blip */
@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.35);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.35);
    opacity: 0;
  }
}
.blip.lg .pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid #f5a800;
  animation: pulse-ring 2s ease-out infinite;
}

/* ── TABLE CONTAINER ───────────────────────────── */
.coordinates-table-container {
  font-size: 14px;
  font-weight: 600;
  padding: 20px;
  gap: 1px;
  outline: 1px solid var(--border-bright);
  outline-offset: -6px;
  background: rgba(var(--dark-blue), 0.5);
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  display: flex;
  gap: 2px;
  flex-direction: column;
}

/* top-bar header */
.table-header-bar {
  display: grid;
  border-radius: 10px;
  grid-template-columns: 0.5fr 1fr 0.75fr;
  gap: 2px;
  align-items: center;
  padding: 0;
}
.th-cell {
  text-align: center;
  background-color: var(--border-bright);
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-head);
  text-transform: uppercase;
}

@media screen and (min-width: 1350px) {
  .th-cell-mobile {
    display: none;
  }
}

@media screen and (max-width: 1349px) {
  .th-cell-desktop {
    display: none;
  }
}

/* pipe decorations on header */
.th-pip {
  display: inline-block;
  width: 2px;
  height: 12px;
  background: var(--border-bright);
  vertical-align: middle;
  margin-right: 6px;
}

/* ── TABLE ─────────────────────────────────────── */
.coordinates-table {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.table-row {
  display: grid;
  border-radius: 10px;
  grid-template-columns: 0.5fr 1fr 0.75fr;
  gap: 2px;
  align-items: center;
  transition: background 0.15s;
  cursor: pointer;
}

.td-cell {
  padding: 10px;
  background-color: var(--bg-cell);
  letter-spacing: 0.06em;
  color: var(--locked);
  border-radius: 10px;
}

.td-cell:hover {
  background-color: var(--bg-cell-hover);
}

/* order number */
.td-order {
  text-align: center;
}

/* coordinate cell */
.td-coord {
  text-align: center;
}
.td-coord.input-req {
  /* highlighted box */
  position: relative;
  color: var(--accent);
}
.coord-box {
  display: inline-block;
  text-align: center;
}

input.coord-box {
  /* Reset browser defaults */
  border: none;
  outline: none;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  caret-shape: block;
  caret-color: var(--text-head);

  /* Match span rendering */
  font: inherit;
  letter-spacing: inherit;
  word-spacing: inherit;
  text-align: inherit;

  /* Prevent sizing quirks */
  width: 2.25ch;
  min-width: 0;
  box-sizing: content-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

input.coord-box::placeholder {
  color: var(--accent);
  opacity: 0.5;
}

.td-coord:has(input:focus) {
  background-color: var(--accent-glow);
  outline: 1px solid var(--accent);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* status cell */
.td-status {
  text-align: center;
  letter-spacing: 0.12em;
}
.registered {
  color: var(--registered);
}
.td-status.input-req {
  color: var(--accent);
}
.impact {
  color: var(--impact);
}
.impact-registered {
  color: var(--light-orange);
}
input.coord-box-impact,
input.coord-box-impact::placeholder {
  color: inherit;
}
.td-status.last-update {
  color: var(--locked);
}

.blip.lg .pulse {
  will-change: transform, opacity; /* only this should get its own layer */
}

@media screen and (max-width: 768px) {
  .table-header-bar,
  .table-row {
    grid-template-columns: 1fr 1fr;
  }
  .th-cell:first-child,
  .td-cell:first-child {
    display: none;
  }
  .td-cell {
    margin-left: 2px;
  }
}

.frame-container,
.terminal-container,
.coordinates-table-container {
  transform: translateZ(0); /* promote ONCE as a single layer */
  isolation: isolate;
  contain: layout style paint;
}
