:root {
  --bg: #06090d;
  --bg-elev: #0b1118;
  --bg-elev-2: #0f1721;
  --bg-locked: #080c11;
  --surface: #0c131c;
  --ink: #e6edf3;
  --ink-dim: #8b9aab;
  --ink-mute: #4a5867;
  --ink-faint: #2b3540;

  --hair: rgba(170, 200, 220, 0.08);
  --hair-strong: rgba(170, 200, 220, 0.16);
  --hair-cool: rgba(95, 213, 255, 0.18);
  --hair-cool-strong: rgba(95, 213, 255, 0.36);

  --cool: #5fd5ff;
  --cool-dim: #3a8ea8;
  --active: #ffb627;
  --active-hot: #ff7b1f;
  --classified: #ff3b3b;
  --classified-bg: #2a0a0a;
  --verified: #4cd962;
  --verified-bg: rgba(76, 217, 98, 0.08);

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  --radius: 2px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: contain;
}

body {
  position: relative;
  overflow-x: hidden;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ── ambient layers ── */
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 1000;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0px,
    rgba(255, 255, 255, 0) 2px,
    rgba(0, 0, 0, 0.22) 3px,
    rgba(0, 0, 0, 0.22) 3px
  );
  opacity: 0.5;
  mix-blend-mode: multiply;
}
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.9'/></svg>");
}

/* ── boot ── */
.boot-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  transition: opacity 360ms ease, visibility 0s linear 600ms;
}
.boot-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.boot-frame { width: 100%; max-width: 540px; }
.boot-brand {
  display: flex; gap: 12px; align-items: center;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--hair-cool);
}
.boot-seal {
  width: 44px; height: 44px;
  border: 1.5px solid var(--cool);
  display: flex; align-items: center; justify-content: center;
  color: var(--cool);
  font-size: 22px;
  text-shadow: 0 0 10px rgba(95, 213, 255, 0.6);
}
.boot-id-line { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; color: var(--cool); }
.boot-id-sub { display: block; font-size: 10px; color: var(--ink-mute); letter-spacing: 0.12em; margin-top: 2px; }
.boot-log {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink-dim);
  white-space: pre-wrap;
}
.boot-log .ok { color: var(--cool); }
.boot-log .warn { color: var(--active); }
.boot-log .crit { color: var(--classified); font-weight: 700; }

/* ── agent picker ── */
.agent-picker {
  position: fixed; inset: 0; z-index: 2100;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.agent-picker-frame {
  width: 100%; max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--hair-cool);
  padding: 20px;
  position: relative;
}
.agent-picker-frame::before,
.agent-picker-frame::after {
  content: "";
  position: absolute;
  width: 24px; height: 24px;
}
.agent-picker-frame::before {
  top: -1px; left: -1px;
  border-top: 2px solid var(--cool);
  border-left: 2px solid var(--cool);
}
.agent-picker-frame::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid var(--cool);
  border-right: 2px solid var(--cool);
}
.agent-picker-classification {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--classified);
  border: 1px solid var(--classified);
  background: var(--classified-bg);
  padding: 3px 8px;
  margin-bottom: 16px;
}
.agent-picker-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.agent-picker-sub {
  margin: 0 0 18px;
  color: var(--ink-dim);
  font-size: 12px;
}
.agent-picker-list { display: grid; gap: 8px; }
.agent-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--hair-strong);
  text-align: left;
  color: var(--ink);
  font-family: var(--mono);
  align-items: center;
  transition: border-color 160ms ease, background 160ms ease;
}
.agent-card:hover, .agent-card:focus-visible {
  border-color: var(--cool);
  background: var(--bg-elev-2);
}
.agent-card-icon {
  width: 36px; height: 36px;
  border: 1px solid var(--hair-cool-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--cool);
  font-weight: 700;
}
.agent-card-name { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink); }
.agent-card-role { font-size: 10px; letter-spacing: 0.12em; color: var(--ink-mute); margin-top: 2px; }
.agent-card-arrow { color: var(--cool); font-size: 16px; }
.agent-picker-meta {
  margin-top: 16px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  border-top: 1px dashed var(--hair);
  padding-top: 12px;
}

/* ── classification bar ── */
.classification-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--classified-bg);
  color: var(--classified);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-align: center;
  padding: calc(4px + var(--safe-top)) 8px 4px;
  border-bottom: 1px solid var(--classified);
}

