/* ============================================================================
   SEQUENCER — design system
   A execution terminal, not a hacker toy. Absolute black, acid lime for the
   armed/fire state, everything else earns its colour.
   ========================================================================= */

:root {
  /* ── Trading desk palette ────────────────────────────────────────────────
     Cooler and slightly lighter than the acid-on-black it replaces, so dense
     numeric readouts stay legible for a long session instead of vibrating.
     Only the token values changed; every rule below still reads the same
     names, so the structure is untouched. */

  /* Surfaces — four steps, no more. Depth comes from hairlines, not shadows. */
  --void:        #0E1116;
  --panel:       #161B22;
  --raised:      #1F262E;
  --raised-hi:   #2A323C;

  --line:        #2A323C;
  --line-soft:   #1C232B;

  /* Brand. Blue is reserved for ARMED / FIRE. Never decorative.
     Blue rather than green is deliberate: it keeps the brand colour clear of
     the status colours, so "success green" can never be mistaken for "this is
     just our accent". */
  --acid:        #4EA8FF;
  --acid-dim:    #3B82C4;
  --acid-wash:   rgba(78, 168, 255, 0.12);

  /* Status. */
  --ok:          #2FD4A0;
  --ok-wash:     rgba(47, 212, 160, 0.12);
  --warn:        #F5B544;
  --warn-wash:   rgba(245, 181, 68, 0.12);
  --danger:      #F0523F;
  --danger-wash: rgba(240, 82, 63, 0.12);
  --info:        #8B9DF7;
  --info-wash:   rgba(139, 157, 247, 0.12);

  --text:        #E8EDF5;
  --text-2:      #93A0B0;
  --text-3:      #7D8794;
  /* Field labels: clearly brighter than hints (text-3) so the eye reads
     label -> value -> hint as three steps, not one grey blur. */
  --text-label:  #C3CCD8;

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

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;

  --field-h: 40px;
  --dur: 140ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* Every number in this app is compared against another number. Tabular or bust. */
.mono, input, textarea, select, .num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ============================================================================
   ANIME SPEED LINES
   The product is about being first. Speed lines are the visual idiom for that.
   Pure CSS transforms only — compositor thread, zero main-thread cost, so it
   cannot steal frames from a broadcast. Killed entirely when firing.
   ========================================================================= */
#fx {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
  opacity: 0.5;
  transition: opacity 400ms var(--ease);
}
#fx .beam {
  position: absolute;
  top: -30%; height: 160%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--acid), transparent);
  transform: rotate(14deg) translateY(-100%);
  animation: streak linear infinite;
  will-change: transform, opacity;
}
@keyframes streak {
  0%   { transform: rotate(14deg) translateY(-110%); opacity: 0; }
  12%  { opacity: 0.55; }
  88%  { opacity: 0.55; }
  100% { transform: rotate(14deg) translateY(110%); opacity: 0; }
}
/* A slow horizon glow so the black never reads as dead space */
#fx::after {
  content: '';
  position: absolute; left: 50%; top: -40vh;
  width: 130vw; height: 90vh; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(78,168,255,0.06), transparent 62%);
}
body.fx-off #fx { opacity: 0; }
body.is-firing #fx { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  #fx { opacity: 0 !important; }
  #fx .beam { animation: none; }
}

/* ============================================================================
   Chrome
   ========================================================================= */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 14px;
  background: rgba(10, 11, 13, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; letter-spacing: -0.01em; font-size: 15px;
}
.brand-mark {
  width: 9px; height: 9px; border-radius: 2px;
  background: var(--acid);
  box-shadow: 0 0 10px var(--acid-wash);
}
.topbar-spacer { flex: 1; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: transparent; color: var(--text-2);
  cursor: pointer; transition: all var(--dur) var(--ease);
  font-size: 15px; flex-shrink: 0;
}
.icon-btn:hover { color: var(--text); border-color: var(--raised-hi); background: var(--panel); }
.icon-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Back button — appears only when there's history to go back to */
#back-btn.hidden { display: none !important; }

.stat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--mono); font-size: 11px; color: var(--text-2);
  white-space: nowrap;
}
.stat-pill b { color: var(--text); font-weight: 500; }

/* ============================================================================
   Mission bar — armed state is always visible, on every tab
   ========================================================================= */
