/* ── Root ── */
#ep-root {
  padding: 40px 40px 80px;
  max-width: 1100px;
  margin: 0 auto;
  font-family: 'Courier New', Courier, monospace;
}

#ep-root button {
  width: auto;
  height: auto;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

/* ── Header ── */
#ep-root .ep-header {
  margin-bottom: 28px;
}

#ep-root .ep-eyebrow {
  font-size: 11px !important;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: gray !important;
  margin: 0 0 8px !important;
}

#ep-root .ep-title {
  font-family: "Oswald", sans-serif;
  font-size: 36px;
  font-weight: 600;
  color: white;
  margin: 0 0 8px;
  line-height: 1.1;
}

#ep-root .ep-desc {
  font-size: 13px !important;
  color: #94a3b8 !important;
  margin: 0 0 16px !important;
  line-height: 1.6;
  max-width: 640px;
}

#ep-root .ep-stats {
  display: flex;
  gap: 24px;
}

#ep-root .ep-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#ep-root .ep-stat__num {
  font-family: "Oswald", sans-serif;
  font-size: 28px;
  font-weight: 500;
  color: white;
  line-height: 1;
}

#ep-root .ep-stat__lbl {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* ── Legend ── */
#ep-root .ep-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

#ep-root .ep-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
}

#ep-root .ep-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Progress bar ── */
#ep-root .ep-progress {
  margin-bottom: 32px;
}

#ep-root .ep-progress__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}

#ep-root .ep-progress__label {
  color: #64748b;
  font-weight: 500;
}

#ep-root .ep-progress__pct {
  color: #64748b;
}

#ep-root .ep-progress__bar {
  height: 4px;
  background: #222;
  border-radius: 99px;
  overflow: hidden;
  display: flex;
}

#ep-root .ep-progress__done {
  height: 100%;
  background: #10b981;
  border-radius: 99px 0 0 99px;
  transition: width 0.4s ease;
}

#ep-root .ep-progress__inprog {
  height: 100%;
  background: #f59e0b;
  transition: width 0.4s ease;
}

/* ── Phase row ── */
#ep-root .ep-phase-row {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  align-items: flex-start;
}

#ep-root .ep-phase-label {
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  min-width: 20px;
  padding: 10px 0;
  border-left: 2px solid;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: stretch;
}

#ep-root .ep-phase-body {
  flex: 1;
  min-width: 0;
}

#ep-root .ep-cards-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

/* ── Episode card ── */
#ep-root .ep-card {
  background: #111;
  border: 1px solid #222;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  flex: 1;
  min-width: 150px;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#ep-root .ep-card:hover {
  border-color: #444;
  transform: translateY(-2px);
}

#ep-root .ep-card--active {
  border-width: 1.5px;
  transform: none;
}

#ep-root .ep-card__ep {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
  align-self: flex-start;
  letter-spacing: 0.5px;
}

#ep-root .ep-card__title {
  font-size: 13px;
  font-weight: 500;
  color: white;
  line-height: 1.35;
}

#ep-root .ep-card__sub {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Detail panel ── */
#ep-root .ep-detail__panel {
  margin-top: 10px;
  background: #111;
  border: 1px solid #222;
  border-left-width: 3px;
  border-radius: 10px;
  padding: 18px 20px;
  animation: ep-slide-in 0.15s ease;
}

@keyframes ep-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

#ep-root .ep-detail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

#ep-root .ep-detail__ep {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

#ep-root .ep-detail__close {
  font-size: 13px;
  color: #64748b;
  line-height: 1;
  transition: color 0.15s;
}

#ep-root .ep-detail__close:hover {
  color: white;
}

#ep-root .ep-detail__title {
  font-family: "Oswald", sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: white;
  margin-bottom: 16px;
}

#ep-root .ep-detail__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

#ep-root .ep-detail__section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 8px;
}

#ep-root .ep-detail__topics {
  list-style: none;
  padding: 0;
  margin: 0;
}

#ep-root .ep-detail__topics li {
  font-size: 12px;
  color: #cbd5e1;
  padding: 5px 0;
  border-bottom: 1px solid #1e1e1e;
  line-height: 1.45;
}

#ep-root .ep-detail__topics li:last-child {
  border-bottom: none;
}

#ep-root .ep-detail__topics li::before {
  content: "›  ";
  color: #475569;
}

#ep-root .ep-detail__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

#ep-root .ep-detail__tool {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  background: #1a1a1a;
  border: 1px solid #2d2d2d;
  color: #94a3b8;
}

#ep-root .ep-detail__idea {
  font-size: 12px;
  color: #64748b;
  line-height: 1.55;
  padding-top: 10px;
  border-top: 1px solid #1e1e1e;
  font-style: italic;
}

#ep-root .ep-detail__idea-label {
  font-style: normal;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 4px;
}

#ep-root .ep-detail__wiki {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#ep-root .ep-detail__wiki-link {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid;
  text-decoration: none;
  transition: opacity 0.15s;
}

#ep-root .ep-detail__wiki-link:hover {
  opacity: 0.75;
}

/* ── Status badges ── */
#ep-root .ep-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

#ep-root .ep-status--done   { background: rgba(16,185,129,0.15); color: #34d399; }
#ep-root .ep-status--inprog { background: rgba(245,158,11,0.15);  color: #fbbf24; }
#ep-root .ep-status--todo   { background: rgba(100,116,139,0.1);  color: #64748b; }

/* ── Empty ── */
#ep-root .ep-empty {
  padding: 80px 0;
  text-align: center;
  color: #64748b;
}

#ep-root .ep-empty-icon { font-size: 36px; margin-bottom: 12px; }
#ep-root .ep-empty-text { font-size: 14px; }

/* ── Responsive ── */
@media (max-width: 700px) {
  #ep-root {
    padding: 24px 16px 60px;
  }

  #ep-root .ep-phase-row {
    flex-direction: column;
    gap: 8px;
  }

  #ep-root .ep-phase-label {
    writing-mode: horizontal-tb;
    transform: none;
    border-left: none;
    border-top: 2px solid;
    padding: 6px 0 0;
    min-width: auto;
  }

  #ep-root .ep-detail__grid {
    grid-template-columns: 1fr;
  }

  #ep-root .ep-card {
    max-width: none;
  }

  #ep-root .ep-title {
    font-size: 26px;
  }
}
