/* Shared responsive sizing. Loaded last so cards, chrome, and controls
   follow content and the viewport instead of fixed empty heights. */

:root{
  --card-pad:clamp(.7rem,1.1vw,1rem);
  --card-gap:.65rem;
  --card-radius:.8rem;
  --control-h:2.75rem;
  --icon-btn:2.75rem;
  --content-max:90rem;
}

html,body{max-width:100%}
.app-frame{
  --agri-sidebar-width:clamp(13.25rem,16vw,16rem);
}
/* A nested shell must not paint a second main menu beside the frame sidebar. */
body.has-app-sidebar .app-frame-main .app-shell>.sidebar{
  display:none;
}

/* Content stays centered on wide screens and full-width when narrower. */
.workspace,
.management-main{
  width:min(100%,var(--content-max));
  max-width:100%;
  margin-inline:auto;
  box-sizing:border-box;
}

/* Cards size to their content. Grids share width, not empty height. */
:is(.surface,.metric-card,.cc-card,.cc-panel,.readiness-strip,.hub-card,.public-card){
  min-height:0;
  height:auto;
  box-sizing:border-box;
}
.metric-card,
.farm-metrics .metric-card,
.sales-metrics .metric-card,
.quality-metrics .metric-card,
.inventory-metrics .metric-card,
.procurement-metrics .metric-card,
.dashboard-metrics .metric-card{
  min-height:0;
  height:auto;
  align-content:start;
  padding:var(--card-pad);
}
.cc-card,
.cc-kpis .surface,
.cc-panel,
.cc-bottom .surface,
.readiness-strip{
  padding:var(--card-pad) clamp(.8rem,1.4vw,1.05rem);
}
.readiness-strip{
  align-items:center;
  justify-content:flex-start;
  gap:.65rem;
  margin-top:.75rem;
}
.readiness-strip>div{
  flex:1 1 auto;
  min-inline-size:0;
  min-block-size:0;
}
:is(.surface,.cc-card,.cc-panel,.metric-card,.readiness-strip) :is(h1,h2,h3){
  margin-block:0 .2rem;
  line-height:1.25;
  overflow-wrap:break-word;
}
.cc-kpis .surface :is(h1,h2,h3){
  font-size:clamp(.95rem,1vw,1.15rem);
}
.cc-kpis .surface strong,
.cc-card strong{
  line-height:1.15;
}

:is(
  .cc-attention,
  .cc-kpis,
  .metric-grid,
  .hub-grid,
  .cc-quick
){
  align-items:stretch;
  align-content:start;
  gap:var(--card-gap);
}
.dashboard-setup > .dashboard-setup-steps{
  grid-template-columns:repeat(auto-fill,minmax(min(100%,14rem),17rem));
  justify-content:start;
}
.dashboard-setup > .dashboard-setup-steps > .dashboard-setup-step{
  grid-column:auto;
  max-width:17rem;
}
:is(.cc-attention,.cc-kpis,.metric-grid,.hub-grid,.dashboard-setup-steps) > :is(a,article,.surface,.hub-card,.metric-card,.cc-card){
  min-width:0;
  height:100%;
  overflow-wrap:break-word;
}
.workspace,
.management-main{
  container-type:inline-size;
  container-name:page-cards;
}
:is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis),
.section-action-group > .section-action-grid,
nav.dashboard-quick.section-action-grid,
.workspace > .admin-grid.hub-grid,
.management-main > .admin-grid.hub-grid{
  grid-template-columns:repeat(12,minmax(0,1fr));
}
:is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis) > *,
.section-action-group > .section-action-grid > *,
nav.dashboard-quick.section-action-grid > *{
  grid-column:span 3;
  min-width:0;
}
:is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis) > :last-child:nth-child(4n+1),
.section-action-group > .section-action-grid > :last-child:nth-child(4n+1),
nav.dashboard-quick.section-action-grid > :last-child:nth-child(4n+1){
  grid-column:1 / -1;
}
:is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis) > :nth-last-child(2):nth-child(4n+1),
:is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis) > :last-child:nth-child(4n+2),
.section-action-group > .section-action-grid > :nth-last-child(2):nth-child(4n+1),
.section-action-group > .section-action-grid > :last-child:nth-child(4n+2),
nav.dashboard-quick.section-action-grid > :nth-last-child(2):nth-child(4n+1),
nav.dashboard-quick.section-action-grid > :last-child:nth-child(4n+2){
  grid-column:span 6;
}
:is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis) > :nth-last-child(3):nth-child(4n+1),
:is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis) > :nth-last-child(2):nth-child(4n+2),
:is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis) > :last-child:nth-child(4n+3),
.section-action-group > .section-action-grid > :nth-last-child(3):nth-child(4n+1),
.section-action-group > .section-action-grid > :nth-last-child(2):nth-child(4n+2),
.section-action-group > .section-action-grid > :last-child:nth-child(4n+3),
nav.dashboard-quick.section-action-grid > :nth-last-child(3):nth-child(4n+1),
nav.dashboard-quick.section-action-grid > :nth-last-child(2):nth-child(4n+2),
nav.dashboard-quick.section-action-grid > :last-child:nth-child(4n+3){
  grid-column:span 4;
}
.cc-bottom,
.dashboard-readiness-row{
  grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr));
}
.quality-hero{
  grid-template-columns:minmax(0,1fr) auto;
  gap:clamp(.8rem,2vw,2rem);
  padding:clamp(1rem,2vw,1.7rem);
}
.readiness-orb{
  width:clamp(6rem,12vw,9rem);
  height:auto;
  aspect-ratio:1;
}

