/* ══════════════════════════════════════════════════════════════════
   EXTRACT LAUNCH PANEL  (web service only — #extLaunchArea)
   Extraction lives on a separate, sleeping host. Instead of blocking the
   whole studio behind a wake screen, the wake lives HERE, in the Extract
   tab's body: Register & Refine / Database never touch it.
   Surface language matches the rest of the app — elevation + a subtle tone
   step, no hard outline (light = shadow, dark = a lighter top edge).
   ══════════════════════════════════════════════════════════════════ */
.ext-launch {
  flex:            1;
  display:         flex;
  align-items:     center;
  justify-content: center;
  padding:         var(--space-2xl);
  background:      var(--bg2);
  overflow:        auto;
}

.exl-card {
  width:         min(100%, 380px);
  padding:       32px 30px 24px;
  background:    var(--bg1);
  border-radius: 14px;
  box-shadow:    var(--sh-float), inset 0 1px 0 rgba(255, 255, 255, .05);
  text-align:    center;
  animation:     exlIn .22s ease-out;
}
body.light .exl-card { box-shadow: var(--sh-float); }
@keyframes exlIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Logomark — same CH₄ molecule + palette as the navbar (static/css/base.css),
   just larger. The slow warm glow is the only motion while idle. */
.exl-mark {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           44px;
  height:          44px;
  animation:       exlGlow 3.4s ease-in-out infinite;
}
.exl-mark svg { width: 44px; height: 44px; display: block; }
.exl-mark .mk-bond { stroke: #33436b; }
.exl-mark .mk-node { fill:   #5b93ff; }
.exl-mark .mk-core { fill:   #eaf0fe; }
body.light .exl-mark .mk-bond { stroke: #b9cef7; }
body.light .exl-mark .mk-node { fill:   #2e6bf6; }
body.light .exl-mark .mk-core { fill:   #0f1729; }
@keyframes exlGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(234, 0, 44, .28)); }
  50%      { filter: drop-shadow(0 0 12px rgba(244, 119, 37, .52)); }
}

.exl-title {
  margin-top:     14px;
  font-family:    var(--font-heading);
  font-size:      var(--fs-xl);
  font-weight:    600;
  letter-spacing: -0.015em;
  color:          var(--t0);
}
.exl-sub {
  margin:      var(--space-md) 0 22px;
  font-size:   var(--fs-caption);
  line-height: 1.55;
  color:       var(--t1);
}

/* ── State machine — one card, three faces ─────────────────────────
   idle → auth (password, once per session) → waking (poll + redirect). */
.exl-stage { display: none; }
.exl-card[data-state="idle"]   .exl-stage-idle   { display: block; }
.exl-card[data-state="auth"]   .exl-stage-auth   { display: block; }
.exl-card[data-state="waking"] .exl-stage-waking { display: block; }

.exl-btn {
  width:          100%;
  padding:        11px;
  background:     var(--acc);
  border:         0;
  border-radius:  22px;
  color:          var(--on-acc);
  font-family:    var(--font-sans);
  font-size:      var(--fs-sm);
  font-weight:    700;
  letter-spacing: 0.14em;
  cursor:         pointer;
  transition:     filter .12s, box-shadow .12s;
  box-shadow:     var(--sh-raised);
}
.exl-btn:hover     { filter: brightness(1.07); box-shadow: var(--sh-float); }
.exl-btn:disabled  { opacity: .55; cursor: default; filter: none; }

.exl-note {
  margin-top: var(--space-lg);
  font-size:  var(--fs-xs);
  color:      var(--t2);
}

#extLaunchPw {
  width:         100%;
  padding:       10px 12px;
  margin-bottom: var(--space-lg);
  background:    var(--bg2);
  border:        1px solid var(--bdr);
  border-radius: 9px;
  color:         var(--t0);
  font-family:   var(--font-sans);
  font-size:     var(--fs-sm);
  text-align:    center;
}
#extLaunchPw:focus { outline: none; border-color: var(--acc); }
.exl-err {
  min-height:    0;
  margin-top:    -6px;
  margin-bottom: var(--space-md);
  font-size:     var(--fs-xs);
  color:         var(--err);
}
.exl-err:empty { display: none; }

/* ── Waking ────────────────────────────────────────────────────────
   Stage text is cosmetic/time-driven; the real "Ready → redirect" comes
   from polling /extractor/launch/status. */
.exl-status {
  min-height:     18px;
  font-size:      var(--fs-caption);
  letter-spacing: .3px;
  color:          var(--t1);
  transition:     opacity .35s, color .35s;
}
.exl-status.is-ready { color: var(--acc2); }
.exl-dots::after { content: ''; animation: exlDots 1.4s steps(4, end) infinite; }
.exl-status.is-ready .exl-dots { display: none; }
@keyframes exlDots {
  0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; }
}
.exl-track {
  height:        2px;
  margin:        var(--space-lg) auto 0;
  width:         84%;
  background:    var(--bg3);
  border-radius: 99px;
  overflow:      hidden;
}
.exl-fill {
  height:        100%;
  width:         0;
  background:    var(--acc);
  border-radius: 99px;
  transition:    width .7s ease;
}
.exl-foot {
  display:         flex;
  gap:             var(--space-md);
  align-items:     baseline;
  justify-content: center;
  margin-top:      18px;
  min-height:      32px;
  font-size:       var(--fs-caption);
  line-height:     1.45;
  color:           var(--t1);
  text-align:      left;
  transition:      opacity .4s;
}
.exl-flbl {
  flex:           none;
  font-size:      var(--fs-3xs);
  font-weight:    700;
  letter-spacing: .8px;
  color:          var(--acc);
  transform:      translateY(-1px);
}

/* ── Left panel while Extract is remote ────────────────────────────
   The tracing deck stays VISIBLE (it is what the tab is for) but inert —
   nothing there can work until the extractor host is awake and we have
   handed off to it. */
.lp-remote-locked {
  opacity:        .45;
  pointer-events: none;
  user-select:    none;
  filter:         saturate(.55);
}
