/* Operations console and the countdown section */
@keyframes blink { 50% { opacity: 0; } }
body.locked { overflow: hidden; }

.metrics { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-bottom: 0; }
.metrics div { flex: 1 1 200px; padding: 18px 22px; min-width: 0; background: var(--bg); }
.metrics dd { font: 500 clamp(18px, 2.2vw, 30px)/1.3 var(--mono); font-variant-numeric: tabular-nums; margin-top: 4px; }

.ops { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); background: #070a0e; font: 400 12px/1.5 var(--mono); box-shadow: 0 0 80px rgba(127, 180, 255, .09); }
.ops.full { position: fixed; inset: 0; z-index: 50; border: 0; overflow-y: auto; }
.ops.full .ops-body { flex: 1; height: auto; min-height: 420px; }
.ops.full .ops-foot > * { height: 230px; }
.ops-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; padding: 0 16px; border-bottom: 1px solid var(--line); min-height: 50px; background: #0b1017; }
.ops-bar [role="tab"] { align-self: stretch; min-height: 48px; padding: 0 4px; color: var(--muted); border-bottom: 2px solid transparent; font: 400 11px/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.ops-bar [role="tab"][aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.feed { margin-left: auto; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.feed::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: blink 1.4s steps(1) infinite; }
#full { border: 1px solid rgba(238, 241, 244, .45); padding: 7px 14px; font: 400 11px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
#full:hover { background: var(--fg); color: var(--bg); }

.ops-body { display: grid; grid-template-columns: 220px minmax(0, 1fr) 290px; height: max(660px, 80svh); }
.ops-body > * { min-width: 0; min-height: 0; }
.pane { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.pane h3 { font: 500 11px/1.6 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
.left { border-right: 1px solid var(--line); }
.right { border-left: 1px solid var(--line); overflow-y: auto; }
.ops input { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--fg); font: inherit; padding: 9px 10px; }
.ops input:focus { border-color: var(--accent); outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line); padding: 4px 9px; }
.chips button:hover { border-color: var(--fg); }
.chips button[aria-pressed="false"] { opacity: .35; text-decoration: line-through; }
.chips button::before, .list button::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dot); margin-right: 8px; }
.list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: thin; }
.list button { text-align: left; padding: 6px 8px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list button:hover, .list button.on { background: rgba(127, 180, 255, .16); }

.stage { position: relative; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: crosshair; }

.ident { font: 600 22px/1.3 var(--sans); font-stretch: 112%; text-transform: uppercase; overflow-wrap: anywhere; }
.right dl div { display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; border-top: 1px solid var(--line); }
.right dt { letter-spacing: .1em; flex: none; }
.right dd { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.ops .action { border: 1px solid rgba(238, 241, 244, .45); padding: 11px; text-align: center; text-transform: uppercase; letter-spacing: .14em; flex: none; }
.ops .action:hover { background: var(--fg); color: var(--bg); }

.ops-foot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.ops-foot > * { min-width: 0; height: 290px; }
.ops-foot > * + * { border-left: 1px solid var(--line); }
.stream { overflow: hidden; display: flex; flex-direction: column; }
.stream button { display: flex; gap: 12px; text-align: left; padding: 3px 0; flex: none; animation: slide .45s ease-out; }
.stream time { color: var(--muted); }
.stream span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.stream .alert span { color: #ff7a6b; }
.stream button:hover span { color: var(--accent); }
@keyframes slide { from { opacity: 0; transform: translateX(-14px); } }
#activity { width: 100%; flex: 1; min-height: 0; }
#attention { list-style: none; display: flex; flex-direction: column; justify-content: space-between; flex: 1; }
#attention li { display: grid; grid-template-columns: 84px minmax(0, 1fr) 44px; align-items: center; gap: 10px; color: var(--muted); }
#attention li.now { color: var(--fg); }
#attention i { display: block; height: 4px; background: var(--accent); transform-origin: left; transition: transform .6s; }
#attention em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
#term-out { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
#term-out p { overflow-wrap: anywhere; }
#term-out .echo { color: var(--accent); }
#term-out .warn { color: #ff7a6b; }

/* room for all data points on wide screens */
@media (min-width: 1101px) { #ops:not(.full) .ops-body { height: max(820px, 90svh); } }

/* Live planet console */
#planet-console .ops-body { height: max(620px, 76svh); }
#p-view { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: crosshair; }
.ops-foot.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#p-activity { width: 100%; flex: 1; min-height: 0; }
#p-missions time { min-width: 13ch; color: var(--accent); font-variant-numeric: tabular-nums; }
#p-missions .moon span { color: #d9c8ff; }
.auto { border: 1px solid rgba(238, 241, 244, .45); padding: 7px 14px; font: 400 11px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.auto[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.toast { position: absolute; left: 50%; top: 14px; translate: -50% 0; z-index: 1; max-width: calc(100% - 28px); padding: 10px 18px; background: var(--fg); color: var(--bg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 500 12px/1.5 var(--mono); animation: arrive .5s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 0 34px rgba(127, 180, 255, .7); }
@keyframes arrive { from { opacity: 0; transform: translateY(-22px); } }
.stream a { display: flex; gap: 12px; padding: 3px 0; flex: none; animation: slide .45s ease-out; }
.stream a:hover span { color: var(--accent); }
.stream .fresh span::before { content: "NEW "; color: var(--live); font-weight: 500; }
.feed.down { color: #ff7a6b; }
.feed.down::before { background: #ff7a6b; }

.ops-foot.auto { display: flex; flex-wrap: wrap; }
.ops-foot.auto > :nth-child(n) { flex: 1 1 250px; border: 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); margin: -1px 0 0 -1px; }

/* Connection system */
.net-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; height: max(560px, 70svh); }
.net-body > * { min-width: 0; min-height: 0; }
#net-map { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: crosshair; }
.ops-foot.two { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
#net-chart { width: 100%; flex: 1; min-height: 0; }
.stream p { display: flex; gap: 12px; padding: 3px 0; flex: none; animation: slide .45s ease-out; }
.stream p.alert span { color: #ff7a6b; }
@media (max-width: 900px) {
  .net-body { grid-template-columns: minmax(0, 1fr); height: auto; grid-template-rows: 640px auto; }
  .net-body .right { border-left: 0; border-top: 1px solid var(--line); }
  .ops-foot.two { grid-template-columns: minmax(0, 1fr); }
}

/* panels power up one after another */
.booted .ops-body > *, .booted .ops-foot > * { animation: power .8s cubic-bezier(.2, .7, .2, 1) backwards; }
.booted .left { animation-delay: .1s; }
.booted .stage { animation-delay: .25s; }
.booted .right { animation-delay: .45s; }
.booted .ops-foot > :nth-child(1) { animation-delay: .6s; }
.booted .ops-foot > :nth-child(2) { animation-delay: .75s; }
.booted .ops-foot > :nth-child(3) { animation-delay: .9s; }
.booted .ops-foot > :nth-child(4) { animation-delay: 1.05s; }
@keyframes power { from { opacity: 0; filter: brightness(3) blur(6px); transform: translateY(14px); } }

/* The beginning: countdown */
.beginning { position: relative; overflow: hidden; isolation: isolate; min-height: 100svh; display: flex; align-items: center; }
#warp { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.beginning h2 { font-size: clamp(34px, 7vw, 104px); text-align: center; letter-spacing: .04em; text-shadow: 0 0 30px rgba(0, 0, 0, .9); }
.beginning h2 span { display: inline-block; transition: opacity .8s ease, transform 1s cubic-bezier(.15, .8, .2, 1), filter .8s; }
.js .beginning:not(.in) h2 span { opacity: 0; transform: scale(2.4) translateY(20px); filter: blur(18px); }
.predicted { text-align: center; margin-top: 22px; color: var(--accent); font: 400 12px/1.6 var(--mono); letter-spacing: .34em; text-transform: uppercase; }
.count-title { margin-top: 48px; text-align: center; color: var(--muted); font: 400 11px/1.6 var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 16px; }
.countdown div { background: rgba(5, 6, 8, .78); padding: clamp(18px, 3vw, 40px) 8px; text-align: center; min-width: 0; }
.countdown b { display: block; font: 600 clamp(34px, 8vw, 118px)/1 var(--sans); font-stretch: 118%; font-variant-numeric: tabular-nums; }
.countdown b.tick { animation: tick .55s cubic-bezier(.2, .8, .2, 1); }
@keyframes tick { from { transform: translateY(-22%); opacity: .2; color: var(--accent); text-shadow: 0 0 28px var(--accent); } }
.countdown span { display: block; margin-top: 12px; color: var(--muted); font: 400 11px/1.4 var(--mono); letter-spacing: .2em; text-transform: uppercase; }
.vault { margin-top: 64px; text-align: center; transition: opacity 1.2s ease .5s, transform 1.2s cubic-bezier(.2, .75, .2, 1) .5s; }
.js .beginning:not(.in) .vault { opacity: 0; transform: translateY(70px); }
.vault-stage { position: relative; height: clamp(380px, 64svh, 640px); overflow: hidden; border: 1px solid var(--line); background: radial-gradient(60% 70% at 50% 50%, rgba(127, 180, 255, .1), rgba(3, 5, 8, .92) 75%); }
#assembly { position: absolute; inset: 0; width: 100%; height: 100%; }
.vault-stage::before, .vault-stage::after { content: ""; position: absolute; width: 26px; height: 26px; border: 2px solid var(--fg); pointer-events: none; }
.vault-stage::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.vault-stage::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.tag { position: absolute; font: 400 11px/1.6 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); max-width: 46%; }
.tag.tl { left: 22px; top: 20px; text-align: left; }
.tag.tr { right: 22px; top: 20px; text-align: right; color: var(--accent); }
.tag.bl { left: 22px; bottom: 20px; text-align: left; }
.tag.br { right: 22px; bottom: 20px; text-align: right; animation: blink 2s steps(1) infinite; }
.censor { position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: 12px 28px; background: var(--fg); color: var(--bg); white-space: nowrap; font: 600 clamp(13px, 2vw, 22px)/1.4 var(--sans); font-stretch: 125%; letter-spacing: .24em; text-transform: uppercase; animation: censor 7s steps(1) infinite; }
@keyframes censor { 0%, 30% { opacity: 0; } 34% { opacity: 1; transform: translateX(-14px); } 36% { opacity: .2; } 38%, 66% { opacity: 1; transform: none; } 68% { opacity: .3; transform: translateX(18px); } 70%, 100% { opacity: 0; } }
.working { position: relative; height: 3px; background: var(--line); overflow: hidden; }
.working i { position: absolute; inset: 0 auto 0 0; width: 28%; background: linear-gradient(90deg, transparent, var(--accent), #fff); box-shadow: 0 0 18px var(--accent); animation: working 2.6s cubic-bezier(.5, .1, .4, .9) infinite; }
@keyframes working { from { transform: translateX(-100%); } to { transform: translateX(460%); } }
.whisper { margin-top: 54px; min-height: 2.6em; font: 600 clamp(24px, 4.2vw, 60px)/1.25 var(--sans); font-stretch: 125%; text-transform: uppercase; letter-spacing: .04em; text-wrap: balance; }
.whisper-sub { color: var(--muted); }

@media (max-width: 1100px) {
  .ops-body, .ops.full .ops-body { grid-template-columns: 190px minmax(0, 1fr); height: auto; grid-template-rows: 620px auto; flex: none; }
  .right { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .ops-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-foot > :nth-child(3) { border-left: 0; }
  .ops-foot > :nth-child(n+3) { border-top: 1px solid var(--line); }
  #planet-console .ops-body { height: auto; }
  .ops-foot.three { grid-template-columns: minmax(0, 1fr); }
  .ops-foot.three > * + * { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .metrics div { flex-basis: 40%; }
  .ops-body, .ops.full .ops-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 560px auto; }
  .left { border-right: 0; border-bottom: 1px solid var(--line); }
  .left .list { max-height: 112px; }
  .ops-foot { grid-template-columns: minmax(0, 1fr); }
  .ops-foot > * + * { border-left: 0; border-top: 1px solid var(--line); }
  #planet-console .ops-body { grid-template-rows: auto 320px auto; }
  .countdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tag { font-size: 9px; letter-spacing: .1em; }
}