/* Buttons and icon controls. Touch size stays at least 44px. */
:is(.primary-button,.secondary-button,.danger-button,.approve-button,.text-button){
  min-height:var(--control-h);
  height:auto;
  max-width:100%;
}
:is(
  .page-assistants-link,
  .theme-toggle,
  .language-flag-btn,
  .sidebar-collapse,
  .shell-action,
  .shell-preferences .context-guide-launcher,
  .shell-preferences .theme-toggle,
  .shell-preferences .language-flag-btn
){
  width:var(--icon-btn);
  min-width:var(--icon-btn);
  height:var(--icon-btn);
  min-height:var(--icon-btn);
}
html[data-sidebar=collapsed] .sidebar-history-btn{
  width:var(--icon-btn);
  min-width:var(--icon-btn);
  height:var(--icon-btn);
}

/* AI and Voice live in the top bar. Do not keep the old corner gutter
   between the page and the vertical scrollbar. */
.page-assistants{
  display:none;
}
body.has-app-sidebar .app-frame-main>.app-shell{
  padding-inline-end:0;
}
body.has-app-sidebar .app-frame .management-shell>.management-main{
  padding-inline-end:clamp(1rem,2vw,1.75rem);
}
.shell-preferences :is(.shell-ai-setup,.shell-voice,.page-assistants-link){
  position:static;
  border-radius:.6rem;
  box-shadow:none;
}
.shell-preferences.shell-preferences--header :is(
  .theme-toggle,
  .language-flag-btn,
  .context-guide-launcher,
  .shell-action,
  .shell-voice,
  .shell-ai-setup,
  button[data-theme-toggle]
){
  width:var(--chrome-btn,var(--icon-btn));
  min-width:var(--chrome-btn,var(--icon-btn));
  height:var(--chrome-btn,var(--icon-btn));
  min-height:var(--chrome-btn,var(--icon-btn));
  padding:0;
  flex:0 0 auto;
}

