/* Independent state fields on the shared Tools & state page. */
#tools-view .tools-state-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 36px; align-items: start; }
.tools-section, .state-section { min-width: 0; }
#tools-view .tools-list-heading { display: block; }
#tools-view .tools-list-heading label { max-width: none; }
.workspace-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.workspace-section-heading h2 { font-size: 18px; }
.state-section { border-left: 1px solid var(--border); padding-left: 28px; }
.state-introduction { font-size: 12px; margin: -8px 0 20px; }
#tools-view .tools-layout { grid-template-columns: minmax(180px, 230px) minmax(0, 1fr); gap: 24px; }
.state-workspace { min-width: 0; }
#state-search-label { width: min(100%, 330px); margin-bottom: 26px; }
#state-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
#state-fields .state-field { min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 16px; background: var(--background); }
.state-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.state-card-heading > div:first-child { min-width: 0; }
.state-card-heading h3 { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.state-kind { display: block; font-size: 12px; font-weight: 400; color: var(--muted-foreground); margin-top: 6px; }
.state-actions { display: flex; flex-shrink: 0; align-items: center; gap: 12px; }
.state-card-details { display: grid; gap: 16px; margin: 18px 0 0; }
.state-card-details dt { font-size: 11px; color: var(--muted-foreground); margin-bottom: 8px; }
.state-card-details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.state-starting-value { max-height: 180px; overflow: auto; }
.state-uses { margin: 0; padding: 0; list-style: none; font-size: 12px; }
.state-uses li + li { margin-top: 8px; }
.state-uses span { color: var(--muted-foreground); margin-right: 8px; }
.state-uses button { font-size: 12px; text-align: left; }
#state-fields .state-field:focus-within { outline: 2px solid var(--primary); outline-offset: 4px; }
@media (max-width: 1150px) {
  #tools-view .tools-state-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .state-section { border-left: 0; border-top: 1px solid var(--border); padding: 28px 0 0; }
  #state-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: start; }
}
@media (max-width: 850px) { #tools-view .tools-layout { grid-template-columns: minmax(0, 1fr); } }