.mission {
  position: sticky; top: 56px; z-index: 35;
  display: none; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.mission.on { display: flex; }
.mission-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--acid);
}
.mission-count {
  font-family: var(--mono); font-size: 20px; font-weight: 500;
  letter-spacing: -0.02em; color: var(--text);
}
.mission-name {
  font-size: 12px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--acid);
  animation: pulse 1.6s ease-in-out infinite; flex-shrink: 0;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ============================================================================
   Layout
   ========================================================================= */
.wrap {
  position: relative; z-index: 1;
  max-width: 1140px; margin: 0 auto;
  padding: 18px 14px 48px;
}
.section { display: none; }
.section.active { display: block; animation: fade 220ms var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.section-head { margin-bottom: 16px; }
.section-title {
  font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin: 0;
}
.section-sub { font-size: 13px; color: var(--text-3); margin-top: 3px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 16px;
}
.card + .card { margin-top: 12px; }
.card-title {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 12px; font-family: var(--mono);
}

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }

/* ============================================================================
   FORMS — the alignment fix.
   Every field is the same height, labels sit on a single baseline, and inputs
   share one grid so nothing drifts. This was the main complaint.
   ========================================================================= */
/* Every field on its own row. Side-by-side pairs made the form scan as a
   grid of unrelated boxes; a single column reads top-to-bottom like the
   sequence you actually fill it in. */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.col-2 { grid-column: 1 / -1; }

.field label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-label);
  display: flex; align-items: center; gap: 6px; min-height: 14px;
}
.field label .req { color: var(--acid); }

input[type="text"], input[type="password"], input[type="number"],
input[type="datetime-local"], input[type="url"], select, textarea {
  width: 100%;
  height: var(--field-h);
  padding: 0 11px;
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 13px;
  font-family: var(--mono);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  appearance: none;
}
textarea { height: auto; min-height: 96px; padding: 10px 11px; line-height: 1.6; resize: vertical; }
select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%239AA3B0' stroke-width='1.6'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
  padding-right: 30px; cursor: pointer;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--acid-dim);
  box-shadow: 0 0 0 3px var(--acid-wash);
}
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: 0.7; }
input:disabled, select:disabled, textarea:disabled { opacity: 0.45; cursor: not-allowed; }

.field-hint { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.field-hint:empty { display: none; }
.field-hint code { font-size: 11px; color: var(--text-2); }
.field-hint b { color: var(--text-2); font-weight: 600; }
.field-hint.warn { color: var(--warn); }
.field-hint.ok { color: var(--ok); }

/* ============================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: var(--field-h); padding: 0 15px;
  border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--raised); color: var(--text);
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all var(--dur) var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--raised-hi); border-color: var(--raised-hi); }
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--acid); border-color: var(--acid); color: #05080C; font-weight: 600;
}
.btn-primary:hover { background: #6BB8FF; border-color: #6BB8FF; }

.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--panel); }

.btn-danger { background: transparent; border-color: rgba(255,92,56,0.4); color: var(--danger); }
.btn-danger:hover { background: var(--danger-wash); border-color: var(--danger); }

.btn-sm { height: 32px; padding: 0 11px; font-size: 12px; }
.btn-block { width: 100%; }

.btn-fire {
  height: 52px; font-size: 15px; font-weight: 600;
  background: var(--acid); border-color: var(--acid); color: #05080C;
  letter-spacing: 0.01em;
}
.btn-fire:hover { background: #6BB8FF; }

/* ============================================================================
   Vertical sidebar navigation
   Replaces the horizontal bottom tab bar. Same palette, same tokens - only
   the axis changes. A vertical rail scales to more sections without the
   horizontal scrolling the tab bar needed, and keeps every destination
   visible at once.
   ========================================================================= */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
  width: 216px;
  display: flex; flex-direction: column;
  background: var(--void);
  border-right: 1px solid var(--line-soft);
  overflow-y: auto;
  transition: transform 220ms var(--ease);
}
.sidebar-head {
  display: flex; align-items: center; gap: 9px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.sidebar-brand { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.sidebar-ver { font-size: 10px; color: var(--text-3); font-family: var(--mono); }

.sidebar-group { padding: 10px 10px 4px; }
.sidebar-label {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3); font-family: var(--mono);
  padding: 8px 8px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px; margin-bottom: 2px;
  background: none; border: none; border-radius: var(--r-sm);
  color: var(--text-2); font-family: var(--sans); font-size: 13px; font-weight: 500;
  cursor: pointer; text-align: left;
  border-left: 2px solid transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-item svg { width: 17px; height: 17px; stroke-width: 1.7; flex-shrink: 0; }
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active {
  background: var(--panel); color: var(--acid);
  border-left-color: var(--acid);
}
.sidebar-foot {
  margin-top: auto; padding: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px; color: var(--text-3);
}

.sidebar-backdrop {
  position: fixed; inset: 0; z-index: 49;
  background: rgba(5,6,7,0.6); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease);
}

/* Mobile: the rail slides in over the content instead of squeezing it */
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,0.5); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
}
@media (min-width: 861px) {
  #nav-toggle { display: none; }
  .topbar { padding-left: 232px; }
  .wrap { padding-left: 232px; }
  .mission { padding-left: 232px; }
}