/* Top bar stays one row. Search gives up width before any control wraps. */
.app-frame-main>.shell-chrome,
body>.shell-chrome.is-placed{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:.35rem;
  min-height:0;
  max-width:100%;
  height:auto;
  overflow:visible;
  box-sizing:border-box;
}
.shell-chrome .shell-preferences,
.shell-chrome .shell-preferences.shell-preferences--header{
  --chrome-btn:var(--icon-btn);
  display:flex;
  flex:1 1 auto;
  flex-wrap:nowrap;
  align-items:center;
  gap:.35rem;
  min-width:0;
  max-width:100%;
  width:100%;
  margin-inline-start:0;
  box-sizing:border-box;
}
.shell-chrome .global-search{
  flex:1 1 0;
  min-width:0;
  max-width:22rem;
  width:auto;
}
.shell-chrome .shell-preferences > :not(.global-search){
  flex:0 0 auto;
}
.shell-chrome .user-menu-trigger{
  width:var(--chrome-btn);
  min-width:var(--chrome-btn);
  height:var(--chrome-btn);
  min-height:var(--chrome-btn);
  box-sizing:border-box;
}
.shell-chrome .global-search .abos-page-search,
.shell-chrome .global-search .abos-page-search input{
  width:100%;
  min-width:0;
  max-width:100%;
  min-height:var(--chrome-btn,var(--control-h));
  height:var(--chrome-btn,var(--control-h));
  box-sizing:border-box;
}
:is(form,.field-stack,.compact-form,.global-search) :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]){
  max-width:100%;
  min-width:0;
}
:is(form,.field-stack,.compact-form,.global-search) :is(input,select):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]){
  min-height:var(--control-h);
}
.shell-chrome .global-search input[type=search]{
  min-height:var(--chrome-btn,var(--control-h));
  height:var(--chrome-btn,var(--control-h));
}

/* Menus, tables, dialogs, tabs, badges, empty states, AI panel. */
:is(.abos-new-menu,.language-flag-menu,.user-menu-popover,.body-picker-panel){
  max-width:min(22rem,calc(100vw - 1.5rem));
  max-height:min(70dvh,28rem);
  overflow:auto;
}
:is(.stock-table,.ledger-list,.data-list,.table-wrap,.usage-table){
  max-width:100%;
  overflow-x:auto;
}
:is(dialog,.register-guide-dialog,.ai-window-dialog){
  max-width:min(40rem,calc(100vw - 1.5rem));
  max-height:min(90dvh,100%);
}
[role=tablist]{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
  max-width:100%;
}
[role=tab]{min-height:var(--control-h)}
:is(.state-badge,.cc-band,.badge){
  flex-shrink:0;
  max-width:none;
  white-space:nowrap;
  overflow-wrap:normal;
  word-break:normal;
}
.cc-rows a{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  gap:.5rem;
  min-width:0;
  max-width:100%;
}
.cc-rows a > span{
  flex:1 1 auto;
  min-width:0;
  unicode-bidi:isolate;
  overflow-wrap:break-word;
  text-align:start;
}
.cc-rows a > :is(small,em,.cc-band,time){
  flex:0 0 auto;
  margin-inline-start:auto;
  white-space:nowrap;
  unicode-bidi:isolate;
}
:is(.data-list,.notification-list,.ledger-list) :is(span,small,time,em){
  unicode-bidi:isolate;
}
.app-frame-main,
.workspace,
.management-main,
:is(.surface,.cc-card,.cc-panel,.readiness-strip,.metric-card,.cc-rows){
  min-width:0;
  max-width:100%;
}
.app-frame :is(.table-scroll,.usage-table-wrap,.data-table-wrap,.responsive-table-region,.horizontal-scroll){
  max-width:100%;
  min-width:0;
  overflow-x:auto;
}
.empty-state{
  min-height:0;
  height:auto;
  padding:clamp(1rem,3vw,1.75rem) clamp(.75rem,2vw,1.25rem);
}
.ai-window{
  width:min(28.5rem,calc(100vw - 1.5rem));
  max-height:calc(100dvh - 6rem);
  inset-inline-end:.75rem;
}
@media (max-width:768px){
  .ai-window{
    inset:0;
    width:100vw;
    max-width:100vw;
    max-height:none;
  }
}
.context-guide{
  inset-inline-end:.75rem;
  width:min(20.5rem,calc(100vw - 1.5rem));
}
[dir=rtl] .context-guide{
  inset-inline-end:.75rem;
}

