/* Respond to the profile pane, which can be narrow inside a wide browser. */
:has(> .tsp-wsgrid) { container: spark-profile / inline-size; }
.tsp-wsgrid.tsp-wsgrid {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.tsp-wsgrid > * { min-width: 0; max-width: 100%; }
.tsp-wsgrid > :last-child { grid-column: 1 / -1; position: static; }
.tsp-wsgrid > nav {
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 6px !important;
  overflow: visible;
}
.tsp-wsgrid > nav > div:first-child { display: none; }
.tsp-wsgrid > nav .tsp-navpill { flex: 1 1 150px; min-width: 0; white-space: normal; }
.tsp-wsgrid input, .tsp-wsgrid select, .tsp-wsgrid textarea { min-width: 0; max-width: 100%; }
@container spark-profile (min-width: 720px) {
  .tsp-wsgrid.tsp-wsgrid { grid-template-columns: 160px minmax(0, 1fr); }
  .tsp-wsgrid > nav { flex-direction: column !important; flex-wrap: nowrap; }
  .tsp-wsgrid > nav > div:first-child { display: block; }
  .tsp-wsgrid > nav .tsp-navpill { flex: none; }
}
@container spark-profile (min-width: 1100px) {
  .tsp-wsgrid.tsp-wsgrid { grid-template-columns: 176px minmax(0, 1fr) 300px; }
  .tsp-wsgrid > :last-child { grid-column: auto; }
}
@container spark-profile (max-width: 719px) {
  .tsp-wsgrid .tsp-fieldrow { display: block; }
  .tsp-wsgrid .tsp-fieldrow > label { display: block; margin-bottom: 4px; }
  .tsp-wsgrid .tsp-fieldrow > div { min-width: 0; }
}
