/* Sprint 15 (D6): nothing on a public page renders below 12.5px.
   Anything smaller is uncomfortable on a 1920 display, which is the width
   the Owner actually uses. Enforced here at source AND asserted per page by
   e2e/ui-standards.spec.js -- do not reintroduce a 0.6-0.72rem badge or tag. */
/* The requirement input is the primary action of the whole page --
   give it a command-bar treatment instead of looking like just another
   panel in a generic stack. */
#requirement-panel {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(91,147,255,0.08);
}
#requirement-panel h2 { color: var(--text); font-size: 0.95rem; text-transform: none; letter-spacing: normal; }
#requirement-panel h2::before { display: none; }
#requirement-input { font-size: 1rem; }

.verified-run-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(62,207,142,0.35);
  border-radius: 8px;
  background: rgba(62,207,142,0.06);
}
.verified-run-link:hover { background: rgba(62,207,142,0.14); }

#examples-box { margin-top: 1rem; }
#examples-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.example-btn { margin: 0; font-size: 0.8rem; padding: 0.45rem 0.8rem; text-align: left; }
#alt-list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; }
#alt-list .example-btn { width: 100%; }

/* One-click demo buttons: visually distinct from a plain "fill the
   field" button, since a click here runs the real pipeline immediately
   with no second step — worth signaling that at a glance. The "▶" marker
   is CSS-only (::before) rather than part of the button's textContent,
   so the visible label still matches the backend catalogue string
   exactly (see workbench.js's renderExampleButtons and the e2e test
   that checks this). */
.one-click-btn {
  border-color: var(--accent);
  background: rgba(91,147,255,0.08);
  font-weight: 600;
}
.one-click-btn::before { content: "▶ "; }
.one-click-btn:hover { background: rgba(91,147,255,0.18); }

.run-status-grid { margin-bottom: 1rem; }

.transport-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.transport-badge.live-sse { background: rgba(62,207,142,0.12); color: var(--green); }
.transport-badge.live-polling { background: rgba(230,180,80,0.12); color: var(--amber); }
.transport-badge.lost { background: rgba(239,90,90,0.12); color: var(--red); }
.transport-badge.unknown { background: rgba(139,147,167,0.1); color: var(--muted); }

.milestone-hint { margin-bottom: 0.5rem; }

/* ---- Milestone bar: the delivery-lifecycle executive summary -------- */
.milestone-bar {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  padding: 0.6rem 0.1rem 0.9rem;
  -webkit-overflow-scrolling: touch;
}
.milestone-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  width: 4.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0.1rem;
  font-family: inherit;
}
.milestone-node:hover .milestone-label { color: var(--accent); }
.milestone-node:focus-visible { outline: 2px solid var(--accent); border-radius: 8px; }
.milestone-circle {
  width: 1.9rem;
  height: 1.9rem;
  min-width: 1.9rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  border: 2px solid var(--border);
  color: var(--muted);
  background: #0d0f14;
  transition: all 0.15s ease;
}
.milestone-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--muted);
  text-align: center;
  line-height: 1.15;
  transition: color 0.15s ease;
}
.milestone-connector {
  height: 2px;
  flex: 1 1 0.7rem;
  min-width: 0.4rem;
  background: var(--border);
  margin-top: 1.1rem;
  transition: background 0.2s ease;
}
.milestone-connector.filled { background: var(--green); }

/* PENDING — small, muted, not yet started */
.milestone-node.pending .milestone-circle { border-color: var(--border); color: var(--muted); }

/* RUNNING — visually larger, breathing/pulsing, subtle halo, emphasized label */
.milestone-node.running .milestone-circle {
  width: 2.5rem; height: 2.5rem; min-width: 2.5rem;
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 6px rgba(91,147,255,0.14);
  animation: milestone-breathe 1.6s ease-in-out infinite;
}
.milestone-node.running .milestone-label { color: var(--accent); font-weight: 800; }
@keyframes milestone-breathe {
  0%, 100% { box-shadow: 0 0 0 6px rgba(91,147,255,0.14); transform: scale(1); }
  50% { box-shadow: 0 0 0 10px rgba(91,147,255,0.05); transform: scale(1.06); }
}

/* PASSED — solid, checkmark */
.milestone-node.passed .milestone-circle { border-color: var(--green); color: var(--green); background: rgba(62,207,142,0.08); }

/* FAILED — red/error */
.milestone-node.failed .milestone-circle { border-color: var(--red); color: var(--red); background: rgba(239,90,90,0.08); }
.milestone-node.failed .milestone-label { color: var(--red); }

/* BLOCKED — amber, genuine unresolved uncertainty */
.milestone-node.blocked .milestone-circle { border-color: var(--amber); color: var(--amber); background: rgba(230,180,80,0.08); }
.milestone-node.blocked .milestone-label { color: var(--amber); }

/* SKIPPED / NOT_APPLICABLE — neutral, explicit, never blank */
.milestone-node.skipped .milestone-circle,
.milestone-node.na .milestone-circle { border-color: var(--border); color: var(--muted); opacity: 0.6; }
.milestone-node.skipped .milestone-label,
.milestone-node.na .milestone-label { opacity: 0.6; }

.milestone-detail {
  margin-top: 0.4rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.015);
  font-size: 0.85rem;
}
.milestone-detail-head { margin-bottom: 0.3rem; }
.milestone-state-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  margin-left: 0.3rem;
}
.milestone-state-tag.pending { background: rgba(139,147,167,0.12); color: var(--muted); }
.milestone-state-tag.running { background: rgba(91,147,255,0.14); color: var(--accent); }
.milestone-state-tag.passed { background: rgba(62,207,142,0.12); color: var(--green); }
.milestone-state-tag.failed { background: rgba(239,90,90,0.12); color: var(--red); }
.milestone-state-tag.blocked { background: rgba(230,180,80,0.12); color: var(--amber); }
.milestone-state-tag.skipped, .milestone-state-tag.na { background: rgba(139,147,167,0.1); color: var(--muted); }
.milestone-detail-body { color: var(--muted); line-height: 1.4; }

.owner-auth-notice {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 0.9rem;
}

.production-verified-box {
  margin-top: 0.75rem;
  padding: 1rem 1.1rem;
  background: #0d0f14;
  border: 1px solid var(--green);
  border-radius: 8px;
}
.open-production-btn {
  display: inline-block;
  background: var(--green);
  color: #05130d;
  font-weight: 700;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  margin-bottom: 0.85rem;
}
.open-production-btn:hover { filter: brightness(1.08); }
.terminal-cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 0.85rem; }
.terminal-cta-row .open-production-btn { margin-bottom: 0; }
.secondary-cta-btn {
  display: inline-block;
  align-self: center;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
}
.secondary-cta-btn:hover { background: var(--accent-soft); }
.production-verified-box.neutral-box { border-color: var(--muted); }
.production-verified-box.failed-box { border-color: var(--red); }
.production-verified-box.neutral-box .open-production-btn,
.production-verified-box.failed-box .open-production-btn { background: var(--accent); color: #fff; }

#target-app-panel { border-color: var(--accent); }
.open-app-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.5rem 1rem;
}
.open-app-link:hover { background: var(--accent-soft); }

.estimate-box, .usage-box {
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.015);
}
.estimate-label {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.estimate-basis { margin: 0.5rem 0 0; font-size: 12.5px; }
