/* Desktop header chrome — skipped on mobile (hidden #dc-site-header). */
/* Mobile: dim page behind account drawer; sits under bar content */
.dc-header > .dc-header__nav-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  margin: 0;
  border: none;
  padding: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.dc-header__nav-backdrop[hidden] {
  display: none !important;
}

@media (min-width: 901px) {
  .dc-header > .dc-header__nav-backdrop {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dc-header > .dc-header__nav-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.dc-header__accent {
  height: 3px;
  background: var(--dc-brand-strip);
  opacity: 0.95;
}

.dc-header > * {
  position: relative;
  z-index: 1;
}

.dc-header__utility,
.dc-header__cd-bar {
  z-index: 2;
}

.dc-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px max(18px, env(safe-area-inset-right, 0px)) 16px max(18px, env(safe-area-inset-left, 0px));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 18px;
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
}

/* Full-bleed white band: logo + primary nav (upper header) */
.dc-header__inner::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: #ffffff;
  z-index: -1;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  pointer-events: none;
}

.dc-header__brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.dc-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  border-radius: 12px;
  padding: 4px 2px;
  transition: opacity 0.2s, transform 0.2s;
}

.dc-logo:focus-visible {
  outline: 2px solid rgba(0, 103, 182, 0.75);
  outline-offset: 3px;
}

.dc-logo__img {
  display: block;
  height: clamp(48px, 6vw, 72px);
  width: auto;
  max-width: min(300px, 68vw);
  object-fit: contain;
  object-position: left center;
  filter: none;
}

.dc-logo:hover .dc-logo__img {
  opacity: 0.95;
  transform: translateY(-0.5px);
}

.dc-logo--solo {
  display: inline-flex;
  align-items: center;
  padding: 4px 2px;
  line-height: 0;
}

.dc-logo--solo .dc-logo__mark {
  flex-shrink: 0;
  height: clamp(34px, 5.2vw, 48px);
  width: auto;
  max-width: min(260px, 72vw);
  object-fit: contain;
  object-position: left center;
  border-radius: 8px;
}

.dc-logo--with-wordmark {
  gap: 0.65rem;
}