/* ── HUD ── */
.hud {
  position: sticky;
  top: calc(20px + var(--safe-top));
  z-index: 70;
  background: linear-gradient(to bottom, var(--bg) 0%, rgba(6, 9, 13, 0.92) 100%);
  border-bottom: 1px solid var(--hair-cool);
  backdrop-filter: blur(8px);
}
.hud-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 8px 12px;
  gap: 8px;
}
.hud-block { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hud-block-right { align-items: flex-end; }
.hud-label {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.hud-value {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-value-strong { color: var(--cool); font-weight: 700; }
.hud-value-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }

.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--verified);
  box-shadow: 0 0 6px var(--verified);
  animation: pulse 1.6s ease-in-out infinite;
}
.status-dot.degraded { background: var(--active); box-shadow: 0 0 6px var(--active); }
.status-dot.lost { background: var(--classified); box-shadow: 0 0 6px var(--classified); }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ── telemetry band ── */
.telemetry {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.1fr;
  border-top: 1px solid var(--hair);
  background: var(--bg-elev);
}
.telemetry-cell {
  display: flex; flex-direction: column;
  padding: 5px 8px;
  border-right: 1px solid var(--hair);
  min-width: 0;
}
.telemetry-cell:last-child { border-right: none; }
.telemetry-label {
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}
.telemetry-value {
  font-size: 11px;
  color: var(--ink);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.signal-bars {
  display: inline-flex; gap: 1.5px; align-items: flex-end;
  height: 9px; margin-top: 2px;
}
.signal-bars span {
  width: 3px; background: var(--ink-faint);
  transition: background 200ms ease;
}
.signal-bars span:nth-child(1) { height: 30%; }
.signal-bars span:nth-child(2) { height: 50%; }
.signal-bars span:nth-child(3) { height: 70%; }
.signal-bars span:nth-child(4) { height: 85%; }
.signal-bars span:nth-child(5) { height: 100%; }
.signal-bars.bars-1 span:nth-child(1),
.signal-bars.bars-2 span:nth-child(-n+2),
.signal-bars.bars-3 span:nth-child(-n+3),
.signal-bars.bars-4 span:nth-child(-n+4),
.signal-bars.bars-5 span { background: var(--cool); }

/* ── live feed ticker ── */
.feed-ticker {
  position: sticky;
  top: calc(20px + 65px + var(--safe-top));
  z-index: 65;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--hair-cool);
  padding: 6px 10px;
  min-height: 28px;
}
.feed-ticker-label {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--cool);
  background: rgba(95, 213, 255, 0.08);
  border: 1px solid var(--hair-cool-strong);
  padding: 2px 6px;
}
.feed-ticker-stream {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}
.feed-ticker-item {
  display: inline-block;
  animation: ticker-in 280ms ease both;
}
.feed-ticker-item.placeholder { color: var(--ink-mute); font-style: italic; }
.feed-ticker-item::before {
  content: "● ";
  color: var(--cool);
  margin-right: 4px;
  font-size: 9px;
}
@keyframes ticker-in {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.feed-ticker-expand {
  background: transparent;
  border: 1px solid var(--hair-cool-strong);
  color: var(--cool);
  width: 24px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  padding: 0;
}

/* ── main scroll ── */
.main {
  position: relative;
  z-index: 1;
  padding: 12px 12px calc(100px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

/* ── panel base ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--hair-strong);
  padding: 14px;
  position: relative;
}
.panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--hair);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
}
.panel-tag {
  background: var(--cool);
  color: var(--bg);
  font-weight: 700;
  padding: 2px 6px;
  letter-spacing: 0.14em;
}
.panel-meta { display: inline-flex; gap: 6px; align-items: center; }
.panel-meta span:first-child { color: var(--ink-mute); }
.panel-meta span:last-child { color: var(--ink-dim); }

/* ── op brief ── */
.panel-brief { position: relative; }
.op-title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1.1;
}
.op-preamble {
  margin: 0 0 14px;
  color: var(--ink-dim);
  font-size: 12px;
  border-left: 2px solid var(--hair-cool-strong);
  padding: 2px 10px;
}
.roster {
  display: grid;
  gap: 6px;
  padding: 8px 0;
  margin: 10px 0;
  border-top: 1px dashed var(--hair);
  border-bottom: 1px dashed var(--hair);
}
.roster-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
}
.roster-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-faint);
}
.roster-dot.online {
  background: var(--verified);
  box-shadow: 0 0 6px var(--verified);
  animation: pulse 1.6s ease-in-out infinite;
}
.roster-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.roster-role {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
}
.roster-status {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
}
.roster-status.online { color: var(--verified); }
.roster-row.is-self .roster-name::after {
  content: " ▸ YOU";
  color: var(--cool);
  font-weight: 500;
}

