/* 0.20.77 enterprise maturity pass.
   One density scale, one hierarchy and the same interaction geometry on web and mobile. */
:root{
  --mature-radius:10px;
  --mature-control:38px;
  --mature-row:68px;
  --mature-page-x:28px;
}

/* Calm, predictable controls. */
:where(.primary-button,.quiet-button,.icon-button,.information-view,.kb-ledger-view,.board-card){
  transition:background-color var(--motion-base) ease,border-color var(--motion-base) ease,color var(--motion-base) ease,box-shadow var(--motion-base) ease,transform var(--motion-fast) ease;
}
:where(.primary-button,.quiet-button,.information-view,.kb-ledger-view):focus-visible{
  outline:2px solid var(--action);
  outline-offset:2px;
}

/* Board hub: useful density instead of oversized marketing cards. */
#boards-view .board-list-page .board-group>h2{
  padding:14px 2px 8px;
}
#boards-view .board-list-page .board-grid{
  gap:10px;
  margin-bottom:12px;
}
#boards-view .board-list-page .board-card{
  min-height:116px;
  padding:13px 14px 11px;
  gap:0;
  border-radius:var(--mature-radius);
  box-shadow:none;
}
#boards-view .board-list-page .board-card-icon{
  width:30px;
  height:30px;
  border-radius:8px;
}
#boards-view .board-list-page .board-card-icon svg{width:16px;height:16px}
#boards-view .board-card-copy{padding:6px 0 5px}
#boards-view .board-list-page .board-card strong{
  margin-bottom:3px;
  font-size:14px;
  line-height:1.35;
}
#boards-view .board-card-copy>span{
  min-height:18px;
  -webkit-line-clamp:1;
  font-size:11px;
}
#boards-view .board-card-footer{
  padding-top:5px;
  font-size:11px;
}

/* Brand profile: one document, divided into sections; no wall of floating cards. */
.brand-profile-layout{
  gap:18px;
  max-width:1120px;
}
.brand-fields,.brand-assets{gap:0}
.brand-group{
  padding:18px 4px;
  border:0;
  border-bottom:1px solid var(--line);
  border-radius:0;
  background:transparent;
}
.brand-group:first-child{padding-top:4px}
.brand-group h2{
  margin-bottom:10px;
  font-size:13px;
  letter-spacing:.01em;
}
.brand-group-hint{margin-bottom:10px}
.brand-field{
  grid-template-columns:116px minmax(0,1fr);
  gap:16px;
  padding:7px 0;
}
.brand-field>span{font-size:11px;line-height:1.65}
.brand-field p{font-size:12.5px;line-height:1.65}
.brand-assets{
  padding-left:18px;
  border-left:1px solid var(--line);
}
.brand-assets .brand-group{padding-inline:0}
.brand-actions{
  max-width:1120px;
  margin-top:10px;
  padding:10px 0;
}

/* Custom agent: keep the generated settings and natural-language revision visible together. */
#custom-agent-dialog{
  width:min(860px,calc(100vw - 32px));
  max-height:min(760px,calc(100dvh - 24px));
  overflow:hidden;
}
#custom-agent-dialog>form{
  grid-template-rows:auto auto minmax(0,1fr) auto auto;
  max-height:min(760px,calc(100dvh - 24px));
}
#custom-agent-dialog .dialog-heading{
  position:relative;
  padding:16px 20px;
}
.custom-agent-identity{
  grid-template-columns:76px minmax(0,1fr);
  gap:14px;
  padding:14px 20px;
}
.custom-agent-avatar{width:64px;height:64px}
.custom-agent-avatar>.member-avatar{--avatar-size:64px!important}
.custom-agent-avatar-actions :is(button,label){min-height:24px;padding-inline:5px;font-size:10px}
.custom-agent-identity-copy strong{font-size:16px}
.custom-agent-section{padding:16px 20px}
#custom-agent-file-section{
  grid-template-columns:minmax(0,1fr) minmax(250px,300px);
  align-items:stretch;
  gap:14px;
  min-height:0;
  overflow:auto;
}
.custom-agent-file{min-height:0}
.custom-agent-file pre{
  max-height:220px;
  padding:13px 14px;
  font-size:11.5px;
  line-height:1.65;
}
.custom-agent-revision{
  align-content:start;
  padding:2px 0;
}
.custom-agent-revision>div{grid-template-columns:1fr}
.custom-agent-revision textarea{min-height:122px;max-height:180px}
.custom-agent-revision .quiet-button{
  justify-self:end;
  min-width:88px;
}
#custom-agent-dialog .dialog-actions{
  position:relative;
  padding:12px 20px;
}

