.dk {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(20px, calc(3 * var(--vw, 1vw)), 60px);
  min-height: calc(100 * var(--vh, 1vh));
}

.dk-copy {
  position: relative;
  z-index: 2;
}

.dk-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: clamp(28px, calc(5 * var(--vh, 1vh)), 50px) 0 0;
  border-top: 1px solid var(--line-faint);
  width: max-content;
  max-width: 100%;
}

.dk-status div {
  padding: 12px 30px 0 0;
}

.dk-status div:last-child {
  border-right: 0;
}

.dk-status dt {
  font-family: var(--hud);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--line-soft);
}

.dk-status dd {
  margin: 2px 0 0;
  font-family: var(--num);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--ink-cool);
  font-variant-numeric: tabular-nums;
}

.dk-live::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  background: var(--accent);
  vertical-align: 2px;
  animation: sa-blink 1.6s steps(2, jump-none) infinite;
}

.dk-console {
  position: relative;
  justify-self: center;
  width: min(100%, calc(78 * var(--vh, 1vh)), 700px);
  aspect-ratio: 1;
}

.dk-reticle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dk-reticle * {
  vector-effect: non-scaling-stroke;
}

.dk-ring-thin {
  fill: none;
  stroke: var(--line-faint);
}

.dk-ring-ticks {
  fill: none;
  stroke: var(--line-soft);
  stroke-width: 7;
  stroke-dasharray: 1 14;
  vector-effect: none !important;
}

.dk-ring-dash {
  fill: none;
  stroke: var(--line-soft);
  stroke-dasharray: 3 9;
}

.dk-ring-arc {
  fill: none;
  stroke: var(--ink-cool);
  stroke-width: 2;
}

.dk-cross {
  stroke: var(--line-soft);
}

.dk-spin {
  transform-origin: 300px 300px;
  animation: dk-spin 120s linear infinite;
}

.dk-spin-rev {
  animation-duration: 70s;
  animation-direction: reverse;
}

@keyframes dk-spin {
  to { rotate: 360deg; }
}

.dk-leader {
  stroke: var(--ink-cool);
  stroke-width: 1.2;
  opacity: 0;
  transition: opacity 200ms ease;
}

.dk-leader-end {
  fill: var(--ink-cool);
  opacity: 0;
  transition: opacity 200ms ease;
}

.dk-console.has-active .dk-leader,
.dk-console.has-active .dk-leader-end {
  opacity: 1;
}

.dk-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52%;
  aspect-ratio: 1;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: #0a1426;
}

.dk-core-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15) brightness(0.75);
  mix-blend-mode: luminosity;
  opacity: 0.55;
  scale: 1.04;
  transition: opacity 500ms ease, scale 900ms var(--ease);
}

.dk-core::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(transparent 50%, rgba(3, 5, 10, 0.92) 78%);
}

.dk-console.has-active .dk-core-img {
  opacity: 0.8;
  scale: 1.1;
}

.dk-core-read {
  position: absolute;
  z-index: 1;
  left: 12%;
  right: 12%;
  bottom: 13%;
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
}

.dk-core-kicker,
.dk-core-value {
  font-family: var(--hud);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--line-soft);
}

.dk-core-value {
  font-family: var(--num);
  font-size: 12px !important;
  letter-spacing: 0.02em !important;
  text-transform: none;
  color: var(--ink-cool);
}

.dk-core-read strong {
  font-family: var(--station);
  font-weight: 400;
  font-size: clamp(0.85rem, calc(1.3 * var(--vw, 1vw)), 1.25rem);
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-cool);
}

.dk-core-read.is-swapping {
  animation: dk-flicker 360ms steps(4, end);
}

@keyframes dk-flicker {
  0% { opacity: 0; }
  30% { opacity: 1; }
  55% { opacity: 0.2; }
  100% { opacity: 1; }
}

.dk-commands {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dk-commands li {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
}

.dk-commands li:nth-child(1) { --x: 50%; --y: 6%; }
.dk-commands li:nth-child(2) { --x: 14%; --y: 21%; }
.dk-commands li:nth-child(3) { --x: 86%; --y: 21%; }
.dk-commands li:nth-child(4) { --x: 6%; --y: 50%; }
.dk-commands li:nth-child(5) { --x: 94%; --y: 50%; }
.dk-commands li:nth-child(6) { --x: 14%; --y: 79%; }
.dk-commands li:nth-child(7) { --x: 86%; --y: 79%; }
.dk-commands li:nth-child(8) { --x: 50%; --y: 94%; }

.dk-cmd {
  position: relative;
  display: grid;
  justify-items: start;
  text-decoration: none;
  isolation: isolate;
}

.dk-cmd span {
  position: relative;
  display: block;
  padding: 6px 16px;
  background: rgba(3, 5, 10, 0.86);
  border: 1px solid var(--line-faint);
  color: var(--ink-cool);
  font-family: var(--station);
  font-size: clamp(0.72rem, calc(0.9 * var(--vw, 1vw)), 0.9rem);
  line-height: 1.3;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 260ms var(--snap), color 260ms var(--snap), border-color 260ms ease;
}

.dk-cmd small {
  margin: 4px 0 0 2px;
  font-family: var(--num);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  opacity: 0;
  translate: -6px 0;
  transition: opacity 220ms ease, translate 300ms var(--snap);
}

.dk-cmd.is-active span {
  background: var(--ink-cool);
  border-color: var(--ink-cool);
  color: var(--void);
}

.dk-cmd.is-active small {
  opacity: 1;
  translate: 0 0;
}

.dk-keys {
  position: absolute;
  right: 0;
  bottom: -34px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--hud);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--line-soft);
}

@media (max-width: 1100px) {
  .dk {
    grid-template-columns: 1fr;
    padding-top: calc(var(--bar-h) + 40px);
  }

  .dk-console {
    width: min(100%, 560px);
    margin-top: 20px;
  }

  .dk-keys {
    display: none;
  }
}

@media (max-width: 560px) {
  .dk-cmd span {
    padding: 5px 10px 4px 8px;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
  }

  .dk-commands li:nth-child(4) { --x: 12%; }
  .dk-commands li:nth-child(5) { --x: 88%; }
}
