:root {
  color-scheme: dark;
  --bg: #0d1021;
  --panel: #171a30;
  --panel-alt: #1f2342;
  --text: #eef1ff;
  --muted: #a0a7d0;
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, 0.2);
  --border: rgba(255, 255, 255, 0.1);
  --danger: #ff5468;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, #242b56 0%, var(--bg) 45%);
  color: var(--text);
}

body.overlay {
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(10, 12, 27, 0.98), rgba(15, 20, 43, 0.94));
}

.container {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header,
.site-footer {
  border-bottom: 1px solid var(--border);
  background: rgba(13, 16, 33, 0.7);
  backdrop-filter: blur(10px);
}

.site-footer {
  border-top: 1px solid var(--border);
  border-bottom: 0;
  margin-top: 4rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.nav a,
.actions a,
.card a,
.hero a,
.overlay-card a,
.timeline-bar {
  color: inherit;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero,
.section,
.badge-detail,
.overlay-shell {
  padding: 2.5rem 0;
}

.hero-grid,
.badge-detail-grid,
.info-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero-grid,
.info-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.hero-grid {
  min-height: 56vh;
}

.badge-detail-grid {
  grid-template-columns: minmax(180px, 280px) 1fr;
}

.actions,
.filters,
.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.button,
button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 1.2rem;
  font: inherit;
  cursor: pointer;
}

.button.secondary,
button.secondary {
  background: var(--accent-soft);
  color: var(--text);
}

input,
label.checkbox {
  font: inherit;
}

input[type='search'] {
  width: min(420px, 100%);
  padding: 0.85rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

label.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.grid {
  display: grid;
  gap: 1rem;
}

.badge-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.live-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card,
.overlay-card,
.detail-panel,
.schedule-shell {
  background: rgba(23, 26, 48, 0.85);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.18);
}

.card img,
.badge-detail img,
.overlay-card img,
.timeline-label img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.card-header,
.overlay-card-header,
.timeline-label {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.card-header,
.overlay-card-header {
  margin-bottom: 1rem;
}

.eyebrow,
.meta,
.muted,
small {
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.84rem;
}

.feature-list {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.6rem;
}

.stat-row,
.opportunity-list {
  display: grid;
  gap: 1rem;
}

.overlay-shell .heading-row,
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.overlay-shell h1,
.section-heading h1 {
  font-size: clamp(2rem, 3vw, 3.4rem);
  margin: 0;
}

.empty-state {
  padding: 2rem;
  text-align: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--border);
}

.schedule-shell {
  overflow-x: auto;
}

.timeline-board {
  min-width: 1080px;
}

.timeline-header-row,
.timeline-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-label {
  padding: 1rem;
}

.timeline-label.heading {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline-label img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.timeline-label h3,
.timeline-label p {
  margin: 0;
}

.timeline-label p {
  margin-top: 0.3rem;
}

.timeline-axis,
.timeline-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
}

.timeline-axis {
  padding: 0.75rem 0;
}

.timeline-day {
  padding: 0 0.5rem;
  color: var(--muted);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-day strong,
.timeline-day span {
  display: block;
}

.timeline-track {
  min-height: 86px;
  background-image: repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0.06) 0,
    rgba(255, 255, 255, 0.06) 1px,
    transparent 1px,
    transparent calc(100% / 30)
  );
}

.timeline-now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--danger);
  opacity: 0.9;
}

.timeline-bar {
  position: absolute;
  top: 18px;
  height: 50px;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(90deg, hsl(var(--timeline-accent) 75% 58% / 0.65), hsl(var(--timeline-accent) 75% 35% / 0.2));
  border: 1px solid hsl(var(--timeline-accent) 75% 72% / 0.6);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.08);
}

.timeline-bar span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .nav,
  .section-heading,
  .overlay-shell .heading-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .badge-detail-grid {
    grid-template-columns: 1fr;
  }
}