.op-progress { margin-top: 4px; }
.op-progress-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  margin-bottom: 6px;
}
.op-progress-track {
  height: 4px;
  background: var(--bg);
  border: 1px solid var(--hair);
  overflow: hidden;
  position: relative;
}
.op-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cool), var(--active));
  transition: width 700ms cubic-bezier(0.2, 0.8, 0.4, 1);
  position: relative;
}

/* ── terminal profile ── */
.panel-tag-cool {
  background: transparent;
  color: var(--cool);
  border: 1px solid var(--cool);
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--hair);
  background: var(--bg);
}
.profile-cell {
  display: flex; flex-direction: column;
  gap: 1px;
  padding: 6px 8px;
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  min-width: 0;
}
.profile-cell:nth-child(2n) { border-right: none; }
.profile-cell-wide {
  grid-column: 1 / -1;
  border-right: none;
}
.profile-label {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}
.profile-value {
  font-size: 11px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.profile-value.dim { color: var(--ink-mute); font-style: italic; }
.roster-device {
  display: block;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  margin-top: 1px;
}

/* ── active pointer ── */
.active-pointer {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 8px;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--hair-strong);
  border-left: 3px solid var(--active);
  padding: 8px 12px;
  font-size: 11px;
}
.active-pointer-label {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
}
.active-pointer-code {
  color: var(--active);
  font-weight: 700;
  letter-spacing: 0.1em;
}
.active-pointer-title {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── waypoints ── */
.waypoints { display: flex; flex-direction: column; gap: 12px; }

.waypoint {
  background: var(--surface);
  border: 1px solid var(--hair-strong);
  position: relative;
  overflow: hidden;
  transition: border-color 240ms ease, opacity 240ms ease;
}
.waypoint::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--ink-faint);
  transition: background 240ms ease;
}

/* ── waypoint states ── */
.waypoint[data-status="locked"] {
  background: var(--bg-locked);
  border-color: var(--hair);
}
.waypoint[data-status="locked"] .waypoint-body,
.waypoint[data-status="locked"] .waypoint-meta { display: none; }
.waypoint[data-status="locked"] .waypoint-title,
.waypoint[data-status="locked"] .waypoint-codename { color: var(--ink-mute); }
.waypoint[data-status="locked"] .waypoint-title { filter: blur(4px); user-select: none; }
.waypoint[data-status="locked"]::before { background: var(--ink-faint); }
.waypoint[data-status="locked"] .waypoint-num { color: var(--ink-mute); }

.waypoint[data-status="active"] {
  border-color: var(--hair-cool-strong);
}
.waypoint[data-status="active"]::before {
  background: var(--active);
  box-shadow: 0 0 8px var(--active);
}
.waypoint[data-status="active"] .waypoint-marker {
  border-color: var(--active);
  color: var(--active);
}
.waypoint[data-status="active"] .status-pill {
  border-color: var(--active);
  color: var(--active);
  background: rgba(255, 182, 39, 0.08);
}
.waypoint[data-status="active"] .status-pill::before {
  background: var(--active);
  animation: pulse 1.3s ease-in-out infinite;
}

.waypoint[data-status="verifying"] {
  border-color: var(--hair-cool-strong);
}
.waypoint[data-status="verifying"]::before {
  background: var(--cool);
  animation: pulse 1.5s ease-in-out infinite;
}
.waypoint[data-status="verifying"] .upload-zone { display: none; }
.waypoint[data-status="verifying"] .waypoint-marker {
  border-color: var(--cool);
  color: var(--cool);
}
.waypoint[data-status="verifying"] .status-pill {
  border-color: var(--cool);
  color: var(--cool);
  background: rgba(95, 213, 255, 0.08);
}
.waypoint[data-status="verifying"] .status-pill::before {
  background: var(--cool);
  animation: pulse 1.3s ease-in-out infinite;
}
.waypoint[data-status="verifying"] .wp-verification { display: block; }