.dc-logo__wordmark {
  font-weight: 800;
  font-size: clamp(1.05rem, 2.4vw, 1.32rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #005092;
}

@supports (-webkit-background-clip: text) {
  .dc-logo__wordmark {
    color: transparent;
    background: linear-gradient(135deg, #003d5c 0%, #0067b6 45%, #005092 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

@media (max-width: 400px) {
  .dc-logo__wordmark {
    display: none;
  }
}

/* Burger — hidden on desktop */
.dc-nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  cursor: pointer;
  transition: background 0.2s;
}

.dc-nav-burger:hover {
  background: rgba(0, 103, 182, 0.12);
}

.dc-nav-burger__bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: #334155;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}

.dc-header--menu-open .dc-nav-burger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.dc-header--menu-open .dc-nav-burger__bar:nth-child(2) {
  opacity: 0;
}
.dc-header--menu-open .dc-nav-burger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.dc-nav--primary {
  display: flex;
  gap: 4px 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.dc-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #334155 !important;
  text-decoration: none !important;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.dc-nav__link--post {
  background: linear-gradient(135deg, var(--dc-uni) 0%, var(--dc-brand) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 103, 182, 0.35);
}

.dc-nav__link--post:hover {
  background: linear-gradient(135deg, #005092 0%, #005092 100%);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 14px rgba(0, 103, 182, 0.45);
}

.dc-header__inner .dc-nav__link--post:hover {
  color: #ffffff !important;
  background: linear-gradient(135deg, #005092 0%, #005092 100%);
  border-color: rgba(255, 255, 255, 0.28);
}

.dc-nav__link--login {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b !important;
}

.dc-nav__link--login:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #0f172a !important;
}

.dc-header__inner .dc-nav__link--login:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #0f172a !important;
}

button.dc-nav__link {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.dc-nav__link--muted {
  font-weight: 500;
  color: #64748b !important;
}

.dc-nav__link--muted:hover {
  color: #0f172a !important;
  background: rgba(15, 23, 42, 0.06);
}

.dc-header__inner .dc-nav__link--muted:hover {
  color: #0f172a !important;
  background: rgba(15, 23, 42, 0.06);
}

.dc-nav__user {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  padding: 6px 10px;
  max-width: min(160px, 28vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dc-header__inner .dc-nav__link:hover {
  color: #0f172a !important;
  background: rgba(15, 23, 42, 0.06);
}

.dc-header__inner .dc-nav__link.is-active {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(0, 103, 182, 0.85), rgba(0, 103, 182, 0.78));
  box-shadow: 0 4px 14px rgba(0, 103, 182, 0.28);
}

.dc-header__inner .dc-nav__link.is-active:hover {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(0, 103, 182, 0.92), rgba(0, 103, 182, 0.85));
}

.dc-header__home-search {
  min-width: 0;
  align-self: center;
}

/* Second row: light strip, crisp pills (no heavy dark bar / colored underlines) */
.dc-header__explore-wrap {
  position: relative;
  z-index: 350;
  overflow: visible;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 1px solid #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 18px rgba(15, 23, 42, 0.05);
}

.dc-header__explore {
  max-width: 1200px;
  margin: 0 auto;
  padding: 11px 18px 13px;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.35) transparent;
}

.dc-header__explore-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  row-gap: 10px;
  max-width: 100%;
}

.dc-header__explore-site {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.dc-header__explore-sep {
  flex-shrink: 0;
  width: 1px;
  height: 28px;
  align-self: center;
  background: linear-gradient(180deg, transparent, #cbd5e1 15%, #cbd5e1 85%, transparent);
  margin: 0 4px;
}

@media (max-width: 480px) {
  .dc-header__explore-sep {
    display: none;
  }
}

.dc-header__explore::-webkit-scrollbar {
  height: 5px;
}
.dc-header__explore::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.35);
  border-radius: 6px;
}

.dc-explore-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none !important;
  color: #334155 !important;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.15s;
}

.dc-explore-pill:hover {
  color: #0f172a !important;
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.dc-explore-pill.is-active {
  color: #0f172a !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}

.dc-explore-pill--site {
  font-size: 0.8rem;
  padding: 8px 13px;
}

.dc-explore-pill--site.is-active {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #93c5fd;
  color: #005092 !important;
}

.dc-explore-pill--external {
  background: linear-gradient(180deg, #fafaff 0%, #eef2ff 100%);
  border-color: #c7d2fe;
  color: #003d5c !important;
}

.dc-explore-pill--external:hover {
  border-color: #a5b4fc;
  color: #003d5c !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.14);
}


/* ——— Mobile: burger + overlay nav ——— */
@media (max-width: 900px) {
  .dc-nav-burger {
    display: flex;
    justify-self: end;
  }

  .dc-header__inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
  }

  .dc-header__brand {
    grid-column: 1;
    grid-row: 1;
  }

  .dc-nav-burger {
    grid-column: 2;
    grid-row: 1;
  }

  .dc-header__home-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .dc-nav--primary {
    grid-column: 1 / -1;
    grid-row: 3;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    margin: 8px -8px -8px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: var(--dc-shadow-lg);
  }

  .dc-header--menu-open .dc-nav--primary {
    display: flex;
    animation: dc-nav-in 0.12s ease-out;
  }

  .dc-nav__link {
    justify-content: center;
    text-align: center;
    padding: 14px 16px;
    min-height: 48px;
    box-sizing: border-box;
    font-size: 1rem;
  }
}

@keyframes dc-nav-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dc-explore-pill:hover {
    transform: none;
  }
  .dc-header--menu-open .dc-nav--primary {
    animation: none;
  }
  .dc-logo:hover .dc-logo__img {
    transform: none;
  }
}

/* --- Header accent + explore row per nav context (desktop header only) --- */
body.dc-nav-ctx--home .dc-header__accent {
  background: var(--dc-brand-strip);
  opacity: 0.95;
}

body.dc-nav-ctx--predictor .dc-header__accent {
  background: linear-gradient(90deg, #003d5c 0%, #0067b6 48%, #42a0d4 100%);
  opacity: 0.96;
}

body.dc-nav-ctx--contact .dc-header__accent {
  background: linear-gradient(90deg, #005092 0%, #0067b6 45%, #42a0d4 100%);
  opacity: 0.96;
}

body.dc-nav-ctx--university .dc-header__accent {
  background: linear-gradient(90deg, #121212 0%, #1a1a1a 35%, #2e2e2e 70%, #525252 100%);
  opacity: 0.96;
}

body.dc-nav-ctx--school .dc-header__accent {
  background: linear-gradient(90deg, #005092 0%, var(--dc-school) 50%, #42a0d4 100%);
  opacity: 0.96;
}

body.dc-nav-ctx--coaching .dc-header__accent {
  background: linear-gradient(90deg, #005092 0%, var(--dc-coach) 50%, #42a0d4 100%);
  opacity: 0.96;
}

body.dc-nav-ctx--tutor .dc-header__accent {
  background: linear-gradient(90deg, #003d5c 0%, var(--dc-tutor) 50%, #42a0d4 100%);
  opacity: 0.96;
}

body.dc-nav-ctx--site .dc-header__accent {
  background: linear-gradient(90deg, var(--dc-uni) 0%, var(--dc-brand) 55%, #42a0d4 100%);
  opacity: 0.94;
}

body.dc-nav-ctx--home .dc-header__explore-wrap {
  background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 55%, #f1f5f9 100%);
  border-top-color: rgba(0, 103, 182, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 4px 20px rgba(0, 103, 182, 0.06);
}

body.dc-nav-ctx--predictor .dc-header__explore-wrap {
  background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 55%, #f1f5f9 100%);
  border-top-color: rgba(124, 58, 237, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 22px rgba(124, 58, 237, 0.08);
}

body.dc-nav-ctx--contact .dc-header__explore-wrap {
  background: linear-gradient(180deg, #f0fdfa 0%, #ccfbf1 50%, #f1f5f9 100%);
  border-top-color: rgba(13, 148, 136, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 22px rgba(13, 148, 136, 0.07);
}

body.dc-nav-ctx--university .dc-header__explore-wrap {
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f1 48%, #f8fafc 100%);
  border-top-color: rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 4px 24px rgba(0, 0, 0, 0.05);
}

body.dc-nav-ctx--school .dc-header__explore-wrap {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 45%, #f8fafc 100%);
  border-top-color: rgba(13, 148, 136, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 4px 24px rgba(13, 148, 136, 0.09);
}

body.dc-nav-ctx--coaching .dc-header__explore-wrap {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 45%, #f8fafc 100%);
  border-top-color: rgba(234, 88, 12, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 4px 24px rgba(234, 88, 12, 0.09);
}

body.dc-nav-ctx--tutor .dc-header__explore-wrap {
  background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 45%, #f8fafc 100%);
  border-top-color: rgba(124, 58, 237, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 4px 24px rgba(124, 58, 237, 0.1);
}

body.dc-nav-ctx--site .dc-header__explore-wrap {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-top-color: rgba(148, 163, 184, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 18px rgba(15, 23, 42, 0.05);
}

body.dc-nav-ctx--predictor .dc-explore-pill--site.is-active {
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
  border-color: #a5b4fc;
  color: #003d5c !important;
}

body.dc-nav-ctx--contact .dc-explore-pill--site.is-active {
  background: linear-gradient(180deg, #f0fdfa 0%, #ccfbf1 100%);
  border-color: #7ec8ea;
  color: #005092 !important;
}