/* Empty states and lists share one visual rhythm. */
:where(.automatic-empty,.board-empty,.custom-agent-skill-empty,.kb-ledger-empty){
  color:var(--muted);
  line-height:1.65;
}
.scheduled-list-page .scheduled-task-row,.kb-ledger-row{min-height:var(--mature-row)}

@media(max-width:1100px){
  .brand-profile-layout{grid-template-columns:1fr}
  .brand-assets{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0 18px;
    padding-left:0;
    border-left:0;
  }
}

@media(max-width:760px){
  :root{--mature-control:44px;--mature-row:72px;--mature-page-x:14px}
  :where(button,[role=button],summary){min-height:var(--mature-control)}
  #boards-view .board-list-page .board-grid{gap:0;margin-bottom:8px}
  #boards-view .board-list-page .board-card{
    display:grid;
    grid-template-columns:34px minmax(0,1fr) auto;
    grid-template-rows:auto auto;
    align-items:center;
    column-gap:10px;
    min-height:78px;
    padding:10px 4px;
    border-width:0 0 1px;
    border-radius:0;
    background:transparent;
  }
  #boards-view .board-list-page .board-card:hover{
    background:var(--soft);
    transform:none;
  }
  #boards-view .board-card-top{grid-column:1;grid-row:1 / 3}
  #boards-view .board-card-kind{display:none}
  #boards-view .board-card-copy{grid-column:2;grid-row:1 / 3;padding:0}
  #boards-view .board-list-page .board-card strong{font-size:13.5px}
  #boards-view .board-card-copy>span{font-size:10.5px}
  #boards-view .board-card-footer{
    grid-column:3;
    grid-row:1 / 3;
    align-self:center;
    margin:0;
    padding:0 4px;
    border:0;
  }
  #boards-view .board-card-footer time{display:none}
  .brand-profile-layout{display:block}
  .brand-assets{display:block}
  .brand-group{padding:14px 2px}
  body.studio-web .brand-field{display:grid!important;grid-template-columns:86px minmax(0,1fr);gap:10px;padding:6px 0}
  .brand-field p{font-size:12px}
  #custom-agent-dialog{
    width:calc(100vw - 16px);
    max-height:calc(100dvh - 16px);
  }
  #custom-agent-dialog>form{max-height:calc(100dvh - 16px)}
  #custom-agent-dialog .dialog-heading,.custom-agent-section,#custom-agent-dialog .dialog-actions{padding-left:14px;padding-right:14px}
  .custom-agent-identity{grid-template-columns:68px minmax(0,1fr);padding:12px 14px}
  #custom-agent-file-section{grid-template-columns:1fr;gap:12px;overflow:auto}
  .custom-agent-file pre{max-height:24dvh}
  .custom-agent-revision textarea{min-height:84px;max-height:120px;font-size:16px}
  #custom-agent-dialog .dialog-actions :is(button,.primary-button){min-height:44px}
}

@media(max-width:390px){
  .information-heading h1{font-size:19px}
  body.studio-web .brand-field{grid-template-columns:76px minmax(0,1fr)}
}

@media(prefers-reduced-motion:reduce){
  :where(.primary-button,.quiet-button,.icon-button,.information-view,.kb-ledger-view,.board-card){transition:none!important}
}