@media(max-width:1100px){
  .app-frame{--agri-sidebar-width:13rem}
}
@media(max-width:900px){
  .quality-hero{grid-template-columns:minmax(0,1fr)}
  .readiness-orb{justify-self:start}
  .app-frame,
  html[data-sidebar=collapsed] .app-frame{
    --agri-sidebar-width:0;
    grid-template-columns:minmax(0,1fr)!important;
  }
  .app-frame-main{
    box-sizing:border-box;
    padding-inline-start:4rem;
  }
  .app-frame>.sidebar{
    position:fixed!important;
    top:0!important;
    bottom:0!important;
    inset-inline-start:0!important;
    inset-inline-end:auto!important;
    z-index:95;
    height:100dvh;
    width:min(18rem,calc(100vw - 3rem))!important;
    max-width:calc(100vw - 3rem)!important;
  }
  html[data-sidebar=collapsed] .app-frame>.sidebar{
    width:4rem!important;
    max-width:4rem!important;
  }
}
.app-frame>.sidebar{
  display:flex;
  flex-direction:column;
  max-height:100dvh;
  overflow:hidden;
}
.app-frame>.sidebar>.sidebar-nav{
  flex:1 1 0!important;
  min-height:0!important;
  overflow-x:hidden;
  overflow-y:auto;
}
.app-frame>.sidebar>.sidebar-foot{
  flex:0 0 auto;
  margin-top:0;
  min-width:0;
}
html[data-sidebar=collapsed] .app-frame>.sidebar details.ws>summary.ws-summary{
  justify-content:center;
  gap:0;
  padding:.4rem .15rem;
  min-width:0;
}
html[data-sidebar=collapsed] .app-frame>.sidebar .ws-ico{
  width:1.25rem;
  height:1.25rem;
  flex:0 0 1.25rem;
  margin-inline:auto;
}
html[data-sidebar=collapsed] .sidebar-foot{
  justify-content:center;
  padding-inline:.15rem;
}
/* Metric row and the cards under it share one vertical edge.
   Four equal measures on top, two equal cards below, same gap. */
.management-main > .metric-grid,
.app-frame .metric-grid,
.app-frame .hub-grid,
.app-frame .admin-grid.hub-grid,
.farm-ops-shell .farm-metrics,
.receiving-shell .farm-metrics,
.processing-shell .farm-metrics,
.sales-shell .farm-metrics{
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:var(--card-gap);
  width:100%;
}
.management-main > .admin-grid,
.app-frame .admin-grid,
.farm-ops-shell .admin-grid,
.receiving-shell .admin-grid,
.processing-shell .admin-grid,
.sales-shell .admin-grid,
.workspace > .admin-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--card-gap);
  width:100%;
  align-items:stretch;
  margin-top:var(--card-gap);
}
.management-main > .admin-grid > .surface,
.app-frame .admin-grid > .surface,
.workspace > .admin-grid > .surface{
  width:100%;
  min-width:0;
  max-width:none;
  box-sizing:border-box;
}
@media(max-width:760px){
  .management-main > .admin-grid,
  .app-frame .admin-grid,
  .farm-ops-shell .admin-grid,
  .receiving-shell .admin-grid,
  .processing-shell .admin-grid,
  .sales-shell .admin-grid,
  .workspace > .admin-grid{
    grid-template-columns:minmax(0,1fr);
  }
}
@media(max-width:420px){
  .cc-rows a{flex-wrap:wrap;align-items:center}
  .cc-rows a > :is(small,em,.cc-band,time){margin-inline-start:0}
}
@media(max-width:760px){
  .workspace{padding:1rem .75rem 1.5rem}
  .app-frame-main>.shell-chrome,
  body>.shell-chrome.is-placed{
    overflow:visible;
    min-height:0;
    height:auto;
    padding-inline:.4rem;
  }
  .shell-chrome .shell-preferences,
  .shell-chrome .shell-preferences.shell-preferences--header{
    --chrome-btn:2.25rem;
    min-width:0;
    width:100%;
    margin-inline-start:0;
    gap:.25rem;
  }
}
@media(max-width:380px){
  .shell-chrome .shell-preferences,
  .shell-chrome .shell-preferences.shell-preferences--header{
    --chrome-btn:2rem;
    gap:.15rem;
  }
}