/* ============================================================================
   Data display
   ========================================================================= */
.metric { background: var(--raised); border-radius: var(--r); padding: 12px; }
.metric-label { font-size: 11px; color: var(--text-3); margin-bottom: 5px; }
.metric-value { font-family: var(--mono); font-size: 21px; font-weight: 500; letter-spacing: -0.02em; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 21px; padding: 0 8px; border-radius: 5px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.05em;
  text-transform: uppercase; white-space: nowrap;
}
.badge-ok     { background: var(--ok-wash);     color: var(--ok); }
.badge-warn   { background: var(--warn-wash);   color: var(--warn); }
.badge-danger { background: var(--danger-wash); color: var(--danger); }
.badge-info   { background: var(--info-wash);   color: var(--info); }
.badge-acid   { background: var(--acid-wash);   color: var(--acid); }
.badge-idle   { background: var(--raised);      color: var(--text-3); }

.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); }
.dot-danger { background: var(--danger); } .dot-idle { background: var(--text-3); }

.row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--line-soft);
}
.row:last-child { border-bottom: none; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 13px; font-weight: 500; }
.row-sub {
  font-size: 11px; color: var(--text-3); font-family: var(--mono);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 12px; }
.kv-k { color: var(--text-3); }
.kv-v { font-family: var(--mono); color: var(--text); text-align: right; }

/* Project card — the acid left edge means "this one is armed" */
.pcard {
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 14px; margin-bottom: 10px;
  cursor: pointer; transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.pcard:hover { border-color: var(--raised-hi); transform: translateY(-1px); }
.pcard.armed { border-color: rgba(78,168,255,0.35); background: linear-gradient(90deg, var(--acid-wash), transparent 40%), var(--panel); }
.pcard-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.pcard-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.pcard-meta { font-size: 11px; color: var(--text-3); font-family: var(--mono); margin-top: 2px; }

.empty { text-align: center; padding: 44px 16px; color: var(--text-3); }
.empty-icon { font-size: 26px; opacity: 0.35; margin-bottom: 8px; }

/* ============================================================================
   Modal
   ========================================================================= */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(5,6,7,0.82); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 180ms var(--ease);
}
.overlay.on { opacity: 1; pointer-events: auto; }
.sheet {
  width: 100%; max-width: 720px; max-height: 92vh; overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line); border-bottom: none;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  transform: translateY(20px); transition: transform 220ms var(--ease);
}
.overlay.on .sheet { transform: none; }
.sheet-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 15px 16px; background: var(--panel);
  border-bottom: 1px solid var(--line-soft);
}
.sheet-title { font-size: 16px; font-weight: 600; flex: 1; }
.sheet-body { padding: 16px; }
.sheet-foot {
  position: sticky; bottom: 0;
  display: flex; gap: 10px; padding: 14px 16px;
  background: var(--panel); border-top: 1px solid var(--line-soft);
}

/* ============================================================================
   Terminal
   ========================================================================= */
