.event-page-shell {
  max-width: 1260px;
}

.event-page-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.event-page-eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.event-page-head h1 {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: 46px;
  line-height: 0.95;
}

.event-page-note {
  margin: 14px 0 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
}

.event-page-head-side {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: 240px;
}

.event-page-link,
.event-page-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  font: inherit;
}

.event-page-refresh:disabled {
  cursor: progress;
  opacity: 0.7;
}

.event-page-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.theme-discovery-board,
.event-window-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.theme-discovery-board {
  padding: 24px;
}

.theme-discovery-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.theme-discovery-eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-discovery-head h2 {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1;
}

.theme-discovery-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  color: var(--muted);
  font-size: 13px;
}

.theme-candidate-status,
.event-window-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(30, 36, 42, 0.08);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.theme-candidate-status[data-status="ready"],
.event-window-status[data-status="ready"] {
  background: rgba(67, 125, 87, 0.14);
  color: #2f6f46;
}

.theme-candidate-status[data-status="running"],
.event-window-status[data-status="running"] {
  background: rgba(177, 116, 37, 0.14);
  color: #9f5e17;
}

.theme-candidate-status[data-status="error"],
.event-window-status[data-status="error"] {
  background: rgba(177, 78, 42, 0.14);
  color: #b14e2a;
}

.theme-discovery-body {
  margin-top: 18px;
}

.theme-candidate-card {
  border: 1px solid rgba(63, 111, 112, 0.14);
  border-radius: 22px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(242, 249, 249, 0.78) 100%);
}

.theme-candidate-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.theme-candidate-title-row h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1;
}

.theme-candidate-slug {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-candidate-summary,
.theme-candidate-why {
  margin: 14px 0 0;
  line-height: 1.8;
}

.theme-candidate-why {
  color: var(--muted);
}

.theme-candidate-list,
.event-cluster-points,
.event-theme-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.theme-discovery-empty,
.theme-discovery-error,
.event-window-empty,
.event-cluster-empty,
.event-list-empty {
  color: var(--muted);
  line-height: 1.8;
}

.theme-discovery-error {
  color: var(--important);
}

.event-window-board {
  margin-top: 24px;
}

.event-window-stack {
  display: grid;
  gap: 22px;
}

.event-window-card {
  padding: 24px;
}

.event-window-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.event-window-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.event-window-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.event-window-title-row h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 1;
}

.event-window-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 13px;
  justify-content: flex-end;
}

.event-window-meta strong {
  color: var(--text);
}

.event-window-overview {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.85;
}

.event-window-error {
  margin: 14px 0 0;
  color: var(--important);
  line-height: 1.7;
}

.event-stage-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.event-stage-card,
.event-theme-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.76);
}

.event-stage-card[data-stage="new"] {
  background: linear-gradient(180deg, rgba(242, 250, 246, 0.92) 0%, rgba(255, 255, 255, 0.78) 100%);
}

.event-stage-card[data-stage="continuing"] {
  background: linear-gradient(180deg, rgba(244, 248, 251, 0.92) 0%, rgba(255, 255, 255, 0.78) 100%);
}

.event-stage-card[data-stage="fading"] {
  background: linear-gradient(180deg, rgba(250, 245, 240, 0.92) 0%, rgba(255, 255, 255, 0.78) 100%);
}

.event-stage-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.event-stage-head h4,
.event-theme-card h4 {
  margin: 0;
  font-size: 18px;
}

.event-stage-head span {
  color: var(--muted);
  font-size: 12px;
}

.event-stage-summary,
.event-theme-summary {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.event-cluster-list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.event-cluster-card {
  border: 1px solid rgba(30, 36, 42, 0.07);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.8);
}

.event-cluster-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.event-cluster-head h5 {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.event-cluster-head span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.event-cluster-summary {
  margin: 10px 0 0;
  line-height: 1.7;
}

.event-theme-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px) {
  .event-page-head,
  .theme-discovery-head,
  .event-window-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .event-page-head-side,
  .theme-discovery-meta {
    justify-items: start;
  }

  .event-window-meta {
    justify-content: flex-start;
  }

  .event-stage-grid,
  .event-theme-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .event-page-shell {
    padding-top: 18px;
  }

  .event-page-head h1 {
    font-size: 36px;
  }

  .theme-discovery-head h2,
  .theme-candidate-title-row h3 {
    font-size: 24px;
  }

  .event-window-title-row h3 {
    font-size: 28px;
  }

  .event-window-card,
  .theme-discovery-board {
    padding: 18px;
    border-radius: 22px;
  }
}
