/* ===========================
   THEME VARIABLES
=========================== */
:root {
  --solid-d:#0076BA; --likely-d:#00A2FF; --lean-d:#56C1FF;
  --toss-up:#929292; --lean-r:#FF968D; --likely-r:#FF644E; --solid-r:#EE220C;

  --bg-page:#f3f4f6; 
  --bg-card:#ffffff; 
  --border-subtle:#d4d4d8;

  --text-main:#111827; 
  --text-muted:#6b7280; 
  --text-strong:#000;

  --radius-card:24px;
  --shadow-soft:0 18px 40px rgba(15,23,42,0.1);
}

@media (prefers-color-scheme: dark){
  :root{
    --bg-page:#020617; 
    --bg-card:#020617; 
    --border-subtle:#1f2937;
    --text-main:#e5e7eb; 
    --text-muted:#9ca3af; 
    --text-strong:#f9fafb;
    --shadow-soft:0 18px 40px rgba(0,0,0,0.9);
  }
}

/* ===========================
   HEADER (STICKY, LIKE BEEHIIV)
=========================== */

.cm-header,
.cm-header header,
header.cm-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 20;
}

/* Inner layout */
.header-inner {
  max-width: 1150px;
  margin: auto;
  padding: 0.8rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

/* Logo + title */
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--text-strong);
}

.logo-link img {
  height: 48px;
  width: auto;
  border-radius: 12px;
}

/* Nav (same style as Worker/Beehiiv) */
#cm-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

#cm-nav a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  transition: 0.2s;
  font-size: 0.95rem;
}

#cm-nav a:hover,
#cm-nav a.active {
  background: #e5e7eb44;
  color: var(--text-strong);
}

@media (prefers-color-scheme: dark){
  #cm-nav a:hover,
  #cm-nav a.active {
    background: rgba(255,255,255,0.12);
  }
}