.term {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  height: 62vh; background: #060708;
  border-top: 1px solid var(--line);
  transform: translateY(100%); transition: transform 260ms var(--ease);
  display: flex; flex-direction: column;
}
.term.on { transform: none; }
.term-head {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 14px; border-bottom: 1px solid var(--line-soft);
}
.term-body {
  flex: 1; overflow-y: auto; padding: 11px 14px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.65; color: var(--text-2);
}
.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line.ok { color: var(--ok); } .term-line.err { color: var(--danger); }
.term-line.warn { color: var(--warn); } .term-line.acid { color: var(--acid); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 80;
  transform: translate(-50%, 14px);
  padding: 11px 17px; border-radius: var(--r);
  background: var(--raised-hi); border: 1px solid var(--line);
  font-size: 13px; opacity: 0; pointer-events: none;
  transition: all 220ms var(--ease); max-width: 90vw; text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Login */
.login {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px;
  position: relative; z-index: 1; overflow: hidden;
}

/* A thin signal line that drifts slowly left to right - a metaphor for
   network/latency, not just decoration. The only motion on this page. */
.login-signal {
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--acid-dim), transparent);
  opacity: 0.5;
  animation: login-signal-sweep 5s var(--ease) infinite;
}
@keyframes login-signal-sweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .login-signal { animation: none; opacity: 0.15; }
}

/* The real V logo, real transparent PNG version (not a blend-mode trick) -
   alpha was extracted from the original file's own brightness, so it works
   correctly on any background (not just black). */
.login-watermark {
  position: absolute; top: 50%; left: 50%;
  width: 480px; max-width: 130vw;
  transform: translate(-50%, -50%);
  opacity: 0.14;
  pointer-events: none; user-select: none;
}

.login-box { width: 100%; max-width: 340px; text-align: center; }

.login-mark {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  color: var(--text-3); margin-bottom: 22px;
}

/* The precise millisecond clock - this page's main moment. This tool is
   about precise timing, so time itself becomes the login page's visual
   identity - not a brand label. */
.login-clock {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 42px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--text); margin-bottom: 28px;
}
.login-clock .ms { color: var(--text-3); font-size: 24px; }

.login-title { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px; }
.login-sub { font-size: 13px; color: var(--text-3); margin-bottom: 26px; }
.login-err { color: var(--danger); font-size: 12px; margin-top: 10px; min-height: 16px; }

/* Bottom status bar - the same gas/latency data the topbar shows after
   login, just quieter. A 2-column grid layout so items always line up
   neatly instead of breaking at odd spots depending on each one's text length. */
.login-status-bar {
  position: absolute; bottom: 20px; left: 0; right: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px; max-width: 340px; margin: 0 auto;
  padding: 0 24px;
  font-family: var(--mono); font-size: 10.5px; color: var(--text-3);
}
.login-status-bar .chain-stat {
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.login-status-bar .chain-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.login-status-bar .chain-dot.ok { background: var(--ok); }
.login-status-bar .chain-dot.problem { background: var(--danger); }

.fab {
  position: fixed; right: 16px; bottom: 22px; z-index: 44;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--acid); border: none; color: #05080C;
  font-size: 24px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 22px rgba(78,168,255,0.22);
  transition: transform var(--dur) var(--ease);
}
.fab:hover { transform: scale(1.06); }

@media (min-width: 760px) {
  .overlay { align-items: center; }
  .sheet { border-radius: var(--r-lg); border-bottom: 1px solid var(--line); }
}

/* ============================================================================
   Drop cards — image, name, chain, supply and the full stage schedule.
   The schedule is the point: arming for the wrong stage has cost more mints
   than any latency problem, so every stage and its time is always visible.
   ========================================================================= */
.drop-card {
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); overflow: hidden; margin-bottom: 12px;
}
.drop-top { display: flex; gap: 12px; padding: 14px; }
.drop-img {
  width: 62px; height: 62px; border-radius: var(--r); flex-shrink: 0;
  background: var(--raised); object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-family: var(--mono); font-size: 18px;
}
.drop-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.drop-meta { font-size: 11px; color: var(--text-3); font-family: var(--mono); margin-top: 3px; }
.drop-supply { margin-top: 8px; }
.drop-bar { height: 4px; background: var(--raised); border-radius: 2px; overflow: hidden; margin-top: 5px; }
.drop-bar span { display: block; height: 100%; background: var(--acid); }

