/* ============================================================
   AEGIS — Phone layout (≤ 600px)
   Overrides console.css and modules.css for narrow screens.
   ============================================================ */
@media (max-width: 600px) {

  /* ── Shell structure ── */

  /* Hide classification banners — they take 36px of precious vertical space */
  .class-banner { display: none; }

  .console {
    grid-template-rows: var(--hdr-h) 1fr var(--ticker-h);
  }

  /* ── Header — compact single row ── */
  .hdr {
    flex-wrap: wrap;
    padding: 4px 10px;
    gap: 4px;
    min-height: 46px;
  }
  :root { --hdr-h: auto; }

  /* hide the role subtitle; keep metrics but compact them */
  .hdr__role    { display: none; }
  .hdr__id      { min-width: 0; gap: 8px; }
  .hdr__metrics {
    order: 3; width: 100%;
    justify-content: space-around; gap: 4px;
    padding: 4px 0 3px;
    border-top: 1px solid var(--edge);
  }
  .metric__v { font-size: 12px; }
  .metric__l { font-size: 7px; letter-spacing: 0.07em; }
  .hdr__crest   { width: 26px; height: 26px; flex-shrink: 0; }
  .hdr__name    { font-size: 13px; letter-spacing: 0.16em; }

  /* status: clock + NIVMENACE in a compact stack */
  .hdr__status  { min-width: 0; text-align: right; }
  .hdr__clock   { font-size: 14px; }
  .hdr__session { display: none; }

  /* ── Nav bar — taller touch targets, labels hidden ── */
  .nav {
    padding: 2px 4px;
    gap: 0;
  }
  .navitem {
    padding: 8px 6px;
    font-size: 0;        /* hide text label */
    min-width: 48px;
    gap: 0;
    justify-content: center;
  }
  .navitem__ico { width: 20px; height: 20px; opacity: 1; }
  .navitem__txt { display: none; }
  .navitem__badge {
    top: 0px; right: 2px;
    min-width: 14px; height: 14px; font-size: 8px;
  }

  /* ── Screen ── */
  .screen__view {
    padding: 8px;
    padding-bottom: 64px;  /* nav height */
  }

  /* ── Ticker — keep but shrink ── */
  .ticker { padding: 0 8px; }
  .ticker__item { font-size: 10px; }

  /* ── Toasts ── */
  .toasts { bottom: 58px; left: 6px; right: 6px; }

  /* ── Generic atoms ── */

  /* reduce excessive letter-spacing throughout */
  .eyebrow   { letter-spacing: 0.12em; }
  .panel__hd { letter-spacing: 0.1em; font-size: 10px; }
  .tag        { letter-spacing: 0.1em; font-size: 8px; }
  .btn        { font-size: 10px; letter-spacing: 0.08em; padding: 7px 10px; }

  /* bigger touch target for range inputs */
  input[type=range] { height: 8px; }
  input[type=range]::-webkit-slider-thumb { width: 24px; height: 24px; }
  input[type=range]::-moz-range-thumb     { width: 24px; height: 24px; }

  /* ── View header ── */
  .view-hd { margin-bottom: 8px; gap: 6px; }
  .view-hd__title { font-size: 14px; letter-spacing: 0.08em; }
  .view-hd__sub   { display: none; }   /* secondary descriptor, not needed on phone */
  .view-hd__right { gap: 6px; }

  /* ── Readout rows ── */
  .readout__k { font-size: 10px; }
  .readout__v { font-size: 11px; }

  /* ── Sliders ── */
  .slider-row { gap: 8px; }
  .slider-row label { width: 62px; font-size: 9px; letter-spacing: 0.08em; }

  /* ── INTERCEPT QUEUE ── */
  .iqcard {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 6px 8px;
  }
  .iqcard__sig  { font-size: 18px; }
  .iqcard__title { font-size: 12px; }
  .iqcard__meta  { display: none; }  /* origin/freq/callsign — too much on phone */
  .iqcard__act  {
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
  }
  .iqcard__timer { font-size: 10px; }

  /* ── CRYPTANALYSIS ── */
  .cipher-box {
    font-size: 13px;
    letter-spacing: 0.12em;
    padding: 10px;
    line-height: 1.7;
  }
  .wave-canvas { height: 80px; }

  /* ── GLOBAL WATCH ── */
  .watch-wrap { height: 45vh; min-height: 220px; }
  .watch-hud  { font-size: 9px; padding: 5px 7px; }
  /* hide the bottom-right HUD on phone — too small */
  .watch-hud.br { display: none; }
  .watch-legend { font-size: 8px; letter-spacing: 0; }
  .watch-legend span { margin-right: 6px; }

  /* ── ASSET COMMS ── */
  .comms-log { height: auto; max-height: 40vh; }
  .msg        { font-size: 11px; max-width: 90%; }
  .msg__hd    { font-size: 8px; }

  /* ── DIAGNOSTICS ── */
  .diag-row__info .d { display: none; }  /* description — only show the name */

  /* ── HUMINT ── */
  .humint-banner { flex-direction: column; gap: 4px; }
  .humint-banner__ref { text-align: left; }
  .humint-row { grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 6px; padding: 10px 4px; }
  .humint-row__val { grid-column: 1; font-size: 10px; }
  .humint-flag { grid-column: 2; grid-row: 1 / 3; font-size: 16px; }
  .humint-footer { flex-wrap: wrap; gap: 8px; }

  /* ── Source MGMT ── */
  .source-ind { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 0; }
  .source-ind__btns { gap: 6px; }

  /* ── XMIT overlay ── */
  .xmit__box  { width: 100%; max-width: 100%; margin: 8px; }
  .xmit__body { font-size: 11px; min-height: 120px; padding: 10px; }
  .xmit__line { white-space: normal; }   /* allow wrap on narrow screen */

  /* ── Lock screen ── */
  .lock__core    { width: 94vw; max-width: 340px; gap: 4px; }
  .lock__title   { font-size: 26px; letter-spacing: 0.26em; }
  .lock__sub     { font-size: 8px; letter-spacing: 0.2em; margin-bottom: 16px; }
  .lock__caret-label { font-size: 8px; }
  .lock__footer  { gap: 10px; font-size: 8px; padding: 5px; flex-wrap: wrap; }
  .lock__warn    { display: none; }  /* very long text, not needed on phone */
  .lock__boot    { font-size: 10px; }

}
