.command-header-inner{
  align-items:start;
  grid-template-columns:1fr;
  gap:7px;
}

.primary-nav{
  display:flex !important;
  justify-content:flex-start;
  gap:22px;
  width:100%;
  overflow:visible;
}

.primary-nav button{
  flex:0 0 auto !important;
  min-width:100px;
  padding-inline:16px;
  border-color:transparent !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}

.primary-nav button[aria-pressed="true"]{
  color:var(--accent);
  font-weight:750;
}

.primary-nav button[aria-pressed="true"]::after{
  content:"" !important;
  display:block !important;
  position:absolute;
  left:16px;
  right:16px;
  bottom:0;
  height:2px;
  border-radius:999px;
  background:var(--accent);
}

.primary-nav button::after{
  content:none !important;
  display:none !important;
}

.brand-block img{
  width:58px;
  height:58px;
}

.brand-block h1{
  font-family:var(--font-display);
  font-size:22px;
  font-weight:650;
  letter-spacing:.01em;
}

.primary-nav button:nth-child(3),
.primary-nav button:nth-child(6){
  margin-right:22px;
}

.primary-nav button:nth-child(3)::before,
.primary-nav button:nth-child(6)::before{
  content:"丨";
  display:block !important;
  position:absolute;
  right:-24px;
  top:50%;
  transform:translateY(-50%);
  color:color-mix(in srgb,var(--muted) 45%,transparent);
  font-weight:400;
}

.status-rail{
  display:grid;
  grid-template-rows:repeat(2,minmax(0,1fr));
  gap:14px;
  min-height:500px;
}

.hero-grid{grid-template-columns:minmax(0,7fr) minmax(360px,3fr)}

.status-rail .status-console{
  min-height:0;
  padding:20px 22px;
}

.status-console>.status-console-header,
.mood-protocol-card>header{
  min-height:42px;
  padding-bottom:11px;
  border-bottom:1px solid color-mix(in srgb,var(--line) 62%,transparent);
}

.status-console>.status-console-header h2,
.mood-protocol-card>header h2{
  margin:0;
  font:700 22px/1.2 var(--font-display);
  color:var(--text);
}

.status-filter-grid{
  gap:10px;
  margin:16px 0 0;
}
.status-console>.status-filter-grid{flex:1;align-content:center;margin:10px 0 0}

.status-filter-grid button{
  --status-color:var(--accent);
  grid-template-columns:8px 36px 52px;
  justify-content:center;
  min-height:64px;
  padding:12px 14px;
  border-color:color-mix(in srgb,var(--status-color) 30%,var(--line));
  background:linear-gradient(135deg,color-mix(in srgb,var(--status-color) 9%,white),rgba(255,255,255,.7));
  box-shadow:0 8px 22px color-mix(in srgb,var(--status-color) 8%,transparent);
}

.status-filter-grid [data-status-filter="excellent"]{--status-color:var(--good)}
.status-filter-grid [data-status-filter="ontrack"]{--status-color:var(--accent)}
.status-filter-grid [data-status-filter="thinking"]{--status-color:var(--warn)}
.status-filter-grid [data-status-filter="alert"]{--status-color:var(--bad)}
.status-filter-grid button i{background:var(--status-color);box-shadow:0 0 10px var(--status-color)}
.status-filter-grid span{justify-self:start;font-size:13px}
.status-filter-grid b{justify-self:end;font-size:21px;color:var(--status-color);font-variant-numeric:tabular-nums;text-align:right}

.mood-protocol-card{
  display:flex;
  flex-direction:column;
  padding:18px 22px;
  border-radius:22px;
}

.compact-mood-list{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  flex:1;
  align-content:center;
  margin-top:0;
}

.compact-mood-list button{
  grid-template-columns:38px 36px 52px;
  grid-template-rows:38px;
  column-gap:8px;
  min-height:54px;
  padding:7px;
  justify-content:center;
}

.compact-mood-list img{
  width:38px;
  height:38px;
}