.waypoint[data-status="cleared"] { opacity: 0.85; }
.waypoint[data-status="cleared"]::before { background: var(--verified); }
.waypoint[data-status="cleared"] .upload-zone { display: none; }
.waypoint[data-status="cleared"] .wp-post-actions { display: block; }
.waypoint[data-status="cleared"] .waypoint-marker {
  border-color: var(--verified);
  color: var(--verified);
}
.waypoint[data-status="cleared"] .waypoint-marker::after {
  content: "✓";
  font-size: 18px;
  font-weight: 700;
}
.waypoint[data-status="cleared"] .waypoint-marker .waypoint-num { display: none; }
.waypoint[data-status="cleared"] .status-pill {
  border-color: var(--verified);
  color: var(--verified);
  background: var(--verified-bg);
}
.waypoint[data-status="cleared"] .status-pill::before { background: var(--verified); }

/* ── waypoint header ── */
.waypoint-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  padding: 12px 12px 10px;
  align-items: flex-start;
}
.waypoint-id { display: flex; align-items: center; }
.waypoint-marker {
  width: 36px; height: 36px;
  border: 1px solid var(--hair-strong);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-dim);
}
.waypoint-num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}
.waypoint-head { min-width: 0; }
.waypoint-codename {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
}
.waypoint-title {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  letter-spacing: 0.14em;
  padding: 3px 6px;
  border: 1px solid var(--ink-faint);
  color: var(--ink-mute);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}
.status-pill::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--ink-faint);
}

/* ── waypoint meta strip ── */
.waypoint-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--hair);
}
.wp-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  letter-spacing: 0.12em;
  background: var(--bg);
  border: 1px solid var(--hair);
  padding: 2px 6px;
  color: var(--ink-dim);
}
.wp-meta-label { color: var(--ink-mute); }
.wp-meta-value { color: var(--ink); }
.wp-meta-value.sigil { color: var(--cool); }

/* ── waypoint body ── */
.waypoint-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wp-section { display: flex; flex-direction: column; gap: 4px; }
.wp-section-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  margin: 0;
  font-weight: 500;
}
.wp-section-label-warn { color: var(--active-hot); }
.wp-advisory {
  background: rgba(255, 123, 31, 0.06);
  border-left: 2px solid var(--active-hot);
  padding: 8px;
}
.wp-briefing, .wp-objective, .wp-evidence, .wp-warning {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.55;
}

/* ── evidence preview ── */
.wp-evidence-preview {
  background: #000;
  border: 1px solid var(--hair-cool-strong);
}
.evidence-frame {
  position: relative;
  background: #000;
}
.evidence-img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  cursor: zoom-in;
}
.evidence-overlay {
  position: absolute;
  top: 8px; right: 8px;
  display: flex; flex-direction: column; gap: 6px;
  align-items: flex-end;
}
.evidence-tag {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--hair-cool-strong);
  color: var(--cool);
  font-size: 9px;
  letter-spacing: 0.16em;
  padding: 2px 6px;
}
.evidence-stamp {
  border: 2px solid var(--verified);
  color: var(--verified);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  background: rgba(0, 0, 0, 0.7);
  transform: rotate(-6deg);
  text-shadow: 0 0 8px rgba(76, 217, 98, 0.5);
}
.waypoint[data-status="verifying"] .evidence-stamp {
  border-color: var(--cool);
  color: var(--cool);
  text-shadow: 0 0 8px rgba(95, 213, 255, 0.5);
  animation: pulse 1.5s ease-in-out infinite;
}
.evidence-strip {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-elev);
  font-size: 9px;
  letter-spacing: 0.1em;
  border-top: 1px solid var(--hair);
}
.evidence-strip-label { color: var(--ink-mute); }
.evidence-strip-by, .evidence-strip-at { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── verification panel ── */
.wp-verification {
  display: none;
  background: var(--bg-elev);
  border: 1px solid var(--hair-cool-strong);
  padding: 0;
  overflow: hidden;
}
.verification-countdown {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px;
  padding: 16px 12px 14px;
  background:
    linear-gradient(180deg, rgba(95, 213, 255, 0.08), transparent),
    var(--bg);
  border-bottom: 1px solid var(--hair-cool-strong);
  position: relative;
  overflow: hidden;
}
.verification-countdown::before,
.verification-countdown::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 20px;
  background-image: repeating-linear-gradient(
    45deg,
    var(--cool) 0 2px,
    transparent 2px 8px
  );
  opacity: 0.15;
}
.verification-countdown::before { left: 0; }
.verification-countdown::after { right: 0; }
.verification-countdown-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  z-index: 1;
}
.verification-countdown-value {
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cool);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(95, 213, 255, 0.5);
  line-height: 1;
  z-index: 1;
  animation: countdown-pulse 1.4s ease-in-out infinite;
}
@keyframes countdown-pulse {
  0%, 100% { text-shadow: 0 0 14px rgba(95, 213, 255, 0.5); }
  50% { text-shadow: 0 0 22px rgba(95, 213, 255, 0.85); }
}
.verification-countdown-sub {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  margin-top: 4px;
  z-index: 1;
}
.verification-header {
  display: flex; gap: 10px; align-items: center;
  padding: 12px 12px 8px;
}
.verification-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--hair-cool);
  border-top-color: var(--cool);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.verification-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cool);
}
.verification-sub {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}
.verification-progress {
  height: 3px;
  background: var(--bg);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  margin: 0 0 8px;
  overflow: hidden;
}
.verification-progress-fill {
  height: 100%;
  width: 0;
  background: var(--cool);
  box-shadow: 0 0 8px var(--cool);
  transition: width 600ms linear;
}
.verification-checks {
  list-style: none;
  padding: 0 12px 12px;
  margin: 0;
  display: flex; flex-direction: column;
  gap: 2px;
  font-size: 11px;
  font-family: var(--mono);
}
.verification-checks li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 2px 0;
  color: var(--ink-mute);
  opacity: 0.5;
  transition: opacity 200ms ease, color 200ms ease;
}
.verification-checks li.live { color: var(--ink); opacity: 1; }
.verification-checks li.done { color: var(--ink-dim); opacity: 0.9; }
.verification-checks li::before {
  content: "○";
  width: 12px;
  color: var(--ink-faint);
}
.verification-checks li.live::before { content: "▸"; color: var(--cool); }
.verification-checks li.done::before { content: "✓"; color: var(--verified); }
.verification-checks li .check-ts {
  font-size: 9px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

/* ── upload zone ── */
.upload-zone { display: flex; flex-direction: column; gap: 10px; }
.upload-target {
  display: block;
  border: 1.5px dashed var(--hair-cool-strong);
  background: var(--bg-elev);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.upload-target:hover, .upload-target:focus-within {
  border-color: var(--cool);
  background: var(--bg-elev-2);
}
.upload-target-inner { padding: 22px 14px; }
.upload-target-icon {
  font-size: 28px;
  color: var(--cool);
  line-height: 1;
  margin-bottom: 6px;
}
.upload-target-text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--cool);
}
.upload-target-sub {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  margin-top: 4px;
}

