/* SF-001 palette on top of the shared shell. Panels and type stay in the family. */

:root {
  --bg: #070b12;
  --bg-elev: #121b29;
  --panel: #0c131e;
  --panel-2: #121b29;
  --text: #e7eefc;
  --muted: #c5d0e6;
  --line: #1e2c3f;
  --line-strong: #5cefff;
  --brand: #1d4ed8;
  --neon: #5cefff;
  --ok: #b6ffd0;
  --warn: #ffd27a;
  --danger: #ffb4c4;
  --link: #9ecbff;
}

body {
  background: #070b12;
  color: var(--text);
}

.panel,
.disclaimer,
.card {
  background: #0c131e;
  border-color: #1e2c3f;
}

.choice,
.rules,
.theory-card,
#feedback:not(:empty),
select,
input[type="text"],
input[type="number"],
.program,
.trend,
.gauge,
.chip-check {
  background: #121b29;
  border-color: #1e2c3f;
}

button {
  background: #121b29;
  border-color: #1e2c3f;
}

button.primary,
.modes button[aria-selected="true"] {
  background: #1d4ed8;
  color: #ffffff;
}

.kicker,
.panel h2 {
  color: #5cefff;
}

.cctv {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
}

.plan-wrap {
  background: #121b29;
  border: 1px solid #1e2c3f;
  border-radius: 12px;
  overflow: hidden;
}

#plan {
  display: block;
  width: 100%;
  height: auto;
  touch-action: manipulation;
  cursor: crosshair;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 32px;
}

.swatch {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 3px;
  border: 1px solid #1e2c3f;
  flex: none;
}

.cam-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cam-tabs button[aria-pressed="true"] {
  background: #1d4ed8;
  color: #ffffff;
  border-color: transparent;
}

.cctv-fields {
  border: 1px solid #1e2c3f;
  border-radius: 12px;
  margin: 0;
  padding: 0.55rem 0.7rem 0.75rem;
  min-width: 0;
}

.cctv-fields legend,
.cctv h3 {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0.3rem;
}

.cctv h3 {
  margin: 0.8rem 0 0.35rem;
}

.cctv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.45rem 0.65rem;
}

.cctv-grid label,
.cctv-actions {
  min-width: 0;
}

.cctv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.out {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--neon);
}

.checkline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
}

.checkline input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--neon);
  flex: none;
}

#warnings,
#discover-box,
#live-checks {
  margin: 0;
}

#warnings ul,
#discover-box ul,
#live-checks ul {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
}

.legal-short {
  margin: 0;
  color: var(--muted);
}

.probe {
  flex-wrap: wrap;
}

.probe b {
  white-space: normal;
  text-align: right;
}

.choice span {
  min-width: 0;
}

@media (max-width: 420px) {
  .cctv-actions button {
    flex: 1 1 100%;
  }
}

.jump {
  display: none;
}

@media (max-width: 390px) {
  .jump {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 30;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    padding: 0.35rem;
    background: #0c131e;
    border: 1px solid #1e2c3f;
    border-radius: 12px;
  }

  .jump a {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    background: #121b29;
    color: #e7eefc;
    font-weight: 650;
    text-decoration: none;
  }

  .jump a:focus-visible {
    outline: 2px solid #5cefff;
    outline-offset: 2px;
  }

  #stage,
  #dock {
    scroll-margin-top: 4.2rem;
  }
}
