/* Dashboard-only layout. Canonical Global Shell remains unchanged. */
.nclcd-page:not(.nclcd-display-active) .nclcd-tabs {
  top: var(--nclcd-shell-clearance, 100px);
}
.nclcd-page .nclcd-map-console {
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
}
body.nclcd-display-active .nclcd-tab-panels { clip-path: none !important; }
/* Presentation profiles also need five rows after readouts leave the map. */
body.nclcd-page.nclcd-display-active .nclcd-map-console {
  grid-template-rows: auto auto minmax(0, 1fr) auto auto !important;
}
body.nclcd-page.nclcd-display-active .nclcd-map-console > .nclcd-map-readout {
  max-width: none !important;
}
.nclcd-page .nclcd-map-console > .nclcd-map-readout {
  position: static;
  inset: auto;
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.nclcd-page .nclcd-map-console > .nclcd-map-readout--top {
  margin-bottom: 8px;
}
.nclcd-page .nclcd-map-console > .nclcd-map-readout--bottom {
  margin-top: 8px;
  align-items: flex-start;
}
.nclcd-page .nclcd-map-readout--bottom i { margin-top: 5px; }
.nclcd-page .nclcd-map-readout--bottom span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.nclcd-page:not(.nclcd-display-active) .nclcd-map-console > header,
.nclcd-page:not(.nclcd-display-active) .nclcd-console-card > header {
  flex-wrap: wrap;
  gap: 10px;
}
.nclcd-page:not(.nclcd-display-active) .nclcd-map-console > header > div {
  flex: 1 1 240px;
  min-width: 0;
}
.nclcd-page:not(.nclcd-display-active) .nclcd-map-status { margin-left: auto; }
.nclcd-page:not(.nclcd-display-active) .nclcd-console-card > header > div {
  flex: 1 1 120px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.nclcd-page:not(.nclcd-display-active) .nclcd-console-card > header > .nclcd-tier-badge {
  flex: 0 0 auto;
}
.nclcd-page:not(.nclcd-display-active) .nclcd-map-feedback {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
/* Keep the embedded GIS status clear of Leaflet's source attribution. */
body.is-command-embed .map-status { bottom: 36px; }

/* Laptop GIS stays within the viewport instead of stretching with side cards. */
@media (min-width:981px) and (min-height:600px) {
 body.nclcd-page:not(.nclcd-display-active) #overview { overflow:visible; }
 body.nclcd-page:not(.nclcd-display-active) #portfolio-map { position:sticky; top:var(--nclcd-map-top,200px); align-self:start; height:min(760px,var(--nclcd-map-room,calc(100vh - 220px))); min-height:0; max-height:none; grid-template-rows:auto auto minmax(0,1fr) auto auto; }
 body.nclcd-page:not(.nclcd-display-active) #portfolio-map .nclcd-map-stage, body.nclcd-page:not(.nclcd-display-active) #portfolio-map iframe { min-height:0; min-width:0; }
 body.nclcd-page:not(.nclcd-display-active) #portfolio-map .nclcd-map-details[open] { max-height:120px; overflow-y:auto; }
}

/* Presentation cards retain usable content rows and wrapping. */
html.nclcd-fitted-root body.nclcd-fitted-mode:not(.nclcd-reading-mode) #community .nclcd-cost-card {display:grid!important;grid-template-rows:auto minmax(44px,1fr) auto!important;gap:4px!important;}
html.nclcd-fitted-root body.nclcd-fitted-mode:not(.nclcd-reading-mode) #community .nclcd-cost-card > header {margin:0!important;}
html.nclcd-fitted-root body.nclcd-fitted-mode:not(.nclcd-reading-mode) #community .nclcd-cost-stages {height:auto!important;margin:0!important;grid-template-rows:minmax(0,1fr)!important;}
html.nclcd-fitted-root body.nclcd-fitted-mode:not(.nclcd-reading-mode) #community .nclcd-cost-card > .nclcd-empty-state {margin:0!important;padding:4px 6px!important;line-height:1.25!important;}
html.nclcd-fitted-root body.nclcd-fitted-mode #governance .nclcd-rights-readiness-card li > b {min-width:0;white-space:normal!important;overflow-wrap:anywhere;}
html.nclcd-fitted-root body.nclcd-fitted-mode #governance .nclcd-decision-chain-card > p {grid-template-columns:8px minmax(0,1fr) minmax(0,.55fr)!important;}
html.nclcd-fitted-root body.nclcd-fitted-mode #governance .nclcd-decision-chain-card > p b {min-width:0;white-space:normal!important;overflow-wrap:anywhere;}