.status-filter-grid span,
.compact-mood-list b{
  font-family:var(--font-body);
  font-size:13px;
  font-weight:650;
}
.compact-mood-list small{justify-self:end;font-size:9px;font-variant-numeric:tabular-nums;text-align:right}
.compact-mood-list b{justify-self:start;text-align:left}
.compact-mood-list b,.compact-mood-list small{align-self:center}

.data-overview{
  height:500px;
  min-height:500px;
}

.overview-metric-stage{
  min-width:0;
  height:100%;
  padding-right:20px;
}

.data-overview-body{grid-template-columns:minmax(288px,.72fr) 0 minmax(360px,1.35fr);gap:0}
.overview-page-slot{position:relative;z-index:3;width:0;min-width:0;height:100%}
.category-overview{padding-left:20px}

.overview-page-toggle{
  position:absolute;
  top:50%;
  left:50%;
  display:grid;
  width:26px;
  height:38px;
  grid-template-rows:21px 8px;
  place-items:center;
  padding:4px 0 2px;
  border:1px solid color-mix(in srgb,var(--accent) 30%,var(--line));
  border-radius:999px;
  background:rgba(255,255,255,.78);
  box-shadow:0 4px 12px rgba(8,127,197,.1);
  color:var(--accent);
  cursor:pointer;
  transform:translate(-50%,-50%);
  transition:border-color .18s var(--ease),box-shadow .18s var(--ease),transform .18s var(--ease);
}
.overview-page-toggle span{font:500 21px/1 var(--font-display)}
.overview-page-toggle small{color:var(--muted);font:700 7px/1 var(--font-body);letter-spacing:.02em}
.overview-page-toggle:hover,.overview-page-toggle[data-direction="previous"]:hover{border-color:color-mix(in srgb,var(--accent) 58%,var(--line));box-shadow:0 5px 14px rgba(8,127,197,.14);transform:translate(-50%,-50%) scale(1.03)}
.overview-page-toggle:active{transform:translate(-50%,-50%) scale(.96)}
.overview-page-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

.business-module-section{margin-top:28px}
.business-module-nav{
  display:flex;
  gap:7px;
  padding:6px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  border:1px solid var(--line);
  border-radius:15px;
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(255,255,255,.84));
  box-shadow:0 8px 24px rgba(8,127,197,.06);
  scrollbar-width:thin;
}
.business-module-nav button{
  flex:0 0 auto;
  min-height:44px;
  padding:0 17px;
  border:1px solid transparent;
  border-radius:10px;
  background:transparent;
  color:var(--muted);
  font:650 12px/1 var(--font-body);
  cursor:pointer;
  white-space:nowrap;
  transition:border-color .18s var(--ease),background .18s var(--ease),color .18s var(--ease),transform .18s var(--ease);
}
.business-module-nav button:hover{border-color:color-mix(in srgb,var(--accent) 34%,var(--line));color:var(--text);transform:translateY(-1px)}
.business-module-nav button[aria-selected="true"]{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 11%,white);color:var(--text);box-shadow:0 6px 16px rgba(8,127,197,.1)}
.business-module-nav button:active{transform:translateY(0) scale(.98)}
.business-module-nav button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.module-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:14px}
.module-metric-grid .project-card{min-height:170px}
.ranking-panel-full{width:100%;margin-top:28px}

.category-overview{
  display:flex;
  min-height:0;
  flex-direction:column;
}

.category-overview-list{
  display:flex;
  min-height:0;
  flex:1;
  margin-top:0;
}

.category-overview-scroll.overview-series{
  display:grid;
  width:100%;
  height:100%;
  max-height:none;
  grid-auto-rows:minmax(36px,1fr);
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-gutter:stable;
}

.category-overview-row,
.category-overview-row.with-subline{
  min-height:0;
  padding-block:6px;
}