.stage {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; border-top: 1px solid var(--line-soft);
}
.stage-dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0;
  background: var(--text-3);
}
.stage.live .stage-dot { background: var(--acid); box-shadow: 0 0 8px var(--acid-wash); }
.stage.done .stage-dot { background: var(--ok); }
.stage-body { flex: 1; min-width: 0; }
.stage-name { font-size: 13px; font-weight: 500; }
.stage-time { font-size: 11px; color: var(--text-3); font-family: var(--mono); margin-top: 2px; }
.drop-actions { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line-soft); }

/* ============================================================================
   Project editor as a normal page.
   It used to be an overlay sheet with its own scrollbar, so a long form meant
   scrolling inside a floating panel while the page behind it also scrolled.
   As a section it uses the page's own scroll - one scrollbar, one context.
   ========================================================================= */
.edit-actions {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; gap: 10px; margin-top: 16px;
  padding: 12px 0;
  background: linear-gradient(to top, var(--void) 70%, transparent);
}
#section-project-edit .card { margin-bottom: 12px; }

/* ============================================================================
   Live wallet grid
   The one moment you actually stare at the screen is the fire. Until now that
   moment showed a scrolling wall of text, which is the hardest possible format
   for answering the only question you have: how many are through?
   ========================================================================= */
.wgrid-wrap { margin-top: 12px; }
.wgrid-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 10px; font-family: var(--mono); font-size: 12px;
}
.wgrid-count { font-size: 20px; font-weight: 500; color: var(--text); letter-spacing: -0.02em; }
.wgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(26px, 1fr));
  gap: 4px;
}
.wcell {
  aspect-ratio: 1; border-radius: 4px;
  background: var(--raised); border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 9px; color: var(--text-3);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.wcell.sent    { background: var(--acid-wash);   border-color: var(--acid);   color: var(--acid); }
.wcell.ok      { background: var(--ok-wash);     border-color: var(--ok);     color: var(--ok); }
.wcell.pending { background: var(--warn-wash);   border-color: var(--warn);   color: var(--warn); }
.wcell.failed  { background: var(--danger-wash); border-color: var(--danger); color: var(--danger); }

.wgrid-legend {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px;
  font-size: 11px; color: var(--text-3); font-family: var(--mono);
}
.wgrid-legend span { display: inline-flex; align-items: center; gap: 5px; }
.wgrid-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }


/* ============================================================================
   Project form, grouped.
   One card per step (Project / Contract / Price & gas / Timing & wallets /
   Advanced), each with a numbered header. Every hint lives inside its own
   .field, so it sits 6px under its input and hides with it. Three text tones
   only: label (bright), value (white), hint (dim). Blue stays for the
   required mark and links.
   ========================================================================= */
