/* Taktikon layout: denser and terser than Logios. Built for war. */

.terminal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh;
  height: 100dvh;
  padding: 8px 12px 10px;
  gap: 8px;
}

.bar {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--dim);
  padding-bottom: 4px;
  flex-wrap: wrap;
}
.brand .mark { font-size: 28px; letter-spacing: 0.18em; }
.brand .sub { color: var(--dim); margin-left: 10px; letter-spacing: 0.1em; }
.stats { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.stat b { color: var(--dim); font-weight: normal; }
.stat.clock span { color: var(--phosphor); }
.stat.clock.low span { color: var(--hostile); animation: vox-blink 1s infinite steps(1); }
.stat.seed span { color: var(--dim); }
.pips { letter-spacing: 2px; }
.actions { display: flex; gap: 8px; }

.deck {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 10px;
  min-height: 0;
}

.plan-wrap {
  position: relative;
  min-height: 0;
  border: 1px solid var(--faint);
}
#plan {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}
.hover {
  position: absolute;
  left: 8px;
  bottom: 6px;
  color: var(--dim);
  font-size: 17px;
  pointer-events: none;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.sections { list-style: none; margin: 0; padding: 0; }
.sections li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 6px;
  cursor: pointer;
  padding: 0 2px;
  font-size: 17px;
}
.sections li:hover { background: var(--ghost); }
.sections li .pw { color: var(--dim); }
.sections li.on .pw { color: var(--phosphor); }
.sections li.vented .pw { color: var(--hostile); }
.sections li .nm { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.feeds {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  min-height: 0;
}
.feed {
  border: 1px solid var(--faint);
  padding: 4px 6px 5px;
  cursor: pointer;
}
.feed.selected { border-color: var(--phosphor); box-shadow: inset 0 0 8px rgba(61, 255, 131, 0.15); }
.feed .top { display: flex; justify-content: space-between; gap: 6px; }
.feed .nm { white-space: nowrap; }
.feed .ap { color: var(--phosphor); letter-spacing: 1px; }
.feed .bar-hp { color: var(--phosphor-2); font-size: 17px; }
.feed .state { font-size: 17px; color: var(--dim); min-height: 1.1em; }
.feed canvas { width: 100%; height: 64px; display: block; margin: 3px 0; background: #010603; }
.feed .row { display: flex; gap: 4px; }
.feed .row .btn { font-size: 16px; padding: 0 6px; }
.feed.down { border-color: var(--hostile-dim); }
.feed.down .state, .feed.captive .state { color: var(--hostile); }
.feed.captive { border-color: var(--hostile); animation: vox-blink 1.4s infinite steps(1); }
.feed.gone { opacity: 0.45; }

.lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.log-wrap { min-height: 0; }
.log {
  list-style: none;
  margin: 0;
  padding: 0 4px 0 0;
  height: 22vh;
  min-height: 120px;
  overflow-y: auto;
  font-size: 18px;
}
.log li { white-space: pre-wrap; }
.log li .t { color: var(--dim); margin-right: 8px; }
.log li.cycle { color: var(--dim); }
.log li.strained { color: #b8ffcf; letter-spacing: -0.02em; }
.log li.broken { color: var(--alarm); text-shadow: 0 0 6px rgba(255, 106, 77, 0.6); animation: log-shake 0.25s infinite; }
.log li.struck { text-decoration: line-through; color: var(--dim); animation: none; text-shadow: none; }
.log li.amend { background: var(--phosphor); color: var(--bg); text-shadow: none; padding: 0 4px; }
.log li.sys { color: var(--dim); font-style: normal; }
.log li.err { color: var(--hostile); }

@keyframes log-shake {
  0% { transform: translateX(0); }
  33% { transform: translateX(1px); }
  66% { transform: translateX(-1px); }
}

.console { border-top: 1px solid var(--faint); padding-top: 4px; }
.orders { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-bottom: 4px; }
.orders .grp-label { color: var(--dim); font-size: 16px; letter-spacing: 0.08em; margin: 0 2px 0 6px; }
.orders .grp-label:first-child { margin-left: 0; }
.orders .btn { font-size: 16px; padding: 0 8px; }
.orders .btn.armed { background: var(--phosphor); color: var(--bg); text-shadow: none; border-color: var(--phosphor); }
.orders .btn:disabled { opacity: 0.35; cursor: default; background: transparent; border-color: var(--faint); }
#plan.armed { cursor: cell; }
.hover .intent { color: var(--phosphor); margin-left: 12px; }
.hover .intent.no { color: var(--hostile); }
.feed .gear { display: flex; justify-content: space-between; gap: 6px; font-size: 17px; }
.feed .gear .dry { color: var(--hostile); }
.feed .gear .melee { color: var(--dim); }

.muster { position: fixed; inset: 0; z-index: 44; background: var(--bg); overflow-y: auto; padding: 24px 16px; }
.muster .card { max-width: 980px; margin: 0 auto; }
.muster h2 { font-weight: normal; letter-spacing: 0.16em; margin: 0; font-size: 32px; }
.muster .sub { color: var(--dim); margin: 2px 0 14px; }
.muster .brother { display: grid; grid-template-columns: 170px 1fr 1fr; gap: 6px 16px; border-top: 1px solid var(--faint); padding: 10px 0; align-items: start; }
.muster .who { font-size: 21px; }
.muster .who small { display: block; color: var(--dim); font-size: 16px; }
.muster .pick { display: flex; flex-direction: column; gap: 2px; }
.muster .pick .lbl { color: var(--dim); font-size: 15px; letter-spacing: 0.08em; }
.muster .cycler { display: flex; align-items: stretch; gap: 4px; }
.muster .cycler .btn { padding: 0 8px; }
.muster .cycler .val { flex: 1; border: 1px solid var(--dim); padding: 0 8px; text-align: center; min-width: 0; }
.muster .cycler .val.heavy::after { content: ' [HVY]'; color: var(--hostile); }
.muster .stats { color: var(--phosphor-2); font-size: 16px; }
.muster .note { color: var(--dim); font-size: 16px; }
.muster .foot { display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--dim); padding-top: 12px; margin-top: 4px; flex-wrap: wrap; }
.muster .err { color: var(--hostile); flex: 1; min-width: 200px; }
.muster .ok { color: var(--dim); flex: 1; min-width: 200px; }
.muster .board { font-size: 22px; padding: 2px 18px; border-color: var(--phosphor); }
.muster .board:disabled { opacity: 0.4; cursor: default; }
.echo { color: var(--dim); min-height: 1.1em; font-size: 17px; }
.echo.err { color: var(--hostile); }
.cmd { display: flex; gap: 8px; align-items: center; }
.prompt { color: var(--phosphor); }
#cmd {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--phosphor);
  font-family: var(--font);
  font-size: 21px;
  text-shadow: var(--glow);
  caret-color: var(--phosphor);
  text-transform: uppercase;
  min-width: 0;
}
#cmd::placeholder { color: var(--faint); text-transform: none; }
.btn.end { border-color: var(--phosphor); }

.verdict {
  position: fixed;
  inset: 0;
  background: rgba(1, 6, 3, 0.92);
  display: grid;
  place-items: center;
  z-index: 45;
  padding: 16px;
}
.verdict .card { border: 1px solid var(--phosphor); padding: 20px 28px; max-width: 560px; width: 100%; }
.verdict h2 { font-weight: normal; letter-spacing: 0.16em; margin: 0 0 6px; font-size: 32px; }
.verdict .outcome.failure { color: var(--hostile); }
.verdict dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; margin: 12px 0; }
.verdict dt { color: var(--dim); }
.verdict dd { margin: 0; }
.verdict .final { color: var(--dim); border-left: 2px solid var(--dim); padding-left: 10px; margin: 10px 0 16px; }
.verdict .row { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 900px) {
  html, body { font-size: 17px; }
  .terminal { height: auto; min-height: 100dvh; padding: 6px 16px; }
  .deck { grid-template-columns: minmax(0, 1fr); }
  .plan-wrap { height: auto; aspect-ratio: 54 / 26; }
  .bar { gap: 8px; }
  .stats { gap: 4px 12px; flex-basis: 100%; order: 3; }
  .feeds { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .feed { min-width: 200px; }
  .brand .sub { display: none; }
  .muster .brother { grid-template-columns: minmax(0, 1fr); }
}
