/* Clarity Money Lab: site header + menu drawer.
   Loaded by every adult page (after styles.css) and by the kids pages (../chrome.css). */
/* header — iOS nav bar */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 6px 8px;
  padding-top: max(6px, env(safe-area-inset-top));
  gap: 4px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--line, rgba(255,255,255,.08));
}
.brand {
  color: var(--text); text-decoration: none; font-weight: 700;
  font-family: var(--font-display, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 1.06rem; letter-spacing: -0.01em; min-height: 44px;
  display: flex; align-items: center; gap: 8px;
}
.brand-logo { width: 22px; height: 22px; display: block; color: var(--good, var(--green, #00c805)); flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.theme-toggle {
  margin-left: auto; background: var(--bg-2, var(--card, #1c1c1e)); border: none;
  color: var(--text); border-radius: 50%; width: 44px; height: 44px;
  cursor: pointer; font-size: 1rem;
}
.burger {
  background: none; border: none; cursor: pointer; padding: 0;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  display: flex; flex-direction: column; gap: 4.5px;
}
.burger span { width: 19px; height: 1.8px; background: var(--text); border-radius: 2px; }

/* drawer — iOS sheet feel */
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
  width: min(300px, 82vw);
  background: var(--bg-2, var(--card, #1c1c1e));
  padding: calc(64px + env(safe-area-inset-top)) 12px 20px;
  transform: translateX(-102%);
  transition: transform .28s cubic-bezier(.32,.72,0,1);
  display: flex; flex-direction: column; gap: 2px;
  border-radius: 0 16px 16px 0;
}
.drawer.open { transform: translateX(0); }
.drawer a {
  color: var(--text); text-decoration: none; padding: 13px 14px;
  font-size: 1.05rem; border-radius: 10px; font-weight: 500;
}
.drawer a:hover { background: var(--bg-3, var(--card-2, #2c2c2e)); text-decoration: none; }
.drawer a.active { color: var(--good, var(--green, #00c805)); background: color-mix(in srgb, var(--good, var(--green, #00c805)) 10%, transparent); }
.scrim {
  position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .28s;
}
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer-group {
  display: block; margin: 14px 14px 4px; font-size: .75rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #8e8e93); min-height: 1px;
}
.drawer-group:empty { margin: 10px 14px; border-top: 0.5px solid var(--line, rgba(255,255,255,.08)); }
.drawer { overflow-y: auto; }
.drawer a { padding: 11px 14px; }
