/* Issue editor — managing editor single-issue view */
.ie-page .main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ie-page .content {
  padding: 0 0 2rem;
  max-width: none;
}

.ie-page .topbar {
  background: var(--surface);
}

.ie-page .page-title {
  font-family: var(--display);
  padding: 0 1.5rem;
  margin-top: 1rem;
}

.ie-page .page-sub {
  padding: 0 1.5rem;
  margin-bottom: 0.75rem;
}

/* Week / issue rail */
.ie-issue-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  scrollbar-width: thin;
}

.ie-issue-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ie-issue-tab:hover {
  border-color: var(--brand-mid);
  background: var(--brand-light);
}

.ie-issue-tab.active {
  border-color: var(--accent);
  background: var(--brand-light);
  color: var(--brand-ink-on-light);
  box-shadow: 0 0 0 2px rgba(124, 111, 232, 0.25);
}

.ie-issue-tab .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-red { background: var(--status-red); }
.dot-amber { background: var(--status-amber); }
.dot-green { background: var(--status-green); }
.dot-blue { background: var(--status-blue); }

/* Press countdown banner */
.ie-deadline-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 1.5rem 0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #4538a0 0%, #6b5cd6 55%, #a29bff 100%);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ie-deadline-banner .countdown {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.ie-deadline-banner .countdown span {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.85;
}

.ie-deadline-banner .btn {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.ie-deadline-banner .btn:hover {
  background: rgba(255, 255, 255, 0.22);
  text-decoration: none;
}

.ie-deadline-banner .btn-primary {
  background: var(--brand-light);
  border-color: var(--brand-mid);
  color: var(--brand-ink-on-light);
}

.ie-deadline-banner.urgent .countdown {
  color: #fecaca;
}

.ie-deadline-banner.soon .countdown {
  color: #fde68a;
}

/* Status summary row */
.ie-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(4.5rem, 1fr)) minmax(12rem, 2fr);
  gap: 0.65rem;
  margin: 1rem 1.5rem 0;
}

@media (max-width: 900px) {
  .ie-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ie-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.ie-stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.ie-stat span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}

.ie-status-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border);
}

.ie-status-bar > div {
  min-width: 0;
  transition: width 0.2s ease;
}

/* Gaps & risks strip */
.ie-gaps {
  margin: 1rem 1.5rem 0;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ie-gaps h2 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.ie-gap-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.ie-gap-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.8rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ie-gap-chip:hover {
  border-color: var(--status-red);
  background: #fef2f2;
  text-decoration: none;
}

.ie-gap-chip.amber:hover {
  border-color: var(--status-amber);
  background: #fffbeb;
}

.ie-gap-none {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* Slot map grid */
.ie-page .card {
  margin: 1rem 1.5rem 0;
}

.ie-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.55rem;
}

.ie-slot {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.55rem 0.65rem;
  min-height: 5.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.ie-slot:hover {
  box-shadow: 0 4px 14px rgba(69, 56, 160, 0.12);
  transform: translateY(-1px);
  text-decoration: none;
}

.ie-slot.border-red { border-left-color: var(--status-red); }
.ie-slot.border-amber { border-left-color: var(--status-amber); }
.ie-slot.border-green { border-left-color: var(--status-green); }
.ie-slot.border-blue { border-left-color: var(--status-blue); }

.ie-slot.empty-slot {
  background: #faf9ff;
  border-style: dashed;
  border-left-style: solid;
}

.ie-slot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
}

.ie-slot-code {
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}

.ie-slot-health {
  flex-shrink: 0;
  font-size: 0;
}

.ie-slot-health::before {
  width: 8px;
  height: 8px;
}

.ie-slot-title {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ie-slot-title.filled {
  color: var(--ink);
}

.ie-slot-type {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.25;
}

.ie-slot-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
