/* ==========================================================================
   App 1: Grok Bot in 15 Minutes — Cyan Telemetry Styles
   ========================================================================== */

.timer-widget {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.55rem 0.3rem 0.78rem;
  border-radius: 999px;
  background: rgba(9, 15, 34, 0.85);
  border: 1px solid var(--border);
}

.timer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-2);
}

.timer-dot.running {
  background: var(--emerald);
  box-shadow: 0 0 12px var(--emerald);
  animation: pulse 1.6s ease-in-out infinite;
}

.timer-display {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  font-weight: 700;
  min-width: 3.3rem;
}

.mission-hero {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 1.5rem;
  align-items: center;
}

.mission-hero h1 {
  margin: 0.45rem 0;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.14;
}

.mission-telemetry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.tele-card {
  padding: 0.9rem;
  border-radius: var(--radius-md);
  background: rgba(6, 11, 26, 0.78);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tele-card strong {
  font-size: 0.94rem;
}

/* Timeline Stepper */
.timeline-nav {
  position: relative;
  padding: 0.6rem 0.25rem;
}

.timeline-track {
  position: absolute;
  left: 2rem;
  right: 2rem;
  top: 1.8rem;
  height: 3px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  z-index: 0;
}

.timeline-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
  border-radius: 999px;
  transition: width 0.45s var(--ease-spring);
}

.timeline-steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.step-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(8, 13, 30, 0.88);
  color: var(--text-1);
  text-align: left;
  transition: transform 0.2s var(--ease-spring), border-color 0.2s, background 0.2s;
}

.step-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-1);
}

.step-btn.active {
  border-color: var(--accent-1);
  background: linear-gradient(150deg, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.16));
  color: var(--text-0);
  box-shadow: 0 10px 26px rgba(56, 189, 248, 0.16);
}

.step-btn.done {
  border-color: rgba(52, 211, 153, 0.55);
}

.step-meta {
  display: flex;
  width: 100%;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-2);
}

.step-title {
  font-size: 0.85rem;
  font-weight: 700;
}

/* Pipeline Simulator */
.pipeline-stage {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}

.pipe-node {
  position: relative;
  padding: 0.85rem 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(6, 11, 26, 0.82);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.28s, transform 0.28s var(--ease-spring), box-shadow 0.28s;
}

.pipe-node.active {
  border-color: var(--accent-1);
  transform: translateY(-4px);
  box-shadow: 0 0 26px rgba(56, 189, 248, 0.35);
  animation: flowPulse 1.1s ease-in-out infinite;
}

.pipe-node.passed {
  border-color: rgba(52, 211, 153, 0.65);
  background: rgba(16, 185, 129, 0.1);
}

.pipe-node .pipe-idx {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-1);
}

.pipe-node strong {
  font-size: 0.83rem;
}

.pipe-node small {
  font-size: 0.74rem;
  color: var(--text-2);
}

.sim-console {
  background: rgba(3, 6, 18, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.79rem;
  min-height: 120px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.log-line {
  display: flex;
  gap: 0.6rem;
}

.log-time {
  color: var(--accent-1);
  flex-shrink: 0;
}

/* Linter Checklist */
.lint-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.lint-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.78rem;
  border-radius: var(--radius-sm);
  background: rgba(6, 11, 26, 0.72);
  border: 1px solid var(--border);
  font-size: 0.83rem;
}

.lint-item.pass {
  border-color: rgba(52, 211, 153, 0.42);
}

.lint-item.fail {
  border-color: rgba(251, 113, 133, 0.42);
}

/* Permissions Matrix */
.perm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.perm-table th,
.perm-table td {
  padding: 0.72rem 0.65rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.perm-table th {
  color: var(--text-2);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mode-pills {
  display: inline-flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.mode-pill {
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-2);
  font-size: 0.74rem;
  font-weight: 600;
}

.mode-pill.selected[data-mode="readonly"] { background: rgba(148, 163, 184, 0.2); border-color: #94a3b8; color: #f8fafc; }
.mode-pill.selected[data-mode="draft"] { background: rgba(56, 189, 248, 0.22); border-color: #38bdf8; color: #e0f2fe; }
.mode-pill.selected[data-mode="exact-yes"] { background: rgba(52, 211, 153, 0.22); border-color: #34d399; color: #d1fae5; }
.mode-pill.selected[data-mode="autorun"] { background: rgba(251, 113, 133, 0.22); border-color: #fb7185; color: #ffe4e6; }

/* Budget Metrics */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.stat-tile {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(6, 11, 26, 0.8);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-tile strong {
  font-size: 1.45rem;
  font-family: var(--font-mono);
}

/* Quiz */
.quiz-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(6, 11, 26, 0.78);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.quiz-opt {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-1);
  font-size: 0.84rem;
}

.quiz-opt:hover {
  border-color: var(--accent-1);
  color: var(--text-0);
}

.quiz-opt.correct {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.18);
  color: #ecfdf5;
}

.quiz-opt.wrong {
  border-color: #fb7185;
  background: rgba(244, 63, 94, 0.18);
  color: #fff1f2;
}

.stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.kbd-bar {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.79rem;
}

@media (max-width: 980px) {
  .mission-hero { grid-template-columns: 1fr; }
  .timeline-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline-track { display: none; }
  .pipeline-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: 1fr; }
  .quiz-options { grid-template-columns: 1fr; }
}