.upload-preview {
  background: #000;
  border: 1px solid var(--hair-cool-strong);
  padding: 10px;
  display: flex; flex-direction: column; gap: 10px;
}
.upload-thumb { max-height: 50vh; object-fit: contain; }
.upload-preview-actions { display: flex; gap: 8px; }

.btn {
  appearance: none;
  border: 1px solid var(--cool);
  background: var(--cool);
  color: var(--bg);
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 12px;
  padding: 12px 14px;
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 8px;
  transition: background 160ms ease, transform 100ms ease;
  touch-action: manipulation;
  min-height: 44px;
}
.btn:active { transform: translateY(1px); }
.btn-primary { flex: 1; }
.btn-primary:hover { background: var(--active); border-color: var(--active); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  border-color: var(--hair-strong);
  color: var(--ink-dim);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-dim); }
.btn-small { padding: 8px 10px; font-size: 11px; min-height: 36px; }

.btn-spinner {
  width: 12px; height: 12px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.upload-error {
  background: var(--classified-bg);
  border: 1px solid var(--classified);
  color: var(--classified);
  padding: 8px 10px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.wp-post-actions { display: none; padding-top: 6px; }
.waypoint[data-status="cleared"] .wp-post-actions { display: block; }

/* ── completion ── */
.completion {
  background: linear-gradient(180deg, var(--surface), var(--bg-elev-2));
  border: 1px solid var(--verified);
  padding: 18px;
  text-align: center;
}
.completion-flag {
  display: inline-block;
  border: 2px solid var(--verified);
  color: var(--verified);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 6px 14px;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.4);
  text-shadow: 0 0 10px rgba(76, 217, 98, 0.5);
}
.completion-message {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
}
.completion-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--hair);
  text-align: left;
}
.completion-meta > div { display: flex; flex-direction: column; gap: 2px; }
.completion-meta .hud-label { display: block; }

/* ── doc footer ── */
.doc-footer {
  padding: 10px 0 0;
  margin-top: 6px;
  border-top: 1px dashed var(--hair);
}
.doc-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}
.doc-footer-grid > div { display: flex; flex-direction: column; }
.doc-footer-label {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}
.doc-footer-stamp {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--hair);
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
}