/* Boards fill the row. A later full-width panel must not leave phantom tracks. */
:is(.farm-board,.inventory-board,.procurement-board,.sales-board,.production-grid,.workforce-grid){
  display:grid;
  width:100%;
  max-width:100%;
  min-width:0;
  align-items:stretch;
  align-content:start;
  gap:var(--card-gap);
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.farm-board{
  grid-template-columns:repeat(6,minmax(0,1fr));
}
.farm-board > :not(.wide-panel){
  grid-column:span 2;
}
:is(.farm-board,.inventory-board,.procurement-board,.sales-board,.production-grid,.workforce-grid)>:is(.wide-panel,.surface){
  min-width:0;
  max-width:100%;
}
:is(.farm-board,.inventory-board,.procurement-board,.sales-board,.production-grid,.workforce-grid)>.wide-panel{
  grid-column:1 / -1;
}
:is(.farm-panel,.inventory-panel,.procurement-panel,.sales-panel,.farm-board>.surface,.production-grid>.surface,.workforce-grid>.surface){
  container-type:inline-size;
  container-name:board-panel;
  min-width:0;
  max-width:100%;
  overflow:hidden;
}
.surface-header{
  flex-wrap:wrap;
  align-items:flex-start;
  gap:.5rem .75rem;
  min-width:0;
}
.surface-header>div{
  flex:1 1 8rem;
  min-width:0;
}
.surface-header :is(h2,h3,p){
  overflow-wrap:anywhere;
}

/* Record rows shrink their text instead of painting over badges. */
.farm-row,
.farm-row-link{
  grid-template-columns:auto minmax(0,1fr) auto auto;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}
.farm-row>.farm-code{
  display:grid;
  place-items:center;
  flex:none;
  width:2.65rem;
  min-width:2.65rem;
  height:2.65rem;
}
.farm-row>:is(span,div):not(.farm-code):not(.state-badge):not(.text-button),
.farm-row>:not(.farm-code) :is(strong,small,span,p){
  min-width:0;
  overflow-wrap:anywhere;
}
.farm-list{
  min-width:0;
  max-width:100%;
}
:is(.quality-list>div,.data-list>div,.compact-list>div,.quote-card,.operation-timeline>div){
  min-width:0;
  max-width:100%;
}
.quality-list>div>span,
.data-list>div>span,
.compact-list>div>span{
  flex:1 1 auto;
  min-width:0;
  overflow-wrap:anywhere;
}
:is(.quality-list>div,.data-list>div,.compact-list>div)>b{
  flex:0 1 auto;
  min-width:0;
  max-width:45%;
  overflow-wrap:anywhere;
  text-align:end;
}
.quote-card{
  grid-template-columns:minmax(0,1fr) auto auto;
}
.operation-timeline>div{
  grid-template-columns:auto minmax(0,1fr) auto;
}
:is(.farm-row,.quality-list,.data-list,.compact-list,.split-list,.quote-card) .state-badge{
  flex-shrink:1;
  max-width:8rem;
  white-space:normal;
  overflow-wrap:anywhere;
  line-height:1.2;
  text-align:center;
}
.surface-header .state-badge{
  flex-shrink:0;
  max-width:none;
  white-space:nowrap;
}
.split-list>div,
.seed-grid>div,
.receipt-cards>div,
.split-list :is(p,strong,small){
  min-width:0;
  max-width:100%;
  overflow-wrap:anywhere;
}
.split-list:has(>div){
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.seed-grid,
.receipt-cards{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.cycle-table{
  max-width:100%;
  overflow-x:auto;
}
.cycle-table>div{
  grid-template-columns:minmax(5.5rem,1fr) minmax(5.5rem,1.15fr) minmax(5.5rem,1.5fr) minmax(5.5rem,1fr) minmax(4.5rem,.75fr);
  min-width:32rem;
}
.cycle-table>div>*{
  min-width:0;
  overflow-wrap:anywhere;
}
@container board-panel (max-width:22rem){
  .split-list:has(>div),
  .seed-grid,
  .receipt-cards,
  .step-track{
    grid-template-columns:minmax(0,1fr);
  }
  .split-list:has(>div)>div+div{
    border-inline-start:0;
    padding-inline-start:0;
  }
}
@media (max-width:760px){
  .farm-row .state-badge{
    display:inline-flex;
  }
  .split-list:has(>div),
  .seed-grid,
  .receipt-cards{
    grid-template-columns:minmax(0,1fr);
  }
  .split-list:has(>div)>div+div{
    border-inline-start:0;
    padding-inline-start:0;
  }
}
@container page-cards (max-width:72rem){
  :is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis),
  .section-action-group > .section-action-grid,
  nav.dashboard-quick.section-action-grid,
  .workspace > .admin-grid.hub-grid,
  .management-main > .admin-grid.hub-grid{
    grid-template-columns:repeat(6,minmax(0,1fr));
  }
  :is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis):is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis) > :nth-child(n),
  .section-action-group > .section-action-grid > :nth-child(n):nth-child(n),
  nav.dashboard-quick.section-action-grid > :nth-child(n):nth-child(n){
    grid-column:span 2;
  }
  :is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis) > :last-child:nth-child(3n+1),
  .section-action-group > .section-action-grid > :last-child:nth-child(3n+1),
  nav.dashboard-quick.section-action-grid > :last-child:nth-child(3n+1){
    grid-column:1 / -1;
  }
  :is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis) > :nth-last-child(2):nth-child(3n+1),
  :is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis) > :last-child:nth-child(3n+2),
  .section-action-group > .section-action-grid > :nth-last-child(2):nth-child(3n+1),
  .section-action-group > .section-action-grid > :last-child:nth-child(3n+2),
  nav.dashboard-quick.section-action-grid > :nth-last-child(2):nth-child(3n+1),
  nav.dashboard-quick.section-action-grid > :last-child:nth-child(3n+2){
    grid-column:span 3;
  }
}
@container page-cards (max-width:48rem){
  :is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis,.farm-board),
  .section-action-group > .section-action-grid,
  nav.dashboard-quick.section-action-grid,
  .admin-grid:not(.hub-grid),
  .workspace > .admin-grid.hub-grid,
  .management-main > .admin-grid.hub-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  :is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis,.farm-board):is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis,.farm-board) > :nth-child(n):not(.wide-panel),
  .section-action-group > .section-action-grid > :nth-child(n):nth-child(n),
  nav.dashboard-quick.section-action-grid > :nth-child(n):nth-child(n){
    grid-column:auto;
  }
  :is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis):is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis) > :last-child:nth-child(odd),
  .section-action-group > .section-action-grid > :last-child:nth-child(odd),
  nav.dashboard-quick.section-action-grid > :last-child:nth-child(odd){
    grid-column:1 / -1;
  }
  .farm-board > .wide-panel,
  :is(.inventory-board,.procurement-board,.sales-board,.production-grid,.workforce-grid) > .wide-panel{
    grid-column:1 / -1;
  }
}
@container page-cards (max-width:40rem){
  :is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis,.farm-board,.inventory-board,.procurement-board,.sales-board,.production-grid,.workforce-grid),
  .section-action-group > .section-action-grid,
  nav.dashboard-quick.section-action-grid,
  .admin-grid:not(.hub-grid),
  .workspace > .admin-grid.hub-grid,
  .management-main > .admin-grid.hub-grid{
    grid-template-columns:minmax(0,1fr);
  }
  :is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis,.farm-board):is(.hub-grid,.metric-grid,.cc-attention,.cc-kpis,.farm-board) > :nth-child(n):nth-child(n):not(.wide-panel),
  .section-action-group > .section-action-grid > :nth-child(n):nth-child(n),
  nav.dashboard-quick.section-action-grid > :nth-child(n):nth-child(n){
    grid-column:auto;
  }
  .farm-board > .wide-panel,
  :is(.inventory-board,.procurement-board,.sales-board,.production-grid,.workforce-grid) > .wide-panel{
    grid-column:1 / -1;
  }
}
@container section-actions (max-width:22rem){
  .section-action-group > .section-action-grid > :nth-child(n):nth-child(n){
    grid-column:auto;
  }
}
.dashboard-setup > .dashboard-setup-steps{
  grid-template-columns:repeat(auto-fill,minmax(min(100%,14rem),17rem));
  justify-content:start;
}
.dashboard-setup > .dashboard-setup-steps > .dashboard-setup-step{
  grid-column:auto;
  max-width:17rem;
}
/* Land summaries include six measures; size them by the available pane width. */
.app-frame .farm-land-shell .metric-grid.farm-metrics{
  grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr));
}
.app-frame .farm-land-shell .metric-grid.farm-metrics > .metric-card:nth-child(n):nth-child(n){
  grid-column:auto;
}