.category-overview-row>b{font-size:12px}
.category-overview-row>span{height:7px}
.category-overview-row>strong{font-size:12px}
.category-overview-row.with-subline>strong small{font-size:9px}
.category-overview-row.dual-metric{
  grid-template-columns:82px minmax(0,1fr) 132px;
  grid-template-rows:minmax(13px,1fr) minmax(10px,.72fr);
  column-gap:8px;
  row-gap:3px;
  padding-block:4px;
}
.category-overview-row.dual-metric>b{
  grid-column:1;
  grid-row:1 / -1;
  align-self:center;
}
.category-overview-row.dual-metric>.primary-bar{grid-column:2;grid-row:1}
.category-overview-row.dual-metric>strong{grid-column:3;grid-row:1;align-self:center}
.category-overview-row.dual-metric>.secondary-bar{
  grid-column:2;
  grid-row:2;
  align-self:center;
  height:3px;
  background:color-mix(in srgb,var(--warn) 10%,transparent);
}
.category-overview-row.dual-metric>.secondary-bar i{
  background:linear-gradient(90deg,var(--warn),color-mix(in srgb,var(--warn) 55%,var(--bad)));
}
.category-overview-row.dual-metric>.secondary-value{
  grid-column:3;
  grid-row:2;
  align-self:center;
  overflow:hidden;
  color:var(--muted);
  font-size:9px;
  line-height:1;
  text-align:right;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.category-overview-empty{width:100%;min-height:100%}
.data-overview-body{align-items:stretch}
.data-overview-body{width:100%;overflow:hidden}
.overview-metric-list{height:100%;min-width:0;grid-template-rows:repeat(3,minmax(0,1fr))}
.overview-metric-card{min-height:0}
.category-overview,.category-overview-list,.category-overview-scroll.overview-series{height:100%}
.category-overview-row.no-detail{grid-template-columns:82px minmax(0,1fr) 132px}
.category-overview-row.has-status{grid-template-columns:82px minmax(0,1fr) 132px}
.category-overview-row.has-status>strong{display:grid;gap:2px}
.category-overview-row.has-status>strong small{display:block;color:var(--muted);font:400 8px var(--font-body)}
.category-overview-list{max-height:none}
.category-overview-scroll.overview-series{grid-auto-rows:minmax(0,1fr)}
.overview-card-meter.is-removed{display:none}
.scope-filter-grid{grid-template-columns:repeat(5,minmax(0,1fr))}

@media(max-width:1100px){
  .hero-grid{grid-template-columns:1fr}
  .primary-nav{overflow-x:auto}
  .primary-nav button{min-width:106px}
  .status-rail{min-height:420px}
  .scope-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .module-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:760px){
  .primary-nav{gap:10px}
  .primary-nav button:nth-child(3),
  .primary-nav button:nth-child(6){margin-right:12px}
  .primary-nav button:nth-child(3)::before,
  .primary-nav button:nth-child(6)::before{right:-12px}
  .brand-block img{width:50px;height:50px}
  .data-overview{height:auto;min-height:0}
  .overview-metric-stage{height:330px;padding-right:0}
  .data-overview-body{grid-template-columns:1fr;gap:8px}
  .overview-page-slot{display:grid;width:auto;height:30px;place-items:center}
  .category-overview{height:332px;min-height:332px;flex:none;padding:13px 0 0}
  .overview-page-toggle{position:static;width:30px;height:30px;grid-template-rows:1fr;padding:0;transform:none}
  .overview-page-toggle small{display:none}
  .overview-page-toggle:hover,.overview-page-toggle[data-direction="previous"]:hover{transform:none}
  .overview-page-toggle:active{transform:scale(.96)}
  .status-rail{min-height:0;grid-template-rows:auto auto}
  .compact-mood-list{grid-template-columns:repeat(2,minmax(112px,1fr))}
  .status-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .category-overview-row.dual-metric,
  .category-overview-row.no-detail,
  .category-overview-row.has-status{grid-template-columns:68px minmax(0,1fr) 114px}
  .scope-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .business-module-section{margin-top:22px}
  .business-module-nav{padding:5px}
  .business-module-nav button{min-height:44px;padding-inline:14px}
  .module-metric-grid{grid-template-columns:1fr;gap:10px;margin-top:12px}
  .ranking-panel-full{margin-top:22px}
}
