/* Scale the approved three-column identity without rearranging it on rotation.
   Container units track the available width, including tablet split-screen. */
.topbar .ndc-scg{mix-blend-mode:normal;filter:none;opacity:1}
.topbar.ndc-shared-masthead{
  position:relative;top:auto;isolation:isolate;background:#fff;
  grid-template-columns:minmax(0,1fr);gap:8px;height:auto;min-height:0;
  padding:12px max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left));
  padding-bottom:34px;
}
.topbar.ndc-shared-masthead::before{
  content:"";position:absolute;inset:auto 0 0;height:33.333333%;z-index:-1;pointer-events:none;
  background:url('/assets/ndc-header-panorama-v1.webp') center bottom/100% 300% no-repeat;
  mask-image:linear-gradient(to bottom,transparent,#000 32%);
  -webkit-mask-image:linear-gradient(to bottom,transparent,#000 32%);
}
.ndc-shared-masthead>.ndc-brand-frame{
  grid-column:1/-1;grid-row:1;width:100%;max-width:1600px;min-width:0;
  margin-inline:auto;container-type:inline-size;
}
.topbar.ndc-shared-masthead .ndc-logo-row{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr) minmax(0,1fr);
  gap:1cqw;align-items:start;width:100%;max-width:none;margin:0;padding:0;
}
.topbar.ndc-shared-masthead .ndc-logo-left,
.topbar.ndc-shared-masthead .ndc-logo-right{
  display:flex;flex-flow:row nowrap;gap:.3cqw;width:100%;max-width:none;min-width:0;
  min-height:6.5cqw;align-items:center;align-self:start;grid-row:1;
}
.topbar.ndc-shared-masthead .ndc-logo-left{grid-column:1;justify-content:flex-start}
.topbar.ndc-shared-masthead .ndc-logo-right{grid-column:3;justify-content:flex-end}
.topbar.ndc-shared-masthead .ndc-logo-left>img{
  flex:0 1 5cqw;width:5cqw;height:5cqw;max-width:100%;object-fit:contain;aspect-ratio:1;
}
.topbar.ndc-shared-masthead .ndc-logo-left>.ndc-sandbox{
  flex-basis:6.5cqw;width:6.5cqw;height:6.5cqw;
}
.topbar.ndc-shared-masthead .ndc-logo-right>img,
.topbar.ndc-shared-masthead .ndc-sdg-logo,
.topbar.ndc-shared-masthead .ndc-sdg-logo img{
  flex:0 1 2.5cqw;width:2.5cqw;height:2.5cqw;min-width:0;min-height:0;
  max-width:100%;padding:0;gap:0;object-fit:contain;aspect-ratio:1;
}
.topbar.ndc-shared-masthead .ndc-header-title{
  grid-column:2;grid-row:1;align-self:start;justify-self:center;width:100%;max-width:100%;
  padding:0;margin:0;--ndc-identity-size:2.5cqw;text-shadow:0 1px 3px #fff,0 0 12px #fff;
}
.topbar.ndc-shared-masthead .ndc-header-title .ndc-identity-name,
.topbar.ndc-shared-masthead .ndc-header-title .ndc-transition-tagline{
  font-size:2.5cqw;line-height:1.4;white-space:nowrap;
}
.topbar.ndc-shared-masthead .ndc-header-title span{font-size:1.8cqw;line-height:1.4;margin-top:.16cqw}
.topbar.ndc-shared-masthead .ndc-header-title .ndc-transition-tagline{margin-top:.33cqw;padding:.25cqw .66cqw;border-radius:.66cqw}
.topbar.ndc-shared-masthead>.public-header-actions,
.topbar.ndc-shared-masthead>nav,
.topbar.ndc-shared-masthead>.site-statistics{grid-column:1/-1;grid-row:auto;max-width:100%;min-width:0}
.topbar.ndc-shared-masthead>.public-header-actions{justify-self:end;width:auto}
.topbar.ndc-shared-masthead>nav{display:flex;flex-wrap:wrap;gap:8px}
.topbar.ndc-shared-masthead>.app-navigation{display:grid;justify-self:end}
@media print{.topbar.ndc-shared-masthead::before{display:none}}

/* Retain the former action's footprint so the surrounding layout stays fixed. */
.ndc-hero-space{visibility:hidden;pointer-events:none;user-select:none}

/* Text-only model identity, centered at the lower edge of the panorama. */
.topbar.ndc-shared-masthead>.ndc-masthead-model{
  position:absolute;inset:auto 12px 5px;z-index:1;
  display:flex;align-items:baseline;justify-content:center;gap:7px;
  margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;
  color:#fff;font-size:clamp(10px,2.6vw,15px);line-height:1.35;
  text-shadow:0 1px 2px #073b27,0 0 4px #073b27;
}
.ndc-masthead-model strong{
  flex:none;color:#ffe78e;font-size:1.15em;font-weight:850;letter-spacing:.06em;
}
.ndc-masthead-model span{
  min-width:0;color:#fff;font-weight:750;white-space:nowrap;
}

/* On phones and portrait tablets, join the dashboard to the panorama and use
   the full screen width. The identity above keeps the same three-column scale. */
@media screen and (orientation:portrait) and (max-width:900px){
  .public-landing-overview{
    width:100%;max-width:none!important;box-sizing:border-box;
    padding-top:0!important;padding-right:0!important;padding-left:0!important;
  }
  .public-landing-overview>.ndc-dashboard-shell{
    width:100%;box-sizing:border-box;margin:0!important;
    border-radius:0 0 20px 20px;
  }
  .public-landing-overview .ndc-dashboard-heading{
    gap:6px!important;margin-bottom:8px!important;padding-inline:6px;
  }
  .public-landing-overview .ndc-dashboard-heading>.ndc-hero-link{
    align-self:center;width:min(78%,320px)!important;min-height:48px;
    margin-top:0;padding:7px 14px;border-radius:12px;
    font-size:clamp(15px,4vw,17px);line-height:1.25;white-space:nowrap;
  }
}

/* Keep only a small breathing space on compact landscape screens. */
@media screen and (orientation:landscape) and (max-height:600px){
  .public-landing-overview{padding-top:4px!important}
  .public-landing-overview>.ndc-dashboard-shell{margin-top:0!important}
  .ndc-dashboard-shell .ndc-hero-space{display:none}
  .ndc-dashboard-shell .ndc-dashboard-heading{
    display:block;margin-bottom:10px;padding-block:0;
  }
  .ndc-dashboard-shell .ndc-dashboard-heading>div{width:100%;min-width:0}
  .ndc-dashboard-shell .ndc-dashboard-heading>div>p:last-child{
    font-size:clamp(12px,1.9vw,17px);line-height:1.45;white-space:nowrap;
  }
}

/* Join the home dashboard to the masthead in every screen orientation. */
.public-landing-overview{padding-top:0!important}
.public-landing-overview>.ndc-dashboard-shell{margin-top:0!important}

/* Live usage counts sit on white beneath the institutional identity. */
.topbar.ndc-shared-masthead .ndc-brand-frame>.site-statistics{
  display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;
  width:fit-content;max-width:100%;margin:6px 0 0 auto;padding:5px 10px;
  gap:7px;background:#fff;color:#294b3e;border:1px solid #dbe8e0;
  border-radius:10px;font-size:14px;line-height:1.5;white-space:normal;
}
.topbar.ndc-shared-masthead .ndc-brand-frame>.site-statistics>span{white-space:nowrap}
.topbar.ndc-shared-masthead .ndc-brand-frame>.site-statistics b{color:#07502f;font-weight:800}
.topbar.ndc-shared-masthead .ndc-brand-frame>.site-statistics button{color:#294b3e;min-width:32px;min-height:32px;font-size:17px}
@media(max-width:600px){
 .topbar.ndc-shared-masthead .ndc-brand-frame>.site-statistics{font-size:12px;gap:5px;padding:4px 8px;margin-top:5px}
}

/* Approved second row: six original agency marks, adjacent and left aligned.
   Both partner groups use this one size so rotation cannot change their ratio. */
.topbar.ndc-shared-masthead .ndc-brand-frame{--ndc-agency-size:2.5cqw;position:relative}
.topbar.ndc-shared-masthead .ndc-logo-left{
  display:flex;flex-direction:column;align-items:flex-start;gap:.45cqw;
}
.topbar.ndc-shared-masthead .ndc-logo-left-primary{
  display:flex;align-items:center;justify-content:flex-start;gap:.3cqw;
  width:100%;min-width:0;min-height:6.5cqw;
}
.topbar.ndc-shared-masthead .ndc-logo-left-primary>img{
  flex:0 1 5cqw;width:5cqw;height:5cqw;min-width:0;object-fit:contain;aspect-ratio:1;
}
.topbar.ndc-shared-masthead .ndc-logo-left-primary>.ndc-sandbox{
  flex-basis:6.5cqw;width:6.5cqw;height:6.5cqw;
}
.topbar.ndc-shared-masthead .ndc-logo-left-agencies{
  display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;
  gap:0;width:100%;min-width:0;
}
.topbar.ndc-shared-masthead .ndc-logo-left-agencies>img{
  flex:0 0 var(--ndc-agency-size);width:var(--ndc-agency-size);height:var(--ndc-agency-size);
  max-width:none;min-width:0;object-fit:contain;aspect-ratio:1;
}
.topbar.ndc-shared-masthead .ndc-logo-right>img,
.topbar.ndc-shared-masthead .ndc-sdg-logo,
.topbar.ndc-shared-masthead .ndc-sdg-logo img{
  width:var(--ndc-agency-size);height:var(--ndc-agency-size);flex-basis:var(--ndc-agency-size);
}
.topbar.ndc-shared-masthead .ndc-header-title .ndc-identity-name,
.topbar.ndc-shared-masthead .ndc-header-title .ndc-transition-tagline{
  font-size:clamp(10px,2.5cqw,40px);
}

/* The homepage overview now lives on one continuous panorama above live cards. */
.topbar.ndc-shared-masthead.ndc-home-masthead{
  background-color:#dff4ff;
  background-image:url('/assets/ndc-header-panorama-v1.webp');
  background-position:center bottom;background-size:cover;background-repeat:no-repeat;
  background-blend-mode:multiply;
  padding-bottom:clamp(130px,11vw,170px);gap:6px;
}
.topbar.ndc-shared-masthead.ndc-home-masthead::before{display:none}
.ndc-home-overview{position:relative;min-width:0;margin-top:4px}
.ndc-home-overview .ndc-dashboard-heading{
  display:block;position:relative;padding:0;margin:0;
  color:#063267;text-align:center;isolation:auto;
}
.ndc-home-overview .ndc-dashboard-heading::before{display:none}
.ndc-home-overview .ndc-dashboard-heading>div{width:68%;margin-inline:auto;min-width:0}
.ndc-home-overview .eyebrow{
  color:#063267;font-size:clamp(10px,1cqw,16px);font-weight:800;letter-spacing:.08em;margin:0;
}
.ndc-home-overview h2{
  font-size:clamp(20px,2.7cqw,44px);line-height:1.4;color:#063267;
  font-weight:850;margin:3px 0;text-shadow:0 1px 2px #fff;
}
.ndc-home-overview .ndc-dashboard-heading>div>p:last-child{
  font-size:clamp(12px,1.3cqw,20px);line-height:1.5;color:#183d64;margin:0;
}
.ndc-home-masthead .ndc-brand-frame>.site-statistics{
  position:absolute;right:0;top:6.9cqw;margin:0!important;
}
.ndc-home-masthead+.public-landing-overview>.ndc-dashboard-shell{
  border-top-left-radius:0;border-top-right-radius:0;
}

/* PPPP is 1.5 times the former desktop size. Text may wrap on small phones. */
.topbar.ndc-shared-masthead>.ndc-masthead-model{
  font-size:clamp(12px,2.6vw,22.5px);inset:auto 12px 8px;gap:7px;
  padding-inline:18px;box-sizing:border-box;align-items:center;text-align:center;
}
.ndc-masthead-model span{white-space:normal;line-height:1.35}
.ndc-model-star{
  display:block;position:absolute;width:clamp(8px,1vw,16px);aspect-ratio:1;
  pointer-events:none;background:radial-gradient(circle,#eaffffb3,transparent 72%);
  filter:drop-shadow(0 0 3px #7eedff);animation:ndc-model-twinkle 3.8s ease-in-out infinite;
}
.ndc-model-star::before{
  content:"";position:absolute;inset:7%;
  clip-path:polygon(50% 0,61% 36%,100% 50%,61% 62%,50% 100%,38% 62%,0 50%,38% 36%);
  background:conic-gradient(#fff,#9eeeff 80deg,#eaffff 90deg,#36b5d4 170deg,#fff 180deg,#a1ebff 255deg,#fff 270deg,#65cde9 345deg,#fff);
}
.ndc-model-star::after{content:"";position:absolute;inset:40%;border-radius:50%;background:#fff}
.ndc-model-star-1{left:1%;top:30%;animation-delay:-.2s}
.ndc-model-star-2{right:1%;top:30%;animation-delay:-1.5s}
.ndc-model-star-3{left:35%;top:-17px;animation-delay:-2.6s}
.ndc-model-star-4{right:35%;top:-17px;animation-delay:-3.2s}
@keyframes ndc-model-twinkle{
  0%,100%{opacity:.38;transform:scale(.82) rotate(-6deg)}
  45%{opacity:1;transform:scale(1.1) rotate(4deg)}
  65%{opacity:.68;transform:scale(.96)}
}
@media(max-width:720px){
  .ndc-home-masthead .ndc-brand-frame>.site-statistics{position:static;margin:5px 0 0 auto!important}
  .ndc-home-overview{margin-top:8px}
  .ndc-home-overview .ndc-dashboard-heading>div{width:100%}
}
@media(min-width:721px) and (max-width:1000px){
  .topbar.ndc-shared-masthead.ndc-home-masthead .ndc-brand-frame>.site-statistics{
    top:5.6cqw;font-size:11px;gap:4px;padding:4px 8px;max-width:29%;
  }
  .topbar.ndc-shared-masthead.ndc-home-masthead .ndc-brand-frame>.site-statistics button{min-width:28px;min-height:28px;font-size:15px}
}
@media(orientation:landscape) and (max-height:600px){
  .topbar.ndc-shared-masthead.ndc-home-masthead{padding-bottom:116px}
  .ndc-home-overview{margin-top:0}
  .ndc-home-masthead .ndc-brand-frame>.site-statistics{
    position:absolute;right:0;top:5.6cqw;margin:0!important;font-size:11px;
  }
  .ndc-home-overview .ndc-dashboard-heading>div{width:68%}
}
@media(max-width:450px){
  .topbar.ndc-shared-masthead .ndc-header-title .ndc-identity-name{font-size:10px}
  .topbar.ndc-shared-masthead .ndc-header-title .ndc-transition-tagline{
    font-size:10px;white-space:normal;line-height:1.5;
  }
  .ndc-home-overview h2{font-size:20px}
  .ndc-home-overview .eyebrow{font-size:9px;letter-spacing:.04em}
}
@media(prefers-reduced-motion:reduce){.ndc-model-star{animation:none;opacity:.85}}
@media print{.ndc-model-star{display:none}}

/* One compact row: dashboard, Home/Exit and history controls share a box size. */
.topbar.ndc-shared-masthead .app-navigation{
  grid-template-columns:repeat(4,52px);gap:5px;width:max-content;max-width:100%;
}
.topbar.ndc-shared-masthead .app-nav-button{
  box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;
  width:52px;height:48px;min-width:0;min-height:48px;padding:3px;gap:1px;
  font-size:11px;line-height:1.25;border-radius:10px;
}
.topbar.ndc-shared-masthead .app-nav-button img{max-width:100%;max-height:24px;object-fit:contain}
.topbar.ndc-shared-masthead .app-nav-dbd{
  color:#075078;background:linear-gradient(150deg,#e1f5ff,#bfe7fb);border-color:#94cfe9;
  font-size:13px;font-weight:800;line-height:1.2;gap:0;box-shadow:inset 0 1px 0 #ffffffb3;
}
.topbar.ndc-shared-masthead .app-nav-dbd>span,
.topbar.ndc-shared-masthead .app-nav-dbd>span:first-child{display:block;font-size:13px;line-height:1.2}
.topbar.ndc-shared-masthead .app-nav-dbd:hover{background:#c7edff}
