:root {
  color: #f3f7ff;
  background: #070b1b;
  font-family: "Cascadia Mono", "Cascadia Code", Consolas, monospace;
  font-synthesis: none;
  --bg: #070b1b;
  --panel: #0b1123;
  --panel-up: #10192a;
  --line: #263a59;
  --line-soft: rgba(38, 58, 89, .58);
  --text: #f3f7ff;
  --muted: #93bee8;
  --faint: #70ace2;
  --cyan: #68c7ff;
  --purple: #af93ff;
  --green: #20e6a3;
  --red: #ff514d;
  --amber: #f2b84b;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body { min-width: 320px; min-height: 100vh; margin: 0; overflow-x: hidden; }
body::before { content: ""; position: fixed; z-index: -2; inset: 0; background: linear-gradient(rgba(38,58,89,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(38,58,89,.22) 1px, transparent 1px), radial-gradient(circle at 50% 48%, rgba(18,34,64,.58), transparent 48%), var(--bg); background-size: 52px 52px, 52px 52px, 100% 100%, 100% 100%; }
body::after { content: ""; position: fixed; z-index: -1; inset: 0; opacity: .12; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.025) 3px 4px); pointer-events: none; }

.landing-shell { display: grid; min-height: 100svh; place-items: center; padding: clamp(28px, 5vw, 72px) 24px; }
.console { width: min(1120px, 100%); border: 1px solid var(--line); background: rgba(7,11,27,.9); box-shadow: 18px 18px 0 rgba(3,6,16,.3); }
.console-head { display: flex; min-height: 82px; align-items: center; justify-content: space-between; padding: 0 26px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; overflow: hidden; border: 1px solid var(--purple); background: #03050c; transition: transform .2s cubic-bezier(.2,.85,.3,1), border-color .2s ease; }
.brand-mark img { display: block; width: 100%; height: 100%; padding: 2px; object-fit: contain; }
.brand > span:last-child { display: grid; gap: 3px; }
.brand strong { font-size: 16px; letter-spacing: -.04em; }
.brand small, .cell-label, .cell small, footer { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-size: 9px; font-weight: 900; }
.live i { width: 6px; height: 6px; background: var(--green); }

.console-grid { display: grid; grid-template-columns: 260px minmax(390px, 1fr) 280px; grid-template-rows: 255px 190px; }
.cell { position: relative; min-width: 0; padding: 25px 29px; overflow: hidden; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .18s ease, transform .2s cubic-bezier(.2,.85,.3,1), box-shadow .2s ease; }
.cell:nth-child(3), .cell:nth-child(6) { border-right: 0; }
.cell:nth-child(n+4) { border-bottom: 0; }
.cell-label { display: block; color: var(--faint); line-height: 1.4; overflow-wrap: anywhere; }

.scanner { display: flex; align-items: center; flex-direction: column; }
.scanner .cell-label { align-self: flex-start; }
.battle-grid { display: grid; width: 142px; grid-template-columns: repeat(4, 28px); grid-auto-rows: 28px; gap: 7px; margin: 22px 0 17px; }
.battle-grid > i { border: 1px solid currentColor; background: color-mix(in srgb, currentColor 8%, transparent); transform: scale(.88); transition: border-color .2s ease, background .2s ease, transform .2s cubic-bezier(.2,.85,.3,1); }
.battle-grid > i.attack { color: var(--green); }
.battle-grid > i.defense { color: var(--red); }
.battle-key { display: flex; gap: 22px; color: var(--muted); font-size: 7px; font-weight: 900; }
.battle-key span { display: inline-flex; align-items: center; gap: 6px; }
.battle-key i { display: block; width: 14px; height: 3px; background: var(--green); }
.battle-key span:last-child i { background: var(--red); }

.signal { display: flex; flex-direction: column; }
.signal-display { display: flex; min-width: 0; height: 96px; align-items: flex-start; gap: clamp(18px, 4vw, 38px); margin: 13px 0 8px; }
.signal-bars { display: flex; height: 54px; flex: 0 1 252px; align-items: stretch; gap: 4px; margin-top: 10px; overflow: hidden; }
.signal-bars i { width: 5px; flex: 0 0 5px; background: var(--cyan); transform-origin: bottom; transition: transform .25s cubic-bezier(.2,.8,.25,1), background .18s ease; }
.signal-bars i:nth-child(n+19) { opacity: .16; }
.signal-instruments { position: relative; flex: 1 0 150px; height: 96px; }
.mini-instrument { position: absolute; display: block; width: 64px; height: 54px; }
.track-cluster { top: 38px; left: 3px; }
.vector-intercept { top: -7px; right: -3px; width: 92px; height: 76px; }
.cluster-axis, .cluster-ring, .cluster-contact, .cluster-core, .vector-line, .vector-ping, .vector-target { position: absolute; display: block; }
.cluster-axis { inset: 0; background: linear-gradient(transparent 49%,var(--line) 49% 51%,transparent 51%),linear-gradient(90deg,transparent 49%,var(--line) 49% 51%,transparent 51%); }
.cluster-ring { inset: 8px 13px; border: 1px dashed var(--line); border-radius: 50%; }
.cluster-contact { width: 6px; height: 6px; background: var(--cyan); box-shadow: 0 0 7px rgba(104,199,255,.45); transform: rotate(45deg); }
.contact-a { top: 19%; left: 61%; }
.contact-b { top: 63%; left: 27%; }
.contact-c { top: 70%; left: 77%; }
.cluster-core { top: 50%; left: 50%; width: 8px; height: 8px; opacity: 0; background: var(--green); transform: translate(-50%,-50%) rotate(45deg) scale(.3); }
.vector-line { height: 1px; background: var(--line); transform-origin: left; }
.vector-a { top: 25%; left: 7%; width: 88%; transform: rotate(18deg); }
.vector-b { top: 78%; left: 4%; width: 91%; transform: rotate(-24deg); }
.vector-ping { top: 30%; left: 62%; width: 6px; height: 6px; background: var(--cyan); box-shadow: 0 0 7px var(--cyan); }
.vector-target { top: 48%; left: 52%; width: 18px; height: 18px; border: 1px solid var(--red); transform: translate(-50%,-50%) rotate(45deg); }
.signal-readout { display: flex; align-items: center; gap: 22px; padding-top: 14px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 9px; }
.signal-readout strong { color: var(--text); }
.signal > small { margin-top: auto; }

.access { display: flex; flex-direction: column; }
.login { position: relative; display: flex; min-height: 60px; align-items: center; justify-content: space-between; margin-top: 44px; padding: 0 19px; overflow: hidden; border: 1px solid #e8f4ff; color: #e8f4ff; background: transparent; font-size: 12px; font-weight: 900; text-decoration: none; transition: border-color .22s ease, color .22s ease, background .28s ease, transform .22s cubic-bezier(.2,.85,.3,1); }
.login span, .login i { position: relative; z-index: 1; }
.login i { color: var(--cyan); font-size: 19px; font-style: normal; transition: transform .22s cubic-bezier(.2,.85,.3,1), color .18s ease; }
.access small { margin-top: auto; }

.rates { display: flex; flex-direction: column; }
.rate-list { display: grid; gap: 14px; margin: 23px 0 15px; }
.rate-list > span { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 10px; color: var(--muted); font-size: 8px; }
.rate-list > span > b { font-weight: 900; }
.rate-list > span > i { display: flex; height: 10px; overflow: hidden; background: var(--line); font-style: normal; }
.rate-list em { height: 100%; transform: scaleY(.72); transition: flex-grow .72s cubic-bezier(.2,.85,.3,1), transform .3s ease; }
.rate-list em:nth-child(1) { flex: 5; background: var(--green); }
.rate-list em:nth-child(2) { flex: 3; background: var(--amber); }
.rate-list em:nth-child(3) { flex: 2; background: var(--red); }
.rate-list > span:nth-child(2) em:nth-child(1) { flex-grow: 3; }
.rate-list > span:nth-child(2) em:nth-child(2) { flex-grow: 5; }
.rate-list > span:nth-child(3) em:nth-child(1) { flex-grow: 6; }
.rate-list > span:nth-child(3) em:nth-child(2), .rate-list > span:nth-child(3) em:nth-child(3) { flex-grow: 2; }
.rates small { margin-top: auto; }
.waveform { display: flex; flex-direction: column; }
.waveform svg { width: 100%; height: 82px; margin: 12px 0 5px; overflow: visible; }
.season-segment { stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.season-segment.increase { stroke: var(--green); }
.season-segment.decrease { stroke: var(--red); }
.season-segment.flat { stroke: var(--cyan); }
.season-reveal { transform: scaleX(0); transform-box: fill-box; transform-origin: left center; }
.waveform.is-tracing .season-reveal { animation: season-reveal 1.35s cubic-bezier(.25,.7,.25,1) forwards; }
.coordinates { position: absolute; top: 24px; right: 29px; display: flex; gap: 14px; color: var(--muted); font-size: 7px; font-weight: 800; }
.coordinates span { display: inline-flex; align-items: center; gap: 5px; }
.coordinates span::before { content: ""; width: 10px; height: 2px; background: currentColor; }
.coordinates .gain { color: var(--green); }
.coordinates .loss { color: var(--red); }
.coordinates .hold { color: var(--cyan); }
.node { display: flex; flex-direction: column; }
.dark-field { position: relative; width: 116px; height: 116px; align-self: center; margin: 7px 0 2px; overflow: hidden; border: 1px solid var(--line); border-radius: 50%; background: radial-gradient(circle at 50% 50%,rgba(175,147,255,.22),transparent 8%,transparent 22%,rgba(104,199,255,.07) 23%,transparent 46%); }
.dark-axis, .dark-ring, .dark-sweep, .dark-blip { position: absolute; display: block; }
.dark-axis { inset: 0; background: linear-gradient(transparent 49.5%,var(--line) 49.5% 50.5%,transparent 50.5%),linear-gradient(90deg,transparent 49.5%,var(--line) 49.5% 50.5%,transparent 50.5%); }
.dark-ring { border: 1px solid var(--line-soft); border-radius: 50%; }
.dark-ring-outer { inset: 12px; }
.dark-ring-inner { inset: 34px; }
.dark-sweep { inset: 4px; border-radius: 50%; opacity: .72; background: conic-gradient(from -90deg,transparent 0 83%,rgba(175,147,255,.08) 89%,rgba(104,199,255,.58) 100%); }
.dark-blip { width: 6px; height: 6px; background: var(--cyan); box-shadow: 0 0 9px rgba(104,199,255,.5); }
.dark-blip-a { top: 27px; left: 70px; }
.dark-blip-b { top: 65px; left: 29px; }
.dark-blip-c { top: 82px; left: 78px; background: var(--purple); }
.node.is-scanning .dark-sweep { animation: dark-field-scan 1.7s linear infinite; animation-play-state: paused; }
.node.is-scanning .dark-blip { animation: dark-field-ping .7s steps(2,end) infinite alternate; animation-play-state: paused; }
.node.is-scanning .dark-blip-b { animation-delay: .21s; }
.node.is-scanning .dark-blip-c { animation-delay: .43s; }
.node.is-scanning.is-radar-active .dark-sweep,
.node.is-scanning.is-radar-active .dark-blip { animation-play-state: running; }

footer { display: grid; min-height: 52px; grid-template-columns: 1fr auto; align-items: center; padding: 0 26px; }
footer span:nth-child(2) { text-align: right; }

a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.scanner.is-filling .battle-grid > i { animation: chip-fill .48s cubic-bezier(.2,.85,.3,1) var(--delay, 0s) both; }
.signal.is-locking .signal-bars i { background: var(--purple); transform: scaleY(.58); transition-delay: calc(var(--i) * 7ms); }
.signal.is-locking .signal-bars i:nth-child(3n) { transform: scaleY(.82); }
.signal.is-locking .signal-bars i:nth-child(4n) { transform: scaleY(.4); }
.signal.is-locking .cluster-contact { animation: cluster-converge .78s cubic-bezier(.2,.85,.3,1) var(--contact-delay, 0s) both; }
.signal.is-locking .contact-b { --contact-delay: .1s; }
.signal.is-locking .contact-c { --contact-delay: .2s; }
.signal.is-locking .cluster-core { animation: cluster-core .34s cubic-bezier(.2,.9,.3,1) .62s both; }
.signal.is-locking .vector-ping { animation: vector-radar-ping .76s steps(2,end) infinite alternate; }
.signal.is-locking .vector-target { animation: vector-intercept-lock 1s cubic-bezier(.2,.85,.3,1) infinite alternate; }
.rates.is-shifting .rate-list > span { animation: rate-row .58s cubic-bezier(.2,.85,.3,1) calc(var(--row) * 90ms) both; }
.rates.is-shifting .rate-list em { animation: rate-wake .62s cubic-bezier(.2,.85,.3,1) calc(var(--row) * 90ms + var(--segment) * 55ms) both; }

@media (hover: hover) and (pointer: fine) {
  .console:hover .brand-mark { border-color: var(--cyan); transform: rotate(-3deg); }
  .cell:hover { z-index: 2; background: var(--panel-up); transform: translate(-3px, -3px); box-shadow: 5px 5px 0 rgba(82,117,191,.42); }
  .login:hover { border-color: #d9efff; color: #07101e; background: #d9efff; }
  .login:hover i { color: #07101e; transform: translateX(7px); }
}

@keyframes chip-fill {
  0% { background: transparent; opacity: .35; transform: scale(.82); }
  65% { background: currentColor; opacity: 1; transform: scale(1.01); }
  100% { background: currentColor; opacity: 1; transform: scale(1); }
}
@keyframes season-reveal { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rate-row { 0% { transform: translateX(-8px); } 55% { transform: translateX(3px); } 100% { transform: translateX(0); } }
@keyframes rate-wake { 0% { opacity: .3; transform: scaleY(.25); } 70% { opacity: 1; transform: scaleY(1.08); } 100% { opacity: 1; transform: scaleY(1); } }
@keyframes cluster-converge { 0% { opacity:1; } 72% { top:50%; left:50%; opacity:1; transform:translate(-50%,-50%) rotate(45deg) scale(.82); } 100% { top:50%; left:50%; opacity:0; transform:translate(-50%,-50%) rotate(45deg) scale(.3); } }
@keyframes cluster-core { 0% { opacity:0; transform:translate(-50%,-50%) rotate(45deg) scale(.3); } 70% { opacity:1; transform:translate(-50%,-50%) rotate(45deg) scale(1.28); } 100% { opacity:1; transform:translate(-50%,-50%) rotate(45deg) scale(1); } }
@keyframes vector-radar-ping { from { opacity:.2; transform:scale(.65); } to { opacity:1; transform:scale(1.35); } }
@keyframes vector-intercept-lock { from { box-shadow:0 0 0 0 rgba(255,81,77,.45); } to { box-shadow:0 0 0 13px rgba(255,81,77,0); transform:translate(-50%,-50%) rotate(135deg); } }
@keyframes dark-field-scan { to { transform:rotate(360deg); } }
@keyframes dark-field-ping { from { opacity:.22; transform:scale(.7); } to { opacity:1; transform:scale(1.28); } }

@media (min-width: 1181px) {
  .landing-shell { padding: clamp(24px, 3.5vw, 54px) 24px; }
  .console { width: min(1320px, 100%); }
  .console-head { min-height: 94px; padding: 0 32px; }
  .brand { gap: 15px; }
  .brand-mark { width: 50px; height: 50px; }
  .brand strong { font-size: 19px; }
  .brand small, .cell-label, .cell small, footer { font-size: 9px; }
  .live { font-size: 10px; }
  .console-grid { grid-template-columns: 300px minmax(470px, 1fr) 320px; grid-template-rows: 292px 218px; }
  .cell { padding: 30px 34px; }
  .battle-grid { width: 164px; grid-template-columns: repeat(4, 32px); grid-auto-rows: 32px; gap: 9px; margin: 26px 0 19px; }
  .battle-key { gap: 26px; font-size: 8px; }
  .battle-key i { width: 17px; }
  .signal-display { height: 112px; gap: 44px; margin-top: 16px; }
  .signal-bars { height: 63px; flex-basis: 290px; gap: 5px; margin-top: 12px; }
  .signal-bars i { width: 6px; flex-basis: 6px; }
  .signal-instruments { flex-basis: 180px; height: 108px; }
  .track-cluster { top: 46px; left: 8px; width: 74px; height: 62px; }
  .vector-intercept { top: -5px; right: 0; width: 108px; height: 86px; }
  .signal-readout { gap: 27px; padding-top: 17px; font-size: 10px; }
  .login { min-height: 72px; margin-top: 51px; padding: 0 23px; font-size: 14px; }
  .login i { font-size: 22px; }
  .rate-list { gap: 16px; margin-top: 28px; }
  .rate-list > span { grid-template-columns: 56px 1fr; gap: 13px; font-size: 9px; }
  .rate-list > span > i { height: 12px; }
  .waveform svg { height: 98px; margin-top: 16px; }
  .coordinates { top: 29px; right: 34px; gap: 17px; font-size: 8px; }
  .dark-field { width: 136px; height: 136px; margin-top: 10px; }
  .dark-ring-outer { inset: 14px; }
  .dark-ring-inner { inset: 40px; }
  .dark-blip-a { top: 32px; left: 82px; }
  .dark-blip-b { top: 76px; left: 34px; }
  .dark-blip-c { top: 96px; left: 91px; }
  footer { min-height: 62px; padding: 0 32px; }
}

@media (min-width: 621px) and (max-width: 980px) {
  .landing-shell { padding: 18px 12px; }
  .console-grid { grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: 245px 150px 195px 205px; }
  .cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .scanner { grid-column: 1; grid-row: 1; }
  .signal { grid-column: 2; grid-row: 1; border-right: 0; }
  .access { grid-column: 1 / 3; grid-row: 2; border-right: 0; }
  .rates { grid-column: 1; grid-row: 3; }
  .waveform { grid-column: 2; grid-row: 3; border-right: 0; }
  .node { grid-column: 1 / 3; grid-row: 4; align-items: center; border-right: 0; border-bottom: 0; }
  .node .cell-label { align-self: flex-start; }
  .login { margin-top: 20px; }
  .dark-field { margin-top: 5px; }
}

@media (max-width: 620px) {
  .landing-shell { align-items: start; padding: 10px 8px 20px; }
  .console { width: 100%; box-shadow: 8px 8px 0 rgba(3,6,16,.3); }
  .console-head { min-height: 70px; padding: 0 17px; }
  .brand { gap: 10px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand strong { font-size: 15px; }
  .brand small { font-size: 7px; }
  .console-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .cell, .scanner, .signal, .access, .rates, .waveform, .node { grid-column: 1; grid-row: auto; min-height: 0; padding: 22px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .scanner { min-height: 248px; }
  .signal { min-height: 250px; }
  .access { min-height: 150px; }
  .rates { min-height: 200px; }
  .waveform { min-height: 190px; }
  .node { min-height: 196px; align-items: center; border-bottom: 0; }
  .node .cell-label { align-self: flex-start; }
  .brand small, .cell-label, .cell small, footer { font-size: 8px; }
  .battle-grid { width: 150px; grid-template-columns: repeat(4, 30px); grid-auto-rows: 30px; gap: 8px; margin: 24px 0 18px; }
  .battle-key { gap: 25px; font-size: 8px; }
  .signal-display { height: 108px; gap: 14px; margin-top: 15px; }
  .signal-bars { height: 58px; flex: 0 1 165px; gap: 3px; margin-top: 11px; }
  .signal-bars i { width: 3px; flex-basis: 3px; }
  .signal-instruments { flex: 0 0 124px; height: 100px; }
  .track-cluster { top: 43px; left: 3px; }
  .vector-intercept { top: -3px; right: 0; width: 76px; height: 62px; }
  .signal-readout { justify-content: space-between; gap: 8px; padding-top: 16px; font-size: 8px; }
  .login { width: 100%; min-height: 62px; margin-top: 21px; font-size: 13px; }
  .rate-list { width: 100%; gap: 15px; margin-top: 24px; }
  .rate-list > span { width: 100%; min-width: 0; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; font-size: 8px; }
  .rate-list > span > i { min-width: 0; height: 11px; }
  .waveform svg { height: 100px; margin-top: 20px; }
  .coordinates { top: 21px; right: 20px; gap: 10px; font-size: 7px; }
  .coordinates span { display: inline-flex; }
  .dark-field { width: 128px; height: 128px; margin-top: 10px; }
  .dark-ring-outer { inset: 13px; }
  .dark-ring-inner { inset: 37px; }
  .dark-blip-a { top: 30px; left: 77px; }
  .dark-blip-b { top: 72px; left: 33px; }
  .dark-blip-c { top: 90px; left: 85px; }
  footer { min-height: 84px; grid-template-columns: 1fr; align-content: center; gap: 9px; padding: 14px 20px; }
  footer span:nth-child(2) { display: block; text-align: left; }
}

@media (max-width: 380px) {
  .console-head { padding: 0 14px; }
  .brand small { display: none; }
  .cell { padding-right: 16px; padding-left: 16px; }
  .signal-display { gap: 8px; }
  .signal-instruments { flex-basis: 108px; }
  .signal-readout { font-size: 7px; }
  .coordinates { right: 16px; }
  footer { padding-right: 16px; padding-left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scanner.is-filling .battle-grid > i { opacity: 1; background: currentColor; transform: scale(1); }
  .waveform.is-tracing .season-reveal { transform: scaleX(1); }
  .signal.is-locking .cluster-contact { opacity: 0; }
  .signal.is-locking .cluster-core { opacity: 1; transform: translate(-50%,-50%) rotate(45deg) scale(1); }
  .signal.is-locking .vector-ping { opacity: 1; }
}