.form-section { padding: 0; overflow: hidden; }
#section-project-edit .form-section { margin-bottom: 14px; }
.fs-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(to bottom, rgba(255,255,255,0.015), transparent);
}
.fs-num {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  color: var(--acid); background: var(--acid-wash);
  border: 1px solid rgba(78,168,255,0.25);
}
.fs-title { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: -0.005em; }
.fs-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.fs-opt {
  font-size: 10px; font-weight: 500; letter-spacing: 0.04em; text-transform: none;
  color: var(--text-3); background: var(--raised); border: 1px solid var(--line-soft);
  padding: 1px 6px; border-radius: 999px; margin-left: 4px; vertical-align: 1px;
}
.fs-opt:empty { display: none; }
.fs-body { padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.fs-body > .form-grid { gap: 18px; }
.fs-body > .form-grid:not(:has(> .field:not(.hidden))) { display: none; }
.quickfill .fs-num { color: var(--warn); background: var(--warn-wash); border-color: rgba(245,181,68,0.25); }

.input-row { display: flex; gap: 9px; }
.input-row > input { flex: 1; min-width: 0; }
.input-row > .btn { height: var(--field-h); }

@media (min-width: 640px) {
  .form-grid.two { grid-template-columns: 1fr 1fr; }
  .form-grid.two:has(> .field.hidden) { grid-template-columns: 1fr; }
}

/* Advanced: collapsed <details> */
details.form-section > summary { list-style: none; cursor: pointer; user-select: none; }
details.form-section > summary::-webkit-details-marker { display: none; }
details.form-section:not([open]) > summary { border-bottom-color: transparent; }
details.form-section > summary:hover .fs-title { color: var(--acid); }
.fs-chevron {
  margin-left: auto; width: 10px; height: 10px;
  border-right: 1.6px solid var(--text-3); border-bottom: 1.6px solid var(--text-3);
  transform: rotate(45deg); transition: transform var(--dur) var(--ease); margin-right: 4px;
}
details[open] > summary .fs-chevron { transform: rotate(-135deg); }
.advanced .fs-num { color: var(--text-3); background: var(--raised); border-color: var(--line); }

/* "More" inside a hint */
.hint-more { display: inline; }
.hint-more > summary { display: inline; cursor: pointer; color: var(--acid); list-style: none; }
.hint-more > summary::-webkit-details-marker { display: none; }
.hint-more[open] > summary { display: none; }

/* RPC status as a chip on the Network label, not a fake input */
.net-chip {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0; text-transform: none; color: var(--text-2);
  background: var(--raised); border: 1px solid var(--line-soft);
  padding: 2px 8px; border-radius: 999px;
}
.usd-hint { color: var(--ok); font-family: var(--mono); font-size: 11px; }

/* room so the last hint never sits under the sticky Save bar */
#section-project-edit { padding-bottom: 24px; }
#pf-existing-wallets:empty { display: none; }

/* ============================================================================
   Live prices (OpenSea)
   ========================================================================= */
.price-pill { gap: 6px; }
.price-pill .tp-sym { color: var(--text-3); font-size: 10px; letter-spacing: 0.06em; }
.prices-strip { margin-bottom: 14px; }
.prices-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; margin-bottom: 10px;
}
.prices-note { font-size: 11px; color: var(--text-3); }
.prices-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .prices-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.price-card {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r);
  padding: 12px 12px 10px; min-width: 0;
}
.pc-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pc-chain { font-size: 12px; font-weight: 600; color: var(--text-label); }
.pc-sym {
  font-family: var(--mono); font-size: 10px; color: var(--text-3);
  background: var(--raised); padding: 1px 6px; border-radius: 999px;
}
.pc-price {
  font-family: var(--mono); font-size: 19px; font-weight: 500; letter-spacing: -0.02em;
  color: var(--text); margin-top: 6px; font-variant-numeric: tabular-nums;
}
.spark { width: 100%; height: 28px; display: block; margin: 6px 0 4px; }
.spark polyline { fill: none; stroke: var(--text-3); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark-flat { stroke: var(--line); stroke-width: 1.2; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.price-card.up .spark polyline { stroke: var(--ok); }
.price-card.down .spark polyline { stroke: var(--danger); }
.pc-meta { display: flex; justify-content: space-between; gap: 6px; font-size: 10.5px; color: var(--text-3); font-family: var(--mono); }
.price-card.up .pc-ch { color: var(--ok); }
.price-card.down .pc-ch { color: var(--danger); }
.price-card.off .pc-price { color: var(--text-3); }
.price-card.stale { opacity: 0.7; }

/* Narrow phones: the topbar used to overflow the screen (518px wide at a
   420px viewport, before the price pill made it worse). Keep what matters
   during a mint - menu, back, chain, gas, price, console - and drop the rest. */
@media (max-width: 520px) {
  .topbar { gap: 6px; padding: 0 10px; }
  .topbar .brand, #fx-toggle, .stat-pill:has(#topbar-latency), .price-pill .tp-sym { display: none; }
  .topbar .stat-pill { padding: 0 7px; }
}

/* Auto-monitor: who added each drop, and whether anything is checked */
.watch-summary { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.watch-summary b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.watch-banner {
  font-size: 12px; line-height: 1.5; color: var(--warn); background: var(--warn-wash);
  border: 1px solid rgba(245,181,68,0.25); border-radius: var(--r-sm); padding: 9px 11px; margin-bottom: 10px;
}
.src-tag {
  display: inline-block; margin-left: 8px; vertical-align: 1px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--text-3); background: var(--raised); border: 1px solid var(--line-soft);
  padding: 1px 6px; border-radius: 999px;
}
.src-tag.auto { color: var(--info); background: var(--info-wash); border-color: rgba(139,157,247,0.25); }