/* ── event log sheet ── */
.event-log-sheet {
  position: fixed;
  bottom: calc(70px + var(--safe-bottom));
  left: 12px; right: 12px;
  max-width: 720px;
  margin: 0 auto;
  max-height: 60vh;
  background: var(--surface);
  border: 1px solid var(--hair-cool);
  z-index: 200;
  display: flex; flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);
  animation: sheet-in 240ms ease both;
}
@keyframes sheet-in { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.event-log-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hair-cool);
  background: var(--bg-elev);
}
.event-log-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--cool);
}
.event-log-close {
  background: transparent;
  border: 1px solid var(--hair-strong);
  color: var(--ink-dim);
  width: 28px; height: 28px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.event-log-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.event-log-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 8px;
  padding: 6px 14px;
  font-size: 11px;
  border-bottom: 1px dashed var(--hair);
  align-items: flex-start;
}
.event-log-ts {
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
}
.event-log-kind {
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 1px 5px;
  border: 1px solid var(--hair-strong);
  color: var(--ink-dim);
  align-self: flex-start;
}
.event-log-kind.submitted { color: var(--active); border-color: var(--active); }
.event-log-kind.verified { color: var(--verified); border-color: var(--verified); }
.event-log-kind.reopened { color: var(--classified); border-color: var(--classified); }
.event-log-kind.system { color: var(--cool); border-color: var(--cool); }
.event-log-msg { color: var(--ink); line-height: 1.45; }
.event-log-empty {
  padding: 20px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* ── lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(0, 0, 0, 0.95);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px;
  gap: 12px;
}
.lightbox img { max-width: 100%; max-height: 80vh; object-fit: contain; }
.lightbox-close {
  position: absolute;
  top: calc(12px + var(--safe-top));
  right: 12px;
  background: transparent;
  border: 1px solid var(--cool);
  color: var(--cool);
  width: 36px; height: 36px;
  font-size: 16px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-meta {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
}

/* ── toasts ── */
.toast-stack {
  position: fixed;
  z-index: 1600;
  bottom: calc(80px + var(--safe-bottom));
  left: 12px; right: 12px;
  max-width: 480px;
  margin: 0 auto;
  display: flex; flex-direction: column; gap: 6px;
  pointer-events: none;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--hair-cool-strong);
  border-left-width: 3px;
  padding: 10px 12px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink);
  pointer-events: auto;
  animation: toast-in 240ms ease both;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.7);
}
.toast.success { border-color: var(--verified); }
.toast.error { border-color: var(--classified); color: var(--classified); }
.toast.exit { animation: toast-out 220ms ease both; }
@keyframes toast-in { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toast-out { to { transform: translateY(20px); opacity: 0; } }

/* ── bottom action bar ── */
.action-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-elev-2);
  border-top: 1px solid var(--hair-cool);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 14px calc(10px + var(--safe-bottom));
  z-index: 90;
  align-items: center;
}
.action-bar-info { min-width: 0; }
.action-bar-label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
}
.action-bar-title {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.action-bar-btn {
  background: var(--active);
  color: var(--bg);
  border: none;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 11px;
  padding: 10px 16px;
  min-height: 40px;
}
.action-bar.is-complete {
  background: var(--verified-bg);
  border-color: var(--verified);
}
.action-bar.is-complete .action-bar-btn {
  background: var(--verified);
  color: var(--bg);
}
.action-bar.is-verifying .action-bar-btn { background: var(--cool); }

/* ── responsive ── */
@media (max-width: 480px) {
  .hud-row { padding: 7px 10px; }
  .telemetry { grid-template-columns: 1.3fr 0.9fr 0.9fr 0.9fr 1fr; }
  .telemetry-cell { padding: 4px 6px; }
  .op-title { font-size: 20px; }
  .main { padding: 10px 10px calc(90px + var(--safe-bottom)); gap: 10px; }
  .panel { padding: 12px; }
  .waypoint-header { padding: 10px 10px 8px; }
  .waypoint-body { padding: 10px; gap: 10px; }
  .completion-meta { grid-template-columns: 1fr; }
}

@media (min-width: 720px) {
  .hud-row { padding: 10px 16px; }
  .telemetry-cell { padding: 6px 12px; }
  .feed-ticker { padding: 8px 16px; }
  .op-title { font-size: 28px; }
  .waypoint-title { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
