/* Keep ’Em Coming Back — Deploy 5.2 targeted display and live-calendar repair.
   Fixes homepage router contrast, medium-width header fit, and related operational states. */

:root{
  --dc-navy:#10233f;
  --dc-navy-deep:#09172a;
  --dc-rust:#8e2b27;
  --dc-paper:#fffdf9;
  --dc-card:#f1ece1;
  --dc-ink:#211d18;
  --dc-muted:#62594f;
  --dc-line:#bdb2a5;
}

/* Homepage problem finder: do not depend on legacy --cream/--tan variables.
   The institutional operational theme intentionally reuses those variables,
   which made headings and typed input white on pale surfaces. */
body.page-operational #console .ask input{
  background:#fff!important;
  color:var(--dc-ink)!important;
  caret-color:var(--dc-navy)!important;
  border-color:#b8aa9b!important;
}
body.page-operational #console .ask input::placeholder{color:#7a7168!important;opacity:1!important}
body.page-operational #console .ask label,
body.page-operational #console .chips .chip-label{color:#3d3a35!important}
body.page-operational #console .chip{
  background:var(--dc-card)!important;
  color:var(--dc-navy)!important;
  border-color:var(--dc-line)!important;
  box-shadow:none!important;
}
body.page-operational #console .chip strong{color:var(--dc-navy)!important}
body.page-operational #console .chip span{color:var(--dc-muted)!important}
body.page-operational #console .chip:hover,
body.page-operational #console .chip:focus-visible{
  background:#fff!important;
  color:var(--dc-rust)!important;
  border-color:var(--dc-rust)!important;
}
body.page-operational #console .chip:hover strong,
body.page-operational #console .chip:focus-visible strong{color:var(--dc-rust)!important}
body.page-operational #console .chip:hover span,
body.page-operational #console .chip:focus-visible span{color:#453e37!important}
body.page-operational #console .answer{
  background:#f8f3ea!important;
  color:var(--dc-ink)!important;
}
body.page-operational #console .answer :is(h2,h3,strong){color:var(--dc-navy)!important}
body.page-operational #console .answer p{color:#554d45!important}
body.page-operational #console .answer .links a:not(.primary){
  background:#fff!important;
  color:var(--dc-navy)!important;
  border-color:#a99e91!important;
}
body.page-operational #console .answer .links a.primary{
  background:var(--dc-navy)!important;
  color:#fff!important;
}

/* At laptop and enlarged-text widths, use the contained disclosure menu before
   the full navigation can crowd the right edge. */
@media (min-width:761px) and (max-width:1320px){
  .site-header-v3.site-header-simple,.site-header-v3{
    grid-template-columns:minmax(0,1fr) auto!important;
    min-height:66px!important;
    overflow:visible!important;
  }
  .site-header-v3 .nav-menu-toggle{display:inline-flex!important}
  .site-header-v3 .main-nav-v3{
    display:none!important;
    grid-column:1/-1!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    max-height:calc(100vh - 76px)!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    padding:.65rem 0 .35rem!important;
    border-top:1px solid rgba(255,255,255,.14)!important;
  }
  .site-header-v3 .main-nav-v3.is-open{display:flex!important}
  .site-header-v3 .main-nav-v3>a,
  .site-header-v3 .main-nav-v3>button,
  .site-header-v3 .main-nav-v3>details,
  .site-header-v3 .main-nav-v3>details>summary{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    justify-content:flex-start!important;
    text-align:left!important;
    white-space:normal!important;
  }
  .site-header-v3 .main-nav-v3>.nav-more{position:static!important;display:block!important}
  .site-header-v3 .nav-more-menu{
    position:static!important;
    inset:auto!important;
    transform:none!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:.3rem 0 0!important;
    box-shadow:none!important;
  }
  .site-header-v3 .nav-more-menu a{width:100%!important;min-height:44px!important}
  .site-header-v3 .main-nav-v3 .account-utility{max-width:none!important}
}

/* Ensure the live calendar view switch remains legible in every state. */
body.live-list-page .view-btn{
  background:#fff!important;
  color:var(--dc-navy)!important;
  border-color:#aa9d8f!important;
}
body.live-list-page .view-btn:hover,
body.live-list-page .view-btn:focus-visible{background:#edf1f5!important;color:var(--dc-navy-deep)!important}
body.live-list-page .view-btn.active{
  background:var(--dc-rust)!important;
  color:#fff!important;
  border-color:var(--dc-rust)!important;
}
body.live-list-page .cas-card{
  background:#fff!important;
  color:var(--dc-ink)!important;
  border-color:#c9beb1!important;
}
body.live-list-page .cas-card .cas-name{color:var(--dc-navy)!important}
body.live-list-page .cas-card .cas-city{color:var(--dc-muted)!important}
body.live-list-page .cas-card a{color:#7a2522!important}

@media(prefers-reduced-motion:reduce){
  body.page-operational #console .chip{transition:none!important;transform:none!important}
}

/* Additional contrast normalization found during the post-fix visual sweep. */
body.page-operational #console .ask .go{
  background:var(--dc-rust)!important;
  color:#fff!important;
}
body.page-operational #console .side-toggle button[aria-pressed="true"]{
  background:var(--dc-rust)!important;
  color:#fff!important;
}
body.page-operational #console .side-toggle button.visit[aria-pressed="true"]{
  background:var(--dc-navy)!important;
  color:#fff!important;
}
body.page-operational .skip{
  background:var(--dc-rust)!important;
  color:#fff!important;
}
body.page-operational .browse-grid .icn{color:var(--dc-rust)!important}
body.page-operational .founder-actions a.solid{
  background:var(--dc-rust)!important;
  color:#fff!important;
}
body.page-operational footer.site{
  color:#5c554d!important;
  border-top-color:#cfc7bc!important;
}
body.page-operational footer.site .foot .fbrand b{color:var(--dc-navy)!important}
body.page-operational footer.site .foot nav a{color:#43515d!important}
body.page-operational footer.site .foot nav a:hover,
body.page-operational footer.site .foot nav a:focus-visible{color:var(--dc-rust)!important}
body.page-operational footer.site .copy,
body.page-operational footer.site .foot .fbrand p{color:#5c554d!important}

.edu-caution{
  background:#fff5dd!important;
  color:#26323c!important;
  border-left-color:#9c2b2b!important;
}
.edu-caution strong{color:#10233f!important}
